| | |
| | | this.isSel() |
| | | console.log(row) |
| | | if (this.isNoProduct) { |
| | | console.log("历史") |
| | | this.$router.push({ |
| | | name: "inventoryAdjustmentHistory", |
| | | params: { locationId: row.locationId, productId: row.productId, baseOperationType: row.baseOperationType } |
| | |
| | | let product = item.details[0].product |
| | | return { |
| | | ...item, |
| | | from: item.fromLocation?item.fromLocation.name:"", |
| | | to: item.toLocation?item.toLocation.name:"", |
| | | from: item.details[0].fromLocation.jointName?item.details[0].fromLocation.jointName:"", |
| | | to: item.details[0].toLocation.jointName?item.details[0].toLocation.jointName:"", |
| | | productName: product.name, |
| | | amount: item.details[0].amount, |
| | | unit: product.unit |
| | |
| | | </div> |
| | | <!-- 查看/编辑 --> |
| | | <AddOverviewDialog |
| | | ref="viewDialog" |
| | | v-if="editConfig.visible" |
| | | :edit-common-config="editConfig" |
| | | :add-name="addName" |
| | |
| | | this.workType=row.baseOperationType |
| | | this.editConfig.title = val |
| | | getOperationInfo(row.operationId).then((res)=>{ |
| | | res.data.details.map((item) => { |
| | | item.fromLocationId = item.fromLocation.jointName |
| | | item.toLocationId = item.toLocation.jointName |
| | | }) |
| | | res.data.location = { |
| | | value: res.data.location.id || res.data.location.value, |
| | | label: res.data.location.jointName || res.data.location.label |
| | | } |
| | | res.data.toLocation = { |
| | | value: res.data.toLocation.id || res.data.toLocation.value, |
| | | label: res.data.toLocation.jointName || res.data.toLocation.label |
| | | } |
| | | res.data.locationID = res.data.location.jointName |
| | | res.data.locationId = res.data.location.value |
| | | this.editConfig.infomation = { |
| | | |
| | | ...res.data |
| | | } |
| | | this.editConfig.visible = true |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item :label="workType === 1 ? '仓库位置' : '调出位置'" prop="location"> |
| | | <el-form-item :label="workType === 1 ? '仓库位置' : '从'" prop="location"> |
| | | <el-select |
| | | @change="rootLocationChange" |
| | | v-model="editConfig.infomation.location" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" v-if="workType === 3"> |
| | | <el-form-item label="调入位置" prop="toLocation"> |
| | | <el-form-item label="至" prop="toLocation"> |
| | | <el-select |
| | | @change="toLocationChange" |
| | | v-model="editConfig.infomation.toLocation" |
| | |
| | | supplierOptions: [], //供应商 |
| | | clientOptions: [], //客户 |
| | | memberOptions: [{ id: 1, name: "管理员" }], |
| | | formLocationOptions: [], // 调出位置 |
| | | formLocationOptions: [], // 至 |
| | | toLocationOptions: [], // 仓库位置 |
| | | showButton: true, |
| | | activeName: "first", |
| | |
| | | tableColumnArr = [ |
| | | { label: "产品名称", prop: "productName", productName: true, isRequird: true }, |
| | | { label: "产品编码", prop: "productId" }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | { label: "数量", prop: "amount", inputFloat: true }, |
| | | { label: "产品规格", prop: "specs" }, |
| | | { label: "产品型号", prop: "model" }, |
| | | { label: "数量", prop: "amount", inputFloat: true } |
| | | { label: "计量单位", prop: "unit" }, |
| | | ] |
| | | } else if (this.workType === 2) { |
| | | tableColumnArr = [ |
| | | { label: "产品名称", prop: "productName", productName: true, isRequird: true }, |
| | | { label: "产品编码", prop: "productId" }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | { label: "数量", prop: "amount", inputFloat: true }, |
| | | { label: "产品规格", prop: "specs" }, |
| | | { label: "产品型号", prop: "model" }, |
| | | { label: "调入位置", prop: "fromLocationId", sonLocation: true, isRequird: true }, |
| | | { label: "数量", prop: "amount", inputFloat: true } |
| | | { label: "从", prop: "fromLocationId", sonLocation: true, isRequird: true }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | ] |
| | | } else if (this.workType === 3) { |
| | | tableColumnArr = [ |
| | | { label: "产品名称", prop: "productName", productName: true, isRequird: true }, |
| | | { label: "产品编码", prop: "productId" }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | { label: "数量", prop: "amount", inputFloat: true }, |
| | | { label: "产品规格", prop: "specs" }, |
| | | { label: "产品型号", prop: "model" }, |
| | | { label: "调入位置", prop: "fromLocationId", sonLocation: true, isRequird: true }, |
| | | { label: "调出位置", prop: "toLocationId", toLocation: true, isRequird: true }, |
| | | { label: "数量", prop: "amount", inputFloat: true } |
| | | { label: "从", prop: "fromLocationId", sonLocation: true, isRequird: true }, |
| | | { label: "至", prop: "toLocationId", toLocation: true, isRequird: true }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | ] |
| | | }else if (this.workType === 4) { |
| | | tableColumnArr = [ |
| | | { label: "产品名称", prop: "productName", productName: true, isRequird: true }, |
| | | { label: "产品编码", prop: "productId" }, |
| | | { label: "数量", prop: "amount", inputFloat: true }, |
| | | { label: "产品规格", prop: "specs" }, |
| | | { label: "产品型号", prop: "model" }, |
| | | { label: "从", prop: "fromLocationId", sonLocation: true, isRequird: true }, |
| | | { label: "至", prop: "toLocationId", toLocation: true, isRequird: true }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | ] |
| | | }else if (this.workType === 5) { |
| | | tableColumnArr = [ |
| | | { label: "产品名称", prop: "productName", productName: true, isRequird: true }, |
| | | { label: "产品编码", prop: "productId" }, |
| | | { label: "数量", prop: "amount", inputFloat: true }, |
| | | { label: "产品规格", prop: "specs" }, |
| | | { label: "产品型号", prop: "model" }, |
| | | { label: "从", prop: "fromLocationId", sonLocation: true, isRequird: true }, |
| | | { label: "至", prop: "toLocationId", toLocation: true, isRequird: true }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | ] |
| | | } |
| | | this.productTableList = { |
| | |
| | | thatEditRow:this.editRow, |
| | | isTableShow: true, |
| | | form: {}, |
| | | // BomTableData:[], |
| | | BomTableData: this.editRow.BomTableData, |
| | | BomTableData:[], |
| | | // BomTableData: this.editRow.BomTableData, |
| | | // BomTableData: JSON.parse(this.editRow.BomTableData), |
| | | // BomTableData: [{ id: 303, createdAt: "2024-02-05 18:02:47", updatedAt: "2024-02-05 18:02:47",name: "kg", isDefault: false }], |
| | | work: 1, |
| | |
| | | watch: { |
| | | }, |
| | | created() { |
| | | console.log(this.thatEditRow,"thatEditRow") |
| | | }, |
| | | mounted() { }, |
| | | mounted() { |
| | | }, |
| | | methods: { |
| | | handleAdd() { |
| | | this.BomTableData=this.thatEditRow.BomTableData |
| | |
| | | console.log(this.codenumberList.replace(/,/g, "")); |
| | | }, |
| | | switchChange(scope, val) { |
| | | this.BomTableData=this.thatEditRow.BomTableData |
| | | let arr = []; |
| | | for (let i in this.BomTableData) { |
| | | if (this.BomTableData[i].isDefault) { |