diff --git a/src/views/modules/tooling/toolingInfo.vue b/src/views/modules/tooling/toolingInfo.vue index 182336e..3b9fb2b 100644 --- a/src/views/modules/tooling/toolingInfo.vue +++ b/src/views/modules/tooling/toolingInfo.vue @@ -89,6 +89,15 @@ + + + + + + + + + @@ -101,12 +110,19 @@ placeholder="结束日期"> - - + + 报价员 + - - + + TP + + + + 采购员 + + @@ -159,6 +175,7 @@ + @@ -169,9 +186,10 @@ } from "@/api/tool/toolApply.js" import Chooselist from '@/views/modules/common/Chooselist' import DictDataSelect from "../sys/dict-data-select.vue" + import ChooseUser from '@/views/modules/common/ChooseUser' export default { components: { - Chooselist, DictDataSelect, + Chooselist, DictDataSelect,ChooseUser, }, data() { return { @@ -478,6 +496,12 @@ remark:'', createBy:'', department:'', + quoter: '', + quoterName: '', + tp: '', + tpName: '', + purchaser: '', + purchaserName: '', detailList:[], }, toolData:[], @@ -512,15 +536,67 @@ }) }, methods: { + getUserList (type) { + if(this.ifDisableFlag){ + return false + } + this.tagNo1 = type + this.$nextTick(() => { + let strVal = '' + + if(type==1) { + strVal = this.dataForm.quoter + } + if(type==2) { + strVal = this.dataForm.tp + } + if(type==3) { + strVal = this.dataForm.purchaser + } + + this.$refs.userList.init(this.searchData.site,'%%', strVal) + }) + }, + /* 列表方法的回调 */ + getUserData (val) { + + if(this.tagNo1==1) { + this.dataForm.quoter = val.username + this.dataForm.quoterName = val.userDisplay + this.$nextTick(() => { + this.$triggerInputEvent(this.$refs.quoterName); + }); + } + if(this.tagNo1==2) { + this.dataForm.tp = val.username + this.dataForm.tpName = val.userDisplay + this.$nextTick(() => { + this.$triggerInputEvent(this.$refs.tpName); + }); + } + if(this.tagNo1==3) { + this.dataForm.purchaser = val.username + this.dataForm.purchaserName = val.userDisplay + this.$nextTick(() => { + this.$triggerInputEvent(this.$refs.purchaserName); + }); + } + }, // 获取基础数据列表S getBaseList (val, type) { this.tagNo = val this.tagNo1 = type this.$nextTick(() => { let strVal = '' - if (val === 1013) { + if (val === 103) { if(type==1) { - strVal = this.dataForm.partType + strVal = this.dataForm.quoter + } + if(type==2) { + strVal = this.dataForm.tp + } + if(type==3) { + strVal = this.dataForm.purchaser } } this.$refs.baseList.init(val, strVal) @@ -528,10 +604,27 @@ }, /* 列表方法的回调 */ getBaseData (val) { - if (this.tagNo === 1013) { + if (this.tagNo === 103) { if(this.tagNo1==1) { - this.dataForm.partType = val.Base_id - this.dataForm.partTypeDesc = val.Base_desc + this.dataForm.quoter = val.username + this.dataForm.quoterName = val.user_display + this.$nextTick(() => { + this.$triggerInputEvent(this.$refs.quoterName); + }); + } + if(this.tagNo1==2) { + this.dataForm.tp = val.username + this.dataForm.tpName = val.user_display + this.$nextTick(() => { + this.$triggerInputEvent(this.$refs.tpName); + }); + } + if(this.tagNo1==3) { + this.dataForm.purchaser = val.username + this.dataForm.purchaserName = val.user_display + this.$nextTick(() => { + this.$triggerInputEvent(this.$refs.purchaserName); + }); } } }, @@ -589,6 +682,12 @@ remark:'', createBy:this.$store.state.user.name, department: '', + quoter: '', + quoterName: '', + tp: '', + tpName: '', + purchaser: '', + purchaserName: '', detailList:[], }; this.visible=true; @@ -602,9 +701,12 @@ // // } this.dataForm.applySumQty =0 + // this.dataForm.allCost =0 for (const item of this.toolData) { // 累加之前先确保值存在,并将 null 或 undefined 转换为0 this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0); + // this.dataForm.allCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty*item.standardCost : 0); + } }, saveData(){ @@ -640,6 +742,24 @@ }) return false; } + if(this.dataForm.quoter===''||this.dataForm.quoter==null){ + this.$alert('未选择报价员!', '错误', { + confirmButtonText: '确定' + }) + return false; + } + if(this.dataForm.tp===''||this.dataForm.tp==null){ + this.$alert('未选择TP!', '错误', { + confirmButtonText: '确定' + }) + return false; + } + if(this.dataForm.purchaser===''||this.dataForm.purchaser==null){ + this.$alert('未选择采购员!', '错误', { + confirmButtonText: '确定' + }) + return false; + } this.$confirm('确定要保存?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', diff --git a/src/views/modules/tooling_old/searchToolApply.vue b/src/views/modules/tooling_old/searchToolApply.vue index 2e42f0b..7cfe020 100644 --- a/src/views/modules/tooling_old/searchToolApply.vue +++ b/src/views/modules/tooling_old/searchToolApply.vue @@ -437,6 +437,60 @@ fixed: '', columnWidth: 80 }, + { + userId: this.$store.state.user.name, + functionId: 106002, + serialNumber: '106002Table1QuoterName', + tableId: "106002Table1", + tableName: "刀具申请主表", + columnProp: "quoterName", + headerAlign: "center", + align: "left", + columnLabel: "报价员", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 60 + }, + { + userId: this.$store.state.user.name, + functionId: 106002, + serialNumber: '106002Table1TpName', + tableId: "106002Table1", + tableName: "刀具申请主表", + columnProp: "tpName", + headerAlign: "center", + align: "left", + columnLabel: "TP", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 60 + }, + { + userId: this.$store.state.user.name, + functionId: 106002, + serialNumber: '106002Table1PurchaserName', + tableId: "106002Table1", + tableName: "刀具申请主表", + columnProp: "purchaserName", + headerAlign: "center", + align: "left", + columnLabel: "采购员", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 60 + }, { userId: this.$store.state.user.name, functionId: 106002,