| | |
| | | > |
| | | <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="warehouse"> |
| | | <el-select |
| | | placeholder="请选择收货仓库" |
| | | v-model="editConfig.infomation.warehouse" |
| | | clearable |
| | | style="width: calc(100% - 0px)" |
| | | :disabled="editConfig.isDisabled" |
| | | > |
| | | <el-option |
| | | v-for="(ele, index) in receiveWhouseList" |
| | | :key="index" |
| | | :label="ele.name" |
| | | :value="ele.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="地址" prop="warehouseAddress"> |
| | | <el-input |
| | | :disabled="editConfig.isDisabled" |
| | | v-model="editConfig.infomation.warehouseAddress" |
| | | placeholder="请填写" |
| | | clearable |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="接收人" prop="principal"> |
| | | <el-input |
| | | :disabled="editConfig.isDisabled" |
| | | v-model="editConfig.infomation.principal" |
| | | placeholder="请填写" |
| | | clearable |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="来源单据" prop="sourceOrder"> |
| | | <el-input |
| | | :disabled="editConfig.isDisabled" |
| | | v-model="editConfig.infomation.sourceOrder" |
| | | placeholder="请填写" |
| | | clearable |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | |
| | | import CommonFormTableView from "@/components/makepager/CommonFormTableView" |
| | | import BomDialog from "@/components/makepager/BomDialog" |
| | | import { getProductList } from "@/api/productManage/product" |
| | | import { addPurchase, updatePurchase, savePurchaseType, getPurchaseType } from "@/api/purchaseManage/purchase" |
| | | import { |
| | | addPurchase, |
| | | updatePurchase, |
| | | savePurchaseType, |
| | | getPurchaseType, |
| | | getWarehouseInfo |
| | | } from "@/api/purchaseManage/purchase" |
| | | import SelectSupplierDialog from "@/views/purchaseManage/purchase/components/SelectSupplierDialog" |
| | | // import { formToJSON } from "axios"; |
| | | import codeMixin from "@/components/mixin/codeMixin" |
| | |
| | | total: 0, |
| | | totalTwo: 0, |
| | | productListIdx: 0, |
| | | lacks: [] |
| | | lacks: [], |
| | | receiveWhouseList: [] // 收货仓库列表 |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.editConfig, "参数") |
| | | this.handleGetBomKindDictList() |
| | | this.getWarehouseInfo() |
| | | 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 |
| | | } |
| | | } |
| | |
| | | realTotalPrice: this.total ? Number(this.total) : 0, |
| | | totalPrice: this.totalTwo ? Number(this.totalTwo) : 0, |
| | | status: data.status, |
| | | quantity: data.quantity // 采购数量 |
| | | quantity: data.quantity, // 采购数量 |
| | | warehouse: data.warehouse || "", // 收货仓库 |
| | | warehouseAddress: data.warehouseAddress || "", // 收货仓库地址 |
| | | principal: data.principal || "", // 仓库负责人 |
| | | sourceOrder: data.sourceOrder || "" // 来源单据 |
| | | } |
| | | } |
| | | if (data.id) { |
| | |
| | | this.tableData = [ |
| | | { |
| | | purchaseId: 0, |
| | | productId:Number(this.productId), |
| | | productId: Number(this.productId), |
| | | productIndex: this.productIndex, |
| | | amount: 0, |
| | | name: "", |
| | |
| | | handleProduct(item) { |
| | | this.tableData[this.productListIdx].productId = Number(item.id) |
| | | console.log(item, "选中产品", this.tableData) |
| | | }, |
| | | // 获取收货仓库列表 |
| | | async getWarehouseInfo() { |
| | | await getWarehouseInfo().then((res) => { |
| | | console.log(res) |
| | | this.receiveWhouseList = res.data.info |
| | | }) |
| | | } |
| | | } |
| | | } |