luobang 2 anni fa
parent
commit
9a88a28daa

+ 2 - 1
build/utils.js

@@ -19,7 +19,8 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 // let devModules = ["index", "TMS", "appoint", "WMS", "queue"];
 // let devModules = ["index", "statisticalReport", "inward"];
 // let devModules = ["index", "WMS", "inward"];
-let devModules = ["all"];
+let devModules = ["index", "appoint", "statisticalReport", "inward", "WMS"];
+
 //let devModules = ["BMS","index","sale","appoint","AMS","queue","QMS","RMS",'statisticalReport'];
 
 if (pathSrc.indexOf("node_modules") > -1) {

+ 2 - 2
config/index.js

@@ -65,8 +65,8 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:80",
-    //target: "http://localhost:8080",
+    // target: "http://172.16.33.166:80",
+    target: "http://localhost:8080",
     // target: "http://192.168.1.101:8080",
     ws: true,
     pathRewrite: {

+ 34 - 4
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -978,7 +978,9 @@ export default {
       saleAreaId: null,
       isNiTui: 0,
       datalistindex: 0,
-      temporarylist: []
+      temporarylist: [],
+      //原始摘要值
+      remarksPro: null
     };
   },
   created() {
@@ -999,6 +1001,7 @@ export default {
     this.getAllProvince();
     //获取所有的业务员
     this.getAllsaleMan();
+    this.getRemarkDate();
   },
   mounted() {
     if (getCookie("orgCode") == "shouhuokehu") {
@@ -1015,7 +1018,10 @@ export default {
             this.axios
               .post("/api/v1/uc/getSaleArea?receiveId=" + this.consigneeId)
               .then(res => {
-                this.remarks = res.data.data;
+                if (res.data.data != null) {
+                  this.remarks = `${this.getRemarkDate()}${res.data.data}`;
+                  this.remarksPro = `${this.getRemarkDate()}${res.data.data}`;
+                }
               });
             this.axios
               .post(
@@ -1031,18 +1037,35 @@ export default {
                   place[0].addressTown +
                   place[0].place;
                 this.saleShipperAddressId = place[0].shipperAddressId;
+                this.addressId = place[0].shipperAddressId;
                 this.place1 = place[0].place;
                 this.saleMan = place[0].salerId;
                 this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
+                this.province = place[0].addressProvince;
+                this.city = place[0].addressDistrict;
+                if (this.city) {
+                  this.remarks = `${this.remarksPro},直发${this.city}`;
+                }
+                this.county = place[0].addressTown;
               });
           }
         });
     }
   },
   methods: {
+    //获取当前日期
+    getRemarkDate() {
+      let day = new Date().getDate();
+      let month = new Date().getMonth() + 1;
+      console.log(day);
+      console.log(month);
+      console.log(`${month}.${day}`);
+      return `${month}.${day}`;
+    },
     handleSelectSaleArea(item) {
       this.saleAreaId = item.areaId;
-      this.remarks = item.value;
+      this.remarks = this.getRemarkDate() + item.value;
+      this.remarksPro = this.getRemarkDate() + item.value;
     },
     onclikSaleArea() {
       if (this.saleAreaId == null) {
@@ -1189,6 +1212,7 @@ export default {
         )
         .then(res => {
           this.countyList = res.data.data;
+          this.remarks = this.remarksPro + `,直发${this.city}`;
         });
     },
     //县(区)改变
@@ -1250,7 +1274,10 @@ export default {
       this.axios
         .post("/api/v1/uc/getSaleArea?receiveId=" + this.consigneeId)
         .then(res => {
-          this.remarks = res.data.data;
+          if (res.data.data != null) {
+            this.remarks = this.getRemarkDate() + res.data.data;
+            this.remarksPro = this.getRemarkDate() + res.data.data;
+          }
         });
       this.axios
         .post(
@@ -1271,6 +1298,9 @@ export default {
           this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
           this.province = place[0].addressProvince;
           this.city = place[0].addressDistrict;
+          if (this.city) {
+            this.remarks = `${this.remarksPro},直发${this.city}`;
+          }
           this.county = place[0].addressTown;
         });
     },

+ 1 - 9
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -630,15 +630,7 @@ export default {
             if (typeof map.isSelfMention === "undefined") {
               map.isSelfMention = "否";
             }
-            if (
-              map.saleRemark &&
-              map.receiveName &&
-              map.materialName &&
-              map.truckNo &&
-              map.province &&
-              map.district &&
-              map.saleArea
-            ) {
+            if (map.saleRemark && map.receiveName && map.materialName) {
               that.tableData.push(map);
             }
           } catch (e) {

+ 2 - 1
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -114,11 +114,12 @@
             :row-key="getRowKey"
             style="width: 100%; margin-top: 20px"
             @selection-change="handleSelectionChange"
-            max-height="500px"
+            max-height="600px"
           >
             <el-table-column
               type="selection"
               width="55"
+              :selectable="selectInit"
               reserve-selection
             ></el-table-column>
             <el-table-column type="index" width="50"> </el-table-column>

+ 2 - 2
src/views/sale/components/saleSelfMachine/printReceipt.vue

@@ -234,8 +234,8 @@ export default {
       month: new Date().getMonth() + 1,
       date: new Date().getDate(),
       htmlTitle: "客户换票送货单",
-      note: ""
-      dataList:['1','2','3']
+      note: "",
+      dataList: ["1", "2", "3"]
     };
   },
   created() {

+ 126 - 17
src/views/statisticalReport/components/loadCapacityDetail/loadCapacityDetail.vue

@@ -3,7 +3,11 @@
   <div class="loadCapacityDetail">
     <div class="frameCalculation">
       <span>装车开始时间</span>
-      <el-date-picker v-model="startTime" type="datetime" placeholder="选择日期">
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
       </el-date-picker>
       <span>至</span>
       <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
@@ -11,23 +15,39 @@
       <el-button type="primary" class="btn" @click="onclickSearch">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"
+      <el-button type="primary" @click="exportSignleReport"
         ><i class="el-icon-download"></i>导出(Excel)</el-button
       >
       <span style="margin-left: 1rem;">合计净重:</span>
-      <el-input v-model="totalNumber" :disabled="true" style="width: 100px;"></el-input>
+      <el-input
+        v-model="totalNumber"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
       <span style="margin-left: 1rem;">合计车数:</span>
-      <el-input v-model="totalCapacity" :disabled="true" style="width: 100px;"></el-input>
-     
-       <el-input placeholder="请输入装机车牌号/可查询当天车辆数据" v-model="input" style="width: 220px;margin-left: 1rem;" clearable>
+      <el-input
+        v-model="totalCapacity"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
+
+      <el-input
+        placeholder="请输入装机车牌号/可查询当天车辆数据"
+        v-model="input"
+        style="width: 220px;margin-left: 1rem;"
+        clearable
+      >
       </el-input>
-         <el-button type="primary" class="btn" @click="onclickCapacity">
+      <el-button type="primary" class="btn" @click="onclickCapacity">
         <i class="el-icon-search"></i>查询
       </el-button>
-   
     </div>
     <div class="table">
-      <mergeRowTable ref="excelDom" v-bind.sync="option" @func="func"></mergeRowTable>
+      <mergeRowTable
+        ref="excelDom"
+        v-bind.sync="option"
+        @func="func"
+      ></mergeRowTable>
     </div>
   </div>
 </template>
@@ -42,15 +62,17 @@ export default {
       totalCapacity: null,
       startTime: null,
       endTime: null,
-
       input: "",
       tableTitle: "装机计重明细报表",
       option: {
         // 表格请求数据的地址
         requestUrl: "api/v1/tms/getLoaderForResultDetail?apiId=480",
         comparison: "orderNumber",
-        columnIndexs: [0, 1, 2, 4, 5, 6],
+        columnIndexs: [0, 1, 2, 4, 5, 6]
       },
+      inwardArr: [],
+      tableTitle: "装机计重明细",
+      totalArr: []
     };
   },
   created() {
@@ -74,11 +96,98 @@ export default {
     }
   },
   methods: {
+    exportSignleReport() {
+      if (this.startTime && this.endTime) {
+        this.openFullScreen1();
+      } else {
+        this.$confirm(
+          "没有输入时间区间,系统将默认导出今天0点到24点的单个报表数据,是否继续?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        )
+          .then(() => {
+            this.openFullScreen1();
+          })
+          .catch(() => {
+            this.$message.info("取消导出");
+          });
+      }
+    },
+    openFullScreen1() {
+      let startTime = null;
+      let endTime = null;
+      let orgCode = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (
+        getCookie("orgCode") != "dagangadmin" &&
+        getCookie("orgCode") != "zidonghuabu" &&
+        getCookie("orgCode") != "wuliuchuyunzhongxin"
+      ) {
+        orgCode = getCookie("orgCode");
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: "请等待导出",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      this.axios
+        .post(
+          "/api/v1/tms/getLoaderForResultDetail?apiId=480&isPage=yes&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&orgCode=" +
+            orgCode
+        )
+        .then(res => {
+          this.totalArr = [];
+          this.inwardArr = [];
+          this.tableTitle = "装机计重明细统计";
+          this.inwardArr = res.data.data;
+          this.totalArr = this.totalArr.concat(this.inwardArr);
+          this.exportAllReportToExcel();
+          setTimeout(() => {
+            loading.close();
+          }, 2000);
+        });
+    },
+    exportAllReportToExcel() {
+      var title = this.tableTitle;
+      let tHeader = [];
+      let filterVal = [];
+      this.dataColumnData.forEach(e1 => {
+        if (tHeader.indexOf(e1.label) === -1) {
+          tHeader.push(e1.label);
+        }
+        if (filterVal.indexOf(e1.prop) === -1) {
+          filterVal.push(e1.prop);
+        }
+      });
+      //导出为excel
+      this.downloadLoading = true;
+      require.ensure([], () => {
+        const {
+          export_json_to_excel
+        } = require("@/assets/excel/Export2Excel.js"); //这里必须使用绝对路径,使用@/+存放export2Excel的路径
+        // let list = this.$refs.excelDom.dataTabel;
+        let data = this.totalArr.map(v => filterVal.map(j => v[j])); //3.formatJson格式转换
+        export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+      });
+    },
     func(res) {
+      this.dataColumnData = res.columnData;
       console.log(res);
       var resultNetWeightTotal = 0;
       var currentCapacityTotal = 0;
-      res.list.forEach((e) => {
+      res.list.forEach(e => {
         currentCapacityTotal++;
         resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
       });
@@ -92,13 +201,13 @@ export default {
     getRequestUrl() {
       if (
         getCookie("orgCode") == "dagangadmin" ||
-        getCookie("orgCode") == "zidonghuabu"||
-        getCookie("orgCode")=="wuliuchuyunzhongxin"
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
       ) {
         this.option.requestUrl =
           "/api/v1/tms/getLoaderForResultDetail?apiId=480&startTime=null&endTime=null&i=" +
           new Date();
-      }  else {
+      } else {
         this.option.requestUrl =
           "/api/v1/tms/getLoaderForResultDetail?apiId=480&userId=" +
           getCookie("orgCode") +
@@ -150,8 +259,8 @@ export default {
       } else {
         this.getRequestUrl();
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>