Browse Source

1、售后优化

huangmp 1 year ago
parent
commit
6ba93eb977

+ 3 - 3
src/components/canvas-preview/index.vue

@@ -84,9 +84,9 @@
     },
     methods: {
       openCanvas(){
-        this.initCanvas();
-        this.drawImage();
-        this.addMouseListeners();
+        // this.initCanvas();
+        // this.drawImage();
+        // this.addMouseListeners();
       },
       init(cardItem, previewPicUrl, prodType, side){
         this.visible = true;

+ 1 - 1
src/components/yuyin-preview/index.vue

@@ -158,7 +158,7 @@
         })
       },
       openCanvas(){
-        this.initCanvas();
+        // this.initCanvas();
         this.drawImage();
         this.addMouseListeners();
       },

+ 3 - 1
src/router/index.js

@@ -57,8 +57,10 @@ const mainRoutes = {
     if (!authorization || !/\S/.test(authorization)) {
       clearLoginInfo()
       next({ name: 'login' })
+    }else{
+      next()
     }
-    next()
+
   }
 }
 

+ 2 - 2
src/views/common/imBox.vue

@@ -481,7 +481,7 @@ export default {
         if (this.$route.query.orderNumber && this.$route.query.userId && !this.friends.length) {
           this.getNewUser()
         }
-        this.openWs()
+        // this.openWs()
       }
       this.userPages = data.pages
     },
