From bdc76087866457dba0c839081518adef35b4316f Mon Sep 17 00:00:00 2001 From: BabyBoy <2019108827@qq.com> Date: Fri, 8 Aug 2025 16:03:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=90=86=E6=8E=A8=E5=B9=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/account/types.ts | 60 ++ src/api/agent/types.ts | 77 ++ src/api/system/common.js | 2 +- src/api/system/tenant/index.ts | 4 +- src/api/system/tenant/types.ts | 5 + src/components/OssImageUpload/index.vue | 1 - src/layout/components/Navbar.vue | 4 +- src/views/agent/index.vue | 976 +++++++++++++++++++++--- src/views/oms/order/index.vue | 58 +- src/views/pms/brand/index.vue | 8 +- src/views/pms/product/AddProduct.vue | 166 +++- src/views/promotion/index.vue | 665 ++++++++++++++++ src/views/system/divide/index.vue | 8 +- src/views/system/tenant/index.vue | 12 +- 14 files changed, 1842 insertions(+), 204 deletions(-) create mode 100644 src/views/promotion/index.vue diff --git a/src/api/account/types.ts b/src/api/account/types.ts index 3a1050e..fa916b2 100644 --- a/src/api/account/types.ts +++ b/src/api/account/types.ts @@ -18,3 +18,63 @@ export interface VersionList { updateTime: string; wallet: string; } +export interface TenantForm { + // ID(支持数字、字符串或未定义) + id: number | string | undefined; + // 代理机构名称 + agencyName: string; + // 所属区县 + county: string; + // 详细地址 + address: string; + // 负责人姓名 + contactUserName: string; + // 负责人联系电话 + contactPhone: string; + // 负责人证件类型 + idCardType: string; + // 证件信息 + idCard: string; + // 证件图片 + certificate: string; + // 出生年月 + birthday: string; + // 代理人资质 + qualification: string; + // 收款方名称 + payeeName: string; + // 开户行名称 + bankName: string; + // 银行卡账号 + bankCard: string; + // 绑定银行卡的手机号 + bankPhone: string; + // 用户名 + username: string; + // 用户密码 + password: string; + // 代理人套餐 + packageId: string; + // 紧急联系人 + emergencyContact: string; + // 联系人电话 + emergencyContactPhone: string; + // 签约日期 + signDate: string; + // 甲方签约人 + signer: string; + // 保证金金额 + depositAmount: number; + // 代理年限 + agencyYear: number; + // 利润分成模板 + splitRatio: string; + // 协议附件 + agreement: string; + // 其他附件 + otherAttachment: string; + // 签约状态 + signStatus: string; + // 类型 + type: number; +} diff --git a/src/api/agent/types.ts b/src/api/agent/types.ts index a43312b..76c4844 100644 --- a/src/api/agent/types.ts +++ b/src/api/agent/types.ts @@ -18,6 +18,19 @@ export interface VersionList { updateTime: string; wallet: string; } +export interface TenantQuery { + pageSize: number; + pageNum: number; + current: number; + promoterStatus: number | string; + size: number; + type: number; + county: number | string; + contactUserName: number | string; + contactPhone: number | string; + signTime: number | string; + signStatus: number | string; +} export interface VersionAdd { platformType: string; versionCode: string; @@ -27,3 +40,67 @@ export interface VersionAdd { releaseNotes: string; status: string; } +export interface TenantForm { + accountCount: number; + address: string; + agencyName: string; + agencyYear: string; + agreement: string; + attachment: string | number; + bankCard: string; + bankName: string; + bankPhone: string; + bankType: string | number; + birthday: string; + businessLicense: string | number; + businessTypes: string | number; + certificate: string; + companyName: string | number; + companyType: string | number; + contactPhone: string; + contactUserName: string; + contractAttachment: string | number; + contractYear: string | number; + county: string; + delFlag: string; + depositAmount: string; + domain: string | number; + emergencyContact: string; + emergencyContactPhone: string; + entryTime: string | number; + expiryDate: string | number; + expireTime: string | number; + id: string; + idCard: string; + idCardType: string; + intro: string | number; + inviteUserId: string | number; + inviteUserName: string | number; + joinTime: string; + licenseNumber: string | number; + otherAttachment: string; + packageId: string; + packageName: string | number; + password: string; + payeeName: string; + personName: string | number; + personPhone: string | number; + promoteList: string | number; + promoterName: string | number; + promoterPhone: string | number; + promoterStatus: string | number; + qualification: string; + related: string | number; + remark: string | number; + signDate: string; + signStatus: string; + signer: string; + splitRatio: string; + status: string; + storeId: string; + storeName: string | number; + templateName: string; + tenantId: string; + type: number; + username: string; +} diff --git a/src/api/system/common.js b/src/api/system/common.js index 5b83a51..56b3ded 100644 --- a/src/api/system/common.js +++ b/src/api/system/common.js @@ -3,7 +3,7 @@ import request from '@/utils/request'; // 查询省市区列表 export function areaSelect(query) { return request({ - url: '/area', + url: '/common/area', method: 'get', params: query }); diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts index 3d78b94..d4aa392 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -4,7 +4,7 @@ import { AxiosPromise } from 'axios'; import request from '@/utils/request'; // 查询租户列表 -export function listTenant(query: TenantQuery): AxiosPromise { +export function listTenant(query: any): AxiosPromise { return request({ url: '/system/tenant/list', method: 'post', @@ -12,7 +12,7 @@ export function listTenant(query: TenantQuery): AxiosPromise { }); } // 获取比例套餐分成下拉表 -export function getlistDivide(query): AxiosPromise { +export function getlistDivide(): AxiosPromise { return request({ url: '/system/commission-template/all', method: 'get' diff --git a/src/api/system/tenant/types.ts b/src/api/system/tenant/types.ts index 40fdb90..247b211 100644 --- a/src/api/system/tenant/types.ts +++ b/src/api/system/tenant/types.ts @@ -20,6 +20,7 @@ export interface TenantQuery extends PageQuery { tenantId: string | number; address: string; signStatus: string; + type: number; contactUserName: string; personName: string; companyType: string; @@ -27,12 +28,16 @@ export interface TenantQuery extends PageQuery { storeName: string; current: number; size: number; + county: number | string; + contactPhone: number | string; + signTime: number | string; } export interface TenantForm { id: number | string | undefined; tenantId: number | string | undefined; username: string; + type: number; templateName: string; password: string; storeName: string; diff --git a/src/components/OssImageUpload/index.vue b/src/components/OssImageUpload/index.vue index 0f1a5f8..ac5d3d0 100644 --- a/src/components/OssImageUpload/index.vue +++ b/src/components/OssImageUpload/index.vue @@ -85,7 +85,6 @@ export default { modelValue: { handler(val) { if (val) { - console.log(val); // 首先将值转为数组 const list = Array.isArray(val) ? val : this.modelValue.split(','); // 然后将数组转为对象数组 diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 9d1f086..e27f598 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -6,7 +6,7 @@
diff --git a/src/views/pms/brand/index.vue b/src/views/pms/brand/index.vue index d7c7c66..230d38f 100644 --- a/src/views/pms/brand/index.vue +++ b/src/views/pms/brand/index.vue @@ -15,7 +15,7 @@ - 搜索 + 搜索 重置 @@ -25,7 +25,7 @@ @@ -44,8 +44,8 @@ diff --git a/src/views/pms/product/AddProduct.vue b/src/views/pms/product/AddProduct.vue index 0e234e0..abd44da 100644 --- a/src/views/pms/product/AddProduct.vue +++ b/src/views/pms/product/AddProduct.vue @@ -90,22 +90,67 @@
- 删除规格类型 + {{ s.name }}
-
- 删除 +
+
+ + {{ it2.name }} + X + +
+
+ + + 添加 + +
+
+
+
+ + {{ it2.name }} + X + +
+
+ + + 添加 + +
+
+
+
+ + {{ it2.name }} + X + +
+
+ + + 添加 + +
- +添加规格类型 + @@ -166,7 +211,6 @@ import { addPmsProduct, getPmsProduct, updatePmsProduct } from '@/api/pms/product'; import ProductCategorySelect from '@/views/components/ProductCategorySelect'; import BrandSelect from '@/views/components/BrandSelect'; -import { useMallStore } from '@/store/modules/mall'; export default { name: 'AddProduct', @@ -174,6 +218,9 @@ export default { components: { BrandSelect, ProductCategorySelect }, data() { return { + color: '', + memory: '', + version: '', rules: { name: [{ required: true, message: '请输入商品名称', trigger: 'blur' }] }, @@ -186,7 +233,15 @@ export default { productAttr: [ { name: '颜色', - options: [{ name: '红' }, { name: null }] + options: [{ name: '红' }] + }, + { + name: '大小', + memory: [{ name: '4G' }] + }, + { + name: '版本', + version: [{ name: '12' }] } ], maxOptionNum: 44 @@ -205,23 +260,55 @@ export default { this.skuAttr = [...this.productAttr]; if (this.form.skuList) { this.form.skuList.forEach((sku) => { + console.log(sku); skuMap.set(sku.spData, sku); }); } + console.log(skuMap); this.productAttr.forEach((attr, index) => { const attrSku = []; - attr.options.forEach((option) => { - if (!option.name) { - return; - } - if (index === 0) { - attrSku.push({ [attr.name]: option.name }); - } else { - skus.forEach((it3) => { - attrSku.push({ ...it3, [attr.name]: option.name }); - }); - } - }); + if (attr.name === '颜色') { + attr.options.forEach((option) => { + if (!option.name) { + return; + } + if (index === 0) { + attrSku.push({ [attr.name]: option.name }); + } else { + skus.forEach((it3) => { + attrSku.push({ ...it3, [attr.name]: option.name }); + }); + } + }); + } + if (attr.name === '大小') { + attr.memory.forEach((option) => { + if (!option.name) { + return; + } + if (index === 0) { + attrSku.push({ [attr.name]: option.name }); + } else { + skus.forEach((it3) => { + attrSku.push({ ...it3, [attr.name]: option.name }); + }); + } + }); + } + if (attr.name === '版本') { + attr.version.forEach((option) => { + if (!option.name) { + return; + } + if (index === 0) { + attrSku.push({ [attr.name]: option.name }); + } else { + skus.forEach((it3) => { + attrSku.push({ ...it3, [attr.name]: option.name }); + }); + } + }); + } skus = attrSku; }); skus.forEach((it) => { @@ -334,6 +421,36 @@ export default { }, deleteOption(s, idx) { s.options.splice(idx, 1); + }, + deleteOption1(s, idx) { + s.memory.splice(idx, 1); + }, + deleteOption2(s, idx) { + s.version.splice(idx, 1); + }, + addOption(s, idx) { + this.$nextTick(() => { + if (this.color != '') { + s.options.push({ name: this.color }); + this.color = ''; + } + }); + }, + addOption1(s, idx) { + this.$nextTick(() => { + if (this.memory !== '') { + s.memory.push({ name: this.memory }); + this.memory = ''; + } + }); + }, + addOption2(s, idx) { + this.$nextTick(() => { + if (this.version !== '') { + s.version.push({ name: this.version }); + this.version = ''; + } + }); } } }; @@ -362,7 +479,6 @@ export default { flex-wrap wrap .value padding 0 32px 8px 0 - width 200px!important display flex align-items center .img-upload-mini .el-upload--picture-card diff --git a/src/views/promotion/index.vue b/src/views/promotion/index.vue new file mode 100644 index 0000000..f24c107 --- /dev/null +++ b/src/views/promotion/index.vue @@ -0,0 +1,665 @@ + + + + diff --git a/src/views/system/divide/index.vue b/src/views/system/divide/index.vue index 5965543..4bcaf0d 100644 --- a/src/views/system/divide/index.vue +++ b/src/views/system/divide/index.vue @@ -27,7 +27,7 @@ @@ -46,15 +46,15 @@ diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index c3f3a9d..3b34c9d 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -34,7 +34,7 @@ - 搜索 + 搜索 重置 @@ -101,7 +101,7 @@