给相关单据的扩展字段进行优化
This commit is contained in:
		
							parent
							
								
									b39fd7840a
								
							
						
					
					
						commit
						aecd647223
					
				
										
											Binary file not shown.
										
									
								
							| @ -3,7 +3,7 @@ | ||||
|  * 高级查询按钮调用 superQuery方法  高级查询组件ref定义为superQueryModal | ||||
|  * data中url定义 list为查询列表  delete为删除单条记录  deleteBatch为批量删除 | ||||
|  */ | ||||
| import { filterObj,getNowFormatStr } from '@/utils/util'; | ||||
| import { filterObj, getMpListShort, getNowFormatStr } from '@/utils/util' | ||||
| import { deleteAction, getAction, postAction, downFile, downFilePost, getFileAccessHttpUrl } from '@/api/manage' | ||||
| import Vue from 'vue' | ||||
| import VueDraggableResizable from 'vue-draggable-resizable' | ||||
| @ -539,6 +539,31 @@ export const JeecgListMixin = { | ||||
|         this.ipagination.total = this.ipagination.total + size | ||||
|       } | ||||
|     }, | ||||
|     //动态替换扩展字段 | ||||
|     handleChangeOtherField(showQuery) { | ||||
|       let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) | ||||
|       if(mpStr) { | ||||
|         let mpArr = mpStr.split(',') | ||||
|         if(mpArr.length ===3) { | ||||
|           if(showQuery) { | ||||
|             this.queryTitle.mp1 = mpArr[0] | ||||
|             this.queryTitle.mp2 = mpArr[1] | ||||
|             this.queryTitle.mp3 = mpArr[2] | ||||
|           } | ||||
|           for (let i = 0; i < this.defColumns.length; i++) { | ||||
|             if(this.defColumns[i].dataIndex === 'otherField1') { | ||||
|               this.defColumns[i].title = mpArr[0] | ||||
|             } | ||||
|             if(this.defColumns[i].dataIndex === 'otherField2') { | ||||
|               this.defColumns[i].title = mpArr[1] | ||||
|             } | ||||
|             if(this.defColumns[i].dataIndex === 'otherField3') { | ||||
|               this.defColumns[i].title = mpArr[2] | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     paginationChange(page, pageSize) { | ||||
|       this.ipagination.current = page | ||||
|       this.ipagination.pageSize = pageSize | ||||
|  | ||||
| @ -364,7 +364,7 @@ | ||||
|       this.model = Object.assign({}, {}); | ||||
|       this.initColumnsSetting() | ||||
|       this.loadTreeData() | ||||
|       this.handleChangeOtherField() | ||||
|       this.handleChangeOtherField(1) | ||||
|     }, | ||||
|     computed: { | ||||
|       importExcelUrl: function () { | ||||
| @ -397,29 +397,6 @@ | ||||
|         Vue.ls.remove('materialColumns') | ||||
|         this.initColumnsSetting() | ||||
|       }, | ||||
|       //动态替换扩展字段 | ||||
|       handleChangeOtherField() { | ||||
|         let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) | ||||
|         if(mpStr) { | ||||
|           let mpArr = mpStr.split(',') | ||||
|           if(mpArr.length ===3) { | ||||
|             this.queryTitle.mp1 = mpArr[0] | ||||
|             this.queryTitle.mp2 = mpArr[1] | ||||
|             this.queryTitle.mp3 = mpArr[2] | ||||
|             for (let i = 0; i < this.defColumns.length; i++) { | ||||
|               if(this.defColumns[i].dataIndex === 'otherField1') { | ||||
|                 this.defColumns[i].title = mpArr[0] | ||||
|               } | ||||
|               if(this.defColumns[i].dataIndex === 'otherField2') { | ||||
|                 this.defColumns[i].title = mpArr[1] | ||||
|               } | ||||
|               if(this.defColumns[i].dataIndex === 'otherField3') { | ||||
|                 this.defColumns[i].title = mpArr[2] | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       loadTreeData(){ | ||||
|         let that = this; | ||||
|         let params = {}; | ||||
|  | ||||
| @ -193,7 +193,7 @@ | ||||
|         tabKey: "1", | ||||
|         pageName: 'buyInReport', | ||||
|         // 默认索引 | ||||
|         defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialOther','materialUnit', | ||||
|         defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialUnit', | ||||
|           'inSum','inSumPrice','outSum','outSumPrice','inOutSumPrice'], | ||||
|         // 默认列 | ||||
|         defColumns: [ | ||||
| @ -210,7 +210,9 @@ | ||||
|           {title: '颜色', dataIndex: 'materialColor', width: 60, ellipsis:true}, | ||||
|           {title: '品牌', dataIndex: 'materialBrand', width: 80, ellipsis:true}, | ||||
|           {title: '制造商', dataIndex: 'materialMfrs', width: 80, ellipsis:true}, | ||||
|           {title: '扩展信息', dataIndex: 'materialOther', width: 150, ellipsis:true}, | ||||
|           {title: '扩展1', dataIndex: 'otherField1', width: 80, ellipsis:true}, | ||||
|           {title: '扩展2', dataIndex: 'otherField2', width: 80, ellipsis:true}, | ||||
|           {title: '扩展3', dataIndex: 'otherField3', width: 80, ellipsis:true}, | ||||
|           {title: '单位', dataIndex: 'materialUnit', width: 80, ellipsis:true}, | ||||
|           {title: '采购数量', dataIndex: 'inSum', sorter: (a, b) => a.inSum - b.inSum, width: 80}, | ||||
|           {title: '采购金额', dataIndex: 'inSumPrice', sorter: (a, b) => a.inSumPrice - b.inSumPrice, width: 80}, | ||||
| @ -229,6 +231,7 @@ | ||||
|       this.loadAllOrgaData() | ||||
|       this.loadCategoryTreeData() | ||||
|       this.initColumnsSetting() | ||||
|       this.handleChangeOtherField(0) | ||||
|     }, | ||||
|     methods: { | ||||
|       moment, | ||||
| @ -317,12 +320,13 @@ | ||||
|       }, | ||||
|       exportExcel() { | ||||
|         let list = [] | ||||
|         let head = '条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,进货数量,进货金额,退货数量,退货金额,实际采购金额' | ||||
|         let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) | ||||
|         let head = '条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,进货数量,进货金额,退货数量,退货金额,实际采购金额' | ||||
|         for (let i = 0; i < this.dataSource.length; i++) { | ||||
|           let item = [] | ||||
|           let ds = this.dataSource[i] | ||||
|           item.push(ds.barCode, ds.materialName, ds.materialStandard, ds.materialModel, ds.materialColor, ds.materialBrand, | ||||
|             ds.materialMfrs, ds.materialOther, ds.materialUnit, ds.inSum, ds.inSumPrice, ds.outSum, ds.outSumPrice, ds.inOutSumPrice) | ||||
|             ds.materialMfrs, ds.otherField1, ds.otherField2, ds.otherField3, ds.materialUnit, ds.inSum, ds.inSumPrice, ds.outSum, ds.outSumPrice, ds.inOutSumPrice) | ||||
|           list.push(item) | ||||
|         } | ||||
|         let tip = '单据日期:' + this.queryParam.beginTime + '~' + this.queryParam.endTime | ||||
|  | ||||
| @ -182,8 +182,8 @@ | ||||
|         totalCountMoneyStr: '0', | ||||
|         pageName: 'inOutStockReport', | ||||
|         // 默认索引 | ||||
|         defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialOther','unitName', | ||||
|           'unitPrice','prevSum','inSum','outSum','thisSum','thisAllPrice'], | ||||
|         defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','unitName','unitPrice', | ||||
|           'prevSum','inSum','outSum','thisSum','thisAllPrice'], | ||||
|         // 默认列 | ||||
|         defColumns: [ | ||||
|           { | ||||
| @ -199,7 +199,9 @@ | ||||
|           {title: '颜色', dataIndex: 'materialColor', width: 50, ellipsis:true}, | ||||
|           {title: '品牌', dataIndex: 'materialBrand', width: 80, ellipsis:true}, | ||||
|           {title: '制造商', dataIndex: 'materialMfrs', width: 80, ellipsis:true}, | ||||
|           {title: '扩展信息', dataIndex: 'materialOther', width: 80, ellipsis:true}, | ||||
|           {title: '扩展1', dataIndex: 'otherField1', width: 50, ellipsis:true}, | ||||
|           {title: '扩展2', dataIndex: 'otherField2', width: 50, ellipsis:true}, | ||||
|           {title: '扩展3', dataIndex: 'otherField3', width: 50, ellipsis:true}, | ||||
|           {title: '单位', dataIndex: 'unitName', width: 60, ellipsis:true}, | ||||
|           {title: '成本价', dataIndex: 'unitPrice', sorter: (a, b) => a.unitPrice - b.unitPrice, width: 60}, | ||||
|           {title: '上期结存数量', dataIndex: 'prevSum', sorter: (a, b) => a.prevSum - b.prevSum, width: 80}, | ||||
| @ -221,6 +223,7 @@ | ||||
|       this.loadTreeData() | ||||
|       this.getTotalCountMoney() | ||||
|       this.initColumnsSetting() | ||||
|       this.handleChangeOtherField(0) | ||||
|     }, | ||||
|     methods: { | ||||
|       moment, | ||||
| @ -292,12 +295,13 @@ | ||||
|       }, | ||||
|       exportExcel() { | ||||
|         let list = [] | ||||
|         let head = '条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,成本价,上期结存数量,入库数量,出库数量,本期结存数量,结存金额' | ||||
|         let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) | ||||
|         let head = '条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,成本价,上期结存数量,入库数量,出库数量,本期结存数量,结存金额' | ||||
|         for (let i = 0; i < this.dataSource.length; i++) { | ||||
|           let item = [] | ||||
|           let ds = this.dataSource[i] | ||||
|           item.push(ds.barCode, ds.materialName, ds.materialStandard, ds.materialModel, ds.materialColor, ds.materialBrand, | ||||
|             ds.materialMfrs, ds.materialOther, ds.unitName, ds.unitPrice, | ||||
|             ds.materialMfrs, ds.otherField1, ds.otherField2, ds.otherField3, ds.unitName, ds.unitPrice, | ||||
|             ds.prevSum, ds.inSum, ds.outSum, ds.thisSum, ds.thisAllPrice) | ||||
|           list.push(item) | ||||
|         } | ||||
|  | ||||
| @ -195,7 +195,7 @@ | ||||
|         tabKey: "1", | ||||
|         pageName: 'retailOutReport', | ||||
|         // 默认索引 | ||||
|         defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialOther','materialUnit', | ||||
|         defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialUnit', | ||||
|           'outSum','outSumPrice','inSum','inSumPrice','outInSumPrice'], | ||||
|         // 默认列 | ||||
|         defColumns: [ | ||||
| @ -212,7 +212,9 @@ | ||||
|           {title: '颜色', dataIndex: 'materialColor', width: 60, ellipsis:true}, | ||||
|           {title: '品牌', dataIndex: 'materialBrand', width: 80, ellipsis:true}, | ||||
|           {title: '制造商', dataIndex: 'materialMfrs', width: 80, ellipsis:true}, | ||||
|           {title: '扩展信息', dataIndex: 'materialOther', width: 150, ellipsis:true}, | ||||
|           {title: '扩展1', dataIndex: 'otherField1', width: 80, ellipsis:true}, | ||||
|           {title: '扩展2', dataIndex: 'otherField2', width: 80, ellipsis:true}, | ||||
|           {title: '扩展3', dataIndex: 'otherField3', width: 80, ellipsis:true}, | ||||
|           {title: '单位', dataIndex: 'materialUnit', width: 80, ellipsis:true}, | ||||
|           {title: '零售数量', dataIndex: 'outSum', sorter: (a, b) => a.outSum - b.outSum, width: 80}, | ||||
|           {title: '零售金额', dataIndex: 'outSumPrice', sorter: (a, b) => a.outSumPrice - b.outSumPrice, width: 80}, | ||||
| @ -231,6 +233,7 @@ | ||||
|       this.loadAllOrgaData() | ||||
|       this.loadCategoryTreeData() | ||||
|       this.initColumnsSetting() | ||||
|       this.handleChangeOtherField(0) | ||||
|     }, | ||||
|     methods: { | ||||
|       moment, | ||||
| @ -319,12 +322,13 @@ | ||||
|       }, | ||||
|       exportExcel() { | ||||
|         let list = [] | ||||
|         let head = '条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,零售数量,零售金额,退货数量,退货金额,实际零售金额' | ||||
|         let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) | ||||
|         let head = '条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,零售数量,零售金额,退货数量,退货金额,实际零售金额' | ||||
|         for (let i = 0; i < this.dataSource.length; i++) { | ||||
|           let item = [] | ||||
|           let ds = this.dataSource[i] | ||||
|           item.push(ds.barCode, ds.materialName, ds.materialStandard, ds.materialModel, ds.materialColor, ds.materialBrand, | ||||
|             ds.materialMfrs, ds.materialOther, ds.materialUnit, ds.outSum, | ||||
|             ds.materialMfrs, ds.otherField1, ds.otherField2, ds.otherField3, ds.materialUnit, ds.outSum, | ||||
|             ds.outSumPrice, ds.inSum, ds.inSumPrice, ds.outInSumPrice) | ||||
|           list.push(item) | ||||
|         } | ||||
|  | ||||
| @ -193,7 +193,7 @@ | ||||
|         tabKey: "1", | ||||
|         pageName: 'saleOutReport', | ||||
|         // 默认索引 | ||||
|         defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialOther','materialUnit', | ||||
|         defDataIndex:['rowIndex','barCode','materialName','materialStandard','materialModel','materialUnit', | ||||
|           'outSum','outSumPrice','inSum','inSumPrice','outInSumPrice'], | ||||
|         // 默认列 | ||||
|         defColumns: [ | ||||
| @ -210,7 +210,9 @@ | ||||
|           {title: '颜色', dataIndex: 'materialColor', width: 60, ellipsis:true}, | ||||
|           {title: '品牌', dataIndex: 'materialBrand', width: 80, ellipsis:true}, | ||||
|           {title: '制造商', dataIndex: 'materialMfrs', width: 80, ellipsis:true}, | ||||
|           {title: '扩展信息', dataIndex: 'materialOther', width: 150, ellipsis:true}, | ||||
|           {title: '扩展1', dataIndex: 'otherField1', width: 80, ellipsis:true}, | ||||
|           {title: '扩展2', dataIndex: 'otherField2', width: 80, ellipsis:true}, | ||||
|           {title: '扩展3', dataIndex: 'otherField3', width: 80, ellipsis:true}, | ||||
|           {title: '单位', dataIndex: 'materialUnit', width: 80, ellipsis:true}, | ||||
|           {title: '销售数量', dataIndex: 'outSum', sorter: (a, b) => a.outSum - b.outSum, width: 80}, | ||||
|           {title: '销售金额', dataIndex: 'outSumPrice', sorter: (a, b) => a.outSumPrice - b.outSumPrice, width: 80}, | ||||
| @ -229,6 +231,7 @@ | ||||
|       this.loadAllOrgaData() | ||||
|       this.loadCategoryTreeData() | ||||
|       this.initColumnsSetting() | ||||
|       this.handleChangeOtherField(0) | ||||
|     }, | ||||
|     methods: { | ||||
|       moment, | ||||
| @ -319,12 +322,13 @@ | ||||
|       }, | ||||
|       exportExcel() { | ||||
|         let list = [] | ||||
|         let head = '条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,销售数量,销售金额,退货数量,退货金额,实际销售金额' | ||||
|         let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) | ||||
|         let head = '条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,销售数量,销售金额,退货数量,退货金额,实际销售金额' | ||||
|         for (let i = 0; i < this.dataSource.length; i++) { | ||||
|           let item = [] | ||||
|           let ds = this.dataSource[i] | ||||
|           item.push(ds.barCode, ds.materialName, ds.materialStandard, ds.materialModel, ds.materialColor, ds.materialBrand, | ||||
|             ds.materialMfrs, ds.materialOther, ds.materialUnit, ds.outSum, | ||||
|             ds.materialMfrs, ds.otherField1, ds.otherField2, ds.otherField3, ds.materialUnit, ds.outSum, | ||||
|             ds.outSumPrice, ds.inSum, ds.inSumPrice, ds.outInSumPrice) | ||||
|           list.push(item) | ||||
|         } | ||||
|  | ||||
| @ -143,7 +143,7 @@ | ||||
|         tabKey: "1", | ||||
|         pageName: 'stockWarningReport', | ||||
|         // 默认索引 | ||||
|         defDataIndex:['rowIndex','depotName','barCode','mname','mstandard','mmodel','materialOther','materialUnit','currentNumber', | ||||
|         defDataIndex:['rowIndex','depotName','barCode','mname','mstandard','mmodel','materialUnit','currentNumber', | ||||
|           'lowSafeStock','highSafeStock','lowCritical','highCritical'], | ||||
|         // 默认列 | ||||
|         defColumns: [ | ||||
| @ -161,7 +161,9 @@ | ||||
|           {title: '颜色', dataIndex: 'mcolor', width: 50, ellipsis:true}, | ||||
|           {title: '品牌', dataIndex: 'brand', width: 80, ellipsis:true}, | ||||
|           {title: '制造商', dataIndex: 'mmfrs', width: 80, ellipsis:true}, | ||||
|           {title: '扩展信息', dataIndex: 'materialOther', width: 100, ellipsis:true}, | ||||
|           {title: '扩展1', dataIndex: 'motherField1', width: 80, ellipsis:true}, | ||||
|           {title: '扩展2', dataIndex: 'motherField2', width: 80, ellipsis:true}, | ||||
|           {title: '扩展3', dataIndex: 'motherField3', width: 80, ellipsis:true}, | ||||
|           {title: '单位', dataIndex: 'materialUnit', width: 60, ellipsis:true}, | ||||
|           {title: '库存', dataIndex: 'currentNumber', sorter: (a, b) => a.currentNumber - b.currentNumber, width: 80}, | ||||
|           {title: '最低安全库存', dataIndex: 'lowSafeStock', sorter: (a, b) => a.lowSafeStock - b.lowSafeStock, width: 100}, | ||||
| @ -178,6 +180,7 @@ | ||||
|       this.getDepotData() | ||||
|       this.loadCategoryTreeData() | ||||
|       this.initColumnsSetting() | ||||
|       this.handleChangeOtherField(0) | ||||
|     }, | ||||
|     methods: { | ||||
|       getQueryParams() { | ||||
| @ -210,14 +213,40 @@ | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|       //动态替换扩展字段 | ||||
|       handleChangeOtherField(showQuery) { | ||||
|         let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) | ||||
|         if(mpStr) { | ||||
|           let mpArr = mpStr.split(',') | ||||
|           if(mpArr.length ===3) { | ||||
|             if(showQuery) { | ||||
|               this.queryTitle.mp1 = mpArr[0] | ||||
|               this.queryTitle.mp2 = mpArr[1] | ||||
|               this.queryTitle.mp3 = mpArr[2] | ||||
|             } | ||||
|             for (let i = 0; i < this.defColumns.length; i++) { | ||||
|               if(this.defColumns[i].dataIndex === 'motherField1') { | ||||
|                 this.defColumns[i].title = mpArr[0] | ||||
|               } | ||||
|               if(this.defColumns[i].dataIndex === 'motherField2') { | ||||
|                 this.defColumns[i].title = mpArr[1] | ||||
|               } | ||||
|               if(this.defColumns[i].dataIndex === 'motherField3') { | ||||
|                 this.defColumns[i].title = mpArr[2] | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       }, | ||||
|       exportExcel() { | ||||
|         let list = [] | ||||
|         let head = '仓库,条码,名称,规格,型号,颜色,品牌,制造商,扩展信息,单位,库存,最低安全库存,最高安全库存,建议入库量,建议出库量' | ||||
|         let mpStr = getMpListShort(Vue.ls.get('materialPropertyList')) | ||||
|         let head = '仓库,条码,名称,规格,型号,颜色,品牌,制造商,' + mpStr + ',单位,库存,最低安全库存,最高安全库存,建议入库量,建议出库量' | ||||
|         for (let i = 0; i < this.dataSource.length; i++) { | ||||
|           let item = [] | ||||
|           let ds = this.dataSource[i] | ||||
|           item.push(ds.depotName, ds.barCode, ds.mname, ds.mstandard, ds.mmodel, ds.mcolor, ds.brand, ds.mmfrs, | ||||
|             ds.materialOther, ds.materialUnit, ds.currentNumber, ds.lowSafeStock, ds.highSafeStock, ds.lowCritical, ds.highCritical) | ||||
|             ds.motherField1, ds.motherField2, ds.motherField3, ds.materialUnit, ds.currentNumber, ds.lowSafeStock, ds.highSafeStock, ds.lowCritical, ds.highCritical) | ||||
|           list.push(item) | ||||
|         } | ||||
|         let tip = '库存预警查询' | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 jishenghua
						jishenghua