| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售机会" prop="sale_chance_name" |
| | | :rules="[{ required: autoCodeHeadersObj.Ywjh=='yes'?true:false, message: '请选择销售机会', trigger: 'change' }]"> |
| | | <el-form-item |
| | | label="销售机会" |
| | | prop="sale_chance_name" |
| | | :rules="[ |
| | | { |
| | | required: autoCodeHeadersObj.Ywjh == 'yes' ? true : false, |
| | | message: '请选择销售机会', |
| | | trigger: 'change' |
| | | } |
| | | ]" |
| | | > |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | style="width: 100%" |
| | |
| | | </el-form-item> |
| | | </el-col> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="销售报价单" prop="quotation_number" |
| | | :rules="[{ required: autoCodeHeadersObj.Bjd=='yes'?true:false, message: '请选择销售报价单', trigger: 'change' }]"> |
| | | <el-form-item |
| | | label="销售报价单" |
| | | prop="quotation_number" |
| | | :rules="[ |
| | | { |
| | | required: autoCodeHeadersObj.Bjd == 'yes' ? true : false, |
| | | message: '请选择销售报价单', |
| | | trigger: 'change' |
| | | } |
| | | ]" |
| | | > |
| | | <div class="custom-name"> |
| | | <el-autocomplete |
| | | v-model="editConfig.infomation.quotation_number" |
| | |
| | | :addTypeIdMultiple="true" |
| | | :show-summary="showSummary" |
| | | pageName="quotation" |
| | | :isOperate="((autoCodeHeadersObj.Bjd=='yes'&&editConfig.infomation.quotation_number)||autoCodeHeadersObj.Bjd!='yes')?true:false" |
| | | :isOperate=" |
| | | (autoCodeHeadersObj.Bjd == 'yes' && editConfig.infomation.quotation_number) || |
| | | autoCodeHeadersObj.Bjd != 'yes' |
| | | ? true |
| | | : false |
| | | " |
| | | :quotationNumber="autoCodeHeadersObj.Bjd=='yes'?editConfig.infomation.quotation_number:''" |
| | | :product-table-list="productTableList" |
| | | @inputContent="inputContent" |
| | |
| | | thatMember: {}, |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() < Date.now() - 8.64e7; |
| | | }, |
| | | return time.getTime() < Date.now() - 8.64e7 |
| | | } |
| | | }, |
| | | pickerOptionsBefore:{ |
| | | disabledDate(time) { |
| | | return time.getTime() > Date.now(); |
| | | }, |
| | | return time.getTime() > Date.now() |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.setTableForm() |
| | | this.getCommonData() |
| | | this.formInfo() |
| | | this.getUseSystemSet({modeType:'xsmx'}) |
| | | this.getUseSystemSet({ modeType: "xsmx" }) |
| | | if (this.editConfig.title === "编辑") { |
| | | this.productTableList.tableData = this.editConfig.infomation.products |
| | | } |
| | |
| | | } else { |
| | | for (let i = 0; i < this.tableData.length; i++) { |
| | | if (this.tableData[i].cost) { |
| | | let reg = |
| | | /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/; |
| | | 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; |
| | | return true |
| | | } |
| | | } |
| | | } |
| | |
| | | if (value === "全部产品") { |
| | | // this.quotationList.map((item) => { |
| | | // if (item.id === this.editConfig.infomation.quotationId) { |
| | | |
| | | // this.tableData.map((item, index) => { |
| | | // item.productId = index + 1 |
| | | // this.tableData.forEach((key) => { |
| | |
| | | // } |
| | | // }) |
| | | // }) |
| | | |
| | | // } |
| | | // }) |
| | | } |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | cost:'', |
| | | profit:'', |
| | | margin:'', |
| | | cost: "", |
| | | profit: "", |
| | | margin: "", |
| | | total: 0, |
| | | unit: "" |
| | | } |
| | |
| | | } |
| | | // let productData = this.quotationList.products |
| | | let isBjdRequird=false |
| | | if(this.autoCodeHeadersObj.Bjd=='yes'){ |
| | | if (this.autoCodeHeadersObj.Bjd == "yes") { |
| | | isBjdRequird=true |
| | | } |
| | | this.productTableList = { |
| | | tableData: this.tableData, |
| | | tableColumn: [ |
| | | { label: "#", prop: "productId", width: 40 }, |
| | | { label: "产品名称", prop: "name", productName: true, isRequird: true,min:110, }, |
| | | { 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: !isBjdRequird, isRequird: true }, |
| | |
| | | item.productId = this.tableData.length + index+1 |
| | | }) |
| | | } |
| | | this.tableData=this.tableData.concat(val); |
| | | this.tableData = this.tableData.concat(val) |
| | | this.productTableList.tableData=this.tableData |
| | | this.showSummary.show = true |
| | | }, |
| | |
| | | name: "", |
| | | number: "", |
| | | price: 0, |
| | | cost:'', |
| | | profit:'', |
| | | margin:'', |
| | | cost: "", |
| | | profit: "", |
| | | margin: "", |
| | | total: 0, |
| | | unit: "" |
| | | } |