From d44bca16aa471f3393e220abdde66434f93dd818 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Mon, 7 Nov 2022 19:57:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9F=BA=E6=9C=AC=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/defaultSettings.js | 8 +- .../form/ProcessMaterialWarehousingForm.vue | 24 ++- .../form/ProcessMaterialsAllotForm.vue | 119 ++++++++----- .../form/ProcessMaterialsDeliveryForm.vue | 86 +++++++--- .../activiti/form/ProcessUdgetPlanForm.vue | 6 +- .../ProcessSuppliesStrongerList.vue | 44 ++++- .../ProcessSuppliesStrongerLists.vue | 157 +++++++++++++----- 7 files changed, 315 insertions(+), 129 deletions(-) diff --git a/src/defaultSettings.js b/src/defaultSettings.js index 9c1b8e8..9672f83 100644 --- a/src/defaultSettings.js +++ b/src/defaultSettings.js @@ -18,10 +18,10 @@ export default { navTheme: 'dark', // theme for nav menu layout: 'sidemenu', // nav menu position: sidemenu or topmenu contentWidth: 'Fixed', // layout of content: Fluid or Fixed, only works when layout is topmenu - fixedHeader: false, // sticky header - fixSiderbar: false, // sticky siderbar - autoHideHeader: false, // auto hide header - colorWeak: false, + fixedHeader: true, // sticky header + fixSiderbar: true, // sticky siderbar + autoHideHeader: true, // auto hide header + colorWeak: true, multipage: true, //默认多页签模式 // vue-ls options storageOptions: { diff --git a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue index 2328d75..0a7942a 100644 --- a/src/views/activiti/form/ProcessMaterialWarehousingForm.vue +++ b/src/views/activiti/form/ProcessMaterialWarehousingForm.vue @@ -76,12 +76,13 @@ @@ -352,6 +353,27 @@ import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep' this.popupCallback(company, userInfo, puwwcid) }, methods: { + //tab 值改变触发事件 + onSelect(record){ + // console.log(record.row); + if(record.row.materialPrice !== '' && record.row.materialQuantity !== ''){ + if(record.row.id !== undefined){ + let values = [ + { + rowKey: record.row.id, + values: { + 'materialAmount': record.row.materialPrice * record.row.materialQuantity, + }, + }, + ] + // console.log(values); + this.$refs.processMaterialWarehousingList.setValues(values); + } + } + + + + }, /*回显数据*/ init() { this.btndisabled = true diff --git a/src/views/activiti/form/ProcessMaterialsAllotForm.vue b/src/views/activiti/form/ProcessMaterialsAllotForm.vue index 71ab32d..aceed1b 100644 --- a/src/views/activiti/form/ProcessMaterialsAllotForm.vue +++ b/src/views/activiti/form/ProcessMaterialsAllotForm.vue @@ -59,7 +59,7 @@ - @@ -203,14 +204,14 @@ placeholder: '请输入${title}', defaultValue: '' }, - { - title: '库存数量', - key: 'number', - type: FormTypes.inputNumber, - width: '200px', - placeholder: '请输入${title}', - defaultValue: '' - }, + // { + // title: '库存数量', + // key: 'number', + // type: FormTypes.inputNumber, + // width: '200px', + // placeholder: '请输入${title}', + // defaultValue: '' + // }, { title: '调拨目标', key: 'allotTarget', @@ -284,6 +285,7 @@ processPlan: { rules: [{ required: true, message: '请选择流程计划!' }] } }, bigIdMerchandiseNewsList:[], + materialGroupId: '', } }, props: { @@ -354,11 +356,37 @@ methods: { async onSelect(record) { // console.log(record) - if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment === ''){ + let isDB = true; + if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined){ // console.log("执行materialGroup") - this.fetchMerchandiseNews(record.row.materialGroup,1); + if(record.row.id !== '' && record.row.id !== undefined && this.materialGroupId != record.row.materialGroup ){ + 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.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.allotNumber === '' ){ + if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.allotNumber === '' && isDB ){ // console.log("执行materialNumber") let materialName = {} this.bigIdMerchandiseNewsList.forEach(item => { @@ -366,9 +394,9 @@ materialName = { name: item.merchandiseName, unit: item.materialsUnit, - supplierName: item.supplierName, + supplierName: item.supplierId, price: item.materialPrice, - number : item.residueNumber === undefined ? 0 : item.residueNumber, + // number : item.residueNumber === undefined ? 0 : item.residueNumber, } } }) @@ -380,9 +408,9 @@ 'materialGroup': record.row.materialGroup, 'materialName': materialName.name, 'materialUnit': materialName.unit, - 'supplier': materialName.supplierName, + 'supplierId': materialName.supplierName, 'materialPrice': materialName.price, - 'number': materialName.number, + // 'number': materialName.number, 'materialAmount': 0, }, }, @@ -392,7 +420,7 @@ } // 根据请发数量计算 - if(record.row.allotNumber !== '' && record.row.allotNumber !== undefined){ + if(record.row.allotNumber !== '' && record.row.allotNumber !== undefined && isDB){ let res = record.row; let materialName = {} this.bigIdMerchandiseNewsList.forEach(item => { @@ -403,31 +431,33 @@ } }) // console.log("materialName.residueNumber",materialName.residueNumber) - if(parseInt( res.allotNumber) > parseInt( materialName.number )){ - // console.log("大于") - this.$message.warn("输入调拨数量不能大于库存数量") - res.allotNumber = materialName.number; - } - - let value = [ - { - rowKey: res.id, - values: { - 'equipment': res.equipment, - // 'materialGroup': res.materialGroup, - // 'materialName': res.name, - // 'materialUnit': res.unit, - // 'supplier': res.supplierName, - // 'materialPrice': res.price, - // 'number': res.number, - 'allotNumber': res.allotNumber, - 'materialAmount': res.materialPrice * parseInt( res.allotNumber), + // if(parseInt( res.allotNumber) > parseInt( materialName.number )){ + // // console.log("大于") + // this.$message.warn("输入调拨数量不能大于库存数量") + // res.allotNumber = materialName.number; + // } + if(res.id != undefined){ + let value = [ + { + rowKey: res.id, + values: { + 'equipment': res.equipment, + // 'materialGroup': res.materialGroup, + // 'materialName': res.name, + // 'materialUnit': res.unit, + // 'supplier': res.supplierName, + // 'materialPrice': res.price, + // 'number': res.number, + 'allotNumber': res.allotNumber, + 'materialAmount': res.materialPrice * parseInt( res.allotNumber), + }, }, - }, - ] - this.$nextTick(()=>{ - this.$refs.processMaterialsAllotList.setValues(value); - }) + ] + this.$nextTick(()=>{ + this.$refs.processMaterialsAllotList.setValues(value); + }) + }; + // console.log('****>',value) } @@ -496,7 +526,7 @@ }); }, - fetchData(value){ //查询物料组 + descriptionFetchData(value){ //查询物料组 //查询大品类数据 let par = { delFlag: 0, @@ -537,13 +567,10 @@ }, - - - materialType(val) { if (val !== undefined) { this.heid = false - this.fetchData(val); + this.descriptionFetchData(val); } }, /*回显数据*/ diff --git a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue index 847aa1c..d63401c 100644 --- a/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue +++ b/src/views/activiti/form/ProcessMaterialsDeliveryForm.vue @@ -298,6 +298,7 @@ deliveryTime: { rules: [{ required: true, message: '请选择出库时间!' }] }, processPlan: { rules: [{ required: true, message: '请选择流程计划!' }] } }, + materialGroupId: '', } }, props: { @@ -335,13 +336,14 @@ }, computed: { formDisabled() { + console.log("执行了") if (this.formBpm === true) { if (this.formData.disabled === false) { return false } return true } - return this.heid = false + return this.disabled = false }, showFlowSubmitButton() { if (this.formBpm === true) { @@ -383,17 +385,41 @@ }, async onSelect(record) { // console.log(record) - if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment === ''){ - // console.log("执行materialGroup") - if(this.rolePlay ){ - await this.fetchMerchandiseNewsZW(record.row.materialGroup, 1); - }else{ - await this.fetchMerchandiseNews(record.row.materialGroup, 1); - } + let isMA= true; + if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined){ + if(record.row.id !== undefined && record.row.id !== '' && record.row.materialGroup !== this.materialGroupId){ + // console.log("执行materialGroup") + if(this.rolePlay){ + await this.fetchMerchandiseNewsZW(record.row.materialGroup, 1); + }else{ + await this.fetchMerchandiseNews(record.row.materialGroup, 1); + } + + let valu = [ + { + rowKey: record.row.id, + values: { + 'equipment': '', + 'materialGroup': record.row.materialGroup, + 'materialName': '', + 'materialUnit': '', + 'supplierId': '', + 'materialPrice': '', + 'actualSendNumber': '', + 'materialAmount': '', + 'pleaseSendNumber': '', + }, + }, + ] + // console.log(valu) + this.$refs.processMaterialsDeliveryList.setValues(valu); + this.materialGroupId = record.row.materialGroup; + isMA = false; + } } - if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.actualSendNumber === '' ){ + if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.equipment !== '' && record.row.equipment !== undefined && isMA ){ // console.log("执行materialNumber") let materialName = {} this.bigIdMerchandiseNewsList.forEach(item => { @@ -407,26 +433,29 @@ } } }) - let values = [ - { - rowKey: record.row.id, - values: { - 'equipment': record.row.equipment, - 'materialGroup': record.row.materialGroup, - 'materialName': materialName.name, - 'materialUnit': materialName.unit, - 'supplier': materialName.supplierName, - 'materialPrice': materialName.price, - 'actualSendNumber': materialName.residueNumber, - 'materialAmount': materialName.price * materialName.residueNumber, + if(record.row.id !== undefined){ + let values = [ + { + rowKey: record.row.id, + values: { + 'equipment': record.row.equipment, + 'materialGroup': record.row.materialGroup, + 'materialName': materialName.name, + 'materialUnit': materialName.unit, + 'supplierId': materialName.supplierName, + 'materialPrice': materialName.price, + 'actualSendNumber': materialName.residueNumber, + 'materialAmount': materialName.price * materialName.residueNumber, + }, }, - }, - ] - this.$refs.processMaterialsDeliveryList.setValues(values); + ] + this.$refs.processMaterialsDeliveryList.setValues(values); + } + } // 根据请发数量计算 - if(record.row.pleaseSendNumber !== '' && record.row.pleaseSendNumber !== undefined){ + if(record.row.pleaseSendNumber !== '' && record.row.pleaseSendNumber !== undefined && isMA ){ // console.log("执行了",record.row) let res = record.row; let materialName = {} @@ -447,7 +476,7 @@ // console.log("小于") res.actualSendNumber = res.pleaseSendNumber; } - + if(res.id !== undefined ){ let value = [ { rowKey: res.id, @@ -467,6 +496,9 @@ this.$nextTick(()=>{ this.$refs.processMaterialsDeliveryList.setValues(value); }) + } + + // console.log('****>',value) } @@ -888,7 +920,7 @@ let params = {} params.id = sessionStorage.getItem('PUWWC_Id')//关联中间表id getAction(this.url.unitWasteWarehouseList, params).then((res) => { - // console.log(res) + console.log(res) if (res.success) { // 查询大品类数据 账外库 let par = { diff --git a/src/views/activiti/form/ProcessUdgetPlanForm.vue b/src/views/activiti/form/ProcessUdgetPlanForm.vue index 3b2e1f9..8cd1e1a 100644 --- a/src/views/activiti/form/ProcessUdgetPlanForm.vue +++ b/src/views/activiti/form/ProcessUdgetPlanForm.vue @@ -563,7 +563,7 @@ let isEr = true; if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined){ if( record.row.id !== undefined && record.row.id !== '' && this.isBu !== record.row.materialGroup ){ - console.log("1出发了",record.row); + // console.log("1出发了",record.row); this.fetchMerchandiseNews(record.row.materialGroup); this.isBu = record.row.materialGroup; let values = [ @@ -586,7 +586,7 @@ } // console.log("5555出发了",record.row); if(record.row.materialGroup !== '' && record.row.materialGroup !== undefined && record.row.materialNumber !== '' && record.row.materialNumber !== undefined && isEr){ - console.log("2出发了",record.row); + // console.log("2出发了",record.row); let materialName = { } // console.log("this.bigIdMerchandiseNewsList",this.bigIdMerchandiseNewsList) this.bigIdMerchandiseNewsList.forEach( item => { @@ -622,7 +622,7 @@ if(record.row.materialQuantity !== '' && record.row.materialPrice !== '' && record.row.materialQuantity !== undefined && record.row.materialPrice !== undefined){ // record.row.materialAmount = record.row.materialQuantity * record.row.materialPrice; - console.log("3出发了",record.row); + // console.log("3出发了",record.row); if(record.row.id !== undefined){ let values = [ { diff --git a/src/views/suppliesstronger/ProcessSuppliesStrongerList.vue b/src/views/suppliesstronger/ProcessSuppliesStrongerList.vue index 50dd3e8..52d9802 100644 --- a/src/views/suppliesstronger/ProcessSuppliesStrongerList.vue +++ b/src/views/suppliesstronger/ProcessSuppliesStrongerList.vue @@ -35,7 +35,7 @@
- 新增 + 导出 导入 @@ -93,7 +93,7 @@ - 详情 + 明细 @@ -147,22 +147,39 @@ dataIndex: 'descriptionName' }, { - title:'物料', + title:'物料号', align:"center", dataIndex: 'materialsNumber' }, + + { + title:'物料名称', + align:"center", + dataIndex: 'merchandiseName' + }, + { + title:'规格', + align:"center", + dataIndex: 'merchandiseName' + }, { - title:'物料描述', + title:'型号', align:"center", dataIndex: 'merchandiseName' }, + { title:'计量单位', align:"center", dataIndex: 'materialsUnit' }, { - title:'数量', + title:'总库数量', + align:"center", + dataIndex: 'materialQuantity' + }, + { + title:'项目部数量', align:"center", dataIndex: 'materialQuantity' }, @@ -172,7 +189,7 @@ dataIndex: 'accountingAttributes_dictText' }, { - title: '详情', + title: '明细', dataIndex: 'action', align:"center", fixed:"right", @@ -203,7 +220,20 @@ methods: { handleDetaills(record){ console.log(record); - this.$router.push({name:'src-views-suppliesstronger-ProcessSuppliesStrongerLists',params:{item: record.merchandiseNewsId}}) + + var temomen = { + name: 'src-views-suppliesstronger-ProcessSuppliesStrongerLists', + hidden: true, + meta: { + title: 'title', + keepAlive: true, + hiddenHeaderContent: true, + } + } + this.tabs + // this.$router.push({name:'src-views-suppliesstronger-ProcessSuppliesStrongerLists',params:{item: record.merchandiseNewsId}}) + + }, initDictConfig(){ }, diff --git a/src/views/suppliesstronger/ProcessSuppliesStrongerLists.vue b/src/views/suppliesstronger/ProcessSuppliesStrongerLists.vue index 2ed5e67..1653c43 100644 --- a/src/views/suppliesstronger/ProcessSuppliesStrongerLists.vue +++ b/src/views/suppliesstronger/ProcessSuppliesStrongerLists.vue @@ -4,24 +4,24 @@
- + - + - + - - - - - - - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -173,6 +238,7 @@ storageTime: null, librarySign: null, }, + merchandiseNewsId: this.$route.params.item, description: '物资总库管理详情页面', columns: [ { @@ -263,7 +329,15 @@ { title:'是否到货', align:"center", - dataIndex: 'arrivalNotice' + dataIndex: 'arrivalNotice', + customRender(t,r,ind){ + // console.log(t,r,ind); + if(r.arrivalNotice === '1'){ + return "是"; + }else{ + return "否"; + } + } }, { title:'入库时间', @@ -321,6 +395,7 @@ onDateChange: function (value, dateString) { this.queryParam.productDateBegin=dateString[0]; this.queryParam.productDateEnd=dateString[1]; + console.log() }, onDateChangestorageTime: function (value, dateString) { this.queryParam.inboundDateBegin=dateString[0];