@@ -787,7 +787,7 @@ export default {
             if (this.lockReconnect) return
             this.lockReconnect = true
             setTimeout(() => {     // 没连接上会一直重连,设置延迟避免请求过多
-              this.openWs()
+              // this.openWs()
               this.lockReconnect = false
             }, 2000)
           } else {

+ 2 - 2
src/views/main-navbar.vue

@@ -180,7 +180,7 @@ export default {
     this.updateWebConfigData()
     // this.getDataList()
     if (process.env.VUE_APP_WS_IM_API && isAuth('message:message:view')) {
-      this.openWs()
+      // this.openWs()
     }
   },
   methods: {
@@ -338,7 +338,7 @@ export default {
             if (this.lockReconnect) return
             this.lockReconnect = true
             setTimeout(() => {     // 没连接上会一直重连,设置延迟避免请求过多
-              this.openWs()
+              // this.openWs()
               this.lockReconnect = false
             }, 2000)
           } else {

+ 15 - 7
src/views/modules/afterSales/returnDelivery.vue

@@ -4,13 +4,13 @@
     <div class="search-bar">
       <el-form :inline="true" class="search-form" ref="searchForm" :model="searchForm" label-width="auto" size="small">
         <div class="input-row">
-          <el-form-item label="打印渠道" class="search-form-item">
+          <!--<el-form-item label="打印渠道" class="search-form-item">
             <el-select v-model="searchForm.printChannel" clearable>
               <el-option key="KuaiYin" label="快印" value="KuaiYin"></el-option>
               <el-option key="WoNiu" label="蜗牛" value="WoNiu"></el-option>
               <el-option key="Lightning" label="闪电" value="Lightning"></el-option>
             </el-select>
-          </el-form-item>
+          </el-form-item>-->
           <el-form-item label="订单号" class="search-form-item">
             <el-input type="text" clearable v-model="searchForm.orderNumber" placeholder="订单号"></el-input>
           </el-form-item>
@@ -62,6 +62,13 @@
             </template>
           </el-table-column>
           <!-- 订单号 -->
+          <el-table-column label="打印渠道" prop="shopId" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.printChannel === 'KuaiYin'">快印</span>
+              <span v-if="scope.row.printChannel === 'Lightning'">闪电</span>
+            </template>
+          </el-table-column>
+          <!-- 订单号 -->
           <el-table-column label="订单号" prop="orderNumber" align="center" width="200">
             <template slot-scope="scope">
               <span>{{ scope.row.orderNumber}}</span>
@@ -117,12 +124,12 @@
             </template>
           </el-table-column>
           <!-- 备注 -->
-          <el-table-column label="发件地址" prop="remark" align="center">
+          <el-table-column label="发件地址" prop="sender" align="center">
             <template slot-scope="scope">
               <el-tooltip placement="top">
                 <div slot="content">{{scope.row.senderAddress}}</div>
                 <span v-if="scope.row.senderAddress && scope.row.senderAddress.length > 20">{{scope.row.senderAddress.substr(0, 20) }}</span>
-                <span v-else>{{scope.row.senderAddress }}</span>
+                <span v-else></span>
               </el-tooltip>
             </template>
           </el-table-column>
@@ -231,8 +238,7 @@ export default {
             deliveryNo: this.searchForm.deliveryNo,
             receiverInfo: this.searchForm.receiverInfo,
             status: this.searchForm.status,
-            isPayed: this.searchForm.isPayed,
-            printChannel: (this.userId === 12 || this.userId === 13)? 'Lightning': null
+            isPayed: this.searchForm.isPayed
             },
             this.searchForm
           )
@@ -240,7 +246,9 @@ export default {
       }).then(({data}) => {
         let list = data.records
         list.forEach((item) => {
-          item['senderAddress'] = item.sender.senderName +"  " + item.sender.senderMobile + "  " + item.sender.senderProvince + item.sender.senderCity + item.sender.senderArea + item.sender.senderStreet + item.sender.senderAddr;
+          if(item.sender.senderProvince){
+            item['senderAddress'] = item.sender.senderName +"  " + item.sender.senderMobile + "  " + item.sender.senderProvince + item.sender.senderCity + item.sender.senderArea + item.sender.senderStreet + item.sender.senderAddr;
+          }
         })
         this.dataList = list
         this.dataList = data.records

+ 3 - 3
src/views/modules/afterSales/thirdAfterSales.vue

@@ -100,12 +100,12 @@
           row-class-name="table-row"
           style="width: 100%">
           <!-- 售后渠道 -->
-          <!--<el-table-column label="售后渠道" prop="printChannel" align="center">
+          <el-table-column label="售后渠道" prop="printChannel" align="center">
             <template slot-scope="scope">
               <span>{{scope.row.printChannel}}</span>
             </template>
-          </el-table-column>-->
-          <!-- 订单编号 -->
+          </el-table-column>
+           订单编号
           <el-table-column label="订单编号" prop="orderNumber" align="center" width="200px">
             <template slot-scope="scope">
               <span>{{ scope.row.orderNumber}}</span>

+ 10 - 6
src/views/modules/form/shopStat.vue

@@ -154,7 +154,11 @@
       }
     },
     created() {
-      this.getPlatformStatistics() // 获取首页的基本信息 今日待办 实时概况
+      // 开始时间
+      let startTime = moment().add(0, 'days').startOf('days').format('LL')
+      // 结束时间
+      let endTime = moment().add(0, 'days').endOf('days').format('LL')
+      this.getPlatformStatistics(startTime, endTime) // 获取首页的基本信息 今日待办 实时概况
       // let erd = elementResizeDetectorMaker()
       // erd.listenTo(document.getElementById('entirety-data-chart'), this.resizeFunc)
     },
@@ -164,13 +168,13 @@
       },
       handleCurrentChange(e) {
         this.getShopData(e)
-        this.hotShop.shopName = e.shopName
+        this.hotShop.shopName = e? e.shopName: ""
       },
       getShopData(e) {
         this.$http({
           url: this.$http.adornUrl('/platform/statistics/getShopStatistics'),
           params: {
-            shopId: e.shopId,
+            shopId: e? e.shopId : null,
             startTime: this.dataForm.startTime,
             endTime: this.dataForm.endTime
           },
@@ -182,13 +186,13 @@
           this.refundAmount = data.refundAmount
         })
       },
