lc18518571399 9 months ago
parent
commit
9e760ef31e
  1. 9
      api/app/model/dingdan.js
  2. 124
      api/app/public/dingdan.json
  3. 13
      front/src/renderer/src/assets/json/dingdan.json
  4. 7
      front/src/renderer/src/views/dingdan.vue
  5. 2
      front/src/renderer/src/views/user.vue

9
api/app/model/dingdan.js

@ -105,8 +105,13 @@ module.exports = app => {
type: String,
default: ""
},
// 品名
pinming: {
// 客户品名
kehupinming: {
type: String,
default: ""
},
// 产品
chanpin: {
type: String,
default: ""
},

124
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
}

13
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",

7
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({

2
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)
},

Loading…
Cancel
Save