From 5fb103cced47242d62062e19e0066672e0861929 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Mon, 27 Feb 2023 16:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=93=8D=E4=BD=9C=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/jeecg/CEditableTable.vue | 25 +++ src/components/jeecg/PEditableTable.vue | 10 +- .../form/ProcessMaterialsAllotForm.vue | 60 +++---- .../form/ProcessMaterialsDeliveryForm.vue | 43 ++++- .../activiti/form/ProcessUdgetPlanForm.vue | 153 +++++------------- .../dictionaries/ProcessDictionariesList.vue | 8 +- .../dictionaries/ProcessSupplierList.vue | 4 +- .../modules/ProcessSupplierModal.vue | 12 +- src/views/supplier/ProcessSupplierList.vue | 8 +- .../supplier/modules/ProcessSupplierForm.vue | 13 +- 10 files changed, 165 insertions(+), 171 deletions(-) diff --git a/src/components/jeecg/CEditableTable.vue b/src/components/jeecg/CEditableTable.vue index 2e81702..7b7baa8 100644 --- a/src/components/jeecg/CEditableTable.vue +++ b/src/components/jeecg/CEditableTable.vue @@ -684,6 +684,10 @@ type: Number, default: 400 }, + //切换 + qeihuan: { + type: String, + }, // 要禁用的行 disabledRows: { type: Object, @@ -884,6 +888,15 @@ }, // 侦听器 watch: { + qeihuan:{ + immediate: true, + handler: function (newValue) { + // console.log(newValue,"监听到了"); + this.$nextTick( () =>{ + this.getClone(); + }); + } + }, rows: { immediate: true, handler(val, old) { @@ -970,6 +983,17 @@ shuChange(val,b,c){ // console.log("sdtgfsd",val,b,c) }, + //清除数据 + getClone(){ + let ids= []; + this.getValues((a,b,c)=>{ + b.forEach(it => { + ids.push(it.id); + }); + this.removeRows(ids); + }); + + }, a(){ // console.log("执行l"); @@ -2756,6 +2780,7 @@ disabled: isb }) }) + this.columns[index].options = []; this.columns[index].options = a resolve( ); } diff --git a/src/components/jeecg/PEditableTable.vue b/src/components/jeecg/PEditableTable.vue index 246a017..aea6ecb 100644 --- a/src/components/jeecg/PEditableTable.vue +++ b/src/components/jeecg/PEditableTable.vue @@ -528,6 +528,7 @@ showSearch @search="searchOption($event,col,index)" optionFilterProp="children" + :autoClearSearchValue = false v-bind="buildProps(row,col)" style="width: 100%;" :value="searchSelectValues[id]" @@ -715,8 +716,7 @@ }, //查询类型 dragSortType: { - type: String, - default: false + type: String }, //归口部门 putUnder: { @@ -1404,8 +1404,9 @@ }, /** 删除被选中的行 */ removeSelectedRows() { - this.removeRows(this.selectedRowIds) - this.selectedRowIds = [] + this.removeRows(this.selectedRowIds); + this.selectedRowIds = []; + this.$emit("bumen",true); }, /** 删除一行或多行 */ removeRows(id) { @@ -2719,6 +2720,7 @@ // console.log("option.componentOptions.children[0]",option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0) return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 }, + searchOption (input,pro,index){ // console.log("searchOption=========",input,pro,index); return new Promise(async (resolve, reject) => { diff --git a/src/views/activiti/form/ProcessMaterialsAllotForm.vue b/src/views/activiti/form/ProcessMaterialsAllotForm.vue index 0ca3da1..230b911 100644 --- a/src/views/activiti/form/ProcessMaterialsAllotForm.vue +++ b/src/views/activiti/form/ProcessMaterialsAllotForm.vue @@ -76,6 +76,8 @@ :rowNumber="true" :rowSelection="true" :appropriationPlan ="this.libraryInvisible" + :drag-sort-type="this.materialTypeRecord" + :qeihuan = this.qeihuan :actionButton="!task" @valueChange="onSelect" @descriptionFetch="fetchMerchandiseNews" @@ -358,7 +360,8 @@ }, bigIdMerchandiseNewsList: [], materialGroupId: undefined, - materialTypeRecord: undefined + materialTypeRecord: undefined, + qeihuan: undefined } }, props: { @@ -455,31 +458,33 @@ // return; // } // if (!!record.row.id && this.materialGroupId !== record.row.materialGroup && record.column.key !== "allotNumber" ) { - // // console.log("record.row.materialGroup") - // await this.fetchMerchandiseNews(record.row.materialGroup, 1) - // let value = [ - // { - // rowKey: record.row.id, - // values: { - // 'equipment': '', - // 'materialGroup': record.row.materialGroup, - // 'materialName': '', - // 'materialUnit': '', - // 'supplierId': '', - // 'materialPrice': '', - // // 'number': '', - // 'allotNumber': '', - // 'materialAmount': '' - // } - // } - // ] - // this.$nextTick(() => { - // this.$refs.processMaterialsAllotList.setValues(value) - // }) - // this.materialGroupId = record.row.materialGroup - // isDB = false - // } - // + if (!record.row.equipment && !!record.row.materialGroup && !!record.row.materialName + || !record.row.materialName && !!record.row.materialGroup && !!record.row.equipment ) { + // console.log("record.row.materialGroup") + // await this.fetchMerchandiseNews(record.row.materialGroup, 1) + let value = [ + { + rowKey: record.row.id, + values: { + 'equipment': '', + 'materialGroup':'', + 'materialName': '', + 'materialUnit': '', + 'supplierId': '', + 'materialPrice': '', + // 'number': '', + 'allotNumber': '', + 'materialAmount': '' + } + } + ] + this.$nextTick(() => { + this.$refs.processMaterialsAllotList.setValues(value) + }) + this.materialGroupId = record.row.materialGroup + isDB = false + } + // } if (!!record.row.equipment && !record.row.allotNumber && isDB && this.materialGroupId !== record.row.materialGroup) { console.log("执行materialNumber") @@ -492,7 +497,7 @@ { rowKey: record.row.id, values: { - 'equipment': record.row.equipment, + 'equipment': '', 'materialGroup': '', 'materialName': '', 'materialUnit': '', @@ -714,6 +719,7 @@ console.log("val===================") console.log(val) this.materialTypeRecord = val; + this.qeihuan = val; if (!!val && !!this.libraryInvisible ) { this.heid = false // this.descriptionFetchData(val,this.libraryInvisible) diff --git a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue index bcbe144..863173d 100644 --- a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue +++ b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue @@ -88,6 +88,7 @@ :verify-type="this.accountingAttributesVal" @valueChange="onSelect" :rowNumber="true" + :qeihuan = this.qeihuan :rowSelection="true" :actionButton="true" @descriptionFetch="addid" @@ -421,6 +422,7 @@ }, materialGroupId: undefined, accountingAttributesVal: '', + qeihuan: '', hiegs: true, hiegkucun: [], officePanDaun: null, @@ -583,6 +585,7 @@ async isMaterialType(val) { if (val !== undefined) { this.accountingAttributesVal = val + this.qeihuan = val; this.hiegs = false this.isabled = false if (this.deliveryType !== 1) { @@ -598,8 +601,31 @@ } }, async onSelect(record) { - // console.log(record) + console.log(record) let isMA = true + if (!record.row.equipment && !!record.row.materialGroup && !!record.row.materialName + || !record.row.materialName && !!record.row.materialGroup && !!record.row.equipment ) { + // console.log("select==清空数据",record.row); + let values = [ + { + rowKey: record.row.id, + values: { + 'equipment': '', + 'materialGroup': '', + 'materialName': '', + 'materialUnit': '', + 'supplierId': '', + 'materialPrice': '', + 'actualSendNumber': '', + 'materialAmount': '', + 'pleaseSendNumber': '' + } + } + ] + this.$refs.processMaterialsDeliveryList.setValues(values); + return; + } + // if (!!record.row.materialGroup && !!record.row.materialGroup ) { // // console.log("执行materialGroup111") // if (!!record.row.id && record.row.materialGroup !== this.materialGroupId && record.column.key !== "allotNumber") { @@ -644,8 +670,9 @@ b = true } } - if (record.column.key == 'equipment' && isMA && record.row.materialGroup !== this.materialGroupId) { - // console.log("执行materialNumber") + // console.log("执行materialNumber",b,record.row.materialGroup , this.materialGroupId) + if (record.column.key == 'equipment' && isMA && record.row.equipment !== this.materialGroupId) { + if (!b) { if (this.accountingAttributesVal === '1') { //账外 @@ -660,11 +687,13 @@ // console.log("bbbbbbbbbbbbbb",b) b.forEach(item => { if (item.equipment === record.row.equipment && !!item.materialGroup && !record.row.materialGroup) { + // console.log("bbbb====bbbbbb",item.equipment, record.row.equipment, item.materialGroup) let values = [ { rowKey: record.row.id, values: { 'materialGroup': '', + 'equipment': '', 'materialNumber': '', 'materialSeries': '', 'materialName': '', @@ -743,7 +772,7 @@ // 根据请发数量计算 if (record.column.key == 'pleaseSendNumber' && isMA || record.column.key == 'actualSendNumber' && isMA) { - // console.log("执行了333333333333",record.row) + console.log("执行了333333333333",record.row) let res = record.row; // let materialName = {} // this.bigIdMerchandiseNewsList.forEach(item => { @@ -929,7 +958,8 @@ }) } // console.log(this.processUdgetPlanMaterialTable.columns[1].options); - resolve(this.bigIdMerchandiseNewsList = res.result) + this.bigIdMerchandiseNewsList = res.result; + resolve() // return } }) @@ -1010,7 +1040,8 @@ }) } // console.log(this.processUdgetPlanMaterialTable.columns[1].options); - resolve(this.bigIdMerchandiseNewsList = res.result) + this.bigIdMerchandiseNewsList = res.result; + resolve() // return } }) diff --git a/src/views/activiti/form/ProcessUdgetPlanForm.vue b/src/views/activiti/form/ProcessUdgetPlanForm.vue index a8af5c4..64dba80 100644 --- a/src/views/activiti/form/ProcessUdgetPlanForm.vue +++ b/src/views/activiti/form/ProcessUdgetPlanForm.vue @@ -120,6 +120,7 @@ :rowSelection="true" :actionButton="true" @shifu="shifu" + @bumen="bumen" @descriptionFetch="fetchMerchandiseNews" >