瀏覽代碼

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

zx 2 年之前
父節點
當前提交
070b0dd60b

+ 13 - 50
src/views/TMS/components/domesticMine/wagonLoadAdd.vue

@@ -13,8 +13,7 @@
           <el-button  type="primary">导入车皮号(Excel)</el-button>
       </el-upload>
       <div style="margin-right:200px;">当前导入数量:{{tableData.length}}</div>
-       <!-- <el-button type="primary" @click="exportData()"
-        ><i class="el-icon-download"></i>下载导入模板</el-button> -->
+      <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>下载Excel模板</el-button>
     </div>
     <div>
       <span style="color:red">导入数据中的 品名、发货单位、车号、发站 是必须的</span>
@@ -280,7 +279,7 @@ export default {
       sendStationId:null,
       toTheStationId:1,
       sendStation:null,
-      toTheStation:"老区轨道衡"
+      toTheStation:"老区轨道衡",
     };
   },
   watch: {
@@ -612,6 +611,7 @@ export default {
           //绑定数据
           rows.forEach((row,index) => {
             let carNumber=row['车号'];
+            let currentRow=index+1;
             if((typeof carNumber)!="undefined" && carNumber.length == 7){
               //表格数据
               let temp={
@@ -631,62 +631,25 @@ export default {
                 temp.materialName=row['物资'];
               }
               //判断校验
-              if((typeof temp.wagonNo)=='undefined'){
-                that.$message({
-                  message: "车号不能为空!导入Excel停止!",
-                  type: "warning",
-                });
-                return;
-              }
-              if((typeof temp.materialName)=='undefined'){
-                that.$message({
-                  message: "品名不能为空!导入Excel停止!",
-                  type: "warning",
-                });
-                return;
-              }
-              if((typeof temp.supplierName)=='undefined'){
-                that.$message({
-                  message: "发货单位不能为空!导入Excel停止!",
-                  type: "warning",
-                });
-                return;
-              }
-              if((typeof temp.sendStation)=='undefined'){
-                that.$message({
-                  message: "发站不能为空!导入Excel停止!",
-                  type: "warning",
-                });
-                return;
+              if((typeof temp.wagonNo)=='undefined' ||
+                  (typeof temp.materialName)=='undefined'||
+                  (typeof temp.supplierName)=='undefined'||
+                  (typeof temp.sendStation)=='undefined'){
+                console.log("数据异常:");
+                console.log(row);
+                return;//退出当前循环,不导入表格
               }
+              
               that.tableData.push(temp);
             }
             else{
-              console.log("车号"+carNumber+"不是7位数!");
+              console.log("第"+currentRow+ "行车皮号异常!");
+              return;
             }
         });
         };
         reader.readAsBinaryString(file.raw); //以二进制方式读取
     },
-    //导出模板
-    exportData(){
-      let tables = document.getElementById("domesticTable");
-      let table_book = XLSX.utils.table_to_book(tables);
-      var table_write = XLSX.utils.write(table_book, {
-        bookType: "xlsx",
-        bookSST: true,
-        type: "array",
-      });
-      try {
-        this.$FileSaver.saveAs(
-          new Blob([table_write], { type: "application/octet-stream" }),
-          ".xlsx"
-        );
-      } catch (e) {
-        if (typeof console !== "undefined") console.log(e, table_write);
-      }
-      return table_write;
-    }
   },
 };
 </script>

+ 6 - 1
src/views/TMS/components/importedEmergency/addWagonLoadEmergency.vue

@@ -55,6 +55,9 @@
       </el-upload>
       <span >当前导入数量:{{tableData.length}}</span>
     </div>
+    <div>
+      <span style="color:red">导入数据中的 车皮号 是必须的</span>
+    </div>
     <div class="table item"
         style="width:680px;
         height:300px;
@@ -672,7 +675,9 @@ export default {
               that.tableData.push(temp);
             }
             else{
-              console.log("车皮号"+carNumber+"不是7位数!");
+              let errorNumb=index+1;
+              console.log("第"+errorNumb+ "行车皮号异常!");
+              return;
             }
         });
         };

+ 6 - 1
src/views/TMS/components/importedMine/addWagonLoad.vue

@@ -55,6 +55,9 @@
       </el-upload>
       <span >当前导入数量:{{tableData.length}}</span>
     </div>
+    <div>
+      <span style="color:red">导入数据中的 车皮号 是必须的</span>
+    </div>
     <div class="table item"
         style="width:680px;
         height:300px;
@@ -672,7 +675,9 @@ export default {
               that.tableData.push(temp);
             }
             else{
-              console.log("车皮号"+carNumber+"不是7位数!");
+              let errorNumb=index+1;
+              console.log("第"+errorNumb+ "行车皮号异常!");
+              return;
             }
         });
         };

