浏览代码

商品库存条码明细筛选修改

pengyh 1 年之前
父节点
当前提交
5bd2391010

+ 5 - 7
src/views/salesPurchasing/goodsCodeMachineAccount/index.vue

@@ -3,7 +3,7 @@
 		<template slot-scope="{activeKey, data}">
 			<template-page v-if="activeKey == 'list'" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
 			  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing" :operationColumnWidth="80"
-			  :operation="operation()" :exportList="exportList">
+			  :operation="operation()" :exportList="exportList" :defaultSearchData="defaultSearchData">
 			</template-page>
 		</template>
 	</zj-tab-page>
@@ -41,7 +41,8 @@ export default {
 			formData: {},
 			formType: 'add',
 			formVisible: false,
-			id: ''
+			id: '',
+			defaultSearchData: []
 		}
 	},
 	computed: {
@@ -77,8 +78,8 @@ export default {
 		}
 	},
 	created(){
-		if(this.$route.query.id){
-			this.id = this.$route.query.id
+		if(this.pageCode){
+			 this.defaultSearchData = [{ "param": "a.goods_material_id", "compare": "=", "value": this.pageCode, label: "商品编号" }]
 		}
 	},
 	methods: {
@@ -86,9 +87,6 @@ export default {
 		getList(p, cb) {
 			try {
 				var pam = JSON.parse(JSON.stringify(p))
-				if(this.id){
-					pam.params.push({ "param": "a.goods_material_id", "compare": "=", "value": this.id })
-				}
 				cb && cb(pam)
 				return listPageV2(pam)
 			} catch (error) {

+ 2 - 3
src/views/salesPurchasing/goodsInventory/index.vue

@@ -90,10 +90,9 @@ export default {
 							name: 'goodsCodeMachineAccount',
 							params: {
 								pageName: row.id,
+								pageType: '-',
+								pageCode: row.id
 							},
-							query: {
-								id: row.id,
-							}
 						})
 					}
 				},