Browse Source

2024-01-10 大礼包AB新增使用订单号搜索,侧边栏打开活动列表、资金账户,活动拆单(新)增加新商品

zhiquz 1 year ago
parent
commit
7889f9b1bf
5 changed files with 132 additions and 24 deletions
  1. BIN
      dist.zip
  2. 5 3
      src/pages/giftA/copy.vue
  3. 5 3
      src/pages/giftA/index.vue
  4. 104 0
      src/pages/order/list.vue
  5. 18 18
      src/router/auth.js

BIN
dist.zip


+ 5 - 3
src/pages/giftA/copy.vue

@@ -192,7 +192,7 @@
       </div>
     </el-dialog>
     <el-dialog title="新增" :visible.sync="dialogAdd" width="48%">
-      <el-input v-model="mobile" placeholder="请输入手机号" style="width:300px;margin-left:40px" clearable />
+      <el-input v-model="mobile" placeholder="请输入订单号" style="width:300px;margin-left:40px" clearable />
       <el-button type="primary" @click="Getmobile">查询</el-button>
       <el-form v-if="showAddform" label-position="right" :model="addForm" style="margin-top:20px">
         <el-form-item label="活动:" label-width="110px" required>
@@ -677,7 +677,8 @@ export default {
         city: this.areaAll[1],
         area: this.areaAll[2],
         address: this.addForm.address,
-        phone: this.addForm.phone
+        phone: this.addForm.phone,
+        order_id: this.addForm.order_id
       }
       AddUserImgInfo(data).then(res => {
         if (res.code === 200) {
@@ -695,7 +696,7 @@ export default {
     // 获取手机号信息
     Getmobile() {
       if (this.mobile === '') {
-        this.$message.error('请输入手机号')
+        this.$message.error('请输入订单号')
         return
       }
       GetUserInfo({ mobile: this.mobile }).then(res => {
@@ -706,6 +707,7 @@ export default {
           this.addForm.phone = res.data.mobile
           this.addForm.nickname = res.data.nickname
           this.addForm.user_id = res.data.user_id
+          this.addForm.order_id = res.data.order_id
           if (res.data.order_info.length) {
             this.addressList = res.data.order_info.map((x, i, arr) => {
               return Object.assign({}, { 'name': x.order_num + ',' + x.province + x.city + x.town + x.address }, { index: i })

+ 5 - 3
src/pages/giftA/index.vue

@@ -192,7 +192,7 @@
       </div>
     </el-dialog>
     <el-dialog title="新增" :visible.sync="dialogAdd" width="48%">
-      <el-input v-model="mobile" placeholder="请输入手机号" style="width:300px;margin-left:40px" clearable />
+      <el-input v-model="mobile" placeholder="请输入订单号" style="width:300px;margin-left:40px" clearable />
       <el-button type="primary" @click="Getmobile">查询</el-button>
       <el-form v-if="showAddform" label-position="right" :model="addForm" style="margin-top:20px">
         <el-form-item label="活动:" label-width="110px" required>
@@ -677,7 +677,8 @@ export default {
         city: this.areaAll[1],
         area: this.areaAll[2],
         address: this.addForm.address,
-        phone: this.addForm.phone
+        phone: this.addForm.phone,
+        order_id: this.addForm.order_id
       }
       AddUserImgInfo(data).then(res => {
         if (res.code === 200) {
@@ -695,7 +696,7 @@ export default {
     // 获取手机号信息
     Getmobile() {
       if (this.mobile === '') {
-        this.$message.error('请输入手机号')
+        this.$message.error('请输入订单号')
         return
       }
       GetUserInfo({ mobile: this.mobile }).then(res => {
@@ -706,6 +707,7 @@ export default {
           this.addForm.phone = res.data.mobile
           this.addForm.nickname = res.data.nickname
           this.addForm.user_id = res.data.user_id
+          this.addForm.order_id = res.data.order_id
           if (res.data.order_info.length) {
             this.addressList = res.data.order_info.map((x, i, arr) => {
               return Object.assign({}, { 'name': x.order_num + ',' + x.province + x.city + x.town + x.address }, { index: i })

+ 104 - 0
src/pages/order/list.vue

@@ -941,12 +941,14 @@ const moduleList = {
   'XXXL': '',
   '4XL': '',
   '5XL': '',
+  '6XL': '',
   '女M': '',
   '女L': '',
   '女XL': '',
   '女XXL': '',
   '女XXXL': '',
   '女4XL': '',
+  '女5XL': '',
   '数据求和': '',
   '所属': '',
   '备注': '',
@@ -2721,6 +2723,8 @@ export default {
         let c = 0
         let d = 0
         let e = 0
+        let f = 0
+        let g = 0
         while (a < item['精装'].length) {
           const obj = Object.assign({}, moduleList)
           obj['订单编号'] = i
@@ -2921,6 +2925,106 @@ export default {
           out.push(obj)
           d++
         }
+        while (f < item['红色'].length) {
+          const obj = Object.assign({}, moduleList)
+          obj['订单编号'] = i
+          obj['下单时间'] = info.created_at
+          obj['所属客服'] = info.admin_name
+          obj['备注昵称'] = info.u_nickname
+          obj['下单人姓名'] = info.u_name
+          obj['下单人手机号'] = info.u_mobile
+          obj['收件人'] = info.username
+          obj['电话'] = info.mobile
+          obj['收件人省'] = info.province
+          obj['收件人市'] = info.city
+          obj['收件人区'] = info.town
+          obj['收件人街道地址'] = info.address
+          obj['备注'] = info.remark
+          obj['所属'] = info.belong
+          obj['订单状态'] = info.status
+          obj['支付状态'] = info.pay_status
+          obj['体验店或专车'] = info.store
+          obj['是否满箱'] = '红色满箱'
+          // obj['赠品'] = info.gift.map(item => `${item.name}${item.num}`).join(';')
+          let num_all = 0
+          if (item['红色'][f].sec_attr === '男女款') {
+            const sex = item['红色'][f].size.split('-')[0]
+            let size = item['红色'][f].size.split('-')[1]
+            size = size === '3XL' ? 'XXXL' : size
+            if (sex === '男款') {
+              obj[size] = `${item['红色'][f].num}${item['红色'][f].main_attr}`
+              num_all += item['红色'][f].num
+            } else {
+              obj['女' + size] = `${item['红色'][f].num}${item['红色'][f].main_attr}`
+              num_all += item['红色'][f].num
+            }
+          } else {
+            if (item['红色'][f].size === '3XL') {
+              item['红色'][f].size = 'XXXL'
+            }
+            if (item['红色'][f].sec_attr === '男款') {
+              obj[item['红色'][f].size] = `${item['红色'][f].num}${item['红色'][f].main_attr}`
+              num_all += item['红色'][f].num
+            }
+            if (item['红色'][f].sec_attr === '女款') {
+              obj['女' + item['红色'][f].size] = `${item['红色'][f].num}${item['红色'][f].main_attr}`
+              num_all += item['红色'][f].num
+            }
+          }
+          obj['数据求和'] = num_all
+          out.push(obj)
+          f++
+        }
+        while (g < item['红色混合'].length) {
+          const obj = Object.assign({}, moduleList)
+          obj['订单编号'] = i
+          obj['下单时间'] = info.created_at
+          obj['所属客服'] = info.admin_name
+          obj['备注昵称'] = info.u_nickname
+          obj['下单人姓名'] = info.u_name
+          obj['下单人手机号'] = info.u_mobile
+          obj['收件人'] = info.username
+          obj['电话'] = info.mobile
+          obj['收件人省'] = info.province
+          obj['收件人市'] = info.city
+          obj['收件人区'] = info.town
+          obj['收件人街道地址'] = info.address
+          obj['备注'] = info.remark
+          obj['所属'] = info.belong
+          obj['订单状态'] = info.status
+          obj['支付状态'] = info.pay_status
+          obj['体验店或专车'] = info.store
+          obj['是否满箱'] = ''
+          // obj['赠品'] = info.gift.map(item => `${item.name}${item.num}`).join(';')
+          let num_all = 0
+          if (item['红色混合'][g].sec_attr === '男女款') {
+            const sex = item['红色混合'][g].size.split('-')[0]
+            let size = item['红色混合'][g].size.split('-')[1]
+            size = size === '3XL' ? 'XXXL' : size
+            if (sex === '男款') {
+              obj[size] = `${item['红色混合'][g].num}${item['红色混合'][g].main_attr}`
+              num_all += item['红色混合'][g].num
+            } else {
+              obj['女' + size] = `${item['红色混合'][g].num}${item['红色混合'][g].main_attr}`
+              num_all += item['红色混合'][g].num
+            }
+          } else {
+            if (item['红色混合'][g].size === '3XL') {
+              item['红色混合'][g].size = 'XXXL'
+            }
+            if (item['红色混合'][g].sec_attr === '男款') {
+              obj[item['红色混合'][g].size] = `${item['红色混合'][g].num}${item['红色混合'][g].main_attr}`
+              num_all += item['红色混合'][g].num
+            }
+            if (item['红色混合'][g].sec_attr === '女款') {
+              obj['女' + item['红色混合'][g].size] = `${item['红色混合'][g].num}${item['红色混合'][g].main_attr}`
+              num_all += item['红色混合'][g].num
+            }
+          }
+          obj['数据求和'] = num_all
+          out.push(obj)
+          g++
+        }
         while (e < item.data.peijian.length) {
           const obj = Object.assign({}, moduleList)
           obj['订单编号'] = i

+ 18 - 18
src/router/auth.js

@@ -1135,15 +1135,15 @@ export const asyncRoutes = [
       icon: 'finance'
     },
     children: [
-      // {
-      //   path: 'recharge',
-      //   component: '/finance/recharge',
-      //   name: 'finance_recharge',
-      //   meta: {
-      //     title: '资金账户',
-      //     noCache: true
-      //   }
-      // },
+      {
+        path: 'recharge',
+        component: '/finance/recharge',
+        name: 'finance_recharge',
+        meta: {
+          title: '资金账户',
+          noCache: true
+        }
+      },
       {
         path: 'refund',
         component: '/finance/refund',
@@ -1381,15 +1381,15 @@ export const asyncRoutes = [
           buttonAuthList: []
         }
       },
-      // {
-      //   path: 'list',
-      //   component: '/activity/list',
-      //   name: 'activity_list',
-      //   meta: {
-      //     title: '活动列表',
-      //     noCache: true
-      //   }
-      // },
+      {
+        path: 'list',
+        component: '/activity/list',
+        name: 'activity_list',
+        meta: {
+          title: '活动列表',
+          noCache: true
+        }
+      },
       {
         path: 'tutorial',
         component: '/activity/tutorial',