Browse Source

修改副产品派单限制

luobang 2 years ago
parent
commit
3ddb06221a

File diff suppressed because it is too large
+ 358 - 339
src/components/main.vue


+ 51 - 40
src/views/appoint/components/saleContract/saleOrderCoproductCarrier.vue

@@ -17,7 +17,7 @@
           <el-table-column fixed="right" label="操作" width="200">
             <template slot-scope="scope">
               <el-button
-                @click="coproductSendClick(scope.row.saleOrderId)"
+                @click="coproductSendClick(scope.row)"
                 type="text"
                 size="small"
                 >副产品派车</el-button
@@ -55,111 +55,122 @@
   </div>
 </template>
 <script>
-import { getCookie } from "@/utils/util.js";
+import { getCookie } from '@/utils/util.js'
 export default {
-  name: "saleOrder",
+  name: 'saleOrder',
   data() {
     return {
-      activeName: "four",
-      input: "",
+      activeName: 'four',
+      input: '',
       carrierId: null,
       carrierName: null,
       option4: {
         // 表格请求数据的地址
-        requestUrl: ""
+        requestUrl: ''
       },
       //记录旧的row对象 (销售公司已审批)
-      oldRow: "",
+      oldRow: '',
       //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
       oldRowCount: 1,
       tableHead: [
         {
-          prop: "materialName",
-          label: "物资名称",
+          prop: 'materialName',
+          label: '物资名称',
           width: 150
         },
         {
-          prop: "specificationModel",
-          label: "规格型号",
+          prop: 'specificationModel',
+          label: '规格型号',
           width: 150
         },
         {
-          prop: "materialNumber",
-          label: "物资件数",
+          prop: 'materialNumber',
+          label: '物资件数',
           width: 100
         },
         {
-          prop: "materialWeight",
-          label: "物资重量",
+          prop: 'materialWeight',
+          label: '物资重量',
           width: 100
         }
       ],
       //(销售公司已审批)
       tableData: []
-    };
+    }
   },
   created() {
-    this.initUrl();
+    this.initUrl()
   },
   methods: {
     initUrl() {
-      if (getCookie("orgCode") == "chengyunshang") {
+      if (getCookie('orgCode') == 'chengyunshang') {
         this.option4.requestUrl =
-          "/api/v1/ams/getSaleOrderListByCarrierSsoId?apiId=409&carrierSsoId=" +
-          getCookie("userId");
+          '/api/v1/ams/getSaleOrderListByCarrierSsoId?apiId=409&carrierSsoId=' +
+          getCookie('userId')
       } else {
         this.option4.requestUrl =
-          "/api/v1/ams/getSaleOrderListByCarrierSsoId?apiId=409";
+          '/api/v1/ams/getSaleOrderListByCarrierSsoId?apiId=409'
       }
     },
     refresh() {
-      this.$router.go(0);
+      this.$router.go(0)
     },
     handleClick(tab, event) {
-      console.log(tab, event);
+      console.log(tab, event)
     },
     onclick() {
-      if (this.activeName == "four") {
+      if (this.activeName == 'four') {
         this.option4.requestUrl =
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
-          this.input;
+          '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=' +
+          this.input
       }
     },
-    coproductSendClick(saleOrderId) {
-      this.$router.push("/addSaleOrderCoproductSendCarrier/" + saleOrderId);
+    coproductSendClick(row) {
+      this.$router.push('/addSaleOrderCoproductSendCarrier/' + row.saleOrderId)
+      // this.axios
+      //   .post('/api/v1/ams/getSaleOrderStatus?saleNumber=' + row.saleNumber)
+      //   .then(res => {
+      //     console.log(res.data.data)
+      //     if (res.data.data == 7) {
+      //       this.$message.error('该订单在金蝶已关闭,无法派车')
+      //       return
+      //     } else {
+
+      //     }
+      //   })
     },
     // -------查看物资详情 (已审批)
     detailclick(row) {
       // 记录重复点击次数
       if (this.oldRow === row) {
-        this.oldRowCount += 1;
+        this.oldRowCount += 1
       }
       // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
+      this.$refs.table.toggleRowExpansion(row)
       // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
+      if (this.oldRow != '') {
         if (this.oldRow != row) {
           if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
+            this.$refs.table.toggleRowExpansion(this.oldRow)
           } else {
-            this.oldRowCount = 1;
+            this.oldRowCount = 1
           }
         } else {
-          this.oldRow = null;
-          return;
+          this.oldRow = null
+          return
         }
       }
       // 重置上一个点击对象
-      this.oldRow = row;
+      this.oldRow = row
       // 根据销售订单id查询物资信息
       this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
+        .post('/api/v1/ams/getSaleMaterialList?saleOrderId=' + row.saleOrderId)
         .then(res => {
-          this.tableData = res.data.data;
-        });
+          this.tableData = res.data.data
+        })
     }
   }
