Browse Source

Merge branch 'master' into linglong

# Conflicts:
#	src/components/order-card-item/index.vue
#	src/views/modules/afterSales/returnDelivery.vue
#	src/views/modules/afterSales/thirdAfterSales.vue
#	src/views/modules/order/order.vue
#	src/views/modules/order/orderInfo.vue
#	src/views/modules/print/print-order.vue
#	src/views/modules/settlement/print-settlement-add-or-update.vue
#	src/views/modules/settlement/third-print-settlement.vue
huangmp 2 years ago
parent
commit
81984367f7
26 changed files with 3744 additions and 123 deletions
  1. 2 0
      package.json
  2. 326 0
      src/components/canvas-preview/index.vue
  3. 68 49
      src/components/order-card-item/index.vue
  4. 5 3
      src/views/modules/afterSales/returnDelivery-add-or-update.vue
  5. 9 1
      src/views/modules/afterSales/returnDelivery.vue
  6. 3 3
      src/views/modules/afterSales/thirdAfterSales-add-or-update.vue
  7. 63 3
      src/views/modules/afterSales/thirdAfterSales.vue
  8. 1 1
      src/views/modules/marketing/coupon.vue
  9. 44 4
      src/views/modules/order/order.vue
  10. 13 14
      src/views/modules/order/orderInfo.vue
  11. 2175 0
      src/views/modules/order/tgorder.vue
  12. 1 0
      src/views/modules/print/print-order-info.vue
  13. 24 5
      src/views/modules/print/print-order.vue
  14. 2 1
      src/views/modules/print/print-scan-delivery.vue
  15. 165 0
      src/views/modules/print/third-print-sku-add-or-update.vue
  16. 255 0
      src/views/modules/print/third-print-sku.vue
  17. 10 1
      src/views/modules/print/wave-print-order.vue
  18. 8 1
      src/views/modules/prod/post-product/posting-edit-product.vue
  19. 180 0
      src/views/modules/prod/printPicLib-add-or-update.vue
  20. 242 0
      src/views/modules/prod/printPicLib.vue
  21. 57 1
      src/views/modules/prod/prodComm.vue
  22. 74 27
      src/views/modules/prod/prodTemplate-add-or-update.vue
  23. 3 0
      src/views/modules/prod/prodTemplateSeries-add-or-update.vue
  24. 5 6
      src/views/modules/prod/prodTemplateSeries.vue
  25. 1 3
      src/views/modules/settlement/print-settlement-add-or-update.vue
  26. 8 0
      src/views/modules/settlement/third-print-settlement-detail.vue

+ 2 - 0
package.json

@@ -23,10 +23,12 @@
     "moment": "^2.29.1",
     "pdf-lib": "^1.17.1",
     "qrcode": "^1.4.4",
+    "v-viewer": "^1.6.4",
     "video.js": "^7.8.4",
     "videojs-contrib-hls": "^5.15.0",
     "vue": "2.6.14",
     "vue-baidu-map": "^0.21.22",
+    "vue-canvas-draw": "^1.0.1",
     "vue-cookie": "1.1.4",
     "vue-i18n": "8.24.5",
     "vue-router": "3.5.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>

+ 68 - 49
src/components/order-card-item/index.vue

@@ -13,7 +13,7 @@
               <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.frontPic, item.prodName)"/>
+              <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"
@@ -32,7 +32,7 @@
               <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.backPic, item.prodName)"/>
+              <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)"
@@ -72,26 +72,14 @@
         </el-button>
       </div>
     </div>
-    <el-dialog :visible.sync="previewPicDialogVisible" :modal="false" title="图片预览" width="20%" top="3vh">
-      <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%"/>
-    </el-dialog>
+    <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',
@@ -99,6 +87,7 @@
         previewPicUrl: null,
         prodType: null,
         previewPicDialogVisible: false,
+        side:null,
         resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
         mode: 'view',
         previewWidth: 0,
@@ -135,31 +124,47 @@
         }
         let isSize = true;
         //如果当前是编辑的小卡,就需要判断是否符合尺寸
-        let width = 0;
-        let height = 0;
-        if(item.prodName.indexOf("小卡") != -1){
-          width = 709;
-          height = 1087;
-        }else if(item.prodName.indexOf("明信片") != -1){
-          width = 1252;
-          height = 1819;
-        }else if(item.prodName.indexOf("书签") != -1){
-          width = 661;
-          height = 1843;
-        }else if(item.prodName.indexOf("方卡") != -1){
-          width = 1217;
-          height = 1217;
-        }else if(item.prodName.indexOf("徽章") != -1){
-          width = 839;
-          height = 839;
-        }else if(item.prodName.indexOf("直拍") != -1){
-          width = 709;
-          height = 1228;
-        }else if(item.prodName.indexOf("仿拍立得") != -1){
-          width = 709;
-          height = 1087;
-        }
+        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() {
@@ -172,7 +177,7 @@
             return file;
           },
           () => {
-            this.$message.error("上传的图片宽高必须是" + width + "*" + height + "!");
+            this.$message.error("上传的图片宽高必须是" + width + "*" + height);
             return Promise.reject();
           }
         );
@@ -262,24 +267,38 @@
             }
           })
       },
-      previewPic(picUrl, prodName){
+      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){
+        }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({
@@ -294,7 +313,7 @@
                   )
           )
         }).then(({data}) => {
-          this.cardItemList = data.records
+          this.cardItemList = data.records;
         })
       },
     }

+ 5 - 3
src/views/modules/afterSales/returnDelivery-add-or-update.vue

@@ -26,6 +26,7 @@
               <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>
@@ -130,9 +131,10 @@ export default {
       }).then(({data}) => {
         this.$message({
           message: this.$i18n.t('publics.operation'),
-          type: 'success',
-          duration: 500
-        })
+          type: 'success'
+        });
+        this.$emit("refreshDataList", null);
+        this.visible = false;
       })
     },
     //扫描运单号获取订单信息

+ 9 - 1
src/views/modules/afterSales/returnDelivery.vue

@@ -6,7 +6,7 @@
         <div class="input-row">
           <el-form-column label="打印渠道" class="search-form-item" v-if="shopId === 1">
             <el-select v-model="searchForm.printChannel" clearable>
-              <el-option key="KuaiYin" label="快印" value="KuaiYin"></el-option>
+              <el-option key="Lightning" label="闪电" value="Lightning"></el-option>
 <!--              <el-option key="GSART" label="广森" value="GSART"></el-option>-->
 <!--              <el-option key="WoNiu" label="蜗牛" value="WoNiu"></el-option>-->
             </el-select>
@@ -27,6 +27,7 @@
               <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">
@@ -106,6 +107,7 @@
               <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>
           <!-- 退件原因 -->
@@ -120,6 +122,12 @@
               <span>{{ scope.row.remark}}</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>
           <!-- 是否补交运费,0未补,1已补交 -->
           <el-table-column label="补交运费" prop="isPayed" align="center">
             <template slot-scope="scope">

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

