Sfoglia il codice sorgente

Merge branch 'v2' into v2-ecard

# Conflicts:
#	.env.development
#	src/views/modules/distribution/activity/distribution-activity-add-or-update.vue
#	src/views/modules/distribution/activity/distribution-activity.vue
#	src/views/modules/form/shopStat.vue
#	src/views/modules/promotion/promotionOrder-add-or-update.vue
#	src/views/modules/promotion/promotionVideo.vue
#	src/views/modules/sys/pset/wx-ma-config.vue
#	src/views/modules/sys/webConfig-add-or-update.vue
huangmp 2 anni fa
parent
commit
82b9a1fcea
43 ha cambiato i file con 13739 aggiunte e 1197 eliminazioni
  1. 4 4
      .env.production
  2. 3 0
      package.json
  3. 326 0
      src/components/canvas-preview/index.vue
  4. 471 0
      src/components/order-addr-update/index.vue
  5. 376 0
      src/components/order-card-item/index.vue
  6. 198 0
      src/components/order-scan-delivery/index.vue
  7. 2 2
      src/components/prod-pic/index.vue
  8. 354 60
      src/i18n/langs/zh_CN.js
  9. 23 0
      src/utils/excel.js
  10. 32 0
      src/utils/zip.js
  11. 175 0
      src/views/modules/afterSales/returnDelivery-add-or-update.vue
  12. 295 0
      src/views/modules/afterSales/returnDelivery.vue
  13. 387 0
      src/views/modules/afterSales/thirdAfterSales-add-or-update.vue
  14. 478 0
      src/views/modules/afterSales/thirdAfterSales.vue
  15. 1 0
      src/views/modules/distribution/activity/distribution-activity.vue
  16. 2450 0
      src/views/modules/order/mergeOrder.vue
  17. 532 0
      src/views/modules/order/order-delivery-update.vue
  18. 521 368
      src/views/modules/order/order.vue
  19. 356 0
      src/views/modules/order/orderAmount-update.vue
  20. 564 532
      src/views/modules/order/orderInfo.vue
  21. 305 0
      src/views/modules/order/orderInvoice-add-or-update.vue
  22. 286 0
      src/views/modules/order/orderInvoice.vue
  23. 40 25
      src/views/modules/order/orderRefund.vue
  24. 178 68
      src/views/modules/order/refundOrderInfo.vue
  25. 269 0
      src/views/modules/print/merge-print-scan-delivery.vue
  26. 244 0
      src/views/modules/print/print-scan-delivery.vue
  27. 333 0
      src/views/modules/print/printList.vue
  28. 18 0
      src/views/modules/print/yunda-print-data.js
  29. 2 0
      src/views/modules/print/yunda-template-data.js
  30. 1 1
      src/views/modules/prod/category-add-or-update.vue
  31. 96 81
      src/views/modules/prod/prodComm-add-or-update.vue
  32. 150 56
      src/views/modules/prod/prodComm.vue
  33. 122 0
      src/views/modules/promotion-bak/promotion-order-upload.vue
  34. 1376 0
      src/views/modules/promotion-bak/promotion-order-video.vue
  35. 121 0
      src/views/modules/promotion-bak/promotion-video-upload.vue
  36. 215 0
      src/views/modules/promotion-bak/promotionOrder-add-or-update.vue
  37. 381 0
      src/views/modules/promotion-bak/promotionOrder.vue
  38. 263 0
      src/views/modules/promotion-bak/promotionVideo-add-or-update.vue
  39. 448 0
      src/views/modules/promotion-bak/promotionVideo.vue
  40. 170 0
      src/views/modules/settlement/print-settlement-add-or-update.vue
  41. 406 0
      src/views/modules/settlement/third-print-settlement-delivery.vue
  42. 191 0
      src/views/modules/settlement/third-print-settlement-detail.vue
  43. 576 0
      src/views/modules/settlement/third-print-settlement.vue

+ 4 - 4
.env.production

@@ -2,11 +2,11 @@
 ENV = 'production'
 
 // api接口请求地址
-VUE_APP_BASE_API = 'http://lymall-platform.58for.com/apis'
+VUE_APP_BASE_API = 'https://llong-platform.yunxan.com/apis'
 // 客服api接口请求地址
-VUE_APP_IM_API = 'https://lymall-im.58for.com'
+VUE_APP_IM_API = 'https://llong-im.yunxan.com'
 // 客服webstock接口请求地址
-VUE_APP_WS_IM_API = 'wss://lymall-im.58for.com'
+VUE_APP_WS_IM_API = 'wss://llong-im.yunxan.com'
 
 # 静态资源文件url
-VUE_APP_RESOURCES_URL = 'https://ecard-oss.58for.com/'
+VUE_APP_RESOURCES_URL = 'https://llong-oss.yunxan.com/'

+ 3 - 0
package.json

@@ -15,7 +15,9 @@
     "echarts": "^5.2.0",
     "element-resize-detector": "^1.2.3",
     "element-ui": "2.15.7",
+    "file-saver": "^2.0.5",
     "js-base64": "^3.6.1",
+    "jszip": "^3.10.1",
     "lodash": "4.17.5",
     "moment": "^2.29.1",
     "qrcode": "^1.4.4",
@@ -24,6 +26,7 @@
     "vue-clipboard2": "^0.3.1",
     "vue-cookie": "1.1.4",
     "vue-i18n": "8.24.5",
+    "vue-plugin-hiprint": "0.0.56",
     "vue-router": "3.5.2",
     "vue-slicksort": "^1.1.3",
     "vuedraggable": "2.23.2",

+ 326 - 0
src/components/canvas-preview/index.vue

@@ -0,0 +1,326 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    :append-to-body="visible"
+    :modal="false"
+    title="图片预览"
+    width="20%"
+    @opened="openCanvas"
+    @close="closeDialog"
+    style="display: flex; align-items: center;justify-content: center;"
+    v-if="visible">
+    <div>
+      <div v-if="prodType === '小卡'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0465 + 'px'}">
+      </div>
+      <div v-if="prodType === '拍立得'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0465 + 'px'}">
+      </div>
+      <div v-if="prodType === '直拍封面'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.02325 + 'px'}">
+      </div>
+      <div v-if="prodType === '票根'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0465 + 'px'}">
+      </div>
+      <div  v-if="prodType === '书签'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0264 + 'px'}">
+      </div>
+      <div v-if="prodType === '明信片'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0261 + 'px'}">
+      </div>
+      <div v-if="prodType === '方卡'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0232 + 'px'}">
+      </div>
+      <div v-if="prodType === '徽章'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0813 + 'px', borderRadius: 100 + '%'}">
+      </div>
+      <div v-if="prodType === '手幅'" class="previewClass" :style="{width: previewWidth + 'px', height: previewHeight + 'px', borderWidth: previewWidth * 0.0255 + 'px'}">
+      </div>
+      <el-image ref="previewImageRef" :src="previewPicUrl" alt="" @load="previewLoad" style="width: 100%; height: 100%"/>
+    </div>
+    <!--<div class="parent">
+      <canvas ref="canvas" :width="clientWidth" :height="clientHeight" id="myCanvas"></canvas>
+      <div class="blood" :style="{border: bloodWidth + 'px solid rgba(225,0,0, 0.3)' , width: clientWidth +'px', height: clientHeight + 'px', borderRadius: bloodRadius + '%'}"></div>
+    </div>
+    <div style="text-align: center;">
+      <el-button @click="cropImage">保存画布</el-button>
+    </div>-->
+
+  </el-dialog>
+
+</template>
+
+<script>
+  const statusConfig = {IDLE:0, DRAG_START:1, DRAGGING:2};
+  const prodSize = {'小卡': {width: 709, height: 1087, clientScale:0.5, bloodRadio: 0.0242}, '方卡':{width: 1252, height: 1252, clientScale:0.5}, '拍立得':{width: 709, height: 1087, clientScale:0.5, bloodRadio: 0.0242},
+                    '直拍封面':{width: 709, height: 1217, clientScale:0.5, bloodRadio: 0.02325}, '书签': {width: 638, height: 1819, clientScale:0.4, bloodRadio: 0.0264},'明信片':{width: 1252, height: 1819, clientScale:0.4, bloodRadio: 0.0261},
+                    '徽章':{width: 839, height: 839, clientScale:0.5, bloodRadio: 0.0813, bloodRadius:100},'票根':{width: 709, height: 1489, clientScale:0.5, bloodRadio: 0.0465},'手幅':{width: 1252, height: 3614, clientScale:0.25, bloodRadio: 0.0255}}
+  export default {
+    name: "CanvasPreview",
+    data() {
+      return {
+        visible: false,
+        prodType: null,
+        previewWidth: null,
+        previewHeight: null,
+        previewPicUrl: null,
+        side: null,
+        clientWidth: 709,
+        clientHeight: 1087,
+        clientScale: 0.5,
+        cardItem: null,
+        canvasParam:null,
+        bloodWidth: 20,
+        bloodRadius: 0,
+        canvasInfo:{
+          status: statusConfig.IDLE,
+          dragTarget: {x:0,y:0,w:0,h:0},
+          lastEvtPos: {x:null,y:null},
+          offsetEvtPos: {x:null,y:null},
+          offset: {x:0,y:0},
+          scale: 1,
+          scaleStep: 0.01,
+          minScale: 0.5,
+          maxScale: 2,
+        },
+        imgRef:null,
+        canvas:null,
+        context: null,
+      };
+    },
+    mounted() {
+    },
+    methods: {
+      openCanvas(){
+        this.initCanvas();
+        this.drawImage();
+        this.addMouseListeners();
+      },
+      init(cardItem, previewPicUrl, prodType, side){
+        this.visible = true;
+        this.previewPicUrl = previewPicUrl;
+        this.prodType = prodType;
+        this.side = side;
+        this.cardItem = cardItem;
+        if(side === 'front'){
+          this.canvasParam = JSON.parse(cardItem.frontCanvasParam);
+        }else if(side === 'back'){
+          this.canvasParam = JSON.parse(cardItem.backCanvasParam);
+        }
+        let prod = prodSize[prodType];
+        this.clientWidth = prod.width * prod.clientScale;
+        this.clientHeight = prod.height * prod.clientScale;
+        this.bloodRadius = prod.bloodRadius ? prod.bloodRadius : this.bloodRadius;
+        this.bloodWidth = prod.width * prod.bloodRadio;
+      },
+      previewLoad(event){
+        this.previewWidth = event.srcElement.clientWidth;
+        this.previewHeight = event.srcElement.clientHeight;
+      },
+      cropImage() {
+        this.$confirm('确认要保存当前画布状态吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let canvasInfo = this.canvasInfo;
+          let cardItem = {cardItemId : this.cardItem.cardItemId};
+          let obj =  {scale: canvasInfo.scale, offsetX: canvasInfo.offset.x, offsetY: canvasInfo.offset.y, targetX: canvasInfo.dragTarget.x, targetY: canvasInfo.dragTarget.y}
+          let canvasParam = JSON.stringify(obj);
+          if(this.side === 'front'){
+            cardItem.frontCanvasParam = canvasParam;
+          }else if(this.side === 'back'){
+            cardItem.backCanvasParam = canvasParam;
+          }
+          this.$http({
+            url: this.$http.adornUrl('/prod/orderCardItem/saveOrUpdateCanvasParam'),
+            method: 'post',
+            data: cardItem
+          }).then(({ data }) =>{
+            if(data){
+              this.$message.success("保存成功");
+            }else{
+              this.$message.error("保存失败");
+            }
+          })
+        });
+      },
+      initCanvas() {
+        this.canvas = this.$refs.canvas;
+        this.context = this.canvas.getContext('2d'); // 获取画布上下文
+      },
+      getCanvasPosition(e, offset = {x:0,y:0}){
+        return {
+          x: e.offsetX - offset.x,
+          y: e.offsetY - offset.y
+        }
+      },
+      render(){
+        this.canvas.width = this.clientWidth;
+        this.context.setTransform(this.canvasInfo.scale, 0, 0, this.canvasInfo.scale, this.canvasInfo.offset.x, this.canvasInfo.offset.y);
+        this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
+        this.drawImage();
+      },
+      ifInImage(pos){
+        let dx = this.getDistanceX(pos.x, this.imgRef.x);
+        let dy = this.getDistanceY(pos.y, this.imgRef.y);
+        if(dx <= this.imgRef.width && dy <=this.imgRef.height){
+          return true;
+        }else{
+          return false;
+        }
+      },
+      getDistanceX(x1, x2){
+        return Math.abs((x1 - x2));
+      },
+      getDistanceY(y1, y2){
+        return Math.abs((y1 - y2));
+      },
+      drawImage() {
+        if(!this.imgRef){
+          this.imgRef = new Image();
+          this.imgRef.src = this.previewPicUrl;
+          if(this.canvasParam){
+            this.canvasInfo.scale = this.canvasParam.scale;
+            this.canvasInfo.offset.x = this.canvasParam.offsetX;
+            this.canvasInfo.offset.y = this.canvasParam.offsetY;
+            this.canvasInfo.dragTarget.x = this.canvasParam.targetX;
+            this.canvasInfo.dragTarget.y = this.canvasParam.targetY;
+          }else{
+            let scaleImgWidth = this.imgRef.width * this.canvasInfo.scale;
+            let scaleImgHeight = this.imgRef.height * this.canvasInfo.scale;
+            if (scaleImgWidth > this.canvas.width && scaleImgHeight > this.canvas.height) {
+              if(scaleImgWidth > scaleImgHeight){
+                this.canvasInfo.scale =  this.canvas.height / scaleImgHeight;
+              }else{
+                this.canvasInfo.scale =  this.canvas.width / scaleImgWidth;
+              }
+            }else if(scaleImgWidth < this.canvas.width && scaleImgHeight < this.canvas.height){
+              if(scaleImgWidth > scaleImgHeight){
+                this.canvasInfo.scale =  this.canvas.height / scaleImgHeight;
+              }else{
+                this.canvasInfo.scale =  this.canvas.width / scaleImgWidth;
+              }
+            }
+          }
+          this.context.setTransform(this.canvasInfo.scale, 0,0, this.canvasInfo.scale, this.canvasInfo.offset.x,this.canvasInfo.offset.y)
+          this.context.drawImage(this.imgRef, this.canvasInfo.dragTarget.x, this.canvasInfo.dragTarget.y, this.imgRef.width, this.imgRef.height); // 在画布上绘制图片
+        }else{
+          this.context.drawImage(this.imgRef, this.canvasInfo.dragTarget.x, this.canvasInfo.dragTarget.y, this.imgRef.width, this.imgRef.height); // 在画布上绘制图片
+        }
+      },
+      addMouseListeners() {
+        let canvas = this.$refs.canvas;
+        // 监听鼠标按下事件
+        canvas.addEventListener('mousedown', e => {
+          let canvasPosition = this.getCanvasPosition(e, this.canvasInfo.offset);
+          console.log("画笔位置", canvasPosition);
+          if(this.ifInImage(canvasPosition)){
+            let scaleImgWidth = this.imgRef.width * this.canvasInfo.scale;
+            let scaleImgHeight = this.imgRef.height * this.canvasInfo.scale;
+            if(scaleImgWidth <= this.canvas.width || scaleImgHeight <= this.canvas.height){
+              return;
+            }
+            this.canvasInfo.status = statusConfig.DRAG_START;
+            this.canvasInfo.lastEvtPos = canvasPosition;
+            this.canvasInfo.offsetEvtPos = canvasPosition;
+          }
+        });
+
+        //监听鼠标移动事件
+        canvas.addEventListener('mousemove', e => {
+          let canvasPosition = this.getCanvasPosition(e, this.canvasInfo.offset);
+          if(this.canvasInfo.status === statusConfig.DRAG_START && (this.getDistanceX(canvasPosition.x, this.canvasInfo.lastEvtPos.x) > 5 || this.getDistanceY(canvasPosition.y, this.canvasInfo.lastEvtPos.y) > 5)){
+            this.canvasInfo.status = statusConfig.DRAGGING;
+            this.canvasInfo.offsetEvtPos = canvasPosition;
+          }else if(this.canvasInfo.status === statusConfig.DRAGGING){
+            let dragTarget = this.canvasInfo.dragTarget;
+            dragTarget.x += (canvasPosition.x - this.canvasInfo.offsetEvtPos.x);
+            dragTarget.y += (canvasPosition.y - this.canvasInfo.offsetEvtPos.y);
+            this.render();
+            this.canvasInfo.offsetEvtPos = canvasPosition;
+          }
+        });
+
+        // 监听鼠标松开事件
+        canvas.addEventListener('mouseup', () => {
+          if(this.canvasInfo.status === statusConfig.DRAGGING){
+            this.canvasInfo.status = statusConfig.IDLE;
+          }
+        });
+
+        // 监听鼠标松开事件
+        canvas.addEventListener('mouseout', (e) => {
+          this.canvasInfo.status = statusConfig.IDLE;
+          let canvasPosition = this.getCanvasPosition(e, this.canvasInfo.offset);
+          this.canvasInfo.lastEvtPos = canvasPosition;
+          this.canvasInfo.offsetEvtPos = canvasPosition;
+        });
+
+        // 监听鼠标滚轮事件
+        canvas.addEventListener('wheel', (e) => {
+          // e.preventDefault();
+          let canvasPosition = this.getCanvasPosition(e, this.canvasInfo.offset);
+          let deltaX = canvasPosition.x / this.canvasInfo.scale * this.canvasInfo.scaleStep;
+          let deltaY = canvasPosition.y / this.canvasInfo.scale * this.canvasInfo.scaleStep;
+          let scaleImgWidth = this.imgRef.width * this.canvasInfo.scale;
+          let scaleImgHeight = this.imgRef.height * this.canvasInfo.scale;
+          if(e.wheelDelta > 0 && this.canvasInfo.scale <= this.canvasInfo.maxScale){
+            this.canvasInfo.offset.x -= deltaX;
+            this.canvasInfo.offset.y -= deltaY;
+            this.canvasInfo.scale += this.canvasInfo.scaleStep;
+          }else{
+            if (scaleImgWidth <= this.canvas.width || scaleImgHeight <= this.canvas.height) {
+              return;
+            }else{
+              this.canvasInfo.offset.x += deltaX;
+              this.canvasInfo.offset.y += deltaY;
+              this.canvasInfo.scale -= this.canvasInfo.scaleStep;
+              if (scaleImgWidth <= this.canvas.width || scaleImgHeight <= this.canvas.height) {
+                // 达到限制条件,不再缩小
+                  return;
+              }
+            }
+          }
+          this.render();
+        });
+      },
+      closeDialog(){
+        this.canvas = null;
+        this.context = null;
+        this.imgRef = null;
+        this.visible = false;
+        this.canvasInfo = {
+          status: statusConfig.IDLE,
+            dragTarget: {x:0,y:0,w:0,h:0},
+          lastEvtPos: {x:null,y:null},
+          offsetEvtPos: {x:null,y:null},
+          offset: {x:0,y:0},
+          scale: 1,
+            scaleStep: 0.01,
+            minScale: 0.5,
+            maxScale: 2,
+        };
+      }
+    },
+  }
+</script>
+
+<style scoped>
+  .previewClass{
+    position:absolute;
+    border-style:solid;
+    border-color:red;
+    opacity:0.3;
+    z-index:3;
+  }
+
+  #myCanvas {
+    display: block;
+    margin: 0 auto; /* 水平居中 */
+  }
+  .parent{
+    position: relative; /* 设置父元素的position为relative */
+    background-color: white;
+  }
+  .blood {
+    position: absolute; /* 设置相框的position为absolute */
+    top: 50%; /* 距离父元素顶部50% */
+    left: 50%; /* 距离父元素左侧50% */
+    transform: translate(-50%, -50%) ; /* 将相框自身向左和向上移动50%,使其居中 */
+    background-color: transparent; /* 设置相框背景为透明 */
+    pointer-events:none;
+  }
+</style>

+ 471 - 0
src/components/order-addr-update/index.vue

@@ -0,0 +1,471 @@
+<template>
+  <el-dialog
+    :title="this.$i18n.t('components.modifyUseAddress')"
+    top="200px"
+    :close-on-click-modal="false"
+    :append-to-body="visible"
+    :visible.sync="visible"
+    v-if="visible"
+    width="850px"
+  >
+  <!-- language -->
+    <el-form
+      :model="dataForm"
+      :rules="dataRule"
+      ref="dataForm"
+      @keyup.enter.native="dataFormSubmit()"
+      :label-width="this.$i18n.t('language') === 'English'? '130px' : '80px'"
+    >
+      <el-alert :title="this.$i18n.t('components.consultWithUsers')" type="warning" show-icon></el-alert>
+      <br />
+      <el-form-item :label="this.$i18n.t('publics.addressee')" prop="receiver">
+        <el-input size="small" maxlength="15" v-model="dataForm.receiver" :placeholder="this.$i18n.t('shop.consigneeName')"></el-input>
+      </el-form-item>
+
+      <el-form-item :label="this.$i18n.t('publics.mobilePhone')" prop="mobile">
+        <el-input size="small" v-model="dataForm.mobile" :placeholder="this.$i18n.t('publics.mobilePhone')" maxlength="11" show-word-limit></el-input>
+      </el-form-item>
+      <el-form-item :label="this.$i18n.t('address.province')" prop="province">
+        <div class="select">
+          <el-form-item prop="province">
+            <el-select size="small" v-model="dataForm.provinceId" :placeholder="this.$i18n.t('tip.select')" @change="selectProvince">
+              <el-option
+                v-for="province in provinceList"
+                :key="province.areaId"
+                :label="province.areaName"
+                :value="province.areaId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </div>
+        <div class="select">
+          <el-form-item prop="city">
+            <el-select size="small" v-model="dataForm.cityId" :placeholder="this.$i18n.t('tip.select')" @change="selectCity">
+              <el-option
+                v-for="city in cityList"
+                :key="city.areaId"
+                :label="city.areaName"
+                :value="city.areaId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </div>
+        <div class="select">
+          <el-form-item prop="area">
+            <el-select size="small" v-model="dataForm.areaId" :placeholder="this.$i18n.t('tip.select')" :disabled="!dataForm.cityId" @change="selectArea">
+              <el-option
+                v-for="area in areaList"
+                :key="area.areaId"
+                :label="area.areaName"
+                :value="area.areaId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </div>
+        <div class="select">
+          <el-form-item prop="street">
+            <el-select size="small" v-model="dataForm.streetId" :placeholder="this.$i18n.t('tip.select')" :disabled="!dataForm.areaId" @change="isShowMap ? mapLocation(true) : ''">
+              <el-option
+                v-for="area in streetList"
+                :key="area.streetId"
+                :label="area.streetName"
+                :value="area.streetId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </div>
+      </el-form-item>
+      <el-form-item :label="this.$i18n.t('address.detailed')" prop="addr">
+        <el-input size="small" maxlength="60" v-model="dataForm.addr" :placeholder="this.$i18n.t('address.detailed')"></el-input>
+      </el-form-item>
+      <el-form-item v-if="isShowMap">
+        <baidu-map
+          class="map"
+          :scroll-wheel-zoom="false"
+          :center="center"
+          @moving="syncCenterAndZoom"
+          @moveend="syncCenterAndZoom"
+          @zoomend="syncCenterAndZoom"
+          :zoom="zoom"
+        >
+          <bm-navigation anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-navigation>
+          <bm-marker :position="center" :dragging="false" @click="infoWindowOpen">
+            <bm-info-window :show="show" @close="infoWindowClose" @open="infoWindowOpen">
+              {{$t('admin.stationLocal')}}
+            </bm-info-window>
+          </bm-marker>
+        </baidu-map>
+      </el-form-item>
+    </el-form>
+    <span slot="footer">
+      <div class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</div>
+      <div class="default-btn primary-btn" @click="getChangeAmount()">{{$t("crud.filter.submitBtn")}}</div>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { isMobile, validNoEmptySpace } from '@/utils/validate'
+export default {
+  data () {
+    var validateMobile = (rule, value, callback) => {
+      if (!isMobile(value)) {
+        callback(new Error(this.$i18n.t('sys.mobilePhoneError')))
+      } else {
+        callback()
+      }
+    }
+    var validateAddr = (rule, value, callback) => {
+      if (!value.trim()) {
+        callback(new Error(this.$i18n.t('shop.addressCannotBeEmpty')))
+      } else {
+        callback()
+      }
+    }
+    var validateReceiver = (rule, value, callback) => {
+      if (validNoEmptySpace(value)) {
+        callback(new Error(this.$i18n.t('shopProcess.inputAllSpace')))
+      } else {
+        callback()
+      }
+    }
+    return {
+      visible: false,
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      streetList: [],
+      order: null,
+      dataForm: {
+        addrOrderId: 0,
+        addrId: 0,
+        addr: '',
+        receiver: '',
+        mobile: '',
+        area: '',
+        city: '',
+        street: '',
+        province: '',
+        areaId: null,
+        cityId: null,
+        streetId: null,
+        provinceId: null
+      },
+      center: {
+        lng: 113.327955,
+        lat: 23.136783
+      },
+      zoom: 18,
+      isEditAddr: false,
+      show: false,
+      dataRule: {
+        receiver: [
+          { required: true, message: this.$i18n.t('shop.coneeNameCanEmpty'), trigger: 'blur' },
+          { validator: validateReceiver, trigger: 'blur' }
+        ],
+        addr: [{ required: true, message: this.$i18n.t('shop.addressCannotBeEmpty'), trigger: 'blur' },
+          { validator: validateAddr, trigger: 'blur' }
+        ],
+        city: [{ required: true, message: this.$i18n.t('shop.cityCannotBeEmpty'), trigger: 'blur' }],
+        province: [
+          { required: true, message: this.$i18n.t('shop.provinceCannotBeEmpty'), trigger: 'blur' }
+        ],
+        area: [{ required: true, message: this.$i18n.t('shop.districtCounEmpty'), trigger: 'blur' }],
+        mobile: [
+          { required: true, message: this.$i18n.t('sys.mobilePhoneNoNull'), trigger: 'blur' },
+          { validator: validateMobile, trigger: 'blur' }
+        ]
+      },
+      isTrue: false,
+      errorInfo: '',
+      dataListLoading: false,
+      addOrUpdateVisible: false,
+      isShowMap: false,
+      oldOrder: '',
+      freightAmount: 0,
+      orderStatus: 0
+    }
+  },
+  methods: {
+    // 获取数据列表
+    init (order) {
+      let orderInfo = Object.assign({}, order)
+      this.isShowMap = Boolean((orderInfo.dvyType === 4 && (orderInfo.status === 1 || orderInfo.status === 2)))
+      let userAddr = orderInfo.userAddrOrder
+      this.order = orderInfo
+      this.freightAmount = orderInfo.freightAmount
+      this.orderStatus = orderInfo.status
+      console.log(orderInfo)
+      this.oldOrder = JSON.parse(JSON.stringify(orderInfo))
+      this.visible = true
+      this.dataListLoading = true
+      this.dataForm = userAddr
+      this.show = false
+      this.listAreaByParentId().then(({ data }) => {
+        this.provinceList = data
+      })
+      if (userAddr.provinceId && userAddr.cityId) {
+        this.listAreaByParentId(userAddr.provinceId).then(({ data }) => {
+          this.cityList = data
+        })
+        this.listAreaByParentId(userAddr.cityId).then(({ data }) => {
+          this.areaList = data
+        })
+        this.listStreetByParentId(userAddr.areaId).then(({data}) => {
+          this.streetList = data
+        })
+      }
+      this.dataListLoading = false
+    },
+    listAreaByParentId (pid) {
+      if (!pid) pid = 0
+      return this.$http({
+        url: this.$http.adornUrl(`/admin/area/listByPid`),
+        method: 'get',
+        params: this.$http.adornParams({ pid })
+      })
+    },
+    listStreetByParentId (pid) {
+      if (!pid) pid = 0
+      return this.$http({
+        url: this.$http.adornUrl(`/platform/street/page`),
+        method: 'get',
+        params: this.$http.adornParams({ parentId: pid })
+      })
+    },
+
+    /**
+       * 初始化地图数据
+       */
+    setCenter () {
+      this.center = null
+      this.center = {
+        lng: 113.327955,
+        lat: 23.136783
+      }
+      this.zoom = 18
+    },
+      /**
+       * 获取地图移动后回调的位置参数
+       */
+    syncCenterAndZoom (e) {
+      // console.log(e)
+      this.setCenter()
+      const {lng, lat} = e.target.getCenter()
+      this.center.lng = lng
+      this.center.lat = lat
+      this.dataForm.lng = lng
+      this.dataForm.lat = lat
+      this.zoom = e.target.getZoom()
+      this.isEditAddr = false
+    },
+    // 选择省
+    selectProvince (val) {
+      this.dataForm.cityId = null
+      this.dataForm.city = ''
+      // 获取城市的select
+      this.listAreaByParentId(val).then(({ data }) => {
+        this.cityList = data
+        // this.dataForm.addr = null
+      })
+      if (!this.isShowMap) {
+        return
+      }
+      this.mapLocation(true)
+    },
+    // 选择市
+    selectCity (val) {
+      this.dataForm.areaId = null
+      this.dataForm.area = ''
+      // 获取区的select
+      this.listAreaByParentId(val).then(({ data }) => {
+        this.areaList = data
+      })
+      if (!this.isShowMap) {
+        return
+      }
+      this.mapLocation(true)
+    },
+    selectArea (val){
+      this.dataForm.streetId = null
+      this.dataForm.street = ''
+      //获取街道的select
+      this.listStreetByParentId(val).then(({data}) => {
+        this.streetList = data
+      })
+      if (!this.isShowMap) {
+        return
+      }
+      this.mapLocation(true)
+    },
+    getAddr () {
+      for (let i = 0; i < this.provinceList.length; i++) {
+        if (this.provinceList[i].areaId === this.dataForm.provinceId) {
+          // 将省名字保存起来
+          this.dataForm.province = this.provinceList[i].areaName
+        }
+      }
+      for (let i = 0; i < this.cityList.length; i++) {
+        if (this.cityList[i].areaId === this.dataForm.cityId) {
+          // 将市名字保存起来
+          this.dataForm.city = this.cityList[i].areaName
+        }
+      }
+      for (let i = 0; i < this.areaList.length; i++) {
+        if (this.areaList[i].areaId === this.dataForm.areaId) {
+          // 将区名字保存起来
+          this.dataForm.area = this.areaList[i].areaName
+        }
+      }
+      for (let i = 0; i < this.streetList.length; i++) {
+        if (this.streetList[i].streetId === this.dataForm.streetId) {
+          // 将街道名字保存起来
+          this.dataForm.street = this.streetList[i].streetName
+        }
+      }
+    },
+    getChangeAmount () {
+      // this.oldOrder
+      console.log(this.dataForm)
+      this.oldOrder.orderId = this.order.orderId
+      this.oldOrder.orderNumber = this.order.orderNumber
+      this.getAddr()
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl(`/platform/order/getChangeAmount`),
+            method: 'get',
+            params: this.$http.adornParams({
+              orderId: this.oldOrder.orderId,
+              orderNumber: this.oldOrder.orderNumber,
+              areaId: this.order.userAddrOrder.areaId,
+              lng: this.center.lng,
+              lat: this.center.lat
+            })
+          }).then(({ data }) => {
+            const msg = `${this.$i18n.t('shop.changeAmountTip1')}${data > 0 ? this.$i18n.t('shop.overcharged') : this.$i18n.t('shop.undercharged')}${this.$i18n.t('shop.by')}${data < 0 ? data * -1 : data}${this.$i18n.t('shop.yuan')}${this.$i18n.t('shop.changeAmountTip2')}`
+            this.$confirm(msg, this.$i18n.t('text.tips'), {
+              confirmButtonText: this.$i18n.t('order.confirm'),
+              cancelButtonText: this.$i18n.t('order.cancel'),
+              type: 'warning'
+            }).then(() => {
+              this.submitProds()
+            })
+          })
+        }
+      })
+    },
+    // 确定事件
+    submitProds () {
+      this.getAddr()
+      this.$refs['dataForm'].validate(valid => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl(`/platform/order/changeUserAddr`),
+            method: 'put',
+            data: this.$http.adornData({
+              orderId: this.order.orderId,
+              orderNumber: this.order.orderNumber,
+              userAddrOrder: this.dataForm
+            })
+          }).then(({ data }) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.visible = false
+                this.$emit('refreshUserAddrOrder')
+              }
+            })
+          })
+        }
+      })
+    },
+    // 定位地图
+    mapLocation (isTrue) {
+      let area = ''
+      debugger
+      this.getAddr()
+      if (isTrue) {
+          // 选择省市区时,定位地图
+        if (this.dataForm.provinceId) {
+            // 省名称
+          area = this.dataForm.province
+          this.zoom = 6
+          if (this.dataForm.cityId) {
+              // 市名称
+            area = area + this.dataForm.city
+            this.zoom = 10
+            if (this.dataForm.areaId) {
+                // 区名称
+              area = area + this.dataForm.area
+              this.zoom = 14
+              if (this.dataForm.streetId){
+                //街道名称
+                area = area + this.dataForm.street
+              }
+              if (this.dataForm.addr !== null) {
+                  // 详细地址
+                area = this.dataForm.province + this.dataForm.city + this.dataForm.area + this.dataForm.street + this.dataForm.addr
+                this.zoom = 18
+              }
+            }
+          }
+        }
+      } else {
+        this.center = null
+        if (!this.dataForm.provinceId || !this.dataForm.cityId || !this.dataForm.areaId) {
+          this.dataForm.addr = null
+          this.errorMsg(this.$i18n.t('admin.selePCD'))
+          return
+        }
+        area = this.dataForm.province + this.dataForm.city + this.dataForm.area + this.dataForm.addr
+        this.zoom = 18
+      }
+      this.center = area
+      this.isEditAddr = true
+    },
+      /**
+       * 关闭地图说明标签
+       */
+    infoWindowClose () {
+      this.show = false
+    },
+      /**
+       * 打开地图说明标签
+       */
+    infoWindowOpen () {
+      this.show = true
+    },
+    errorMsg (message) {
+      this.$message({
+        message: message,
+        type: 'error',
+        duration: 1500
+      })
+    }
+  }
+}
+</script>
+<style scoped>
+.prods-select-body {
+  height: auto;
+  overflow: auto;
+  border-top: 1px solid #eeeeee;
+  border-right: 1px solid #eeeeee;
+  border-bottom: 1px solid #eeeeee;
+}
+ div >>> .el-form-item{
+   margin-top: 20px !important;
+ }
+ .select {
+   width: 220px;
+   display: inline-block;
+   margin-top:-20px;
+ }
+ .map {
+    width: 100%;
+    height: 500px;
+  }
+</style>

+ 376 - 0
src/components/order-card-item/index.vue

@@ -0,0 +1,376 @@
+<template>
+  <div style="display: inline-block; overflow: auto">
+    <div>
+      <div v-if="showFlagBtn">
+        <el-radio v-model="mode" label="view">预览模式</el-radio>
+<!--        <el-radio v-model="mode" label="edit">编辑模式</el-radio>-->
+      </div>
+
+      <div style="border: 2px solid pink; display: inline-block;margin-right: 5px;" v-for="(item, index) in cardItemList" :key="item.cardItemId">
+        <el-row :gutter="12" style="padding-top: 5px">
+          <el-col :span="12">
+            <el-card :body-style="{ padding: '0px' }">
+              <div style="padding: 3px; text-align: center">
+                <span>正面</span>
+              </div>
+              <el-image style="width: 100px; height: 100px;" v-if="mode=='view'" :src="resourcesUrl + item.frontPic" @click="previewPic(item, item.frontPic, item.prodName, 'front')"/>
+              <el-upload v-else
+                class="avatar-uploader"
+                accept="image/jpg"
+                :before-upload="(file, fileList)=>handleBeforeUpload(file, fileList,item)"
+                :action="$http.adornUrl('/admin/file/simpleUpload')"
+                :headers="{Authorization: $cookie.get('Authorization_vs'),locale:lang}"
+                :on-success="(res,file)=>{onFrontUploadSuccess(item,res,file)}"
+                :show-file-list="false">
+                <img v-if="item.frontPic" :src="resourcesUrl + item.frontPic" class="avatar">
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              </el-upload>
+            </el-card>
+          </el-col>
+          <el-col :span="12">
+            <el-card :body-style="{ padding: '0px' }">
+              <div style="padding: 3px; text-align: center">
+                <span>背面</span>
+              </div>
+              <el-image v-if="mode=='view'" :src="resourcesUrl + item.backPic" style="width: 100px; height: 100px;" @click="previewPic(item, item.backPic, item.prodName, 'back')"/>
+              <el-upload v-else
+                         class="avatar-uploader"
+                         :before-upload="(file, fileList)=>handleBeforeUpload(file, fileList,item)"
+                         :action="$http.adornUrl('/admin/file/simpleUpload')"
+                         :headers="{Authorization: $cookie.get('Authorization_vs'),locale:lang}"
+                         :on-success="(res,file)=>{onBackUploadSuccess(item,res,file)}"
+                         :show-file-list="false">
+                <img v-if="item.backPic" :src="resourcesUrl + item.backPic" class="avatar">
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              </el-upload>
+            </el-card>
+          </el-col>
+        </el-row>
+        <el-row style="width: 210px; height: 30px; text-align: center ;color: red; font-weight: bold">
+          <span v-if="showFlagBtn">
+          <el-button v-if="item.flag==0 && mode=='view'" type="success" size="mini" style="margin-right: 20px" @click="handleFlag(item, index)">待标记</el-button>
+          <el-button v-if="item.flag==1 && mode=='view'" type="warning" size="mini" style="margin-right: 5px" @click="handleFlag(item, index)">已标记</el-button>
+          <el-button v-if="mode==='edit'" type="primary" size="mini" style="margin-right: 5px" @click="addOrUpdateCardItem(item)">保存</el-button>
+          <el-button v-if="mode==='edit' && item.cardItemId" type="danger" size="mini" style="margin-right: 5px" @click="deleteCardItem(item, index)">删除</el-button>
+        </span>
+        </el-row>
+        <el-row style="width: 210px; height: 30px; text-align: center ;color: red; font-weight: bold">
+          <span>No.{{index + 1}}</span>
+          <span v-if="showFlagBtn" style="color: white">
+            __________
+          </span>
+          <span>X</span>
+          <span v-if="mode=='view'">{{item.prodCount}}</span>
+          <el-input type="number" size="mini" style="width: 60px;height: 20px" v-if="mode=='edit'" v-model="item.prodCount"></el-input>
+        </el-row>
+      </div>
+      <div v-if="mode=='edit'" style="display: inline-block;">
+        <el-button
+          circle
+          icon="el-icon-plus"
+          @click="addCardItem">
+        </el-button>
+      </div>
+    </div>
+    <CanvasPreview v-if= "previewPicDialogVisible" ref="canvasPreviewRef"></CanvasPreview>
+  </div>
+</template>
+
+<script>
+  import CanvasPreview from "../canvas-preview/index";
+  export default {
+    components: {CanvasPreview},
+    data () {
+      return {
+        lang: localStorage.getItem('lang') || 'zh_CN',
+        cardItemList:[],
+        previewPicUrl: null,
+        prodType: null,
+        previewPicDialogVisible: false,
+        side:null,
+        resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+        mode: 'view',
+        previewWidth: 0,
+        previewHeight: 0,
+        bloodWidth: 0
+      }
+    },
+    props: {
+      orderItem: {
+        default: null,
+        type: Object
+      },
+      showFlagBtn:{
+        default: true,
+        type: Boolean
+      }
+    },
+    created() {
+      this.$nextTick(() => {
+        this.getDataList();
+      })
+    },
+    methods: {
+      previewLoad(event){
+        this.previewWidth = event.srcElement.clientWidth;
+        this.previewHeight = event.srcElement.clientHeight;
+      },
+      handleBeforeUpload(file, fileList, item){
+        let fileType = file.type;
+        let isJpg = fileType === 'image/jpg' || fileType === 'image/jpeg';
+        if(!isJpg){
+          this.$message.error("只允许上传JPG格式的图片");
+          return false;
+        }
+        let isSize = true;
+        //如果当前是编辑的小卡,就需要判断是否符合尺寸
+        let width = 709;
+        let height = 1087;
+        let prodName = item.prodName;
+        isSize = new Promise(function(resolve, reject) {
+          if(prodName.indexOf("小卡") !== -1 || prodName.indexOf("仿拍立得") !== -1){
+            width = 709;
+            height = 1087;
+          }else if(prodName.indexOf("票根") !== -1){
+            width = 780;
+            height = 1489;
+          }else if(prodName.indexOf("直拍封面") !== -1){
+            width = 697;
+            height = 1217;
+          }else if(prodName.indexOf("明信片") !== -1){
+            width = 1252;
+            height = 1819;
+          }else if(prodName.indexOf("三宫格") !== -1){
+            width = 673;
+            height = 1547;
+          }else if(prodName.indexOf("流砂书签") !== -1){
+            width = 638;
+            height = 1819;
+          }else if(prodName.indexOf("方卡") !== -1){
+            width = 1217;
+            height = 1217;
+          }else if(prodName.indexOf("手幅") !== -1){
+            width = 1252;
+            height = 3614;
+          }else if(prodName.indexOf("毛绒徽章") !== -1){
+            width = 827;
+            height = 827;
+          }else if(prodName.indexOf("圆形徽章") !== -1){
+            width = 850;
+            height = 850;
+          }else if(prodName.indexOf("手幅") !== -1){
+            width = 1252;
+            height = 3614;
+          }else if(prodName.indexOf("方形贴纸") !== -1){
+            width = 662;
+            height = 662;
+          }
+          let _URL = window.URL || window.webkitURL;
+          let img = new Image();
+          img.onload = function() {
+            let valid = img.width == width && img.height == height;
+            valid ? resolve() : reject();
+          };
+          img.src = _URL.createObjectURL(file);
+        }).then(
+          () => {
+            return file;
+          },
+          () => {
+            this.$message.error("上传的图片宽高必须是" + width + "*" + height);
+            return Promise.reject();
+          }
+        );
+        return isJpg && isSize;
+      },
+      deleteCardItem(item, index){
+        this.$confirm('确定要删除吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$http({
+            url: this.$http.adornUrl('/prod/orderCardItem/' + item.cardItemId),
+            method: 'delete',
+          }).then(({ data }) =>{
+            if(data){
+              this.$delete(this.cardItemList, index);
+              this.$message.success("删除成功");
+            }else{
+              this.$message.error("删除失败");
+            }
+          })
+        });
+      },
+      addOrUpdateCardItem(item){
+        this.$confirm('确定要更新吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+            this.$http({
+              url: this.$http.adornUrl('/prod/orderCardItem/saveOrUpdate'),
+              method: 'post',
+              data: this.$http.adornData(item)
+            }).then(({ data }) =>{
+              if(data){
+                this.$set(item, 'cardItemId', data.cardItemId);
+                this.$message.success("保存成功");
+              }else{
+                this.$message.error("保存失败");
+              }
+            })
+        });
+      },
+      onFrontUploadSuccess (item, response, file) {
+        this.$set(item,'frontPic',response.filePath);
+        this.$forceUpdate()
+      },
+      onBackUploadSuccess (item, response, file) {
+        this.$set(item,'backPic',response.filePath);
+        this.$forceUpdate()
+      },
+      addCardItem(){
+        if(this.cardItemList.length > 0){
+          let item = this.cardItemList[0];
+          let newItem = {orderNumber: item.orderNumber, orderItemId: this.orderItem.orderItemId, prodName: item.prodName, skuName: item.skuName, flag: 0, prodCount: 1 }
+          this.cardItemList.push(newItem);
+        }else{
+          let newItem = {orderNumber: this.orderItem.orderNumber, orderItemId: this.orderItem.orderItemId, prodName: this.orderItem.prodName, skuName: this.orderItem.skuName, flag: 0, prodCount: 1}
+          this.cardItemList.push(newItem);
+        }
+      },
+      handleFlag(item, index){
+        let fl = item.flag == 1? 0 : 1
+          this.$http({
+              url: this.$http.adornUrl('/prod/orderCardItem/flag'),
+              method: 'post',
+              data: this.$http.adornParams(
+                  Object.assign({
+                          cardItemId: item.cardItemId,
+                          flag: fl
+                      },
+                  )
+              )
+          }).then(({data}) => {
+            if(data){
+              this.$message({
+                message: "标记完成",
+                type: 'success',
+              });
+              this.cardItemList[index].flag = fl;
+            }else{
+              this.$message({
+                message: "标记失败",
+                type: 'error',
+              })
+            }
+          })
+      },
+      previewPic(cardItem, picUrl, prodName, side){
+        this.previewPicUrl = this.resourcesUrl + picUrl
+        this.previewPicDialogVisible = true;
+        this.side = side;
+        if(prodName.indexOf('小卡') != -1){
+          this.prodType = '小卡';
+        } else if(prodName.indexOf('仿拍立得') != -1){
+          this.prodType = '仿拍立得';
+        }else if(prodName.indexOf('直拍封面') != -1){
+          this.prodType = '直拍封面';
+        }else if(prodName.indexOf('票根') != -1){
+          this.prodType = '票根';
+        }else if(prodName.indexOf('明信片') != -1){
+          this.prodType = '明信片';
+        }else if(prodName.indexOf('方卡') != -1){
+          this.prodType = '方卡';
+        }else if(prodName.indexOf('流砂书签') != -1){
+          this.prodType = '流砂书签';
+        }else if(prodName.indexOf('徽章') != -1){
+          this.prodType = '徽章';
+        }else if(prodName.indexOf('手幅') != -1){
+          this.prodType = '手幅';
+        }else if(prodName.indexOf('毛绒徽章') != -1){
+          this.prodType = '毛绒徽章';
+        }else if(prodName.indexOf('方形贴纸') != -1){
+          this.prodType = '方形贴纸';
+        }else if(prodName.indexOf('三宫格') != -1){
+          this.prodType = '三宫格';
+        }
+        this.$nextTick(() =>{
+          this.$refs.canvasPreviewRef.init(cardItem, this.resourcesUrl + picUrl, this.prodType, side)
+        })
+      },
+      getDataList () {
+        this.$http({
+          url: this.$http.adornUrl('/prod/orderCardItem/page'),
+          method: 'get',
+          params: this.$http.adornParams(
+                  Object.assign({
+                            size: 300,
+                            orderNumber: this.orderItem.orderNumber,
+                            orderItemId: this.orderItem.orderItemId,
+                          },
+                  )
+          )
+        }).then(({data}) => {
+          this.cardItemList = data.records;
+        })
+      },
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .previewClass{
+    position:absolute;
+    border-style:solid;
+    border-color:red;
+    opacity:0.3;
+    z-index:3;
+  }
+  #cardBottom{
+    position:absolute;
+    z-index:1;
+  }
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+  /* .prods-select-body {
+    height: 600px;
+    overflow: auto;
+    border-top: 1px solid #eeeeee;
+    border-right: 1px solid #eeeeee;
+    border-bottom: 1px solid #eeeeee;
+  } */
+  .brand-select-pop {
+    & ::v-deep .el-dialog__body {
+      padding-top: 20px;
+      padding-bottom: 20px;
+    }
+    .main-container {
+      margin: 0;
+      .pagination {
+        text-align: right;
+      }
+    }
+  }
+</style>

+ 198 - 0
src/components/order-scan-delivery/index.vue

@@ -0,0 +1,198 @@
+<template>
+  <!-- 扫描发货 -->
+  <el-dialog
+    title="扫描发货"
+    v-if="visible"
+    :visible.sync="visible"
+    width="25%"
+    center
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    :append-to-body="true"
+    @close="closeDialog">
+    <el-form :model="wave" label-position="left" size="medium">
+      <el-form-item label="波次号" label-width="100px">
+        <span autocomplete="off">{{wave.waveNo}}</span>
+      </el-form-item>
+      <el-form-item label="剩余订单数" label-width="100px">
+        <span autocomplete="off">{{waitScan.waitScanNum}}/</span>
+        <span autocomplete="off">{{waitScan.orderNum}}</span>
+      </el-form-item>
+      <el-form-item label="扫描订单号" label-width="100px">
+        <el-input id="scanInput" @change="scanMatchPrintOrder" type="text" v-model="scanDeliveryNo" placeholder="请扫描条形码"></el-input>
+      </el-form-item>
+      <el-form-item label="匹配订单" label-width="100px">
+        <span autocomplete="off" style="color: darkgray" v-if="matchPrintOrder.match == null">等待扫描...</span>
+        <span autocomplete="off" style="color: green" v-else-if="matchPrintOrder.match">匹配成功</span>
+        <span autocomplete="off" style="color: red" v-else>匹配失败</span>
+      </el-form-item>
+    </el-form>
+    <el-card class="box-card" shadow="never">
+      <div class="text item">
+        <span autocomplete="off">订单号:</span>
+        <span autocomplete="off">{{matchPrintOrder.orderNumber}}</span>
+      </div>
+      <div class="text item">
+        <span autocomplete="off">快递单号:</span>
+        <span autocomplete="off">{{matchPrintOrder.deliveryNo}}</span>
+      </div>
+      <div class="text item">
+        <span autocomplete="off">波次号:</span>
+        <span autocomplete="off">{{matchPrintOrder.waveNo}}</span>
+      </div>
+      <div class="text item">
+        <span autocomplete="off">收件人:</span>
+        <span autocomplete="off">{{matchPrintOrder.receiverName}}</span>
+      </div>
+      <div class="text item">
+        <span autocomplete="off">手机号:</span>
+        <span autocomplete="off">{{matchPrintOrder.receiverMobile}}</span>
+      </div>
+      <div class="text item">
+        <span autocomplete="off">产品信息:</span>
+        <span autocomplete="off">{{matchPrintOrder.prodName}}</span>
+        <span autocomplete="off"> | </span>
+        <span autocomplete="off">{{matchPrintOrder.prodNums}} 张</span>
+      </div>
+    </el-card>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="handleDelivery" :disabled="!matchPrintOrder.match">发 货</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      waitScan: {
+        waitScanNum: 0,
+        orderNum: 0
+      },
+      scanDeliveryNo: null,
+      matchPrintOrder: {
+        orderNumber: null,
+        deliveryNo: null,
+        prodName: null,
+        prodNums: null,
+        waveNo: null,
+        serialNo: null,
+        receiverName: null,
+        receiverMobile: null,
+        match: null
+      },
+      wave:{},
+      lastInputStr: null
+    }
+  },
+  methods: {
+    // 获取数据列表
+    init (wave) {
+      this.wave = wave;
+      this.visible = true
+      // this.initEnterListener();
+      this.$nextTick(() => {
+        let $input = document.getElementById("scanInput");
+        $input.focus();
+        this.waitScanNumCheck();
+      })
+    },
+    initEnterListener(){
+      document.addEventListener('keyup', (e) => {
+        let key = window.event.keyCode;
+        if (key == 32) {
+          if(this.visible == true){
+            this.handleDelivery();
+          }
+        }
+      })
+    },
+    waitScanNumCheck(){
+      let dataBody = {printChannel: this.wave.printChannel, waveId: this.wave.waveId};
+      this.$http({
+        url: this.$http.adornUrl('/wave/wave/waitScanNumCheck'),
+        method: 'get',
+        params: this.$http.adornParams(dataBody),
+      }).then(({data}) => {
+        this.waitScan = data;
+      }).catch((error) => {
+        this.waitScan = {}
+      })
+    },
+    scanMatchPrintOrder(value){
+      // let substr = value.substring(value.length - 19, value.length)
+      let substr;
+      if(this.lastInputStr != null){
+        substr = value.replace(new RegExp(this.lastInputStr), "");
+      }else{
+        substr = value;
+      }
+      if(substr){
+        this.scanDeliveryNo = substr;
+        let dataBody = {printChannel: this.wave.printChannel, orderNumber: substr, waveId: this.wave.waveId};
+        this.$http({
+          url: this.$http.adornUrl('/printOrder/printOrder/findWavePrintOrder'),
+          method: 'get',
+          params: this.$http.adornParams(dataBody),
+        }).then(({data}) => {
+          this.matchPrintOrder = data;
+          if(data){
+            this.handleDelivery();
+            this.lastInputStr = substr;
+
+          }
+        }).catch((error) => {
+          this.matchPrintOrder = {};
+          this.matchPrintOrder.match = false;
+        })
+      }
+    },
+    handleDelivery(){
+      if(this.waitScan.waitScanNum == 0){
+        this.$message({
+          message: "订单已发货",
+          type: 'error'
+        })
+        return;
+      }
+      let dataBody = {waveId: this.wave.waveId, orderNumber: this.scanDeliveryNo.trim(), printChannel: this.wave.printChannel};
+      this.$http({
+        url: this.$http.adornUrl(`/printOrder/printOrder/confirmDelivery`),
+        method: 'POST',
+        data: this.$http.adornData(dataBody)
+      }).then(({data}) => {
+        if(data){
+          this.$message({
+            message: "发货成功",
+            type: 'success'
+          })
+          this.waitScanNumCheck();
+        }else{
+          this.$message({
+            message: "发货失败",
+            type: 'error'
+          })
+        }
+      })
+    },
+    closeDialog(){
+      this.visible = false;
+      this.scanDeliveryNo = null;
+      this.waitScan = {};
+      this.matchPrintOrder = {};
+      this.$emit("refreshDataList", null);
+      this.lastInputStr = null;
+    },
+  }
+}
+</script>
+<style scoped>
+  .text {
+    font-size: 14px;
+  }
+
+  .item {
+    padding: 6px 0;
+  }
+</style>

+ 2 - 2
src/components/prod-pic/index.vue

@@ -45,14 +45,14 @@ export default {
   methods: {
     picNotNull (pic) {
       var picUrl = pic.replace(this.resourcesUrl, '')
-      console.log('picUrl', picUrl)
+      // console.log('picUrl', picUrl)
       if (!pic || !picUrl) {
         return false
       }
       return true
     },
     getPic (pic) {
-      console.log('pic', pic)
+      // console.log('pic', pic)
       if (pic.indexOf('http') !== -1) {
         return pic
       }

+ 354 - 60
src/i18n/langs/zh_CN.js

@@ -308,106 +308,329 @@ const zhCn = {
     goodsPrice: '单价(元)'
   },
   product: {
+    doNotEnterSpecialCharacters: '请勿输入特殊字符',
     ExpressDistribution: '快递配送',
     isTop: '是否置顶',
     seq: '排序号',
-    remark: '备注',
-    merchantDelivery: '商家配送',
-    userMention: '用户自提',
-    oneInARow: '一列一个',
-    twoInARow: '一列两个',
-    threeInARow: '一列三个',
-    video: '产品视频',
+    brandId: '品牌id',
+    brandName: '品牌名称',
+    basicInformation: '基本信息',
+    productCategories: '商品分类',
+    priceAndInventory: '价格及库存',
+    brandImg: '品牌图片',
     prodName: '商品名称',
-    emptyProdName: '商品名称不能为空',
-    pleComAndEnName: '请完善中文名称',
-    pleeliveryMethod: '请选择配送方式',
-    pleShgTlate: '请选择运费模板',
+    prodStatus: '商品状态',
+    prodNameCn: '商品sku中文名称',
+    prodNameEn: '商品sku英文名称',
+    prodInfo: '商品信息',
     oriPrice: '商品原价',
     price: '商品现价',
-    scorePrice: '积分价',
-    deliveryArea: '配送区域',
-    freeShipping: '包邮',
-    pleaEntBraName: '请输入品牌名称',
-    further: '且',
-    freeShiullAmount: '满金额包邮',
-    pwvFree: '件/重量/体积包邮',
-    emptyPrice: '销售价不能为空',
-    emptyMarketValue: '市场价不能为空',
-    emptyScorePrice: '积分价不能为空',
-    emptyStocks: '库存不能为空',
+    prices: '价格',
     pic: '商品图片',
     status: '状态',
-    totalStocks: '商品总库存',
-    waterSoldNum: '注水销量',
-    stocks: '商品库存',
+    totalStocks: '商品库存',
+    prodType: '商品类型',
+    prodMold: '商品类别',
+    ordProd: '普通商品',
+    groupProd: '团购商品',
+    limitedTimeProd: '秒杀商品',
+    pointsProduct: '积分商品',
+    comProd: '组合商品',
+    activeProd: '活动商品',
+    delType: '配送方式',
+    sameCityDelivery: '同城配送',
+    shopDelivery: '店铺配送',
+    userPickUp: '用户自提',
+    pleaseSelectTheProduct: '请先选择商品分类再填写以下商品信息',
+    pleaseSelectCategoryAgainSelectBrand: '请先选择商品分类,再选择品牌',
     deletes: '你确定要删除此商品吗?',
+    saveTip: '该商品的库存为0,确定继续发布吗?',
     select: '选择商品',
     violation: '违规下架',
+    batchUp: '批量上架',
+    batchDown: '批量下架',
     pendingReview: '待审核',
     violationPendingReview: '违规下架待审核',
+    auditHistory: '审核历史',
+    reviewStatus: '审核状态',
     prod: '商品',
-    delType: '配送方式',
-    category: '分类',
-    sameCityDelivery: '同城配送',
-    shopDelivery: '店铺配送',
-    userPickUp: '用户自提',
-    belongsBrand: '所属品牌',
-    chooseBrand: '选择品牌',
     atributeID: '属性ID',
     attributeName: '属性名称',
+    attributeNameEn: '属性英文名称',
     attributeNameNoNull: '属性名称不能为空',
+    attributeNameEnNoNull: '属性英文名称不能为空',
     attributeValue: '属性值',
+    attributeValueEn: '英文属性值',
+    attributeValueEnTips: '英文属性值,为空时默认使用中文属性值',
+    attributeValueEditTips: '点击以修改对应属性值',
     attributeValueNoNull: '属性值不能为空',
     content: '请输入内容',
     same: '不能添加相同的属性值',
+    appliedAmount: '申请金额',
+    debitCard: '到账银行卡',
     uploadTips: '请选择操作,同时只能上传一个文件',
     selectFile: '选取文件',
     downloadTemplate: '下载模板',
     fileSuccess: '文件导入成功',
-    enableSpec: '至少要启用一种商品规格',
     fileFail: '文件导入失败',
     fileUploadFail: '文件上传失败!',
     downloadTemplateTips1: '上传模板只能是 xls、xlsx格式!',
     downloadTemplateTips2: '上传模板大小不能超过 10MB!',
-    downloadTemplateTips3: '上传图片不能大于9张',
-    choosePicUpload: '请选择图片上传',
-    picUploadTips: '可拖动排序,首图为主图,最多上传9张。',
-    PicMaxQuantity: '图片最大数量为:',
-    recPicSize: '建议图片尺寸为:',
     fileName: '商品信息模板.xlsx',
-    prodCode: '商品编码',
-    chineseInf: '中文信息',
+    templateName: '模板.xlsx',
+    merAddProdTime: '商家添加商品时间',
+    meSubRevTime: '商家提交审核时间',
+    proApprTime: '商品审核通过时间',
+    uploadProdTip: '上传的规格编码若为空或与已有的编码重复,系统将会自动生成新的编码值。',
+    maxNum: '限购数量',
+    maxCancelTime: '取消订单时间',
+    offViol: '违规下线',
+    pleaEntBraName: '请输入品牌名称',
+    branls: '品牌首字母',
+    pletials: '请输入品牌首字母',
+    pleaemarks: '请输入备注内容',
+    brandNaBeEmpty: '品牌名称不能为空',
+    brandNameErrorTips: '品牌名称长度在1-50字之间',
+    brandInitBeEmpty: '品牌首字母不能为空',
+    firstLetterErrorTips: '请输入一位大写字母',
+    brandLogoNotEmpty: '请上传品牌logo',
+    sortValmpty: '顺序值不能为空',
+    shippinngs: '运费设置',
+    parameterSetting: '参数设置',
+    parameter: '参数',
+    shippingtBeEmpty: '运费模板不能为空',
+    deliveryArea: '配送区域',
+    freeShipping: '包邮',
+    further: '且',
+    freeShiullAmount: '满金额包邮',
+    freeippingR: '元金额包邮',
+    pwvFree: '件/重量/体积包邮',
+    import: '导入',
+    productVideo: '商品视频',
+    draggableSort: '可拖动排序,首图为主图,最多上传',
+    platforation: '平台分类',
+    shopCategory: '本店分类',
+    thisPlatformEmpty: '平台分类不能为空',
+    thisShopeEmpty: '本店分类不能为空',
+    thisProduCategroy: '请选择商品分类',
+    thisShopCategroy: '请选择本店分类',
+    thisProductImg: '请选择至少一张图片作为商品主图',
+    brand: '所属品牌',
+    whetPreSale: '是否开启预售',
+    chooseABrand: '选择品牌',
+    preSaleTime: '预售发货时间',
+    thePreSaleDtBeEmpty: '预售发货时间不能为空',
+    choosengDate: '选择发货日期',
+    userMention: '用户自提',
+    chinenInput: '中文信息',
     prodellingPoint: '产品卖点',
+    plePictureToUpload: '请选择图片上传',
+    pleeliveryMethod: '请选择配送方式',
+    pleShgTlate: '请选择运费模板',
+    zhpleComAndEnName: '请完善中文名称名称',
+    violatingGoods: '违规商品',
+    refuseToPass: '拒绝通过',
+    other: '其他',
+    importGoods: '导入商品',
+    offlineManagement: '下线管理',
+    reportsToCond: '导出报表只根据搜索条件的状态导出',
+    exportProduct: '导出筛选出的商品信息',
+    oneInARow: '一列一个',
+    twoInARow: '一列两个',
+    threeInARow: '一列三个',
+    pleaseEnterALabelName: '请输入标签名称',
+    addNew: '新增',
+    singleProductBar: '单品条码',
+    noBarcode: '如无条形码系统将自动生成',
+    usedToQuickItem: '用于快速识别该单品',
+    item: '单品',
+    itemName: '单品名称',
+    singleProdPic: '单品图片',
+    singleProdSpe: '单品规格',
+    specificationStock: '规格库存',
+    singleProdClas: '单品分类',
+    singleProdUnit: '单品单位',
+    singleProdInve: '单品库存',
+    supplier: '首选供应商',
+    supplierStatus: '供应商状态',
+    chooseSupplier: '选择供应商',
+    itemNameCanEmpty: '单品名称不能为空',
+    pleaseUploadApicture: '请上传单品图片',
+    chooseProdCateg: '选择商品分类',
+    productSecondaryClassification: '商品二级分类',
+    productThreeClassification: '商品三级分类',
+    currCho: '你当前的选择是',
+    isItAComtionPro: '是否为组合商品',
+    combinationGoods: '组合商品',
+    quantityInCom: '组合内数量',
+    singleProd: '单品成本',
+    total: '合计',
+    skuPictures: 'sku图片',
+    sellingPrice: '销售价(元)',
+    marketPrice: '市场价(元)',
+    eventPrice: '活动售价',
+    commodityCode: '商品编码',
+    productBarcode: '商品条形码',
+    haveReadFol: '我已阅读以下规则,现在发布',
+    releaseNotice: '发布须知',
+    commodityWeight: '商品重量(kg)',
+    commodityVolume: '商品体积(m³)',
+    productSpecifi: '商品规格',
+    addSpecifications: '添加商品规格',
+    specificationValue: '规格值',
+    pleaseerTheSpName: '请输入规格名',
+    pleaseEntValue: '请输入规格值',
+    rule: '规则',
+    merchantDelivery: '商家配送',
+    comInfoSorXls: '商品信息整理.xlsx',
+    pleaseSelectAUnit: '请选择单位',
+    isExistsPleaReEn: '已存在,请重新输入',
+    specificationy: '规格项不能为空',
+    banInf: '禁止发布侵犯他人知识产权的商品,请确认商品符合知识产权保护的规定',
+    userMustFollRule: '用户应遵守国家法律、行政法规、部门规章等规范性文件。对任何涉嫌违反国家法律、行政法规、部门规章等规范性文件的行为, 本平台有权酌情处理。但平台对用户的处理不免除其应尽的法律责任。 用户在平台的任何行为,应同时遵守与平台及其关联公司所签订的各项协议。 平台有权随时变更本规则并在网站上予以公告。 若用户不同意相关变更,应立即停止使用平台的相关服务或产品。平台有权对用户行为及应适用的规则进行单方认定,并据此处理。',
+    relatedItems: '关联单品',
+    chooSingPro: '选择单品',
+    specTip: '属性值 第 N 行有空值',
     selOnlineCustomer: '选择在线客服',
     customersNotInYourCharge: '不是你负责的客户',
     pendingPayment: '待付款',
     pendingDelivery: '待发货',
     pendingReceipt: '待收货',
     pendinEvaluation: '待评价',
-    canceled: '已取消',
     evaluated: '已评价',
     shipped: '已发货',
     completed: '已完成',
+    canceled: '已取消',
     grouping: '拼团中',
-    search: '搜索',
-    reset: '重置',
-    stockBillReason: '出入库原因',
-    stockBillReasonInputTips: '请输入出入库原因',
-    stockType: '出入库类别',
-    sysSet: '系统内置',
-    sendStock: '出库',
-    receiveStock: '入库',
-    viewRemark: '查看备注',
-    prodType: '商品类型',
-    ordProd: '普通商品',
-    comProd: '组合商品',
-    limitedTimeProd: '秒杀商品',
-    groupProd: '团购商品',
-    prodMold: '商品类别',
+    priceTip: '销售价不得高于市场价',
+    noContractedCategories: '暂无已签约分类,请前往',
+    noShopCategories: '暂无店铺分类,请前往',
+    applyContracting: '申请签约分类',
+    createShopCategory: '创建',
+    shopInfo: '店铺信息',
+    propEditingDelTips: '当前正在修改该属性,',
+    propDelTips: '确定要删除该属性值吗?',
+    productSort: '商品排序',
+    selectFirstCategory: '请先选择第一级类目',
+    selectSecondCategory: '请先选择第二级类目',
+
+    // 发布商品
+    selectProductCategory: '选择商品类目',
+    editProductInfo: '编辑商品信息',
+    editProductDetails: '编辑商品详情',
     physicalGoods: '实物商品',
+    logisticsDelivery: '(物流发货)',
     virtualGoods: '虚拟商品',
-    activeProd: '活动商品',
+    noLogisticsRequired: '(无需物流)',
+    productTemplates: '商品模板',
+    templateImport: '(模板导入)',
+    selectPlatformCategory: '选择平台分类',
+    selectShopCategory: '选择店铺分类',
+    selectFirstLevelCategory: '选择第一级分类',
+    selectSecondLevelCategory: '选择第二级分类',
+    selectThirdLevelCategory: '选择第三级分类',
+    selectedPlatformCategories: '已选平台分类',
+    selectedShopCategories: '已选店铺分类',
+    nextStep1: '选好了,下一步',
+    nextStep2: '下一步',
+    prevStep: '上一步',
+    saveBtn1: '保存',
+    saveBtn2: '保存并查看',
+    selectedCategories: '已选分类',
+    platformCategories: '平台分类',
+    shopCategories: '店铺分类',
+    selectLanguage: '选择语言',
+    productSellingPoints: '商品卖点',
+    productBrands: '商品品牌',
+    selectText: '选择',
+    specStock: '规格库存',
+    totalInventory: '库存总和',
+    chineseDetails: '中文详情',
+    englishDetails: '英文详情',
+    detailPagePreviewImage: '详情页预览图',
+    parameteNameAndParameterValue: '参数名和参数值显示在商品详情开头,参数名不超过10字,参数值不超过20字',
+    // 虚拟商品
+    otherSettings: '其他设置',
+    noWriteOffRequired: '无需核销',
+    singleWriteOff: '单次核销',
+    multipleWriteOffs: '多次核销',
+    numberOfWriteOffs: '核销次数',
+    userMessage: '用户留言',
+    expiryDate: '有效期',
+    longTermValidity: '长期有效',
+    validOnTheSameDay: '购买后当天有效',
+    beforeTime: '(每天24点前可以使用)',
+    afterPurchase: '购买后',
+    validDays: '天内有效',
+    validFrom: '在',
+    to: '至',
+    startDate: '开始日期',
+    endDate: '结束日期',
+    requiredField: '必填',
+    addField: '添加字段',
+    msgFieldTips: '购买商品时让买家输入留言,最多可设置 10 条',
+    afterSalesService: '售后服务',
+    supportApplyRefund: '支持买家申请退款',
+    doNotSupportApplyRefund: '不支持买家申请退款',
+    afterSalesServiceTips: '商品详情页将展示“不支持申请退款”的说明,买家如需退款只能主动联系商家处理。',
+    msgCannotBePlainSpace: '不能为纯空格,请重新输入',
+    // 规格
+    addSpecPic: '添加规格图片',
+    specValueCharacterLength: '规格值长度不超过20个字符',
+    specNameNotNull: '规格名不能为空',
+    selectSpecFirst: '请先选择规格',
+    specName: '规格名',
+    specValue: '规格值',
+    specialWordSymbolTips: '不允许包含特殊字符;:',
+    currentlyAdded: '当前已添加',
+    productSpecCount: '组商品规格',
+    groups: '组',
+    cannotAddUnderThisSpec: '该规格名下不可添加',
+    createNewSpecNameManually: '支持手动输入创建新规格名',
+    // 提示
+    postProductTips1: '选择准确分类,方便用户搜索,提高下单率',
+    postProductTips2: '默认中文,选择多语言需编辑多个商品卖点和商品详情',
+    postProductTips3: '商品名称建议:商品描述+属性,长度不超过60个字符',
+    postProductTips4: '商品卖点展示在商品详情标题下面,长度不超过100个字符',
+    postProductTips5: '建议尺寸800*800像素,可拖动排序,最多上传9张,首图为主图',
+    postProductTips6: '主图视频建议时长9-30秒,视频宽高和商品图保持一致',
+    postProductTips7: '每个规格库存的总和',
+    postProductTips8: '“同城配送”需在配送管理设置后才能生效',
+    postProductTips9: '运费模板支持按地区、购买件数、按重量计算运费等',
+    postProductTips10: '需要核销的商品会生成核销码,可提供给商家线下核销',
+    postProductTips11: '规格名称不超过10个字符',
+    postProductTips12: '仅支持为第一组规格设置规格值图片,建议尺寸:800 x 800像素,规格值长度不超过20个字符',
+    postProductTips13: '第一个规格的规格值可以添加图片',
+    postProductTips14: '选择内容进行批量填充',
+    postProductTips15: '如无编码系统将自动生成',
+    postProductTips16: '商品编码不能重复',
+    postProductTips17: '商品中文名称不能为空',
+    postProductTips18: '商品英文名称不能为空',
+    postProductTips19: '商品中文卖点不能为空',
+    postProductTips20: '商品英文卖点不能为空',
+    postProductTips21: '请上传商品图片',
+    postProductTips22: '商品发布成功后不可更改',
+    selectPlatformCategoryTips: '请选择平台分类',
+    selectShopCategoryTips: '请选择店铺分类',
+    enableSpec: '至少要启用一种商品规格',
+    specValueCannotBeEmpty: '规格值不能为空',
+    completeTheAddedSpec: '请先完善已添加的规格',
+    dateErrTips1: '开始时间不能大于或等于结束时间',
+    dateErrTips2: '结束时间不能少于或等于当前时间',
+    dateErrTips3: '结束时间不能少于或等于开始时间',
+    msgMaxLength: '最多可设置10条',
+    validDaysEmptyTips: '请填写核销有效天数',
+    validDateEmptyTips: '请选择核销有效日期',
+    msgEmptyTips: '请填写已添加的留言',
+    cannotModifyProdType: '已发布的商品不允许修改商品类型',
+    uploadDetailPicTips: '为了保证图片清晰,请上传宽度大于940px的图',
+    parameterTips: '请输入正确的参数',
+    notAvailableSeparatePurchase: '活动商品不可以单买,仅用于套装和赠品的非主商品',
+    fillInTheNecessaryInfo: '请先完善商品必填信息!',
+    chooseLanguage: '选择语言',
+    skuLangTips: '默认中文,选择多语言需编辑多个属性名称和属性值',
+    attributeTips: '属性名称长度不超过10个字,英文不填写则默认使用中文',
+    attributeValueTips: '属性值不超过20个字,英文若不填写则默认中文',
     availableInventory: '现有库存'
   },
   video: {
@@ -532,7 +755,9 @@ const zhCn = {
     noPass: '审核不通过',
     pass: '审核通过',
     waitPass: '等待审核',
-    audit: '审核'
+    audit: '审核',
+    platformAudit: '平台审核',
+    no: '无'
   },
   prodTag: {
     prodManage: '管理分组商品',
@@ -623,6 +848,8 @@ const zhCn = {
     refundMoney: '卖家已退款'
   },
   order: {
+    modifyOrderAmount: '修改订单金额',
+    modificatioAmount: '修改订单金额会减少用户支付的金额,请谨慎更改',
     logisticsInformation: '物流信息',
     orderDetails: '订单详情',
     contactBuyer: '联系买家',
@@ -675,6 +902,13 @@ const zhCn = {
     addressee: '收货人',
     pendingReceipt: '待收货',
     product: '商品',
+    totalDiscount: '优惠总额',
+    userPayunt: '用户支付金额',
+    platforlowance: '平台津贴',
+    estimancome: '预计收入',
+    reducedAnt: '减少金额',
+    shippingAmunt: '运费金额',
+    decreaslowance: '平台津贴减少',
     purchaseQuantity: '购买数量',
     transactionPrice: '成交单价',
     preferentialAmount: '优惠金额',
@@ -708,7 +942,8 @@ const zhCn = {
     applicationTime: '申请时间',
     refundStatus: '退款状态',
     refundApplication: '退款申请',
-    processingRefunds: '查看退款',
+    processingRefunds: '处理退款',
+    lookRefunds: '查看退款',
     shipped: '买家已发货',
     waitingRefund: '等待退款',
     refundsuccessfully: '退款成功',
@@ -1090,6 +1325,10 @@ const zhCn = {
     isResetKey: '确定进行重置密钥操作?',
     superAdmin: '(超级管理员)'
   },
+  admin: {
+    dollar: '元',
+    isDeleOper: '确定进行删除操作',
+  },
   coupon: {
     offlineReasonTips: '请输入下线原因',
     offlineReasonNotEmpty: '下线原因不能为空',
@@ -1230,6 +1469,17 @@ const zhCn = {
     skuPrice: '商品sku原价(元)',
     productHasBeenDeleted: '商品已被删除'
   },
+  time: {
+    start: '开始日期',
+    end: '结束日期',
+    tip: '至',
+    t: '今日',
+    y: '昨日',
+    n: '近7天',
+    m: '近30天',
+    a: '全部',
+    selectWeek: '选择周'
+  },
   weixin: {
     batchDeletion: '批量删除',
     textMessage: '文本',
@@ -1649,6 +1899,7 @@ const zhCn = {
     addActivity: '添加活动'
   },
   distribution: {
+    phoneNum: '手机号',
     basicSettings: '基础设置',
     promotionSettings: '推广设置',
     withdrawalSettings: '提现设置',
@@ -2062,6 +2313,7 @@ const zhCn = {
     refundOnlyPri: '仅退款',
     returnRefund: '退货退款',
     returnMethod: '退款方式',
+    issueARefund: '发放退款',
     returnDetails: '退款详情',
     orderActualAmount: '订单实付总额',
     refundReason: '退款原因',
@@ -2730,6 +2982,7 @@ const zhCn = {
     customisedMsg: '自定义消息'
   },
   shop: {
+    resetMap: '重置',
     exportSuccess: '导出成功',
     comInfoSorXls: '店铺信息整理.xlsx',
     withDrawCashXls: '商家提现信息整理.xlsx',
@@ -2948,7 +3201,13 @@ const zhCn = {
     createStore: '创建店铺',
     contractApplication: '签约申请',
     reviewSignCategoriesApply: '审核签约类目申请',
-    reviewSignBrandsApply: '审核签约品牌申请'
+    reviewSignBrandsApply: '审核签约品牌申请',
+    changeAmountTip1: '由于地址变更,运费应',
+    undercharged: '少',
+    overcharged: '多',
+    by: '收',
+    yuan: '元',
+    changeAmountTip2: ',此操作不会变更订单金额,是否确认直接修改订单地址?'
   },
   formData: {
     export: '导出',
@@ -4031,6 +4290,41 @@ const zhCn = {
     exportSelectShop: '导出选中的店铺',
     addSigningCategory: '新增签约类目',
     addSigningBrand: '新增签约品牌'
+  },
+  promotionVideo: {
+    tgUserName: '推广人',
+    upId: '博主ID',
+    upName: '博主名称',
+    orderNumber: '订单编号',
+    shopId: '店铺ID',
+    shopName: '推广店铺',
+    status: '状态',
+    promotionVideoId: '关联视频ID',
+    promotionVideo: '关联视频链接',
+    videoUrl: '视频链接',
+    likeNumT1: 'T+1点赞数',
+    playNumT1: 'T+1播放数',
+    commNum: '评论数',
+    likeNumT7: 'T+7点赞数',
+    playNumT7: 'T+7播放数',
+    likeNum: '总点赞数',
+    playNum: '总播放数',
+    publishPlatform: '发布平台',
+    payAmt: '付费金额',
+    isPay: '是否付费',
+    settleStatus: '结算状态'
+  },
+  promotionOrder: {
+    tgUserName: '推广人名称',
+    upId: '博主ID',
+    upName: '博主名称',
+    orderNumber: '订单编号',
+    shopId: '店铺ID',
+    shopName: '店铺名称',
+    status: '状态',
+    promotionVideoId: '关联视频ID',
+    promotionVideo: '关联视频链接',
+    videoUrl: '视频链接'
   }
 }
 export default zhCn

+ 23 - 0
src/utils/excel.js

@@ -0,0 +1,23 @@
+/**
+ * 下载excel
+ * @param {blob} fileArrayBuffer 文件流
+ * @param {String} filename 文件名称
+ */
+export const downloadXls = (fileArrayBuffer, filename) => {
+  let data = new Blob([fileArrayBuffer], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'});
+  if (typeof window.chrome !== 'undefined') {
+    // Chrome
+    var link = document.createElement('a');
+    link.href = window.URL.createObjectURL(data);
+    link.download = filename;
+    link.click();
+  } else if (typeof window.navigator.msSaveBlob !== 'undefined') {
+    // IE
+    var blob = new Blob([data], {type: 'application/force-download'});
+    window.navigator.msSaveBlob(blob, filename);
+  } else {
+    // Firefox
+    var file = new File([data], filename, {type: 'application/force-download'});
+    window.open(URL.createObjectURL(file));
+  }
+}

+ 32 - 0
src/utils/zip.js

@@ -0,0 +1,32 @@
+/**
+ * 下载zip
+ * @param {blob} fileArrayBuffer 文件流
+ * @param {String} filename 文件名称
+ */
+import { saveAs } from 'file-saver';
+
+export const downloadZip = (fileArrayBuffer, filename) => {
+
+  // let data = new Blob([fileArrayBuffer], {type: 'application/zip'});
+  // if (typeof window.chrome !== 'undefined') {
+  //   // Chrome
+  //   var link = document.createElement('a');
+  //   link.href = window.URL.createObjectURL(data);
+  //   link.download = filename;
+  //   link.click();
+  // } else if (typeof window.navigator.msSaveBlob !== 'undefined') {
+  //   // IE
+  //   var blob = new Blob([data], {type: 'application/force-download'});
+  //   window.navigator.msSaveBlob(blob, filename);
+  // } else {
+  //   // Firefox
+  //   var file = new File([data], filename, {type: 'application/force-download'});
+  //   window.open(URL.createObjectURL(file));
+  // }
+
+  const blob = new Blob(fileArrayBuffer, {
+    type: 'application/zip'
+  })
+  debugger
+  saveAs(blob, filename)
+}

+ 175 - 0
src/views/modules/afterSales/returnDelivery-add-or-update.vue

@@ -0,0 +1,175 @@
+<template>
+  <el-dialog
+    :title="!dataForm.id ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    width="760px"
+    v-if="visible"
+    @close="closeDialog"
+    :visible.sync="visible">
+    <el-form :model="dataForm" size="small" label-width="100px">
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="订单号" prop="orderNumber">
+            <el-input id="scanInput" v-model="dataForm.orderNumber" @change="scanMatchPrintOrder" placeholder="可扫描条形码"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-button style="margin-left: 10px" type="text" @click="openOrderInfo(dataForm.orderNumber)">查看</el-button>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="状态" prop="status">
+            <el-select v-model="dataForm.status">
+              <el-option label="待联系" :value="0"></el-option>
+              <el-option label="联系异常" :value="1"></el-option>
+              <el-option label="已联系待重发" :value="2"></el-option>
+              <el-option label="已重发" :value="3"></el-option>
+              <el-option label="地址异常" :value="4"></el-option>
+              <el-option label="无需处理" :value="5"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="补交邮费" prop="status">
+            <el-select v-model="dataForm.isPayed" clearable>
+              <el-option key="1" label="已补交" :value="1"></el-option>
+              <el-option key="0" label="未补交" :value="0"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="原运单号" prop="deliveryNo">
+            <el-input  v-model="dataForm.deliveryNo"  type="text" ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="新运单号" prop="newDeliveryNo">
+            <el-input v-model="dataForm.newDeliveryNo"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-form-item label="原收件人信息" prop="receiverInfo">
+        <el-input type="textarea" rows="4" v-model="dataForm.receiverInfo"></el-input>
+      </el-form-item>
+      <el-form-item label="新收件人信息" prop="newReceiverInfo">
+        <el-input type="textarea" rows="4" v-model="dataForm.newReceiverInfo"></el-input>
+      </el-form-item>
+      <el-form-item label="退件原因" prop="reason">
+        <el-input type="textarea" rows="2" v-model="dataForm.reason"></el-input>
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        <el-input type="textarea" rows="2" v-model="dataForm.remark"></el-input>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button class="default-btn primary-btn" type="primary" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+    <order-info ref="orderInfo"></order-info>
+  </el-dialog>
+</template>
+
+<script>
+  import OrderInfo from "../order/orderInfo";
+export default {
+  components: {
+    OrderInfo
+  },
+  data () {
+    return {
+      visible: false,
+      scanDeliveryNo: null,
+      dataForm: {
+        id: null,
+        orderNumber: null,
+        deliveryNo: null,
+        receiverInfo: null,
+        newDeliveryNo: null,
+        newReceiverInfo: null,
+        status: 0,
+        remark: null,
+        isPayed: 0,
+        reason: null
+      },
+      lastInputStr: null,
+      dataRule: {
+      }
+    }
+  },
+  methods: {
+    openOrderInfo(orderNumber){
+      this.$refs.orderInfo.init({
+        orderNumber: orderNumber
+      })
+    },
+    init (id) {
+      this.dataForm.id = id || 0
+      this.visible = true
+      this.$nextTick(() => {
+        if (this.dataForm.id) {
+          this.$http({
+            url: this.$http.adornUrl('/platform/order/returnDelivery/info/' + this.dataForm.id),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+        let $input = document.getElementById("scanInput");
+        $input.focus();
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$http({
+        url: this.$http.adornUrl('/platform/order/returnDelivery'),
+        method: this.dataForm.id ? 'put' : 'post',
+        data: this.$http.adornData(this.dataForm)
+      }).then(({data}) => {
+        this.$message({
+          message: this.$i18n.t('publics.operation'),
+          type: 'success'
+        });
+        this.$emit("refreshDataList", null);
+        this.visible = false;
+      })
+    },
+    //扫描运单号获取订单信息
+    scanMatchPrintOrder(value){
+      let substr;
+      if(this.lastInputStr != null){
+        substr = value.replace(new RegExp(this.lastInputStr), "");
+      }else{
+        substr = value;
+      }
+      if(substr){
+        this.dataForm.orderNumber = substr;
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/returnDelivery/findReturnOrder/' + this.dataForm.orderNumber),
+          method: 'get',
+        }).then(({data}) => {
+          if(data){
+            this.dataForm.deliveryNo = data.deliveryNo;
+            this.dataForm.receiverInfo = "收货人:" + data.receiver + "\n" + "联系电话:" + data.mobile + "\n" + "收货地址:" + data.address;
+            this.dataFormSubmit();
+            this.lastInputStr = substr;
+          }else{
+            this.$message.error("订单不存在");
+          }
+        }).catch((error) => {
+          this.$message.error("运单号查询异常");
+        })
+      }
+    },
+    closeDialog(){
+      this.visible = false;
+      this.scanDeliveryNo = null;
+      this.$emit("refreshDataList", null);
+      this.lastInputStr = null;
+    },
+  }
+}
+</script>

+ 295 - 0
src/views/modules/afterSales/returnDelivery.vue

@@ -0,0 +1,295 @@
+<template>
+  <div class="mod-print-returnDelivery">
+    <!-- 搜索相关区域 -->
+    <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-input type="text" clearable v-model="searchForm.orderNumber" placeholder="订单号"></el-input>
+          </el-form-item>
+          <el-form-item label="原运单号" class="search-form-item">
+            <el-input type="text" clearable v-model="searchForm.deliveryNo" placeholder="原运单号"></el-input>
+          </el-form-item>
+          <el-form-item label="收件人信息" class="search-form-item">
+            <el-input type="text" clearable v-model="searchForm.receiverInfo" placeholder="收件人信息"></el-input>
+          </el-form-item>
+          <el-form-item label="状态" class="search-form-item">
+            <el-select v-model="searchForm.status" clearable>
+              <el-option label="待联系" :value="0"></el-option>
+              <el-option label="联系异常" :value="1"></el-option>
+              <el-option label="已联系待重发" :value="2"></el-option>
+              <el-option label="已重发" :value="3"></el-option>
+              <el-option label="地址异常" :value="4"></el-option>
+              <el-option label="无需处理" :value="5"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="补交运费" class="search-form-item">
+            <el-select v-model="searchForm.isPayed" clearable>
+              <el-option label="已补交" :value="1"></el-option>
+              <el-option label="未补交" :value="0"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange()">{{$t('crud.searchBtn')}}</div>
+            <div class="default-btn" @click="resetSearchForm('searchForm')">重置</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+        <div class="default-btn primary-btn" @click="addOrUpdateHandle()">新增退件</div>
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 订单号 -->
+          <el-table-column label="店铺" prop="shopId" align="center">
+            <template slot-scope="scope">
+              <span>{{getShopName(scope.row.shopId)}}</span>
+            </template>
+          </el-table-column>
+          <!-- 订单号 -->
+          <el-table-column label="订单号" prop="orderNumber" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.orderNumber}}</span>
+            </template>
+          </el-table-column>
+          <!-- 原运单号 -->
+          <el-table-column label="原运单号" prop="deliveryNo" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.deliveryNo}}</span>
+            </template>
+          </el-table-column>
+          <!-- 收件人信息 -->
+          <el-table-column label="原收件人信息" prop="receiverInfo" align="center" >
+            <template slot-scope="scope">
+                <el-tooltip placement="top">
+                  <div slot="content">{{ scope.row.receiverInfo}}</div>
+                  <span v-if="scope.row.receiverInfo && scope.row.receiverInfo.length > 20">{{scope.row.receiverInfo.substr(0, 20) }}</span>
+                  <span v-else>{{scope.row.receiverInfo }}</span>
+                </el-tooltip>
+            </template>
+          </el-table-column>
+          <!-- 新运单号 -->
+          <el-table-column label="新运单号" prop="newDeliveryNo" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.newDeliveryNo}}</span>
+            </template>
+          </el-table-column>
+          <!-- 新收件人信息 -->
+          <el-table-column label="新收件人信息" prop="newReceiverInfo" align="center">
+            <template slot-scope="scope">
+              <el-tooltip placement="top">
+                <div slot="content">{{ scope.row.newReceiverInfo}}</div>
+                <span v-if="scope.row.newReceiverInfo && scope.row.newReceiverInfo.length > 20">{{scope.row.newReceiverInfo.substr(0, 20) }}</span>
+                <span v-else>{{scope.row.newReceiverInfo }}</span>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+          <!-- 状态,0:待联系,1:联系异常,2:可重发,3:已重发 -->
+          <el-table-column label="状态" prop="status" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.status === 0" type="primary">待联系</el-tag>
+              <el-tag v-if="scope.row.status === 1" type="danger">联系异常</el-tag>
+              <el-tag v-if="scope.row.status === 2" type="warning">已联系待重发</el-tag>
+              <el-tag v-if="scope.row.status === 3" type="success">已重发</el-tag>
+              <el-tag v-if="scope.row.status === 4" type="danger">地址异常</el-tag>
+              <el-tag v-if="scope.row.status === 5" type="info">无需处理</el-tag>
+            </template>
+          </el-table-column>
+          <!-- 退件原因 -->
+          <el-table-column label="退件原因" prop="remark" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.reason}}</span>
+            </template>
+          </el-table-column>
+          <!-- 备注 -->
+          <el-table-column label="发件地址" prop="remark" 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>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+          <!-- 登记时间 -->
+          <el-table-column label="登记时间" prop="createTime" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.createTime}}</span>
+            </template>
+          </el-table-column>
+          <!-- 是否补交运费,0未补,1已补交 -->
+          <el-table-column label="补交运费" prop="isPayed" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.isPayed === 0" type="danger">未补交</el-tag>
+              <el-tag v-if="scope.row.isPayed === 1" type="success">已补交</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id)">{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.id)">{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './returnDelivery-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      searchForm: {
+        orderNumber: null,
+        deliveryNo: null,
+        status: null,
+        receiverInfo: null,
+        isPayed: null,
+        newDeliveryNo: null,
+      }, // 搜索
+      shopId: this.$store.state.user.shopId,
+      dataListLoading: false,
+      addOrUpdateVisible: false,
+      shopList:[]
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList(this.page);
+  },
+  mounted () {
+    this.getShopList();
+  },
+  methods: {
+    getShopName(shopId){
+     let shop = this.shopList.find(item => {return item.shopId === shopId})
+      return shop.shopName;
+    },
+    getShopList() {
+      this.$http({
+        url: this.$http.adornUrl('/shop/shopAuditing/list'),
+        method: 'get',
+      }).then(({ data }) => {
+        if (data) {
+          this.shopList = data
+        }
+      })
+    },
+    resetSearchForm (formName) {
+      this.$refs[formName].resetFields()
+      this.searchForm = {}
+    },
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/platform/order/returnDelivery/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            orderNumber: this.searchForm.orderNumber,
+            deliveryNo: this.searchForm.deliveryNo,
+            receiverInfo: this.searchForm.receiverInfo,
+            status: this.searchForm.status,
+            isPayed: this.searchForm.isPayed,
+            printChannel: this.searchForm.printChannel
+            },
+            this.searchForm
+          )
+        )
+      }).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;
+        })
+        this.dataList = list
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/returnDelivery/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 30,
+            onClose: () => {
+              this.refreshChange()
+            }
+          })
+        })
+      }).catch(() => { })
+    },
+    // 刷新回调
+    refreshChange () {
+      // this.page.currentPage = 1
+      this.addOrUpdateVisible = false;
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      this.getDataList(this.page)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.mod-print-returnDelivery {
+}
+</style>

+ 387 - 0
src/views/modules/afterSales/thirdAfterSales-add-or-update.vue

@@ -0,0 +1,387 @@
+<template>
+  <el-dialog
+    :title="!dataForm.id ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    width="760px"
+    v-if="visible"
+    @close="dialogClose">
+    <el-form :model="dataForm" size="small" label-width="100px">
+      <el-row>
+        <el-col :span="12">
+<!--          <el-form-item label="售后渠道" prop="printChannel">-->
+<!--            <el-select key="printChannel" v-model="dataForm.printChannel" :disabled="isView">-->
+<!--              <el-option label="闪电" value="Lightning"></el-option>-->
+<!--            </el-select>-->
+<!--          </el-form-item>-->
+        </el-col>
+        <el-col :span="10">
+          <el-form-item label="订单编号" prop="orderNumber" style="width: 300px">
+            <el-input :disabled="isView" v-model="dataForm.orderNumber" @blur="searchOrder(dataForm.orderNumber)"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="2">
+          <el-button style="margin-left: 10px" type="text" @click="openOrderInfo(dataForm.orderNumber)">查看</el-button>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="8">
+          <el-form-item label="快递单号" prop="deliveryNo" style="width: 300px">
+            <span key="deliveryNo">{{dataForm.deliveryNo}}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="下单时间" prop="orderTime" :disabled="true">
+            <span key="orderTime">{{dataForm.orderTime}}</span>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="订单金额" prop="orderAmount" :disabled="true">
+            <span key="orderAmount">{{dataForm.orderAmount}}</span>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-form-item label="产品名称" prop="prodName" :disabled="true">
+        <span key="prodName">{{dataForm.prodName}}</span>
+      </el-form-item>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="售后类型" prop="type">
+            <el-select v-model="dataForm.type" clearable :disabled="isView">
+              <el-option label="瑕疵" value="瑕疵"></el-option>
+              <el-option label="裁切" value="裁切"></el-option>
+              <el-option label="毛边" value="毛边"></el-option>
+              <el-option label="翘边" value="翘边"></el-option>
+              <el-option label="错发" value="错发"></el-option>
+              <el-option label="少发" value="少发"></el-option>
+              <el-option label="漏发" value="漏发"></el-option>
+              <el-option label="退件" value="退件"></el-option>
+              <el-option label="补发" value="补发"></el-option>
+              <el-option label="丢件" value="丢件"></el-option>
+              <el-option label="物流" value="物流"></el-option>
+              <el-option label="改地址" value="改地址"></el-option>
+              <el-option label="改快递" value="改快递"></el-option>
+              <el-option label="其他" value="其他"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="售后登记时间" prop="createTime">
+            <el-date-picker
+              :disabled="isView"
+              size="small"
+              v-model="dataForm.createTime"
+              type="datetime"
+              value-format="yyyy-MM-dd HH:mm:ss">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="售后状态" prop="progress">
+            <el-select
+              :disabled="isView"
+              v-model="dataForm.status"
+              clearable
+              placeholder="请选择售后状态"
+              size="small">
+              <el-option label="待处理" :value="0"></el-option>
+              <el-option label="已处理" :value="1"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="登记人" prop="settleStatus">
+            <el-input :disabled="isView" v-model="dataForm.registrant" clearable style="width: 220px"></el-input>
+            <!--            <el-select-->
+<!--              v-model="dataForm.registrant"-->
+<!--              clearable-->
+<!--              placeholder="登记人"-->
+<!--              size="small">-->
+<!--              <el-option label="永平" value="永平"></el-option>-->
+<!--              <el-option label="文楷" value="文楷"></el-option>-->
+<!--              <el-option label="方权" value="方权"></el-option>-->
+<!--              <el-option label="文祥" value="文祥"></el-option>-->
+<!--            </el-select>-->
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="退款方式" prop="refundType">
+            <el-select
+              :disabled="isView"
+              v-model="dataForm.refundType"
+              clearable
+              placeholder="请选择退款方式"
+              size="small">
+              <el-option :key="0" label="余额" :value="0"></el-option>
+              <el-option :key="1" label="微信" :value="1"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="退款数量" prop="refundCount">
+            <el-input type="number" :disabled="isView" v-model="dataForm.refundCount" style="width: 220px"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="12">
+          <el-form-item label="退款金额" prop="refundAmount">
+            <el-input :disabled="isView" v-model="dataForm.refundAmount" style="width: 220px"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="退款金额(按成本)" prop="costAmount" label-width="100">
+            <el-input :disabled="isView" v-model="dataForm.costAmount" style="width: 220px"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-form-item label="售后描述" prop="describe">
+        <el-input :disabled="isView" type="textarea" v-model="dataForm.content"></el-input>
+      </el-form-item>
+      <el-form-item label="售后图片" prop="pic">
+        <el-upload
+          :disabled="isView"
+          ref="upload"
+          :multiple="true"
+          :action="$http.adornUrl('/admin/file/simpleUpload')"
+          list-type="picture-card"
+          accept="image/*"
+          :headers="{Authorization: $cookie.get('Authorization_vs'),locale:lang}"
+          :on-success="onUploadSuccess"
+          :file-list="fileList"
+          :on-remove="handlePicRemove"
+          :on-preview="handlePicPreview">
+          <i class="el-icon-plus"></i>
+        </el-upload>
+        <div  @paste="pasteImg($event)">
+          <textarea placeholder="点击这里,然后把图片粘贴" style="width: 100%;height: 100px;border: 1px solid #c9c9c9;border-radius: 5px;"></textarea>
+        </div>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <div class="default-btn"  @click="dialogClose">{{$t('crud.filter.cancelBtn')}}</div>
+      <div class="default-btn primary-btn" @click="dataFormSubmit()">{{$t('crud.filter.submitBtn')}}</div>
+    </span>
+    <el-dialog :visible.sync="imgDialogVisible" :append-to-body="true">
+      <video  v-if="videoFlag" width="100%" controls="controls" :src="dialogImageUrl" class="avatar"></video>
+      <img v-else width="100%" :src="dialogImageUrl" alt="">
+    </el-dialog>
+    <order-info ref="orderInfo"></order-info>
+  </el-dialog>
+</template>
+
+<script>
+  import ImgUpload from '@/components/img-upload';
+  import OrderInfo from "../order/orderInfo";
+  import { uploadFile } from '@/utils/httpRequest.js'
+
+  export default {
+  components: {
+    ImgUpload,OrderInfo
+  },
+  data () {
+    return {
+      videoFlag: false,
+      visible: false,
+      orderInfoVisible: false,
+      lang: localStorage.getItem('lang') || 'zh_CN',
+      isView: false,
+      dataForm: {
+        id: null,
+        orderNumber: null,
+        type: null,
+        content: null,
+        orderTime: null,
+        afterSalesTime: null,
+        refundAmount: 0,
+        costAmount: 0,
+        status: 0,
+        pic: null,
+        deliveryNo: null,
+        createTime: null,
+        updateTime: null,
+        printChannel: null,
+        orderAmount: null,
+        refundType: 0,
+        prodName: null,
+        settleStatus: 0,
+        shopId: this.$store.state.user.shopId,
+      },
+      dialogImageUrl: null,
+      imgDialogVisible: false,
+      afterSalesDateRange: [],
+      fileList: [],
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+      dataRule: {
+      }
+    }
+  },
+  methods: {
+    getTime () {
+      let now = new Date()
+      let year = now.getFullYear()
+      let month = ('0' + (now.getMonth() + 1)).slice(-2)
+      let day = ('0' + now.getDate()).slice(-2)
+      let hours = ('0' + now.getHours()).slice(-2)
+      let minutes = ('0' + now.getMinutes()).slice(-2)
+      let seconds = ('0' + now.getSeconds()).slice(-2)
+      this.dataForm.createTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
+    },
+    init (id, isView) {
+      this.dataForm.id = id || 0
+      this.getTime()
+      this.visible = true;
+      this.$nextTick(() => {
+        this.isView = isView;
+        if (this.dataForm.id) {
+          this.$http({
+            url: this.$http.adornUrl('/platform/print/thirdAfterSales/info/' + this.dataForm.id),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data;
+            if(this.dataForm.pic){
+              this.fileList = [];
+              let picArray = this.dataForm.pic.split(",");
+              for (let i = 0; i < picArray.length; i++) {
+                this.fileList.push({ url: this.resourcesUrl + picArray[i], response: {filePath: picArray[i] }})
+              }
+              // picArray.forEach(item =>{
+              //   let ele = {filePath: item, resourcesUrl: this.resourcesUrl}
+              //   this.fileList.push(ele);
+              // })
+            }
+          })
+        }
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      let filePath = [];
+      if(this.fileList.length > 0 && !this.dataForm.id){
+        this.fileList.forEach(item => {
+          filePath.push(item.response.filePath);
+        });
+        this.dataForm.pic = filePath.join(",");
+      }else{
+        this.fileList.forEach(item => {
+          filePath.push(item.response.filePath);
+        });
+        this.dataForm.pic = filePath.join(",");
+      }
+      this.$http({
+        url: this.$http.adornUrl('/platform/print/thirdAfterSales'),
+        method: this.dataForm.id ? 'put' : 'post',
+        data: this.$http.adornData(this.dataForm)
+      }).then(({data}) => {
+        this.$message({
+          message: this.$i18n.t('publics.operation'),
+          type: 'success',
+          duration: 200,
+          onClose: () => {
+            this.dataForm.pic = null;
+            this.visible = false;
+            this.$emit("refreshDataList", null);
+          }
+        })
+      })
+    },
+    searchOrder(orderNumber){
+      if (orderNumber) {
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/thirdPrintOrder/info/' + orderNumber),
+          method: 'get',
+          params: this.$http.adornParams()
+        }).then(({data}) => {
+          let o = JSON.parse(JSON.stringify(this.dataForm))
+          o.orderTime = data.createTime
+          o.deliveryNo = data.deliveryNo
+          o.orderAmount = data.actualTotal
+          o.prodName = data.prodName
+          o.shopId = data.shopId
+          this.dataForm = o
+        })
+      } else {
+        this.dataForm.orderTime = null;
+        this.dataForm.deliveryNo = null;
+        this.dataForm.shopId = null;
+      }
+    },
+    openOrderInfo(orderNumber){
+      this.$refs.orderInfo.init({
+        orderNumber: orderNumber
+      })
+    },
+    checkMediaType(fileValue) {
+      console.log("fileValue==" + fileValue);
+      let index = fileValue.indexOf("."); //(考虑严谨用lastIndexOf(".")得到)得到"."在第几位
+      let fileValueSuffix = fileValue.substring(index); //截断"."之前的,得到后缀
+      // if(type == 'video') {
+      if (!/(.*)\.(mp4|rmvb|avi|ts)$/.test(fileValueSuffix)) { //根据后缀,判断是否符合视频格式
+        return false;
+      }
+      // }
+      // if(type == 'image') {
+      //   if (!/(.*)\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(fileValueSuffix)) { //根据后缀,判断是否符合图片格式
+      //     return false;
+      //   }
+      // }
+
+      return true;
+    },
+    handlePicPreview(file){
+      this.dialogImageUrl = file.url;
+      let url = file.response.resourcesUrl + file.response.filePath
+      this.videoFlag = this.checkMediaType(url)
+      console.log(this.videoFlag)
+      this.imgDialogVisible = true;
+    },
+    onUploadSuccess(response, file, fileList){
+      this.fileList = fileList;
+    },
+    handlePicRemove(file, fileList){
+      this.fileList = fileList;
+    },
+    /**
+     * textarea图片粘贴事件
+     */
+    pasteImg(e) {
+      console.log(e)
+      const { items } = e.clipboardData; // 获取粘贴板文件对象
+      if (items.length) {
+        for (const item of items) {
+          if (item.type.indexOf('image') !== -1) {
+            const file = item.getAsFile(); // 获取图片文件
+            if (file) {
+              uploadFile(
+                this.$http.adornUrl('/admin/file/simpleUpload'),
+                file
+              ).then(({ data }) => {
+                // this.$refs['file'].value = null // 解决上传同一图片不显示bug
+                // { url: this.resourcesUrl + picArray[i], response: {filePath: picArray[i] }
+                let obj = {url: data.resourcesUrl + data.filePath, response: {filePath: data.filePath }}
+                this.fileList.push(obj)
+              })
+            }
+          }
+        }
+      }
+    },
+    dialogClose(){
+      this.fileList = [];
+      this.dataForm = {};
+      this.dataForm.refundType = 0;
+      this.dataForm.status = 0;
+      this.dataForm.refundAmount = 0;
+      this.dataForm.costAmount = 0;
+      this.visible = false;
+      this.$emit("refreshDataList", null);
+    }
+  }
+}
+</script>

+ 478 - 0
src/views/modules/afterSales/thirdAfterSales.vue

@@ -0,0 +1,478 @@
+<template>
+  <div class="mod-print-thirdAfterSales">
+    <!-- 搜索相关区域 -->
+    <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-input type="text" clearable v-model="searchForm.orderNumber" placeholder="请输入订单编号"></el-input>
+          </el-form-item>
+          <el-form-item label="快递单号" class="search-form-item">
+            <el-input type="text" clearable v-model="searchForm.deliveryNo" placeholder="请输入运单号"></el-input>
+          </el-form-item>
+          <el-form-item label="售后类型" class="search-form-item">
+            <el-select v-model="searchForm.type" clearable>
+              <el-option label="瑕疵" value="瑕疵"></el-option>
+              <el-option label="裁切" value="裁切"></el-option>
+              <el-option label="印歪" value="印歪"></el-option>
+              <el-option label="毛边" value="毛边"></el-option>
+              <el-option label="翘边" value="翘边"></el-option>
+              <el-option label="错发" value="错发"></el-option>
+              <el-option label="少发" value="少发"></el-option>
+              <el-option label="漏发" value="漏发"></el-option>
+              <el-option label="退件" value="退件"></el-option>
+              <el-option label="补发" value="补发"></el-option>
+              <el-option label="物流" value="物流"></el-option>
+              <el-option label="改地址" value="改地址"></el-option>
+              <el-option label="改快递" value="改快递"></el-option>
+              <el-option label="其他" value="其他"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="售后状态">
+            <el-select
+              v-model="searchForm.status"
+              clearable
+              placeholder="请选择售后状态"
+              size="small">
+              <el-option key="0" label="待处理" value="0"></el-option>
+              <el-option key="1" label="已处理" value="1"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="登记人">
+            <el-input type="text" clearable v-model="searchForm.registrant" placeholder="请输入登记人"></el-input>
+            <!--            <el-select-->
+<!--              v-model="searchForm.registrant"-->
+<!--              clearable-->
+<!--              placeholder="请选择登记人"-->
+<!--              size="small">-->
+<!--              <el-option key="yp" label="永平" value="永平"></el-option>-->
+<!--              <el-option key="zh" label="文锴" value="文锴"></el-option>-->
+<!--              <el-option key="fq" label="方权" value="方权"></el-option>-->
+<!--              <el-option key="wx" label="文祥" value="文祥"></el-option>-->
+<!--            </el-select>-->
+          </el-form-item>
+          <el-form-item label="下单时间"  clearable>
+            <el-date-picker
+              :default-time="['00:00:00', '23:59:59']"
+              size="small"
+              v-model="orderTimeDateRange"
+              type="datetimerange"
+              range-separator="到"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              start-placeholder="开始时间"
+              end-placeholder="截止时间">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="售后登记时间"  clearable>
+            <el-date-picker
+              :default-time="['00:00:00', '23:59:59']"
+              size="small"
+              v-model="afterSalesDateRange"
+              type="datetimerange"
+              range-separator="到"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              start-placeholder="开始时间"
+              end-placeholder="截止时间">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange()">{{$t('crud.searchBtn')}}</div>
+            <div class="default-btn" @click="resetSearchForm('searchForm')">重置</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+        <div class="default-btn primary-btn" @click="addOrUpdateHandle()">新增售后</div>
+<!--        <div class="default-btn info-btn" @click="openWxRefundDialog()">申请微信退款</div>-->
+<!--        <div class="default-btn primary-btn" v-if="shopId === 1" @click.stop="getUpload()">导入售后数据</div>-->
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 售后渠道 -->
+          <!--<el-table-column label="售后渠道" prop="printChannel" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.printChannel}}</span>
+            </template>
+          </el-table-column>-->
+          <!-- 订单编号 -->
+          <el-table-column label="订单编号" prop="orderNumber" align="center" width="200px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.orderNumber}}</span>
+            </template>
+          </el-table-column>
+          <!-- 快递单号 -->
+          <el-table-column label="快递单号" prop="deliveryNo" align="center" width="150px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.deliveryNo}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="产品名称" prop="prodName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.prodName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 售后类型,比如瑕疵问题,裁剪问题 -->
+          <el-table-column label="售后类型" prop="type" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.type}}</span>
+            </template>
+          </el-table-column>
+          <!-- 订单时间 -->
+          <el-table-column label="下单时间" prop="orderTime" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.orderTime}}</span>
+            </template>
+          </el-table-column>
+          <!-- 售后登记时间 -->
+          <el-table-column label="售后登记时间" prop="createTime" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.createTime}}</span>
+            </template>
+          </el-table-column>
+          <!-- 退款金额 -->
+          <!--<el-table-column label="退款金额(按成本)" prop="refundAmount" align="center" width="80px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.costAmount}}</span>
+            </template>
+          </el-table-column>-->
+          <el-table-column label="退款金额" prop="refundAmount" align="center" width="50px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.refundAmount}}</span>
+            </template>
+          </el-table-column>
+          <!-- 退款方式 -->
+          <el-table-column label="退款方式" prop="refundType" align="center" width="50px">
+            <template slot-scope="scope">
+              <span v-if="scope.row.refundType === 0">余额</span>
+              <span v-if="scope.row.refundType === 1">微信</span>
+            </template>
+          </el-table-column>
+          <!-- 退款方式 -->
+          <el-table-column label="登记人" prop="registrant" align="center" width="50px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.registrant}}</span>
+            </template>
+          </el-table-column>
+          <!-- 进度,待处理,已处理, -->
+          <el-table-column label="售后状态" prop="progress" align="center" width="120px">
+            <template slot-scope="scope">
+              <el-tag effect="dark" type="danger" v-if="scope.row.status === 0">待处理</el-tag>
+              <el-tag effect="dark" type="success" v-if="scope.row.status === 1">已处理</el-tag>
+            </template>
+          </el-table-column>
+          <!-- 结算状态,未结算,已结算, -->
+<!--          <el-table-column label="结算状态" prop="settleStatus" align="center" width="80px">-->
+<!--            <template slot-scope="scope">-->
+<!--              <el-tag effect="dark" type="danger" v-if="scope.row.settleStatus === 0">未结算</el-tag>-->
+<!--              <el-tag effect="dark" type="success" v-if="scope.row.settleStatus === 1">已结算</el-tag>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id, true)">详情</div>
+                <div class="default-btn text-btn" v-if="scope.row.refundType===1" @click="beforeRefound(scope.row)">退款</div>
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id, false)">{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.id)">{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+    <el-dialog
+      :modal="false"
+      title="导入售后数据"
+      :close-on-click-modal="false"
+      :visible.sync="importDialogVisible"
+      @close="handleImportClose"
+      width="38%">
+      <el-upload
+        class="upload-demo"
+        ref="upload"
+        :action="$http.adornUrl('/platform/print/thirdAfterSales/importAfterSales')"
+        :headers="{ Authorization: $cookie.get('Authorization_vs'),locale:lang }"
+        :limit="1"
+        name="file"
+        :file-list="files"
+        :on-success="handleUploadSuccess"
+        :on-error="handleUploadError"
+        :auto-upload="false">
+        <div slot="tip" class="el-upload__tip"></div>
+        <el-button slot="trigger" size="small" icon="el-icon-upload2" style="margin-right: 20px">上传</el-button>
+        <el-button size="small" type="primary" @click="submitUpload" :loading="uploading">提 交</el-button>
+      </el-upload>
+    </el-dialog>
+    <el-dialog
+      title="申请微信退款"
+      :close-on-click-modal="false"
+      :visible.sync="wxRefundVisible"
+      @close="closeRefundDialog"
+      width="38%">
+      <el-form :model="wxRefundData" label-position="right">
+        <el-form-item label="订单号" label-width="70px">
+          <el-input disabled v-model="wxRefundData.orderNumber" placeholder="请输入订单号" @change="queryWxRefundInfo"></el-input>
+          <span style="color: red" v-if="wxRefundBalanceVisible">{{orderRefundQueryInfo}}</span>
+        </el-form-item>
+        <el-form-item label="退款金额" label-width="70px">
+          <el-input v-model="wxRefundData.refundAmount" type="number" placeholder="请输入退款金额"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-if="changeMoney" @click="wxRefundVisible=false">关闭</el-button>
+        <el-button v-else type="primary" @click="handleWxRefund()">确认退款</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './thirdAfterSales-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      lang: localStorage.getItem('lang') || 'zh_CN',
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      refoundRow: {},
+      wxRefundVisible: false,
+      wxRefundBalanceVisible: false,
+      shopId: this.$store.state.user.shopId,
+      wxRefundData: {
+        refundAmount: 0,
+        orderNumber: ''
+      },
+      searchForm: {
+        printChannel: null,
+        status: null,
+        type: null,
+        orderTime: null,
+        orderNumber: null,
+        deliveryNo: null,
+        settleStatus: null,
+        registrant: null
+      }, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false,
+      orderTimeDateRange: [],
+      afterSalesDateRange: [],
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+      importDialogVisible: false,
+      uploading: false,
+      files:[],
+      orderRefundQueryInfo:{},
+      changeMoney: false
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList(this.page);
+  },
+  mounted () {
+  },
+  methods: {
+    openWxRefundDialog(){
+      this.wxRefundVisible = true;
+    },
+    closeRefundDialog(){
+      this.wxRefundVisible = false;
+      this.wxRefundBalanceVisible = false;
+      this.wxRefundData = {}
+    },
+    queryWxRefundInfo(){
+      this.$http({
+        url: this.$http.adornUrl(`/platform/orderRefund/refundQuery/`+ this.wxRefundData.orderNumber),
+        method: 'get',
+      }).then(({ data }) => {
+        if(data){
+          this.changeMoney = (data.payAmount - data.totalRefundAmount).toFixed(2) <=0 ? true : false
+          this.orderRefundQueryInfo = "订单支付金额:" + data.payAmount + "元,已退款金额:" + data.totalRefundAmount + "元,可退款金额:" + (data.payAmount - data.totalRefundAmount).toFixed(2) + "元"
+        }else{
+          this.orderRefundQueryInfo
+        }
+        this.openWxRefundDialog()
+      })
+      this.wxRefundBalanceVisible = true;
+    },
+    beforeRefound (row) {
+      console.log(row)
+      this.refoundRow = row
+      if (row.refundAmount) {
+        this.wxRefundData.orderNumber = row.orderNumber
+        this.wxRefundData.refundAmount = row.refundAmount
+      } else {
+        this.wxRefundData.orderNumber = row.orderNumber
+      }
+      this.queryWxRefundInfo()
+    },
+    updateRow(){
+      this.refoundRow.status = 1
+      this.$http({
+        url: this.$http.adornUrl('/platform/print/thirdAfterSales'),
+        method: this.refoundRow.id ? 'put' : 'post',
+        data: this.$http.adornData(this.refoundRow)
+      }).then(({data}) => {
+        this.$message({
+          message: this.$i18n.t('publics.operation'),
+          type: 'success',
+          duration: 200,
+          onClose: () => {
+            this.getDataList(this.page)
+          }
+        })
+      })
+    },
+    handleWxRefund(){
+      this.$confirm('即将退款' + this.wxRefundData.refundAmount + '元, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/platform/orderRefund/partRefundRequest'),
+          method: 'post',
+          data: this.$http.adornData(this.wxRefundData)
+        }).then(({data}) => {
+          this.wxRefundBalanceVisible = false;
+          this.wxRefundVisible = false;
+          this.wxRefundData = {};
+          this.updateRow()
+          this.$message({
+            message: '退款发起成功',
+            type: 'success'
+          })
+        })
+      }).catch(() => {
+      })
+    },
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/platform/print/thirdAfterSales/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            'afterSalesStartTime': this.afterSalesDateRange == null ? null : this.afterSalesDateRange[0],
+            'afterSalesEndTime': this.afterSalesDateRange == null ? null : this.afterSalesDateRange[1],
+            'orderStartTime': this.orderTimeDateRange == null ? null : this.orderTimeDateRange[0],
+            'orderEndTime': this.orderTimeDateRange == null ? null : this.orderTimeDateRange[1],
+            'orderNumber': this.searchForm.orderNumber,
+            'printChannel': this.searchForm.printChannel,
+            'type': this.searchForm.type,
+            'status': this.searchForm.status,
+            'deliveryNo': this.searchForm.deliveryNo,
+            'registrant': this.searchForm.registrant,
+          },
+          )
+        )
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id, isView) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id, isView)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/platform/print/thirdAfterSales/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success'
+          })
+          this.refreshChange()
+        })
+      }).catch(() => { })
+    },
+    getUpload(){
+      this.importDialogVisible = true;
+    },
+    submitUpload () {
+      this.$refs.upload.submit();
+    },
+    handleUploadSuccess (response, file, fileList) {
+      this.importDialogVisible = false;
+      this.uploading = false;
+      this.getDataList(this.page, null, false)
+    },
+    handleUploadError (error, file, fileList) {
+      this.importDialogVisible = false;
+      this.uploading = false;
+    },
+    handleImportClose(){
+      this.importDialogVisible = false;
+      this.files = [];
+    },
+    // 刷新回调
+    refreshChange () {
+      // this.page.currentPage = 1
+      // this.this.addOrUpdateVisible = false;
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      // this.searchForm = params
+      this.getDataList(this.page)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    },
+    /**
+     * 重置表单
+     * @param {String} formName 表单名称
+     */
+    resetSearchForm (formName) {
+      this.$refs[formName].resetFields()
+      this.searchForm = {}
+    },
+  }
+}
+</script>
+<style lang="scss">
+.mod-print-thirdAfterSales {
+}
+</style>

+ 1 - 0
src/views/modules/distribution/activity/distribution-activity.vue

@@ -55,6 +55,7 @@
             prop="activityTitle"
             label="活动标题"
             width="340">
+            width="570">
             <template slot-scope="scope">
               {{scope.row.activityTitle}}
             </template>

+ 2450 - 0
src/views/modules/order/mergeOrder.vue

@@ -0,0 +1,2450 @@
+<template>
+  <div class="mod-order-order">
+    <!--    <top-task></top-task>-->
+    <div class="search-bar">
+      <el-form
+        :inline="true"
+        :model="dataForm"
+        @keyup.enter.native="getDataList(this.page)"
+        size="small"
+      >
+        <div class="input-row">
+          <!-- &nbsp;&nbsp;&nbsp; -->
+          <el-form-item :label="this.$i18n.t('order.number') + ':'" :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-input
+              v-model="dataForm.orderNumber"
+              :placeholder="this.$i18n.t('order.number')"
+              clearable
+              size="small"
+            ></el-input>
+          </el-form-item>
+          <el-form-item label="产品名称" :label-width=" lang === 'en' ? '145px' : '85px'">
+            <template>
+              <el-autocomplete
+                class="inline-input"
+                v-model="dataForm.prodName"
+                :fetch-suggestions="querySearch"
+                placeholder="请输入内容"
+                @select="handleSelect"
+              ></el-autocomplete>
+            </template>
+          </el-form-item>
+          <el-form-item label="产品材质" :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-select
+              v-model="dataForm.skuName"
+              clearable
+              placeholder="产品材质"
+              size="small">
+              <el-option key="01" label="高透亮膜" value="高透亮膜"></el-option>
+              <el-option key="02" label="哑膜" value="哑膜"></el-option>
+              <el-option key="03" label="七彩镭射膜" value="七彩镭射膜"></el-option>
+              <el-option key="04" label="斜杠镭射膜" value="斜杠镭射膜"></el-option>
+              <el-option key="05" label="满天星膜" value="满天星膜"></el-option>
+              <el-option key="06" label="玻璃碎膜" value="玻璃碎膜"></el-option>
+              <el-option key="07" label="珠光纸" value="珠光纸"></el-option>
+              <el-option key="08" label="不覆膜" value="不覆膜"></el-option>
+              <el-option key="09" label="印象磨砂膜" value="印象磨砂膜"></el-option>
+              <el-option key="10" label="星光拉丝膜" value="星光拉丝膜"></el-option>
+              <el-option key="21" label="镜面膜" value="镜面膜"></el-option>
+              <el-option key="22" label="星星镭射膜" value="星星镭射膜"></el-option>
+              <el-option key="23" label="爱心镭射膜" value="爱心镭射膜"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item :label="this.$i18n.t('prodList.shopName') + ':'">
+            <el-select v-model="dataForm.shopId" :placeholder="this.$i18n.t('prodList.shopName')"
+                       controls-position="right" @change="orderShopId(true)" :clearable="true">
+              <el-option v-for="item in shopList" :key="item.shopId" :label="item.shopName" :value="item.shopId">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item :label="this.$i18n.t('order.paymentMethod') + ':'"
+                        :label-width=" lang === 'en' ? '145px' : '85px'">
+            <template>
+              <el-select
+                v-model="dataForm.payType"
+                size="small"
+                clearable
+                :placeholder="this.$i18n.t('order.paymentMethod')"
+              >
+                <el-option
+                  v-for="item in payType"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-form-item>
+          <!-- &nbsp;&nbsp;&nbsp; -->
+          <el-form-item label="快递单号" :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-input
+              v-model="dataForm.dvyFlowId"
+              placeholder="请输入快递单号"
+              clearable
+              size="small"
+            ></el-input>
+          </el-form-item>
+          <el-form-item :label="this.$i18n.t('shop.contactTel') + ':'" :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-input
+              v-model="dataForm.mobile"
+              :placeholder="this.$i18n.t('order.pleaseEnterNumber')"
+              clearable
+              size="small"
+            ></el-input>
+          </el-form-item>
+          <el-form-item :label="this.$i18n.t('order.theRecipientSName') + ':'"
+                        :label-width=" lang === 'en' ? '145px' : '100px'">
+            <el-input
+              v-model="dataForm.receiver"
+              :placeholder="this.$i18n.t('order.pleaseEnRecipName')"
+              clearable
+              size="small"
+            ></el-input>
+          </el-form-item>
+
+          <el-form-item label="快递单号"  :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-input
+              v-model="dataForm.dvyFlowId"
+              placeholder="请输入快递单号"
+              clearable
+              size="small"
+            ></el-input>
+          </el-form-item>
+
+
+          <!--<el-form-item label="订购数量:" :label-width=" lang === 'en' ? '145px' : '85px'">
+            <InputNumberRange v-model="productNumsRange"></InputNumberRange>
+          </el-form-item>-->
+          <!-- &nbsp;&nbsp;&nbsp; -->
+          <el-form-item :label="this.$i18n.t('order.createTime') + ':' "
+                        :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-date-picker
+              size="small"
+              :default-time="['00:00:00', '23:59:59']"
+              v-model="dateRange"
+              type="datetimerange"
+              range-separator="至"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              start-placeholder="开始时间"
+              end-placeholder="结束时间"
+            ></el-date-picker
+            >
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn" :class="{ 'is-active': timeActive === 1 }" @click="setDateRange(1)">今日
+            </div>
+            <div class="default-btn" :class="{ 'is-active': timeActive === 2 }" @click="setDateRange(2)">昨日
+            </div>
+            <div class="default-btn" :class="{ 'is-active': timeActive === 3 }" @click="setDateRange(3)">近3天
+            </div>
+            <div class="default-btn" :class="{ 'is-active': timeActive === 4 }" @click="setDateRange(4)">近5天
+            </div>
+            <div
+              class="default-btn primary-btn"
+              @click="searchChange(true)"
+            >{{ $t('order.query') }}
+            </div
+            >
+            <div
+              class="default-btn"
+              @click="clear()"
+            >重置
+            </div
+            >
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <div class="main">
+      <div class="content">
+        <!-- 导航 -->
+        <div class="order-status-nav clearfix">
+          <ul class="nav-list clearfix">
+            <li
+              :class="['nav-item', activeName == 0 ? 'selected' : '']"
+              data-sts="0"
+              @click="selectNav($event)"
+            >
+              全部
+            </li>
+            <li
+              :class="['nav-item', activeName == 1 ? 'selected' : '']"
+              data-sts="1"
+              @click="selectNav($event)"
+            >
+              {{ $t('order.pendingPayment') }}
+            </li>
+            <li
+              :class="['nav-item', activeName == 3 ? 'selected' : '']"
+              data-sts="3"
+              @click="selectNav($event)"
+            >
+              {{ $t('order.pendingReceipt') }}
+            </li>
+            <li
+              :class="['nav-item', activeName == 5 ? 'selected' : '']"
+              data-sts="5"
+              @click="selectNav($event)"
+            >
+              {{ $t('order.successfulTransaction') }}
+            </li>
+            <li
+              :class="['nav-item', activeName == 6 ? 'selected' : '']"
+              data-sts="6"
+              @click="selectNav($event)"
+            >
+              {{ $t('order.transactionFailed') }}
+            </li>
+            <!--<li
+              :class="['nav-item', activeName == 7 ? 'selected' : '']"
+              data-sts="7"
+              @click="selectNav($event)"
+            >
+              {{ $t("group.waitGroup") }}
+            </li>-->
+            <li
+              :class="['nav-item', activeName == 8 ? 'selected' : '']"
+              data-sts="8"
+              @click="selectNav($event)"
+            >
+              定制待打印
+            </li>
+            <li
+              :class="['nav-item', activeName == 9 ? 'selected' : '']"
+              data-sts="9"
+              @click="selectNav($event)"
+            >
+              定制待发货
+            </li>
+            <!-- <li
+               :class="['nav-item', activeName == 2 ? 'selected' : '']"
+               data-sts="2"
+               @click="selectNav($event)"
+             >
+               定制待发货
+             </li>-->
+            <li
+              :class="['nav-item', activeName == 10 ? 'selected' : '']"
+              data-sts="10"
+              @click="selectNav($event)"
+            >
+              普通待发货
+            </li>
+          </ul>
+          <ul class="nav-right"></ul>
+        </div>
+        <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"
+                   @click="openMergeScanDialog">
+          扫码集货
+        </el-button>
+        <!-- 列标题 -->
+        <div :class="['tit', showHeadScroll ? 'fixed-top' : '']">
+          <el-row style="width: 100%">
+            <el-col :span="5" id="prod-info-title">
+              <span class="item product">商品信息</span>
+            </el-col>
+            <el-col :span="3" id="price-title" class="transaction-price">
+              <span class="item">{{ $t('order.transaQuantity') }}</span>
+            </el-col>
+            <el-col :span="3" class="column-title">
+              <span class="item">实付金额(元)</span>
+            </el-col>
+            <el-col :span="2" class="column-title">
+              <span class="item">{{ $t('order.paymentMethod') }}</span>
+            </el-col>
+            <el-col :span="3" class="column-title">
+              <span class="item">{{ $t('order.buyerConsignee') }}</span>
+            </el-col>
+            <el-col :span="2" class="column-title">
+              <span class="item">{{ $t('group.orderStatus') }}</span>
+            </el-col>
+            <el-col :span="2" class="column-title">
+              <span class="item">{{ $t('order.afterSalesStatus') }}</span>
+            </el-col>
+            <el-col :span="2" class="column-title">
+              <span class="item">客服备注</span>
+            </el-col>
+            <el-col :span="2" class="column-title">
+              <span class="item">{{ $t('publics.operating') }}</span>
+            </el-col>
+          </el-row>
+        </div>
+        <div
+          class="prod"
+          v-for="(order, index) in dataList"
+          :key="order.orderId"
+        >
+          <div class="prod-tit">
+            <el-checkbox v-model="order.checkStatus" :ref="'checkbox' + index"
+                         @change="checked=>handleSelectionChange(checked, order.orderNumber)"></el-checkbox>
+            <span class="order-index">No.{{ index + 1 }}</span>
+            <span class="order-number">{{ $t('order.number') }}:{{ order.orderNumber }}</span>
+            <span class="order-time">{{ $t('order.createTime') }}:{{ order.createTime }}</span>
+            <span>店铺名称:{{order.shopName}}</span>
+            <!--            <el-tag effect="dark" v-if="order.auditStatus==0" type="danger">待审阅</el-tag>-->
+            <!--            <el-tag effect="dark" v-else-if="order.auditStatus==1" type="success">已审阅</el-tag>-->
+            <!--            <el-tag effect="dark" v-else type="danger">待审阅</el-tag>-->
+            <div>
+              <el-tag effect="dark" v-if="order.isPromotion === 1" type="primary">推广</el-tag>
+              <el-tag effect="dark" v-if="order.isMerge === 1" type="primary">集货</el-tag>
+              <el-tag effect="dark" v-if="order.printStatus === 6" type="primary">已扫码</el-tag>
+              <!-- <el-button type="text" @click="openOrderPromotionDialog(order.orderNumber, order.prodName)">推广链接</el-button> -->
+            </div>
+
+            <!-- <span>买家:19999999999</span>
+            <span >联系电话:19999999999</span>-->
+          </div>
+          <div class="prod-cont">
+            <el-row style="width: 100%">
+              <el-col :span="8" style="height: 100%">
+                <div class="item prod-item">
+                  <div
+                    class="items name"
+                    v-for="orderItem in order.orderItems"
+                    :key="orderItem.orderItemId"
+                  >
+                    <!-- 商品信息 -->
+                    <div class="order-prod-item-info">
+                      <div class="info">
+                        <div class="prod-image">
+                          <prod-pic
+                            height="60"
+                            width="60"
+                            :pic="orderItem.pic"
+                          ></prod-pic>
+                        </div>
+                        <div class="prod-name">
+                          <div class="prod-con">
+                            <div class="prod-name-txt">
+                              {{ orderItem.prodName }}
+                            </div>
+                            <div
+                              class="order-status"
+                              v-if="order.orderType === 1 || order.orderType === 2"
+                            >
+                              {{
+                              order.orderType === 1
+                              ? $t('order.groupPurchaseOrder')
+                              : order.orderType === 2
+                              ? $t('order.spikeOrder')
+                              : ''
+                              }}
+                            </div>
+                            <div
+                              class="order-status"
+                              v-if="order.orderMold === 1"
+                            >
+                              {{ $t('order.virtualOrder') }}
+                            </div>
+                            <div
+                              class="order-status"
+                              v-if="
+                                !orderItem.returnMoneySts ||
+                                orderItem.returnMoneySts < 0 ||
+                                orderItem.returnMoneySts > 5
+                              "
+                            >
+                              {{
+                              orderItem.status === 0 && order.status === 2
+                              ? $t('order.pendingReceipt')
+                              : [
+                              '',
+                              $t('order.pendingPayment'),
+                              $t('order.toBeShipped'),
+                              $t('order.pendingReceipt'),
+                              '',
+                              $t('order.successfulTransaction'),
+                              $t('order.transactionFailed'),
+                              $t('group.waitGroup'),
+                              ][order.status]
+                              }}
+                            </div>
+                            <div class="order-status" v-else>
+                              {{
+                              [
+                              '',
+                              $t('order.buyerApplication'),
+                              $t('order.sellerAccepts'),
+                              $t('order.selShipment'),
+                              $t('order.sellerReceipt'),
+                              $t('order.refundSuccessfully'),
+                              ][orderItem.returnMoneySts]
+                              }}
+                            </div>
+                            <div
+                              class="order-status"
+                              v-if="order.dvyType === 2 || order.dvyType === 4"
+                            >
+                              {{
+                              order.dvyType === 2
+                              ? $t('order.selfMention')
+                              : order.dvyType === 4
+                              ? $t('order.sameCityDelivery')
+                              : ''
+                              }}
+                            </div>
+                            <!-- <span class="prod-info">{{orderItem.skuName}}</span> -->
+                            <div
+                              class="order-status"
+                              v-if="orderItem.preSaleTime !== null"
+                            >
+                              {{ $t('order.EstimatedDeliveryTime') }}{{ orderItem.preSaleTime }}
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                      <!-- 赠品信息 -->
+                      <div v-if="orderItem.giveawayList" class="order-prod-item-give-con">
+                        <div class="giveaway-item" v-for="(giveawayItem, giveIndex) in orderItem.giveawayList"
+                             :key="giveIndex">
+                          <div class="giveaway-item-name"> 【{{ $i18n.t('order.giveawayPord') }}】
+                            {{ giveawayItem.prodName }}
+                          </div>
+                          <div class="giveaway-item-sku-count">{{ giveawayItem.skuName || '' }}
+                            x{{ giveawayItem.prodCount }}
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                    <div class="prod-price">
+                      <span>{{ orderItem.price.toFixed(2) }}</span>
+                      <span
+                      >{{
+                          orderItem.prodCount
+                        }}{{ $t('marketing.item') }}</span
+                      >
+                    </div>
+                  </div>
+                </div>
+              </el-col>
+              <el-col :span="3" style="height: 100%">
+                <div class="item">
+                  <div>
+                    <span class="totalprice"
+                    >{{ order.actualTotal.toFixed(2) }}
+                      </span
+                      >
+                    <span
+                      class="totalprice"
+                      v-if="order.payScore && order.payScore > 0"
+                    >+ {{ order.payScore }}{{ $t('order.integral') }}</span
+                    >
+                    <span class="totalprice"
+                          v-if="order.freightAmount && order.freightAmount - order.platformFreeFreightAmount > 0"
+                    >({{ $t('order.includingFreight') }}:{{
+                        (order.freightAmount - order.platformFreeFreightAmount).toFixed(2)
+                      }})</span
+                    >
+                    <br/>
+                    <span
+                    >{{ $t('order.total') }}{{
+                        order.productNums
+                      }}{{ $t('marketing.item') }}</span
+                    >
+                    <br/>
+                    <div
+                      class="default-btn text-btn"
+                      @click="editAmount(order)"
+                      v-if="order.status === 1"
+                    >{{ $t('order.modifyTheAmount') }}
+                    </div
+                    >
+                  </div>
+                </div>
+              </el-col>
+              <!-- 支付方式 -->
+              <el-col :span="2" style="height: 100%">
+                <div class="item">
+                  <div>
+                    <span v-if="(!order.payType && order.payType != 0) || order.status === 1">{{
+                        $t('order.unpaid')
+                      }}</span>
+                    <span v-else>
+                      {{
+                        [
+                          $t('order.pointsPayment'),
+                          $t('order.wecProPay'),
+                          $t('order.alipayPCPayment'),
+                          $t('order.wechatScanCodePayment'),
+                          $t('order.wechatH5Payment'),
+                          $t('order.weclAccountPay'),
+                          $t('order.alipayH5Payment'),
+                          $t('order.alipayAPPPayment'),
+                          $t('order.wechatAPPPayment'),
+                          $t('order.balancePayment'),
+                          $t('order.payPalPayment'),
+                        ][order.payType]
+                      }}
+                    </span>
+                  </div>
+                </div>
+              </el-col>
+              <!-- 买家信息 -->
+              <el-col :span="3" style="height: 100%">
+                <div class="item">
+                  <div class="buyer-info">
+                    <div>
+                      <el-tooltip placement="top">
+                        <div slot="content" style="font-size: 16px">
+                          <div v-if="order.userAddrOrder">
+                            <span>{{ order.userAddrOrder.province }}</span>
+                            <span>{{ order.userAddrOrder.city }}</span>
+                            <span>{{ order.userAddrOrder.area }}</span>
+                            <span>{{ order.userAddrOrder.street }}</span>
+                            <span>{{ order.userAddrOrder.addr }}</span>
+                          </div>
+                        </div>
+                        <div>
+                          <div class="buyer-name">{{ order.receiverName }}</div>
+                          <div class="buyer-phone">{{ order.receiverMobile }}</div>
+                          <br/>
+                          <div class="buyer-phone" v-if="order.deliveryNo"
+                               style="text-decoration:underline;cursor: pointer; color: dodgerblue;font-size: 16px"
+                               @click="openDeliveryPage(order.deliveryNo)">{{ order.deliveryNo }}
+                          </div>
+                        </div>
+                      </el-tooltip>
+                    </div>
+                  </div>
+                </div>
+              </el-col>
+              <el-col :span="2" style="height: 100%">
+                <div class="item">
+                  <!-- <span v-if="order.refundStatus === 1" size="small" type="danger">退款申请中</span> -->
+                  <span>
+                    <span
+                      v-if="order.status === 1"
+                      size="small"
+                      type="danger"
+                    >{{ $t('order.pendingPayment') }}</span
+                    >
+                    <span
+                      v-else-if="order.status === 2"
+                      size="small"
+                      type="danger"
+                    >{{ $t('order.toBeShipped') }}</span
+                    >
+                    <span
+                      v-else-if="order.status === 3"
+                      size="small"
+                      type="danger"
+                    >{{ $t('order.pendingReceipt') }}</span
+                    >
+                    <span
+                      v-else-if="order.status === 7"
+                      size="small"
+                      type="danger"
+                    >{{ $t('group.waitGroup') }}</span
+                    >
+                    <span
+                      v-else-if="order.status === 5"
+                      size="small"
+                      type="danger"
+                    >{{ $t('order.successfulTransaction') }}</span
+                    >
+                    <span v-else-if="order.status === 6" size="small">{{
+                        $t('order.transactionFailed')
+                      }}</span>
+                  </span>
+                </div>
+              </el-col>
+              <el-col :span="2" style="height: 100%">
+                <div class="item">
+                  <span v-if="order.refundStatus === 1">{{ $t('order.refundApplication') }}</span>
+                  <span v-else-if="order.refundStatus === 2">{{ $t('order.refundsuccessfully') }}</span>
+                  <span v-else-if="order.refundStatus === 3">{{ $t('order.partialRefundSucc') }}</span>
+                  <span v-else-if="order.refundStatus === 4">{{ $t('order.refundFailed') }}</span>
+                  <span v-else>{{ $t('order.noAfterSales') }}</span>
+                </div>
+              </el-col>
+              <el-col :span="2" style="height: 100%">
+                <div class="item">
+                  <el-tooltip placement="top" v-if="order.remarks">
+                    <div slot="content" style="font-size: 16px">
+                      <span>{{ order.remarks }}</span>
+                    </div>
+                    <div>
+                      <div class="buyer-name" style="color:red;overflow: hidden; width: 100px; text-overflow:ellipsis">{{ order.remarks }}</div>
+                    </div>
+                  </el-tooltip>
+                  <span v-else>暂无备注</span>
+                </div>
+              </el-col>
+              <el-col :span="2" style="height: 100%">
+                <div class="item">
+                  <div class="operate">
+                    <!-- <button onclick="">打印订单</button><br> -->
+                    <div
+                      class="default-btn text-btn operate-btn"
+                      @click="addOrUpdateHandle(order.orderNumber, order.shopId, order.status)"
+                    >{{ $t('order.seeDetails') }}
+                    </div
+                    >
+                    <!--<div
+                      class="default-btn text-btn operate-btn"
+                      @click="toImbox(order)"
+                      >{{ $t("order.contactBuyer") }}</div
+                    >-->
+                    <div
+                      class="default-btn text-btn operate-btn"
+                      v-if="
+                        isAuth('order:delivery:orderItemsDelivery') &&
+                        order.status == 3 &&
+                        (!order.refundStatus || order.refundStatus > 2) &&
+                        order.dvyType === 1
+                      "
+                      @click="reviseLogistics(order.orderNumber)"
+                    >{{ $t('order.modifyLogistics') }}
+                    </div
+                    >
+                    <div
+                      class="default-btn text-btn operate-btn"
+                      v-if="isAuth('order:delivery:orderItemsDelivery') && order.status === 2 && order.dvyType !== 2 && order.orderMold !== 1"
+                      @click="changeOrder(order)"
+                    >{{ $t('order.delivery') }}
+                    </div
+                    >
+                    <div
+                      class="default-btn text-btn operate-btn"
+                      v-if="isAuth('admin:station:orderItemsDelivery') && order.status === 2 && order.dvyType === 2"
+                      @click="stationOrder(order)"
+                    >{{ $t('order.pickUp') }}
+                    </div
+                    >
+                    <div
+                      class="default-btn text-btn operate-btn"
+                      v-if="isAuth('admin:station:orderItemsDelivery') && (!order.refundStatus || order.refundStatus > 2)
+                      && order.orderMold === 1 && order.writeOffNum !== 0 && (order.status === 3 ||order.status === 5)
+                      && order.writeOffCodes &&  order.writeOffCodes.length > 0 "
+                      @click="stationOrder(order)"
+                    >{{ $t('order.Writeoffs') }}
+                    </div
+                    >
+                    <div
+                      class="default-btn text-btn operate-btn"
+                      @click="refundRoute(order.orderNumber)"
+                      v-if="isAuth('admin:orderRefund:update') && order.refundStatus"
+                    >{{ $t('order.refundInformation') }}
+                    </div
+                    >
+                    <!--<div
+                        class="default-btn text-btn operate-btn"
+                        @click="generatePrintPdf(order.orderNumber, order.shopId)">{{ $t("order.generatePrintPdf") }}</div>-->
+                  </div>
+                </div>
+              </el-col>
+            </el-row>
+          </div>
+          <!-- <div class="remark">
+            <div class="buyer-remark">
+              <span>备注:{{order.remarks}}</span>
+            </div>
+          </div>-->
+        </div>
+        <div class="empty" v-if="!dataList.length">
+          {{ $t('order.noData') }}
+        </div>
+      </div>
+    </div>
+    <el-pagination
+      ref="orderListTable"
+      v-if="dataList.length"
+      @size-change="sizeChangeHandle"
+      @current-change="currentChangeHandle"
+      :current-page="page.currentPage"
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size="page.pageSize"
+      :total="page.total"
+      layout="total, sizes, prev, pager, next, jumper"
+    ></el-pagination>
+    <!-- 弹窗, 新增 / 修改 -->
+    <!-- 修改物流弹窗 -->
+    <!-- <el-dialog :title="修改物流" width="70%"></el-dialog> -->
+    <el-dialog
+      :title="this.$i18n.t('order.modifyLogistics')"
+      :close-on-click-modal="false"
+      :visible.sync="logVisible"
+      @closed="handleClose"
+      width="50%"
+    >
+      <!-- 修改 -->
+      <div class="revise-log" v-if="isReviseLog">
+        <div class="change-logistics">
+          <div class="warning">{{ $t('order.ifModifyTheLog') }}</div>
+          <div class="log-list">
+            <div
+              class="item"
+              v-for="(logItem, index) in logisticsInfo"
+              :key="index"
+            >
+              <div class="i-tit">
+                <div class="big">{{ $t('order.package') }}{{ index + 1 }}</div>
+                <div class="text">
+                  {{ $t('order.total') }} {{ logItem.productNums }}
+                  {{ $t('marketing.item') }}{{ $t('home.product') }}
+                </div>
+              </div>
+              <!-- <div class="i-con">
+                   <div class="label">发货方式:</div>
+                   <div class="con">
+                     <div class="con-radio">
+                       <input type="radio" name="checkit" value="" checked="true"/><span>需要物流</span>
+                     </div>
+                   </div>
+                 </div>
+                 <div class="i-con">
+                   <div class="label">物流公司:</div>
+                   <div class="con">
+                     <div class="con-select">申通快递</div>
+                     <div class="con-text">
+                       <div class="text">运单号编:</div>
+                       <input type="text" />
+                     </div>
+                   </div>
+              </div>-->
+
+              <el-form
+                :model="logDataForm"
+                ref="logDataForm"
+                @keyup.enter.native="logDataFormSubmit()"
+                :label-width=" lang === 'en' ? '205px' : '95px'"
+              >
+                <div class="item-goods">
+                  <div class="goods-box" ref="carouser">
+                    <div
+                      class="item"
+                      v-for="(
+                            orderItem, index
+                          ) in logItem.orderItems"
+                      :key="index"
+                    >
+                      <div class="img">
+                        <prod-pic
+                          height="60"
+                          width="60"
+                          :pic="orderItem.pic"
+                        ></prod-pic>
+                        <div class="number">×{{ orderItem.prodCount }}</div>
+                      </div>
+                      <div class="name">{{ orderItem.prodName }}</div>
+                    </div>
+                  </div>
+                </div>
+                <el-form-item
+                  :label="$t('order.delType') + ':'"
+                  style="margin-left:15px;"
+                >
+                  <el-radio-group v-model="logItem.deliveryType">
+                    <el-radio :label="1" v-model="radio" disabled>{{
+                      $t('order.distribution')
+                      }}
+                    </el-radio>
+                    <el-radio :label="3" v-model="radio" disabled>{{
+                      $t('order.noNeedRequired')
+                      }}
+                    </el-radio>
+                  </el-radio-group>
+                </el-form-item>
+                <div v-if="logItem.deliveryType === 1" class="info-int">
+                  <el-form-item
+                    :label="$t('order.courierCompany') + ':'"
+                    class="form-item"
+                    style="margin-left:15px;"
+                  >
+                    <div class="con">
+                      <el-select v-model="logItem.dvyId" size="small">
+                        <!-- :placeholder="this.$i18n.t('tip.select')" -->
+                        <el-option
+                          v-for="item in logDataForm.dvyNames"
+                          :key="item.dvyId"
+                          :label="item.dvyName"
+                          :value="item.dvyId"
+                        ></el-option>
+                      </el-select>
+                    </div>
+                  </el-form-item>
+                  <el-form-item
+                    :label="$t('order.trackingNumber') + ':'"
+                    class="form-item"
+                  >
+                    <el-input
+                      v-model="logItem.dvyFlowId"
+                      controls-position="right"
+                      :min="0"
+                      size="small"
+                    ></el-input>
+                    <!-- :label="this.$i18n.t('order.trackingNumber')" -->
+                  </el-form-item>
+                </div>
+              </el-form>
+            </div>
+          </div>
+        </div>
+      </div>
+      <!-- 确认 -->
+      <div class="change-logistics" v-if="!isReviseLog">
+        <div class="warning">{{ $t('order.ifModifyTheLog') }}</div>
+        <el-table class="log-info-table" :data="confirmList">
+          <!-- <div v-for="(item,index) in confirmList" :key="index"> -->
+          <el-table-column
+            property="dvyIdName"
+            :label="this.$i18n.t('order.packageName')"
+            width="220"
+            style="text-align: left"
+          ></el-table-column>
+          <el-table-column
+            property="productNums"
+            :label="this.$i18n.t('order.amountOfGoods')"
+            width="140"
+          ></el-table-column>
+          <el-table-column
+            property="delMethod"
+            :label="this.$i18n.t('order.deliveryMethod')"
+            width="140"
+          ></el-table-column>
+          <el-table-column
+            property="dvyName"
+            :label="this.$i18n.t('order.logisticsCompany')"
+            width="170"
+          ></el-table-column>
+          <el-table-column
+            property="dvyFlowId"
+            :label="this.$i18n.t('order.trackingNumber')"
+          ></el-table-column>
+          <!-- </div> -->
+        </el-table>
+      </div>
+
+      <div slot="footer" v-if="isReviseLog" class="dialog-footer">
+        <div class="default-btn" @click="logVisible = false">{{
+          $t('crud.filter.cancelBtn')
+          }}
+        </div>
+        <div class="default-btn primary-btn" @click="logDataFormSubmit()">{{
+          $t('order.save')
+          }}
+        </div>
+      </div>
+
+      <div slot="footer" v-if="!isReviseLog" class="dialog-footer">
+        <div class="default-btn" @click="backToRevise()">{{
+          $t('order.backToModify')
+          }}
+        </div>
+        <div class="default-btn primary-btn" @click="confirmRevise()">{{
+          $t('order.confirmTheChanges')
+          }}
+        </div>
+      </div>
+    </el-dialog>
+    <order-info ref="orderInfo" @orderAuditStatusUpdate="handleOrderAuditStatusUpdate"></order-info>
+    <MergePrintScanDelivery ref="mergeScanRef" @refreshDataList="searchChange(true)"></MergePrintScanDelivery>
+
+
+  </div>
+</template>
+
+<script>
+  import moment from 'moment'
+  import ProdPic from '@/components/prod-pic'
+  import OrderInfo from './orderInfo'
+  import {} from '@/utils/excel'
+  import {downloadXls} from '@/utils/excel'
+  import MergePrintScanDelivery from '../print/merge-print-scan-delivery'
+
+  export default {
+    data () {
+      return {
+        // 是否全选
+        skuList: [{key: 'yxk', label: '圆角小卡', value: '圆角小卡'},
+          {key: 'zjxk', label: '直角小卡', value: '直角小卡'},
+          {key: 'hspld', label: '花式拍立得', value: '花式拍立得'},
+          {key: 'zpfm', label: '直拍封面', value: '直拍封面'},
+          {key: 'pg', label: '票根', value: '票根'},
+          {key: 'sq', label: '书签', value: '书签'},
+          {key: 'mxp', label: '明信片', value: '明信片'},
+          {key: 'fk', label: '方卡', value: '方卡'},
+          {key: 'hz', label: '徽章', value: '徽章'},
+          {key: 'sf', label: '手幅', value: '手幅'},
+          {key: 'tz', label: '贴纸', value: '贴纸'}
+        ],
+        selectAll: false,
+        showHeadScroll: false, // 修改物流相关
+        logVisible: false,
+        radio: '1',
+        logisticsInfo: [],  // 包裹列表
+        logDataForm: {
+          dvyId: '', // 当前物流公司id
+          dvyFlowId: '',  // 物流单号
+          dvyNames: []  // 物流公司列表
+        },
+        uploadVisible: false,
+        lang: localStorage.getItem('lang'),
+        // logDataRule: {
+        //   dvyFlowId: [
+        //     { required: true, message: this.$i18n.t('publics.noNull'), trigger: 'blur' }
+        //   ]
+        // },
+        errorNum: 0,
+        // 确认修改弹窗
+        isReviseLog: true,  // 是否正在修改物流信息
+        confirmList: [],  // 确认修改信息
+        dataForm: {},
+        sts: 0,
+        dateRange: [],
+        productNumsRange: [],
+        status: null,
+        options: [
+          {
+            value: 1,
+            label: this.$i18n.t('order.pendingPayment')
+          },
+          {
+            value: 2,
+            label: this.$i18n.t('order.toBeShipped')
+          },
+          {
+            value: 3,
+            label: this.$i18n.t('order.pendingReceipt')
+          },
+          {
+            value: 5,
+            label: this.$i18n.t('order.successfulTransaction')
+          },
+          {
+            value: 6,
+            label: this.$i18n.t('order.transactionFailed')
+          },
+          {
+            value: 7,
+            label: this.$i18n.t('group.waitGroup')
+          },
+          {
+            value: 8,
+            label: '定制待打印'
+          },
+          {
+            value: 9,
+            label: '定制待发货'
+          },
+          {
+            value: 10,
+            label: '普通待发货'
+          },
+        ],
+        refund: [{
+          value: 0,
+          label: this.$i18n.t('order.noAfterSales')
+        },
+          {
+            value: 1,
+            label: this.$i18n.t('order.requestARefund')
+          },
+          {
+            value: 2,
+            label: this.$i18n.t('order.refundsuccessfully')
+          },
+          {
+            value: 3,
+            label: this.$i18n.t('order.partialRefundSucc')
+          },
+          {
+            value: 4,
+            label: this.$i18n.t('order.refundFailed')
+          }],
+        orderType: [{
+          value: 0,
+          label: this.$i18n.t('order.normalOrder')
+        }, {
+          value: 1,
+          label: this.$i18n.t('order.groupPurchaseOrder')
+        }, {
+          value: 2,
+          label: this.$i18n.t('order.spikeOrder')
+        }],
+        orderMold: [{
+          value: 0,
+          label: this.$i18n.t('order.physicalOrder')
+        }, {
+          value: 1,
+          label: this.$i18n.t('order.virtualOrder')
+        }],
+        dvyType: [{
+          value: 1,
+          label: this.$i18n.t('order.expressDelivery')
+        },
+          {
+            value: 2,
+            label: this.$i18n.t('order.selfMention')
+          },
+          {
+            value: 3,
+            label: this.$i18n.t('order.noNeedRequired')
+          },
+          {
+            value: 4,
+            label: this.$i18n.t('order.sameCityDelivery')
+          }],
+        payType: [
+          // {
+          // value: 0,
+          // label: this.$i18n.t('order.pointsPayment')
+          // },
+          {
+            value: 1,
+            label: this.$i18n.t('admin.weChatPay')
+          },
+          //   {
+          //   value: 2,
+          //   label: this.$i18n.t('admin.aliPay')
+          // },
+          {
+            value: 3,
+            label: this.$i18n.t('admin.balancePay')
+          },
+          //   {
+          //   value: 4,
+          //   label: this.$i18n.t('order.payPalPayment')
+          // }
+        ],
+        resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+        dataList: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 10 // 每页显示多少条
+        },
+        dataListLoading: false,
+        dataListSelections: new Set(),
+        devyVisible: false,
+        orderStationVisible: false,
+        consignmentInfoVisible: false,
+        orderAmountUpdateVisible: false,
+        activeName: '0',
+        timeActive: null,
+        priceWidth: '109px',
+        infoWidth: '400px',
+        generatePrintPdfBatchVisible: false,
+        orderCreateBatchVisible: false,
+        printChannel: 'Lightning',
+        orderCreateBatchLoading: false,
+        exportDeliveryLoading: false,
+        confirmPayLoading: false,
+        shopList: [],
+
+      }
+    },
+    components: {
+      OrderInfo,
+      ProdPic,
+      MergePrintScanDelivery
+    },
+    computed: {
+      // 二级菜单折叠状态
+      sidebarFold: {
+        get () {
+          return this.$store.state.common.sidebarFold
+        },
+        set (val) {
+          this.$store.commit('common/updateSidebarFold', val)
+        }
+      }
+    },
+    created () {
+      // 首页跳转状态参数
+      this.activeName = this.$route.query.status ? String(this.$route.query.status) : '0'
+      this.sts = this.$route.query.status || 0
+      this.status = this.sts === 0 ? null : Number(this.sts)
+
+      // 携带参数查询
+      this.getDataList(this.page, this.$route.query)
+
+      // 请求物流公司
+      this.getLogisticsList()
+    },
+    activated () {
+      // 携带参数查询
+      var query = this.$route.query
+      if (Object.keys(query).length > 0) {
+        this.getDataList(this.page, query)
+      }
+    },
+    mounted () {
+      this.getShopList()
+      // 监听页面滚动
+      // window.addEventListener('scroll', this.scrollToTop)
+      // setTimeout(() => {
+      //   this.getEleWidth()
+      // })
+      // window.onresize = () => {
+      //   return (() => {
+      //     setTimeout(() => {
+      //       this.getEleWidth()
+      //     })
+      //   })()
+      // }
+    },
+    watch: {},
+    methods: {
+      orderShopId(newData = false) {
+        this.page.currentPage = 1
+        if (this.status == 8) {
+          this.getWaitPrintPage(this.page)
+        } else if (this.status == 9) {
+          this.getWaitPrintDeliveryPage(this.page)
+        } else if (this.status == 10) {
+          this.getWaitNormalPrintPage(this.page)
+        } else {
+          this.getDataList(this.page)
+        }
+        // this.getDataList(this.page, null, 0, newData)
+      },
+      getShopList() {
+        this.$http({
+          url: this.$http.adornUrl('/shop/shopAuditing/list'),
+          method: 'get',
+        }).then(({ data }) => {
+          if (data) {
+            this.shopList = data
+          }
+        })
+      },
+      openMergeScanDialog(){
+        this.$refs.mergeScanRef.init();
+
+      },
+      querySearch(queryString, cb) {
+        var restaurants = this.skuList;
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
+        // 调用 callback 返回建议列表的数据
+        cb(results);
+      },
+      createFilter(queryString) {
+        return (restaurant) => {
+          return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+        };
+      },
+      handleSelect(item) {
+        console.log(item);
+      },
+      orderConfirmPay (order) {
+        let _this = this
+
+        if (order.orderItems[0].actualTotal === 0.01) {
+          toConfirmPay()
+        } else {
+          this.orderAmountUpdateVisible = true
+          this.$nextTick(() => {
+            this.$refs.orderAmountUpdate.init(order)
+            this.$refs.orderAmountUpdate.setOrderAmountAndFreight(order, toConfirmPay)
+          })
+        }
+
+        function toConfirmPay () {
+          _this.$confirm('确定完成支付吗?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            let dataBody = {'orderNumbers': order.orderNumber, 'payType': 9, shopId: order.shopId}
+            _this.$http({
+              url: _this.$http.adornUrl('/platform/order/pay'),
+              method: 'post',
+              data: _this.$http.adornData(dataBody)
+            }).then(({data}) => {
+              _this.$message.success('下单确认成功')
+              _this.getDataList(this.page)
+            })
+          })
+        }
+      },
+
+      handleExportDelivery () {
+        this.exportDeliveryLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/exportDeliveryInfo'),
+          method: 'GET',
+          params: this.$http.adornParams({startTime: this.dateRange[0], endTime: this.dateRange[1], shopId: this.$store.state.user.shopId}),
+          responseType: 'blob'
+        }).then(({data}) => {
+          this.exportDeliveryLoading = false
+          let fileName = '微信发货订单信息'
+          downloadXls(data, fileName + '.xlsx')
+        }).catch((error) => {
+          this.exportDeliveryLoading = false
+          this.$message.error(error)
+        })
+      },
+      openGeneratePrintPdfBatchDialog () {
+        this.generatePrintPdfBatchVisible = true
+      },
+      openCreateOrderBatchDialog () {
+        this.orderCreateBatchVisible = true
+      },
+      handleOrderAuditStatusUpdate (auditStatusReturn) {
+        let it = this
+        this.dataList.forEach((item, index) => {
+          if (item.orderNumber == auditStatusReturn.orderNumber) {
+            it.$set(item, 'auditStatus', auditStatusReturn.auditStatus)
+            return
+          }
+        })
+      },
+      /**
+       * 全选按钮
+       */
+      handleSelectAll (checked) {
+        let it = this
+        if (checked) {
+          this.dataList.forEach((item, index) => {
+            it.$set(item, 'checkStatus', true)
+            it.dataListSelections.add(item.orderNumber)
+            it.selectAll = true
+          })
+        } else {
+          this.dataList.forEach((item, index) => {
+            it.$set(item, 'checkStatus', false)
+            it.dataListSelections.delete(item.orderNumber)
+            it.selectAll = false
+          })
+        }
+      },
+      handleSelectionChange (checked, orderNumber) {
+        if (checked) {
+          this.dataListSelections.add(orderNumber)
+        } else {
+          this.dataListSelections.delete(orderNumber)
+        }
+      },
+      getEleWidth () {
+        let div = document.getElementById('price-title') // prod-info-title
+        let div1 = document.getElementById('prod-info-title')
+        if (!div && !div1) {
+          return
+        }
+        let w = div.offsetWidth    // 返回元素的总宽度
+        let w1 = div1.offsetWidth
+        this.priceWidth = w + 'px'
+        this.infoWidth = w1 + 'px'
+      },
+      /**
+       * 关闭 修改物流弹窗
+       */
+      handleClose () {
+        this.isReviseLog = true
+      },
+      /**
+       * 页面滚动事件
+       */
+      scrollToTop () {
+        let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
+        this.showHeadScroll = scrollTop > 400
+      },
+
+      /**
+       * 获取包裹物流信息
+       */
+      reviseLogistics (orderNumber) {
+        // console.log(orderNumber)
+        this.logVisible = !this.logVisible
+        this.$http({
+          url: this.$http.adornUrl('/order/delivery/getOrderDeliveries/' + orderNumber),
+          method: 'put'
+        }).then(({data}) => {
+          this.logisticsInfo = data
+          this.logisticsInfo.forEach((el, index) => {
+            el.newDvyFlowId = el.dvyFlowId
+            el.newDvyId = el.dvyId
+            el.dvyIdName = this.$i18n.t('order.package') + Number(index + 1)
+            // 修改弹窗
+            this.confirmList = []  // 清空确认列表
+          })
+        })
+        this.errorNum = 0
+      },
+
+      /**
+       * 请求物流公司列表
+       */
+      getLogisticsList () {
+        this.$http({
+          url: this.$http.adornUrl('/admin/delivery/list'),
+          method: 'get',
+          params: this.$http.adornParams()
+        }).then(({data}) => {
+          this.logDataForm.dvyNames = data
+        })
+      },
+
+      /**
+       *  生成作品打印PDF
+       */
+      generatePrintPdf (orderNumber, shopId) {
+        this.$http({
+          url: this.$http.adornUrl('/order/thirdPrintOrder/generatePrintPdf'),
+          method: 'post',
+          data: this.$http.adornData({
+            orderNumber: orderNumber,
+            shopId: shopId
+          }),
+        }).then(({data}) => {
+          if (data.status === 'success') {
+            window.open(this.resourcesUrl + data.result.workUrl)
+          } else {
+            this.$message({
+              message: data.msg,
+              type: 'danger'
+            })
+          }
+        })
+      },
+
+      /**
+       *  批量生成打印订单PDF
+       */
+      generatePrintPdfBatch () {
+        let dataBody = {'orderNumberList': [...this.dataListSelections], 'printChannel': this.printChannel}
+        this.$http({
+          url: this.$http.adornUrl('/order/thirdPrintOrder/generatePrintPdfBatch'),
+          method: 'post',
+          data: this.$http.adornData(dataBody)
+        }).then(({data}) => {
+          if (data.status === 'success') {
+            console.log('发送showTask')
+            this.$Bus.$emit('showTask', true)
+          } else {
+            this.$message({
+              message: data.msg,
+              type: 'error'
+            })
+          }
+        })
+      },
+      /**
+       * 批量推送打印订单P
+       */
+      createOrderBatch () {
+        this.orderCreateBatchLoading = true
+        let dataBody = {'orderNumberList': [...this.dataListSelections], 'printChannel': this.printChannel}
+        this.$http({
+          url: this.$http.adornUrl('/order/thirdPrintOrder/createOrderBatch'),
+          method: 'post',
+          data: this.$http.adornData(dataBody)
+        }).then(({data}) => {
+          this.orderCreateBatchLoading = false
+          if (data.status === 'success') {
+            this.$message({
+              message: data.msg,
+              type: 'success'
+            })
+          } else {
+            this.$message({
+              message: data.msg,
+              type: 'error'
+            })
+          }
+        }).catch(() => {
+          this.orderCreateBatchLoading = false
+        })
+      },
+
+      /**
+       *  批量第三方发货
+       */
+      deliveryThirdBatch () {
+        let deliveryOrderItemParamList = []
+        this.dataListSelections.forEach(item => {
+          let deliveryOrderItemParam = {}
+          deliveryOrderItemParam.orderNumber = item
+          deliveryOrderItemParam.deliveryType = 1
+          deliveryOrderItemParamList.push(deliveryOrderItemParam)
+        })
+        let dataBody = {'deliveryOrderItemParamList': deliveryOrderItemParamList}
+        this.$http({
+          url: this.$http.adornUrl('/order/delivery/orderItemsDeliveryThirdBatch'),
+          method: 'PUT',
+          data: this.$http.adornData(dataBody)
+        }).then(({data}) => {
+          this.dataListSelections = new Set()
+          if (data.status === 'success') {
+            this.$message({
+              message: '发货成功',
+              type: 'success'
+            })
+          } else {
+            this.$message({
+              message: data.msg,
+              type: 'danger'
+            })
+          }
+        })
+      },
+
+      /**
+       * 点击保存
+       */
+      logDataFormSubmit () {
+        //  let reviseLogList = []
+        let flag = true
+        let logisticsInfo = this.logisticsInfo
+        logisticsInfo.map((el, index) => {
+          if (el.deliveryType === 3) {
+            return
+          }
+          if (!flag) {
+            return false
+          }
+          // console.log('logisticsInfo', el.logisticsInfo)
+          // console.log('el.dvyFlowId', el.dvyFlowId)
+          var reg = /^[a-zA-Z0-9]{4,30}$/
+          if (el.dvyFlowId.length === 0) {
+            this.$message({
+              message: this.$i18n.t('order.logEmpty'),
+              type: 'warning'
+            })
+            flag = false
+            this.errorNum = 1
+            // throw ('物流单号不能为空')
+            // return false
+          } else if (!reg.test(el.dvyFlowId)) {
+            this.$message({
+              message: this.$i18n.t('order.checkDvyId'),
+              type: 'warning'
+            })
+            flag = false
+            this.errorNum = 1
+          } else {
+            this.errorNum = 0
+            // console.log(el.newDvyFlowId)
+            let confirmList = this.confirmList
+            if ((el.newDvyFlowId.length !== 0 && el.newDvyFlowId !== el.dvyFlowId) || (el.newDvyId !== el.dvyId)) {
+              confirmList.push(el)
+              confirmList.forEach((el, index) => {
+                el.delMethod = this.$i18n.t('order.logistics')
+                // el.packageName = "包裹" + Number(index+1)
+                this.logDataForm.dvyNames.forEach((dvyName, index) => {
+                  if (el.dvyId === dvyName.dvyId) {
+                    el.dvyName = dvyName.dvyName
+                  }
+                })
+              })
+              this.confirmList = confirmList
+            }
+          }
+          // console.log('确认列表:', this.confirmList)
+          // this.confirmList.forEach((el, index) => {
+
+          // })
+        })
+        // console.log(this.errorNum)
+        if (this.errorNum === 1) {
+          return
+        } else if (this.confirmList.length === 0) {
+          this.$message({
+            message: this.$i18n.t('order.noLogIsChanged'),
+            type: 'warning'
+          })
+          flag = false
+        }
+        if (flag) {
+          this.isReviseLog = false // 修改弹窗
+        }
+      },
+      /**
+       * 确认修改物流信息
+       */
+      confirmRevise () {
+        // let dvyOrderParam = {
+        //   deliveryOrders: this.confirmList
+        // }
+        this.$http({
+          url: this.$http.adornUrl('/order/delivery/updateOrderDeliveries'),
+          method: 'put',
+          data: this.$http.adornData({
+            deliveryOrders: this.confirmList
+          }),
+          params: this.$http.adornParams()
+        }).then(({data}) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success'
+          })
+          this.isReviseLog = true
+          this.logVisible = false
+        })
+      },
+      /**
+       * 返回修改(物流信息)
+       */
+      backToRevise () {
+        this.isReviseLog = true
+        // 修改弹窗
+        this.confirmList = []  // 清空确认列表
+      },
+
+      /**
+       * 获取数据列表
+       */
+      getDataList (page, params, newData = false) {
+        page = (page === undefined ? this.page : page)
+        this.dataListLoading = true
+        if (newData || !this.theData) {
+          this.theData = {
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            'orderNumber': this.dataForm.orderNumber,
+            'orderType': this.dataForm.orderType,
+            'orderMold': this.dataForm.orderMold,
+            'payType': this.dataForm.payType,
+            'receiver': this.dataForm.receiver,
+            'mobile': this.dataForm.mobile,
+            'status': this.status,
+            'dvyType': this.dataForm.dvyType,
+            'stationName': this.dataForm.stationName,
+            'refundStatus': this.dataForm.refundStatus,
+            'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
+            'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间
+            'startProductNums': this.productNumsRange === null ? null : this.productNumsRange[0], // 订购数量起
+            'endProductNums': this.productNumsRange === null ? null : this.productNumsRange[1], // 订购数量起
+            'auditStatus': this.dataForm.auditStatus, // 审阅状态
+            'prodName': this.dataForm.prodName, // 产品名称,
+            'dvyFlowId': this.dataForm.dvyFlowId, //快递单号
+            'skuName': this.dataForm.skuName,
+            'isPromotion': this.dataForm.isPromotion,
+            'isMerge': 1,
+            'prodZone': this.dataForm.prodZone,
+            'customType': this.dataForm.customType,
+            'shopId': this.dataForm.shopId
+          }
+        } else {
+          this.theData.current = page == null ? this.page.currentPage : page.currentPage
+          this.theData.size = page == null ? this.page.pageSize : page.pageSize
+          this.theData.status = this.status
+        }
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/page'),
+          method: 'get',
+          params: this.$http.adornParams(
+            Object.assign(this.theData, params
+            ), false
+          )
+        }).then(({data}) => {
+          let list = data.records
+          list.forEach((item) => {
+            item['checkStatus'] = false
+          });
+          this.dataList = data.records
+          this.page.total = data.total
+          this.sts = !this.status ? 0 : this.status
+          this.dataListLoading = false
+          this.activeName = !this.status ? '0' : this.status + ''
+        })
+      },
+      getWaitPrintPage (page, params, newData = false) {
+        this.dataListLoading = true
+        if (newData || !this.theData) {
+          this.theData = {
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            'orderNumber': this.dataForm.orderNumber,
+            'prodName': this.dataForm.prodName,
+            'orderType': this.dataForm.orderType,
+            'orderMold': this.dataForm.orderMold,
+            'payType': this.dataForm.payType,
+            'receiver': this.dataForm.receiver,
+            'mobile': this.dataForm.mobile,
+            'status': this.status,
+            'dvyType': this.dataForm.dvyType,
+            'stationName': this.dataForm.stationName,
+            'refundStatus': this.dataForm.refundStatus,
+            'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
+            'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间
+            'startProductNums': this.productNumsRange === null ? null : this.productNumsRange[0], // 订购数量起
+            'endProductNums': this.productNumsRange === null ? null : this.productNumsRange[1], // 订购数量起
+            'auditStatus': this.dataForm.auditStatus, // 审阅状态
+            'skuName': this.dataForm.skuName, // 产品名称,
+            'isPromotion': this.dataForm.isPromotion,
+            'isMerge': 1,
+            'prodZone': this.dataForm.prodZone,
+            'shopId':this.dataForm.shopId
+          }
+        } else {
+          this.theData.current = page == null ? this.page.currentPage : page.currentPage
+          this.theData.size = page == null ? this.page.pageSize : page.pageSize
+          this.theData.status = this.status
+        }
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/waitPrintPage'),
+          method: 'get',
+          params: this.$http.adornParams(
+            Object.assign(this.theData, params
+            ), false
+          )
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.page.total = data.total
+          this.sts = !this.status ? 0 : this.status
+          this.dataListLoading = false
+          this.activeName = !this.status ? '0' : this.status + ''
+        })
+      },
+      getWaitPrintDeliveryPage (page, params, newData = false) {
+        this.dataListLoading = true
+        if (newData || !this.theData) {
+          this.theData = {
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            'orderNumber': this.dataForm.orderNumber,
+            'prodName': this.dataForm.prodName,
+            'orderType': this.dataForm.orderType,
+            'orderMold': this.dataForm.orderMold,
+            'payType': this.dataForm.payType,
+            'receiver': this.dataForm.receiver,
+            'mobile': this.dataForm.mobile,
+            'status': this.status,
+            'dvyType': this.dataForm.dvyType,
+            'stationName': this.dataForm.stationName,
+            'refundStatus': this.dataForm.refundStatus,
+            'isPromotion': this.dataForm.isPromotion,
+            'isMerge': 1,
+            'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
+            'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间
+            'shopId':this.dataForm.shopId
+          }
+        } else {
+          this.theData.current = page == null ? this.page.currentPage : page.currentPage
+          this.theData.size = page == null ? this.page.pageSize : page.pageSize
+          this.theData.status = this.status
+        }
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/waitPrintDeliveryPage'),
+          method: 'get',
+          params: this.$http.adornParams(
+            Object.assign(this.theData, params
+            ), false
+          )
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.page.total = data.total
+          this.sts = !this.status ? 0 : this.status
+          this.dataListLoading = false
+          this.activeName = !this.status ? '0' : this.status + ''
+        })
+      },
+      getWaitNormalPrintPage (page, params, newData = false) {
+        this.dataListLoading = true
+        if (newData || !this.theData) {
+          this.theData = {
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            'orderNumber': this.dataForm.orderNumber,
+            // 'prodName': this.dataForm.prodName,
+            'orderType': this.dataForm.orderType,
+            'orderMold': this.dataForm.orderMold,
+            'payType': this.dataForm.payType,
+            'receiver': this.dataForm.receiver,
+            'mobile': this.dataForm.mobile,
+            'status': this.status,
+            'dvyType': this.dataForm.dvyType,
+            'stationName': this.dataForm.stationName,
+            'refundStatus': this.dataForm.refundStatus,
+            'isPromotion': this.dataForm.isPromotion,
+            'isMerge': 1,
+            'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
+            'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间,
+            'prodZone': this.dataForm.prodZone,
+            'shopId':this.dataForm.shopId
+          }
+        } else {
+          this.theData.current = page == null ? this.page.currentPage : page.currentPage
+          this.theData.size = page == null ? this.page.pageSize : page.pageSize
+          this.theData.status = this.status
+        }
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/waitNormalPrintPage'),
+          method: 'get',
+          params: this.$http.adornParams(
+            Object.assign(this.theData, params
+            ), false
+          )
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.page.total = data.total
+          this.sts = !this.status ? 0 : this.status
+          this.dataListLoading = false
+          this.activeName = !this.status ? '0' : this.status + ''
+        })
+      },
+      // 每页数
+      sizeChangeHandle (val) {
+        this.page.pageSize = val
+        this.page.currentPage = 1
+        this.getDataList(this.page)
+      },
+      // 当前页
+      currentChangeHandle (val) {
+        this.dataListSelections = new Set()
+        this.page.currentPage = val
+        // this.getDataList(this.page)
+        if (this.status == 8) {
+          this.getWaitPrintPage(this.page)
+        } else if (this.status == 9) {
+          this.getWaitPrintDeliveryPage(this.page)
+        } else if (this.status == 10) {
+          this.getWaitNormalPrintPage(this.page)
+        } else {
+          this.getDataList(this.page)
+        }
+      },
+
+      /**
+       * 导航选择状态
+       */
+      selectNav (e) {
+        var sts = e.currentTarget.dataset.sts
+        this.activeName = parseInt(sts)
+        this.status = this.activeName === 0 ? null : parseInt(sts)
+        this.page.currentPage = 1
+        if (this.status == 8) {
+          this.getWaitPrintPage(this.page)
+        } else if (this.status == 9) {
+          this.getWaitPrintDeliveryPage(this.page)
+        } else if (this.status == 10) {
+          this.getWaitNormalPrintPage(this.page)
+        } else {
+          this.getDataList(this.page)
+        }
+      },
+      // 多选
+      selectionChangeHandle (val) {
+        this.dataListSelections = val
+      },
+      orderStatus (val) {
+        this.status = val
+        this.activeName = val + ''
+        this.getDataList(this.page)
+      },
+      /**
+       * 根据选项设置时间
+       * 1:今天 2:昨天 3: 近七天 4:近30天 5:近60天
+       */
+      setDateRange (val) {
+        this.timeActive = val
+        var startDay = null
+        var endDay = null
+        if (val === 1) {
+          startDay = 0
+          endDay = 0
+        } else if (val === 2) {
+          startDay = -1
+          endDay = -1
+        } else if (val === 3) {
+          startDay = -3
+          endDay = -1
+        } else if (val === 4) {
+          startDay = -5
+          endDay = -1
+        } else {
+          return
+        }
+        // 开始时间
+        let startTime = moment().add(startDay, 'days').startOf('days').format('LL')
+        // 结束时间
+        let endTime = moment().add(endDay, 'days').endOf('days').format('LL')
+        this.dateRange = [startTime, endTime]
+      },
+      // 查看订单
+      addOrUpdateHandle (orderNumber, shopId, status) {
+        this.$refs.orderInfo.init({
+          orderNumber: orderNumber,
+          shopId: shopId,
+          status: status
+        })
+        /*
+        this.$router.push({
+          path: '/order-orderInfo',
+          query: {
+            orderNumber: orderNumber,
+            shopId: shopId,
+            status: status
+          }
+        })*/
+      },
+      // 前往消息盒子
+      toImbox (order) {
+        window.open(location.href.split('#')[0] + '#/imBox?userId=' + order.userId + '&orderNumber=' + order.orderNumber, 'view_window')
+      },
+      // 退款路由跳转
+      refundRoute (val) {
+        this.$router.push({
+          path: '/order-orderRefund',
+          query: {orderNumber: val}
+        })
+      },
+      // 删除
+      deleteHandle (id) {
+        var ids = id ? [id] : this.dataListSelections.map(item => {
+          return item.orderId
+        })
+        this.$confirm(`${this.$i18n.t('sys.makeSure')}[${id ? this.$i18n.t('text.delBtn') : this.$i18n.t('sys.batchDelete')}]${this.$i18n.t('text.menu')}?`, this.$i18n.t('text.tips'), {
+          confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+          cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+          type: 'warning'
+        }).then(() => {
+          this.$http({
+            url: this.$http.adornUrl(`/prod/spec/${ids}`),
+            method: 'delete',
+            data: this.$http.adornData(ids, false)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.getDataList(this.page)
+              }
+            })
+          })
+        }).catch(() => {
+        })
+      },
+      showConsignmentInfo () {
+        this.consignmentInfoVisible = true
+        this.$nextTick(() => {
+          this.$refs.consignmentInfo.init()
+        })
+      },
+      getWaitingConsignmentExcel () {
+        this.getDataList(this.page)
+      },
+      uploadSpu () {
+        this.dataForm.startTime = this.dateRange === null ? null : this.dateRange[0]
+        this.dataForm.endTime = this.dateRange === null ? null : this.dateRange[1]
+        this.uploadVisible = true
+        this.$nextTick(() => {
+          this.$refs.spuUpload.init()
+        })
+      },
+      // 清空按钮
+      clear () {
+        this.dataForm = {}
+        this.dateRange = []
+        this.status = null
+        this.timeActive = null
+      },
+      // 搜索查询
+      searchChange (newData = false) {
+        let it = this
+        this.dataList.forEach((item, index) => {
+          it.$set(item, 'checkStatus', false)
+          it.dataListSelections.delete(item.orderNumber)
+          it.selectAll = false
+          it.checked = false
+        })
+        this.dataListSelections = new Set()
+        this.selectAll = false
+        this.selectSheets = 0
+        this.page.currentPage = 1
+        // this.getDataList(this.page, null, newData)
+        if (this.status === 8) {
+          this.getWaitPrintPage(this.page, null, newData)
+        } else if (this.status === 9) {
+          this.getWaitPrintDeliveryPage(this.page, null, newData)
+        } else if (this.status === 10) {
+          this.getWaitNormalPrintPage(this.page, null, newData)
+        } else {
+          this.getDataList(this.page, null, newData)
+        }
+      },
+      /**
+       * 更改订单金额
+       */
+      editAmount (order) {
+        this.orderAmountUpdateVisible = true
+        this.$nextTick(() => {
+          this.$refs.orderAmountUpdate.init(order)
+        })
+      },
+      /**
+       * 发货
+       */
+      changeOrder (order) {
+        this.devyVisible = true
+        this.$nextTick(() => {
+          this.$refs.orderDeliveryUpdate.init(order)
+        })
+      },
+      /**
+       * 标记推广
+       */
+      markPromotion (order, mark) {
+        this.$http({
+          url: this.$http.adornUrl('/platform/order/markPromotion/' + order.orderNumber),
+          method: 'POST',
+        }).then(({data}) => {
+          if (data) {
+            this.$message({
+              message: '标记成功',
+              type: 'success'
+            })
+            order.isPromotion = mark
+          } else {
+            this.$message({
+              message: '标记失败',
+              type: 'error'
+            })
+          }
+        })
+      },
+      /**
+       * 提货
+       */
+      stationOrder (order) {
+        this.orderStationVisible = true
+        this.$nextTick(() => {
+          this.$refs.orderStation.init(order)
+        })
+      },
+      getSoldExcel () {
+        if (!this.dateRange || this.dateRange.length < 2) {
+          this.$message.error(this.$i18n.t('order.pleExpOrderFirst'))
+          return
+        }
+        this.$confirm(`${this.$i18n.t('order.exportReport')}`, this.$i18n.t('text.tips'), {
+          confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+          cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+          type: 'warning'
+        }).then(() => {
+          this.$http({
+            url: this.$http.adornUrl('/platform/order/soldExcel'),
+            method: 'get',
+            params: this.$http.adornParams({
+              'orderNumber': this.dataForm.orderNumber,
+              // 'prodName': this.dataForm.prodName,
+              'orderType': this.dataForm.orderType,
+              'payType': this.dataForm.payType,
+              'lang': this.lang === 'en' ? 1 : 0,
+              'receiver': this.dataForm.receiver,
+              'mobile': this.dataForm.mobile,
+              'status': this.status,
+              'dvyType': this.dataForm.dvyType,
+              'stationName': this.dataForm.stationName,
+              'refundStatus': this.dataForm.refundStatus,
+              'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
+              'endTime': this.dateRange === null ? null : this.dateRange[1] // 结束时间
+            }),
+            responseType: 'blob' // 解决文件下载乱码问题
+          }).then(({data}) => {
+            var blob = new Blob([data], {type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8'})
+            const fileName = this.$i18n.t('order.orderInfCollationXls')
+            const elink = document.createElement('a')
+            if ('download' in elink) { // 非IE下载
+              elink.download = fileName
+              elink.style.display = 'none'
+              elink.href = URL.createObjectURL(blob)
+              document.body.appendChild(elink)
+              elink.click()
+              URL.revokeObjectURL(elink.href) // 释放URL 对象
+              document.body.removeChild(elink)
+            } else { // IE10+下载
+              navigator.msSaveBlob(blob, fileName)
+            }
+          })
+        })
+      },
+      openDeliveryPage (deliveryNo) {
+        // window.open("https://t.17track.net/zh-cn#nums=" + deliveryNo, '_blank');
+        let copy = (e) => {
+          e.preventDefault()
+          e.clipboardData.setData('text/plain', deliveryNo)
+          document.removeEventListener('copy', copy)
+        }
+        document.addEventListener('copy', copy)
+        document.execCommand('Copy')
+        window.open('https://www.baidu.com/s?wd=%E7%89%A9%E6%B5%81%E6%9F%A5%E8%AF%A2&rsv_spt=1&rsv_iqid=0xe1fe334b0008559a&issp=1&f=8&rsv_bp=1&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_dl=tb&rsv_sug3=16&rsv_sug1=12&rsv_sug7=100&rsv_sug2=0&rsv_btype=i&inputT=2849&rsv_sug4=3141', '_blank')
+      },
+      openOrderPromotionDialog (orderNumber, prodName) {
+        this.$refs.orderPromotion.init({
+          orderNumber: orderNumber,
+          prodName: prodName
+        })
+      },
+      openPromotionDialog () {
+        this.$refs.orderPromotion.init({})
+      },
+    },
+    destroyed () {
+      // 页面销毁时移除监听
+      window.removeEventListener('scroll', this.handleScroll)
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mod-order-order {
+    .search-bar {
+      .input-row {
+        .select-time-btn {
+          margin-right: 20px;
+          display: inline-block;
+          color: #AAAAAA;
+          font-size: 14px;
+          cursor: pointer;
+
+          &:last-child {
+            margin-right: 0;
+          }
+        }
+
+        .select-time-btn.is-active {
+          color: #155BD4;
+        }
+
+      }
+    }
+
+    .main {
+      .content {
+        .all-check-btn {
+          margin-right: 10px;
+        }
+
+        .had-selected {
+          font-size: 12px;
+          margin-right: 10px;
+        }
+      }
+
+      .order-status-nav {
+        position: relative;
+        display: block;
+        width: 100%;
+        margin-bottom: 15px;
+        height: 40px;
+        line-height: 40px;
+        border-bottom: 1px solid #ddd;
+
+        ul,
+        li {
+          list-style: none;
+          padding: 0;
+          margin: 0;
+        }
+
+        .nav-item {
+          float: left;
+          height: 40px;
+          line-height: 40px;
+          background: #f7f8fa;
+          border: 1px solid #ddd;
+          padding: 0 20px;
+          margin: 0 -1px -1px 0;
+          cursor: pointer;
+        }
+
+        .selected {
+          background: #fff;
+          border-bottom: 1px solid #fff;
+        }
+      }
+
+      .status-nav {
+        ::v-deep .el-tabs__item {
+          padding: 0 20px;
+          min-width: 68px;
+          width: auto;
+          text-align: center;
+        }
+
+        ::v-deep .el-tabs__nav-wrap::after {
+          height: 1px;
+        }
+      }
+
+      .tit {
+        display: flex;
+        align-items: center;
+        margin-bottom: 15px;
+        background: #F7F8FA;
+        z-index: 11;
+        height: 57px;
+        font-weight: bold;
+
+        .column-title {
+          text-align: center;
+        }
+
+        .item {
+          padding: 0 10px;
+          width: 10%;
+          text-align: center;
+        }
+
+        .product {
+          width: 25%;
+          margin-bottom: 15px;
+          text-align: left !important;
+        }
+      }
+
+      .fixed-top {
+        position: fixed;
+        width: calc(83.5% + var(--tit-width-incremental));
+        top: 90px;
+      }
+
+      .prod {
+        margin-bottom: 15px;
+
+        .prod-tit {
+          padding: 10px;
+          background: #F7F8FA;
+          height: 49px;
+          display: flex;
+          align-items: center;
+          border-left: 1px solid #EBEDF0;
+          border-top: 1px solid #EBEDF0;
+          border-right: 1px solid #EBEDF0;
+
+          .order-number {
+            color: #333333;
+            font-size: 14px
+          }
+
+          .order-index {
+            color: red;
+            font-size: 14px;
+            font-weight: bold;
+          }
+
+          .order-time {
+            color: #999999;
+            font-size: 14px
+          }
+
+          span {
+            margin-right: 15px;
+          }
+        }
+
+        .prod-cont {
+          display: flex;
+          border: 1px solid #EBEDF0;
+          color: #495060;
+
+          .item {
+            display: flex;
+            display: -webkit-flex;
+            align-items: center;
+            padding: 10px;
+            text-align: center;
+            justify-content: center !important;
+            height: 100%;
+            border-right: 1px solid #eee;
+
+            .totalprice {
+              color: #ff4141;
+              margin-bottom: 10px;
+            }
+
+            .operate {
+              color: #2d8cf0;
+
+              .operate-btn {
+                margin: 0 !important;
+                height: auto;
+              }
+
+              .default-btn + .default-btn {
+                display: block;
+                margin-top: 10px;
+                margin-left: 0;
+              }
+            }
+
+            .buyer-info {
+              .buyer-name {
+                margin-bottom: 4px;
+              }
+            }
+
+            span {
+              display: block;
+            }
+          }
+
+          .prod-item {
+            padding: 0;
+            display: flex;
+            flex-direction: column !important;
+            height: 100%;
+            border-right: 1px solid #eee;
+
+            .items.name {
+              width: 100%;
+              display: flex;
+              align-items: center;
+              border-bottom: 1px solid #EBEDF0;
+              padding: 10px !important;
+              text-align: left;
+
+              &:last-child {
+                border-bottom: none;
+              }
+
+              .order-prod-item-info {
+                width: 72%;
+                display: flex;
+                flex-direction: column;
+
+                .info {
+                  display: flex;
+                  align-items: center;
+
+                  .prod-image {
+                    min-height: 80px;
+                    width: 80px;
+                    height: auto;
+                    margin-right: 20px;
+                    padding: 0;
+                    line-height: 80px;
+
+                    img {
+                      width: 100%;
+                      height: 100%;
+                      object-fit: contain;
+                    }
+                  }
+
+                  .prod-name {
+                    width: 100% !important;
+
+                    .prod-con {
+                      width: 85% !important;
+                      display: block;
+                      padding: 0 !important;
+
+                      .prod-name-txt {
+                        padding-right: 10px;
+                        box-sizing: border-box;
+                        display: -webkit-box;
+                        -webkit-box-orient: vertical;
+                        -webkit-line-clamp: 2;
+                        overflow: hidden;
+                      }
+
+                      .order-status {
+                        display: inline-block;
+                        margin-top: 15px;
+                        margin-right: 10px;
+                        padding: 2px 4px;
+                        border: 1px solid #e43130;
+                        border-radius: 2px;
+                        color: #e43130;
+                        font-size: 14px;
+                      }
+                    }
+                  }
+                }
+
+                // 赠品盒子
+                .order-prod-item-give-con {
+                  width: 100%;
+                  padding: 10px 50px 0 10px;
+                  box-sizing: border-box;
+
+                  .giveaway-item {
+                    display: flex;
+                    margin-bottom: 10px;
+
+                    &:last-child {
+                      margin-bottom: 0;
+                    }
+                  }
+
+                  .giveaway-item-name {
+                    box-sizing: border-box;
+                    display: -webkit-box;
+                    -webkit-box-orient: vertical;
+                    -webkit-line-clamp: 1;
+                    overflow: hidden;
+                  }
+
+                  .giveaway-item-sku-count {
+                    margin-left: 10px;
+                    color: #999;
+                    width: 20px;
+                  }
+                }
+              }
+
+              .prod-price {
+                width: 28%;
+                display: flex;
+                justify-content: flex-start;
+                flex-direction: column;
+                overflow: hidden;
+                position: relative;
+                right: 0 !important;
+
+                span {
+                  display: block;
+                  text-align: left;
+                  word-break: keep-all;
+
+                  &:first-child {
+                    margin-bottom: 10px;
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+
+      .empty {
+        display: block;
+        height: 200px;
+        line-height: 200px;
+        text-align: center;
+        color: #aaa;
+      }
+
+      .transaction-price {
+        text-align: left;
+      }
+    }
+
+    // 修改物流弹窗
+    .change-logistics {
+      color: #333;
+      padding: 0 20px;
+
+      .warning {
+        padding: 10px;
+        border: 1px solid #f1924e;
+        background: #fff5ed;
+      }
+
+      .log-list {
+        max-height: 600px;
+        margin-top: 30px;
+        overflow-y: auto;
+
+        .item {
+          padding-bottom: 20px;
+
+          .i-tit {
+            display: flex;
+            align-items: center;
+
+            .big {
+              font-weight: 600;
+              margin-right: 15px;
+            }
+          }
+
+          .item-goods {
+            position: relative;
+            width: 100%;
+            height: 110px;
+            overflow-x: auto;
+
+            .goods-box {
+              position: absolute;
+              left: 0;
+              display: flex;
+              margin-top: 0;
+              -webkit-transition: all 0.3s;
+              -moz-transition: all 0.3s;
+              transition: all 0.3s;
+
+              .item {
+                margin-right: 10px;
+                font-size: 12px;
+                cursor: pointer;
+
+                .img {
+                  width: 60px;
+                  height: 60px;
+                  font-size: 0;
+                  margin-bottom: 4px;
+                  margin-top: 4px;
+                  position: relative;
+
+                  img {
+                    width: 100%;
+                    height: 100%;
+                  }
+
+                  .number {
+                    position: absolute;
+                    bottom: 0;
+                    right: 0;
+                    background: rgba(0, 0, 0, 0.3);
+                    color: #fff;
+                    border-radius: 6px 0 6px 0;
+                    font-size: 12px;
+                    height: 16px;
+                    line-height: 16px;
+                    padding: 0 5px;
+                  }
+                }
+
+                .name {
+                  width: 60px;
+                  height: 16px;
+                  line-height: 16px;
+                  white-space: nowrap;
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                  color: #999;
+                }
+              }
+
+              .item:last-child {
+                margin: 0;
+              }
+
+            }
+          }
+
+          .info-int {
+            &.el-form-item__content,
+            &.el-form-item__label,
+            .el-input__suffix-inner,
+            .el-input__icon {
+              height: 32px;
+              line-height: 32px;
+            }
+
+            display: flex;
+
+            .form-item {
+              margin-right: 15px;
+            }
+          }
+        }
+      }
+
+      .log-info-table {
+        margin-top: 20px;
+        max-height: 600px;
+        overflow-y: auto;
+      }
+    }
+
+    @media (max-width: 1660px) {
+      .fixed-top {
+        width: calc(79.5% + var(--tit-width-incremental)) !important;
+      }
+    }
+    @media (max-width: 1360px) {
+      .fixed-top {
+        width: calc(75.5% + var(--tit-width-incremental)) !important;
+      }
+    }
+  }
+</style>

+ 532 - 0
src/views/modules/order/order-delivery-update.vue

@@ -0,0 +1,532 @@
+<template>
+  <el-dialog
+    :title="this.$i18n.t('order.orderShipping')"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    append-to-body
+    width="1045px"
+  >
+    <div class="mod-order-orderInfo">
+      <!-- <el-alert title="*请仔细填写物流公司及快递单号,发货后72小时内仅支持做一次更正,逾期不可修改" type="warning" show-icon></el-alert> -->
+      <el-table
+        ref="multipleTable"
+        :data="dataList"
+        tooltip-effect="dark"
+        style="width: 100%"
+        header-cell-class-name="table-header"
+        row-class-name="table-row-low"
+        @selection-change="handleSelectionChange"
+      >
+        <!-- <span>{{scope.row.status === 0?status=true:status=false}}<span> -->
+        <el-table-column
+          type="selection"
+          width="55"
+          :selectable="checkSelectable"
+        ></el-table-column>
+        <el-table-column align="left" label-class-name="text-left" :label="this.$i18n.t('order.product')" fit>
+          <template slot-scope="scope">
+            <div class="prod-name-con">
+              <span v-if="scope.row.giveawayOrderItemId" class="gift-icon">{{ $t("order.giveawayPord") }}</span>
+              <span class="prod-name">{{ scope.row.prodName }}</span>
+              <!-- <div
+
+              > -->
+               <span
+                class="order-status"
+                v-if="
+                  scope.row.returnMoneySts !== null &&
+                  scope.row.returnMoneySts > 0 &&
+                  scope.row.returnMoneySts < 6
+                " > {{ $t("order.reimburse") }}</span>
+              <!-- </div> -->
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="prodCount"
+          :label="this.$i18n.t('order.canShipQuantity')"
+          width="100"
+        ></el-table-column>
+        <el-table-column
+          prop="status"
+          :label="this.$i18n.t('product.status')"
+          show-overflow-tooltip
+          width="100"
+        >
+          <template slot-scope="scope">
+            <!-- <template slot-scope="scope">{{ scope.row.status }}</template> -->
+            <span
+              class="tag-text"
+              v-if="
+                scope.row.returnMoneySts !== null &&
+                scope.row.returnMoneySts < 6 &&
+                scope.row.returnMoneySts > 0
+              "
+              >{{
+                [
+                  "",
+                  $t("order.buyerApplication"),
+                  $t("order.sellerAccepts"),
+                  $t("order.selShipment"),
+                  $t("order.sellerReceipt"),
+                  $t("order.refundsuccessfully"),
+                ][scope.row.returnMoneySts]
+              }}</span
+            >
+            <span
+              class="tag-text"
+              v-else-if="scope.row.status !== 0 && scope.row.status !== -1"
+              >{{ $t("order.partialDelivery") }}</span
+            >
+            <span class="tag-text" v-else-if="scope.row.status === 0">{{
+              $t("order.shipmentCompleted")
+            }}</span>
+            <span
+              class="tag-text"
+              v-else-if="scope.row.status === -1"
+              >{{ $t("order.toBeShipped") }}</span
+            >
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="changeNum"
+          :label="this.$i18n.t('order.numberOfShipments')"
+          fit
+        >
+          <template slot-scope="scope">
+            <el-input-number
+              :disabled="scope.row.prodCount <= 0"
+              size="small"
+              v-model="scope.row.changeNum"
+              :precision="0"
+              :min="0"
+              :max="scope.row.prodCount"
+              style="width:150px"
+            ></el-input-number
+            >​
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <!-- :rules="dataRule" -->
+    <el-form
+      :model="dataForm"
+      ref="dataForm"
+      :inline="true"
+      @keyup.enter.native="dataFormSubmit()"
+      label-width="auto"
+    >
+      <div class="detail-cont">
+        <div class="detail01">
+          <div class="text-width">
+              <div class="text-width-item">
+                <div class="title">{{ $t("order.delType") }}:</div>
+                <div class="text">{{
+                  [this.$i18n.t("order.expressDelivery"),
+                  this.$i18n.t("order.selfMention"),
+                  this.$i18n.t("order.noNeedRequired"),
+                  this.$i18n.t("order.sameCityDelivery")
+                ][initDeliveryType - 1]}}</div>
+              </div>
+              <div class="text-width-item">
+                <div class="title">{{ $t("publics.addressee") }}:</div>
+                <div class="text">{{ dataForm.userAddrOrder.receiver }}</div>
+              </div>
+              <div class="text-width-item">
+                <div class="title">{{ $t("distribution.phoneNum") }}:</div>
+                <div class="text">{{ dataForm.userAddrOrder.mobile }}</div>
+              </div>
+              <div class="text-width-item addr-info">
+                <div class="title">{{ $t("publics.deliveryAddr") }}:</div>
+                <div class="text" :class="{'zh-text': $t('language') !== 'English'}">{{
+                  dataForm.userAddrOrder.province
+                }}{{ dataForm.userAddrOrder.city
+                }}{{ dataForm.userAddrOrder.area
+                }}{{ dataForm.userAddrOrder.addr }}</div>
+              </div>
+          </div>
+        </div>
+      </div>
+      <el-form-item :label="this.$i18n.t('order.deliveryMethod') + ':'">
+        <el-radio-group v-model="dataForm.deliveryType" @change="clear()">
+          <el-radio :label="1" :disabled="dataForm.deliveryType === 4">{{
+            $t("order.selfConOrd")
+          }}</el-radio>
+          <el-radio :label="3" :disabled="dataForm.deliveryType === 4">{{
+            $t("order.noNeedRequired")
+          }}</el-radio>
+          <el-radio :label="4" :disabled="dataForm.deliveryType !== 4">{{
+            $t("order.sameCityDelivery")
+          }}</el-radio>
+        </el-radio-group>
+      </el-form-item>
+      <div v-if="dataForm.deliveryType === 1" style="margin-left: 10px">
+        <el-form-item :label="this.$i18n.t('order.courierCompany') + ':'">
+          <!-- <span>快递公司:</span> -->
+          <el-select
+            v-model="dataForm.dvyId"
+            style="width: 300px"
+            size="small"
+            :placeholder="this.$i18n.t('tip.select')"
+            @change="changeDvy"
+          >
+            <el-option
+              v-for="item in dataForm.dvyNames"
+              :key="item.dvyId"
+              :label="item.dvyName"
+              :value="item.dvyId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          :label="this.$i18n.t('order.trackingNumber') + ':'"
+          prop="dvyFlowId"
+        >
+          <el-input
+            v-model="dataForm.dvyFlowId"
+            width="80"
+            style="width: 300px"
+            maxlength="90"
+            size="small"
+            show-word-limit
+            :placeholder="this.$i18n.t('order.trackingNumber')"
+          ></el-input>
+        </el-form-item>
+      </div>
+    </el-form>
+    <span slot="footer">
+      <div class="default-btn" @click="visible = false">{{
+        $t("crud.filter.cancelBtn")
+      }}</div>
+      <div class="default-btn primary-btn" @click="submitProds()">{{
+        $t("crud.filter.submitBtn")
+      }}</div>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  name: 'delivery',
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        dvyId: '',
+        userAddrOrder: {},
+        dvyFlowId: null,
+        dvyNames: [],
+        orderNumber: 0,
+        deliveryType: 1
+      },
+      initDeliveryType: 1,
+      dataList: [],
+      selectOrderItems: [],
+      isSubmit: false,
+      checkAll: false,
+      orderItems: [],
+      isTrue: false,
+      errorInfo: '',
+      orderId: 0,
+      order: null,
+      isIndeterminate: true,
+      orderNumber: 0,
+      freightAmount: 0,
+      lossAmount: 0,
+      dataListLoading: false,
+      dataListSelections: [],
+      addOrUpdateVisible: false,
+      shopId: null
+    }
+  },
+  components: {},
+  mounted () { },
+  methods: {
+    changeDvy(e){
+      this.dataForm.dvyNames.forEach((item)=>{
+        if(item.dvyId === e){
+          this.dataForm.dvyNo = item.dvyNo
+        }
+      })
+    },
+    processingStr (str) {
+      // str = str.replace(/\u200B/g,'');
+      // return str
+    },
+
+    /**
+     * 获取数据列表
+     */
+    init (order) {
+      this.shopId = order.shopId
+      this.isSubmit = false
+      this.dataForm.userAddrOrder = {}
+      this.visible = true
+      this.orderNumber = order.orderNumber
+      this.clear()
+      // 修改
+      this.$http({
+        url: this.$http.adornUrl(`/platform/orderDelivery/getOrderItemUnDelivery`),
+        method: 'get',
+        params: this.$http.adornParams({
+          orderNumber: order.orderNumber,
+          shopId: order.shopId
+        })
+      }).then(({ data }) => {
+        // console.log('data', data)
+        // console.log('orderItems', data.orderItems)
+        this.dataForm.userAddrOrder = data.userAddrOrder
+        this.dataList = data.orderItems
+        this.dataForm.deliveryType = parseInt(data.dvyType)
+        this.initDeliveryType = this.dataForm.deliveryType
+        this.dataList.forEach(element => {
+          element.changeNum = element.prodCount
+        })
+      })
+      this.getDeliveryList()
+    },
+    getDeliveryList () {
+      this.$http({
+        url: this.$http.adornUrl('/platform/delivery/list'),
+        method: 'get',
+        params: this.$http.adornParams()
+      }).then(({ data }) => {
+        this.dataForm.dvyNames = data
+      })
+    },
+    /**
+     * 修改状态
+     */
+    handleSelectionChange (val) {
+      this.selectOrderItems = val
+    },
+    /**
+     * 禁用多选按钮
+     */
+    checkSelectable (row) {
+      return row.status !== 0 && (!row.returnMoneySts || row.returnMoneySts < 0 || row.returnMoneySts > 5)
+    },
+    clear () {
+      this.dataForm.dvyFlowId = null
+      this.dataForm.dvyId = ''
+    },
+    /**
+      * 校验数量
+      */
+    check () {
+      this.isTrue = false
+      if (this.selectOrderItems.length <= 0) {
+        this.isTrue = true
+        this.errorInfo = this.$i18n.t('order.seleOrd')
+        return true
+      }
+      this.selectOrderItems.forEach(element => {
+        if (element.prodCount <= 0 || element.prodCount < element.changeNum || element.changeNum <= 0) {
+          this.isTrue = true
+          this.errorInfo = element.prodName + this.$i18n.t('order.numNotZero') + '!'
+          return true
+        }
+        if (element.changeNum <= 0) {
+          this.isTrue = true
+          this.errorInfo = element.prodName + this.$i18n.t('order.numNotZero') + '!'
+          return true
+        }
+        if (element.changeNum == null) {
+          this.isTrue = true
+          this.errorInfo = element.prodName + this.$i18n.t('order.fhNumNotZero') + '!'
+          return true
+        }
+      })
+      if (this.dataForm.dvyId === '' && this.dataForm.deliveryType === 1) {
+        this.isTrue = true
+        this.errorInfo = this.$i18n.t('order.seleCouCom')
+        return true
+      }
+      if ((this.dataForm.dvyFlowId === 0 || !this.dataForm.dvyFlowId) && this.dataForm.deliveryType === 1) {
+        this.isTrue = true
+        this.errorInfo = this.$i18n.t('order.entCouNum')
+        return true
+      }
+      var reg = /^[a-zA-Z0-9]{4,30}$/
+      if (!reg.test(this.dataForm.dvyFlowId) && this.dataForm.deliveryType === 1) {
+        this.isTrue = true
+        this.errorInfo = this.$i18n.t('order.checkDvyId')
+        return true
+      }
+    },
+    /**
+     * 确定事件
+     */
+    submitProds () {
+      if (!this.dataForm.deliveryType) {
+        this.$message.error(this.$i18n.t('order.pledSeleMet'))
+        return
+      }
+      this.check()
+      if (this.isTrue) {
+        this.errorMsg(this.errorInfo)
+        return
+      }
+      if (this.isSubmit) {
+        return
+      }
+      this.isSubmit = true
+      // let param = this.dataForm
+      this.$http({
+        url: this.$http.adornUrl(`/platform/orderDelivery/orderItemsDelivery`),
+        method: 'put',
+        data: this.$http.adornData({
+          orderNumber: this.orderNumber,
+          dvyId: this.dataForm.dvyId,
+          dvyFlowId: this.dataForm.dvyFlowId,
+          freightAmount: this.freightAmount,
+          selectOrderItems: this.selectOrderItems,
+          deliveryType: this.dataForm.deliveryType,
+          shopId: this.shopId,
+          dvyNo: this.dataForm.dvyNo
+        })
+      }).then(({ data }) => {
+        this.$message({
+          message: this.$i18n.t('publics.operation'),
+          type: 'success',
+          duration: 1500,
+          onClose: () => {
+            this.visible = false
+            this.$emit('refreshOrderDeliveryUpdate')
+          }
+        })
+      }).catch(({ e }) => {
+        this.isSubmit = false
+      })
+    },
+    errorMsg (message) {
+      this.$message({
+        message: message,
+        type: 'error',
+        duration: 1500
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+div >>> .el-input__inner {
+  border: 1px solid #dcdfe6 !important;
+}
+/* div >>> .el-input-number__decrease,
+div >>> .el-input-number__increase {
+  border-top: 1px solid #dddee1 !important;
+  border-bottom: 1px solid #dddee1 !important;
+  height: 32px;
+  line-height: 32px;
+} */
+.mod-order-orderInfo {
+  height: 100%;
+  width: 100%;
+  font: 14px Arial, "PingFang SC", "Hiragino Sans GB", STHeiti,
+    "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
+  color: #495060;
+}
+.element.style {
+  border-top: 1px solid #eeeeee;
+  border-right: 1px solid #eeeeee;
+  border-bottom: 1px solid #eeeeee;
+}
+.prods-select-body {
+  height: auto;
+  overflow: auto;
+  border-top: 1px solid #eeeeee;
+  border-right: 1px solid #eeeeee;
+  border-bottom: 1px solid #eeeeee;
+}
+.mod-order-order .contprod-:last-child {
+  border-bottom: 0;
+  border-left: 0;
+}
+.mod-order-order .prod-cont.prod-bottom,
+.mod-order-order .prod-cont {
+  border-bottom: 1px solid #dddee1;
+  border-left: 1px solid #dddee1;
+}
+.prod-name-con {
+  display: flex;
+  max-width: 100%;
+  align-items: center;
+}
+/* 赠品标签 */
+.prod-name-con .gift-icon {
+  display: inline-block;
+  font-size: 12px;
+  line-height: 1em;
+  color: #fff;
+  background: #e43130;
+  padding: 3px;
+  border-radius: 3px;
+  box-sizing: border-box;
+  margin-right: 5px;
+}
+.prod-name-con .prod-name {
+  flex: 1;
+  max-width: 80%;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  -webkit-text-overflow: ellipsis;
+  -moz-text-overflow: ellipsis;
+  word-break: break-word;
+  display: -webkit-box;
+  -webkit-line-clamp: 2;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
+}
+.prod-name-con .order-status {
+  margin-top: 0;
+}
+.detail01 {
+  min-height: 80px;
+  width: 100%;
+  background: #F7F8FA;
+  margin-top: 15px;
+  padding: 20px 20px;
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+}
+.addr-info {
+  line-height: 17px;
+}
+.text-width {
+  width: 100%;
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+}
+.text-width .text-width-item {
+  display: flex;
+  margin-right: 60px;
+}
+.text-width .text-width-item .title {
+  color: #999999;
+  display: flex;
+  align-items: center;
+}
+.text-width .text-width-item .text {
+  color: #333333;
+  max-width: 95px;
+  /* text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  -webkit-text-overflow: ellipsis;
+  -moz-text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-line-clamp: 1;
+  -webkit-box-orient: vertical;
+  overflow: hidden; */
+  word-break: break-word;
+}
+.addr-info .zh-text {
+  max-width: 260px !important;
+}
+
+
+</style>

File diff suppressed because it is too large
+ 521 - 368
src/views/modules/order/order.vue


+ 356 - 0
src/views/modules/order/orderAmount-update.vue

@@ -0,0 +1,356 @@
+<template>
+  <el-dialog :title="this.$i18n.t('order.modifyOrderAmount')" :close-on-click-modal="false" :visible.sync="visible" width="80%">
+    <div class="mod-order-orderInfo">
+      <el-alert :title="this.$i18n.t('order.modificatioAmount')" type="warning" show-icon></el-alert>
+      <div class="main">
+        <div class="content">
+          <div class="prod-tit prod-tit-item">
+            <el-row style="width:100%">
+              <el-col :span="21">
+                <el-col :span="5" header-align="center" align="center">
+                  <span class="item">{{$t("order.product")}}</span>
+                </el-col>
+                <el-col :span="2" header-align="center" align="center">
+                  <span class="item">{{$t("order.unitPrice")}}</span>
+                </el-col>
+                <el-col :span="2" header-align="center" align="center">
+                  <span class="item">{{$t("order.quantity")}}</span>
+                </el-col>
+                <el-col :span="2" header-align="center" align="center">
+                  <span class="item">{{$t("order.totalPrice")}}</span>
+                </el-col>
+                <el-col :span="2" header-align="center" align="center">
+                  <span class="item">{{$t("order.totalDiscount")}}</span>
+                </el-col>
+                <el-col :span="3" header-align="center" align="center">
+                  <span class="item">{{$t("order.userPayunt")}}</span>
+                </el-col>
+                <el-col :span="2" header-align="center" align="center">
+                  <span class="item">{{$t("order.platforlowance")}}</span>
+                </el-col><el-col :span="2" header-align="center" align="center">
+                  <span class="item">{{$t("order.estimancome")}}</span>
+                </el-col>
+                <el-col :span="4" header-align="center" align="center">
+<!--                  减少金额-->
+                  <span class="item">{{$t("order.reducedAnt")}}</span>
+                </el-col>
+              </el-col>
+              <el-col :span="3">
+                <el-col header-align="center" align="center">
+<!--                  运费金额-->
+                  <span class="item product">{{$t("order.shippingAmunt")}}</span>
+                </el-col>
+              </el-col>
+            </el-row>
+          </div>
+          <div class="prod">
+            <div class="prod-cont prod-bottom">
+              <el-row style="width:100%">
+                <el-col :span="21">
+                  <el-col class="prod" v-for="(orderItem,index) in dataList" :key="index">
+                    <el-col class="prod-cont-item">
+                      <el-row style="width:100%">
+                        <el-col :span="5" style="height: 100%;">
+                          <div class="item">
+                            <span>{{orderItem.prodName}}</span>
+                          </div>
+                        </el-col>
+                        <el-col :span="2" style="height: 100%;">
+                          <div class="item line">
+                            <span>{{orderItem.price}}</span>
+                          </div>
+                        </el-col>  <el-col :span="2" style="height: 100%;">
+                          <div class="item line">
+                            <span>{{orderItem.prodCount}}</span>
+                          </div>
+                        </el-col>
+                        <el-col :span="2" style="height: 100%;">
+                          <div class="item line">
+                            <span>{{orderItem.productTotalAmount}}</span>
+                          </div>
+                        </el-col>
+                        <el-col :span="2" style="height: 100%;">
+                          <div class="item line">
+                            <span>{{orderItem.shareReduceAmount}}</span>
+                          </div>
+                        </el-col>
+                        <el-col :span="3" style="height: 100%;">
+                          <div class="item line">
+                            <span>{{orderItem.actualTotalAmount}}</span>
+                          </div>
+                        </el-col>
+                        <el-col :span="2" style="height: 100%;">
+                          <div class="item line">
+                            <span>{{orderItem.platformShareReduceAmount}}</span>
+                          </div>
+                        </el-col>
+                        <el-col :span="2" style="height: 100%;">
+                          <div class="item line">
+                            <span>{{orderItem.amount}}</span>
+                          </div>
+                        </el-col>
+                        <el-col :span="4" style="height: 100%;">
+                          <div class="item line">
+                            <el-input-number
+                              size="small"
+                              v-model="orderItem.chageAmount"
+                              :precision="2"
+                              :min="0"
+                              :disabled="orderItem.scoreOrder"
+                              @change="setChageAmount(index)"
+                            ></el-input-number>
+                            </div>
+                          </el-col>
+                        </el-row>
+                      </el-col>
+                    </el-col>
+                  </el-col>
+                <el-col class="prod-cont-ca" :span="3" style="height: 100%;">
+                  <div class="item line">
+                    <el-input-number :disabled="orderMold === 1 || freightDisabled" v-model="freightAmount" size="small" :precision="2" :min="0" @blur="freightAmountInput"></el-input-number>
+                  </div>
+                </el-col>
+              </el-row>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <span v-if="lossAmount !== 0">{{$t("order.decreaslowance")}} :{{lossAmount}}{{$t("admin.dollar")}}</span>
+    <span slot="footer">
+      <div class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</div>
+      <div class="default-btn primary-btn" @click="submitProds()">{{$t("crud.filter.submitBtn")}}</div>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import Big from 'big.js'
+export default {
+  data () {
+    return {
+      visible: false,
+      dataForm: {},
+      dataList: [],
+      orderItems: [],
+      isTrue: false,
+      errorInfo: '',
+      orderId: 0,
+      orderNumber: 0,
+      freightAmount: 0,
+      freightDisabled: false,
+      lossAmount: 0,
+      orderMold: 0,
+      dataListLoading: false,
+      dataListSelections: []
+    }
+  },
+  components: {},
+  mounted () { },
+  methods: {
+    processingStr (str) {
+      // str = str.replace(/\u200B/g,'');
+      // return str
+    },
+
+    /**
+     * 获取数据列表
+     */
+    init (order) {
+      let orderInfo = Object.assign({}, order)
+      this.visible = true
+      this.dataListLoading = true
+      this.dataList = orderInfo.orderItems
+      this.orderId = orderInfo.orderId
+      this.orderNumber = orderInfo.orderNumber
+      this.freightAmount = orderInfo.freightAmount - orderInfo.platformFreeFreightAmount
+      this.freightDisabled = orderInfo.freightAmount && orderInfo.freightAmount - orderInfo.platformFreeFreightAmount === 0
+      this.orderMold = orderInfo.orderMold
+      this.lossAmount = 0
+      this.dataList.forEach(element => {
+        element.chageAmount = 0.00
+        element.lossAmount = 0.00
+        let shareReduceAmount = element.shareReduce
+        let actualTotalAmount = element.actualTotal
+        let platformShareReduceAmount = element.platformShareReduce
+        element.shareReduceAmount = shareReduceAmount
+        element.actualTotalAmount = actualTotalAmount
+        element.platformShareReduceAmount = platformShareReduceAmount
+        let actual = new Big(element.actualTotal)
+        element.amount = actual.plus(element.platformShareReduce).round(2)
+        element.scoreOrder = element.actualTotalAmount < 0.01 && element.useScore > 0
+      })
+      this.dataListLoading = false
+    },
+    /**
+     * 减少金额变化时,改变订单金额
+     */
+    setChageAmount (index) {
+      let item = this.dataList[index]
+      if (!item.chageAmount) {
+        item.chageAmount = 0
+      }
+      let chageAmount = new Big(item.chageAmount)
+      let actualTotal = new Big(item.actualTotal)
+      let platformShareReduceAmount = new Big(item.platformShareReduce)
+      // 金额减少比例 = 减少金额  % 总金额
+      let proportion = chageAmount.div(item.productTotalAmount).round(6)
+      // 平台优惠金额减少金额 = 减少比例 * 原平台优惠金额
+      let platformAmount = proportion.times(platformShareReduceAmount).round(2)
+      // 平台优惠金额 = 原平台优惠金额 - 对应比例的金额
+      item.platformShareReduceAmount = platformShareReduceAmount.minus(platformAmount)
+      // 总优惠金额 = 变化金额 + 原总优惠金额
+      item.shareReduceAmount = chageAmount.plus(item.shareReduce)
+      // 实际金额 = 原实际金额 - 变化金额
+      item.actualTotalAmount = actualTotal.minus(item.chageAmount)
+      // 店铺预计收入金额 = 实际金额 + 平台优惠金额
+      item.amount = item.actualTotalAmount.plus(item.platformShareReduceAmount).round(2)
+      // 店铺损失金额 = 平台优惠金额减少金额
+      item.lossAmount = platformAmount
+      // 计算店铺亏损总金额
+      let lossAmount = new Big(0)
+      this.dataList.forEach(item => {
+        lossAmount = lossAmount.plus(item.lossAmount)
+      })
+      this.lossAmount = lossAmount
+    },
+    /**
+     * 校验金额
+     */
+    check () {
+      this.isTrue = false
+      this.dataList.forEach(element => {
+        // 如果金额小于0.01 支付积分大于0则为纯积分支付 此时不进行金额判断
+        if (element.actualTotal < 0.01 && element.useScore > 0) {
+          return false
+        }
+        if (element.actualTotal <= 0) {
+          this.isTrue = true
+          this.errorInfo = this.$i18n.t('order.theOraterThan0')
+          return true
+        }
+      })
+    },
+    /**
+     * 确定事件
+     */
+    submitProds (callback) {
+      this.check()
+      if (this.isTrue) {
+        this.errorMsg(this.errorInfo)
+        return
+      }
+      // let param = this.dataForm
+      this.$http({
+        url: this.$http.adornUrl(`/platform/order/changeAmount`),
+        method: 'put',
+        data: this.$http.adornData({
+          orderId: this.orderId,
+          orderItems: this.dataList,
+          orderNumber: this.orderNumber,
+          freightAmount: this.freightAmount
+        })
+      }).then(({ data }) => {
+        if (callback){
+          callback()
+        }
+        this.$message({
+          message: this.$i18n.t('order.modifyAmountSuccess'),
+          type: 'success',
+          duration: 1500,
+          onClose: () => {
+            this.$emit('refreshOrderAmountUpdate')
+            this.visible = false
+          }
+        })
+      })
+    },
+    /**
+     * 金额输入事件
+     */
+    freightAmountInput () {
+      if (this.freightAmount === '' || this.freightAmount === undefined) {
+        this.freightAmount = 0
+      }
+    },
+    /**
+     * 自动把运费归零,订单费用归为0.01
+     * @param order
+     */
+    setOrderAmountAndFreight(order, callback){
+      let item = order.orderItems[0];
+      item.chageAmount = item.amount.sub(0.01).round(2);
+      this.setChageAmount(0)
+
+      //运费归零
+      this.freightAmount = 0
+      let _this = this
+      setTimeout(() => {
+        _this.submitProds(callback)
+      }, 500)
+    },
+    errorMsg (message) {
+      this.$message({
+        message: message,
+        type: 'error',
+        duration: 1500
+      })
+    }
+  }
+}
+</script>
+
+
+<style scoped>
+.mod-order-orderInfo {
+  height: 100%;
+  width: 100%;
+  font: 14px Arial, "PingFang SC", "Hiragino Sans GB", STHeiti,
+    "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
+  color: #495060;
+}
+.mod-order-orderInfo .prod-tit-item span{
+  margin-right: 0;
+}
+.mod-order-order .prod-cont.prod-bottom {
+  border: 1px solid #ebedf0;
+}
+.mod-order-order .prod {
+  width: 100%;
+  border-bottom: 1px solid #ebedf0;
+}
+.mod-order-order .prod:last-child {
+  border-bottom: none;
+}
+.mod-order-order .prod-cont-item {
+  display: flex;
+  border-right: 1px solid #ebedf0;
+}
+.mod-order-order .prod-cont-item .item {
+  border-right: 1px solid #ebedf0;
+  text-align: center;
+  justify-content: center;
+}
+.mod-order-order .prod-cont-item .line {
+  line-height: 3;
+}
+.mod-order-order .prod-cont-ca {
+  text-align: center;
+  line-height: 3;
+}
+div >>> .el-input-number__decrease {
+  bottom: 2px
+}
+.mod-order-order .prod-cont.prod-bottom,
+.mod-order-order .prod-cont {
+  border-bottom: 1px solid #dddee1;
+  border-left: 1px solid #dddee1;
+}
+.mod-order-order .prod-cont-item .item:last-child {
+  border-right: none;
+}
+.mod-order-order .item >>> .el-input-number.el-input-number--small {
+  width: 160px;
+}
+
+</style>

File diff suppressed because it is too large
+ 564 - 532
src/views/modules/order/orderInfo.vue


+ 305 - 0
src/views/modules/order/orderInvoice-add-or-update.vue

@@ -0,0 +1,305 @@
+<template>
+  <el-dialog
+    :title=" $t('text.editBtn')"
+    :visible.sync="visible"
+    :close-on-click-modal="false"
+  >
+    <el-form
+      ref="dataForm"
+      :rules="rules"
+      :model="dataForm"
+      label-position="left"
+      size="small"
+      label-width="auto"
+    >
+      <!-- 订单id -->
+      <el-form-item :label="$t('order.number')+':'" prop="orderNumber">
+        <div>{{ dataForm.orderNumber || '' }}</div>
+      </el-form-item>
+      <!-- 发票类型 1.电子普通发票 -->
+      <el-form-item :label="$t('order.invoiceType')+':'" prop="invoiceType">
+        <div v-if="dataForm.invoiceType === 1">{{ $t('order.normalInvoiceType') }}</div>
+      </el-form-item>
+      <!-- 抬头类型 1.单位 2.个人 -->
+      <el-form-item :label="$t('order.headerType')+':'" prop="headerType">
+        <div>{{ ['',$t('order.unit'),$t('order.personal')][dataForm.headerType] }}</div>
+      </el-form-item>
+      <!-- 抬头名称 -->
+      <el-form-item v-if="dataForm.headerName" :label="$t('order.headerName')+':'" prop="headerName">
+        <div>{{ dataForm.headerName || '' }}</div>
+      </el-form-item>
+      <!-- 发票税号 -->
+      <el-form-item v-if="dataForm.invoiceTaxNumber && dataForm.headerType === 1" :label="$t('order.invoiceTaxNumber')+':'" prop="invoiceTaxNumber">
+        <div>{{ dataForm.invoiceTaxNumber || '' }}</div>
+      </el-form-item>
+      <!-- 订单状态 -->
+      <el-form-item :label="$t('group.orderStatus')+':'" prop="orderStatus">
+        <span v-if="dataForm.orderStatus === 1">{{$t('order.pendingPayment')}}</span>
+        <span v-if="dataForm.orderStatus === 2">{{$t('order.toBeShipped')}}</span>
+        <span v-if="dataForm.orderStatus === 3">{{$t('order.pendingReceipt')}}</span>
+        <span v-if="dataForm.orderStatus === 4">{{$t('order.toBeEvaluated')}}</span>
+        <span v-if="dataForm.orderStatus === 5">{{$t('order.success')}}</span>
+        <span v-if="dataForm.orderStatus === 6">{{$t('order.fail')}}</span>
+        <span v-if="dataForm.orderStatus === 7">{{$t('group.waitGroup')}}</span>
+      </el-form-item>
+      <!-- 发票状态 1.申请中 2.已开票 -->
+      <el-form-item :label="$t('order.invoiceStatus')+':'" prop="invoiceState">
+        <div>{{ ['',$t('order.applicationInProgress'),$t('order.invoiceIssued'),$t('order.fail')][dataForm.invoiceState] }}</div>
+      </el-form-item>
+      <!-- 发票上传: -->
+      <el-form-item v-if="isAuth('order:orderInvoice:upload')" :label="$t('order.invoiceUpload')+':'">
+        <div>
+          <el-link v-if="fileInfo.filePath" target="_blank" :href="resourcesUrl+fileInfo.filePath">{{ fileInfo.fileName + '.' + fileInfo.fileType }}</el-link>
+          <el-upload
+            ref="upload"
+            accept=".pdf"
+            :action="$http.adornUrl('/admin/file/save_pdf_file')"
+            :headers="{Authorization: $cookie.get('Authorization_vs'),locale:lang}"
+            :multiple="false"
+            :auto-upload="false"
+            :limit="1"
+            :before-upload="beforeUpload"
+            :on-change="onUploadChange"
+            :on-progress="onUploadProgress"
+            :on-success="onUploadSuccess"
+            :on-error="onUploadError"
+            :on-exceed="onUploadExceedTip"
+          >
+            <el-button slot="trigger" size="small" type="primary">{{ $t('order.SelectFile') }}</el-button>
+            <el-button style="margin-left: 10px;" size="small" type="success" @click="onUploadConfirm">{{ $t('pictureManager.confirmUpload')}}
+              <el-tooltip :content="$t('pictureManager.uploadPDF')" placement="top" effect="light">
+                <i class="el-icon-question el-icon--right" />
+              </el-tooltip>
+            </el-button>
+          </el-upload>
+        </div>
+      </el-form-item>
+      <!-- 申请时间 -->
+      <el-form-item :label="$t('order.applicationTime')+':'" prop="applicationTime">
+        <div>{{ dataForm.applicationTime }}</div>
+      </el-form-item>
+      <!-- 上传时间 -->
+      <el-form-item v-if="dataForm.uploadTime" :label="$t('order.uploadTime')+':'" prop="uploadTime">
+        <div>{{ dataForm.uploadTime }}</div>
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <div class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</div>
+      <div v-if="isAuth('order:orderInvoice:commit')" class="default-btn primary-btn" @click="beforeSubmit()">{{$t("crud.filter.submitBtn")}}</div>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      lang: localStorage.getItem('lang') || 'zh_CN',
+      dataForm: {
+        orderInvoiceId: 0,
+        orderNumber: null,
+        shopId: null,
+        invoiceType: null,
+        headerType: null,
+        headerName: null,
+        invoiceTaxNumber: null,
+        invoiceState: null,
+        fileId: null,
+        applicationTime: null,
+        uploadTime: null,
+        ossList: null,
+        attachFile: null
+      },
+      attachFile: [],
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+      upLoadForm: {},
+      rules: {
+      },
+      fileInfo: {}
+    }
+  },
+  methods: {
+    init (orderInvoiceId) {
+      this.visible = true
+      this.$nextTick(() => {
+        // this.$refs.dataForm.resetFields()
+        this.resetDataFrom()
+        if (!orderInvoiceId) {
+          return
+        }
+        this.dataForm.orderInvoiceId = orderInvoiceId || 0
+        this.$http({
+          url: this.$http.adornUrl(`/m/orderInvoice/info/${orderInvoiceId}`),
+          method: 'get',
+          params: this.$http.adornParams()
+        }).then(({ data }) => {
+          this.dataForm = data
+          // 请求文件
+          if (this.dataForm.fileId) {
+            this.$http({
+              url: this.$http.adornUrl(`/admin/file/get_file_by_id`),
+              method: 'get',
+              params: this.$http.adornParams({
+                fileId: this.dataForm.fileId
+              })
+            }).then(({ data }) => {
+              this.fileInfo = data
+            })
+          }
+        })
+      })
+    },
+    // 清空数据
+    resetDataFrom () {
+      this.dataForm = {
+        orderInvoiceId: 0,
+        orderNumber: null,
+        shopId: null,
+        invoiceType: null,
+        headerType: null,
+        headerName: null,
+        invoiceTaxNumber: null,
+        invoiceState: null,
+        fileId: null,
+        applicationTime: null,
+        uploadTime: null,
+        ossList: null,
+        attachFile: null
+      }
+      this.fileInfo = {}
+    },
+    // 查看是否已经更改过申请信息
+    beforeSubmit () {
+      this.$http({
+        url: this.$http.adornUrl(`/m/orderInvoice/is_change`),
+        method: 'get',
+        params: this.$http.adornParams({
+          orderInvoiceId: this.dataForm.orderInvoiceId,
+          applicationTime: this.dataForm.applicationTime
+        })
+      }).then(({ data }) => {
+        if (data === true) {
+          this.$confirm(this.$i18n.t('order.uploadInvoiceTip2'), this.$i18n.t('text.tips'), {
+            confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+            cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+            type: 'warning'
+          }).then(() => {
+            this.dataFormSubmit()
+          })
+        } else {
+          this.dataFormSubmit()
+        }
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs.dataForm.validate(valid => {
+        if (!valid) {
+          return
+        }
+        if (!this.fileInfo.fileId) {
+          this.$message({
+            message: this.$t('order.uploadInvoiceTip4'),
+            type: 'info',
+            duration: 1000
+          })
+          return
+        }
+        this.$http({
+          url: this.$http.adornUrl(`/m/orderInvoice`),
+          method: 'put',
+          data: this.dataForm
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$t('publics.operation'),
+            type: 'success',
+            duration: 1000,
+            onClose: () => {
+              this.visible = false
+              this.$emit('refreshDataList')
+              // this.$refs['dataForm'].resetFields()
+            }
+          })
+        })
+      })
+    },
+
+    onUploadProgress (event, file, fileList) {
+    },
+    onUploadChange (file, fileList) {
+      console.log(file)
+      if (file.size > 10 * 1024 * 1024) {
+        this.$refs.upload.uploadFiles = []
+        return this.$message.error('文件大小不得超过10M!')
+      }
+    },
+    /**
+     * 上传图片
+     */
+    onUploadConfirm () {
+      if (this.$refs.upload.uploadFiles.length < 1) {
+        return this.$message.error(this.$t('order.uploadInvoiceTip'))
+      }
+      if (this.dataForm.orderStatus < 4) {
+        this.$confirm(this.$t('order.uploadInvoiceTip1'), this.$t('chat.tips'), {
+          confirmButtonText: this.$t('chat.confirm'),
+          cancelButtonText: this.$t('chat.cancel'),
+          type: 'warning'
+        }).then(() => {
+          this.$refs.upload.submit()
+        }).catch(() => {
+        })
+      } else {
+        this.$refs.upload.submit()
+      }
+    },
+
+    // 预上传
+    handleAvatarChange (file, fileList) {
+    },
+    /**
+     * 上传错误处理
+     * @param err
+     * @param file
+     * @param fileList
+     */
+    onUploadError (err, file, fileList) {
+      this.message(this.$t('biz.imgbox.requestError'), true)
+      throw err
+    },
+
+    /**
+     * 上传成功处理,并提交文件数据
+     * @param response
+     * @param file
+     * @param fileList
+     * @returns {boolean}
+     */
+    onUploadSuccess (response, file, fileList) {
+      this.fileInfo = response
+      this.dataForm.fileId = response.fileId
+      this.$refs.upload.uploadFiles = []
+    },
+    onUploadExceedTip () {
+    },
+    /**
+     * 上传前检查合法性
+     * @param file
+     * @returns {boolean}
+     */
+    beforeUpload (file) {
+      console.log(file)
+      // const typeArray = file.type.split('/')
+      const isImage = file.type === 'application/pdf'
+      if (!isImage) {
+        this.$message.error('请上传PDF文件!')
+        return false
+      }
+      return true
+    },
+    handleRemove () {
+    }
+  }
+}
+</script>

+ 286 - 0
src/views/modules/order/orderInvoice.vue

@@ -0,0 +1,286 @@
+<template>
+<!-- 发票管理 -->
+  <div class="order-invoice">
+    <!-- 搜索栏 -->
+    <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 prop="orderNumber" :label="$t('order.number')+':'">
+            <el-input v-model="searchForm.orderNumber" type="text" clearable :placeholder="$t('order.number')"></el-input>
+          </el-form-item>
+          <el-form-item prop="invoiceState" label="发票状态:">
+            <template>
+              <el-select
+                v-model="searchForm.invoiceState"
+                clearable
+                placeholder="发票状态"
+              >
+                <el-option
+                  v-for="item in invoiceStates"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-form-item>
+          <el-form-item prop="orderStatus" :label="$t('order.status')+':'">
+            <template>
+              <el-select
+                v-model="searchForm.orderStatus"
+                clearable
+                :placeholder="this.$i18n.t('order.status')"
+              >
+                <el-option
+                  v-for="item in orderStatus"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange(true)">{{ $t('crud.searchBtn') }}</div>
+            <div class="default-btn" @click="resetForm()">重置</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 搜索栏end -->
+
+    <div class="main-container">
+      <!-- 表格 -->
+      <div class="table-con invoice-table">
+        <el-table
+          ref="InvoiceTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          style="width: 100%"
+        >
+          <!-- 订单id -->
+          <el-table-column :label="$t('order.number')" prop="orderNumber">
+            <template slot-scope="{row}">
+              <span>{{ row.orderNumber }}</span>
+            </template>
+          </el-table-column>
+          <!-- 抬头类型 1.单位 2.个人 -->
+          <el-table-column label="发票抬头" prop="headerType">
+            <template slot-scope="{row}">
+              <span>{{ ['',$t('order.unit'),$t('order.personal')][row.headerType] }}</span>
+            </template>
+          </el-table-column>
+          <!-- 发票状态 1.申请中 2.已开票 -->
+          <el-table-column label="发票状态" prop="invoiceState">
+            <template slot-scope="{row}">
+              <span>{{ ['',$t('order.applicationInProgress'),$t('order.invoiceIssued'),$t('order.fail')][row.invoiceState] }}</span>
+            </template>
+          </el-table-column>
+          <!-- 订单状态 -->
+          <el-table-column
+            :label="$t('order.status')"
+            prop="orderStatus"
+           >
+            <template slot-scope="scope">
+              <span v-if="scope.row.orderStatus === 1">{{$t('order.pendingPayment')}}</span>
+              <span v-if="scope.row.orderStatus === 2">{{$t('order.toBeShipped')}}</span>
+              <span v-if="scope.row.orderStatus === 3">{{$t('order.pendingReceipt')}}</span>
+              <span v-if="scope.row.orderStatus === 4">{{$t('order.toBeEvaluated')}}</span>
+              <span v-if="scope.row.orderStatus === 5">{{$t('order.success')}}</span>
+              <span v-if="scope.row.orderStatus === 6">{{$t('order.fail')}}</span>
+              <span v-if="scope.row.orderStatus === 7">{{$t('group.waitGroup')}}</span>
+            </template>>
+          </el-table-column>
+          <!-- 申请时间 -->
+          <el-table-column :label="$t('order.applicationTime')" prop="applicationTime">
+            <template slot-scope="{row}">
+              <span>{{ row.applicationTime }}</span>
+            </template>
+          </el-table-column>
+          <!-- 上传时间 -->
+          <el-table-column label="上传时间" prop="uploadTime">
+            <template slot-scope="{row}">
+              <span>{{ row.uploadTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            :label="$t('crud.menu')"
+            fixed="right"
+            align="center"
+            width="200"
+          >
+            <template slot-scope="{row}">
+              <el-button type="text" @click="viewOrderHandle(row.orderNumber, row.shopId, row.status, )">
+                {{ $t('order.viewOrder') }}
+              </el-button>
+              <el-button v-if="isAuth('order:orderInvoice:update')" type="text" @click="addOrUpdateHandle(row.orderInvoiceId)">
+                {{ $t('text.editBtn') }}
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+      <!-- 分页 -->
+      <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          :total="page.total"
+          layout="total, sizes, prev, pager, next, jumper"
+      ></el-pagination>
+    </div>
+
+    <!-- 弹窗, 新增 / 修改 -->
+    <add-or-update v-if="addOrUpdateVisible"
+      ref="addOrUpdate"
+      @refreshDataList="refreshChange"></add-or-update>
+
+    <order-info ref="orderInfo"></order-info>
+
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './orderInvoice-add-or-update'
+import OrderInfo from "./orderInfo";
+export default {
+  components: {
+    OrderInfo,
+    AddOrUpdate
+  },
+  data () {
+    return {
+      theData: null, // 保存上次点击查询的请求条件
+
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      searchForm: {},
+      invoiceStates: [
+        {
+          label: this.$i18n.t('order.applicationInProgress'),
+          value: 1
+        },
+        {
+          label: this.$i18n.t('order.invoiceIssued'),
+          value: 2
+        },
+        {
+          label: this.$i18n.t('order.fail'),
+          value: 3
+        }
+      ],
+      orderStatus: [
+        {
+          label: "待发货",
+          value: 2
+        },
+        {
+          label: "待收货",
+          value: 3
+        },
+        {
+          label: "成功",
+          value: 5
+        },
+        {
+          label: "失败",
+          value: 6
+        }
+      ],
+      // 编辑弹窗显隐
+      addOrUpdateVisible: false
+    }
+  },
+
+  mounted () {
+    this.getDataList()
+  },
+
+  methods: {
+    // 获取数据列表
+    getDataList (page, newData = false) {
+      this.dataListLoading = true
+      if (newData || !this.theData) {
+        this.theData = JSON.parse(JSON.stringify(this.searchForm))
+      }
+      this.$http({
+        url: this.$http.adornUrl('/m/orderInvoice/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign(
+            {
+              current: page ? page.currentPage : this.page.currentPage,
+              size: page ? page.pageSize : this.page.pageSize
+            },
+            this.theData
+          )
+        )
+      }).then(({ data }) => {
+        this.dataList = data.records
+        this.page.total = data.total
+      })
+    },
+
+    // 条件查询
+    searchChange (newData = false) {
+      this.page.currentPage = 1
+      this.getDataList(this.page, newData)
+    },
+
+    /**
+     * 查看订单
+     */
+    viewOrderHandle (orderNumber, shopId, status) {
+      this.$refs.orderInfo.init({
+        orderNumber: orderNumber,
+        shopId: shopId,
+        status: status
+      })
+      /*this.$router.push({
+        path: '/order-orderInfo',
+        query: {
+          orderNumber: id
+        }
+      })*/
+    },
+
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList(this.page)
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList(this.page)
+    },
+
+    // 重置
+    resetForm () {
+      this.searchForm = {}
+    },
+    // 刷新回调用
+    refreshChange () {
+      this.page.current = 1
+      this.getDataList(this.page)
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 40 - 25
src/views/modules/order/orderRefund.vue

@@ -506,7 +506,7 @@
                   <div class="operate">
                     <div
                       class="default-btn text-btn"
-                      @click="viewOrderHandle(orderRefund.orderNumber)"
+                      @click="viewOrderHandle(orderRefund.orderNumber, orderRefund.shopId, orderRefund.status, )"
                       >{{ $t("order.viewOrder") }}</div
                     >
                     <div
@@ -514,13 +514,24 @@
                       @click="toImbox(orderRefund)"
                       >{{ $t("order.contactBuyer") }}</div
                     >
+
                     <div
-                      class="default-btn text-btn"
+                      :class="['default-btn','text-btn','operate-btn', $t('language') == 'English' ?'btn-height':'']"
+                      v-if="isAuth('admin:orderRefund:update') && orderRefund.returnMoneySts !== 5 && orderRefund.returnMoneySts !== -1"
                       @click="
                         refundHandle(orderRefund.refundId, orderRefund.shopId)
                       "
                       >{{ $t("order.processingRefunds") }}</div
                     >
+
+                    <div
+                      class="default-btn text-btn"
+                      v-if="orderRefund.returnMoneySts === 5 || orderRefund.returnMoneySts === -1"
+                      @click="
+                        refundHandle(orderRefund.refundId, orderRefund.shopId)
+                      "
+                      >{{ $t("order.lookRefunds") }}</div
+                    >
                   </div>
                 </div>
               </el-col>
@@ -548,21 +559,19 @@
       layout="total, sizes, prev, pager, next, jumper"
     ></el-pagination>
     <!-- 弹窗  -->
-    <add-or-update
-      v-if="addOrUpdateVisible"
-      ref="addOrUpdate"
-      @refreshDataList="refreshChange"
-    ></add-or-update>
+    <refund-order-info
+      ref="refundOrderInfo"
+      @refreshDataList="refreshChange">
+    </refund-order-info>
     <order-info
-      v-if="orderInfoVisible"
-      ref="OrderInfo"
+      ref="orderInfo"
       @refreshDataList="refreshChange"
     ></order-info>
   </div>
 </template>
 
 <script>
-import AddOrUpdate from './refundOrderInfo'
+import RefundOrderInfo from './refundOrderInfo'
 import OrderInfo from './orderInfo'
 import moment from 'moment'
 import ProdPic from '@/components/prod-pic'
@@ -679,7 +688,7 @@ export default {
   },
   components: {
     OrderInfo,
-    AddOrUpdate,
+    RefundOrderInfo,
     ProdPic
     // ConsignmentInfo
   },
@@ -792,17 +801,22 @@ export default {
     /**
      * 查看订单
      */
-    viewOrderHandle (id) {
+    viewOrderHandle (orderNumber, shopId, status) {
+      this.$refs.orderInfo.init({
+        orderNumber: orderNumber,
+        shopId: shopId,
+        status: status
+      })
       // this.orderInfoVisible = true
       // this.$nextTick(() => {
       //   this.$refs.OrderInfo.init(id)
       // })
-      this.$router.push({
-        path: '/order-orderInfo',
-        query: {
-          orderNumber: id
-        }
-      })
+      // this.$router.push({
+      //   path: '/order-orderInfo',
+      //   query: {
+      //     orderNumber: id
+      //   }
+      // })
     },
     /**
      * 处理退款
@@ -812,13 +826,14 @@ export default {
       // this.$nextTick(() => {
       //   this.$refs.addOrUpdate.init(id, shopId)
       // })
-      this.$router.push({
-        path: '/order-refundOrderInfo',
-        query: {
-          refundId: id,
-          shopId
-        }
-      })
+      // this.$router.push({
+      //   path: '/order-refundOrderInfo',
+      //   query: {
+      //     refundId: id,
+      //     shopId
+      //   }
+      // })
+      this.$refs.refundOrderInfo.init(id, shopId)
     },
     /**
      * 根据选项设置时间

+ 178 - 68
src/views/modules/order/refundOrderInfo.vue

@@ -1,12 +1,26 @@
 <template>
   <div class="orderRefund">
+    <el-dialog
+      :title="
+        !dataForm.orderNumber
+          ? this.$i18n.t('crud.addTitle')
+          : '处理退款'
+      "
+      :close-on-click-modal="false"
+      :visible.sync="visible"
+      :append-to-body="true"
+      width="80%"
+      v-if="visible"
+      top="1vh"
+      @close="closeDialog"
+    >
     <div class="new-page-title">
       <div class="line" />
       <div class="text">
         {{ $t('refundOrderDetail.returnDetails') }}
       </div>
     </div>
-      <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
+    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="auto">
       <div class="mod-order-refundOrderInfo">
         <div class="refundId">
           <span class="title">{{ $t('order.refundId') }}</span>
@@ -31,17 +45,21 @@
                     <div v-if="dataForm.applyType === 2">{{ $t("order.refundAndMoney") }}</div>
                   </div>
                 </div>
+                <div v-if="isAuth('admin:orderRefund:update') && dataForm.decisionTime && !dataForm.refundTime" class="item">
+                    <div class="default-btn primary-btn" @click="refundRequest(dataForm.refundSn)">发放退款</div>
+                  </div>
               </div>
               <div class="refund-progress">
                 <div class="item" v-if="dataForm.applyType === 1">
                   <el-steps :active="onlyRefundStepsStatus" align-center :process-status="onlyRefundProcessStatus">
-                    <el-step :title="$t('refundOrderDetail.buyerApplyRefund')"/>
-                    <el-step :title="$t('refundOrderDetail.MerchantAgreesRefund')"/>
-                    <el-step :title="$t('order.refundsuccessfully')"/>
+                    <el-step :title="$t('refundOrderDetail.buyerApplyRefund')" />
+                    <el-step :title="$t('refundOrderDetail.MerchantAgreesRefund')" />
+                    <el-step :title="$t('order.refundsuccessfully')" />
                   </el-steps>
                 </div>
                 <div class="item" v-else>
-                  <el-steps :active="stepsStatus" align-center :process-status="dataForm.returnMoneySts === -1 ? 'error' : 'wait'">
+                  <el-steps :active="stepsStatus" align-center
+                    :process-status="dataForm.returnMoneySts === -1 ? 'error' : 'wait'">
                     <el-step :title="$t('refundOrderDetail.BuyerApplyRetPur')"></el-step>
                     <el-step :title="$t('refundOrderDetail.MerchantAgreesRetPur')"></el-step>
                     <el-step :title="$t('refundOrderDetail.buyerDel')"></el-step>
@@ -77,7 +95,8 @@
                         </div>
                         <div class="text-width-item">
                           <span class="title">{{ $t('order.refundAmount') }}:</span>
-                          <span class="text">{{dataForm.refundAmount + $t("transport.yuan") + "+ " + dataForm.refundScore + $t("order.score") }}</span>
+                          <span class="text">{{ dataForm.refundAmount + $t("transport.yuan") + "+ " + dataForm.refundScore
+                            + $t("order.score") }}</span>
                         </div>
                         <div class="text-width-item">
                           <span class="title">{{ $t('order.applicationTime') }}:</span>
@@ -102,36 +121,41 @@
                   </div>
                   <div class="buyers-info">
                     <div class="img-up">
-                      <imgs-upload v-model="dataForm.photoFiles" :disabled="true" :modal="false" :prompt="false"/>
+                      <imgs-upload v-model="dataForm.photoFiles" :disabled="true" :modal="false" :prompt="false" />
                     </div>
                   </div>
                 </div>
                 <!-- / 退款凭证 -->
               </div>
-              <div class="order-info" v-if="this.dataForm.refundDelivery && (this.dataForm.refundDelivery.deyNu || this.dataForm.refundDelivery.imgs)">
+              <div class="order-info"
+                v-if="this.dataForm.refundDelivery && (this.dataForm.refundDelivery.deyNu || this.dataForm.refundDelivery.imgs)">
                 <div class="order-details">
                   <template>
                     <div class="detail-title">
-                      <span class="prompt">{{$t("refundOrderDetail.logisticsDetails") }}</span>
+                      <span class="prompt">{{ $t("refundOrderDetail.logisticsDetails") }}</span>
                     </div>
                     <div class="detail-cont">
                       <div class="detail01">
                         <div class="text-width">
-                          <div class="text-width-item" v-if="this.dataForm.refundDelivery && this.dataForm.refundDelivery.deyName">
-                            <span class="title">{{ $t('refundOrderDetail.logisticsName')  }}:</span>
-                            <span class="text">{{this.dataForm.refundDelivery.deyName }}</span>
+                          <div class="text-width-item"
+                            v-if="this.dataForm.refundDelivery && this.dataForm.refundDelivery.deyName">
+                            <span class="title">{{ $t('refundOrderDetail.logisticsName') }}:</span>
+                            <span class="text">{{ this.dataForm.refundDelivery.deyName }}</span>
                           </div>
-                          <div v-if="this.dataForm.refundDelivery && this.dataForm.refundDelivery.deyNu" class="text-width-item">
+                          <div v-if="this.dataForm.refundDelivery && this.dataForm.refundDelivery.deyNu"
+                            class="text-width-item">
                             <span class="title">{{ $t('order.trackingNumber') }}:</span>
-                            <span class="text">{{this.dataForm.refundDelivery.deyNu }}</span>
+                            <span class="text">{{ this.dataForm.refundDelivery.deyNu }}</span>
                           </div>
-                          <div class="text-width-item" v-if="this.dataForm.refundDelivery && this.dataForm.refundDelivery.senderRemarks">
+                          <div class="text-width-item"
+                            v-if="this.dataForm.refundDelivery && this.dataForm.refundDelivery.senderRemarks">
                             <span class="title">{{ $t('order.compradorMsg') }}:</span>
-                            <span class="text">{{this.dataForm.refundDelivery.senderRemarks }}</span>
+                            <span class="text">{{ this.dataForm.refundDelivery.senderRemarks }}</span>
                           </div>
-                          <div v-if="this.dataForm.refundDelivery && this.dataForm.refundDelivery.senderMobile" class="text-width-item">
-                            <span class="title">{{ $t('order.buyerPhone')  }}:</span>
-                            <span>{{this.dataForm.refundDelivery.senderMobile }}</span>
+                          <div v-if="this.dataForm.refundDelivery && this.dataForm.refundDelivery.senderMobile"
+                            class="text-width-item">
+                            <span class="title">{{ $t('order.buyerPhone') }}:</span>
+                            <span>{{ this.dataForm.refundDelivery.senderMobile }}</span>
                           </div>
                         </div>
                       </div>
@@ -142,7 +166,7 @@
                     </div>
                     <div class="buyers-info">
                       <div class="detail02">
-                        <imgs-upload v-model="refundDeliveryPhotos" :disabled="true" :modal="false" :prompt="false"/>
+                        <imgs-upload v-model="refundDeliveryPhotos" :disabled="true" :modal="false" :prompt="false" />
                         <!-- <div class="refundImg" v-for="(item, index) in refundDeliveryPhotos" :key="index">
                             <el-popover placement="right" title trigger="click">
                               <img slot="reference" :src="resourcesUrl + item"
@@ -164,7 +188,8 @@
                       <span class="l-state" v-if="deliveryDto.state === 2">{{ $t("order.delivering") }}</span>
                       <span class="l-state" v-if="deliveryDto.state === 3">{{ $t("order.haveBeenReceived") }}</span>
                       <span class="l-state" v-if="deliveryDto.state === 4">{{ $t("order.problemPiece") }}</span>
-                      <span class="l-state" v-if="deliveryDto.state === 201">{{ $t("order.reachTheDestinationCity") }}</span>
+                      <span class="l-state" v-if="deliveryDto.state === 201">{{ $t("order.reachTheDestinationCity")
+                      }}</span>
                     </div>
                     <div class="logistics-box" v-if="deliveryDto">
                       <!-- 退款时间 -->
@@ -185,7 +210,7 @@
                         <div class="time">{{ trace.acceptTime }}</div>
                         <div class="text">{{ trace.acceptStation }}</div>
                       </div>
-                      <div class="item" v-if="deliveryDto.traces &&deliveryDto.traces.length < 1">
+                      <div class="item" v-if="deliveryDto.traces && deliveryDto.traces.length < 1">
                         {{ $t("order.noLogisticsInformation") }}
                       </div>
                       <!-- 发货时间 -->
@@ -201,7 +226,8 @@
                         <div class="text">{{ $t("refund.merchantHasAgree") }}</div>
                       </div>
                       <!-- 申请时间 -->
-                      <div :class="['item', dataForm.returnMoneySts >= 1?'left-line':'']" v-if="dataForm.returnMoneySts >= 1">
+                      <div :class="['item', dataForm.returnMoneySts >= 1 ? 'left-line' : '']"
+                        v-if="dataForm.returnMoneySts >= 1">
                         <div class="time">{{ dataForm.applyTime }}</div>
                         <div class="text">
                           {{ $t("refund.buyerApply") }}
@@ -212,26 +238,25 @@
                 </div>
               </div>
               <div class="item-list">
-                <el-table :data="prodList" header-cell-class-name="table-header" row-class-name="table-row-row" :row-style="{ height:'82px'}">
+                <el-table :data="prodList" header-cell-class-name="table-header" row-class-name="table-row-row"
+                  :row-style="{ height: '82px' }">
                   <el-table-column prop :label="this.$i18n.t('refundOrderDetail.refundItems')" width="400">
                     <template slot-scope="scope">
                       <div class="prod-info">
                         <!-- <img :src="resourcesUrl + scope.row.pic" class="prod-img"/> -->
-                        <prod-pic
-                          height="60px"
-                          width="60px"
-                          :pic="scope.row.pic"
-                        ></prod-pic>
+                        <prod-pic height="60px" width="60px" :pic="scope.row.pic"></prod-pic>
                         <div class="con">
-                          <span class="gift-icon" v-if="scope.row.giveawayOrderItemId">{{ $t("order.giveawayPord") }}</span>
+                          <span class="gift-icon" v-if="scope.row.giveawayOrderItemId">{{ $t("order.giveawayPord")
+                          }}</span>
                           <div class="prod-info-text">{{ scope.row.prodName }}</div>
                         </div>
                       </div>
                       <!-- 赠品 -->
                       <div v-if="dataForm.orderItems.length > 1" class="gift-prod table-cell-text">
                         <div v-for="item in scope.row.giveawayList" class="item">
-                          <div class="name prod-info-text">{{'【' + $t("order.giveawayPord") + '】'}}{{item.prodName}}</div>
-                          <span class="num">×{{item.prodCount}}</span>
+                          <div class="name prod-info-text">{{ '【' + $t("order.giveawayPord") + '】' }}{{ item.prodName }}
+                          </div>
+                          <span class="num">×{{ item.prodCount }}</span>
                         </div>
                       </div>
                       <!-- / 赠品 -->
@@ -244,30 +269,41 @@
                   </el-table-column>
                   <el-table-column prop="count" :label="this.$i18n.t('order.quantity')">
                     <template slot-scope="scope">
-                      <span v-if="dataForm.refundType === 1">{{scope.row.prodCount }}</span>
-                      <span v-if="dataForm.refundType === 2">{{dataForm.goodsNum }}</span>
+                      <span v-if="dataForm.refundType === 1">{{ scope.row.prodCount }}</span>
+                      <span v-if="dataForm.refundType === 2">{{ dataForm.goodsNum }}</span>
                     </template>
                   </el-table-column>
                   <el-table-column prop="productTotalAmount" :label="this.$i18n.t('order.prodTotalPrice')">
                     <template slot-scope="scope">
-                      <span v-if="dataForm.refundType === 1 && !scope.row.giveawayOrderItemId">¥{{scope.row.productTotalAmount | price }}</span>
-                      <span v-if="dataForm.refundType === 2 && !scope.row.giveawayOrderItemId">¥{{bigProductTotalAmount(scope.row.price, dataForm.goodsNum) | price }}</span>
-                      <span v-if="scope.row.giveawayOrderItemId">¥{{scope.row.giveawayAmount | price }}</span>
+                      <span v-if="dataForm.refundType === 1 && !scope.row.giveawayOrderItemId">¥{{
+                        scope.row.productTotalAmount
+                        | price }}</span>
+                      <span v-if="dataForm.refundType === 2 && !scope.row.giveawayOrderItemId">¥{{
+                        bigProductTotalAmount(scope.row.price,
+                          dataForm.goodsNum) | price }}</span>
+                      <span v-if="scope.row.giveawayOrderItemId">¥{{ scope.row.giveawayAmount | price }}</span>
                     </template>
                   </el-table-column>
 
                   <el-table-column prop="actualTotal" :label="this.$i18n.t('order.actualAmount')">
                     <template slot-scope="scope">
-                      <span v-if="dataForm.refundType === 1 && !scope.row.giveawayOrderItemId">¥{{scope.row.actualTotal | price }}</span>
-                      <span v-if="dataForm.refundType === 2 && !scope.row.giveawayOrderItemId">¥{{bigActualTotal(scope.row.actualTotal, scope.row.prodCount) | price }}</span>
+                      <span v-if="dataForm.refundType === 1 && !scope.row.giveawayOrderItemId">¥{{ scope.row.actualTotal |
+                        price }}</span>
+                      <span v-if="dataForm.refundType === 2 && !scope.row.giveawayOrderItemId">¥{{
+                        bigActualTotal(scope.row.actualTotal,
+                          scope.row.prodCount) | price }}</span>
                       <span v-if="scope.row.giveawayOrderItemId">-</span>
-                      <el-tag v-if="scope.row.shareReduce > 0" type="danger" size="mini" effect="dark">{{ $t("marketing.discount") }}</el-tag>
+                      <el-tag v-if="scope.row.shareReduce > 0" type="danger" size="mini" effect="dark">{{
+                        $t("marketing.discount") }}</el-tag>
                     </template>
                   </el-table-column>
-                  <el-table-column v-if="dataForm.refundType === 2" prop="productTotalAmount" :label="this.$i18n.t('order.returnAmount')" width="180">
+                  <el-table-column v-if="dataForm.refundType === 2" prop="productTotalAmount"
+                    :label="this.$i18n.t('order.returnAmount')" width="180">
                     <template slot-scope="scope">
                       <!-- <span>{{dataForm.refundAmount}}</span> -->
-                      <span v-if="!scope.row.giveawayOrderItemId">{{dataForm.refundAmount + $t("transport.yuan") + " + " + dataForm.refundScore + $t("order.score") }}</span>
+                      <span v-if="!scope.row.giveawayOrderItemId">{{ dataForm.refundAmount + $t("transport.yuan") + " + "
+                        +
+                        dataForm.refundScore + $t("order.score") }}</span>
                       <span v-if="scope.row.giveawayOrderItemId" class="">-</span>
                     </template>
                   </el-table-column>
@@ -276,6 +312,42 @@
             </div>
           </div>
 
+          <div v-if="dataForm.returnMoneySts === 1" class="sellerRemark">
+            <div class="remark-title">{{ $t("order.applyForApproval") }}:</div>
+            <div class="remark-content">
+              <el-radio-group v-model="isAgreeRefund">
+                <!-- <el-radio :label="1">待审核</el-radio> -->
+                <el-radio :label="2">{{ dataForm.applyType === 1 ? $t("order.agreeToRefundA") : $t("order.agree")
+                }}</el-radio>
+                <el-radio :label="3">{{ $t("order.disagree") }}</el-radio>
+              </el-radio-group>
+            </div>
+          </div>
+
+          <div class="sellerRemark">
+            <div v-if="dataForm.returnMoneySts !== 1" style="display: flex;align-items: baseline;">
+              <div class="remark-title" v-if="dataForm.sellerMsg">商家备注:</div>
+              <div class="remark-content" v-if="dataForm.sellerMsg">{{ dataForm.sellerMsg }}</div>
+            </div>
+            <div class="input-bar" v-else>
+              <div class="remark-title">商家备注:</div>
+              <el-input type="textarea" style="width: 100%;outline-style: none;" v-model="dataForm.sellerMsg"
+                :disabled="dataForm.returnMoneySts !== 1" maxlength="250" show-word-limit>
+              </el-input>
+            </div>
+          </div>
+
+          <div class="btn-bar">
+            <!-- 仅退款的时候进行的处理操作 -->
+            <div v-if="isAuth('admin:orderRefund:update') && dataForm.returnMoneySts === 1"
+              class="default-btn primary-btn" @click="checkHandel()">{{ $t("order.confirmTreatment") }}</div>
+            <!-- 退货退款的时候进行的处理操作 -->
+            <div v-if="isAuth('admin:orderRefund:update') && dataForm.returnMoneySts === 3"
+              class="default-btn primary-btn" @click="returnMoneyHandle()">{{ $t("order.confirmTreatment") }}</div>
+          </div>
+
+
+
           <div class="order-log">
             <div class="log-title">
               <span>{{ $t("refundOrderDetail.refundLog") }}</span>
@@ -284,17 +356,17 @@
               <div v-if="dataForm.applyTime">
                 <span>{{ dataForm.applyTime }}{{ $t("refundOrderDetail.waitProcess") }}</span>
               </div>
-              <div v-if="dataForm.applyType === 2 && dataForm.handelTime  && !dataForm.rejectTime">
+              <div v-if="dataForm.applyType === 2 && dataForm.handelTime && !dataForm.rejectTime">
                 <span>{{ dataForm.handelTime }}{{ $t("refundOrderDetail.waitingBuyer") }}</span>
               </div>
 
-              <div v-if="dataForm.applyType === 1 && dataForm.handelTime  && !dataForm.rejectTime">
+              <div v-if="dataForm.applyType === 1 && dataForm.handelTime && !dataForm.rejectTime">
                 <span>{{ dataForm.handelTime }}{{ $t("refundOrderDetail.waitRefund") }}</span>
               </div>
               <div v-if="dataForm.shipTime">
                 <span>{{ dataForm.shipTime }}{{ $t("refundOrderDetail.waitsBuyerRec") }}</span>
               </div>
-              <div v-if="dataForm.receiveTime" >
+              <div v-if="dataForm.receiveTime">
                 <span>{{ dataForm.receiveTime }}{{ $t("refundOrderDetail.waitMerchantAgree") }}</span>
               </div>
               <div v-if="dataForm.decisionTime">
@@ -304,7 +376,7 @@
                 <span>{{ dataForm.refundTime }}{{ $t("order.refundsuccessfully") }}</span>
               </div>
 
-              <div v-if="dataForm.handelTime && dataForm.returnMoneySts === -1  && !dataForm.rejectTime">
+              <div v-if="dataForm.handelTime && dataForm.returnMoneySts === -1 && !dataForm.rejectTime">
                 <span>{{ dataForm.updateTime }}{{ $t("refundOrderDetail.refundClosed") }}</span>
               </div>
               <div v-if="dataForm.returnMoneySts === -1 && dataForm.cancelTime">
@@ -319,9 +391,8 @@
       </div>
     </el-form>
     <!-- 弹窗, 新增 / 修改 -->
-    <add-or-update v-if="addOrUpdateVisible"
-                   ref="addOrUpdate"
-                   @refreshDataList="refreshChange"></add-or-update>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+    </el-dialog>
   </div>
 </template>
 
@@ -331,7 +402,7 @@ import AddOrUpdate from './order-addr'
 import Big from 'big.js'
 import ProdPic from '@/components/prod-pic'
 export default {
-  data () {
+  data() {
     return {
       visible: false,
       addrList: [],
@@ -362,7 +433,7 @@ export default {
     ProdPic
   },
   filters: {
-    price (value) {
+    price(value) {
       if (!value) {
         return 0.00
       }
@@ -434,16 +505,19 @@ export default {
     }
 
   },
-  mounted () {
+  mounted() {
     const refundId = this.$route.query.refundId
     const shopId = this.$route.query.shopId
     this.init(refundId, shopId)
   },
   methods: {
-    init (id, shopId) {
+    closeDialog(){
+      this.visible = false;
+    },
+    init(id, shopId) {
+      console.log('进来了')
       this.dataForm.refundId = id || 0
       this.dataForm.shopId = shopId || 0
-      this.visible = true
       this.$nextTick(() => {
         this.$refs['dataForm'].resetFields()
       })
@@ -459,6 +533,7 @@ export default {
             'shopId': this.dataForm.shopId
           })
         }).then(({ data }) => {
+          this.visible = true
           this.dataForm = data
           this.deliveryDto = this.dataForm.deliveryDto
           if (this.dataForm.refundDelivery && this.dataForm.refundDelivery.imgs) {
@@ -476,7 +551,7 @@ export default {
       }
     },
 
-    getDataList () {
+    getDataList() {
       this.$http({
         url: this.$http.adornUrl(`/platform/orderRefund/info/${this.dataForm.refundId}`),
         method: 'get',
@@ -486,10 +561,10 @@ export default {
       })
     },
     // 表单提交
-    dataFormSubmit () {
+    dataFormSubmit() {
     },
     // 修改地址
-    changeAddr (val) {
+    changeAddr(val) {
       this.addOrUpdateVisible = true
       this.$nextTick(() => {
         this.$refs.addOrUpdate.init(val)
@@ -497,13 +572,13 @@ export default {
     },
 
     // 确认收货
-    confirmHandel () {
+    confirmHandel() {
     },
 
     /**
      * 加载收货地址模板
      */
-    getRefundAddrList () {
+    getRefundAddrList() {
       this.$http({
         url: this.$http.adornUrl('/platform/refundAddr/list'),
         method: 'get',
@@ -523,10 +598,10 @@ export default {
     /**
      * 提交处理
      */
-    checkHandel () {
+    checkHandel() {
       let tempRefundAddrId = this.isAgreeRefund === 2 ? this.dataForm.refundAddrId : undefined
       this.$http({
-        url: this.$http.adornUrl(`/order/refund/process`),
+        url: this.$http.adornUrl(`/platform/orderRefund/process`),
         method: 'put',
         data: this.$http.adornData({
           refundId: this.dataForm.refundId,
@@ -534,7 +609,8 @@ export default {
           refundSn: this.dataForm.refundSn,
           rejectMessage: this.dataForm.rejectMessage,
           sellerMsg: this.dataForm.sellerMsg,
-          refundAddrId: tempRefundAddrId
+          refundAddrId: tempRefundAddrId,
+          shopId: this.dataForm.shopId
         })
       }).then(({ data }) => {
         this.$message({
@@ -552,7 +628,7 @@ export default {
     /**
      * 确定退款
      */
-    returnMoneyHandle () {
+    returnMoneyHandle() {
       this.$http({
         url: this.$http.adornUrl(`/order/refund/returnMoney`),
         method: 'put',
@@ -579,11 +655,15 @@ export default {
     /**
      * 退款请求(发放退款)
      */
-    refundRequest (refundSn) {
+    refundRequest(refundSn) {
+      let data = {
+        shopId: this.dataForm.shopId,
+        refundSn:refundSn
+      }
       this.$http({
-        url: this.$http.adornUrl(`/order/refund/refundRequest`),
+        url: this.$http.adornUrl(`/platform/orderRefund/refundRequest`),
         method: 'put',
-        data: refundSn
+        data: data
       }).then(({ data }) => {
         this.$message({
           message: this.$i18n.t('remindPop.success'),
@@ -672,6 +752,7 @@ export default {
     display: flex;
     align-items: center;
   }
+
   .title-mid img {
     width: 18px;
     height: 18px;
@@ -704,6 +785,7 @@ export default {
     height: 18px;
     margin-right: 15px;
   }
+
   .order-info .logistics-box {
     height: 220px;
     overflow-y: scroll;
@@ -832,18 +914,22 @@ export default {
     width: 95%;
   }
 
-  .detail01  {
+  .detail01 {
     display: flex;
     align-items: center;
   }
+
   .text-width {
     margin-bottom: 10px;
   }
+
   .detail02 .text-width {
     width: 100%;
   }
+
   .text-width .text-width-item {
     line-height: 27px;
+
     .text {
       word-break: break-word;
     }
@@ -942,19 +1028,23 @@ export default {
   .order-log .log-cont {
     margin-top: 15px;
     color: #666666;
+
     div {
       margin-bottom: 10px;
     }
   }
+
   .refundId {
     // height: 15px;
     margin-bottom: 15px;
     margin-left: 20px;
   }
+
   .num-cont {
     width: 100%;
     display: flex;
     justify-content: flex-start;
+
     .state-title {
       width: 500px;
       height: 115px;
@@ -965,14 +1055,17 @@ export default {
       padding: 30px;
       border: 1px solid #E8E9EC;
       border-right: none;
+
       .item {
         display: flex;
+
         .text {
           color: #155BD4;
         }
       }
     }
   }
+
   .refund-progress {
     height: 115px;
     width: 100%;
@@ -980,32 +1073,39 @@ export default {
     display: flex;
     justify-content: center;
     align-items: center;
+
     .item {
       width: 100%;
     }
   }
+
   .btn-bar {
     margin-top: 15px;
     text-align: right;
   }
+
   .remark-title {
     display: inline-block;
     min-width: 70px;
     display: flex;
     align-items: center;
   }
-  .remark-content{
+
+  .remark-content {
     display: inline-block;
     word-break: break-word;
   }
+
   .input-bar {
     display: inline-block;
     width: 100%;
   }
+
   // 赠品
   .gift-prod .item {
     margin-top: 5px;
     line-height: 1em;
+
     .name {
       display: inline-block;
       margin-right: 15px;
@@ -1016,11 +1116,13 @@ export default {
     }
   }
 }
+
 div ::v-deep .el-step.is-center .el-step__head {
   display: flex;
   justify-content: center;
   align-items: center;
 }
+
 div ::v-deep .el-textarea__inner {
   border-radius: 0 !important;
   padding: 12px 10px;
@@ -1038,29 +1140,34 @@ div ::v-deep .el-textarea__inner {
   margin-left: 10px;
   line-height: 20px;
 }
+
 // 设置input光标起始位置,根据实际情况自行调整
 .text-in1 {
   ::v-deep .el-textarea__inner {
     text-indent: 67px;
   }
 }
+
 .text-in2 {
   ::v-deep .el-textarea__inner {
     text-indent: 130px;
   }
 }
+
 // 商品信息
 .item-list {
   .prod-info {
     display: flex;
     justify-content: flex-start;
     align-items: center;
+
     .prod-img {
       display: block;
       width: 60px;
       height: 60px;
       margin-right: 5px;
     }
+
     .gift-icon {
       display: inline-block;
       padding: 4px;
@@ -1072,10 +1179,12 @@ div ::v-deep .el-textarea__inner {
       line-height: 1em;
     }
   }
+
   // 赠品
   .gift-prod .item {
     margin-top: 5px;
     line-height: 1em;
+
     .name {
       display: inline-block;
       margin-right: 15px;
@@ -1087,6 +1196,7 @@ div ::v-deep .el-textarea__inner {
     }
   }
 }
+
 .prod-info-text {
   width: 300px;
   text-overflow: -o-ellipsis-lastline;

+ 269 - 0
src/views/modules/print/merge-print-scan-delivery.vue

@@ -0,0 +1,269 @@
+<template>
+  <el-dialog title="扫码集货"
+  :close-on-click-modal="false"
+  :visible.sync="mergeScanVisible"
+   v-if="mergeScanVisible"
+  @close="closeMergeScanDialog"
+             width="80%">
+  <div style="margin: 20px">
+    <h1 align="center">扫码集货打单</h1>
+    <el-row>
+      <el-col :span="3">
+        <el-select v-model="logistics" placeholder="请选择快递">
+          <el-option v-for="(item,index) in logisticsList"
+                     :key="index"
+                     :label="item.logisticsName"
+                     :value="item.logisticsValue">
+          </el-option>
+        </el-select>
+      </el-col>
+      <el-col :span="3">
+        <el-select v-model="deviceNo" placeholder="请选择打印设备" >
+          <el-option
+            v-for="(item,index) in deviceList"
+            :key="index"
+            :label="item.deviceNo"
+            :value="item.deviceNo">
+          </el-option>
+        </el-select>
+      </el-col>
+      <el-col :span="18">
+        <el-input id="scanInput" @change="scanMatchPrintOrder" type="text" v-model="scanOrderNo" placeholder="请扫码二维码"></el-input>
+      </el-col>
+    </el-row>
+    <div v-if="infoVisible">
+      <div style="margin-top: 30px">
+        <span style="font-weight: bold; font-size: 26px">集货单</span>
+        <el-row>
+          <el-col class="col" :span="6">订单编号</el-col>
+          <el-col class="col" :span="3">数量</el-col>
+          <el-col class="col" :span="6">扫码状态</el-col>
+          <el-col class="col" :span="6">商品名称</el-col>
+          <el-col class="col" :span="3">货架</el-col>
+        </el-row>
+        <el-row v-for="item in mergeRecordList">
+          <el-col class="col" :span="6" :class="item.orderNumber === scanOrderNo? 'heightLine':''">{{item.orderNumber}}</el-col>
+          <el-col class="col" :span="3">{{item.prodNums}}</el-col>
+          <el-col class="col" :span="6" v-if="item.scanStatus === 0">未扫码</el-col>
+          <el-col class="col" :span="6" v-if="item.scanStatus === 1" style="color: #2da641;font-weight: bold">已扫码</el-col>
+          <el-col class="col" :span="6">{{item.prodName}}</el-col>
+          <el-col class="col" :span="3">{{item.storeNo}}</el-col>
+        </el-row>
+      </div>
+      <div style="margin-top: 6px">
+        <span style="font-weight: bold; font-size: 26px;">配送信息</span>
+        <el-row>
+          <el-col class="col" :span="6">配送方式</el-col>
+          <el-col class="col" :span="18" style="color: red">{{printOrder.orderLogistics.logisticsName}}</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="6">收货地址</el-col>
+          <el-col class="col" :span="18">{{printOrder.orderLogistics.receiverAddr}}</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="6">收货人</el-col>
+          <el-col class="col" :span="18">{{printOrder.orderLogistics.receiverName}}</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="6">联系电话</el-col>
+          <el-col class="col" :span="18">{{printOrder.orderLogistics.receiverMobile}}</el-col>
+        </el-row>
+      </div>
+      <div style="margin-top: 6px">
+        <span style="font-weight: bold; font-size: 26px">打单记录</span>
+        <el-row>
+          <el-col class="col" :span="4">编号</el-col>
+          <el-col class="col" :span="6">运单号</el-col>
+          <el-col class="col" :span="4">打印次数</el-col>
+          <el-col class="col" :span="6">打单时间</el-col>
+          <el-col class="col" :span="4">操作</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="4">{{printOrder.orderLogistics.logisticsName}}</el-col>
+          <el-col class="col" :span="6">{{printOrder.orderLogistics.deliveryNo}}</el-col>
+          <el-col class="col" :span="4">{{printOrder.orderLogistics.printTimes}}</el-col>
+          <el-col class="col" :span="6">{{printOrder.orderLogistics.updateTime}}</el-col>
+          <el-col class="col" :span="4">
+            <el-button type="info" @click="handlePrintOrder">打印</el-button>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+  </div>
+  </el-dialog>
+
+</template>
+
+<script>
+// import AddOrUpdate from './orderLogistics-add-or-update'
+import {autoConnect, disAutoConnect, hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint'
+import template from './yunda-template-data'
+import printData from './yunda-print-data'
+autoConnect();
+hiprint.init();
+export default {
+  data () {
+    return {
+      logistics: "YUNDA",
+      logisticsList:[{logisticsName: "韵达速递", logisticsValue: "YUNDA"},{logisticsName: "申通快递", logisticsValue: "STO"}],
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      printOrder:{
+        orderLogistics:{}
+      },
+      deviceList: [],
+      deviceNo: null,
+      infoVisible:false,
+      lastInputStr: null,
+      scanOrderNo: null,
+      searchForm: {}, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false,
+      mergeRecordList:[],
+      mergeScanVisible: false,
+    }
+  },
+  components: {
+    // AddOrUpdate
+  },
+  created () {
+    this.getDeviceList();
+  },
+  mounted () {
+    this.buildDesigner();
+  },
+  methods: {
+    init(){
+      this.mergeScanVisible = true;
+    },
+    printWallbill(logistics){
+      this.hiprintTemplate.print2(printData.value(logistics));
+    },
+    buildDesigner(){
+      $("#hiprint-printTemplate").empty(); // 先清空, 避免重复构建
+      this.hiprintTemplate = new hiprint.PrintTemplate({
+        // 如果使用 vue ref 创建的模板json, 需要使用 .value 获取 (确保内部能够使用 object.key 拿到对应数据就行)
+        template: template, // 模板json(object)
+        settingContainer: "#PrintElementOptionSetting", // 元素参数容器
+      });
+      // 构建 并填充到 容器中
+      this.hiprintTemplate.design("#hiprint-printTemplate");
+    },
+    closeMergeScanDialog(){
+      this.mergeScanVisible = false;
+      this.mergeRecordList = [];
+      this.scanOrderNo = null;
+      this.lastInputStr = null;
+      this.$emit('refreshDataList')
+    },
+    getDeviceList(){
+      this.$http({
+        url: this.$http.adornUrl('/platform/print/printDevice/getDeviceList'),
+        method: 'GET',
+        params: this.$http.adornParams(),
+      }).then(({data}) => {
+        if(data){
+          this.deviceList = data;
+        }
+      }).catch((error) => {
+
+      })
+    },
+    scanMatchPrintOrder(value){
+      let substr;
+      if(this.lastInputStr != null){
+        substr = value.replace(new RegExp(this.lastInputStr), "");
+      }else{
+        substr = value;
+      }
+      if(!this.deviceNo){
+        this.$message.error("请选择打印设备");
+      }
+      if(substr){
+        this.scanOrderNo = substr;
+        let dataBody = {orderNumber: substr};
+        this.$http({
+          url: this.$http.adornUrl('/platform/mergeOrderRecord/scanMergeOrder'),
+          method: 'POST',
+          data: this.$http.adornData(dataBody),
+        }).then(({data}) => {
+          if(data){
+            this.$message.success("扫码集货成功");
+            this.getMergeOrderList(data.batchNo);
+        }
+          this.lastInputStr = substr;
+        }).catch((error) =>{
+          this.lastInputStr = substr;
+        })
+      }
+    },
+    getMergeOrderList(batchNo){
+      this.$http({
+        url: this.$http.adornUrl('/platform/mergeOrderRecord/getMergeOrderList'),
+        method: 'GET',
+        params: this.$http.adornParams({batchNo:batchNo}),
+      }).then(({data}) => {
+        if(data){
+          this.mergeRecordList = data;
+        }
+        this.infoVisible = true;
+      })
+    },
+    handlePrintOrder(){
+      if(!this.deviceNo){
+        this.$message.error("请选择打印设备");
+      }
+      this.$confirm('确定打印面单吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/platform/logistics/mergePrintAndDelivery'),
+          method: 'POST',
+          data: this.$http.adornData({orderNumber: this.scanOrderNo, logistics: this.logistics, deviceNo: this.deviceNo}),
+        }).then(({data}) => {
+          if(data){
+            this.$message.success("打印成功")
+            this.getLogisticsInfo(this.scanOrderNo);
+            if(this.logistics === 'YUNDA'){
+              //打印韵达面单
+              this.printWallbill(data.orderLogistics)
+            }
+          }
+        }).catch((error) => {
+          this.$message.error("打印失败")
+        })
+      })
+    },
+    getLogisticsInfo(orderNumber){
+      this.$http({
+        url: this.$http.adornUrl('/platform/logistics/getLogisticsInfo'),
+        method: 'GET',
+        params: this.$http.adornParams({orderNumber:orderNumber}),
+      }).then(({data}) => {
+        if(data){
+          this.printOrder = data;
+        }
+      })
+    },
+  }
+}
+</script>
+<style lang="scss">
+  .col{
+    height: 40px;
+    border: gainsboro 1px solid;
+    font-size: 20px;
+    line-height: 40px;
+    text-align: center;
+  }
+  .heightLine{
+    background-color: #2d8cf0;
+    color: white;
+  }
+</style>

+ 244 - 0
src/views/modules/print/print-scan-delivery.vue

@@ -0,0 +1,244 @@
+<template>
+  <div style="margin: 20px">
+    <h1 align="center">电子面单</h1>
+    <el-row>
+      <el-col :span="3">
+        <el-select v-model="logistics" placeholder="请选择快递">
+          <el-option v-for="(item,index) in logisticsList"
+                     :key="index"
+                     :label="item.logisticsName"
+                     :value="item.logisticsValue">
+          </el-option>
+        </el-select>
+      </el-col>
+      <el-col :span="3">
+        <el-select v-model="deviceNo" placeholder="请选择打印设备">
+          <el-option
+            v-for="(item,index) in deviceList"
+            :key="index"
+            :label="item.deviceNo"
+            :value="item.deviceNo">
+          </el-option>
+        </el-select>
+      </el-col>
+      <el-col :span="18">
+        <el-input id="scanInput" @change="scanMatchPrintOrder" type="text" v-model="scanOrderNo" placeholder="请扫码二维码"></el-input>
+      </el-col>
+    </el-row>
+    <div v-if="infoVisible">
+      <div style="margin-top: 30px">
+        <span style="font-weight: bold; font-size: 26px">集货单</span>
+        <el-row>
+          <el-col class="col" :span="6">订单编号</el-col>
+          <el-col class="col" :span="3">数量</el-col>
+          <el-col class="col" :span="6">集货状态</el-col>
+          <el-col class="col" :span="6">总共品类</el-col>
+          <el-col class="col" :span="3">货箱</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="6">{{printOrder.orderNo}}</el-col>
+          <el-col class="col" :span="3">{{printOrder.prodNums}}</el-col>
+          <el-col class="col" :span="6">已集齐</el-col>
+          <el-col class="col" :span="6">1</el-col>
+          <el-col class="col" :span="3"></el-col>
+        </el-row>
+      </div>
+      <div style="margin-top: 6px">
+        <span style="font-weight: bold; font-size: 26px;">配送信息</span>
+        <el-row>
+          <el-col class="col" :span="6">配送方式</el-col>
+          <el-col class="col" :span="18" style="color: red">{{printOrder.deliveryName}}</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="6">收货地址</el-col>
+          <el-col class="col" :span="18">{{printOrder.orderLogistics.receiverAddr}}</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="6">收货人</el-col>
+          <el-col class="col" :span="18">{{printOrder.orderLogistics.receiverName}}</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="6">联系电话</el-col>
+          <el-col class="col" :span="18">{{printOrder.orderLogistics.receiverMobile}}</el-col>
+        </el-row>
+      </div>
+      <div style="margin-top: 6px">
+        <span style="font-weight: bold; font-size: 26px">打单记录</span>
+        <el-row>
+          <el-col class="col" :span="4">编号</el-col>
+          <el-col class="col" :span="6">运单号</el-col>
+          <el-col class="col" :span="4">打印次数</el-col>
+          <el-col class="col" :span="6">打单时间</el-col>
+          <el-col class="col" :span="4">操作</el-col>
+        </el-row>
+        <el-row>
+          <el-col class="col" :span="4">{{printOrder.orderLogistics.logisticsName}}</el-col>
+          <el-col class="col" :span="6">{{printOrder.orderLogistics.deliveryNo}}</el-col>
+          <el-col class="col" :span="4">{{printOrder.orderLogistics.printTimes}}</el-col>
+          <el-col class="col" :span="6">{{printOrder.orderLogistics.updateTime}}</el-col>
+          <el-col class="col" :span="4">
+            <el-button type="info" @click="handlePrintOrder">打印</el-button>
+          </el-col>
+        </el-row>
+      </div>
+    </div>
+
+    <div class="flex-5 center">
+      <!-- 设计器的 容器 -->
+      <div id="hiprint-printTemplate" hidden></div>
+    </div>
+  </div>
+</template>
+
+<script>
+// import AddOrUpdate from './orderLogistics-add-or-update'
+import {autoConnect, disAutoConnect, hiprint, defaultElementTypeProvider} from 'vue-plugin-hiprint'
+import template from './yunda-template-data'
+import printData from './yunda-print-data'
+autoConnect();
+hiprint.init();
+export default {
+  data () {
+    return {
+      hiprintTemplate : null,
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      printOrder:{
+        orderLogistics:{}
+      },
+      logisticsList:[{logisticsName: "韵达速递", logisticsValue: "YUNDA"},{logisticsName: "申通快递", logisticsValue: "STO"}],
+      // logisticsList:[{logisticsName: "申通快递", logisticsValue: "STO"}],
+      logistics: "YUNDA",
+      deviceList: [],
+      deviceNo: null,
+      infoVisible:false,
+      lastInputStr: null,
+      scanOrderNo: null,
+      searchForm: {}, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false
+    }
+  },
+  components: {
+    // AddOrUpdate
+  },
+  created () {
+    this.getDeviceList();
+  },
+  mounted () {
+    this.buildDesigner();
+  },
+  methods: {
+    buildDesigner(){
+      $("#hiprint-printTemplate").empty(); // 先清空, 避免重复构建
+      this.hiprintTemplate = new hiprint.PrintTemplate({
+        // 如果使用 vue ref 创建的模板json, 需要使用 .value 获取 (确保内部能够使用 object.key 拿到对应数据就行)
+        template: template, // 模板json(object)
+        settingContainer: "#PrintElementOptionSetting", // 元素参数容器
+      });
+      // 构建 并填充到 容器中
+      this.hiprintTemplate.design("#hiprint-printTemplate");
+    },
+    getDeviceList(){
+      this.$http({
+        url: this.$http.adornUrl('/platform/print/printDevice/getDeviceList'),
+        method: 'GET',
+        params: this.$http.adornParams(),
+      }).then(({data}) => {
+        if(data){
+          this.deviceList = data;
+        }
+      }).catch((error) => {
+
+      })
+    },
+    scanMatchPrintOrder(value){
+      let substr;
+      if(this.lastInputStr != null){
+        substr = value.replace(new RegExp(this.lastInputStr), "");
+      }else{
+        substr = value;
+      }
+      if(!this.deviceNo){
+        this.$message.error("请选择打印设备");
+      }
+      if(substr){
+        this.scanOrderNo = substr;
+        let dataBody = {orderNumber: substr, deviceNo: this.deviceNo, logistics: this.logistics};
+        this.$http({
+          url: this.$http.adornUrl('/platform/logistics/scanDelivery'),
+          method: 'POST',
+          data: this.$http.adornData(dataBody),
+        }).then(({data}) => {
+          if(data){
+            this.getLogisticsInfo(this.scanOrderNo);
+            if(this.logistics === 'YUNDA'){
+              if(!data.hadPrint){
+                //打印韵达面单
+                this.printWallbill(data.orderLogistics)
+              }
+            }
+        }else{
+            this.$message.error(data.errorMsg)
+          }
+          this.lastInputStr = substr;
+        }).catch((error) => {
+          this.lastInputStr = substr;
+          this.$message.error(error)
+        })
+      }
+    },
+    getLogisticsInfo(orderNumber){
+      this.$http({
+        url: this.$http.adornUrl('/platform/logistics/getLogisticsInfo'),
+        method: 'GET',
+        params: this.$http.adornParams({orderNumber:orderNumber}),
+      }).then(({data}) => {
+        if(data){
+          this.printOrder = data;
+          this.printOrder.orderLogistics = data.orderLogistics;
+        }
+        this.infoVisible = true;
+      }).catch((error) => {
+
+      })
+    },
+    printWallbill(logistics){
+      this.hiprintTemplate.print2(printData.value(logistics));
+    },
+    handlePrintOrder(){
+      if(!this.deviceNo){
+        this.$message.error("请选择打印设备");
+      }
+      this.$http({
+        url: this.$http.adornUrl('/platform/logistics/printOrder'),
+        method: 'POST',
+        data: this.$http.adornData({orderNumber: this.scanOrderNo, logistics: this.printOrder.orderLogistics.logistics, deviceNo: this.deviceNo}),
+      }).then(({data}) => {
+        if(data){
+          this.getLogisticsInfo(this.scanOrderNo);
+          if(this.logistics === 'YUNDA'){
+            //打印韵达面单
+            this.printWallbill(this.printOrder.orderLogistics)
+          }
+        }
+      }).catch((error) => {
+        this.$message.error("打印失败")
+      })
+    }
+  }
+}
+</script>
+<style lang="scss">
+  .col{
+    height: 40px;
+    border: gainsboro 1px solid;
+    font-size: 20px;
+    line-height: 40px;
+    text-align: center;
+  }
+</style>

+ 333 - 0
src/views/modules/print/printList.vue

@@ -0,0 +1,333 @@
+<template>
+  <div class="mod-user">
+    <div class="search-bar">
+      <el-form :inline="true" class="search-form" ref="searchForm" :model="searchForm" size="small">
+        <div class="input-row">
+          <el-form-item prop="orderNumber" label="订单编号:">
+            <el-input v-model="searchForm.orderNumber" type="text" clearable placeholder="订单编号"></el-input>
+          </el-form-item>
+          <el-form-item prop="pdfName" label="文件名:">
+            <el-input v-model="searchForm.pdfName" type="text" clearable placeholder="文件名"></el-input>
+          </el-form-item>
+          <el-form-item prop="status" label="发货状态:">
+            <el-select v-model="searchForm.status" clearable placeholder="发货状态">
+              <el-option key="2" label="未发货" :value="2"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="status" label="是否排除推广:">
+            <el-select v-model="searchForm.excludePromotion" clearable placeholder="是否排除推广">
+              <el-option key="1" label="排除推广" :value="1"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="生成时间:">
+            <el-date-picker size="small" v-model="createDateRange" type="datetimerange"
+                            :default-time="['00:00:00', '23:59:59']"
+                            range-separator="至" value-format="yyyy-MM-dd HH:mm:ss"
+                            :start-placeholder="$t('text.startTime')" end-placeholder="结束日期"
+                            @change="createTimeChange"></el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange(true)">{{ $t('crud.searchBtn') }}</div>
+            <div class="default-btn" @click="resetForm('searchForm')">重置</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <div class="main-container">
+      <div class="operation-bar">
+        <el-button size="small" @click="downLoadZIP()" :loading="downloadLoading">批量下载</el-button>
+        <!--<div class=" default-btn" @click="downLoadZIP()"
+             :disabled="importDisabled">批量下载ZIP</div>-->
+      </div>
+      <div class="table-con">
+        <el-table :data="dataList" header-cell-class-name="table-header" row-class-name="table-row-low"
+                  style="width: 100%">
+          <el-table-column prop="orderNumber" width="300" label="订单号" />
+          <el-table-column fixed label="文件名" prop="pdfName" align="left" />
+          <el-table-column fixed prop="pdfUrl" label="文件地址">
+            <template slot-scope="scope">
+              <div class="">
+                <a target="blank" :href="resourcesUrl + scope.row.pdfUrl">
+                  {{ scope.row.pdfUrl }}</a>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column width="230" prop="createTime" label="生成时间" />
+          <el-table-column width="230" prop="orderTime" label="下单时间" />
+          <el-table-column fixed="right" align="center" :label="$t('crud.menu')" width="230">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="downLoadPDF(scope.row)">下载PDF文件</div>
+                <div class="default-btn text-btn" style="color: red" @click="deletePdf(scope.row)">删除</div>
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                     :current-page="page.currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="page.pageSize"
+                     :total="page.total" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+  import JSzip from 'jszip'
+import { saveAs } from 'file-saver'
+import axios from 'axios'
+
+export default {
+    data () {
+      return {
+        theData: null, // 保存上次点击查询的请求条件
+        downloadLoading: false,
+        dataList: [],
+        dataListLoading: false,
+        exportDisabled: false,
+        importDisabled: false,
+        tagsSelectVisible: false,
+        updateBalanceVisible: false,
+        updateCouponVisible: false,
+        dataListSelections: [],
+        addOrUpdateVisible: false,
+        updateGrowthVisible: false,
+        updateScoreVisible: false,
+        updateTagsVisible: false,
+        importUserVisible: false,
+        createDateRange: [], // 时间范围
+        resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+        dynamicTags: [],
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 10 // 每页显示多少条
+        },
+        searchForm: {
+          orderNumber: undefined,
+          startTime: undefined, // 起始时间
+          endTime: undefined, // 结束时间,
+          pdfName: null,
+          status: null,
+          excludePromotion: null
+        },
+        levelTypes: [
+          {
+            label: this.$i18n.t('user.ordinaryMember'),
+            value: 0
+          }, {
+            label: this.$i18n.t('user.paidMembership'),
+            value: 1
+          }
+        ],
+        status: [
+          {
+            label: this.$i18n.t('publics.disable'),
+            value: 0
+          }, {
+            label: this.$i18n.t('publics.normal'),
+            value: 1
+          }
+        ]
+      }
+    },
+    components: {
+    },
+    mounted () {
+      this.getDataList(this.page)
+    },
+    methods: {
+      deletePdf (pdf) {
+        this.$confirm('确定要删除PDF文件吗' + '?', '提示', {
+          confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+          cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+          type: 'warning'
+        }).then(() => {
+          this.$http({
+            url: this.$http.adornUrl('/printOrderPdf/printOrderPdf/' + pdf.orderPdfId),
+            method: 'delete',
+            data: this.$http.adornData({})
+          }).then(({ data }) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 200
+            })
+            this.getDataList(this.page)
+          })
+        }).catch(() => { })
+      },
+      downLoadPDF (pdf) {
+        let randomStr = Math.floor(Math.random() * 100000).toString()
+        this.getPdfFile(this.resourcesUrl + pdf.pdfUrl + '?a=' + randomStr).then(data => {
+          saveAs(data, pdf.pdfName)
+        })
+      },
+      getPdfFile (url) {
+        return new Promise((resolve, reject) => {
+          axios({
+            method: 'get', // 使用get请求
+            url, // 放入的文件地址
+            responseType: 'blob' // 请求的数据buffer对象
+          })
+            .then((data) => {
+              resolve(data.data)
+            })
+            .catch((error) => {
+              reject(error.toString())
+            })
+        })
+        // return new Promise((resolve, reject) => {
+        //   let xmlhttp = new XMLHttpRequest();
+        //   xmlhttp.open("GET", url, true);
+        //   xmlhttp.responseType = "arraybuffer";
+        //   xmlhttp.onload = function () {
+        //     if (this.status == 200) {
+        //       resolve(this.response);
+        //     } else {
+        //       reject(this.status);
+        //     }
+        //   }
+        //   xmlhttp.send();
+        // });
+      },
+      getAllNeed () {
+        if (!this.theData) {
+          this.theData = JSON.parse(JSON.stringify(this.searchForm))
+        }
+        this.$http({
+          url: this.$http.adornUrl('/printOrderPdf/printOrderPdf/page'),
+          method: 'get',
+          params: this.$http.adornParams(
+            Object.assign(
+              {
+                current: 1,
+                size: 9999
+              },
+              this.theData
+            )
+          )
+        }).then(({ data }) => {
+          console.log(data.records)
+          let pdfList = data.records
+          // const arr = [{fileDownUrl:'地址', fileDownName:'文件名'}] // 需要下载打包的路径, 可以是本地相对路径, 也可以是跨域的全路径
+          const zip = new JSzip()
+          const cache = {}
+          const promises = []
+          pdfList.forEach((pdf, j) => {
+            let randomStr = Math.floor(Math.random() * 100000).toString()
+            const promise = this.getPdfFile(this.resourcesUrl + pdf.pdfUrl + '?a=' + randomStr).then(data => {
+              // 下载文件, 并存成blob对象
+              // const fileName = pdf.pdfFolderName + "/" + pdf.pdfName; // 获取文件名,一定要包含文件的后缀名(因为重复的文件名只会下载一个,故需要加入下标 不同名)
+              zip.file(pdf.pdfName, data, {
+                binary: true
+              })
+              cache[pdf.pdfName] = data
+            })
+            promises.push(promise)
+          })
+          Promise.all(promises).then(() => {
+            zip.generateAsync({ type: 'blob' }).then(content => {
+              // 生成二进制流   然后保存文件(如果这个下载不了 也可以将下方这一行换成a标签下载逻辑)
+              saveAs(content, '批量下载PDF压缩包.zip') // 利用file-saver保存文件  自定义文件名
+              this.downloadLoading = false
+            })
+            // eslint-disable-next-line handle-callback-err
+          }).catch((error) => {
+            this.downloadLoading = false
+          })
+        })
+      },
+      downLoadZIP () {
+        if (!!this.searchForm.startTime && !!this.searchForm.endTime) {
+          this.downloadLoading = true
+          if ((Date.parse(new Date(this.searchForm.endTime).toString()) - Date.parse(new Date(this.searchForm.startTime).toString())) / 1000 / 60 / 60 <= 24) {
+            this.getAllNeed()
+          } else {
+            this.$message({
+              message: '批量下载ZIP范围最大为24小时',
+              type: 'warning'
+            })
+          }
+        } else {
+          this.$message({
+            message: '请先选择创建时间,范围最大为24小时',
+            type: 'warning'
+          })
+        }
+      },
+
+      // 获取数据列表  /admin/user/page
+      getDataList (page, newData = false) {
+        if (newData || !this.theData) {
+          this.theData = JSON.parse(JSON.stringify(this.searchForm))
+        }
+        this.dataListLoading = true
+
+        this.$http({
+          url: this.$http.adornUrl('/printOrderPdf/printOrderPdf/page'),
+          method: 'get',
+          params: this.$http.adornParams(
+            Object.assign(
+              {
+                current: page == null ? this.page.currentPage : page.currentPage,
+                size: page == null ? this.page.pageSize : page.pageSize
+              },
+              this.theData
+            )
+          )
+        }).then(({ data }) => {
+          this.dataList = data.records
+          this.page.total = data.total
+          this.dataListLoading = false
+        })
+      },
+      // 条件查询 JSON.stringify(arr)
+      searchChange (newData = false) {
+        this.page.currentPage = 1
+        this.getDataList(this.page, newData)
+      },
+      handleSizeChange (val) {
+        this.page.pageSize = val
+        this.getDataList(this.page)
+      },
+      handleCurrentChange (val) {
+        this.page.currentPage = val
+        this.getDataList(this.page)
+      },
+      resetForm (formName) {
+        this.$refs[formName].resetFields()
+        this.searchForm.startTime = undefined
+        this.searchForm.endTime = undefined
+        this.searchForm.orderNumber = undefined
+        this.createDateRange = []
+        this.theData = null
+        this.getDataList(this.page)
+      },
+      createTimeChange () {
+        if (!this.createDateRange || this.createDateRange.length === 0) {
+          this.searchForm.startTime = undefined
+          this.searchForm.endTime = undefined
+        } else {
+          this.searchForm.startTime = this.createDateRange[0]
+          this.searchForm.endTime = this.createDateRange[1]
+        }
+        this.searchChange(true)
+      },
+      // 多选变化
+      selectionChange (val) {
+        this.dataListSelections = val
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mod-user {
+    .tips .text {
+      color: #FF0000;
+    }
+  }
+
+  .TagS {
+    margin-right: 10px !important;
+  }
+</style>

+ 18 - 0
src/views/modules/print/yunda-print-data.js

@@ -0,0 +1,18 @@
+export default {
+  value(logistics){
+    return {
+      "createTime": logistics.createTime,
+      "threeSegmentCode": logistics.threeSegmentCode,
+      "barcode": logistics.deliveryNo,
+      "packagePlace": logistics.packagePlace,
+      "receiverName": logistics.receiverName,
+      "receiverMobile": logistics.receiverMobile,
+      "receiverAddr": logistics.receiverAddr,
+      "senderName": logistics.senderName,
+      "senderMobile": logistics.senderMobile,
+      "senderAddr": logistics.senderAddr,
+      "prodName": logistics.prodName,
+      "prodNums": logistics.prodNums
+    }
+  }
+};

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


+ 1 - 1
src/views/modules/prod/category-add-or-update.vue

@@ -50,7 +50,7 @@
           controls-position="right"
           :min="0"
           :label="this.$i18n.t('publics.categoryCn')"
-          maxlength="7"
+          maxlength="15"
           show-word-limit
         ></el-input>
       </el-form-item>

+ 96 - 81
src/views/modules/prod/prodComm-add-or-update.vue

@@ -1,98 +1,93 @@
 <template>
-  <el-dialog :title="!dataForm.prodCommId ? '新增' : '修改'"
-             :close-on-click-modal="false"
-             :visible.sync="visible">
-    <el-form :model="dataForm"
-             :rules="dataRule"
-             ref="dataForm"
-             @keyup.enter.native="dataFormSubmit()"
-             label-width="80px">
-
+  <el-dialog
+    :title="!isEdit ? this.$i18n.t('live.view') : this.$i18n.t('groups.edit')"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    width="700px">
+    <el-form
+      :model="dataForm"
+      :rules="dataRule"
+      size="small"
+      ref="dataForm"
+      @keyup.enter.native="dataFormSubmit()"
+      label-width="80px"
+    >
       <div v-if="!isEdit">
-        <el-form-item label="评论内容"
-                      prop="userName">
-          <el-input type="textarea"
-                    :readonly='true'
-                    v-model="dataForm.content"></el-input>
-        </el-form-item>
-
-        <el-form-item label="评论图片"
-                      prop="userName">
-          <div v-if="dataForm.pics==null || dataForm.pics.length>0">
-            无
-          </div>
-          <img max-width="100%"
-               v-else
-               v-for="item in dataForm.pics"
-               :key="item"
-               :src="dialogImageUrl + item">
-        </el-form-item>
-
-        <el-form-item label="记录时间"
-                      prop="userName">
-          <el-input v-model="dataForm.recTime"
-                    :readonly='true'></el-input>
-        </el-form-item>
-        <el-form-item label="回复时间"
-                      prop="userName"
-                      :readonly='true'>
-          <el-input v-model="dataForm.replyTime"
-                    :readonly='true'></el-input>
+        <el-row>
+          <el-col :span="12">
+            <!-- 记录时间 -->
+            <el-form-item :label="this.$i18n.t('productComm.recTime')" prop="userName">
+              <el-input v-model="dataForm.recTime" :readonly="true" :disabled="!isEdit"></el-input>
+            </el-form-item>
+            <!-- IP来源 -->
+            <el-form-item :label="this.$i18n.t('productComm.postip')" prop="userName">
+              <el-input v-model="dataForm.postip" :readonly="true" :disabled="!isEdit"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <!-- 回复时间 -->
+            <el-form-item :label="this.$i18n.t('productComm.replyTime')" prop="userName" :readonly="true">
+              <el-input v-model="dataForm.replyTime" :readonly="true" :disabled="!isEdit"></el-input>
+            </el-form-item>
+            <!-- 评价得分 -->
+            <el-form-item :label="this.$i18n.t('productComm.score')" prop="score">
+              <el-input v-model="dataForm.score" :readonly="true" :disabled="!isEdit"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <!-- 评论内容 -->
+        <el-form-item :label="this.$i18n.t('productComm.content')" prop="userName">
+          <el-input type="textarea" :rows="4" :readonly="true" v-model="dataForm.content" :disabled="!isEdit" maxlength="500" show-word-limit></el-input>
         </el-form-item>
-        <el-form-item label="IP来源"
-                      prop="userName">
-          <el-input v-model="dataForm.postip"
-                    :readonly='true'></el-input>
+        <!-- 掌柜回复 -->
+        <el-form-item :label="this.$i18n.t('productComm.replyContent')" type="textarea" prop="userName">
+          <el-input type="textarea" :rows="4" v-model="dataForm.replyContent" :readonly="!isEdit" :disabled="!isEdit" maxlength="480" show-word-limit></el-input>
         </el-form-item>
-        <el-form-item label="得分"
-                      prop="score">
-          <el-input v-model="dataForm.score"
-                    :readonly='true'></el-input>
+        <!-- 评论图片 -->
+        <el-form-item :label="this.$i18n.t('productComm.pics')" prop="userName">
+          <div v-if="!pics">{{$t("productComm.no")}}</div>
+          <imgs-upload v-model="pics" :disabled="true" :modal="false" :prompt="false" />
         </el-form-item>
-
-        <el-form-item label="是否匿名"
-                      size="mini"
-                      prop="isAnonymous">
-          <el-radio-group v-model="dataForm.isAnonymous"
-                          :disabled='true'>
-            <el-radio :label="1">是</el-radio>
-            <el-radio :label="0">不是</el-radio>
+        <!-- 是否匿名 -->
+        <el-form-item :label="this.$i18n.t('productComm.isAnonymous')" size="mini" prop="isAnonymous">
+          <el-radio-group v-model="dataForm.isAnonymous" :disabled="true">
+            <el-radio :label="1">{{$t("publics.yes")}}</el-radio>
+            <el-radio :label="0">{{$t("publics.no")}}</el-radio>
           </el-radio-group>
         </el-form-item>
       </div>
-
-      <el-form-item label="掌柜回复"
-                    type="textarea"
-                    prop="userName">
-        <el-input v-model="dataForm.replyContent"
-                  :readonly='!isEdit'></el-input>
-      </el-form-item>
-
-      <el-form-item label="审核"
-                    size="mini"
-                    prop="status"
-                    v-if="isEdit">
-        <el-radio-group v-model="dataForm.status"
-                        :readonly='true'>
-          <el-radio :label="1">审核通过</el-radio>
-          <el-radio :label="-1">不通过</el-radio>
-          <el-radio :label="0">等待审核</el-radio>
-        </el-radio-group>
-      </el-form-item>
+      <div v-if="isEdit">
+        <el-form-item :label="this.$i18n.t('productComm.replyContent')" type="textarea" prop="replyContent" class="textarea-right">
+          <el-input type="textarea" :rows="5" v-model="dataForm.replyContent" :readonly="!isEdit" :disabled="!isEdit" maxlength="480" show-word-limit></el-input>
+        </el-form-item>
+        <!-- 审核 -->
+        <!--        <el-form-item :label="this.$i18n.t('productComm.status')" size="mini" prop="status">-->
+        <!--          <el-radio-group v-model="dataForm.status" :readonly="true">-->
+        <!--            <el-radio :label="1">{{$t("productComm.pass")}}</el-radio>-->
+        <!--            <el-radio :label="-1">{{$t("productComm.noPass")}}</el-radio>-->
+        <!--          </el-radio-group>-->
+        <!--        </el-form-item>-->
+      </div>
     </el-form>
-    <span slot="footer"
-          class="dialog-footer">
-      <el-button @click="visible = false">取消</el-button>
-      <el-button type="primary"
-                 v-if="isEdit"
-                 @click="dataFormSubmit()">确定</el-button>
+    <span slot="footer" class="dialog-footer">
+      <div class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</div>
+      <div class="default-btn primary-btn" v-if="isEdit" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</div>
     </span>
   </el-dialog>
 </template>
 
 <script>
+import { validNoEmptySpace } from '@/utils/validate'
+import ImgsUpload from '@/components/imgs-upload'
 export default {
   data () {
+    const validateReplyContent = (rule, value, callback) => {
+      if (validNoEmptySpace(value)) {
+        callback(new Error(this.$i18n.t('shopProcess.inputAllSpace')))
+      } else {
+        callback()
+      }
+    }
     return {
       isEdit: false,
       visible: false,
@@ -111,18 +106,24 @@ export default {
         usefulCounts: null,
         photoJson: null,
         isAnonymous: null,
-        status: null
+        status: 1
       },
+      pics: '',
       dataRule: {
+        replyContent: [{validator: validateReplyContent}]
       },
       resourcesUrl: process.env.VUE_APP_RESOURCES_URL
     }
   },
+  components: {
+    ImgsUpload
+  },
   methods: {
     init (prodCommId, isEdit) {
       this.isEdit = isEdit
       this.dataForm.prodCommId = prodCommId || 0
       this.visible = true
+      this.pics = ''
       this.$nextTick(() => {
         this.$refs['dataForm'].resetFields()
         if (this.dataForm.prodCommId) {
@@ -132,6 +133,12 @@ export default {
             params: this.$http.adornParams()
           }).then(({ data }) => {
             this.dataForm = data
+            var imgs = ''
+            this.dataForm.picsArray.forEach(element => {
+              imgs = imgs + element + ','
+            })
+            this.pics = imgs.substr(0, imgs.length - 1)
+            this.$forceUpdate()
           })
         }
       })
@@ -146,7 +153,7 @@ export default {
             data: this.$http.adornData(this.dataForm)
           }).then(({ data }) => {
             this.$message({
-              message: this.$i18n.t('remindPop.success'),
+              message: this.$i18n.t('publics.operation'),
               type: 'success',
               duration: 1500,
               onClose: () => {
@@ -161,3 +168,11 @@ export default {
   }
 }
 </script>
+<style scoped>
+.textarea-right >>> .el-textarea__inner{
+  padding-right: 50px;
+}
+.textarea-right >>> .el-textarea .el-input__count {
+  right: 21px;
+}
+</style>

+ 150 - 56
src/views/modules/prod/prodComm.vue

@@ -3,44 +3,57 @@
     <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 prop="prodName" :label="$t('product.prodName')" class="search-form-item">
+          <el-form-item prop="prodName" :label="$t('product.prodName') + ':'">
             <el-input type="text" v-model="searchForm.prodName" :placeholder="$t('product.prodName')"></el-input>
           </el-form-item>
-          <el-form-item prop="nickName" :label="$t('users.nickName')" class="search-form-item">
-            <el-input type="text" v-model="searchForm.nickName" :placeholder="$t('users.nickName')"></el-input>
+          <el-form-item prop="nickName" :label="$t('users.name') + ':'">
+            <el-input type="text" v-model="searchForm.nickName" :placeholder="$t('users.name')"></el-input>
           </el-form-item>
-          <el-form-item prop="status" :label="$t('product.reviewStatus')" class="search-form-item">
-            <el-select v-model="searchForm.status" :placeholder="$t('product.reviewStatus')">
-              <el-option :label="$t('productComm.pass')" :value="1"></el-option>
-              <el-option :label="$t('productComm.noPass')" :value="-1"></el-option>
+          <el-form-item prop="isDeleted" label="是否删除">
+            <el-select key="isDeleted" v-model="searchForm.isDeleted" :clearable="true">
+              <el-option label="正常" value="0"></el-option>
+              <el-option label="已删除" value="1"></el-option>
             </el-select>
           </el-form-item>
-        </div>
-        <div class="input-row">
-          <el-form-item :label="this.$i18n.t('productComm.recTime')">
+          <!--          <el-form-item prop="status" :label="$t('product.reviewStatus') + ':'">-->
+          <!--            <el-select v-model="searchForm.status" :placeholder="$t('product.reviewStatus')">-->
+          <!--              <el-option :label="$t('productComm.pass')" :value="1"></el-option>-->
+          <!--              <el-option :label="$t('productComm.noPass')" :value="-1"></el-option>-->
+          <!--            </el-select>-->
+          <!--          </el-form-item>-->
+          <el-form-item prop="status" label="审核状态">
+            <el-select key="status" v-model="searchForm.status" :clearable="true">
+              <el-option label="待审核" value="0"></el-option>
+              <el-option label="通过" value="1"></el-option>
+              <el-option label="不通过" value="-1"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item :label="$t('productComm.recTime') + ':'">
             <el-date-picker
               v-model="recDateRange"
               type="datetimerange"
-              :range-separator="this.$i18n.t('date.tip')"
+              :range-separator="$t('time.tip')"
               value-format="yyyy-MM-dd HH:mm:ss"
-              :start-placeholder="this.$i18n.t('date.start')"
-              :end-placeholder="this.$i18n.t('date.end')"
+              :start-placeholder="$t('time.start')"
+              :end-placeholder="$t('time.end')"
             ></el-date-picker>
           </el-form-item>
-          <el-form-item :label="this.$i18n.t('productComm.replyTime')">
+          <el-form-item :label="$t('productComm.replyTime') + ':'">
             <el-date-picker
               v-model="replyDateRange"
               type="datetimerange"
-              :range-separator="this.$i18n.t('date.tip')"
+              :range-separator="$t('time.tip')"
               value-format="yyyy-MM-dd HH:mm:ss"
-              :start-placeholder="this.$i18n.t('date.start')"
-              :end-placeholder="this.$i18n.t('date.end')"
+              :start-placeholder="$t('time.start')"
+              :end-placeholder="$t('time.end')"
             ></el-date-picker>
           </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange(true)">{{$t('crud.searchBtn')}}</div>
+            <div class="default-btn" @click="resetSearchForm('searchForm')">{{$t('shop.resetMap')}}</div>
+          </el-form-item>
         </div>
       </el-form>
-      <div class="default-btn primary-btn" @click="searchChange">{{$t('crud.searchBtn')}}</div>
-      <div class="default-btn" @click="resetSearchForm('searchForm')">{{$t('shop.resetMap')}}</div>
     </div>
     <div class="main-container">
       <div class="table-con prod-conmm-table">
@@ -51,67 +64,90 @@
           row-class-name="table-row"
           style="width: 100%">
           <el-table-column
-            type="index"
-            align="center"
-            :label="$t('number')">
+            align="left"
+            prop="prodName"
+            width="240"
+            :label="$t('product.prodName')">
+            <template slot-scope="scope">
+              <div class="table-cell-con">
+                <div v-if="scope.row.pic" class="table-cell-image">
+                  <img :src="scope.row.pic" alt="">
+                </div>
+                <span class="table-cell-text">{{ scope.row.prodName }}</span>
+              </div>
+            </template>
           </el-table-column>
           <el-table-column
             align="center"
-            prop="prodName"
-            :label="$t('product.prodName')"
-            width="320">
+            prop="status"
+            label="审核状态">
             <template slot-scope="scope">
-              <span class="table-cell-text">{{ scope.row.prodName }}</span>
+              <el-tag v-if="scope.row.status === 0" type="warning">待审核</el-tag>
+              <el-tag v-if="scope.row.status === 1" type="success">通过</el-tag>
+              <el-tag v-if="scope.row.status === -1" type="danger">不通过</el-tag>
             </template>
           </el-table-column>
           <el-table-column
             align="center"
+            prop="isDeleted"
+            label="是否删除">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.isDeleted === 1" type="danger">已删除</el-tag>
+              <el-tag v-if="scope.row.isDeleted === 0" type="success">正常</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="left"
             prop="nickName"
-            :label="$t('users.nickName')"
-            width="170">
+            :label="$t('users.name')">
             <template slot-scope="scope">
-              <span class="table-cell-text">{{ scope.row.nickName }}</span>
+              <span class="table-cell-text line-clamp-one">{{ scope.row.nickName }}</span>
             </template>
           </el-table-column>
           <el-table-column
             align="center"
             prop="score"
-            :label="$t('productComm.score')"
-            width="170">
+            :label="$t('productComm.score')">
           </el-table-column>
           <el-table-column
             align="center"
             prop="isAnonymous"
-            :label="$t('productComm.isAnonymous')"
-            width="170">
+            :label="$t('productComm.isAnonymous')">
             <template slot-scope="scope">
               <div class="tag-text">{{[$t('publics.no'), $t('publics.yes')][scope.row.isAnonymous]}}</div>
             </template>
           </el-table-column>
+          <!--          <el-table-column-->
+          <!--            align="left"-->
+          <!--            prop="status"-->
+          <!--            :label="$t('product.reviewStatus')"-->
+          <!--            width="130">-->
+          <!--            <template slot-scope="scope">-->
+          <!--              <div class="tag-text" v-if="scope.row.status === -1">{{ $t("productComm.noPass") }}</div>-->
+          <!--              <div class="tag-text" v-if="scope.row.status === 0">{{ $t("productComm.waitPass") }}</div>-->
+          <!--              <div class="tag-text" v-if="scope.row.status === 1">{{ $t("productComm.pass") }}</div>-->
+          <!--            </template>-->
+          <!--          </el-table-column>-->
           <el-table-column
             align="center"
-            prop="status"
-            :label="$t('product.reviewStatus')"
-            width="170">
+            prop="recTime"
+            :label="$t('productComm.recTime')">
             <template slot-scope="scope">
-              <div class="tag-text" v-if="scope.row.status === -1">{{ $t("productComm.noPass") }}</div>
-              <div class="tag-text" v-if="scope.row.status === 1">{{ $t("productComm.pass") }}</div>
+              <div>{{scope.row.recTime}}</div>
             </template>
           </el-table-column>
           <el-table-column
             align="center"
-            prop="recTime"
-            :label="$t('productComm.recTime')"
-            width="170">
-            <template slot-scope="scope">
-              <div>{{scope.row.recTime}}</div>
+            prop="content"
+            label="用户评价">
+            <template slot-scope="scope" :show-overflow-tooltip="true">
+              <div>{{scope.row.content}}</div>
             </template>
           </el-table-column>
           <el-table-column
             align="center"
             prop="replyTime"
-            :label="$t('productComm.replyTime')"
-            width="170">
+            :label="$t('productComm.replyTime')">
             <template slot-scope="scope">
               <div>{{scope.row.replyTime}}</div>
             </template>
@@ -120,26 +156,34 @@
             fixed="right"
             align="center"
             :label="$t('publics.operating')"
-            width="180"
-            >
+            width="250"
+          >
             <template slot-scope="scope">
               <div class="text-btn-con">
                 <div
                   class="default-btn text-btn"
-                  v-if="isAuth('prod:prodComm:update')"
+                  @click="openOrderInfo(scope.row.prodCommId)"
+                >订单
+                </div>
+                <div
+                  class="default-btn text-btn"
                   @click="addOrUpdateHandle(scope.row.prodCommId, true)"
-                  >{{$t('groups.edit')}}
+                >{{$t('groups.edit')}}
+                </div>
+                <div
+                  class="default-btn text-btn"
+                  @click="addOrUpdateHandle(scope.row.prodCommId, false)"
+                >{{$t('查看')}}
                 </div>
                 <div
                   class="default-btn text-btn"
-                  @click="addOrUpdateHandle(scope.row.prodId, false)"
-                  >{{$t('live.view')}}
+                  @click="deleteHandle(scope.row.prodCommId)"
+                >{{$t("text.delBtn")}}
                 </div>
                 <div
                   class="default-btn text-btn"
-                  v-if="isAuth('prod:prodComm:delete')"
-                  @click="deleteHandle(scope.row.prodId)"
-                  >{{$t("text.delBtn")}}
+                  @click="handleAudit(scope.row.prodCommId)"
+                >审核
                 </div>
               </div>
             </template>
@@ -159,12 +203,13 @@
     </div>
 
     <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+    <order-info ref="orderInfo"></order-info>
   </div>
 </template>
 
 <script>
 import AddOrUpdate from './prodComm-add-or-update'
-
+import OrderInfo from "../order/orderInfo";
 export default {
   data () {
     return {
@@ -186,7 +231,8 @@ export default {
     }
   },
   components: {
-    AddOrUpdate
+    AddOrUpdate,
+    OrderInfo
   },
   created () {
     this.getDataList()
@@ -194,6 +240,41 @@ export default {
   mounted () {
   },
   methods: {
+    handleAudit(prodCommId){
+      this.$confirm("请确认审核状态", this.$i18n.t('text.tips'), {
+        distinguishCancelAndClose:true,
+        confirmButtonText: "通过",
+        cancelButtonText: "不通过",
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/prod/prodComm/audit'),
+          method: 'post',
+          data: this.$http.adornData({prodCommId:prodCommId, status: 1})
+        }).then(({ data }) => {
+          this.getDataList(this.page);
+          this.$message({
+            message: "审核操作成功",
+            type: 'success',
+          })
+        })
+      }).catch(action => {
+        if(action === 'cancel'){
+          this.$http({
+            url: this.$http.adornUrl('/prod/prodComm/audit'),
+            method: 'post',
+            data: this.$http.adornData({prodCommId:prodCommId, status:-1})
+          }).then(({ data }) => {
+            this.getDataList(this.page);
+            this.$message({
+              message: "审核操作成功",
+              type: 'success',
+            })
+          })
+        }
+      })
+    },
+
     getDataList (page) {
       this.dataListLoading = true
       this.$http({
@@ -215,6 +296,19 @@ export default {
         this.dataListLoading = false
       })
     },
+    openOrderInfo(prodCommId){
+      this.$http({
+        url: this.$http.adornUrl(`/prod/prodComm/info/${prodCommId}`),
+        method: 'GET',
+        params: this.$http.adornParams()
+      }).then(({data}) => {
+        if(data){
+          this.$refs.orderInfo.init({
+            orderNumber: data.orderNumber
+          })
+        }
+      })
+    },
     // 新增 / 修改
     addOrUpdateHandle (id, isEdit) {
       this.addOrUpdateVisible = true

+ 122 - 0
src/views/modules/promotion-bak/promotion-order-upload.vue

@@ -0,0 +1,122 @@
+<template>
+  <!-- 发货信息,用于导出代发货订单的excel交给快递公司 -->
+  <el-dialog
+    :modal="false"
+    title="请选择excel文件上传"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    @close="handleClose"
+    width="38%">
+    <el-upload
+      class="upload-demo"
+      ref="upload"
+      :action="$http.adornUrl('/promotion/promotionOrder/importPromotionOrder')"
+      :headers="{ Authorization: $cookie.get('Authorization_vp'),locale:lang}"
+      :limit="1"
+      name="file"
+      :on-preview="handlePreview"
+      :on-remove="handleRemove"
+      :on-error="uploadFalse"
+      :on-success="uploadSuccess"
+      :file-list="files"
+      :auto-upload="true"
+      :before-upload="beforeAvatarUpload">
+      <div slot="tip" class="el-upload__tip"></div>
+      <el-button slot="trigger" size="small" icon="el-icon-upload2" style="margin-right: 20px">上传</el-button>
+      <el-button size="small" type="primary" @click="submitUpload" :loading="uploading">提 交</el-button>
+    </el-upload>
+  </el-dialog>
+</template>
+<script>
+export default {
+  data () {
+    return {
+      lang: localStorage.getItem('lang') || 'zh_CN',
+      visible: false,
+      uploading: false,
+      files: [],
+    }
+  },
+  methods: {
+    uploadSuccess (detectMatch, file, fileList) {
+      this.files = fileList;
+    },
+    uploadFalse (response) {
+      alert(this.$i18n.t('product.fileUploadFail'))
+    },
+    init () {
+      this.visible = true
+    },
+    // 上传前对文件的大小的判断
+    beforeAvatarUpload (file) {
+      this.upload = true
+      const extension = file.name.split('.')[1] === 'xls'
+      const extension2 = file.name.split('.')[1] === 'xlsx'
+      if (!extension && !extension2) {
+        alert(this.$i18n.t('product.downloadTemplateTips1'))
+        return extension || extension2
+      }
+      return extension || extension2
+    },
+    submitUpload () {
+      this.uploading = true
+      this.$refs.upload.submit()
+      /*let file = this.files[0].raw;
+      let formData = new FormData();
+      formData.append('file', file);
+      this.$http({
+        url: this.$http.adornUrl(`/promotion/promotionOrder/importPromotionOrder`),
+        method: 'POST',
+        data: formData,
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      }).then(({data}) => {
+        if(data){
+          this.uploading = false;
+          this.visible = false;
+          this.$message({
+            message: "提交成功",
+            type: 'success'
+          })
+          this.$emit("refreshDataList");
+        }else{
+          this.$message({
+            message: "提交失败",
+            type: 'error'
+          })
+        }
+      }).catch((error) => {
+        this.uploading = false;
+      })*/
+    },
+    handleRemove (file) {
+
+    },
+    handlePreview (file) {
+      // debugger
+      // if (file.response.status) {
+      //   alert(this.$i18n.t('product.fileSuccess'))
+      //   this.$emit('refreshDataList')
+      // } else {
+      //   alert(this.$i18n.t('product.fileFail'))
+      // }
+    },
+    handleClose(){
+      this.detectMatch = {};
+      this.files = [];
+    }
+  }
+}
+</script>
+<style scoped>
+.download-btn {
+  margin-left: 12px;
+}
+div >>> .el-dialog__body {
+  padding-top: 10px;
+}
+.upload-demo {
+  display: inline-block;
+}
+</style>

+ 1376 - 0
src/views/modules/promotion-bak/promotion-order-video.vue

@@ -0,0 +1,1376 @@
+<template>
+  <el-dialog
+    title="推广视频"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    :append-to-body="true"
+    width="80%"
+    v-if="visible"
+    @close="closeDialog">
+    <div class="mod-home">
+      <div class="operation-bar">
+        <!--        <div class="default-btn primary-btn" @click="addOrUpdateHandle()"-->
+        <!--             v-if="isAuth('print:promotionVideo:save')">{{$t("crud.addTitle")}}</div>-->
+        <div class="default-btn primary-btn" @click="addUpItem">{{$t("crud.addTitle")}}</div>
+      </div>
+      <div class="refund-plate">
+        <el-table
+              highlight-current-row
+              :data="dataList"
+              height="400"
+              show-overflow-tooltip
+              style="width: 100%">
+              <el-table-column
+                prop="id"
+                width="80"
+                label="视频ID">
+              </el-table-column>
+              <el-table-column
+                prop="upName"
+                align="center"
+                label="博主">
+                <template slot-scope="scope">
+                  <span>{{scope.row.upId}}</span>
+                  <br/>
+                  <span>{{scope.row.upName}}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="publishPlatform"
+                align="center"
+                label="视频平台">
+                <template slot-scope="scope">
+                  <span>{{scope.row.publishPlatform}}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="fansNum"
+                align="center"
+                label="粉丝数">
+                <template slot-scope="scope">
+                  <span>{{scope.row.fansNum}}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="videoUrl"
+                cell-style="{}"
+                label="视频链接">
+                <template slot-scope="scope">
+                  <span @click="jumpToLink(scope.row.videoUrl)" style="cursor: pointer;color: #2d8cf0">{{scope.row.videoUrl}}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="likeNum"
+                align="center"
+                label="点赞数">
+                <template slot-scope="scope">
+                  <span>{{scope.row.likeNum}}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="commNum"
+                align="center"
+                label="评论数">
+                <template slot-scope="scope">
+                  <span>{{scope.row.commNum}}</span>
+                </template>
+              </el-table-column>
+              <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+                <template slot-scope="scope">
+                  <div class="text-btn-con">
+<!--                    <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id)"-->
+<!--                    >{{$t("crud.updateBtn")}}</div>-->
+                    <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.id)"
+                    >{{$t("text.delBtn")}}</div>
+                  </div>
+                </template>
+              </el-table-column>
+            </el-table>
+      </div>
+      <div>
+        <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="110px">
+          <el-row v-for="(upItem, index) in videoList" v-if="videoList.length > 0">
+            <el-col :span="5">
+              <el-form-item label="博主ID" :prop="upItem.upId" :rules="{required: true, message: '博主ID必填', trigger: 'blur'}">
+                <el-input v-model="upItem.upId"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="5">
+              <el-form-item label="博主昵称" :prop="upItem.upName" :rules="{required: true, message: '博主昵称必填', trigger: 'blur'}">
+                <el-input v-model="upItem.upName"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="5">
+              <el-form-item label="视频平台" :prop="upItem.publishPlatform" :rules="{required: true, message: '视频平台必填', trigger: 'blur'}">
+                <el-select v-model="upItem.publishPlatform" filterable placeholder="请选择">
+                  <el-option
+                    v-for="(item,index) in videoPlatformList"
+                    :key="index"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="5">
+              <el-form-item label="粉丝数" :prop="upItem.fansNum">
+                <el-input v-model="upItem.fansNum" size="small" type="number"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="4">
+              <el-button circle @click.prevent="saveVideo(upItem)" type="success" icon="el-icon-check"></el-button>
+              <el-button circle @click.prevent="removeUpItem(upItem)" type="danger" icon="el-icon-delete"></el-button>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+    </div>
+  </el-dialog>
+
+</template>
+
+<script>
+
+export default {
+  data() {
+    return {
+      dataList:[],
+      hotShop: {
+        shopName: null
+      },
+      dataForm:{
+        id: null,
+      },
+      videoList:[],
+      visible: false,
+      videoPlatformList: [
+        {value: '抖音', label: '抖音'},
+        {value: '小红书', label: '小红书'},
+        {value: '视频号', label: '视频号'},
+        {value: '快手', label: '快手'},
+        {value: 'B站', label: 'B站'},
+      ],
+      dataRule: {
+      },
+    }
+  },
+
+  created() {
+
+  },
+  methods: {
+    init(promotionOrderId) {
+      this.dataForm.id = promotionOrderId;
+      this.getVideoList(this.dataForm.id)
+    },
+    getVideoList(promotionOrderId){
+      this.$http({
+        url: this.$http.adornUrl(`/promotion/promotionVideo/getVideoByPromotionOrderId/` + promotionOrderId),
+        method: 'GET',
+      }).then(({data}) => {
+        this.visible = true
+        this.dataList = data
+      })
+    },
+    jumpToLink(videoUrl){
+      let regex = /https?:\/\/[^\s]+/g // 匹配URL的正则表达式
+      let url =  videoUrl.match(regex) // 返回所有匹配到的链接
+      window.open(url)
+    },
+    addUpItem(){
+      this.videoList.push({upId:null, upName: null, publishPlatform:null, payAmt:null, fansNum:null})
+    },
+    saveVideo(upItem){
+      upItem.promotionOrderId = this.dataForm.id
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/promotion/promotionVideo'),
+            method: 'post',
+            data: this.$http.adornData(upItem)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+            })
+            this.videoList = [];
+            this.getVideoList(this.dataForm.id)
+          })
+        }
+      })
+    },
+    deleteHandle(videoId){
+      this.$confirm('确定要删除吗?', '请选择', {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/promotion/promotionVideo/' + videoId),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+          })
+          this.getVideoList(this.dataForm.id)
+        })
+      }).catch(() => { })
+    },
+    removeUpItem(upItem, index){
+      this.videoList.splice(index, 1)
+    },
+    closeDialog() {
+      this.visible = false
+    },
+  }
+}
+</script>
+
+<style lang="scss">
+// e-chart
+#real-time-data-chart canvas {
+  width: 100%;
+  height: 100%;
+  padding: 0 20px !important
+}
+
+.mod-home {
+  .search-bar {
+    .input-row {
+      .select-time-btn {
+        margin-right: 20px;
+        display: inline-block;
+        color: #AAAAAA;
+        font-size: 14px;
+        cursor: pointer;
+
+        &:last-child {
+          margin-right: 0;
+        }
+      }
+
+      .select-time-btn.is-active {
+        color: #155BD4;
+      }
+
+    }
+  }
+
+  // 店铺状态异常提示
+  .shop-inf-imperfect-tips {
+    width: 100%;
+    line-height: 32px;
+    font-size: 14px;
+    color: #333;
+    background: #FFF7DD;
+    border: 1px solid #FFD888;
+    border-radius: 2px;
+    padding: 5px 10px;
+    margin-bottom: 10px;
+
+    .el-icon-warning {
+      font-size: 16px;
+      color: #FFA900;
+      margin-left: 5px;
+      margin-right: 5px;
+    }
+  }
+
+  // font-size: 1em;
+  // line-height: 2em;
+  // .strong {
+  //   margin: 0;
+  //   font-size: 17px;
+  //   font-weight: bold;
+  //   text-align: center;
+  //   margin-bottom: 0.5em;
+  // }
+  // .content {
+  //   font-size: 16px;
+  //   padding: 0 30px;
+  // }
+  // background-color: #F5F6F9;
+  .grap {
+    color: #999999;
+  }
+
+  // 白色背景 标题样式
+  .white-basic {
+    background: #fff;
+    padding: 20px;
+    border-radius: 6px;
+    margin-bottom: 20px;
+
+    .title-basic {
+      font-size: 18px;
+      margin-bottom: 20px;
+      font-weight: bold;
+      line-height: 24px;
+      color: #333333;
+      opacity: 1;
+    }
+  }
+
+  // 今日待办
+  .abeyance-box {
+    display: flex;
+    justify-content: space-between;
+
+    .order-num-item {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      margin-top: 7px;
+      margin-bottom: 14px;
+      background-color: #fff;
+      box-sizing: border-box;
+      border-radius: 4px;
+      // cursor: pointer;
+      .item-box {
+        left: 30px;
+
+        .words {
+          font-size: 16px;
+          font-weight: 400;
+          color: #666;
+        }
+
+        .number {
+          font-size: 24px;
+          font-family: Microsoft YaHei;
+          font-weight: bold;
+          color: #333;
+          margin-top: 10px;
+        }
+
+        .compare {
+          font-size: 14px;
+        }
+      }
+
+      .item-img {
+        position: relative;
+        margin-right: 25px;
+        display: block;
+        width: 60px;
+        height: 60px;
+
+        img {
+          display: block;
+          width: 100%;
+          height: 100%;
+          border-radius: 50%;
+        }
+      }
+    }
+
+    .order-num-item:first-child {
+      margin-left: 30px;
+    }
+
+    .order-num-item:last-child {
+      margin-right: 100px;
+    }
+  }
+
+  // 订单栏项
+  .order-all-num {
+    // display: flex;
+    // justify-content: space-between;
+    .row-bg {
+      display: flex;
+
+      .col-box {
+        display: flex;
+        justify-content: space-between;
+        height: 120px;
+
+      }
+
+      .num-item-box {
+        position: relative;
+        width: calc(20% - 20px);
+        flex: 1;
+        padding-right: 20px;
+        box-sizing: border-box;
+      }
+
+      .num-item-box:last-child {
+        padding-right: 0;
+      }
+
+      .col-box:first-child {
+        // margin-right: 20px;
+        .num-item-box {
+          padding-right: 20px;
+          box-sizing: border-box;
+        }
+      }
+
+      .col-box:last-child {
+        .num-item-box:not(:last-child) {
+          padding-right: 20px;
+          box-sizing: border-box;
+        }
+      }
+    }
+
+    // 基本信息样式
+    .order-num-item {
+      // width: calc((100% - 73px) * 0.2);
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      background-color: #fff;
+      box-sizing: border-box;
+      border-radius: 4px;
+      // &:hover {
+      //   .item-img {
+      //     img {
+      //       position: absolute;
+      //       top: -10px;
+      //     }
+      //   }
+      // }
+      .item-box {
+        position: absolute;
+        z-index: 1;
+        left: 30px;
+
+        .words {
+          font-size: 14px;
+          font-weight: bold;
+          color: #fff;
+        }
+
+        .number {
+          width: 160px;
+          word-break: break-all;
+          font-size: 26px;
+          font-family: Microsoft YaHei;
+          font-weight: bold;
+          color: #fff;
+          margin-top: 10px;
+
+          .text {
+            padding-right: 20px;
+          }
+
+          // .ratio{
+          //   font-size: 12px;
+          //   font-weight: 400;
+          //   color: #FFFFFF;
+          //   opacity: 0.7;
+          // }
+        }
+
+        // .ratio{
+        //   font-size: 12px;
+        //   font-weight: 400;
+        //   color: #FFFFFF;
+        //   opacity: 0.7;
+        // }
+        .seq {
+          display: flex
+        }
+
+        .up {
+          color: #3DD598;
+        }
+
+        .up-icon {
+          display: inline-block;
+          width: 16px;
+          height: 16px;
+          margin: 0 12px 0 4px;
+          background: url('~@/assets/img/home/ic-arrow-narrow-up.png')
+        }
+
+        .down {
+          color: #F0142F;
+        }
+
+        .down-icon {
+          display: inline-block;
+          width: 16px;
+          height: 16px;
+          margin: 0 12px 0 4px;
+          background: url('~@/assets/img/home/ic-arrow-narrow-down.png')
+        }
+
+        .compare {
+          font-size: 14px;
+        }
+      }
+
+      .item-img {
+        position: relative;
+        display: block;
+        width: 100%;
+        // transition: .35s;
+        img {
+          display: block;
+          width: 100%;
+          height: 100%;
+        }
+      }
+    }
+  }
+
+  // 添加公告
+  .introduce {
+    margin-bottom: 10px;
+  }
+
+  .router-link-active {
+    //点击时去掉下划线
+    text-decoration: none;
+  }
+
+  a {
+    text-decoration: none;
+  }
+
+  .title {
+    font-size: 22px;
+    color: #111111;
+    font-weight: bold;
+    padding: 20px;
+  }
+
+  .btn-more {
+    float: right;
+    margin: 10px;
+    margin-top: 0px;
+  }
+
+  .introduce-container {
+    padding: 10px;
+    display: flex;
+    background-color: #b4dff8;
+    margin: 20px 0 10px 0;
+  }
+
+  .introduce-container .text {
+    width: 50%;
+    line-height: 30px;
+    font-size: 22px;
+  }
+
+  // 栏目标题行
+  .title-line {
+    background: #f8f8f8;
+    padding: 12px;
+    font-size: 14px;
+    line-height: 1em;
+  }
+
+  .blue-vertical {
+    display: inline-block;
+    width: 3px;
+    height: 1em;
+    background: #155bd4;
+    margin-right: 0.5em;
+    vertical-align: middle;
+  }
+
+  .title-txt {
+    color: #000;
+    font-weight: bold;
+    margin-right: 1em;
+    vertical-align: middle;
+  }
+
+  .title-time {
+    color: #999999;
+    font-size: 12px;
+    margin-left: 12px;
+    vertical-align: middle;
+  }
+
+  .realtime {
+    // display: flex;
+    margin-top: 20px;
+    padding: 0;
+  }
+
+  /**
+    实时概况
+     */
+  .realtime-situation-box {
+    .real-time-content {
+      display: flex;
+      flex-wrap: wrap;
+      margin-top: 10px;
+      margin-bottom: -12px;
+
+      .item {
+        width: 20%;
+        padding-left: 30px;
+        margin-bottom: 40px;
+
+        .word {
+          margin-bottom: 10px;
+          font-size: 16px;
+          font-weight: 400;
+          color: #999999;
+        }
+
+        .number {
+          font-size: 24px;
+          font-weight: bold;
+          line-height: 31px;
+          color: #333333;
+        }
+      }
+    }
+  }
+
+  .realtime-situation {
+    //左边
+    .realtime-left {
+      height: 100%;
+      // width: calc((100% - 20px) * 0.8);
+      // margin-right: 20px;
+      // .chart-content {
+      //   width: 100%;
+      //   height: 360px;
+      // }
+      background: #fff;
+      border-radius: 4px;
+    }
+
+    .col-item {
+      padding-right: 20px;
+      box-sizing: border-box;
+    }
+
+    // 标题
+    .title {
+      position: relative;
+      display: flex;
+      align-items: center;
+      box-sizing: border-box;
+
+      .t-title {
+        font-size: 18px;
+        font-weight: bold;
+        color: #333;
+      }
+
+      .update-time {
+        font-size: 12px;
+        color: #999999;
+        margin-left: 10px;
+      }
+
+      .t-small-text {
+        font-size: 12px;
+        color: #999;
+      }
+
+      .t-update-time {
+        margin-left: 12px;
+      }
+
+      .t-explain-item::before {
+        display: inline-block;
+        content: '';
+        width: 18px;
+        height: 8px;
+        background: #FF4141;
+        border-radius: 8px;
+        margin-right: 10px;
+      }
+
+      .t-explain-first-item {
+        margin-left: 50px;
+      }
+
+      .t-explain-second-item {
+        margin-left: 40px;
+      }
+
+      .t-red::before {
+        background: #FF4141;
+      }
+
+      .t-dark-green::before {
+        background: #42B983;
+      }
+
+      .t-today-data::before {
+        background: #1890FF;
+      }
+
+      .t-yesterday-data::before {
+        background: #21D59B;
+      }
+
+      .t-pay-amount {
+        position: absolute;
+        right: 0;
+        top: 0;
+        display: flex;
+
+        .t-pay-item {
+          color: #333;
+          text-align: left;
+          margin-right: 30px;
+
+          .tt-title {
+            font-size: 14px;
+          }
+
+          .tt-num {
+            font-size: 20px;
+            font-weight: bold;
+            margin-top: 13px;
+          }
+        }
+
+        .t-today {
+          margin-right: 150px;
+        }
+      }
+    }
+
+    .pay-amount-text {
+      font-weight: bold;
+    }
+
+    .pay-amount-num {
+      font-size: 24px;
+      min-height: 24px;
+      font-weight: 700;
+      margin: 10px 0;
+      line-height: 24px;
+    }
+
+    .pay-amount-tips {
+      color: #9b9b9b;
+    }
+
+    // 图表
+    .realtime-chart-box {
+      left: -10px !important;
+      // margin-top: 10px;
+    }
+
+    .wrapper__summary:nth-child(2) {
+      margin-top: 120px;
+    }
+
+    // 右边
+    .realtime-right {
+      min-width: calc((100% - 20px) * 0.2);
+      min-height: 426px;
+      height: 100%;
+      padding: 20px 0px 0 20px;
+      background-color: #fff;
+      box-sizing: border-box;
+      border-radius: 4px;
+
+      .realtime-right-title {
+        font-size: 18px;
+        font-weight: bold;
+        color: #333;
+        margin-bottom: 45px;
+      }
+
+      .realtime-right-box {
+        display: flex;
+        flex-wrap: wrap;
+        width: 100%;
+        height: 100%;
+
+        .realtime-right-box-left, .realtime-right-box-right {
+          width: 100%;
+          display: flex;
+          justify-content: space-between;
+        }
+
+        .realtime-right-box-right {
+          margin-top: -30px;
+        }
+
+        .order-num-item {
+          width: 100%;
+          display: flex;
+
+          .item-img {
+            margin-right: 30px;
+
+            .words {
+              font-size: 16px;
+              font-weight: 400;
+              color: #666;
+            }
+
+            .number {
+              font-size: 24px;
+              font-family: Microsoft YaHei;
+              font-weight: bold;
+              color: #333;
+              margin: 14px 0;
+            }
+
+            .compare {
+              font-size: 14px;
+            }
+          }
+
+          .item-box {
+            .words {
+              font-size: 16px;
+              font-weight: 400;
+              color: #666;
+            }
+
+            .number {
+              font-size: 26px;
+              font-family: Microsoft YaHei;
+              font-weight: bold;
+              color: #333;
+              margin: 14px 0;
+            }
+
+            .seq {
+              display: flex;
+
+              .value {
+                color: #333333;
+                font-weight: bold;
+                margin-right: 8px;
+              }
+            }
+          }
+        }
+
+        // .order-num-item:nth-child(even){
+        //     margin-left: 86px;
+        // }
+      }
+    }
+
+    .realtime .wrapper__summary {
+      display: flex;
+    }
+
+    .realtime .wrapper__summary .summary__box {
+      display: inline-flex;
+      flex: 1;
+      margin-left: 20px;
+    }
+
+    .realtime .wrapper__summary .summary__item {
+      position: relative;
+      width: 100%;
+    }
+
+    //客户数信息
+    .customer-number-info {
+      margin-left: 60px;
+    }
+
+    .text-tit {
+      font-weight: 600;
+    }
+
+    .text-num {
+      font-size: 24px;
+      min-height: 24px;
+      font-weight: 700;
+      margin: 15px 0;
+      line-height: 24px;
+    }
+
+    .text-tips {
+      color: #9b9b9b;
+    }
+
+    // 客户数icon
+    svg {
+      fill: currentColor;
+      vertical-align: middle;
+    }
+
+    .realtime .wrapper__summary .summary__svg {
+      position: absolute;
+      left: 0;
+      top: 50%;
+      transform: translateY(-50%);
+    }
+  }
+
+  /**
+    整体看板
+     */
+  .whole-plate {
+    margin: 20px 0 20px;
+    min-height: 460px;
+    background-color: #fff;
+    border-radius: 4px;
+
+    // 标题
+    .title {
+      width: 80%;
+      position: relative;
+      display: flex;
+      align-items: center;
+
+      .t-title {
+        font-size: 18px;
+        font-weight: bold;
+        color: #333;
+      }
+
+      .update-time {
+        font-size: 12px;
+        color: #999999;
+        margin-left: 10px;
+      }
+
+      .t-small-text {
+        font-size: 12px;
+        color: #999;
+      }
+
+      .t-update-time {
+        margin-left: 12px;
+      }
+
+      .t-explain-item::before {
+        display: inline-block;
+        content: '';
+        width: 18px;
+        height: 8px;
+        background: #FF4141;
+        border-radius: 8px;
+        margin-right: 10px;
+      }
+
+      .t-explain-first-item {
+        margin-left: 50px;
+      }
+
+      .t-explain-second-item {
+        margin-left: 40px;
+      }
+
+      .t-red::before {
+        background: #FF4141;
+      }
+
+      .t-dark-green::before {
+        background: #42B983;
+      }
+
+      .t-today-data::before {
+        background: #1890FF;
+      }
+
+      .t-yesterday-data::before {
+        background: #21D59B;
+      }
+
+      .t-pay-amount {
+        position: absolute;
+        right: 0;
+        top: 0;
+        display: flex;
+
+        .t-pay-item {
+          color: #333;
+          text-align: left;
+          margin-right: 30px;
+
+          .tt-title {
+            font-size: 14px;
+          }
+
+          .tt-num {
+            font-size: 20px;
+            font-weight: bold;
+            margin-top: 13px;
+          }
+        }
+
+        .t-today {
+          margin-right: 150px;
+        }
+      }
+    }
+
+    .money {
+      width: 20%;
+      display: flex;
+      justify-content: space-between;
+
+      .related-income-item {
+        text-align: center;
+      }
+    }
+
+    .related-income {
+      margin: 20px 0 0 0px;
+      padding-right: 50px;
+      display: flex;
+      flex-wrap: wrap;
+      justify-content: space-between;
+    }
+
+    .item-tit {
+      margin-top: 23px;
+      margin-bottom: 15px;
+    }
+
+    .item-num {
+      height: 24px;
+      line-height: 24px;
+    }
+
+    .item-num-price {
+      font-size: 18px;
+      font-weight: 700;
+    }
+
+    .item-num a {
+      color: #155bd4;
+      text-decoration: none;
+    }
+
+    .integral-plate {
+      margin-top: 15px;
+    }
+  }
+
+  /**
+    退款看板
+     */
+  .refund-plate {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: space-between;
+    // 上
+    .ranking-box {
+      display: flex;
+      flex-wrap: wrap;
+      flex-direction: column;
+      width: 50%;
+      padding-right: 20px;
+
+      .ranking-left,
+      .refund-rate-box {
+        display: flex;
+        flex-direction: column;
+        width: 100%;
+        background: #fbfbfb;
+        padding: 20px;
+        box-sizing: border-box;
+        border-radius: 4px;
+        height: 574px;
+      }
+
+      .refund-rate-box {
+        height: 396px;
+      }
+
+      .ranking-left {
+        margin-top: 20px;
+        flex: auto
+      }
+
+      .ranking-title {
+        font-weight: bold;
+        color: #333;
+        font-size: 18px;
+        margin-bottom: 20px;
+      }
+
+      .table {
+        width: 100%;
+        border: none;
+        background: #fbfbfb;
+        // border-spacing: 10px 20px;
+        text-align: left;
+
+        .table-tit {
+          cursor: pointer;
+        }
+
+        .table-tit:hover {
+          background-color: lightgoldenrodyellow;
+          color: #000;
+        }
+
+        .table-tit:active {
+          background-color: lightblue;
+          color: #000;
+        }
+
+        tr {
+          border: none;
+          height: 3em;
+          line-height: 1.5em;
+        }
+
+        td {
+          border: none;
+          word-break: break-wrod;
+        }
+
+        .gray {
+          background: #F7F8FA;
+        }
+
+        .table-tit-item {
+          color: #999;
+          text-align: left;
+        }
+
+        .rank {
+          width: 20%;
+        }
+
+        .prod {
+          width: 50%;
+        }
+
+        .ref {
+          width: 20%;
+        }
+
+        .ranks {
+          width: 10%;
+        }
+
+        .prods {
+          width: 50%;
+        }
+
+        .refs {
+          width: 30%;
+        }
+
+        .prop {
+          width: 10%;
+          // text-align: center;
+        }
+      }
+
+      .no-data {
+        height: 60px;
+        line-height: 60px;
+        text-align: center;
+        font-size: 14px;
+        color: #999;
+      }
+
+      .line-clamp-one {
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        -webkit-line-clamp: 1;
+        text-overflow: ellipsis;
+        overflow: hidden;
+        /* autoprefixepxr: off */
+        -webkit-box-orient: vertical;
+        word-wrap: break-word;
+        word-break: break-all;
+      }
+
+      .padLeft {
+        padding-left: 20px;
+      }
+
+      .msg-tit {
+        font-weight: bold;
+        color: #333;
+        font-size: 18px;
+        margin-bottom: 15px;
+      }
+    }
+
+    //  下
+    .refund-chart-box {
+      display: flex;
+      flex-wrap: wrap;
+      width: 50%;
+
+      .successed-refund,
+      .ranking-right {
+        display: flex;
+        width: 100%;
+        flex-direction: column;
+        background: #fbfbfb;
+        padding: 20px;
+        box-sizing: border-box;
+        border-radius: 4px;
+      }
+
+      .successed-refund {
+        display: flex;
+        flex-direction: column;
+        width: 100%;
+        background: #fbfbfb;
+        height: 396px;
+        padding: 20px;
+        box-sizing: border-box;
+      }
+
+      .ranking-right {
+        margin-top: 20px;
+      }
+
+      .ranking-title {
+        font-weight: bold;
+        color: #333;
+        font-size: 18px;
+        margin-bottom: 20px;
+      }
+
+      .table {
+        width: 100%;
+        border: none;
+        background: #fbfbfb;
+        // border-spacing: 10px 20px;
+        text-align: left;
+
+        tr {
+          border: none;
+          height: 3em;
+          line-height: 1.5em;
+        }
+
+        td {
+          border: none;
+          word-break: break-wrod;
+        }
+
+        .gray {
+          background: #F7F8FA;
+        }
+
+        .table-tit-item {
+          color: #999;
+          text-align: left;
+        }
+
+        .rank {
+          width: 10%;
+        }
+
+        .prod {
+          width: 50%;
+        }
+
+        .ref {
+          width: 30%;
+        }
+
+        .ranks {
+          width: 20%;
+        }
+
+        .prods {
+          width: 40%;
+        }
+
+        .refs {
+          width: 30%;
+        }
+
+        .prop {
+          width: 10%;
+          // text-align: center;
+        }
+      }
+
+      .msg-tit {
+        font-weight: bold;
+        color: #333;
+        font-size: 18px;
+        margin-bottom: 15px;
+      }
+
+      .padLeft {
+        padding-left: 20px;
+      }
+
+      .msg-price {
+        margin: 6px 0;
+        line-height: 26px;
+        padding: 0;
+        font-size: 24px;
+        font-weight: bold;
+        line-height: 1em;
+      }
+
+      .msg-txt-p {
+        width: 146px;
+      }
+
+      .compare {
+        color: #9b9b9b;
+        display: flex;
+        justify-content: space-between;
+        font-size: 12px;
+        padding: 5px;
+      }
+
+      .compare-left {
+        margin-right: 10px;
+        white-space: nowrap;
+      }
+    }
+
+    .integral-plate canvas {
+      left: -5px !important;
+    }
+
+    .money-padleft {
+      padding-left: 10px;
+    }
+
+    .refund-tip {
+      display: flex;
+      font-size: 14px;
+      font-weight: 400;
+      color: #5A607F;
+    }
+
+    .msg-tit-txt {
+      display: flex;
+      justify-content: space-between;
+    }
+
+    .traffictrendA, .traffictrendB {
+      display: inline-block;
+      width: 10px;
+      height: 10px;
+      border-radius: 6px;
+      margin-right: 4px;
+    }
+
+    .traffictrendA {
+      background: #21D59B;
+    }
+
+    .traffictrendB {
+      margin-left: 40px;
+      background: #0058FF;
+    }
+
+  }
+}
+
+.empty {
+  display: block;
+  height: 200px;
+  line-height: 200px;
+  text-align: center;
+  color: #aaa;
+}
+</style>

+ 121 - 0
src/views/modules/promotion-bak/promotion-video-upload.vue

@@ -0,0 +1,121 @@
+<template>
+  <!-- 发货信息,用于导出代发货订单的excel交给快递公司 -->
+  <el-dialog
+    :modal="false"
+    title="请选择excel文件上传"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    @close="handleClose"
+    width="38%">
+    <el-upload
+      class="upload-demo"
+      ref="upload"
+      :action="$http.adornUrl('/promotion/promotionVideo/importPromotionVideo')"
+      :headers="{Authorization: $cookie.get('Authorization_vp'),locale:lang}"
+      :limit="1"
+      name="file"
+      :on-preview="handlePreview"
+      :on-remove="handleRemove"
+      :on-error="uploadFalse"
+      :on-success="uploadSuccess"
+      :file-list="files"
+      :auto-upload="true"
+      :before-upload="beforeAvatarUpload">
+      <div slot="tip" class="el-upload__tip"></div>
+      <el-button slot="trigger" size="small" icon="el-icon-upload2" style="margin-right: 20px">上传</el-button>
+      <el-button size="small" type="primary" @click="submitUpload" :loading="uploading">提 交</el-button>
+    </el-upload>
+  </el-dialog>
+</template>
+<script>
+export default {
+  data () {
+    return {
+      lang: localStorage.getItem('lang') || 'zh_CN',
+      visible: false,
+      uploading: false,
+      files: [],
+    }
+  },
+  methods: {
+    uploadSuccess (detectMatch, file, fileList) {
+      this.files = fileList;
+    },
+    uploadFalse (response) {
+      alert(this.$i18n.t('product.fileUploadFail'))
+    },
+    init () {
+      this.visible = true
+    },
+    // 上传前对文件的大小的判断
+    beforeAvatarUpload (file) {
+      this.upload = true
+      const extension = file.name.split('.')[1] === 'xls'
+      const extension2 = file.name.split('.')[1] === 'xlsx'
+      if (!extension && !extension2) {
+        alert(this.$i18n.t('product.downloadTemplateTips1'))
+        return extension || extension2
+      }
+      return extension || extension2
+    },
+    submitUpload () {
+      this.uploading = true
+      this.$refs.upload.submit()
+      /*let file = this.files[0].raw;
+      let formData = new FormData();
+      formData.append('file', file);
+      this.$http({
+        url: this.$http.adornUrl(`/promotion/promotionOrder/importPromotionOrder`),
+        method: 'POST',
+        data: formData,
+        headers: {
+          'Content-Type': 'multipart/form-data'
+        }
+      }).then(({data}) => {
+        if(data){
+          this.uploading = false;
+          this.visible = false;
+          this.$message({
+            message: "提交成功",
+            type: 'success'
+          })
+          this.$emit("refreshDataList");
+        }else{
+          this.$message({
+            message: "提交失败",
+            type: 'error'
+          })
+        }
+      }).catch((error) => {
+        this.uploading = false;
+      })*/
+    },
+    handleRemove (file) {
+
+    },
+    handlePreview (file) {
+      // debugger
+      // if (file.response.status) {
+      //   alert(this.$i18n.t('product.fileSuccess'))
+      //   this.$emit('refreshDataList')
+      // } else {
+      //   alert(this.$i18n.t('product.fileFail'))
+      // }
+    },
+    handleClose(){
+      this.files = [];
+    }
+  }
+}
+</script>
+<style scoped>
+.download-btn {
+  margin-left: 12px;
+}
+div >>> .el-dialog__body {
+  padding-top: 10px;
+}
+.upload-demo {
+  display: inline-block;
+}
+</style>

+ 215 - 0
src/views/modules/promotion-bak/promotionOrder-add-or-update.vue

@@ -0,0 +1,215 @@
+<template>
+  <el-dialog
+    :title="!dataForm.id ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    @close="">
+    <el-row>
+        <el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="110px">
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="推广人" prop="tgUserName" :rules="{required: true, message: '推广人必填', trigger: 'blur'}">
+                <el-input v-model="dataForm.tgUserName" size="small"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" :offset="1">
+              <el-form-item label="推广店铺" prop="shopId" :rules="{required: true, message: '推广店铺必填', trigger: 'blur'}">
+                <el-select v-model="dataForm.shopId" placeholder="推广店铺" style="width: 300px" @change="shopChange"
+                           controls-position="right" :clearable="true">
+                  <el-option v-for="(item,index) in shopList" :key="index" :label="item.shopName" :value="item.shopId">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="寄拍/付费" prop="payType" :rules="{required: true, message: '付费类型必填', trigger: 'blur'}">
+                <el-select v-model="dataForm.payType" placeholder="请选择" size="small" style="width: 300px">
+                  <el-option :key="0" label="寄拍" value="寄拍"></el-option>
+                  <el-option :key="1" label="付费 " value="付费"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="5" :offset="3">
+              <el-form-item label="稿费" prop="payAmt">
+                <el-input v-model="dataForm.payAmt"size="small" type="number" placeholder="寄拍不填"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="5">
+              <el-form-item label="结算状态" prop="payType">
+                <el-select v-model="dataForm.settleStatus" placeholder="请选择" size="small">
+                  <el-option :key="1" label="待结算" value="待结算"></el-option>
+                  <el-option :key="2" label="已结算 " value="已结算"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col  :span="10">
+              <el-form-item label="订单编号" prop="orderNumber" :rules="{required: true, message: '订单号必填', trigger: 'blur'}">
+                <el-input v-model="dataForm.orderNumber" size="small" type="textarea" rows="3" placeholder="多个订单号时需要换行,一个订单号占一行"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="10" :offset="1">
+              <el-form-item label="备注" prop="remark">
+                <el-input v-model="dataForm.remark" size="small" type="textarea" rows="3"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <div v-if="!dataForm.id">
+            <h3>博主信息</h3>
+            <el-divider></el-divider>
+            <el-row v-for="(upItem, index) in dataForm.videoList" v-if="dataForm.videoList.length > 0">
+              <el-col :span="5">
+                <el-form-item label="博主ID" :prop="'videoList.' + index + '.upId'" :rules="{required: true, message: '博主ID必填', trigger: 'blur'}">
+                  <el-input v-model="upItem.upId"size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="5">
+                <el-form-item label="博主昵称" :prop="'videoList.' + index + '.upName'" :rules="{required: true, message: '博主昵称必填', trigger: 'blur'}">
+                  <el-input v-model="upItem.upName"size="small"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="5">
+                <el-form-item label="视频平台" :prop="'videoList.' + index + '.publishPlatform'" :rules="{required: true, message: '视频平台必填', trigger: 'blur'}">
+                  <el-select v-model="upItem.publishPlatform" filterable placeholder="请选择">
+                    <el-option
+                      v-for="(item,index) in videoPlatformList"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="5">
+                <el-form-item label="粉丝数" :prop="'videoList.' + index + '.fansNum'">
+                  <el-input v-model="upItem.fansNum" size="small" type="number"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4">
+                <el-button circle @click.prevent="removeUpItem(upItem)" type="danger" icon="el-icon-delete"></el-button>
+                <el-button circle @click.prevent="addUpItem()" type="success" icon="el-icon-plus" v-if="index === dataForm.videoList.length - 1"></el-button>
+              </el-col>
+            </el-row>
+            <el-row v-if="dataForm.videoList.length === 0">
+              <el-button circle @click.prevent="addUpItem()" type="success" icon="el-icon-plus"></el-button>
+            </el-row>
+          </div>
+    </el-form>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+      <el-button class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button class="default-btn primary-btn" type="primary" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        id: null,
+        tgUserName: null,
+        upId: null,
+        upName: null,
+        orderNumber: null,
+        shopId: null,
+        shopName: null,
+        status: null,
+        promotionVideoId: null,
+        promotionVideo: null,
+        createTime: null,
+        updateTime: null,
+        settleStatus: '待结算',
+        remark: null,
+        payType: null,
+        payAmt: 0,
+        videoList:[{upId:null, upName: null, publishPlatform:null, payAmt:null, fansNum:null}]
+      },
+      shopList: [],
+      videoPage: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      dataRule: {
+      },
+      upList:[{}],
+      videoPlatformList: [
+        {value: '抖音', label: '抖音'},
+        {value: '小红书', label: '小红书'},
+        {value: '视频号', label: '视频号'},
+        {value: '快手', label: '快手'},
+        {value: 'B站', label: 'B站'},
+      ],
+    }
+  },
+  mounted () {
+    this.getShopList()
+  },
+  methods: {
+    init (id) {
+      this.dataForm.id = id || 0
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].resetFields()
+        if (this.dataForm.id) {
+          this.$http({
+            url: this.$http.adornUrl('/promotion/promotionOrder/info/' + this.dataForm.id),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    getShopList() {
+      this.$http({
+        url: this.$http.adornUrl('/shop/shopAuditing/list'),
+        method: 'get',
+      }).then(({ data }) => {
+        if (data) {
+          this.shopList = data
+        }
+      })
+    },
+    shopChange (index) {
+      this.dataForm.shopName = this.shopList[index].shopName
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.dataForm.shopName = this.shopList.find(item => item.shopId === this.dataForm.shopId).shopName
+          this.$http({
+            url: this.$http.adornUrl('/promotion/promotionOrder'),
+            method: this.dataForm.id ? 'put' : 'post',
+            data: this.$http.adornData(this.dataForm)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+            })
+            this.visible = false
+            this.$emit('refreshDataList')
+          })
+        }
+      })
+    },
+    addUpItem(){
+      this.dataForm.videoList.push({upId:null, upName: null, publishPlatform:null, payAmt:null, fansNum:null})
+    },
+    removeUpItem(upItem, index){
+      if(this.dataForm.videoList.length === 1){
+        return
+      }
+      this.dataForm.videoList.splice(index, 1)
+    },
+  }
+}
+</script>

+ 381 - 0
src/views/modules/promotion-bak/promotionOrder.vue

@@ -0,0 +1,381 @@
+<template>
+  <div class="mod-print-promotionOrder">
+    <!-- 搜索相关区域 -->
+    <div class="search-bar">
+      <el-form :inline="true" :model="searchForm" @keyup.enter.native="getDataList(this.page)" size="small">
+        <div class="input-row">
+          <el-form-item label="订单编号" prop="orderNumber">
+            <el-input v-model="searchForm.orderNumber" :clearable="true" size="small"></el-input>
+          </el-form-item>
+          <el-form-item label="推广人" prop="tgUserName">
+            <el-input v-model="searchForm.tgUserName" :clearable="true"></el-input>
+          </el-form-item>
+          <el-form-item label="博主ID" prop="upId">
+            <el-input v-model="searchForm.upId" :clearable="true"></el-input>
+          </el-form-item>
+          <el-form-item label="博主名称" prop="upName">
+            <el-input v-model="searchForm.upName" :clearable="true"></el-input>
+          </el-form-item>
+          <el-form-item label="推广店铺" prop="shopId">
+            <el-select v-model="searchForm.shopId" placeholder="推广店铺"
+                       controls-position="right" :clearable="true">
+              <el-option v-for="item in shopList" :key="item.shopId" :label="item.shopName" :value="item.shopId">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="订单状态" prop="status">
+            <el-select v-model="searchForm.status" placeholder="请选择" size="small" :clearable="true">
+              <el-option :key="2" label="待发货" value="待发货"></el-option>
+              <el-option :key="3" label="已发货" value="已发货"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="粉丝数:" label-width="85px">
+            <InputNumberRange v-model="fansNumRange" type="number"></InputNumberRange>
+          </el-form-item>
+          <el-form-item label="下单时间" prop="orderTime">
+            <el-date-picker
+              :clearable="true"
+              v-model="orderTimeRange"
+              type="datetimerange"
+              align="right"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              start-placeholder="开始时间"
+              end-placeholder="结束时间"
+              :default-time="['00:00:00', '23:59:59']">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="发货时间" prop="deliveryTime">
+            <el-date-picker
+              :clearable="true"
+              v-model="deliveryTimeRange"
+              type="datetimerange"
+              align="right"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              start-placeholder="开始时间"
+              end-placeholder="结束时间"
+              :default-time="['00:00:00', '23:59:59']">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn" @click="setDateRange(1)">{{
+              $t("date.t")
+              }}</div>
+            <div class="default-btn" @click="setDateRange(2)">{{
+              $t("date.y")
+              }}</div>
+            <div class="default-btn" @click="setDateRange(3)">近3天</div>
+            <div class="default-btn" @click="setDateRange(4)">近5天</div>
+            <div class="default-btn primary-btn" @click="searchChange()">{{$t("crud.searchBtn")}}</div>
+            <div class="default-btn" @click="clear()">{{ $t("product.reset") }}</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+        <div class="default-btn primary-btn" @click="addOrUpdateHandle()">{{$t("crud.addTitle")}}</div>
+        <div class="default-btn primary-btn" @click="openUploadDialog()">导入数据</div>
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 推广人名称 -->
+          <el-table-column :label="$t('promotionOrder.tgUserName')" prop="tgUserName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.tgUserName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 博主ID -->
+          <!--<el-table-column label="博主" prop="upId" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.upId}}</span>
+              <br/>
+              <span>{{ scope.row.upName}}</span>
+            </template>
+          </el-table-column>-->
+          <!--&lt;!&ndash; 博主名称 &ndash;&gt;
+          <el-table-column :label="$t('promotionOrder.upName')" prop="upName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.upName}}</span>
+            </template>
+          </el-table-column>-->
+          <!-- 博主粉丝 -->
+          <el-table-column label="博主粉丝" prop="fansNum" align="center">
+            <template slot-scope="scope">
+              <div v-for="item in scope.row.videoList">{{ item.publishPlatform + ":" + (item.fansNum? item.fansNum:"") + "\n"}}</div>
+            </template>
+          </el-table-column>
+          <!-- 订单编号 -->
+          <el-table-column :label="$t('promotionOrder.orderNumber')" prop="orderNumber" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.orderNumber}}</span>
+            </template>
+          </el-table-column>
+          <!-- 推广店铺 -->
+          <el-table-column label="推广店铺" prop="shopName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.shopName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 未发货,已发货 -->
+          <el-table-column label="订单状态" prop="status" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.status === '待发货'" type="warning">待发货</el-tag>
+              <el-tag v-if="scope.row.status === '已发货'" type="success">已发货</el-tag>
+              <el-tag v-if="scope.row.status.indexOf('部分发货') != -1" type="warning">{{scope.row.status}}</el-tag>
+            </template>
+          </el-table-column>
+          <!-- 关联视频 -->
+          <el-table-column label="推广视频" prop="promotionVideo" align="center">
+            <template slot-scope="scope">
+              <el-button size="small" @click="openPromotionVideoList(scope.row.id)">查看视频</el-button>
+            </template>
+          </el-table-column>
+          <!-- 未发货,已发货 -->
+          <el-table-column label="寄拍/付费" prop="payType" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.payType === '寄拍'" type="primary">寄拍</el-tag>
+              <el-tag v-if="scope.row.payType === '付费'" type="danger">付费:{{scope.row.payAmt}}元</el-tag>
+            </template>
+          </el-table-column>
+          <!-- 未发货,已发货 -->
+          <el-table-column label="结算状态" prop="settleStatus" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.settleStatus === '待结算'" type="danger">待结算</el-tag>
+              <el-tag v-if="scope.row.settleStatus === '已结算'" type="success">已结算</el-tag>
+            </template>
+          </el-table-column>
+          <!-- 发货时间-->
+          <el-table-column label="下单时间" prop="orderTime" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.orderTime}}</span>
+            </template>
+          </el-table-column>
+          <!-- 发货时间-->
+          <el-table-column label="发货时间" prop="deliveryTime" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.deliveryTime}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id)"
+                     >{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.id)"
+                     >{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+    <promotion-order-upload
+      v-if="uploadVisible"
+      ref="promotionOrderUpload"
+      @refreshDataList="getDataList(page)">
+    </promotion-order-upload>
+    <PromotionOrderVideo ref="promotionOrderVideo"></PromotionOrderVideo>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './promotionOrder-add-or-update'
+import PromotionOrderUpload from './promotion-order-upload'
+import PromotionOrderVideo from './promotion-order-video'
+import InputNumberRange from '@/components/input-number-range'
+import moment from "moment"
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      searchForm: {}, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false,
+      shopList: [],
+      orderTimeRange: [],
+      deliveryTimeRange: [],
+      uploadVisible: false,
+      fansNumRange:[]
+    }
+  },
+  components: {
+    AddOrUpdate,
+    PromotionOrderUpload,
+    InputNumberRange,
+    PromotionOrderVideo
+  },
+  created () {
+    this.getDataList(this.page);
+  },
+  mounted () {
+    this.getShopList()
+  },
+  methods: {
+    openPromotionVideoList(promotionOrderId){
+      this.$refs.promotionOrderVideo.init(promotionOrderId)
+    },
+    openUploadDialog(){
+      this.uploadVisible = true
+      this.$nextTick(() => {
+        this.$refs.promotionOrderUpload.init()
+      })
+    },
+    clear(){
+      this.searchForm = {}
+      this.dateRange = []
+    },
+    getShopList() {
+      this.$http({
+        url: this.$http.adornUrl('/shop/shopAuditing/list'),
+        method: 'get',
+      }).then(({ data }) => {
+        if (data) {
+          this.shopList = data
+        }
+      })
+    },
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/promotion/promotionOrder/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            startOrderTime: this.orderTimeRange == null ? null : this.orderTimeRange[0] ? this.orderTimeRange[0] : null,
+            endOrderTime: this.orderTimeRange == null ? null : this.orderTimeRange[1] ? this.orderTimeRange[1] : null,
+            startDeliveryTime: this.deliveryTimeRange == null ? null : this.deliveryTimeRange[0] ? this.deliveryTimeRange[0] : null,
+            endDeliveryTime: this.deliveryTimeRange == null ? null : this.deliveryTimeRange[1] ? this.deliveryTimeRange[1] : null,
+            startFansNum: this.fansNumRange == null ? null : this.fansNumRange[0] ? this.fansNumRange[0] : 0,
+            endFansNum: this.fansNumRange == null ? null : this.fansNumRange[1] ? this.fansNumRange[1] : 0,
+          },
+            this.searchForm
+          )
+        )
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    setDateRange(val) {
+      var startDay = null
+      var endDay = null
+      if (val === 1) {
+        startDay = 0
+        endDay = 0
+      } else if (val === 2) {
+        startDay = -1
+        endDay = -1
+      } else if (val === 3) {
+        startDay = -3
+        endDay = -1
+      } else if (val === 4) {
+        startDay = -5
+        endDay = -1
+      } else {
+        return
+      }
+      // 开始时间
+      let startTime = moment().add(startDay, 'days').startOf('days').format('LL')
+      // 结束时间
+      let endTime = moment().add(endDay, 'days').endOf('days').format('LL')
+      this.orderTimeRange = [startTime, endTime]
+      this.deliveryTimeRange = [startTime, endTime]
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/promotion/promotionOrder/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 1500,
+            onClose: () => {
+              this.refreshChange()
+            }
+          })
+        })
+      }).catch(() => { })
+    },
+    // 刷新回调
+    refreshChange () {
+      this.page.currentPage = 1
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      this.page.currentPage = 1
+      this.getDataList(null)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.mod-print-promotionOrder {
+  .search-bar {
+    .input-row {
+      .select-time-btn {
+        margin-right: 20px;
+        display: inline-block;
+        color: #AAAAAA;
+        font-size: 14px;
+        cursor: pointer;
+
+        &:last-child {
+          margin-right: 0;
+        }
+      }
+
+      .select-time-btn.is-active {
+        color: #155BD4;
+      }
+
+    }
+  }
+}
+</style>

+ 263 - 0
src/views/modules/promotion-bak/promotionVideo-add-or-update.vue

@@ -0,0 +1,263 @@
+<template>
+  <el-dialog
+    :title="!dataForm.id ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-row>
+      <el-col :span="24">
+        <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="110px">
+<!--          <el-form-item label="" prop="id">-->
+<!--            <el-input v-model="dataForm.id"size="small"></el-input>-->
+<!--          </el-form-item>-->
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="推广人" prop="tgUserName">
+                <el-input v-model="dataForm.tgUserName"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" :offset="1">
+              <el-form-item label="推广店铺" prop="shopId">
+                <el-select v-model="dataForm.shopId" placeholder="推广店铺"
+                           controls-position="right" :clearable="true" style="width: 295px">
+                  <el-option v-for="item in shopList" :key="item.shopId" :label="item.shopName" :value="item.shopId">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="博主ID" prop="upId">
+                <el-input v-model="dataForm.upId"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10"  :offset="1">
+              <el-form-item label="博主昵称" prop="upName">
+                <el-input v-model="dataForm.upName"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="21">
+              <el-form-item label="视频链接" prop="videoUrl">
+                <el-input v-model="dataForm.videoUrl"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="t+1点赞数" prop="likeNumT1">
+                <el-input v-model="dataForm.likeNumT1"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" :offset="1">
+              <el-form-item label="t+7点赞数" prop="likeNumT7">
+                <el-input v-model="dataForm.likeNumT7"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="t+1播放数" prop="playNumT1">
+                <el-input v-model="dataForm.playNumT1"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" :offset="1">
+              <el-form-item label="t+7播放数" prop="playNumT7">
+                <el-input v-model="dataForm.playNumT7"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+              <el-col :span="5">
+                <el-form-item label="发布平台" prop="publishPlatform">
+                  <el-autocomplete
+                    class="inline-input"
+                    v-model="dataForm.publishPlatform"
+                    :fetch-suggestions="querySearch"
+                    placeholder="请输入内容">
+                    <template slot-scope="{ item }">
+                      <div class="name">{{ item.label }}</div>
+                    </template>
+                  </el-autocomplete>
+                </el-form-item>
+              </el-col>
+              <el-col :span="5">
+                <el-form-item label="评论数" prop="commNum">
+                  <el-input v-model="dataForm.commNum"size="small"></el-input>
+                </el-form-item>
+              </el-col>
+            <el-col :span="5">
+              <el-form-item label="点赞数" prop="likeNum">
+                <el-input v-model="dataForm.likeNum"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="播放数" prop="playNum">
+                <el-input v-model="dataForm.playNum"size="small"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="寄拍付费" prop="payType">
+                <el-select v-model="dataForm.payType" placeholder="请选择" size="small" style="width: 295px;">
+                  <el-option :key="0" label="寄拍" value="寄拍"></el-option>
+                  <el-option :key="1" label="付费 " value="付费"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" :offset="1">
+              <el-form-item label="付费金额" prop="payAmt">
+                <el-input v-model="dataForm.payAmt"size="small" type="number"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="发布状态" prop="status">
+                <el-select v-model="dataForm.status" placeholder="请选择" size="small" style="width: 295px">
+                  <el-option :key="1" label="未发布" :value="1"></el-option>
+                  <el-option :key="2" label="已发布 " :value="2"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" :offset="1">
+              <el-form-item label="结算状态" prop="settleStatus">
+                <el-select v-model="dataForm.settleStatus" placeholder="请选择" size="small" style="width: 295px;">
+                  <el-option :key="1" label="未结算" value="未结算"></el-option>
+                  <el-option :key="2" label="已结算 " value="已结算"></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="10">
+              <el-form-item label="发布时间" prop="publishTime">
+                <el-date-picker
+                  style="width: 295px"
+                  size="small"
+                  v-model="dataForm.publishTime"
+                  type="datetime"
+                  placeholder="选择日期时间"
+                  default-time="12:00:00">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="10" :offset="1">
+            </el-col>
+          </el-row>
+    </el-form>
+      </el-col>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+      <el-button class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button class="default-btn primary-btn" type="primary" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        id: null,
+        tgUserName: null,
+        upId: null,
+        upName: null,
+        videoUrl: null,
+        likeNumT1: null,
+        playNumT1: null,
+        commNum: null,
+        likeNumT7: null,
+        playNumT7: null,
+        shopId: null,
+        shopName: null,
+        publishPlatform: null,
+        payType: null,
+        payAmt: null,
+        settleStatus: null,
+        createTime: null,
+        updateTime: null,
+        playNum: null,
+        likeNum: null,
+        status: null,
+        publishTime:null
+      },
+      dataRule: {
+      },
+      videoPlatformList: [
+        {value: '抖音', label: '抖音'},
+        {value: '小红书', label: '小红书'},
+        {value: '视频号', label: '视频号'},
+        {value: '快手', label: '快手'},
+        {value: 'B站', label: 'B站'},
+      ],
+      shopList: [],
+    }
+  },
+  mounted () {
+    this.getShopList()
+  },
+  methods: {
+    init (id) {
+      this.dataForm.id = id || 0
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].resetFields()
+        if (this.dataForm.id) {
+          this.$http({
+            url: this.$http.adornUrl('/promotion/promotionVideo/info/' + this.dataForm.id),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    querySearch (queryString, cb) {
+      var restaurants = this.videoPlatformList
+      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
+      // 调用 callback 返回建议列表的数据
+      cb(results)
+    },
+    createFilter (queryString) {
+      return (restaurant) => {
+        return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
+      }
+    },
+    getShopList() {
+      this.$http({
+        url: this.$http.adornUrl('/shop/shopAuditing/list'),
+        method: 'get',
+      }).then(({ data }) => {
+        if (data) {
+          this.shopList = data
+        }
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/promotion/promotionVideo'),
+            method: this.dataForm.id ? 'put' : 'post',
+            data: this.$http.adornData(this.dataForm)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+            })
+            this.visible = false
+            this.$emit('refreshDataList')
+          })
+        }
+      })
+    }
+  }
+}
+</script>

+ 448 - 0
src/views/modules/promotion-bak/promotionVideo.vue

@@ -0,0 +1,448 @@
+<template>
+  <div class="mod-print-promotionVideo">
+    <!-- 搜索相关区域 -->
+    <div class="search-bar">
+      <el-form :inline="true" :model="searchForm" @keyup.enter.native="getDataList(this.page)" size="small">
+        <el-form-item label="视频ID" prop="id">
+          <el-input v-model="searchForm.id" :clearable="true"></el-input>
+        </el-form-item>
+        <el-form-item label="推广人" prop="tgUserName">
+          <el-input v-model="searchForm.tgUserName" :clearable="true"></el-input>
+        </el-form-item>
+        <el-form-item label="推广店铺" prop="shopId">
+          <el-select v-model="searchForm.shopId" placeholder="推广店铺"
+                     controls-position="right" :clearable="true">
+            <el-option v-for="item in shopList" :key="item.shopId" :label="item.shopName" :value="item.shopId">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="博主ID" prop="upId">
+          <el-input v-model="searchForm.upId" :clearable="true"></el-input>
+        </el-form-item>
+        <el-form-item label="博主名称" prop="upName">
+          <el-input v-model="searchForm.upName" :clearable="true"></el-input>
+        </el-form-item>
+        <!--<el-form-item label="t+1点赞数" prop="likeNumT1">
+          <el-input v-model="searchForm.likeNumT1"></el-input>
+        </el-form-item>
+        <el-form-item label="t+1播放数" prop="playNumT1">
+          <el-input v-model="searchForm.playNumT1"></el-input>
+        </el-form-item>
+        <el-form-item label="评论数" prop="commNum">
+          <el-input v-model="searchForm.commNum"></el-input>
+        </el-form-item>
+        <el-form-item label="t+7点赞数" prop="likeNumT7">
+          <el-input v-model="searchForm.likeNumT7"></el-input>
+        </el-form-item>
+        <el-form-item label="t+7播放数" prop="playNumT7">
+          <el-input v-model="searchForm.playNumT7"></el-input>
+        </el-form-item>
+        <el-form-item label="总点赞数" prop="likeNum">
+          <el-input v-model="searchForm.likeNum"></el-input>
+        </el-form-item>
+        <el-form-item label="总播放数" prop="playNum">
+          <el-input v-model="searchForm.playNum"></el-input>
+        </el-form-item>-->
+        <el-form-item label="发布平台" prop="publishPlatform">
+          <el-autocomplete
+            class="inline-input"
+            v-model="searchForm.publishPlatform"
+            :fetch-suggestions="querySearch"
+            placeholder="请输入内容">
+            <template slot-scope="{ item }">
+              <div class="name">{{ item.label }}</div>
+            </template>
+          </el-autocomplete>
+        </el-form-item>
+        <el-form-item label="寄拍/付费" prop="payType">
+          <el-select v-model="searchForm.payType" placeholder="请选择" size="small" :clearable="true">
+            <el-option :key="0" label="寄拍" value="寄拍"></el-option>
+            <el-option :key="1" label="付费 " value="付费"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="发布状态" prop="status">
+          <el-select v-model="searchForm.status" placeholder="发布状态" size="small" :clearable="true">
+            <el-option :key="1" label="待发布" value="待发布"></el-option>
+            <el-option :key="2" label="已发布 " value="已发布"></el-option>
+          </el-select>
+        </el-form-item>
+        <!--<el-form-item label="结算状态" prop="settleStatus">
+          <el-select v-model="searchForm.settleStatus" placeholder="请选择" size="small" :clearable="true">
+            <el-option :key="1" label="未结算" value="未结算"></el-option>
+            <el-option :key="2" label="已结算 " value="已结算"></el-option>
+          </el-select>
+        </el-form-item>-->
+        <el-form-item label="粉丝数:" label-width="85px">
+          <InputNumberRange v-model="fansNumRange"></InputNumberRange>
+        </el-form-item>
+        <el-form-item label="点赞数量:" label-width="85px">
+          <InputNumberRange v-model="likeNumRange"></InputNumberRange>
+        </el-form-item>
+        <el-form-item label="评论数量:" label-width="85px">
+          <InputNumberRange v-model="commNumRange"></InputNumberRange>
+        </el-form-item>
+        <el-form-item label="发布时间" prop="publishTime">
+          <el-date-picker
+            :clearable="true"
+            v-model="publishTimeDateRange"
+            type="datetimerange"
+            align="right"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            start-placeholder="开始时间"
+            end-placeholder="结束时间"
+            :default-time="['00:00:00', '23:59:59']">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item>
+          <div class="default-btn" @click="setDateRange(1)">{{
+              $t("date.t")
+            }}</div>
+          <div class="default-btn" @click="setDateRange(2)">{{
+              $t("date.y")
+            }}</div>
+          <div class="default-btn" @click="setDateRange(3)">近3天</div>
+          <div class="default-btn" @click="setDateRange(4)">近5天</div>
+          <div class="default-btn primary-btn" @click="searchChange()">{{$t("crud.searchBtn")}}</div>
+<!--          <div class="default-btn" @click="getSoldExcel()">{{ $t("order.export") }}</div>-->
+          <div class="default-btn" @click="clear()">{{ $t("product.reset") }}</div>
+        </el-form-item>
+      </el-form>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+<!--        <div class="default-btn primary-btn" @click="addOrUpdateHandle()"-->
+<!--             v-if="isAuth('print:promotionVideo:save')">{{$t("crud.addTitle")}}</div>-->
+<!--        <div class="default-btn primary-btn" @click="addOrUpdateHandle()">{{$t("crud.addTitle")}}</div>-->
+<!--        <div class="default-btn primary-btn" @click="openUploadDialog()">导入数据</div>-->
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 视频ID -->
+          <el-table-column label="视频ID" prop="id" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.id}}</span>
+            </template>
+          </el-table-column>
+          <!-- 推广人名称 -->
+          <el-table-column :label="$t('promotionVideo.tgUserName')" prop="tgUserName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.tgUserName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 店铺名称 -->
+          <el-table-column label="店铺" prop="shopName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.shopName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 博主ID -->
+          <el-table-column label="博主" prop="upId" align="center" width="150px">
+            <template slot-scope="scope">
+              <span>{{ scope.row.upId}}</span>
+              <br/>
+              <span>{{ scope.row.upName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 粉丝数 -->
+          <el-table-column label="粉丝数" prop="fansNum" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.fansNum}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="点赞数" prop="likeNum" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.likeNum}}</span>
+            </template>
+          </el-table-column>
+          <!--&lt;!&ndash; t+1点赞数 &ndash;&gt;
+          <el-table-column :label="$t('promotionVideo.likeNumT1')" prop="likeNumT1" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.likeNumT1}}</span>
+            </template>
+          </el-table-column>
+          &lt;!&ndash; t+1播放数 &ndash;&gt;
+          <el-table-column :label="$t('promotionVideo.playNumT1')" prop="playNumT1" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.playNumT1}}</span>
+            </template>
+          </el-table-column>-->
+          <!-- 评论数 -->
+          <el-table-column label="评论数" prop="commNum" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.commNum}}</span>
+            </template>
+          </el-table-column>
+          <!--&lt;!&ndash; t+7点赞数 &ndash;&gt;
+          <el-table-column :label="$t('promotionVideo.likeNumT7')" prop="likeNumT7" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.likeNumT7}}</span>
+            </template>
+          </el-table-column>
+          &lt;!&ndash; t+7播放数 &ndash;&gt;
+          <el-table-column :label="$t('promotionVideo.playNumT7')" prop="playNumT7" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.playNumT7}}</span>
+            </template>
+          </el-table-column>-->
+          <!-- 总点赞数 -->
+
+          <!-- 总播放数 -->
+          <el-table-column label="播放数" prop="playNum" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.playNum}}</span>
+            </template>
+          </el-table-column>
+          <!-- 发布平台 -->
+          <el-table-column :label="$t('promotionVideo.publishPlatform')" prop="publishPlatform" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.publishPlatform}}</span>
+            </template>
+          </el-table-column>
+          <!-- 视频链接 -->
+          <el-table-column :label="$t('promotionVideo.videoUrl')" prop="videoUrl" align="center" width="200px">
+            <template slot-scope="scope">
+              <el-tooltip effect="dark" placement="top">
+                <div slot="content">{{scope.row.videoUrl}}</div>
+                <span style="overflow: hidden;width: 50px;white-space: nowrap;">{{scope.row.videoUrl}}</span>
+              </el-tooltip>
+            </template>
+          </el-table-column>
+          <!-- 是否付费,0寄拍,1付费 -->
+          <el-table-column label="寄拍/付费" prop="payType" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.payType === '付费'" type="danger">付费:{{scope.row.payAmt}}元</el-tag>
+              <el-tag v-if="scope.row.payType === '寄拍'" type="primary">寄拍</el-tag>
+            </template>
+          </el-table-column>
+          <!-- 结算状态 -->
+          <el-table-column :label="$t('promotionVideo.settleStatus')" prop="settleStatus" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.settleStatus === '未结算'" type="danger">未结算</el-tag>
+              <el-tag v-if="scope.row.settleStatus === '已结算'" type="success">已结算</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="发布状态" prop="status" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.status === '待发布'" type="warning">待发布</el-tag>
+              <el-tag v-if="scope.row.status === '已发布'" type="success">已发布</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column label="发布时间" prop="publishTime" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.publishTime}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id)"
+                     >{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.id)"
+                     >{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+    <promotion-video-upload
+      v-if="uploadVisible"
+      ref="promotionVideoUpload"
+      @refreshDataList="getDataList(page)">
+    </promotion-video-upload>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './promotionVideo-add-or-update'
+import PromotionVideoUpload from './promotion-video-upload'
+import InputNumberRange from '@/components/input-number-range'
+import moment from "moment";
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      searchForm: {}, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false,
+      shopList: [],
+      videoPlatformList: [
+        {value: '抖音', label: '抖音'},
+        {value: '小红书', label: '小红书'},
+        {value: '视频号', label: '视频号'},
+        {value: '快手', label: '快手'},
+        {value: 'B站', label: 'B站'},
+      ],
+      publishTimeDateRange:[],
+      uploadVisible: false,
+      fansNumRange: [],
+      likeNumRange: [],
+      commNumRange: [],
+    }
+  },
+  components: {
+    AddOrUpdate,
+    PromotionVideoUpload,
+    InputNumberRange
+  },
+  created () {
+    this.getDataList(this.page);
+  },
+  mounted () {
+    this.getShopList()
+  },
+  methods: {
+    openUploadDialog(){
+      this.uploadVisible = true
+      this.$nextTick(() => {
+        this.$refs.promotionVideoUpload.init()
+      })
+    },
+    clear(){
+      this.searchForm = {}
+      this.publishTimeDateRange = []
+    },
+    getShopList() {
+      this.$http({
+        url: this.$http.adornUrl('/shop/shopAuditing/list'),
+        method: 'get',
+      }).then(({ data }) => {
+        if (data) {
+          this.shopList = data
+        }
+      })
+    },
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/promotion/promotionVideo/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize,
+            startLikeNum: this.likeNumRange === null ? null : this.likeNumRange[0] ? this.likeNumRange[0]:0,
+            endLikeNum: this.likeNumRange === null ? null : this.likeNumRange[1] ? this.likeNumRange[1]:0,
+            startCommNum: this.commNumRange === null ? null : this.commNumRange[0] ? this.commNumRange[0]:0,
+            endCommNum: this.commNumRange === null ? null : this.commNumRange[1] ? this.commNumRange[1]:0,
+            startFansNum: this.fansNumRange === null ? null : this.fansNumRange[0] ? this.fansNumRange[0]:0,
+            endFansNum: this.fansNumRange === null ? null : this.fansNumRange[1] ? this.fansNumRange[1]:0,
+            startPublishTime: this.publishTimeDateRange === null ? null : this.publishTimeDateRange[0] ? this.publishTimeDateRange[0]:null,
+            endPublishTime: this.publishTimeDateRange === null ? null : this.publishTimeDateRange[1] ? this.publishTimeDateRange[1]:null,
+          },
+            this.searchForm
+          )
+        )
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    querySearch (queryString, cb) {
+      var restaurants = this.videoPlatformList
+      var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
+      // 调用 callback 返回建议列表的数据
+      cb(results)
+    },
+    createFilter (queryString) {
+      return (restaurant) => {
+        return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0)
+      }
+    },
+    setDateRange(val) {
+      var startDay = null
+      var endDay = null
+      if (val === 1) {
+        startDay = 0
+        endDay = 0
+      } else if (val === 2) {
+        startDay = -1
+        endDay = -1
+      } else if (val === 3) {
+        startDay = -3
+        endDay = -1
+      } else if (val === 4) {
+        startDay = -5
+        endDay = -1
+      } else {
+        return
+      }
+      // 开始时间
+      let startTime = moment().add(startDay, 'days').startOf('days').format('LL')
+      // 结束时间
+      let endTime = moment().add(endDay, 'days').endOf('days').format('LL')
+      this.publishTimeDateRange = [startTime, endTime]
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/promotion/promotionVideo/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+          })
+          this.refreshChange()
+        })
+      }).catch(() => { })
+    },
+    // 刷新回调
+    refreshChange () {
+      this.page.currentPage = 1
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      this.page.currentPage = 1
+      this.getDataList(null)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.mod-print-promotionVideo {
+}
+</style>

+ 170 - 0
src/views/modules/settlement/print-settlement-add-or-update.vue

@@ -0,0 +1,170 @@
+<template>
+  <el-dialog
+    :title="!dataForm.thirdSettleId ? '新增结算账单' : '编辑结算账单'"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    v-if="visible"
+    width="760px"
+    @close="dialogClose">
+    <el-form
+      :model="dataForm"
+      label-width="100px"
+      size="small"
+      ref="dataForm">
+      <el-form-item label="打印渠道">
+        <el-select v-model="dataForm.printChannel" placeholder="请选择打印渠道" :disabled="dataForm.thirdSettleId != null">
+          <el-option key="Lightning" label="闪电" value="Lightning"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item class="settleName" label="结算名称" prop="settleName" style="width: 400px">
+        <el-input v-model="dataForm.settleName" maxlength="50" show-word-limit></el-input>
+      </el-form-item>
+      <el-form-item label="结算时段">
+        <el-date-picker style="width: 400px"
+          v-model="dateRange"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          format="yyyy-MM-dd HH:mm:ss"
+          type="datetimerange"
+          start-placeholder="结算开始时间"
+          end-placeholder="结算结束时间"
+          :default-time="['00:00:00', '23:59:59']">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="结算状态">
+        <el-select v-model="dataForm.status" placeholder="请选择结算状态">
+          <el-option label="待结算" :value="0"></el-option>
+          <el-option label="已结算" :value="1"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="结算凭证" prop="pic">
+        <img-upload v-model="dataForm.pic"></img-upload>
+        <div v-if="dataForm.pic" @click="dataForm.pic = ''" class="default-btn">删除</div>
+      </el-form-item>
+      <el-form-item label="备注" prop="remark" style="width: 400px">
+        <el-input type="textarea" v-model="dataForm.remark"></el-input>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <div class="default-btn"  @click="dialogClose">{{$t('crud.filter.cancelBtn')}}</div>
+      <div class="default-btn primary-btn" @click="dataFormSubmit()" :loading="updateLoadingVisible">{{$t('crud.filter.submitBtn')}}</div>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import ImgUpload from '@/components/img-upload'
+
+  export default {
+    data () {
+      return {
+        visible: false,
+        dataForm: {
+          thirdSettleId: null,
+          settleName: null,
+          startTime: null,
+          endTime: null,
+          deliveryCode: null,
+          pic: null,
+          remark: null,
+          printChannel: null,
+          status: 0,
+          shopId: this.$store.state.user.shopId
+        },
+        resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+        dateRange:[],
+        isSubmit: false,
+        updateLoadingVisible: false
+      }
+    },
+    components: {
+      ImgUpload
+    },
+    methods: {
+      init (thirdSettleId) {
+        this.visible = true;
+        this.dataForm.thirdSettleId = thirdSettleId;
+        this.$nextTick(() => {
+          if(thirdSettleId){
+            this.getDataInfo();
+          }
+        });
+      },
+      dialogClose(){
+        this.visible = false;
+        this.dataForm = {settleName: null, startTime: null, endTime: null, status: 0, pic: null, remark:null, printChannel:null};
+        this.dateRange = [];
+        this.$emit('refreshDataList');
+      },
+      // 获取店铺详情数据
+      getDataInfo () {
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlement/info/' + this.dataForm.thirdSettleId),
+          method: 'get',
+          params: this.$http.adornParams()
+        }).then(({data}) => {
+          this.dataForm = data;
+          this.$set(this.dateRange, 0, this.dataForm.startTime);
+          this.$set(this.dateRange, 1, this.dataForm.endTime);
+        })
+      },
+      // 重置表单
+      resetForm () {
+        this.$refs.dataForm.resetFields()
+      },
+      // 表单提交
+      dataFormSubmit () {
+        this.updateLoadingVisible = true;
+        this.dataForm.startTime = this.dateRange === null ? null : this.dateRange[0];
+        this.dataForm.endTime = this.dateRange === null ? null : this.dateRange[1];
+        let url = '/printSettlement/thirdPrintSettlement/generateSettlement';
+        if(this.dataForm.thirdSettleId){
+          url = '/printSettlement/thirdPrintSettlement/update'
+        }
+        this.$http({
+          url: this.$http.adornUrl(url),
+          method: 'POST',
+          data: this.$http.adornData(this.dataForm)
+        }).then(({data}) => {
+          this.updateLoadingVisible = false;
+          if(data){
+            this.$message({
+              message: '提交成功',
+              type: 'success',
+            })
+            this.dialogClose();
+          }else{
+            this.$message({
+              message: '提交失败',
+              type: 'success',
+            })
+          }
+        }).catch((e) => {
+
+        })
+      },
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .map {
+    width: 100%;
+    height: 500px;
+  }
+  .el-date-editor.el-input, .el-date-editor.el-input__inner {
+    width: 240px;
+  }
+  .area-select {
+    display: flex;
+    .el-select.el-select--smalll {
+      width: 172px;
+    }
+  }
+</style>
+<style scoped>
+  .settleName >>> .el-input__inner {
+    padding-right: 45px !important;
+  }
+  .addr >>> .el-input__inner {
+    padding-right: 55px;
+  }
+</style>

+ 406 - 0
src/views/modules/settlement/third-print-settlement-delivery.vue

@@ -0,0 +1,406 @@
+<template>
+  <div class="mod-transport">
+    <!-- 搜索栏 -->
+    <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-input type="text" v-model="searchForm.waveNo" placeholder="请输入波次号"></el-input>
+          </el-form-item>
+          <el-form-item label="备注名" class="search-form-item">
+            <el-input type="text" v-model="searchForm.waveName" placeholder="请输入备注名"></el-input>
+          </el-form-item>
+          <el-form-item label="生产状态"  :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-select
+              v-model="searchForm.productionStatus"
+              clearable
+              placeholder="请选择生产状态"
+              size="small">
+              <el-option key="0" label="未生成" value="0"></el-option>
+              <el-option key="1" label="已生产" value="1"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="运单号状态"  :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-select
+              v-model="searchForm.expressBillStatus"
+              clearable
+              placeholder="请选择运单号状态"
+              size="small">
+              <el-option key="0" label="未获取" value="0"></el-option>
+              <el-option key="1" label="已获取" value="1"></el-option>
+            </el-select>
+          </el-form-item>
+          <!--<el-form-item label="发货状态"  :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-select
+              v-model="searchForm.scanStatus"
+              clearable
+              placeholder="请选择发货状态"
+              size="small">
+              <el-option key="0" label="未扫描" value="0"></el-option>
+              <el-option key="1" label="部分扫描" value="1"></el-option>
+              <el-option key="2" label="全部已扫描" value="2"></el-option>
+            </el-select>
+          </el-form-item>-->
+          <el-form-item label="生成时间"   :label-width=" lang === 'en' ? '145px' : '85px'">
+            <el-date-picker
+              size="small"
+              v-model="dateRange"
+              type="datetimerange"
+              :range-separator="this.$i18n.t('time.tip')"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              :start-placeholder="this.$i18n.t('time.start')"
+              :end-placeholder="this.$i18n.t('time.end')"
+            ></el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange(true)">{{$t('crud.searchBtn')}}</div>
+            <div class="default-btn" @click="resetSearchForm('searchForm')">{{$t('shop.resetMap')}}</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+
+    <div class="main-container">
+      <!-- 表格 -->
+      <div class="table-con transport-table">
+        <el-table
+          ref="waveTable"
+          :data="dataList"
+          border
+          header-cell-class-name="table-header"
+          row-class-name="table-row-low"
+          style="width: 100%">
+          <el-table-column
+            align="center"
+            prop="waveNo"
+            label="波次号">
+            <template slot-scope="scope">
+              <span class="table-cell-text">{{ scope.row.waveNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="备注名"
+            align="center"
+            prop="waveName">
+            <template slot-scope="scope">
+              <span>{{scope.row.waveName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="生产状态"
+            align="center"
+            prop="productionStatus">
+            <template slot-scope="scope">
+              <span v-if="scope.row.productionStatus == 0">未生产</span>
+              <span v-else-if="scope.row.productionStatus == 1">已生产</span>
+              <span v-else>未知</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            prop="orderNum"
+            label="订单数量"
+          >
+            <template slot-scope="scope">
+              <span>{{scope.row.orderNum }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            label="生成时间"
+            prop="createTime"
+          >
+            <template slot-scope="scope">
+              <span>{{scope.row.createTime }}</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            prop="expressBillStatus"
+            label="运单号状态"
+          >
+            <template slot-scope="scope">
+              <span v-if="scope.row.expressBillStatus == 0">未获取</span>
+              <span v-else-if="scope.row.expressBillStatus == 1">已获取</span>
+              <span v-else>未知</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="scanStatus"
+            label="发货状态"
+          >
+            <template slot-scope="scope">
+              <span v-if="scope.row.scanStatus == 0">未发货</span>
+              <span v-else-if="scope.row.scanStatus == 1">部分发货({{scope.row.scanNum}}/{{scope.row.orderNum}})</span>
+              <span v-else-if="scope.row.scanStatus == 2">全部已发货</span>
+              <span v-else>未知</span>
+            </template>
+          </el-table-column>
+
+          <el-table-column
+            align="center"
+            :label="$t('crud.menu')"
+            width="150"
+          >
+            <template slot-scope="scope">
+              <div style="display: inline-block;float: left;">
+<!--                  <el-button size="mini" @click="downloadWavePrintOrderPdf(scope.row)" :loading="wavePrintOrderPdfDownloadLoading" :disabled="scope.row.productionStatus == 0">下载PDF包</el-button>-->
+<!--                  <el-button size="mini" :loading="wavePrintOrderInfoDownloadLoading" @click="downloadWavePrintOrderInfo(scope.row)" :disabled="scope.row.productionStatus == 0">下载订单信息</el-button>-->
+<!--                  <el-button size="mini" @click="openScanDialog(scope.row)" :disabled="scope.row.productionStatus == 0">扫描发货</el-button>-->
+              </div>
+              <div
+                class="default-btn text-btn operate-btn"
+                @click="openWaveDetailDialog(scope.row)">详情</div>
+              <div
+                class="default-btn text-btn"
+                @click="openWaveModifyDialog(scope.row)">
+                编辑
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+      <!-- 分页 -->
+      <el-pagination
+        v-if="dataList.length"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="page.currentPage"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="page.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total">
+      </el-pagination>
+    </div>
+    <!-- 波次详情 -->
+    <wave-print-order ref="wavePrintOrder" @refressWaveList="getDataList"></wave-print-order>
+
+<!--    <order-scan-delivery ref="orderScanDelivery" @refreshDataList="getDataList"></order-scan-delivery>-->
+
+    <!-- 修改波次 -->
+    <el-dialog
+      title="修改波次"
+      :visible.sync="modifyVisible"
+      v-if="modifyVisible"
+      width="40%"
+      center
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <el-form :model="modifyWave">
+        <el-form-item label="波次号" label-width="100px">
+          <span autocomplete="off">{{modifyWave.waveNo}}</span>
+        </el-form-item>
+        <el-form-item label="备注名" label-width="100px">
+          <el-input v-model="modifyWave.waveName" autocomplete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="modifyHandle(modifyWave)">确 认</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import {downloadXls} from "@/utils/excel";
+  import {downloadZip} from "@/utils/zip";
+  import OrderScanDelivery from '@/components/order-scan-delivery';
+  export default {
+    components: {OrderScanDelivery},
+    data () {
+      return {
+        theData: null, // 保存上次点击查询的请求条件
+
+        dataForm: {
+          transName: ''
+        },
+        dataList: [],
+        dataListLoading: false,
+        dataListSelections: [],
+        modifyVisible: false,
+        modifyWave: {},
+        lang: localStorage.getItem('lang'),
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 10 // 每页显示多少条
+        },
+        searchForm: {},
+        dateRange: [],
+        selectAll: false,
+        wavePrintOrderInfoDownloadLoading: false,
+        wavePrintOrderPdfDownloadLoading: false,
+        wavePrintOrderVisible: false
+
+      }
+    },
+    created () {
+      this.getDataList()
+    },
+    methods: {
+      // 获取数据列表
+      getDataList (page, newData = false) {
+        this.dataListLoading = true
+        if (newData || !this.theData) {
+          this.searchForm
+          this.searchForm.startTime = this.dateRange === null ? null : this.dateRange[0], // 开始时间
+          this.searchForm.endTime = this.dateRange === null ? null : this.dateRange[1], // 结束时间
+          this.theData = JSON.parse(JSON.stringify(this.searchForm))
+        }
+        this.$http({
+          url: this.$http.adornUrl('/wave/wave/page'),
+          method: 'get',
+          params: this.$http.adornParams(
+            Object.assign(
+              {
+                current: page == null ? this.page.currentPage : page.currentPage,
+                size: page == null ? this.page.pageSize : page.pageSize
+              },
+              this.theData
+            )
+          )
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.page.total = data.total
+          this.dataListLoading = false
+        })
+      },
+      // 新增 / 修改
+      openWaveDetailDialog (wave) {
+        this.$refs.wavePrintOrder.init(wave)
+      },
+      openWaveModifyDialog (wave) {
+        this.modifyVisible = true;
+        this.modifyWave = wave;
+      },
+      downloadWavePrintOrderInfo(wave){
+        this.wavePrintOrderInfoDownloadLoading = true;
+        this.$http({
+          url: this.$http.adornUrl('/wave/wave/downloadWavePrintOrderInfo'),
+          method: 'get',
+          params: this.$http.adornParams({waveId: wave.waveId, printChannel: wave.printChannel}),
+          responseType: 'blob'
+        }).then(({data}) => {
+          this.wavePrintOrderInfoDownloadLoading = false;
+          let fileName = wave.waveNo + "_" + wave.waveName + "_订单信息";
+          downloadXls(data, fileName + ".xlsx");
+        }).catch((error) => {
+          this.wavePrintOrderInfoDownloadLoading = false;
+        })
+      },
+      downloadWavePrintOrderPdf(wave){
+        this.wavePrintOrderPdfDownloadLoading = true;
+        let dataBody = {"printChannel": wave.printChannel, "waveId": wave.waveId};
+        this.$http({
+          url: this.$http.adornUrl('/wave/wave/downloadWavePrintOrderPdf'),
+          method: 'get',
+          params: this.$http.adornParams(dataBody),
+          responseType: 'blob'
+        }).then(({data}) => {
+          this.wavePrintOrderPdfDownloadLoading = false;
+          let fileName = wave.waveNo + "_" + wave.waveName;
+          downloadZip(data, fileName + ".zip");
+        }).catch((error) => {
+          this.wavePrintOrderPdfDownloadLoading = false;
+        })
+      },
+      /**
+       * 全选按钮
+       */
+      handleSelectAll () {
+        if (this.$refs.transportTable.selection.length < this.dataList.length) {
+          this.selectAll = true
+        } else {
+          this.selectAll = false
+        }
+        this.$refs.waveTable.toggleAllSelection()
+      },
+      // 修改
+      modifyHandle (row) {
+        this.$http({
+          url: this.$http.adornUrl(`/wave/wave/modify`),
+          method: 'POST',
+          data: this.$http.adornData(row)
+        }).then(({data}) => {
+          this.modifyVisible = false;
+          if(data){
+            this.$message({
+              message: "修改成功",
+              type: 'success'
+            })
+            this.getDataList(this.page);
+          }else{
+            this.$message({
+              message: "修改失败",
+              type: 'error'
+            })
+          }
+        })
+      },
+      // 删除
+      deleteHandle (row) {
+        this.$confirm('确定要删除波次吗?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.$http({
+            url: this.$http.adornUrl(`/wave/wave/deleteWave`),
+            method: 'POST',
+            data: this.$http.adornData(row)
+          }).then(({data}) => {
+            if(data){
+              this.$message({
+                message: "删除成功",
+                type: 'success'
+              })
+              this.getDataList(this.page);
+            }else{
+              this.$message({
+                message: "删除失败",
+                type: 'error'
+              })
+            }
+          })
+        })
+      },
+
+      // 条件查询
+      searchChange (newData = false) {
+        this.page.currentPage = 1
+        this.getDataList(this.page, newData)
+      },
+      openScanDialog(row){
+        this.$refs.orderScanDelivery.init(row);
+      },
+
+      /**
+       * 重置表单
+       * @param {String} formName 表单名称
+       */
+      resetSearchForm (formName) {
+        this.$refs[formName].resetFields()
+        this.searchForm = {}
+      },
+      handleSizeChange (val) {
+        this.page.pageSize = val
+        this.getDataList()
+      },
+      handleCurrentChange (val) {
+        this.page.currentPage = val
+        this.getDataList()
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 191 - 0
src/views/modules/settlement/third-print-settlement-detail.vue

@@ -0,0 +1,191 @@
+<template>
+  <el-dialog
+    :title="'【' + settlement.settleName + '】结算账单详情信息'"
+    :close-on-click-modal="false"
+    :visible.sync="visible"
+    v-if="visible"
+    @close="dialogClose"
+    :fullscreen="true">
+
+    <el-collapse v-model="activeNames">
+      <el-collapse-item title="材质结算详情" name="detail">
+        <div class="main-container">
+          <!-- 表格 -->
+          <div class="table-con transport-table">
+            <el-table
+              ref="waveTable"
+              :data="detailList"
+              border
+              header-cell-class-name="table-header"
+              row-class-name="table-row-low"
+              style="width: 100%">
+              <el-table-column
+                align="left"
+                prop="prodName"
+                width="300px"
+                label="产品名称">
+                <template slot-scope="scope">
+                  <span class="table-cell-text">{{ scope.row.prodName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                align="center"
+                prop="skuName"
+                label="订单材质">
+                <template slot-scope="scope">
+                  <span class="table-cell-text">{{ scope.row.skuName }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="订单数量"
+                align="center"
+                prop="orderNums">
+                <template slot-scope="scope">
+                  <span>{{scope.row.orderNums }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                label="材质张数"
+                align="center"
+                prop="skuNums">
+                <template slot-scope="scope">
+                  <span>{{scope.row.skuNums }}</span>
+                </template>
+              </el-table-column>
+
+              <el-table-column
+                align="center"
+                prop="skuPrice"
+                label="材质单价">
+                <template slot-scope="scope">
+                  <span>{{scope.row.skuPrice }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                align="center"
+                prop="skuAmount"
+                label="小计金额">
+                <template slot-scope="scope">
+                  <span>{{scope.row.skuAmount }}</span>
+                </template>
+              </el-table-column>
+
+              <!--<el-table-column
+                align="center"
+                :label="$t('crud.menu')"
+                width="150"
+              >
+                <template slot-scope="scope">
+                  <div style="display: inline-block;float: left;">
+                    &lt;!&ndash;                  <el-button size="mini" @click="downloadWavePrintOrderPdf(scope.row)" :loading="wavePrintOrderPdfDownloadLoading" :disabled="scope.row.productionStatus == 0">下载PDF包</el-button>&ndash;&gt;
+                    &lt;!&ndash;                  <el-button size="mini" :loading="wavePrintOrderInfoDownloadLoading" @click="downloadWavePrintOrderInfo(scope.row)" :disabled="scope.row.productionStatus == 0">下载订单信息</el-button>&ndash;&gt;
+                    &lt;!&ndash;                  <el-button size="mini" @click="openScanDialog(scope.row)" :disabled="scope.row.productionStatus == 0">扫描发货</el-button>&ndash;&gt;
+                  </div>
+                  <div
+                    class="default-btn text-btn operate-btn"
+                    @click="openWaveDetailDialog(scope.row)">详情</div>
+                  <div
+                    class="default-btn text-btn"
+                    @click="openWaveModifyDialog(scope.row)">
+                    编辑
+                  </div>
+                </template>
+              </el-table-column>-->
+            </el-table>
+          </div>
+
+          <!-- 分页 -->
+          <el-pagination
+            v-if="detailList.length"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="page.currentPage"
+            :page-sizes="[10, 20, 50, 100]"
+            :page-size="page.pageSize"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="page.total">
+          </el-pagination>
+        </div>
+      </el-collapse-item>
+    </el-collapse>
+
+  </el-dialog>
+</template>
+
+<script>
+  import {downloadXls} from "@/utils/excel";
+  export default {
+    components: {},
+    data () {
+      return {
+        theData: null, // 保存上次点击查询的请求条件
+        thirdSettleId: null,
+        detailList: [],
+        deliveryList: [],
+        delivery: {},
+        settlement: {},
+        activeNames: 'detail',
+        detailListLoading: false,
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 50 // 每页显示多少条
+        },
+        visible: false,
+      }
+    },
+    created () {
+      // this.getDetailDataList()
+    },
+    methods: {
+      init (settlement) {
+        this.visible = true;
+        this.settlement = settlement;
+        this.$nextTick(() => {
+          if(settlement.thirdSettleId){
+            //获取sku结算详情
+            //获取快递结算详情
+            this.getDetailDataList(this.page);
+          }
+        });
+      },
+      // 获取数据列表
+      getDetailDataList (page, newData = false) {
+        this.detailListLoading = true
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlementDetail/page'),
+          method: 'GET',
+          params: this.$http.adornParams(
+            Object.assign(
+              {
+                current: page == null ? this.page.currentPage : page.currentPage,
+                size: page == null ? this.page.pageSize : page.pageSize,
+                'thirdPrintSettlementId': this.settlement.thirdSettleId,
+                'printChannel': this.settlement.printChannel
+              },
+            )
+          )
+        }).then(({data}) => {
+          this.detailList = data.records
+          this.page.total = data.total
+          this.detailListLoading = false
+        })
+      },
+      dialogClose(){
+
+      },
+      handleSizeChange (val) {
+        this.page.pageSize = val
+        this.getDetailDataList(this.page, false)
+      },
+      handleCurrentChange (val) {
+        this.page.currentPage = val
+        this.getDetailDataList(this.page, false)
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 576 - 0
src/views/modules/settlement/third-print-settlement.vue

@@ -0,0 +1,576 @@
+<template>
+  <div class="mod-transport">
+    <!-- 搜索栏 -->
+    <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="推广店铺" prop="shopId">
+            <el-select v-model="searchForm.shopId" placeholder="推广店铺"
+                       controls-position="right" :clearable="true">
+              <el-option v-for="item in shopList" :key="item.shopId" :label="item.shopName" :value="item.shopId">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="结算名称" class="search-form-item">
+            <el-input type="text" v-model="searchForm.settleName" placeholder="请输入结算名称"></el-input>
+          </el-form-item>
+          <el-form-item label="结算状态" class="search-form-item">
+            <el-select
+              v-model="searchForm.status"
+              clearable
+              placeholder="请选择结算状态"
+              size="small">
+              <el-option key="0" label="待结算" value="0"></el-option>
+              <el-option key="1" label="已结算" value="1"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="结算时段" class="search-form-item">
+            <el-date-picker
+              :default-time="['00:00:00', '23:59:59']"
+              v-model="dateRange"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始时间"
+              end-placeholder="结束时间"
+              value-format="yyyy-MM-dd HH:mm:ss">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange(true)">{{$t('crud.searchBtn')}}</div>
+            <div class="default-btn" @click="resetSearchForm('searchForm')">{{$t('shop.resetMap')}}</div>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+
+    <div class="main-container">
+      <!-- 操作栏 -->
+      <div class="operation-bar">
+        <div
+          class="default-btn primary-btn"
+          @click="addOrUpdateHandle()">
+          新增结算
+        </div>
+      </div>
+      <div style="margin-top: 10px; width: 1000px;">
+        <el-row :gutter="12">
+          <el-col :span="4">
+            <el-card :body-style="{padding:'10px'}"shadow="never">
+              <div>
+                <span style="font-size: 16px">待结算总金额</span>
+                <div style="margin-top: 5px;">
+                  <span v-if="stat.settleAmount" style="color: green; font-weight: bold;font-size: 20px">+ ¥{{parseFloat(stat.settleAmount).toFixed(2)}}</span>
+                  <span v-else style="color: green; font-weight: bold;font-size: 20px">+ ¥0</span>
+                </div>
+              </div>
+            </el-card>
+          </el-col>
+          <el-col :span="4">
+            <el-card :body-style="{padding:'10px'}"shadow="never">
+              <div>
+                <span style="font-size: 16px">待结算材质金额</span>
+                <div style="margin-top: 5px">
+                  <span v-if="stat.settleSkuAmount" style="color: green; font-weight: bold;font-size: 20px;">+ ¥{{parseFloat(stat.settleSkuAmount).toFixed(2)}}</span>
+                  <span v-else style="color: green; font-weight: bold;font-size: 20px;">+ ¥0</span>
+                </div>
+              </div>
+            </el-card>
+          </el-col>
+          <el-col :span="4">
+            <el-card :body-style="{padding:'10px'}"shadow="never">
+              <div>
+                <span style="font-size: 16px">待结算物料金额</span>
+                <div style="margin-top: 5px">
+                  <span v-if="stat.settleMaterialAmount" style="color: green; font-weight: bold;font-size: 20px;">+ ¥{{parseFloat(stat.settleMaterialAmount).toFixed(2)}}</span>
+                  <span v-else style="color: green; font-weight: bold;font-size: 20px;">+ ¥0</span>
+                </div>
+              </div>
+            </el-card>
+          </el-col>
+          <el-col :span="4">
+            <el-card :body-style="{padding:'10px'}"shadow="never">
+              <div>
+                <span style="font-size: 16px">待结算快递打包额</span>
+                <div style="margin-top: 5px">
+                  <span v-if="stat.settleLaborAmount" style="color: green; font-weight: bold;font-size: 20px;">+ ¥{{parseFloat(stat.settleLaborAmount).toFixed(2)}}</span>
+                  <span v-else style="color: green; font-weight: bold;font-size: 20px;">+ ¥0</span>
+                </div>
+              </div>
+            </el-card>
+          </el-col>
+          <el-col :span="4">
+            <el-card :body-style="{padding:'10px'}"shadow="never">
+              <div>
+                <span style="font-size: 16px">售后结算金额</span>
+                <div style="margin-top: 5px">
+                  <span v-if="stat.settleAfterSalesCostAmount" style="color: red; font-weight: bold;font-size: 20px">- ¥{{parseFloat(stat.settleAfterSalesCostAmount).toFixed(2)}}</span>
+                  <span v-else style="color: red; font-weight: bold;font-size: 20px">- ¥0</span>
+                </div>
+              </div>
+            </el-card>
+          </el-col>
+        </el-row>
+      </div>
+
+      <!-- 表格 -->
+      <div class="table-con transport-table">
+        <el-table
+          ref="waveTable"
+          :data="dataList"
+          border
+          header-cell-class-name="table-header"
+          row-class-name="table-row-low"
+          style="width: 100%">
+          <el-table-column
+            v-if="shopId == 1"
+            align="center"
+            prop="settleName"
+            label="打印渠道">
+            <template slot-scope="scope">
+              <span class="table-cell-text">{{ scope.row.printChannel }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            width="160px"
+            align="center"
+            prop="settleName"
+            label="结算名称">
+            <template slot-scope="scope">
+              <span class="table-cell-text">{{ scope.row.settleName }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            width="160px"
+            label="结算时段"
+            align="center"
+            prop="startTime">
+            <template slot-scope="scope">
+              <span>{{scope.row.startTime }}</span>
+              <br/>
+              <span>{{scope.row.endTime }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="结算总金额"
+            align="center"
+            prop="settleAmount">
+            <template slot-scope="scope">
+              <span style="color: green; font-weight: bold;font-size: 16px">{{scope.row.settleAmount }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="settleSkuAmount"
+            label="材料结算金额">
+            <template slot-scope="scope">
+              <span style="color: green; font-weight: bold;font-size: 16px">+{{scope.row.settleSkuAmount }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+           align="center"
+           label="物料结算金额"
+           prop="settleMaterialAmount">
+           <template slot-scope="scope">
+             <span style="color: green; font-weight: bold;font-size: 16px">+{{scope.row.settleMaterialAmount }}</span>
+           </template>
+         </el-table-column>
+          <el-table-column
+            align="center"
+            width="110px"
+            label="打包快递结算金额(按件2.8元)"
+            prop="settleLaborAmount">
+            <template slot-scope="scope">
+              <span style="color: green; font-weight: bold;font-size: 16px">+{{scope.row.settleLaborAmount }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            width="110px"
+            align="center"
+            label="售后结算金额(按成本)"
+            prop="settleAfterSalesAmount">
+            <template slot-scope="scope">
+              <span style="color: red; font-weight: bold;font-size: 16px">-{{scope.row.settleAfterSalesCostAmount }}</span>
+            </template>
+          </el-table-column>
+          <!--<el-table-column
+            align="center"
+            label="售后结算金额"
+            prop="settleAfterSalesAmount">
+            <template slot-scope="scope">
+              <span style="color: red; font-weight: bold;font-size: 16px">-{{scope.row.settleAfterSalesAmount }}</span>
+            </template>
+          </el-table-column>-->
+          <el-table-column
+            align="center"
+            prop="settleOrderNums"
+            label="订单数">
+            <template slot-scope="scope">
+              <span>{{scope.row.settleOrderNums }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="settleOrderDeliveryNums"
+            label="已发货数">
+            <template slot-scope="scope">
+              <span>{{scope.row.settleOrderDeliveryNums }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="settleOrderDeliveryNums"
+            label="单独运单号数">
+            <template slot-scope="scope">
+              <span>{{scope.row.diffDvyNums }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="settleOrderDeliveryNums"
+            label="集货发货数">
+            <template slot-scope="scope">
+              <span>{{scope.row.mergeDvyNums }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="settleOrderDeliveryNums"
+            label="相同运单号数">
+            <template slot-scope="scope">
+              <span>{{scope.row.sameDvyNums }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="settleOrderSheets"
+            label="材料总张数">
+            <template slot-scope="scope">
+              <span>{{scope.row.settleOrderSheets }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="status"
+            label="结算状态">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.status === 0" type="danger" effect="dark">待结算</el-tag>
+              <el-tag v-if="scope.row.status ===1" type="success" effect="dark">已结算</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            prop="remark"
+            label="备注">
+            <template slot-scope="scope">
+              <span>{{scope.row.remark }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            :label="$t('crud.menu')"
+            width="160">
+            <template slot-scope="scope">
+              <div style="display: inline-block;float: left;">
+              </div>
+              <div
+                class="default-btn text-btn"
+                @click="viewSettlementDetail(scope.row)">小计</div>
+              <div
+                class="default-btn text-btn"
+                @click="addOrUpdateHandle(scope.row.thirdSettleId)">
+                编辑
+              </div>
+              <div
+                class="default-btn text-btn"
+                @click="syncSettlement(scope.row)">更新</div>
+              <br/>
+             <!-- <div
+                style="margin: 0 0"
+                class="default-btn text-btn"
+                @click="openModifySettleDeliveryDialog(scope.row.thirdSettleId)">
+                修改运费
+              </div>-->
+<!--              <br/>-->
+              <div
+                style="margin: 0 0"
+                class="default-btn text-btn"
+                :loading="downloadLoading"
+                @click="downloadSettlementSku(scope.row)">
+                下载明细单
+              </div>
+              <br/>
+              <div
+                style="margin: 0 0"
+                class="default-btn text-btn"
+                :loading="downloadLoading"
+                @click="downloadAfterSales(scope.row)">
+                下载售后单
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+
+      <!-- 分页 -->
+      <el-pagination
+        v-if="dataList.length"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="page.currentPage"
+        :page-sizes="[10, 20, 50, 100]"
+        :page-size="page.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total">
+      </el-pagination>
+    </div>
+
+    <!-- 修改波次 -->
+    <el-dialog
+      title="修改快递运费结算"
+      :visible.sync="settleDeliveryVisible"
+      v-if="settleDeliveryVisible"
+      width="40%"
+      center
+      :close-on-click-modal="false"
+      :close-on-press-escape="false">
+      <el-form :model="settlement" label-position="left">
+        <el-form-item label="结算账单" label-width="100px">
+          <span autocomplete="off">{{settlement.settleName}}</span>
+        </el-form-item>
+        <el-form-item label="当前快递结算" label-width="100px">
+          <span autocomplete="off">{{settlement.settleDeliveryAmount}}</span>
+        </el-form-item>
+        <el-form-item label="最新快递结算" label-width="100px">
+          <el-input v-model="settlement.modifySettleDeliveryAmount" autocomplete="off"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="updateSettleDeliveryAmount(settlement)">确 认</el-button>
+      </div>
+    </el-dialog>
+
+    <PrintSettlementAddOrUpdate v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></PrintSettlementAddOrUpdate>
+    <PrintSettlementDetail v-if="settlementDetailVisible" ref="settlementDetail"></PrintSettlementDetail>
+
+
+  </div>
+</template>
+
+<script>
+  import {downloadXls} from "@/utils/excel";
+  import {downloadZip} from "@/utils/zip";
+  import PrintSettlementAddOrUpdate from './print-settlement-add-or-update';
+  import PrintSettlementDetail from './third-print-settlement-detail';
+  export default {
+    components: {PrintSettlementAddOrUpdate, PrintSettlementDetail},
+    data () {
+      return {
+        theData: null, // 保存上次点击查询的请求条件
+        addOrUpdateVisible: false,
+        settlementDetailVisible: false,
+        settleDeliveryVisible: false,
+        downloadLoading: false,
+        stat:{},
+        dataForm: {
+          transName: ''
+        },
+        shopList: [],
+        dataList: [],
+        dataListLoading: false,
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 10 // 每页显示多少条
+        },
+        searchForm: {printChannel: 'Lightning'},
+        dateRange: [],
+        selectAll: false,
+        settlement: {
+          settleDeliveryAmount: 0,
+          modifySettleDeliveryAmount:null
+        }
+
+      }
+    },
+    created () {
+      this.getDataList();
+      this.getStat();
+      this.getShopList()
+    },
+    computed: {
+      shopId: {
+        get () { return this.$store.state.user.shopId }
+      },
+    },
+    methods: {
+      getShopList() {
+        this.$http({
+          url: this.$http.adornUrl('/platform/shopDetail/getShopList'),
+          method: 'get',
+          params: this.$http.adornParams({shopId: this.shopId})
+        }).then(({ data }) => {
+          if (data) {
+            this.shopList = data
+          }
+        })
+      },
+      getStat(){
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlement/stat'),
+          method: 'GET',
+          params: this.$http.adornParams(this.searchForm)
+        }).then(({data}) => {
+          this.stat = data;
+        }).catch((error) => {
+        })
+      },
+      // 新增 / 修改
+      addOrUpdateHandle (id) {
+        this.addOrUpdateVisible = true
+        this.$nextTick(() => {
+          this.$refs.addOrUpdate.init(id)
+        })
+      },
+      viewSettlementDetail(settlement){
+        this.settlementDetailVisible = true;
+        this.$nextTick(() => {
+          this.$refs.settlementDetail.init(settlement)
+        })
+      },
+      openModifySettleDeliveryDialog(thirdSettleId){
+        this.getSettlement(thirdSettleId);
+        this.settleDeliveryVisible = true;
+      },
+      refreshChange () {
+        this.getDataList(this.page);
+      },
+      // 获取数据列表
+      getDataList (page, newData = false) {
+        this.dataListLoading = true
+        if (newData || !this.theData) {
+          this.searchForm.startTime = this.dateRange === null ? null : this.dateRange[0], // 开始时间
+          this.searchForm.endTime = this.dateRange === null ? null : this.dateRange[1], // 结束时间
+          this.theData = JSON.parse(JSON.stringify(this.searchForm))
+        }
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlement/page'),
+          method: 'get',
+          params: this.$http.adornParams(
+            Object.assign(
+              {
+                current: page == null ? this.page.currentPage : page.currentPage,
+                size: page == null ? this.page.pageSize : page.pageSize
+              },
+              this.theData
+            )
+          )
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.page.total = data.total
+          this.dataListLoading = false
+        })
+      },
+      // 获取详情
+      getSettlement(thirdSettleId){
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlement/info/' + thirdSettleId),
+          method: 'GET',
+          params: this.$http.adornParams(),
+        }).then(({data}) => {
+          if(data){
+            this.settlement = data;
+          }
+        }).catch((error) => {
+        })
+      },
+      updateSettleDeliveryAmount(){
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlement/updateDeliveryAmount'),
+          method: 'POST',
+          data: this.$http.adornData(this.settlement),
+        }).then(({data}) => {
+          this.settleDeliveryVisible = false;
+          this.getDataList(this.page, false);
+        }).catch((error) => {
+        })
+      },
+      downloadSettlementSku(settlement){
+        this.downloadLoading = true;
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlement/downloadSettlementSku'),
+          method: 'GET',
+          params: this.$http.adornParams(settlement),
+          responseType: 'blob'
+        }).then(({data}) => {
+          let fileName = settlement.settleName + "_结算账单明细表";
+          downloadXls(data, fileName + ".xlsx");
+          this.downloadLoading = false;
+        }).catch((error) => {
+        })
+      },
+      downloadAfterSales(settlement){
+        this.downloadLoading = true;
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlement/downloadAfterSales'),
+          method: 'GET',
+          params: this.$http.adornParams(settlement),
+          responseType: 'blob'
+        }).then(({data}) => {
+          let fileName = settlement.settleName + "_售后明细表";
+          downloadXls(data, fileName + ".xlsx");
+          this.downloadLoading = false;
+        }).catch((error) => {
+        })
+      },
+      syncSettlement(settlement){
+        this.$http({
+          url: this.$http.adornUrl('/printSettlement/thirdPrintSettlement/syncSettlement'),
+          method: 'POST',
+          data: this.$http.adornData(settlement),
+        }).then(({data})=> {
+          if(data){
+            this.getDataList(this.page, false);
+            this.$message({
+              message: "更新成功",
+              type: 'success'
+            })
+          }else{
+            this.$message({
+              message: "暂无更新",
+              type: 'warning'
+            })
+          }
+        }).catch((error) => {
+        })
+      },
+
+      // 条件查询
+      searchChange (newData = false) {
+        this.stat = {}
+        this.getDataList(this.page, newData);
+        this.getStat();
+      },
+      /**
+       * 重置表单
+       * @param {String} formName 表单名称
+       */
+      resetSearchForm (formName) {
+        this.$refs[formName].resetFields()
+        this.searchForm = {};
+        this.stat = {settleAmount:0, settleSkuAmount:0, settleAfterCostAmount:0, settleLaborAmount:0}
+      },
+      handleSizeChange (val) {
+        this.page.pageSize = val
+        this.getDataList()
+      },
+      handleCurrentChange (val) {
+        this.page.currentPage = val
+        this.getDataList(this.page, false)
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

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