luobang hace 3 años
padre
commit
d656f535ce
Se han modificado 29 ficheros con 2075 adiciones y 1038 borrados
  1. 1 0
      build/utils.js
  2. 2 1
      config/index.js
  3. BIN
      dist.zip
  4. 3 1
      src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.js
  5. 0 5
      src/components/DilCommonUI/packages/table/src/table.js
  6. 0 2
      src/components/DilCommonUI/packages/table/src/table.vue
  7. 39 0
      src/components/exportAllExcel/exportAllExcel.js
  8. 6 3
      src/components/exportExcel/exportExcel.js
  9. 6 12
      src/views/RMS/components/addMaterial.vue
  10. 17 11
      src/views/RMS/components/editMaterial.vue
  11. 95 87
      src/views/TMS/components/importedFuel/transportReserveRan.vue
  12. 49 42
      src/views/TMS/components/importedFuel/transportReserveRanAdd.vue
  13. 37 30
      src/views/appoint/components/saleContract/saleCokeInward.vue
  14. 42 97
      src/views/appoint/components/saleContract/saleOrder.vue
  15. 43 2
      src/views/appoint/components/saleContract/saleOrderCoproduct.vue
  16. 122 71
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  17. 51 93
      src/views/appoint/components/saleContract/saleOrderSteelCar.vue
  18. 25 18
      src/views/appoint/components/saleContract/saleOrderSteelCarrier.vue
  19. 44 8
      src/views/appoint/components/saleContract/updateSaleOrderSteel.vue
  20. 3 0
      src/views/inward/app.js
  21. 198 106
      src/views/inward/components/inwardSettlement/detailOrder.vue
  22. 181 103
      src/views/inward/components/inwardSettlement/purInwardDetailsOrder.vue
  23. 181 104
      src/views/inward/components/inwardSettlement/timeDetailsWeight.vue
  24. 120 93
      src/views/inward/components/truckAppoint/purInwardRequirement.vue
  25. 6 7
      src/views/inward/components/truckAppoint/requirement.vue
  26. 2 2
      src/views/inward/components/truckOrder/addPurInwardOrder.vue
  27. 190 139
      src/views/inward/components/truckOrder/purInwardTruckOrder.vue
  28. 609 0
      src/views/statisticalReport/components/inwardReport/allInwardReport.vue
  29. 3 1
      src/views/statisticalReport/router/index.js

+ 1 - 0
build/utils.js

@@ -18,6 +18,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // let devModules = ['index','inward']
 // let devModules = ['index','appoint','sale','statisticalReport']
 // let devModules = ['index','sale']
+// let devModules = ['index','appoint','TMS','statisticalReport']
 let devModules = ['all']
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;

+ 2 - 1
config/index.js

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

BIN
dist.zip


