From 402d908373c1059da52be0424c181e7af39db1fe Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Thu, 19 Oct 2023 16:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E6=8F=90=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/distribution/distributionStock.js | 6 +- .../delivery/distributionStockArticle.vue | 66 +++++++++++++++++++ .../inventory/distrilbutionBillLading.vue | 4 +- 3 files changed, 73 insertions(+), 3 deletions(-) diff --git a/src/api/distribution/distributionStock.js b/src/api/distribution/distributionStock.js index 7a0b2441..dfc2af8d 100644 --- a/src/api/distribution/distributionStock.js +++ b/src/api/distribution/distributionStock.js @@ -11,7 +11,11 @@ export const getListStock = (current, size, params) => { } }) } - +/** + * 系统备货扫码 + * @param params + * @returns {AxiosPromise} + */ export const getStockDetail = (params) => { return request({ url: '/api/logpm-distribution/distributionStock/addStockDetail', diff --git a/src/views/distribution/inventory/delivery/distributionStockArticle.vue b/src/views/distribution/inventory/delivery/distributionStockArticle.vue index a5b6ccff..596c8717 100644 --- a/src/views/distribution/inventory/delivery/distributionStockArticle.vue +++ b/src/views/distribution/inventory/delivery/distributionStockArticle.vue @@ -101,6 +101,22 @@ v-if="handler" >修改服务类型 + + + + + + + + + + + +
@@ -406,10 +422,40 @@ import { mapGetters } from 'vuex'; import { getDictionaryBiz } from '@/api/system/dict'; import dayjs from 'dayjs'; import { getUser } from '@/api/system/user'; +import { exportBlob } from '@/api/common'; +import { getToken } from '@/utils/auth'; +import { downloadXls } from '@/utils/util'; export default { data() { return { + excelForm: {}, + excelBox: false, + excelOption: { + submitBtn: false, + emptyBtn: false, + column: [ + { + label: '文件上传', + prop: 'excelFile', + type: 'upload', + drag: true, + loadText: '文件上传,请稍等', + span: 24, + propsHttp: { + res: 'data', + }, + tip: '请上传 .xls,.xlsx 标准格式文件', + action: '/api/logpm-distribution/distributionStockArticle/import-stockArticle', + }, + { + label: '模板下载', + prop: 'excelTemplate', + formslot: true, + span: 24, + }, + ], + }, columnList: [ { prop: '', @@ -1033,6 +1079,26 @@ export default { }, }, methods: { + uploadAfter(res, done, loading, column) { + window.console.log(column); + this.excelBox = false; + this.refreshChange(); + done(); + }, + refreshChange() { + this.onLoad(this.page, this.query); + }, + handleImport() { + this.excelBox = true; + }, + handleTemplate() { + exportBlob( + `/api/logpm-distribution/distributionStockArticle/import-stockArticle?${this.website.tokenHeader}=${getToken()}` + ).then(res => { + downloadXls(res.data, '用户数据模板.xlsx'); + }); + }, + showdrawer(value) { this.drawerShow = value; }, diff --git a/src/views/distribution/inventory/distrilbutionBillLading.vue b/src/views/distribution/inventory/distrilbutionBillLading.vue index 66470dc6..4d869981 100644 --- a/src/views/distribution/inventory/distrilbutionBillLading.vue +++ b/src/views/distribution/inventory/distrilbutionBillLading.vue @@ -2062,14 +2062,14 @@ export default { }, async handleSubmit() { const zeroOrderList = - this.dataList.length !== 0 || this.dataList.filter(val => val.isZero === '1'); + this.dataList.filter(val => val.isZero === '1'); // 当有零担订单物料数量没操作时 const wrongZeroOrder = zeroOrderList.find(val => !val.ParcelLisList); console.log('wrongZeroOrder :>> ', wrongZeroOrder); if (wrongZeroOrder) return this.$message({ type: 'error', - message: `订单自编号为${wrongZeroOrder.orderCode}的物料数量为编辑`, + message: `订单自编号为${wrongZeroOrder.orderCode}的物料数量未编辑`, }); if (zeroOrderList) { // 双层循环查看每一个物料数量是否被填写