From 8aad82943721ba916d85e142609a6820c14ae28e Mon Sep 17 00:00:00 2001 From: 13208366016 <47278630@qq.com> Date: Mon, 6 Nov 2023 20:05:52 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E7=BA=A6=E5=BC=B9=E7=AA=97=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E4=B8=8A=E4=BC=A0=EF=BC=8C=E9=A2=84=E7=BA=A6=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/distribution/reservation/atlas.vue | 80 +- src/views/distribution/signfor/devtmp.vue | 1258 ------ .../signfor/distributionSignforedt.vue | 3515 ++++++----------- .../signfor/distributionSignforedtYL.vue | 2299 +++++++++++ .../signfor/distributionSignfortreat.vue | 217 +- .../turndelivery/deliveryDiscuss.vue | 22 + vite.config.js | 4 +- 7 files changed, 3803 insertions(+), 3592 deletions(-) delete mode 100644 src/views/distribution/signfor/devtmp.vue create mode 100644 src/views/distribution/signfor/distributionSignforedtYL.vue diff --git a/src/views/distribution/reservation/atlas.vue b/src/views/distribution/reservation/atlas.vue index ad35caab..332149d1 100644 --- a/src/views/distribution/reservation/atlas.vue +++ b/src/views/distribution/reservation/atlas.vue @@ -6,25 +6,29 @@
- - - - - - - - - - - -
- 确认(转配送) - 返 回 -
+ +
+ + +
+
+
+ 确认(转配送) + 返 回 +
@@ -33,7 +37,7 @@ import { useStore } from 'vuex'; import { getReservationAddr } from '@/api/distribution/distributionReservation'; import { getDictionaryBiz } from '@/api/system/dict'; -import { onMounted, reactive, toRefs, watchEffect, ref } from 'vue'; +import { onMounted, reactive, toRefs, watchEffect } from 'vue'; import { useRouter } from 'vue-router'; import { selectStockArticleAtlasInfo } from '@/api/distribution/distributionDeliveryList'; // import { getReservationAddr } from '@/api/distribution/distributionReservation'; @@ -55,7 +59,6 @@ let details = reactive({ drivingarrs: [], // datalist:[] }); -const DataInfo = ref([]); //表格信息 onMounted(() => { initmap(); }); @@ -64,11 +67,13 @@ watchEffect(() => { details.item = router.currentRoute.value.query.id; if (!details.item) return; getReservationAddr(details.item).then(res => { - console.log(res, '获取到的参数+'); - DataInfo.value = res.data.data; - console.log(DataInfo, '接收参数'); - this.console.log(res.data.data); + // selectStockArticleAtlasInfo(details.item.id).then(res => { + console.log(res.data.data); const data = res.data.data; + // details.lng = res.data.data[0].jingdu; + // details.lat = res.data.data[0].weidu; + // details.abbreviation=res?.data?.data[0]?.warehouseName + // console.log('res------------->', data); details.reservationData = data; details.mapLoc.remove(details.markersarr); details.drivingarrs.map(item => { @@ -102,7 +107,6 @@ function checkgoto() { return; } let stids = ids.join(','); - // 跳转适配页面 router.push({ path: '/distribution/turndelivery/deliveryMarket', query: { @@ -225,7 +229,6 @@ const { datalists } = toRefs(details); } .mabxmp { display: flex; - height: 100%; align-items: flex-start; > .mapbox { width: 50%; @@ -250,31 +253,4 @@ const { datalists } = toRefs(details); box-sizing: border-box; width: 100%; } -:deep(.el-card) { - height: 100%; -} -.amap-container { - height: 100%; - margin-bottom: 10px; -} -:deep(.el-card__body) { - height: 100%; - .avue-crud { - height: 100%; - .mapbox { - height: 100%; - } - } -} -:deep(.cell) { - display: flex; - padding: 0; - align-items: center; - justify-content: center; -} -:deep(.el-table-column--selection) { - display: flex; - align-items: center; - justify-content: center; -} diff --git a/src/views/distribution/signfor/devtmp.vue b/src/views/distribution/signfor/devtmp.vue deleted file mode 100644 index a7c31756..00000000 --- a/src/views/distribution/signfor/devtmp.vue +++ /dev/null @@ -1,1258 +0,0 @@ - - - - - diff --git a/src/views/distribution/signfor/distributionSignforedt.vue b/src/views/distribution/signfor/distributionSignforedt.vue index 5197092d..9642c048 100644 --- a/src/views/distribution/signfor/distributionSignforedt.vue +++ b/src/views/distribution/signfor/distributionSignforedt.vue @@ -1,2299 +1,1328 @@ - - diff --git a/src/views/distribution/signfor/distributionSignforedtYL.vue b/src/views/distribution/signfor/distributionSignforedtYL.vue new file mode 100644 index 00000000..5197092d --- /dev/null +++ b/src/views/distribution/signfor/distributionSignforedtYL.vue @@ -0,0 +1,2299 @@ + + + + + diff --git a/src/views/distribution/signfor/distributionSignfortreat.vue b/src/views/distribution/signfor/distributionSignfortreat.vue index 23d863a2..032abc9d 100644 --- a/src/views/distribution/signfor/distributionSignfortreat.vue +++ b/src/views/distribution/signfor/distributionSignfortreat.vue @@ -133,12 +133,16 @@ @click="viewAbnormalLoading(slotProps.scope)" >异 常 审 核 + 复 核 @@ -244,28 +248,23 @@ - - - -
-
- 确定 - 取消 -
-
- ------------------------------------------------------------------------------- + + + +
- + - + - + @@ -276,17 +275,19 @@ - +
上门照 @@ -299,10 +300,12 @@ 堆码照 @@ -315,10 +318,12 @@ 易碎照 @@ -331,10 +336,12 @@ 家配照 @@ -347,10 +354,12 @@ 签收照 @@ -358,6 +367,13 @@ IMG
+ +
+
+ 确定 + 取消 +
+
@@ -457,7 +473,7 @@ import option from '@/option/distribution/distributionSignfor'; import { mapGetters } from 'vuex'; import { getDictionaryBiz } from '@/api/system/dict'; import dayjs from 'dayjs'; - +import { getToken } from '@/utils/auth'; export default { data() { return { @@ -474,7 +490,7 @@ export default { HomePhotos: [], // 签收照 SignForPhotos: [], - + reservationId: null, //当前行的ID columnList: [ // { // prop: '', @@ -1347,6 +1363,14 @@ export default { }); return ids.join(','); }, + // 图片上传接口 + doubledCount() { + return '/api/blade-resource/oss/endpoint/put-file'; + }, + // 图片上传必须携带TOKEN + headers() { + return { 'Blade-Auth': 'Bearer ' + getToken() }; + }, }, methods: { showdrawer(value) { @@ -1363,6 +1387,41 @@ export default { console.log('执行了2回调'); dialogVisible.value = true; }, + photo(name, data) { + if (response.success == true) { + console.log(response, '图片上传成功'); + this.name[this.name.length - 1].url = data.data.link; + } + }, + methods: { + // 通用的图片上传成功处理函数 + handleImageUploadSuccess(response, uploadFile, photoArray) { + if (response.success === true) { + console.log(response, '图片上传成功'); + this.$set(photoArray, photoArray.length - 1, { url: response.data.link }); + } + }, + // 上门照图片上传成功 + ImgSuccessA(response, uploadFile) { + this.handleImageUploadSuccess(response, uploadFile, this.DoorstepPhoto); + }, + // 堆门图片上传成功 + ImgSuccessB(response, uploadFile) { + this.handleImageUploadSuccess(response, uploadFile, this.StackingPhoto); + }, + // 易碎图片上传成功 + ImgSuccessC(response, uploadFile) { + this.handleImageUploadSuccess(response, uploadFile, this.FragilePhotos); + }, + // 家配图片上传成功 + ImgSuccessD(response, uploadFile) { + this.handleImageUploadSuccess(response, uploadFile, this.HomePhotos); + }, + // 签收图片上传成功 + ImgSuccessE(response, uploadFile) { + this.handleImageUploadSuccess(response, uploadFile, this.SignForPhotos); + }, + }, /** * 弹窗的勾选回调,用于更改头部数组 * 固定搭配,只需要更换 columnList @@ -1387,31 +1446,114 @@ export default { //签收 submitForm() { // this.isDis = true; + console.log(this.$refs.signform.validate, 'this.$refs.signform'); + // let row = {}; + // row.id = this.signform.id; + // row.clerkSignPictures = this.signform.clerkSignPictures; + // row.clerkSignRemarks = this.signform.clerkSignRemarks; + // console.log(row, '要提交的数据'); this.$refs.signform.validate(valid => { if (valid) { let row = {}; + + row.map = { + photo_1: [], + photo_2: [], + photo_3: [], + photo_4: [], + photo_5: [], + }; + // 提交图片处理 + //最后提交 row.id = this.signform.id; + row.reservationId = this.reservationId; row.clerkSignPictures = this.signform.clerkSignPictures; - row.clerkSignRemarks = this.signform.clerkSignRemarks; - row.signingStatus = '2'; - // if (!!row.id){ - updatesign(row).then( - () => { - this.$message({ - type: 'success', - message: '操作成功!', + row.clerkSignRemarks = this.TcForm.clerkSignRemarks;//备注 + row.signingStatus = '2';//状态 + // 本身图片处理开始 + const photoMap = { + photo_1: 'photo_1', + photo_2: 'photo_2', + photo_3: 'photo_3', + photo_4: 'photo_4', + photo_5: 'photo_5', + }; + this.TcForm.printVOList.forEach(item => { + const type = item.type; + if (photoMap.hasOwnProperty(type)) { + const photoProperty = photoMap[type]; + row.map[photoProperty].push({ + name: item.name, + reservationId: this.reservationId, + type: type, + urlRoute: item.urlRoute, }); - this.signBox = false; - this.onLoad(this.page); - }, - error => { - console.log(error); - this.signBox = false; } - ); + }); + // 本身图片处理结束 + + // 上传图片处理开始 + function generatePhotoArray(photoType, photoItems, reservationId) { + const photoArray = []; + photoItems.forEach(item => { + photoArray.push({ + name: item.name, + reservationId: reservationId, + type: photoType, + urlRoute: item.url, + }); + }); + return photoArray; + } + row.map.photo_1 = generatePhotoArray('photo_1', this.DoorstepPhoto, this.reservationId); + row.map.photo_2 = generatePhotoArray('photo_2', this.StackingPhoto, this.reservationId); + row.map.photo_3 = generatePhotoArray('photo_3', this.FragilePhotos, this.reservationId); + row.map.photo_4 = generatePhotoArray('photo_4', this.HomePhotos, this.reservationId); + row.map.photo_5 = generatePhotoArray('photo_5', this.SignForPhotos, this.reservationId); + // 上传图片处理结束 + // 图片去重 + this.deduplicateByIdAndUpdate(row.map.photo_1); + this.deduplicateByIdAndUpdate(row.map.photo_2); + this.deduplicateByIdAndUpdate(row.map.photo_3); + this.deduplicateByIdAndUpdate(row.map.photo_4); + this.deduplicateByIdAndUpdate(row.map.photo_5); + console.log(row, '要提交的参数'); + // 提交 + // updatesign(row).then(res => { + // console.log(res, '提交之后返回的参数'); + // }); + // if (!!row.id){ + // updatesign(row).then( + // () => { + // console.log(row, '要提交的值'); + // this.$message({ + // type: 'success', + // message: '操作成功!', + // }); + // this.signBox = false; + // this.onLoad(this.page); + // }, + // error => { + // console.log(error); + // this.signBox = false; + // } + // ); } }); }, + deduplicateByIdAndUpdate(val) { + const result = val.filter((item, index, array) => { + // 通过 some 方法检查当前元素之前是否已经出现过相同的ID + return !array.slice(0, index).some(prevItem => prevItem.urlRoute === item.urlRoute); + }); + + // 清空传入的值 + val.length = 0; + // 将去重后的参数重新赋值给传入的值 + result.forEach(item => { + val.push(item); + }); + }, selectionsc(value) { console.log(value); }, @@ -1459,6 +1601,7 @@ export default { console.log('签收>>>>>>>>>>', row); // this.title = '查看'; // this.view = true; + this.reservationId = row.reservationId; //存储当前行的ID this.signform = row; this.signBox = true; getDetail(row.id).then(res => { diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue index 76c9b2ef..ae7c3b9c 100644 --- a/src/views/distribution/turndelivery/deliveryDiscuss.vue +++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue @@ -1163,6 +1163,28 @@ const menuData = ref([ // sortable: true, // head: true, // }, + { + prop: 'mallCode', + label: '商场编号', + type: 1, + values: '', + width: '260', + checkarr: [], + fixed: false, + sortable: true, + head: true, + }, + { + prop: 'storeCode', + label: '经销商编码', + type: 1, + values: '', + width: '260', + checkarr: [], + fixed: false, + sortable: true, + head: true, + }, { prop: 'storeName', label: '门店名称', diff --git a/vite.config.js b/vite.config.js index 02e371b9..f762e84f 100644 --- a/vite.config.js +++ b/vite.config.js @@ -20,9 +20,9 @@ export default ({ mode, command }) => { // caoge // target: 'http://192.168.10.101:8888', // cyz - target: 'http://192.168.10.75:8777', + // target: 'http://192.168.10.75:8777', // tjj - // target: 'http://192.168.10.29:13000', + target: 'http://192.168.10.29:13000', // target: 'http://test.api.huitongys.com', // target: 'http://h5uapi.huitongys.com', changeOrigin: true,