From ec90cbd7680a6f927cb1cea43f33ab7df6d0864c Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期二, 11 十一月 2025 09:23:22 +0800
Subject: [PATCH] -
---
src/pages/delivergoods/query.vue | 65 +++++++++++++++++++++-----------
1 files changed, 42 insertions(+), 23 deletions(-)
diff --git a/src/pages/delivergoods/query.vue b/src/pages/delivergoods/query.vue
index 52ffe24..2625f27 100644
--- a/src/pages/delivergoods/query.vue
+++ b/src/pages/delivergoods/query.vue
@@ -17,17 +17,30 @@
</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"
- @click='goDetail(item)'>
+ <view class="listrecord c-p-t-20" v-for="(item,index) in orderList" :key="item.keyid">
<view class="coreshop-ff chuany-bradius20">
<view class="chuany-font26">
<view class="chuany-flex chuany-justify-between">
<text class="chuany-width7">{{index+1}}</text>
- <view class="chuany-width15">
- {{$util.formatDate(item.createTime,'riqi')}}
+ <view class="chuany-width12">
+ {{$util.formatDate(item.deliverTime,'riqi')}}
</view>
- <view class="chuany-width73">
- <u-text size='14' :text="item.remark" lines="1">
+ <view class="chuany-width13">
+ <u-text size='14' :text="item.driver&&item.driver.name" lines="1">
+ <!-- <u-text size='14' :text="item.remark||item.companyName" lines="1"> -->
+ </u-text>
+ </view>
+ <view class="chuany-width53" @click='goDetail(item)'>
+ <u-text size='14' :text="item.companyName" lines="1">
+ <!-- <u-text size='14' :text="item.remark||item.companyName" lines="1"> -->
+ </u-text>
+ </view>
+ <view class="chuany-width15 chuany-flex chuany-justify-between">
+ <u-text size='14' align="right" v-if='item.deliveredstatus=="Delivered"' type="success" text="宸查��" lines="1">
+ </u-text>
+ <u-text size='14' align="right" v-if='item.deliveredstatus=="Undeliver"' type="error" text="鏈��" lines="1">
+ </u-text>
+ <u-text size='14' align="right" v-if='item.deliveredstatus=="Deliver"' type="primary" text="閫佽揣涓�" lines="1">
</u-text>
</view>
<!-- <view class="chuany-width5" @tap.stop='editOrder(item)'>
@@ -80,7 +93,7 @@
</up-form-item>
</up-form>
</up-modal>
- <fui-date-picker range :show="datePickerShow" :value="getFirstDayOfMonth()" type="3" zIndex="10000"
+ <fui-date-picker :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"
wrapMaxHeight='500px' @select="selectItem">
@@ -98,11 +111,11 @@
list: ['鍏ㄩ儴', '鏈��', '宸查��'],
datePickerShow: false,
shougHuoshow: false,
- workTime: '',
+ workTime: this.$util.formatDate(new Date()),
orderList: [],
loadStatus: 'loadmore',
pageIndex: 1,
- pageSize: 20,
+ pageSize: 30,
contentVal: '',
customerList: [],
isEdit: false,
@@ -167,18 +180,21 @@
switchVal: false,
driverList: [],
buyerName: '',
- timeStart: '',
- timeEnd: '',
+ timeStart: new Date(),
+ timeEnd: new Date(),
sevenDaysDriver: [],
deliverKeyID: '',
deliverKeyName: ''
}
},
-
+
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() {
@@ -187,7 +203,9 @@
onReady() {
this.$refs.formRef.setRules(this.rules);
},
- onLoad() {
+ onLoad(options) {
+ // this.isAdmin = options.isAdmin
+ // console.log(options);
this.Getdrivers()
this.getCustomer()
this.GetDriversOfWithin7days()
@@ -198,9 +216,9 @@
}
},
onPullDownRefresh() {
- this.timeStart = ''
- this.timeEnd = ''
- this.workTime = ''
+ this.timeStart = new Date()
+ this.timeEnd = new Date()
+ this.workTime = this.$util.formatDate(new Date())
this.deliverKeyName = ''
this.init()
uni.stopPullDownRefresh();
@@ -234,9 +252,9 @@
},
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.workTime = val.result
+ this.timeStart = new Date(val.result) //宸ヤ綔寮�濮嬫椂闂�
+ this.timeEnd = new Date(val.result)
this.datePickerShow = !this.datePickerShow
this.init()
},
@@ -314,7 +332,7 @@
companyName: item.companyName
}
this.show7 = true
- this.driverName = item.driver.name
+ this.driverName = item.driver && item.driver.name
// let obj = this.customerList.find(ite => {
// return ite.keyid == item.buyerId
// })
@@ -350,7 +368,7 @@
},
init() {
this.pageIndex = 1
- this.pageSize = 20
+ this.pageSize = 30
this.loadStatus = 'loadmore'
this.orderList = []
this.contentVal = ''
@@ -448,8 +466,9 @@
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
--
Gitblit v1.9.1