-      getPlatformStatistics() {
+      getPlatformStatistics(startTime, endTime) {
         this.$http({
           url: this.$http.adornUrl('/platform/statistics/getShopStatistics'),
           params: {
             shopId: this.dataForm.shopId,
-            startTime: this.dataForm.startTime,
-            endTime: this.dataForm.endTime
+            startTime: startTime? startTime : this.dataForm.startTime,
+            endTime: endTime? endTime : this.dataForm.endTime
           },
           method: 'GET'
         }).then(({data}) => {

+ 1 - 1
src/views/modules/order/mergeOrder.vue

@@ -1288,7 +1288,7 @@
        */
       getLogisticsList () {
         this.$http({
-          url: this.$http.adornUrl('/admin/delivery/list'),
+          url: this.$http.adornUrl('/platform/delivery/list'),
           method: 'get',
           params: this.$http.adornParams()
         }).then(({data}) => {

+ 3 - 3
src/views/modules/order/order-devy.vue

@@ -65,7 +65,7 @@ export default {
       this.dataForm.dvyId = dvyId || ''
       this.dataForm.dvyFlowId = dvyFlowId || ''
       this.$http({
-        url: this.$http.adornUrl('/admin/delivery/list'),
+        url: this.$http.adornUrl('/platform/delivery/list'),
         method: 'get',
         params: this.$http.adornParams()
       }).then(({ data }) => {
@@ -77,7 +77,7 @@ export default {
       this.$refs['dataForm'].validate((valid) => {
         if (valid) {
           this.$http({
-            url: this.$http.adornUrl(`/order/order/delivery`),
+            url: this.$http.adornUrl(`/platform/order/delivery`),
             method: 'put',
             data: this.$http.adornData({
               'orderNumber': this.dataForm.orderNumber
@@ -86,7 +86,7 @@ export default {
             this.$message({
               message: this.$i18n.t('remindPop.success'),
               type: 'success',
-              duration: 1500,
+              duration: 1000,
               onClose: () => {
                 this.visible = false
                 this.$emit('refreshDataList')

+ 3 - 3
src/views/modules/order/order.vue

@@ -219,7 +219,7 @@
         <el-checkbox @change="checked=>handleSelectAll(checked)" class="all-check-btn" v-model="selectAll">全选
         </el-checkbox>
         <span v-if="dataListSelections.size" class="had-selected">已选 {{ dataListSelections.size }}</span>
-        <el-button style="margin-left: 20px" size="small" type="primary"
+        <!--<el-button style="margin-left: 20px" size="small" type="primary"
                    @click="mergeOrder">
           合并订单
         </el-button>
@@ -240,7 +240,7 @@
           class="default-btn"
           @click="deliveryThirdBatch">
           批量发货
-        </div>
+        </div>-->
 
         <!-- 列标题 -->
         <div :class="['tit', showHeadScroll ? 'fixed-top' : '']">
@@ -651,7 +651,7 @@ export default {
     return {
       printChannel:null,
       orderCreateBatchLoading: false,
-      deliveryThirdBatch: false,
+      // deliveryThirdBatch: false,
       generatePrintPdfBatchVisible: false,
       orderCreateBatchVisible: false,
       productNumsRange:[],

+ 3 - 3
src/views/modules/order/refundOrderInfo.vue

@@ -518,9 +518,9 @@ export default {
       console.log('进来了')
       this.dataForm.refundId = id || 0
       this.dataForm.shopId = shopId || 0
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-      })
+      // this.$nextTick(() => {
+      //   this.$refs['dataForm'].resetFields()
+      // })
       this.refundDeliveryPhotos = []
       this.receiveMessage = ''
       this.isAgreeRefund = 2

+ 2 - 1
src/views/modules/platform/delivery-add-or-update.vue

@@ -83,7 +83,8 @@ export default {
         dvyNo: null,
         dvyNoHd: null,
         aliNo: null,
-        queryUrl: null
+        queryUrl: null,
+        shopId: nul
       },
       isSubmit: false,
       dataRule: {

+ 52 - 22
src/views/modules/print/print-scan-delivery.vue

@@ -11,7 +11,7 @@
           </el-option>
         </el-select>
       </el-col>
-      <el-col :span="3">
+      <!--<el-col :span="3">
         <el-select v-model="deviceNo" placeholder="请选择打印设备">
           <el-option
             v-for="(item,index) in deviceList"
@@ -20,7 +20,7 @@
             :value="item.deviceNo">
           </el-option>
         </el-select>
-      </el-col>
+      </el-col>-->
       <el-col :span="18">
         <el-input id="scanInput" @change="scanMatchPrintOrder" type="text" v-model="scanOrderNo" placeholder="请扫码二维码"></el-input>
       </el-col>
@@ -92,8 +92,9 @@
 
 <script>
 // import AddOrUpdate from './orderLogistics-add-or-update'
-import {autoConnect, disAutoConnect, hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint'
-import template from './yunda-template-data'
+import {autoConnect, disAutoConnect, hiprint} from 'vue-plugin-hiprint'
+import yundaTemplate from './yunda-template-data'
+import ztoTemplate from './zto-template-data'
 import printData from './yunda-print-data'
 autoConnect();
 hiprint.init();
@@ -110,9 +111,9 @@ export default {
       printOrder:{
         orderLogistics:{}
       },
-      logisticsList:[{logisticsName: "韵达速递", logisticsValue: "YUNDA"},{logisticsName: "申通快递", logisticsValue: "STO"}],
+      logisticsList:[],
       // logisticsList:[{logisticsName: "申通快递", logisticsValue: "STO"}],
-      logistics: "YUNDA",
+      logistics: "",
       deviceList: [],
       deviceNo: null,
       infoVisible:false,
@@ -127,21 +128,46 @@ export default {
     // AddOrUpdate
   },
   created () {
-    this.getDeviceList();
+    // this.getDeviceList();
+    this.getLogisticsList()
   },
   mounted () {
-    this.buildDesigner();
+    this.buildYundaDesigner();
+    this.buildZtoDesigner();
   },
   methods: {
-    buildDesigner(){
-      $("#hiprint-printTemplate").empty(); // 先清空, 避免重复构建
-      this.hiprintTemplate = new hiprint.PrintTemplate({
+    getLogisticsList(){
+      this.$http({
+        url: this.$http.adornUrl('/platform/logistics/getLogisticsList'),
+        method: 'GET',
+        params: this.$http.adornParams(),
+      }).then(({data}) => {
+        if(data){
+          this.logisticsList = data;
+        }
+      }).catch((error) => {
+
+      })
+    },
+    buildYundaDesigner(){
+      $("#yunda-hiprint-printTemplate").empty(); // 先清空, 避免重复构建
+      this.yundaHiprintTemplate = new hiprint.PrintTemplate({
+        // 如果使用 vue ref 创建的模板json, 需要使用 .value 获取 (确保内部能够使用 object.key 拿到对应数据就行)
+        template: yundaTemplate, // 模板json(object)
+        settingContainer: "#PrintElementOptionSetting", // 元素参数容器
+      });
+      // 构建 并填充到 容器中
+      this.yundaHiprintTemplate.design("#yunda-hiprint-printTemplate");
+    },
+    buildZtoDesigner(){
+      $("#zto-hiprint-printTemplate").empty(); // 先清空, 避免重复构建
+      this.ztoHiprintTemplate = new hiprint.PrintTemplate({
         // 如果使用 vue ref 创建的模板json, 需要使用 .value 获取 (确保内部能够使用 object.key 拿到对应数据就行)
-        template: template, // 模板json(object)
+        template: ztoTemplate, // 模板json(object)
         settingContainer: "#PrintElementOptionSetting", // 元素参数容器
       });
       // 构建 并填充到 容器中
-      this.hiprintTemplate.design("#hiprint-printTemplate");
+      this.ztoHiprintTemplate.design("#zto-hiprint-printTemplate");
     },
     getDeviceList(){
       this.$http({
@@ -163,9 +189,9 @@ export default {
       }else{
         substr = value;
       }
-      if(!this.deviceNo){
-        this.$message.error("请选择打印设备");
-      }
+      // if(!this.deviceNo){
+      //   this.$message.error("请选择打印设备");
+      // }
       if(substr){
         this.scanOrderNo = substr;
         let dataBody = {orderNumber: substr, deviceNo: this.deviceNo, logistics: this.logistics};
@@ -176,7 +202,7 @@ export default {
         }).then(({data}) => {
           if(data){
             this.getLogisticsInfo(this.scanOrderNo);
-            if(this.logistics === 'YUNDA'){
+            if(this.logistics === 'YUNDA' || this.logistics === 'ZTO'){
               if(!data.hadPrint){
                 //打印韵达面单
                 this.printWallbill(data.orderLogistics)
@@ -208,12 +234,16 @@ export default {
       })
     },
     printWallbill(logistics){
-      this.hiprintTemplate.print2(printData.value(logistics));
+      if(logistics.logistics === 'ZTO'){
+        this.ztoHiprintTemplate.print2(printData.value(logistics));
+      }else if(logistics.logistics === 'YUNDA'){
+        this.yundaHiprintTemplate.print2(printData.value(logistics));
+      }
     },
     handlePrintOrder(){
-      if(!this.deviceNo){
-        this.$message.error("请选择打印设备");
-      }
+      // if(!this.deviceNo){
+      //   this.$message.error("请选择打印设备");
+      // }
       this.$http({
         url: this.$http.adornUrl('/platform/logistics/printOrder'),
         method: 'POST',
@@ -221,7 +251,7 @@ export default {
       }).then(({data}) => {
         if(data){
           this.getLogisticsInfo(this.scanOrderNo);
-          if(this.logistics === 'YUNDA'){
+          if(this.logistics === 'YUNDA' || this.logistics === 'ZTO'){
             //打印韵达面单
             this.printWallbill(this.printOrder.orderLogistics)
           }

File diff suppressed because it is too large
+ 2 - 0
src/views/modules/print/zto-template-data.js


Some files were not shown because too many files changed in this diff