Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/cashier/cashier-web into multi-store
This commit is contained in:
commit
920f686897
|
|
@ -92,7 +92,7 @@ pnpm run dev
|
|||
pnpm run build
|
||||
|
||||
# 测试环境
|
||||
pnpm run build:test
|
||||
pnpm run build:local
|
||||
|
||||
# 正式环境
|
||||
pnpm run build:pro
|
||||
|
|
|
|||
|
|
@ -6,23 +6,23 @@
|
|||
<el-input v-model="state.form.shopName" placeholder="请输入门店名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺类型">
|
||||
<el-radio-group v-model="state.form.shopType">
|
||||
<el-radio-group v-model="state.form.shopType" :disabled="state.form.id || state.type == 'addBranch'">
|
||||
<el-radio-button value="only">单店</el-radio-button>
|
||||
<el-radio-button value="chain">连锁店</el-radio-button>
|
||||
<el-radio-button value="join">加盟店</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div class="tips">请谨慎修改!!!</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否为主店" prop="isHeadShop">
|
||||
<el-radio-group v-model="state.form.isHeadShop" @change=" state.form.mainId = ''">
|
||||
<el-radio value="1">是</el-radio>
|
||||
<el-radio value="0">否</el-radio>
|
||||
<el-form-item label="是否为主店" prop="isHeadShop" v-if="state.form.shopType != 'only'">
|
||||
<el-radio-group v-model="state.form.isHeadShop" @change=" state.form.mainId = ''" :disabled="state.form.id || state.type == 'addBranch'">
|
||||
<el-radio :value="1">是</el-radio>
|
||||
<el-radio :value="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="主店账号" prop="mainId" v-if="state.form.isHeadShop == '0'">
|
||||
<el-form-item label="主店账号" prop="mainId" v-if="state.form.isHeadShop == '0'&&state.form.shopType != 'only'">
|
||||
<!-- <el-form-item label="主店账号" prop="mainId" v-if="state.form.shopType != 'only'"> -->
|
||||
<el-select v-model="state.form.mainId" placeholder="请选择主店铺" filterable reserve-keyword
|
||||
:remote-method="getTableData" :loading="state.shopListLoading">
|
||||
:remote-method="getTableData" :loading="state.shopListLoading" :disabled="state.form.id || state.type == 'addBranch'">
|
||||
<el-option v-for="item in state.shopList" :label="`${item.shopName}`" :value="item.id"
|
||||
:key="item.id"></el-option>
|
||||
</el-select>
|
||||
|
|
@ -44,9 +44,9 @@
|
|||
<div class="tips">请谨慎修改!!!</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="管理方式" v-if="state.form.shopType != 'only'">
|
||||
<el-radio-group v-model="state.form.tube_type">
|
||||
<el-radio-button value="0">不可直接管理</el-radio-button>
|
||||
<el-radio-button value="1">直接管理</el-radio-button>
|
||||
<el-radio-group v-model="state.form.tubeType">
|
||||
<el-radio-button :value="0">不可直接管理</el-radio-button>
|
||||
<el-radio-button :value="1">直接管理</el-radio-button>
|
||||
</el-radio-group>
|
||||
<div class="tips">请谨慎修改!!!</div>
|
||||
</el-form-item>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -64,11 +64,13 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" label="商户号" />
|
||||
<el-table-column prop="status" label="店铺类型">
|
||||
<el-table-column prop="status" label="店铺类型" align="center">
|
||||
<template v-slot="scope">
|
||||
<div>
|
||||
<span>{{ scope.row.shopName }}</span>
|
||||
<div>(主店:{{ scope.row.headShopName }})</div>
|
||||
<span v-if="scope.row.shopType == 'only'">单店</span>
|
||||
<span v-if="scope.row.shopType == 'chain'">连锁店</span>
|
||||
<span v-if="scope.row.shopType == 'join'">加盟店</span>
|
||||
<div v-if="scope.row.shopType != 'only'&&scope.row.isHeadShop == 0">(主店:{{ scope.row.headShopName }})</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -109,6 +111,7 @@
|
|||
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item v-if="scope.row.isHeadShop == 1" :command="0">添加分店</el-dropdown-item>
|
||||
<el-dropdown-item :command="{ row: scope.row, command: 1 }">
|
||||
三方配置
|
||||
</el-dropdown-item>
|
||||
|
|
@ -182,6 +185,11 @@ const refDetailModal = ref(null);
|
|||
function dropdownClick(e, row) {
|
||||
console.log(e);
|
||||
console.log(row);
|
||||
if (e == 0) {
|
||||
refAddShop.value.show({mainId:row.id,shopType:row.shopType,isHeadShop:0},'addBranch');
|
||||
|
||||
return;
|
||||
}
|
||||
if (e.command == 1) {
|
||||
refDetailModal.value.show(e.row);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue