From 19cd441ffe77aa02213b0eca228c6c7647606f6e Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Wed, 27 Mar 2024 12:33:20 +0800
Subject: [PATCH] =?UTF-8?q?2024-03-27=20=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/common/Chooselist.vue | 75 ++++++++++++-------
.../modules/proofing/requestForProofing.vue | 61 +++++++++------
src/views/modules/test/requestForTest.vue | 63 ++++++++++------
3 files changed, 127 insertions(+), 72 deletions(-)
diff --git a/src/views/modules/common/Chooselist.vue b/src/views/modules/common/Chooselist.vue
index 5b53a6d..d6c942a 100644
--- a/src/views/modules/common/Chooselist.vue
+++ b/src/views/modules/common/Chooselist.vue
@@ -178,49 +178,66 @@ export default {
this.getDataList(true)
})
this.dataListLoading = false
-
},
- getDataList(bool) {
+ getDataList (bool) {
let sql = this.baseListData.sqlcode
- if (bool){
- sql += " and (" + this.baseListData.fieldname1 + " like '%" + this.param + "%' OR "+this.baseListData.fieldname2 + " like '%" + this.param + "%'" +" ) "
- }
- if (this.param1) {
- sql += " and " + this.baseListData.fieldname1 + " like '%" + this.param1 + "%'"
- }
- if (this.param2) {
- sql += " and " + this.baseListData.fieldname2 + " like '%" + this.param2 + "%'"
- }
- if (this.param3) {
- sql += " and active like '%" + this.param3 + "%'"
- }
- if (this.tagNo <1000 && this.tagNo !== 93){
- console.log(this.tagNo)
- if (this.param4) {
- sql += " and site=" + this.param4
+ if (this.tagNo >= 2000) {
+ if (bool) {
+ sql += " and (a." + this.baseListData.fieldname1 + " like '%" + this.param + "%' OR a." + this.baseListData.fieldname2 + " like '%" + this.param + "%'" +" ) "
+ }
+ if (this.param1) {
+ sql += " and a." + this.baseListData.fieldname1 + " like '%" + this.param1 + "%'"
+ }
+ if (this.param2) {
+ sql += " and a." + this.baseListData.fieldname2 + " like '%" + this.param2 + "%'"
+ }
+ if (this.tagNo < 1000 && this.tagNo !== 93){
+ if (this.param4) {
+ sql += " and site = " + this.param4
+ }
+ }
+ } else {
+ if (bool) {
+ sql += " and (" + this.baseListData.fieldname1 + " like '%" + this.param + "%' OR "+this.baseListData.fieldname2 + " like '%" + this.param + "%'" +" ) "
+ }
+ if (this.param1) {
+ sql += " and " + this.baseListData.fieldname1 + " like '%" + this.param1 + "%'"
+ }
+ if (this.param2) {
+ sql += " and " + this.baseListData.fieldname2 + " like '%" + this.param2 + "%'"
+ }
+ if (this.param3) {
+ sql += " and active like '%" + this.param3 + "%'"
+ }
+ if (this.tagNo <1000 && this.tagNo !== 93){
+ if (this.param4) {
+ sql += " and site=" + this.param4
+ }
}
}
- sql += this.conSql
+ sql += this.conSql
getChooselistData({"sqlcode": sql}).then(({data}) => {
if (data.code == 0) {
- this.dataList = data.baseListData;
+ this.dataList = data.baseListData
} else {
this.$message.error(data.msg)
}
})
},
- getRowData(row) {
+
+ getRowData (row) {
this.visible = false
this.$emit('getBaseData',row)
},
- closeDialog(){
- this.param1= ''
- this.param2=''
- this.param3= ''
- this.param= ''
- this.param4=this.$store.state.user.site
- this.baseListData={
+
+ closeDialog () {
+ this.param1 = ''
+ this.param2 = ''
+ this.param3 = ''
+ this.param = ''
+ this.param4 = this.$store.state.user.site
+ this.baseListData = {
caption1: '',
caption2: '',
caption3: '',
@@ -231,7 +248,7 @@ export default {
sqlcode: '',
tagno: '',
}
- this.dataList=[];
+ this.dataList = []
}
}
}
diff --git a/src/views/modules/proofing/requestForProofing.vue b/src/views/modules/proofing/requestForProofing.vue
index 89e3597..948da72 100644
--- a/src/views/modules/proofing/requestForProofing.vue
+++ b/src/views/modules/proofing/requestForProofing.vue
@@ -193,7 +193,8 @@
- 跟单员
+
+ 跟单员
@@ -232,7 +233,8 @@
- 工程师
+
+ 工程师
@@ -2852,25 +2854,34 @@
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
+ let conSql = ''
if (val === 102) {
if(type === 1) {
strVal = this.modalData.customerNo
}
}
- if (val === 103) {
- if(type === 1) {
- strVal = this.modalData.tracker
- }
- if(type === 2) {
- strVal = this.modalData.engineer
- }
- }
+ // if (val === 103) {
+ // if(type === 1) {
+ // strVal = this.modalData.tracker
+ // }
+ // if(type === 2) {
+ // strVal = this.modalData.engineer
+ // }
+ // }
if (val === 104) {
if(type === 1) {
strVal = this.modalData.projectId
}
}
- this.$refs.baseList.init(val, strVal)
+ if (val === 2000) {
+ strVal = this.modalData.trackerName
+ conSql = " and b.site = '" + this.$store.state.user.site + "'"
+ }
+ if (val === 2001) {
+ strVal = this.modalData.engineerName
+ conSql = " and b.site = '" + this.$store.state.user.site + "'"
+ }
+ this.$refs.baseList.init(val, strVal, conSql)
})
},
/**
@@ -2890,16 +2901,16 @@
this.projectPartList = []
}
}
- if (this.tagNo === 103) {
- if(this.tagNo1 === 1) {
- this.modalData.tracker = val.username
- this.modalData.trackerName = val.user_display
- }
- if(this.tagNo1 === 2) {
- this.modalData.engineer = val.username
- this.modalData.engineerName = val.user_display
- }
- }
+ // if (this.tagNo === 103) {
+ // if(this.tagNo1 === 1) {
+ // this.modalData.tracker = val.username
+ // this.modalData.trackerName = val.user_display
+ // }
+ // if(this.tagNo1 === 2) {
+ // this.modalData.engineer = val.username
+ // this.modalData.engineerName = val.user_display
+ // }
+ // }
if (this.tagNo === 104) {
if(this.tagNo1 === 1) {
this.modalData.projectId = val.project_id
@@ -2907,6 +2918,14 @@
this.getProjectPartList();
}
}
+ if (this.tagNo === 2000) {
+ this.modalData.tracker = val.username
+ this.modalData.trackerName = val.user_display
+ }
+ if (this.tagNo === 2001) {
+ this.modalData.engineer = val.username
+ this.modalData.engineerName = val.user_display
+ }
},
// ======== 导出相关方法 ========
diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue
index bdaec18..098bbbb 100644
--- a/src/views/modules/test/requestForTest.vue
+++ b/src/views/modules/test/requestForTest.vue
@@ -193,7 +193,8 @@
- 跟单员
+
+ 跟单员
@@ -232,7 +233,8 @@
- 工程师
+
+ 工程师
@@ -887,7 +889,7 @@
-
+
@@ -2733,25 +2735,34 @@
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
+ let conSql = ''
if (val === 102) {
if(type === 1) {
strVal = this.modalData.customerNo
}
}
- if (val === 103) {
- if(type === 1) {
- strVal = this.modalData.tracker
- }
- if(type === 2) {
- strVal = this.modalData.engineer
- }
- }
+ // if (val === 103) {
+ // if(type === 1) {
+ // strVal = this.modalData.tracker
+ // }
+ // if(type === 2) {
+ // strVal = this.modalData.engineer
+ // }
+ // }
if (val === 104) {
if(type === 1) {
strVal = this.modalData.projectId
}
}
- this.$refs.baseList.init(val, strVal)
+ if (val === 2000) {
+ strVal = this.modalData.trackerName
+ conSql = " and b.site = '" + this.$store.state.user.site + "'"
+ }
+ if (val === 2001) {
+ strVal = this.modalData.engineerName
+ conSql = " and b.site = '" + this.$store.state.user.site + "'"
+ }
+ this.$refs.baseList.init(val, strVal, conSql)
})
},
/**
@@ -2771,16 +2782,16 @@
this.projectPartList = [];
}
}
- if (this.tagNo === 103) {
- if(this.tagNo1 === 1) {
- this.modalData.tracker = val.username
- this.modalData.trackerName = val.user_display
- }
- if(this.tagNo1 === 2) {
- this.modalData.engineer = val.username
- this.modalData.engineerName = val.user_display
- }
- }
+ // if (this.tagNo === 103) {
+ // if(this.tagNo1 === 1) {
+ // this.modalData.tracker = val.username
+ // this.modalData.trackerName = val.user_display
+ // }
+ // if(this.tagNo1 === 2) {
+ // this.modalData.engineer = val.username
+ // this.modalData.engineerName = val.user_display
+ // }
+ // }
if (this.tagNo === 104) {
if(this.tagNo1 === 1) {
this.modalData.projectId = val.project_id
@@ -2788,6 +2799,14 @@
this.getProjectPartList();
}
}
+ if (this.tagNo === 2000) {
+ this.modalData.tracker = val.username
+ this.modalData.trackerName = val.user_display
+ }
+ if (this.tagNo === 2001) {
+ this.modalData.engineer = val.username
+ this.modalData.engineerName = val.user_display
+ }
},
// ======== 导出相关方法 ========