luobang 3 rokov pred
rodič
commit
1f4f6b6217

+ 2 - 2
build/utils.js

@@ -18,8 +18,8 @@ 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','statisticalReport','inward']
-let devModules = ['all']
+let devModules = ['index','appoint','sale','statisticalReport']
+// let devModules = ['all']
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

+ 1 - 1
config/index.js

@@ -66,7 +66,7 @@ let proxyTable = {
   "/api/v1": {
       target: "http://172.16.33.166:8080",
     //  target: "http://localhost:8080",
-    // target: "http://192.168.1.106:8080",
+    // target: "http://192.168.1.102:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 14 - 2
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -1329,7 +1329,9 @@ export default {
         //判断物资是否为盘螺或非定尺
         if (
           this.selectedMaterialName.includes("盘螺") ||
-          this.selectedMaterialName.includes("乱尺")
+          this.selectedMaterialName.includes("乱尺") ||
+          this.selectedMaterialName.includes("盘元") ||
+          this.selectedMaterialName.includes("盘圆")
         ) {
           getisPound = 0;
         } else {
@@ -1356,7 +1358,17 @@ export default {
           this.selectionList[this.indexChangeMaterial].haveMeter = 0;
           this.selectionList[this.indexChangeMaterial].meterNumber = null;
         } else {
-          this.selectionList[this.indexChangeMaterial].haveMeter = 1;
+          if (this.selectedMaterialName.includes("米")) {
+            this.selectionList[this.indexChangeMaterial].haveMeter = 1;
+            this.selectionList[this.indexChangeMaterial].isDisable = 1;
+            this.selectionList[this.indexChangeMaterial].meterNumber = Number(
+              this.selectedMaterialName.replace(/[^0-9]/gi, "")
+            );
+          } else {
+            this.selectionList[this.indexChangeMaterial].haveMeter = 1;
+            this.selectionList[this.indexChangeMaterial].isDisable = 0;
+            this.selectionList[this.indexChangeMaterial].meterNumber = null;
+          }
         }
         //重新初始化
         this.indexChangeMaterial = null;

+ 36 - 9
src/views/appoint/components/saleContract/saleOrderCoproduct.vue

@@ -46,6 +46,9 @@
             </el-table-column>
           </mergeRowTable>
         </el-tab-pane>
+        <el-tab-pane label="已关闭" name="first">
+          <mergeRowTable v-bind.sync="option" ref="table"> </mergeRowTable>
+        </el-tab-pane>
       </el-tabs>
     </div>
     <!-- 承运商模态框 -->
@@ -98,11 +101,19 @@ export default {
       carrierName: null,
       option4: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/ams/getFuSaleOrderList?apiId=481",
+        requestUrl:
+          "/api/v1/ams/getFuSaleOrderList?apiId=481" + "&deleted=" + Number(0),
         selectionType: "select",
         comparison: "saleNumber",
         columnIndexs: [0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15]
       },
+      option: {
+        // 表格请求数据的地址
+        requestUrl:
+          "/api/v1/ams/getFuSaleOrderList?apiId=481&deleted=" + Number(2),
+        comparison: "saleNumber",
+        columnIndexs: [0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15]
+      },
       carrier: {
         requestUrl: "",
         selectionType: "radio"
@@ -132,7 +143,7 @@ export default {
               .then(res => {
                 if (res.data.code == 200) {
                   this.$message.success("关闭成功");
-                  this.option4.requestUrl = "/api/v1/ams/getFuSaleOrderList?apiId=481&i" + new Date()
+                  this.refresh();
                 }
               });
           } else {
@@ -152,13 +163,31 @@ export default {
     },
     refresh() {
       this.option4.requestUrl =
-        "/api/v1/ams/getFuSaleOrderList?apiId=481&i=" + new Date();
+        "/api/v1/ams/getFuSaleOrderList?apiId=481&i=" +
+        new Date() +
+        "&deleted=" +
+        Number(0);
+      this.option.requestUrl =
+        "/api/v1/ams/getFuSaleOrderList?apiId=481&i=" +
+        new Date() +
+        "&deleted=" +
+        Number(2);
     },
     handleClick(tab, event) {},
     onclick() {
-      this.option4.requestUrl =
-        "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
-        this.input;
+      if (this.activeName == "four") {
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
+          this.input +
+          "&deleted=" +
+          Number(0);
+      } else {
+        this.option.requestUrl =
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
+          this.input +
+          "&deleted=" +
+          Number(2);
+      }
     },
     //模糊查询承运商
     onclickCarrier() {
@@ -218,9 +247,7 @@ export default {
             .then(res => {
               if (res.data.code == "0") {
                 this.$message({ type: "success", message: "授权成功!" });
-                this.option4.requestUrl =
-                  "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&i=" +
-                  new Date();
+                this.refresh();
               }
             });
         })

+ 60 - 131
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -77,12 +77,6 @@
                   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"
@@ -93,6 +87,25 @@
             </el-table-column>
           </mergeRowTable>
         </el-tab-pane>
+        <el-tab-pane label="反审批" name="five">
+          <mergeRowTable v-bind.sync="option5" ref="table2">
+            <el-table-column
+              fixed="right"
+              label="操作"
+              align="center"
+              width="200"
+            >
+              <template slot-scope="scope">
+                <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>
@@ -154,6 +167,31 @@ export default {
           21
         ]
       },
+      option5: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/ams/getSteelOrderDeletedList?apiId=409",
+        comparison: "saleNumber",
+        columnIndexs: [
+          0,
+          1,
+          2,
+          3,
+          7,
+          8,
+          9,
+          10,
+          11,
+          12,
+          13,
+          14,
+          15,
+          16,
+          17,
+          18,
+          20,
+          21
+        ]
+      },
       mapList: [],
       mapItemList: []
     };
@@ -169,6 +207,9 @@ export default {
       this.option4.requestUrl =
         "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
         getCookie("userId");
+      this.option5.requestUrl =
+        "/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=" +
+        getCookie("userId");
     } else {
       this.option.requestUrl =
         "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" + null;
@@ -177,6 +218,8 @@ export default {
       this.option4.requestUrl =
         "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&consigneeSsoId=" +
         null;
+      this.option5.requestUrl =
+        "/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=" + null;
     }
   },
   methods: {
@@ -200,8 +243,7 @@ export default {
               .then(res => {
                 if (res.data.code == 200) {
                   this.$message.success("关闭成功");
-                  this.option4.requestUrl =
-                    "/api/v1/ams/getFuSaleOrderList?apiId=481&i" + new Date();
+                  this.getRequestUrl();
                 }
               });
           } else {
@@ -239,6 +281,11 @@ export default {
           getCookie("userId") +
           "&i=" +
           new Date();
+        this.option5.requestUrl =
+          "/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=" +
+          getCookie("userId") +
+          "&i=" +
+          new Date();
       } else {
         this.option.requestUrl =
           "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
@@ -255,6 +302,11 @@ export default {
           null +
           "&i=" +
           new Date();
+        this.option5.requestUrl =
+          "/api/v1/ams/getSteelOrderDeletedList?apiId=409&consigneeSsoId=" +
+          null +
+          "&i=" +
+          new Date();
       }
     },
     batchReport() {
@@ -343,129 +395,6 @@ export default {
     click(saleOrderId) {
       this.$router.push("/editSaleOrder/" + saleOrderId);
     },
-    // -------查看物资详情 (已审批)
-    detailclick(row) {
-      // 记录重复点击次数
-      if (this.oldRow === row) {
-        this.oldRowCount += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow != "") {
-        if (this.oldRow != row) {
-          if (this.oldRowCount % 2 === 1) {
-            this.$refs.table.toggleRowExpansion(this.oldRow);
-          } else {
-            this.oldRowCount = 1;
-          }
-        } else {
-          this.oldRow = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow = row;
-      // 根据销售订单id查询物资信息
-      this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
-        .then(res => {
-          this.tableData = res.data.data;
-        });
-    },
-
-    // -------查看物资详情 (财务已审批)
-    detailclick1(row) {
-      // 记录重复点击次数
-      if (this.oldRow1 === row) {
-        this.oldRowCount1 += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table1.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow1 != "") {
-        if (this.oldRow1 != row) {
-          if (this.oldRowCount1 % 2 === 1) {
-            this.$refs.table1.toggleRowExpansion(this.oldRow1);
-          } else {
-            this.oldRowCount1 = 1;
-          }
-        } else {
-          this.oldRow1 = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow1 = row;
-      // 根据销售订单id查询物资信息
-      this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
-        .then(res => {
-          this.tableData1 = res.data.data;
-        });
-    },
-
-    // -------查看物资详情 (已上报)
-    detailclick2(row) {
-      // 记录重复点击次数
-      if (this.oldRow2 === row) {
-        this.oldRowCount2 += 1;
-      }
-      // 切换当前详情表
-      this.$refs.table2.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow2 != "") {
-        if (this.oldRow2 != row) {
-          if (this.oldRowCount2 % 2 === 1) {
-            this.$refs.table2.toggleRowExpansion(this.oldRow2);
-          } else {
-            this.oldRowCount2 = 1;
-          }
-        } else {
-          this.oldRow2 = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow2 = row;
-      // 根据销售订单id查询物资信息
-      this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
-        .then(res => {
-          this.tableData2 = res.data.data;
-        });
-    },
-
-    // -------查看物资详情 (未上报)
-    detailclick3(row) {
-      // 记录重复点击次数
-      if (this.oldRow3 === row) {
-        this.oldRowCount3 += 1;
-      }
-      // 切换当前详情表
-      this.$refs.excelDom.toggleRowExpansion(row);
-      // 打开前关闭上一个详情表
-      if (this.oldRow3 != "") {
-        if (this.oldRow3 != row) {
-          if (this.oldRowCount3 % 2 === 1) {
-            this.$refs.excelDom.toggleRowExpansion(this.oldRow3);
-          } else {
-            this.oldRowCount3 = 1;
-          }
-        } else {
-          this.oldRow3 = null;
-          return;
-        }
-      }
-      // 重置上一个点击对象
-      this.oldRow3 = row;
-      // 根据销售订单id查询物资信息
-      this.axios
-        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
-        .then(res => {
-          this.tableData3 = res.data.data;
-        });
-    },
 
     // 上传
     uploadclick(saleOrderId) {

+ 17 - 10
src/views/appoint/components/saleContract/updateSaleOrderSteel.vue

@@ -612,6 +612,7 @@ export default {
       map.place = this.place;
       map.shipperAddressId = this.addressId;
       this.axios.post("/api/v1/ams/updateCarAddress", map).then(res => {
+        console.log(res.data);
         if (res.data.code == "200") {
           this.$message.success("修改成功");
           this.getOrderList();
@@ -751,13 +752,20 @@ export default {
           this.selectedMaterialName.includes("盘圆") ||
           this.selectedMaterialName.includes("盘元")
         ) {
-          console.log("执行了这里");
           this.materialList[this.indexChangeMaterial].haveMeter = 0;
           this.materialList[this.indexChangeMaterial].meterNumber = null;
         } else {
-          this.materialList[this.indexChangeMaterial].haveMeter = 1;
-          this.materialList[this.indexChangeMaterial].isDisable = 0;
-          this.materialList[this.indexChangeMaterial].meterNumber = null;
+          if (this.selectedMaterialName.includes("米")) {
+            this.materialList[this.indexChangeMaterial].haveMeter = 1;
+            this.materialList[this.indexChangeMaterial].isDisable = 1;
+            this.materialList[this.indexChangeMaterial].meterNumber = Number(
+              this.selectedMaterialName.replace(/[^0-9]/gi, "")
+            );
+          } else {
+            this.materialList[this.indexChangeMaterial].haveMeter = 1;
+            this.materialList[this.indexChangeMaterial].isDisable = 0;
+            this.materialList[this.indexChangeMaterial].meterNumber = null;
+          }
         }
         //重新初始化
         this.indexChangeMaterial = null;
@@ -817,22 +825,18 @@ export default {
         return;
       }
       this.dialogTableVisible = false;
-      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
       };
+      console.log(mapVal);
       this.axios
         .post("/api/v1/ams/updateAllMaterialInSale", mapVal)
         .then(res => {
+          console.log(res.data);
           if (res.data.code == "200") {
             this.$message.success("修改成功!");
             this.getOrderList();
@@ -1005,8 +1009,11 @@ export default {
             new Date()
         )
         .then(res => {
+          console.log(res.data.data);
           this.tableData = [];
           this.tableData = res.data.data;
+          this.orderId = this.tableData[0].orderId;
+          this.saleOrderMaterialId = this.tableData[0].saleOrderMaterialId;
           this.getSpanArr(this.tableData);
         });
     },

+ 24 - 2
src/views/inward/components/truckAppoint/requirement.vue

@@ -4,7 +4,7 @@
     <div class="sache">
       <el-input placeholder="请输入内容" v-model="inputText" clearable>
       </el-input>
-      <el-button type="primary" class="btn">
+      <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button
@@ -63,7 +63,7 @@ export default {
   data() {
     return {
       tableTitle: "null",
-      inputText: "",
+      inputText: null,
       orgCode: "",
       first: {
         // first请求数据的地址
@@ -104,6 +104,28 @@ export default {
   },
   mounted() {},
   methods: {
+    onclick() {
+      let orgCode = null;
+      if (
+        getCookie("orgCode") != "dagangadmin" &&
+        getCookie("orgCode") != "zidonghuabu"
+      ) {
+        orgCode = getCookie("orgCode");
+      }
+      if (this.activeName == "first") {
+        this.first.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" +
+          orgCode +
+          "&index=" +
+          this.inputText;
+      } else {
+        this.second.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" +
+          orgCode +
+          "&index=" +
+          this.inputText;
+      }
+    },
     //查看需求下面的运单
     getRequirementOrder(scope) {
       this.$router.push("/getRequirementOrder/" + scope.row.requirementId);

+ 124 - 102
src/views/inward/components/truckAppoint/requirementOther.vue

@@ -4,7 +4,7 @@
     <div class="sache">
       <el-input placeholder="请输入内容" v-model="inputText" clearable>
       </el-input>
-      <el-button type="primary" class="btn">
+      <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
       </el-button>
       <el-button
@@ -28,7 +28,11 @@
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="first">
-            <dilTable v-bind.sync="first" @selection-change="selectionChange" ref="table1">
+            <dilTable
+              v-bind.sync="first"
+              @selection-change="selectionChange"
+              ref="table1"
+            >
               <el-table-column fixed="right" label="操作" width="120">
                 <template slot-scope="scope">
                   <el-button
@@ -44,9 +48,14 @@
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
             <dilTable v-bind.sync="second" ref="table">
-            <el-table-column fixed="right" label="操作" width="80">
+              <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
-                 <el-button type="text" size="mini" @click="getRequirementOrder(scope)">运单</el-button>
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="getRequirementOrder(scope)"
+                    >运单</el-button
+                  >
                 </template>
               </el-table-column>
             </dilTable>
@@ -62,89 +71,96 @@ export default {
   data() {
     return {
       inputText: "",
-      orgCode:"",
+      orgCode: "",
       first: {
         // first请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: "",
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       second: {
         // second请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: ""
       },
-      //记录旧的row对象(未下发)
-      oldRow: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
-      oldRowCount: 1,
-      //记录旧的row对象(已下发)
-      oldRow1: "",
-      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已下发)
-      oldRowCount1: 1,
-      tableHead: [
-        {
-          prop: "materialName",
-          label: "物资名称",
-          width: 150,
-        },
-        {
-          prop:"loadName",
-          label:"装货点",
-          width:150
-        },
-        {
-          prop:"unloadName",
-          label:"卸货点",
-          width:150
-        },
-        {
-          prop: "materialWeight",
-          label: "物资重量",
-          width: 150,
-        },
-        {
-          prop: "materialCount",
-          label: "物资数量",
-          width: 150,
-        },
-      ],
       tableData: [],
       tableData1: [
         {
-          materialCount : 100
+          materialCount: 100
         }
       ],
-      activeName: "first",
+      activeName: "first"
     };
   },
-  created(){
-    if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"){
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0"
-      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1"
-    }else{
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" + getCookie("orgCode")
-      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" + getCookie("orgCode")
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.first.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0";
+      this.second.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1";
+    } else {
+      this.first.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" +
+        getCookie("orgCode");
+      this.second.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" +
+        getCookie("orgCode");
     }
   },
   methods: {
+    onclick() {
+      let orgCode = null;
+      if (
+        getCookie("orgCode") != "dagangadmin" &&
+        getCookie("orgCode") != "zidonghuabu"
+      ) {
+        orgCode = getCookie("orgCode");
+      }
+      if (this.activeName == "first") {
+        this.first.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" +
+          orgCode +
+          "&index=" +
+          this.inputText;
+      } else {
+        this.second.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" +
+          orgCode +
+          "&index=" +
+          this.inputText;
+      }
+    },
     //查看需求下面的运单
-    getRequirementOrder(scope){
-      this.$router.push(
-        "/getRequirementOrder/" + scope.row.requirementId
-      );
+    getRequirementOrder(scope) {
+      this.$router.push("/getRequirementOrder/" + scope.row.requirementId);
     },
     handleClick(tab, event) {
-      this.getRequestUrl()   
+      this.getRequestUrl();
     },
-    getRequestUrl(){
-      if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"){
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&i=" + new Date()
-      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&i=" + new Date()
-      }else{
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" + getCookie("orgCode") + "&i=" + new Date()
-      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" + getCookie("orgCode") + "&i=" + new Date()
+    getRequestUrl() {
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.first.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&i=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&i=" +
+          new Date();
+      } else {
+        this.first.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" +
+          getCookie("orgCode") +
+          "&i=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" +
+          getCookie("orgCode") +
+          "&i=" +
+          new Date();
       }
     },
     selectionChange(selection) {
@@ -154,33 +170,31 @@ export default {
       this.$router.push("/addRequirement2");
     },
     updateRequirement(scope) {
-      this.$router.push(
-        "/updateRequirement/" + scope.row.requirementId
-      );
+      this.$router.push("/updateRequirement/" + scope.row.requirementId);
     },
     deleteRequirement(scope) {
       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"
                 });
               }
             });
@@ -188,44 +202,52 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "删除操作已取消!",
+            message: "删除操作已取消!"
           });
         });
     },
     Issue() {
       console.log(this.first.mapList);
-      if(this.first.mapList.length == 0){
-        this.$message.warning("请选择需求")
-        return
+      if (this.first.mapList.length == 0) {
+        this.$message.warning("请选择需求");
+        return;
       }
-  	// 权限控制,判断用户是否属于炼铁厂下面的车间
-      for(let i=0;i<this.first.mapList.length;i++){
-        if((this.first.mapList[i].requirementType=="计时")&&(getCookie("orgCode")=="liantiechang-yuanliaochejian"||getCookie("orgCode")=="liantiechang-shaojiechejian"||getCookie("orgCode")=="liantiechang-dagaoluchejian"||getCookie("orgCode")=="liantiechang-xiaogaoluchejian"||getCookie("orgCode")=="liantiechang-rongjichejian"||getCookie("orgCode")=="liantiechang-weijianchejian")){
-          this.$message.warning("请选择联系炼铁厂相关负责人完成计时作业下发")
-          return
+      // 权限控制,判断用户是否属于炼铁厂下面的车间
+      for (let i = 0; i < this.first.mapList.length; i++) {
+        if (
+          this.first.mapList[i].requirementType == "计时" &&
+          (getCookie("orgCode") == "liantiechang-yuanliaochejian" ||
+            getCookie("orgCode") == "liantiechang-shaojiechejian" ||
+            getCookie("orgCode") == "liantiechang-dagaoluchejian" ||
+            getCookie("orgCode") == "liantiechang-xiaogaoluchejian" ||
+            getCookie("orgCode") == "liantiechang-rongjichejian" ||
+            getCookie("orgCode") == "liantiechang-weijianchejian")
+        ) {
+          this.$message.warning("请选择联系炼铁厂相关负责人完成计时作业下发");
+          return;
         }
       }
       this.$confirm("是否下发", "提示", {
         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"
                 });
               }
             });
@@ -233,23 +255,23 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
-  .inwardRequirement{
-      margin-top: 20px;
-      margin-left: 20px;
-      .sache{
-          margin-top: 30px;
-          padding-bottom: 10px;
-          .el-input {
-            width: 20%;
-            }
-          }
+.inwardRequirement {
+  margin-top: 20px;
+  margin-left: 20px;
+  .sache {
+    margin-top: 30px;
+    padding-bottom: 10px;
+    .el-input {
+      width: 20%;
+    }
   }
+}
 </style>