| | |
| | | > |
| | | <el-option |
| | | v-for="ele in plcBrandList" |
| | | :key="ele.name" |
| | | :key="ele.purchaseTypeId" |
| | | :label="ele.name" |
| | | :value="ele.id" |
| | | ></el-option> |
| | |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <!-- <el-col :span="12"> |
| | | <el-form-item label="单据来源" prop="orderSource"> |
| | | <el-input v-model="editConfig.infomation.orderSource" disabled placeholder="请填写"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | <el-col :span="12"> |
| | | <el-form-item label="采购单名称" prop="name"> |
| | | <el-input |
| | |
| | | value-format="yyyy-MM-dd" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="收货仓库" prop="receiveWarehouse"> |
| | | <el-select |
| | | placeholder="请选择收货仓库" |
| | | v-model="editConfig.infomation.receiveWarehouse" |
| | | clearable |
| | | style="width: calc(100% - 0px)" |
| | | > |
| | | <el-option |
| | | v-for="(ele, index) in receiveWhouseList" |
| | | :key="index" |
| | | :label="ele.name" |
| | | :value="ele.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="地址" prop="address"> |
| | | <el-input v-model="editConfig.infomation.address" placeholder="请填写" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="接收人" prop="recipient"> |
| | | <el-input v-model="editConfig.infomation.recipient" placeholder="请填写" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="来源单据" prop="sourceDoc"> |
| | | <el-input v-model="editConfig.infomation.sourceDoc" placeholder="请填写" clearable></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.editConfig,"参数") |
| | | this.handleGetBomKindDictList() |
| | | this.$store.dispatch("getSupplier") |
| | | this.formInfo() |
| | |
| | | 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 |
| | | ? this.editConfig.infomation.purchaseTypeId |
| | | : this.plcBrandList[i].id |
| | | this.$set(this.editConfig.infomation, "purchaseTypeId", this.editConfig.infomation.purchaseTypeId) |
| | | |
| | | break |
| | | } |
| | | } |
| | |
| | | quantity: data.quantity // 采购数量 |
| | | } |
| | | } |
| | | if (data.ID) { |
| | | params.purchase.id = data.ID |
| | | if (data.id) { |
| | | params.purchase.id = data.id |
| | | } |
| | | return params |
| | | }, |
| | |
| | | }, |
| | | // 选择供应商 |
| | | async handleSelectClient(value, item) { |
| | | this.productTableList.supplierId = item.ID |
| | | this.productTableList.supplierId = item.id |
| | | if (value === "client") { |
| | | this.supplierId = item.id |
| | | this.editConfig.infomation.supplierId = item.ID |
| | | this.editConfig.infomation.supplierId = item.id |
| | | } |
| | | await getProductList({ |
| | | supplierId: item.ID, |
| | | supplierId: item.id, |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | |
| | | }, |
| | | async selClient(row) { |
| | | await getProductList({ |
| | | supplierId: row.ID, |
| | | supplierId: row.id, |
| | | page: 1, |
| | | pageSize: 100 |
| | | }).then((res) => { |
| | |
| | | this.$set(this.editConfig.infomation, "supplierName", row.name) |
| | | this.editConfig.infomation.contact = row.contact |
| | | this.editConfig.infomation.phone = row.phone |
| | | this.editConfig.infomation.supplierId = row.ID |
| | | this.editConfig.infomation.supplierId = row.id |
| | | }, |
| | | // 清除已选择用户 |
| | | clearupClient(value) { |
| | |
| | | } |
| | | }, |
| | | setTableForm() { |
| | | if (!this.editConfig.infomation.ID || this.editConfig.infomation.productList.length === 0) { |
| | | if (!this.editConfig.infomation.id || this.editConfig.infomation.productList.length === 0) { |
| | | this.tableData = [ |
| | | { |
| | | purchaseId: 0, |
| | | productId: this.productId, |
| | | productId: Number(this.productId), |
| | | productIndex: this.productIndex, |
| | | amount: 0, |
| | | name: "", |
| | |
| | | }, |
| | | //选中产品 |
| | | handleProduct(item) { |
| | | this.tableData[this.productListIdx].productId = item.ID |
| | | this.tableData[this.productListIdx].productId = Number(item.id) |
| | | console.log(item, "选中产品", this.tableData) |
| | | } |
| | | } |