From 2f50921ff2a4df07786ff094158ef8be8b7cdcce Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Wed, 27 Mar 2024 10:59:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B8=82=E9=85=8D?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E9=85=8D=E9=80=81=E6=8A=A5=E9=94=99=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/distribution/turndelivery/deliveryMarket.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/distribution/turndelivery/deliveryMarket.vue b/src/views/distribution/turndelivery/deliveryMarket.vue index 5f1e5ddf..6e222095 100644 --- a/src/views/distribution/turndelivery/deliveryMarket.vue +++ b/src/views/distribution/turndelivery/deliveryMarket.vue @@ -1553,7 +1553,7 @@ export default { a.push(item); // 主司机赋值 if (i === 0) this.driverForm.masterDriverName = item.name; - if (!this.driverForm.masterVehicleNub) + if (!this.driverForm.masterVehicleNub && item.vehicleVOList) this.driverForm.masterVehicleNub = item.vehicleVOList[0].vehicleNub; // 车辆赋值, 当司机数大于车辆数时, 取最后一位司机的车辆 From 2f9d75da4ab55dd6e346ea26aff5c03dc94ac984 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Wed, 27 Mar 2024 19:10:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=9B=B6=E6=8B=85?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../distribution/distributionStockArticle.js | 19 ++- src/components/MyPrint/MyPrint.vue | 64 ++++++++++ src/main.js | 3 + .../distributionStockArticleSelf.js | 2 +- src/styles/element-ui.scss | 10 +- src/utils/print.js | 16 +-- src/utils/util.js | 28 +++++ .../BasicdataGoodsAllocation.vue | 4 +- .../goodsShelf/basicdataGoodsShelf.vue | 2 + .../delivery/distributionStockArticle.vue | 72 +++++++++--- .../distributionStockArticleDiscuss.vue | 111 ++++++++++++------ .../distributionStockArticleMarket.vue | 61 ++++++++-- .../delivery/distributionStockArticleSelf.vue | 110 +++++++++++------ .../distributionStockArticleDetails.vue | 25 ++-- .../distributionStockListDetails.vue | 3 + .../parcelList/distributionParcelList.vue | 5 +- 16 files changed, 406 insertions(+), 129 deletions(-) create mode 100644 src/components/MyPrint/MyPrint.vue diff --git a/src/api/distribution/distributionStockArticle.js b/src/api/distribution/distributionStockArticle.js index b49cc15c..fa5a4a37 100644 --- a/src/api/distribution/distributionStockArticle.js +++ b/src/api/distribution/distributionStockArticle.js @@ -308,7 +308,7 @@ export const selectUpdateAvailableStockArticle = (current, size, params) => { }); }; -export const getPackageListByStockArticleId = (current, size,params) => { +export const getPackageListByStockArticleId = (current, size, params) => { return request({ url: '/api/logpm-distribution/distributionStockArticle/getPackageListByStockArticleId', method: 'get', @@ -328,10 +328,19 @@ export const $_getPackageListByStockArticleId = params => { }; // 修改运单收货人 -export const $_Modifywaybillrecipient = (data) => { +export const $_Modifywaybillrecipient = data => { return request({ url: '/api/logpm-distribution/distributionStockArticle/updateBatchClient', method: 'post', - data - }) -} \ No newline at end of file + data, + }); +}; + +// 修改运单收货人 +export const postShowOrderCode = params => { + return request({ + url: '/api/logpm-distribution/distributionStockArticle/showOrderCode', + method: 'get', + params, + }); +}; diff --git a/src/components/MyPrint/MyPrint.vue b/src/components/MyPrint/MyPrint.vue new file mode 100644 index 00000000..4c50a9c2 --- /dev/null +++ b/src/components/MyPrint/MyPrint.vue @@ -0,0 +1,64 @@ + + + + + + + + + 关 闭 + 打 印 + + + + + + + + diff --git a/src/main.js b/src/main.js index abf42306..9301eaed 100644 --- a/src/main.js +++ b/src/main.js @@ -29,6 +29,7 @@ import WaybillPrintTemplate from './components/WaybillPrintTemplate/WaybillPrint import ArteryPrintTemplate from './components/ArteryPrintTemplate/ArteryPrintTemplate.vue'; import TripartiteTransferPrintTemplate from './components/TripartiteTransferPrintTemplate/TripartiteTransferPrintTemplate.vue'; import ImgList from './components/ImgList/ImgList.vue'; +import MyPrint from './components/MyPrint/MyPrint.vue'; import { message } from './utils/resetMessage'; import App from './App.vue'; import 'animate.css'; @@ -54,6 +55,8 @@ app.component('tenantPackage', tenantPackage); app.component('tablecmt', tablecmt); app.component('edittablehead', edittablehead); app.component('SelectBox', SelectBox); +/** 打印 */ +app.component('MyPrint', MyPrint); /** 运单打印模版 */ app.component('WaybillPrintTemplate', WaybillPrintTemplate); /** 干线运输打印模版 */ diff --git a/src/option/distribution/distributionStockArticleSelf.js b/src/option/distribution/distributionStockArticleSelf.js index 3e31acd0..8d3c952b 100644 --- a/src/option/distribution/distributionStockArticleSelf.js +++ b/src/option/distribution/distributionStockArticleSelf.js @@ -475,7 +475,7 @@ export const columnList = [ label: '操作', type: 6, values: '', - width: '200', + width: '250', checkarr: [], fixed: 'right', hide: true, diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss index f510f39c..5b7928f9 100644 --- a/src/styles/element-ui.scss +++ b/src/styles/element-ui.scss @@ -69,6 +69,12 @@ background-color: #fafafa; } // 页码组件激活样式字体不加粗 -li.is-active{ +li.is-active { font-weight: normal !important; -} \ No newline at end of file +} + +.el-tag { + --el-tag-bg-color: #d3832a !important; + --el-tag-text-color: #fff !important; + --el-tag-border-color: #d3832a !important; +} diff --git a/src/utils/print.js b/src/utils/print.js index 1c3f685f..93b7c591 100644 --- a/src/utils/print.js +++ b/src/utils/print.js @@ -14,16 +14,16 @@ const print = nodeList => { // 当列表内没有元素时, 退出函数 if (nodeList.length === 0) return; - 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_STYLE('FontColor', '#000000'); - // // 设置打印整宽且不变形 - LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Auto-Width'); - // // 设置打印后自动关闭 - LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1); // 循环列表内元素并打印 nodeList.forEach(orderNode => { + 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_STYLE('FontColor', '#000000'); + // // 设置打印整宽且不变形 + LODOP.SET_PRINT_MODE('PRINT_PAGE_PERCENT', 'Auto-Width'); + // // 设置打印后自动关闭 + LODOP.SET_PRINT_MODE('AUTO_CLOSE_PREWINDOW', 1); console.log(orderNode, 'orderNode'); let templateData = orderNode.innerHTML; diff --git a/src/utils/util.js b/src/utils/util.js index ef39c097..46f20322 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -689,3 +689,31 @@ export function handleClearTableQuery(tableColumnList) { value.values = ''; } } + +/** + * 文本换行 + * @param {string} className 类名 + * @param {number} num 多少字进行换行 + * @returns + */ +export function hanleTextLineFeed(className, num) { + const node = document.querySelectorAll(`.${className}`); + + if (node.length === 0) return; + for (let i = 0; i < node.length; i++) { + const value = node[i]; + + // 获取文本 + const text = value.innerText; + // 循环次数, 换多少次行 + const cycleNumber = Math.ceil(text.length / num); + + let addText = ''; + for (let index = 0; index < cycleNumber; index++) { + const sliceText = text.slice(index * num, (index + 1) * num); + + addText += index < cycleNumber - 1 ? sliceText + '' : sliceText; + } + value.innerHTML = addText; + } +} diff --git a/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue b/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue index af6862cf..67485d1d 100644 --- a/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue +++ b/src/views/basicdata/warehouse/goodsAllocation/BasicdataGoodsAllocation.vue @@ -399,7 +399,7 @@ export default { //批量打印数据处理代码 printTemplate() { const printNode = document.querySelectorAll('.print_QRCode>div>div'); - + console.log('printNode :>> ', printNode); print(printNode); }, async handleqr() { @@ -420,7 +420,7 @@ export default { this.html = ''; this.loadingObj.pageLoading = true; const res = await getPrintTemplate({ - ids:qr + ids: qr, }); const { code, data } = res.data; diff --git a/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue b/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue index 977fb8cf..c220f3b7 100644 --- a/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue +++ b/src/views/basicdata/warehouse/goodsShelf/basicdataGoodsShelf.vue @@ -1362,6 +1362,8 @@ export default { const nodeList = document.querySelectorAll('.printNode > div'); + console.log('nodeList :>> ', nodeList); + print(nodeList); }, rowDel(row) { diff --git a/src/views/distribution/inventory/delivery/distributionStockArticle.vue b/src/views/distribution/inventory/delivery/distributionStockArticle.vue index 908401af..442db85d 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticle.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticle.vue @@ -1,6 +1,6 @@ - + @@ -126,16 +126,26 @@ > - {{ item }} + + + {{ item }} + + + + 查看二维码 + 查看 修改客户信息 @@ -363,6 +373,8 @@ + + > ', error); + } finally { + this.loadingObj.pageLoading = false; + } + }, }, }; @@ -1367,9 +1411,9 @@ export default { } // 标签 -:deep(.el-tag) { - margin: 0 3px; - --el-tag-bg-color: var(--el-color-info-light-9); - color: var(--el-color-primary); -} +// :deep(.el-tag) { +// margin: 0 3px; +// --el-tag-bg-color: var(--el-color-info-light-9); +// color: var(--el-color-primary); +// } diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue b/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue index 34622a1c..8d8efbea 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleDiscuss.vue @@ -1,6 +1,6 @@ - + @@ -60,45 +60,54 @@ - - - - - + + + + + {{ item }} - + {{ item }} + + + - - 查看 - 修改客户信息 - + + + 查看二维码 + + + 查看 + 修改客户信息 - - + + 勾选数量: {{ selectionList.length }} @@ -360,6 +369,8 @@ + + > ', error); + } finally { + this.loadingObj.pageLoading = false; + } + }, }, }; diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue b/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue index 13d74c9f..7706f0cc 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleMarket.vue @@ -1,6 +1,6 @@ - + @@ -104,16 +104,27 @@ > - {{ item }} + + + {{ item }} + + + + 查看二维码 + + 查看 @@ -351,6 +362,8 @@ + + > ', error); + } finally { + this.loadingObj.pageLoading = false; + } + }, }, }; diff --git a/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue b/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue index 88e27a83..c96c575d 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticleSelf.vue @@ -1,6 +1,6 @@ - + @@ -72,45 +72,55 @@ - - - - - + + + + + + {{ item }} - + {{ item }} + + + - - 查看 - 修改客户信息 - + + + 查看二维码 + + 查看 + 修改客户信息 - - + + + 勾选数量: {{ selectionList.length }} @@ -514,6 +524,7 @@ --> + > ', error); + } finally { + this.loadingObj.pageLoading = false; + } + }, }, }; +