@@ -101,7 +101,8 @@
               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-option label="文祥" value="文祥"></el-option>
             </el-select>
@@ -268,7 +269,7 @@ export default {
         this.$message({
           message: this.$i18n.t('publics.operation'),
           type: 'success',
-          duration: 500,
+          duration: 200,
           onClose: () => {
             this.dataForm.pic = null;
             this.visible = false;
@@ -278,7 +279,6 @@ export default {
       })
     },
     searchOrder(orderNumber){
-      debugger
       if(orderNumber){
         this.$http({
           url: this.$http.adornUrl('/order/thirdPrintOrder/info/' + orderNumber),

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

@@ -91,7 +91,8 @@
     <div class="main-container">
       <div class="operation-bar">
         <div class="default-btn primary-btn" v-if="shopId === 1" @click="addOrUpdateHandle()">新增售后</div>
-        <div class="default-btn primary-btn" v-if="shopId === 1" @click.stop="getUpload()">导入售后数据</div>
+        <div class="default-btn info-btn" v-if="shopId === 1" @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
@@ -225,7 +226,26 @@
         <el-button size="small" type="primary" @click="submitUpload" :loading="uploading">提 交</el-button>
       </el-upload>
     </el-dialog>
-
+    <el-dialog
+      :modal="false"
+      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 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 type="primary" @click="handleWxRefund()">确认退款</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -241,7 +261,10 @@ export default {
         currentPage: 1, // 当前页数
         pageSize: 10 // 每页显示多少条
       },
+      wxRefundVisible: false,
+      wxRefundBalanceVisible: false,
       shopId: this.$store.state.user.shopId,
+      wxRefundData:{},
       searchForm: {
         printChannel: null,
         status: null,
@@ -259,7 +282,8 @@ export default {
       resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
       importDialogVisible: false,
       uploading: false,
-      files:[]
+      files:[],
+      orderRefundQueryInfo:{}
     }
   },
   components: {
@@ -271,6 +295,42 @@ export default {
   mounted () {
   },
   methods: {
+    openWxRefundDialog(){
+      this.wxRefundVisible = true;
+    },
+    closeRefundDialog(){
+      this.wxRefundVisible = false;
+      this.wxRefundBalanceVisible = false;
+      this.wxRefundData = {}
+    },
+    queryWxRefundInfo(){
+      this.$http({
+        url: this.$http.adornUrl(`/order/refund/refundQuery/`+ this.wxRefundData.orderNumber),
+        method: 'get',
+      }).then(({ data }) => {
+        if(data){
+          this.orderRefundQueryInfo = "订单支付金额:" + data.payAmount + "元,已退款金额:" + data.totalRefundAmount + "元,可退款金额:" + (data.payAmount - data.totalRefundAmount).toFixed(2) + "元"
+        }else{
+          this.orderRefundQueryInfo
+        }
+      })
+      this.wxRefundBalanceVisible = true;
+    },
+    handleWxRefund(){
+      this.$http({
+        url: this.$http.adornUrl('/order/refund/partRefundRequest'),
+        method: 'post',
+        data: this.$http.adornData(this.wxRefundData)
+      }).then(({data}) => {
+        this.wxRefundBalanceVisible = false;
+        this.wxRefundVisible = false;
+        this.wxRefundData = {};
+        this.$message({
+          message: '退款发起成功',
+          type: 'success'
+        })
+      })
+    },
     getDataList (page) {
       this.dataListLoading = true
       this.$http({

+ 1 - 1
src/views/modules/marketing/coupon.vue

@@ -51,7 +51,7 @@
       <div class="operation-bar">
         <div
           class="default-btn primary-btn"
-          v-if="isAuth('seckill:seckill:save')"
+          v-if="isAuth('admin:coupon:save')"
           @click="addOrUpdateHandle()"
           >{{ $t("crud.addTitle") }}
         </div>

+ 44 - 4
src/views/modules/order/order.vue

@@ -35,6 +35,7 @@
                 <el-option key="hz" label="徽章" value="徽章"></el-option>
                 <el-option key="sf" label="手幅" value="手幅"></el-option>
                 <el-option key="pg" label="票根" value="票根"></el-option>
+                <el-option key="tz" label="贴纸" value="贴纸"></el-option>
               </el-select>
             </template>
           </el-form-item>
@@ -351,7 +352,7 @@
           </ul>
           <ul class="nav-right"></ul>
         </div>
-        <el-checkbox @change="checked=>handleSelectAll(checked)" class="all-check-btn" >全选 </el-checkbox>
+        <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>
         <div
             class="default-btn"
@@ -371,6 +372,9 @@
         <el-button style="margin-left: 20px" size="small" type="primary" @click="openPromotionDialog">
           推广数据
         </el-button>
+        <el-button style="margin-left: 20px" size="small" type="primary" :loading="exportDeliveryLoading" @click="handleExportDelivery">
+          导出发货信息
+        </el-button>
         <!-- 列标题 -->
         <div :class="['tit', showHeadScroll ? 'fixed-top' : '']">
           <el-row style="width: 100%">
@@ -710,18 +714,24 @@
                       @click="markPromotion(order)"
                       >取消推广
                     </div>
-                    <div
+                    <!--<div
                       class="default-btn text-btn operate-btn"
                       v-else
                       @click="markPromotion(order)"
                     >标记推广
-                    </div>
+                    </div>-->
                     <div
                       class="default-btn text-btn operate-btn"
                       v-if="order.status === 1"
                       @click="orderConfirmPay(order)"
                     >确认支付
                     </div>
+                    <!--<div
+                      class="default-btn text-btn operate-btn"
+                      v-if="order.status == 2"
+                      @click="scanDelivey(order)"
+                    >扫码发货
+                    </div>-->
                     <div
                       class="default-btn text-btn operate-btn"
                       v-if="isAuth('admin:station:orderItemsDelivery') && order.status === 2 && order.dvyType === 2"
@@ -1035,6 +1045,8 @@ import OrderInfo from "./orderInfo";
 import TopTask from '@/components/top-task';
 import InputNumberRange from '@/components/input-number-range';
 import OrderPromotion from './orderPromotion';
+import {} from "@/utils/excel";
+import {downloadXls} from "@/utils/excel";
 
 export default {
   data () {
@@ -1271,6 +1283,25 @@ export default {
         })
       });
     },
+    scanDelivery(order){
+
+    },
+    handleExportDelivery(){
+      this.exportDeliveryLoading = true;
+      this.$http({
+        url: this.$http.adornUrl('/order/order/exportDeliveryInfo'),
+        method: 'GET',
+        params: this.$http.adornParams({startTime: this.dateRange[0], endTime: this.dateRange[1]}),
+        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;
     },
@@ -1589,7 +1620,6 @@ export default {
           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,
@@ -1916,6 +1946,16 @@ export default {
     },
     // 搜索查询
     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){

+ 13 - 14
src/views/modules/order/orderInfo.vue

@@ -544,8 +544,8 @@
                   <el-col :span="12">
                     <div class="item" style="width:320px;">
                       <div class="text">订单状态:</div>
-                      <el-button v-if="printOrder.status == 0 || printOrder.status == null" type="primary" size="mini" @click="openPrintOrderDialog">创建订单</el-button>
-                      <div class="res" v-else-if="printOrder.status == 1">已发起,待确认</div>
+<!--                      <el-button v-if="printOrder.status == 0 || printOrder.status == null" type="primary" size="mini" @click="openPrintOrderDialog">创建订单</el-button>-->
+                      <div class="res" v-if="printOrder.status == 1">已发起,待确认</div>
                       <div class="res" v-else-if="printOrder.status == 2">待付款,已确认</div>
                       <div class="res" v-else-if="printOrder.status == 3">待生产,已付款</div>
                       <div class="res" v-else-if="printOrder.status == 4">待发货,已生产</div>
@@ -572,7 +572,7 @@
                     <div class="item">
                       <div class="text">PDF文件:</div>
                       <el-link v-if="printOrder.worksUrl != null" type="primary" :underline="false" :href="resourcesUrl + printOrder.worksUrl" target="_blank">查看文件</el-link>
-                      <el-button :loading="generatePdfLoading" v-if="printOrder.worksUrl == null" type="primary" size="mini" @click="openGeneratePdfDialog">生成PDF</el-button>
+<!--                      <el-button :loading="generatePdfLoading" v-if="printOrder.worksUrl == null" type="primary" size="mini" @click="openGeneratePdfDialog">生成PDF</el-button>-->
                     </div>
                   </el-col>
                   <el-col :span="12">
@@ -994,20 +994,9 @@ export default {
           }else{
             this.payNo = null;
           }
-
         })
       }
     },
-    getWxPayNoByOrderNumber(orderNumber){
-      this.$http({
-        url: this.$http.adornUrl(`/order/order/getWxPyaNoByOrderNumber`),
-        method: 'get',
-        params: this.$http.adornParams({orderNumber, orderNumber})
-      }).then(({ data }) => {
-        this.payNo = data.payNo;
-      })
-    },
-
     initPrintOrder() {
       if (this.dataForm.orderNumber) {
         this.$http({
@@ -1032,6 +1021,15 @@ export default {
         })
       }
     },
+    getWxPayNoByOrderNumber(orderNumber){
+      this.$http({
+        url: this.$http.adornUrl(`/order/order/getWxPyaNoByOrderNumber`),
+        method: 'get',
+        params: this.$http.adornParams({orderNumber, orderNumber})
+      }).then(({ data }) => {
+        this.payNo = data.payNo;
+      })
+    },
     modifyBuyerRemarks(){
       this.$http({
         url: this.$http.adornUrl('/order/order/modifyRemarks'),
@@ -1065,6 +1063,7 @@ export default {
         }),
       }).then(({ data }) => {
         if(data){
+          this.modifyCreateTimeVisible = false;
           this.$message({
             message: "修改成功",
             type: 'success'

+ 2175 - 0
src/views/modules/order/tgorder.vue

@@ -0,0 +1,2175 @@
+<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">
+          <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'">
+            <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.createTime') + ':' "   :label-width=" lang === 'en' ? '145px' : '85px'">
+          </el-form-item>
+          <el-form-item>
+            <div
+              class="default-btn primary-btn"
+              @click="searchChange(true)"
+              >{{ $t("order.query") }}</div>
+            <div
+              class="default-btn"
+              @click="clear()"
+              >{{ $t("shop.resetMap") }}</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)"
+            >
+              {{ $t('time.a') }}
+            </li>
+          </ul>
+          <ul class="nav-right"></ul>
+        </div>
+        <!-- 列标题 -->
+        <div :class="['tit', showHeadScroll ? 'fixed-top' : '']">
+          <el-row style="width: 100%">
+            <el-col :span="6" id="prod-info-title">
+              <span class="item product">{{ $t("temp.prodInfo") }}</span>
+            </el-col>
+            <el-col :span="4" 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">{{ $t("order.actualPaymentAmount") }}</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">{{ $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>
+            <div v-if="order.isPromotion === 1">
+              <el-tag effect="dark" v-if="order.isPromotion === 1" type="primary">推广单</el-tag>
+              <el-button type="text" @click="openOrderPromotionDialog(order.orderNumber, order.prodName)">推广链接</el-button>
+            </div>
+          </div>
+          <div class="prod-cont">
+            <el-row style="width: 100%">
+              <el-col :span="10" 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">
+                  <div class="operate">
+                    <!-- <button onclick="">打印订单</button><br> -->
+                    <div
+                      v-if="isAuth('order:get:info')"
+                      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="order.isPromotion === 1"
+                      @click="markPromotion(order)"
+                      >取消推广
+                    </div>
+                    <!--<div
+                      class="default-btn text-btn operate-btn"
+                      v-else
+                      @click="markPromotion(order)"
+                    >标记推广
+                    </div>-->
+                    <div
+                      class="default-btn text-btn operate-btn"
+                      v-if="order.status === 1"
+                      @click="orderConfirmPay(order)"
+                    >确认支付
+                    </div>
+                    <!--<div
+                      class="default-btn text-btn operate-btn"
+                      v-if="order.status == 2"
+                      @click="scanDelivey(order)"
+                    >扫码发货
+                    </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>
+    <!-- 弹窗, 新增 / 修改 -->
+    <order-station
+      v-if="orderStationVisible"
+      ref="orderStation"
+      @refreshOrderStationDataList="getDataList"
+    ></order-station>
+    <consignment-info
+      v-if="consignmentInfoVisible"
+      ref="consignmentInfo"
+      @inputCallback="getWaitingConsignmentExcel"
+    ></consignment-info>
+    <orderAmount-update
+      v-if="orderAmountUpdateVisible"
+      ref="orderAmountUpdate"
+      @refreshOrderAmountUpdate="getDataList"
+    ></orderAmount-update>
+    <order-delivery-update
+      v-if="devyVisible"
+      ref="orderDeliveryUpdate"
+      @refreshOrderDeliveryUpdate="getDataList"
+    ></order-delivery-update>
+    <!-- 修改物流弹窗 -->
+    <!-- <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-upload v-if="uploadVisible" ref="spuUpload" :param="dataForm" @refreshDataList1="getWaitingConsignmentExcel" />
+
+    <order-info ref="orderInfo" @orderAuditStatusUpdate="handleOrderAuditStatusUpdate"></order-info>
+    <orderPromotion ref="orderPromotion" ></orderPromotion>
+    <el-dialog
+    title="批量生成PDF"
+    :modal="false"
+    top="200px"
+    :close-on-click-modal="false"
+    :visible.sync="generatePrintPdfBatchVisible">
+    <el-form
+      ref="dataForm"
+      label-width="80px">
+      <el-form-item label="打印渠道" prop="printChannel">
+        <el-select v-model="printChannel" clearable filterable>
+<!--          <el-option key="GSART" label="广森" value="GSART"></el-option>-->
+<!--          <el-option key="WoNiu" label="蜗牛" value="WoNiu"></el-option>-->
+          <el-option key="KuaiYin" label="快印" value="KuaiYin"></el-option>
+          <el-option key="Lightning" label="闪电" value="Lightning"></el-option>
+        </el-select>
+      </el-form-item>
+    </el-form>
+    <span slot="footer">
+      <el-button type="info" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button type="primary" @click="generatePrintPdfBatch">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+  </el-dialog>
+    <el-dialog
+      title="确认打印订单"
+      :modal="false"
+      top="200px"
+      :close-on-click-modal="false"
+      :visible.sync="orderCreateBatchVisible">
+      <el-form
+        :model="dataForm"
+        ref="dataForm"
+        label-width="80px"
+      >
+        <el-form-item label="打印渠道" prop="printChannel">
+          <el-select v-model="printChannel" clearable filterable>
+            <!--<el-option key="GSART" label="广森" value="GSART"></el-option>
+            <el-option key="WoNiu" label="蜗牛" value="WoNiu"></el-option>-->
+            <el-option key="KuaiYin" label="快印" value="KuaiYin"></el-option>
+            <el-option key="Lightning" label="闪电" value="Lightning"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <span slot="footer">
+      <el-button type="info" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button :loading="orderCreateBatchLoading" type="primary" @click="createOrderBatch">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import OrderStation from './order-station'
+import ConsignmentInfo from './consignment-info'
+import OrderAmountUpdate from './orderAmount-update'
+import OrderDeliveryUpdate from './order-delivery-update'
+import OrderUpload from './order-upload'
+import moment from 'moment'
+import ProdPic from '@/components/prod-pic'
+import OrderInfo from "./orderInfo";
+import TopTask from '@/components/top-task';
+import InputNumberRange from '@/components/input-number-range';
+import OrderPromotion from './orderPromotion';
+import {} from "@/utils/excel";
+import {downloadXls} from "@/utils/excel";
+
+export default {
+  data () {
+    return {
+      // 是否全选
+      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: '普通待发货'
+        },
+        {
+          value: 11,
+          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: "KuaiYin",
+      orderCreateBatchLoading: false,
+      exportDeliveryLoading:false,
+      confirmPayLoading: false,
+    }
+  },
+  components: {
+    OrderInfo,
+    OrderStation,
+    OrderAmountUpdate,
+    OrderDeliveryUpdate,
+    ConsignmentInfo,
+    OrderUpload,
+    ProdPic,
+    TopTask,
+    InputNumberRange,
+    OrderPromotion
+  },
+  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 () {
+    // 监听页面滚动
+    // window.addEventListener('scroll', this.scrollToTop)
+    // setTimeout(() => {
+    //   this.getEleWidth()
+    // })
+    // window.onresize = () => {
+    //   return (() => {
+    //     setTimeout(() => {
+    //       this.getEleWidth()
+    //     })
+    //   })()
+    // }
+  },
+  watch: {
+
+  },
+  methods: {
+    orderConfirmPay(order){
+      this.$confirm('确定完成支付吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let dataBody = {"orderNumbers": order.orderNumber, "payType":9};
+        this.$http({
+          url: this.$http.adornUrl('/order/order/pay'),
+          method: 'post',
+          data:this.$http.adornData(dataBody)
+        }).then(({ data }) => {
+          this.$message.success("下单确认成功")
+          this.getDataList(this.page)
+        })
+      });
+    },
+    scanDelivery(order){
+
+    },
+    handleExportDelivery(){
+      this.exportDeliveryLoading = true;
+      this.$http({
+        url: this.$http.adornUrl('/order/order/exportDeliveryInfo'),
+        method: 'GET',
+        params: this.$http.adornParams({startTime: this.dateRange[0], endTime: this.dateRange[1]}),
+        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,
+          'prodZone': this.dataForm.prodZone
+        }
+      } 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('/order/order/getTgPage'),
+        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 + ''
+      })
+    },
+    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, // 审阅状态
+          'prodName': this.dataForm.prodName, // 产品名称
+          'skuName': this.dataForm.skuName, // 产品名称,
+          'isPromotion': this.dataForm.isPromotion,
+          'prodZone': this.dataForm.prodZone
+        }
+      } 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('/order/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,
+          'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
+          'endTime': this.dateRange === null ? null : this.dateRange[1] // 结束时间
+        }
+      } 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('/order/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,
+          'startTime': this.dateRange === null ? null : this.dateRange[0], // 开始时间
+          'endTime': this.dateRange === null ? null : this.dateRange[1], // 结束时间,
+          'prodZone': this.dataForm.prodZone,
+        }
+      } 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('/order/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 = -7
+        endDay = -1
+      } else if (val === 4) {
+        startDay = -30
+        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){
+      this.$http({
+        url: this.$http.adornUrl('/order/order/markPromotion/' + order.orderNumber),
+        method: 'POST',
+      }).then(({ data }) => {
+        if(data){
+          this.$message({
+            message: "标记成功",
+            type: 'success'
+          });
+          this.getDataList(this.page, null, false);
+        }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('/order/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>

+ 1 - 0
src/views/modules/print/print-order-info.vue

@@ -233,6 +233,7 @@ export default {
   methods: {
     closeDialog(){
       this.visible = false;
+      this.$emit('printOrderClose');
     },
     init (params) {
       this.dataForm.orderNumber = params.orderNumber || 0

+ 24 - 5
src/views/modules/print/print-order.vue

@@ -40,7 +40,7 @@
                 <el-option key="yjxk" label="圆角小卡" value="圆角小卡"></el-option>
                 <el-option key="zjxk" label="直角小卡" value="直角小卡"></el-option>
                 <el-option key="pld" label="拍立得" value="拍立得"></el-option>
-                <el-option key="zp" label="直拍封面" value="直拍封面"></el-option>
+                <el-option key="zpfm" label="直拍封面" value="直拍封面"></el-option>
                 <el-option key="sq" label="书签" value="书签"></el-option>
                 <el-option key="mxp" label="明信片" value="明信片"></el-option>
                 <el-option key="fk" label="方卡" value="方卡"></el-option>
@@ -310,6 +310,10 @@
                       v-else-if="order.status === 4"
                       type="warning"
                     >异常</el-tag>
+                    <el-tag
+                      v-else-if="order.status === 11"
+                      type="info"
+                    >已取消</el-tag>
                   </span>
                 </div>
               </el-col>
@@ -334,6 +338,10 @@
                       class="default-btn text-btn operate-btn"
                       @click="updateStatus(order, 1)"
                       v-if="order.status === 4">标记正常</div>
+                    <div
+                      class="default-btn text-btn operate-btn"
+                      @click="updateStatus(order, 11)">取消订单
+                    </div>
                   </div>
                 </div>
               </el-col>
@@ -417,7 +425,7 @@
       </div>
     </el-dialog>
     <!-- 订单详情 -->
-    <print-order-info ref="printOrderInfo"></print-order-info>
+    <print-order-info ref="printOrderInfo" v-if="printOrderDialogVisible" @printOrderClose="printOrderClose"></print-order-info>
     <!-- 波次订单 -->
     <wave-print-order ref="wavePrintOrder"></wave-print-order>
 
@@ -473,6 +481,10 @@
             value: 4,
             label: "异常"
           },
+          {
+            value: 11,
+            label: "已取消"
+          },
           ],
         refund: [
           {
@@ -564,6 +576,10 @@
 
     },
     methods: {
+      printOrderClose(){
+        this.printOrderDialogVisible = false;
+      },
+
       wavePrintOrderClose(){
         this.wavePrintOrderVisible = false;
       },
@@ -571,9 +587,12 @@
         this.$refs.wavePrintOrder.openAndQueryPrintOrder({orderNumber: orderNumber, waveId: waveId})
       },
       openPrintOrderDialog(orderNumber){
-        this.$refs.printOrderInfo.init({
-          orderNumber: orderNumber,
-        })
+        this.printOrderDialogVisible = true;
+        this.$nextTick(() => {
+          this.$refs.printOrderInfo.init({
+            orderNumber: orderNumber,
+          })
+        });
       },
       openGenerateWaveDialog(){
         if(this.dataListSelections.size === 0){

+ 2 - 1
src/views/modules/print/print-scan-delivery.vue

@@ -145,7 +145,8 @@ export default {
         }
           this.lastInputStr = substr;
         }).catch((error) => {
-          this.$message.error("打印失败")
+          this.lastInputStr = substr;
+          this.$message.error(error)
         })
       }
     },

+ 165 - 0
src/views/modules/print/third-print-sku-add-or-update.vue

@@ -0,0 +1,165 @@
+<template>
+  <el-dialog
+    :title="!dataForm.templateId ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
+      <el-form-item label="三方skuID" prop="thirdSkuId">
+        <el-input v-model="dataForm.thirdSkuId" style="width: 185px"/>
+      </el-form-item>
+      <el-form-item label="三方sku名称" prop="thirdSkuName">
+        <el-input v-model="dataForm.thirdSkuName" style="width: 185px"/>
+      </el-form-item>
+      <!-- 产品类型 -->
+      <el-form-item label="产品类型" prop="prodType">
+        <el-select v-model="dataForm.prodType" clearable filterable >
+          <el-option key="smallcard" label="小卡" value="smallcard"></el-option>
+          <el-option key="squarecard" label="方卡" value="squarecard"></el-option>
+          <el-option key="badge" label="马口铁徽章" value="badge"></el-option>
+          <el-option key="plushbadge" label="毛绒徽章" value="plushbadge"></el-option>
+          <el-option key="postcard" label="明信片" value="postcard"></el-option>
+          <el-option key="bookmark" label="书签" value="bookmark"></el-option>
+          <el-option key="tipscard" label="迷你手幅" value="tipscard"></el-option>
+          <el-option key="polaroid" label="花式拍立得" value="polaroid"></el-option>
+          <el-option key="covercard" label="直拍封面" value="covercard"></el-option>
+          <el-option key="stub" label="票根" value="stub"></el-option>
+          <el-option key="transformcard" label="变换卡" value="transformcard"></el-option>
+          <el-option key="transpolaroid" label="透明胶片拍立得" value="transpolaroid"></el-option>
+          <el-option key="rectanglesticker" label="长形贴纸" value="rectanglesticker"></el-option>
+          <el-option key="squaresticker" label="方形贴纸" value="squaresticker"></el-option>
+          <el-option key="bookmark3" label="三宫格透明胶片书签" value="bookmark3"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="关联产品" prop="prodId">
+        <el-select v-model="dataForm.prodId" clearable filterable @change="prodChange">
+          <el-option v-for="(item, index) in prodList"
+             :key="index"
+             :label="item.prodName"
+             :value="item.prodId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="产品SKU" prop="skuId">
+        <el-select v-model="dataForm.skuId" clearable filterable>
+          <el-option v-for="(item, index) in skuList"
+               :key="index"
+               :label="item.skuName"
+               :value="item.skuId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="三方产品类型编号" prop="prodTypeNo">
+        <el-input v-model="dataForm.prodTypeNo" style="width: 185px"/>
+      </el-form-item>
+      <el-form-item label="三方SKU编号" prop="skuNo">
+        <el-input v-model="dataForm.skuNo" style="width: 185px"/>
+      </el-form-item>
+      <el-form-item label="产品角型" prop="prodAngle">
+        <el-select v-model="dataForm.prodAngle" clearable filterable>
+          <el-option key="1" lable="圆角" value="圆角"/>
+          <el-option key="2" lable="直角" value="直角"/>
+        </el-select>
+      </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>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        id: null,
+        prodId: null,
+        prodType: null,
+        thirdSkuName: null,
+        skuId: null,
+        thirdSkuId: null,
+        prodTypeNo: null,
+        prodAngle: null,
+        skuNo: null,
+        prodName: null,
+      },
+      prodList: [],
+      skuList: [],
+      dataRule: {
+      }
+    }
+  },
+  created(){
+    this.getProdList();
+  },
+  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('/prod/thirdPrintSku/info/' + this.dataForm.id),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    prodChange(prodId){
+      this.prodList.map(item =>{
+        if(item.prodId === prodId){
+          this.dataForm.prodName = item.prodName;
+        }
+      });
+      this.getSkuList()
+    },
+    getSkuList(){
+      this.$http({
+        url: this.$http.adornUrl('/sku/getEnableSkuList'),
+        method: 'GET',
+        params: this.$http.adornParams({prodId:this.dataForm.prodId})
+      }).then(({data}) => {
+        this.skuList = data
+      })
+    },
+    getProdList(){
+      this.$http({
+        url: this.$http.adornUrl('/prod/prod/simpleList'),
+        method: 'GET',
+        params: this.$http.adornParams({customized:0})
+      }).then(({data}) => {
+        this.prodList = data
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/thirdPrintSku'),
+            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.visible = false
+                this.$emit('refreshDataList')
+              }
+            })
+          })
+        }
+      })
+    }
+  }
+}
+</script>

+ 255 - 0
src/views/modules/print/third-print-sku.vue

@@ -0,0 +1,255 @@
+<template>
+  <div class="mod-print-printPicLib">
+    <!-- 搜索相关区域 -->
+    <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="prodType" label="产品类型" class="search-form-item">
+            <el-select v-model="searchForm.prodType" clearable filterable >
+              <el-option key="smallcard" label="小卡" value="smallcard"></el-option>
+              <el-option key="squarecard" label="方卡" value="squarecard"></el-option>
+              <el-option key="badge" label="马口铁徽章" value="badge"></el-option>
+              <el-option key="plushbadge" label="毛绒徽章" value="plushbadge"></el-option>
+              <el-option key="postcard" label="明信片" value="postcard"></el-option>
+              <el-option key="bookmark" label="书签" value="bookmark"></el-option>
+              <el-option key="tipscard" label="迷你手幅" value="tipscard"></el-option>
+              <el-option key="polaroid" label="花式拍立得" value="polaroid"></el-option>
+              <el-option key="covercard" label="直拍封面" value="covercard"></el-option>
+              <el-option key="stub" label="票根" value="stub"></el-option>
+              <el-option key="transformcard" label="变换卡" value="transformcard"></el-option>
+              <el-option key="transpolaroid" label="透明胶片拍立得" value="transpolaroid"></el-option>
+              <el-option key="bookmark3" label="三宫格透明胶片书签" value="bookmark3"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="prodAngle" label="产品角型" class="search-form-item">
+            <el-select v-model="searchForm.prodAngle" clearable filterable >
+              <el-option key="1" label="圆角" value="圆角"></el-option>
+              <el-option key="2" label="直角" value="直角"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="prodId" label="产品名称" class="search-form-item">
+            <el-select v-model="searchForm.prodId" clearable filterable >
+              <el-option v-for="(item, index) in prodList"
+                         :key="index" :label="item.prodName" :value="item.prodId"></el-option>
+            </el-select>
+          </el-form-item>
+          <div class="default-btn primary-btn" @click="searchChange">{{$t('crud.searchBtn')}}</div>
+          <div class="default-btn" @click="resetSearchForm('searchForm')">{{$t('shop.resetMap')}}</div>
+        </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>
+      <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="三方skuId" prop="thirdSkuId" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.thirdSkuId}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="三方SKU名称" prop="thirdSkuName" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.thirdSkuName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="三方SKU编号" prop="skuNo" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.skuNo}}</span>
+            </template>
+          </el-table-column>
+          <!-- 背面图 -->
+          <el-table-column label="产品类型" prop="prodType" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.prodType === 'smallcard'">小卡</span>
+              <span v-if="scope.row.prodType === 'squarecard'">方卡</span>
+              <span v-if="scope.row.prodType === 'badge'">马口铁徽章</span>
+              <span v-if="scope.row.prodType === 'plushbadge'">毛绒徽章</span>
+              <span v-if="scope.row.prodType === 'postcard'">明信片</span>
+              <span v-if="scope.row.prodType === 'bookmark'">书签</span>
+              <span v-if="scope.row.prodType === 'tipscard'">迷你手幅</span>
+              <span v-if="scope.row.prodType === 'polaroid'">仿拍立得</span>
+              <span v-if="scope.row.prodType === 'covercard'">直拍封面</span>
+              <span v-if="scope.row.prodType === 'stub'">票根</span>
+              <span v-if="scope.row.prodType === 'transformcard'">变换卡</span>
+              <span v-if="scope.row.prodType === 'transpolaroid'">透明胶片拍立得</span>
+              <span v-if="scope.row.prodType === 'bookmark3'">三宫格透明胶片书签</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="prodAngle" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.prodAngle}}</span>
+            </template>
+          </el-table-column>
+
+          <!--&lt;!&ndash; 关联的产品ID &ndash;&gt;
+          <el-table-column label="关联产品" prop="prodId" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.prodId}}</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 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>
+    <el-dialog :visible.sync="previewPicDialogVisible" :modal="false" title="图片预览" width="30%" top="3vh">
+      <el-image :src="previewPicUrl" alt=""  style="width: 100%; height: 100%"/>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './third-print-sku-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      prodList:[],
+      previewPicUrl: null,
+      previewPicDialogVisible: false,
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+      searchForm: {
+        prodType: null,
+        prodId: null,
+        prodAngle: null
+      }, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList();
+    this.getProdList();
+  },
+  mounted () {
+  },
+  methods: {
+    getProdList(){
+      this.$http({
+        url: this.$http.adornUrl('/prod/prod/simpleList'),
+        method: 'GET',
+        params: this.$http.adornParams({customized:0})
+      }).then(({data}) => {
+        this.prodList = data
+      })
+    },
+    resetSearchForm (formName) {
+      this.$refs[formName].resetFields()
+    },
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/prod/thirdPrintSku/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.searchForm
+          )
+        )
+      }).then(({data}) => {
+        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('/print/printPicLib/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 200,
+            onClose: () => {
+              this.refreshChange()
+            }
+          })
+        })
+      }).catch(() => { })
+    },
+    // 刷新回调
+    refreshChange () {
+      this.page.currentPage = 1
+      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-printPicLib {
+}
+</style>

+ 10 - 1
src/views/modules/print/wave-print-order.vue

@@ -19,6 +19,13 @@
           <el-form-item label="运单号" class="search-form-item">
             <el-input type="text" v-model="searchForm.deliveryNo" placeholder="请输入运单号" :clearable="true"></el-input>
           </el-form-item>
+          <el-form-item label="PDF生成状态" class="search-form-item">
+            <el-select type="text" v-model="searchForm.workStatus" placeholder="请选择PDF生成状态" :clearable="true">
+              <el-option label="未生成" value="0"></el-option>
+              <el-option label="已生成" value="2"></el-option>
+              <el-option label="失败" value="11"></el-option>
+            </el-select>
+          </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()">{{$t('shop.resetMap')}}</div>
@@ -229,6 +236,7 @@
                   <span v-if="scope.row.status == 1">待打印</span>
                   <span v-if="scope.row.status == 2">待发货</span>
                   <span v-if="scope.row.status == 3">已发货</span>
+                  <span v-if="scope.row.status == 11">已取消</span>
                 </template>
               </el-table-column>
               <el-table-column
@@ -1118,7 +1126,8 @@
             'orderNumber': this.searchForm.orderNumber,
             'receiverName': this.searchForm.receiverName,
             'deliveryNo': this.searchForm.deliveryNo,
-            'waveId': this.wave.waveId
+            'waveId': this.wave.waveId,
+            'workStatus': this.searchForm.workStatus
           }
         } else {
           this.theData.current = page == null ? this.page.currentPage : page.currentPage

+ 8 - 1
src/views/modules/prod/post-product/posting-edit-product.vue

@@ -195,6 +195,12 @@
               <el-radio :label="1">非定制</el-radio>
             </el-radio-group>
           </el-form-item>
+          <el-form-item v-if="dataForm.prodType !== 5 && dataForm.customized == 0" label="定制类型">
+            <el-radio-group v-model="dataForm.customType">
+              <el-radio :label="1">上传定制</el-radio>
+              <el-radio :label="2">图库定制</el-radio>
+            </el-radio-group>
+          </el-form-item>
           <div class="prod-name-box">
             <el-form-item label="起订量" class="prod-name-con">
               <el-input type="number" v-model="dataForm.setNum"></el-input>
@@ -600,7 +606,8 @@ export default {
           //   parameterValueEn: ''
           // }
         ],
-        customized: 0
+        customized: 0,
+        customType: 1
       },
       dataRule: {
         prodNameCn: [

+ 180 - 0
src/views/modules/prod/printPicLib-add-or-update.vue

@@ -0,0 +1,180 @@
+<template>
+  <el-dialog
+    :title="!dataForm.templateId ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
+      <el-form-item label="关联产品" prop="prodId">
+        <el-select v-model="dataForm.prodId" clearable filterable @change="prodChange">
+          <el-option v-for="(item, index) in prodList"
+             :key="index"
+             :label="item.prodName"
+             :value="item.prodId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="分类" prop="category">
+        <el-input v-model="dataForm.category" style="width: 185px" />
+      </el-form-item>
+      <el-row>
+        <el-col :span="6">
+            <el-form-item label="正面" prop="frontUrl">
+              <img-upload v-model="dataForm.frontUrl" :limit="1"></img-upload>
+            </el-form-item>
+          </el-col>
+        <el-col :span="6">
+          <el-form-item label="背面" prop="backUrl">
+            <img-upload v-model="dataForm.backUrl" :limit="1"></img-upload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-form-item label="是否禁用" prop="isDelete">
+        <el-select v-model="dataForm.isDelete" clearable filterable>
+          <el-option key="1" label="启用" :value=0 ></el-option>
+          <el-option key="0" label="禁用" :value=1 ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="排序" prop="seq">
+        <el-input v-model="dataForm.seq" style="width: 185px" type="number"/>
+      </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>
+  </el-dialog>
+</template>
+
+<script>
+  import ImgUpload from '@/components/imgs-upload'
+export default {
+  components: {
+    ImgUpload
+  },
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        id: null,
+        frontUrl: null,
+        backUrl: null,
+        prodId: null,
+        prodName: null,
+        seq: null,
+        isDelete: 0,
+        category:null
+      },
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+      prodList: [],
+      dataRule: {
+      }
+    }
+  },
+  created(){
+    this.getProdList();
+  },
+  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('/print/printPicLib/info/' + this.dataForm.id),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    prodChange(prodId){
+      this.prodList.map(item =>{
+        if(item.prodId === prodId){
+          this.dataForm.prodName = item.prodName;
+        }
+      });
+    },
+    getProdTypeSize(){
+      let width = 0;
+      let height = 0;
+      let prodName = this.dataForm.prodName;
+      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 = 850;
+        height = 850;
+      }else if(prodName.indexOf("明信片") !== -1){
+        width = 1252;
+        height = 1819;
+      }
+      return {width, height};
+    },
+    //验证图片尺寸
+    checkImageSize(imageStr, index) {
+      let width = this.getProdTypeSize().width;
+      let height = this.getProdTypeSize().height;
+      return new Promise((resolve, reject) => {
+        let image = new Image();
+        image.onload = function() {
+          let imageFormat = imageStr.split('.').pop();
+          if(imageFormat !== 'jpg'){
+            reject(index);
+          }
+          if ((image.width === width && image.height === height)) {
+            resolve();
+          } else {
+            reject(index);
+          }
+        };
+        image.src = this.resourcesUrl + imageStr;
+      });
+    },
+
+    getProdList(){
+      this.$http({
+        url: this.$http.adornUrl('/prod/prod/simpleList'),
+        method: 'GET',
+        params: this.$http.adornParams({customized:0})
+      }).then(({data}) => {
+        this.prodList = data
+      })
+    },
+    // 表单提交
+    async dataFormSubmit () {
+      try{
+        let imgs = [];
+        imgs[0] = this.dataForm.frontUrl ? this.dataForm.frontUrl:null;
+        if(this.dataForm.backUrl){
+          imgs[1] = this.dataForm.backUrl ? this.dataForm.backUrl:null;
+        }
+        await Promise.all(imgs.map(this.checkImageSize));
+        this.$http({
+          url: this.$http.adornUrl('/print/printPicLib'),
+          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.visible = false
+              this.$emit('refreshDataList')
+            }
+          })
+        })
+      }catch (error) {
+        this.$message.error(`第 ${error + 1} 张图片不符合尺寸要求。`)
+      }
+
+    }
+  }
+}
+</script>