+ 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) {
       //每次调用方法初始化

+ 0 - 5
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) {
@@ -125,8 +124,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 +164,6 @@ export default {
     },
     // 更新请求参数
     setDataRequestQuery(value) {
-      console.log(value);
       let q = this.dataRequestQuery;
       for (const key in value) {
         q[key] = value[key];
@@ -255,7 +251,6 @@ export default {
     },
     // pageSize 改变时会触发
     sizeChange(val) {
-      console.log(val);
       this.dataPageSize = val;
       this.requestData({});
       this.$emit("update:size-change", val);

+ 0 - 2
src/components/DilCommonUI/packages/table/src/table.vue

@@ -255,8 +255,6 @@ export default {
       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

+ 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>

+ 49 - 42
src/views/TMS/components/importedFuel/transportReserveRanAdd.vue

@@ -141,7 +141,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>
@@ -187,8 +187,6 @@
         <dilTable
           v-bind.sync="third"
           @selection-change="currentRadioChange3"
-          :isKuang="isKuang"
-          @func="func"
           :isHeigth="isHeigth2"
           :shiyHeigth="shiyHeigth2"
           :drawer="drawer"
@@ -281,12 +279,12 @@ export default {
       orderTypeList: [
         {
           value: 6,
-          label: "一厂",
+          label: "一厂"
         },
         {
           value: 7,
-          label: "二厂",
-        },
+          label: "二厂"
+        }
       ],
       // 线路名称
       lineName: "",
@@ -301,18 +299,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 +345,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 +381,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 +402,7 @@ export default {
     }
   },
   methods: {
-    onClick(index) {
+    onClick1(index) {
       this.selectionList.splice(index, 1);
     },
     onchange() {
@@ -418,7 +425,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 +439,7 @@ export default {
         });
     },
     createFilterSupplier(queryString) {
-      return (restaurantsSupplier) => {
+      return restaurantsSupplier => {
         return (
           restaurantsSupplier.value
             .toLowerCase()
@@ -444,20 +451,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;
@@ -566,7 +573,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();
         }
       }
     },
@@ -687,43 +694,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 +738,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 +750,14 @@ export default {
               } else {
                 this.$message({
                   message: "重量只能是整数!",
-                  type: "warning",
+                  type: "warning"
                 });
                 return;
               }
             } else {
               this.$message({
                 message: "重量只能是数字!",
-                type: "warning",
+                type: "warning"
               });
               return;
             }
@@ -767,20 +774,20 @@ export default {
         driverCapacityIdList: this.selectionList,
         orderType: this.orderType,
         lineId: this.lineId,
-        isMoreTrips: this.isMoreTrips,
+        isMoreTrips: this.isMoreTrips
       };
 
-      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">
@@ -943,4 +950,4 @@ export default {
   width: 100%;
   height: 100px;
 }
-</style>
+</style>

+ 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>

+ 44 - 8
src/views/appoint/components/saleContract/updateSaleOrderSteel.vue

@@ -145,11 +145,6 @@
                       disabled
                     >
                     </el-input>
-                    <el-button
-                      type="primary"
-                      @click="changeMaterial(scope.$index)"
-                      >更改</el-button
-                    >
                   </template>
                   <!-- 物资件数 -->
                   <template v-if="item.prop == 'orderPlanWeight'">
@@ -302,11 +297,53 @@ export default {
     updateAddress(scope) {},
     cancelUpdateMaterial() {
       this.dialogTableVisible = false;
-      this.getOrderList();
     },
     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.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 => {
+          console.log(res);
+        });
     },
     makeSureMaterial() {
       //记录是理重还是磅重
@@ -428,7 +465,6 @@ export default {
       });
       this.getSpanArr1(this.materialList);
       this.title = "处理" + "-" + this.capacityNumber + "-" + "异常物资信息";
-      this.getOrderList();
       this.dialogTableVisible = true;
     },
     getOrderList() {

+ 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'

+ 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>

+ 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>

+ 6 - 7
src/views/inward/components/truckAppoint/requirement.vue

@@ -13,11 +13,8 @@
         @click="toInsert2"
         v-if="activeName == 'first'"
       >
-        <i class="el-icon-plus"></i>新增
-      </el-button>
-      <el-button type="primary" @click="exportData()"
-        ><i class="el-icon-download"></i>导出(Excel)</el-button
-      >
+        <i class="el-icon-plus"></i>新增 </el-button
+      >w
     </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=" +
@@ -370,7 +370,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>

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

@@ -0,0 +1,609 @@
+<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 {
+      //报表所有数据
+      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.openFullScreen();
+          })
+          .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;
+      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 = 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 = 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 = 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 = res.data.data;
+                        this.totalArr = this.totalArr.concat(this.purReport);
+                        this.exportAllReportToExcel();
+                        loading.close();
+                      });
+                  });
+              });
+          });
+      } 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 = 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 = 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 = 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 = res.data.data;
+            this.totalArr = this.totalArr.concat(this.purReport);
+            this.exportAllReportToExcel();
+            loading.close();
+          });
+      }
+    },
+    openFullScreen() {
+      let startTime = null;
+      let endTime = null;
+      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 = 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 = 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 = 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 = res.data.data;
+                        this.totalArr = this.totalArr.concat(this.purReport);
+                        this.exportAllReportToExcel();
+                        loading.close();
+                      });
+                  });
+              });
+          });
+      } 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 = 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 = 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 = 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 = res.data.data;
+            this.totalArr = this.totalArr.concat(this.purReport);
+            this.exportAllReportToExcel();
+            loading.close();
+          });
+      }
+    },
+    //导出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>

+ 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},
     ]
   }
 ];