From 2260b47026088827f177bec0931ded0fd73d97ba Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期二, 26 三月 2024 10:48:43 +0800
Subject: [PATCH] 销售明细单发货弹窗样式优化
---
src/views/sales/salesDetails/index.vue | 109 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 92 insertions(+), 17 deletions(-)
diff --git a/src/views/sales/salesDetails/index.vue b/src/views/sales/salesDetails/index.vue
index 719169e..928d62b 100644
--- a/src/views/sales/salesDetails/index.vue
+++ b/src/views/sales/salesDetails/index.vue
@@ -50,6 +50,9 @@
<template v-if="scope.row.status === 3||scope.row.status === 4">
<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>
</template>
</el-table-column>
</template>
@@ -176,7 +179,8 @@
getProductOrderInfo,
updateStatus,
getProjectList,
- sendSalesDetailsToOtherSystem
+ sendSalesDetailsToOtherSystem,
+ confirmOutputOver
} from "@/api/sales/salesDetails"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import DetailSpecification from "@/views/sales/salesDetails/DetailSpecification"
@@ -241,7 +245,7 @@
{ label: "鎵胯繍鍟�", prop: "carrier" },
{ label: "杩愬崟鍙�", prop: "waybill" },
{ label: "鍒涘缓鏃堕棿", prop: "warehouse" },
- { label: "鐘舵��", prop: "status" },
+ { label: "鐘舵��", prop: "status",isCallMethod: true,getCallMethod: this.getStatusFive },
]
// 鍒堕�犱俊鎭�
const makeColumn = [
@@ -318,57 +322,47 @@
{
label: "濮斿璁㈠崟",
prop: "outsourcingId",
- default: true
},
{
label: "浜у搧缂栧彿",
prop: "productId",
- default: true
},
{
label: "浜у搧鍚嶇О",
prop: "productName",
- default: true
},
{
label: "浜у搧瑙勬牸",
prop: "specs",
- default: true
},
{
label: "浜у搧鍗曚綅",
prop: "unit",
- default: true
},
{
label: "濮斿鏁伴噺",
prop: "amount",
- default: true
},
{
label: "瀹屾垚鏁伴噺",
prop: "finishAmount",
- default: true
},
{
label: "璁㈠崟鐘舵��",
prop: "status",
- default: true
+ default: true, isCallMethod: true, getCallMethod: this.getStatus
},
{
label: "濮斿渚涘簲鍟�",
prop: "supplierName",
- default: true
},
{
label: "绛剧害鏃ユ湡",
prop: "startTime",
- default: true
},
{
label: "浜や粯鏃ユ湡",
prop: "endTime",
- default: true
},
]
return {
@@ -439,7 +433,7 @@
TabsIndex: "0",
productTableList: {},
productColumn: productColumn,
- showProductCol: ["浜у搧缂栧彿", "浜у搧鍚嶇О","浜у搧瑙勬牸", "鍗曚綅", "璁㈠崟鏁伴噺", "宸插畬鎴愭暟閲�", "宸插彂璐ф暟閲�", "閲囪喘鏁伴噺", "鐢熶骇鏁伴噺", "濮斿鏁伴噺","閿�鍞崟浠�","鎴愭湰鍗曚环","姣涘埄","姣涘埄鐜�","浠风◣鍚堣"],
+ showProductCol: ["浜у搧缂栧彿", "浜у搧鍚嶇О","浜у搧瑙勬牸", "鍗曚綅", "璁㈠崟鏁伴噺", "宸插畬鎴愭暟閲�", "宸插彂璐ф暟閲�", "閲囪喘鏁伴噺", "鐢熶骇鏁伴噺", "濮斿鏁伴噺","閿�鍞崟浠�","鎴愭湰鍗曚环","姣涘埄","姣涘埄鐜�(%)","浠风◣鍚堣"],
inventoryColumn: inventoryColumn,
showInventoryCol: [
"鍑哄簱鍗�",
@@ -456,7 +450,7 @@
"鐘舵��"
],
makeColumn: makeColumn,
- showMakeCol: ["鐢熶骇璁㈠崟", "浜у搧鍚嶇О", "璁㈠崟鐘舵��", "宸ュ崟缂栧彿", "宸ュ崟鐘舵��", "璁″垝寮�濮嬫椂闂�", "璁″垝缁撴潫鏃堕棿"],
+ showMakeCol: ["鐢熶骇璁㈠崟", "浜у搧缂栧彿", "浜у搧鍚嶇О", "浜у搧瑙勬牸", "浜у搧鍗曚綅", "璁㈠崟鏁伴噺", "瀹屾垚鏁伴噺","宸ュ崟缂栧彿","宸ュ崟鐘舵��","璁″垝寮�濮嬫椂闂�","璁″垝缁撴潫鏃堕棿"],
// 閲囪喘
purchaseColumn: purchaseColumn,
outsourceColumn:outsourceColumn,
@@ -633,6 +627,7 @@
this.loading = true
await getProductInventoryInfo(row.number)
.then((res) => {
+ console.log(res,"resss")
this.productTableList.tableInfomation = res.data?.length > 0 ? res.data : []
this.loading = false
})
@@ -736,6 +731,75 @@
this.editShipmentsConfig.infomation.saleDetailNumber=row.number
this.editShipmentsConfig.infomation.projectId=row.projectId
},
+ // 纭鍙戣揣瀹屾垚
+ async confirmClick(row){
+ this.selectRow = row
+ await getProductInventoryInfo(this.selectRow.number)
+ .then((res) => {
+ 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) {
+ // // 濡傛灉瀛樺湪锛岀疮鍔爊um
+ // existingItem.amount += currentItem.amount;
+ // } else {
+ // // 濡傛灉涓嶅瓨鍦紝灏嗗綋鍓嶉」娣诲姞鍒癮ccumulator涓�
+ // accumulator.push(currentItem);
+ // }
+ // return accumulator;
+ // }, []); // 鍒濆鍖朼ccumulator涓轰竴涓┖鏁扮粍
+
+ // 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
+ })
+ // await confirmOutputOver({saleDetailNumber:row.number}).then((res)=>{
+ // if(res&&res.code===200){
+ // this.$message.success("纭鍙戣揣瀹屾垚")
+ // this.getData()
+ // }
+ // })
+ },
// 鍏抽棴
closeClick(row) {
console.log(row, "鍏抽棴")
@@ -826,6 +890,7 @@
if (this.selectRow.status == 1) {
this.productTableList.tableInfomation = []
} else {
+ console.log(this.selectRow,"鐪嬬湅")
this.getProductInventoryInfo(this.selectRow)
}
} else if (this.TabsIndex == 2) {
@@ -850,7 +915,7 @@
},
// 鐘舵��
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 ? "宸插叧闂�": "--"
},
// top 琛岀偣鍑�
tableRowClick(row) {
@@ -867,6 +932,9 @@
this.getProductOrderInfo(this.selectRow.number)
} else if (this.TabsIndex == 3) {
// 閲囪喘淇℃伅
+ this.getProductOrderInfo(this.selectRow.number)
+ }else if(this.TabsIndex == 4){
+ // 濮斿淇℃伅
this.getProductOrderInfo(this.selectRow.number)
}
},
@@ -927,7 +995,14 @@
})
}
})
- }
+ },
+ getStatusFive(val) {
+ if (val) {
+ return val==0?'灏辩华':'瀹屾垚'
+ } else {
+ return "--";
+ }
+ },
}
}
</script>
--
Gitblit v1.8.0