fixed 完善店铺 列表
This commit is contained in:
parent
72ef192bba
commit
a85394f214
@ -1,7 +1,7 @@
|
|||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
VITE_APP_API_HOST = 'http://localhost:8888'
|
VITE_APP_API_HOST = 'http://192.168.1.102:8888'
|
||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
VITE_APP_BASE_API = '/dev-api'
|
VITE_APP_BASE_API = '/dev-api'
|
||||||
|
@ -18,6 +18,33 @@ export function shopList(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取未绑定的用户列表
|
||||||
|
export function getUserWithOutBindList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/Shop/getUserWithOutBindList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取未绑定的客户列表
|
||||||
|
export function getCustomerWithOutBindList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/Shop/getCustomerWithOutBindList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取经营类目列表(一级类目)
|
||||||
|
export function getFirstGoodsCategoryList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/Shop/getFirstGoodsCategoryList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 店铺新增或修改
|
// 店铺新增或修改
|
||||||
export function addOrUpdateShop(data) {
|
export function addOrUpdateShop(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<el-table-column prop="goodsCategoryName" label="名称" align="center" :show-overflow-tooltip="true" />
|
<el-table-column prop="goodsCategoryName" label="名称" align="center" :show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="goodsCategoryImg" label="图片" align="center">
|
<el-table-column prop="goodsCategoryImg" label="图片" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image preview-teleported :hide-on-click-modal="true" lazy class="table-td-thumb" fit="contain" :src="scope.row.goodsCategoryImg.split(',')[0]" :preview-src-list="scope.row.goodsCategoryImg.split(',')">
|
<el-image preview-teleported :hide-on-click-modal="true" lazy class="table-td-thumb" fit="contain" :src="scope.row.goodsCategoryImg?.split(',')[0]" :preview-src-list="scope.row.goodsCategoryImg?.split(',')">
|
||||||
<div><el-icon :size="15"><document /></el-icon></div>
|
<div><el-icon :size="15"><document /></el-icon></div>
|
||||||
</el-image>
|
</el-image>
|
||||||
</template>
|
</template>
|
||||||
|
@ -13,18 +13,29 @@
|
|||||||
|
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="用户id" prop="shopUserId">
|
<el-form-item :label-width="labelWidth" label="用户" prop="userName">
|
||||||
<el-input v-model="formData.shopUserId" placeholder="请输入用户id" />
|
<el-input v-model='formData.userName' disabled type="text" placeholder='点击选择用户'>
|
||||||
|
<template #append>
|
||||||
|
<div @click="handleChooseUser">选择</div>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="客户guid" prop="shopCustomerGuid">
|
<el-form-item :label-width="labelWidth" label="客户" prop="customerNickname">
|
||||||
<el-input v-model="formData.shopCustomerGuid" placeholder="请输入客户guid" />
|
<el-input v-model='formData.customerNickname' disabled type="text" placeholder='点击选择客户'>
|
||||||
|
<template #append>
|
||||||
|
<div @click="handleChooseCustomer">选择</div>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :lg="12">
|
<el-col :lg="24">
|
||||||
<el-form-item :label-width="labelWidth" label="经营类目guid" prop="shopBusinessCategoryGuid">
|
<el-form-item :label-width="labelWidth" label="经营类目" prop="shopBusinessCategoryGuid">
|
||||||
<el-input v-model="formData.shopBusinessCategoryGuid" placeholder="请输入经营类目guid" />
|
<el-select v-model="formData.shopBusinessCategoryGuid" placeholder="请选择经营类目">
|
||||||
|
<el-option v-for="item in dataList " :key="item.goodsCategoryGuid" :label="item.goodsCategoryName"
|
||||||
|
:value="parseInt(item.goodsCategoryGuid)"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
@ -59,19 +70,6 @@
|
|||||||
<el-input-number v-model.number="formData.shopSalesOrderCount" controls-position="right" :min="0" />
|
<el-input-number v-model.number="formData.shopSalesOrderCount" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :lg="12">
|
|
||||||
<el-form-item :label-width="labelWidth" label="审核状态" prop="shopAuditStatus">
|
|
||||||
<el-select v-model="formData.shopAuditStatus" placeholder="请选择审核状态">
|
|
||||||
<el-option v-for="item in audit_status " :key="item.dictValue" :label="item.dictLabel"
|
|
||||||
:value="parseInt(item.dictValue)"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :lg="12">
|
|
||||||
<el-form-item :label-width="labelWidth" label="审核人" prop="shopAuditUserGuid">
|
|
||||||
<el-input v-model="formData.shopAuditUserGuid" placeholder="请输入审核人" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -83,6 +81,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 选择用户 -->
|
||||||
|
<ChooseUserDialog v-model="ChooseUserDialogVisible" :data="ChooseUserDialogRow"></ChooseUserDialog>
|
||||||
|
<!-- 选择客户 -->
|
||||||
|
<ChooseCustomerDialog v-model="ChooseCustomerDialogVisible" :data="ChooseCustomerDialogRow"></ChooseCustomerDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@ -90,12 +93,15 @@
|
|||||||
import { reactive, ref, watch } from "vue";
|
import { reactive, ref, watch } from "vue";
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import modal from '@/plugins/modal.js'
|
import modal from '@/plugins/modal.js'
|
||||||
import { addOrUpdateShop } from '@/api/business/ShopManager/Shops/shop.js';
|
import { addOrUpdateShop,getFirstGoodsCategoryList } from '@/api/business/ShopManager/Shops/shop.js';
|
||||||
|
import ChooseCustomerDialog from './ChooseCustomerDialog.vue';
|
||||||
|
import ChooseUserDialog from './ChooseUserDialog.vue';
|
||||||
|
|
||||||
|
|
||||||
// 打开弹窗时回调
|
// 打开弹窗时回调
|
||||||
const openDialog = async () => {
|
const openDialog = async () => {
|
||||||
|
|
||||||
|
await getTreeList()
|
||||||
await getaudit_status()
|
await getaudit_status()
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -103,6 +109,16 @@ const openDialog = async () => {
|
|||||||
// -业务参数
|
// -业务参数
|
||||||
// 审核状态字典选项列表
|
// 审核状态字典选项列表
|
||||||
const audit_status = ref([]);
|
const audit_status = ref([]);
|
||||||
|
// 经营类树形列表
|
||||||
|
const dataList = ref([])
|
||||||
|
|
||||||
|
// 选择用户弹窗参数
|
||||||
|
const ChooseUserDialogVisible = ref(false);
|
||||||
|
const ChooseUserDialogRow = ref({});
|
||||||
|
// 选择客户弹窗参数
|
||||||
|
const ChooseCustomerDialogVisible = ref(false);
|
||||||
|
const ChooseCustomerDialogRow = ref({});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -业务方法
|
// -业务方法
|
||||||
@ -113,6 +129,26 @@ async function getaudit_status() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取经营类树形列表
|
||||||
|
async function getTreeList() {
|
||||||
|
getFirstGoodsCategoryList().then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
dataList.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开选择用户弹窗
|
||||||
|
const handleChooseUser = () => {
|
||||||
|
ChooseUserDialogVisible.value = true
|
||||||
|
ChooseUserDialogRow.value = formData
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开选择客户弹窗
|
||||||
|
const handleChooseCustomer = () => {
|
||||||
|
ChooseCustomerDialogVisible.value = true
|
||||||
|
ChooseCustomerDialogRow.value = formData
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// -基础参数
|
// -基础参数
|
||||||
@ -134,6 +170,8 @@ const imgData = ref({
|
|||||||
|
|
||||||
// 验证
|
// 验证
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
|
userName: [{ required: true, message: "用户不能为空", trigger: "blur" }],
|
||||||
|
customerNickname: [{ required: true, message: "客户不能为空", trigger: "blur" }],
|
||||||
shopBusinessCategoryGuid: [{ required: true, message: "经营类目guid不能为空", trigger: "blur" }],
|
shopBusinessCategoryGuid: [{ required: true, message: "经营类目guid不能为空", trigger: "blur" }],
|
||||||
shopLogo: [{ required: true, message: "图标不能为空", trigger: "blur" }],
|
shopLogo: [{ required: true, message: "图标不能为空", trigger: "blur" }],
|
||||||
shopBusinessLicense: [{ required: true, message: "营业执照不能为空", trigger: "blur" }],
|
shopBusinessLicense: [{ required: true, message: "营业执照不能为空", trigger: "blur" }],
|
||||||
@ -141,8 +179,6 @@ const rules = reactive({
|
|||||||
shopIntro: [{ required: true, message: "简介不能为空", trigger: "blur" }],
|
shopIntro: [{ required: true, message: "简介不能为空", trigger: "blur" }],
|
||||||
shopSort: [{ required: true, message: "排序不能为空", trigger: "blur", type: "number" }],
|
shopSort: [{ required: true, message: "排序不能为空", trigger: "blur", type: "number" }],
|
||||||
shopSalesOrderCount: [{ required: true, message: "销售单量不能为空", trigger: "blur", type: "number" }],
|
shopSalesOrderCount: [{ required: true, message: "销售单量不能为空", trigger: "blur", type: "number" }],
|
||||||
shopAuditStatus: [{ required: true, message: "审核状态不能为空", trigger: "change", type: "number" }],
|
|
||||||
shopAuditUserGuid: [{ required: true, message: "审核人不能为空", trigger: "blur"}],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// -基础方法
|
// -基础方法
|
||||||
|
@ -0,0 +1,117 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" title="选择客户" width="900px" @closed="closeDialog" @open="openDialog">
|
||||||
|
|
||||||
|
<el-form inline :model="queryParams">
|
||||||
|
<el-form-item label="客户名称">
|
||||||
|
<el-input v-model='queryParams.customerNickname' placeholder='请输入客户名称'></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="tableRef.reload()" icon="ElIconSearch">
|
||||||
|
搜索
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!-- 表格渲染 prop="对应的字段"-->
|
||||||
|
<el-table v-loading="loading" :data="customersList" ref="tableRef" border highlight-current-row
|
||||||
|
@row-click="handleRowClick">
|
||||||
|
<el-table-column prop="customerNickname" label="客户名称" align="left" :show-overflow-tooltip="true" />
|
||||||
|
</el-table>
|
||||||
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getCustomerListFun" />
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleEditClick()">添加</el-button>
|
||||||
|
<el-button @click="handleResetClick()">重置</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref, watch, nextTick } from 'vue';
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { getCustomerWithOutBindList } from '@/api/business/ShopManager/Shops/shop.js';
|
||||||
|
|
||||||
|
// 业务参数
|
||||||
|
const total = ref(0)
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
|
// 基础参数
|
||||||
|
const tableRef = ref(null);
|
||||||
|
// 查询参数
|
||||||
|
const queryParams = reactive({
|
||||||
|
customerNickname: "",
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
});
|
||||||
|
|
||||||
|
const emits = defineEmits(['update:modelValue']);
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: Boolean,
|
||||||
|
data: Object,
|
||||||
|
});
|
||||||
|
const formData = ref({
|
||||||
|
...props.data
|
||||||
|
});
|
||||||
|
|
||||||
|
let customersList = ref([]);
|
||||||
|
// 打开窗口时运行
|
||||||
|
const openDialog = async () => {
|
||||||
|
await getCustomerListFun()
|
||||||
|
}
|
||||||
|
|
||||||
|
const getCustomerListFun = async () => {
|
||||||
|
loading.value = true
|
||||||
|
await getCustomerWithOutBindList(queryParams).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
customersList.value = res.data.result
|
||||||
|
total.value = res.totalNum
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(props, (v) => {
|
||||||
|
formData.value = v.data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// -业务方法
|
||||||
|
let customerNickname = ref("");
|
||||||
|
let customerGuid = ref("");
|
||||||
|
|
||||||
|
|
||||||
|
// -基础方法
|
||||||
|
|
||||||
|
// 点击行
|
||||||
|
const handleRowClick = (row) => {
|
||||||
|
customerNickname.value = row.customerNickname
|
||||||
|
customerGuid.value = row.customerGuid
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
customerNickname.value = ""
|
||||||
|
emits('update:modelValue', false);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
const handleEditClick = async () => {
|
||||||
|
if (customerNickname.value !== "") {
|
||||||
|
|
||||||
|
formData.value.customerNickname = customerNickname.value
|
||||||
|
formData.value.shopCustomerGuid = customerGuid.value
|
||||||
|
if (formData.value.customerNickname != null) {
|
||||||
|
closeDialog();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage.error("请选择客户")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleResetClick = async formEl => {
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -0,0 +1,117 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="props.modelValue" title="选择用户" width="900px" @closed="closeDialog" @open="openDialog">
|
||||||
|
|
||||||
|
<el-form inline :model="queryParams">
|
||||||
|
<el-form-item label="用户名称">
|
||||||
|
<el-input v-model='queryParams.userName' placeholder='请输入用户名称'></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="tableRef.reload()" icon="ElIconSearch">
|
||||||
|
搜索
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<!-- 表格渲染 prop="对应的字段"-->
|
||||||
|
<el-table v-loading="loading" :data="usersList" ref="tableRef" border highlight-current-row
|
||||||
|
@row-click="handleRowClick">
|
||||||
|
<el-table-column prop="userName" label="用户名称" align="left" :show-overflow-tooltip="true" />
|
||||||
|
</el-table>
|
||||||
|
<pagination :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getUserListFun" />
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleEditClick()">添加</el-button>
|
||||||
|
<el-button @click="handleResetClick()">重置</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { reactive, ref, watch, nextTick } from 'vue';
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { getUserWithOutBindList } from '@/api/business/ShopManager/Shops/shop.js';
|
||||||
|
|
||||||
|
// 业务参数
|
||||||
|
const total = ref(0)
|
||||||
|
const loading = ref(false)
|
||||||
|
|
||||||
|
// 基础参数
|
||||||
|
const tableRef = ref(null);
|
||||||
|
// 查询参数
|
||||||
|
const queryParams = reactive({
|
||||||
|
userName: "",
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
});
|
||||||
|
|
||||||
|
const emits = defineEmits(['update:modelValue']);
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: Boolean,
|
||||||
|
data: Object,
|
||||||
|
});
|
||||||
|
const formData = ref({
|
||||||
|
...props.data
|
||||||
|
});
|
||||||
|
|
||||||
|
let usersList = ref([]);
|
||||||
|
// 打开窗口时运行
|
||||||
|
const openDialog = async () => {
|
||||||
|
await getUserListFun()
|
||||||
|
}
|
||||||
|
|
||||||
|
const getUserListFun = async () => {
|
||||||
|
loading.value = true
|
||||||
|
await getUserWithOutBindList(queryParams).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
usersList.value = res.data.result
|
||||||
|
total.value = res.totalNum
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(props, (v) => {
|
||||||
|
formData.value = v.data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// -业务方法
|
||||||
|
let userName = ref("");
|
||||||
|
let userId = ref("");
|
||||||
|
|
||||||
|
|
||||||
|
// -基础方法
|
||||||
|
|
||||||
|
// 点击行
|
||||||
|
const handleRowClick = (row) => {
|
||||||
|
userName.value = row.userName
|
||||||
|
userId.value = row.userId
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
userName.value = ""
|
||||||
|
emits('update:modelValue', false);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 提交
|
||||||
|
const handleEditClick = async () => {
|
||||||
|
if (userName.value !== "") {
|
||||||
|
|
||||||
|
formData.value.userName = userName.value
|
||||||
|
formData.value.shopUserId = userId.value
|
||||||
|
if (formData.value.userName != null) {
|
||||||
|
closeDialog();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ElMessage.error("请选择用户")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleResetClick = async formEl => {
|
||||||
|
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -11,86 +11,65 @@
|
|||||||
<el-form ref="formRef" :model="formData" :rules="rules">
|
<el-form ref="formRef" :model="formData" :rules="rules">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="用户id" prop="shopUserId">
|
<el-form-item :label-width="labelWidth" label="用户" prop="userName">
|
||||||
<el-input v-model="formData.shopUserId" placeholder="请输入用户id" />
|
<el-input v-model='formData.userName' disabled type="text" placeholder='点击选择用户'>
|
||||||
|
<template #append>
|
||||||
|
<div @click="handleChooseUser">选择</div>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="客户guid" prop="shopCustomerGuid">
|
<el-form-item :label-width="labelWidth" label="客户" prop="customerNickname">
|
||||||
<el-input v-model="formData.shopCustomerGuid" placeholder="请输入客户guid" />
|
<el-input v-model='formData.customerNickname' disabled type="text" placeholder='点击选择客户'>
|
||||||
|
<template #append>
|
||||||
|
<div @click="handleChooseCustomer">选择</div>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :lg="24">
|
||||||
<el-col :lg="12">
|
<el-form-item :label-width="labelWidth" label="经营类目" prop="GoodsCategoryParentGuid">
|
||||||
<el-form-item :label-width="labelWidth" label="经营类目guid" prop="shopBusinessCategoryGuid">
|
<el-select v-model="formData.customerGender" placeholder="请选择经营类目">
|
||||||
<el-input v-model="formData.shopBusinessCategoryGuid" placeholder="请输入经营类目guid" />
|
<el-option v-for="item in dataList " :key="item.goodsCategoryId" :label="item.goodsCategoryName"
|
||||||
|
:value="parseInt(item.goodsCategoryGuid)"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="图标" prop="shopLogo">
|
<el-form-item :label-width="labelWidth" label="图标" prop="shopLogo">
|
||||||
<UploadImage ref="uploadRef" v-model="formData.shopLogo" :data=imgData :limit="1" :fileSize="5"
|
<UploadImage ref="uploadRef" v-model="formData.shopLogo" :data=imgData :limit="1" :fileSize="5"
|
||||||
:drag="true" />
|
:drag="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="营业执照" prop="shopBusinessLicense">
|
<el-form-item :label-width="labelWidth" label="营业执照" prop="shopBusinessLicense">
|
||||||
<UploadImage ref="uploadRef" v-model="formData.shopBusinessLicense" :data=imgData :limit="1" :fileSize="5"
|
<UploadImage ref="uploadRef" v-model="formData.shopBusinessLicense" :data=imgData :limit="1" :fileSize="5"
|
||||||
:drag="true" />
|
:drag="true" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="名称" prop="shopName">
|
<el-form-item :label-width="labelWidth" label="名称" prop="shopName">
|
||||||
<el-input v-model="formData.shopName" placeholder="请输入名称" />
|
<el-input v-model="formData.shopName" placeholder="请输入名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="24">
|
<el-col :lg="24">
|
||||||
<el-form-item :label-width="labelWidth" label="简介" prop="shopIntro">
|
<el-form-item :label-width="labelWidth" label="简介" prop="shopIntro">
|
||||||
<el-input v-model="formData.shopIntro" type="textarea" :rows="5" placeholder="请输入简介" />
|
<el-input v-model="formData.shopIntro" type="textarea" :rows="5" placeholder="请输入简介" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="排序" prop="shopSort">
|
<el-form-item :label-width="labelWidth" label="排序" prop="shopSort">
|
||||||
<el-input-number v-model.number="formData.shopSort" controls-position="right" :min="0" />
|
<el-input-number v-model.number="formData.shopSort" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="12">
|
<el-col :lg="12">
|
||||||
<el-form-item :label-width="labelWidth" label="销售单量" prop="shopSalesOrderCount">
|
<el-form-item :label-width="labelWidth" label="销售单量" prop="shopSalesOrderCount">
|
||||||
<el-input-number v-model.number="formData.shopSalesOrderCount" controls-position="right" :min="0" />
|
<el-input-number v-model.number="formData.shopSalesOrderCount" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :lg="12">
|
|
||||||
<el-form-item :label-width="labelWidth" label="审核状态" prop="shopAuditStatus">
|
|
||||||
<el-select v-model="formData.shopAuditStatus" placeholder="请选择审核状态">
|
|
||||||
<el-option v-for="item in audit_status " :key="item.dictValue" :label="item.dictLabel"
|
|
||||||
:value="parseInt(item.dictValue)"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :lg="12">
|
|
||||||
<el-form-item :label-width="labelWidth" label="审核人" prop="shopAuditUserGuid">
|
|
||||||
<el-input v-model="formData.shopAuditUserGuid" placeholder="请输入审核人" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -101,17 +80,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 选择用户 -->
|
||||||
|
<ChooseUserDialog v-model="ChooseUserDialogVisible" :data="ChooseUserDialogRow"></ChooseUserDialog>
|
||||||
|
<!-- 选择客户 -->
|
||||||
|
<ChooseCustomerDialog v-model="ChooseCustomerDialogVisible" :data="ChooseCustomerDialogRow"></ChooseCustomerDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import modal from '@/plugins/modal.js'
|
import modal from '@/plugins/modal.js'
|
||||||
import { reactive, ref, watch } from "vue";
|
import { reactive, ref, watch } from "vue";
|
||||||
import { addOrUpdateShop } from "@/api/business/ShopManager/Shops/shop.js";
|
import { addOrUpdateShop,getFirstGoodsCategoryList } from '@/api/business/ShopManager/Shops/shop.js';
|
||||||
|
import ChooseCustomerDialog from './ChooseCustomerDialog.vue';
|
||||||
|
import ChooseUserDialog from './ChooseUserDialog.vue';
|
||||||
|
|
||||||
// 打开弹窗时回调
|
// 打开弹窗时回调
|
||||||
const openDialog = async () => {
|
const openDialog = async () => {
|
||||||
|
await getTreeList()
|
||||||
await getaudit_status()
|
await getaudit_status()
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -128,6 +114,18 @@ watch(props, async (v) => {
|
|||||||
// 审核状态字典选项列表
|
// 审核状态字典选项列表
|
||||||
const audit_status = ref([]);
|
const audit_status = ref([]);
|
||||||
|
|
||||||
|
// 经营类树形列表
|
||||||
|
const dataList = ref([])
|
||||||
|
|
||||||
|
// 选择用户弹窗参数
|
||||||
|
const ChooseUserDialogVisible = ref(false);
|
||||||
|
const ChooseUserDialogRow = ref({});
|
||||||
|
// 选择客户弹窗参数
|
||||||
|
const ChooseCustomerDialogVisible = ref(false);
|
||||||
|
const ChooseCustomerDialogRow = ref({});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -业务方法
|
// -业务方法
|
||||||
//字典获取
|
//字典获取
|
||||||
async function getaudit_status() {
|
async function getaudit_status() {
|
||||||
@ -136,6 +134,27 @@ async function getaudit_status() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取经营类树形列表
|
||||||
|
async function getTreeList() {
|
||||||
|
getFirstGoodsCategoryList().then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
dataList.value = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开选择用户弹窗
|
||||||
|
const handleChooseUser = () => {
|
||||||
|
ChooseUserDialogVisible.value = true
|
||||||
|
ChooseUserDialogRow.value = formData
|
||||||
|
}
|
||||||
|
|
||||||
|
// 打开选择客户弹窗
|
||||||
|
const handleChooseCustomer = () => {
|
||||||
|
ChooseCustomerDialogVisible.value = true
|
||||||
|
ChooseCustomerDialogRow.value = formData
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// -基础参数
|
// -基础参数
|
||||||
@ -155,6 +174,8 @@ const imgData = ref({
|
|||||||
|
|
||||||
// 验证
|
// 验证
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
|
userName: [{ required: true, message: "用户不能为空", trigger: "blur" }],
|
||||||
|
customerNickname: [{ required: true, message: "客户不能为空", trigger: "blur" }],
|
||||||
shopBusinessCategoryGuid: [{ required: true, message: "经营类目guid不能为空", trigger: "blur" }],
|
shopBusinessCategoryGuid: [{ required: true, message: "经营类目guid不能为空", trigger: "blur" }],
|
||||||
shopLogo: [{ required: true, message: "图标不能为空", trigger: "blur" }],
|
shopLogo: [{ required: true, message: "图标不能为空", trigger: "blur" }],
|
||||||
shopBusinessLicense: [{ required: true, message: "营业执照不能为空", trigger: "blur" }],
|
shopBusinessLicense: [{ required: true, message: "营业执照不能为空", trigger: "blur" }],
|
||||||
@ -162,8 +183,6 @@ const rules = reactive({
|
|||||||
shopIntro: [{ required: true, message: "简介不能为空", trigger: "blur" }],
|
shopIntro: [{ required: true, message: "简介不能为空", trigger: "blur" }],
|
||||||
shopSort: [{ required: true, message: "排序不能为空", trigger: "blur", type: "number" }],
|
shopSort: [{ required: true, message: "排序不能为空", trigger: "blur", type: "number" }],
|
||||||
shopSalesOrderCount: [{ required: true, message: "销售单量不能为空", trigger: "blur", type: "number" }],
|
shopSalesOrderCount: [{ required: true, message: "销售单量不能为空", trigger: "blur", type: "number" }],
|
||||||
shopAuditStatus: [{ required: true, message: "审核状态不能为空", trigger: "change", type: "number" }],
|
|
||||||
shopAuditUserGuid: [{ required: true, message: "审核人不能为空", trigger: "blur" }],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// -基础方法
|
// -基础方法
|
||||||
|
@ -17,7 +17,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审核状态" prop="shopAuditStatus">
|
<el-form-item label="审核状态" prop="shopAuditStatus">
|
||||||
<el-select v-model="queryParams.shopAuditStatus" placeholder="请选择审核状态" clearable @change="handleQuery">
|
<el-select v-model="queryParams.shopAuditStatus" placeholder="请选择审核状态" clearable @change="handleQuery">
|
||||||
<el-option v-for="item in audit_status " :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option>
|
<el-option v-for="item in audit_status " :key="item.dictValue" :label="item.dictLabel"
|
||||||
|
:value="item.dictValue"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -30,12 +31,14 @@
|
|||||||
<!-- 工具按钮 -->
|
<!-- 工具按钮 -->
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" v-hasPermi="['business:shop:addOrUpdateKey']" plain icon="plus" @click="AddDialogVisible = true">
|
<el-button type="primary" v-hasPermi="['business:shop:addOrUpdateKey']" plain icon="plus"
|
||||||
|
@click="AddDialogVisible = true">
|
||||||
{{ $t('btn.add') }}
|
{{ $t('btn.add') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:shop:delete']" plain icon="delete" @click="handleDelete">
|
<el-button type="danger" :disabled="multiple" v-hasPermi="['business:shop:delete']" plain icon="delete"
|
||||||
|
@click="handleDelete">
|
||||||
{{ $t('btn.delete') }}
|
{{ $t('btn.delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -52,40 +55,43 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 表格渲染 prop="对应的字段"-->
|
<!-- 表格渲染 prop="对应的字段"-->
|
||||||
<el-table v-loading="loading" :data="dataList" ref="tableRef" border highlight-current-row @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="dataList" ref="tableRef" highlight-current-row
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="50" align="center" />
|
||||||
|
|
||||||
<el-table-column prop="shopUserId" label="用户id" align="center" />
|
<el-table-column prop="userName" label="用户" align="center" />
|
||||||
<el-table-column prop="shopLogo" label="图标" align="center">
|
<el-table-column prop="customerNickname" label="客户" align="center" />
|
||||||
|
<el-table-column prop="shopBusinessCategoryName" label="经营类目" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image preview-teleported :hide-on-click-modal="true" lazy class="table-td-thumb" fit="contain" :src="scope.row.shopLogo.split(',')[0]" :preview-src-list="scope.row.shopLogo.split(',')">
|
<el-tag>{{ scope.row.shopBusinessCategoryName }}</el-tag>
|
||||||
<div><el-icon :size="15"><document /></el-icon></div>
|
|
||||||
</el-image>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="shopBusinessLicense" label="营业执照" align="center">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-image preview-teleported :hide-on-click-modal="true" lazy class="table-td-thumb" fit="contain" :src="scope.row.shopBusinessLicense.split(',')[0]" :preview-src-list="scope.row.shopBusinessLicense.split(',')">
|
|
||||||
<div><el-icon :size="15"><document /></el-icon></div>
|
|
||||||
</el-image>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="shopName" label="名称" align="center" :show-overflow-tooltip="true" />
|
<el-table-column prop="shopName" label="名称" align="center" :show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="shopIntro" label="简介" align="center" :show-overflow-tooltip="true" />
|
<el-table-column prop="shopLogo" label="图标" align="center">
|
||||||
<el-table-column prop="shopSort" label="排序" align="center" sortable />
|
<template #default="scope">
|
||||||
|
<el-image preview-teleported :hide-on-click-modal="true" lazy class="table-td-thumb" fit="contain"
|
||||||
|
:src="scope.row.shopLogo.split(',')[0]" :preview-src-list="scope.row.shopLogo.split(',')">
|
||||||
|
<div><el-icon :size="15">
|
||||||
|
<document />
|
||||||
|
</el-icon></div>
|
||||||
|
</el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="shopSalesOrderCount" label="销售单量" align="center" sortable />
|
<el-table-column prop="shopSalesOrderCount" label="销售单量" align="center" sortable />
|
||||||
|
<el-table-column prop="shopSort" label="排序" align="center" sortable />
|
||||||
<el-table-column prop="shopAuditStatus" label="审核状态" align="center">
|
<el-table-column prop="shopAuditStatus" label="审核状态" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="audit_status" :value="scope.row.shopAuditStatus" />
|
<dict-tag :options="audit_status" :value="scope.row.shopAuditStatus" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="创建时间" align="center" />
|
||||||
|
|
||||||
<el-table-column label="操作" width="350" fixed="right">
|
<el-table-column label="操作" width="350" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button type="warning" v-if="scope.row.shopAuditStatus == 1" size="small" icon="check"
|
<el-button type="warning" v-if="scope.row.shopAuditStatus == 1" size="small" icon="check"
|
||||||
@click="handleAudit(scope.row)" v-hasPermi="['business:shop:audit']">审核</el-button>
|
@click="handleAudit(scope.row)" v-hasPermi="['business:shop:audit']">审核</el-button>
|
||||||
<el-button type="primary" v-if="scope.row.shopAuditStatus == 2" size="small" icon="edit" @click="handleUpdate(scope.row)"
|
<el-button type="primary" v-if="scope.row.shopAuditStatus == 2" size="small" icon="edit"
|
||||||
v-hasPermi="['business:shop:addOrUpdateKey']">编辑</el-button>
|
@click="handleUpdate(scope.row)" v-hasPermi="['business:shop:addOrUpdateKey']">编辑</el-button>
|
||||||
<el-button type="danger" size="small" icon="delete" @click="handleDelete(scope.row)"
|
<el-button type="danger" size="small" icon="delete" @click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['business:shop:delete']">删除</el-button>
|
v-hasPermi="['business:shop:delete']">删除</el-button>
|
||||||
<el-button size="small" icon="view" @click="handleDetail(scope.row)">查看</el-button>
|
<el-button size="small" icon="view" @click="handleDetail(scope.row)">查看</el-button>
|
||||||
|
Loading…
Reference in New Issue
Block a user