diff --git a/src/api/basicdata/basicdataGoodsAllocation.js b/src/api/basicdata/basicdataGoodsAllocation.js index 2d50e59f..89c69092 100644 --- a/src/api/basicdata/basicdataGoodsAllocation.js +++ b/src/api/basicdata/basicdataGoodsAllocation.js @@ -83,13 +83,11 @@ export const update = (row) => { data: row }) } -export const getPrintTemplate = (ids) => { +export const getPrintTemplate = (params) => { return request({ - url: '/api/logpm-basicdata/goodsAllocation/getPrintTemplate', - method: 'post', - params:{ - ids - } + url: '/logpm-distribution/distributionStockArticle/showOrderPackgeCode', + method: 'get', + params }) } export const getTemplate = (row) => { diff --git a/src/api/distribution/distributionSignfor.js b/src/api/distribution/distributionSignfor.js index f39b4119..656cdd22 100644 --- a/src/api/distribution/distributionSignfor.js +++ b/src/api/distribution/distributionSignfor.js @@ -354,4 +354,23 @@ export const $_getReservationZeroPackageList = params => { method: 'get', params, }); +}; +// 包件列表导出 +export const $_distributionSignforPackageList = data => { + return request({ + url: '/api/logpm-distribution/signfor/export-distributionSignforPackageList', + method: 'post', + data, + responseType: 'blob', + }); +}; + +// 订单导出 +export const $_distributionSignforOrderList = data => { + return request({ + url: '/api/logpm-distribution/signfor/export-distributionSignforOrderList', + method: 'post', + data, + responseType: 'blob', + }); }; \ No newline at end of file diff --git a/src/api/distribution/distributionStockArticle.js b/src/api/distribution/distributionStockArticle.js index 3f1e8552..b49cc15c 100644 --- a/src/api/distribution/distributionStockArticle.js +++ b/src/api/distribution/distributionStockArticle.js @@ -326,3 +326,12 @@ export const $_getPackageListByStockArticleId = params => { params, }); }; + +// 修改运单收货人 +export const $_Modifywaybillrecipient = (data) => { + return request({ + url: '/api/logpm-distribution/distributionStockArticle/updateBatchClient', + method: 'post', + data + }) +} \ No newline at end of file diff --git a/src/api/distribution/distrilbutionBillLading.js b/src/api/distribution/distrilbutionBillLading.js index 98318697..998d3f81 100644 --- a/src/api/distribution/distrilbutionBillLading.js +++ b/src/api/distribution/distrilbutionBillLading.js @@ -111,6 +111,14 @@ export const getBillLadingDetail = ids => { }); }; +export const $_checkBillLadingIsRelease = params => { + //确认提货校验 + return request({ + url: '/api/logpm-distribution/distrilbutionBillLading/checkBillLadingIsRelease', + method: 'get', + params + }); +}; export const remove = ids => { return request({ url: '/api/logpm-distribution/distrilbutionBillLading/remove', diff --git a/src/views/basicdata/brand/basicClient.vue b/src/views/basicdata/brand/basicClient.vue index 72b7f5ac..fcd9534b 100644 --- a/src/views/basicdata/brand/basicClient.vue +++ b/src/views/basicdata/brand/basicClient.vue @@ -1516,30 +1516,40 @@ export default { let arrsheng = this.optioner.filter(i => { return it.bladeRegionProvinceId == i.value; }); - if (arrsheng.length == 0) return; + let shengLabel = arrsheng.length > 0 ? arrsheng[0].label : ''; // 保存省级地址 + + if (arrsheng.length === 0) { + it.bladeRegionProvinceId = shengLabel; // 若未找到省数据,直接将省级地址作为结果 + return; + } let arrshi = arrsheng[0].children.filter(i => { return it.bladeRegionCityId == i.value; }); - if (arrshi.length == 0) return; + let shiLabel = arrshi.length > 0 ? arrshi[0].label : ''; // 保存市级地址 - let arrqu = arrshi[0].children.filter(i => { - return it.bladeRegionAreaId == i.value; - }); - if (arrqu.length == 0) return; + if (arrshi.length === 0) { + dz = shengLabel; // 若未找到市数据,直接将省级地址作为结果 + } else { + let arrqu = arrshi[0].children.filter(i => { + return it.bladeRegionAreaId == i.value; + }); + + let quLabel = arrqu.length > 0 ? arrqu[0].label : ''; // 保存区级地址 + + dz = shengLabel + (shiLabel ? `/${shiLabel}` : '') + (quLabel ? `/${quLabel}` : ''); + } - dz = - arrsheng[0].label + - (arrshi[0].label ? `/${arrshi[0].label}` : ``) + - (arrqu[0]?.label ? `/${arrqu[0]?.label}` : ''); it.bladeRegionProvinceId = dz; }); - // console.log("dzdz",dz); this.page.total = data.total; this.data = data.records; this.data = this.$functions.newdatas(this.columnList, this.data); this.loading = false; this.selectionClear(); + }).catch(()=>{ + this.data =[] + this.loading = false; }); }, }, diff --git a/src/views/distribution/deliverylist/distributionDeliveryListmar.vue b/src/views/distribution/deliverylist/distributionDeliveryListmar.vue index ef550f54..13e6da8f 100644 --- a/src/views/distribution/deliverylist/distributionDeliveryListmar.vue +++ b/src/views/distribution/deliverylist/distributionDeliveryListmar.vue @@ -299,8 +299,8 @@ export default { sortable: true, }, { - prop: 'clineName', - label: '客户名称', + prop: 'mallName', + label: '商场名称', type: 2, values: '', width: '140', @@ -309,8 +309,8 @@ export default { sortable: true, }, { - prop: 'mallName', - label: '商场名称', + prop: 'clineName', + label: '客户名称', type: 2, values: '', width: '140', @@ -318,6 +318,7 @@ export default { fixed: false, sortable: true, }, + { prop: 'kindName', label: '配送种类', @@ -541,6 +542,16 @@ export default { fixed: false, sortable: true, }, + { + prop: 'mallName', + label: '商场名称', + type: 2, + values: '', + width: '140', + checkarr: [], + fixed: false, + sortable: true, + }, { prop: 'clineName', label: '客户名称', diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue b/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue index 03e2dd57..29cdb4e8 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue @@ -43,6 +43,9 @@ 修改客户信息 + 修改运单收货人 修改服务类型 @@ -202,6 +205,44 @@ + + + + + + + + + + + + + + { + if (!valid) { + return; + } + this.loadingwaybillrecipient = true; //开启表单加载 + + let data = { + entityList: [], + }; + + this.selectionList.forEach(res => { + data['entityList'].push({ + consigneeAddress: this.waybillrecipientForm.consigneeAddress, + consigneePerson: this.waybillrecipientForm.consigneePerson, + consigneeMobile: this.waybillrecipientForm.consigneeMobile, + id: res.id, + }); + }); + $_Modifywaybillrecipient(data) + .then(resT => { + ElMessage({ + message: resT.data.msg, + type: 'success', + }); + if (resT.data.code == 200) { + this.waybillrecipient = false; //关闭弹窗 + console.log(resT, '修改成功后返回值'); + this.onLoad(this.page); + } + }) + .catch(() => {}) + .finally(() => { + this.loadingwaybillrecipient = false; + }); + // waybillrecipient;//弹窗 + }); + }, init() { this.height = this.setPx(document.body.clientHeight - 340); getDictionaryBiz('distribution_type').then(res => { diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue b/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue index 10b92dc6..a5e29b52 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue @@ -47,6 +47,9 @@ 修改客户信息 + 修改运单收货人 修改服务类型 @@ -385,6 +388,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 编辑 + + + @@ -317,6 +330,45 @@ + + + + + + + + + + + + + + + { + if (!valid) { + return; + } + this.loadingwaybillrecipient = true; + + let data = { + entityList: [], + }; + data['entityList'].push({ + consigneeAddress: this.waybillrecipientForm.consigneeAddress, + consigneePerson: this.waybillrecipientForm.consigneePerson, + consigneeMobile: this.waybillrecipientForm.consigneeMobile, + id: this.waybillrecipientForm.id, + }); + $_Modifywaybillrecipient(data) + .then(res => { + console.log(res, '修改成功后返回值'); + if (res.data.code == 200) { + this.waybillrecipient = false; + ElMessage({ + showClose: true, + message: res.data.msg, + type: 'success', + }); + this.onLoad(); + } + }) + .catch(() => {}) + .finally(() => { + this.loadingwaybillrecipient = false; + }); + // waybillrecipient;//弹窗 + }); + }, init() { this.height = this.setPx(document.body.clientHeight - 580); getDictionaryBiz('distribution_type').then(res => { diff --git a/src/views/distribution/inventory/distrilbutionBillLadingView.vue b/src/views/distribution/inventory/distrilbutionBillLadingView.vue index 74cd4b62..60458e57 100644 --- a/src/views/distribution/inventory/distrilbutionBillLadingView.vue +++ b/src/views/distribution/inventory/distrilbutionBillLadingView.vue @@ -57,8 +57,8 @@ 订单列表 - 订单导出 - + 订单导出 + - 包件导出 - + 包件导出 + 批量查看二维码 + - +
@@ -123,7 +128,7 @@
- 库存品导出 + 库存品导出 { - NProgress.start(); - exportBlob(downloadUrl, values).then(res => { - downloadXls(res.data, `订单列表${dateNow()}.xlsx`); - NProgress.done(); - }) + Orderexport() { + let downloadUrl = `/logpm-distribution/distrilbutionBillStock/billOrderDetailExcel?${ + this.website.tokenHeader + }=${getToken()}`; + + let values = { + billLadingId: this.$route.query.id, + }; + this.$confirm('是否导出数据?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + NProgress.start(); + exportBlob(downloadUrl, values).then(res => { + downloadXls(res.data, `订单列表${dateNow()}.xlsx`); + NProgress.done(); }); + }); }, // 包件导出 - Packageexport(){ - let downloadUrl = `/logpm-distribution/distrilbutionBillStock/billOrderPackExcel?${this.website.tokenHeader}=${getToken()}`; + Packageexport() { + let downloadUrl = `/logpm-distribution/distrilbutionBillStock/billOrderPackExcel?${ + this.website.tokenHeader + }=${getToken()}`; - let values = { - billLadingId:this.$route.query.id - }; - this.$confirm("是否导出数据?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { - NProgress.start(); - exportBlob(downloadUrl, values).then(res => { - downloadXls(res.data, `包件导出${dateNow()}.xlsx`); - NProgress.done(); - }) + billLadingId: this.$route.query.id, + }; + this.$confirm('是否导出数据?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + NProgress.start(); + exportBlob(downloadUrl, values).then(res => { + downloadXls(res.data, `包件导出${dateNow()}.xlsx`); + NProgress.done(); }); + }); }, // 库存导出 - Inventoryexport(){ - let downloadUrl = `/logpm-distribution/distributionDeliveryDetails/billOrderInventoryExcel?${this.website.tokenHeader}=${getToken()}`; - + Inventoryexport() { + let downloadUrl = `/logpm-distribution/distributionDeliveryDetails/billOrderInventoryExcel?${ + this.website.tokenHeader + }=${getToken()}`; + let values = { - billLadingId:this.$route.query.id - }; - this.$confirm("是否导出数据?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning" - }).then(() => { - NProgress.start(); - exportBlob(downloadUrl, values).then(res => { - downloadXls(res.data, `库存品导出${dateNow()}.xlsx`); - NProgress.done(); - }) + billLadingId: this.$route.query.id, + }; + this.$confirm('是否导出数据?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }).then(() => { + NProgress.start(); + exportBlob(downloadUrl, values).then(res => { + downloadXls(res.data, `库存品导出${dateNow()}.xlsx`); + NProgress.done(); }); - }, + }); + }, beforeOpen(done, type) { if (['edit', 'view'].includes(type)) { getDetail(this.form.id).then(res => { @@ -1461,12 +1479,74 @@ export default { break; } }, + searchHide() { this.search = !this.search; }, searchChange() { this.onLoad(this.page); }, + // 查看二维码 + handleqr(val) { + console.log(val, 'val'); + let qr = ''; + let checkcode = []; + if (val) { + qr = val.id; + } else { + if (!this.selectionList.length) { + this.$message.warning('请选择至少一条数据'); + return; + } + this.selectionList.map(item => { + checkcode.push(item.id); + // checkcode.push(item.orderPackageCode) + }); + + qr = checkcode.join(','); + } + + this.html = ''; + getPrintTemplate({ + ids: qr, + }).then(res => { + // this.orderPackageCode = res.data + console.log(res.data); + this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml); + this.dialogVisible = true; + }); + }, + // 打印二维码 + printTemplate() { + let LODOP = getLodop(); + if (this.selectionList.length === 0) { + this.$message.warning('请选择至少一条数据'); + return; + } + + const nodeList = document.querySelectorAll('.printNode > div'); + + // getPrintTemplate(this.ids).then(res => { + // let templateData = res.data.data; + // let templateData = "res.data.data"; + // console.log(templateData); + LODOP.PRINT_INITA('测试预览功能'); + // LODOP.PRINT_INITA("测试预览功能"); + // LODOP.SET_PRINT_PAGESIZE(1, 0, 0, 'A4'); + LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Deli DL-888T'); + LODOP.SET_PRINT_PAGESIZE(2, '210mm', '50mm', ''); + LODOP.SET_SHOW_MODE('LANDSCAPE_DEFROTATED', 1); + + // // 设置打印后自动关闭 + LODOP.SET_PRINT_MODE('WINDOW_DEFPAGESIZE', 1); + // // data就是一段html文本 + nodeList.forEach(val => { + LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', val.innerHTML); + LODOP.NewPage(); + }); + LODOP.PREVIEW(); //预览(预览打印无脚标) + // }); + }, searchReset() { this.query = {}; this.page.currentPage = 1; @@ -1540,16 +1620,16 @@ export default { console.log('查看>>>>>库存>>', res.data.data); const data = res.data.data; this.inventorydata = data.records; - data.records.forEach(item=>{ + data.records.forEach(item => { // 备货状态 1 待备货 2 备货中 3 备货完成 - if(item.stockStatus == 1){ - item.stockStatus = '待备货' - } else if(item.stockStatus == 2){ - item.stockStatus = '备货中' - }else if(item.stockStatus == 3){ - item.stockStatus = '备货完成' + if (item.stockStatus == 1) { + item.stockStatus = '待备货'; + } else if (item.stockStatus == 2) { + item.stockStatus = '备货中'; + } else if (item.stockStatus == 3) { + item.stockStatus = '备货完成'; } - }) + }); this.inventorypage.total = data.total; }); }, @@ -1564,14 +1644,14 @@ export default { this.selectionList = list; }, // 查看轨迹 - ViewingTrajectories(scope){ + ViewingTrajectories(scope) { console.log('查看>>>>>轨迹>>', scope); - this.$router.push({ + this.$router.push({ path: '/distribution/signdetail/packageNodeSearch', query: { - orderPackageCode:scope.orderPackageCode, - } - }) + orderPackageCode: scope.orderPackageCode, + }, + }); }, selectionClear() { this.selectionList = []; @@ -1611,25 +1691,51 @@ export default { }, /** 确认提货 */ handleSigin() { - this.$confirm('确定签收吗?', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - }).then(async () => { - try { - this.pageLoading = true; - const res = await getBillLadingDetail(this.$route.query.id); - const { code } = res.data; - if (code !== 200) return; - this.$message.success('签收成功'); - this.$store.commit('DEL_TAG_CURRENT'); - this.$router.back('-1'); - } catch (error) { - console.log('error :>> ', error); - } finally { - this.pageLoading = false; + let data = { + billLadingId: this.$route.query.id, + }; + + $_checkBillLadingIsRelease(data).then(res => { + console.log(res, 're====?'); + if (!res.data) { + ElMessageBox.confirm('包件未扫描完成,此操作会释放此类包件!是否继续操作?', '操作提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning', + }) + .then(() => { + this.pageLoading = true; + getBillLadingDetail(this.$route.query.id).then(res=>{ + const { code } = res.data; + if (code !== 200) return; + this.$message.success('签收成功'); + this.$store.commit('DEL_TAG_CURRENT'); + this.$router.back('-1'); + }).catch(()=>{ + + }).finally(()=>{ + this.pageLoading = false; + }) + + }) + .catch(() => {}); + } else { + try { + this.pageLoading = true; + const res = getBillLadingDetail(this.$route.query.id); + const { code } = res.data; + if (code !== 200) return; + this.$message.success('签收成功'); + this.$store.commit('DEL_TAG_CURRENT'); + this.$router.back('-1'); + } catch (error) { + console.log('error :>> ', error); + } finally { + this.pageLoading = false; + } } }); + return; }, onLoad() { //查询详情 diff --git a/src/views/distribution/reservation/reservation.vue b/src/views/distribution/reservation/reservation.vue index 85cfbcc9..56aed901 100644 --- a/src/views/distribution/reservation/reservation.vue +++ b/src/views/distribution/reservation/reservation.vue @@ -1339,14 +1339,14 @@ export default { }, }); - // this.$router.push({ - // path: '/distribution/reservation/atlas', - // query: { - // id: ids, - // type: '1', - // }, - // }); - // console.log(">>>>>>>>>>",ids); + this.$router.push({ + path: '/distribution/reservation/atlas', + query: { + id: ids, + type: '1', + }, + }); + console.log(">>>>>>>>>>",ids); }, //批量转备货 handleStockUp() { diff --git a/src/views/distribution/reservation/reservationAddFrom.vue b/src/views/distribution/reservation/reservationAddFrom.vue index cf880c2a..6642478b 100644 --- a/src/views/distribution/reservation/reservationAddFrom.vue +++ b/src/views/distribution/reservation/reservationAddFrom.vue @@ -513,6 +513,7 @@ export default { packageQuery: {}, reservationloading: false, orderRow: {}, + Appointmentquantity:0,//预约数量 /** 订单 */ columnList: [ { @@ -2517,8 +2518,12 @@ export default { this.orderData.forEach(item => { if (item.id === this.obj.id) { item.packageList = this.packageDataSec; + item.reservationNum=this.packageDataSec.length } }); + // this.Appointmentquantity = this.packageDataSec.length;//预约数量 + + console.log('this.orderData------------>', this.orderData); this.isaddvalue = false; }, @@ -3059,6 +3064,9 @@ export default { //这里需要对选择的订单进行筛选 this.orderData = [...this.orderList]; + this.orderData.forEach(item=>{ + item.reservationNum = item.handQuantity + }) this.handleSearchOrder(); this.orderShow = false; }, diff --git a/src/views/distribution/signfor/distributionSignforedt.vue b/src/views/distribution/signfor/distributionSignforedt.vue index 8f97e875..871486b3 100644 --- a/src/views/distribution/signfor/distributionSignforedt.vue +++ b/src/views/distribution/signfor/distributionSignforedt.vue @@ -366,7 +366,7 @@ - + + 导出