| | |
| | | console.log(res, "resss") |
| | | if (res.data) { |
| | | this.productTableList.tableInfomation = res.data?.length > 0 ? res.data : [] |
| | | // let accumulator=res.data |
| | | // const reducedArray = array.reduce((accumulator, currentItem) => { |
| | | // // 查找当前number是否已存在于accumulator中 |
| | | // const existingItem = accumulator.find(item => item.number === currentItem.number); |
| | | // if (existingItem) { |
| | | // // 如果存在,累加num |
| | | // existingItem.amount += currentItem.amount; |
| | | // } else { |
| | | // // 如果不存在,将当前项添加到accumulator中 |
| | | // accumulator.push(currentItem); |
| | | // } |
| | | // return accumulator; |
| | | // }, []); // 初始化accumulator为一个空数组 |
| | | |
| | | // console.log(reducedArray,"新数组"); |
| | | } |
| | | this.loading = false |
| | | }) |
| | | // let obj=[ |
| | | // { |
| | | // name:"小明", |
| | | // id:1, |
| | | // num:10 |
| | | // }, |
| | | // { |
| | | // name:"小明", |
| | | // id:1, |
| | | // num:20 |
| | | // }, |
| | | // { |
| | | // name:"小明", |
| | | // id:1, |
| | | // num:5 |
| | | // }, |
| | | // { |
| | | // name:"小红", |
| | | // id:1, |
| | | // num:5 |
| | | // }, |
| | | // { |
| | | // name:"小红", |
| | | // id:1, |
| | | // num:10 |
| | | // }, |
| | | // { |
| | | // name:"小房", |
| | | // id:5, |
| | | // num:3 |
| | | // }, |
| | | // ] |
| | | .catch(() => { |
| | | this.productTableList.tableInfomation = [] |
| | | this.loading = false |
| | | }) |
| | | |
| | | this.updateStatus(row.id, 4) |
| | | // await confirmOutputOver({saleDetailNumber:row.number}).then((res)=>{ |
| | | // if(res&&res.code===200){ |
| | | // this.$message.success("确认发货完成") |
| | |
| | | }, |
| | | // 关闭 |
| | | closeClick(row) { |
| | | console.log(row, "关闭") |
| | | this.updateStatus(row.id, 4) |
| | | this.updateStatus(row.id, 6) |
| | | }, |
| | | // 修改状态 |
| | | async updateStatus(id, status) { |
| | |
| | | }, |
| | | // 状态 |
| | | getStatus(val) { |
| | | return val === 1 ? "待确认" : val === 2 ? "待分解" : val === 3 ? "备货中" : val === 4 ? "待出库" : val === 5 ? "出库完成" : val === 6 ? "已关闭" : "--" |
| | | return val === 1 ? "待确认" : val === 2 ? "待入库" : val === 3 ? "已入库" : val === 4 ? "已完成" : val === 5 ? "已取消" : val === 6 ? "待收货" : val === 7 ? "部分收货" : val === 8 ? "待质检" : "--" |
| | | }, |
| | | // top 行点击 |
| | | tableRowClick(row) { |