| | |
| | | wechatOrderStatusOptions: [], // 微信订单状态 |
| | | currencyOptions: [{ id: 1, name: "人民币" }], // 币种 |
| | | approvalWorkflowOptions: [], // 审批流程 |
| | | productTableList: {}, |
| | | productTableList: { |
| | | allcol: [], |
| | | showcol: ["产品名称", "规格", "型号", "产品编号", "单位", "销售单价", "成本单价","毛利","毛利率(%)","数量","价税合计"], |
| | | tableData: [], |
| | | tableColumn: [] |
| | | }, |
| | | showSummary: { |
| | | show: true, |
| | | total: true, |
| | | sumProp: ["Amount", "total"], |
| | | mergeNumber: 7 |
| | | mergeNumber: "成本单价" |
| | | }, |
| | | editSelectClientConfig: { |
| | | editVisible: false, |
| | |
| | | isBjdRequird : false, |
| | | tableColumn: [ |
| | | // { label: "#", prop: "productId", width: 40 }, |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true, min: 110 }, |
| | | { label: "规格", prop: "specs" , }, |
| | | { label: "型号", prop: "type" }, |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "销售单价", prop: "price", inputFloat: !this.isBjdRequird, }, |
| | | { label: "成本单价", prop: "cost", input: !this.isBjdRequird }, |
| | | { label: "毛利", prop: "profit" }, |
| | | { label: "毛利率(%)", prop: "margin", min: 90 }, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "价税合计", prop: "total" } |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true, min: 110,}, |
| | | { label: "规格", prop: "specs" , }, |
| | | { label: "型号", prop: "type", }, |
| | | { label: "产品编号", prop: "number", }, |
| | | { label: "单位", prop: "unit" ,}, |
| | | { label: "销售单价", prop: "price", inputFloat: !this.isBjdRequird,}, |
| | | { label: "成本单价", prop: "cost", input: !this.isBjdRequird, }, |
| | | { label: "毛利", prop: "profit", }, |
| | | { label: "毛利率(%)", prop: "margin", min: 90,}, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true,}, |
| | | { label: "价税合计", prop: "total", } |
| | | ], |
| | | showCol: ["产品名称", "规格", "型号", "产品编号", "单位", "销售单价", "成本单价","毛利","毛利率(%)","数量","价税合计"], |
| | | } |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.getSaleChanceList() |
| | |
| | | watch: { |
| | | "editClientManageConfig.visible"(val) { |
| | | if (val) { |
| | | this.setTableForm() |
| | | this.formInfo() |
| | | } |
| | | } |
| | |
| | | }) |
| | | }, |
| | | selTableCol(val) { |
| | | this.showcol = val |
| | | this.productTableList.tableColumn = this.setColumnVisible(val, this.tableColumn) |
| | | this.productTableList.showcol = val |
| | | this.productTableList.tableColumn = this.setColumnVisible(this.productTableList.showcol, this.tableColumn) |
| | | }, |
| | | checkValueById(data, id) { |
| | | for (const key in data) { |
| | |
| | | this.productTableList = { |
| | | tableData: this.tableData, |
| | | isReturn: true, |
| | | allcol: [], |
| | | showcol: this.showCol, |
| | | // tableColumn: [ |
| | | // // { label: "#", prop: "productId", width: 40 }, |
| | | // { label: "产品名称", prop: "name", productName: true, isRequird: true, min: 110 }, |
| | |
| | | // { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | // { label: "价税合计", prop: "total" } |
| | | // ], |
| | | tableColumn: this.setColumnVisible(this.showCol, this.tableColumn) |
| | | tableColumn: [] |
| | | } |
| | | this.setTableList(this.productTableList) |
| | | this.productTableList.showcol= ["产品名称", "规格", "型号", "产品编号", "单位", "销售单价", "成本单价","毛利","毛利率(%)","数量","价税合计"], |
| | | this.productTableList.tableColumn = this.setColumnVisible(this.productTableList.showcol, this.tableColumn) |
| | | this.productTableList.allcol=["规格", "型号", "产品编号", "单位", "毛利",] |
| | | }, |
| | | setTableList(productTableList) { |
| | | productTableList.allcol = productTableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | setTableList(tableList) { |
| | | tableList.allcol = tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label) |
| | | this.searchOptions = [] |
| | | for (let i = 0; i < productTableList.tableColumn.length; i++) { |
| | | const label = productTableList.tableColumn[i].label |
| | | const value = productTableList.tableColumn[i].prop |
| | | for (let i = 0; i < tableList.tableColumn.length; i++) { |
| | | const label = tableList.tableColumn[i].label |
| | | const value = tableList.tableColumn[i].prop |
| | | this.searchOptions.push({ value: value, label: label }) |
| | | } |
| | | }, |