| | |
| | | driverName: '', |
| | | actions: [], |
| | | selectAc: '', |
| | | deliveredState:'Undeliver', |
| | | deliveredState: 'Undeliver', |
| | | minDate: this.$util.formatDate(new Date(), null, -7), |
| | | maxDate: this.$util.formatDate(new Date(), null, 7), |
| | | deliverTime: Number(new Date(this.$util.formatDate(new Date(), null, 1))), |
| | |
| | | deliverKeyName: '' |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.init() |
| | | }, |
| | | |
| | | computed: { |
| | | ...mapGetters(['userInfo']), |
| | | isAdmin() { |
| | | return this.userInfo.userCompany ? this.userInfo.userCompany.isAdmin : false |
| | | if (this.userInfo.oaPermissions) { |
| | | return this.userInfo.oaPermissions.bF_IsDeliverManage ? true : false |
| | | } |
| | | return false |
| | | }, |
| | | }, |
| | | onShow() { |
| | | this.init() |
| | | }, |
| | | onReady() { |
| | | this.$refs.formRef.setRules(this.rules); |
| | | }, |
| | | onLoad() { |
| | | onLoad(options) { |
| | | // this.isAdmin = options.isAdmin |
| | | // console.log(options); |
| | | this.Getdrivers() |
| | | this.getCustomer() |
| | | this.GetDriversOfWithin7days() |
| | |
| | | } |
| | | }, |
| | | onPullDownRefresh() { |
| | | this.startDate = '' |
| | | this.endDate = '' |
| | | this.timeStart = '' |
| | | this.timeEnd = '' |
| | | this.workTime = '' |
| | | this.deliverKeyName = '' |
| | | this.init() |
| | |
| | | this.timeStart = new Date(val.startDate.result) //工作开始时间 |
| | | this.timeEnd = new Date(val.endDate.result) |
| | | this.datePickerShow = !this.datePickerShow |
| | | this.getList() |
| | | this.init() |
| | | }, |
| | | confirmDate(val) { |
| | | console.log(val); |
| | |
| | | getList() { |
| | | this.deliverKeyName == '' ? this.deliverKeyID = '' : null |
| | | let data = { |
| | | deliveredState:this.deliveredState, |
| | | deliveredState: this.deliveredState, |
| | | page: { |
| | | pageIndex: this.pageIndex, |
| | | pageSize: this.pageSize, |
| | |
| | | if (this.deliverKeyID) { |
| | | data.deliverKeyID = this.deliverKeyID |
| | | } |
| | | console.log(this.isAdmin); |
| | | let getListApi = null |
| | | if (this.isAdmmin) { |
| | | if (this.isAdmin) { |
| | | getListApi = this.$api.GetDeliverPlans |
| | | } else { |
| | | getListApi = this.$api.workerGetDeliverPlans |