+ 5 - 1
src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue

@@ -169,7 +169,7 @@
 
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure">确定</el-button>
+      <el-button type="primary" @click="makeSure" :loading="loading">确定</el-button>
     </div>
   </div>
 </template>
@@ -188,6 +188,7 @@ export default {
       pos: 0,
       //加载
       selectLineLoading: false,
+      loading:false,
       //所有选中承运商Id和承运商名称暂存
       carrierIdAndName: [],
       //承运商下拉框中的值
@@ -522,6 +523,8 @@ export default {
     },
     //点击确定按钮的事件
     makeSure() {
+      this.loading=true;
+      return;
       if (this.canSend == -1) {
         this.$message.warning("电话号码格式不正确,请输入正确的电话号码!");
       } else {
@@ -572,6 +575,7 @@ export default {
                 } else {
                   this.$message.error("派单失败:" + res.data.data);
                 }
+                this.loading=false;
               });
           })
           .catch(() => {

+ 5 - 1
src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue

@@ -158,7 +158,7 @@
 
     <div class="button_box">
       <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure">确定</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading">确定</el-button>
     </div>
   </div>
 </template>
@@ -171,6 +171,8 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      //是否正在加载
+      isLoading:false,
       //存放每一行记录的合并数
       spanArr: [],
       //pos是spanArr的索引
@@ -475,6 +477,7 @@ export default {
     },
     //点击确定按钮的事件
     makeSure() {
+      this.isLoading=true;
       //是否可发送请求
       if (this.canSend == -1) {
         this.$message.warning("电话号码格式不正确,请输入正确的电话号码!");
@@ -520,6 +523,7 @@ export default {
                 } else {
                   this.$message.error("派单失败:" + res.data.data);
                 }
+                this.isLoading=false;
               });
           })
           .catch(() => {

+ 81 - 3
src/views/appoint/components/ship/addDeliveryAttorney.vue

@@ -5,6 +5,46 @@
     <div class="form">
       <div class="form_box">
         <dil-form :formId="113" v-model="form1" ref="from1"></dil-form>
+        <el-form>
+        <div class="preview-group">
+            <el-form-item label="承运单位:">
+                <el-select
+                v-model="carrierId"
+                filterable >
+                <el-option
+                  v-for="carrier in carriers"
+                  :key="carrier.id"
+                  :label="carrier.label"
+                  :value="carrier.id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="提货单位:">
+                <el-select
+                v-model="downSwimPortId"
+                filterable >
+                <el-option
+                  v-for="carrier in carriers"
+                  :key="carrier.id"
+                  :label="carrier.label"
+                  :value="carrier.id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="到达港:">
+                <el-select
+                v-model="portId"
+                filterable >
+                <el-option
+                  v-for="port in ports"
+                  :key="port.portId"
+                  :label="port.portName"
+                  :value="port.portId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+        </div>
+        </el-form>
       </div>
       <div class="liulan">
         <el-button type="primary" class="btn" @click="onDrawer">浏览</el-button>
@@ -53,6 +93,12 @@ export default {
   data() {
     return {
       input: "",
+      carrierId:"",//承运单位id
+      carriers:[],
+      downSwimPortId:"",//提货单位id
+      downSwimPorts:[],
+      portId:"",//到达港id
+      ports:[],
       drawer: false,
       direction: "rtl",
       options: {
@@ -85,8 +131,39 @@ export default {
   mounted() {
     this.$set(this.form1, "requesterGroupId", 1); //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
     this.$set(this.form1, "carrierId", 11);
+    this.getCarriers();
+    this.getPorts();
   },
   methods: {
+    //查询所有承运单位和提货单位
+    getCarriers(){
+      this.axios.get("/api/v1/tms/getPortName").then((res) => {
+          if (res.data.code == 200) {
+            //赋值
+            this.carriers=res.data.data;
+            this.downSwimPorts=res.data.data;
+          } else {
+            this.$message({
+              type: "warning",
+              message: res.data.data,
+            });
+          }
+        });
+    },
+    //查询所有港口
+    getPorts(){
+      this.axios.post("/api/v1/rms/getPortName?index=").then((res) => {
+          if (res.data.code == 200) {
+            //赋值
+            this.ports=res.data.data;
+          } else {
+            this.$message({
+              type: "warning",
+              message: res.data.data,
+            });
+          }
+        });
+    },
     getPersonInfo() {
       console.log(this.form1);
       console.log("我尽力了");
@@ -135,20 +212,21 @@ export default {
         return;
       }
       let AmsshipDeliveryAttorney = {
-        carrierId: this.form1.carrierId, //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
+        carrierId: this.carrierId, //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
         requesterGroupId: this.form1.requesterGroupId,
-        downSwimPortId: this.form1.downSwimPortId,
+        downSwimPortId: this.downSwimPortId,
         attorenyPickupIdcard: this.form1.attorenyPickupIdcard,
         attorneyContactTelephone: this.form1.attorneyContactTelephone,
         batchId: this.batchIds,
         attorneyTime: sjTime(this.form1.attorneyTime),
         attorneyPdffile: this.form1.attorneyPdffile,
         noticeId: this.form1.noticeId,
-        portId: this.form1.portId,
+        portId: this.portId,
         attorneyPickupContactPerson: this.form1.attorneyPickupContactPerson,
         userId: getCookie("userId"),
         // resultMemo: this.form1.resultMemo,
       };
+      console.log(AmsshipDeliveryAttorney);
       //身份证校验
       function checkCardNo() {
         var value3 = AmsshipDeliveryAttorney.attorenyPickupIdcard;

+ 35 - 3
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -45,6 +45,22 @@
     </div>
     <div class="form">
       <div class="form_box">
+        <el-form>
+          <div class="preview-group">
+              <el-form-item label="发货港口:">
+                 <el-select
+                 v-model="portId"
+                 filterable >
+                  <el-option
+                    v-for="port in ports"
+                    :key="port.portId"
+                    :label="port.portName"
+                    :value="port.portId">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+          </div>
+        </el-form>
         <dil-form
           :formId="112"
           v-model="form1"
@@ -178,7 +194,8 @@ export default {
       a: 1,
       cargoPictureUrl: "",
       shippingCertificate: "",
-     
+      portId:"",
+      ports:[],
       materialType: "",
       receiver: "",
       input: "",
@@ -220,8 +237,23 @@ export default {
   mounted() {
     // this.$set(this.form1, "requesterGroupId", 1); //委托单位(requesterGroupId)承运单位(carrierId)转移到提货委托
     // this.$set(this.form1, "carrierId", 11);
+    this.getPorts();
   },
   methods: {
+    //查询所有港口
+    getPorts(){
+      this.axios.post("/api/v1/rms/getPortName?index=").then((res) => {
+          if (res.data.code == 200) {
+            //赋值
+            this.ports=res.data.data;
+          } else {
+            this.$message({
+              type: "warning",
+              message: res.data.data,
+            });
+          }
+        });
+    },
     upCLick(val) {
       this.num = val;
     },
@@ -349,7 +381,7 @@ export default {
         // requesterGroupId: this.form1.requesterGroupId,
         noticeCommerceMethod: this.form1.noticeCommerceMethod,
         noticeHandoverMethod: this.form1.noticeHandoverMethod,
-        portId: this.form1.portId,
+        portId: this.portId,
         noticePortConstructionFee: this.form1.noticePortConstructionFee,
         noticeDeliveryTime: sjTime(this.form1.noticeDeliveryTime),
         noticePileFreeDays: this.form1.noticePileFreeDays,
@@ -378,7 +410,7 @@ export default {
         cargoPictureUrl: this.cargoPictureUrl,
         userId: getCookie("userId"),
       };
-      console.log("mapaaa" + map);
+      console.log(map);
       //判断放货数量是否为数字
       if (
         map.noticeCommerceMethod == null ||

+ 85 - 3
src/views/appoint/components/ship/modifyDeliveryAttroney.vue

@@ -5,7 +5,47 @@
     <div class="form">
       <div class="form_box">
         <dil-form :formId="113" v-model="form1"></dil-form>
-      </div>
+          <el-form>
+            <div class="preview-group">
+                <el-form-item label="承运单位:">
+                    <el-select
+                    v-model="carrierId"
+                    filterable >
+                    <el-option
+                      v-for="carrier in carriers"
+                      :key="carrier.id"
+                      :label="carrier.label"
+                      :value="carrier.id">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="提货单位:">
+                    <el-select
+                    v-model="downSwimPortId"
+                    filterable >
+                    <el-option
+                      v-for="carrier in carriers"
+                      :key="carrier.id"
+                      :label="carrier.label"
+                      :value="carrier.id">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+                <el-form-item label="到达港:">
+                    <el-select
+                    v-model="portId"
+                    filterable >
+                    <el-option
+                      v-for="port in ports"
+                      :key="port.portId"
+                      :label="port.portName"
+                      :value="port.portId">
+                    </el-option>
+                  </el-select>
+                </el-form-item>
+            </div>
+          </el-form>
+        </div>
     </div>
     <!-- 确定和取消 -->
     <div class="button_box">
@@ -23,15 +63,52 @@ export default {
   data() {
     return {
       form1: {},
+      carrierId:"",//承运单位id
+      carriers:[],
+      downSwimPortId:"",//提货单位id
+      downSwimPorts:[],
+      portId:"",//到达港id
+      ports:[],
       value2: undefined,
       value3: undefined,
       batchInfactoryId:null,
     };
   },
   mounted() {
+    this.getCarriers();
+    this.getPorts();
     this.information();
   },
   methods: {
+    //查询所有承运单位和提货单位
+    getCarriers(){
+      this.axios.get("/api/v1/tms/getPortName").then((res) => {
+          if (res.data.code == 200) {
+            //赋值
+            this.carriers=res.data.data;
+            this.downSwimPorts=res.data.data;
+          } else {
+            this.$message({
+              type: "warning",
+              message: res.data.data,
+            });
+          }
+        });
+    },
+    //查询所有港口
+    getPorts(){
+      this.axios.post("/api/v1/rms/getPortName?index=").then((res) => {
+          if (res.data.code == 200) {
+            //赋值
+            this.ports=res.data.data;
+          } else {
+            this.$message({
+              type: "warning",
+              message: res.data.data,
+            });
+          }
+        });
+    },
     information() {
       //编辑请车作业
       this.axios
@@ -42,6 +119,9 @@ export default {
           res.data.data.forEach((e) => {
             this.batchInfactoryId=e.batchInfactoryId;
             this.form1 = e;
+            this.carrierId=e.carrierId;
+            this.downSwimPortId=e.downSwimPortId;
+            this.portId = e.portId;
             console.log(this.form1.batchId);
           });
         });
@@ -54,13 +134,15 @@ export default {
     onClickConfirm() {
       let AmsshipDeliveryAttorney = {
         resultId: this.$route.params.attorneyId,
-        portId: this.form1.portId,
+        portId: this.portId,
         batchId:this.batchInfactoryId,
         attorneyContactTelephone:this.form1.attorneyContactTelephone,
         attorenyPickupIdcard: this.form1.attorenyPickupIdcard,
         attorneyPickupContactPerson: this.form1.attorneyPickupContactPerson,
-        downSwimPortId: this.form1.downSwimPortId,
+        downSwimPortId: this.downSwimPortId,
         attorneyTime: sjTime(this.form1.attorneyTime),
+        carrierId:this.carrierId,
+        requesterGroupId:this.form1.requesterGroupId
       };
 
       //身份证校验

+ 35 - 1
src/views/appoint/components/ship/modifyDeliveryNotice.vue

@@ -41,6 +41,22 @@
 
     <div class="form">
       <div class="form_box">
+         <el-form>
+          <div class="preview-group">
+              <el-form-item label="发货港口:">
+                 <el-select
+                 v-model="portId"
+                 filterable >
+                  <el-option
+                    v-for="port in ports"
+                    :key="port.portId"
+                    :label="port.portName"
+                    :value="port.portId">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+          </div>
+        </el-form>
         <dil-form :formId="112" v-model="form1"></dil-form>
       </div>
     </div>
@@ -159,6 +175,8 @@ export default {
     return {
       form1: {},
       a: 1,
+      portId:"",
+      ports:[],
       cargoPictureUrl: "",
       shippingCertificate: "",
       materialName: "",
@@ -200,9 +218,24 @@ export default {
     };
   },
   mounted() {
+    this.getPorts();
     this.information();
   },
   methods: {
+    //查询所有港口
+    getPorts(){
+      this.axios.post("/api/v1/rms/getPortName?index=").then((res) => {
+          if (res.data.code == 200) {
+            //赋值
+            this.ports=res.data.data;
+          } else {
+            this.$message({
+              type: "warning",
+              message: res.data.data,
+            });
+          }
+        });
+    },
     information() {
       this.axios
         .post("/api/v1/tms/selectByNoticeId/" + this.$route.params.noticeId)
@@ -210,6 +243,7 @@ export default {
           res.data.data.forEach((e) => {
             console.log("aaa", e);
             this.form1 = e;
+            this.portId=e.portId;
             this.batchId =  e.foreignShipName + e.materialName;
             this.batchIds=e.batchId;
             this.foreignShipName=e.foreignShipName;
@@ -324,7 +358,7 @@ export default {
         // requesterGroupId: this.form1.requesterGroupId,
         noticeCommerceMethod: this.form1.noticeCommerceMethod,
         noticeHandoverMethod: this.form1.noticeHandoverMethod,
-        portId: this.form1.portId,
+        portId: this.portId,
         noticePortConstructionFee: this.form1.noticePortConstructionFee,
         noticeDeliveryTime: sjTime(this.form1.noticeDeliveryTime),
         noticePileFreeDays: this.form1.noticePileFreeDays,