| | |
| | | this.$message.error("产品名称不能为空") |
| | | } else { |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].cost || Number(this.tableData[i].cost) == 0) { |
| | | let reg = /^\+?[1-9]\d*$/ |
| | | if (this.tableData[i].cost) { |
| | | let reg =/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; |
| | | if (!reg.test(this.tableData[i].cost)) { |
| | | this.$message.error("成本单价需要填写大于0的2位小数!") |
| | | return true |
| | |
| | | this.getSaleChanceList(item) |
| | | } else if (value === "chance") { |
| | | this.saleChanceId = item.id |
| | | this.productTableList.tableData = item.products?item.products:[] |
| | | this.tableData = item.products?item.products:[] |
| | | } else { |
| | | this.contactId = item.id |
| | | } |
| | |
| | | this.contactId = row.id |
| | | } else if (value === "chance") { |
| | | this.editConfig.infomation.sale_chance_name = row.name |
| | | this.editConfig.infomation.client_name=row.client.name |
| | | this.clientId = row.client.id |
| | | this.saleChanceId = row.id |
| | | this.productTableList.tableData = row.products?row.products:[] |
| | | this.tableData = row.products?row.products:[] |
| | | } else { |
| | | this.editConfig.infomation.client_name = row.name |
| | | this.clientId = row.id |
| | |
| | | this.editConfig.infomation.contact_name = "" |
| | | this.contactId = 0 |
| | | } |
| | | this.productTableList.tableData = [] |
| | | this.tableData = [] |
| | | this.refresh() |
| | | }, |
| | | // 销售机会列表 |