| | |
| | | @inputContent="inputContent" |
| | | @addProductClick="addProductClick('操作')" |
| | | @getSelectArray="getSelectArray" |
| | | @selSonLocationClick="selSonLocationClick" |
| | | @emptyProductClick="emptyProductClick" |
| | | @clearupProduct="clearupProduct" |
| | | > |
| | |
| | | getLogisticCompanyList, |
| | | printReceipts, |
| | | } from "@/api/overview/overview"; |
| | | import { |
| | | getLocationProductAmount |
| | | } from "@/api/operate/inventoryAdjustment" |
| | | import { |
| | | getSupplierList, |
| | | getCompanyList, |
| | |
| | | sonLocation: true, |
| | | isRequird: true, |
| | | }, |
| | | { label: "在库数量", prop: "inLibraryAmount" }, |
| | | { label: "数量", prop: "amount", inputFloat: true }, |
| | | { label: "计量单位", prop: "unit" }, |
| | | { label: "辅助数量", prop: "auxiliaryAmount",inputFloatValue:true,isInputFloat:'inputFloatAuxiliaryAmount' }, |
| | |
| | | { label: "计量单位", prop: "unit" }, |
| | | ]; |
| | | } |
| | | console.log(this.tableData,'===tableData') |
| | | if(this.workType == 2){ |
| | | for(let i in this.tableData){ |
| | | this.selSonLocationClick(this.tableData[i].fromLocation.id,'fromLocationId',this.tableData[i],i,3) |
| | | } |
| | | } |
| | | this.productTableList = { |
| | | tableData: this.tableData, |
| | | tableColumn: tableColumnArr, |
| | | }; |
| | | |
| | | }, |
| | | getTwoTable(data,value){ |
| | | let list = data.map((res) => { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | selSonLocationClick(val, prop, row,scope,type){ |
| | | if(this.workType == 2){ |
| | | if(prop=='fromLocationId'){ |
| | | getLocationProductAmount({ |
| | | locationId:type==3?val:val.value, |
| | | productId:row.productId |
| | | }).then((res)=>{ |
| | | if(res.code==200){ |
| | | if(type==3){ |
| | | this.$set(this.tableData[scope],'inLibraryAmount',res.data?res.data.amount:0) |
| | | }else{ |
| | | this.$set(this.tableData[scope.$index],'inLibraryAmount',res.data?res.data.amount:0) |
| | | } |
| | | this.$forceUpdate() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | // 新增 |
| | | addProductClick(value) { |
| | | console.log(value); |