| | |
| | | </up-sticky> |
| | | <view class="c-p-b-100"> |
| | | <view class="c-p-l-20 c-p-r-20" v-if="orderList&&orderList.length>0"> |
| | | <view class="listrecord c-p-t-20" v-for="(item,index) in orderList" :key="item.keyid"> |
| | | <view class="listrecord c-p-t-20" v-for="(item,index) in orderList" :key="item.keyid" |
| | | @click='goDetail(item)'> |
| | | <view class="coreshop-ff chuany-bradius20"> |
| | | <view class="chuany-font26"> |
| | | <view class="chuany-flex chuany-justify-between"> |
| | |
| | | <u-text size='14' :text="item.remark" lines="1"> |
| | | </u-text> |
| | | </view> |
| | | <view class="chuany-width5"> |
| | | <up-icon name="edit-pen" @click='editOrder(item)'></up-icon> |
| | | <view class="chuany-width5" @tap.stop='editOrder(item)'> |
| | | <up-icon name="edit-pen"></up-icon> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </up-empty> |
| | | </view> |
| | | <up-modal title="送货安排" :show="show7" showCancelButton @confirm="confirmSave" @cancel='cancelModal' |
| | | :asyncClose="true"> |
| | | ref='modalArrange' :asyncClose="true"> |
| | | <up-form labelPosition="left" :model="arrangeInfo" ref="formRef" labelWidth='140rpx'> |
| | | <up-form-item label="送货日期" prop="deliverTime" required :borderBottom='false' ref="item1" |
| | | @click="clickShouTime"> |
| | |
| | | <up-input v-model="driverName" disabled border="none" disabledColor="#ffffff" |
| | | placeholder="请选择司机"></up-input> |
| | | </up-form-item> |
| | | <up-form-item label="收货单位" prop="buyerId" required :borderBottom='false' ref="item1"> |
| | | <up-input v-model="buyerName" placeholder="请选择收货单位" border="none"> |
| | | <up-form-item label="收货单位" prop="companyName" required :borderBottom='false' ref="item1"> |
| | | <up-input v-model="arrangeInfo.companyName" placeholder="请选择收货单位" border="none"> |
| | | <template #suffix> |
| | | <up-button @tap="clickAction" text="点击选择" type="primary" size="mini"></up-button> |
| | | </template> |
| | |
| | | <fui-date-picker range :show="datePickerShow" :value="getFirstDayOfMonth()" type="3" zIndex="10000" |
| | | @change="changePicker" :minDate='minDate' :maxDate='maxDate' @cancel="clickTime"></fui-date-picker> |
| | | <up-action-sheet :show="showActions" :actions="actions" title="请选择" @close="showActions = false" |
| | | @select="selectItem"> |
| | | wrapMaxHeight='500px' @select="selectItem"> |
| | | </up-action-sheet> |
| | | </view> |
| | | </template> |
| | |
| | | loadStatus: 'loadmore', |
| | | pageIndex: 1, |
| | | pageSize: 20, |
| | | contentVal: '', |
| | | customerList: [], |
| | | isEdit: false, |
| | | editItem: {}, |
| | |
| | | arrangeInfo: { |
| | | deliverTime: this.$util.formatDate(new Date(), null, 1), |
| | | driverId: '', |
| | | buyerId: '', |
| | | buyerId: null, |
| | | dianhua: '', |
| | | remark: '', |
| | | lianxiren: '', |
| | | dizhi: '', |
| | | companyName: '' |
| | | }, |
| | | rules: { |
| | | 'deliverTime': { |
| | |
| | | message: '请选择日期', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'arrangeInfo.driverId': { |
| | | // 'driverId': { |
| | | // required: true, |
| | | // message: '请选择司机', |
| | | // trigger: ['blur', 'change'] |
| | | // }, |
| | | 'companyName': { |
| | | type: 'string', |
| | | max: 1, |
| | | required: true, |
| | | message: '请选择司机', |
| | | message: '请填写公司', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'arrangeInfo.dianhua': { |
| | | 'dianhua': { |
| | | type: 'string', |
| | | max: 1, |
| | | required: true, |
| | | message: '请输入联系电话', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'arrangeInfo.dizhi': { |
| | | 'dizhi': { |
| | | type: 'string', |
| | | max: 1, |
| | | required: true, |
| | | message: '请输入送货地址', |
| | | trigger: ['blur', 'change'] |
| | | }, |
| | | 'arrangeInfo.remark': { |
| | | 'remark': { |
| | | type: 'string', |
| | | max: 1, |
| | | required: true, |
| | | message: '请输入送货事由', |
| | | trigger: ['blur', 'change'] |
| | |
| | | this.getCustomer() |
| | | this.GetDriversOfWithin7days() |
| | | }, |
| | | onMounted() { |
| | | this.$refs.formRef.setRules(this.rules); |
| | | }, |
| | | onReachBottom() { |
| | | if (this.loadStatus != 'nomore') { |
| | | this.getList() |
| | | } |
| | | }, |
| | | onPullDownRefresh() { |
| | | this.startDate = '' |
| | | this.endDate = '' |
| | | this.timeStart = '' |
| | | this.timeEnd = '' |
| | | this.workTime = '' |
| | | this.deliverKeyName = '' |
| | | this.init() |
| | | uni.stopPullDownRefresh(); |
| | | }, |
| | | methods: { |
| | | goDetail(item) { |
| | | uni.navigateTo({ |
| | | url: `/pages/delivergoods/arrangedetail?KeyId=${item.keyid}` |
| | | }); |
| | | }, |
| | | GetDriversOfWithin7days() { |
| | | this.$api.GetDriversOfWithin7days().then(res => { |
| | | if (res.code == 1) { |
| | |
| | | }) |
| | | }, |
| | | changePicker(val) { |
| | | console.log(val); |
| | | this.workTime = val.startDate.result + '至' + val.endDate.result |
| | | 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); |
| | |
| | | this.arrangeInfo.dizhi = item.adder |
| | | this.arrangeInfo.dianhua = item.companyPhone |
| | | this.arrangeInfo.lianxiren = item.businessManagers |
| | | this.arrangeInfo.companyName = item.companyName |
| | | } |
| | | this.selectAc = '' |
| | | }, |
| | |
| | | remark: item.remark, |
| | | lianxiren: item.lianxiren, |
| | | dizhi: item.dizhi, |
| | | keyid: item.keyid |
| | | keyid: item.keyid, |
| | | companyName: item.companyName |
| | | } |
| | | this.show7 = true |
| | | this.driverName = item.driver.name |
| | | let obj = this.customerList.find(ite => { |
| | | return ite.keyid == item.buyerId |
| | | }) |
| | | this.buyerName = obj.companyName |
| | | // let obj = this.customerList.find(ite => { |
| | | // return ite.keyid == item.buyerId |
| | | // }) |
| | | // this.buyerName = obj.companyName |
| | | }, |
| | | delOrder(item) { |
| | | let that = this |
| | |
| | | this.pageSize = 20 |
| | | this.loadStatus = 'loadmore' |
| | | this.orderList = [] |
| | | this.contentVal = '' |
| | | console.log(this.orderList); |
| | | this.getList() |
| | | }, |
| | | confirmSave() { |
| | | if (!this.arrangeInfo.driverId) { |
| | | this.$refs.modalArrange.loading = false |
| | | return this.$util.showToast({ |
| | | title: '请先选择司机!' |
| | | }) |
| | | } |
| | | console.log(); |
| | | this.$refs.formRef.validate().then(res => { |
| | | if (this.isEdit) { |
| | | this.$api.UpDataDeliverPlans(this.arrangeInfo).then(res => { |
| | |
| | | this.arrangeInfo = { |
| | | deliverTime: this.$util.formatDate(new Date(), null, 1), |
| | | driverId: '', |
| | | buyerId: '', |
| | | buyerId: null, |
| | | dianhua: '', |
| | | remark: '', |
| | | lianxiren: '', |
| | |
| | | this.arrangeInfo = { |
| | | deliverTime: this.$util.formatDate(new Date(), null, 1), |
| | | driverId: '', |
| | | buyerId: '', |
| | | buyerId: null, |
| | | dianhua: '', |
| | | remark: '', |
| | | lianxiren: '', |
| | |
| | | } |
| | | this.isLoading = false |
| | | }) |
| | | }).catch(errors => { |
| | | this.$refs.modalArrange.loading = false |
| | | }) |
| | | |
| | | }, |
| | |
| | | this.arrangeInfo = { |
| | | deliverTime: this.$util.formatDate(new Date(), null, 1), |
| | | driverId: '', |
| | | buyerId: '', |
| | | buyerId: null, |
| | | dianhua: '', |
| | | remark: '', |
| | | lianxiren: '', |
| | |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | actionClick(item, e) { |
| | | console.log(e); |
| | | if (e.index == 0) { |
| | | this.contentVal = item.remark |
| | | } |
| | | } |
| | | } |
| | | } |