From a85394f2146e97d9c8eddf3da4c7b4396b491a02 Mon Sep 17 00:00:00 2001 From: lwh <2679599887@qq.com> Date: Mon, 12 Jun 2023 21:59:54 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E5=AE=8C=E5=96=84=E5=BA=97=E9=93=BA=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/business/ShopManager/Shops/shop.js | 27 ++++ .../GoodsManager/GoodsCategorys/index.vue | 2 +- .../Shops/components/AddDialog.vue | 82 ++++++++---- .../Shops/components/ChooseCustomerDialog.vue | 117 ++++++++++++++++++ .../Shops/components/ChooseUserDialog.vue | 117 ++++++++++++++++++ .../Shops/components/EditDialog.vue | 105 +++++++++------- .../business/ShopManager/Shops/index.vue | 94 +++++++------- 8 files changed, 434 insertions(+), 112 deletions(-) create mode 100644 src/views/business/ShopManager/Shops/components/ChooseCustomerDialog.vue create mode 100644 src/views/business/ShopManager/Shops/components/ChooseUserDialog.vue diff --git a/.env.development b/.env.development index 488868c..5729747 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 开发环境配置 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' diff --git a/src/api/business/ShopManager/Shops/shop.js b/src/api/business/ShopManager/Shops/shop.js index 4fb64ae..d4ad10c 100644 --- a/src/api/business/ShopManager/Shops/shop.js +++ b/src/api/business/ShopManager/Shops/shop.js @@ -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) { return request({ diff --git a/src/views/business/GoodsManager/GoodsCategorys/index.vue b/src/views/business/GoodsManager/GoodsCategorys/index.vue index 66ec1a2..e9566f6 100644 --- a/src/views/business/GoodsManager/GoodsCategorys/index.vue +++ b/src/views/business/GoodsManager/GoodsCategorys/index.vue @@ -62,7 +62,7 @@ diff --git a/src/views/business/ShopManager/Shops/components/AddDialog.vue b/src/views/business/ShopManager/Shops/components/AddDialog.vue index 0f8dd94..4e2982e 100644 --- a/src/views/business/ShopManager/Shops/components/AddDialog.vue +++ b/src/views/business/ShopManager/Shops/components/AddDialog.vue @@ -13,18 +13,29 @@ - - + + + + - - + + + + - - - + + + + + @@ -59,19 +70,6 @@ - - - - - - - - - - - - @@ -83,6 +81,11 @@ + + + + + @@ -90,12 +93,15 @@ import { reactive, ref, watch } from "vue"; import { ElMessage } from 'element-plus' 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 () => { + await getTreeList() await getaudit_status() } @@ -103,6 +109,16 @@ const openDialog = async () => { // -业务参数 // 审核状态字典选项列表 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({ + userName: [{ required: true, message: "用户不能为空", trigger: "blur" }], + customerNickname: [{ required: true, message: "客户不能为空", trigger: "blur" }], shopBusinessCategoryGuid: [{ required: true, message: "经营类目guid不能为空", trigger: "blur" }], shopLogo: [{ required: true, message: "图标不能为空", trigger: "blur" }], shopBusinessLicense: [{ required: true, message: "营业执照不能为空", trigger: "blur" }], @@ -141,8 +179,6 @@ const rules = reactive({ shopIntro: [{ required: true, message: "简介不能为空", trigger: "blur" }], shopSort: [{ 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"}], }); // -基础方法 diff --git a/src/views/business/ShopManager/Shops/components/ChooseCustomerDialog.vue b/src/views/business/ShopManager/Shops/components/ChooseCustomerDialog.vue new file mode 100644 index 0000000..aa05955 --- /dev/null +++ b/src/views/business/ShopManager/Shops/components/ChooseCustomerDialog.vue @@ -0,0 +1,117 @@ + + + + diff --git a/src/views/business/ShopManager/Shops/components/ChooseUserDialog.vue b/src/views/business/ShopManager/Shops/components/ChooseUserDialog.vue new file mode 100644 index 0000000..f64f56d --- /dev/null +++ b/src/views/business/ShopManager/Shops/components/ChooseUserDialog.vue @@ -0,0 +1,117 @@ + + + + diff --git a/src/views/business/ShopManager/Shops/components/EditDialog.vue b/src/views/business/ShopManager/Shops/components/EditDialog.vue index 1866c1c..1cf4354 100644 --- a/src/views/business/ShopManager/Shops/components/EditDialog.vue +++ b/src/views/business/ShopManager/Shops/components/EditDialog.vue @@ -11,86 +11,65 @@ - - - - - - + + + + - - - + + + + - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - @@ -101,17 +80,24 @@ + + + + +