From f789d10a40cf38dfffc2c2e052ecd7f2fae688cd Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Fri, 13 Sep 2024 15:19:16 +0800 Subject: [PATCH] =?UTF-8?q?2024-09-13=20=E5=8D=95=E6=8D=AE=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/customer/customerInformation.js | 3 ++ .../modules/proofing/requestForProofing.vue | 34 +++++++++++++++---- .../modules/quotation/requestForQuote.vue | 24 +++++++++++-- .../modules/quotation/sellForQuotation.vue | 24 +++++++++++-- src/views/modules/sys/user.vue | 12 +++---- src/views/modules/test/requestForTest.vue | 23 +++++++++++-- 6 files changed, 98 insertions(+), 22 deletions(-) diff --git a/src/api/customer/customerInformation.js b/src/api/customer/customerInformation.js index 33b3b2e..404a10a 100644 --- a/src/api/customer/customerInformation.js +++ b/src/api/customer/customerInformation.js @@ -32,3 +32,6 @@ export const customerInformationSearchForCheck= data => createAPI(`/plm/customer * @returns {*} */ export const checkCustomerGroup = data => createAPI(`/plm/customerInformation/checkCustomerGroup`,'post',data) + + +export const queryCustomer = (data) => createAPI(`/customer`,'post',data) diff --git a/src/views/modules/proofing/requestForProofing.vue b/src/views/modules/proofing/requestForProofing.vue index 75138d8..5a0b248 100644 --- a/src/views/modules/proofing/requestForProofing.vue +++ b/src/views/modules/proofing/requestForProofing.vue @@ -183,7 +183,7 @@ 客户编码 - + @@ -1069,6 +1069,7 @@ import {getNodeAuthority} from "../../../api/changeManagement/changeManagement"; import ProjectInfo from "../quotation/sellForQuotation/projectInfo.vue"; import profingFile from "./profingFile" import proofingAttribute from "../demoComponents/orderProperties" +import {queryCustomer} from "../../../api/customer/customerInformation"; export default { components: { @@ -1404,7 +1405,7 @@ export default { tableName: '打样信息表', columnProp: 'customerDesc', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '客户名称', columnHidden: false, columnImage: false, @@ -1440,7 +1441,7 @@ export default { tableName: '打样信息表', columnProp: 'projectName', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '项目名称', columnHidden: false, columnImage: false, @@ -1530,7 +1531,7 @@ export default { tableName: '打样信息表', columnProp: 'partName', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '物料名称', columnHidden: false, columnImage: false, @@ -1566,7 +1567,7 @@ export default { tableName: '打样信息表', columnProp: 'proofingNumber', headerAlign: 'center', - align: 'center', + align: 'right', columnLabel: '打样数量', columnHidden: false, columnImage: false, @@ -1602,7 +1603,7 @@ export default { tableName: '打样信息表', columnProp: 'proofingStatus', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '状态', columnHidden: false, columnImage: false, @@ -1620,7 +1621,7 @@ export default { tableName: '打样信息表', columnProp: 'nodeName', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '当前节点', columnHidden: false, columnImage: false, @@ -3588,6 +3589,25 @@ export default { } }) }, + handleQueryCustomer(){ + let params = { + site:this.$store.state.user.site, + customerNo:this.modalData.customerNo + } + queryCustomer(params).then(({data})=>{ + if (data && data.code === 0 ) { + if (data.rows && data.rows.length === 1){ + this.modalData.customerDesc = data.rows[0].customerDesc + }else { + this.modalData.customerDesc = '' + } + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, } } diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue index bcd20a6..940977a 100644 --- a/src/views/modules/quotation/requestForQuote.vue +++ b/src/views/modules/quotation/requestForQuote.vue @@ -183,7 +183,7 @@ 客户编码 - + @@ -1037,6 +1037,7 @@ import {getPriceCheckPropertiesList} from "../../../api/quotation/priceCheckProp import PriceCheckDetail from "./sellForQuotation/priceCheckDetail/priceCheckDetail.vue"; import {getPriceCheckDetailList} from "../../../api/quotation/priceCheckDetail"; import InquiryQuoteDetail from "./inquiry/inquiryQuoteDetail.vue"; +import {queryCustomer} from "../../../api/customer/customerInformation"; export default { computed: { @@ -3421,8 +3422,25 @@ export default { } }) }, - - + handleQueryCustomer(){ + let params = { + site:this.$store.state.user.site, + customerNo:this.modalData.customerNo + } + queryCustomer(params).then(({data})=>{ + if (data && data.code === 0 ) { + if (data.rows && data.rows.length === 1){ + this.modalData.customerDesc = data.rows[0].customerDesc + }else { + this.modalData.customerDesc = '' + } + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, } } diff --git a/src/views/modules/quotation/sellForQuotation.vue b/src/views/modules/quotation/sellForQuotation.vue index 5e32fd0..67f387c 100644 --- a/src/views/modules/quotation/sellForQuotation.vue +++ b/src/views/modules/quotation/sellForQuotation.vue @@ -192,7 +192,7 @@ 客户编码 + clearable @change="clearCustomer" @blur="handleQueryCustomer"/> @@ -400,6 +400,7 @@ import QuoteDetail from "./sellForQuotation/quoteDetail.vue"; import {searchProjectInfoList} from "../../../api/quotation/quotationInformation"; import {getQuotationHeaderByPagePost, updateQuoteStatus} from "../../../api/quotation/quotationHeader"; import {getQuotePage} from "../../../api/quotation/quote"; +import {queryCustomer} from "../../../api/customer/customerInformation"; export default { components: { @@ -1293,7 +1294,26 @@ export default { this.initData();//初始化数据 } this.initPage = true; - } + }, + handleQueryCustomer(){ + let params = { + site:this.$store.state.user.site, + customerNo:this.insertData.customerNo + } + queryCustomer(params).then(({data})=>{ + if (data && data.code === 0 ) { + if (data.rows && data.rows.length === 1){ + this.insertData.customerName = data.rows[0].customerDesc + }else { + this.insertData.customerName = '' + } + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, }, computed: {}, watch: { diff --git a/src/views/modules/sys/user.vue b/src/views/modules/sys/user.vue index fa79e74..55c4b64 100644 --- a/src/views/modules/sys/user.vue +++ b/src/views/modules/sys/user.vue @@ -118,7 +118,7 @@ {{ buttons.edit || '修改' }} {{ buttons.delete || '删除' }} + @click="deleteHandle(scope.row)">{{ buttons.delete || '删除' }} @@ -1257,12 +1257,8 @@ export default { }) }, // 删除 - deleteHandle(id) { - var userIds = id ? [id] : this.dataListSelections.map(item => { - return item.userId - }) - let usernames = this.dataList.filter(item => item.userId === id).map(item=>item.username) - this.$confirm(`确定对[用户账号${usernames.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', { + deleteHandle(row) { + this.$confirm(`确定要删除 [用户账号 : ${row.username} , 用户名 : ${row.userDisplay}] ?`, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' @@ -1270,7 +1266,7 @@ export default { this.$http({ url: this.$http.adornUrl('/sys/user/delete'), method: 'post', - data: this.$http.adornData(userIds, false) + data: this.$http.adornData([row.userId], false) }).then(({data}) => { if (data && data.code === 0) { this.$message.success('操作成功') diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue index 73518b1..f53a80f 100644 --- a/src/views/modules/test/requestForTest.vue +++ b/src/views/modules/test/requestForTest.vue @@ -171,7 +171,7 @@ 客户编码 - + @@ -1167,6 +1167,7 @@ import TestProperties from "./testAttribute/testProperties.vue"; import {getTestPropertiesList,searchTestPropertiesItem} from "../../../api/test/testProperties"; import TestFile from "./file/testFile.vue"; + import {queryCustomer} from "../../../api/customer/customerInformation"; export default { computed: { testInformationFlag () { @@ -3622,7 +3623,25 @@ } }) }, - + handleQueryCustomer(){ + let params = { + site:this.$store.state.user.site, + customerNo:this.modalData.customerNo + } + queryCustomer(params).then(({data})=>{ + if (data && data.code === 0 ) { + if (data.rows && data.rows.length === 1){ + this.modalData.customerDesc = data.rows[0].customerDesc + }else { + this.modalData.customerDesc = '' + } + }else { + this.$message.warning(data.msg) + } + }).catch((error)=>{ + this.$message.error(error) + }) + }, } }