From ca58b452c9d22971c58680c576eacbb8729675e3 Mon Sep 17 00:00:00 2001
From: qiezi <15576055375@163.com>
Date: Thu, 21 Nov 2024 13:14:54 +0800
Subject: [PATCH] 2024-11-21
---
src/api/part/partInformation.js | 2 +-
src/api/project/project.js | 2 +-
src/api/proofing/proofingInformation.js | 2 +-
src/api/quotation/quotationInformation.js | 2 +-
src/api/test/testInformation.js | 2 +-
.../modules/proofing/requestForProofing.vue | 49 +++++++-
.../modules/quotation/requestForQuote.vue | 49 +++++++-
.../sellForQuotation/quoteDetail.vue | 96 ++++++++-------
src/views/modules/test/requestForTest.vue | 35 +++++-
.../modules/test/testSoBom/testTable.vue | 110 +++++++++++++-----
10 files changed, 257 insertions(+), 92 deletions(-)
diff --git a/src/api/part/partInformation.js b/src/api/part/partInformation.js
index a6a4221..b1a4c7b 100644
--- a/src/api/part/partInformation.js
+++ b/src/api/part/partInformation.js
@@ -94,7 +94,7 @@ export const deleteAgent = data => createAPI(`/plm/partInformation/deleteAgent`,
* @param data
* @returns {*}
*/
-export const searchPartList = (data) => createAPI(`/plm/partInformation/searchPartList`,'get',data);
+export const searchPartList = (data) => createAPI(`/plm/partInformation/searchPartList/${data.no}/${data.size}`,'post',data);
export const searchPart = (data) => createAPI(`/plm/partInformation/searchPart`,'get',data);
diff --git a/src/api/project/project.js b/src/api/project/project.js
index 9709bb8..41a7043 100644
--- a/src/api/project/project.js
+++ b/src/api/project/project.js
@@ -30,7 +30,7 @@ export const getContactChooseData2= data => createAPI(`/project/getContactChoose
export const saveProjectContactList= data => createAPI(`/project/saveProjectContactList`,'post',data)
export const deleteProjectInfo= data => createAPI(`/project/deleteProjectInfo`,'post',data)
export const getProjectInfoPartList= data => createAPI(`/project/getProjectInfoPartList`,'post',data)
-export const getProjectPartList= data => createAPI(`/project/getProjectPartList`,'post',data)
+export const getProjectPartList= data => createAPI(`/project/getProjectPartList/${data.no}/${data.size}`,'post',data)
export const getProjectPart= data => createAPI(`/project/getProjectPart`,'get',data)
export const saveProjectPart= data => createAPI(`/project/saveProjectPart`,'post',data)
export const deleteProjectPartWithId= data => createAPI(`/project/deleteProjectPartWithId`,'post',data)
diff --git a/src/api/proofing/proofingInformation.js b/src/api/proofing/proofingInformation.js
index 7d853fb..15fe5b2 100644
--- a/src/api/proofing/proofingInformation.js
+++ b/src/api/proofing/proofingInformation.js
@@ -30,7 +30,7 @@ export const proofingInformationDelete = data => createAPI(`/plm/proofingInforma
* @param data
* @returns {*}
*/
-export const getProjectPartList = data => createAPI(`/plm/proofingInformation/getProjectPartList`,'post',data)
+export const getProjectPartList = data => createAPI(`/plm/proofingInformation/getProjectPartList/${data.no}/${data.size}`,'post',data)
/**
* 获取打样结果对象
* @param data
diff --git a/src/api/quotation/quotationInformation.js b/src/api/quotation/quotationInformation.js
index f425901..105409b 100644
--- a/src/api/quotation/quotationInformation.js
+++ b/src/api/quotation/quotationInformation.js
@@ -78,7 +78,7 @@ export const saveCustomerResponse = data => createAPI(`/plm/quotationInformation
* @param data
* @returns {*}
*/
-export const getProjectPartList = data => createAPI(`/plm/quotationInformation/getProjectPartList`,'post',data)
+export const getProjectPartList = data => createAPI(`/plm/quotationInformation/getProjectPartList/${data.no}/${data.size}`,'post',data)
/**
* 获取项目列表
* @param data
diff --git a/src/api/test/testInformation.js b/src/api/test/testInformation.js
index 52be163..4991292 100644
--- a/src/api/test/testInformation.js
+++ b/src/api/test/testInformation.js
@@ -30,7 +30,7 @@ export const testInformationDelete = data => createAPI(`/plm/testInformation/tes
* @param data
* @returns {*}
*/
-export const getProjectPartList = data => createAPI(`/plm/testInformation/getProjectPartList`,'post',data)
+export const getProjectPartList = data => createAPI(`/plm/testInformation/getProjectPartList/${data.no}/${data.size}`,'post',data)
/**
* 获取测试结果对象
* @param data
diff --git a/src/views/modules/proofing/requestForProofing.vue b/src/views/modules/proofing/requestForProofing.vue
index cf06747..f085acc 100644
--- a/src/views/modules/proofing/requestForProofing.vue
+++ b/src/views/modules/proofing/requestForProofing.vue
@@ -301,7 +301,7 @@
- 查询
+ 查询
+
+
保存
关闭
@@ -881,6 +890,11 @@ export default {
this.detailVisible = false
this.projectPartData.finalPartNo = ''
this.projectPartData.customerPartNo = ''
+ this.no = 1
+ this.size = 20
+ this.total = 0
+ this.projectPartList = []
+ this.projectPartListSelections = []
}
},
'modalData.tracker'(newVal,oldVal){
@@ -2102,6 +2116,12 @@ export default {
rejectVisible: false,
rejectOpinion: '',
detailVisible:false,
+
+ no:1,
+ size:20,
+ total:0,
+
+ queryLoading:false,
}
},
mounted() {
@@ -2500,9 +2520,16 @@ export default {
let projectPartList = this.modalData.testPartNo.split(';')
this.projectPartData.projectId = this.modalData.projectId;
// 查询所有项目物料
- getProjectPartList(this.projectPartData).then(({data}) => {
+ let params = {
+ ...this.projectPartData,
+ no:this.no,
+ size:this.size,
+ }
+ this.queryLoading = true
+ getProjectPartList(params).then(({data}) => {
if (data && data.code === 0) {
this.projectPartList = data.rows
+ this.total = data.total
this.projectPartList.forEach(val => {
// 回显选中的项目物料
if (projectPartList.includes(val.testPartNo)) {
@@ -2511,10 +2538,12 @@ export default {
})
// this.projectPartModelFlag = true
} else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
+ this.$message.warning(data.msg)
}
+ this.queryLoading = false
+ }).catch(error => {
+ this.queryLoading = false
+ this.$message.error(error)
})
},
/**
@@ -3650,6 +3679,14 @@ export default {
},
clearModalData(filed){
this.modalData[filed] = ''
+ },
+ handleSizeChange(val){
+ this.size = val
+ this.getProjectPartList();
+ },
+ handleCurrentChange(val){
+ this.no = val
+ this.getProjectPartList();
}
}
}
diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue
index 25fbb3b..fa7e2f0 100644
--- a/src/views/modules/quotation/requestForQuote.vue
+++ b/src/views/modules/quotation/requestForQuote.vue
@@ -327,7 +327,7 @@
@@ -366,6 +367,16 @@
+
+
+
@@ -893,6 +904,11 @@ export default {
this.detailVisible = false
this.projectPartData.customerPartNo = ''
this.projectPartData.finalPartNo = ''
+ this.no = 1
+ this.size = 20
+ this.total = 0
+ this.projectPartList = []
+ this.projectPartListSelections = []
}
},
},
@@ -2027,6 +2043,11 @@ export default {
rejectVisible:false,
rejectOpinion:'',
detailVisible:false,
+
+ no:1,
+ size:20,
+ total:0,
+ queryLoading:false,
}
},
mounted() {
@@ -2407,9 +2428,16 @@ export default {
// 获得查询
this.projectPartData.projectId = this.modalData.projectId;
// 查询所有产品
- getProjectPartList(this.projectPartData).then(({data}) => {
+ let params = {
+ ...this.projectPartData,
+ no:this.no,
+ size:this.size,
+ }
+ this.queryLoading = true
+ getProjectPartList(params).then(({data}) => {
if (data && data.code === 0) {
this.projectPartList = data.rows
+ this.total = data.total
this.projectPartList.forEach(val => {
// 回显选中的产品
if (projectPartList.includes(val.testPartNo)) {
@@ -2417,10 +2445,11 @@ export default {
}
})
} else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
+ this.$message.error(data.msg)
}
+ this.queryLoading = false
+ }).catch(()=>{
+ this.queryLoading = false
})
},
/**
@@ -3477,6 +3506,14 @@ export default {
clearModalData(field){
this.modalData[field] = ''
},
+ handleSizeChange(val){
+ this.size = val
+ this.getProjectPartList();
+ },
+ handleCurrentChange(val){
+ this.no = val
+ this.getProjectPartList();
+ }
}
}
diff --git a/src/views/modules/quotation/sellForQuotation/quoteDetail.vue b/src/views/modules/quotation/sellForQuotation/quoteDetail.vue
index fd19166..c8f2c56 100644
--- a/src/views/modules/quotation/sellForQuotation/quoteDetail.vue
+++ b/src/views/modules/quotation/sellForQuotation/quoteDetail.vue
@@ -36,32 +36,14 @@ export default {
update(){
// 当bom触发修改版本时触发
this.searchQuoteRoutingHeader();
+ },
+ projectPartDialogFlag(newVal,oldVal){
+ if (newVal === false){
+ this.closeProjectPartDialog();
+ }
}
},
data(){
- const validateProductNo = (rule, value, callback) =>{
- if (this.quotationDetailFlag !== true && this.quotationLeadIntoDetailFlag !== true){
- return;
- }
- if (value === '' || value === null || value === undefined){
- callback(new Error(' '))
- return
- }
- let params = {...this.projectPartData}
- params.testPartNo = value
- getProjectPart(params).then(({data})=>{
- if (data && data.rows.length >= 1){
- callback()
- }else {
- this.projectPartData.testPartNo = undefined;
- this.$message.error("产品编码不存在!")
- callback(new Error(" "))
- }
- }).catch((error)=>{
- this.projectPartData.testPartNo = undefined
- callback(new Error(' '))
- })
- };
return{
allSearchFlagBom:false,
allSearchFlagRouting:false,
@@ -550,7 +532,7 @@ export default {
tableName: '项目物料表',
columnProp: 'testPartNo',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
@@ -568,7 +550,7 @@ export default {
tableName: '项目物料表',
columnProp: 'partDesc',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
@@ -586,7 +568,7 @@ export default {
tableName: '项目物料表',
columnProp: 'finalPartNo',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: 'IFS物料编码',
columnHidden: false,
columnImage: false,
@@ -604,7 +586,7 @@ export default {
tableName: '项目物料表',
columnProp: 'customerPartNo',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: '客户物料编码',
columnHidden: false,
columnImage: false,
@@ -622,7 +604,7 @@ export default {
tableName: '项目物料表',
columnProp: 'type',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: '制造类型',
columnHidden: false,
columnImage: false,
@@ -640,7 +622,7 @@ export default {
tableName: '项目物料表',
columnProp: 'umId',
headerAlign: 'center',
- align: 'center',
+ align: 'left',
columnLabel: '单位',
columnHidden: false,
columnImage: false,
@@ -694,7 +676,7 @@ export default {
],
// 报价详情表单校验
quotationDetailRules: {
- productNo: [{required: true,validator:validateProductNo,trigger: 'change'}],
+ productNo: [{required: true,trigger: ['change','blur']}],
productDesc: [{required: true, message: ' ', trigger: ['change','blur']}],
quotationDetailStatus: [{required: true, message: ' ', trigger: 'change'}],
internalInquiryNo: [{required: true, message: ' ', trigger: ['change','blur']}],
@@ -702,6 +684,12 @@ export default {
quotationDetailQuantity: [{required: true, message: ' ', trigger: ['change','blur']}],
},
activeName:'bom',
+
+ pageNo:1,
+ pageSize:20,
+ pageTotal:0,
+
+ queryLoading:false,
}
},
methods:{
@@ -834,23 +822,34 @@ export default {
closeProjectPartDialog(){
this.projectPartData = {
site:this.$store.state.user.site,
- testPartNo:undefined,// 项目编号
- partDesc:undefined,// 项目名称
- finalPartNo:undefined,// 正式料号
- customerPartNo:undefined,// 客户料号
+ testPartNo:'',// 项目编号
+ partDesc:'',// 项目名称
+ finalPartNo:'',// 正式料号
+ customerPartNo:'',// 客户料号
}
this.projectPartTable = [];
+ this.queryLoading = false;
},
openProjectPartDialog(){
+ this.quotationLeadIntoDetailFlag = true;
this.getProjectPartList();
},
getProjectPartList(){
- let params = {...this.projectPartData}
+ let params = {
+ ...this.projectPartData,
+ no:this.pageNo,
+ size:this.pageSize,
+ }
params.projectId = this.header.projectId
+ this.queryLoading = true;
getProjectPartList(params).then(({data})=>{
if (data && data.code === 0){
this.projectPartTable = data.rows;
+ this.pageTotal = data.total;
}
+ this.queryLoading = false;
+ }).catch((error)=>{
+ this.queryLoading = false;
})
},
blurProjectHandle(){
@@ -1093,6 +1092,14 @@ export default {
}
})
}
+ },
+ handleSizeChange(val){
+ this.pageSize = val;
+ this.getProjectPartList();
+ },
+ handleCurrentChange(val){
+ this.pageNo = val;
+ this.getProjectPartList();
}
},
@@ -1102,10 +1109,9 @@ export default {
- 新增
+ 新增
-
+
-
+
@@ -1286,7 +1291,7 @@ export default {
查 询
-
+
+
+
diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue
index 4986667..cef9234 100644
--- a/src/views/modules/test/requestForTest.vue
+++ b/src/views/modules/test/requestForTest.vue
@@ -264,7 +264,7 @@
TP工程师
TP工程师
-
+
@@ -407,6 +407,15 @@
+
+
@@ -959,6 +968,8 @@
if (newVal === false){
this.projectPartData.finalPartNo = ''
this.projectPartData.customerPartNo = ''
+ this.partPageNo = 1
+ this.partPageSize = 20
}
}
},
@@ -2100,6 +2111,10 @@
],
rejectVisible:false,
rejectOpinion:"",
+
+ partPageNo:1,
+ partPageSize:20,
+ partPageTotal:0,
}
},
mounted () {
@@ -2477,10 +2492,16 @@
// 拿到选中的产品编号
let projectPartList = this.modalData.testPartNo.split(';')
this.projectPartData.projectId = this.modalData.projectId;
+ let params = {
+ ...this.projectPartData,
+ no:this.partPageNo,
+ size:this.partPageSize,
+ }
// 查询所有项目物料
- getProjectPartList(this.projectPartData).then(({data}) => {
+ getProjectPartList(params).then(({data}) => {
if (data && data.code === 0) {
this.projectPartList = data.rows
+ this.partPageTotal = data.total;
this.projectPartList.forEach (val => {
// 回显选中的项目物料
if (projectPartList.includes(val.testPartNo)) {
@@ -3508,7 +3529,15 @@
},
clearModalData(field){
this.modalData[field] = ''
- }
+ },
+ partPageSizeChange(val){
+ this.partPageSize = val
+ this.getProjectPartList();
+ },
+ partPageCurrentChange(val){
+ this.partPageNo = val
+ this.getProjectPartList();
+ },
},
}
diff --git a/src/views/modules/test/testSoBom/testTable.vue b/src/views/modules/test/testSoBom/testTable.vue
index 45a1e8e..04a848b 100644
--- a/src/views/modules/test/testSoBom/testTable.vue
+++ b/src/views/modules/test/testSoBom/testTable.vue
@@ -100,7 +100,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3ItemNo',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'itemNo',
headerAlign: 'center',
align: 'center',
@@ -117,7 +117,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3ComponentPartNo',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'componentPartNo',
headerAlign: 'center',
align: 'left',
@@ -134,7 +134,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3PartDesc',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'left',
@@ -151,7 +151,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3Spec',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'spec',
headerAlign: 'center',
align: 'left',
@@ -169,7 +169,7 @@ export default {
// functionId: 102001,
// serialNumber: '102001Table3AssemblyQty',
// tableId: '102001Table3',
- // tableName: '测试产品结构',
+ // tableName: '测试物料结构',
// columnProp: 'assemblyQty',
// headerAlign: 'center',
// align: 'left',
@@ -187,7 +187,7 @@ export default {
// functionId: 102001,
// serialNumber: '102001Table3FixedScrapQty',
// tableId: '102001Table3',
- // tableName: '测试产品结构',
+ // tableName: '测试物料结构',
// columnProp: 'fixedScrapQty',
// headerAlign: 'center',
// align: 'left',
@@ -205,7 +205,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3UmName',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'umId',
headerAlign: 'center',
align: 'left',
@@ -223,7 +223,7 @@ export default {
// functionId: 102001,
// serialNumber: '102001Table3ScrapFactor',
// tableId: '102001Table3',
- // tableName: '测试产品结构',
+ // tableName: '测试物料结构',
// columnProp: 'scrapFactor',
// headerAlign: 'center',
// align: 'left',
@@ -241,7 +241,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3RequiredQty',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'requiredQty',
headerAlign: 'center',
align: 'right',
@@ -259,7 +259,7 @@ export default {
// functionId: 102001,
// serialNumber: '102001Table3ReserveQty',
// tableId: '102001Table3',
- // tableName: '测试产品结构',
+ // tableName: '测试物料结构',
// columnProp: 'reserveQty',
// headerAlign: 'center',
// align: 'left',
@@ -277,7 +277,7 @@ export default {
// functionId: 102001,
// serialNumber: '102001Table3IssuedDate',
// tableId: '102001Table3',
- // tableName: '测试产品结构',
+ // tableName: '测试物料结构',
// columnProp: 'issuedDate',
// headerAlign: 'center',
// align: 'left',
@@ -295,7 +295,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3UnitCost',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'unitCost',
headerAlign: 'center',
align: 'right',
@@ -313,7 +313,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3TotalCost',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'totalCost',
headerAlign: 'center',
align: 'right',
@@ -331,7 +331,7 @@ export default {
functionId: 102001,
serialNumber: '102001Table3Remark',
tableId: '102001Table3',
- tableName: '测试产品结构',
+ tableName: '测试物料结构',
columnProp: 'remark',
headerAlign: 'center',
align: 'left',
@@ -349,7 +349,7 @@ export default {
// functionId: 102001,
// serialNumber: '102001Table3rmTypeDb',
// tableId: '102001Table3',
- // tableName: '测试产品结构',
+ // tableName: '测试物料结构',
// columnProp: 'rmTypeDb',
// headerAlign: 'center',
// align: 'left',
@@ -365,6 +365,11 @@ export default {
],
saveOrUpdateFlag:false,
umList:[],
+
+ no:1,
+ size:20,
+ total:0,
+ queryLoading:false
}
},
created() {
@@ -382,14 +387,25 @@ export default {
this.partList = [];
},
openPartDialog(){
+ this.partDialogFlag = true;
this.partData.partNo = this.testSoBom.componentPartNo
this.initPartList();
},
initPartList(){
- searchPartList(this.partData).then(({data})=>{
- if (data && data.code === 200) {
+ let params = {
+ ...this.partData,
+ no:this.no,
+ size:this.size,
+ }
+ this.queryLoading = true
+ searchPartList(params).then(({data})=>{
+ if (data && data.code === 0) {
this.partList = data.data;
+ this.total = data.total
}
+ this.queryLoading = false
+ }).catch(()=>{
+ this.queryLoading = false
})
},
dblClickPartTable(row){
@@ -593,9 +609,28 @@ export default {
}).catch((error)=>{
this.$message.error(error)
})
+ },
+ handleSizeChange(val){
+ this.size = val
+ this.initPartList()
+ },
+ handleCurrentChange(val){
+ this.no = val
+ this.initPartList()
}
},
+ watch:{
+ partDialogFlag(newVal,oldVal){
+ if (newVal === false){
+ this.no = 1;
+ this.size = 20;
+ this.total = 0;
+ this.closePartDialog();
+ }
+ }
+ }
+
}
@@ -639,19 +674,19 @@ export default {
-
+
-
- 产品编码
+
+ 物料编码
-
+
@@ -693,19 +728,17 @@ export default {
-
+
-
+
-
+
-
+
@@ -717,12 +750,27 @@ export default {
-
-
-
+
+
+
+
+
+
+
+
+
+