Commit a4ddf618 by 前端

修复BUG

1 parent fc872363
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
<!-- 选择门店弹窗 --> <!-- 选择门店弹窗 -->
<select-store-dialog v-if="selectStoreVisible" <select-store-dialog v-if="selectStoreVisible"
:select-store-visible="selectStoreVisible" :select-store-visible="selectStoreVisible"
:supervisor-uuid="supervisorTableData[0].uuid"
@handleSelectStoreConfirm="handleSelectStoreConfirm" @handleSelectStoreConfirm="handleSelectStoreConfirm"
@handleSelectStoreClose="handleSelectStoreClose"></select-store-dialog> @handleSelectStoreClose="handleSelectStoreClose"></select-store-dialog>
</d2-container> </d2-container>
...@@ -222,13 +223,19 @@ export default { ...@@ -222,13 +223,19 @@ export default {
// 选择门店 // 选择门店
handleStoreMerchant() { handleStoreMerchant() {
this.selectStoreVisible = true if (this.infoForm.flightSupervisorId) {
this.selectStoreVisible = true
} else {
this.$message.warning('请先选择督导')
}
}, },
handleSelectSupervisorConfirm(selectedData) { handleSelectSupervisorConfirm(selectedData) {
const _valueObj = deepClone(selectedData) const _valueObj = deepClone(selectedData)
console.log("_valueObj", _valueObj) console.log("_valueObj", _valueObj)
this.infoForm.flightSupervisorId = _valueObj.id this.infoForm.flightSupervisorId = _valueObj.id
this.supervisorTableData = []
this.storeTableData = [] // 选择督导后,门店清空
this.supervisorTableData.push(_valueObj) this.supervisorTableData.push(_valueObj)
this.$refs.supervisorFormRef.clearValidate() this.$refs.supervisorFormRef.clearValidate()
this.handleSelectSupervisorClose() this.handleSelectSupervisorClose()
...@@ -241,6 +248,7 @@ export default { ...@@ -241,6 +248,7 @@ export default {
const _valueObj = deepClone(selectedData) const _valueObj = deepClone(selectedData)
console.log("_valueObj", _valueObj) console.log("_valueObj", _valueObj)
this.infoForm.merchantId = _valueObj.merchantId this.infoForm.merchantId = _valueObj.merchantId
this.storeTableData = []
this.storeTableData.push(_valueObj) this.storeTableData.push(_valueObj)
this.$refs.merchantFormRef.clearValidate() this.$refs.merchantFormRef.clearValidate()
this.handleSelectStoreClose() this.handleSelectStoreClose()
...@@ -253,6 +261,8 @@ export default { ...@@ -253,6 +261,8 @@ export default {
handleDeleteSupervisor(subIndex) { handleDeleteSupervisor(subIndex) {
this.infoForm.flightSupervisorId = null this.infoForm.flightSupervisorId = null
this.supervisorTableData.splice(subIndex, 1) this.supervisorTableData.splice(subIndex, 1)
// 删除督导后,门店清空
this.handleDeleteStore(0)
}, },
// 删除门店 // 删除门店
......
...@@ -70,6 +70,10 @@ export default { ...@@ -70,6 +70,10 @@ export default {
selectStoreVisible: { selectStoreVisible: {
type: Boolean, type: Boolean,
default: false default: false
},
supervisorUuid: {
type: String,
default: ""
} }
}, },
data() { data() {
...@@ -121,6 +125,7 @@ export default { ...@@ -121,6 +125,7 @@ export default {
beforeSearchFn() { beforeSearchFn() {
return new Promise(resolve => { return new Promise(resolve => {
this.searchForm.supervisorUuid = this.supervisorUuid
resolve() resolve()
}) })
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!