+ 242 - 0
src/views/modules/prod/printPicLib.vue

@@ -0,0 +1,242 @@
+<template>
+  <div class="mod-print-printPicLib">
+    <!-- 搜索相关区域 -->
+    <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="prodId" label="关联产品">
+            <el-select v-model="searchForm.prodId" clearable filterable>
+              <el-option
+                v-for="node in prodList"
+                :key="node.prodId"
+                :label="node.prodName"
+                :value="node.prodId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="category" label="分类">
+            <el-input v-model="searchForm.category"></el-input>
+          </el-form-item>
+          <el-form-item>
+            <div class="default-btn primary-btn" @click="searchChange()">{{ $t('crud.searchBtn') }}</div>
+            <div class="default-btn" @click="resetForm()">{{ $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()">{{$t("crud.addTitle")}}</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="ID" prop="seq" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.id}}</span>
+            </template>
+          </el-table-column>
+          <!-- 正面图 -->
+          <el-table-column label="正面" prop="frontUrl" align="center">
+            <template slot-scope="scope">
+              <el-image
+                style="width: 100px; height: 100px"
+                :src="resourcesUrl + scope.row.frontUrl"
+                v-if="scope.row.frontUrl"
+                fit="fill"
+                @click="previewPic(scope.row.frontUrl)"
+              />
+            </template>
+          </el-table-column>
+          <!-- 背面图 -->
+          <el-table-column label="背面" prop="backUrl" align="center">
+            <template slot-scope="scope">
+              <el-image
+                style="width: 100px; height: 100px"
+                :src="resourcesUrl + scope.row.backUrl"
+                v-if="scope.row.backUrl"
+                fit="fill"
+                @click="previewPic(scope.row.backUrl)"
+              />
+            </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="category" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.category}}</span>
+            </template>
+          </el-table-column>
+          <!-- 排序序号 -->
+          <el-table-column label="序号" prop="seq" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.seq}}</span>
+            </template>
+          </el-table-column>
+          <!-- 是否删除,0正常,1删除 -->
+          <el-table-column label="是否删除" prop="isDelete" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.isDelete === 1" type="danger">已删除</el-tag>
+              <el-tag v-if="scope.row.isDelete === 0" 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>
+    <el-dialog :visible.sync="previewPicDialogVisible" :modal="false" title="图片预览" width="30%" top="3vh">
+      <el-image :src="previewPicUrl" alt=""  style="width: 100%; height: 100%"/>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './printPicLib-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      categoryList:[],
+      prodList:[],
+      previewPicUrl: null,
+      previewPicDialogVisible: false,
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+      searchForm: {
+        prodId: null
+      }, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList();
+    this.getProdList();
+  },
+  mounted () {
+  },
+  methods: {
+    getProdList(){
+      this.$http({
+        url: this.$http.adornUrl('/prod/prod/simpleList'),
+        method: 'GET',
+        params: this.$http.adornParams({customized:0})
+      }).then(({data}) => {
+        this.prodList = data
+      })
+    },
+    previewPic(url){
+      this.previewPicUrl = this.resourcesUrl + url;
+      this.previewPicDialogVisible = true;
+    },
+    getDataList (page) {
+      this.dataListLoading = true;
+      this.$http({
+        url: this.$http.adornUrl('/print/printPicLib/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.searchForm
+          )
+        )
+      }).then(({data}) => {
+        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('/print/printPicLib/' + 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)
+    },
+    resetForm () {
+      this.searchForm = {
+        prodId: null,
+      }
+    },
+    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-printPicLib {
+}
+</style>

+ 57 - 1
src/views/modules/prod/prodComm.vue

@@ -15,6 +15,13 @@
               <el-option label="已删除" 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 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>-->
@@ -70,6 +77,16 @@
               </div>
             </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="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"
@@ -139,7 +156,7 @@
             fixed="right"
             align="center"
             :label="$t('publics.operating')"
-            width="200"
+            width="250"
             >
             <template slot-scope="scope">
               <div class="text-btn-con">
@@ -165,6 +182,11 @@
                   @click="deleteHandle(scope.row.prodCommId)"
                   >{{$t("text.delBtn")}}
                 </div>
+                <div
+                  class="default-btn text-btn"
+                  @click="handleAudit(scope.row.prodCommId)"
+                >审核
+                </div>
               </div>
             </template>
           </el-table-column>
@@ -221,6 +243,40 @@ 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',
+            })
+          })
+        }
+      })
+    },
     openOrderInfo(prodCommId){
       this.$http({
         url: this.$http.adornUrl(`/prod/prodComm/info/${prodCommId}`),

+ 74 - 27
src/views/modules/prod/prodTemplate-add-or-update.vue

@@ -19,6 +19,8 @@
           <el-option key="bookmark" label="书签" value="bookmark"></el-option>
           <el-option key="tipscard" label="手幅" value="tipscard"></el-option>
           <el-option key="polaroid" label="拍立得" value="polaroid"></el-option>
+          <el-option key="covercard" label="直拍封面" value="covercard"></el-option>
+          <el-option key="stub" label="票根" value="stub"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item label="模板风格" prop="templateStyle">
@@ -88,6 +90,7 @@ export default {
         templateUsage: null,
         seq: 1
       },
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
       seriesList: [],
       styleList: [],
       usageList:[],
@@ -117,41 +120,85 @@ export default {
         }
       })
     },
