|
@@ -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) {
|