howie 3 лет назад
Родитель
Сommit
49432e3f34

+ 0 - 1
src/main.js

@@ -24,7 +24,6 @@ import {successMsg, errorMsg, warningNotify, checkBtnRole, getSummaries, numToFi
 Vue.prototype.$successMsg = successMsg;
 Vue.prototype.$errorMsg = errorMsg;
 Vue.prototype.$warningNotify = warningNotify;
-
 Vue.prototype.$checkBtnRole = checkBtnRole;
 Vue.prototype.$getSummaries = getSummaries;
 Vue.prototype.$numToFixed = numToFixed;

+ 122 - 75
src/mixin/print.js

@@ -1,10 +1,13 @@
 import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
 disAutoConnect();
+import { Loading } from 'element-ui';
 import panel from '@/utils/panel'
+import { addPrint, getDtailPrintDis } from "@/api/supply/pickup";
 import { getDeliverDetail } from "@/api/supply/deliver";
 import { addPrints } from "@/api/supply/pickup";
 import { getCompanyList } from "@/api/user";
 
+
 export default {
   data() {
     return {
@@ -47,6 +50,7 @@ export default {
       scaleMin: 0.5,
       loading: false,
       hiprintTemplate: '',
+      addIds: []
     };
   },
   computed: {
@@ -103,92 +107,126 @@ export default {
      * 获取需要打印数据详情
      * @param {Array} ids
      */
-    getDateil(ids) {
+    async getDateil(ids, funcType = 'getDeliverDetail') {
+      ids = ids instanceof Array ? ids : [ids]
       console.log(ids);
       // 清空之前打印的数据
       this.outputData = [];
       // 筛选id
       let formatting = [];
+
+      // 仓库认证请求接口参数
+      let params = []
+
       // 获取数据id
       for (let i = ids.length; i > 0; i--) {
-        formatting.push(ids[i - 1].id);
+        formatting.push(ids[i - 1].id || ids[i - 1]);
+        if (funcType === 'getDtailPrintDis') {
+          params.push(
+            {
+              id: ids[i - 1].id,
+              invoiceId: ids[i - 1].invoiceId
+            })
+          this.addIds.push(ids[i - 1].id)
+        }
       }
-      // id 去重
-      formatting = [...new Set(formatting)];
 
-      for (let i = formatting.length; i > 0; i--) {
-        // 延迟请求
-        setTimeout(async () => {
-          try {
-            const { data } = await getDeliverDetail({
-              id: formatting[i - 1],
-            });
-            //避免数据发生改变
-            this.clonelData.push(JSON.parse(JSON.stringify(data)))
-            // 需要计算长度和数据裁切
-            let invoicePickBeans = data.invoicePickBeans;
-            // 获取length向上取整
-            let len = Math.ceil(invoicePickBeans.length / 5);
-            for (let index = 0; index < len; index++) {
-              const table = [];
-              //  length <= 0 则不执行打印
-              if (invoicePickBeans.length) {
-                const newInvoicePickBeans = invoicePickBeans.splice(0, 5);
-                for (let e = newInvoicePickBeans.length; e > 0; e--) {
-                  const tempData = newInvoicePickBeans[e - 1];
-                  //添加表格数据
-                  table.push({
-                    salesId: tempData.salesOrderId,
-                    invoiceId: tempData.invoiceId,
-                    id: tempData.id,
-                    createTime: tempData.id
-                      ? this.dateToDayFilter(tempData.createTime)
-                      : '',
-                    enginOrderType:
-                      tempData.orderType == "HOME" || tempData.orderType == "TRADE"
-                        ? tempData.enginOrderNo
-                        : tempData.mainOrderId,
-                    materialName: tempData.materialName,
-                    specification: tempData.specification,
-                    refundableQty: tempData.refundableQty,
-                    pjxh1Text: tempData.pjxh1Text,
-                  });
-                }
-              }
-              // 添加print输出数据
-              this.outputData.push({
-                pageNumber: `${len}-${index + 1}`,
-                type: data.type,
-                tiTui: data.type === 2 ? `退货人` : `提货人`,
-                takerPhone: data.takerPhone || '',
-                headerRemark: data.remark,
-                total_num: data.total_num,
-                company:
-                  data.type === 2 ? `${this.company}销售退货单` : `${this.company}销售发货单`,
-                pickOrderWater: data.pickOrderWater,
-                customerNumber: data.customerNumber,
-                takerDa: '',
-                nowDate: this.nowDate(),
-                takerName:
-                  data.type === 2
-                    ? `退货人:${data.takerName || ''}`
-                    : `提货人:${data.takerName || ''}`,
-                customerName: data.customerName || '',
-                correspondName: data.correspondName,
-                correspondNames: '',
-                pickCar: data.pickCar || '',
-                createBy: JSON.parse(localStorage.getItem("supply_user")).nickName,
-                table,
-              });
-            }
-          } catch (error) {
-            console.error('获取打印数据失败')
+      if (funcType === 'getDtailPrintDis') {
+        const requestParams = params
+        try {
+          const { data } = await getDtailPrintDis(requestParams);
+          for (let i = data.length; i > 0; i--) {
+            setTimeout(async () => {
+              const newData = data[i - 1];
+              await this.mySetData(newData)
+            }, 0);
           }
-        }, 0);
+        } catch (error) {
+          console.error('获取打印数据失败')
+        }
+
+      } else {
+        // id 去重
+        formatting = [...new Set(formatting)];
+        for (let i = formatting.length; i > 0; i--) {
+          // 延迟请求
+          setTimeout(async () => {
+            const requestParams = { id: formatting[i - 1] }
+            try {
 
+              const { data } = await getDeliverDetail(requestParams);
+              this.mySetData(data)
+            } catch (error) {
+              console.error('获取打印数据失败')
+            }
+          }, 0);
+
+        }
       }
+
+
     },
 
+    mySetData(data) {
+      //避免数据发生改变
+      this.clonelData.push(JSON.parse(JSON.stringify(data)))
+      // 需要计算长度和数据裁切
+      let invoicePickBeans = data.invoicePickBeans;
+      // 获取length向上取整
+      let len = Math.ceil(invoicePickBeans.length / 5);
+      for (let index = 0; index < len; index++) {
+        const table = [];
+        //  length <= 0 则不执行打印
+        if (invoicePickBeans.length) {
+          const newInvoicePickBeans = invoicePickBeans.splice(0, 5);
+          for (let e = newInvoicePickBeans.length; e > 0; e--) {
+            const tempData = newInvoicePickBeans[e - 1];
+            //添加表格数据
+            table.push({
+              salesId: tempData.salesOrderId,
+              invoiceId: tempData.invoiceId,
+              id: tempData.id,
+              createTime: tempData.id
+                ? this.dateToDayFilter(tempData.createTime)
+                : '',
+              enginOrderType:
+                tempData.orderType == "HOME" || tempData.orderType == "TRADE"
+                  ? tempData.enginOrderNo
+                  : tempData.mainOrderId,
+              materialName: tempData.materialName,
+              specification: tempData.specification,
+              refundableQty: tempData.refundableQty,
+              pjxh1Text: tempData.pjxh1Text,
+            });
+          }
+        }
+        // 添加print输出数据
+        this.outputData.push({
+          pageNumber: `${len}-${index + 1}`,
+          type: data.type,
+          tiTui: data.type === 2 ? `退货人` : `提货人`,
+          takerPhone: data.takerPhone || '',
+          headerRemark: data.remark,
+          total_num: data.total_num,
+          company:
+            data.type === 2 ? `${this.company}销售退货单` : `${this.company}销售发货单`,
+          pickOrderWater: data.pickOrderWater,
+          customerNumber: data.customerNumber,
+          takerDa: '',
+          nowDate: this.nowDate(),
+          takerName:
+            data.type === 2
+              ? `退货人:${data.takerName || ''}`
+              : `提货人:${data.takerName || ''}`,
+          customerName: data.customerName || '',
+          correspondName: data.correspondName,
+          correspondNames: '',
+          pickCar: data.pickCar || '',
+          createBy: JSON.parse(localStorage.getItem("supply_user")).nickName,
+          table,
+        });
+      }
+    },
     // 获取公司名称
     async getCompanyLists() {
       try {
@@ -224,8 +262,7 @@ export default {
       return date.slice(0, 10);
     },
     // 添加次数
-    async addPrint() {
-
+    async addPrint(funcType = 'getDeliverDetail') {
       let ids = []
       for (let i = this.clonelData.length; i > 0; i--) {
         const tempData = this.clonelData[i - 1].invoicePickBeans;
@@ -239,7 +276,17 @@ export default {
         }
       }
       try {
-        await addPrints({ ids: ids.join(',') })
+
+        let requestParams = {}
+        if (funcType === 'getDtailPrintDis') {
+          ids = [...new Set(this.addIds)]
+          requestParams = { ids: ids.join(',') }
+          funcType = addPrint
+        } else {
+          requestParams = { ids: ids.join(',') }
+          funcType = addPrints
+        }
+        await funcType(requestParams)
       } catch (error) {
         console.error('添加打印次数失败');
       }

+ 7 - 112
src/views/supply/apply/components/apply_detail.vue

@@ -182,13 +182,8 @@
 </template>
 
 <script>
-  import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
-disAutoConnect();
-
-import panel from './design/panel'
-import { getDetail, detailArr } from './design/print-data'
-
-import printPreview from './design/preview.vue'
+import print from "@/mixin/print";
+import printPreview from '@/views/supply/deliver/components/design/preview.vue'
 import { getApplyDetail } from "@/api/supply/apply";
 import { getFileUrl } from '@/api/common';
 import CommonPrint from "@/views/supply/deliver/components/common_print";
@@ -201,6 +196,7 @@ export default {
     CommonPrint,
     printPreview
   },
+  mixins: [print],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -221,65 +217,18 @@ export default {
       printType: 1,
       printId: '',
       isShowPrint: false,
-      curPaper: {
-        type: 'A5',
-        width: 500,
-        height: 147.6
-      },
-      paperTypes: {
-        'A3': {
-          width: 420,
-          height: 296.6
-        },
-        'A4': {
-          width: 210,
-          height: 296.6
-        },
-        'A5': {
-          width: 210,
-          height: 147.6
-        },
-        'B3': {
-          width: 500,
-          height: 352.6
-        },
-        'B4': {
-          width: 250,
-          height: 352.6
-        },
-        'B5': {
-          width: 250,
-          height: 175.6
-        }
-      },
-      scaleValue: 1,
-      scaleMax: 5,
-      scaleMin: 0.5,
-      hiprintTemplate:'',
     }
   },
 
   computed: {
     isExamine() {
       return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === "FAIL"
-    },
-    curPaperType() {
-      let type = 'other'
-      let types = this.paperTypes
-      for (const key in types) {
-        let item = types[key]
-        let { width, height } = this.curPaper
-        if (item.width === width && item.height === height) {
-          type = key
-        }
-      }
-      return type
     }
   },
 
   created() {
     this.getDetail();
- 
+
   },
   mounted() {
     this.initPrint()
@@ -288,40 +237,6 @@ export default {
   //   this.initPrint()
   // },
   methods: {
-    initPrint(){
-      hiprint.init({
-      providers: [new defaultElementTypeProvider()]
-    });
-    // 还原配置
-    hiprint.setConfig()
-    // 替换配置
-    hiprint.setConfig({
-      movingDistance: 2.5,
-      text: {
-        supportOptions: [
-          {
-            name: 'styler',
-            hidden: true
-          },
-          {
-            name: 'formatter',
-            hidden: true
-          },
-        ]
-      }
-    })
-    // eslint-disable-next-line no-undef
-    hiprint.PrintElementTypeManager.buildByHtml($('.ep-draggable-item'));
-    this.hiprintTemplate = new hiprint.PrintTemplate({
-      template: panel,
-      settingContainer: '#PrintElementOptionSetting',
-      paginationContainer: '.hiprint-printPagination'
-    });
-    this.hiprintTemplate.design('#hiprint-printTemplate');
-    // 获取当前放大比例, 当zoom时传true 才会有
-    // this.scaleValue = hiprintTemplate.editingPanel.scale || 1;
-    }
-,
     // 返回列表
     goBack() {
       this.$emit('backListFormDetail');
@@ -371,36 +286,16 @@ export default {
     toPrint() {
         this.printId = this.listItem.id;
       // this.isShowPrint = true;
-            getDetail(this.listItem.id)
-          this.$refs.preView.show(this.hiprintTemplate, detailArr)
-      
+          this.getDateil(this.listItem.id,'getDeliverDetail');
+        this.$refs.preView.show(this.hiprintTemplate, this.outputData);
+
     },
 
     backDetail() {
       this.printId = '';
       this.isShowPrint = false;
     },
-    
 
-/**
-  * 设置纸张大小
-  * @param type [A3, A4, A5, B3, B4, B5, other]
-  * @param value {width,height} mm
-  */
-setPaper(type, value) {
-  try {
-    if (Object.keys(this.paperTypes).includes(type)) {
-      this.curPaper = { type: type, width: value.width, height: value.height }
-      this.hiprintTemplate.setPaper(value.width, value.height)
-    } else {
-      this.curPaper = { type: 'other', width: value.width, height: value.height }
-      this.hiprintTemplate.setPaper(value.width, value.height)
-
-    }
-  } catch (error) {
-    this.$message.error(`操作失败: ${error}`)
-  }
-},
   }
 }
 </script>

+ 9 - 92
src/views/supply/apply/components/engin_detail.vue

@@ -210,7 +210,7 @@
       </div>
 
     </div>
-      
+
     <print-preview ref="preView" />
 
     <!-- <CommonPrint :printId="printId" :printType="printType" v-if="isShowPrint" @backDetail="backDetail" /> -->
@@ -222,14 +222,8 @@
 
 import { getEnginDetail } from "@/api/supply/apply";
 import { getFileUrl } from '@/api/common';
-
-import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
-disAutoConnect();
-
-import panel from './design/panel'
-import { getDetail, detailArr } from './design/print-data'
-
-import printPreview from './design/preview.vue'
+import print from "@/mixin/print";
+import printPreview from '@/views/supply/deliver/components/design/preview.vue'
 import CommonPrint from "@/views/supply/deliver/components/common_print";
 
 export default {
@@ -240,6 +234,7 @@ export default {
     CommonPrint,
     printPreview
   },
+  mixins: [print],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -273,36 +268,7 @@ export default {
         width: 500,
         height: 147.6
       },
-      paperTypes: {
-        'A3': {
-          width: 420,
-          height: 296.6
-        },
-        'A4': {
-          width: 210,
-          height: 296.6
-        },
-        'A5': {
-          width: 210,
-          height: 147.6
-        },
-        'B3': {
-          width: 500,
-          height: 352.6
-        },
-        'B4': {
-          width: 250,
-          height: 352.6
-        },
-        'B5': {
-          width: 250,
-          height: 175.6
-        }
-      },
-      scaleValue: 1,
-      scaleMax: 5,
-      scaleMin: 0.5,
-      hiprintTemplate:'',
+
     }
   },
 
@@ -310,19 +276,6 @@ export default {
     isExamine() {
       return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === "FAIL"
     },
-    
-    curPaperType() {
-      let type = 'other'
-      let types = this.paperTypes
-      for (const key in types) {
-        let item = types[key]
-        let { width, height } = this.curPaper
-        if (item.width === width && item.height === height) {
-          type = key
-        }
-      }
-      return type
-    }
   },
 
   created() {
@@ -331,48 +284,12 @@ export default {
   mounted() {
     this.initPrint()
   },
-  // activated(){
-  //   this.initPrint()
-  // },
+
   methods: {
     // 返回列表
     goBack() {
       this.$emit('backListFormDetail');
     },
-    initPrint(){
-      hiprint.init({
-      providers: [new defaultElementTypeProvider()]
-    });
-    // 还原配置
-    hiprint.setConfig()
-    // 替换配置
-    hiprint.setConfig({
-      movingDistance: 2.5,
-      text: {
-        supportOptions: [
-          {
-            name: 'styler',
-            hidden: true
-          },
-          {
-            name: 'formatter',
-            hidden: true
-          },
-        ]
-      }
-    })
-    // eslint-disable-next-line no-undef
-    hiprint.PrintElementTypeManager.buildByHtml($('.ep-draggable-item'));
-    this.hiprintTemplate = new hiprint.PrintTemplate({
-      template: panel,
-      settingContainer: '#PrintElementOptionSetting',
-      paginationContainer: '.hiprint-printPagination'
-    });
-    this.hiprintTemplate.design('#hiprint-printTemplate');
-    // 获取当前放大比例, 当zoom时传true 才会有
-    // this.scaleValue = hiprintTemplate.editingPanel.scale || 1;
-    }
-,
     // 获取详情
     getDetail() {
       getEnginDetail({id: this.listItem.id}).then(res => {
@@ -417,9 +334,9 @@ export default {
     toPrint() {
       // this.initPrint()
       this.printId = this.listItem.id;
-      getDetail(this.listItem.id)
-        this.$refs.preView.show(this.hiprintTemplate, detailArr)
-      // this.isShowPrint = true;
+      this.getDateil(this.listItem.id,'getDeliverDetail');
+        this.$refs.preView.show(this.hiprintTemplate, this.outputData);
+
     },
 
     backDetail() {

+ 6 - 95
src/views/supply/deliver/components/commerce_detail.vue

@@ -185,12 +185,8 @@
 </template>
 
 <script>
-      import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
-disAutoConnect();
-
-import panel from '../../apply/components/design/panel'
-import { getDetail, detailArr } from '../../apply/components/design/print-data'
-import printPreview from '../../apply/components/design/preview.vue'
+import print from "@/mixin/print";
+import printPreview from '@/views/supply/deliver/components/design/preview.vue'
 import { getEnginDetail } from "@/api/supply/deliver";
 import CommonPrint from "@/views/supply/deliver/components/common_print";
 
@@ -202,6 +198,7 @@ export default {
     CommonPrint,
     printPreview
   },
+  mixins: [print],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -234,60 +231,9 @@ export default {
       printType: 2,
       printId: '',
       isShowPrint: false,
-      curPaper: {
-        type: 'A5',
-        width: 500,
-        height: 147.6
-      },
-      paperTypes: {
-        'A3': {
-          width: 420,
-          height: 296.6
-        },
-        'A4': {
-          width: 210,
-          height: 296.6
-        },
-        'A5': {
-          width: 210,
-          height: 147.6
-        },
-        'B3': {
-          width: 500,
-          height: 352.6
-        },
-        'B4': {
-          width: 250,
-          height: 352.6
-        },
-        'B5': {
-          width: 250,
-          height: 175.6
-        }
-      },
-      scaleValue: 1,
-      scaleMax: 5,
-      scaleMin: 0.5,
-      hiprintTemplate:'',
     }
   },
-  computed:{
-    curPaperType() {
-      let type = 'other'
-      let types = this.paperTypes
-      for (const key in types) {
-        let item = types[key]
-        let { width, height } = this.curPaper
-        if (item.width === width && item.height === height) {
-          type = key
-        }
-      }
-      return type
-    }
-  },
-  // activated(){
-  //   this.initPrint()
-  // },
+
   mounted() {
     this.initPrint()
   },
@@ -300,40 +246,6 @@ export default {
     goBack() {
       this.$emit('backListFormDetail');
     },
-    initPrint(){
-      hiprint.init({
-      providers: [new defaultElementTypeProvider()]
-    });
-    // 还原配置
-    hiprint.setConfig()
-    // 替换配置
-    hiprint.setConfig({
-      movingDistance: 2.5,
-      text: {
-        supportOptions: [
-          {
-            name: 'styler',
-            hidden: true
-          },
-          {
-            name: 'formatter',
-            hidden: true
-          },
-        ]
-      }
-    })
-    // eslint-disable-next-line no-undef
-    hiprint.PrintElementTypeManager.buildByHtml($('.ep-draggable-item'));
-    this.hiprintTemplate = new hiprint.PrintTemplate({
-      template: panel,
-      settingContainer: '#PrintElementOptionSetting',
-      paginationContainer: '.hiprint-printPagination'
-    });
-    this.hiprintTemplate.design('#hiprint-printTemplate');
-    // 获取当前放大比例, 当zoom时传true 才会有
-    // this.scaleValue = hiprintTemplate.editingPanel.scale || 1;
-    }
-,
     // 获取详情
     getDetail() {
       getEnginDetail({id: this.listItem.id}).then(res => {
@@ -351,9 +263,8 @@ export default {
     // 点击打印
     toPrint() {
       this.printId = this.listItem.id;
-      // this.isShowPrint = true;
-      getDetail(this.listItem.id)
-        this.$refs.preView.show(this.hiprintTemplate, detailArr)
+      this.getDateil(this.listItem.id,'getDeliverDetail');
+        this.$refs.preView.show(this.hiprintTemplate, this.outputData);
     },
 
     backDetail() {

+ 6 - 113
src/views/supply/deliver/components/deliver_detail.vue

@@ -188,12 +188,8 @@
 </template>
 
 <script>
-  import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
-disAutoConnect();
-
-import panel from '../../apply/components/design/panel'
-import { getDetail, detailArr } from '../../apply/components/design/print-data'
-import printPreview from '../../apply/components/design/preview.vue'
+import print from "@/mixin/print";
+import printPreview from '@/views/supply/deliver/components/design/preview.vue'
 import { getDeliverDetail } from "@/api/supply/deliver";
 import CommonPrint from "@/views/supply/deliver/components/common_print";
 
@@ -204,6 +200,7 @@ export default {
   components: {
     CommonPrint,printPreview
   },
+  mixins: [print],
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -236,60 +233,8 @@ export default {
       printType: 1,
       printId: '',
       isShowPrint: false,
-      curPaper: {
-        type: 'A5',
-        width: 500,
-        height: 147.6
-      },
-      paperTypes: {
-        'A3': {
-          width: 420,
-          height: 296.6
-        },
-        'A4': {
-          width: 210,
-          height: 296.6
-        },
-        'A5': {
-          width: 210,
-          height: 147.6
-        },
-        'B3': {
-          width: 500,
-          height: 352.6
-        },
-        'B4': {
-          width: 250,
-          height: 352.6
-        },
-        'B5': {
-          width: 250,
-          height: 175.6
-        }
-      },
-      scaleValue: 1,
-      scaleMax: 5,
-      scaleMin: 0.5,
-      hiprintTemplate:'',
-    }
-  },
-  computed:{
-    curPaperType() {
-      let type = 'other'
-      let types = this.paperTypes
-      for (const key in types) {
-        let item = types[key]
-        let { width, height } = this.curPaper
-        if (item.width === width && item.height === height) {
-          type = key
-        }
-      }
-      return type
     }
   },
-  // activated(){
-  //   this.initPrint()
-  // },
   mounted() {
     this.initPrint()
   },
@@ -302,40 +247,6 @@ export default {
     goBack() {
       this.$emit('backListFormDetail');
     },
-    initPrint(){
-      hiprint.init({
-      providers: [new defaultElementTypeProvider()]
-    });
-    // 还原配置
-    hiprint.setConfig()
-    // 替换配置
-    hiprint.setConfig({
-      movingDistance: 2.5,
-      text: {
-        supportOptions: [
-          {
-            name: 'styler',
-            hidden: true
-          },
-          {
-            name: 'formatter',
-            hidden: true
-          },
-        ]
-      }
-    })
-    // eslint-disable-next-line no-undef
-    hiprint.PrintElementTypeManager.buildByHtml($('.ep-draggable-item'));
-    this.hiprintTemplate = new hiprint.PrintTemplate({
-      template: panel,
-      settingContainer: '#PrintElementOptionSetting',
-      paginationContainer: '.hiprint-printPagination'
-    });
-    this.hiprintTemplate.design('#hiprint-printTemplate');
-    // 获取当前放大比例, 当zoom时传true 才会有
-    // this.scaleValue = hiprintTemplate.editingPanel.scale || 1;
-    }
-,
     // 获取详情
     getDetail() {
       getDeliverDetail({id: this.listItem.id}).then(res => {
@@ -354,34 +265,16 @@ export default {
     toPrint() {
       this.printId = this.listItem.id;
       // this.isShowPrint = true;]
-      getDetail(this.listItem.id)
-        this.$refs.preView.show(this.hiprintTemplate, detailArr)
-      
+      this.getDateil(this.listItem.id,'getDeliverDetail');
+        this.$refs.preView.show(this.hiprintTemplate, this.outputData);
+
     },
 
     backDetail() {
       this.printId = '';
       this.isShowPrint = false;
     },
-/**
-  * 设置纸张大小
-  * @param type [A3, A4, A5, B3, B4, B5, other]
-  * @param value {width,height} mm
-  */
-  setPaper(type, value) {
-  try {
-    if (Object.keys(this.paperTypes).includes(type)) {
-      this.curPaper = { type: type, width: value.width, height: value.height }
-      this.hiprintTemplate.setPaper(value.width, value.height)
-    } else {
-      this.curPaper = { type: 'other', width: value.width, height: value.height }
-      this.hiprintTemplate.setPaper(value.width, value.height)
 
-    }
-  } catch (error) {
-    this.$message.error(`操作失败: ${error}`)
-  }
-},
   }
 }
 </script>

+ 4 - 3
src/views/supply/deliver/components/design/preview.vue

@@ -1,5 +1,6 @@
 <template>
   <el-dialog
+  class="sub-main"
     :visible.sync="visible"
     :show-close="false"
     :maskClosable="false"
@@ -7,7 +8,7 @@
     @cancel="hideModal"
     :width="350 + 'mm'"
   >
-    <div :spinning="spinning" style="min-height: 100px">
+    <div  :spinning="spinning" style="min-height: 100px">
       <div id="preview_content" ref="printDom"></div>
     </div>
     <template slot="title">
@@ -47,6 +48,7 @@ export default {
       hiprintTemplate: {},
       // 数据
       printData: {},
+      loading:true
     };
   },
   computed: {},
@@ -81,8 +83,7 @@ export default {
         {},
         {
           callback: () => {
-            console.log(5545);
-            this.$parent.addPrint();
+            this.$parent.addPrint('addPrints');
             this.hiprintTemplate = {};
             this.$parent.tableSelection = [];
             setTimeout(() => {

+ 6 - 115
src/views/supply/deliver/components/home_detail.vue

@@ -186,12 +186,8 @@
 </template>
 
 <script>
-    import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
-disAutoConnect();
-
-import panel from '../../apply/components/design/panel'
-import { getDetail, detailArr } from '../../apply/components/design/print-data'
-import printPreview from '../../apply/components/design/preview.vue'
+import print from "@/mixin/print";
+import printPreview from '@/views/supply/deliver/components/design/preview.vue'
 import { getEnginDetail } from "@/api/supply/deliver";
 import CommonPrint from "@/views/supply/deliver/components/common_print";
 
@@ -201,7 +197,8 @@ export default {
   props: ['listItem'],
   components: {
     CommonPrint,printPreview
-  },
+  },  mixins: [print],
+
   filters: {
     statusFilter(val) {
       const statusList = [
@@ -234,61 +231,9 @@ export default {
       printType: 2,
       printId: '',
       isShowPrint: false,
-      curPaper: {
-        type: 'A5',
-        width: 500,
-        height: 147.6
-      },
-      paperTypes: {
-        'A3': {
-          width: 420,
-          height: 296.6
-        },
-        'A4': {
-          width: 210,
-          height: 296.6
-        },
-        'A5': {
-          width: 210,
-          height: 147.6
-        },
-        'B3': {
-          width: 500,
-          height: 352.6
-        },
-        'B4': {
-          width: 250,
-          height: 352.6
-        },
-        'B5': {
-          width: 250,
-          height: 175.6
-        }
-      },
-      scaleValue: 1,
-      scaleMax: 5,
-      scaleMin: 0.5,
-      hiprintTemplate:'',
     }
   },
 
-  computed:{
-    curPaperType() {
-      let type = 'other'
-      let types = this.paperTypes
-      for (const key in types) {
-        let item = types[key]
-        let { width, height } = this.curPaper
-        if (item.width === width && item.height === height) {
-          type = key
-        }
-      }
-      return type
-    }
-  },
-  // activated(){
-  //   this.initPrint()
-  // },
   mounted() {
     this.initPrint()
   },
@@ -300,40 +245,6 @@ export default {
     goBack() {
       this.$emit('backListFormDetail');
     },
-    initPrint(){
-      hiprint.init({
-      providers: [new defaultElementTypeProvider()]
-    });
-    // 还原配置
-    hiprint.setConfig()
-    // 替换配置
-    hiprint.setConfig({
-      movingDistance: 2.5,
-      text: {
-        supportOptions: [
-          {
-            name: 'styler',
-            hidden: true
-          },
-          {
-            name: 'formatter',
-            hidden: true
-          },
-        ]
-      }
-    })
-    // eslint-disable-next-line no-undef
-    hiprint.PrintElementTypeManager.buildByHtml($('.ep-draggable-item'));
-    this.hiprintTemplate = new hiprint.PrintTemplate({
-      template: panel,
-      settingContainer: '#PrintElementOptionSetting',
-      paginationContainer: '.hiprint-printPagination'
-    });
-    this.hiprintTemplate.design('#hiprint-printTemplate');
-    // 获取当前放大比例, 当zoom时传true 才会有
-    // this.scaleValue = hiprintTemplate.editingPanel.scale || 1;
-    }
-,
     // 获取详情
     getDetail() {
       getEnginDetail({id: this.listItem.id}).then(res => {
@@ -351,34 +262,14 @@ export default {
     // 点击打印
     toPrint() {
       this.printId = this.listItem.id;
-      // this.isShowPrint = true;
-      getDetail(this.listItem.id)
-        this.$refs.preView.show(this.hiprintTemplate, detailArr)
+      this.getDateil(this.listItem.id,'getDeliverDetail');
+        this.$refs.preView.show(this.hiprintTemplate, this.outputData);
     },
 
     backDetail() {
       this.printId = '';
       this.isShowPrint = false;
     },
-    /**
-  * 设置纸张大小
-  * @param type [A3, A4, A5, B3, B4, B5, other]
-  * @param value {width,height} mm
-  */
-  setPaper(type, value) {
-  try {
-    if (Object.keys(this.paperTypes).includes(type)) {
-      this.curPaper = { type: type, width: value.width, height: value.height }
-      this.hiprintTemplate.setPaper(value.width, value.height)
-    } else {
-      this.curPaper = { type: 'other', width: value.width, height: value.height }
-      this.hiprintTemplate.setPaper(value.width, value.height)
-
-    }
-  } catch (error) {
-    this.$message.error(`操作失败: ${error}`)
-  }
-},
 
   }
 }

+ 2 - 2
src/views/supply/deliver/sum_list.vue

@@ -1125,7 +1125,7 @@ export default {
       this.queryItem = this.tableSelection;
       if (!this.tableSelection[0].printNum) {
         this.queryItem = this.tableSelection;
-        this.getDateil(this.tableSelection);
+        this.getDateil(this.tableSelection, "getDeliverDetail");
         this.$refs.preView.show(this.hiprintTemplate, this.outputData);
       } else {
         this.queryItem = this.tableSelection;
@@ -1153,7 +1153,7 @@ export default {
           };
           checkPassword(params).then((res) => {
             this.cancelDialogForm();
-            this.getDateil(this.tableSelection);
+            this.getDateil(this.tableSelection, "getDeliverDetail");
             this.$refs.preView.show(this.hiprintTemplate, this.outputData);
           });
         }

+ 9 - 109
src/views/supply/pickup/check.vue

@@ -243,15 +243,12 @@ import {
   checkPassword,
   getWarehouseList,
 } from "@/api/supply/pickup";
+import print from "@/mixin/print";
+
 import { getDealerList, getListCustomer } from "@/api/basic_data/dealer";
 
 import PickupPrint from "@/views/supply/pickup/components/pickup_print";
 
-import { disAutoConnect, hiprint, defaultElementTypeProvider } from 'vue-plugin-hiprint'
-disAutoConnect();
-
-import panel from './components/design/panel'
-import { getDetails, detailArr } from './components/design/print-data'
 
 import printPreview from './components/design/preview.vue'
 export default {
@@ -259,6 +256,7 @@ export default {
     PickupPrint,
     printPreview
   },
+  mixins: [print],
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -302,43 +300,7 @@ export default {
       dialogFormRules: {
         password: [{ required: true, message: "请输入密码", trigger: "blur" }],
       },
-      userList:[]
-      ,
-      curPaper: {
-        type: 'A5',
-        width: 500,
-        height: 147.6
-      },
-      paperTypes: {
-        'A3': {
-          width: 420,
-          height: 296.6
-        },
-        'A4': {
-          width: 210,
-          height: 296.6
-        },
-        'A5': {
-          width: 210,
-          height: 147.6
-        },
-        'B3': {
-          width: 500,
-          height: 352.6
-        },
-        'B4': {
-          width: 250,
-          height: 352.6
-        },
-        'B5': {
-          width: 250,
-          height: 175.6
-        }
-      },
-      scaleValue: 1,
-      scaleMax: 5,
-      scaleMin: 0.5,
-      hiprintTemplate:'',
+      userList:[],
       isShowDialog: false,
     };
   },
@@ -350,19 +312,6 @@ export default {
         status: this.screenForm.status,
       };
     },
-
-    curPaperType() {
-      let type = 'other'
-      let types = this.paperTypes
-      for (const key in types) {
-        let item = types[key]
-        let { width, height } = this.curPaper
-        if (item.width === width && item.height === height) {
-          type = key
-        }
-      }
-      return type
-    }
   },
 
   created() {
@@ -376,40 +325,7 @@ export default {
     this.initPrint()
   },
   methods: {
-    initPrint(){
-      hiprint.init({
-      providers: [new defaultElementTypeProvider()]
-    });
-    // 还原配置
-    hiprint.setConfig()
-    // 替换配置
-    hiprint.setConfig({
-      movingDistance: 2.5,
-      text: {
-        supportOptions: [
-          {
-            name: 'styler',
-            hidden: true
-          },
-          {
-            name: 'formatter',
-            hidden: true
-          },
-        ]
-      }
-    })
-    // eslint-disable-next-line no-undef
-    hiprint.PrintElementTypeManager.buildByHtml($('.ep-draggable-item'));
-    this.hiprintTemplate = new hiprint.PrintTemplate({
-      template: panel,
-      settingContainer: '#PrintElementOptionSetting',
-      paginationContainer: '.hiprint-printPagination'
-    });
-    this.hiprintTemplate.design('#hiprint-printTemplate');
-    // 获取当前放大比例, 当zoom时传true 才会有
-    // this.scaleValue = hiprintTemplate.editingPanel.scale || 1;
-    }
-,
+
     getDate() {
       var date = new Date();
       var seperator1 = "-";
@@ -572,15 +488,11 @@ export default {
     // 点击打印
     toPrint() {
 
-      // if (!this.isAllEqual(this.tableSelection)) {
-      //   return this.$errorMsg("只能选择同一个提货订单");
-      // }
-
       if (!this.tableSelection[0].printNum) {
         this.queryItem = this.tableSelection;
         console.log(this.tableSelection);
-        getDetails(this.tableSelection)
-        this.$refs.preView.show(this.hiprintTemplate, detailArr)
+        this.getDateil(this.tableSelection,'getDtailPrintDis');
+        this.$refs.preView.show(this.hiprintTemplate, this.outputData);
       } else {
         this.queryItem = this.tableSelection;
         this.dialogForm.createMan = JSON.parse(
@@ -591,18 +503,6 @@ export default {
       }
     },
 
-    // 点击打印
-    // toPrint(item) {
-    //   if(!item.printNum) {
-    //     this.queryItem = item;
-    //     this.isShowPrint = true;
-    //   }else {
-    //     this.queryItem = item;
-    //     this.dialogForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
-    //     this.dialogForm.createDate = this.getDate();
-    //     this.isShowDialog = true;
-    //   }
-    // },
 
     // 关闭弹窗
     cancelDialogForm() {
@@ -620,8 +520,8 @@ export default {
           };
           checkPassword(params).then((res) => {
             this.cancelDialogForm();
-            getDetails(this.tableSelection)
-            this.$refs.preView.show(this.hiprintTemplate, detailArr)
+            this.getDateil(this.tableSelection,'getDtailPrintDis');
+            this.$refs.preView.show(this.hiprintTemplate, this.outputData);
           });
         }
       });

+ 58 - 76
src/views/supply/pickup/components/design/preview.vue

@@ -1,30 +1,35 @@
 <template>
-  <el-dialog :visible.sync="visible" :show-close="false" :maskClosable="false" :close-on-click-modal="false"
-    @cancel="hideModal" :width="350 + 'mm'">
+  <el-dialog
+    :visible.sync="visible"
+    :show-close="false"
+    :maskClosable="false"
+    :close-on-click-modal="false"
+    @cancel="hideModal"
+    :width="350 + 'mm'"
+  >
     <div :spinning="spinning" style="min-height: 100px">
-      <div id="preview_content" ref="printDom">
-
-      </div>
+      <div id="preview_content" ref="printDom"></div>
     </div>
     <template slot="title">
       <div>
         <!-- <div style="margin-right: 20px">打印预览</div> -->
-        <el-button :loading="waitShowPrinter" type="primary" icon="printer" @click.stop="print">打印</el-button>
+        <el-button
+          :loading="waitShowPrinter"
+          type="primary"
+          icon="printer"
+          @click.stop="print"
+          >打印</el-button
+        >
         <!-- <el-button type="primary" icon="printer" @click.stop="toPdf">pdf</el-button> -->
       </div>
     </template>
     <template slot="footer">
-      <el-button key="close" type="info" @click="hideModal">
-        关闭
-      </el-button>
+      <el-button key="close" type="info" @click="hideModal"> 关闭 </el-button>
     </template>
   </el-dialog>
 </template>
 
 <script>
-// import { downloadPDF } from '@/utils/pdf'
-import { addPrints } from './print-data'
-import { detailArr } from './print-data'
 export default {
   name: "printPreview",
   props: {},
@@ -38,79 +43,64 @@ export default {
       // 模板
       hiprintTemplate: {},
       // 数据
-      printData: {}
-    }
+      printData: {},
+    };
   },
   computed: {},
   watch: {},
-  created() {
-  },
-  mounted() {
-  },
+  created() {},
+  mounted() {},
   methods: {
     // handleExport() {
     //   downloadPDF(this.$refs.printDom);
     // },
     hideModal() {
-      this.visible = false
-      this.waitShowPrinter = false
-      this.$parent.initPrint()
+      this.visible = false;
+      this.waitShowPrinter = false;
+      this.$parent.initPrint();
       // console.log(this.$parent);
     },
-    show(hiprintTemplate, printData, width = '210') {
-      console.log(hiprintTemplate,'111');
-      this.visible = true
-      this.spinning = true
-      this.width = width
-      this.hiprintTemplate = hiprintTemplate
-      this.printData = printData
+    show(hiprintTemplate, printData, width = "210") {
+      this.visible = true;
+      this.spinning = true;
+      this.width = width;
+      this.hiprintTemplate = hiprintTemplate;
+      this.printData = printData;
       setTimeout(() => {
         // eslint-disable-next-line no-undef
-        $('#preview_content').html(hiprintTemplate.getHtml(printData))
-        this.spinning = false
-      }, 500)
+        $("#preview_content").html(hiprintTemplate.getHtml(printData));
+        this.spinning = false;
+      }, 500);
     },
     print() {
-
-      this.hiprintTemplate.print(this.printData, {}, {
-        callback: () => {
-          addPrints()
-          this.hiprintTemplate = {}
-          this.$parent.getList()
-          this.$parent.tableSelection =[]
+      this.hiprintTemplate.print(
+        this.printData,
+        {},
+        {
+          callback: () => {
+            this.$parent.addPrint("getDtailPrintDis");
+            this.hiprintTemplate = {};
+            this.$parent.tableSelection = [];
+            setTimeout(() => {
+              this.$parent.getList();
+              console.error("更新发货汇总列表");
+            }, 1000);
+          },
         }
-      })
-      this.hiprintTemplate.on('printSuccess', function (data) {
-        console.log('打印完成')
-          //  addPrints()
-          this.hiprintTemplate = {}
-          this.$parent.getList()
-          this.$parent.tableSelection =[]
-      })
-      // this.hiprintTemplate.on('printError', function (data) {
-      //   console.log('打印失败')
-      //   this.hiprintTemplate = {}
-      //     this.$parent.getList()
-      //     this.$parent.tableSelection =[]
-      // })
-      setTimeout(()=>{
-        this.hideModal()
-      },2000)
+      );
+      setTimeout(() => {
+        this.hideModal();
+      }, 2000);
     },
-    // toPdf() {
-    //   downloadPDF(this.$refs.printDom);
-    //   this.hiprintTemplate.toPdf({}, '打印预览');
-    // },
-  }
-}
-
+  },
+};
 </script>
+
 <style scoped>
 ::v-deep .el-dialog__body {
   padding: 0;
 }
 
-
 ::v-deep tr {
   height: 40px !important;
 }
@@ -134,12 +124,10 @@ export default {
 
 .ant-modal-content {
   margin-bottom: 24px;
-
 }
 
 @media print {
-
-/*
+  /*
   td {
     border: none !important;
   } */
@@ -149,7 +137,7 @@ export default {
     padding: 6px;
   }
 
-  .drag_item_box>div {
+  .drag_item_box > div {
     height: 100%;
     width: 100%;
     background-color: #fff;
@@ -158,16 +146,16 @@ export default {
     align-items: center;
   }
 
-  .drag_item_box>div>a {
+  .drag_item_box > div > a {
     text-align: center;
     text-decoration-line: none;
   }
 
-  .drag_item_box>div>a>span {
+  .drag_item_box > div > a > span {
     font-size: 28px;
   }
 
-  .drag_item_box>div>a>p {
+  .drag_item_box > div > a > p {
     margin: 0;
   }
 
@@ -177,7 +165,6 @@ export default {
     font-weight: bold;
   }
 
-
   .card-design {
     overflow: hidden;
     overflow-x: auto;
@@ -206,17 +193,12 @@ export default {
     height: 529px !important; */
   }
 
-  ::v-deep .hiprint-paperNumber {
-    display: none;
-  }
-
   .ant-modal-body {
     padding: 0px;
   }
 
   .ant-modal-content {
     margin-bottom: 24px;
-
   }
 }
 </style>

+ 501 - 155
src/views/supply/retail/retail_list.vue

@@ -1,36 +1,61 @@
 <template>
   <div class="app-container">
-    <div v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn">
+    <div
+      v-show="!isShowDetail && !isShowForm && !isShowExamine && !isShowReturn"
+    >
       <!-- 筛选条件 -->
       <div class="screen-container">
-        <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" label-position="left">
+        <el-form
+          ref="screenForm"
+          :model="screenForm"
+          label-width="100px"
+          size="mini"
+          label-position="left"
+        >
           <el-row :gutter="20">
             <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item prop="status" label-width="0">
                 <el-radio-group v-model="screenForm.status" @change="getList()">
                   <el-radio-button label="">全部</el-radio-button>
-                  <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{item.label}}</el-radio-button>
+                  <el-radio-button
+                    v-for="(item, index) in statusList"
+                    :key="index"
+                    :label="item.value"
+                    >{{ item.label }}</el-radio-button
+                  >
                 </el-radio-group>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="订单号" prop="orderNum">
-                <el-input v-model="screenForm.orderNum" placeholder="请输入订单号"></el-input>
+                <el-input
+                  v-model="screenForm.orderNum"
+                  placeholder="请输入订单号"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="产品名称" prop="goodsName">
-                <el-input v-model="screenForm.goodsName" placeholder="请输入产品名称"></el-input>
+                <el-input
+                  v-model="screenForm.goodsName"
+                  placeholder="请输入产品名称"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="规格型号" prop="model">
-                <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
+                <el-input
+                  v-model="screenForm.model"
+                  placeholder="请输入规格型号"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商" prop="jxsName">
-                <el-input v-model="screenForm.jxsName" placeholder="请输入经销商"></el-input>
+                <el-input
+                  v-model="screenForm.jxsName"
+                  placeholder="请输入经销商"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
@@ -39,16 +64,20 @@
                   v-model="screenForm.date"
                   type="datetimerange"
                   range-separator="至"
-                  style="width: 100%;"
+                  style="width: 100%"
                   value-format="yyyy-MM-dd HH:mm:ss"
                   start-placeholder="开始日期"
-                  end-placeholder="结束日期">
+                  end-placeholder="结束日期"
+                >
                 </el-date-picker>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="是否直调" prop="isDirectTransfer">
-                <el-select v-model="screenForm.isDirectTransfer" placeholder="请选择是否直调">
+                <el-select
+                  v-model="screenForm.isDirectTransfer"
+                  placeholder="请选择是否直调"
+                >
                   <el-option label="是" :value="true"></el-option>
                   <el-option label="否" :value="false"></el-option>
                 </el-select>
@@ -56,12 +85,18 @@
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="制表人" prop="zbMan">
-                <el-input v-model="screenForm.zbMan" placeholder="请输入制表人"></el-input>
+                <el-input
+                  v-model="screenForm.zbMan"
+                  placeholder="请输入制表人"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="审核人" prop="shMan">
-                <el-input v-model="screenForm.shMan" placeholder="请输入审核人"></el-input>
+                <el-input
+                  v-model="screenForm.shMan"
+                  placeholder="请输入审核人"
+                ></el-input>
               </el-form-item>
             </el-col>
 
@@ -77,26 +112,42 @@
                 </el-select>
               </el-form-item>
             </el-col> -->
-   <el-col :xs="24" :sm="12" :lg="6">
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="表头业务员" prop="k3ServiceId">
-                <el-select v-model="screenForm.k3ServiceId" placeholder="选择表头业务员" size="small" clearable filterable style="width: 100%">
+                <el-select
+                  v-model="screenForm.k3ServiceId"
+                  placeholder="选择表头业务员"
+                  size="small"
+                  clearable
+                  filterable
+                  style="width: 100%"
+                >
                   <el-option
                     v-for="item in salesmanList"
                     :key="item.adminUserId"
                     :label="item.nickName"
-                    :value="item.adminUserId">
+                    :value="item.adminUserId"
+                  >
                   </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="表体业务员" prop="serviceId">
-                <el-select v-model="screenForm.serviceId" placeholder="选择表体业务员" size="small" clearable filterable style="width: 100%">
+                <el-select
+                  v-model="screenForm.serviceId"
+                  placeholder="选择表体业务员"
+                  size="small"
+                  clearable
+                  filterable
+                  style="width: 100%"
+                >
                   <el-option
                     v-for="item in salesmanList"
                     :key="item.adminUserId"
                     :label="item.nickName"
-                    :value="item.adminUserId">
+                    :value="item.adminUserId"
+                  >
                   </el-option>
                 </el-select>
               </el-form-item>
@@ -104,7 +155,9 @@
             <el-col :xs="24" :sm="24" :lg="12" class="tr">
               <el-form-item label="">
                 <el-button @click="resetScreenForm">清空</el-button>
-                <el-button type="primary" @click="submitScreenForm">搜索</el-button>
+                <el-button type="primary" @click="submitScreenForm"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -114,7 +167,14 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fl">
-            <el-button size="mini" type="primary" icon="el-icon-plus" @click="toForm()" v-if="$checkBtnRole('add', $route.meta.roles)">新增</el-button>
+            <el-button
+              size="mini"
+              type="primary"
+              icon="el-icon-plus"
+              @click="toForm()"
+              v-if="$checkBtnRole('add', $route.meta.roles)"
+              >新增</el-button
+            >
           </div>
           <div class="fr">
             <ExportButton :exUrl="'retail/export'" :exParams="exParams" />
@@ -130,187 +190,435 @@
             highlight-current-row
             stripe
             show-summary
-            :summary-method="$getSummaries">
+            :summary-method="$getSummaries"
+          >
             <!-- <el-table-column align="left" label="提货进度" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
                 <el-progress :text-inside="true" :stroke-width="26" :percentage="((scope.row.hasSendQty * 100) / (scope.row.totalQty * 100)) || 0"></el-progress>
               </template>
             </el-table-column> -->
-            <el-table-column align="left" label="审核状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="审核状态"
+              prop="examineStatus"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                {{scope.row.examineStatus | statusFilter}}
+                {{ scope.row.examineStatus | statusFilter }}
               </template>
             </el-table-column>
-            <el-table-column align="left" label="开票状态" prop="isInvoicing" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="开票状态"
+              prop="isInvoicing"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                {{scope.row.isInvoicing ? '已开票':'未开票'}}
+                {{ scope.row.isInvoicing ? "已开票" : "未开票" }}
               </template>
             </el-table-column>
-            <el-table-column align="left" label="订单号" prop="id" min-width="140" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="订单号"
+              prop="id"
+              min-width="140"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.id" />
-                <span>{{scope.row.id}}</span>
+                <span>{{ scope.row.id }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="订单日期" prop="theTime" min-width="120" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="订单日期"
+              prop="theTime"
+              min-width="120"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <div>
-                  <span>{{scope.row.theTime | dateToDayFilter}}</span>
-                  <el-button type="text" icon="el-icon-edit" style="padding: 0; margin-left: 4px" v-if="$checkBtnRole('date', $route.meta.roles)" @click="editDate(scope.row)" ></el-button>
+                  <span>{{ scope.row.theTime | dateToDayFilter }}</span>
+                  <el-button
+                    type="text"
+                    icon="el-icon-edit"
+                    style="padding: 0; margin-left: 4px"
+                    v-if="$checkBtnRole('date', $route.meta.roles)"
+                    @click="editDate(scope.row)"
+                  ></el-button>
                 </div>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="销售类型"
+              prop="saleTypeName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="left"
+              label="经销商编码"
+              prop="customerNumber"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.customerNumber" />
-                <span>{{scope.row.customerNumber}}</span>
+                <span>{{ scope.row.customerNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="经销商名称"
+              prop="customerName"
+              min-width="250"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.customerName" />
-                <span>{{scope.row.customerName}}</span>
+                <span>{{ scope.row.customerName }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="物料编码"
+              prop="materialCode"
+              min-width="120"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.materialCode" />
-                <span>{{scope.row.materialCode}}</span>
+                <span>{{ scope.row.materialCode }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="产品编码"
+              prop="materialOldNumber"
+              min-width="140"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.materialOldNumber" />
-                <span>{{scope.row.materialOldNumber}}</span>
+                <span>{{ scope.row.materialOldNumber }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="产品名称"
+              prop="materialName"
+              min-width="160"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.materialName" />
-                <span>{{scope.row.materialName}}</span>
+                <span>{{ scope.row.materialName }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="规格型号"
+              prop="specification"
+              min-width="350"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 <CopyButton :copyText="scope.row.specification" />
-                <span>{{scope.row.specification}}</span>
+                <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <el-table-column align="left" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-           <el-table-column
+            <el-table-column
+              align="left"
+              label="计量单位"
+              prop="unit"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
               align="left"
               label="文件编号"
               prop="fileNo"
               min-width="100"
               show-overflow-tooltip
             />
-           <el-table-column align="left" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="是否直调"
+              prop="isDirectTransfer"
+              min-width="100"
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                {{scope.row.isDirectTransfer ? '是':'否'}}
+                {{ scope.row.isDirectTransfer ? "是" : "否" }}
               </template>
             </el-table-column>
-            <el-table-column align="right" label="总数量" prop="qty" min-width="100" sortable show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="直调数量" prop="directTransferQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="出库数量" prop="hasSendQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="可退数量" prop="refundableQty" min-width="110" sortable show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="单价" prop="price" min-width="100" sortable show-overflow-tooltip>
+            <el-table-column
+              align="right"
+              label="总数量"
+              prop="qty"
+              min-width="100"
+              sortable
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="right"
+              label="直调数量"
+              prop="directTransferQty"
+              min-width="110"
+              sortable
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="right"
+              label="出库数量"
+              prop="hasSendQty"
+              min-width="110"
+              sortable
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="right"
+              label="可退数量"
+              prop="refundableQty"
+              min-width="110"
+              sortable
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="right"
+              label="单价"
+              prop="price"
+              min-width="100"
+              sortable
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 {{ scope.row.price | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column align="right" label="订单金额" prop="totalAmount" min-width="110" sortable show-overflow-tooltip>
+            <el-table-column
+              align="right"
+              label="订单金额"
+              prop="totalAmount"
+              min-width="110"
+              sortable
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 {{ scope.row.totalAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column align="right" label="实付金额" prop="payAmount" min-width="110" sortable show-overflow-tooltip>
+            <el-table-column
+              align="right"
+              label="实付金额"
+              prop="payAmount"
+              min-width="110"
+              sortable
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 {{ scope.row.payAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column align="left" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="right" label="返利金额" prop="rebateAmount" min-width="110" sortable show-overflow-tooltip>
+            <el-table-column
+              align="left"
+              label="返利类型"
+              prop="customerWalletName2"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="right"
+              label="返利金额"
+              prop="rebateAmount"
+              min-width="110"
+              sortable
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <div>{{scope.row.rebateAmount | numToFixed}}</div>
+                <div>{{ scope.row.rebateAmount | numToFixed }}</div>
               </template>
             </el-table-column>
-            <el-table-column align="right" label="实际返利金额" prop="payRebateAmount" min-width="130" sortable show-overflow-tooltip>
+            <el-table-column
+              align="right"
+              label="实际返利金额"
+              prop="payRebateAmount"
+              min-width="130"
+              sortable
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
-                <div>{{scope.row.payRebateAmount | numToFixed}}</div>
+                <div>{{ scope.row.payRebateAmount | numToFixed }}</div>
               </template>
             </el-table-column>
-            <el-table-column align="right" label="格力折扣" prop="totalDiscAmount" min-width="110" sortable show-overflow-tooltip>
+            <el-table-column
+              align="right"
+              label="格力折扣"
+              prop="totalDiscAmount"
+              min-width="110"
+              sortable
+              show-overflow-tooltip
+            >
               <template slot-scope="scope">
                 {{ scope.row.totalDiscAmount | numToFixed }}
               </template>
             </el-table-column>
-            <el-table-column align="left" label="备注" prop="itemRemark" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="表头备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="表头业务员" prop="k3ServiceName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="表体业务员" prop="serviceName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="制表人" prop="createName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="制表日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="审核人" prop="examineName" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="审核日期" prop="examineTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="操作" width="220" fixed="right">
+            <el-table-column
+              align="left"
+              label="备注"
+              prop="itemRemark"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="left"
+              label="表头备注"
+              prop="remark"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="left"
+              label="表头业务员"
+              prop="k3ServiceName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="left"
+              label="表体业务员"
+              prop="serviceName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="left"
+              label="制表人"
+              prop="createName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="left"
+              label="制表日期"
+              prop="createTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="left"
+              label="审核人"
+              prop="examineName"
+              min-width="100"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="left"
+              label="审核日期"
+              prop="examineTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              width="220"
+              fixed="right"
+            >
               <template slot-scope="scope">
                 <el-popconfirm
-                  style="margin-right: 10px;"
+                  style="margin-right: 10px"
                   title="确定申请吗?"
                   @onConfirm="handleSubmit(scope.row.id)"
-                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
+                  v-if="
+                    $checkBtnRole('apply', $route.meta.roles) &&
+                    scope.row.examineStatus === 'SAVE'
+                  "
+                >
                   <el-button slot="reference" type="text">申请</el-button>
                 </el-popconfirm>
                 <el-popconfirm
-                  style="margin-right: 10px;"
+                  style="margin-right: 10px"
                   title="确定撤回吗?"
                   @onConfirm="handleWithdraw(scope.row.id)"
-                  v-if="$checkBtnRole('apply', $route.meta.roles) && scope.row.examineStatus === 'WAIT'" >
+                  v-if="
+                    $checkBtnRole('apply', $route.meta.roles) &&
+                    scope.row.examineStatus === 'WAIT'
+                  "
+                >
                   <el-button slot="reference" type="text">撤回</el-button>
                 </el-popconfirm>
                 <el-popconfirm
-                  style="margin-right: 10px;"
+                  style="margin-right: 10px"
                   title="确定弃审吗?"
                   @onConfirm="handleAbandon(scope.row.id)"
-                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'" >
+                  v-if="
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    scope.row.examineStatus === 'OK'
+                  "
+                >
                   <el-button slot="reference" type="text">弃审</el-button>
                 </el-popconfirm>
                 <el-popconfirm
-                  style="margin-right: 10px;"
+                  style="margin-right: 10px"
                   title="确定关闭吗?"
                   @onConfirm="handleClose(scope.row.id)"
-                  v-if="$checkBtnRole('examine', $route.meta.roles) && !scope.row.closeTime && (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'WAIT')" >
+                  v-if="
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    !scope.row.closeTime &&
+                    (scope.row.examineStatus === 'SAVE' ||
+                      scope.row.examineStatus === 'WAIT')
+                  "
+                >
                   <el-button slot="reference" type="text">关闭</el-button>
                 </el-popconfirm>
                 <el-popconfirm
-                  style="margin-right: 10px;"
+                  style="margin-right: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"
-                  v-if="$checkBtnRole('del', $route.meta.roles) && scope.row.examineStatus === 'SAVE'" >
-                  <el-button slot="reference" type="text" style="color: #f56c6c;">删除</el-button>
+                  v-if="
+                    $checkBtnRole('del', $route.meta.roles) &&
+                    scope.row.examineStatus === 'SAVE'
+                  "
+                >
+                  <el-button slot="reference" type="text" style="color: #f56c6c"
+                    >删除</el-button
+                  >
                 </el-popconfirm>
                 <el-button
                   type="text"
                   @click="toExamine(scope.row)"
-                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'WAIT'">
+                  v-if="
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    scope.row.examineStatus === 'WAIT'
+                  "
+                >
                   审批
                 </el-button>
                 <el-button
                   type="text"
                   @click="toForm(scope.row)"
-                  v-if="$checkBtnRole('edit', $route.meta.roles) && scope.row.examineStatus === 'SAVE'">
+                  v-if="
+                    $checkBtnRole('edit', $route.meta.roles) &&
+                    scope.row.examineStatus === 'SAVE'
+                  "
+                >
                   编辑
                 </el-button>
                 <el-button
                   type="text"
                   @click="toReturn(scope.row)"
-                  v-if="$checkBtnRole('examine', $route.meta.roles) && scope.row.examineStatus === 'OK'">
+                  v-if="
+                    $checkBtnRole('examine', $route.meta.roles) &&
+                    scope.row.examineStatus === 'OK'
+                  "
+                >
                   退订
                 </el-button>
-                <el-button
-                  type="text"
-                  @click="toDetail(scope.row)">
+                <el-button type="text" @click="toDetail(scope.row)">
                   详情
                 </el-button>
               </template>
@@ -327,32 +635,59 @@
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
             layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal">
+            :total="listTotal"
+          >
           </el-pagination>
         </div>
       </div>
     </div>
 
-    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
-
-    <RetailDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
-    <RetailForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
-    <RetailExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
-    <RetailReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
-
+    <EditDateDialog
+      :isShow.sync="isShowEditDateDialog"
+      :dateForm.sync="dateForm"
+    />
+
+    <RetailDetail
+      :listItem="queryItem"
+      v-if="isShowDetail"
+      @backListFormDetail="backList"
+    />
+    <RetailForm
+      :listItem="queryItem"
+      v-if="isShowForm"
+      @backListFormDetail="backList"
+    />
+    <RetailExamine
+      :listItem="queryItem"
+      v-if="isShowExamine"
+      @backListFormDetail="backList"
+    />
+    <RetailReturn
+      :listItem="queryItem"
+      v-if="isShowReturn"
+      @backListFormDetail="backList"
+    />
   </div>
 </template>
 
 <script>
-import { getList, closeData, submitData, editData, abandonData, deleteData, withdrawData } from "@/api/supply/retail";
-import { getSalesmanList } from '@/api/common'
+import {
+  getList,
+  closeData,
+  submitData,
+  editData,
+  abandonData,
+  deleteData,
+  withdrawData,
+} from "@/api/supply/retail";
+import { getSalesmanList } from "@/api/common";
 import RetailDetail from "@/views/supply/retail/components/retail_detail";
 import RetailForm from "@/views/supply/retail/components/retail_form";
 import RetailExamine from "@/views/supply/retail/components/retail_examine";
 import RetailReturn from "@/views/supply/retail/components/retail_return";
 import EditDateDialog from "@/components/Common/edit-date-dialog";
 
-let that
+let that;
 export default {
   components: {
     RetailDetail,
@@ -363,9 +698,9 @@ export default {
   },
   filters: {
     statusFilter(val) {
-      let obj = that.statusList.find(o => o.value == val);
-      return obj ? obj.label : ''
-    }
+      let obj = that.statusList.find((o) => o.value == val);
+      return obj ? obj.label : "";
+    },
   },
   data() {
     return {
@@ -374,25 +709,26 @@ export default {
       listTotal: 0, // 列表总数
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
-      screenForm: { // 筛选表单数据
-        orderNum: '',
-        goodsName: '',
-        model: '',
-        jxsName: '',
-        date: '',
-        isDirectTransfer: '',
-        zbMan: '',
-        shMan: '',
-        salesMan: '',
-        status: '',
-        k3ServiceId:'',
-        serviceId:''
+      screenForm: {
+        // 筛选表单数据
+        orderNum: "",
+        goodsName: "",
+        model: "",
+        jxsName: "",
+        date: "",
+        isDirectTransfer: "",
+        zbMan: "",
+        shMan: "",
+        salesMan: "",
+        status: "",
+        k3ServiceId: "",
+        serviceId: "",
       },
       statusList: [
-        { label: '已保存', value: 'SAVE' },
-        { label: '待审核', value: 'WAIT' },
-        { label: '审核通过', value: 'OK' },
-        { label: '已关闭', value: 'CLOSE' },
+        { label: "已保存", value: "SAVE" },
+        { label: "待审核", value: "WAIT" },
+        { label: "审核通过", value: "OK" },
+        { label: "已关闭", value: "CLOSE" },
       ],
       salesmanList: [],
 
@@ -405,9 +741,9 @@ export default {
       editId: null,
       isShowEditDateDialog: false,
       dateForm: {
-        date: '',
+        date: "",
       },
-    }
+    };
   },
 
   computed: {
@@ -418,16 +754,16 @@ export default {
         materialName: this.screenForm.goodsName,
         specification: this.screenForm.model,
         customer: this.screenForm.jxsName,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
         createBy: this.screenForm.zbMan,
         examineBy: this.screenForm.shMan,
         isDirectTransfer: this.screenForm.isDirectTransfer,
 
-        k3ServiceId:this.screenForm.k3ServiceId,
-        serviceId:this.screenForm.serviceId,
+        k3ServiceId: this.screenForm.k3ServiceId,
+        serviceId: this.screenForm.serviceId,
         type: 1, // 1:普通零售单,2:政策零售单
-      }
+      };
     },
   },
 
@@ -448,9 +784,9 @@ export default {
         pageSize: -1,
         isCustomer: 0,
         status: true,
-      }).then(res => {
+      }).then((res) => {
         this.salesmanList = res.data.records;
-      })
+      });
     },
 
     // 查询列表
@@ -465,24 +801,36 @@ export default {
         materialName: this.screenForm.goodsName,
         specification: this.screenForm.model,
         customer: this.screenForm.jxsName,
-        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
-        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        startTime: this.screenForm.date ? this.screenForm.date[0] : "",
+        endTime: this.screenForm.date ? this.screenForm.date[1] : "",
         createBy: this.screenForm.zbMan,
         examineBy: this.screenForm.shMan,
         isDirectTransfer: this.screenForm.isDirectTransfer,
-        k3ServiceId:this.screenForm.k3ServiceId,
-        serviceId:this.screenForm.serviceId,
+        k3ServiceId: this.screenForm.k3ServiceId,
+        serviceId: this.screenForm.serviceId,
         type: 1, // 1:普通零售单,2:政策零售单
       };
       getList(params).then((res) => {
-        res.data.records.forEach(item => {
-          item.sums1 = ['qty', 'directTransferQty', 'hasSendQty', 'refundableQty'];
-          item.sums2 = ['price', 'totalAmount', 'payAmount', 'rebateAmount', 'payRebateAmount', 'totalDiscAmount'];
-        })
+        res.data.records.forEach((item) => {
+          item.sums1 = [
+            "qty",
+            "directTransferQty",
+            "hasSendQty",
+            "refundableQty",
+          ];
+          item.sums2 = [
+            "price",
+            "totalAmount",
+            "payAmount",
+            "rebateAmount",
+            "payRebateAmount",
+            "totalDiscAmount",
+          ];
+        });
         this.dataList = res.data.records;
         this.listTotal = res.data.total;
         this.listLoading = false;
-      })
+      });
     },
 
     // 提交筛选表单
@@ -531,8 +879,8 @@ export default {
 
     // 进入退订
     toReturn(item) {
-      if(item.refundableQty < 1) {
-        return this.$errorMsg('可退数量为0');
+      if (item.refundableQty < 1) {
+        return this.$errorMsg("可退数量为0");
       }
       this.queryItem = item;
       this.isShowReturn = true;
@@ -548,42 +896,42 @@ export default {
 
     // 关闭
     handleClose(id) {
-      closeData({id}).then(res => {
+      closeData({ id }).then((res) => {
         this.$successMsg();
         this.getList();
-      })
+      });
     },
 
     // 删除
     handleDelete(id) {
-      deleteData({id}).then(res => {
+      deleteData({ id }).then((res) => {
         this.$successMsg();
         this.getList();
-      })
+      });
     },
 
     // 弃审
     handleAbandon(id) {
-      abandonData({id}).then(res => {
+      abandonData({ id }).then((res) => {
         this.$successMsg();
         this.getList();
-      })
+      });
     },
 
     // 申请
     handleSubmit(id) {
-      submitData({id}).then(res => {
+      submitData({ id }).then((res) => {
         this.$successMsg();
         this.getList();
-      })
+      });
     },
 
     // 撤回
     handleWithdraw(id) {
-      withdrawData({id}).then(res => {
+      withdrawData({ id }).then((res) => {
         this.$successMsg();
         this.getList();
-      })
+      });
     },
 
     // 打开 修改订单日期
@@ -597,17 +945,15 @@ export default {
     submitDateForm() {
       editData({
         id: this.editId,
-        theTime: this.dateForm.date + ' 00:00:00',
-      }).then(res => {
+        theTime: this.dateForm.date + " 00:00:00",
+      }).then((res) => {
         this.isShowEditDateDialog = false;
         this.getList();
-        this.$successMsg('修改成功');
-      })
+        this.$successMsg("修改成功");
+      });
     },
-  }
-}
+  },
+};
 </script>
 
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>