| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售机会" prop="sale_chance_name" |
| | | :rules="[{ required: autoCodeHeadersObj.xsjh=='yes'?true:false, validator: this.checkChance, trigger: 'change' }]"> |
| | | :rules="[{ required: autoCodeHeadersObj.Xsjh=='yes'?true:false, validator: this.checkChance, trigger: 'change' }]"> |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.sale_chance_name" |
| | |
| | | this.objCode.codeStandID = this.editConfig.infomation.codeStandID |
| | | } |
| | | this.getRCodeStandardList() |
| | | this.getUseSystemSet({modeType:'bjd'}) |
| | | }, |
| | | getCommonData() { |
| | | getAllData() |
| | |
| | | if (this.isNoProduct) { |
| | | 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(!reg.test(this.tableData[i].cost)){ |
| | | this.$message.error("成本单价需要填写大于0的2位小数!") |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | const params = this.saveParams() |
| | | console.log(params) |
| | | if (this.editConfig.title === "新建") { |
| | | getAddQuotation(params).then((res) => { |
| | | console.log(res) |
| | |
| | | { label: "产品编号", prop: "number" }, |
| | | { label: "单位", prop: "unit" }, |
| | | { label: "销售单价", prop: "price", inputFloat: true, isRequird: true }, |
| | | { label: "成本单价", prop: "cost",inputFloat: true }, |
| | | { label: "成本单价", prop: "cost",input: true }, |
| | | { label: "毛利", prop: "profit" }, |
| | | { label: "毛利率", prop: "margin",min:90}, |
| | | { label: "毛利率(%)", prop: "margin",min:90}, |
| | | { label: "数量", prop: "amount", inputNumber: true, isRequird: true }, |
| | | { label: "价税合计", prop: "total", inputFloat: true } |
| | | ] |
| | |
| | | if (this.editConfig.infomation.sale_chance_name && this.editConfig.infomation.sale_chance_name.length > 0) { |
| | | callback() |
| | | } else { |
| | | if(this.autoCodeHeadersObj.xsjh=='yes'){ |
| | | if(this.autoCodeHeadersObj.Xsjh=='yes'){ |
| | | callback(new Error("请选择销售机会")) |
| | | }else{ |
| | | callback() |