| | |
| | | tableData: [], // 接口返回数据 |
| | | tableColumn: [ |
| | | // table表单 |
| | | { label: "", prop: "", min: 200, tooltip: true } |
| | | { label: "", prop: "", min: 200, tooltip: true} |
| | | ] |
| | | } |
| | | } |
| | |
| | | page: 1, |
| | | pageSize: 15 |
| | | }).then((res) => { |
| | | console.log(res, "看看产品类型列表") |
| | | if (res.code === 200) { |
| | | const list = res.data ? res.data : [] |
| | | this.productTypeNameOptions = list |
| | |
| | | selectBox: false, |
| | | selectIndex: true, |
| | | tableColumn: [ |
| | | { label: "产品", prop: "productName", product: true }, |
| | | { label: "产品", prop: "productName", product: true,width:"150px" }, |
| | | { label: "位置", prop: "locationName", defaultLocation: true }, |
| | | { label: "在库数量", prop: "amount" }, |
| | | { label: "预测数量", prop: "prediction" }, |
| | |
| | | } |
| | | return { |
| | | ...item, |
| | | productName: { label: item.product.name, value: item.product.id }, |
| | | productName:item.product.name, |
| | | locationName: item.location.name, |
| | | isSet: false, |
| | | isEdit: true, |
| | |
| | | this.tableData.map((item, index) => { |
| | | if (index === rowIndex) { |
| | | item.isEdit = false |
| | | item.editable = true |
| | | item.editable = false |
| | | item.isOrder = true |
| | | } else { |
| | | item.isEdit = true |
| | |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row, rowIndex) { |
| | | |
| | | this.thatRow=row |
| | | this.tableList.rowClickIndex=rowIndex |
| | | this.rowIndex = rowIndex |
| | |
| | | this.addTitle = "保存" |
| | | this.showDiscard = true |
| | | this.isRowClick = true |
| | | if (!this.isNoProduct) { |
| | | this.tableData.splice(this.tableData.length - 1, 1) |
| | | if (this.isNoProduct) { |
| | | // this.tableData.splice(this.tableData.length - 1, 1) |
| | | this.tableData.map((item, index) => { |
| | | if (index === rowIndex) { |
| | | item.isEdit = false |