From 46ab572a50c54b0e65a50545b531f072690c0013 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Fri, 20 Oct 2023 11:54:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=8B=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compoment/tiplist/tiplist.vue | 19 +- config/host.js | 4 +- manifest.json | 4 +- pages/user/user.vue | 2 +- .../CustomerOrdersDetails.vue | 12 +- pagesHome/pages/CustomerSign/CustomerSign.vue | 91 +++++--- .../pages/SelfPScanList/SelfPScanList.vue | 2 +- .../SelfPickupDetails/SelfPickupDetails.vue | 7 + pagesHome/pages/SetPrice/SetPrice.vue | 185 +++++++++------- pagesHome/pages/pickingScan/pickingScan.vue | 11 +- .../CustomerOrdersDetails.css | 2 +- unpackage/dist/dev/app-plus/app-service.js | 202 +++++++++++------- unpackage/dist/dev/app-plus/manifest.json | 10 +- 13 files changed, 338 insertions(+), 213 deletions(-) diff --git a/compoment/tiplist/tiplist.vue b/compoment/tiplist/tiplist.vue index d431c23..bf0db6d 100644 --- a/compoment/tiplist/tiplist.vue +++ b/compoment/tiplist/tiplist.vue @@ -34,12 +34,12 @@ :class="{'tpstitl': true,'start': ImagesRequiredFields.find(val => val.key === item.dictKey), 'showTitle': ImagesRequiredFields.find(val => val.key === item.dictKey) && item.imgList.length < 3}"> {{item.dictValue}} - 预览模版 + 预览模版 - - + + @@ -169,8 +169,8 @@ - - + + @@ -203,6 +203,8 @@ ImagesRequiredFields: [], inpList: [], showPreviewPicture: false, + // 预览图片地址 + previewPictureUrl: '/static/changku.png', // 盘点复选框 checkSectionList: [], // 上架 @@ -276,7 +278,9 @@ break; } } - function remove(index, i) { + function remove(index : number, i : number, type : string) { + // 是否为提交修改, 记录修改的类型 + if (details.isChange && !details.changeImageList.includes(type)) details.changeImageList.push(type) details.imglist[index].imgList.splice(i, 1) } function updateimg(type : string, index : number) { @@ -344,7 +348,8 @@ - function handleShowImage() { + function handleShowImage(imgUrl = '/static/changku.png') { + details.previewPictureUrl = imgUrl details.showPreviewPicture = !details.showPreviewPicture } diff --git a/config/host.js b/config/host.js index 1597c9e..8c73905 100644 --- a/config/host.js +++ b/config/host.js @@ -10,9 +10,9 @@ // zhy // const devhost = 'http://192.168.10.48:8888/' // tjj -const devhost = 'http://192.168.10.29:13000/' +// const devhost = 'http://192.168.10.29:13000/' // cyz -// const devhost = 'http://192.168.10.75:8777/' +const devhost = 'http://192.168.10.75:8777/' // 正式 // const devhost = 'http://h5uapi.huitongys.com/' // cg diff --git a/manifest.json b/manifest.json index 514effb..72acf75 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "货无忧", "appid" : "__UNI__EB22F37", "description" : "", - "versionName" : "1.0.11", - "versionCode" : 1011, + "versionName" : "1.0.13", + "versionCode" : 1013, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { diff --git a/pages/user/user.vue b/pages/user/user.vue index a9f1bb2..eced263 100644 --- a/pages/user/user.vue +++ b/pages/user/user.vue @@ -173,7 +173,7 @@ // 获取版本信息 // let version = await utils.getversion() let version = { - version: '1.0.11', + version: '1.0.13', pkName: 'com.hwy.pda' } console.log("version 版本>>>>", version) diff --git a/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue b/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue index c0f56bd..aeb6e4c 100644 --- a/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue +++ b/pagesHome/pages/CustomerOrdersDetails/CustomerOrdersDetails.vue @@ -223,12 +223,12 @@ response = await signforinventory(data) } details.datalist = response.data.records || [] - if (loadingNub.value != 0 && details.isscan) { - console.log(loadingNub.value + '件') - setTimeout(() => { - utils.ttsspke(loadingNub.value + '件') - }, 1000) - } + // if (loadingNub.value != 0 && details.isscan) { + // console.log(loadingNub.value + '件') + // setTimeout(() => { + // utils.ttsspke(loadingNub.value + '件') + // }, 1000) + // } } function checktype(e) { if (e == '') { diff --git a/pagesHome/pages/CustomerSign/CustomerSign.vue b/pagesHome/pages/CustomerSign/CustomerSign.vue index f28aff8..b70d80f 100644 --- a/pagesHome/pages/CustomerSign/CustomerSign.vue +++ b/pagesHome/pages/CustomerSign/CustomerSign.vue @@ -98,6 +98,7 @@ onUnload } from '@dcloudio/uni-app' import { computed, reactive, ref, toRefs } from "vue"; + import utils from '@/utils/utils.js'; let details = reactive({ items: {} as any, id: '', @@ -197,7 +198,7 @@ let imglis = [], rearks = '' if (res.code == 200) { // 有照片或有备注时, 为修改提交状态 - if (res.data.deliverySignPictures || res.data.driverRemarks) { + if (Object.keys(res.data.deliverySignPictures).length !== 0 || res.data.driverRemarks) { // 提交状态改为修改 details.isChange = true imglis = res.data.deliverySignPictures @@ -229,6 +230,7 @@ changeImageList: details.changeImageList, ImagesRequiredFields: details.ImagesRequiredFields, success: async (detail) => { + console.log('detail :>> ', detail); let data = { deliveryId: details.id, reservationId: item.id, @@ -239,33 +241,50 @@ let res : any = null // 是否符合提交条件 let isSubmit = true + console.log('details.ImagesRequiredFields :>> ', details.ImagesRequiredFields); // 是否为修改提交 if (details.isChange) { - console.log('details.imgList :>> ', details.imgList); - const filterMap = details.imgList.filter(item => details.changeImageList.includes(item.dictKey)) + const filterMap = detail.imglist.filter(item => details.changeImageList.includes(item.dictKey)) filterMap.forEach(item => { data.map[item.dictKey] = item.imgList - console.log('object :>> ', details.ImagesRequiredFields.find(val => val === item.dictKey) && item.imgList.length < 3); - if (!details.ImagesRequiredFields.find(val => val === item.dictKey) && item.imgList.length < 3) isSubmit = false; + console.log(1) + if (details.ImagesRequiredFields.find(val => val.key === item.dictKey) && item.imgList.length < 3) isSubmit = false; else isSubmit = true }) - console.log('data :>> ', data); - console.log('isSubmit :>> ', isSubmit); - if (!isSubmit) return + if (!isSubmit) { + uni.showToast({ + title: '请根据要求上传照片', + icon: 'none' + }) + utils.ttsspke('必传照片不足') + return + } res = await signforUpdatePicture(data) } else { - details.imgList.forEach(item => { + console.log('details.imgList :>> ', details.imgList); + detail.imglist.forEach(item => { data.map[item.dictKey] = item.imgList - if (!details.ImagesRequiredFields.find(val => val === item.dictKey) && item.imgList.length < 3) isSubmit = false + console.log(2) + console.log('item.imgList :>> ', item.imgList); + if (details.ImagesRequiredFields.find(val => val.key === item.dictKey) && item.imgList.length < 3) isSubmit = false else isSubmit = true }) - console.log('details.isChange :>> ', details.isChange); - console.log('isSubmit :>> ', isSubmit); - if (!isSubmit) return + if (!isSubmit) { + uni.showToast({ + title: '请根据要求上传照片', + icon: 'none' + }) + utils.ttsspke('必传照片不足') + return + } res = await signforsignforack(data) } if (res.code == 200) { initpage() + uni.showToast({ + title: res.msg, + icon: 'none' + }) } tiplists.value.setdetails({ isshow: false }) }, @@ -317,29 +336,43 @@ geocode: true, isHighAccuracy: true, success: async function (res) { - console.log(JSON.stringify(res)); - // let addr=res.address - // console.log(`${addr.province}${addr.city}${addr.district}${addr.street}${addr.streetNum}`); - console.log('当前位置的经度:' + res.longitude); - console.log('当前位置的纬度:' + res.latitude); - let data = { - deliveryId: details.id, - reservationId: item.id, - positioning: res.longitude + ',' + res.latitude, - positioningAdr: '' - } - let response = await signforpositioning(data) - console.log(response); - if (response.code == 200) { - initpage() + try { + uni.showLoading({ + title: '打卡中', + mask: true + }) + console.log(JSON.stringify(res)); + // let addr=res.address + // console.log(`${addr.province}${addr.city}${addr.district}${addr.street}${addr.streetNum}`); + console.log('当前位置的经度:' + res.longitude); + console.log('当前位置的纬度:' + res.latitude); + let data = { + deliveryId: details.id, + reservationId: item.id, + positioning: res.longitude + ',' + res.latitude, + positioningAdr: '' + } + let response = await signforpositioning(data) + console.log(response); + if (response.code == 200) { + initpage() + } + + } catch (err) { + console.log('err :>> ', err); + //TODO handle the exception + } finally { + uni.hideLoading() } + }, fail: (err) => { uni.showToast({ - title: err.errMsg, + title: '定位失败', icon: 'none' }) console.log(err); + uni.hideLoading() } }); } diff --git a/pagesHome/pages/SelfPScanList/SelfPScanList.vue b/pagesHome/pages/SelfPScanList/SelfPScanList.vue index b1341c9..747d677 100644 --- a/pagesHome/pages/SelfPScanList/SelfPScanList.vue +++ b/pagesHome/pages/SelfPScanList/SelfPScanList.vue @@ -95,7 +95,7 @@ 运单号:{{item.waybillNumber}} - 产品名称:{{item.firsts}} + 产品名称:{{item.descriptionGoods}} 预计签收件数:{{item.reservationQuantity}} diff --git a/pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue b/pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue index f1a5a40..3e3f780 100644 --- a/pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue +++ b/pagesHome/pages/SelfPickupDetails/SelfPickupDetails.vue @@ -273,6 +273,13 @@ if (res.code == 200) { details.isscan = true initpage() + + } else if (res.code === 3001) { + uni.showToast({ + title: res.msg, + icon: 'none' + }) + utils.ttsspke(res.audio) } } async function initpage() { diff --git a/pagesHome/pages/SetPrice/SetPrice.vue b/pagesHome/pages/SetPrice/SetPrice.vue index 43a1762..4595aa0 100644 --- a/pagesHome/pages/SetPrice/SetPrice.vue +++ b/pagesHome/pages/SetPrice/SetPrice.vue @@ -1,8 +1,6 @@