| | |
| | | prop: "date", |
| | | isShowColumn: true, |
| | | default: true, |
| | | date: true |
| | | // date: true |
| | | }, |
| | | { |
| | | label: "单号", |
| | |
| | | { |
| | | label: "产品", |
| | | prop: "productName", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "产品编码", |
| | | prop: "productId", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | | { |
| | | label: "重量", |
| | | prop: "weight", |
| | | isShowColumn: true, |
| | | default: true |
| | | }, |
| | |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | res.data.map((item)=>{ |
| | | let dateObject = new Date(item.date); |
| | | let formattedDateString = dateObject.toISOString().split('T')[0]; |
| | | item.date=formattedDateString |
| | | }) |
| | | this.tableList.tableInfomation = res.data |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | | }) |
| | | } else { |
| | | // await getProductOperatonList({ |
| | | // productId: this.params.id, |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize |
| | | // }).then((res) => { |
| | | // if (res.code === 200) { |
| | | // const list = res.data.map((item) => { |
| | | // return { |
| | | // ...item, |
| | | // fromLocation: item.fromLocation.name, |
| | | // toLocation: item.toLocation.name, |
| | | // productName: this.params.name, |
| | | // amount: item.details[0].product.amount, |
| | | // unit: item.details[0].product.unit |
| | | // } |
| | | // }) |
| | | // this.tableList.tableInfomation = list || [] |
| | | // this.pagerOptions.totalCount = res.total |
| | | // } |
| | | // }) |
| | | await getHistory({ |
| | | baseOperationType:1, |
| | | keyWord:this.params.keyWord, |
| | | page: this.pagerOptions.currPage, |
| | | pageSize: this.pagerOptions.pageSize |
| | | }).then((res) => { |
| | | if (res.code === 200) { |
| | | res.data.map((item)=>{ |
| | | let dateObject = new Date(item.date); |
| | | let formattedDateString = dateObject.toISOString().split('T')[0]; |
| | | item.date=formattedDateString |
| | | }) |
| | | this.tableList.tableInfomation = res.data?res.data:[] |
| | | this.pagerOptions.totalCount = res.total |
| | | } |
| | |
| | | getList(val) { |
| | | this.params.keyWord=val; |
| | | this.getData() |
| | | // getHistory({ |
| | | // page: this.pagerOptions.currPage, |
| | | // pageSize: this.pagerOptions.pageSize |
| | | // }).then((res) => { |
| | | // if (res.code === 200) { |
| | | // this.tableList.tableInfomation = res.data |
| | | // this.pagerOptions.totalCount = res.total |
| | | // } |
| | | // }) |
| | | }, |
| | | // 行点击 |
| | | tableRowClick(row) { |