From 9e760ef31e7e172ee596bfea2684133a2f6af9a4 Mon Sep 17 00:00:00 2001 From: lc18518571399 <18518571399@163.com> Date: Sun, 7 Jul 2024 18:49:27 +0800 Subject: [PATCH] 123 --- api/app/model/dingdan.js | 9 +- api/app/public/dingdan.json | 124 +++++++++++------- .../src/renderer/src/assets/json/dingdan.json | 13 +- front/src/renderer/src/views/dingdan.vue | 7 +- front/src/renderer/src/views/user.vue | 2 +- 5 files changed, 102 insertions(+), 53 deletions(-) diff --git a/api/app/model/dingdan.js b/api/app/model/dingdan.js index d73be64..f88946f 100644 --- a/api/app/model/dingdan.js +++ b/api/app/model/dingdan.js @@ -105,8 +105,13 @@ module.exports = app => { type: String, default: "" }, - // 品名 - pinming: { + // 客户品名 + kehupinming: { + type: String, + default: "" + }, + // 产品 + chanpin: { type: String, default: "" }, diff --git a/api/app/public/dingdan.json b/api/app/public/dingdan.json index 6bef0d9..73e9dbd 100644 --- a/api/app/public/dingdan.json +++ b/api/app/public/dingdan.json @@ -13,55 +13,56 @@ "label": "客户编号", "prop": "kehubianhao", "type": "text", + "minWidth": 40, "tableShow": true, - "formShow": true + "formShow": true, + "exportxiaoshou": true }, { "label": "简称", "prop": "username", "type": "text", "tableShow": true, - "formShow": true + "formShow": true, + "exportxiaoshou": true }, { "label": "客户名称", "prop": "kehumingcheng", "type": "text", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": true, + "exportxiaoshou": true }, { "label": "产品代码", "prop": "chanpindaima", "type": "text", "tableShow": true, - "formShow": true + "formShow": true, + "exportxiaoshou": true }, { "label": "厂编", "prop": "changbian", "type": "text", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": true, + "exportS6": true }, { "label": "货号", "prop": "huohao", "type": "text", - "tableShow": true, - "formShow": true - }, - { - "label": "单据单位数量", - "prop": "danjudanweishuliang", - "type": "number", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": true, + "exportS6": true }, { "label": "条码", "prop": "tiaoma", "type": "text", + "minWidth": 130, "tableShow": true, "formShow": true }, @@ -69,78 +70,108 @@ "label": "最小单位条码", "prop": "zuixiaodanweitiaoma", "type": "text", + "tableShow": false, + "formShow": true, + "exportxiaoshou": true + }, + { + "label": "客户品名", + "prop": "kehupinming", + "type": "select", + "minWidth": 150, + "formShow": true, "tableShow": true, - "formShow": true + "exportxiaoshou": true + }, + { + "label": "产品", + "prop": "chanpin", + "type": "text", + "minWidth": 150, + "formShow": true, + "tableShow": true, + "exportxiaoshou": true + }, + { + "label": "单据单位数量", + "prop": "danjudanweishuliang", + "type": "number", + "minWidth": 60, + "tableShow": true, + "formShow": true, + "exportS6": false }, { "label": "修改后销售数量", "prop": "xiugaihouxiaoshoushuliang", "type": "number", "tableShow": true, - "formShow": true + "formShow": true, + "exportxiaoshou": true + }, + { + "label": "销售金额", + "prop": "xiaoshoujine", + "type": "number", + "formShow": true, + "tableShow": true, + "exportxiaoshou": true }, { "label": "最高采购价", "prop": "zuigaocaigoujia", "type": "number", "tableShow": true, - "formShow": true + "formShow": true, + "exportxiaoshou": true }, { "label": "箱装量", "prop": "xiangzhuangliang", "type": "number", "tableShow": true, - "formShow": true + "formShow": true, + "exportxiaoshou": true }, { "label": "最大箱装量", "prop": "zuidaxiangzhuangliang", "type": "number", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": true, + "exportxiaoshou": true }, { "label": "规格型号", "prop": "guigexinghao", "type": "text", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": true, + "exportxiaoshou": true }, { "label": "计量单位", "prop": "jiliangdanwei", "type": "text", - "tableShow": true, - "formShow": true + "tableShow": false, + "formShow": true, + "exportxiaoshou": true }, { "label": "箱条码", "prop": "xiangtiaoma", "type": "text", "tableShow": true, - "formShow": true + "formShow": true, + "exportxiaoshou": true }, { "label": "最大箱条码", "prop": "zuidaxiangtiaoma", "type": "text", "tableShow": true, - "formShow": true - }, - { - "label": "条码", - "prop": "tiaoma", - "type": "text", - "formShow": true, - "tableShow": true - }, - { - "label": "品名", - "prop": "pinming", - "type": "select", "formShow": true, - "tableShow": true + "exportxiaoshou": true }, { "label": "品名选项", @@ -161,19 +192,20 @@ "prop": "guige", "type": "text", "formShow": true, - "tableShow": true + "tableShow": false }, { "label": "销售数量", "prop": "xiaoshoushuliang", "type": "number", "formShow": true, - "tableShow": true + "tableShow": true, + "exportxiaoshou": true }, { - "label": "销售金额", - "prop": "xiaoshoujine", - "type": "number", + "label": "暂无此产品", + "prop": "isNotSale", + "type": "boolean", "formShow": true, "tableShow": true } diff --git a/front/src/renderer/src/assets/json/dingdan.json b/front/src/renderer/src/assets/json/dingdan.json index b24f1b4..73e9dbd 100644 --- a/front/src/renderer/src/assets/json/dingdan.json +++ b/front/src/renderer/src/assets/json/dingdan.json @@ -75,14 +75,23 @@ "exportxiaoshou": true }, { - "label": "品名", - "prop": "pinming", + "label": "客户品名", + "prop": "kehupinming", "type": "select", "minWidth": 150, "formShow": true, "tableShow": true, "exportxiaoshou": true }, + { + "label": "产品", + "prop": "chanpin", + "type": "text", + "minWidth": 150, + "formShow": true, + "tableShow": true, + "exportxiaoshou": true + }, { "label": "单据单位数量", "prop": "danjudanweishuliang", diff --git a/front/src/renderer/src/views/dingdan.vue b/front/src/renderer/src/views/dingdan.vue index 4f59b9f..93d9af4 100644 --- a/front/src/renderer/src/views/dingdan.vue +++ b/front/src/renderer/src/views/dingdan.vue @@ -161,6 +161,9 @@ export default { let item = {} for (let j = 0; j < that.tableHeader.length; j++) { let headerItem = that.tableHeader[j]; + if (headerItem.prop === "kehupinming") { + item['kehupinming'] = element["客户品名"] || element["品名"] + } if (element[headerItem.label]) { if (headerItem.type === "text") { item[headerItem.prop] = element[headerItem.label] @@ -509,7 +512,7 @@ export default { ["sheet1"]: jsonWorkSheet, } }; - return this.$XLSX.writeFile(workBook, `销售订单${dayjs().format("YYYY-MM-DD_HH-mm-ss")}.xlsx`); + return this.$XLSX.writeFile(workBook, `销售订单${dayjs().format("YYYY-MM-DD_HH-mm-ss")}.xls`); }) .catch(() => { ElMessage({ @@ -582,7 +585,7 @@ export default { ["sheet1"]: jsonWorkSheet, } }; - return this.$XLSX.writeFile(workBook, `S6订单${dayjs().format("YYYY-MM-DD_HH-mm-ss")}.xlsx`); + return this.$XLSX.writeFile(workBook, `S6订单${dayjs().format("YYYY-MM-DD_HH-mm-ss")}.xls`); }) .catch(() => { ElMessage({ diff --git a/front/src/renderer/src/views/user.vue b/front/src/renderer/src/views/user.vue index ccfc636..2bcc302 100644 --- a/front/src/renderer/src/views/user.vue +++ b/front/src/renderer/src/views/user.vue @@ -209,7 +209,7 @@ export default { async searchData() { let params = {} if (this.searchParams.username) { - params["username"] = this.searchParams.username + params["username"] = { $regex: `${_.trim(this.searchParams.username)}`, $options: 'i' } } this.updateSeach(params) },