+    //验证图片尺寸
+    checkImageSize(imageStr, index) {
+      let width = 0;
+      let height = 0;
+      let templateUsage = this.usageList.join(",");
+      let isBack = this.dataForm.templateSide === 'Back';
+      return new Promise((resolve, reject) => {
+        let image = new Image();
+        image.onload = function() {
+          if(templateUsage.indexOf("smallcard") !== -1 || templateUsage.indexOf("polaroid") !== -1){
+            width = 709;
+            height = 1087;
+          }else if(templateUsage.indexOf("stub") !== -1){
+            width = 780;
+            height = 1489;
+          }else if(templateUsage.indexOf("bookmark") !== -1){
+            width = 638;
+            height = 1819;
+          }else if(templateUsage.indexOf("postcard") !== -1){
+            width = 1252;
+            height = 1819;
+          }
+          if(isBack){
+            let imageFormat = imageStr.split('.').pop();
+            if(imageFormat != 'jpg'){
+              reject(index);
+            }
+          }else if(!isBack && templateUsage.indexOf("polaroid") !== -1){
+            let imageFormat = imageStr.split('.').pop();
+            if(imageFormat != 'png'){
+              reject(index);
+            }
+          }
+          if ((image.width === width && image.height === height)) {
+            resolve();
+          } else {
+            reject(index);
+          }
+        };
+        image.src = this.resourcesUrl + imageStr;
+      });
+    },
     // 表单提交
