Browse Source

Merge branch 'master' of ssh://git.web.ximengnaikang.com:2222/daweiboshi-app/appadmin

lxs 3 years ago
parent
commit
caf99b0007

+ 2 - 2
.env.production

@@ -2,6 +2,6 @@
 ENV = 'production'
 ENV = 'production'
 
 
 # base api
 # base api
-VUE_APP_BASE_API = '//api.admin.app.jiuweiyun.cn/api'
+#VUE_APP_BASE_API = '//api.admin.app.jiuweiyun.cn/api'
 
 
-#VUE_APP_BASE_API = '//api.appadmin.woaidakele.cn/api'
+VUE_APP_BASE_API = '//api.appadmin.woaidakele.cn/api'

+ 8 - 0
src/api/order/list.js

@@ -53,6 +53,14 @@ export function downOrder(data) {
     data
     data
   })
   })
 }
 }
+// 导出金额
+export function downList(params) {
+  return request({
+    url: '/data/order_list_down',
+    method: 'get',
+    params
+  })
+}
 
 
 // 拆单
 // 拆单
 export function toExport(params) {
 export function toExport(params) {

BIN
src/assets/json.zip


+ 13 - 13
src/pages/dataScreen/Contrast/index.vue

@@ -127,19 +127,19 @@ export default {
   },
   },
   mounted() {
   mounted() {
     this._loading = this.$loading()
     this._loading = this.$loading()
-    Promise.all([api_Data1(), api_Data2(), api_Data3(), api_Data4(), api_Data5()]).then(([
-      { data: { list: data1 }},
-      { data: { list: data2 }},
-      { data: { list: data3 }},
-      { data: { list: data4 }},
-      { data: { list: data5 }}]) => {
-      this.data1 = data1
-      this.data2 = data2
-      this.data3 = data3
-      this.data4 = data4
-      this.data5 = data5
-      this.$nextTick(() => this._loading.close())
-    })
+    // Promise.all([api_Data1(), api_Data2(), api_Data3(), api_Data4(), api_Data5()]).then(([
+    //   { data: { list: data1 }},
+    //   { data: { list: data2 }},
+    //   { data: { list: data3 }},
+    //   { data: { list: data4 }},
+    //   { data: { list: data5 }}]) => {
+    //   this.data1 = data1
+    //   this.data2 = data2
+    //   this.data3 = data3
+    //   this.data4 = data4
+    //   this.data5 = data5
+    //   this.$nextTick(() => this._loading.close())
+    // })
   },
   },
   methods: {}
   methods: {}
 }
 }

+ 1 - 0
src/pages/dataScreen/h5.vue

