From 34972b5723fc1753d5bd691da8a244a53fbe343a Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Mon, 11 Sep 2023 15:48:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/distribution/disStockListDetail.js | 20 +- src/api/distribution/disStockOrdercodeReco.js | 10 +- .../stockup/distributionStockupDetails.vue | 204 +++++++++++++++++- .../distributionStockupDetailsSelf.vue | 32 ++- .../stockup/distributionStockupDiscuss.vue | 2 +- .../stockup/distributionStockupMarket.vue | 2 +- 6 files changed, 245 insertions(+), 25 deletions(-) diff --git a/src/api/distribution/disStockListDetail.js b/src/api/distribution/disStockListDetail.js index a2d7ac7b..86b163f6 100644 --- a/src/api/distribution/disStockListDetail.js +++ b/src/api/distribution/disStockListDetail.js @@ -2,7 +2,7 @@ import request from '@/axios'; export const getList = (current, size, params) => { return request({ - url: '/disStockOrdercodeReco/disStockListDetail/list', + url: '/api/logpm-distribution/disStockListDetail/list', method: 'get', params: { ...params, @@ -12,9 +12,19 @@ export const getList = (current, size, params) => { }) } +export const getDisStockList = (params) => { + return request({ + url: '/api/logpm-distribution/disStockListDetail/disStockList', + method: 'get', + params: { + ...params, + } + }) +} + export const getDetail = (id) => { return request({ - url: '/disStockOrdercodeReco/disStockListDetail/detail', + url: '/api/logpm-distribution/disStockListDetail/detail', method: 'get', params: { id @@ -24,7 +34,7 @@ export const getDetail = (id) => { export const remove = (ids) => { return request({ - url: '/disStockOrdercodeReco/disStockListDetail/remove', + url: '/api/logpm-distribution/disStockListDetail/remove', method: 'post', params: { ids, @@ -34,7 +44,7 @@ export const remove = (ids) => { export const add = (row) => { return request({ - url: '/disStockOrdercodeReco/disStockListDetail/submit', + url: '/api/logpm-distribution/disStockListDetail/submit', method: 'post', data: row }) @@ -42,7 +52,7 @@ export const add = (row) => { export const update = (row) => { return request({ - url: '/disStockOrdercodeReco/disStockListDetail/submit', + url: '/api/logpm-distribution/disStockListDetail/submit', method: 'post', data: row }) diff --git a/src/api/distribution/disStockOrdercodeReco.js b/src/api/distribution/disStockOrdercodeReco.js index b754d8cd..3773709d 100644 --- a/src/api/distribution/disStockOrdercodeReco.js +++ b/src/api/distribution/disStockOrdercodeReco.js @@ -2,7 +2,7 @@ import request from '@/axios'; export const getList = (current, size, params) => { return request({ - url: '/disStockOrdercodeReco/disStockOrdercodeReco/list', + url: '/api/logpm-distribution/disStockOrdercodeReco/list', method: 'get', params: { ...params, @@ -14,7 +14,7 @@ export const getList = (current, size, params) => { export const getDetail = (id) => { return request({ - url: '/disStockOrdercodeReco/disStockOrdercodeReco/detail', + url: '/api/logpm-distribution/disStockOrdercodeReco/detail', method: 'get', params: { id @@ -24,7 +24,7 @@ export const getDetail = (id) => { export const remove = (ids) => { return request({ - url: '/disStockOrdercodeReco/disStockOrdercodeReco/remove', + url: '/api/logpm-distribution/disStockOrdercodeReco/remove', method: 'post', params: { ids, @@ -34,7 +34,7 @@ export const remove = (ids) => { export const add = (row) => { return request({ - url: '/disStockOrdercodeReco/disStockOrdercodeReco/submit', + url: '/api/logpm-distribution/disStockOrdercodeReco/submit', method: 'post', data: row }) @@ -42,7 +42,7 @@ export const add = (row) => { export const update = (row) => { return request({ - url: '/disStockOrdercodeReco/disStockOrdercodeReco/submit', + url: '/api/logpm-distribution/disStockOrdercodeReco/submit', method: 'post', data: row }) diff --git a/src/views/distribution/stockup/distributionStockupDetails.vue b/src/views/distribution/stockup/distributionStockupDetails.vue index 9418251a..bb8d493b 100644 --- a/src/views/distribution/stockup/distributionStockupDetails.vue +++ b/src/views/distribution/stockup/distributionStockupDetails.vue @@ -83,6 +83,8 @@ > @@ -112,7 +114,8 @@ @selection="selectionChange" > @@ -133,6 +136,36 @@ + +
+ lmy 666 +
+ + + 打 印 + 确 定 + 取 消 + +
+ +
+
+ + +
+ + + 打 印 + 确 定 + 取 消 + +
@@ -214,10 +247,16 @@ import { getDictionaryBiz } from '@/api/system/dict'; import { getParcelListOwn } from '@/api/distribution/distributionParcelList'; import { stockUp } from '@/api/basicdata/basicdataGoodsArea'; import { getStockDetail } from '@/api/distribution/distributionStock'; +import { getStockTemplate, showOrderPackgeCode } from '@/api/distribution/distributionStockArticle'; +import { getLodop } from '@/utils/LodopFuncs'; +import dayjs from 'dayjs'; export default { data () { return { + dialogVisible:false, + dialogPack:false, + html:'', columnListarrs:{ columnReservation:[ { @@ -663,6 +702,17 @@ export default { sortable: true, head: false, }, + { + prop: '', + label: '操作', + type: 6, + values: '', + width: '230', + checkarr: [], + fixed: 'right', + hide: true, + }, + ], }, height: 0, @@ -770,6 +820,135 @@ export default { } }, methods: { + //查看库存品明细 + handleDetail(row){ + console.log("row>><><><",row); + this.dialogPack = true; + + }, + showdrawer(value){ + this.drawerShow=value + }, + /** + * 弹窗的勾选回调,用于更改头部数组 + * 固定搭配,只需要更换 columnList + */ + setnewcolum(newarr, headarr,type) { + // console.log(newarr,'+++++++++++') + if(type==1){ + this.columnList = newarr; + this.$functions.setStorage(window.location.pathname+'checkList', headarr); + }else if(type==2){ + this.columnList = newarr; + this.$functions.setStorage(window.location.pathname+'flexList', headarr); + }else if(type==3){ + this.columnList = newarr; + this.$functions.setStorage(window.location.pathname+'sortlist', headarr); + } + + }, + selectionsc(value) { + console.log(value); + }, + delectsolt(scope) { + const { row } = scope; + console.log(row); + }, + editsolt(scope) { + const { row } = scope; + console.log(row); + }, + btnsc(index, row) { + console.log(index, row); + }, + selectsc(index, row) { + console.log(index, row); + // if(row.prop =='typeServiceName'){ + // this.query['typeService'] = index; + // }else if(row.prop =='stockupStatusName'){ + // this.query["stockupStatus"] = index; + // }else if(row.prop =='assignStatusName'){ + // this.query["assignStatus"] = index; + // }else{ + // this.query[row.prop] = index; + // } + // // this.query[row.prop] = index; + // this.onLoad(this.page); + }, + timesc(index, row) { + console.log(index, row); + if (!!index){ + index = dayjs(index).format('YYYY-MM-DD'); + } + this.query[row.prop] = index + if (!index){ + delete this.query[row.prop] + } + this.onLoad(this.page); + }, + inputsc(index, row) { + console.log(index, row); + /* if(row.prop =='typeServiceName'){ + this.query['typeService'] = index; + }else if(row.prop =='stockupStatusName'){ + this.query["stockupStatus"] = index; + }else if(row.prop =='assignStatusName'){ + this.query["assignStatus"] = index; + }else{ + this.query[row.prop] = index; + }*/ + this.query[row.prop] = index; + + this.onLoad(this.page); + }, + //打印 + printTemplate() { + let LODOP = getLodop(); + console.log("LODOP>>>>>",LODOP); + // console.log("this.ids>>>>>",this.selectionList); + // if (this.selectionList.length === 0){ + // this.$message.warning("请选择至少一条数据"); + // return; + // } + getStockTemplate({ id: this.materialQRCode.id }).then(res => { + console.log('返回的数据', res.data.data); + let templateData = res.data.data; + // let templateData = "res.data.data"; + // console.log(templateData); + LODOP.PRINT_INITA(1, 1, 900, 660, '测试预览功能'); + LODOP.SET_PRINT_MODE('WINDOW_DEFPRINTER', 'Godex G500'); + LODOP.SET_PRINT_STYLEA(0,"TextNeatRow",true);//允许标点溢出,且英文单词拆开 + // // 设置打印整宽且不变形 + LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Auto-Width'); + // // 设置打印后自动关闭 + LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1); + // // data就是一段html文本 + LODOP.ADD_PRINT_HTM('0%', '0%', '100%', '100%', templateData); + // LODOP.PREVIEW(); //预览(预览打印无脚标) + LODOP.PRINT(); //直接打印 + + }); + }, + //查看包条码 + handleQRCode(row) { + // this.title = '查看' + // this.view = true; + // this.box = true; + this.materialQRCode = row; + + let qr = { + ids: row.id, + }; + showOrderPackgeCode(qr).then(res => { + // this.orderPackageCode = res.data + console.log(res.data); + this.html='' + this.html=this.getHtmls(res.data.data.dataList,res.data.data.templateHtml) + + }); + + this.dialogVisible = true; + }, //系统备货确定 callFordelivery(){ let c = false; @@ -1129,16 +1308,19 @@ export default { async getStockUpParcelsList(page){ let a = await getParcelListOwn(page.currentPage,page.pageSize,{id :this.$route.query.id}); console.log("包件...",a.data); - const data = a.data.data; - this.data1 = data.records; - this.data1.forEach(i =>{ - if(!i.stockupStatus){ - i.stockupStatusName = "待备货"; - this.isStockUp = true; - }else{ - i.stockupStatusName = "已备货"; - } - }) + const data = a.data.data; + this.data1 = data.records; + if(this.data1.length > 0){ + this.data1.forEach(i =>{ + if(!i.stockupStatus){ + i.stockupStatusName = "待备货"; + this.isStockUp = true; + }else{ + i.stockupStatusName = "已备货"; + } + }) + } + this.page1.total = a.data.data.total; this.loading = false; this.selectionClear(); diff --git a/src/views/distribution/stockup/distributionStockupDetailsSelf.vue b/src/views/distribution/stockup/distributionStockupDetailsSelf.vue index c6e70461..17152635 100644 --- a/src/views/distribution/stockup/distributionStockupDetailsSelf.vue +++ b/src/views/distribution/stockup/distributionStockupDetailsSelf.vue @@ -282,7 +282,7 @@