-    dataFormSubmit () {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.handleStyleName(this.dataForm.templateStyleId);
-          this.handleSeriesName(this.dataForm.templateSeriesId);
-          this.dataForm.templateUsage = this.usageList.join(",");
-          this.$http({
-            url: this.$http.adornUrl('/prod/prodTemplate'),
-            method: this.dataForm.templateId ? 'put' : 'post',
-            data: this.$http.adornData(this.dataForm)
-          }).then(({data}) => {
-            this.$message({
-              message: this.$i18n.t('publics.operation'),
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.$emit('refreshDataList')
-              }
-            })
+    async dataFormSubmit () {
+      try{
+        let imgUrlArr = this.dataForm.templatePic.split(",");
+        await Promise.all(imgUrlArr.map(this.checkImageSize));
+        this.handleStyleName(this.dataForm.templateStyleId);
+        this.handleSeriesName(this.dataForm.templateSeriesId);
+        this.dataForm.templateUsage = this.usageList.join(",");
+        this.$http({
+          url: this.$http.adornUrl('/prod/prodTemplate'),
+          method: this.dataForm.templateId ? 'put' : 'post',
+          data: this.$http.adornData(this.dataForm)
+        }).then(({data}) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 200,
+            onClose: () => {
+              this.visible = false;
+              this.$emit('refreshDataList')
+            }
           })
-        }
-      })
+        })
+      }catch (error) {
+        this.$message.error(`第 ${error + 1} 张图片不符合尺寸要求。`)
+      }
     },
     getStyleList () {
       this.$http({
         url: this.$http.adornUrl('/prod/prodTemplateStyle/page'),
         method: 'get',
         params: this.$http.adornParams(
-                Object.assign({
-                  size: 100,
-                  shopId: this.$store.state.user.shopId
-                }
-                )
+          Object.assign({
+              size: 100,
+              shopId: this.$store.state.user.shopId
+            }
+          )
         )
       }).then(({data}) => {
         this.styleList = data.records

+ 3 - 0
src/views/modules/prod/prodTemplateSeries-add-or-update.vue

@@ -7,6 +7,9 @@
       <el-form-item label="系列名称" prop="seriesName">
         <el-input v-model="dataForm.seriesName"></el-input>
       </el-form-item>
+      <el-form-item label="排序" prop="seq">
+        <el-input v-model="dataForm.seq" type="number"></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>

+ 5 - 6
src/views/modules/prod/prodTemplateSeries.vue

@@ -33,12 +33,11 @@
               <span>{{ scope.row.seriesName}}</span>
             </template>
           </el-table-column>
-          <!-- 商家ID -->
-<!--          <el-table-column :label="$t('prodTemplateSeries.shopId')" prop="shopId" align="center">-->
-<!--            <template slot-scope="scope">-->
-<!--              <span>{{ scope.row.shopId}}</span>-->
-<!--            </template>-->
-<!--          </el-table-column>-->
+          <el-table-column label="排序" prop="seq" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.seq}}</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">

+ 1 - 3
src/views/modules/settlement/print-settlement-add-or-update.vue

@@ -126,10 +126,8 @@
             this.$message({
               message: '提交成功',
               type: 'success',
-              onClose: () => {
-                this.dialogClose();
-              }
             })
+            this.dialogClose();
           }else{
             this.$message({
               message: '提交失败',

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

@@ -173,6 +173,14 @@
       },
       dialogClose(){
 
+      },
+      handleSizeChange (val) {
+        this.page.pageSize = val
+        this.getDetailDataList(this.page, false)
+      },
+      handleCurrentChange (val) {
+        this.page.currentPage = val
+        this.getDetailDataList(this.page, false)
       }
     }
   }