Commit e51fec4a authored by xiangzj's avatar xiangzj

要货

parent c2efb3ce
...@@ -160,6 +160,12 @@ ...@@ -160,6 +160,12 @@
], ],
} }
}, },
props: {
isKeepData: {
type: Boolean,
default: false
}
},
computed: { computed: {
...mapState(['groupOrder', 'userInfo']), ...mapState(['groupOrder', 'userInfo']),
}, },
...@@ -174,7 +180,7 @@ ...@@ -174,7 +180,7 @@
this.initGroupData() this.initGroupData()
}, },
mounted() { mounted() {
console.log('监听到事件来自 update'); console.log(this.groupOrder,'监听到事件来自 update');
let _this = this let _this = this
uni.$on('selectedBusiness', function(data) { uni.$on('selectedBusiness', function(data) {
console.log('监听到事件来自 selectedBusiness ,携带参数 msg 为:', data); console.log('监听到事件来自 selectedBusiness ,携带参数 msg 为:', data);
...@@ -272,6 +278,17 @@ ...@@ -272,6 +278,17 @@
...ITEM[0] ...ITEM[0]
} }
this.HEADINFO = HEAD this.HEADINFO = HEAD
if (this.isKeepData) {
this.selectedGroupClient = {
'OBJNAME': this.groupOrder.INFO.GRPNAME,
'ID': this.groupOrder.INFO.GRPUTID
}
this.selectedBusiness = {
'ID': this.groupOrder.INFO.BUSOPPID, // 团购单位编码
'NAME': this.groupOrder.INFO.BUSINAME // 团购单位名称
}
this.condition.BUSOPPID = this.groupOrder.INFO.BUSOPPID
}
}, },
bindPickerYearChange(e) { bindPickerYearChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
...@@ -281,13 +298,13 @@ ...@@ -281,13 +298,13 @@
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
this.paintDesignIndex = e.detail.value this.paintDesignIndex = e.detail.value
switch (e.detail.value) { switch (e.detail.value) {
case 0: case 1:
this.condition.ZZFLD000098 = this.condition.GRPUTID this.condition.ZZFLD000098 = this.condition.GRPUTID
break; break;
case 1: case 2:
this.condition.ZZFLD000098 = this.selectedGroupClient.OBJNAME this.condition.ZZFLD000098 = this.selectedGroupClient.OBJNAME
break; break;
case 2: case 3:
uni.navigateTo({ uni.navigateTo({
url: `/pages/select-paint-design/select-paint-design` url: `/pages/select-paint-design/select-paint-design`
}); });
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
</view> </view>
</view> </view>
</view> </view>
<component :style="componentHeight" :is="currentTabComponent" @click="changeComponent" @submit="submit"> <component :style="componentHeight" :is="currentTabComponent" :key="currentTabComponent" :is-keep-data='isKeepData' @click="changeComponent" @submit="submit">
</component> </component>
</view> </view>
</view> </view>
...@@ -92,7 +92,8 @@ ...@@ -92,7 +92,8 @@
data() { data() {
return { return {
currentTabComponent: 'groupBaseinfo', currentTabComponent: 'groupBaseinfo',
topHeight: '' topHeight: '',
isKeepData: false
} }
}, },
computed: { computed: {
...@@ -171,7 +172,8 @@ ...@@ -171,7 +172,8 @@
return false return false
}, },
methods: { methods: {
changeComponent(com) { changeComponent(com, status = false) {
this.isKeepData = status
this.currentTabComponent = com; this.currentTabComponent = com;
}, },
submit() { submit() {
......
...@@ -406,7 +406,7 @@ ...@@ -406,7 +406,7 @@
this.$emit('click', 'orderUpload') this.$emit('click', 'orderUpload')
}, },
preStep() { preStep() {
this.$emit('click', 'groupBaseinfo') this.$emit('click', 'groupBaseinfo', true)
}, },
...mapMutations(["$uStore"]), ...mapMutations(["$uStore"]),
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment