Browse Source

修改采购进口矿以及采购燃料

zx 3 years ago
parent
commit
44ac10ef4e
45 changed files with 3520 additions and 1410 deletions
  1. 1 1
      .eslintrc.js
  2. 5 3
      build/utils.js
  3. 2 3
      config/index.js
  4. BIN
      dist.zip
  5. 19 0
      src/assets/excel/Export2Excel.js
  6. 3 1
      src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js
  7. 1 9
      src/components/DilCommonUI/packages/table/src/table.js
  8. 6 3
      src/components/DilCommonUI/packages/table/src/table.vue
  9. 39 0
      src/components/exportAllExcel/exportAllExcel.js
  10. 6 3
      src/components/exportExcel/exportExcel.js
  11. 24 0
      src/utils/exportExcelAdvanced.JS
  12. 6 12
      src/views/RMS/components/addMaterial.vue
  13. 17 11
      src/views/RMS/components/editMaterial.vue
  14. 95 87
      src/views/TMS/components/importedFuel/transportReserveRan.vue
  15. 65 45
      src/views/TMS/components/importedFuel/transportReserveRanAdd.vue
  16. 37 36
      src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue
  17. 12 11
      src/views/TMS/components/importedShip/shipLocation.vue
  18. 34 15
      src/views/appoint/components/saleContract/addSaleOrder.vue
  19. 33 0
      src/views/appoint/components/saleContract/editSaleOrder.vue
  20. 37 30
      src/views/appoint/components/saleContract/saleCokeInward.vue
  21. 42 97
      src/views/appoint/components/saleContract/saleOrder.vue
  22. 43 2
      src/views/appoint/components/saleContract/saleOrderCoproduct.vue
  23. 122 71
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  24. 51 93
      src/views/appoint/components/saleContract/saleOrderSteelCar.vue
  25. 25 18
      src/views/appoint/components/saleContract/saleOrderSteelCarrier.vue
  26. 597 20
      src/views/appoint/components/saleContract/updateSaleOrderSteel.vue
  27. 3 0
      src/views/inward/app.js
  28. 34 15
      src/views/inward/components/inwardFactory/unload.vue
  29. 198 106
      src/views/inward/components/inwardSettlement/detailOrder.vue
  30. 290 0
      src/views/inward/components/inwardSettlement/inwardAllDetailsOrder.vue
  31. 181 103
      src/views/inward/components/inwardSettlement/purInwardDetailsOrder.vue
  32. 181 104
      src/views/inward/components/inwardSettlement/timeDetailsWeight.vue
  33. 120 93
      src/views/inward/components/truckAppoint/purInwardRequirement.vue
  34. 4 5
      src/views/inward/components/truckAppoint/requirement.vue
  35. 2 2
      src/views/inward/components/truckOrder/addPurInwardOrder.vue
  36. 190 139
      src/views/inward/components/truckOrder/purInwardTruckOrder.vue
  37. 3 1
      src/views/inward/router/index.js
  38. 42 47
      src/views/sale/components/offSiteTransportation/checkGPS.vue
  39. 68 70
      src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue
  40. 597 0
      src/views/statisticalReport/components/inwardReport/allInwardReport.vue
  41. 58 31
      src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelNewMonitor.vue
  42. 4 2
      src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelOldMonitor.vue
  43. 100 57
      src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue
  44. 120 63
      src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue
  45. 3 1
      src/views/statisticalReport/router/index.js

+ 1 - 1
.eslintrc.js

@@ -57,6 +57,6 @@ module.exports = {
     'no-dupe-args': 2,
     // 不能有声明后未被使用的变量或参数
     'no-unused-vars': 0,
-    'space-before-function-paren': 0
+    'space-before-function-paren': 0,
   }
 };

+ 5 - 3
build/utils.js

@@ -16,9 +16,11 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 // let devModules = ['index','inward']
-let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS']
-// let devModules = ['index','sale']
-// let devModules = ['all']
+// let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS']
+let devModules = ['all']
+
+
+// let devModules = ['index','statisticalReport','inward']
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

+ 2 - 3
config/index.js

@@ -64,15 +64,14 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-      target: "http://localhost:8019",
-     //target: "http://localhost:8080",
+    target: "http://172.16.33.166:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
     }
   },
   "/views/api/v1": {
-    target: "http://localhost:8019",
+    target: "http://172.16.33.166:8080",
     // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {

BIN
dist.zip


+ 19 - 0
src/assets/excel/Export2Excel.js

@@ -132,6 +132,25 @@ export function export_json_to_excel(th, jsonData, defaultTitle) {
     var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
  
  
+    /* add worksheet to workbook */
+    wb.SheetNames.push(ws_name);
+    wb.Sheets[ws_name] = ws;
+ 
+    var wbout = XLSX.write(wb, {bookType: 'xlsx', bookSST: false, type: 'binary'});
+    var title = defaultTitle || '列表'
+    saveAs(new Blob([s2ab(wbout)], {type: "application/octet-stream"}), title + ".xlsx")
+}
+export function exportJsonToExcel(th, jsonData, defaultTitle) {
+ 
+    /* original data */
+ 
+    var data = jsonData;
+    data.unshift(th);
+    var ws_name = "SheetJS";
+ 
+    var wb = new Workbook(), ws = sheet_from_array_of_arrays(data);
+ 
+ 
     /* add worksheet to workbook */
     wb.SheetNames.push(ws_name);
     wb.Sheets[ws_name] = ws;

+ 3 - 1
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js

@@ -1,3 +1,6 @@
+/**
+ * 组件编写人--杨海明
+ */
 import Sortablejs from "sortablejs";
 export default {
   data() {
@@ -44,7 +47,6 @@ export default {
     // this.columnDrop();
   },
   methods: {
-
     //记录每一行的合并数
     getSpanArr(data) {
       //每次调用方法初始化

+ 1 - 9
src/components/DilCommonUI/packages/table/src/table.js

@@ -42,7 +42,6 @@ export default {
   methods: {
     getHeight(){
       this.height = window.innerHeight - this.shiyHeigth;
-      console.log(this.height);
     },
     // 通过请求获取数据
     requestData(options) {
@@ -65,13 +64,11 @@ export default {
         // 判断是否需要在请求体中放入参数
         if(this.requestQuery){
           this.dataRequestQuery=this.requestQuery;
-          console.log("表头数据")
-          console.log(this.dataRequestQuery)
         }
         let data = undefined;
         for (const key in this.dataRequestQuery) {
           const val = this.dataRequestQuery[key];
-          console.log(val)
+
           if (val||val==0) {
             if (!data) data = {};
             data[key] = val;
@@ -125,8 +122,6 @@ export default {
     refreshColumnData(columnData) {
       // 如果前端有写表头,则加在后端表头前面
       const d = this.columnData.concat(columnData);
-      console.log("d")
-      console.log(d)
       // 把操作列拼接到最后一列
       this.dataColumnData = d;
       this.dataDropColumn = [].concat(this.dataColumnData);
@@ -167,7 +162,6 @@ export default {
     },
     // 更新请求参数
     setDataRequestQuery(value) {
-      console.log(value);
       let q = this.dataRequestQuery;
       for (const key in value) {
         q[key] = value[key];
@@ -245,7 +239,6 @@ export default {
     },
     // current-page 改变时会触发
     currentChange(val, isRequest = true) {
-      console.log(val);
       if (isRequest) {
         this.requestData({ pageNum: val });
       }
@@ -255,7 +248,6 @@ export default {
     },
     // pageSize 改变时会触发
     sizeChange(val) {
-      console.log(val);
       this.dataPageSize = val;
       this.requestData({});
       this.$emit("update:size-change", val);

+ 6 - 3
src/components/DilCommonUI/packages/table/src/table.vue

@@ -154,6 +154,9 @@ export default {
     showIndex: {
       default: true
     },
+    isClear: {
+      default: null
+    },
     // 是否显示选择框
     // radio : 显示单选框
     // select : 显示多选框
@@ -252,11 +255,11 @@ export default {
     refreshData() {
       this.requestData();
       // 多选表格清空用户的选择
-      this.$refs.mainTable.clearSelection();
+      if (this.isClear != "1") {
+        this.$refs.mainTable.clearSelection();
+      }
     },
     rowDbClick(row) {
-      console.log(row);
-      console.log("我被双击了");
       this.$emit("rowDbClick", row);
     },
     toggleRowExpansion(row, expanded) {

+ 39 - 0
src/components/exportAllExcel/exportAllExcel.js

@@ -0,0 +1,39 @@
+/**
+ * 导出页面的所有数据合并为一个Excel
+ */
+// 导出表格为excel格式
+export default{
+  install (Vue, options) {
+    console.log(options)
+    Vue.prototype.exportAllData = function () {
+        var title = this.tableTitle
+        let tHeader = [];
+        let filterVal = [];
+        let refArr = Object.values(this.$refs);
+        var list = [];
+        refArr.forEach((e) => {
+            console.log(e)
+            e.dataColumnData.forEach((e1) => {
+              if(tHeader.indexOf(e1.label) === -1){
+                tHeader.push(e1.label)
+              }
+              if(filterVal.indexOf(e1.prop) === -1){
+                filterVal.push(e1.prop)
+              }
+            })
+            if(filterVal.indexOf(e.dataColumnData.prop) === -1){
+                filterVal.push(e.dataColumnData.prop)
+            }
+            list = list.concat(e.dataTabel)
+        })
+      //导出为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 = list.map((v) => filterVal.map((j) => v[j]));//3.formatJson格式转换
+      export_json_to_excel(tHeader, data, title); // (title)导出的表格名称
+    });
+    }
+  },
+}

+ 6 - 3
src/components/exportExcel/exportExcel.js

@@ -1,13 +1,16 @@
+/** */
+
 // 导出表格为excel格式
 export default{
   install (Vue, options) {
+    console.log(options)
     Vue.prototype.exportData = function () {
       var title = this.tableTitle
       let tHeader = [];
-        let filterVal = [];
-        this.$refs.excelDom.dataColumnData.filter( (item,i) =>{
+      let filterVal = [];
+      this.$refs.excelDom.dataColumnData.filter( (item,i) =>{
           tHeader.push(item.label);
-              filterVal.push(item.prop);
+          filterVal.push(item.prop);
           } )
       //导出为excel
       this.downloadLoading = true

+ 24 - 0
src/utils/exportExcelAdvanced.JS

@@ -0,0 +1,24 @@
+/**
+ * 导出excel的高级版本
+ * luobang
+ * 2022-05-09 有待进一步优化
+ */
+// 导出Excel全局组件
+export function exportExcelAdvanced(tableTitle, tableColumnData, tableData) {
+    let tHeader = [];
+    let filterVal = [];
+    tableColumnData.forEach(e => {
+    if (tHeader.indexOf(e.label) === -1) {
+          tHeader.push(e.label);
+    };
+    if (filterVal.indexOf(e.prop) === -1) {
+          filterVal.push(e.prop);
+    };
+    });
+    // this.downloadLoading = true;
+    require.ensure([], () => {
+    const { exportJsonToExcel } = require('@/assets/excel/Export2Excel.js');
+    let data = tableData.map(v => filterVal.map(j => v[j]));
+    exportJsonToExcel(tHeader, data, tableTitle);
+    });
+ }

+ 6 - 12
src/views/RMS/components/addMaterial.vue

@@ -6,16 +6,8 @@
       <dil-form :formId="326" v-model="form1" ref="from1"></dil-form>
     </div>
     <div class="form-box f1">
-      <el-form :inline="true" :model="formInline">
-        <div class="disableBox">
-          <el-form-item>
-            <el-input v-model="materialTypeName" disabled> </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="openDrawer">物资种类</el-button>
-          </el-form-item>
-        </div>
-      </el-form>
+      <el-input v-model="materialTypeName" disabled> </el-input>
+      <el-button type="primary" @click="openDrawer">物资种类</el-button>
     </div>
     <div class="eldrawer">
       <el-drawer
@@ -164,8 +156,10 @@ export default {
   display: flex;
   justify-content: center;
   align-items: center;
-  margin-top: -2.5rem;
-  margin-left: 22.3rem;
+  margin-top: 20px;
+  .el-input {
+    width: 250px;
+  }
 }
 .f11 {
   margin-top: -3rem;

+ 17 - 11
src/views/RMS/components/editMaterial.vue

@@ -11,16 +11,8 @@
       </div>
     </div>
     <div class="form-box f1">
-      <el-form :inline="true" :model="formInline">
-        <div class="disableBox">
-          <el-form-item>
-            <el-input v-model="materialTypeName" disabled> </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="openDrawer">物资种类</el-button>
-          </el-form-item>
-        </div>
-      </el-form>
+      <el-input v-model="materialTypeName" disabled> </el-input>
+      <el-button type="primary" @click="openDrawer">物资种类</el-button>
     </div>
     <div class="eldrawer">
       <el-drawer
@@ -28,7 +20,12 @@
         :direction="direction"
         :before-close="handleClose"
       >
-        <el-input placeholder="请输入内容" v-model="inputText" clearable>
+        <el-input
+          placeholder="请输入内容"
+          v-model="inputText"
+          clearable
+          style="width:250px"
+        >
         </el-input>
         <el-button type="primary" class="btn" @click="onclick">
           <i class="el-icon-search"></i>查询
@@ -141,4 +138,13 @@ export default {
     margin-right: 10px;
   }
 }
+.f1 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: 20px;
+  .el-input {
+    width: 250px;
+  }
+}
 </style>

+ 95 - 87
src/views/TMS/components/importedFuel/transportReserveRan.vue

@@ -40,7 +40,12 @@
         <i class="el-icon-plus"></i>下发
       </el-button>
     </div>
-    <el-dialog title="提醒" :visible.sync="dialogVisible" width="30%" destroy-on-close="true">
+    <el-dialog
+      title="提醒"
+      :visible.sync="dialogVisible"
+      width="30%"
+      destroy-on-close="true"
+    >
       <div v-if="this.isMoreTrips != 1" style="color: red">
         <span>该订单不是一车多趟的订单</span>
       </div>
@@ -56,10 +61,11 @@
         <span>物资名称:</span>
         <span>{{ materialName }}</span>
       </div>
-       <div>
+      <div>
         <el-checkbox
           v-if="activeName == 'second'"
-          @change="checkout" v-model="checked"
+          @change="checkout"
+          v-model="checked"
           >是否关闭该采购订单订单下未接收的运输订单</el-checkbox
         >
       </div>
@@ -73,68 +79,66 @@
         >
       </span>
     </el-dialog>
-    <el-tabs v-model="activeName">
-      <!-- 未下发 -->
-      <el-tab-pane label="未下发" name="first">
-        <dilTable
-          v-bind.sync="option1"
-          ref="table"
-          @selection-change="selectionChange"
-        >
-          <el-table-column
-            fixed="right"
-            align="center"
-            label="操作"
-            width="120"
+    <div class="table">
+      <el-tabs v-model="activeName">
+        <!-- 未下发 -->
+        <el-tab-pane label="未下发" name="first">
+          <dilTable
+            v-bind.sync="option1"
+            ref="table"
+            @selection-change="selectionChange"
           >
-            <template slot-scope="scope">
-              <el-button
-                @click="sendClick(scope.row.orderId)"
-                type="text"
-                size="small"
-              >
-                下发
-              </el-button>
-              <el-button
-                @click="updateClick(scope.row.orderId)"
-                type="text"
-                size="small"
-              >
-                修改
-              </el-button>
-              <el-button
-                @click="
-                  deleteClick(scope.row.orderId, scope.row.capacityNumber)
-                "
-                type="text"
-                size="small"
-              >
-                删除
-              </el-button>
-            </template>
-          </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-      <!-- 已下发 -->
-      <el-tab-pane label="已下发" name="second">
-        <dilTable v-bind.sync="option2" @func="func">
-           
-          <el-table-column fixed="right" label="操作" width="80">
-                           
-            <template slot-scope="scope">
-                               <el-button
-                type="text"
-                size="mini"
-                @click="getTransportReserveOrder(scope)"
-                >运单</el-button
-              >
-                             
-            </template>
-                         
-          </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-    </el-tabs>
+            <el-table-column
+              fixed="right"
+              align="center"
+              label="操作"
+              width="120"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  @click="sendClick(scope.row.orderId)"
+                  type="text"
+                  size="small"
+                >
+                  下发
+                </el-button>
+                <el-button
+                  @click="updateClick(scope.row.orderId)"
+                  type="text"
+                  size="small"
+                >
+                  修改
+                </el-button>
+                <el-button
+                  @click="
+                    deleteClick(scope.row.orderId, scope.row.capacityNumber)
+                  "
+                  type="text"
+                  size="small"
+                >
+                  删除
+                </el-button>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <!-- 已下发 -->
+        <el-tab-pane label="已下发" name="second">
+          <dilTable v-bind.sync="option2" @func="func">
+            <el-table-column fixed="right" label="操作" width="80">
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="getTransportReserveOrder(scope)"
+                  >运单</el-button
+                >
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 
@@ -155,11 +159,11 @@ export default {
         // 表格请求数据的地址
         requestUrl: "",
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
       purOrderList: [],
       isMoreTrips: null,
@@ -167,7 +171,7 @@ export default {
       materialName: null,
       supplierName: null,
       inputPurOrder: null,
-      deleteNoReceiveOrder: null,
+      deleteNoReceiveOrder: null
     };
   },
   created() {
@@ -253,7 +257,7 @@ export default {
         this.$message.warning("请输入需要关闭一车多趟的采购订单号");
         return;
       }
-      this.purOrderList.forEach((e) => {
+      this.purOrderList.forEach(e => {
         if (e.purchaseOrderNo == this.inputPurOrder) {
           this.materialName = e.materialName;
           this.supplierName = e.supplierName;
@@ -277,19 +281,18 @@ export default {
             "&deleteNoReceiveOrder=" +
             this.deleteNoReceiveOrder
         )
-        .then((res) => {
+        .then(res => {
           // console.log(res);
           if (res.data.code == "200") {
             this.$message.success("关闭成功");
-            this.checked=false;
+            this.checked = false;
             this.getRequestUrl();
           } else {
             this.$message.error(res.data.data);
-            this.checked=false;
+            this.checked = false;
           }
         });
       this.dialogVisible = false;
-  
     },
     func(res) {
       this.purOrderList = res.list;
@@ -300,12 +303,12 @@ export default {
     },
     issue() {
       let mapvalue = {
-        mapList: this.mapList,
+        mapList: this.mapList
       };
       this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
         this.$message({
           type: "success",
-          message: "下发成功!",
+          message: "下发成功!"
         });
         this.getRequestUrl();
       });
@@ -313,19 +316,19 @@ export default {
     // 下发
     sendClick(orderId) {
       let mapvalue = {
-        mapList: [{ orderId: orderId }],
+        mapList: [{ orderId: orderId }]
       };
       this.$confirm("是否下发", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios.post("/api/v1/oms/dispatchOrder", mapvalue).then(() => {
             this.$message({
               type: "success",
-              message: "下发成功!",
+              message: "下发成功!"
             });
             this.getRequestUrl();
           });
@@ -333,7 +336,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
     },
@@ -343,17 +346,17 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "删除成功!",
+            message: "删除成功!"
           });
           this.axios
             .post("/api/v1/oms/deleteOrder", {
               orderId: orderId,
-              capacityNumber: capacityNumber,
+              capacityNumber: capacityNumber
             })
             .then(() => {
               this.getRequestUrl();
@@ -362,7 +365,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
     },
@@ -373,14 +376,15 @@ export default {
     //修改
     updateClick(orderId) {
       this.$router.push("/transportReserveRanEdit/" + orderId);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .homeworkPath {
   .top {
-    padding: 40px;
+    margin-left: 20px;
+    margin-top: 20px;
     .input {
       width: 250px;
       margin-right: 20px;
@@ -389,5 +393,9 @@ export default {
       margin-right: 10px;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
-</style>
+</style>

+ 65 - 45
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -106,6 +106,7 @@
     </div>
     <div class="truckListTable">
       <el-table
+        ref="table1"
         :data="selectionList"
         border
         style="width: 100%"
@@ -141,7 +142,7 @@
         </el-table-column>
         <el-table-column fixed="right" label="操作" width="100">
           <template slot-scope="scope">
-            <el-button type="text" size="small" @click="onClick(scope.$index)"
+            <el-button type="text" size="small" @click="onClick1(scope.$index)"
               >删除</el-button
             >
           </template>
@@ -186,9 +187,8 @@
       <div v-show="onDrawerNumber == 3">
         <dilTable
           v-bind.sync="third"
+          :isClear="1"
           @selection-change="currentRadioChange3"
-          :isKuang="isKuang"
-          @func="func"
           :isHeigth="isHeigth2"
           :shiyHeigth="shiyHeigth2"
           :drawer="drawer"
@@ -281,12 +281,12 @@ export default {
       orderTypeList: [
         {
           value: 6,
-          label: "一厂",
+          label: "一厂"
         },
         {
           value: 7,
-          label: "二厂",
-        },
+          label: "二厂"
+        }
       ],
       // 线路名称
       lineName: "",
@@ -301,18 +301,18 @@ export default {
         {
           prop: "capacityNumber",
           label: "车牌号",
-          width: "140",
+          width: "140"
         },
         {
           prop: "carrierName",
           label: "承运商",
-          width: "140",
+          width: "140"
         },
         {
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
-        },
+          slot: true
+        }
       ],
       //车辆表格数据
       selectionList: [],
@@ -347,34 +347,34 @@ export default {
       frist: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       secend: {
         requestUrl: "",
         selectionType: "radio",
-        mapList2: [],
+        mapList2: []
       },
       third: {
         requestUrl: "",
         selectionType: "select",
-        mapList3: [],
+        mapList3: []
       },
       unloadPoint: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       line: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       purchaseOrder: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       loadName: {
         requestUrl: "",
-        selectionType: "radio",
-      },
+        selectionType: "radio"
+      }
     };
   },
   watch: {
@@ -383,6 +383,15 @@ export default {
         this.input = null;
       }
     },
+    selectionList: {
+      handler(newValue, oldValue) {
+        console.log("new");
+        console.log(newValue);
+        console.log("old");
+        console.log(oldValue);
+      },
+      deep: true
+    }
   },
   created() {
     if (getCookie("orgCode") == "chengyunshang") {
@@ -395,7 +404,7 @@ export default {
     }
   },
   methods: {
-    onClick(index) {
+    onClick1(index) {
       this.selectionList.splice(index, 1);
     },
     onchange() {
@@ -418,7 +427,7 @@ export default {
     querySearchSupplier(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             var restaurantsSupplier = res.data.data;
             var results = queryString
@@ -432,7 +441,7 @@ export default {
         });
     },
     createFilterSupplier(queryString) {
-      return (restaurantsSupplier) => {
+      return restaurantsSupplier => {
         return (
           restaurantsSupplier.value
             .toLowerCase()
@@ -444,20 +453,20 @@ export default {
       let map = {
         materialId: this.materialId,
         supplierId: this.supplierId,
-        purchaseOrgId: this.purchaseOrgId,
+        purchaseOrgId: this.purchaseOrgId
       };
       if (this.remark) {
         map.remark = this.remark;
       }
       console.log(this.map);
       if (this.materialId && this.supplierId && this.purchaseOrgId) {
-        this.axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
+        this.axios.post("/api/v1/oms/selectNewOrderId", map).then(res => {
           console.log(res);
           if (res.data.code == "200") {
             if (res.data.data == null) {
               this.$message({
                 message: "没有匹配的采购订单号!",
-                type: "warning",
+                type: "warning"
               });
               this.purchaseOrderNo = null;
               this.purchaseOrderId = null;
@@ -521,7 +530,7 @@ export default {
         } else if (this.onDrawerNumber == 8) {
           this.loadName.requestUrl =
             "/api/v1/uc/getUnloadingMesByLike?apiId=374" +
-            "&con=" +
+            "&index=" +
             this.input +
             "&i=" +
             new Date();
@@ -566,7 +575,7 @@ export default {
             new Date();
         } else if (this.onDrawerNumber == 8) {
           this.loadName.requestUrl =
-            "/api/v1/uc/getUnloadingMesByLike?apiId=374&i="+ new Date();
+            "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
         }
       }
     },
@@ -588,6 +597,7 @@ export default {
           "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
           this.materialId;
       } else if (num == 3) {
+        let arr = this.selectionList;
         //判断是否是承运商查询车辆
         if (getCookie("orgCode") == "chengyunshang") {
           this.third.requestUrl =
@@ -602,6 +612,16 @@ export default {
             "&i=" +
             new Date();
         }
+        this.selectionList = [];
+        let i = 0;
+        arr.forEach(e => {
+          if (this.selectionList.indexOf(e) === -1) {
+            console.log("执行力");
+            this.$set(this.selectionList, i, e);
+            i++;
+          }
+        });
+        console.log(this.selectionList);
       } else if (num == 4) {
         this.unloadPoint.requestUrl =
           "/api/v1/uc/getUnloadingMesByLike?apiId=374&i=" + new Date();
@@ -663,9 +683,9 @@ export default {
       this.purchaseOrderNo = selection.purchaseOrderNo;
       this.purchaseOrderId = selection.purchaseOrderId;
     },
-    currentRadioChange3(selection) {
+    currentRadioChange3(select) {
       this.selectionList = [];
-      this.selectionList = selection;
+      this.selectionList = JSON.parse(JSON.stringify(select));
     },
     func(res) {
       console.log(res);
@@ -687,43 +707,43 @@ export default {
         if (!this.materialId) {
           this.$message({
             message: "请选择物资!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.orderType) {
           this.$message({
             message: "请选择订单类别!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.supplierId) {
           this.$message({
             message: "请选择发货单位!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.purchaseOrderId) {
           this.$message({
             message: "没有匹配的采购订单号!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.unloadPointId) {
           this.$message({
             message: "请选择卸货地点!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.lineId) {
           this.$message({
             message: "请选择运输路线!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!sjTime(this.form1.orderEntryTime)) {
           this.$message({
             message: "请选择预估进厂时间!",
-            type: "warning",
+            type: "warning"
           });
           return;
         }
@@ -731,11 +751,11 @@ export default {
       if (this.selectionList.length == 0) {
         this.$message({
           message: "请选择车辆!",
-          type: "warning",
+          type: "warning"
         });
         return;
       } else {
-        this.selectionList.forEach((e) => {
+        this.selectionList.forEach(e => {
           if (e.orderMaterialWeight) {
             if (isNumber(e.orderMaterialWeight)) {
               if (isIntegerNumber(e.orderMaterialWeight)) {
@@ -743,14 +763,14 @@ export default {
               } else {
                 this.$message({
                   message: "重量只能是整数!",
-                  type: "warning",
+                  type: "warning"
                 });
                 return;
               }
             } else {
               this.$message({
                 message: "重量只能是数字!",
-                type: "warning",
+                type: "warning"
               });
               return;
             }
@@ -768,20 +788,20 @@ export default {
         orderType: this.orderType,
         lineId: this.lineId,
         isMoreTrips: this.isMoreTrips,
-        orgCode:getCookie("orgCode"),
+        orgCode: getCookie("orgCode")
       };
 
-      this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
+      this.axios.post("/api/v1/oms/addPurOrder", map).then(res => {
         if (res.data.code == "200") {
           this.$message({
             message: "添加成功!",
-            type: "success",
+            type: "success"
           });
           this.$router.push("/transportReserveRan");
         }
       });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">
@@ -944,4 +964,4 @@ export default {
   width: 100%;
   height: 100px;
 }
-</style>
+</style>

+ 37 - 36
src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue

@@ -275,18 +275,18 @@ export default {
         {
           prop: "capacityNumber",
           label: "车牌号",
-          width: "140",
+          width: "140"
         },
         {
           prop: "carrierName",
           label: "承运商",
-          width: "140",
+          width: "140"
         },
         {
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
-        },
+          slot: true
+        }
       ],
       //发货单位名称
       supplierName: "",
@@ -320,31 +320,31 @@ export default {
       frist: {
         requestUrl: "",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       secend: {
         requestUrl: "",
         selectionType: "radio",
-        mapList2: [],
+        mapList2: []
       },
       third: {
         requestUrl: "",
         selectionType: "select",
-        mapList3: [],
+        mapList3: []
       },
       unloadPoint: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       line: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       purchaseOrder: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
-      truckList: [],
+      truckList: []
     };
   },
   watch: {
@@ -359,17 +359,17 @@ export default {
         this.tableTop.push({
           prop: "orderMaterialNumber",
           label: "件数",
-          slot: true,
+          slot: true
         });
       } else {
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
           prop: "orderMaterialWeight",
           label: "重量",
-          slot: true,
+          slot: true
         });
       }
-    },
+    }
   },
   created() {
     if (getCookie("orgCode") == "chengyunshang") {
@@ -397,7 +397,7 @@ export default {
     querySearchSupplier(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getSupplierMesByLike?index=" + this.stateSupplier)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             var restaurantsSupplier = res.data.data;
             var results = queryString
@@ -411,7 +411,7 @@ export default {
         });
     },
     createFilterSupplier(queryString) {
-      return (restaurantsSupplier) => {
+      return restaurantsSupplier => {
         return (
           restaurantsSupplier.value
             .toLowerCase()
@@ -422,20 +422,20 @@ export default {
     getPurchaseOrderNo() {
       let map = {
         materialId: this.materialId,
-        supplierId: this.supplierId,
+        supplierId: this.supplierId
       };
       if (this.remark) {
         map.remark = this.remark;
       }
       console.log(this.map);
       if (this.materialId && this.supplierId) {
-        this.axios.post("/api/v1/oms/selectNewOrderId", map).then((res) => {
+        this.axios.post("/api/v1/oms/selectNewOrderId", map).then(res => {
           console.log(res);
           if (res.data.code == "200") {
             if (res.data.data == null) {
               this.$message({
                 message: "没有匹配的采购订单号!",
-                type: "warning",
+                type: "warning"
               });
               this.form1 = [];
               this.purchaseOrderId = null;
@@ -643,37 +643,37 @@ export default {
         if (!this.materialId) {
           this.$message({
             message: "请选择物资!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.supplierId) {
           this.$message({
             message: "请选择发货单位!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.purchaseOrderId) {
           this.$message({
             message: "没有匹配的采购订单号!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.unloadPointId) {
           this.$message({
             message: "请选择卸货地点!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!this.lineId) {
           this.$message({
             message: "请选择运输路线!",
-            type: "warning",
+            type: "warning"
           });
           return;
         } else if (!sjTime(this.form1.orderEntryTime)) {
           this.$message({
             message: "请选择预估进厂时间!",
-            type: "warning",
+            type: "warning"
           });
           return;
         }
@@ -681,11 +681,11 @@ export default {
       if (this.selectionList.length == 0) {
         this.$message({
           message: "请选择车辆!",
-          type: "warning",
+          type: "warning"
         });
         return;
       } else {
-        this.selectionList.forEach((e) => {
+        this.selectionList.forEach(e => {
           if (e.orderMaterialWeight) {
             if (isNumber(e.orderMaterialWeight)) {
               if (isIntegerNumber(e.orderMaterialWeight)) {
@@ -693,14 +693,14 @@ export default {
               } else {
                 this.$message({
                   message: "重量只能是整数!",
-                  type: "warning",
+                  type: "warning"
                 });
                 return;
               }
             } else {
               this.$message({
                 message: "重量只能是数字!",
-                type: "warning",
+                type: "warning"
               });
               return;
             }
@@ -717,25 +717,26 @@ export default {
         orderType: this.orderType,
         lineId: this.lineId,
         isMoreTrips: this.isMoreTrips,
-        orgCode: getCookie("orgCode"),
+        userId: getCookie("userId"),
+        orgCode: getCookie("orgCode")
       };
 
-      this.axios.post("/api/v1/oms/addPurOrder", map).then((res) => {
+      this.axios.post("/api/v1/oms/addPurOrder", map).then(res => {
         if (res.data.code == "200") {
           this.$message({
             message: "添加成功!",
-            type: "success",
+            type: "success"
           });
           this.$router.push("/transportReserveFu");
         } else {
           this.$message({
             message: res.data.data,
-            type: "warning",
+            type: "warning"
           });
         }
       });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">
@@ -898,4 +899,4 @@ export default {
   width: 100%;
   height: 100px;
 }
-</style>
+</style>

+ 12 - 11
src/views/TMS/components/importedShip/shipLocation.vue

@@ -122,6 +122,17 @@ export default {
           label: "江船船名",
           width: "140",
         },
+        {
+          prop: "locationRouteTime",
+          label: "离港日期",
+          width: "200",
+          slot: true,
+        },
+        {
+          prop: "startPortName",
+          label: "起运港",
+          width: "140",
+        },
         {
           prop: "shipLocation",
           label: "船舶位置",
@@ -134,17 +145,7 @@ export default {
           width: "180",
           slot: true,
         },
-        {
-          prop: "locationRouteTime",
-          label: "日期",
-          width: "200",
-          slot: true,
-        },
-        {
-          prop: "startPortName",
-          label: "起运港",
-          width: "140",
-        },
+        
         {
           prop: "arrivePortName",
           label: "到达港",

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

@@ -164,6 +164,7 @@
           :key="i"
           :prop="item.prop"
           :label="item.label"
+          :width="item.width"
           align="center"
           show-overflow-tooltip
         >
@@ -365,7 +366,7 @@
               <template v-if="item.prop == 'truckRemark'">
                 <el-input
                   class="textinput5"
-                  placeholder="(必填)"
+                  placeholder="(必填)"
                   v-model.number="scope.row.truckRemark"
                   @change="batchUpdateValue(scope.row, scope.$index)"
                 ></el-input>
@@ -670,8 +671,7 @@ export default {
       materialTableTop: [
         {
           prop: "materialName",
-          label: "物资名称",
-          width: "140"
+          label: "物资名称"
         },
         {
           prop: "meterNumber",
@@ -680,8 +680,7 @@ export default {
         },
         {
           prop: "Specification",
-          label: "规格型号",
-          width: "140"
+          label: "规格型号"
         },
         {
           prop: "orderPlanWeight",
@@ -797,53 +796,52 @@ export default {
         {
           prop: "cxh",
           label: "车序号",
-          width: "50"
+          width: "50px"
         },
         {
           prop: "materialName",
           label: "物资名称",
-          width: "300",
+          width: "300px",
           slot: true
         },
         {
           prop: "meterNumber",
           label: "米数",
-          width: "60",
+          width: "60px",
           slot: true
         },
         {
           prop: "Specification",
           label: "规格型号",
-          width: "140"
+          width: "140px"
         },
         {
           prop: "orderPlanWeight",
           label: "件数",
-          width: "60",
+          width: "60px",
           slot: true
         },
         {
           prop: "isPound",
           label: "是否磅重销售",
-          width: "80",
+          width: "80px",
           slot: true
         },
         {
           prop: "saleShipperAddressName",
           label: "收货地址",
-          width: "300",
+          width: "400px",
           slot: true
         },
         {
           prop: "saleOrderConsigneeTel",
           label: "收货客户电话",
-          width: "120",
+          width: "120px",
           slot: true
         },
         {
           prop: "truckRemark",
           label: "备注",
-          width: "140",
           slot: true
         }
       ],
@@ -1098,7 +1096,6 @@ export default {
           };
         } else {
           if (e.materialName.includes("米")) {
-            console.log(e.materialName.replace(/[^0-9]/gi, ""));
             var addmap = {
               materialName: e.materialName,
               Specification: e.materialSpecification + e.materialModel,
@@ -1181,6 +1178,17 @@ export default {
         this.$message.error("件数必填且请输入正整数");
         return;
       }
+      this.materialList.forEach(e => {
+        if (e.materialName.includes("定尺")) {
+          if (!e.meterNumber) {
+            i++;
+          }
+        }
+      });
+      if (i != 0) {
+        this.$message.error("定尺必须填写米数");
+        return;
+      }
       if (
         !this.saleOrderConsigneeTel &&
         this.ignoreSaleOrderConsigneeTel == 0
@@ -1573,6 +1581,17 @@ export default {
         this.$message.error("件数必填且请输入正整数");
         return;
       }
+      this.selectionList.forEach(e => {
+        if (e.materialName.includes("定尺")) {
+          if (!e.meterNumber) {
+            i++;
+          }
+        }
+      });
+      if (i != 0) {
+        this.$message.error("定尺必须填写米数");
+        return;
+      }
       //获取是否自提字段
       this.options.forEach(e => {
         if (this.values == e.values) {

+ 33 - 0
src/views/appoint/components/saleContract/editSaleOrder.vue

@@ -1247,6 +1247,17 @@ export default {
         this.$message.error("件数必填且请输入正整数");
         return;
       }
+      this.materialList.forEach(e => {
+        if (e.materialName.includes("定尺")) {
+          if (!e.meterNumber) {
+            i++;
+          }
+        }
+      });
+      if (i != 0) {
+        this.$message.error("定尺必须填写米数");
+        return;
+      }
       if (
         !this.saleOrderConsigneeTel &&
         this.ignoreSaleOrderConsigneeTel == 0
@@ -1376,6 +1387,17 @@ export default {
         this.$message.error("件数必填且请输入正整数");
         return;
       }
+      this.materialList.forEach(e => {
+        if (e.materialName.includes("定尺")) {
+          if (!e.meterNumber) {
+            i++;
+          }
+        }
+      });
+      if (i != 0) {
+        this.$message.error("定尺必须填写米数");
+        return;
+      }
       if (this.materialList.length == 0) {
         this.$message.warning("请至少为这车序号添加一个物资!");
       } else {
@@ -1749,6 +1771,17 @@ export default {
         this.$message.error("件数必填且请输入正整数");
         return;
       }
+      this.selectionList.forEach(e => {
+        if (e.materialName.includes("定尺")) {
+          if (!e.meterNumber) {
+            i++;
+          }
+        }
+      });
+      if (i != 0) {
+        this.$message.error("定尺必须填写米数");
+        return;
+      }
       //获取是否自提字段
       this.options.forEach(e => {
         if (this.values == e.values) {

+ 37 - 30
src/views/appoint/components/saleContract/saleCokeInward.vue

@@ -10,35 +10,37 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <!-- 已审批 -->
-      <!-- <el-tab-pane name="four"> -->
-      <dilTable v-bind.sync="option4" ref="table">
-        <el-table-column fixed="right" label="操作" width="180">
-          <template slot-scope="scope">
-            <el-button
-              @click="sendClick(scope.row.saleOrderId)"
-              type="text"
-              size="small"
-              >派车</el-button
-            >
-            <el-button
-              @click="closeOrder(scope.row.saleOrderId)"
-              type="text"
-              size="small"
-              >关闭订单</el-button
-            >
-            <el-button
-              @click="getOrderDetails(scope.row.saleOrderId)"
-              type="text"
-              size="small"
-              >运单</el-button
-            >
-          </template>
-        </el-table-column>
-      </dilTable>
-      <!-- </el-tab-pane> -->
-    </el-tabs>
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 已审批 -->
+        <!-- <el-tab-pane name="four"> -->
+        <dilTable v-bind.sync="option4" ref="table">
+          <el-table-column fixed="right" label="操作" width="150">
+            <template slot-scope="scope">
+              <el-button
+                @click="sendClick(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >派车</el-button
+              >
+              <el-button
+                @click="closeOrder(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >关闭订单</el-button
+              >
+              <el-button
+                @click="getOrderDetails(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >运单</el-button
+              >
+            </template>
+          </el-table-column>
+        </dilTable>
+        <!-- </el-tab-pane> -->
+      </el-tabs>
+    </div>
   </div>
 </template>
 <script>
@@ -106,11 +108,16 @@ export default {
 <style lang="scss" scoped>
 .salePlan {
   .top {
-    padding: 1.25rem 0.375rem;
+    margin-left: 20px;
+    margin-top: 20px;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
 </style>

+ 42 - 97
src/views/appoint/components/saleContract/saleOrder.vue

@@ -16,54 +16,37 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <!-- 已审批 -->
-      <el-tab-pane label="已审批" name="four">
-        <dilTable v-bind.sync="option4" ref="table">
-          <el-table-column fixed="right" label="操作" width="200">
-            <template slot-scope="scope">
-              <el-button
-                @click="sendClick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >派车</el-button
-              >
-              <el-button
-                @click="addClick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >排车</el-button
-              >
-              <el-button
-                @click="detailclick(scope.row)"
-                type="text"
-                size="small"
-                >物资详情</el-button
-              >
-            </template>
-          </el-table-column>
-          <!-- 物资详情抽屉 -->
-          <el-table-column type="expand" width="1">
-            <template slot-scope="props">
-              <el-form label-position="center" inline class="demo-table-expand">
-                <div v-if="false">{{ props }}</div>
-                <div>
-                  <el-table :data="tableData" border>
-                    <el-table-column
-                      v-for="(item, i) in tableHead"
-                      :key="i"
-                      :prop="item.prop"
-                      :label="item.label"
-                      :width="item.width"
-                    ></el-table-column>
-                  </el-table>
-                </div>
-              </el-form>
-            </template>
-          </el-table-column>
-        </dilTable>
-      </el-tab-pane>
-    </el-tabs>
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 已审批 -->
+        <el-tab-pane label="已审批" name="four">
+          <dilTable v-bind.sync="option4" ref="table">
+            <el-table-column fixed="right" label="操作" width="120">
+              <template slot-scope="scope">
+                <el-button
+                  @click="sendClick(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >派车</el-button
+                >
+                <el-button
+                  @click="addClick(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >排车</el-button
+                >
+                <el-button
+                  @click="checkSaleOrderDetails(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >运单</el-button
+                >
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 <script>
@@ -84,57 +67,14 @@ export default {
         requestUrl:
           "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=475&shipperId=2"
         // &startDate="+sjTime(new Date().getTime() - 3600 * 1000 * 24 * 85)+"&endDate="+sjTime(new Date()),
-      },
-
-      //记录旧的row对象 (销售公司已审批)
-      oldRow: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
-      oldRowCount: 1,
-      //记录旧的row对象 (财务已审批)
-      oldRow1: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (财务已审批)
-      oldRowCount1: 1,
-      //记录旧的row对象 (已上报)
-      oldRow2: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (已上报)
-      oldRowCount2: 1,
-      //记录旧的row对象 (未上报)
-      oldRow3: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未上报)
-      oldRowCount3: 1,
-      tableHead: [
-        {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150
-        },
-        {
-          prop: "specificationModel",
-          label: "规格型号",
-          width: 150
-        },
-        {
-          prop: "materialNumber",
-          label: "物资件数",
-          width: 100
-        },
-        {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 100
-        }
-      ],
-      //(销售公司已审批)
-      tableData: [],
-      //(财务已审批)
-      tableData1: [],
-      //(已上报)
-      tableData2: [],
-      //(未上报)
-      tableData3: []
+      }
     };
   },
   methods: {
+    checkSaleOrderDetails(saleOrderId) {
+      console.log(saleOrderId);
+      this.$router.push("saleOrderOODetails/" + saleOrderId);
+    },
     refresh() {
       this.$router.go(0);
     },
@@ -346,11 +286,16 @@ export default {
 <style lang="scss" scoped>
 .salePlan {
   .top {
-    padding: 1.25rem 0.375rem;
+    margin-left: 20px;
+    margin-top: 20px;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
 </style>

+ 43 - 2
src/views/appoint/components/saleContract/saleOrderCoproduct.vue

@@ -22,7 +22,7 @@
             @selection-change="selectionChange"
             ref="table"
           >
-            <el-table-column fixed="right" label="操作" width="120">
+            <el-table-column fixed="right" label="操作" width="180">
               <template slot-scope="scope">
                 <el-button
                   @click="coproductSendClick(scope.row.saleOrderId)"
@@ -36,6 +36,12 @@
                   size="small"
                   >运单</el-button
                 >
+                <el-button
+                  @click="deleteSaleOrder(scope.row)"
+                  type="text"
+                  size="small"
+                  >关闭订单</el-button
+                >
               </template>
             </el-table-column>
           </mergeRowTable>
@@ -106,6 +112,40 @@ export default {
     };
   },
   methods: {
+    deleteSaleOrder(row) {
+      this.$prompt("此操作将关闭订单且下面的待运输订单,是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPlaceholder: "请输入关闭原因-必填!!!",
+        center: true,
+        type: "warning"
+      })
+        .then(({ value }) => {
+          if (value != null) {
+            let mapValue = {
+              number: row.saleNumber,
+              saleOrderId: row.saleOrderId,
+              reason: value
+            };
+            this.axios
+              .post("/api/v1/ams/deleteSaleOrderSame", mapValue)
+              .then(res => {
+                if (res.data.code == 200) {
+                  this.$message.success("关闭成功");
+                  this.option4.requestUrl = "/api/v1/ams/getFuSaleOrderList?apiId=481&i" + new Date()
+                }
+              });
+          } else {
+            this.$message.error("请输入理由");
+          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消输入"
+          });
+        });
+    },
     checkSaleOrderDetails(saleOrderId) {
       console.log(saleOrderId);
       this.$router.push("saleOrderOODetails/" + saleOrderId);
@@ -206,7 +246,8 @@ export default {
 <style lang="scss" scoped>
 .salePlan {
   .top {
-    padding: 1.25rem 0.375rem;
+    margin-left: 20px;
+    margin-top: 20px;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;

+ 122 - 71
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -15,79 +15,90 @@
       <el-button type="primary" @click="batchReport">
         <i class="upload2"></i>批量上传
       </el-button>
-      <el-button type="primary" @click="exportData()"
+      <el-button
+        type="primary"
+        @click="exportData()"
+        v-if="activeName == 'first'"
         ><i class="el-icon-download"></i>导出(Excel)</el-button
       >
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <!-- 未上报 -->
-      <el-tab-pane label="未上报" name="first">
-        <mergeRowTable
-          v-bind.sync="option"
-          ref="excelDom"
-          @selection-change="selectionChange"
-        >
-          <el-table-column
-            fixed="right"
-            label="操作"
-            align="center"
-            width="200"
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 未上报 -->
+        <el-tab-pane label="未上报" name="first">
+          <mergeRowTable
+            v-bind.sync="option"
+            ref="excelDom"
+            @selection-change="selectionChange"
           >
-            <template slot-scope="scope">
-              <el-button
-                @click="uploadclick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >上传</el-button
-              >
-              <el-button
-                @click="click(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >修改</el-button
-              >
-              <el-button
-                type="text"
-                size="small"
-                @click="deleteclick(scope.row.saleOrderId)"
-                >删除</el-button
-              >
-            </template>
-          </el-table-column>
-          <!-- 物资详情抽屉 -->
-        </mergeRowTable>
-      </el-tab-pane>
-      <!-- 已审批 -->
-      <el-tab-pane label="已审批" name="four">
-        <mergeRowTable v-bind.sync="option4" ref="table">
-          <el-table-column
-            fixed="right"
-            label="操作"
-            align="center"
-            width="200"
-          >
-            <template slot-scope="scope">
-              <el-button
-                @click="getOrderDetails(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >运单</el-button
-              >
-              <el-button
-                @click="updateSaleOrder(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >修改</el-button
-              >
-            </template>
-          </el-table-column>
-        </mergeRowTable>
-      </el-tab-pane>
-      <!-- 已上报 -->
-      <el-tab-pane label="已上报" name="second">
-        <mergeRowTable v-bind.sync="option2" ref="table2"> </mergeRowTable>
-      </el-tab-pane>
-    </el-tabs>
+            <el-table-column
+              fixed="right"
+              label="操作"
+              align="center"
+              width="200"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  @click="uploadclick(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >上传</el-button
+                >
+                <el-button
+                  @click="click(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >修改</el-button
+                >
+                <el-button
+                  type="text"
+                  size="small"
+                  @click="deleteclick(scope.row.saleOrderId)"
+                  >删除</el-button
+                >
+              </template>
+            </el-table-column>
+            <!-- 物资详情抽屉 -->
+          </mergeRowTable>
+        </el-tab-pane>
+        <!-- 已审批 -->
+        <el-tab-pane label="已审批" name="four">
+          <mergeRowTable v-bind.sync="option4" ref="table">
+            <el-table-column
+              fixed="right"
+              label="操作"
+              align="center"
+              width="200"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  @click="getOrderDetails(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >运单</el-button
+                >
+                <el-button
+                  @click="updateSaleOrder(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >异常处理</el-button
+                >
+                <el-button
+                  @click="deleteSaleOrder(scope.row)"
+                  type="text"
+                  size="small"
+                  >关闭订单</el-button
+                >
+              </template>
+            </el-table-column>
+          </mergeRowTable>
+        </el-tab-pane>
+        <!-- 已上报 -->
+        <el-tab-pane label="已上报" name="second">
+          <mergeRowTable v-bind.sync="option2" ref="table2"> </mergeRowTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 <script>
@@ -109,7 +120,7 @@ export default {
         requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408",
         selectionType: "select",
         comparison: "saleNumber",
-        columnIndexs: [0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15]
+        columnIndexs: [0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16]
       },
       option2: {
         // 表格请求数据的地址
@@ -169,6 +180,41 @@ export default {
     }
   },
   methods: {
+    deleteSaleOrder(row) {
+      this.$prompt("此操作将关闭订单且下面的待运输订单,是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        inputPlaceholder: "请输入关闭原因-必填!!!",
+        center: true,
+        type: "warning"
+      })
+        .then(({ value }) => {
+          if (value != null) {
+            let mapValue = {
+              number: row.saleNumber,
+              saleOrderId: row.saleOrderId,
+              reason: value
+            };
+            this.axios
+              .post("/api/v1/ams/deleteSaleOrderSame", mapValue)
+              .then(res => {
+                if (res.data.code == 200) {
+                  this.$message.success("关闭成功");
+                  this.option4.requestUrl =
+                    "/api/v1/ams/getFuSaleOrderList?apiId=481&i" + new Date();
+                }
+              });
+          } else {
+            this.$message.error("请输入理由");
+          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "取消输入"
+          });
+        });
+    },
     updateSaleOrder(saleOrderId) {
       this.$router.push("updateSaleOrderSteel/" + saleOrderId);
     },
@@ -487,11 +533,16 @@ export default {
 <style lang="scss" scoped>
 .salePlan {
   .top {
-    padding: 1.25rem 0.375rem;
+    margin-left: 20px;
+    margin-top: 20px;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
 </style>

+ 51 - 93
src/views/appoint/components/saleContract/saleOrderSteelCar.vue

@@ -28,46 +28,51 @@
         >
       </span>
     </el-dialog>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <!-- 未授权 -->
-      <el-tab-pane label="未授权" name="four">
-        <mergeRowTable v-bind.sync="option4" ref="table">
-          <el-table-column fixed="right" label="操作" width="200">
-            <template slot-scope="scope">
-              <el-button
-                @click="empowerCarrierClick(scope.row.saleOrderMaterialId)"
-                type="text"
-                size="small"
-                >授权承运商</el-button
-              >
-              <el-button
-                @click="steelSendClick(scope.row.saleOrderMaterialId)"
-                type="text"
-                size="small"
-                >钢材派车</el-button
-              >
-            </template>
-          </el-table-column>
-        </mergeRowTable>
-      </el-tab-pane>
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 未授权 -->
+        <el-tab-pane label="未授权" name="four">
+          <mergeRowTable v-bind.sync="option4" ref="table">
+            <el-table-column fixed="right" label="操作" width="180">
+              <template slot-scope="scope">
+                <el-button
+                  @click="empowerCarrierClick(scope.row.saleOrderMaterialId)"
+                  type="text"
+                  size="small"
+                  >授权承运商</el-button
+                >
+                <el-button
+                  @click="steelSendClick(scope.row.saleOrderMaterialId)"
+                  type="text"
+                  size="small"
+                  >钢材派车</el-button
+                >
+              </template>
+            </el-table-column>
+          </mergeRowTable>
+        </el-tab-pane>
 
-      <!-- 未派车 -->
-      <el-tab-pane label="未派车" name="five">
-        <mergeRowTable v-bind.sync="option0" ref="table0">
-          <el-table-column fixed="right" label="操作" width="160">
-            <template slot-scope="scope">
-              <el-button @click="updateCarrier(scope)" type="text" size="small"
-                >修改承运商授权</el-button
-              >
-            </template>
-          </el-table-column>
-        </mergeRowTable>
-      </el-tab-pane>
-      <!-- 已派车 -->
-      <el-tab-pane label="已派车" name="first">
-        <mergeRowTable v-bind.sync="option" ref="table3"> </mergeRowTable>
-      </el-tab-pane>
-    </el-tabs>
+        <!-- 未派车 -->
+        <el-tab-pane label="未派车" name="five">
+          <mergeRowTable v-bind.sync="option0" ref="table0">
+            <el-table-column fixed="right" label="操作" width="160">
+              <template slot-scope="scope">
+                <el-button
+                  @click="updateCarrier(scope)"
+                  type="text"
+                  size="small"
+                  >修改承运商授权</el-button
+                >
+              </template>
+            </el-table-column>
+          </mergeRowTable>
+        </el-tab-pane>
+        <!-- 已派车 -->
+        <el-tab-pane label="已派车" name="first">
+          <mergeRowTable v-bind.sync="option" ref="table3"> </mergeRowTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 <script>
@@ -114,59 +119,7 @@ export default {
         selectionType: "radio"
       },
       mapList: [],
-      mapItemList: [],
-      //记录旧的row对象 (销售公司已审批)
-      oldRow: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
-      oldRowCount: 1,
-      //记录旧的row对象 (财务已审批)
-      oldRow1: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (财务已审批)
-      oldRowCount1: 1,
-      //记录旧的row对象 (已上报)
-      oldRow2: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (已上报)
-      oldRowCount2: 1,
-      //记录旧的row对象 (未上报)
-      oldRow3: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未上报)
-      oldRowCount3: 1,
-      //记录旧的row对象 (未派车)
-      oldRow0: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未派车)
-      oldRowCount0: 1,
-      tableHead: [
-        {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150
-        },
-        {
-          prop: "specificationModel",
-          label: "规格型号",
-          width: 150
-        },
-        {
-          prop: "materialNumber",
-          label: "物资件数",
-          width: 100
-        },
-        {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 100
-        }
-      ],
-      //(销售公司已审批)
-      tableData: [],
-      //(财务已审批)
-      tableData1: [],
-      //(已上报)
-      tableData2: [],
-      //(未上报)
-      tableData3: [],
-      //(未派车)
-      tableData0: []
+      mapItemList: []
     };
   },
   methods: {
@@ -342,11 +295,16 @@ export default {
 <style lang="scss" scoped>
 .salePlan {
   .top {
-    padding: 1.25rem 0.375rem;
+    margin-left: 20px;
+    margin-top: 20px;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
 </style>

+ 25 - 18
src/views/appoint/components/saleContract/saleOrderSteelCarrier.vue

@@ -10,23 +10,25 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <!-- 已审批 -->
-      <el-tab-pane label="已审批" name="four">
-        <mergeRowTable v-bind.sync="option4" ref="table">
-          <el-table-column fixed="right" label="操作" width="120">
-            <template slot-scope="scope">
-              <el-button
-                @click="steelSendClick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >钢材派车</el-button
-              >
-            </template>
-          </el-table-column>
-        </mergeRowTable>
-      </el-tab-pane>
-    </el-tabs>
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 已审批 -->
+        <el-tab-pane label="已审批" name="four">
+          <mergeRowTable v-bind.sync="option4" ref="table">
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  @click="steelSendClick(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >钢材派车</el-button
+                >
+              </template>
+            </el-table-column>
+          </mergeRowTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 <script>
@@ -135,11 +137,16 @@ export default {
 <style lang="scss" scoped>
 .salePlan {
   .top {
-    padding: 1.25rem 0.375rem;
+    margin-left: 20px;
+    margin-top: 20px;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
 </style>

+ 597 - 20
src/views/appoint/components/saleContract/updateSaleOrderSteel.vue

@@ -8,7 +8,9 @@
         clearable
       ></el-input>
       <el-button type="primary" @click="onclick">查询</el-button>
-      <el-button type="primary" @click="back">返回</el-button>
+      <el-button type="primary" @click="back" icon="el-icon-d-arrow-left"
+        >返回</el-button
+      >
     </div>
     <!-- //物资模态框多选 -->
     <div class="edrwer">
@@ -66,6 +68,62 @@
         </div>
       </el-drawer>
     </div>
+    <!-- //物资模态框单选 -->
+    <div class="edrwer">
+      <!-- 物资选择模态框 -->
+      <el-drawer
+        title="选择物资信息"
+        :visible.sync="currentTable"
+        direction="rtl"
+        size="90%"
+        :show-close="true"
+      >
+        <el-form :inline="true" style="margin-top: 0.5rem;">
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;"
+              >物资名称/型号</label
+            >
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              placeholder="请输入物资名称或型号"
+              v-model="materialNameText"
+              clearable
+            ></el-input>
+          </el-form-item>
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;">规格</label>
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              placeholder="请输入内容"
+              v-model="materialSpecificationText"
+              clearable
+              ><template slot="prepend">Φ</template></el-input
+            >
+          </el-form-item>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclick1"
+            style="margin-left: 4px;"
+            ><i class="el-icon-search"></i>查询</el-button
+          >
+          <el-button type="primary" @click="makeSureChange"
+            ><i class="el-icon-check"></i>确定</el-button
+          >
+        </el-form>
+        <div class="tablecls">
+          <!-- 查询所有的物资 -->
+          <dilTable
+            v-bind.sync="option1"
+            @radio-change="currentRadioChange"
+            @rowDbClick="rowDbClick1"
+          >
+          </dilTable>
+        </div>
+      </el-drawer>
+    </div>
     <div class="table">
       <el-table
         :data="tableData"
@@ -113,7 +171,8 @@
       <el-dialog
         :title="title"
         :visible.sync="dialogTableVisible"
-        style="width:100%"
+        :center="true"
+        width="1100px"
       >
         <div class="errorMaterial">
           <el-button @click="openDrawer" type="primary">新增拼数</el-button>
@@ -131,6 +190,7 @@
               :key="i"
               :prop="item.prop"
               :label="item.label"
+              :width="item.width"
               align="center"
               show-overflow-tooltip
             >
@@ -162,6 +222,7 @@
                   <!-- 米数 -->
                   <template v-if="item.prop == 'meterNumber'">
                     <el-input
+                      v-if="scope.row.haveMeter == 1"
                       :disabled="scope.row.isDisable == 1"
                       class="textinput111"
                       v-model.number="scope.row.meterNumber"
@@ -215,12 +276,92 @@
         </div>
       </el-dialog>
     </div>
+    <div class="addressDialog">
+      <!-- 收货地址弹出框 -->
+      <el-dialog title="收货地址" :visible.sync="addressDialog" width="90%">
+        <div class="addressItem">
+          <el-form :inline="true">
+            <el-form-item>
+              <label class="el-form-item__label" style="width: auto;">省</label>
+              <el-select
+                v-model="province"
+                filterable
+                placeholder="请选择"
+                @change="onchangeProvince"
+              >
+                <el-option
+                  v-for="item in provinceList"
+                  :key="item.id"
+                  :label="item.addressProvince"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <label class="el-form-item__label" style="width: auto;">市</label>
+              <el-select
+                v-model="city"
+                filterable
+                placeholder="请选择"
+                @change="onchangeCity"
+              >
+                <el-option
+                  v-for="item in cityList"
+                  :key="item.id"
+                  :label="item.addressDistrict"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <label class="el-form-item__label" style="width: auto;"
+                >县(区)</label
+              >
+              <el-select
+                v-model="county"
+                filterable
+                placeholder="请选择"
+                @change="onchangeCounty"
+              >
+                <el-option
+                  v-for="item in countyList"
+                  :key="item.id"
+                  :label="item.addressTown"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+              <label class="el-form-item__label" style="width: auto;"
+                >具体收货地址</label
+              >
+              <el-autocomplete
+                class="inline-input"
+                v-model="place"
+                :fetch-suggestions="querySearch1"
+                placeholder="请输入具体收货地址"
+                :trigger-on-focus="false"
+                @select="handleSelect1"
+              >
+              </el-autocomplete>
+            </el-form-item>
+          </el-form>
+        </div>
+
+        <div slot="footer" class="button-box">
+          <el-button @click="addressDialog = false">取 消</el-button>
+          <el-button type="primary" @click="addAddressClick">确定</el-button>
+        </div>
+      </el-dialog>
+    </div>
   </div>
 </template>
 <script>
 export default {
   data() {
     return {
+      addressDialog: false,
+      currentTable: false,
       title: "",
       capacityNumber: null,
       //是否磅重销售
@@ -249,10 +390,17 @@ export default {
       //物资表格多选
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/uc/getSteelMaterial?apiId=244",
+        requestUrl: "",
         // 控制显示多选列
         selectionType: "select"
       },
+      //物资表格单选
+      option1: {
+        // 表格请求数据的地址
+        requestUrl: "",
+        // 控制显示单选列
+        selectionType: "radio"
+      },
       materialSpecificationText: null,
       materialNameText: null,
       spanArr: [],
@@ -260,53 +408,439 @@ export default {
         {
           prop: "capacityNumber",
           label: "车牌号",
-          width: "80"
+          width: "100px"
         },
         {
           prop: "materialName",
           label: "物资名称",
-          width: "90",
+          width: "400px",
           slot: true
         },
         {
           prop: "meterNumber",
           label: "米数",
-          width: "60",
+          width: "100px",
           slot: true
         },
         {
           prop: "Specification",
           label: "规格型号",
-          width: "140"
+          width: "140px"
         },
         {
           prop: "orderPlanWeight",
           label: "件数",
-          width: "60",
+          width: "100px",
           slot: true
         },
         {
           prop: "isPound",
           label: "是否磅重销售",
-          width: "80",
+          width: "100px",
           slot: true
         }
       ],
-      orderId: null
+      orderId: null,
+      selectedMaterialCode: null,
+      selectedMaterialModel: null,
+      selectedMaterialSpecification: null,
+      selectedMaterialName: null,
+      selectedMaterialId: null,
+      //所有省
+      provinceList: [],
+      //选中的省
+      province: "",
+      //所有市
+      cityList: [],
+      //选中的市
+      city: "",
+      //所有的县(区)
+      countyList: [],
+      //选中的县
+      county: "",
+      //判断是内层还是外层点击的收货地址浏览
+      inOrOut: 0,
+      //地址输入框的值
+      addresText: "",
+      //已选中省市县
+      address: null,
+      //具体地址
+      place: null,
+      //暂存具体地址
+      place1: null,
+      //省市县Id
+      addressId: null,
+      orderSaleMap: {},
+      isNewCar: null
     };
   },
+  watch: {
+    dialogTableVisible() {
+      this.getOrderList();
+    }
+  },
   mounted() {
     this.getOrderList();
+    this.getAllProvince();
   },
   methods: {
-    updateAddress(scope) {},
+    updateAddress(scope) {
+      this.capacityNumber = scope.row.capacityNumber;
+      this.orderSaleMap = scope.row;
+      console.log(this.orderSaleMap);
+      let title = `请选择对-${scope.row.capacityNumber}-进行的操作?`;
+      let confirmText = `删除-${scope.row.capacityNumber}-金蝶分录`;
+      let cancelText = `不删除-${scope.row.capacityNumber}-金蝶分录`;
+      this.$confirm(title, "提示", {
+        confirmButtonText: confirmText,
+        cancelButtonText: cancelText,
+        distinguishCancelAndClose: true,
+        center: true,
+        type: "info"
+      })
+        .then(() => {
+          this.deleteEasEntryId(scope.row);
+        })
+        .catch(action => {
+          console.log(action);
+          if (action === "cancel") {
+            this.noDeleteEasEntryId();
+          }
+        });
+    },
+    //删除金蝶分录
+    deleteEasEntryId(row) {
+      let title = `确定删除-${this.capacityNumber}-金蝶分录?`;
+      this.$confirm(title, {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        center: true,
+        type: "warning"
+      })
+        .then(() => {
+          let map = row;
+          map.isCloseEas = Number(0);
+          map.saleOrderId = this.$route.params.saleOrderId;
+          this.axios.post("/api/v1/ams/updateCarAddress", map).then(res => {
+            if (res.data.code == "200") {
+              this.$message.success("删除成功");
+            } else {
+              this.$message.error("删除失败");
+            }
+          });
+        })
+        .catch(() => {
+          this.$message.info("取消删除");
+        });
+    },
+    //不删除金蝶分录,继续选择
+    noDeleteEasEntryId() {
+      let title = `请选择对-${this.capacityNumber}-进行的操作?`;
+      let confirmText = `仅更换-${this.capacityNumber}-的收货地址`;
+      this.$confirm(title, {
+        confirmButtonText: confirmText,
+        cancelButtonText: "更换地址且换车",
+        center: true,
+        distinguishCancelAndClose: true,
+        type: "info"
+      })
+        .then(() => {
+          this.onlyUpdateAddress();
+        })
+        .catch(action => {
+          if (action === "cancel") {
+            this.updateAddressAndCar();
+          }
+        });
+    },
+    onlyUpdateAddress() {
+      let title = `仅更换-${this.capacityNumber}-的收货地址吗`;
+      this.$confirm(title, {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        center: true,
+        type: "warning"
+      }).then(() => {
+        this.addressDialog = true;
+        this.isNewCar = 1;
+      });
+    },
+    //收货地址弹出层
+    handleSelect1(item) {
+      console.log("获取所有下拉值!");
+    },
+    //以下是收货地址边输边查搜索
+    querySearch1(queryString, cb) {
+      this.axios
+        .post(
+          "/api/v1/ams/getRealAddressByLike?addressId=" +
+            this.addressId +
+            "&index=" +
+            queryString
+        )
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter1(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter1(queryString) {
+      return restaurants => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是收货地址边输边查搜索
+    //监听收货地址模态框点击事件
+    currentRadioChange1(radioList) {
+      this.addressId = radioList.addressId;
+      this.address = radioList.address;
+    },
+    //确定收货地址事件
+    addAddressClick() {
+      let map = this.orderSaleMap;
+      map.isCloseEas = Number(1);
+      map.isNewCar = Number(this.isNewCar);
+      map.saleOrderId = this.$route.params.saleOrderId;
+      map.place = this.place;
+      map.shipperAddressId = this.addressId;
+      this.axios.post("/api/v1/ams/updateCarAddress", map).then(res => {
+        if (res.data.code == "200") {
+          this.$message.success("修改成功");
+          this.getOrderList();
+        } else {
+          this.$message.error("修改失败");
+          this.getOrderList();
+        }
+      });
+      this.addressDialog = false;
+      //初始化
+      this.addressId = null;
+      this.province = null;
+      this.cityList = [];
+      this.city = null;
+      this.countyList = [];
+      this.county = null;
+      //暂存具体地址
+      this.place1 = this.place;
+      this.place = null;
+      this.addresText = null;
+    },
+    updateAddressAndCar() {
+      this.$confirm("确定修改收货地址且换车?将会解除授权!", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        center: true,
+        type: "warning"
+      })
+        .then(() => {
+          this.addressDialog = true;
+          this.isNewCar = 0;
+        })
+        .catch(() => {
+          this.$message.info("取消");
+        });
+    },
+    //获取所有省数据
+    getAllProvince() {
+      this.axios.post("/api/v1/uc/getAllProvince").then(res => {
+        this.provinceList = res.data.data;
+      });
+    },
+    //省改变
+    onchangeProvince() {
+      this.axios
+        .post(
+          "/api/v1/uc/getDistrictByProvince?addressProvince=" + this.province
+        )
+        .then(res => {
+          this.cityList = res.data.data;
+        });
+    },
+    //市改变
+    onchangeCity() {
+      this.axios
+        .post("/api/v1/uc/getTownByDistrict?addressDistrict=" + this.city)
+        .then(res => {
+          this.countyList = res.data.data;
+        });
+    },
+    //县(区)改变
+    onchangeCounty() {
+      let mapValue = {
+        addressProvince: this.province,
+        addressDistrict: this.city,
+        addressTown: this.county
+      };
+      this.axios.post("/api/v1/uc/getPlaceByAllAddress", mapValue).then(res => {
+        this.addressId = res.data.data[0].addressId;
+      });
+    },
+    rowDbClick1(row) {
+      this.selectedMaterialId = row.materialId;
+      this.selectedMaterialName = row.materialName;
+      this.selectedMaterialSpecification = row.materialSpecification;
+      this.selectedMaterialModel = row.materialModel;
+      this.selectedMaterialCode = row.materialCode;
+      this.makeSureChange();
+    },
+    //更改行物资
+    changeMaterial(index) {
+      this.option1.requestUrl =
+        "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
+      this.currentTable = true;
+      this.materialNameText = null;
+      this.materialSpecificationText = null;
+      this.isOpenDrawer = 1;
+      this.indexChangeMaterial = index;
+    },
+    //单选一行物资
+    currentRadioChange(row) {
+      this.selectedMaterialId = row.materialId;
+      this.selectedMaterialName = row.materialName;
+      this.selectedMaterialSpecification = row.materialSpecification;
+      this.selectedMaterialModel = row.materialModel;
+      this.selectedMaterialCode = row.materialCode;
+    },
+    //确认物资修改
+    makeSureChange() {
+      if (!this.selectedMaterialId) {
+        this.$message.warning("请先选择一个物资!");
+      } else {
+        if (!this.selectedMaterialSpecification) {
+          this.selectedMaterialSpecification = "";
+        }
+        if (!this.selectedMaterialModel) {
+          this.selectedMaterialModel = "";
+        }
+        //记录是理重还是磅重
+        var getisPound = 1;
+        //判断物资是否为盘螺或非定尺
+        if (
+          this.selectedMaterialName.includes("盘螺") ||
+          this.selectedMaterialName.includes("乱尺") ||
+          this.selectedMaterialName.includes("盘元") ||
+          this.selectedMaterialName.includes("盘圆")
+        ) {
+          getisPound = 0;
+        } else {
+          getisPound = 1;
+        }
+        this.materialList[
+          this.indexChangeMaterial
+        ].materialId = this.selectedMaterialId;
+        this.materialList[
+          this.indexChangeMaterial
+        ].materialName = this.selectedMaterialName;
+        this.materialList[this.indexChangeMaterial].Specification =
+          this.selectedMaterialSpecification + this.selectedMaterialModel;
+        this.materialList[
+          this.indexChangeMaterial
+        ].materialCode = this.selectedMaterialModel;
+        this.materialList[this.indexChangeMaterial].isPound = getisPound;
+        //确定更改的物资有无米数
+        if (
+          this.selectedMaterialName.includes("盘螺") ||
+          this.selectedMaterialName.includes("盘圆") ||
+          this.selectedMaterialName.includes("盘元")
+        ) {
+          console.log("执行了这里");
+          this.materialList[this.indexChangeMaterial].haveMeter = 0;
+          this.materialList[this.indexChangeMaterial].meterNumber = null;
+        } else {
+          this.materialList[this.indexChangeMaterial].haveMeter = 1;
+          this.materialList[this.indexChangeMaterial].isDisable = 0;
+          this.materialList[this.indexChangeMaterial].meterNumber = null;
+        }
+        //重新初始化
+        this.indexChangeMaterial = null;
+        this.selectedMaterialId = null;
+        this.selectedMaterialName = null;
+        this.selectedMaterialSpecification = null;
+        this.selectedMaterialModel = null;
+        this.selectedMaterialCode = null;
+        //关闭弹出框
+        this.currentTable = false;
+        this.isOpenDrawer = 0;
+        //初始化查询数据
+        this.materialNameText = null;
+        this.materialSpecificationText = null;
+      }
+    },
     cancelUpdateMaterial() {
-      this.dialogTableVisible = false;
       this.getOrderList();
+      this.dialogTableVisible = false;
     },
     makeSureUpdateMaterial() {
+      let i = 0;
+      if (this.materialList.length == 0) {
+        this.$message.error("物资信息不能为空");
+        return;
+      }
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.meterNumber) && e.meterNumber != null) {
+          e.meterNumber = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        i = 0;
+        this.$message.error("米数请输入正整数");
+        return;
+      }
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
+          e.orderPlanWeight = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        this.$message.error("件数必填且请输入正整数");
+        return;
+      }
+      this.materialList.forEach(e => {
+        if (e.materialName.includes("定尺")) {
+          if (!e.meterNumber) {
+            i++;
+          }
+        }
+      });
+      if (i != 0) {
+        this.$message.error("定尺必须填写米数");
+        return;
+      }
       this.dialogTableVisible = false;
-      this.getOrderList();
+      this.orderId = null;
+      this.saleOrderMaterialId = null;
+      this.saleOrderId = this.$route.params.saleOrderId;
+      this.materialList.forEach(e => {
+        this.orderId = e.orderId;
+        this.saleOrderMaterialId = e.saleOrderMaterialId;
+      });
+      let mapVal = {
+        orderId: this.orderId,
+        saleOrderMaterialId: this.saleOrderMaterialId,
+        saleOrderId: this.saleOrderId,
+        mapList: this.materialList
+      };
+      this.axios
+        .post("/api/v1/ams/updateAllMaterialInSale", mapVal)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改成功!");
+            this.getOrderList();
+          } else {
+            this.$message.warning("修改失败");
+            this.getOrderList();
+          }
+        });
     },
     makeSureMaterial() {
       //记录是理重还是磅重
@@ -345,11 +879,11 @@ export default {
             meterNumber: null,
             isPound: getisPound,
             //物资Id
-            materialId: e.materialId
+            materialId: e.materialId,
+            haveMeter: 0
           };
         } else {
           if (e.materialName.includes("米")) {
-            console.log("着");
             var addmap = {
               capacityNumber: this.capacityNumber,
               orderId: this.orderId,
@@ -357,10 +891,12 @@ export default {
               Specification: e.materialSpecification + e.materialModel,
               materialCode: e.materialCode,
               orderPlanWeight: null,
+              haveMeter: 1,
               meterNumber: e.materialName.replace(/[^0-9]/gi, ""),
               isPound: getisPound,
               //物资Id
-              materialId: e.materialId
+              materialId: e.materialId,
+              isDisable: 1
               //有米数
             };
             console.log(addmap);
@@ -374,6 +910,7 @@ export default {
               orderPlanWeight: null,
               meterNumber: null,
               isPound: getisPound,
+              haveMeter: 1,
               //物资Id
               materialId: e.materialId
             };
@@ -395,6 +932,11 @@ export default {
       this.makeSureMaterial();
     },
     openDrawer() {
+      this.option.requestUrl =
+        "/api/v1/uc/getSteelMaterial?apiId=244&i=" + new Date();
+      this.materialModelText = null;
+      this.materialSpecificationText = null;
+      this.materialNameText = null;
       this.table1 = true;
     },
     //返回选中的物资信息
@@ -408,7 +950,18 @@ export default {
         "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
         this.materialNameText +
         "&materialSpecificationText=" +
-        this.materialSpecificationText;
+        this.materialSpecificationText +
+        "&i=" +
+        new Date();
+    },
+    onclick1() {
+      this.option1.requestUrl =
+        "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
+        this.materialNameText +
+        "&materialSpecificationText=" +
+        this.materialSpecificationText +
+        "&i=" +
+        new Date();
     },
     //开关是否删除
     showDelete() {
@@ -419,16 +972,28 @@ export default {
       this.status = 1;
     },
     updateMaterial(scope) {
+      this.materialList = [];
       this.materialList = this.tableData.filter((item, index) => {
         return item.orderId == scope.row.orderId;
       });
       this.materialList.forEach(e => {
         this.capacityNumber = e.capacityNumber;
         this.orderId = e.orderId;
+        if (
+          e.materialName.includes("盘螺") ||
+          e.materialName.includes("盘圆") ||
+          e.materialName.includes("盘元")
+        ) {
+          e.haveMeter = 0;
+        } else {
+          e.haveMeter = 1;
+          if (e.materialName.includes("米")) {
+            e.isDisable = 1;
+          }
+        }
       });
       this.getSpanArr1(this.materialList);
       this.title = "处理" + "-" + this.capacityNumber + "-" + "异常物资信息";
-      this.getOrderList();
       this.dialogTableVisible = true;
     },
     getOrderList() {
@@ -440,14 +1005,15 @@ export default {
             new Date()
         )
         .then(res => {
+          this.tableData = [];
           this.tableData = res.data.data;
           this.getSpanArr(this.tableData);
         });
     },
-    onclick() {},
     back() {
       this.$router.push("/saleOrderSteel");
     },
+    //合并方法
     getSpanArr1(data) {
       //每次调用方法初始化
       this.spanArr1 = [];
@@ -534,12 +1100,23 @@ export default {
     margin-left: 20px;
   }
   .dialog {
-    width: 600px;
     .buttonx {
       display: flex;
       justify-content: center;
       align-items: center;
     }
   }
+  .addressDialog {
+    .addressDialog {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+    .button-box {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+  }
 }
 </style>

+ 3 - 0
src/views/inward/app.js

@@ -23,6 +23,9 @@ Vue.use(DilCommonUI);
 import tableToExcel from '@/components/exportExcel/exportExcel'
 Vue.use(tableToExcel)
 
+import tableAllToExcel from '@/components/exportAllExcel/exportAllExcel'
+Vue.use(tableAllToExcel)
+
 import 'xe-utils' 
 import VXETable from 'vxe-table'
 import 'vxe-table/lib/style.css'

+ 34 - 15
src/views/inward/components/inwardFactory/unload.vue

@@ -2,7 +2,7 @@
 <template>
   <!-- 卸货卸货实绩页面 -->
   <div class="homeworkPath">
-   <div class="top">
+    <div class="top">
       <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
@@ -22,31 +22,50 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "",
-      },
+        requestUrl: ""
+      }
     };
   },
-  created(){
-      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=360&orderType=11"
-      }else{
-          this.option.requestUrl = "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&userId=" + getCookie("orgCode")
-      }
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.option.requestUrl =
+        "/api/v1/tms/getUnloadResult?apiId=360&orderType=11";
+    } else {
+      this.option.requestUrl =
+        "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&userId=" +
+        getCookie("orgCode");
+    }
   },
   methods: {
     onclick() {
-          this.$message.info("功能暂时关闭")
-    },
-   }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.option.requestUrl =
+          "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&con=" +
+          this.input;
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getUnloadResult?apiId=360&orderType=11&userId=" +
+          getCookie("orgCode") +
+          "&con=" +
+          this.input;
+      }
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .homeworkPath {
   .top {
     padding: 1.25rem 1.875rem;
-    .el-input{
+    .el-input {
       width: 20%;
     }
   }
 }
-</style>
+</style>

+ 198 - 106
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -10,189 +10,281 @@
       >
       </el-date-picker>
       <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
       <span style="margin-left: 1rem;">合计净重:</span>
-      <el-input v-model="totalNetWeight" :disabled="true" style="width: 140px;"></el-input>
+      <el-input
+        v-model="totalNetWeight"
+        :disabled="true"
+        style="width: 140px;"
+      ></el-input>
       <span style="margin-left: 1rem;">合计金额:</span>
-      <el-input v-model="totalMoney" :disabled="true" style="width: 100px;"></el-input>
+      <el-input
+        v-model="totalMoney"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
     </div>
     <div class="table">
       <el-tabs v-model="activeName" tab-click="handClick">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-        <div class="table">
-        <dilTable v-bind.sync="options1" ref="excelDom" @func="func"></dilTable>
-        </div>
+          <div class="table">
+            <dilTable
+              v-bind.sync="options1"
+              ref="excelDom"
+              @func="func"
+            ></dilTable>
+          </div>
         </el-tab-pane>
         <!-- 已结算 -->
         <el-tab-pane label="已结算" name="second">
-        <dilTable v-bind.sync="options2">
-        </dilTable>
+          <dilTable v-bind.sync="options2"> </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
-
   </div>
 </template>
 
 <script>
 import { getCookie } from "@/utils/util.js";
-import { sjTime } from '@/utils/sharedJsFile';
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
-  data(){
-    return{
+  data() {
+    return {
       startTime: null,
       endTime: null,
       //合计净重
-      totalNetWeight:null,
+      totalNetWeight: null,
       //合计金额
-      totalMoney:null,
+      totalMoney: null,
       //单价
-      Fee:null,
+      Fee: null,
       //加载
-      selectLineLoading:false,
-      input:"",
-      activeName:"first",
-      ssoId:null,
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
       //详单Id
-      detailsId:null,
-      options1:{
+      detailsId: null,
+      options1: {
         // first请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
-      options2:{
+      options2: {
         // second请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
       //是否打开修改详单地址弹出框
-      dialogFormVisible:false,
+      dialogFormVisible: false,
       //原详单单价
-      originalPriceValue:null,
+      originalPriceValue: null,
       //新详单单价
-      newPriceValue:null,
+      newPriceValue: null,
       //原详单地址
-      originalAddress:null,
+      originalAddress: null,
       //新详单地址
-      newAddress:null,
+      newAddress: null,
       //新单价Id
-      priceId:null,
+      priceId: null,
       //是否打开运输单价的模态框
-      addressDrawer:false,
+      addressDrawer: false,
       //运输单价的表格
       Address: {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       // addressText:null,
       //缓存当前选中的运输单价
-      priceMap:{},
-      formLabelWidth: '125px',
-      tableTitle:'内转计重详单'
-    }
+      priceMap: {},
+      formLabelWidth: "125px",
+      tableTitle: "内转计重详单"
+    };
   },
-  created(){
-     this.options1GetRequestUrl();
-     this.options2GetRequestUrl();
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
   },
-  methods:{
-    func(res){
-      console.log(res.list)
+  methods: {
+    func(res) {
+      console.log(res.list);
       var totalWeight = 0;
       var totalAllMoney = 0;
       res.list.forEach(e => {
-        console.log(e.resultNetWeight)
-        totalWeight = totalWeight + e.resultNetWeight
-        totalAllMoney = totalAllMoney + e.detailsAmount
+        console.log(e.resultNetWeight);
+        totalWeight = totalWeight + e.resultNetWeight;
+        totalAllMoney = totalAllMoney + e.detailsAmount;
         console.log(e.detailsAmount);
       });
-      this.totalNetWeight = totalWeight.toFixed(2) + 't';
-      this.totalMoney = totalAllMoney.toFixed(2) + '元'
+      this.totalNetWeight = totalWeight.toFixed(2) + "t";
+      this.totalMoney = totalAllMoney.toFixed(2) + "元";
     },
     //未结算数据
-    options1GetRequestUrl(){
-    if(getCookie("orgCode") == "chengyunshang"){
-      this.ssoId=getCookie('userId');
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=null&endTime=null&i=" +new Date();
-    }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&startTime=null&endTime=null&i=" +new Date();
-    }else{
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=null&endTime=null&i=" +new Date(); 
-    }
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId=" +
+          getCookie("userId") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&startTime=null&endTime=null&i=" +
+          new Date();
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" +
+          getCookie("orgCode") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      }
     },
     //已结算数据
-    options2GetRequestUrl(){
-     if(getCookie("orgCode") == "chengyunshang"){
-      this.ssoId=getCookie('userId');
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=null&endTime=null&i=" +new Date();
-    }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" + "&startTime=null&endTime=null&i=" +new Date();
-    }else{
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=null&endTime=null&i=" +new Date();
-    }
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId=" +
+          getCookie("userId") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" +
+          getCookie("orgCode") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      }
     },
-     toInsert() {
+    toInsert() {
       this.$router.push("/insertCheckInventory");
     },
-    onclick(){
+    onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.startTime){
+      if (this.startTime) {
         startTime = sjTime(this.startTime);
       }
-      if(this.endTime){
+      if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if(startTime && endTime){
-        if(startTime < endTime){
-          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          }else if(getCookie("orgCode") == "chengyunshang"){
-          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          }else{
-            this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-            this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          if (
+            getCookie("orgCode") == "dagangadmin" ||
+            getCookie("orgCode") == "zidonghuabu" ||
+            getCookie("orgCode") == "wuliuchuyunzhongxin"
+          ) {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else if (getCookie("orgCode") == "chengyunshang") {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=0&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=461&orderType=11&detailStatus=1&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
           }
-        }else{
+        } else {
           this.startTime = null;
           this.endTime = null;
-          this.$message.warning('开始时间要比结束时间早')
+          this.$message.warning("开始时间要比结束时间早");
         }
-      }else{
-
+      } else {
       }
     },
     //运输订单点击浏览的事件
-    select(){
+    select() {
       this.addressDrawer = true;
     },
     //运输单价模态窗口的框计算
-    selectAddressClick(){
-      this.Price.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
-    },
-   
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    padding: 1.25rem 0.375rem;
-			.el-input {
-			width: 20%;
-			margin-right: 1.25rem;
-			}
+.steel_inbound {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
-</style>
+</style>

+ 290 - 0
src/views/inward/components/inwardSettlement/inwardAllDetailsOrder.vue

@@ -0,0 +1,290 @@
+// 计费详单
+<template>
+  <div class="steel_inbound">
+    <div class="sache">
+      <span>详单时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
+      <span style="margin-left: 1rem;">合计净重:</span>
+      <el-input
+        v-model="totalNetWeight"
+        :disabled="true"
+        style="width: 140px;"
+      ></el-input>
+      <span style="margin-left: 1rem;">合计金额:</span>
+      <el-input
+        v-model="totalMoney"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
+    </div>
+    <div class="table">
+      <el-tabs v-model="activeName" tab-click="handClick">
+        <!-- 未结算 -->
+        <el-tab-pane label="未结算" name="first">
+          <div class="table">
+            <dilTable
+              v-bind.sync="options1"
+              ref="excelDom"
+              @func="func"
+            ></dilTable>
+          </div>
+        </el-tab-pane>
+        <!-- 已结算 -->
+        <el-tab-pane label="已结算" name="second">
+          <dilTable v-bind.sync="options2"> </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+import { sjTime } from "@/utils/sharedJsFile";
+export default {
+  data() {
+    return {
+      startTime: null,
+      endTime: null,
+      //合计净重
+      totalNetWeight: null,
+      //合计金额
+      totalMoney: null,
+      //单价
+      Fee: null,
+      //加载
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
+      //详单Id
+      detailsId: null,
+      options1: {
+        // first请求数据的地址
+        requestUrl: ""
+      },
+      options2: {
+        // second请求数据的地址
+        requestUrl: ""
+      },
+      //是否打开修改详单地址弹出框
+      dialogFormVisible: false,
+      //原详单单价
+      originalPriceValue: null,
+      //新详单单价
+      newPriceValue: null,
+      //原详单地址
+      originalAddress: null,
+      //新详单地址
+      newAddress: null,
+      //新单价Id
+      priceId: null,
+      //是否打开运输单价的模态框
+      addressDrawer: false,
+      //运输单价的表格
+      Address: {
+        requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
+        selectionType: "radio"
+      },
+      // addressText:null,
+      //缓存当前选中的运输单价
+      priceMap: {},
+      formLabelWidth: "125px",
+      tableTitle: "内转计重详单"
+    };
+  },
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
+  },
+  methods: {
+    func(res) {
+      console.log(res.list);
+      var totalWeight = 0;
+      var totalAllMoney = 0;
+      res.list.forEach(e => {
+        console.log(e.resultNetWeight);
+        totalWeight = totalWeight + e.resultNetWeight;
+        totalAllMoney = totalAllMoney + e.detailsAmount;
+        console.log(e.detailsAmount);
+      });
+      this.totalNetWeight = totalWeight.toFixed(2) + "t";
+      this.totalMoney = totalAllMoney.toFixed(2) + "元";
+    },
+    //未结算数据
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&carrierSsoId=" +
+          getCookie("userId") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&startTime=null&endTime=null&i=" +
+          new Date();
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&userId=" +
+          getCookie("orgCode") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      }
+    },
+    //已结算数据
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1&carrierSsoId=" +
+          getCookie("userId") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1" +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1&userId=" +
+          getCookie("orgCode") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      }
+    },
+    toInsert() {
+      this.$router.push("/insertCheckInventory");
+    },
+    onclick() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime) {
+        startTime = sjTime(this.startTime);
+      }
+      if (this.endTime) {
+        endTime = sjTime(this.endTime);
+      }
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          if (
+            getCookie("orgCode") == "dagangadmin" ||
+            getCookie("orgCode") == "zidonghuabu" ||
+            getCookie("orgCode") == "wuliuchuyunzhongxin"
+          ) {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else if (getCookie("orgCode") == "chengyunshang") {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=0&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightTimeDetailsOrder?apiId=488&orderType=11&detailStatus=1&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          }
+        } else {
+          this.startTime = null;
+          this.endTime = null;
+          this.$message.warning("开始时间要比结束时间早");
+        }
+      } else {
+      }
+    },
+    //运输订单点击浏览的事件
+    select() {
+      this.addressDrawer = true;
+    },
+    //运输单价模态窗口的框计算
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.steel_inbound {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 181 - 103
src/views/inward/components/inwardSettlement/purInwardDetailsOrder.vue

@@ -10,32 +10,37 @@
       >
       </el-date-picker>
       <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-        <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
-        <span style="margin-left: 1rem;">合计净重:</span>
-        <el-input v-model="totalNetWeight" :disabled="true" style="width: 140px;"></el-input>
-        <span style="margin-left: 1rem;">合计金额:</span>
-        <el-input v-model="totalMoney" :disabled="true" style="width: 100px;"></el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
+      <span style="margin-left: 1rem;">合计净重:</span>
+      <el-input
+        v-model="totalNetWeight"
+        :disabled="true"
+        style="width: 140px;"
+      ></el-input>
+      <span style="margin-left: 1rem;">合计金额:</span>
+      <el-input
+        v-model="totalMoney"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
     </div>
     <div class="table">
       <el-tabs v-model="activeName">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-        <dilTable v-bind.sync="options1" ref="excelDom" @func="func">
-        </dilTable>
+          <dilTable v-bind.sync="options1" ref="excelDom" @func="func">
+          </dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
         <el-tab-pane label="已结算" name="second">
-        <dilTable v-bind.sync="options2">
-        </dilTable>
+          <dilTable v-bind.sync="options2"> </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
@@ -44,149 +49,222 @@
 
 <script>
 import { getCookie } from "@/utils/util.js";
-import { sjTime } from '@/utils/sharedJsFile';
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
-  data(){
-    return{
+  data() {
+    return {
       startTime: null,
       endTime: null,
-      totalNetWeight:null,
-      totalMoney:null,
+      totalNetWeight: null,
+      totalMoney: null,
       //单价
-      Fee:null,
+      Fee: null,
       //加载
-      selectLineLoading:false,
-      input:"",
-      activeName:"first",
-      ssoId:null,
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
       //详单Id
-      detailsId:null,
-      options1:{
+      detailsId: null,
+      options1: {
         // first请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
-      options2:{
+      options2: {
         // second请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
       //是否打开修改详单地址弹出框
-      dialogFormVisible:false,
+      dialogFormVisible: false,
       //原详单单价
-      originalPriceValue:null,
+      originalPriceValue: null,
       //新详单单价
-      newPriceValue:null,
+      newPriceValue: null,
       //原详单地址
-      originalAddress:null,
+      originalAddress: null,
       //新详单地址
-      newAddress:null,
+      newAddress: null,
       //新单价Id
-      priceId:null,
+      priceId: null,
       //是否打开运输单价的模态框
-      addressDrawer:false,
+      addressDrawer: false,
       //运输单价的表格
       Address: {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       // addressText:null,
       //缓存当前选中的运输单价
-      priceMap:{},
-      formLabelWidth: '125px'
-    }
+      priceMap: {},
+      formLabelWidth: "125px"
+    };
   },
-  created(){
-     this.options1GetRequestUrl();
-     this.options2GetRequestUrl();
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
   },
-  methods:{
-    func(res){
+  methods: {
+    func(res) {
       console.log(res.list);
       var totalWeight = 0;
       var totalAllMoney = 0;
       res.list.forEach(e => {
-        totalWeight = totalWeight + e.netWeightSecond
-        totalAllMoney = totalAllMoney + e.secondAmount
+        totalWeight = totalWeight + e.netWeightSecond;
+        totalAllMoney = totalAllMoney + e.secondAmount;
       });
-      this.totalNetWeight = totalWeight.toFixed(2) + 't';
-      this.totalMoney = totalAllMoney.toFixed(2) + '元'
+      this.totalNetWeight = totalWeight.toFixed(2) + "t";
+      this.totalMoney = totalAllMoney.toFixed(2) + "元";
     },
     //未结算数据
-    options1GetRequestUrl(){
-    if(getCookie("orgCode") == "chengyunshang"){
-      this.ssoId=getCookie('userId');
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&carrierSsoId="+ getCookie('userId');
-    }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0"
-    }else{
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&userId=" + getCookie("orgCode");  
-    }
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&carrierSsoId=" +
+          getCookie("userId");
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0";
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&userId=" +
+          getCookie("orgCode");
+      }
     },
     //已结算数据
-    options2GetRequestUrl(){
-     if(getCookie("orgCode") == "chengyunshang"){
-      this.ssoId=getCookie('userId');
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&carrierSsoId="+ getCookie('userId');
-    }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1"
-    }else{
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&userId=" + getCookie("orgCode");  
-    }
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&carrierSsoId=" +
+          getCookie("userId");
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1";
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&userId=" +
+          getCookie("orgCode");
+      }
     },
-     toInsert() {
+    toInsert() {
       this.$router.push("/insertCheckInventory");
     },
 
-    onclick(){
+    onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.startTime){
+      if (this.startTime) {
         startTime = sjTime(this.startTime);
       }
-      if(this.endTime){
+      if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if(startTime && endTime){
-        if(startTime < endTime){
-          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          }else if(getCookie("orgCode") == "chengyunshang"){
-          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          }else{
-            this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-            this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          if (
+            getCookie("orgCode") == "dagangadmin" ||
+            getCookie("orgCode") == "zidonghuabu" ||
+            getCookie("orgCode") == "wuliuchuyunzhongxin"
+          ) {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else if (getCookie("orgCode") == "chengyunshang") {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=0&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=462&orderType=10&detailStatus=1&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
           }
-        }else{
+        } else {
           this.startTime = null;
           this.endTime = null;
-          this.$message.warning('开始时间要比结束时间早')
+          this.$message.warning("开始时间要比结束时间早");
         }
-      }else{
-
+      } else {
       }
     },
     //运输订单点击浏览的事件
-    select(){
+    select() {
       this.addressDrawer = true;
     },
     //运输单价模态窗口的框计算
-    selectAddressClick(){
-      this.Price.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
-    },
-   
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    padding: 1.25rem 0.375rem;
-			.el-input {
-			width: 20%;
-			margin-right: 1.25rem;
-			}
+.steel_inbound {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
-</style>
+</style>

+ 181 - 104
src/views/inward/components/inwardSettlement/timeDetailsWeight.vue

@@ -10,184 +10,261 @@
       >
       </el-date-picker>
       <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
-    <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
-    <span style="margin-left: 1rem;">合计时间:</span>
-      <el-input v-model="totalTime" :disabled="true" style="width: 140px;"></el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
+      <span style="margin-left: 1rem;">合计时间:</span>
+      <el-input
+        v-model="totalTime"
+        :disabled="true"
+        style="width: 140px;"
+      ></el-input>
       <span style="margin-left: 1rem;">合计金额:</span>
-      <el-input v-model="totalMoney" :disabled="true" style="width: 100px;"></el-input>
+      <el-input
+        v-model="totalMoney"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
     </div>
     <div class="table">
       <el-tabs v-model="activeName">
         <!-- 未结算 -->
         <el-tab-pane label="未结算" name="first">
-        <dilTable v-bind.sync="options1" ref="excelDom" @func="func">
-        </dilTable>
+          <dilTable v-bind.sync="options1" ref="excelDom" @func="func">
+          </dilTable>
         </el-tab-pane>
         <!-- 已结算 -->
         <el-tab-pane label="已结算" name="second">
-        <dilTable v-bind.sync="options2">
-        </dilTable>
+          <dilTable v-bind.sync="options2"> </dilTable>
         </el-tab-pane>
       </el-tabs>
     </div>
-
   </div>
 </template>
 
 <script>
-import { sjTime } from '@/utils/sharedJsFile';
-import { getCookie } from '@/utils/util.js';
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
-  data(){
-    return{
+  data() {
+    return {
       startTime: null,
       endTime: null,
-      totalMoney:null,
-      totalTime:null,
+      totalMoney: null,
+      totalTime: null,
       //单价
-      Fee:null,
+      Fee: null,
       //加载
-      selectLineLoading:false,
-      input:"",
-      activeName:"first",
-      ssoId:null,
+      selectLineLoading: false,
+      input: "",
+      activeName: "first",
+      ssoId: null,
       //详单Id
-      detailsId:null,
-      options1:{
+      detailsId: null,
+      options1: {
         // first请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
-      options2:{
+      options2: {
         // second请求数据的地址
-        requestUrl: "",
+        requestUrl: ""
       },
       //是否打开修改详单地址弹出框
-      dialogFormVisible:false,
+      dialogFormVisible: false,
       //原详单单价
-      originalPriceValue:null,
+      originalPriceValue: null,
       //新详单单价
-      newPriceValue:null,
+      newPriceValue: null,
       //原详单地址
-      originalAddress:null,
+      originalAddress: null,
       //新详单地址
-      newAddress:null,
+      newAddress: null,
       //新单价Id
-      priceId:null,
+      priceId: null,
       //是否打开运输单价的模态框
-      addressDrawer:false,
+      addressDrawer: false,
       //运输单价的表格
       Address: {
         requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       // addressText:null,
       //缓存当前选中的运输单价
-      priceMap:{},
-      formLabelWidth: '125px',
-      tableTitle:'内转计时计费详单'
-    }
+      priceMap: {},
+      formLabelWidth: "125px",
+      tableTitle: "内转计时计费详单"
+    };
   },
-  created(){
-     this.options1GetRequestUrl();
-     this.options2GetRequestUrl();
+  created() {
+    this.options1GetRequestUrl();
+    this.options2GetRequestUrl();
   },
-  methods:{
+  methods: {
     //未结算数据
-    options1GetRequestUrl(){
-    if(getCookie("orgCode") == "chengyunshang"){
-      this.ssoId=getCookie('userId');
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&carrierSsoId="+ getCookie('userId');
-    }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0"
-    }else{
-      this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&userId=" + getCookie("orgCode");  
-    }
+    options1GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&carrierSsoId=" +
+          getCookie("userId");
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0";
+      } else {
+        this.options1.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&userId=" +
+          getCookie("orgCode");
+      }
     },
     //已结算数据
-    options2GetRequestUrl(){
-     if(getCookie("orgCode") == "chengyunshang"){
-      this.ssoId=getCookie('userId');
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&carrierSsoId="+ getCookie('userId');
-    }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1"
-    }else{
-      this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&userId=" + getCookie("orgCode");  
-    }
+    options2GetRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.ssoId = getCookie("userId");
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&carrierSsoId=" +
+          getCookie("userId");
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu" ||
+        getCookie("orgCode") == "wuliuchuyunzhongxin"
+      ) {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1";
+      } else {
+        this.options2.requestUrl =
+          "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&userId=" +
+          getCookie("orgCode");
+      }
     },
-     toInsert() {
+    toInsert() {
       this.$router.push("/insertCheckInventory");
     },
-    func(res){
+    func(res) {
       console.log(res);
       var totalAllTime = 0;
       var totalAllMoney = 0;
       res.list.forEach(e => {
-        totalAllTime = totalAllTime + e.resultTime
-        totalAllMoney = totalAllMoney + e.detailsAmount
+        totalAllTime = totalAllTime + e.resultTime;
+        totalAllMoney = totalAllMoney + e.detailsAmount;
       });
       this.totalMoney = totalAllMoney;
-      this.totalTime = totalAllTime;      
+      this.totalTime = totalAllTime;
     },
-    onclick(){
+    onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.startTime){
+      if (this.startTime) {
         startTime = sjTime(this.startTime);
       }
-      if(this.endTime){
+      if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if(startTime && endTime){
-        if(startTime < endTime){
-          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
-          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1" + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          }else if(getCookie("orgCode") == "chengyunshang"){
-          this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&carrierSsoId="+ getCookie('userId') + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-          }else{
-            this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
-            this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&userId=" + getCookie("orgCode") + "&startTime=" + startTime + "&endTime=" + endTime + "&i" +new Date();
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          if (
+            getCookie("orgCode") == "dagangadmin" ||
+            getCookie("orgCode") == "zidonghuabu" ||
+            getCookie("orgCode") == "wuliuchuyunzhongxin"
+          ) {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1" +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else if (getCookie("orgCode") == "chengyunshang") {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&carrierSsoId=" +
+              getCookie("userId") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+          } else {
+            this.options1.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=0&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
+            this.options2.requestUrl =
+              "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=21&detailStatus=1&userId=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&i" +
+              new Date();
           }
-        }else{
+        } else {
           this.startTime = null;
           this.endTime = null;
-          this.$message.warning('开始时间要比结束时间早')
+          this.$message.warning("开始时间要比结束时间早");
         }
-      }else{
-
+      } else {
       }
     },
     //运输订单点击浏览的事件
-    select(){
+    select() {
       this.addressDrawer = true;
     },
     //运输单价模态窗口的框计算
-    selectAddressClick(){
-      this.Price.requestUrl = '/api/v1/ams/getAddressDeliveryAddress?apiId=255&con='+this.addressText;
-    },
-   
+    selectAddressClick() {
+      this.Price.requestUrl =
+        "/api/v1/ams/getAddressDeliveryAddress?apiId=255&con=" +
+        this.addressText;
+    }
   }
-}
+};
 </script>
 
 <style lang="scss" scode>
-.steel_inbound{
-  .sache{
-    padding: 1.25rem 0.375rem;
-			.el-input {
-			width: 20%;
-			margin-right: 1.25rem;
-			}
+.steel_inbound {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
 }
-</style>
+</style>

+ 120 - 93
src/views/inward/components/truckAppoint/purInwardRequirement.vue

@@ -24,42 +24,40 @@
         <i class="el-icon-download"></i>下发
       </el-button>
     </div>
-    <template>
-      <div>
-        <el-tabs v-model="activeName">
-          <el-tab-pane label="未下发" name="first">
-            <dilTable v-bind.sync="first" @selection-change="selectionChange">
-              <el-table-column fixed="right" label="操作" width="100">
-                <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    size="mini"
-                    @click="deleteRequirement(scope)"
-                  >
-                    删除
-                  </el-button>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-          <el-tab-pane label="已下发" name="second">
-            <dilTable v-bind.sync="second" @func="func">
-              <el-table-column fixed="right" label="操作" width="100">
-                <template slot-scope="scope">
-                  <el-button
-                    type="text"
-                    size="mini"
-                    @click="stopRequirement(scope)"
-                  >
-                    {{startStop}}
-                  </el-button>
-                </template>
-              </el-table-column>
-            </dilTable>
-          </el-tab-pane>
-        </el-tabs>
-      </div>
-    </template>
+    <div class="table">
+      <el-tabs v-model="activeName">
+        <el-tab-pane label="未下发" name="first">
+          <dilTable v-bind.sync="first" @selection-change="selectionChange">
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="deleteRequirement(scope)"
+                >
+                  删除
+                </el-button>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+        <el-tab-pane label="已下发" name="second">
+          <dilTable v-bind.sync="second" @func="func">
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  size="mini"
+                  @click="stopRequirement(scope)"
+                >
+                  {{ startStop }}
+                </el-button>
+              </template>
+            </el-table-column>
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 <script>
@@ -67,51 +65,75 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      startStop:null,
-      startStopValue:null,
+      startStop: null,
+      startStopValue: null,
       inputText: "",
       first: {
         // first请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: "",
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       second: {
         // second请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: ""
       },
-      activeName: "first",
+      activeName: "first"
     };
   },
-  created(){
-    if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"){
-        this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0" 
-        this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1"
-    }else{
-         this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0&userId=" + getCookie("orgCode")
-         this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&userId=" + getCookie("orgCode")
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.first.requestUrl =
+        "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0";
+      this.second.requestUrl =
+        "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1";
+    } else {
+      this.first.requestUrl =
+        "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0&userId=" +
+        getCookie("orgCode");
+      this.second.requestUrl =
+        "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&userId=" +
+        getCookie("orgCode");
     }
   },
   methods: {
-    func(res){
-        res.list.forEach(e => {
-            if(e.enable == "未启用"){
-               this.startStop = "停用"
-            }else{
-               this.startStop = "停用"
-            }
-        });
+    func(res) {
+      res.list.forEach(e => {
+        if (e.enable == "未启用") {
+          this.startStop = "停用";
+        } else {
+          this.startStop = "停用";
+        }
+      });
     },
-    getRequestUrl(){
-      if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"){
-        this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0" + "&t=" + new Date()
-        this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1"  + "&t=" + new Date()
-    }else{
-         this.first.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0&userId=" + getCookie("orgCode") + "&t=" + new Date()
-         this.second.requestUrl = "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&userId=" + getCookie("orgCode") + "&t=" + new Date()
-    }
+    getRequestUrl() {
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.first.requestUrl =
+          "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0" +
+          "&t=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1" +
+          "&t=" +
+          new Date();
+      } else {
+        this.first.requestUrl =
+          "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=0&userId=" +
+          getCookie("orgCode") +
+          "&t=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/ams/getPurRequirementList?apiId=431&requirementStatus=1&userId=" +
+          getCookie("orgCode") +
+          "&t=" +
+          new Date();
+      }
     },
     selectionChange(selection) {
       this.first.mapList = selection;
@@ -120,29 +142,29 @@ export default {
       this.$router.push("/addRequirement");
     },
     deleteRequirement(scope) {
-      console.log(scope.row.requirementId)
+      console.log(scope.row.requirementId);
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post(
               "/api/v1/ams/deleteTruckRequirement/" + scope.row.requirementId
             )
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "删除成功!",
+                  message: "删除成功!"
                 });
-                this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "删除失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -150,31 +172,31 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "删除操作已取消!",
+            message: "删除操作已取消!"
           });
         });
     },
-    stopRequirement(scope){
+    stopRequirement(scope) {
       this.$confirm("是否停用", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/ams/changePlanStatus/" + scope.row.planId)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "停用成功!",
+                  message: "停用成功!"
                 });
-              this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "停用失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -182,7 +204,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
     },
@@ -191,23 +213,23 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/ams/downRequirement", this.first.mapList)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "下发成功!",
+                  message: "下发成功!"
                 });
-              this.getRequestUrl()
-              this.activeName = 'second'
+                this.getRequestUrl();
+                this.activeName = "second";
               } else {
                 this.$message({
                   message: "下发失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -215,21 +237,26 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss">
-.steel_inbound{
-  .sache{
-    padding: 1.25rem 0.375rem;
+.steel_inbound {
+  .sache {
+    margin-left: 20px;
+    margin-top: 20px;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
   }
+}
 </style>

+ 4 - 5
src/views/inward/components/truckAppoint/requirement.vue

@@ -15,9 +15,6 @@
       >
         <i class="el-icon-plus"></i>新增
       </el-button>
-      <el-button type="primary" @click="exportData()"
-        ><i class="el-icon-download"></i>导出(Excel)</el-button
-      >
     </div>
     <template>
       <div>
@@ -26,7 +23,7 @@
             <dilTable
               v-bind.sync="first"
               @selection-change="selectionChange"
-              ref="table1"
+              ref="table"
             >
               <el-table-column fixed="right" label="操作" width="120">
                 <template slot-scope="scope">
@@ -42,7 +39,7 @@
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
-            <dilTable v-bind.sync="second" ref="excelDom">
+            <dilTable v-bind.sync="second" ref="table1">
               <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
                   <el-button
@@ -65,6 +62,7 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      tableTitle: "null",
       inputText: "",
       orgCode: "",
       first: {
@@ -104,6 +102,7 @@ export default {
         getCookie("orgCode");
     }
   },
+  mounted() {},
   methods: {
     //查看需求下面的运单
     getRequirementOrder(scope) {

+ 2 - 2
src/views/inward/components/truckOrder/addPurInwardOrder.vue

@@ -250,7 +250,7 @@ export default {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=929059510763524096" +
         "&con=" +
-        "精煤";
+        "铁专线精煤";
       this.line.requestUrl =
         "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3" +
         "&con=" +
@@ -371,7 +371,7 @@ export default {
           this.truck.requestUrl =
             "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=929059510763524096" +
             "&con=" +
-            "精煤";
+            "铁专线精煤";
         } else {
           this.truck.requestUrl =
             "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +

+ 190 - 139
src/views/inward/components/truckOrder/purInwardTruckOrder.vue

@@ -10,60 +10,57 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
     </div>
-    <el-dialog title="车辆信息" :visible.sync="dialogTableVisible" :before-close="handleClose">
-    <dilTable
-          v-bind.sync="truck"
-          @radio-change="currentRadioChange1"
-        ></dilTable>
-    <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogTableVisible = false">取 消</el-button>
-    <el-button type="primary" @click="updateTruckCapacity()">确 定</el-button>
-    </span>
+    <el-dialog
+      title="车辆信息"
+      :visible.sync="dialogTableVisible"
+      :before-close="handleClose"
+    >
+      <dilTable
+        v-bind.sync="truck"
+        @radio-change="currentRadioChange1"
+      ></dilTable>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogTableVisible = false">取 消</el-button>
+        <el-button type="primary" @click="updateTruckCapacity()"
+          >确 定</el-button
+        >
+      </span>
     </el-dialog>
     <div class="transportOrder_bottom">
       <el-tabs v-model="activeName" @tab-click="handleClick">
         <!-- 已下发 -->
         <el-tab-pane label="未接收" name="first">
           <dilTable v-bind.sync="first">
-            <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-               <el-button @click="updateClick(scope)" type="text" size="small">
-                修改
-              </el-button>
-             <el-button @click="deleteClick(scope)" type="text" size="small">
-                删除
-              </el-button>
-            </template>
-          </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button @click="updateClick(scope)" type="text" size="small">
+                  修改
+                </el-button>
+                <el-button @click="deleteClick(scope)" type="text" size="small">
+                  删除
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
         <!-- 已接收 -->
         <el-tab-pane label="已接收" name="Received">
           <dilTable v-bind.sync="Received">
-            <el-table-column
-            fixed="right"
-            label="操作"
-            width="100"
-          >
-            <template slot-scope="scope">
-              <el-button @click="deleteClick(scope)" type="text" size="small">
-                关闭
-              </el-button>
-            </template>
-          </el-table-column>
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button @click="deleteClick(scope)" type="text" size="small">
+                  关闭
+                </el-button>
+              </template>
+            </el-table-column>
           </dilTable>
         </el-tab-pane>
         <!-- 已完成 -->
         <el-tab-pane label="已完成" name="completed">
-          <dilTable v-bind.sync="completed">
-          </dilTable>
+          <dilTable v-bind.sync="completed"> </dilTable>
         </el-tab-pane>
       </el-tabs>
-    </div> 
+    </div>
   </div>
 </template>
 
@@ -82,24 +79,24 @@ export default {
       activeName: "first",
       //已下发的表格
       first: {
-        requestUrl:"",
+        requestUrl: ""
       },
       //车辆信息的表格
       truck: {
-        requestUrl: "" ,
+        requestUrl: "",
         // 控制显示当选列
-        selectionType: "radio",
+        selectionType: "radio"
       },
-      Received:{
-        requestUrl: "",
+      Received: {
+        requestUrl: ""
       },
-      completed:{
-        requestUrl: "",
+      completed: {
+        requestUrl: ""
       },
-       //车辆的表格
+      //车辆的表格
       truck: {
         requestUrl: "",
-        selectionType: "radio",
+        selectionType: "radio"
       },
       //当前选中的订单id
       selectOrderId: null,
@@ -112,127 +109,178 @@ export default {
       //模态框从左往右打开
       direction: "rtl",
 
-      orderId:null,
+      orderId: null,
       //多选的选中的订单id
       selectionList: [],
       //区别点击的是添加运力,还是修改
-      index: null,
+      index: null
     };
   },
-  created(){
-      if (getCookie("orgCode") == "chengyunshang") {
+  created() {
+    if (getCookie("orgCode") == "chengyunshang") {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
         getCookie("userId");
-      } else {
+    } else {
       this.truck.requestUrl =
         "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null;
-      }
-      if(getCookie('orgCode') == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" + getCookie("userId"),
-        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&carrierId=" + getCookie("userId")
-        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" + getCookie("userId")
-      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1"
-        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5"
-        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
-      }else{
-        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1"
-        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5"
-        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
-      }
+    }
+    if (getCookie("orgCode") == "chengyunshang") {
+      (this.first.requestUrl =
+        "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" +
+        getCookie("userId")),
+        (this.Received.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&carrierId=" +
+          getCookie("userId"));
+      this.completed.requestUrl =
+        "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" +
+        getCookie("userId");
+    } else if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.first.requestUrl =
+        "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1";
+      this.Received.requestUrl =
+        "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5";
+      this.completed.requestUrl =
+        "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2";
+    } else {
+      this.first.requestUrl =
+        "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1";
+      this.Received.requestUrl =
+        "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5";
+      this.completed.requestUrl =
+        "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2";
+    }
   },
   methods: {
-    handleClose(done){
-      done()
-      this.$message.info("取消修改运力")
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
     },
-    getRequestUrl(){
-        if(getCookie('orgCode') == "chengyunshang"){
-        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" + this.carrierUserId + "&test=" + new Date() ,
-        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&planEnableStatus=1&carrierId=" + this.carrierUserId + "&test=" + new Date()
-        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" + getCookie("userId")
-      }else if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" + "&test=" + new Date()
-        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" + "&test=" + new Date()
-        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
-      }else{
-        this.first.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" + "&test=" + new Date()
-        this.Received.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" + "&test=" + new Date()
-        this.completed.requestUrl = "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2"
+    getRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        (this.first.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1&carrierId=" +
+          this.carrierUserId +
+          "&test=" +
+          new Date()),
+          (this.Received.requestUrl =
+            "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5&planEnableStatus=1&carrierId=" +
+            this.carrierUserId +
+            "&test=" +
+            new Date());
+        this.completed.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2&carrierId=" +
+          getCookie("userId");
+      } else if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.first.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" +
+          "&test=" +
+          new Date();
+        this.Received.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" +
+          "&test=" +
+          new Date();
+        this.completed.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2";
+      } else {
+        this.first.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=4&planEnableStatus=1" +
+          "&test=" +
+          new Date();
+        this.Received.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=5" +
+          "&test=" +
+          new Date();
+        this.completed.requestUrl =
+          "/api/v1/oms/getPurInwardOrderList?apiId=432&orderStatus=2";
       }
     },
-    getTruckRequestUrl(){
-        if (getCookie("orgCode") == "chengyunshang") {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
-        getCookie("userId") + "&test=" + new Date();
+    getTruckRequestUrl() {
+      if (getCookie("orgCode") == "chengyunshang") {
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          getCookie("userId") +
+          "&test=" +
+          new Date();
       } else {
-      this.truck.requestUrl =
-        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" + null +  "&test=" + new Date();
+        this.truck.requestUrl =
+          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+          null +
+          "&test=" +
+          new Date();
       }
     },
-    currentRadioChange1(row){
-      console.log(row)
-      this.capacityId = row.capacityId
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
     },
-     //删除运输订单
-    deleteClick(scope){
-      this.$confirm('是否删除?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning',
-        }).then(() => {
-            this.axios
+    //删除运输订单
+    deleteClick(scope) {
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.axios
             .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "删除成功!",
-                });     
-                this.getRequestUrl()
+                  message: "删除成功!"
+                });
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "删除失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
-        }).catch(() => {
+        })
+        .catch(() => {
           this.$message({
-            type: 'info',
-            message: '已取消删除'
-          });          
+            type: "info",
+            message: "已取消删除"
+          });
         });
     },
     //修改运输订单
-    updateClick(scope){
-      this.getTruckRequestUrl()
-      this.orderId = scope.row.orderId
-      this.dialogTableVisible = true
-      console.log(scope.row.orderId)
+    updateClick(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
     },
-    updateTruckCapacity(){
-        if(this.capacityId == null){
-            this.$message.error("未选中运力")
-            return
-        }
-        this.axios.post("/api/v1/oms/updateCapacityId",{
-          capacityId:this.capacityId,
-          orderId :this.orderId
-        }).then((res) =>{
-          if(res.data.code == "200"){
-            this.$message.success("修改运力成功")
-            this.getRequestUrl()
-            this.dialogTableVisible = false
-          }else{
-            this.$message.error("修改运力失败")
-          }
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
         })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.getRequestUrl();
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("修改运力失败");
+          }
+        });
     },
     handleClick(tab, event) {
-      this.getRequestUrl()
+      this.getRequestUrl();
     },
     // 查看物资详情
     detailclick(row) {
@@ -263,21 +311,20 @@ export default {
     materialDetails(orderId) {
       this.axios
         .post("/api/v1/uc/getOrderMaterialMesByOrderId/" + orderId)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.tableData = res.data.data;
           }
         });
     },
-    Insert(){
-      this.$router.push("addPurInwardOrder")
+    Insert() {
+      this.$router.push("addPurInwardOrder");
     }
-  },
+  }
 };
 </script>
 
 <style lang="scss">
-
 .transportOrder {
   .transportOrder_top {
     width: 100%;
@@ -285,9 +332,13 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-input{
-  width: 20%;
-}
+    .el-input {
+      width: 20%;
+    }
+  }
+  .transportOrder_bottom {
+    margin-left: 20px;
+    margin-top: 20px;
   }
   .drawer_top {
     width: 100%;
@@ -297,4 +348,4 @@ export default {
     align-items: center;
   }
 }
-</style>
+</style>

+ 3 - 1
src/views/inward/router/index.js

@@ -160,7 +160,8 @@ import inwardPurDetailsOrders from '../components/inwardSettlement/purInwardDeta
 import inwardTimeDetailsOrders from '../components/inwardSettlement/timeDetailsWeight.vue'
 //内转结算--计数计费详单
 import inwardCountDetailsOrders from '../components/inwardSettlement/countDetailOrder.vue'
-
+//内转结算--计时和计重计费详单
+import  inwardWeightTimeDetailsOrder from '../components/inwardSettlement/inwardAllDetailsOrder.vue'
 
 Vue.use(Router)
 
@@ -251,6 +252,7 @@ const constantRouterMap = [{
     {path: 'inwardCountDetailsOrders',name: 'inwardCountDetailsOrders',meta: {code: 'xtpzgl-yhgl'},component: inwardCountDetailsOrders},
     {path: 'inwardTimeDetailsOrders',name: 'inwardTimeDetailsOrders',meta: {code: 'xtpzgl-yhgl'},component: inwardTimeDetailsOrders},
     {path: 'inwardPurDetailsOrders',name: 'inwardPurDetailsOrders',meta: {code: 'xtpzgl-yhgl'},component: inwardPurDetailsOrders},
+    {path: 'inwardWeightTimeDetailsOrder',name: 'inwardWeightTimeDetailsOrder',meta: {code: 'xtpzgl-yhgl'},component: inwardWeightTimeDetailsOrder},
   ]
 }];
 

+ 42 - 47
src/views/sale/components/offSiteTransportation/checkGPS.vue

@@ -15,7 +15,7 @@
       <div class="in_transit_information2">
         <span class="item_details">时间段:</span>
         <el-date-picker
-         style="width:200px"
+          style="width:200px"
           class="date_picker_style"
           v-model="time[0]"
           @change="changeTime"
@@ -31,7 +31,7 @@
           @change="changeTime"
           type="time"
           format="yyyy-MM-dd HH:mm:ss"
-           placeholder="结束日期"
+          placeholder="结束日期"
         >
         </el-date-picker>
         <!-- <el-date-picker
@@ -134,7 +134,7 @@
       <el-button type="primary" @click="slow">慢速</el-button>
       <el-button type="success" @click="middle">中速</el-button>
       <el-button type="danger" @click="fast">快速</el-button>
-      <el-button type="success" @click="addProgress" plain>快进</el-button> 
+      <el-button type="success" @click="addProgress" plain>快进</el-button>
       <el-button type="danger" @click="stop" plain>暂停</el-button>
       <el-button type="success" @click="play" plain>开始</el-button>
     </el-row>
@@ -202,8 +202,8 @@ export default {
           label: "60分钟"
         },
         {
-        value: 36000000,
-        label: "关闭"
+          value: 36000000,
+          label: "关闭"
         }
       ],
       //选择离线时长
@@ -235,8 +235,8 @@ export default {
           label: "60分钟"
         },
         {
-        value: 36000000,
-        label: "关闭"
+          value: 36000000,
+          label: "关闭"
         }
       ],
       //二、 展示相关
@@ -380,38 +380,24 @@ export default {
       return Date.parse(dateStr);
     },
     //校验查询时间
-    changeTime() {
-      let that = this;
-      console.log("that.time")
-      console.log(that.time)
-     
-      if(that.time!=null&&that.time.length==2){
-        if (that.time[1].getTime() - that.time[0].getTime() > 86400000 * 3) {
-          this.$message.error("时间查询范围不能超过3天");
-          that.time = [];
-        }else if(that.time[1].getTime()<that.time[0].getTime()){
-           this.$message.error("开始时间要大于结束时间");
-            that.time = [];
-        }
-      } 
-    },
+    changeTime() {},
     //速度慢
-    slow(){
-          console.log("slow")
-          let that=this;
-          that.pathNavigator.setSpeed(1000);
+    slow() {
+      console.log("slow");
+      let that = this;
+      that.pathNavigator.setSpeed(1000);
     },
     //速度中
-    middle(){
-          console.log("middle")
-        let that=this;
-        that.pathNavigator.setSpeed(10000);
+    middle() {
+      console.log("middle");
+      let that = this;
+      that.pathNavigator.setSpeed(10000);
     },
     //速度快
-    fast(){
-        console.log("fast")
-        let that=this;
-        that.pathNavigator.setSpeed(100000);
+    fast() {
+      console.log("fast");
+      let that = this;
+      that.pathNavigator.setSpeed(100000);
     },
     //启动
     play() {
@@ -454,21 +440,20 @@ export default {
           that.endPointName = result.regeocode.formattedAddress;
           setInterval(
             that.initCustomMarkes(
-              that.carNumber ,
+              that.carNumber,
               "起点:" +
                 that.startPointName +
                 "<br/>" +
                 "终点:" +
-                that.endPointName+
+                that.endPointName +
                 "<br/>" +
                 "距离:" +
-                that.listPath[0].miled
-                ,
+                that.listPath[0].miled,
               lnglatXY[0],
               lnglatXY[1]
-            )
-            , 500);
-          
+            ),
+            500
+          );
         }
       });
     },
@@ -480,11 +465,21 @@ export default {
         this.$message.error("车牌号不能为空!");
         return;
       }
-    
-      if (that.time==null&&that.time.length!=2) {
+      if (that.time == null && that.time.length != 2) {
         this.$message.error("请选择时间");
         return;
       }
+      if (that.time != null && that.time.length == 2) {
+        if (that.time[1].getTime() - that.time[0].getTime() > 86400000 * 3) {
+          this.$message.error("时间查询范围不能超过3天");
+          // that.time = [];
+          return;
+        } else if (that.time[1].getTime() < that.time[0].getTime()) {
+          this.$message.error("开始时间要大于结束时间,请重新选择!");
+          // that.time = [];
+          return;
+        }
+      }
       that.axios
         .post("/api/v1/otms/fullPathVisualizationByCarNumber", {
           capacityNumber: that.carNumber,
@@ -492,9 +487,9 @@ export default {
           endTime: that.formatDate(that.time[1], "yyyy-MM-dd hh:mm:ss")
         })
         .then(res => {
-          if(res.data.data=="-1"){
-             this.$message.error('自提车辆无权查看!');
-          }else if (res.data.data.startAndEndRoutes != "") {
+          if (res.data.data == "-1") {
+            this.$message.error("自提车辆无权查看!");
+          } else if (res.data.data.startAndEndRoutes != "") {
             that.listPath = res.data.data.startAndEndRoutes;
             that.initMap([105.602725, 37.076636]);
           } else {
@@ -510,7 +505,7 @@ export default {
           //设置地图容器id
           viewMode: "2D", //是否为2D地图模式
           zoom: 10, //初始化地图级别
-          center: lonlat, //初始化地图中心点位置
+          center: lonlat //初始化地图中心点位置
         });
         //初始化
         that.initGeocoder();

+ 68 - 70
src/views/statisticalReport/components/defendCapacity/getCapacityByDefend.vue

@@ -19,7 +19,7 @@
       <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="exportExcel"
         ><i class="el-icon-download"></i>导出(Excel)</el-button
       >
       <span style="margin-left: 1rem">合计车数:</span>
@@ -28,15 +28,18 @@
         :disabled="true"
         style="width: 100px"
       ></el-input>
-         <el-input placeholder="请输入车牌号/出厂门岗" v-model="input" style="width: 220px;margin-left: 1rem;" clearable>
+      <el-input
+        placeholder="请输入车牌号/出厂门岗"
+        v-model="input"
+        style="width: 220px;margin-left: 1rem;"
+        clearable
+      >
       </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
-   
-   
-   
+
     <div class="table">
       <mergeRowTable
         ref="excelDom"
@@ -50,6 +53,7 @@
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
 import { getCookie } from "@/utils/util.js";
+import { exportExcelAdvanced } from "@/utils/exportExcelAdvanced.js";
 export default {
   data() {
     return {
@@ -57,43 +61,66 @@ export default {
       totalCapacity: null,
       startTime: null,
       endTime: null,
-
-      input: "",
+      input: null,
       tableTitle: "汽车抽查报表",
       option: {
         // 表格请求数据的地址
-        requestUrl: "api/v1/tms/getCapacityByDefend?apiId=474",
+        requestUrl: "",
         comparison: "orderNumber",
-        columnIndexs: [0, 1, 2,7],
+        columnIndexs: [0, 1, 2, 7]
       },
+      tableData: []
     };
   },
   created() {
-    if (
-      getCookie("orgCode") == "dagangadmin" ||
-      getCookie("orgCode") == "zidonghuabu"
-    ) {
-      this.option.requestUrl =
-        "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=null&endTime=null&i=" +
-        new Date();
-    } else if (getCookie("orgCode") == "baiweibu") {
-      this.option.requestUrl =
-        "/api/v1/tms/getCapacityByDefend?apiId=474&orderType=13&startTime=null&endTime=null&i=" +
-        new Date();
-    } else {
-      this.option.requestUrl =
-        "/api/v1/tms/getCapacityByDefend?apiId=474&userId=" +
-        getCookie("orgCode") +
-        "&startTime=null&endTime=null&i=" +
-        new Date();
-    }
+    this.option.requestUrl =
+      "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=null&endTime=null&i=" +
+      new Date();
   },
   methods: {
+    exportExcel() {
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      } else {
+        this.$message.info("没有选择时间,将默认导出当天时间");
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: "请等待导出",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      this.axios
+        .post(
+          "/api/v1/tms/getCapacityByDefend?apiId=474&yes=yes&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&con=" +
+            this.input
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          console.log(res);
+          console.log(this.tableData);
+          exportExcelAdvanced(
+            this.tableTitle,
+            this.tableColumnData,
+            this.tableData
+          );
+          setTimeout(() => {
+            loading.close();
+          }, 2000);
+        });
+    },
     func(res) {
-      console.log(res);
+      this.tableColumnData = res.columnData;
       var resultNetWeightTotal = 0;
       var currentCapacityTotal = 0;
-      res.list.forEach((e) => {
+      res.list.forEach(e => {
         currentCapacityTotal++;
         resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
       });
@@ -105,26 +132,10 @@ export default {
         "/api/v1/tms/getCapacityByDefend?apiId=474&con=" + this.input;
     },
     getRequestUrl() {
-      if (
-        getCookie("orgCode") == "dagangadmin" ||
-        getCookie("orgCode") == "zidonghuabu"
-      ) {
-        this.option.requestUrl =
-          "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=null&endTime=null&i=" +
-          new Date();
-      } else if (getCookie("orgCode") == "baoweibu") {
-        this.option.requestUrl =
-          "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=null&endTime=null&i=" +
-          new Date();
-      } else {
-        this.option.requestUrl =
-          "/api/v1/tms/getCapacityByDefend?apiId=474&userId=" +
-          getCookie("orgCode") +
-          "&startTime=null&endTime=null&i=" +
-          new Date();
-      }
+      this.option.requestUrl =
+        "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=null&endTime=null&i=" +
+        new Date();
     },
-
     // 添加开始结束时间筛选
     onclickSearch() {
       console.log("aaaa");
@@ -140,26 +151,13 @@ export default {
       }
       if (startTime && endTime) {
         if (startTime < endTime) {
-          if (
-            getCookie("orgCode") == "dagangadmin" ||
-            getCookie("orgCode") == "zidonghuabu"
-          ) {
-            this.option.requestUrl =
-              "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i=" +
-              new Date();
-          } else if (getCookie("orgCode") == "baoweibu") {
-            this.option.requestUrl =
-              "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=" +
-              startTime +
-              "&endTime=" +
-              endTime +
-              "&i=" +
-              new Date();
-          }
+          this.option.requestUrl =
+            "/api/v1/tms/getCapacityByDefend?apiId=474&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&i=" +
+            new Date();
         } else {
           this.startTime = null;
           this.endTime = null;
@@ -168,8 +166,8 @@ export default {
       } else {
         this.getRequestUrl();
       }
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 597 - 0
src/views/statisticalReport/components/inwardReport/allInwardReport.vue

@@ -0,0 +1,597 @@
+<template>
+  <div class="allInwardReport">
+    <div class="top">
+      <el-input v-model="input" placeholder="请输入条件查询"></el-input>
+      <span>净重时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        type="datetime"
+        placeholder="选择日期"
+      >
+      </el-date-picker>
+      <span>至</span>
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
+      </el-date-picker>
+      <el-button type="primary" @click="onClick">查询</el-button>
+      <el-button type="primary" @click="exportSignleReport">单个导出</el-button>
+      <el-button type="primary" @click="exportAllReport">导出全部</el-button>
+    </div>
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <el-tab-pane label="纯内转报表" name="first">
+          <dilTable ref="excelDom" v-bind.sync="first" @func="func"></dilTable>
+        </el-tab-pane>
+        <el-tab-pane label="采购内转报表" name="second">
+          <dilTable ref="excelDom" v-bind.sync="second"></dilTable>
+        </el-tab-pane>
+        <el-tab-pane label="销售内转报表" name="third"
+          ><dilTable ref="excelDom" v-bind.sync="third"></dilTable
+        ></el-tab-pane>
+        <el-tab-pane label="采购燃料报表" name="fourth"
+          ><dilTable ref="excelDom" v-bind.sync="fourth"></dilTable
+        ></el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+<script>
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      //导出excel标题
+      tableTitle: null,
+      //报表所有数据
+      totalArr: [],
+      //纯内转数据
+      inwardArr: [],
+      //采购内转数据
+      purInward: [],
+      //销售内转数据
+      saleReport: [],
+      purReport: [],
+      input: null,
+      activeName: "first",
+      startTime: null,
+      endTime: null,
+      first: {
+        requestUrl: ""
+      },
+      second: {
+        requestUrl: ""
+      },
+      third: {
+        requestUrl: ""
+      },
+      fourth: {
+        requestUrl: ""
+      }
+    };
+  },
+  created() {
+    this.getRequestUrl();
+  },
+  methods: {
+    func(res) {
+      this.dataColumnData = res.columnData;
+    },
+    exportSignleReport() {
+      if (this.startTime && this.endTime) {
+        this.openFullScreen1();
+      } else {
+        this.$confirm(
+          "没有输入时间区间,系统将默认导出今天0点到24点的单个报表数据,是否继续?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        )
+          .then(() => {
+            this.openFullScreen1();
+          })
+          .catch(() => {
+            this.$message.info("取消导出");
+          });
+      }
+    },
+    exportAllReport() {
+      if (this.startTime && this.endTime) {
+        this.openFullScreen();
+      } else {
+        this.$confirm(
+          "没有输入时间区间,系统将默认导出今天0点到24点的全部报表数据,是否继续?",
+          "提示",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }
+        )
+          .then(() => {
+            this.openFullScreen();
+          })
+          .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"
+      ) {
+        orgCode = getCookie("orgCode");
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: "请等待导出",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      if (this.activeName == "first") {
+        this.axios
+          .post(
+            "/api/v1/tms/getInwardInFactory?apiId=486&isPage=yes&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input +
+              "&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);
+          });
+      } else if (this.activeName == "second") {
+        this.axios
+          .post(
+            "/api/v1/tms/getPurchaseInwardList?apiId=486&isPage=yes&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input +
+              "&orgCode=" +
+              orgCode
+          )
+          .then(res => {
+            this.totalArr = [];
+            this.purInward = [];
+            this.tableTitle = "采购内转统计报表";
+            this.purInward = res.data.data;
+            this.totalArr = this.totalArr.concat(this.purInward);
+            this.exportAllReportToExcel();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
+          });
+      } else if (this.activeName == "third") {
+        this.axios
+          .post(
+            "/api/v1/tms/getSaleOrderList?apiId=486&isPage=yes&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input +
+              "&orgCode=" +
+              orgCode
+          )
+          .then(res => {
+            thia.totalArr = [];
+            this.saleReport = [];
+            this.tableTitle = "销售内转统计报表";
+            this.saleReport = res.data.data;
+            this.totalArr = this.totalArr.concat(this.saleReport);
+            this.exportAllReportToExcel();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
+          });
+      } else {
+        this.axios
+          .post(
+            "/api/v1/tms/getPurchaseOrderList?apiId=486&isPage=yes&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input +
+              "&orgCode=" +
+              orgCode
+          )
+          .then(res => {
+            this.totalArr = [];
+            this.purReport = [];
+            this.tableTitle = "采购燃料统计报表";
+            this.purReport = res.data.data;
+            this.totalArr = this.totalArr.concat(this.purReport);
+            this.exportAllReportToExcel();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
+          });
+      }
+    },
+    openFullScreen() {
+      let startTime = null;
+      let endTime = null;
+      this.totalArr = [];
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: "请等待导出",
+        spinner: "el-icon-loading",
+        background: "rgba(0, 0, 0, 0.7)"
+      });
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.axios
+          .post(
+            "/api/v1/tms/getInwardInFactory?apiId=486&orgCode=null&isPage=yes&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input
+          )
+          .then(res => {
+            this.inwardArr = [];
+            this.inwardArr = res.data.data;
+            this.totalArr = this.totalArr.concat(this.inwardArr);
+            this.axios
+              .post(
+                "/api/v1/tms/getPurchaseInwardList?apiId=486&orgCode=null&isPage=yes&startTime=" +
+                  startTime +
+                  "&endTime=" +
+                  endTime +
+                  "&index=" +
+                  this.input +
+                  "&i=" +
+                  new Date()
+              )
+              .then(res => {
+                this.purInward = [];
+                this.purInward = res.data.data;
+                this.totalArr = this.totalArr.concat(this.purInward);
+                this.axios
+                  .post(
+                    "/api/v1/tms/getSaleOrderList?apiId=486&orgCode=null&isPage=yes&startTime=" +
+                      startTime +
+                      "&endTime=" +
+                      endTime +
+                      "&index=" +
+                      this.input +
+                      "&i=" +
+                      new Date()
+                  )
+                  .then(res => {
+                    this.saleReport = [];
+                    this.saleReport = res.data.data;
+                    this.totalArr = this.totalArr.concat(this.saleReport);
+                    this.axios
+                      .post(
+                        "/api/v1/tms/getPurchaseOrderList?apiId=486&orgCode=null&isPage=yes&startTime=" +
+                          startTime +
+                          "&endTime=" +
+                          endTime +
+                          "&index=" +
+                          this.input +
+                          "&i=" +
+                          new Date()
+                      )
+                      .then(res => {
+                        this.purReport = [];
+                        this.purReport = res.data.data;
+                        this.totalArr = this.totalArr.concat(this.purReport);
+                        this.tableTitle = "全部内转车辆报表";
+                        this.exportAllReportToExcel();
+                        setTimeout(() => {
+                          loading.close();
+                        }, 2000);
+                      });
+                  });
+              });
+          });
+      } else {
+        this.axios
+          .post(
+            "/api/v1/tms/getInwardInFactory?apiId=486&isPage=yes&orgCode=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input
+          )
+          .then(res => {
+            this.inwardArr = [];
+            this.inwardArr = res.data.data;
+            this.totalArr = this.totalArr.concat(this.inwardArr);
+          });
+        this.axios
+          .post(
+            "/api/v1/tms/getPurchaseInwardList?apiId=486&isPage=yes&orgCode=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input
+          )
+          .then(res => {
+            this.purInward = [];
+            this.purInward = res.data.data;
+            this.totalArr = this.totalArr.concat(this.purInward);
+          });
+        this.axios
+          .post(
+            "/api/v1/tms/getSaleOrderList?apiId=486&isPage=yes&orgCode=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input
+          )
+          .then(res => {
+            this.saleReport = [];
+            this.saleReport = res.data.data;
+            this.totalArr = this.totalArr.concat(this.saleReport);
+          });
+        this.axios
+          .post(
+            "/api/v1/tms/getPurchaseOrderList?apiId=486&isPage=yes&orgCode=" +
+              getCookie("orgCode") +
+              "&startTime=" +
+              startTime +
+              "&endTime=" +
+              endTime +
+              "&index=" +
+              this.input
+          )
+          .then(res => {
+            this.purReport = [];
+            this.purReport = res.data.data;
+            this.totalArr = this.totalArr.concat(this.purReport);
+            this.exportAllReportToExcel();
+            setTimeout(() => {
+              loading.close();
+            }, 2000);
+          });
+      }
+    },
+    //导出excel
+    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)导出的表格名称
+      });
+    },
+    getRequestUrl() {
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.first.requestUrl =
+          "/api/v1/tms/getInwardInFactory?apiId=486&orgCode=" +
+          null +
+          "&i=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/tms/getPurchaseInwardList?apiId=486&orgCode=" +
+          null +
+          "&i=" +
+          new Date();
+        this.third.requestUrl =
+          "/api/v1/tms/getSaleOrderList?apiId=486&orgCode=" +
+          null +
+          "&i=" +
+          new Date();
+        this.fourth.requestUrl =
+          "/api/v1/tms/getPurchaseOrderList?apiId=486&orgCode=" +
+          null +
+          "&i=" +
+          new Date();
+      } else {
+        this.first.requestUrl =
+          "/api/v1/tms/getInwardInFactory?apiId=486&orgCode=" +
+          getCookie("orgCode") +
+          "&i=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/tms/getPurchaseInwardList?apiId=486&orgCode=" +
+          getCookie("orgCode") +
+          "&i=" +
+          new Date();
+        this.third.requestUrl =
+          "/api/v1/tms/getSaleOrderList?apiId=486&orgCode=" +
+          getCookie("orgCode") +
+          "&i=" +
+          new Date();
+        this.fourth.requestUrl =
+          "/api/v1/tms/getPurchaseOrderList?apiId=486&orgCode=" +
+          getCookie("orgCode") +
+          "&i=" +
+          new Date();
+      }
+    },
+    onClick() {
+      console.log("index", this.input);
+      let startTime = null;
+      let endTime = null;
+      if (this.startTime && this.endTime) {
+        startTime = sjTime(this.startTime);
+        endTime = sjTime(this.endTime);
+      }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        console.log("jl");
+        if (this.activeName == "first") {
+          this.first.requestUrl =
+            "/api/v1/tms/getInwardInFactory?apiId=486&orgCode=" +
+            null +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&index=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else if (this.activeName == "second") {
+          this.second.requestUrl =
+            "/api/v1/tms/getPurchaseInwardList?apiId=486&orgCode=" +
+            null +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&index=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else if (this.activeName == "third") {
+          this.third.requestUrl =
+            "/api/v1/tms/getSaleOrderList?apiId=486&orgCode=" +
+            null +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&index=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else {
+          this.fourth.requestUrl =
+            "/api/v1/tms/getPurchaseOrderList?apiId=486&orgCode=" +
+            null +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&index=" +
+            this.input +
+            "&i=" +
+            new Date();
+        }
+      } else {
+        if (this.activeName == "first") {
+          this.first.requestUrl =
+            "/api/v1/tms/getInwardInFactory?apiId=486&orgCode=" +
+            getCookie("orgCode") +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&index=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else if (this.activeName == "second") {
+          this.second.requestUrl =
+            "/api/v1/tms/getPurchaseInwardList?apiId=486&orgCode=" +
+            getCookie("orgCode") +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&index=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else if (this.activeName == "third") {
+          this.third.requestUrl =
+            "/api/v1/tms/getSaleOrderList?apiId=486&orgCode=" +
+            getCookie("orgCode") +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&index=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else {
+          this.fourth.requestUrl =
+            "/api/v1/tms/getPurchaseOrderList?apiId=486&orgCode=" +
+            getCookie("orgCode") +
+            "&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&index=" +
+            this.input +
+            "&i=" +
+            new Date();
+        }
+      }
+    },
+    handleClick(tab, event) {
+      this.getRequestUrl();
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.allInwardReport {
+  .top {
+    margin-left: 20px;
+    margin-top: 20px;
+    .el-input {
+      width: 250px;
+    }
+  }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+}
+</style>

+ 58 - 31
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelNewMonitor.vue

@@ -2,6 +2,7 @@
 <template>
   <div class="purchasFuelNewMonitor">
     <div class="frameCalculation">
+        <el-input v-model="input" style="width:210px;display:flex;margin-right:90px;" placeholder="请输入条件查询"></el-input>
       <span>计毛时间:</span>
       <el-date-picker
         v-model="startTime"
@@ -10,23 +11,30 @@
       >
       </el-date-picker>
       <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
+
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>刷新
       </el-button>
-      <span style="margin-left: 1rem;">合计净重:</span>
-      <el-input v-model="totalNumber" :disabled="true" style="width: 150px;"></el-input>
-      <span style="margin-left: 1rem;">合计车数:</span>
-      <el-input v-model="totalCapacity" :disabled="true" style="width: 150px;"></el-input>
+      <span style="margin-left: 1rem">合计净重:</span>
+      <el-input
+        v-model="totalNumber"
+        :disabled="true"
+        style="width: 150px"
+      ></el-input>
+      <span style="margin-left: 1rem">合计车数:</span>
+      <el-input
+        v-model="totalCapacity"
+        :disabled="true"
+        style="width: 150px"
+      ></el-input>
     </div>
     <div class="table">
       <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
@@ -35,12 +43,15 @@
 </template>
 
 <script>
-import { sjTime } from '@/utils/sharedJsFile'
+import { sjTime } from "@/utils/sharedJsFile";
 export default {
   data() {
     return {
+      input: "",
       option: {
-        requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=null&endTime=null&i=" +new Date(),
+        requestUrl:
+          "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=null&endTime=null&i=" +
+          new Date(),
       },
       startTime: null,
       endTime: null,
@@ -48,20 +59,20 @@ export default {
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
-      tableTitle:'采购燃料新区统计报表'
+      tableTitle: "采购燃料新区统计报表",
     };
   },
   methods: {
-    refresh(){
+    refresh() {
       this.$router.go(0);
     },
-    func(res){
-      console.log(res)
-      var resultNetWeightTotal = 0
-      res.list.forEach(e => {
-        resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
+    func(res) {
+      console.log(res);
+      var resultNetWeightTotal = 0;
+      res.list.forEach((e) => {
+        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
       });
-      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t"
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + " t";
       this.totalCapacity = res.total;
       //获取总记录条数作为合计车数
       // this.totalCapacity = res.total;
@@ -70,22 +81,38 @@ export default {
     onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.startTime){
+      if (this.startTime) {
         startTime = sjTime(this.startTime);
       }
-      if(this.endTime){
+      if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if(startTime && endTime){
-        if(startTime < endTime){
-          this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-        }else{
+      if (startTime && endTime) {
+        if (startTime < endTime) {
+          this.option.requestUrl =
+            "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=" +
+            startTime +
+            "&endTime=" +
+            endTime +
+            "&con=" +
+            this.input +
+            "&i=" +
+            new Date();
+        } else {
           this.startTime = null;
           this.endTime = null;
-          this.$message.warning('开始时间要比结束时间早')
+          this.$message.warning("开始时间要比结束时间早");
         }
-      }else{
-        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getRLFLReport?apiId=382&orderType=7&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&con=" +
+          this.input +
+          "&i=" +
+          new Date();
       }
     },
   },
@@ -99,8 +126,8 @@ export default {
     height: 100px;
     display: flex;
     align-items: center;
-    padding-left: 50px;
-    .el-date-editor{
+    padding-left: 100px;
+    .el-date-editor {
       margin: 20px;
     }
   }

+ 4 - 2
src/views/statisticalReport/components/purchasFuelMonitor/purchasFuelOldMonitor.vue

@@ -2,6 +2,7 @@
 <template>
   <div class="purchasFuelOldMonitor">
     <div class="frameCalculation">
+      <el-input v-model="input" style="width:210px;display:flex;margin-right:90px;" placeholder="请输入条件查询"></el-input>
       <span>计毛时间:</span>
       <el-date-picker
         v-model="startTime"
@@ -39,6 +40,7 @@ import { sjTime } from '@/utils/sharedJsFile'
 export default {
   data() {
     return {
+      input:"",
       option: {
         requestUrl: "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=null&endTime=null&i=" +new Date(),
       },
@@ -78,14 +80,14 @@ export default {
       }
       if(startTime && endTime){
         if(startTime < endTime){
-          this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+          this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=" + startTime + "&endTime=" + endTime + "&con=" + this.input+ "&i=" +new Date();
         }else{
           this.startTime = null;
           this.endTime = null;
           this.$message.warning('开始时间要比结束时间早')
         }
       }else{
-        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
+        this.option.requestUrl = "/api/v1/tms/getRLFLReport?apiId=382&orderType=6&startTime=" + startTime + "&endTime=" +  "&con=" + this.input + endTime + "&i=" +new Date();
       }
     },
   },

+ 100 - 57
src/views/statisticalReport/components/sporadicReport/sporadicReportEnterFactory.vue

@@ -2,11 +2,21 @@
   <div class="purchasFuelNewMonitor">
     <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="选择日期">
       </el-date-picker>
+      <el-input
+        v-model="input"
+        placeholder="请输入发货单位或物资或车牌号"
+        style="width:250px"
+        clearable
+      ></el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
@@ -14,9 +24,17 @@
         ><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
+        v-model="totalCapacity"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
     </div>
     <div class="table">
       <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
@@ -26,20 +44,21 @@
 
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
-import { getCookie } from '@/utils/util.js';
+import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      totalNumber:null,
-      totalCapacity:null,
+      input: null,
+      totalNumber: null,
+      totalCapacity: null,
       option: {
-        requestUrl:'',
+        requestUrl: ""
       },
       startTime: null,
       endTime: null,
-      tableTitle: "零星进厂统计报表",
+      tableTitle: "零星进厂统计报表"
     };
-  },   
+  },
   created() {
     if (
       getCookie("orgCode") == "dagangadmin" ||
@@ -52,7 +71,7 @@ export default {
       this.option.requestUrl =
         "/api/v1/tms/getSporadicSuppliesReport1?apiId=425&orderType=12&startTime=null&endTime=null&i=" +
         new Date();
-    }else {
+    } else {
       this.option.requestUrl =
         "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
         getCookie("orgCode") +
@@ -61,36 +80,36 @@ export default {
     }
   },
   methods: {
-     func(res){
-        console.log(res)
-        var resultNetWeightTotal = 0
-        var currentCapacityTotal = 0
-        res.list.forEach(e => {
-          currentCapacityTotal++
-          resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
-        });
-        this.totalNumber = resultNetWeightTotal.toFixed(2) + "t"
-        this.totalCapacity = currentCapacityTotal;
+    func(res) {
+      console.log(res);
+      var resultNetWeightTotal = 0;
+      var currentCapacityTotal = 0;
+      res.list.forEach(e => {
+        currentCapacityTotal++;
+        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
+      });
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + "t";
+      this.totalCapacity = currentCapacityTotal;
     },
-    getRequestUrl(){
-        if (
-      getCookie("orgCode") == "dagangadmin" ||
-      getCookie("orgCode") == "zidonghuabu"
-    ) {
-      this.option.requestUrl =
-        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=null&endTime=null&i=" +
-        new Date();
-    } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
-      this.option.requestUrl =
-        "/api/v1/tms/getSporadicSuppliesReport1?apiId=425&orderType=12&startTime=null&endTime=null&i=" +
-        new Date();
-    }else {
-      this.option.requestUrl =
-        "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
-        getCookie("orgCode") +
-        "&startTime=null&endTime=null&i=" +
-        new Date();
-    }
+    getRequestUrl() {
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=null&endTime=null&i=" +
+          new Date();
+      } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=425&orderType=12&startTime=null&endTime=null&i=" +
+          new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
+          getCookie("orgCode") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
+      }
     },
     onclick() {
       let startTime = null;
@@ -101,25 +120,49 @@ export default {
       if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if (startTime && endTime) {
-        if (startTime < endTime) {
-          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-          }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
-          }else{
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=' + getCookie("orgCode") +"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
-          }
-        } else {
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning("开始时间要比结束时间早");
-        }
+      if (!this.input && (!startTime || !endTime)) {
+        this.$message.warning("请输入查询条件");
+        return;
+      }
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&con=" +
+          this.input +
+          "&i=" +
+          new Date();
+        console.log(this.option.requestUrl);
+      } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&orderType=13&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&con=" +
+          this.input +
+          "&i=" +
+          new Date();
       } else {
-        this.getRequestUrl()
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport1?apiId=424&userId=" +
+          getCookie("orgCode") +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&con=" +
+          this.input +
+          "&i=" +
+          new Date();
       }
-    },
-  },
+    }
+  }
 };
 </script>
 
@@ -136,4 +179,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 120 - 63
src/views/statisticalReport/components/sporadicReport/sporadicReportExFactory.vue

@@ -9,20 +9,32 @@
       >
       </el-date-picker>
       <span>至</span>
-      <el-date-picker
-        v-model="endTime"
-        type="datetime"
-        placeholder="选择日期"
-      >
+      <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
       </el-date-picker>
+      <el-input
+        v-model="input"
+        placeholder="请输入收货单位或物资或车牌号"
+        style="width:250px"
+        clearable
+      ></el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" @click="exportData()"
+        ><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
+        v-model="totalCapacity"
+        :disabled="true"
+        style="width: 100px;"
+      ></el-input>
     </div>
     <div class="table">
       <dilTable ref="excelDom" v-bind.sync="option" @func="func"></dilTable>
@@ -31,80 +43,125 @@
 </template>
 
 <script>
-import { sjTime } from '@/utils/sharedJsFile';
-import { getCookie } from '@/utils/util.js';
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
-      totalNumber:null,
-      totalCapacity:null,
+      input: null,
+      totalNumber: null,
+      totalCapacity: null,
       option: {
-        requestUrl: "",
+        requestUrl: ""
       },
       startTime: null,
       endTime: null,
-      tableTitle:'零星出厂统计报表'
+      tableTitle: "零星出厂统计报表"
     };
-  }, 
-  created(){
-      if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=' +new Date();
-      }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=null&endTime=null&i=" +new Date();
-      }else{
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("orgCode")+"&startTime=null&endTime=null&i=" +new Date();
-      }
+  },
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=" +
+        new Date();
+    } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=null&endTime=null&i=" +
+        new Date();
+    } else {
+      this.option.requestUrl =
+        "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=" +
+        getCookie("orgCode") +
+        "&startTime=null&endTime=null&i=" +
+        new Date();
+    }
   },
   methods: {
-    func(res){
-        console.log(res)
-        var resultNetWeightTotal = 0
-        var currentCapacityTotal = 0
-        res.list.forEach(e => {
-          currentCapacityTotal++
-          resultNetWeightTotal = resultNetWeightTotal+e.resultNetWeight
-        });
-        this.totalNumber = resultNetWeightTotal.toFixed(2) + "t"
-        this.totalCapacity = currentCapacityTotal;
+    func(res) {
+      console.log(res);
+      var resultNetWeightTotal = 0;
+      var currentCapacityTotal = 0;
+      res.list.forEach(e => {
+        currentCapacityTotal++;
+        resultNetWeightTotal = resultNetWeightTotal + e.resultNetWeight;
+      });
+      this.totalNumber = resultNetWeightTotal.toFixed(2) + "t";
+      this.totalCapacity = currentCapacityTotal;
     },
-    getRequestUrl(){
-        if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=' +new Date();
-      }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=null&endTime=null&i=" +new Date();
-      }else{
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("orgCode")+"&startTime=null&endTime=null&i=" +new Date();
+    getRequestUrl() {
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=null&endTime=null&i=" +
+          new Date();
+      } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=null&endTime=null&i=" +
+          new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=" +
+          getCookie("orgCode") +
+          "&startTime=null&endTime=null&i=" +
+          new Date();
       }
     },
     onclick() {
       let startTime = null;
       let endTime = null;
-      if(this.startTime){
+      if (this.startTime) {
         startTime = sjTime(this.startTime);
       }
-      if(this.endTime){
+      if (this.endTime) {
         endTime = sjTime(this.endTime);
       }
-      if(startTime && endTime){
-        if(startTime < endTime){
-          if(getCookie("orgCode") == "dagangadmin" || getCookie("orgCode") == "zidonghuabu"){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date();
-          }else if(getCookie("orgCode") == "wuliuchuyunzhongxin"){
-          this.option.requestUrl = "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
-          }else{
-          this.option.requestUrl = '/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=' + getCookie("orgCode")+"&startTime=" + startTime + "&endTime=" + endTime + "&i=" +new Date(); 
-          }
-        }else{
-          this.startTime = null;
-          this.endTime = null;
-          this.$message.warning('开始时间要比结束时间早')
-        }
-      }else{
-        console.log(startTime && endTime)
-        this.getRequestUrl()
+      if (!this.input && (!startTime || !endTime)) {
+        this.$message.warning("请输入查询条件");
+        return;
       }
-    },
-  },
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&con=" +
+          this.input +
+          "&i=" +
+          new Date();
+      } else if (getCookie("orgCode") == "wuliuchuyunzhongxin") {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&orderType=13&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&con=" +
+          this.input +
+          "&i=" +
+          new Date();
+      } else {
+        this.option.requestUrl =
+          "/api/v1/tms/getSporadicSuppliesReport2?apiId=425&userId=" +
+          getCookie("orgCode") +
+          "&startTime=" +
+          startTime +
+          "&endTime=" +
+          endTime +
+          "&con=" +
+          this.input +
+          "&i=" +
+          new Date();
+      }
+    }
+  }
 };
 </script>
 
@@ -116,9 +173,9 @@ export default {
     display: flex;
     align-items: center;
     padding-left: 50px;
-    .el-date-editor{
+    .el-date-editor {
       margin: 20px;
     }
   }
 }
-</style>
+</style>

+ 3 - 1
src/views/statisticalReport/router/index.js

@@ -28,6 +28,7 @@ import getInstall from '../components/inwardReport/getInstall.vue'
 import getCapacityByDefend from '../components/defendCapacity/getCapacityByDefend.vue'
 import inwardAssemble from '../components/inwardAssemble/inwardAssemble.vue'
 import loadCapacityDetail from '../components/loadCapacityDetail/loadCapacityDetail.vue'
+import allInwardReport from '../components/inwardReport/allInwardReport.vue'
 Vue.use(Router)
 
 const constantRouterMap = [
@@ -59,7 +60,8 @@ const constantRouterMap = [
       {path: 'getInstall', name: 'getInstall', meta: {code: 'xtpzgl-yhgl'}, component: getInstall},
       {path: 'getCapacityByDefend', name: 'getCapacityByDefend', meta: {code: 'xtpzgl-yhgl'}, component: getCapacityByDefend},
       {path: 'inwardAssemble', name: 'inwardAssemble', meta: {code: 'xtpzgl-yhgl'}, component: inwardAssemble},
-      {path: 'loadCapacityDetail', name: 'loadCapacityDetail', meta: {code: 'xtpzgl-yhgl'}, component: loadCapacityDetail}
+      {path: 'loadCapacityDetail', name: 'loadCapacityDetail', meta: {code: 'xtpzgl-yhgl'}, component: loadCapacityDetail},
+      {path: 'allInwardReport', name: 'allInwardReport', meta: {code: 'xtpzgl-yhgl'}, component: allInwardReport},
     ]
   }
 ];