diff --git a/README.md b/README.md index e84d90a..9dbf53d 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ pnpm run dev pnpm run build # 测试环境 -pnpm run build:test +pnpm run build:local # 正式环境 pnpm run build:pro diff --git a/src/views/shop/list/components/addShop.vue b/src/views/shop/list/components/addShop.vue index 710566d..f39947b 100644 --- a/src/views/shop/list/components/addShop.vue +++ b/src/views/shop/list/components/addShop.vue @@ -6,23 +6,23 @@ - + 单店 连锁店 加盟店
请谨慎修改!!!
- - - - + + + + - + + :remote-method="getTableData" :loading="state.shopListLoading" :disabled="state.form.id || state.type == 'addBranch'"> @@ -44,9 +44,9 @@
请谨慎修改!!!
- - 不可直接管理 - 直接管理 + + 不可直接管理 + 直接管理
请谨慎修改!!!
@@ -185,11 +185,11 @@ const state = reactive({ endTime: "", formLoading: false, form: { - id: "", + id: null, shopName: "", mainId: "", shopType: "only", - tube_type: "0", + tubeType: 0, registerType: "before", profiles: "release", activateCode: "", @@ -208,8 +208,9 @@ const state = reactive({ cities: "", districts: "", chainName: "", - isHeadShop: '0', + isHeadShop: 0, }, + type: '', resetForm: "", rules: { activateCode: [ @@ -370,13 +371,22 @@ function handleSuccess(response, file, fileList) { state.files = response.data; } -function show(obj) { +function show(obj,type) { getTableData(); state.dialogVisible = true; if (obj && obj.id) { console.log(obj); state.form = { ...obj }; } + if (obj && obj.mainId) { + state.form = { ...obj }; + } + if( type ){ + state.type = type + } + console.log(state.form); + console.log(state.type); + for (let key in state.rules) { if (key === "accountName") { if (obj.id) { @@ -390,9 +400,13 @@ function show(obj) { } function close() { state.dialogVisible = false; + state.form = { ...state.resetForm }; + state.type = ""; + } function reset() { state.form = { ...state.resetForm }; + state.type = ""; } let ElMap = undefined; diff --git a/src/views/shop/list/index.vue b/src/views/shop/list/index.vue index 8df77aa..03c9ba7 100644 --- a/src/views/shop/list/index.vue +++ b/src/views/shop/list/index.vue @@ -64,11 +64,13 @@ - + @@ -109,6 +111,7 @@