| | |
| | | clearable |
| | | placeholder="选择日期" |
| | | value-format="yyyy-MM-dd" |
| | | :picker-options="pickerOptionsBefore" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | clearable |
| | | placeholder="选择日期" |
| | | value-format="yyyy-MM-dd" |
| | | :picker-options="pickerOptions" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | <div class="basic-info-title" style="display: flex">产品信息</div> |
| | | <div class="product-view"> |
| | | <CommonFormTableView |
| | | ref="tableRef" |
| | | :detailEnter="editCommonConfig.detailEnter" |
| | | :show-summary="showSummary" |
| | | :recalculateShow="false" |
| | |
| | | editConfig: this.editCommonConfig, |
| | | rules: { |
| | | purchaseTypeId: [{ required: true, message: "请选择", trigger: "change" }], |
| | | supplierName: [{ required: true, message: "请选择", trigger: "change" }], |
| | | supplierName: [{ required: true, message: "请选择供应商名称", trigger: "change" }], |
| | | phone: [ |
| | | { |
| | | required: false, |
| | |
| | | { validator: this.validatorNumThree, trigger: "change" } |
| | | ], |
| | | number: [{ required: true, validator: this.validateCheckCode, trigger: ["change", "blur"] }], |
| | | warehouse: [{ required: true, message: "请选择", trigger: "change" }] |
| | | warehouse: [{ required: true, message: "请选择收货仓库", trigger: "change" }], |
| | | signingDate: [{ required: true, message: "请选择签约日期", trigger: "change" }], |
| | | deliveryDate: [{ required: true, message: "请选择交付日期", trigger: "change" }], |
| | | }, |
| | | productTableList: {}, |
| | | showSummary: { |
| | |
| | | total: false, |
| | | sumProp: ["price", "total"], |
| | | multiply: ["amount", "price"], |
| | | titleProp: ["编号", "产品名称", "产品编号", "计量单位", "规格型号", "采购单价", "描述"], |
| | | titleProp: ["编号", "产品名称", "产品编号", "计量单位", "规格", "型号", "采购单价", "描述"], |
| | | mergeNumber: 4, |
| | | totalName: "小计" |
| | | }, |
| | |
| | | totalTwo: 0, |
| | | productListIdx: 0, |
| | | lacks: [], |
| | | pickerOptions: { |
| | | disabledDate(time) { |
| | | return time.getTime() < Date.now() - 8.64e7 |
| | | } |
| | | }, |
| | | pickerOptionsBefore: { |
| | | disabledDate(time) { |
| | | return time.getTime() > Date.now() |
| | | } |
| | | }, |
| | | receiveWhouseList: [] // 收货仓库列表 |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.editConfig, "参数") |
| | | this.handleGetBomKindDictList() |
| | | this.getWarehouseInfo() |
| | | this.$store.dispatch("getSupplier") |
| | |
| | | this.plcBrandList = res.data |
| | | this.setTableForm() |
| | | if (val) { |
| | | // this.plcBrandList.map((item)=>{ |
| | | // item.purchaseTypeId=item.id |
| | | // }) |
| | | for (let i in this.plcBrandList) { |
| | | if (this.plcBrandList[i][this.editRow.isDefault]) { |
| | | this.editConfig.infomation.purchaseTypeId = this.editConfig.infomation.purchaseTypeId |
| | |
| | | }, |
| | | // 选择供应商 |
| | | async handleSelectClient(value, item) { |
| | | this.$refs.tableRef.supplierId=item.id |
| | | this.productTableList.supplierId = item.id |
| | | if (value === "client") { |
| | | this.supplierId = item.id |
| | |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.productTableList.tableProductList = res.data.list |
| | | this.$refs.tableRef.productList=res.data.list |
| | | console.log(this.productTableList.tableProductList, "pop") |
| | | } |
| | | }) |
| | |
| | | this.editSelectSupplierConfig.editVisible = true |
| | | }, |
| | | async selClient(row) { |
| | | this.$refs.tableRef.supplierId=row.id |
| | | await getProductList({ |
| | | supplierId: row.id, |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$refs.tableRef.productList=res.data.list |
| | | this.productTableList.tableProductList = res.data.list |
| | | } |
| | | }) |
| | |
| | | this.editConfig.infomation.supplierId = row.id |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient(value) { |
| | | async clearupClient(value) { |
| | | if (value == "client") { |
| | | this.$refs.tableRef.supplierId=null |
| | | this.$set(this.editConfig.infomation, "supplierName", "") |
| | | this.supplierId = null |
| | | this.$forceUpdate() |
| | | await getProductList({ |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | this.productTableList.tableProductList = res.data.list |
| | | this.$refs.tableRef.productList=res.data.list |
| | | console.log(this.productTableList.tableProductList, "pop") |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | setTableForm() { |
| | |
| | | }, |
| | | { label: "产品编号", prop: "number", min: 150 }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | { label: "规格型号", prop: "specifications" }, |
| | | { label: "规格", prop: "specifications" }, |
| | | { label: "型号", prop: "modelNumber" }, |
| | | { label: "数量", prop: "amount", inputNumber: true, disabled: this.editConfig.isDisabled }, |
| | | { |
| | | label: "采购单价", |