From 51b9d188cf06cbd025f37d0f90d85ed2d17013db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=8F?= <1978476055@qq.com> Date: Fri, 25 Oct 2024 11:20:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E8=BD=AC=E7=9B=98,=E6=88=90=E9=95=BF?= =?UTF-8?q?=E5=80=BC,=E7=94=A8=E6=88=B7=E4=B8=8A=E4=B8=8B=E7=BA=A7,?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=B4=A6=E5=8D=95,=E7=94=B3=E8=AF=B7?= =?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 | 3 +- .env.production | 4 +- src/api/lottery.js | 32 + src/api/marketing.js | 12 + src/api/user.js | 6 + src/router/modules/accounts.js | 18 + src/router/modules/marketing.js | 23 + src/router/modules/promoter.js | 10 +- src/utils/newToExcel.js | 2 +- src/utils/validate.js | 27 + .../accounts/applicationRecord/index.vue | 935 ++++++++++ src/views/accounts/extract/index.vue | 781 +++++---- src/views/accounts/userBill/index.vue | 260 +++ src/views/marketing/lottery/addGoods.vue | 571 +++++++ .../lottery/components/goodsList.vue | 174 ++ src/views/marketing/lottery/create.vue | 1166 +++++++++++++ .../marketing/lottery/formRule/lotteryFrom.js | 68 + .../marketing/lottery/formRule/ruleShip.js | 27 + src/views/marketing/lottery/index.vue | 320 ++++ src/views/marketing/lottery/recordingList.vue | 376 ++++ src/views/order/list/orderDetails.vue | 558 ++++-- src/views/product/productExamine/editAttr.vue | 41 +- src/views/product/productExamine/index.vue | 1 + src/views/product/productExamine/info.vue | 4 + .../product/productExamine/proDetails.vue | 4 + src/views/promoter/brokerage/index.vue | 225 +++ src/views/user/list/userDetails.vue | 1522 ++++++++++------- src/worker/calcWorker.js | 5 +- 28 files changed, 6034 insertions(+), 1141 deletions(-) create mode 100644 src/api/lottery.js create mode 100644 src/views/accounts/applicationRecord/index.vue create mode 100644 src/views/accounts/userBill/index.vue create mode 100644 src/views/marketing/lottery/addGoods.vue create mode 100644 src/views/marketing/lottery/components/goodsList.vue create mode 100644 src/views/marketing/lottery/create.vue create mode 100644 src/views/marketing/lottery/formRule/lotteryFrom.js create mode 100644 src/views/marketing/lottery/formRule/ruleShip.js create mode 100644 src/views/marketing/lottery/index.vue create mode 100644 src/views/marketing/lottery/recordingList.vue create mode 100644 src/views/promoter/brokerage/index.vue diff --git a/.env.development b/.env.development index 6bbcb15..a151a59 100644 --- a/.env.development +++ b/.env.development @@ -3,11 +3,12 @@ ENV = 'development' # http://192.168.1.43:8324/admin # http://mer.crmeb.net/admin # base api +# www.shop.xyz VUE_APP_BASE_API = 'http://test.tropjoin.com' # VUE_APP_BASE_API = 'https://api.tropjoin.com' # socket 连接地址 -VUE_APP_WS_URL = 'wss://test.tropjoin.com' +VUE_APP_WS_URL = 'wss://www.shop.xyz' # VUE_APP_WS_URL = 'ws://https://api.tropjoin.com' # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, diff --git a/.env.production b/.env.production index c7b3776..47ddd58 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,6 @@ ENV = 'production' # base api -VUE_APP_BASE_API ='https://api.tropjoin.com' +VUE_APP_BASE_API ='' # socket 连接地址 -VUE_APP_WS_URL ='wss://api.tropjoin.com' +VUE_APP_WS_URL ='' diff --git a/src/api/lottery.js b/src/api/lottery.js new file mode 100644 index 0000000..03b7376 --- /dev/null +++ b/src/api/lottery.js @@ -0,0 +1,32 @@ +import request from './request' + +/** + * @description 抽奖配置 -- 列表 + */ +export function lotteryFactor_info(factor) { + return request.get(`store/lottery/factor_info/${factor}`) +} +/** + * @description 修改抽奖数据 -- post + */ +export function lotteryEdit(id, data) { + return request.put(`store/lottery/edit/${id}`, data) +} +/** + * @description 删除抽奖数据 -- del + */ +export function lotteryDel(id, data) { + return request.delete(`store/lottery/del/prize/${id}`, data) +} +/** + * @description 修改抽奖 -- put + */ +export function lotteryEditPrize(id, data) { + return request.put(`store/lottery/edit/prize/${id}`, data) +} +/** + * @description 添加抽奖数据 + */ +export function addLottery(data) { + return request.post(`store/lottery/add/prize`, data) +} \ No newline at end of file diff --git a/src/api/marketing.js b/src/api/marketing.js index ae13ae0..8454250 100644 --- a/src/api/marketing.js +++ b/src/api/marketing.js @@ -373,12 +373,24 @@ export function integralLogTitle() { export function integralLogLst(data) { return request.get(`user/integral/lst`, data) } +/** + * @description 成长值 -- 列表 + */ +export function brokerageLogLst(data) { + return request.get(`user/brokerage/lst/log`, data) +} /** * @description 积分日志 -- 导出 */ export function signLogExport(data) { return request.get(`user/integral/excel`, data) } +/** + * @description 成长值 -- 导出 + */ +export function brokerageLogExport(data) { + return request.get(`user/brokerage/excel`, data) +} /** * @description 签到配置 -- 列表 */ diff --git a/src/api/user.js b/src/api/user.js index 0a38e3d..13118a1 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -207,6 +207,12 @@ export function userSignLogApi(uid, data) { export function userHistoryApi(uid, data) { return request.get(`user/history/${uid}`, data) } +/** + * @description 下级 -- 邀请人列表 + */ +export function spreadListApi(uid, data) { + return request.get(`user/spread/list/${uid}`, data) +} /** * @description 用户 -- 详情优惠券 */ diff --git a/src/router/modules/accounts.js b/src/router/modules/accounts.js index 7c562f6..049eef5 100644 --- a/src/router/modules/accounts.js +++ b/src/router/modules/accounts.js @@ -39,6 +39,24 @@ const accountsRouter = }, component: () => import('@/views/accounts/capital/index') }, + { + path: 'userBill', + name: 'AccountsUserBill', + meta: { + title: '用户账单', + noCache: true + }, + component: () => import('@/views/accounts/userBill/index') + }, + { + path: 'applicationRecord', + name: 'AccountsApplicationRecord', + meta: { + title: '申请记录', + noCache: true + }, + component: () => import('@/views/accounts/applicationRecord/index') + }, { path: 'reconciliation', name: 'AccountsReconciliation', diff --git a/src/router/modules/marketing.js b/src/router/modules/marketing.js index 894f778..f9c8b48 100644 --- a/src/router/modules/marketing.js +++ b/src/router/modules/marketing.js @@ -104,6 +104,29 @@ const marketingRouter = } ] }, + { + path: 'lottery', + name: 'lottery', + meta: { + title: '抽奖管理', + noCache: true, + + }, + // redirect: 'noRedirect', + component: () => import('@/views/marketing/lottery/create'), + children: [ + { + path: 'create', + name: 'create', + meta: { + title: '抽奖配置', + noCache: true, + activeMenu: `${roterPre}/marketing/lottery/create` + }, + component: () => import('@/views/marketing/lottery/create') + }, + ] + }, { path: 'studio', name: 'Studio', diff --git a/src/router/modules/promoter.js b/src/router/modules/promoter.js index be9862a..5ef607d 100644 --- a/src/router/modules/promoter.js +++ b/src/router/modules/promoter.js @@ -21,6 +21,15 @@ const promoterRouter = }, component: () => import('@/views/promoter/config/index') }, + { + path: 'brokerage', + name: 'brokerage', + meta: { + title: '成长值列表', + noCache: true + }, + component: () => import('@/views/promoter/brokerage/index') + }, { path: 'user', name: 'AccountsUser', @@ -84,7 +93,6 @@ const promoterRouter = }, component: () => import('@/views/promoter/distributionRules/index') } - ] } diff --git a/src/utils/newToExcel.js b/src/utils/newToExcel.js index 0632510..3b931b9 100644 --- a/src/utils/newToExcel.js +++ b/src/utils/newToExcel.js @@ -172,7 +172,7 @@ export default function createWorkBook(header, title, data, foot, filename, shee return letter[number]; } else { let n = number % 26 - let l = Math.floor(number % 26) + let l = Math.floor(number / 26) - 1 return letter[l] + letter[n] } } diff --git a/src/utils/validate.js b/src/utils/validate.js index 23cb971..37905b2 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -10,7 +10,34 @@ export function isExternal(path) { return /^(https?:|mailto:|tel:)/.test(path) } +export function formatDate(date, fmt) { + console.log(date, fmt); + if (/(y+)/.test(fmt)) { + fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)); + } + let o = { + 'M+': date.getMonth() + 1, + 'd+': date.getDate(), + 'h+': date.getHours(), + 'm+': date.getMinutes(), + 's+': date.getSeconds(), + }; + console.log(o); + + for (let k in o) { + if (new RegExp(`(${k})`).test(fmt)) { + let str = o[k] + ''; + fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : padLeftZero(str)); + } + } + console.log(fmt); + + return fmt; +} +function padLeftZero(str) { + return ('00' + str).substr(str.length); +} /** * @param {string} str * @returns {Boolean} diff --git a/src/views/accounts/applicationRecord/index.vue b/src/views/accounts/applicationRecord/index.vue new file mode 100644 index 0000000..fd46270 --- /dev/null +++ b/src/views/accounts/applicationRecord/index.vue @@ -0,0 +1,935 @@ + + + + diff --git a/src/views/accounts/extract/index.vue b/src/views/accounts/extract/index.vue index 184e026..d8d73d8 100644 --- a/src/views/accounts/extract/index.vue +++ b/src/views/accounts/extract/index.vue @@ -1,366 +1,492 @@ + + + + + + + + + +
+ +
- -
+ +
用户信息
-
{{ extractDetail.user.nickname }}
-
{{ extractDetail.user.uid }}
-
{{ extractDetail.extract_price }}
-
{{ extractDetail.create_time }}
-
{{ extractDetail.real_name }}
-
{{ extractDetail.bank_code }}
-
{{ extractDetail.bank_name }}
-
+
+ {{ extractDetail.user.nickname }} +
+
+ {{ extractDetail.user.uid }} +
+
+ {{ extractDetail.extract_price }} +
+
+ {{ extractDetail.tx_price }} +
+
+ {{ extractDetail.ratio_price }} +
+
+ {{ extractDetail.create_time }} +
+
+ {{ extractDetail.real_name }} +
+
+ {{ extractDetail.bank_code }} +
+
+ {{ extractDetail.bank_name }} +
+
-
+ style="max-width: 150px; height: 80px" + :src="extractDetail.extract_pic" + /> +
提现方式
-
{{ extractDetail.status | extractStatusFilter }}
-
{{ extractDetail.status_time }}
-
{{ extractDetail.fail_msg }}
+
+ {{ extractDetail.status | extractStatusFilter }} +
+
+ {{ extractDetail.status_time }} +
+
+ {{ extractDetail.fail_msg }} +
-
-
+ diff --git a/src/views/marketing/lottery/addGoods.vue b/src/views/marketing/lottery/addGoods.vue new file mode 100644 index 0000000..315d5e5 --- /dev/null +++ b/src/views/marketing/lottery/addGoods.vue @@ -0,0 +1,571 @@ + + + + + diff --git a/src/views/marketing/lottery/components/goodsList.vue b/src/views/marketing/lottery/components/goodsList.vue new file mode 100644 index 0000000..add41d9 --- /dev/null +++ b/src/views/marketing/lottery/components/goodsList.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/views/marketing/lottery/create.vue b/src/views/marketing/lottery/create.vue new file mode 100644 index 0000000..a119ed1 --- /dev/null +++ b/src/views/marketing/lottery/create.vue @@ -0,0 +1,1166 @@ + + + + + diff --git a/src/views/marketing/lottery/formRule/lotteryFrom.js b/src/views/marketing/lottery/formRule/lotteryFrom.js new file mode 100644 index 0000000..7311b95 --- /dev/null +++ b/src/views/marketing/lottery/formRule/lotteryFrom.js @@ -0,0 +1,68 @@ +const lotteryFrom = { + name: [{ required: true, message: '请输入活动名称', trigger: 'blur' }], + factor: [{ required: true, type: 'number', message: '请选择活动类型', trigger: 'change' }], + attends_user: [{ required: true, type: 'number', message: '请选择参与用户', trigger: 'change' }], + factor_num: [{ required: true, type: 'number', message: '请输入抽奖次数', trigger: 'blur' }], + // prize: [ + // { + // required: true, + // type: 'array', + // message: '请添加抽奖奖品(8条)', + // trigger: 'change', + // }, + // { + // type: 'array', + // min: 8, + // message: '请添加抽奖奖品(8条)', + // trigger: 'change', + // }, + // ], + lottery_num: [ + { + required: true, + type: 'number', + message: '请输入邀请新用户最多可获得抽奖多少次', + trigger: 'blur', + }, + ], + spread_num: [ + { + required: true, + type: 'number', + message: '请输入关注额外抽多少次', + trigger: 'blur', + }, + ], + image: [ + { + required: true, + message: '请上传活动背景图', + trigger: 'change', + }, + ], + content: [ + { + required: true, + message: '请填写活动规则', + trigger: 'blur', + }, + ], +}; +function validate(rule, value, callback) { + if (Array.isArray(value)) { + //格式为:daterange、datetimerange检测 + value.map(function (item) { + if (item === '') { + return callback('日期不能为空'); + } + }); + } else { + //格式为:date、datetime、year、month 检测 + if (value === '') { + return callback('日期不能为空'); + } + } + return callback(); +} + +export { lotteryFrom }; diff --git a/src/views/marketing/lottery/formRule/ruleShip.js b/src/views/marketing/lottery/formRule/ruleShip.js new file mode 100644 index 0000000..e09d9f9 --- /dev/null +++ b/src/views/marketing/lottery/formRule/ruleShip.js @@ -0,0 +1,27 @@ +const ruleShip = { + deliver_name: [ + { + required: true, + type: 'string', + message: '请选择快递公司', + trigger: 'select', + }, + ], + deliver_number: [ + { + required: true, + message: '请输入快递单号', + trigger: 'blur', + }, + ], +}; +const ruleMark = { + mark: [ + { + required: true, + message: '请输入备注信息', + trigger: 'blur', + }, + ], +}; +export { ruleShip, ruleMark }; diff --git a/src/views/marketing/lottery/index.vue b/src/views/marketing/lottery/index.vue new file mode 100644 index 0000000..760e79b --- /dev/null +++ b/src/views/marketing/lottery/index.vue @@ -0,0 +1,320 @@ + + + + + diff --git a/src/views/marketing/lottery/recordingList.vue b/src/views/marketing/lottery/recordingList.vue new file mode 100644 index 0000000..0c00b30 --- /dev/null +++ b/src/views/marketing/lottery/recordingList.vue @@ -0,0 +1,376 @@ + + + + + diff --git a/src/views/order/list/orderDetails.vue b/src/views/order/list/orderDetails.vue index d34ea7c..397c1ca 100644 --- a/src/views/order/list/orderDetails.vue +++ b/src/views/order/list/orderDetails.vue @@ -12,10 +12,18 @@
-
{{ orderDetailList.order_type == 0 ? '普通订单' : '核销订单' }}
+
+ {{ orderDetailList.order_type == 0 ? "普通订单" : "核销订单" }} +
- 订单编号:{{ orderDetailList.order_sn }} - 总订单号:{{ orderDetailList.groupOrder.group_order_sn }} + 订单编号:{{ orderDetailList.order_sn }} + 总订单号:{{ + orderDetailList.groupOrder.group_order_sn + }}
@@ -23,12 +31,26 @@
  • 订单状态
    -
    待付款
    -
    +
    + 待付款 +
    +
    {{ orderDetailList.status | orderStatusFilter }}
    -
    - {{ orderDetailList.status | cancelOrderStatusFilter }} +
    + {{ + orderDetailList.status | cancelOrderStatusFilter + }}
  • @@ -56,17 +78,31 @@
    用户昵称:
    {{ - orderDetailList.user.real_name ? orderDetailList.user.real_name : orderDetailList.user.nickname + orderDetailList.user.real_name + ? orderDetailList.user.real_name + : orderDetailList.user.nickname }}
  • 用户ID:
    -
    {{ orderDetailList.user.uid ? orderDetailList.user.uid : '-' }}
    +
    + {{ + orderDetailList.user.uid + ? orderDetailList.user.uid + : "-" + }} +
  • 绑定电话:
    -
    {{ orderDetailList.user.phone ? orderDetailList.user.phone : '-' }}
    +
    + {{ + orderDetailList.user.phone + ? orderDetailList.user.phone + : "-" + }} +
  • @@ -75,15 +111,33 @@ @@ -92,15 +146,34 @@ @@ -173,12 +311,26 @@ @@ -186,7 +338,9 @@
    买家留言
    @@ -194,12 +348,15 @@
    商家备注
    - - + @@ -482,16 +705,21 @@ v-if="dialogLogistics" >
    -
    +
    + +
    物流公司:{{ orderDetailList.delivery_name }} 物流单号:{{ orderDetailList.delivery_id }}
    -
    +
    - +

    @@ -502,15 +730,14 @@

    + diff --git a/src/views/user/list/userDetails.vue b/src/views/user/list/userDetails.vue index 007fbba..d2c7d8a 100644 --- a/src/views/user/list/userDetails.vue +++ b/src/views/user/list/userDetails.vue @@ -5,88 +5,111 @@ :size="1000" :visible.sync="drawer" :direction="direction" - :before-close="handleClose" + :before-close="handleClose" > -
    -
    -
    - -
    -
    {{psInfo.nickname}}
    -
    - -
    - +
    +
    +
    + +
    +
    {{ psInfo.nickname }}
    +
    + +
    + +
    - -
    -
    - 编辑 - 取消 - 完成 - - - - - 设置余额 - 设置分组 - 设置标签 - - 修改密码 - + 设置余额 + 设置分组 + 设置标签 + + 修改密码 + - - + + +
    -
    -
    -
      -
    • -
      余额
      -
      -
      {{psInfo.now_money}}元
      -
      -
    • -
    • -
      总计订单
      -
      {{psInfo.pay_count}}笔
      -
    • -
    • -
      总消费金额
      -
      {{psInfo.pay_price}}元
      -
    • - - -
    + +
    -
    - + - - + + >
    基本信息
    @@ -299,7 +364,7 @@ --> - + 全部 - + - + 全部 - + @@ -338,9 +413,7 @@ --> - + 开启 关闭 @@ -358,91 +431,130 @@ placeholder="请填写备注" class="selWidth" /> - +
    -
    +
    补充信息
    - - + + + /> - + + /> - + + /> - - + - + + /> - + + /> - - - - {{radio}} + + + + {{ radio }} - + + />
    - - + - + + + --> -
    +
    diff --git a/src/worker/calcWorker.js b/src/worker/calcWorker.js index c6f7f21..8d5df0e 100644 --- a/src/worker/calcWorker.js +++ b/src/worker/calcWorker.js @@ -81,6 +81,9 @@ onmessage = (res) => { } else { //不是数组 lcomunNow.getCell(getLetter(sk)).value = data[h][l]; + console.log(lcomunNow.getCell(getLetter(sk)).value); + console.log(data[h][l]); + console.log(h, l); lcomunNow.getCell(getLetter(sk)).border = { top: { style: 'thin' }, left: { style: 'thin' }, bottom: { style: 'thin' }, right: { style: 'thin' } }; lcomunNow.alignment = { vertical: 'middle', horizontal: 'center' }; sk++ @@ -163,7 +166,7 @@ onmessage = (res) => { return letter[number]; } else { let n = number % 26 - let l = Math.floor(number % 26) + let l = Math.floor(number / 26) - 1 return letter[l] + letter[n] } }