From dd554a165d40b81c7d61625e5c24a8769204e876 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Fri, 7 Apr 2023 18:08:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/jeecg/RPlan.vue | 5 +- src/components/jeecg/modal/ProcessStorage.vue | 77 ++-- .../purchase/ProcessIndustrialStorageForm.vue | 317 +++++++++++----- ...cessIndustrialPurchaseMaterialSubTable.vue | 149 ++++---- .../ProcessIndustrialPurchaseList.vue | 344 ++++++++++-------- 5 files changed, 523 insertions(+), 369 deletions(-) diff --git a/src/components/jeecg/RPlan.vue b/src/components/jeecg/RPlan.vue index d2a9f77..8bf389c 100644 --- a/src/components/jeecg/RPlan.vue +++ b/src/components/jeecg/RPlan.vue @@ -219,7 +219,6 @@ export default { res[destFieldsArr[i]] = tempDestArr.join(",") } if (resetText === true) { - let tempText = [] let params={}; params.ids=[]; params.vals=[]; @@ -232,10 +231,10 @@ export default { params.vals.push(rw.warehousingBatch) } params.vals=params.vals.join(",") - // console.log(params,"*-*-*-*-*-*-*-") + console.log(params,"*-*-*-*-*-*-*-") this.showText = params }else { - // console.log("222222222222222222") + console.log("222222222222222222") this.showText =rows[0].id } // update--end--autor:lvdandan-----date:20200630------for:多选时未带回多个值------ diff --git a/src/components/jeecg/modal/ProcessStorage.vue b/src/components/jeecg/modal/ProcessStorage.vue index 93fb485..2aebaa7 100644 --- a/src/components/jeecg/modal/ProcessStorage.vue +++ b/src/components/jeecg/modal/ProcessStorage.vue @@ -153,7 +153,7 @@ - + @@ -171,17 +171,18 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { getAction } from '@/api/manage' import { filterObj } from '@/utils/util' -import ProcessIndustrialPurchaseList from '@views/burst/list/purchaseList/ProcessIndustrialPurchaseList' +import ProcessIndustrialPurchaseMaterialSubTable from '@views/burst/form/subTables/ProcessIndustrialPurchaseMaterialSubTable' import JDictSelectTag from '@/components/dict/JDictSelectTag.vue' import JSuperQuery from '@/components/jeecg/JSuperQuery.vue' import '@/assets/less/TableExpand.less' +import { ajaxGetDictItems, getDictItemsFromCache } from '@api/api' const MODAL_WIDTH = 1600 export default { name: 'ProcessStorage', props: ['multi', 'code', 'groupId', 'param'], components: { - ProcessIndustrialPurchaseList, + ProcessIndustrialPurchaseMaterialSubTable, JSuperQuery, JDictSelectTag }, @@ -208,11 +209,11 @@ export default { scopedSlots: { customRender: 'describes' }, dataIndex: 'describes' }, - { - title: '采购类型', - align: 'center', - dataIndex: 'planType' - }, + // { + // title: '采购类型', + // align: 'center', + // dataIndex: 'planType' + // }, { title: '流程发起公司', align: 'center', @@ -314,7 +315,8 @@ export default { //this.loadColumnsInfo() }, created() { - this.showDepart() + this.showDepart(); + this.initDictConfig(); }, watch: {}, computed: { @@ -350,28 +352,31 @@ export default { } }) }, - // initDictConfig(){ - // initDictOptions('sys_depart,depart_name,id').then((res) => { - // if (res.success) { - // this.$set(this.dictOptions, 'company', res.result) - // } - // }) - // initDictOptions('sys_depart,depart_name,id').then((res) => { - // if (res.success) { - // this.$set(this.dictOptions, 'sysOrgCode', res.result) - // } - // }) - // initDictOptions('').then((res) => { - // if (res.success) { - // this.$set(this.dictOptions, 'materialType', res.result) - // } - // }) - // initDictOptions('').then((res) => { - // if (res.success) { - // this.$set(this.dictOptions, 'processPlan', res.result) - // } - // }) - // }, + initDictConfig(){ + // initDictOptions('sys_depart,depart_name,id').then((res) => { + // if (res.success) { + // this.$set(this.dictOptions, 'company', res.result) + // } + // }) + // initDictOptions('sys_depart,depart_name,id').then((res) => { + // if (res.success) { + // this.$set(this.dictOptions, 'sysOrgCode', res.result) + // } + // }) + //优先从缓存中读取字典配置 + if(getDictItemsFromCache('explosive_type')){ + this.Globaler.dictOptions = getDictItemsFromCache('explosive_type'); + // console.log(this.dictOptions); + return; + } + //根据字典Code, 初始化字典数组 + ajaxGetDictItems('explosive_type', null).then((res) => { + if (res.success) { + // console.log(res.result); + this.Globaler.dictOptions = res.result; + } + }) + }, onClearSelected() { this.selectedRowKeys = [] this.selectionRows = [] @@ -408,8 +413,16 @@ export default { getAction(this.url.list, params).then((res) => { if (res.success) { this.dataSource = res.result; - console.log("执行主席",this.dataSource,res.result); + // console.log("执行主席",this.dataSource,this.Globaler.dictOptions); + // console.log("执行主席",this.dataSource,res.result); this.ipagination.total = res.result.total; + this.dataSource.forEach(item =>{ + this.Globaler.dictOptions.forEach(it =>{ + if(item.materialType === parseInt( it.value ) ){ + item.materialType = it.text; + } + }) + }) } if(res.code===510){ this.$message.warning(res.message) diff --git a/src/views/burst/form/purchase/ProcessIndustrialStorageForm.vue b/src/views/burst/form/purchase/ProcessIndustrialStorageForm.vue index 27f16d0..3304827 100644 --- a/src/views/burst/form/purchase/ProcessIndustrialStorageForm.vue +++ b/src/views/burst/form/purchase/ProcessIndustrialStorageForm.vue @@ -22,11 +22,11 @@ - + - + - + + + + + @@ -63,9 +68,10 @@ :dataSource="processIndustrialStorageMaterialTable.dataSource" :maxHeight="200" :disabled="formDisabled" + @valueChange="onSelect" :rowNumber="true" :rowSelection="true" - :actionButton="true" /> + :actionButton="false"/>
@@ -106,6 +112,7 @@ import JSelectCompany from '../../../../components/jeecgbiz/JSelectCompany' import { getStringArry, httpAction,getAction,postFormAction } from '@api/manage' import pick from 'lodash.pick' import RPlan from '@comp/jeecg/RPlan' +import { accMul } from '../../../../../common/common' export default { @@ -150,18 +157,16 @@ export default { materialType: { rules:[ { required: true, message: '请输入物资类型!'}, ]}, - money: [ - { required: true, message: '请输入金额!' } - ], - storageLocation: [ + + storageLocation: { rules:[ { required: true, message: '请输入存储位置!' } - ], - batch: [ + ]}, + batch: { rules:[ { required: true, message: '请输入批次!' } - ], - departId: [ - { required: true, message: '请输入流程发起部门!' } - ] + ]}, + industrialPurchaseId:{ rules: [ + { required: true, message: '请选择采购关联流程!' } + ]} }, // 新增时子表默认添加几行空数据 addDefaultRowNum: 1, @@ -182,12 +187,40 @@ export default { // defaultValue: '' // }, { - title: '民爆物资名称', - key: 'industrialName', + title: '火工品物料组', + key: 'materialGroup', type: FormTypes.input, - width: '200px', + width: '150px', placeholder: '请输入${title}', - defaultValue: '' + defaultValue: '', + disabled: true + }, + { + title: '火工品物料号', + key: 'coding', + type: FormTypes.input, + width: '150px', + placeholder: '请输入${title}', + defaultValue: '', + disabled: true + }, + { + title: '火工品名称', + key: 'materialName', + type: FormTypes.input, + width: '150px', + placeholder: '请输入${title}', + defaultValue: '', + disabled: true + }, + { + title: '单位', + key: 'materialUnit', + type: FormTypes.input, + width: '60px', + placeholder: '请输入${title}', + defaultValue: '', + disabled: true }, // { // title: '民爆物质', @@ -198,95 +231,111 @@ export default { // defaultValue: '' // }, { - title: '民爆物资类型', - key: 'industrialType', + title: '物资类型', + key: 'materialType', type: FormTypes.input, - width: '200px', + width: '120px', placeholder: '请输入${title}', - defaultValue: '' + defaultValue: '', + disabled: true }, { title: '单价', - key: 'price', + key: 'materialPrice', type: FormTypes.input, - width: '200px', + width: '120px', placeholder: '请输入${title}', - defaultValue: '' + defaultValue: '', + disabled: this.disabled, + validateRules: [{ required: true, message: '${title}不能为空' }], }, { - title: '金额', - key: 'money', + title: '数量', + key: 'materialQuantity', type: FormTypes.input, - width: '200px', + width: '120px', placeholder: '请输入${title}', - defaultValue: '' + defaultValue: '', + disabled: this.disabled, + validateRules: [{ required: true, message: '${title}不能为空' }], }, { - title: '单位', - key: 'unit', + title: '金额', + key: 'materialAmount', type: FormTypes.input, - width: '200px', + width: '120px', placeholder: '请输入${title}', - defaultValue: '' + defaultValue: '', + disabled: true }, { - title: '备注', - key: 'remarks', - type: FormTypes.input, - width: '200px', + title: '生产日期', + key: 'productionTime', + type: FormTypes.date, + width: '150px', placeholder: '请输入${title}', defaultValue: '' }, { - title: '外观', - key: 'exterior', + title: '保质期(年)', + key: 'expirationDate', type: FormTypes.input, - width: '200px', + width: '120px', placeholder: '请输入${title}', defaultValue: '' }, // { - // title: '标识', - // key: 'identification', + // title: '出库质量证明', + // key: 'qualityCertificate', // type: FormTypes.input, // width: '200px', // placeholder: '请输入${title}', // defaultValue: '' // }, { - title: '数量', - key: 'realQuantity', + title: '批次', + key: 'batch', type: FormTypes.input, - width: '200px', + width: '80px', placeholder: '请输入${title}', defaultValue: '' }, { - title: '出库质量证明', - key: 'qualityCertificate', + title: '外观', + key: 'exterior', type: FormTypes.input, width: '200px', placeholder: '请输入${title}', defaultValue: '' }, { - title: '批次', - key: 'batch', + title: '备注', + key: 'remarks', type: FormTypes.input, width: '200px', placeholder: '请输入${title}', defaultValue: '' - } + }, + { + title: '', + key: 'materialId', + type: FormTypes.input, + width: '0px', + placeholder: '请输入${title}', + defaultValue: '' + }, ] }, url: { add: '/burst/processIndustrialStorage/add', + list: '/burst/processIndustrialPurchase/queryProcessIndustrialPurchaseMaterialByMainIds', edit: '/burst/processIndustrialStorage/edit', addIndustrialStorage: '/burst/processIndustrialStorage/addIndustrialStorage', //提交入库申请 processIndustrialStorageMaterial: { list: '/burst/processIndustrialStorage/queryProcessIndustrialStorageMaterialByMainId' } - } + }, + industrialPurchaseId: '', } }, props: { @@ -323,6 +372,28 @@ export default { this.popupCallback(company, userInfo, puwwcid); }, methods: { + + onSelect(record){ + //计算金额 + if (!!record.row.materialQuantity && !!record.row.materialPrice && !!record.row.id ) { + // record.row.materialAmount = record.row.materialQuantity * record.row.materialPrice; + console.log("3出发了"); + //回填数据 + if (record.row.id !== undefined) { + let values = [ + { + rowKey: record.row.id, + values: { + 'materialQuantity': record.row.materialQuantity, + 'materialAmount': accMul(record.row.materialQuantity,record.row.materialPrice), + } + } + ] + this.$refs.processIndustrialStorageMaterial.setValues(values) + } + } + + }, getcallType(type) { this.data.materialType = type.materialType let fieldval = pick(this.data, 'materialType') @@ -337,7 +408,7 @@ export default { ids.push(val[i].id) } } - this.processUdgetPlanIds = ids.join(',') + this.industrialPurchaseId = ids.join(',') }, async getPlanList(val) { if (val.length > 0) { @@ -353,11 +424,11 @@ export default { ids.push(val[i].id) } } - this.processUdgetPlanIds = ids.join(',') + this.industrialPurchaseId = ids.join(',') let params = {} - params.ids = JSON.stringify(ids) - console.log(params,"*****************>>") - await this.requestSubTableDatas(this.url.list, params, this.processMaterialWarehousingListTable) + params.id = JSON.stringify(ids) + // console.log(params,"*****************>>") + await this.requestSubTableDatas(this.url.list, params, this.processIndustrialStorageMaterialTable); // getAction(this.url.list,params).then((res)=>{ // if(res.success){ // console.log('将要回填的数据',res.result) @@ -371,9 +442,73 @@ export default { this.data = param let fieldval = pick(this.data, 'planType','ifDirect','ifInspection') this.$nextTick(() => { - this.form.setFieldsValue(fieldval) + console.log("-=-="); + this.form.setFieldsValue(fieldval); }) }, + /** 查询某个tab的数据 */ + requestSubTableDatas(url, params, tab) { + // tab.loading = true; + // console.log("-=-=-=-",url,params,tab); + if (this.disabled && !this.task) { + // console.log('执行了不重新查', tab.dataSource) + + } else { + getAction(url, params).then(res => { + let { result } = res + let dataSource = [] + if (result) { + if (Array.isArray(result)) { + dataSource = result + } else if (Array.isArray(result.records)) { + dataSource = result.records + } + } + // console.log("tab.dataSource",tab.dataSource) + // dataSource.forEach(item => { + // let par = { id: item.materialGroup } + // let param = { id: item.materialNumber } + // getAction(this.url.queryByIdDescription, par).then(res => { + // // console.log(res); + // if (res.success) { + // this.processIndustrialStorageMaterialTable.columns[0].options = [{ + // title: res.result.materialClassify, + // value: item.materialGroup, + // disabled: true + // }] + // } + // }) + // getAction(this.url.queryByIdMerchandiseNews, param).then(res => { + // // console.log(res); + // if (res.success) { + // this.processIndustrialStorageMaterialTable.columns[1].options = [{ + // title: res.result.materialsNumber, + // value: item.materialNumber, + // disabled: true + // }] + // } + // }) + // + // }) + // dataSource.forEach(item =>{ + // item.materialPrice = null; + // item.materialQuantity = null; + // item.materialAmount = null; + // }) + let par = {}; + dataSource.forEach(it =>{ + it.materialId = it.id + }); + + tab.dataSource = dataSource; + console.log("-==-=-tab.dataSource",tab.dataSource); + typeof success === 'function' ? success(res) : '' + }).finally(() => { + tab.loading = false + }) + + } + }, popupCallback(company, row, puwwcid) { let res = JSON.parse(row) let param = {} @@ -417,24 +552,32 @@ export default { } let formData = this.classifyIntoFormData(allValues) console.log('=--=-=-', formData) - if (formData.processIndustrialStorageMaterialList==0){ + console.log('=-industrialPurchaseId-=-=-', this.industrialPurchaseId) + if (formData.processIndustrialStorageMaterialList.length < 1){ this.$message.error('请填写清单内容') return } - // for (let i = 0; i < formData.processIndustrialStorageMaterialList.length; i++) { - // if (i == 0) { - // this.describes = formData.processIndustrialStorageMaterialList[i].materialName - // } else { - // this.describes = this.describes + '---' + formData.processIndustrialStorageMaterialList[i].materialName - // } - // } + let par = false; + formData.processIndustrialStorageMaterialList.forEach(item =>{ + console.log("-=-=-=",item); + if(!item.materialPrice || !item.materialQuantity){ + par = true; + } + }); + if(par){ + this.$message.warning("请完善单价,数量等数据!"); + return + } + for (let i = 0; i < formData.processIndustrialStorageMaterialList.length; i++) { + if (i == 0) { + this.describes = formData.processIndustrialStorageMaterialList[i].materialName + } else { + this.describes = this.describes + '---' + formData.processIndustrialStorageMaterialList[i].materialName + } + } formData.fileId = getStringArry(formData.fileId) - // if (this.materialPrice != 0 && this.materialPrice != null) { - // formData.materialPrice = this.materialPrice; - // }else{ - // formData.materialPrice = 0; - // } - formData.describes = this.describes + formData.describes = this.describes; + formData.industrialPurchaseId = this.industrialPurchaseId; //关联采购ID if (new Date(formData.createTime).getTime() / 100 > new Date(formData.needTime).getTime() / 100) { this.$message.error('需求时间不能小于当前流程发起时间') return @@ -506,7 +649,7 @@ export default { } let formData = this.classifyIntoFormData(allValues) - /* if (formData.processIndustrialPurchaseMaterialList==0){ + if (formData.processIndustrialPurchaseMaterialList.length < 1){ this.$message.error('请填写清单内容') return } @@ -516,8 +659,8 @@ export default { } else { this.describes = this.describes + '---' + formData.processIndustrialStorageMaterialList[i].materialName } - } - */ + } + // if (this.isPlanType) { @@ -579,19 +722,19 @@ export default { if (!!formData.ifInspection) formData.ifInspection = parseInt(formData.ifInspection) console.log(formData, '格式化的数据') if (this.btndisabled === false) { - // this.btndisabled = true - // httpAction(url, formData, method).then((res) => { - // if (res.success) { - // //todo 将表单的数据传给父组件 - // if (e != true) { - // this.$emit('afterSubmit', formData) - // } - // } else { - // this.$message.error(res.message) - // } - // }).finally(() => { - // this.btndisabled = false - // }) + this.btndisabled = true + httpAction(url, formData, method).then((res) => { + if (res.success) { + //todo 将表单的数据传给父组件 + if (e != true) { + this.$emit('afterSubmit', formData) + } + } else { + this.$message.error(res.message) + } + }).finally(() => { + this.btndisabled = false + }) } } }) diff --git a/src/views/burst/form/subTables/ProcessIndustrialPurchaseMaterialSubTable.vue b/src/views/burst/form/subTables/ProcessIndustrialPurchaseMaterialSubTable.vue index cd5675b..d1567dd 100644 --- a/src/views/burst/form/subTables/ProcessIndustrialPurchaseMaterialSubTable.vue +++ b/src/views/burst/form/subTables/ProcessIndustrialPurchaseMaterialSubTable.vue @@ -48,6 +48,12 @@ record: { type: Object, default: null, + required: false + }, + mainId: { + type: Array, + default: null, + required: false } }, data() { @@ -65,7 +71,7 @@ { title: '物料号', align: 'center', - dataIndex: 'materialNumber', + dataIndex: 'coding', }, { title: '物料名称及规格型号', @@ -87,11 +93,7 @@ align: 'center', dataIndex: 'materialPrice', }, - { - title: '对比单价', - align: 'center', - dataIndex: 'contrastPrice', - }, + { title: '数量', align: 'center', @@ -102,109 +104,32 @@ align: 'center', dataIndex: 'materialAmount', }, - { - title: '执行标准', - align: 'center', - dataIndex: 'materialStandard', - }, - { - title: '交货时间', - align: 'center', - dataIndex: 'deliveryTime', - }, - { - title: '备注', - align: 'center', - dataIndex: 'remarks', - }, - { - title: '关联id', - align: 'center', - dataIndex: 'processIndustrialPurchaseId', - }, { title: '保质期', align: 'center', dataIndex: 'expirationDate', }, - { - title: '仓储地点_id', - align: 'center', - dataIndex: 'unitWasteWarehouseCodeId', - }, - { - title: '是否到货', - align: 'center', - dataIndex: 'arrivalNotice', - }, - { - title: '入库人', - align: 'center', - dataIndex: 'librarySign', - }, - { - title: '商品详情id', - align: 'center', - dataIndex: 'commodityDetailsId', - }, - { - title: '物料描述', - align: 'center', - dataIndex: 'materialDescription', - }, + { title: '生产时间', align: 'center', dataIndex: 'productionTime', }, - { - title: '入库时间', - align: 'center', - dataIndex: 'storageTime', - }, - { - title: '商品id', - align: 'center', - dataIndex: 'commodityId', - }, + { title: '供应商', align: 'center', dataIndex: 'supplierId', }, - { - title: '库房id', - align: 'center', - dataIndex: 'warehouseId', - }, { title: '核算属性', align: 'center', dataIndex: 'materialType', }, - { - title: '删除时间', - align: 'center', - dataIndex: 'delTime', - }, - { - title: '删除标志', - align: 'center', - dataIndex: 'delFlag', - }, - { - title: '批次数', - align: 'center', - dataIndex: 'supplierBatch', - }, - { - title: '是否完结0未完结 1完结', - align: 'center', - dataIndex: 'status', - }, ], url: { listByMainId: '/burst/processIndustrialPurchase/queryProcessIndustrialPurchaseMaterialByMainId', + list: '/burst/processIndustrialPurchase/queryProcessIndustrialPurchaseMaterialByMainIds', }, } }, @@ -216,6 +141,25 @@ this.loadData(this.record) } } + }, + mainId:{ + immediate: true, + handler(val) { + console.log("val>>>>>>>>>>>>>>>>>>>>>>>>>>>",val) + if(!this.mainId){ + // this.clearList() + }else{ + let newarr=[] + val.map(item=>{ + if(item){ + newarr.push(item) + } + }) + let valuse = JSON.stringify(newarr) + this.queryParam['id'] = valuse + this.loadDatas(1); + } + } } }, methods: { @@ -233,6 +177,39 @@ this.loading = false }) }, + loadDatas(arg) { + if(!this.url.list){ + this.$message.error("请设置url.list属性!") + return + } + //加载数据 若传入参数1则加载第一页的内容 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//查询条件 + this.loading = true; + console.log("params>>>>>>",params) + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records||res.result; + this.dataSource.forEach(item =>{ + this.Globaler.dictOptions.forEach(it =>{ + if(item.materialType === parseInt( it.value ) ){ + item.materialType = it.text; + } + }) + }) + if(res.result.total) + { + this.ipagination.total = res.result.total; + } + } + if(res.code===510){ + this.$message.warning(res.message) + } + this.loading = false; + }) + }, }, } diff --git a/src/views/burst/list/purchaseList/ProcessIndustrialPurchaseList.vue b/src/views/burst/list/purchaseList/ProcessIndustrialPurchaseList.vue index e0a7f13..f226bed 100644 --- a/src/views/burst/list/purchaseList/ProcessIndustrialPurchaseList.vue +++ b/src/views/burst/list/purchaseList/ProcessIndustrialPurchaseList.vue @@ -5,78 +5,78 @@
- - - - - - - - - - - - - - 查询 - 重置 - - {{ toggleSearchStatus ? '收起' : '展开' }} - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
- 新增 - 导出 - - 导入 - - - - - - - - 删除 - - - - 批量操作 - - - -
+ + + + + + + + + + + + + + + + + + + + +
- - - + + + + + + + + parseInt(index) + 1 - }, - { - title: '计划采购类型', - align: 'center', - dataIndex: 'planType', - }, - { - title: '是否属于直达物资', - align: 'center', - dataIndex: 'ifDirect', - }, - { - title: '是否需要送检', - align: 'center', - dataIndex: 'ifInspection', - }, - { - title: '归口部门', - align: 'center', - dataIndex: 'putUnder', - }, - { - title: '资金来源', - align: 'center', - dataIndex: 'sourceCapital', - }, - { - title: '流程发起部门', - align: 'center', - dataIndex: 'departId', - }, - { - title: '流程计划', - align: 'center', - dataIndex: 'processPlan', - }, + // { + // title: '#', + // key: 'rowIndex', + // width: 60, + // align: 'center', + // customRender: (t, r, index) => parseInt(index) + 1 + // }, + // { + // title: '计划采购类型', + // align: 'center', + // dataIndex: 'planType', + // }, + // { + // title: '是否属于直达物资', + // align: 'center', + // dataIndex: 'ifDirect', + // }, + // { + // title: '是否需要送检', + // align: 'center', + // dataIndex: 'ifInspection', + // }, + // { + // title: '归口部门', + // align: 'center', + // dataIndex: 'putUnder', + // }, + // { + // title: '资金来源', + // align: 'center', + // dataIndex: 'sourceCapital', + // }, + // { + // title: '流程发起部门', + // align: 'center', + // dataIndex: 'departId', + // }, + // { + // title: '流程计划', + // align: 'center', + // dataIndex: 'processPlan', + // }, { title: '物资类型', align: 'center', dataIndex: 'materialType', }, - { - title: '大于50000的单价', - align: 'center', - dataIndex: 'materialPrice', - }, + // { + // title: '大于50000的单价', + // align: 'center', + // dataIndex: 'materialPrice', + // }, { title: '进货总价', align: 'center', @@ -238,75 +239,75 @@ align: 'center', dataIndex: 'needTime', }, - { - title: '描述信息', - align: 'center', - dataIndex: 'describes', - }, - { - title: '生成序号', - align: 'center', - dataIndex: 'sort', - }, - { - title: '顺序号', - align: 'center', - dataIndex: 'orderNumber', - }, - { - title: '文件id', - align: 'center', - dataIndex: 'fileId', - }, - { - title: '删除标志', - align: 'center', - dataIndex: 'delFlag', - }, + // { + // title: '描述信息', + // align: 'center', + // dataIndex: 'describes', + // }, + // { + // title: '生成序号', + // align: 'center', + // dataIndex: 'sort', + // }, + // { + // title: '顺序号', + // align: 'center', + // dataIndex: 'orderNumber', + // }, + // { + // title: '文件id', + // align: 'center', + // dataIndex: 'fileId', + // }, + // { + // title: '删除标志', + // align: 'center', + // dataIndex: 'delFlag', + // }, { title: '流程发起公司', align: 'center', dataIndex: 'company', }, - { - title: '流程说明', - align: 'center', - dataIndex: 'opinion', - }, - { - title: '流程id', - align: 'center', - dataIndex: 'processId', - }, - { - title: '流程状态描述', - align: 'center', - dataIndex: 'actStatus', - }, - { - title: '流程是否完结0未完结 1完结', - align: 'center', - dataIndex: 'status', - }, + // { + // title: '流程说明', + // align: 'center', + // dataIndex: 'opinion', + // }, + // { + // title: '流程id', + // align: 'center', + // dataIndex: 'processId', + // }, + // { + // title: '流程状态描述', + // align: 'center', + // dataIndex: 'actStatus', + // }, + // { + // title: '流程是否完结0未完结 1完结', + // align: 'center', + // dataIndex: 'status', + // }, { title: '入库批次号', align: 'center', dataIndex: 'warehousingBatch', }, - { - title: '操作', - dataIndex: 'action', - align: 'center', - width:147, - scopedSlots: { customRender: 'action' }, - }, + // { + // title: '操作', + // dataIndex: 'action', + // align: 'center', + // width:147, + // scopedSlots: { customRender: 'action' }, + // }, ], // 字典选项 dictOptions: {}, // 展开的行test expandedRowKeys: [], url: { - list: '/burst/processIndustrialPurchase/list', + list: '/burst/processIndustrialPurchase/queryProcessIndustrialPurchaseMaterialByMainIds', delete: '/burst/processIndustrialPurchase/delete', deleteBatch: '/burst/processIndustrialPurchase/deleteBatch', exportXlsUrl: '/burst/processIndustrialPurchase/exportXls', @@ -318,6 +319,27 @@ created() { this.getSuperFieldList(); }, + watch:{ + mainId:{ + immediate: true, + handler(val) { + console.log("val>>>>>>>>>>>>>>>>>>>>>>>>>>>",val) + if(!this.mainId){ + // this.clearList() + }else{ + let newarr=[] + val.map(item=>{ + if(item){ + newarr.push(item) + } + }) + let valuse = JSON.stringify(newarr) + this.queryParam['id'] = valuse + this.loadData(1); + } + } + } + }, computed: { importExcelUrl() { return window._CONFIG['domianURL'] + this.url.importExcelUrl