| | |
| | | <!-- <el-button @click="delClick(scope.row.id)" type="text" size="small">删除</el-button> --> |
| | | <el-button @click.stop="closeClick(scope.row)" type="text" size="small">关闭</el-button> |
| | | </template> |
| | | <template v-if="scope.row.status === 3 || scope.row.status === 4"> |
| | | <template v-if="scope.row.status === 3"> |
| | | <el-button @click.stop="shipmentsClick(scope.row)" type="text" size="small">发货</el-button> |
| | | </template> |
| | | <template v-if="scope.row.status === 3 || scope.row.status === 4"> |
| | | <el-button @click.stop="confirmClick(scope.row)" type="text" size="small">确认完成</el-button> |
| | | <template v-if="scope.row.status === 3"> |
| | | <el-button @click.stop="confirmClick(scope.row)" type="text" size="small">发货完成</el-button> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | label: "采购数量", |
| | | isClass: true, |
| | | getClassName: this.getFinishAmountClassName, |
| | | prop: "purchaseAmount2", |
| | | prop: "purchaseAmount", |
| | | }, |
| | | { |
| | | label: "生产数量", prop: "makeAmount2", |
| | | label: "生产数量", prop: "makeAmount", |
| | | isClass: true, |
| | | getClassName: this.getFinishAmountClassName, |
| | | }, |
| | | { |
| | | label: "委外数量", prop: "outsourcingAmount2", |
| | | label: "委外数量", prop: "outsourcingAmount", |
| | | isClass: true, |
| | | getClassName: this.getFinishAmountClassName, |
| | | }, |
| | |
| | | { label: "完成数量", prop: "finishAmount" }, |
| | | { label: "工单编号", prop: "workOrderId" }, |
| | | { label: "工单状态", prop: "workOrderStatus" }, |
| | | { label: "计划开始时间", prop: "startTime" }, |
| | | { label: "计划结束时间", prop: "endTime" } |
| | | { label: "计划开始时间", prop: "startTime",min:130 }, |
| | | { label: "计划结束时间", prop: "endTime",min:130 } |
| | | ] |
| | | // 采购信息 |
| | | const purchaseColumn = [ |
| | |
| | | }, |
| | | // 获取制造信息 |
| | | async getProductOrderInfo(number) { |
| | | console.log(number,this.TabsIndex,"number") |
| | | if (number) { |
| | | if (this.TabsIndex == 0) { |
| | | // 产品信息列表 |
| | |
| | | }) |
| | | this.loading = false |
| | | } |
| | | this.$forceUpdate() |
| | | }, |
| | | getListValue(res) { |
| | | if (this.TabsIndex == 0) { |
| | |
| | | let b1 = number1 || number1 == 0 ? number1 : "--"; |
| | | string1 = b1 + "/" + a1; |
| | | } |
| | | item.purchaseAmount2 = string1 |
| | | item.purchaseAmount = string1 |
| | | let string2 = "--"; |
| | | let number2 = item.makeFinishAmount; |
| | | let val2 = item.makeAmount |
| | |
| | | let b2 = number2 || number2 == 0 ? number2 : "--"; |
| | | string2 = b2 + "/" + a2; |
| | | } |
| | | item.makeAmount2 = string2 |
| | | item.makeAmount = string2 |
| | | let string3 = "--"; |
| | | let number3 = item.outsourcingFinishAmount; |
| | | let val3 = item.outsourcingAmount |
| | |
| | | let b3 = number3 || number3 == 0 ? number3 : "--"; |
| | | string3 = b3 + "/" + a3; |
| | | } |
| | | item.outsourcingAmount2 = string3 |
| | | item.outsourcingAmount = string3 |
| | | })) |
| | | } |
| | | this.productTableList.tableInfomation = res.data && res.data.productInfo ? res.data.productInfo : [] |
| | |
| | | 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) { |