Commit d1256ca3 by cwq0219

创建员工-门店-带商户

1 parent 13c7f0dc
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<p class="edit-sub-title p-rl-20">员工基本信息</p> <p class="edit-sub-title p-rl-20">员工基本信息</p>
<glsx-combi-form class="p-tr-20" ref="editFormRef" labelWidth="160px" @handleImgDelete="handleImgDelete" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="p-tr-20" ref="editFormRef" labelWidth="160px" @handleImgDelete="handleImgDelete" :isBlock="isBlock" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<template slot="merchantId" slot-scope="item"> <template slot="merchantId" slot-scope="item">
<span v-if="routeInfo.addOrEdit == 2">{{ editForm.merchantName + '(' + editForm.merchantId + ')' }}</span> <span v-if="routeInfo.addOrEdit == 2 || (routeInfo.addOrEdit == 1 && userInfo.accountLevel == 4)">{{ editForm.merchantName + '(' + editForm.merchantId + ')' }}</span>
<select-page v-else :form="editForm" width="360" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page> <select-page v-else :form="editForm" width="360" :targetItem="item.scope" @handleChange="handleChangeMerchant"></select-page>
</template> </template>
<template v-if="routeInfo.addOrEdit == 2" slot="passwordSlot"> <template v-if="routeInfo.addOrEdit == 2" slot="passwordSlot">
...@@ -217,6 +217,10 @@ export default { ...@@ -217,6 +217,10 @@ export default {
this.baseData.allMerchantList = res this.baseData.allMerchantList = res
}) })
}, },
setMerchantMd() {
this.editForm.merchantId = this.userInfo.merchantId
this.editForm.merchantName = this.userInfo.merchantName
},
getInfo() { getInfo() {
this.$apis.employee.getDetailInfoApi({ id: this.routeInfo.id }).then(res => { this.$apis.employee.getDetailInfoApi({ id: this.routeInfo.id }).then(res => {
this.editForm = { this.editForm = {
...@@ -364,10 +368,10 @@ export default { ...@@ -364,10 +368,10 @@ export default {
this.routeInfo = this.$route.params this.routeInfo = this.$route.params
this.title = this.titleObj[this.routeInfo.addOrEdit] this.title = this.titleObj[this.routeInfo.addOrEdit]
this.getAllMerchantList() this.getAllMerchantList()
this.routeInfo.addOrEdit != 1 ? this.getInfo() : '' this.routeInfo.addOrEdit != 1 ? this.getInfo() : this.setMerchantMd()
} }
} }
</script> </script>
<style> <style>
.config-employee { .config-employee {
...@@ -442,4 +446,4 @@ export default { ...@@ -442,4 +446,4 @@ export default {
.config-employee .m-l-10 { .config-employee .m-l-10 {
margin-left: 10px; margin-left: 10px;
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!