-};
+}
 </script>
 <style lang="scss" scoped>
 .salePlan {

+ 547 - 534
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -229,12 +229,12 @@
   </div>
 </template>
 <script>
-import { getCookie } from "@/utils/util.js";
-import { sjTime } from "@/utils/sharedJsFile";
-import { isNumber } from "../../../ADMINISTRATORS/app";
-import ExcelSaleOrder from "../saleContract/importExcelSaleOrder.vue";
+import { getCookie } from '@/utils/util.js'
+import { sjTime } from '@/utils/sharedJsFile'
+import { isNumber } from '../../../ADMINISTRATORS/app'
+import ExcelSaleOrder from '../saleContract/importExcelSaleOrder.vue'
 export default {
-  name: "saleOrder",
+  name: 'saleOrder',
   components: {
     ExcelSaleOrder
   },
@@ -244,38 +244,38 @@ export default {
       startTime: null,
       endTime: null,
       batchReportList: [],
-      activeName: "first",
-      tableTitle: "未上传销售订单报表",
+      activeName: 'first',
+      tableTitle: '未上传销售订单报表',
       drawer: false,
-      input: "",
-      index: "",
+      input: '',
+      index: '',
       carrierId: null,
       carrierName: null,
-      shipperName: "四川省达州钢铁集团有限责任公司",
+      shipperName: '四川省达州钢铁集团有限责任公司',
       shipperId: 1,
       receivingCompany: [
-        "四川省达州钢铁集团有限责任公司",
-        "四川达钢商贸有限公司",
-        "江西久隆贸易有限公司",
-        "海南瀚途贸易有限公司"
+        '四川省达州钢铁集团有限责任公司',
+        '四川达钢商贸有限公司',
+        '江西久隆贸易有限公司',
+        '海南瀚途贸易有限公司'
       ],
       option: {
         // 表格请求数据的地址
-        requestUrl: "",
-        selectionType: "select",
-        comparison: "saleNumber",
+        requestUrl: '',
+        selectionType: 'select',
+        comparison: 'saleNumber',
         columnIndexs: [0, 1, 2, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl: "",
-        comparison: "saleNumber",
+        requestUrl: '',
+        comparison: 'saleNumber',
         columnIndexs: [0, 1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
       },
       option4: {
         // 表格请求数据的地址
-        requestUrl: "",
-        comparison: "saleNumber",
+        requestUrl: '',
+        comparison: 'saleNumber',
         columnIndexs: [
           0,
           1,
@@ -299,8 +299,8 @@ export default {
       },
       option5: {
         // 表格请求数据的地址
-        requestUrl: "",
-        comparison: "saleNumber",
+        requestUrl: '',
+        comparison: 'saleNumber',
         columnIndexs: [
           0,
           6,
@@ -327,387 +327,387 @@ export default {
       saleDateOfReceipt: null,
       //销售订单主表数据
       saleOrderList: [
-        "receiveName",
-        "isSelfMention",
-        "saleRemark",
-        "saleOrderReceiveCustomer",
-        "salerName",
-        "saleOrderNo",
-        "saleArea"
+        'receiveName',
+        'isSelfMention',
+        'saleRemark',
+        'saleOrderReceiveCustomer',
+        'salerName',
+        'saleOrderNo',
+        'saleArea'
       ],
       saleOrderMapList: [
-        "truckNo",
-        "province",
-        "district",
-        "town",
-        "truckRemark",
-        "place",
-        "saleOrderConsigneeTel",
-        "saleDateOfReceipt",
-        "materialName",
-        "materialSpecification",
-        "materialModel",
-        "materialNumber",
-        "steelMeters",
-        "isPoundSale"
+        'truckNo',
+        'province',
+        'district',
+        'town',
+        'truckRemark',
+        'place',
+        'saleOrderConsigneeTel',
+        'saleDateOfReceipt',
+        'materialName',
+        'materialSpecification',
+        'materialModel',
+        'materialNumber',
+        'steelMeters',
+        'isPoundSale'
       ]
-    };
+    }
   },
   created() {
-    if (getCookie("orgCode") == "shouhuokehu") {
+    if (getCookie('orgCode') == 'shouhuokehu') {
       this.option.requestUrl =
-        "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
-        getCookie("userId") +
-        "&i=" +
-        new Date();
+        '/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=' +
+        getCookie('userId') +
+        '&i=' +
+        new Date()
       this.option2.requestUrl =
-        "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
-        getCookie("userId") +
-        "&i=" +
-        new Date();
+        '/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=' +
+        getCookie('userId') +
+        '&i=' +
+        new Date()
       this.option4.requestUrl =
-        "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
-        getCookie("userId");
+        '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=' +
+        getCookie('userId')
       this.option5.requestUrl =
-        "/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=" +
-        getCookie("userId") +
-        "&i=" +
-        new Date();
-    } else if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+        '/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=' +
+        getCookie('userId') +
+        '&i=' +
+        new Date()
+    } else if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
       this.option.requestUrl =
-        "/api/v1/ams/getSaleOrderInfoes?apiId=408&saler=" +
-        getCookie("loginName") +
-        "&i=" +
-        new Date();
+        '/api/v1/ams/getSaleOrderInfoes?apiId=408&saler=' +
+        getCookie('loginName') +
+        '&i=' +
+        new Date()
       this.option2.requestUrl =
-        "/api/v1/ams/getSaleOrderReportedes?apiId=408&saler=" +
-        getCookie("loginName") +
-        "&i=" +
-        new Date();
+        '/api/v1/ams/getSaleOrderReportedes?apiId=408&saler=' +
+        getCookie('loginName') +
+        '&i=' +
+        new Date()
       this.option4.requestUrl =
-        "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&saler=" +
-        getCookie("loginName") +
-        "&i=" +
-        new Date();
+        '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&saler=' +
+        getCookie('loginName') +
+        '&i=' +
+        new Date()
       this.option5.requestUrl =
-        "/api/v1/ams/getSteelOrderDeletedList?apiId=409&saler=" +
-        getCookie("loginName");
+        '/api/v1/ams/getSteelOrderDeletedList?apiId=409&saler=' +
+        getCookie('loginName')
     } else {
       this.option.requestUrl =
-        "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
+        '/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=' +
         null +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
       this.option2.requestUrl =
-        "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
+        '/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=' +
         null +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
       this.option4.requestUrl =
-        "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
+        '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=' +
         null +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
       this.option5.requestUrl =
-        "/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=" +
+        '/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=' +
         null +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
     }
     let loadTime1 = new Date(
       new Date(new Date().toLocaleDateString()).getTime() +
         (3600 * 1000 * 8 - 1)
-    ); // 当天8点前
+    ) // 当天8点前
     let loadTime2 = new Date(
       new Date(new Date().toLocaleDateString()).getTime() +
         (3600 * 1000 * 32 - 1)
-    ); // 次天8点前
+    ) // 次天8点前
     if (new Date().getTime() - loadTime1 > 0) {
-      this.saleDateOfReceipt = loadTime2;
+      this.saleDateOfReceipt = loadTime2
     } else {
-      this.saleDateOfReceipt = loadTime1;
+      this.saleDateOfReceipt = loadTime1
     }
   },
   activated() {
-    if (getCookie("orgCode") == "shouhuokehu") {
+    if (getCookie('orgCode') == 'shouhuokehu') {
       this.option.requestUrl =
-        "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
-        getCookie("userId") +
-        "&i=" +
-        new Date();
+        '/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=' +
+        getCookie('userId') +
+        '&i=' +
+        new Date()
       this.option2.requestUrl =
-        "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
-        getCookie("userId") +
-        "&i=" +
-        new Date();
-    } else if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+        '/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=' +
+        getCookie('userId') +
+        '&i=' +
+        new Date()
+    } else if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
       this.option.requestUrl =
-        "/api/v1/ams/getSaleOrderInfoes?apiId=408&saler=" +
-        getCookie("loginName") +
-        "&i=" +
-        new Date();
+        '/api/v1/ams/getSaleOrderInfoes?apiId=408&saler=' +
+        getCookie('loginName') +
+        '&i=' +
+        new Date()
       this.option2.requestUrl =
-        "/api/v1/ams/getSaleOrderReportedes?apiId=408&saler=" +
-        getCookie("loginName") +
-        "&i=" +
-        new Date();
+        '/api/v1/ams/getSaleOrderReportedes?apiId=408&saler=' +
+        getCookie('loginName') +
+        '&i=' +
+        new Date()
     } else {
       this.option.requestUrl =
-        "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
+        '/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=' +
         null +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
       this.option2.requestUrl =
-        "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
+        '/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=' +
         null +
-        "&i=" +
-        new Date();
+        '&i=' +
+        new Date()
     }
     let loadTime1 = new Date(
       new Date(new Date().toLocaleDateString()).getTime() +
         (3600 * 1000 * 8 - 1)
-    ); // 当天8点前
+    ) // 当天8点前
     let loadTime2 = new Date(
       new Date(new Date().toLocaleDateString()).getTime() +
         (3600 * 1000 * 32 - 1)
-    ); // 次天8点前
+    ) // 次天8点前
     if (new Date().getTime() - loadTime1 > 0) {
-      this.saleDateOfReceipt = loadTime2;
+      this.saleDateOfReceipt = loadTime2
     } else {
-      this.saleDateOfReceipt = loadTime1;
+      this.saleDateOfReceipt = loadTime1
     }
   },
   methods: {
     //导入Excel格式
     //导入excel
     importExcel(file) {
-      let that = this;
+      let that = this
       if (!file) {
         that.$message({
-          message: "文件错误!",
-          type: "warning"
-        });
-        return;
+          message: '文件错误!',
+          type: 'warning'
+        })
+        return
       }
-      this.tableData = [];
-      var reader = new FileReader();
-      var data = null;
-      var workbook = null;
+      this.tableData = []
+      var reader = new FileReader()
+      var data = null
+      var workbook = null
       //设置读取操作
       reader.onload = function(e) {
-        data = e.target.result;
+        data = e.target.result
         workbook = XLSX.read(data, {
-          type: "binary"
-        });
+          type: 'binary'
+        })
         let rows = XLSX.utils.sheet_to_json(
           workbook.Sheets[workbook.SheetNames[0]]
-        ); //只取第一页
-        console.log("rows", rows);
+        ) //只取第一页
+        console.log('rows', rows)
         Array.from(rows).forEach((e, index) => {
-          let map = {};
+          let map = {}
           try {
-            debugger;
+            debugger
             Object.keys(e).forEach(e1 => {
-              if (e1.includes("销售订单编号")) {
-                map.saleOrderNo = e[e1];
+              if (e1.includes('销售订单编号')) {
+                map.saleOrderNo = e[e1]
               }
-              if (e1.includes("物资名称")) {
-                map.materialName = e[e1];
+              if (e1.includes('物资名称')) {
+                map.materialName = e[e1]
                 if (
-                  e[e1].includes("盘螺") ||
-                  e[e1].includes("乱尺") ||
-                  e[e1].includes("盘元") ||
-                  e[e1].includes("盘圆")
+                  e[e1].includes('盘螺') ||
+                  e[e1].includes('乱尺') ||
+                  e[e1].includes('盘元') ||
+                  e[e1].includes('盘圆')
                 ) {
-                  map.isPoundSale = 0;
+                  map.isPoundSale = 0
                 } else {
-                  map.isPoundSale = 1;
+                  map.isPoundSale = 1
                 }
                 //确定更改的物资有无米数
-                if (e[e1].includes("米")) {
-                  map.steelMeters = Number(e[e1].replace(/[^0.0-9.0]/gi, ""));
+                if (e[e1].includes('米')) {
+                  map.steelMeters = Number(e[e1].replace(/[^0.0-9.0]/gi, ''))
                 } else {
-                  map.steelMeters = null;
+                  map.steelMeters = null
                 }
               }
-              if (e1.includes("规格型号")) {
-                console.log(e[e1]);
-                let str = e[e1];
-                let regex = /\((.+?)\)/g;
+              if (e1.includes('规格型号')) {
+                console.log(e[e1])
+                let str = e[e1]
+                let regex = /\((.+?)\)/g
                 if (str.match(regex) != null) {
-                  let spa = str.replace(str.match(regex)[0], "");
+                  let spa = str.replace(str.match(regex)[0], '')
                   let model = str
                     .match(regex)[0]
-                    .replace("(", "")
-                    .replace(")", "");
-                  map.materialModel = model;
-                  if ((spa + "").includes("Φ")) {
-                    map.materialSpecification = spa;
+                    .replace('(', '')
+                    .replace(')', '')
+                  map.materialModel = model
+                  if ((spa + '').includes('Φ')) {
+                    map.materialSpecification = spa
                   } else {
-                    map.materialSpecification = "Φ" + spa;
+                    map.materialSpecification = 'Φ' + spa
                   }
                 } else {
-                  map.materialSpecification = e[e1];
-                  map.model = null;
+                  map.materialSpecification = e[e1]
+                  map.model = null
                 }
               }
-              if (e1.includes("下单客户")) {
-                map.receiveName = e[e1];
+              if (e1.includes('下单客户')) {
+                map.receiveName = e[e1]
               }
               if (
-                e1.includes("米数") &&
-                (map.steelMeters == null || map.steelMeters != "")
+                e1.includes('米数') &&
+                (map.steelMeters == null || map.steelMeters != '')
               ) {
-                map.steelMeters = e[e1];
+                map.steelMeters = e[e1]
               }
-              if (e1.includes("物资规格") && !e1.includes("规格型号")) {
-                if ((e[e1] + "").includes("Φ")) {
-                  map.materialSpecification = e[e1];
+              if (e1.includes('物资规格') && !e1.includes('规格型号')) {
+                if ((e[e1] + '').includes('Φ')) {
+                  map.materialSpecification = e[e1]
                 } else {
-                  map.materialSpecification = "Φ" + e[e1];
+                  map.materialSpecification = 'Φ' + e[e1]
                 }
               }
-              if (e1.includes("物资型号") && !e1.includes("规格型号")) {
-                map.materialModel = e[e1];
+              if (e1.includes('物资型号') && !e1.includes('规格型号')) {
+                map.materialModel = e[e1]
               }
-              if (e1.includes("物资件数")) {
+              if (e1.includes('物资件数')) {
                 if (isNumber(e[e1])) {
-                  map.materialNumber = e[e1];
+                  map.materialNumber = e[e1]
                 } else {
                   throw new Error(
                     `该Excel第--${index +
                       2}--行-“物资件数”错误,请核实后再输入(件数输入整数)`
-                  );
+                  )
                 }
               }
-              if (e1.includes("车序号")) {
-                if (typeof e[e1] != "undefined" && isNumber(e[e1])) {
-                  map.truckNo = e[e1];
+              if (e1.includes('车序号')) {
+                if (typeof e[e1] != 'undefined' && isNumber(e[e1])) {
+                  map.truckNo = e[e1]
                 } else {
                   throw new Error(
                     `该Excel第--${index +
                       2}--行-“车序号”错误,请核实后再输入(车序号输入正整数)`
-                  );
+                  )
                 }
               }
-              if (e1.includes("收款公司")) {
+              if (e1.includes('收款公司')) {
                 if (that.receivingCompany.indexOf(e[e1]) === -1) {
                   throw new Error(
                     `该Excel第--${index + 2}--行-“收款公司”错误,请核实后再输入`
-                  );
+                  )
                 } else {
-                  map.saleOrderReceiveCustomer = e[e1];
+                  map.saleOrderReceiveCustomer = e[e1]
                 }
               }
-              if (e1.includes("业务员")) {
-                map.salerName = e[e1];
+              if (e1.includes('业务员')) {
+                map.salerName = e[e1]
               }
-              if (e1.includes("摘要")) {
-                if (e[e1].includes("范围定尺")) {
-                  map.saleRemark = e[e1];
+              if (e1.includes('摘要')) {
+                if (e[e1].includes('范围定尺')) {
+                  map.saleRemark = e[e1]
                 } else {
-                  map.saleRemark = e[e1];
+                  map.saleRemark = e[e1]
                 }
-                map.saleRemark = e[e1];
-                let regex = /钢材.*组/g;
+                map.saleRemark = e[e1]
+                let regex = /钢材.*组/g
                 if (e[e1].match(regex)) {
-                  map.saleArea = e[e1].match(regex)[0];
+                  map.saleArea = e[e1].match(regex)[0]
                 }
-                let regex1 = /范围.*米/g;
+                let regex1 = /范围.*米/g
                 if (e[e1].match(regex1)) {
                   map.steelMeters = Number(
                     e[e1].match(regex1)[0].match(/(\d+(\.\d+)?)/g)
-                  );
+                  )
                 }
               }
-              if (e1.includes("省")) {
-                map.province = e[e1];
+              if (e1.includes('省')) {
+                map.province = e[e1]
               }
-              if (e1.includes("市")) {
-                map.district = e[e1];
+              if (e1.includes('市')) {
+                map.district = e[e1]
               }
-              if (e1.includes("县/区")) {
-                map.town = e[e1];
+              if (e1.includes('县/区')) {
+                map.town = e[e1]
               }
-              if (e1.includes("具体收货地址")) {
-                map.place = e[e1];
+              if (e1.includes('具体收货地址')) {
+                map.place = e[e1]
               }
-              if (e1.includes("收货客户电话")) {
-                map.saleOrderConsigneeTel = e[e1];
+              if (e1.includes('收货客户电话')) {
+                map.saleOrderConsigneeTel = e[e1]
               }
-              if (e1.includes("备注")) {
-                map.truckRemark = e[e1];
+              if (e1.includes('备注')) {
+                map.truckRemark = e[e1]
               }
-              if (e1.includes("是否自提")) {
-                if (e[e1] === "是" || e[e1] === "否") {
-                  map.isSelfMention = e[e1];
+              if (e1.includes('是否自提')) {
+                if (e[e1] === '是' || e[e1] === '否') {
+                  map.isSelfMention = e[e1]
                 } else {
-                  map.isSelfMention = "否";
+                  map.isSelfMention = '否'
                 }
               }
-            });
-            map.shipperName = that.shipperName;
-            if (typeof map.isSelfMention === "undefined") {
-              map.isSelfMention = "否";
+            })
+            map.shipperName = that.shipperName
+            if (typeof map.isSelfMention === 'undefined') {
+              map.isSelfMention = '否'
             }
             if (map.saleRemark && map.receiveName && map.materialName) {
-              that.tableData.push(map);
+              that.tableData.push(map)
             }
           } catch (e) {
-            that.$message.error(e.message);
+            that.$message.error(e.message)
           }
-        });
-        console.log(this.tableData);
-        that.addExcelInport();
+        })
+        console.log(this.tableData)
+        that.addExcelInport()
         // that.dialogTableVisible = true;
-        return;
-      };
-      reader.readAsBinaryString(file.raw); //以二进制方式读取
+        return
+      }
+      reader.readAsBinaryString(file.raw) //以二进制方式读取
     },
     //自己写一个比较函数排序
     // 排序
     compare(property) {
       return function(a, b) {
-        var value1 = a[property];
-        var value2 = b[property];
-        return value2 - value1;
-      };
+        var value1 = a[property]
+        var value2 = b[property]
+        return value2 - value1
+      }
     },
     addExcelInport() {
       //加载虚拟
       const loading = this.$loading({
         lock: true,
-        text: "正在快马加鞭为您生成销售订单,请稍候",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
-      });
-      console.log(this.tableData);
-      debugger;
+        text: '正在快马加鞭为您生成销售订单,请稍候',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      console.log(this.tableData)
+      debugger
       //遍历数组,根据摘要和下单客户自动给出销售订单编号
       for (let i = 0; i < this.tableData.length; i++) {
         if (i === 0) {
-          this.tableData[i].saleOrderNo = 1;
+          this.tableData[i].saleOrderNo = 1
         } else {
           let sortArr = this.tableData
             .filter(e => {
               return (
-                typeof e.saleOrderNo != "undefined" &&
-                e.saleOrderNo != "undefined" &&
+                typeof e.saleOrderNo != 'undefined' &&
+                e.saleOrderNo != 'undefined' &&
                 isNumber(e.saleOrderNo)
-              );
+              )
             })
             .map(e => {
               if (
-                typeof e.saleOrderNo != "undefined" &&
-                e.saleOrderNo != "undefined" &&
+                typeof e.saleOrderNo != 'undefined' &&
+                e.saleOrderNo != 'undefined' &&
                 isNumber(e.saleOrderNo)
               ) {
-                return e.saleOrderNo;
+                return e.saleOrderNo
               }
             })
             .sort((a, b) => {
-              return a - b;
-            });
+              return a - b
+            })
           //当大于0的时候,需要遍历整个数组,与之相等的有哪些
           for (let j = 0; j < i; j++) {
             if (
@@ -716,11 +716,11 @@ export default {
               this.tableData[i].saleOrderReceiveCustomer ===
                 this.tableData[j].saleOrderReceiveCustomer
             ) {
-              this.tableData[i].saleOrderNo = this.tableData[j].saleOrderNo;
-              break;
+              this.tableData[i].saleOrderNo = this.tableData[j].saleOrderNo
+              break
             } else {
               if (j == i - 1) {
-                this.tableData[i].saleOrderNo = sortArr[sortArr.length - 1] + 1;
+                this.tableData[i].saleOrderNo = sortArr[sortArr.length - 1] + 1
               }
             }
           }
@@ -730,145 +730,145 @@ export default {
       // debugger;
       //需要遍历数组,以销售订单编号为分类
       const map1 = this.tableData.reduce((result, item) => {
-        result[item.saleOrderNo] = result[item.saleOrderNo] || [];
-        result[item.saleOrderNo].push(item);
-        return result;
-      }, {});
+        result[item.saleOrderNo] = result[item.saleOrderNo] || []
+        result[item.saleOrderNo].push(item)
+        return result
+      }, {})
       // result即为所求
-      let result = Object.values(map1);
-      console.log(result);
+      let result = Object.values(map1)
+      console.log(result)
       //遍历数组
-      let saleOrderListMap = [];
+      let saleOrderListMap = []
       result.forEach((saleOrderList, index) => {
-        let map = {};
-        let arr = [];
-        console.log("saleOrderList");
-        console.log(saleOrderList);
+        let map = {}
+        let arr = []
+        console.log('saleOrderList')
+        console.log(saleOrderList)
         saleOrderList.forEach(e => {
-          let mapMaterial = {};
+          let mapMaterial = {}
           Object.keys(e).forEach(e1 => {
             if (this.saleOrderList.includes(e1)) {
-              map[e1] = e[e1];
+              map[e1] = e[e1]
             }
             if (this.saleOrderMapList.includes(e1)) {
-              mapMaterial[e1] = e[e1];
+              mapMaterial[e1] = e[e1]
             }
-          });
-          mapMaterial.saleDateOfReceipt = sjTime(this.saleDateOfReceipt);
-          arr.push(mapMaterial);
-        });
-        map.shipperId = 1;
-        map.mapList = arr;
-        saleOrderListMap.push(map);
-      });
-      console.log(saleOrderListMap);
+          })
+          mapMaterial.saleDateOfReceipt = sjTime(this.saleDateOfReceipt)
+          arr.push(mapMaterial)
+        })
+        map.shipperId = 1
+        map.mapList = arr
+        saleOrderListMap.push(map)
+      })
+      console.log(saleOrderListMap)
       this.axios
-        .post("/api/v1/ams/addSteelSaleOrderList", saleOrderListMap)
+        .post('/api/v1/ams/addSteelSaleOrderList', saleOrderListMap)
         .then(res => {
-          if (res.data.code == "200") {
-            loading.close();
-            this.getRequestUrl();
-            this.$message.success("新增销售订单成功!");
-            this.tableData = [];
+          if (res.data.code == '200') {
+            loading.close()
+            this.getRequestUrl()
+            this.$message.success('新增销售订单成功!')
+            this.tableData = []
           } else {
-            this.$message.error(res.data.data);
-            this.getRequestUrl();
-            loading.close();
-            this.tableData = [];
+            this.$message.error(res.data.data)
+            this.getRequestUrl()
+            loading.close()
+            this.tableData = []
           }
         })
         .catch(e => {
-          this.$message.error("生成错误!");
-          loading.close();
-          this.tableData = [];
-        });
+          this.$message.error('生成错误!')
+          loading.close()
+          this.tableData = []
+        })
     },
     adverseCloseSaleOrder(row) {
-      console.log(row);
-      this.$confirm("确定反关闭整条订单吗?", "继续?", {
-        cancelButtonText: "取消",
-        confirmButtonText: "确定",
+      console.log(row)
+      this.$confirm('确定反关闭整条订单吗?', '继续?', {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
         center: true
       }).then(() => {
         this.axios
           .post(
-            "/api/v1/ams/adverseCloseSaleOrder?saleOrderId=" + row.saleOrderId
+            '/api/v1/ams/adverseCloseSaleOrder?saleOrderId=' + row.saleOrderId
           )
           .then(res => {
-            if (res.data.code == "200") {
-              this.$message.success("反关闭成功");
-              this.getRequestUrl();
+            if (res.data.code == '200') {
+              this.$message.success('反关闭成功')
+              this.getRequestUrl()
             } else {
-              this.$message.error("反关闭失败");
-              this.getRequestUrl();
+              this.$message.error('反关闭失败')
+              this.getRequestUrl()
             }
           })
           .catch(() => {
-            this.$message.error("反关闭失败");
-          });
-      });
+            this.$message.error('反关闭失败')
+          })
+      })
     },
     updateReportedSaleOrder(scope) {
-      this.$router.push("/editSaleOrder/" + scope.row.saleOrderId);
+      this.$router.push('/editSaleOrder/' + scope.row.saleOrderId)
     },
     updateSaleOrderStatusById(scope) {
-      console.log(scope.row.saleOrderId);
-      this.$confirm("是否撤销", "警告", {
-        confirmButtonText: "确定撤销",
-        cancelButtonText: "取消撤销",
-        type: "warning",
+      console.log(scope.row.saleOrderId)
+      this.$confirm('是否撤销', '警告', {
+        confirmButtonText: '确定撤销',
+        cancelButtonText: '取消撤销',
+        type: 'warning',
         center: true
       })
         .then(() => {
           this.axios
             .post(
-              "/api/v1/uc/updateSaleOrderStatusById?saleOrderId=" +
+              '/api/v1/uc/updateSaleOrderStatusById?saleOrderId=' +
                 scope.row.saleOrderId
             )
             .then(res => {
-              if (res.data.code == "200") {
-                this.$message.success("撤销成功");
-                this.activeName = "first";
-                this.getRequestUrl();
+              if (res.data.code == '200') {
+                this.$message.success('撤销成功')
+                this.activeName = 'first'
+                this.getRequestUrl()
               } else {
-                this.$message.error("撤销失败");
+                this.$message.error('撤销失败')
               }
             })
             .catch(() => {
-              this.$message.error("撤销失败");
-            });
+              this.$message.error('撤销失败')
+            })
         })
         .catch(() => {
-          console.log("取消撤销");
-        });
+          console.log('取消撤销')
+        })
     },
     func(res) {
       this.matSum = res.list.reduce(function(prev, item) {
-        return prev + item.materialNumber;
-      }, 0);
+        return prev + item.materialNumber
+      }, 0)
     },
     func1(res) {
       this.matSum = res.list.reduce(function(prev, item) {
-        return prev + item.materialNumber;
-      }, 0);
+        return prev + item.materialNumber
+      }, 0)
     },
     func2(res) {
       this.matSum = res.list.reduce(function(prev, item) {
-        return prev + item.materialNumber;
-      }, 0);
+        return prev + item.materialNumber
+      }, 0)
     },
     func3(res) {
       this.matSum = res.list.reduce(function(prev, item) {
-        return prev + item.materialNumber;
-      }, 0);
+        return prev + item.materialNumber
+      }, 0)
     },
     closeSteelOrderAndEas(row) {
-      this.$prompt("此操作将同步关闭金蝶和物流的销售订单,是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        inputPlaceholder: "请输入关闭原因-必填!!!",
+      this.$prompt('此操作将同步关闭金蝶和物流的销售订单,是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPlaceholder: '请输入关闭原因-必填!!!',
         center: true,
-        type: "warning"
+        type: 'warning'
       })
         .then(({ value }) => {
           if (value != null) {
@@ -876,41 +876,41 @@ export default {
               number: row.saleNumber,
               saleOrderId: row.saleOrderId,
               reason: value
-            };
-            console.log(mapValue);
+            }
+            console.log(mapValue)
             this.axios
-              .post("/api/v1/ams/deleteSaleOrderSame", mapValue)
+              .post('/api/v1/ams/deleteSaleOrderSame', mapValue)
               .then(res => {
                 if (res.data.code == 200) {
-                  this.$message.success("关闭成功");
-                  this.getRequestUrl();
+                  this.$message.success('关闭成功')
+                  this.getRequestUrl()
                 } else {
-                  this.$message.error("关闭失败,请联系管理员");
+                  this.$message.error('关闭失败,请联系管理员')
                 }
               })
               .catch(() => {
-                this.$message.error("关闭失败,请联系管理员");
-                this.getRequestUrl();
-              });
+                this.$message.error('关闭失败,请联系管理员')
+                this.getRequestUrl()
+              })
           } else {
-            this.$message.error("请输入理由");
+            this.$message.error('请输入理由')
           }
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消输入"
-          });
-        });
+            type: 'info',
+            message: '取消输入'
+          })
+        })
     },
     deleteSaleOrder(row) {
-      console.log(row);
-      this.$prompt("此操作将关闭订单且下面的待运输订单,是否继续?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        inputPlaceholder: "请输入关闭原因-必填!!!",
+      console.log(row)
+      this.$prompt('此操作将关闭订单且下面的待运输订单,是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputPlaceholder: '请输入关闭原因-必填!!!',
         center: true,
-        type: "warning"
+        type: 'warning'
       })
         .then(({ value }) => {
           if (value != null) {
@@ -918,344 +918,357 @@ export default {
               number: row.saleNumber,
               saleOrderId: row.saleOrderId,
               reason: value
-            };
+            }
             this.axios
               .post(
-                "/api/v1/ams/deleteSaleOrderById?saleOrderId=" + row.saleOrderId
+                '/api/v1/ams/deleteSaleOrderById?saleOrderId=' + row.saleOrderId
               )
               .then(res => {
                 if (res.data.code == 200) {
-                  this.$message.success("关闭成功");
-                  this.getRequestUrl();
+                  this.$message.success('关闭成功')
+                  this.getRequestUrl()
                 }
-              });
+              })
           } else {
-            this.$message.error("请输入理由");
+            this.$message.error('请输入理由')
           }
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消输入"
-          });
-        });
+            type: 'info',
+            message: '取消输入'
+          })
+        })
     },
     updateSaleOrder(row) {
-      console.log(row);
+      console.log(row)
       this.$router.push(
-        "updateSaleOrderSteel/" + row.saleOrderId + "/" + row.deleted
-      );
+        'updateSaleOrderSteel/' + row.saleOrderId + '/' + row.deleted
+      )
     },
     getOrderDetails(saleOrderId) {
-      console.log(saleOrderId);
-      this.$router.push("saleOrderOODetails/" + saleOrderId);
+      console.log(saleOrderId)
+      this.$router.push('saleOrderOODetails/' + saleOrderId)
     },
     getRequestUrl() {
-      if (getCookie("orgCode") == "shouhuokehu") {
+      if (getCookie('orgCode') == 'shouhuokehu') {
         this.option.requestUrl =
-          "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
-          getCookie("userId") +
-          "&i=" +
-          new Date();
+          '/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=' +
+          getCookie('userId') +
+          '&i=' +
+          new Date()
         this.option2.requestUrl =
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
-          getCookie("userId") +
-          "&i=" +
-          new Date();
+          '/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=' +
+          getCookie('userId') +
+          '&i=' +
+          new Date()
         this.option4.requestUrl =
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
-          getCookie("userId") +
-          "&i=" +
-          new Date();
+          '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=' +
+          getCookie('userId') +
+          '&i=' +
+          new Date()
         this.option5.requestUrl =
-          "/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=" +
-          getCookie("userId") +
-          "&i=" +
-          new Date();
-      } else if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+          '/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=' +
+          getCookie('userId') +
+          '&i=' +
+          new Date()
+      } else if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
         this.option.requestUrl =
-          "/api/v1/ams/getSaleOrderInfoes?apiId=408&saler=" +
-          getCookie("loginName") +
-          "&i=" +
-          new Date();
+          '/api/v1/ams/getSaleOrderInfoes?apiId=408&saler=' +
+          getCookie('loginName') +
+          '&i=' +
+          new Date()
         this.option2.requestUrl =
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408&saler=" +
-          getCookie("loginName") +
-          "&i=" +
-          new Date();
+          '/api/v1/ams/getSaleOrderReportedes?apiId=408&saler=' +
+          getCookie('loginName') +
+          '&i=' +
+          new Date()
         this.option4.requestUrl =
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&saler=" +
-          getCookie("loginName") +
-          "&i=" +
-          new Date();
+          '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&saler=' +
+          getCookie('loginName') +
+          '&i=' +
+          new Date()
         this.option5.requestUrl =
-          "/api/v1/ams/getSteelOrderDeletedList?apiId=409&saler=" +
-          getCookie("loginName");
+          '/api/v1/ams/getSteelOrderDeletedList?apiId=409&saler=' +
+          getCookie('loginName')
       } else {
         this.option.requestUrl =
-          "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
+          '/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=' +
           null +
-          "&i=" +
-          new Date();
+          '&i=' +
+          new Date()
         this.option2.requestUrl =
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=" +
+          '/api/v1/ams/getSaleOrderReportedes?apiId=408&consigneeSsoId=' +
           null +
-          "&i=" +
-          new Date();
+          '&i=' +
+          new Date()
         this.option4.requestUrl =
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
+          '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=' +
           null +
-          "&i=" +
-          new Date();
+          '&i=' +
+          new Date()
         this.option5.requestUrl =
-          "/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=" +
+          '/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=' +
           null +
-          "&i=" +
-          new Date();
+          '&i=' +
+          new Date()
       }
     },
     batchReport() {
       if (this.batchReportList.length === 0) {
-        this.$message.error("请先选择需要批量上传的销售订单");
-        return;
+        this.$message.error('请先选择需要批量上传的销售订单')
+        return
       }
+      let arr = Array.from(
+        new Set(
+          this.batchReportList.map(e => {
+            return e.saleOrderId
+          })
+        )
+      ).map(e => {
+        let map = {}
+        map.saleOrderId = e
+        return map
+      })
+      console.log(arr)
       const loading = this.$loading({
         lock: true,
-        text: "正在努力上传",
-        spinner: "el-icon-loading",
-        background: "rgba(0, 0, 0, 0.7)"
-      });
+        text: '正在努力上传',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
       this.axios
-        .post("/api/v1/ams/uploadSaleOrderList", this.batchReportList)
+        .post('/api/v1/ams/uploadSaleOrderList', arr)
         .then(res => {
-          if (res.data.code == "200") {
-            this.$message.success("上传成功");
-            this.getRequestUrl();
-            loading.close();
+          if (res.data.code == '200') {
+            this.$message.success('上传成功')
+            loading.close()
+            this.getRequestUrl()
           } else {
-            this.$message.error("上传失败");
-            loading.close();
+            this.$message.error('上传失败')
+            loading.close()
           }
         })
         .catch(() => {
-          this.$message.error("上传失败");
-          loading.close();
-        });
+          this.$message.error('上传失败')
+          loading.close()
+        })
     },
     selectionChange(selection) {
-      console.log(selection);
-      this.batchReportList = [];
-      this.batchReportList = selection;
+      console.log(selection)
+      this.batchReportList = []
+      this.batchReportList = selection
+      console.log(this.batchReportList)
     },
     refresh() {
-      this.getRequestUrl();
+      this.getRequestUrl()
     },
     handleClick(tab, event) {
-      console.log(tab, event);
+      console.log(tab, event)
     },
     onclick() {
-      var startTime = null;
-      var endTime = null;
+      var startTime = null
+      var endTime = null
       if (this.startTime && this.endTime) {
-        startTime = sjTime(this.startTime);
-        endTime = sjTime(this.endTime);
+        startTime = sjTime(this.startTime)
+        endTime = sjTime(this.endTime)
       }
-      if (getCookie("orgCode") == "shouhuokehu") {
-        if (this.activeName == "first") {
+      if (getCookie('orgCode') == 'shouhuokehu') {
+        if (this.activeName == 'first') {
           this.option.requestUrl =
-            "/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=" +
+            '/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=' +
             this.input +
-            "&consigneeSsoId=" +
-            getCookie("userId") +
-            "&startTime=" +
+            '&consigneeSsoId=' +
+            getCookie('userId') +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
-            new Date();
-        } else if (this.activeName == "second") {
+            '&i=' +
+            new Date()
+        } else if (this.activeName == 'second') {
           this.option2.requestUrl =
-            "/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=" +
+            '/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=' +
             this.input +
-            "&consigneeSsoId=" +
-            getCookie("userId") +
-            "&startTime=" +
+            '&consigneeSsoId=' +
+            getCookie('userId') +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
-            new Date();
-        } else if (this.activeName == "four") {
+            '&i=' +
+            new Date()
+        } else if (this.activeName == 'four') {
           this.option4.requestUrl =
-            "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=" +
+            '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=' +
             this.input +
-            "&consigneeSsoId=" +
-            getCookie("userId") +
-            "&startTime=" +
+            '&consigneeSsoId=' +
+            getCookie('userId') +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
         }
-      } else if (getCookie("orgCode") == "xiaoshouyewuyuan") {
-        if (this.activeName == "first") {
+      } else if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
+        if (this.activeName == 'first') {
           this.option.requestUrl =
-            "/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=" +
+            '/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=' +
             this.input +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
+            '&i=' +
             new Date() +
-            "saler=" +
-            getCookie("loginName");
-        } else if (this.activeName == "second") {
+            'saler=' +
+            getCookie('loginName')
+        } else if (this.activeName == 'second') {
           this.option2.requestUrl =
-            "/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=" +
+            '/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=' +
             this.input +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
+            '&i=' +
             new Date() +
-            "saler=" +
-            getCookie("loginName");
-        } else if (this.activeName == "four") {
+            'saler=' +
+            getCookie('loginName')
+        } else if (this.activeName == 'four') {
           this.option4.requestUrl =
-            "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=" +
+            '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=' +
             this.input +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
+            '&i=' +
             new Date() +
-            "saler=" +
-            getCookie("loginName");
+            'saler=' +
+            getCookie('loginName')
         }
       } else {
-        if (this.activeName == "first") {
+        if (this.activeName == 'first') {
           this.option.requestUrl =
-            "/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=" +
+            '/api/v1/ams/getSaleOrderInfoes?apiId=408&saleType=1&con=' +
             this.input +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
-            new Date();
-        } else if (this.activeName == "second") {
+            '&i=' +
+            new Date()
+        } else if (this.activeName == 'second') {
           this.option2.requestUrl =
-            "/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=" +
+            '/api/v1/ams/getSaleOrderReportedes?apiId=408&saleType=1&con=' +
             this.input +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
-            new Date();
-        } else if (this.activeName == "four") {
+            '&i=' +
+            new Date()
+        } else if (this.activeName == 'four') {
           this.option4.requestUrl =
-            "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=" +
+            '/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&saleType=1&shipperId=1&con=' +
             this.input +
-            "&startTime=" +
+            '&startTime=' +
             startTime +
-            "&endTime=" +
+            '&endTime=' +
             endTime +
-            "&i=" +
-            new Date();
+            '&i=' +
+            new Date()
         }
       }
     },
     handleClose() {},
     seeclick(saleOrderId) {
-      this.$router.push("/saleOrderDetail/" + saleOrderId);
+      this.$router.push('/saleOrderDetail/' + saleOrderId)
     },
     btnclick() {
-      this.$router.push("/addSaleOrder");
+      this.$router.push('/addSaleOrder')
     },
     click(saleOrderId) {
-      this.$router.push("/editSaleOrder/" + saleOrderId);
+      this.$router.push('/editSaleOrder/' + saleOrderId)
     },
     copyClick(saleOrderId) {
-      this.$router.push("/copySteelOrder/" + saleOrderId);
+      this.$router.push('/copySteelOrder/' + saleOrderId)
     },
     // 上传
     uploadclick(saleOrderId) {
-      this.$confirm("是否上传", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      this.$confirm('是否上传', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
         center: true
       })
         .then(() => {
           const loading = this.$loading({
             lock: true,
-            text: "正在努力上传",
-            spinner: "el-icon-loading",
-            background: "rgba(0, 0, 0, 0.7)"
-          });
+            text: '正在努力上传',
+            spinner: 'el-icon-loading',
+            background: 'rgba(0, 0, 0, 0.7)'
+          })
           this.axios
-            .post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
+            .post('/api/v1/ams/uploadSaleOrder?saleOrderId=' + saleOrderId)
             .then(res => {
-              if (res.data.code == "200") {
-                this.$message.success("上传成功!");
-                this.getRequestUrl();
-                loading.close();
+              if (res.data.code == '200') {
+                this.$message.success('上传成功!')
+                this.getRequestUrl()
+                loading.close()
               } else {
-                this.$message.success("上传失败!");
-                this.getRequestUrl();
-                loading.close();
+                this.$message.success('上传失败!')
+                this.getRequestUrl()
+                loading.close()
               }
             })
             .catch(() => {
-              loading.close();
-            });
+              loading.close()
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消上传!"
-          });
-        });
+            type: 'info',
+            message: '取消上传!'
+          })
+        })
     },
     //删除
     deleteclick(scope) {
-      let saleOrderId = scope;
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
+      let saleOrderId = scope
+      this.$confirm('是否删除', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
         center: true
       })
         .then(() => {
           this.axios
             .post(
-              "/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
+              '/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=' +
                 saleOrderId
             )
             .then(res => {
-              if (res.data.code == "200") {
-                this.$message.success("删除成功");
-                this.getRequestUrl();
+              if (res.data.code == '200') {
+                this.$message.success('删除成功')
+                this.getRequestUrl()
               } else {
-                this.$message.success("删除失败");
-                this.getRequestUrl();
+                this.$message.success('删除失败')
+                this.getRequestUrl()
               }
-            });
+            })
         })
         .catch(() => {
           this.$message({
-            type: "info",
-            message: "取消删除!"
-          });
-        });
+            type: 'info',
+            message: '取消删除!'
+          })
+        })
     }
   }
-};
+}
 </script>
 <style lang="scss" scoped>
 .salePlan {

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