@@ -281,6 +281,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+document.title = '活动-订货数据实时更新'
 import { isPC } from '@/utils'
 import { isPC } from '@/utils'
 import { getSizeList, provinceTeam, baseData, crownList } from '@/api/datascreen'
 import { getSizeList, provinceTeam, baseData, crownList } from '@/api/datascreen'
 export default {
 export default {

+ 1 - 0
src/pages/dataScreen/pc.vue

@@ -344,6 +344,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
+document.title = '活动-订货数据实时更新'
 import axios from 'axios'
 import axios from 'axios'
 import { isPC, offset } from '@/utils'
 import { isPC, offset } from '@/utils'
 import { deepClone } from '@/utils'
 import { deepClone } from '@/utils'

+ 1 - 1
src/pages/order/components/ChangeGoodList.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <el-dialog title="修改订单商品" :visible.sync="show" width="80%" :show-close="false" :close-on-click-modal="false" :destroy-on-close="true">
+  <el-dialog title="修改订单商品" :visible.sync="show" width="80%" :show-close="false" :close-on-click-modal="false" append-to-body :destroy-on-close="true">
     <el-form label-width="80px" class="form">
     <el-form label-width="80px" class="form">
       <el-form-item label="选择商品:">
       <el-form-item label="选择商品:">
         <el-select v-model="selelctedGoodId" placeholder="选择商品">
         <el-select v-model="selelctedGoodId" placeholder="选择商品">

+ 80 - 36
src/pages/order/examine.vue

@@ -115,21 +115,30 @@
             <el-form label-width="100px">
             <el-form label-width="100px">
               <el-form-item label="收货信息" class="other_address">
               <el-form-item label="收货信息" class="other_address">
                 <i class="el-icon-edit-outline cur" @click="getUserAddress" />
                 <i class="el-icon-edit-outline cur" @click="getUserAddress" />
-                <span>代理名称: {{ orderDetail.get_user && orderDetail.get_user.nickname }}</span>
+                <!-- <span>代理名称: {{ orderDetail.get_user && orderDetail.get_user.nickname }}</span> -->
                 <span>
                 <span>
                   收货人: {{ orderDetail.get_address && orderDetail.get_address.username }}
                   收货人: {{ orderDetail.get_address && orderDetail.get_address.username }}
                 </span>
                 </span>
                 <span>联系方式: {{ orderDetail.get_address && orderDetail.get_address.mobile }}</span>
                 <span>联系方式: {{ orderDetail.get_address && orderDetail.get_address.mobile }}</span>
                 <span>收货地址: {{ orderDetail.get_address && `${orderDetail.get_address.province}${orderDetail.get_address.city}${orderDetail.get_address.town}${orderDetail.get_address.address}` }}</span>
                 <span>收货地址: {{ orderDetail.get_address && `${orderDetail.get_address.province}${orderDetail.get_address.city}${orderDetail.get_address.town}${orderDetail.get_address.address}` }}</span>
               </el-form-item>
               </el-form-item>
-              <el-form-item
+              <el-form-item label="所属信息">
+                <template v-if="orderDetail.belong_user">
+                  <i class="el-icon-edit-outline cur" @click="edit = true; getBelongUser()" />
+                  <span>昵称: {{ orderDetail.belong_user && orderDetail.belong_user.nickname }}</span>
+                  <span>姓名: {{ orderDetail.belong_user && orderDetail.belong_user.realname }}</span>
+                  <span>手机号: {{ orderDetail.belong_user && orderDetail.belong_user.mobile }}</span>
+                </template>
+                <span v-else>该订单暂无所属者</span>
+              </el-form-item>
+              <!-- <el-form-item
                 v-if="orderDetail.get_address && (orderDetail.get_address.nickname || orderDetail.get_address.level)"
                 v-if="orderDetail.get_address && (orderDetail.get_address.nickname || orderDetail.get_address.level)"
                 label=""
                 label=""
                 class="other_address"
                 class="other_address"
               >
               >
                 <span>收货人昵称: <span style="color:red">{{ orderDetail.get_address && orderDetail.get_address.nickname }}</span></span>
                 <span>收货人昵称: <span style="color:red">{{ orderDetail.get_address && orderDetail.get_address.nickname }}</span></span>
                 <span>收货人等级: <span style="color:red">{{ (orderDetail.get_address && orderDetail.get_address.level) | levelName }}</span></span>
                 <span>收货人等级: <span style="color:red">{{ (orderDetail.get_address && orderDetail.get_address.level) | levelName }}</span></span>
-              </el-form-item>
+              </el-form-item> -->
               <el-form-item label="备注说明">
               <el-form-item label="备注说明">
                 <div class="remark_container">
                 <div class="remark_container">
                   <i class="el-icon-edit-outline cur" @click="dialog.remark = true" />
                   <i class="el-icon-edit-outline cur" @click="dialog.remark = true" />
@@ -143,15 +152,6 @@
                   <div v-else>无</div>
                   <div v-else>无</div>
                 </div>
                 </div>
               </el-form-item>
               </el-form-item>
-              <el-form-item label="所属者信息:">
-                <template v-if="orderDetail.belong_user">
-                  <i class="el-icon-edit-outline cur" @click="getBelongUser" />
-                  <span>昵称: {{ orderDetail.belong_user && orderDetail.belong_user.nickname }}</span>
-                  <span>姓名: {{ orderDetail.belong_user && orderDetail.belong_user.realname }}</span>
-                  <span>手机号: {{ orderDetail.belong_user && orderDetail.belong_user.mobile }}</span>
-                </template>
-                <span v-else>该订单暂无所属者</span>
-              </el-form-item>
               <el-form-item label="赠品信息">
               <el-form-item label="赠品信息">
                 <ul class="zengpin_list">
                 <ul class="zengpin_list">
                   <li v-for="item in orderDetail.get_order_gift" v-show="item.pivot && item.pivot.num > 0" :key="item.id">
                   <li v-for="item in orderDetail.get_order_gift" v-show="item.pivot && item.pivot.num > 0" :key="item.id">
@@ -679,6 +679,7 @@
           <el-radio v-for="item in addressList" :key="item.id" :label="item.id" class="radio_item">
           <el-radio v-for="item in addressList" :key="item.id" :label="item.id" class="radio_item">
             <div>
             <div>
               <span>{{ item.con_name }},{{ item.provice }}-{{ item.city }}-{{ item.area }}-{{ item.address }},{{ item.con_mobile }}</span>
               <span>{{ item.con_name }},{{ item.provice }}-{{ item.city }}-{{ item.area }}-{{ item.address }},{{ item.con_mobile }}</span>
+              <span v-if="item.belong_user" style="color: red">(所属-{{ `昵称:${item.belong_user.nickname}, 真实姓名:${item.belong_user.realname}, 手机号:${item.belong_user.mobile}` }})</span>
               <!-- <span v-if="addressId === item.id" class="default">默认</span> -->
               <!-- <span v-if="addressId === item.id" class="default">默认</span> -->
             </div>
             </div>
             <div class="right">
             <div class="right">
@@ -709,7 +710,12 @@
           <el-input v-model="addressForm.mobile" placeholder="手机号" minlength="11" maxlength="11" show-word-limit style="width: 500px" />
           <el-input v-model="addressForm.mobile" placeholder="手机号" minlength="11" maxlength="11" show-word-limit style="width: 500px" />
         </el-form-item>
         </el-form-item>
         <el-form-item label="地区:">
         <el-form-item label="地区:">
-          <VDistpicker :province="addressForm.provice" :city="addressForm.city" :area="addressForm.area" @province="province => addressForm.provice = province.value" @city="city => addressForm.city = city.value" @area="area => addressForm.area = area.value" />
+          <el-cascader
+            v-model="addressForm.areaAll"
+            :options="provinces"
+            style="width: 500px"
+          />
+          <!-- <VDistpicker :province="addressForm.provice" :city="addressForm.city" :area="addressForm.area" @province="province => addressForm.provice = province.value" @city="city => addressForm.city = city.value" @area="area => addressForm.area = area.value" /> -->
         </el-form-item>
         </el-form-item>
         <el-form-item label="地址:">
         <el-form-item label="地址:">
           <el-input v-model="addressForm.address" type="textarea" placeholder="地址" maxlength="50" show-word-limit style="width: 500px" />
           <el-input v-model="addressForm.address" type="textarea" placeholder="地址" maxlength="50" show-word-limit style="width: 500px" />
@@ -723,7 +729,7 @@
     </el-dialog>
     </el-dialog>
     <!-- 修改订单所属 -->
     <!-- 修改订单所属 -->
     <el-dialog
     <el-dialog
-      title="修改订单所属"
+      title="绑定订单所属"
       :visible.sync="dialog.belong"
       :visible.sync="dialog.belong"
       :show-close="false"
       :show-close="false"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
@@ -783,7 +789,7 @@ import {
   belongUsers,
   belongUsers,
   editBelong
   editBelong
 } from '@/api/order/examine'
 } from '@/api/order/examine'
-import { getUserAddress, updateOrderAddress, addUserAddress } from '@/api/order/common'
+import { getUserAddress, updateOrderAddress, addUserAddress, publishBindBelong } from '@/api/order/common'
 // money
 // money
 import { parseMoney } from '@/utils/index'
 import { parseMoney } from '@/utils/index'
 // level
 // level
@@ -793,9 +799,10 @@ const isMoney = /^\d+(\.\d{1,2})?$/
 // 组件
 // 组件
 import MIXIN_CHANGGOODLIST from './mixin/changGoodList'
 import MIXIN_CHANGGOODLIST from './mixin/changGoodList'
 import ChangeGoodList from './components/ChangeGoodList'
 import ChangeGoodList from './components/ChangeGoodList'
-import VDistpicker from 'v-distpicker'
+// import VDistpicker from 'v-distpicker'
+import provinces from '@/assets/json/provinces'
 export default {
 export default {
-  components: { ChangeGoodList, VDistpicker },
+  components: { ChangeGoodList },
   filters: {
   filters: {
     levelName(level) {
     levelName(level) {
       let out
       let out
@@ -866,6 +873,8 @@ export default {
       roles: this.$route.meta.buttonAuthList ? this.$route.meta.buttonAuthList : [],
       roles: this.$route.meta.buttonAuthList ? this.$route.meta.buttonAuthList : [],
       loadingFull: false,
       loadingFull: false,
       tabIndex: '1',
       tabIndex: '1',
+      edit: false,
+      provinces: provinces,
       dialog: {
       dialog: {
         remark: false,
         remark: false,
         receive: false,
         receive: false,
@@ -883,6 +892,7 @@ export default {
       addressForm: {
       addressForm: {
         name: '',
         name: '',
         mobile: '',
         mobile: '',
+        areaAll: '',
         provice: '',
         provice: '',
         city: '',
         city: '',
         area: '',
         area: '',
@@ -997,22 +1007,41 @@ export default {
         type: 'warning'
         type: 'warning'
       }).then(() => {
       }).then(() => {
         const loading = this.$loading()
         const loading = this.$loading()
-        editBelong({
-          id: this.belongId,
-          order_num: this.orderDetail.order_num
-        }).then(res => {
-          loading.close()
-          if (res.code === 200) {
-            this.$message.success('修改订单所属成功')
-            this.resetBelong()
-            this.getDetail()
-          } else {
-            this.$message.error(res.message || '修改订单所属失败')
-          }
-        }).catch(() => {
-          loading.close()
-          this.$message.error('修改订单所属失败')
-        })
+        if (this.edit === true) {
+          editBelong({
+            id: this.belongId,
+            order_num: this.orderDetail.order_num
+          }).then(res => {
+            loading.close()
+            if (res.code === 200) {
+              this.$message.success('修改订单所属成功')
+              this.resetBelong()
+              this.getDetail()
+            } else {
+              this.$message.error(res.message || '修改订单所属失败')
+            }
+          }).catch(() => {
+            loading.close()
+            this.$message.error('修改订单所属失败')
+          })
+        } else {
+          publishBindBelong({
+            belong_id: this.belongId,
+            id: this.addressId
+          }).then(res => {
+            loading.close()
+            if (res.code === 200) {
+              this.$message.success('绑定订单所属成功')
+              this.getUserAddress()
+              this.dialog.belong = false
+            } else {
+              this.$message.error(res.message || '绑定订单所属失败')
+            }
+          }).catch(() => {
+            loading.close()
+            this.$message.error('绑定订单所属失败')
+          })
+        }
       }).catch(() => {})
       }).catch(() => {})
     },
     },
     changeBelongPagination({ page, limit }) { // 所属者分页
     changeBelongPagination({ page, limit }) { // 所属者分页
@@ -1537,15 +1566,16 @@ export default {
       this.addressForm.city = item.city
       this.addressForm.city = item.city
       this.addressForm.area = item.area
       this.addressForm.area = item.area
       this.addressForm.address = item.address
       this.addressForm.address = item.address
+      this.addressForm.areaAll = [item.provice, item.city, item.area]
       this.address_type = false
       this.address_type = false
       this.dialog.add_address = true
       this.dialog.add_address = true
     },
     },
     // 修改地址
     // 修改地址
     submitEditAddress() {
     submitEditAddress() {
-      const { name, mobile, provice, city, area, address } = this.addressForm
+      const { name, mobile, provice, areaAll, city, area, address } = this.addressForm
       if (name && mobile && provice && city && area && address) {
       if (name && mobile && provice && city && area && address) {
         this.loadingFull = true
         this.loadingFull = true
-        updateOrderAddress({ address_id: this.addressId, name, mobile, province: provice, city, area, address }).then(res => {
+        updateOrderAddress({ address_id: this.addressId, name, mobile, province: areaAll[0], city: areaAll[1], area: areaAll[2], address }).then(res => {
           this.loadingFull = false
           this.loadingFull = false
           if (res.code === 200) {
           if (res.code === 200) {
             this.dialog.add_address = false
             this.dialog.add_address = false
@@ -1588,7 +1618,21 @@ export default {
         this.$message.error('请选择收货地址')
         this.$message.error('请选择收货地址')
         return false
         return false
       }
       }
-      this.loadingFull = true
+      // this.loadingFull = true
+      const belong_user = this.addressList.filter(item => Number(item.id) === Number(this.addressId))[0].belong_user
+      if (!belong_user) {
+        this.$confirm('该地址暂未绑定所属者, 请先绑定所属者?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.getBelongUser(() => {
+            this.dialog.belong = true
+          })
+          this.edit = false
+        }).catch(() => {})
+        return false
+      }
       editOrderAddress({
       editOrderAddress({
         address_id: this.addressId,
         address_id: this.addressId,
         order_id: this.orderDetail.id
         order_id: this.orderDetail.id

+ 22 - 12
src/pages/order/examine2.vue

@@ -115,21 +115,30 @@
             <el-form label-width="100px">
             <el-form label-width="100px">
               <el-form-item label="收货信息" class="other_address">
               <el-form-item label="收货信息" class="other_address">
                 <i class="el-icon-edit-outline cur" @click="getUserAddress" />
                 <i class="el-icon-edit-outline cur" @click="getUserAddress" />
-                <span>代理名称: {{ orderDetail.get_user && orderDetail.get_user.nickname }}</span>
+                <!-- <span>代理名称: {{ orderDetail.get_user && orderDetail.get_user.nickname }}</span> -->
                 <span>
                 <span>
                   收货人: {{ orderDetail.get_address && orderDetail.get_address.username }}
                   收货人: {{ orderDetail.get_address && orderDetail.get_address.username }}
                 </span>
                 </span>
                 <span>联系方式: {{ orderDetail.get_address && orderDetail.get_address.mobile }}</span>
                 <span>联系方式: {{ orderDetail.get_address && orderDetail.get_address.mobile }}</span>
                 <span>收货地址: {{ orderDetail.get_address && `${orderDetail.get_address.province}${orderDetail.get_address.city}${orderDetail.get_address.town}${orderDetail.get_address.address}` }}</span>
                 <span>收货地址: {{ orderDetail.get_address && `${orderDetail.get_address.province}${orderDetail.get_address.city}${orderDetail.get_address.town}${orderDetail.get_address.address}` }}</span>
               </el-form-item>
               </el-form-item>
-              <el-form-item
+              <el-form-item label="所属信息:">
+                <template v-if="orderDetail.belong_user">
+                  <i class="el-icon-edit-outline cur" @click="getBelongUser" />
+                  <span>昵称: {{ orderDetail.belong_user && orderDetail.belong_user.nickname }}</span>
+                  <span>姓名: {{ orderDetail.belong_user && orderDetail.belong_user.realname }}</span>
+                  <span>手机号: {{ orderDetail.belong_user && orderDetail.belong_user.mobile }}</span>
+                </template>
+                <span v-else>该订单暂无所属者</span>
+              </el-form-item>
+              <!-- <el-form-item
                 v-if="orderDetail.get_address && (orderDetail.get_address.nickname || orderDetail.get_address.level)"
                 v-if="orderDetail.get_address && (orderDetail.get_address.nickname || orderDetail.get_address.level)"
                 label=""
                 label=""
                 class="other_address"
                 class="other_address"
               >
               >
                 <span>收货人昵称: <span style="color:red">{{ orderDetail.get_address && orderDetail.get_address.nickname }}</span></span>
                 <span>收货人昵称: <span style="color:red">{{ orderDetail.get_address && orderDetail.get_address.nickname }}</span></span>
                 <span>收货人等级: <span style="color:red">{{ (orderDetail.get_address && orderDetail.get_address.level) | levelName }}</span></span>
                 <span>收货人等级: <span style="color:red">{{ (orderDetail.get_address && orderDetail.get_address.level) | levelName }}</span></span>
-              </el-form-item>
+              </el-form-item> -->
               <el-form-item label="备注说明">
               <el-form-item label="备注说明">
                 <div class="remark_container">
                 <div class="remark_container">
                   <i class="el-icon-edit-outline cur" @click="dialog.remark = true" />
                   <i class="el-icon-edit-outline cur" @click="dialog.remark = true" />
@@ -143,15 +152,6 @@
                   <div v-else>无</div>
                   <div v-else>无</div>
                 </div>
                 </div>
               </el-form-item>
               </el-form-item>
-              <el-form-item label="所属者信息:">
-                <template v-if="orderDetail.belong_user">
-                  <i class="el-icon-edit-outline cur" @click="getBelongUser" />
-                  <span>昵称: {{ orderDetail.belong_user && orderDetail.belong_user.nickname }}</span>
-                  <span>姓名: {{ orderDetail.belong_user && orderDetail.belong_user.realname }}</span>
-                  <span>手机号: {{ orderDetail.belong_user && orderDetail.belong_user.mobile }}</span>
-                </template>
-                <span v-else>该订单暂无所属者</span>
-              </el-form-item>
               <el-form-item label="赠品信息">
               <el-form-item label="赠品信息">
                 <ul class="zengpin_list">
                 <ul class="zengpin_list">
                   <li v-for="item in orderDetail.get_order_gift" v-show="item.pivot && item.pivot.num > 0" :key="item.id">
                   <li v-for="item in orderDetail.get_order_gift" v-show="item.pivot && item.pivot.num > 0" :key="item.id">
@@ -436,6 +436,7 @@
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       width="520px"
       width="520px"
       class="dialog_remark"
       class="dialog_remark"
+      append-to-body
     >
     >
       <el-input v-model="remark.order" type="textarea" class="textarea_h" maxlength="250" show-word-limit />
       <el-input v-model="remark.order" type="textarea" class="textarea_h" maxlength="250" show-word-limit />
       <div class="dialog_btn_box">
       <div class="dialog_btn_box">
@@ -450,6 +451,7 @@
       :show-close="false"
       :show-close="false"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       class="dialog_receive"
       class="dialog_receive"
+      append-to-body
     >
     >
       <p class="title_1">待支付:{{ parseMoney(orderDetail && orderDetail.no_pay_money) }}</p>
       <p class="title_1">待支付:{{ parseMoney(orderDetail && orderDetail.no_pay_money) }}</p>
       <div class="title_2">
       <div class="title_2">
@@ -491,6 +493,7 @@
       :show-close="false"
       :show-close="false"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       class="dialog_spending"
       class="dialog_spending"
+      append-to-body
     >
     >
       <el-form ref="spendform" label-width="80px" :model="spendForm">
       <el-form ref="spendform" label-width="80px" :model="spendForm">
         <el-form-item label="物流日期" prop="track_time">
         <el-form-item label="物流日期" prop="track_time">
@@ -536,6 +539,7 @@
       :show-close="false"
       :show-close="false"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       class="dialog_spending"
       class="dialog_spending"
+      append-to-body
     >
     >
       <el-form ref="spendform" label-width="80px" :model="spendForm" :rules="spendRules">
       <el-form ref="spendform" label-width="80px" :model="spendForm" :rules="spendRules">
         <el-form-item label="物流日期" prop="track_time">
         <el-form-item label="物流日期" prop="track_time">
@@ -582,6 +586,7 @@
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       class="dialog_remark dialog_void"
       class="dialog_remark dialog_void"
       width="520px"
       width="520px"
+      append-to-body
     >
     >
       <p>确认将订货单<span class="red">{{ orderDetail && orderDetail.order_num }}</span>作废 ? 订单作废后状态不可回退 ,<span class="red">如有关联的出库单将一并作废,相应的库存将退回原有仓库。</span> 如确定作废,请填写作废原因 :</p>
       <p>确认将订货单<span class="red">{{ orderDetail && orderDetail.order_num }}</span>作废 ? 订单作废后状态不可回退 ,<span class="red">如有关联的出库单将一并作废,相应的库存将退回原有仓库。</span> 如确定作废,请填写作废原因 :</p>
       <el-form>
       <el-form>
@@ -631,6 +636,7 @@
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       class="dialog_remark dialog_back"
       class="dialog_remark dialog_back"
       width="520px"
       width="520px"
+      append-to-body
     >
     >
       <p>确认将订货单{{ orderDetail && orderDetail.order_num }}退回 ? 如确定退回,请填写退回原因 :</p>
       <p>确认将订货单{{ orderDetail && orderDetail.order_num }}退回 ? 如确定退回,请填写退回原因 :</p>
       <el-input v-model="remark.back" type="textarea" class="textarea_h" />
       <el-input v-model="remark.back" type="textarea" class="textarea_h" />
@@ -647,6 +653,7 @@
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       class="dialog_remark dialog_outStock"
       class="dialog_remark dialog_outStock"
       width="520px"
       width="520px"
+      append-to-body
     >
     >
       <div class="goods">
       <div class="goods">
         <p>商品种类: 1</p>
         <p>商品种类: 1</p>
@@ -664,6 +671,7 @@
       :show-close="false"
       :show-close="false"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       class="dialog_address"
       class="dialog_address"
+      append-to-body
     >
     >
       <div slot="title" class="title">
       <div slot="title" class="title">
         <span class="label">修改收货地址</span>
         <span class="label">修改收货地址</span>
@@ -700,6 +708,7 @@
       :visible.sync="dialog.add_address"
       :visible.sync="dialog.add_address"
       :show-close="false"
       :show-close="false"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
+      append-to-body
     >
     >
       <el-form label-width="80px">
       <el-form label-width="80px">
         <el-form-item label="收货人:">
         <el-form-item label="收货人:">
@@ -728,6 +737,7 @@
       :show-close="false"
       :show-close="false"
       :close-on-click-modal="false"
       :close-on-click-modal="false"
       class="dialog_address"
       class="dialog_address"
+      append-to-body
     >
     >
       <div style="padding: 20px;padding-top: 0;">
       <div style="padding: 20px;padding-top: 0;">
         <el-input
         <el-input

+ 177 - 19
src/pages/order/list.vue

@@ -47,17 +47,19 @@
         <el-button v-permit="0" :roles-permit="roles" type="primary" class="bg1" @click="machExamine(0)">订单审核</el-button>
         <el-button v-permit="0" :roles-permit="roles" type="primary" class="bg1" @click="machExamine(0)">订单审核</el-button>
         <el-button v-permit="1" :roles-permit="roles" type="primary" class="bg2" @click="machExamine(1)">财务审核</el-button>
         <el-button v-permit="1" :roles-permit="roles" type="primary" class="bg2" @click="machExamine(1)">财务审核</el-button>
         <el-button v-permit="2" :roles-permit="roles" type="primary" class="bg3" @click="machExamine(2)">发货审核</el-button>
         <el-button v-permit="2" :roles-permit="roles" type="primary" class="bg3" @click="machExamine(2)">发货审核</el-button>
-        <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" icon="el-icon-download" @click="dialog.export_order = true">导出</el-button>
-        <el-button v-permit="2" :roles-permit="roles" type="primary" icon="el-icon-upload2" @click="dialog.import_wuliu = true">导入</el-button>
-        <el-button v-permit="2" :roles-permit="roles" type="primary" icon="el-icon-refresh" @click="dialog.import_wuliunew = true">物流更新</el-button>
+        <el-button v-permit="3" :roles-permit="roles" type="primary" @click="showMergeOrder">合并订单</el-button>
+        <!-- <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" icon="el-icon-download" @click="dialog.export_order = true">导出</el-button> -->
+        <el-button v-permit="2" :roles-permit="roles" type="primary" icon="el-icon-upload2" @click="dialog.lead_order = true">导入</el-button>
+        <!-- <el-button v-permit="2" :roles-permit="roles" type="primary" icon="el-icon-refresh" @click="dialog.import_wuliunew = true">物流更新</el-button> -->
         <!-- <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" :loading="downloadLoading" icon="el-icon-document" class="filter-item" @click="exportOrder">导出订单信息</el-button>
         <!-- <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" :loading="downloadLoading" icon="el-icon-document" class="filter-item" @click="exportOrder">导出订单信息</el-button>
         <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" :loading="downloadLoading" icon="el-icon-document" class="filter-item" @click="exporOrdertOrder">导出拆单信息</el-button> -->
         <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" :loading="downloadLoading" icon="el-icon-document" class="filter-item" @click="exporOrdertOrder">导出拆单信息</el-button> -->
         <!-- <el-button v-permit="2" :roles-permit="roles" type="primary" :loading="downloadLoading" icon="el-icon-document" class="filter-item" @click="exportTemp">物流模板</el-button>
         <!-- <el-button v-permit="2" :roles-permit="roles" type="primary" :loading="downloadLoading" icon="el-icon-document" class="filter-item" @click="exportTemp">物流模板</el-button>
         <el-button v-permit="2" :roles-permit="roles" type="primary" :loading="downloadLoading" icon="el-icon-document" class="filter-item">导入物流</el-button> -->
         <el-button v-permit="2" :roles-permit="roles" type="primary" :loading="downloadLoading" icon="el-icon-document" class="filter-item">导入物流</el-button> -->
-        <el-button v-permit="3" :roles-permit="roles" type="primary" @click="showMergeOrder">合并订单</el-button>
+        <!-- <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" @click="exportOrder">导出订单数据</el-button>
+        <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" @click="exporOrdertOrder">导出拆单数据</el-button> -->
+        <el-button v-permit="[0,1,2]" :roles-permit="roles" type="primary" icon="el-icon-download" @click="dialog.export_order = true">导出</el-button>
       </div>
       </div>
     </div>
     </div>
-
     <!-- 合并订单 -->
     <!-- 合并订单 -->
     <el-dialog
     <el-dialog
       title="合并订单"
       title="合并订单"
@@ -550,7 +552,7 @@
         <el-button type="primary" @click="addStoreOrder">确定</el-button>
         <el-button type="primary" @click="addStoreOrder">确定</el-button>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
-    <el-dialog title="导入数据" :visible.sync="dialog.import_wuliu" :before-close="resetImport">
+    <el-dialog title="导入单号" :visible.sync="dialog.import_wuliu" :before-close="resetImport">
       <div class="upload-main" style="height:400px">
       <div class="upload-main" style="height:400px">
         <!-- <div class="upload-container">
         <!-- <div class="upload-container">
           <el-button type="text" class="download" style="color: #606266; cursor: auto">导入类型</el-button>
           <el-button type="text" class="download" style="color: #606266; cursor: auto">导入类型</el-button>
@@ -584,7 +586,7 @@
       </div>
       </div>
     </el-dialog>
     </el-dialog>
     <!-- 更新物流 -->
     <!-- 更新物流 -->
-    <el-dialog title="更新物流" :visible.sync="dialog.import_wuliunew" :before-close="resetImportnew">
+    <el-dialog title="修改单号" :visible.sync="dialog.import_wuliunew" :before-close="resetImportnew">
       <div class="upload-main" style="height:400px">
       <div class="upload-main" style="height:400px">
         <div class="upload-container">
         <div class="upload-container">
           <el-button type="text" class="download" @click="exportTempnew">物流模板</el-button>
           <el-button type="text" class="download" @click="exportTempnew">物流模板</el-button>
@@ -608,17 +610,20 @@
         </div>
         </div>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
-    <el-dialog title="导出订单数据" :visible.sync="dialog.export_order" width="520px">
+    <el-dialog title="导出数据" :visible.sync="dialog.export_order" width="520px">
       <el-form label-width="120">
       <el-form label-width="120">
         <el-form-item label="导出类型">
         <el-form-item label="导出类型">
-          <el-select v-model="dialog.export_order_type" style="width: 350px">
-            <el-option label="导出订单数据" value="0" />
-            <el-option label="导出拆单数据" value="1" />
-          </el-select>
+          <el-button type="primary" @click="exportOrder">订单明细</el-button>
+          <el-button type="primary" @click="exporOrdertOrder">拆单明细</el-button>
+          <el-button type="primary" @click="exportMoney">订单金额</el-button>
         </el-form-item>
         </el-form-item>
-        <el-form-item>
-          <el-button size="small" @click="dialog.export_order = false">取消</el-button>
-          <el-button size="small" type="primary" @click="toExportOrder">导出</el-button>
+      </el-form>
+    </el-dialog>
+    <el-dialog title="导入" :visible.sync="dialog.lead_order" width="520px">
+      <el-form label-width="120">
+        <el-form-item label="导入类型">
+          <el-button type="primary" @click="dialog.import_wuliu = true">导入单号</el-button>
+          <el-button type="primary" @click="dialog.import_wuliunew = true">修改单号</el-button>
         </el-form-item>
         </el-form-item>
       </el-form>
       </el-form>
     </el-dialog>
     </el-dialog>
@@ -629,7 +634,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { getList, orderPass, orderreJect, downOrder, toExport, orderSpend, UpdateExpress, highSearch, machAuditOrder, getStore, addStoreOrder, cancelStoreOrder, toMergeOrder, mergeOrderInfo } from '@/api/order/list'
+import { getList, orderPass, orderreJect, downOrder, toExport, orderSpend, UpdateExpress, highSearch, machAuditOrder, getStore, addStoreOrder, cancelStoreOrder, toMergeOrder, mergeOrderInfo, downList } from '@/api/order/list'
 import { cancelOrder } from '@/api/order/common'
 import { cancelOrder } from '@/api/order/common'
 import { orderStatus, payStatus } from '@/filters/common'
 import { orderStatus, payStatus } from '@/filters/common'
 import ChangeAddress from './components/ChangeAddress'
 import ChangeAddress from './components/ChangeAddress'
@@ -689,6 +694,7 @@ const moduleList = {
 export default {
 export default {
   name: 'OrderList',
   name: 'OrderList',
   components: { ChangeAddress, VDistpicker, examine },
   components: { ChangeAddress, VDistpicker, examine },
+  // examine
   data() {
   data() {
     const receiveMoney = (rule, value, cb) => {
     const receiveMoney = (rule, value, cb) => {
       if (!value) {
       if (!value) {
@@ -781,6 +787,7 @@ export default {
       ],
       ],
       dialog: {
       dialog: {
         spending: false,
         spending: false,
+        lead_order: false,
         export: false,
         export: false,
         express: false,
         express: false,
         receive: false,
         receive: false,
@@ -1229,8 +1236,12 @@ export default {
       this.loadingFull = true
       this.loadingFull = true
       try {
       try {
         this.$request(orderSpend(formdata), () => {
         this.$request(orderSpend(formdata), () => {
+          // if () {
+
+          // }
           this.getList()
           this.getList()
           this.$message.success('上传成功')
           this.$message.success('上传成功')
+          this.dialog.lead_order = false
         })
         })
         // this.$request(sendOrder(formdata), () => {
         // this.$request(sendOrder(formdata), () => {
         //   this.getList()
         //   this.getList()
@@ -1255,10 +1266,10 @@ export default {
         this.$request(UpdateExpress(formdata), () => {
         this.$request(UpdateExpress(formdata), () => {
           this.getList()
           this.getList()
           this.$message.success('上传成功')
           this.$message.success('上传成功')
+          this.dialog.lead_order = false
         })
         })
-
         this.resetImportnew()
         this.resetImportnew()
-        this.$message.success('上传成功')
+        // this.$message.success('上传成功')
         this.getList()
         this.getList()
         // this.$request(sendOrder(formdata), () => {
         // this.$request(sendOrder(formdata), () => {
         //   this.getList()
         //   this.getList()
@@ -1487,6 +1498,146 @@ export default {
         })
         })
       }
       }
     },
     },
+    // 订单金额
+    exportMoney() {
+      if (this.chooseList.length) {
+        // this.$request(downList({ id: this.chooseList.map(e => e.id) }), (res) => {
+        //   this.expressData = res
+        //   const exportData = this.getExportModule()
+        //   import('@/vendor/Export2Excel').then(excel => {
+        //     excel.export_json_to_excel({
+        //       header: Object.keys(moduleList),
+        //       data: exportData.map(listItem => Object.keys(exportData[0]).map(j => listItem[j])),
+        //       filename: `${new Date().toLocaleDateString()}快递单导出`,
+        //       bookType: 'xlsx',
+        //       isCSV: true
+        //     })
+        //     this.dialog.export_order = false
+        //   })
+        // })
+        this.$request(downList({ id: this.chooseList.map(e => e.id) }), (res) => {
+          const exportData = res.list
+          import('@/vendor/Export2Excel').then(excel => {
+            const header = ['序号', '下单时间', '所属政委', '下单人昵称', '下单人姓名', '订单状态', '支付状态', '数量合计', '订单总额', '所属者姓名', '所属者手机号', '所属体验店', '收货人', '联系方式', '收货地址', '订单备注']
+            const exportK = ['index', 'updated_at', 'admin_name', 'nickname', 'realname', 'status', 'pay_status', 'total', 'money', 'belong_realname', 'belong_mobile', 'get_store', 'username', 'mobile', 'address', 'remark']
+            const exportV = exportData.map((item, i) => {
+              const obj = {
+                index: i + 1,
+                updated_at: item.updated_at || '',
+                admin_name: item.get_user && item.get_user.warea && item.get_user.warea.admin_name,
+                nickname: item.get_user.nickname || '',
+                realname: item.get_user.realname || '',
+                status: orderStatus(item.status).name || '',
+                pay_status: payStatus(item.pay_status).name,
+                total: item.total || '',
+                money: item.money || '',
+                get_store: item.get_store && item.get_store.name,
+                username: item.get_address.username || '',
+                mobile: +item.get_address.mobile,
+                belong_realname: item.belong_user && item.belong_user.realname,
+                belong_mobile: item.belong_user && item.belong_user.mobile,
+                address: item.get_address.province + item.get_address.city + item.get_address.town + item.get_address.address,
+                remark: item.remark || ''
+              }
+              return obj
+            })
+            const exportD = exportV.map(item => exportK.map(k => item[k]))
+            excel.export_json_to_excel({
+              header,
+              data: exportD,
+              filename: `${formatter(new Date(), 'yyyy-MM-dd')}订单金额`,
+              autoWidth: true,
+              bookType: 'xlsx'
+            })
+            this.dialog.export_order = false
+          })
+        })
+      } else {
+        let query = {}
+        if (!this.highSearchFlag) {
+          const { order_status, order_no, page_index, page_size, search_name, time, activity_id } = this.listQuery
+          query = {
+            order_status, order_no, page_index, page_size, search_name,
+            start_time: time.length > 0 ? time[0] : '',
+            end_time: time.length > 0 ? time[1] : '',
+            activity_id
+          }
+        } else {
+          let order_status
+          let pay_status
+          try {
+            order_status = this.$refs.status_tree.getCheckedKeys()
+            if (order_status.indexOf(-1) !== -1) order_status = [-1]
+            pay_status = this.$refs.pay_status_tree.getCheckedKeys()
+            if (pay_status.indexOf(-1) !== -1) pay_status = [-1]
+          } catch (e) {
+            order_status = []
+            pay_status = []
+          }
+          const { page_index, page_size, order_num, time, name, address, good, type, provice, city, area, activity_id } = this.exportForm
+          query = {
+            page_index,
+            page_size,
+            order_no: order_num,
+            start_time: time.length > 0 ? time[0] : '',
+            end_time: time.length > 0 ? time[1] : '',
+            user_name: name,
+            receive_info: address,
+            goods_info: good,
+            order_status,
+            pay_status,
+            order_type: type,
+            provice: provice || '',
+            city: city || '',
+            area: area || '',
+            activity_id
+          }
+        }
+        this.$request(downList(query), (res) => {
+          // console.log(res.data)
+          const exportData = res.list
+          // console.log(exportData)
+              import('@/vendor/Export2Excel').then(excel => {
+                const header = ['序号', '下单时间', '所属政委', '下单人昵称', '下单人姓名', '订单状态', '支付状态', '数量合计', '订单总额', '所属者姓名', '所属者手机号', '所属体验店', '收货人', '联系方式', '收货地址', '订单备注']
+                const exportK = ['index', 'updated_at', 'admin_name', 'nickname', 'realname', 'status', 'pay_status', 'total', 'money', 'belong_realname', 'belong_mobile', 'get_store', 'username', 'mobile', 'address', 'remark']
+                // if(+this.collect == false) {
+                //     header.splice(12,1)
+                //     exportK.splice(12,1)
+                //   }
+                const exportV = exportData.map((item, i) => {
+                  const obj = {
+                    index: i + 1,
+                    updated_at: item.updated_at || '',
+                    admin_name: item.get_user && item.get_user.warea && item.get_user.warea.admin_name,
+                    nickname: item.get_user.nickname || '',
+                    realname: item.get_user.realname || '',
+                    status: orderStatus(item.status).name || '',
+                    pay_status: payStatus(item.pay_status).name,
+                    total: item.total || '',
+                    money: item.money || '',
+                    username: item.get_address.username || '',
+                    get_store: item.get_store && item.get_store.name,
+                    mobile: +item.get_address.mobile,
+                    belong_realname: item.belong_user && item.belong_user.realname,
+                    belong_mobile: item.belong_user && item.belong_user.mobile,
+                    address: item.get_address.province + item.get_address.city + item.get_address.town + item.get_address.address,
+                    remark: item.remark || ''
+                  }
+                  return obj
+                })
+                const exportD = exportV.map(item => exportK.map(k => item[k]))
+                excel.export_json_to_excel({
+                  header,
+                  data: exportD,
+                  filename: `${formatter(new Date(), 'yyyy-MM-dd')}订单金额`,
+                  autoWidth: true,
+                  bookType: 'xlsx'
+                })
+                this.dialog.export_order = false
+              })
+        })
+      }
+    },
     // 导出拆单
     // 导出拆单
     async exporOrdertOrder() {
     async exporOrdertOrder() {
       if (this.chooseList.length) {
       if (this.chooseList.length) {
@@ -1770,6 +1921,7 @@ export default {
       }
       }
       return out
       return out
     },
     },
+    getExportMoney() {},
     formatJson(filterVal, jsonData) {
     formatJson(filterVal, jsonData) {
       return jsonData.map(v => filterVal.map(j => {
       return jsonData.map(v => filterVal.map(j => {
         return v[j]
         return v[j]
@@ -1889,7 +2041,13 @@ export default {
             this.loadingFull = false
             this.loadingFull = false
             if (res.code === 200) {
             if (res.code === 200) {
               if (!this.highSearchFlag) {
               if (!this.highSearchFlag) {
-                this.getList()
+                const index = Math.ceil(this.tableTotal / this.listQuery.page_size)
+                if (this.listQuery.page_index === index) {
+                  this.listQuery.page_index = this.listQuery.page_index - 1
+                  this.getList()
+                } else {
+                  this.getList()
+                }
               } else {
               } else {
                 this.submitExport()
                 this.submitExport()
               }
               }

+ 3 - 3
src/pages/stock/statistics.vue

@@ -2,14 +2,14 @@
   <div class="app-container">
   <div class="app-container">
     <div v-loading.fullscreen.lock="loadingFull" />
     <div v-loading.fullscreen.lock="loadingFull" />
 
 
-    <div v-if="this.activeName !== 'fourth'" class="top">
+    <div v-if="activeName !== 'fourth'" class="top">
       <el-input
       <el-input
         v-model="search_content"
         v-model="search_content"
         placeholder="请输入代理公司昵称/手机号"
         placeholder="请输入代理公司昵称/手机号"
         style="width: 250px"
         style="width: 250px"
       />
       />
       <el-date-picker
       <el-date-picker
-        v-if="this.activeName == 'first'"
+        v-if="activeName == 'first'"
         v-model="time"
         v-model="time"
         type="datetime"
         type="datetime"
         placeholder="选择日期时间"
         placeholder="选择日期时间"
@@ -214,7 +214,7 @@
         </template>
         </template>
       </el-tab-pane>
       </el-tab-pane>
     </el-tabs>
     </el-tabs>
-    <div v-if="this.activeName !== 'fourth'" class="batch-container">
+    <div v-if="activeName !== 'fourth'" class="batch-container">
       <pagination
       <pagination
         :total="tableTotal"
         :total="tableTotal"
         :limit="searchParams.page_size"
         :limit="searchParams.page_size"

+ 1 - 1
src/pages/team/zhengwei.vue

@@ -125,7 +125,7 @@
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
     <!-- 查看代理详情 -->
     <!-- 查看代理详情 -->
-    <el-drawer :title="`${memberInfo.realname} - ${levelStatus(memberInfo.level).name}`" :visible.sync="visible.memberInfo" direction="rtl" size="300px">
+    <el-drawer :title="`${memberInfo.realname} - ${levelStatus(memberInfo.level).name}`" :visible.sync="visible.memberInfo" direction="rtl" size="600px">
       <MemberInfo :info="memberInfo" :team-type="true" :show-num="roles.includes(6) || user.role_name === 'root'" @getOtherInfo="changeOtherInfo" />
       <MemberInfo :info="memberInfo" :team-type="true" :show-num="roles.includes(6) || user.role_name === 'root'" @getOtherInfo="changeOtherInfo" />
     </el-drawer>
     </el-drawer>
     <pagination
     <pagination

+ 5 - 5
src/utils/request.js

@@ -38,11 +38,11 @@ service.interceptors.response.use(
 
 
     // code不为200,请求错误
     // code不为200,请求错误
     if (res.code !== 200) {
     if (res.code !== 200) {
-      // Message({
-      //   message: res.message || 'Error',
-      //   type: 'error',
-      //   duration: 5 * 1000
-      // })
+      Message({
+        message: res.message || 'Error',
+        type: 'error',
+        duration: 5 * 1000
+      })
 
 
       // 400112登录过期
       // 400112登录过期
       if (res.code === 400112) {
       if (res.code === 400112) {