From 9da0675fa67f1f03f48881b2664da4c01356d1b5 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 23 七月 2025 15:01:08 +0800
Subject: [PATCH] 插回损--功能修改
---
src/views/plan/customerorder/index.vue | 87 ++++++++++++++++++++++++++++++-------------
1 files changed, 60 insertions(+), 27 deletions(-)
diff --git a/src/views/plan/customerorder/index.vue b/src/views/plan/customerorder/index.vue
index a1667e2..87bf7f7 100644
--- a/src/views/plan/customerorder/index.vue
+++ b/src/views/plan/customerorder/index.vue
@@ -18,7 +18,7 @@
@command="documentHandle"
style="margin-left: 10px"
>
- <el-button>
+ <el-button style="padding: 9px 14px;">
宸ヨ壓鏂囦欢<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
@@ -38,7 +38,7 @@
@command="handleCommitCommand"
style="margin-left: 10px"
>
- <el-button>
+ <el-button style="padding: 9px 14px;">
瀹℃牳鐘舵�佹敼鍙�<i class="el-icon-arrow-down el-icon--right"></i>
</el-button>
<el-dropdown-menu slot="dropdown">
@@ -52,10 +52,17 @@
</el-dropdown-menu>
</el-dropdown>
<el-button
- style="margin-left: 10px"
+ style="margin-left: 10px;padding: 9px 14px;"
type="primary"
@click="() => (exportDialogVisible = true)"
>瀵煎嚭鍙拌处</el-button
+ >
+ <el-button
+ style="margin-left: 10px;padding: 9px 14px;"
+ type="primary"
+ v-if="permissions.plan_customerorder_check"
+ @click="handleCheck"
+ >瀹℃牳</el-button
>
<!-- <el-button
style="margin-left: 10px"
@@ -414,7 +421,6 @@
selectTime: null,
exportTime: null,
},
- expandRowKeys: null,
dataRule: {
exportTime: [
{ required: true, message: '瀵煎嚭鏃ユ湡涓嶈兘涓虹┖', trigger: 'change' },
@@ -529,6 +535,7 @@
isSearch: true, // 楂樼骇鏌ヨ鎸夐挳
defaultOrderBy: { column: 'placeOrderDate', direction: 'desc' },
cancelRunCreated: true,
+ reserveSelection: true,//鏄惁淇濈暀涔嬪墠閫夋嫨鐨勬暟鎹�
},
table: {
total: 0,
@@ -596,7 +603,7 @@
sort: true,
isTrue: true,
isSearch: true,
- searchInfoType: 'date',
+ searchInfoType: 'datetimerange',
formatter: this.formatDutyDate,
},
{
@@ -798,19 +805,19 @@
// size: 'small',
// fun: this.packageExportHandle
// },
- {
- text: '瀹℃牳',
- type: 'text',
- size: 'small',
- fun: this.checkHandOrder,
- showFun: (row) => {
- return row.sourceId === '1'
- },
- show: {
- val: [false],
- key: 'isPass',
- },
- },
+ // {
+ // text: '瀹℃牳',
+ // type: 'text',
+ // size: 'small',
+ // fun: this.checkHandOrder,
+ // showFun: (row) => {
+ // return row.sourceId === '1'
+ // },
+ // show: {
+ // val: [false],
+ // key: 'isPass',
+ // },
+ // },
{
text: '宸插叧鑱旇鍗�',
type: 'text',
@@ -1202,10 +1209,7 @@
async getData() {
await this.$refs.customerOrderTable.getDataList()
- this.$refs.customerOrderTable.tableData.forEach((ele) => {
- this.$refs.customerOrderTable.$refs.lmesTable.toggleRowExpansion(ele,false)
- })
- this.expandRowKeys && this.$refs.customerOrderTable.$refs.lmesTable.toggleRowExpansion(this.expandRowKeys,true)
+ this.$refs.customerOrderTable.toggleRowExpansion()
},
// 鑾峰彇鏁版嵁鍒楄〃鍘婚櫎宸插畬鎴愮姸鎬佺殑
handleDataList(command) {
@@ -1285,11 +1289,6 @@
this.$refs.addSampleForm.init(row ? row.contractNo : null)
})
}
- this.$refs.customerOrderTable.tableData.forEach((item) => {
- if(item.children&&item.children.find(m=>m.id==row.id)){
- this.expandRowKeys = item;
- }
- })
},
// 鏂板鏍峰搧璁㈠崟
addSampleCustomerOrder() {
@@ -1954,6 +1953,40 @@
this.$message.error('璇峰厛閫夋嫨鏃ユ湡')
}
},
+ handleCheck(){
+ if (this.multipleSelection.length > 0) {
+ for(let i=0 ;i<this.multipleSelection.length;i++){
+ if(this.multipleSelection[i].sourceId==0){
+ this.$message.error('璇烽�夋嫨鎵嬪姩杈撳叆鐨勯攢鍞鍗�')
+ return;
+ }
+ if(this.multipleSelection[i].isPass){
+ this.$message.error('璇烽�夋嫨鏈鏍搁�氳繃鐨勯攢鍞鍗�')
+ return;
+ }
+ }
+ this.$confirm('纭瀹℃牳閫氳繃閫変腑鐨勯攢鍞鍗曞悧?', '鎻愮ず', {
+ confirmButtonText: '閫氳繃',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ })
+ .then(() => {
+ checkHanderOrder(this.multipleSelection)
+ .then((res) => {
+ if (res.status === 200) {
+ this.$message.success('瀹℃牳閫氳繃')
+ this.getData()
+ }
+ })
+ .catch((error) => {
+ console.error(error)
+ })
+ })
+ .catch(() => {})
+ } else {
+ this.$message.error('璇烽�夋嫨鑷冲皯涓�鏉¢攢鍞鍗�')
+ }
+ }
},
}
</script>
--
Gitblit v1.9.3