diff --git a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue index 657cfb8..1142861 100644 --- a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue +++ b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue @@ -158,15 +158,15 @@ import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep' loading: false, dataSource: [], columns: [ - // { - // title: '物料组', - // key: 'materialGroup', - // type: FormTypes.sel_search, - // dictCode:"", - // width:"200px", - // placeholder: '请输入${title}', - // defaultValue:'', - // }, + { + title: '', + key: 'materialGroup', + type: FormTypes.input, + dictCode:"", + width:"0px", + placeholder: '请输入${title}', + defaultValue:'', + }, { title: '物料号', key: 'materialNumber', @@ -207,7 +207,7 @@ import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep' defaultValue:'', }, { - title: '单价', + title: '单价(元)', key: 'materialPrice', type: FormTypes.inputNumber, width:"200px", @@ -223,7 +223,7 @@ import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep' defaultValue:'', }, { - title: '金额', + title: '金额(元)', key: 'materialAmount', type: FormTypes.inputNumber, disabled: true, diff --git a/src/views/activiti/form/ProcessMaterialsAllotForm.vue b/src/views/activiti/form/ProcessMaterialsAllotForm.vue index 77af888..4a67b83 100644 --- a/src/views/activiti/form/ProcessMaterialsAllotForm.vue +++ b/src/views/activiti/form/ProcessMaterialsAllotForm.vue @@ -221,7 +221,7 @@ options: [] }, { - title: '单价', + title: '单价(元)', key: 'materialPrice', type: FormTypes.inputNumber, width: '200px', @@ -229,7 +229,7 @@ defaultValue: '' }, { - title: '金额', + title: '金额(元)', key: 'materialAmount', type: FormTypes.inputNumber, width: '200px', diff --git a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue index aa3399a..5dba608 100644 --- a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue +++ b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue @@ -122,6 +122,7 @@ data() { return { libraryAssociationIdInvisible:'ZK', + rolePlay :false , jiy:[], heid: true, addId : '', @@ -241,7 +242,7 @@ defaultValue:'', }, { - title: '单价', + title: '单价(元)', key: 'materialPrice', type: FormTypes.inputNumber, width:"200px", @@ -249,7 +250,7 @@ defaultValue:'', }, { - title: '金额', + title: '金额(元)', key: 'materialAmount', type: FormTypes.inputNumber, width:"200px", @@ -280,9 +281,10 @@ add: '/hy/processMaterialsDelivery/add', edit: '/hy/processMaterialsDelivery/edit', queryById: '/hy/processMaterialsDelivery/queryById', - descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', //查询物料组 - wasteMaterialsUrl: '/suppliesstronger/processSuppliesStronger/descriptionName', //查询物料组 + descriptionRake: '/suppliesstronger/processSuppliesStronger/descriptionName', //查询总库物料组 + wasteMaterialsUrl: '/wastematerials/processWasteMaterials/wasteMaterialsName', //查询账外物料组 merchandiseNewsList: '/suppliesstronger/processSuppliesStronger/merchandiseNews', + wasteMaterialsList: '/wastematerials/processWasteMaterials/merchandiseNewsName', //账外 puwwlist: "/unitwaste/processUnitWasteWarehouseCode/queryById", unitWasteWarehouseList: "/unitwaste/processUnitWasteWarehouseCode/queryById", //查询目标库 processMaterialsDeliveryList: { @@ -383,7 +385,13 @@ // console.log(record) if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment === ''){ // console.log("执行materialGroup") - this.fetchMerchandiseNews(record.row.materialGroup,1); + if(this.rolePlay ){ + await this.fetchMerchandiseNewsZW(record.row.materialGroup, 1); + }else{ + await this.fetchMerchandiseNews(record.row.materialGroup, 1); + } + + } if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.actualSendNumber === '' ){ // console.log("执行materialNumber") @@ -394,7 +402,7 @@ name: item.merchandiseName, unit: item.materialsUnit, supplierName: item.supplierName, - price: item.price, + price: item.materialPrice, residueNumber : item.residueNumber === undefined ? 0 : item.residueNumber, } } @@ -473,7 +481,6 @@ descriptionId:value, } - this.bigIdMerchandiseNews = []; this.bigIdMerchandiseNewsList = []; let qc = []; let numberList = []; @@ -527,6 +534,69 @@ }); + }, + fetchMerchandiseNewsZW(value){ //查询物料清单信息 + //查询大品类数据 + return new Promise((resolve, reject) => { + //你的逻辑代码 + let par = { + delFlag: 0, + descriptionId:value, + + } + this.bigIdMerchandiseNewsList = []; + let qc = []; + let numberList = []; + if(this.processMaterialsDeliveryListTable.columns[1].options.length > 0){ + this.processMaterialsDeliveryListTable.columns[1].options = []; + } + this.$refs.processMaterialsDeliveryList.getValues((a,b,c)=>{ + // console.log(a,b,c) + b.forEach(item =>{ + if(item.equipment !== '' && item.equipment !== undefined && item.equipment !== null){ + numberList.push(item.materialNumber); + } + }); + }); + getAction(this.url.wasteMaterialsList,par).then((res)=>{ + if(res.success){ + // console.log(res.result); + let newList = res.result; + // console.log("12312312:"+numberList.length); + if(numberList.length > 0){ + newList.forEach( item => { + qc.push({ + title : item.materialsNumber, + value : item.merchandiseNewsId, + disabled : false + }) + }) + numberList.forEach( num => { + qc.forEach( i => { + if(num === i.value){ + // console.log(num,i.value); + i.disabled = true; + } + }); + }) + this.processMaterialsDeliveryListTable.columns[1].options = qc; + }else{ + newList.forEach( item => { + this.processMaterialsDeliveryListTable.columns[1].options.push({ + title : item.materialsNumber, + value : item.merchandiseNewsId, + disabled : false + }) + }) + } + // console.log(this.processUdgetPlanMaterialTable.columns[1].options); + resolve(this.bigIdMerchandiseNewsList = res.result ); + // return + } + }); + + }); + }, //table 值改变触发 // async onSelect(record) { @@ -813,57 +883,56 @@ // }); // // }, - fetchData(value){ //查询物料组 - console.log("this.data==============>",this.data) - let params={} - params.id= sessionStorage.getItem('PUWWC_Id') - getAction(this.url.unitWasteWarehouseList,params).then((res)=>{ - console.log(res) - if(res.success){ - // 查询大品类数据 账外库 - - + fetchData(value) { //查询物料组 + // console.log("this.data==============>",this.data) //部门id + let params = {} + params.id = sessionStorage.getItem('PUWWC_Id')//关联中间表id + getAction(this.url.unitWasteWarehouseList, params).then((res) => { + // console.log(res) + if (res.success) { + // 查询大品类数据 账外库 let par = { delFlag: 0, accountingAttributes: value, sysOrgCode: this.data.sysOrgCode } - getAction(this.url.wasteMaterialsUrl,par).then((res)=>{ - if(res.success){ - if(this.processMaterialsDeliveryListTable.columns[0].options.length > 0){ - this.processMaterialsDeliveryListTable.columns[0].options = []; + getAction(this.url.wasteMaterialsUrl, par).then((res) => { + console.log(res) + if (res.success) { + if (this.processMaterialsDeliveryListTable.columns[0].options.length > 0) { + this.processMaterialsDeliveryListTable.columns[0].options = [] } - res.result.forEach( item => { + res.result.forEach(item => { this.processMaterialsDeliveryListTable.columns[0].options.push({ - title : item.descriptionName, - value : item.descriptionId, + title: item.descriptionName, + value: item.descriptionId }) }) } - }); - - }else{ + }) + this.rolePlay = true; + } else { //查询大品类数据 总库 let par = { delFlag: 0, - accountingAttributes: value, + accountingAttributes: value } - getAction(this.url.descriptionRake,par).then((res)=>{ - if(res.success){ - if(this.processMaterialsDeliveryListTable.columns[0].options.length > 0){ - this.processMaterialsDeliveryListTable.columns[0].options = []; + getAction(this.url.descriptionRake, par).then((res) => { + if (res.success) { + if (this.processMaterialsDeliveryListTable.columns[0].options.length > 0) { + this.processMaterialsDeliveryListTable.columns[0].options = [] } - res.result.forEach( item => { + res.result.forEach(item => { this.processMaterialsDeliveryListTable.columns[0].options.push({ - title : item.descriptionName, - value : item.descriptionId, + title: item.descriptionName, + value: item.descriptionId }) }) } - }); + }) + this.rolePlay = false; } - }); - + }) }, diff --git a/src/views/activiti/form/ProcessSmaterialsScrapForm.vue b/src/views/activiti/form/ProcessSmaterialsScrapForm.vue index e1d12d7..693890b 100644 --- a/src/views/activiti/form/ProcessSmaterialsScrapForm.vue +++ b/src/views/activiti/form/ProcessSmaterialsScrapForm.vue @@ -185,7 +185,7 @@ defaultValue: '' }, { - title: '单价', + title: '单价(元)', key: 'materialPrice', type: FormTypes.inputNumber, disabled: false, @@ -194,7 +194,7 @@ defaultValue: '' }, { - title: '金额', + title: '金额(元)', key: 'materialAmount', type: FormTypes.inputNumber, disabled: true, diff --git a/src/views/activiti/form/ProcessUdgetPlanForm.vue b/src/views/activiti/form/ProcessUdgetPlanForm.vue index 8f831df..fa36c57 100644 --- a/src/views/activiti/form/ProcessUdgetPlanForm.vue +++ b/src/views/activiti/form/ProcessUdgetPlanForm.vue @@ -284,7 +284,7 @@ defaultValue: '' }, { - title: '单价', + title: '单价(元)', key: 'materialPrice', type: FormTypes.inputNumber, width: '200px', @@ -295,7 +295,7 @@ title: '对比单价', key: 'action', type: FormTypes.slot, - //width: '200px', + width: '70px', // placeholder: '请输入${title}', // defaultValue: '', slotName: 'action' @@ -310,7 +310,7 @@ defaultValue: '' }, { - title: '金额', + title: '金额(元)', key: 'materialAmount', type: FormTypes.inputNumber, width: '200px', @@ -325,6 +325,14 @@ placeholder: '请输入${title}', defaultValue: '' }, + { + title: '交货时间', + key: 'deliveryTime', + type: FormTypes.date, + width: '200px', + placeholder: '请输入${title}', + defaultValue: '' + }, { title: '备注', key: 'remarks',