From 16213c0f85aa3ac8317797bf4a05fd12940e16d3 Mon Sep 17 00:00:00 2001
From: zhangwei <1504152376@qq.com>
Date: 星期三, 05 三月 2025 17:29:42 +0800
Subject: [PATCH] -
---
src/pages/delivergoods/feedback.vue | 452 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 452 insertions(+), 0 deletions(-)
diff --git a/src/pages/delivergoods/feedback.vue b/src/pages/delivergoods/feedback.vue
index 02409e3..3cc9ccc 100644
--- a/src/pages/delivergoods/feedback.vue
+++ b/src/pages/delivergoods/feedback.vue
@@ -1,8 +1,460 @@
<template>
+ <up-sticky bgColor="#fff">
+ <view class="coreshop-ff content c-p-10">
+ <view class="coreshop-ff content c-p-l-10 c-p-t-10 c-p-r-10">
+ <up-search placeholder="璇风偣鍑婚�夋嫨鏃ユ湡" @click='clickTime' @clear='init' disabled v-model="workTime"
+ search-icon="calendar" @search='init'></up-search>
+ </view>
+ <!-- <view class="coreshop-ff content c-p-10 chuany-flex chuany-justify-between">
+ <view class="chuany-width82">
+ <up-search placeholder="璇风偣鍑婚�夋嫨鍙告満" @click="clickAction('driver7')" @clear='init' disabled
+ @change='init' action-text="鏌ヨ" v-model="deliverKeyName" @search='init'
+ @custom='init'></up-search>
+ </view>
+ <up-text align="right" text='閫佽揣瀹夋帓' size='14' @click="() => show7 = true"></up-text>
+ </view> -->
+ </view>
+ </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="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>
+ <view class="chuany-width67">
+ <u-text size='14' :text="item.remark" lines="1">
+ </u-text>
+ </view>
+ <view class="chuany-width11 chuany-flex chuany-justify-between">
+ <up-icon v-if="item.deliveredstatus=='Undeliver'" name="play-right"
+ @click='startOrder(item)'></up-icon>
+ <up-icon name="checkbox-mark" @click="editOrder(item)"></up-icon>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <up-loadmore :status="loadStatus" />
+ </view>
+ <view v-else>
+ <up-empty text='鏆傛棤' icon="/static/order.png">
+ </up-empty>
+ </view>
+ <up-modal title="瀹屾垚閫佽揣" :show="show7" showCancelButton @confirm="confirmSave" @cancel='cancelModal'
+ :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-datetime-picker hasInput @confirm='confirmDate' :show="shougHuoshow" v-model="deliverTime"
+ mode="date" placeholder="鐐瑰嚮閫夋嫨宸ヤ綔鏃ユ湡" :minDate='Number(new Date(minDate))'
+ @cancel='() => shougHuoshow = false'></up-datetime-picker>
+ </up-form-item> -->
+
+ <up-form-item label="鏀惰揣鍗曚綅" prop="buyerId" :borderBottom='false' ref="item1">
+ <up-input v-model="buyerName" placeholder="璇烽�夋嫨鏀惰揣鍗曚綅" border="none" readonly>
+ <!-- <template #suffix>
+ <up-button @tap="clickAction" text="鐐瑰嚮閫夋嫨" type="primary" size="mini"></up-button>
+ </template> -->
+ </up-input>
+ </up-form-item>
+ <up-form-item label="閫佽揣鎯呭喌" prop="driverId" :borderBottom='false' @click="clickAction" ref="item1">
+ <up-input v-model="selectAc" disabled border="none" disabledColor="#ffffff"
+ placeholder="璇烽�夋嫨閫佽揣鎯呭喌"></up-input>
+ </up-form-item>
+ <!-- <up-form-item label="鑱旂郴浜�" prop="lianxiren" :borderBottom='false' ref="item1">
+ <up-input v-model="arrangeInfo.lianxiren" border="none" placeholder="璇疯緭鍏ヨ仈绯讳汉"></up-input>
+ </up-form-item>
+ <up-form-item label="鑱旂郴鐢佃瘽" prop="dianhua" required :borderBottom='false' ref="item1">
+ <up-input v-model="arrangeInfo.dianhua" border="none" placeholder="璇疯緭鍏ヨ仈绯荤數璇�"></up-input>
+ </up-form-item>
+ <up-form-item label="閫佽揣鍦板潃" prop="dizhi" required :borderBottom='false' ref="item1">
+ <up-input v-model="arrangeInfo.dizhi" border="none" placeholder="璇疯緭鍏ラ�佽揣鍦板潃"></up-input>
+ </up-form-item> -->
+ <up-form-item label="鎰忚鍙嶉" prop="wentifankui" :borderBottom='false' ref="item1">
+ <up-textarea v-model="arrangeInfo.wentifankui" border="none" placeholder="璇疯緭鍏ユ剰瑙佸弽棣�"></up-textarea>
+ </up-form-item>
+
+ <up-form-item label="涓婁紶閫佽揣鍗�" prop="idCardFace">
+ <tem-upload-file immediate :url="`https://appimchat.oss-cn-chengdu.aliyuncs.com`" ref="uploadB"
+ fileType="all" @success="success('File',$event)" @error="errorInvoice"
+ @complete="completeInvoice('',$event)">
+ </tem-upload-file>
+ <!-- <template #right>
+ <up-icon name="arrow-right"></up-icon>
+ </template> -->
+ </up-form-item>
+ </up-form>
+ </up-modal>
+ <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">
+ </up-action-sheet>
+ </view>
</template>
<script>
+ import {
+ mapActions,
+ mapGetters,
+ mapMutations
+ } from 'vuex'
+ export default {
+ data() {
+ return {
+ datePickerShow: false,
+ shougHuoshow: false,
+ workTime: '',
+ orderList: [],
+ loadStatus: 'loadmore',
+ pageIndex: 1,
+ pageSize: 25,
+ contentVal: '',
+ customerList: [],
+ isEdit: false,
+ editItem: {},
+ isLoading: false,
+ show7: false,
+ showActions: false,
+ driverName: '',
+ actions: [{
+ name: '鏈畬鎴�',
+ id: '鎷掓敹'
+ }, {
+ name: '宸插畬鎴�',
+ id: '瀹屾垚'
+ }],
+ selectAc: '宸插畬鎴�',
+ 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))),
+ arrangeInfo: {
+ deliverTime: this.$util.formatDate(new Date(), null, 1),
+ driverId: '',
+ buyerId: '',
+ dianhua: '',
+ wentifankui: '',
+ lianxiren: '',
+ Deliveredstatus: '瀹屾垚',
+ attachments: {}
+ },
+ rules: {
+ 'deliverTime': {
+ type: 'string',
+ required: true,
+ message: '璇烽�夋嫨鏃ユ湡',
+ trigger: ['blur', 'change']
+ },
+ 'arrangeInfo.driverId': {
+ type: 'string',
+ max: 1,
+ required: true,
+ message: '璇烽�夋嫨鍙告満',
+ trigger: ['blur', 'change']
+ },
+ 'arrangeInfo.dianhua': {
+ type: 'string',
+ max: 1,
+ required: true,
+ message: '璇疯緭鍏ヨ仈绯荤數璇�',
+ trigger: ['blur', 'change']
+ },
+ 'arrangeInfo.dizhi': {
+ type: 'string',
+ max: 1,
+ required: true,
+ message: '璇疯緭鍏ラ�佽揣鍦板潃',
+ trigger: ['blur', 'change']
+ },
+ 'arrangeInfo.wentifankui': {
+ type: 'string',
+ max: 1,
+ required: true,
+ message: '璇疯緭鍏ラ�佽揣浜嬬敱',
+ trigger: ['blur', 'change']
+ },
+ },
+ radio: '',
+ switchVal: false,
+ driverList: [],
+ buyerName: '',
+ timeStart: '',
+ timeEnd: '',
+ sevenDaysDriver: [],
+ deliverKeyID: '',
+ deliverKeyName: ''
+ }
+ },
+ onShow() {
+ this.init()
+ },
+ onReady() {
+ this.$refs.formRef.setRules(this.rules);
+ },
+ onLoad() {
+ this.Getdrivers()
+ this.getCustomer()
+ this.GetDriversOfWithin7days()
+ },
+ onReachBottom() {
+ if (this.loadStatus != 'nomore') {
+ this.getList()
+ }
+ },
+ onPullDownRefresh() {
+ this.startDate = ''
+ this.endDate = ''
+ this.workTime = ''
+ this.deliverKeyName = ''
+ this.init()
+ uni.stopPullDownRefresh();
+ },
+ methods: {
+ success(text, e) {
+ //e.res 涓烘湇鍔″櫒杩斿洖鏁版嵁
+ //涓婁紶鎴愬姛鍥炶皟锛屽鐞嗘湇鍔″櫒杩斿洖鏁版嵁銆愭澶勬牴鎹疄闄呰繑鍥炴暟鎹繘琛屽鐞嗐��
+ let obj = {}
+ let res = e.res
+ if (res.statusCode == 200) {
+ obj.attachmentName = res.data
+ } else {
+ uni.$u.toast(res.error)
+
+ this.$refs.uploadB.deleteImage()
+ }
+ this.arrangeInfo.attachments.push(obj)
+ },
+ GetDriversOfWithin7days() {
+ this.$api.GetDriversOfWithin7days().then(res => {
+ if (res.code == 1) {
+ this.sevenDaysDriver = res.data
+ }
+ })
+ },
+ 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()
+ },
+ confirmDate(val) {
+ console.log(val);
+ this.arrangeInfo.deliverTime = val
+ this.shougHuoshow = false
+ },
+ getCustomer() {
+ this.$api.GeCorporateClients().then(res => {
+ if (res.code == 1) {
+ this.customerList = res.data
+ this.customerList.forEach(item => {
+ item.name = item.companyName
+ })
+ }
+ })
+ },
+ selectItem(item) {
+ this.arrangeInfo.Deliveredstatus = item.id
+ this.selectAc = item.name
+ },
+ getFirstDayOfMonth() {
+ var currentDate = new Date();
+ // currentDate.setDate(1); // 灏嗘棩鏈熻涓�1
+ return this.$util.formatDate(currentDate);
+ },
+ clickTime() {
+ this.datePickerShow = !this.datePickerShow
+ },
+ clickShouTime() {
+ this.shougHuoshow = !this.shougHuoshow
+ },
+ clickAction() {
+ this.showActions = true
+ uni.hideKeyboard()
+ },
+ editOrder(item) {
+ this.isEdit = true
+ this.arrangeInfo = {
+ deliverTime: this.$util.formatDate(new Date(), null, 1),
+ driverId: item.driverId,
+ buyerId: item.buyerId,
+ dianhua: item.dianhua,
+ wentifankui: item.wentifankui,
+ lianxiren: item.lianxiren,
+ dizhi: item.dizhi,
+ keyid: item.keyid
+ }
+ this.show7 = true
+ let obj = this.customerList.find(ite => {
+ return ite.keyid == item.buyerId
+ })
+ this.buyerName = obj.companyName
+ },
+ startOrder(item) {
+ let that = this
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭寮�濮嬮�佽揣鍚楋紵',
+ success: function(res) {
+ if (res.confirm) {
+ // 鎵ц纭鍚庣殑鎿嶄綔
+ that.$api.StartDeliverPlan(item.keyid).then(req => {
+ if (req.code == 1) {
+ that.$util.showToast({
+ title: '寮�濮嬮�佽揣鎴愬姛锛�'
+ })
+ that.init()
+ } else {
+ that.$util.showToast({
+ title: req.error
+ })
+ }
+ })
+ } else {
+ // 鎵ц鍙栨秷鍚庣殑鎿嶄綔
+ }
+ }
+ })
+ },
+ init() {
+ this.pageIndex = 1
+ this.pageSize = 20
+ this.loadStatus = 'loadmore'
+ this.orderList = []
+ this.contentVal = ''
+ this.getList()
+ },
+ confirmSave() {
+ this.$api.FinishDeliverPlan(this.arrangeInfo).then(res => {
+ if (res.code == 1) {
+ this.arrangeInfo = {
+ deliverTime: this.$util.formatDate(new Date(), null, 1),
+ driverId: '',
+ buyerId: '',
+ dianhua: '',
+ wentifankui: '',
+ lianxiren: '',
+ dizhi: '',
+ }
+ this.show7 = false
+ this.driverName = ''
+ this.buyerName = ''
+ this.init()
+ } else {
+ this.$util.showToast({
+ title: res.error
+ })
+ }
+ })
+
+ },
+ cancelModal() {
+ this.arrangeInfo = {
+ deliverTime: this.$util.formatDate(new Date(), null, 1),
+ driverId: '',
+ buyerId: '',
+ dianhua: '',
+ wentifankui: '',
+ lianxiren: '',
+ dizhi: '',
+ }
+ this.show7 = false
+ this.driverName = ''
+ this.buyerName = ''
+ },
+ Getdrivers() {
+ this.$api.Getdrivers().then(res => {
+ if (res.code == 1) {
+ this.driverList = res.data
+ }
+ })
+ },
+ getList() {
+ this.deliverKeyName == '' ? this.deliverKeyID = '' : null
+ let data = {
+ page: {
+ pageIndex: this.pageIndex,
+ pageSize: this.pageSize,
+ }
+ }
+ if (this.timeStart) {
+ data.timeStart = this.timeStart
+ }
+ if (this.timeEnd) {
+ data.timeEnd = this.timeEnd
+ }
+ if (this.deliverKeyID) {
+ data.deliverKeyID = this.deliverKeyID
+ }
+ this.$api.driverGetDeliverPlans(data).then(res => {
+ if (res.code == 1) {
+ if (this.pageIndex == 1) {
+ this.orderList = res.data.data
+ } else {
+ this.orderList = this.orderList.concat(...res.data.data)
+ }
+ console.log(this.orderList, 'orderList鈥�');
+ // totalPages = res.data.totalCount
+ // 鏍规嵁count鏁伴噺鍒ゆ柇鏄惁杩樻湁鏁版嵁
+ if (res.data.page.totalCount > this.orderList.length) {
+ this.loadStatus = 'loadmore'
+ this.pageIndex++
+ } else {
+ // 鏁版嵁宸插姞杞藉畬姣�
+ this.loadStatus = 'nomore'
+ }
+ } else {
+ // _that.$refs.uToast.show({ message: res.msg, type: 'error' });
+ }
+ })
+ },
+ accept(item) {
+ let that = this
+ uni.showModal({
+ title: '鎻愮ず',
+ content: '纭鍙楃悊璇ラ�佽揣鍚楋紵',
+ success: function(res) {
+ if (res.confirm) {
+ // 鎵ц纭鍚庣殑鎿嶄綔
+ that.$api.AcceptAppointmentDeliver(item.keyid).then(req => {
+ if (req.code == 1) {
+ that.$util.showToast({
+ title: '鍙楃悊鎴愬姛锛�'
+ })
+ that.init()
+ } else {
+ that.$util.showToast({
+ title: req.error
+ })
+ }
+ })
+ } else {
+ // 鎵ц鍙栨秷鍚庣殑鎿嶄綔
+ }
+ }
+ })
+ },
+ actionClick(item, e) {
+ console.log(e);
+ if (e.index == 0) {
+ this.contentVal = item.wentifankui
+ }
+ }
+ }
+ }
</script>
<style>
+ .u-textarea {
+ padding: 0 !important;
+ }
+
+ .u-form-item__body {
+ padding: 5px 0 !important;
+ }
</style>
\ No newline at end of file
--
Gitblit v1.9.1