luobang 3 rokov pred
rodič
commit
d49aba95d3

+ 1 - 3
build/utils.js

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

+ 2 - 0
config/index.js

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

+ 33 - 33
src/views/TMS/components/importedShip/addLoadShip.vue

@@ -82,39 +82,39 @@ export default {
       }
       var val = this.value;
 
-      if (
-        mapVal.resultActualInstallations == null ||
-        // mapVal.portId==null||
-        mapVal.resultLoadShipDate == null ||
-        mapVal.resultIsClear == null ||
-        mapVal.resultPortDeclarationTime == null ||
-        mapVal.resultPortDeclarationName == null ||
-        mapVal.resultArrivalTime == null ||
-        mapVal.resultOutWharyName == null ||
-        mapVal.resultOutWharyTime == null
-      )
-        this.$message.error("存在空值!");
-      else if (!isNumber(val)) this.$message.warning("实装数量必须为数字!");
-      else
-        this.axios
-          .post("/api/v1/tms/addLoadShip", {
-            mapVal: mapVal,
-            rowMap: this.rowMap
-          })
-          .then(res => {
-            if (res.data.code == 200) {
-              this.$message({
-                type: "success",
-                message: "新增成功!"
-              });
-              this.$router.go(-1);
-            } else if (res.data.code == 201) {
-              this.$message.warning(res.data.data);
-            } else {
-              this.$message.error("新增失败!");
-            }
-            this.$refs["table"].resetField();
-          });
+      // if (
+      //   mapVal.resultActualInstallations == null ||
+      //   // mapVal.portId==null||
+      //   mapVal.resultLoadShipDate == null ||
+      //   mapVal.resultIsClear == null ||
+      //   mapVal.resultPortDeclarationTime == null ||
+      //   mapVal.resultPortDeclarationName == null ||
+      //   mapVal.resultArrivalTime == null ||
+      //   mapVal.resultOutWharyName == null ||
+      //   mapVal.resultOutWharyTime == null
+      // )
+      //   this.$message.error("存在空值!");
+      // else if (!isNumber(val)) this.$message.warning("实装数量必须为数字!");
+      // else
+      this.axios
+        .post("/api/v1/tms/addLoadShip", {
+          mapVal: mapVal,
+          rowMap: this.rowMap
+        })
+        .then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!"
+            });
+            this.$router.go(-1);
+          } else if (res.data.code == 201) {
+            this.$message.warning(res.data.data);
+          } else {
+            this.$message.error("新增失败!");
+          }
+          this.$refs["table"].resetField();
+        });
     },
     handleSelect(item) {
       console.log(item);

+ 101 - 65
src/views/TMS/components/importedShip/addUnloadShip.vue

@@ -1,24 +1,24 @@
 <template>
-<!-- 新增卸船作业 -->
+  <!-- 新增卸船作业 -->
   <div class="shipTransport">
     <page-title>返回</page-title>
     <!-- 第一部分 -->
-      <div class="top">
-        <el-input placeholder="请输入内容" v-model="input" clearable> </el-input> 
-        <el-button type="primary" class="btn" @click="onclick()">
-          <i class="el-icon-search"></i>查询
-        </el-button>   
-      </div>
-      <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
-      </dilTable>
+    <div class="top">
+      <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
+      <el-button type="primary" class="btn" @click="onclick()">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+    </div>
+    <dilTable v-bind.sync="option" @radio-change="currentRadioChange">
+    </dilTable>
     <div class="form">
       <!-- 第二部分 -->
       <div class="form_box">
-          <dil-form :formId="121" v-model="form"></dil-form>
+        <dil-form :formId="121" v-model="form"></dil-form>
       </div>
     </div>
     <div class="button_box">
-        <el-button type="primary" @click="makeSure" >新增卸船作业</el-button>
+      <el-button type="primary" @click="makeSure">新增卸船作业</el-button>
     </div>
   </div>
 </template>
@@ -30,7 +30,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      input:'',
+      input: "",
       restaurants: [],
       state: "",
       form: {},
@@ -38,98 +38,134 @@ export default {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
         // 控制显示当选列
-        selectionType: "radio",
-        unloadMap:{},
+        selectionType: "radio"
       },
+      unloadMap: {}
     };
   },
-  mounted() {
+  computed: {
+    a1() {
+      return this.form.resultEndTime;
+    }
+  },
+  watch: {
+    a1() {
+      this.unloadShipMes();
+    }
   },
   methods: {
+    unloadShipMes() {
+      if (
+        typeof this.form.resultStartTime == "undefined" ||
+        this.form.resultStartTime == null ||
+        this.form.resultStartTime == "null" ||
+        this.form.resultStartTime == "undefined"
+      ) {
+        this.$message.warning("请先填写卸船开始时间!");
+        this.form.resultEndTime = null;
+      }
+      return;
+    },
     currentRadioChange(row) {
-      this.unloadMap=row
+      this.unloadMap = {};
+      this.unloadMap = row;
       console.log(row);
     },
-    onclick(){
-      console.log(this.input);
-         this.option.requestUrl = "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
+    onclick() {
+      this.option.requestUrl =
+        "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
     },
     // 新增
     makeSure() {
+      console.log(this.unloadMap);
+      if (JSON.stringify(this.unloadMap).length == 2) {
+        this.$message.error("请先选择卸船的船只!");
+        return;
+      }
+      if (
+        this.form.resultEndTime != null &&
+        this.form.resultEndTime != "undefined" &&
+        typeof this.form.resultEndTime != "undefined" &&
+        this.form.resultEndTime != "null"
+      ) {
+        this.unloadShipMes();
+      }
+      let resultArrivalDate = null;
+      let resultStartTime = null;
+      let resultEndTime = null;
+      if (
+        typeof this.form.resultArrivalDate != "undefined" &&
+        this.form.resultArrivalDate != null
+      ) {
+        resultArrivalDate = sjTime(this.form.resultArrivalDate);
+      }
+      if (
+        typeof this.form.resultStartTime != "undefined" &&
+        this.form.resultStartTime != null
+      ) {
+        resultStartTime = sjTime(this.form.resultStartTime);
+      }
+      if (
+        typeof this.form.resultEndTime != "undefined" &&
+        this.form.resultEndTime != null
+      ) {
+        resultEndTime = sjTime(this.form.resultEndTime);
+      }
       let mapVal = {
-        resultArrivalDate: sjTime(
-          this.form.resultArrivalDate
-        ),
-        resultStartTime: sjTime(
-          this.form.resultStartTime
-        ),
-        resultEndTime: sjTime(
-          this.form.resultEndTime
-        ),
-        resultStatus: this.form.resultStatus,
+        resultArrivalDate: resultArrivalDate,
+        resultStartTime: resultStartTime,
+        resultEndTime: resultEndTime,
+        resultStatus: this.form.resultStatus
       };
-      console.log(mapVal);
-       if (
-      mapVal.resultArrivalDate==null||
-      mapVal.resultStartTime==null||
-      mapVal.resultEndTime==null||
-      mapVal.resultStatus==null
-      ) this.$message.error("存在空值!");
-      else
+      debugger;
       this.axios
-        .post(
-          "/api/v1/tms/addUnLoadShip",
-          {
-            mapVal: mapVal,
-            unloadMap: this.unloadMap
-          }
-        )
-        .then((res) => {
+        .post("/api/v1/tms/addUnLoadShip", {
+          mapVal: mapVal,
+          unloadMap: this.unloadMap
+        })
+        .then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功!",
+              message: "新增成功!"
             });
             // this.$refs.table.refreshData();
             this.$router.go(-1);
           } else {
             this.$message.error("新增失败!");
           }
-          this.$refs['table'].resetField();
         });
     },
     loadAll() {
-      return [
-
-      ];
+      return [];
     },
     handleSelect(item) {
       console.log(item);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss'>
-.shipTransport{
-  .form{
+<style lang="scss">
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -145,8 +181,8 @@ export default {
       margin-right: 1.25rem;
     }
   }
-  .button_box{
+  .button_box {
     margin-left: 45%;
   }
 }
-</style>
+</style>

+ 27 - 23
src/views/TMS/components/importedShip/instructionsCapacity.vue

@@ -6,12 +6,15 @@
       <span class="text">江船船名</span>
       <el-autocomplete
         v-model="state"
-        @input="onInput"
         :fetch-suggestions="querySearch"
         placeholder="请输入内容"
         :trigger-on-focus="false"
         @select="handleSelect"
-      ></el-autocomplete>
+      >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.capacityName }}</div>
+        </template></el-autocomplete
+      >
     </div>
     <div class="form">
       <dil-form :formId="119" v-model="form"></dil-form>
@@ -54,40 +57,41 @@ export default {
     };
   },
   methods: {
-    onInput() {
+    querySearch(queryString, cb) {
       this.axios
         .post("/api/v1/tms/getShipNameList?state=" + this.state)
         .then(res => {
-          var values = [];
-          if (res.data.code == "0") {
-            res.data.data.forEach(element => {
-              values.push({
-                value: element.capacityName,
-                capacityId: element.capacityId
-              });
-            });
-          }
-          this.restaurants = values;
+          console.log(res.data.data);
+          var restaurants = res.data.data;
+          var results = queryString
+            ? restaurants.filter(this.createFilter(queryString))
+            : restaurants;
+          // 调用 callback 返回建议列表的数据
+          cb(results);
         });
     },
-    querySearch(queryString, cb) {
-      var results = queryString
-        ? this.restaurants.filter(this.createFilter(queryString))
-        : this.restaurants;
-      // 调用 callback 返回建议列表的数据
-      cb(results);
-    },
     createFilter(queryString) {
       return restaurant => {
         return (
-          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
-          0
+          restaurant.capacityName
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
         );
       };
     },
     handleSelect(item) {
       this.capacityIds = item.capacityId;
-      console.log("capacityIds", this.capacityIds);
+      this.state = item.capacityName;
+      console.log(this.capacityIds);
+      this.axios
+        .get("/api/v1/uc/getCapacityTel?capacityId=" + item.capacityId)
+        .then(res => {
+          console.log(res.data);
+          if (res.data) {
+            this.$set(this.form, "instructionContactInf", res.data.capacityTel);
+          }
+        });
+      //根据运力ID查询联系方式
     },
 
     // 新增

+ 73 - 59
src/views/TMS/components/importedShip/shipLocation.vue

@@ -8,11 +8,7 @@
         <i class="el-icon-search"></i>查询
       </el-button>
     </div>
-    <el-table
-      :data="selectionList"
-      border
-      highlight-current-row
-    >
+    <el-table :data="selectionList" border highlight-current-row>
       <el-table-column type="index" width="50" label="序号" align="center">
       </el-table-column>
       <el-table-column
@@ -41,16 +37,21 @@
               <el-input
                 v-model.number="scope.row.shipLocation"
                 style="width: 100px;"
+                @blur="onblur(scope)"
               ></el-input>
             </template>
             <!-- 位置状态 -->
             <template v-if="item.prop == 'locationStatus'">
-              <el-select v-model.number="scope.row.locationStatus" placeholder="请选择" >
+              <el-select
+                v-model.number="scope.row.locationStatus"
+                placeholder="请选择"
+              >
                 <el-option
-                  v-for="(item,i) in options"
+                  v-for="(item, i) in options"
                   :key="i"
                   :label="item.label"
-                  :value="item.value">
+                  :value="item.value"
+                >
                 </el-option>
               </el-select>
             </template>
@@ -73,11 +74,9 @@
 
       <el-table-column fixed="right" label="操作" width="60">
         <template slot-scope="scope">
-          <el-button
-            @click="click(scope.row)"
-            type="text"
-            size="small"
-          >保存</el-button>
+          <el-button @click="click(scope.row)" type="text" size="small"
+            >保存</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -90,20 +89,23 @@ export default {
   name: "homeworkPath",
   data() {
     return {
-      options:[
+      options: [
         {
-          label:'未到闸船舶',
-          value:'未到闸船舶'
-        },{
-          label:'等闸船舶',
-          value:'等闸船舶'
-        },{
-          label:'已过闸船舶',
-          value:'已过闸船舶'
-        },{
-          label:'到港待卸船舶',
-          value:'到港待卸船舶'
+          label: "未到闸船舶",
+          value: "未到闸船舶"
         },
+        {
+          label: "等闸船舶",
+          value: "等闸船舶"
+        },
+        {
+          label: "已过闸船舶",
+          value: "已过闸船舶"
+        },
+        {
+          label: "到港待卸船舶",
+          value: "到港待卸船舶"
+        }
       ],
       value: null,
       // 车辆表格表头
@@ -111,71 +113,85 @@ export default {
         {
           prop: "foreignShipName",
           label: "外轮船名",
-          width: "140",
-        },{
+          width: "140"
+        },
+        {
           prop: "materialName",
           label: "物资名称",
-          width: "140",
+          width: "140"
         },
         {
           prop: "capacityName",
           label: "江船船名",
-          width: "140",
+          width: "140"
         },
         {
           prop: "locationRouteTime",
           label: "离港日期",
           width: "200",
-          slot: true,
+          slot: true
         },
         {
           prop: "startPortName",
           label: "起运港",
-          width: "140",
+          width: "140"
         },
         {
           prop: "shipLocation",
           label: "船舶位置",
           width: "130",
-          slot: true,
+          slot: true
         },
         {
           prop: "locationStatus",
           label: "位置状态",
           width: "180",
-          slot: true,
+          slot: true
         },
-        
+
         {
           prop: "arrivePortName",
           label: "到达港",
-          width: "140",
+          width: "140"
         },
         {
           prop: "planWeight",
           label: "计划吨",
-          width: "100",
+          width: "100"
         },
         {
           prop: "realWeight",
           label: "实际吨",
-          width: "100",
+          width: "100"
         },
         {
           prop: "locationMemo",
           label: "备注",
-          width: "140",
-        },
+          width: "140"
+        }
       ],
-      selectionList: [],
+      selectionList: []
     };
   },
   created() {
     this.initialization();
   },
   methods: {
+    onblur(scope) {
+      console.log("我是交了");
+      console.log(scope);
+      this.axios
+        .post(
+          "/api/v1/tms/getShipLocationStatus?shipLocation=" +
+            scope.row.shipLocation
+        )
+        .then(res => {
+          console.log(res.data.data);
+          scope.row.locationStatus = res.data.data.locationStatus;
+        });
+    },
     initialization() {
-      this.axios.post("/api/v1/tms/getShipLocationList").then((res) => {
+      this.axios.post("/api/v1/tms/getShipLocationList").then(res => {
         if (res.data.code == "200") {
           this.selectionList = res.data.data;
         }
@@ -185,34 +201,32 @@ export default {
       this.value = sjTime(this.value);
       this.axios
         .post("/api/v1/tms/getShipLocationList", { dayTime: this.value })
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.selectionList = res.data.data;
           }
         });
     },
     click(row) {
-      let locationRouteTime = sjTime(row.locationRouteTime)
-      row.locationRouteTime = locationRouteTime
-       this.axios
-        .post("/api/v1/tms/updateShipLocation",row)
-        .then((res) => {
-          if (res.data.code == "200") {
-             this.$message({
-              type: "success",
-              message: "保存成功!",
-            });
-            this.initialization();
-          }
-        });
-    },
-  },
+      let locationRouteTime = sjTime(row.locationRouteTime);
+      row.locationRouteTime = locationRouteTime;
+      this.axios.post("/api/v1/tms/updateShipLocation", row).then(res => {
+        if (res.data.code == "200") {
+          this.$message({
+            type: "success",
+            message: "保存成功!"
+          });
+          this.initialization();
+        }
+      });
+    }
+  }
 };
 </script>
-<style lang='scss'>
+<style lang="scss">
 .homeworkPath {
   .top {
     padding: 1.25rem 1.875rem;
   }
 }
-</style>
+</style>

+ 38 - 31
src/views/TMS/components/importedShip/unloadShip.vue

@@ -2,10 +2,16 @@
   <!-- 卸船作业页面 -->
   <div class="shipTransport">
     <div class="top">
-      <el-input class="el-input" placeholder="请输入内容" v-model="input" clearable> </el-input>
-      <el-button type="primary" class="btn" @click="onclick">
-        <i class="el-icon-search"></i>查询
-      </el-button>
+      <el-input
+        class="el-input"
+        placeholder="请输入内容"
+        v-model="input"
+        clearable
+      >
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
       <el-button type="primary" class="btn" @click="addclick">
         <i class="el-icon-circle-plus-outline"></i>新增
       </el-button>
@@ -16,12 +22,12 @@
           <el-button @click="click(scope.row.resultId)" type="text" size="small"
             >编辑</el-button
           >
-          <el-button
+          <!-- <el-button
             type="text"
             size="small"
             @click="deleteclick(scope.row.resultId)"
             >删除</el-button
-          >
+          > -->
         </template>
       </el-table-column>
     </dilTable>
@@ -37,15 +43,15 @@ export default {
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/tms/getUnLoadShipList?apiId=68",
-      },
+        requestUrl: "/api/v1/tms/getUnLoadShipList?apiId=68"
+      }
     };
   },
-  mounted() {
-  },
+  mounted() {},
   methods: {
     onclick() {
-      this.option.requestUrl = "/api/v1/tms/getUnLoadShipList?apiId=68&con=" + this.input;
+      this.option.requestUrl =
+        "/api/v1/tms/getUnLoadShipList?apiId=68&con=" + this.input;
     },
     click(resultId) {
       this.$router.push("/updateUnloadShip/" + resultId);
@@ -59,43 +65,44 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post(
-              "/api/v1/shipTms/tmsshipunloadshipresults/deleteUnLoadShip/" + resultId
+              "/api/v1/shipTms/tmsshipunloadshipresults/deleteUnLoadShip/" +
+                resultId
             )
             .then(() => {
               this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
+                type: "success",
+                message: "删除成功!"
+              });
               this.$router.go(0);
             });
         })
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .shipTransport {
   .top {
-     padding: 1.25rem 0.375rem;
-     .el-input{
-       width: 20%;
-       margin-right: 40rpx;
-     }
-     .btn{
-       width: 5.5%;
-       margin-left: 0.25rem;
-     }
-}
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 40rpx;
+    }
+    .btn {
+      width: 5.5%;
+      margin-left: 0.25rem;
+    }
+  }
 }
-</style>
+</style>

+ 96 - 56
src/views/TMS/components/importedShip/updateUnloadShip.vue

@@ -4,8 +4,8 @@
     <page-title>返回</page-title>
     <div class="form">
       <div class="form_box">
-          <dil-form :formId="134" v-model="form1" ref="from1"></dil-form>
-      </div> 
+        <dil-form :formId="134" v-model="form1" ref="from1"></dil-form>
+      </div>
     </div>
     <!-- 确定和取消 -->
     <div class="button_box">
@@ -20,26 +20,50 @@ import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
 export default {
   components: { PageTitle },
- data(){
-     return {
-      form1: {},
-  }
- },
+  data() {
+    return {
+      form1: {}
+    };
+  },
+  computed: {
+    a1() {
+      return this.form1.resultEndTime;
+    }
+  },
+  watch: {
+    a1() {
+      this.unloadShipMes();
+    }
+  },
   mounted() {
     this.information();
   },
   methods: {
+    unloadShipMes() {
+      if (
+        typeof this.form1.resultStartTime == "undefined" ||
+        this.form1.resultStartTime == null ||
+        this.form1.resultStartTime == "null" ||
+        this.form1.resultStartTime == "undefined"
+      ) {
+        this.$message.warning("请先填写卸船开始时间!");
+        this.form1.resultEndTime = null;
+      }
+      return;
+    },
     information() {
       //编辑卸船作业
       this.axios
         .post("/api/v1/tms/getUnloadShip/" + this.$route.params.resultId)
-        .then((res) => {
-          res.data.data.forEach((e) => {
-            this.form1 = e;
-            // console.log(e);
-            // console.log(this.form1);
-            // console.log(this.$route.params.loadingId);
-          });
+        .then(res => {
+          if (res.data.data[0] != null) {
+            res.data.data.forEach(e => {
+              this.form1 = e;
+              // console.log(e);
+              // console.log(this.form1);
+              // console.log(this.$route.params.loadingId);
+            });
+          }
         });
     },
     handleCheckedCitiesChange(value) {
@@ -54,63 +78,79 @@ export default {
     },
     // 确认
     onClickConfirm() {
+      if (
+        this.form1.resultEndTime != null &&
+        this.form1.resultEndTime != "undefined" &&
+        typeof this.form1.resultEndTime != "undefined" &&
+        this.form1.resultEndTime != "null"
+      ) {
+        this.unloadShipMes();
+      }
+      let resultArrivalDate = null;
+      let resultStartTime = null;
+      let resultEndTime = null;
+      if (
+        typeof this.form1.resultArrivalDate != "undefined" &&
+        this.form1.resultArrivalDate != null
+      ) {
+        resultArrivalDate = sjTime(this.form1.resultArrivalDate);
+      }
+      if (
+        typeof this.form1.resultStartTime != "undefined" &&
+        this.form1.resultStartTime != null
+      ) {
+        resultStartTime = sjTime(this.form1.resultStartTime);
+      }
+      if (
+        typeof this.form1.resultEndTime != "undefined" &&
+        this.form1.resultEndTime != null
+      ) {
+        resultEndTime = sjTime(this.form1.resultEndTime);
+      }
       let unloadMap = {
         resultId: this.$route.params.resultId,
-        resultArrivalDate: sjTime(
-          this.form1.resultArrivalDate
-        ),
-        resultStartTime: sjTime(
-          this.form1.resultStartTime
-        ),
-        resultEndTime: sjTime(
-          this.form1.resultEndTime
-        ),
-        resultStatus: this.form1.resultStatus,
+        resultArrivalDate: resultArrivalDate,
+        resultStartTime: resultStartTime,
+        resultEndTime: resultEndTime,
+        resultStatus: this.form1.resultStatus
       };
-      console.log(unloadMap);
-      this.axios
-        .post(
-          "/api/v1/tms/updateUnLoadShip",
-          unloadMap
-        )
-        .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "修改成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("修改失败!");
-          }
-          this.$refs['table'].resetField();
-        });
-    },
-  },
+      this.axios.post("/api/v1/tms/updateUnLoadShip", unloadMap).then(res => {
+        if (res.data.code == 200) {
+          this.$message({
+            type: "success",
+            message: "修改成功!"
+          });
+          // this.$refs.table.refreshData();
+          this.$router.go(-1);
+        } else {
+          this.$message.error("修改失败!");
+        }
+      });
+    }
+  }
 };
 </script>
 <style lang="scss">
-.shipTransport{
-  .form{
+.shipTransport {
+  .form {
     display: flex;
-    .form_box{
+    .form_box {
       width: 320px;
       margin-left: 35%;
       margin-top: 30px;
       margin-right: 20px;
-      .el-form{
-        .preview-group{
-          .el-form-item{
-            .el-form-item__label{
+      .el-form {
+        .preview-group {
+          .el-form-item {
+            .el-form-item__label {
               display: inline-block;
               width: 70px !important;
             }
-            .el-form-item__content{
-              .el-select{
+            .el-form-item__content {
+              .el-select {
                 width: 250px;
               }
-              .el-input{
+              .el-input {
                 width: 250px;
               }
             }
@@ -119,7 +159,7 @@ export default {
       }
     }
   }
-  .button_box{
+  .button_box {
     margin-left: 45%;
   }
 }

+ 28 - 9
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -24,12 +24,12 @@
         </el-autocomplete>
       </el-form-item>
       <el-form-item>
-        <label class="el-form-item__label" style="width: auto;">收货单位</label>
+        <label class="el-form-item__label" style="width: auto;">下单客户</label>
         <el-autocomplete
           class="inline-input"
           v-model="consigneeName"
           :fetch-suggestions="querySearchConsignee"
-          placeholder="请输入收货单位名称"
+          placeholder="请输入下单客户名称"
           :trigger-on-focus="false"
           @select="handleSelectConsignee"
         >
@@ -252,6 +252,7 @@
         style="width: 100%"
         :span-method="cellMerge"
         highlight-current-row
+        @cell-click="goclick"
       >
         <el-table-column
           v-for="(item, i) in tableTop"
@@ -261,6 +262,7 @@
           :width="item.width"
           align="center"
           show-overflow-tooltip
+          @blur="onblur"
         >
           <template slot="scope" v-if="item.label !== '物资名称'">
             <span>{{ item.label }}</span>
@@ -291,7 +293,10 @@
                   disabled
                 >
                 </el-input>
-                <el-button type="primary" @click="changeMaterial(scope.$index)"
+                <el-button
+                  type="primary"
+                  @click="changeMaterial(scope.$index)"
+                  v-if="isCellClick == 1"
                   >更改</el-button
                 >
               </template>
@@ -341,6 +346,7 @@
                 <el-button
                   type="primary"
                   @click="ondrawer(scope.row, scope.$index)"
+                  v-if="isCellClick == 1"
                   >选择</el-button
                 >
               </template>
@@ -583,7 +589,7 @@
         </el-form-item>
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;"
-            >收货单位:</label
+            >下单客户:</label
           >
           <el-tag size="big">{{ consigneeName }}</el-tag>
         </el-form-item>
@@ -648,6 +654,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isCellClick: 0,
       truckRemark: "",
       shipperName: "四川省达州钢铁集团有限责任公司",
       shipperId: 1,
@@ -892,6 +899,14 @@ export default {
     this.getAllsaleMan();
   },
   methods: {
+    onblur() {
+      this.isCellClick = 0;
+      console.log("我这里值也变化了");
+    },
+    goclick() {
+      this.isCellClick = 1;
+      console.log("我这里值变化了");
+    },
     rowDbClick1(row) {
       this.selectedMaterialId = row.materialId;
       this.selectedMaterialName = row.materialName;
@@ -976,7 +991,7 @@ export default {
       };
     },
     //以上是发货单位边输边查搜索
-    //收货单位弹出层
+    //下单客户弹出层
     handleSelectConsignee(item) {
       this.consigneeName = item.consigneeCompanyName;
       this.consigneeId = item.consigneeId;
@@ -1004,7 +1019,7 @@ export default {
           this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
         });
     },
-    //以下是收货单位边输边查搜索
+    //以下是下单客户边输边查搜索
     querySearchConsignee(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
@@ -1030,15 +1045,15 @@ export default {
         );
       };
     },
-    //以上是收货单位边输边查搜索
+    //以上是下单客户边输边查搜索
     //新增物资
     addMaterial() {
       if (!this.shipperName) {
         this.$message.warning("发货单位未填写!");
       } else if (!this.consigneeName) {
-        this.$message.warning("收货单位未填写!");
+        this.$message.warning("下单客户未填写!");
       } else if (!this.consigneeId) {
-        this.$message.error("请选择一个收货单位下拉框中的选项!");
+        this.$message.error("请选择一个下单客户下拉框中的选项!");
       } else if (!this.saleMan) {
         this.$message.warning("业务员未选择!");
       } else {
@@ -1132,10 +1147,12 @@ export default {
       this.materialNameText = null;
       this.materialSpecificationText = null;
       this.materialModelText = null;
+      this.onblur();
     },
     //删除物资行数据
     deleteMaterialRow(index, rows) {
       rows.splice(index, 1);
+      this.onblur();
     },
     //删除一车数据
     deleteRow(index, rows) {
@@ -1287,6 +1304,7 @@ export default {
         this.maxCxh += 1;
         //调用记录每一行的合并数的方法
         this.getSpanArr(this.selectionList);
+        this.onblur();
       }
     },
     //更改行物资
@@ -1385,6 +1403,7 @@ export default {
           (this.materialSpecificationText = null),
           (this.materialModelText = null);
         this.$message.success("成功更改!");
+        this.onblur();
       }
     },
     //记录每一行的合并数

+ 31 - 31
src/views/appoint/components/saleContract/addSaleOrderSteelSend.vue

@@ -28,13 +28,13 @@
           <template slot="scope" v-if="item.label !== '件数'">
             <span>{{ item.label }}</span>
           </template>
-          <template slot="scope" v-if="item.label !== '运输线路'">
+          <!-- <template slot="scope" v-if="item.label !== '运输线路'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '运输单价'">
             <span>{{ item.label }}</span>
-          </template>
-          <template slot="scope" v-if="item.label !== '截止日期'">
+          </template> -->
+          <template slot="scope" v-if="item.label !== '订单有效期'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '收货客户'">
@@ -112,11 +112,11 @@
                 ></el-input>
               </template>
 
-              <!-- 运输单价id -->
+              <!-- 运输单价id
               <template v-if="item.prop == 'priceValue'">
                 <el-input v-model="scope.row.priceValue" disabled> </el-input>
-              </template>
-              <!-- 截止日期 -->
+              </template> -->
+              <!-- 订单有效期 -->
               <template v-if="item.prop == 'saleDateOfReceipt'">
                 <el-date-picker
                   class="textinput3"
@@ -127,14 +127,14 @@
                 ></el-date-picker>
               </template>
               <!-- 收货客户 -->
-              <template v-if="item.prop == 'saleOrderConsignee'">
+              <!-- <template v-if="item.prop == 'saleOrderConsignee'">
                 <el-input
                   class="textinput4"
                   placeholder="(非必填)"
                   v-model.number="scope.row.saleOrderConsignee"
                   disabled
                 ></el-input>
-              </template>
+              </template> -->
               <!-- 收货客户电话号码 -->
               <template v-if="item.prop == 'saleOrderConsigneeTel'">
                 <el-input
@@ -242,14 +242,14 @@ export default {
           width: "80",
           slot: true
         },
-        {
-          prop: "lineName",
-          label: "厂内运输线路",
-          width: "220"
-        },
+        // {
+        //   prop: "lineName",
+        //   label: "厂内运输线路",
+        //   width: "220"
+        // },
         {
           prop: "saleDateOfReceipt",
-          label: "截止日期",
+          label: "订单有效期",
           width: "150",
           slot: true
         },
@@ -258,29 +258,29 @@ export default {
           label: "收货地址",
           width: "300"
         },
-        {
-          prop: "priceValue",
-          label: "运输单价",
-          width: "80",
-          slot: true
-        },
-        {
-          prop: "saleOrderConsignee",
-          label: "收货客户",
-          width: "150",
-          slot: true
-        },
+        // {
+        //   prop: "priceValue",
+        //   label: "运输单价",
+        //   width: "80",
+        //   slot: true
+        // },
+        // {
+        //   prop: "saleOrderConsignee",
+        //   label: "收货客户",
+        //   width: "150",
+        //   slot: true
+        // },
         {
           prop: "saleOrderConsigneeTel",
           label: "收货客户电话号码",
           slot: true,
           width: "150"
         },
-        {
-          prop: "materialCode",
-          label: "物资编码",
-          width: "140"
-        },
+        // {
+        //   prop: "materialCode",
+        //   label: "物资编码",
+        //   width: "140"
+        // },
         {
           prop: "truckRemark",
           label: "备注",

+ 3 - 3
src/views/appoint/components/saleContract/addSaleOrderSteelSendCarrier.vue

@@ -34,7 +34,7 @@
           <template slot="scope" v-if="item.label !== '运输单价'">
             <span>{{ item.label }}</span>
           </template>
-          <template slot="scope" v-if="item.label !== '截止日期'">
+          <template slot="scope" v-if="item.label !== '订单有效期'">
             <span>{{ item.label }}</span>
           </template>
           <template slot="scope" v-if="item.label !== '收货客户'">
@@ -115,7 +115,7 @@
               <template v-if="item.prop == 'priceValue'">
                 <el-input v-model="scope.row.priceValue" disabled> </el-input>
               </template>
-              <!-- 截止日期 -->
+              <!-- 订单有效期 -->
               <template v-if="item.prop == 'saleDateOfReceipt'">
                 <el-date-picker
                   class="textinput3"
@@ -237,7 +237,7 @@ export default {
         },
         {
           prop: "saleDateOfReceipt",
-          label: "截止日期",
+          label: "订单有效期",
           width: "150",
           slot: true
         },

+ 31 - 9
src/views/appoint/components/saleContract/editSaleOrder.vue

@@ -24,12 +24,12 @@
         </el-autocomplete>
       </el-form-item>
       <el-form-item>
-        <label class="el-form-item__label" style="width: auto;">收货单位</label>
+        <label class="el-form-item__label" style="width: auto;">下单客户</label>
         <el-autocomplete
           class="inline-input"
           v-model="consigneeName"
           :fetch-suggestions="querySearchConsignee"
-          placeholder="请输入收货单位名称"
+          placeholder="请输入下单客户名称"
           :trigger-on-focus="false"
           @select="handleSelectConsignee"
         >
@@ -257,6 +257,7 @@
         border
         style="width: 100%"
         :span-method="cellMerge"
+        @cell-click="goclick"
         highlight-current-row
       >
         <el-table-column
@@ -297,7 +298,10 @@
                   disabled
                 >
                 </el-input>
-                <el-button type="primary" @click="changeMaterial(scope.$index)"
+                <el-button
+                  type="primary"
+                  @click="changeMaterial(scope.$index)"
+                  v-if="isCellClick == 1"
                   >更改</el-button
                 >
               </template>
@@ -347,6 +351,7 @@
                 <el-button
                   type="primary"
                   @click="ondrawer(scope.row, scope.$index)"
+                  v-if="isCellClick == 1"
                   >选择</el-button
                 >
               </template>
@@ -562,7 +567,7 @@
         </el-form-item>
         <el-form-item>
           <label class="el-form-item__label" style="width: auto;"
-            >收货单位:</label
+            >下单客户:</label
           >
           <el-tag size="big">{{ consigneeName }}</el-tag>
         </el-form-item>
@@ -627,6 +632,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      isCellClick: null,
       truckRemark: "",
       shipperName: "四川省达州钢铁集团有限责任公司",
       shipperId: 1,
@@ -879,6 +885,14 @@ export default {
     this.getAllSaleMessages();
   },
   methods: {
+    onblur() {
+      this.isCellClick = 0;
+      console.log("我这里值也变化了");
+    },
+    goclick() {
+      this.isCellClick = 1;
+      console.log("我这里值变化了");
+    },
     rowDbClick(row) {
       this.materialList1 = [];
       this.materialList1.push(row);
@@ -1046,7 +1060,7 @@ export default {
       };
     },
     //以上是发货单位边输边查搜索
-    //收货单位弹出层
+    //下单客户弹出层
     handleSelectConsignee(item) {
       this.consigneeName = item.consigneeCompanyName;
       this.consigneeId = item.consigneeId;
@@ -1074,7 +1088,7 @@ export default {
           this.saleOrderConsigneeTel = place[0].saleOrderConsigneeTel;
         });
     },
-    //以下是收货单位边输边查搜索
+    //以下是下单客户边输边查搜索
     querySearchConsignee(queryString, cb) {
       this.axios
         .post("/api/v1/uc/getConsigneeByLike?index=" + queryString)
@@ -1100,15 +1114,15 @@ export default {
         );
       };
     },
-    //以上是收货单位边输边查搜索
+    //以上是下单客户边输边查搜索
     //新增物资
     addMaterial() {
       if (!this.shipperName) {
         this.$message.warning("发货单位未填写!");
       } else if (!this.consigneeName) {
-        this.$message.warning("收货单位未填写!");
+        this.$message.warning("下单客户未填写!");
       } else if (!this.consigneeId) {
-        this.$message.error("请选择一个收货单位下拉框中的选项!");
+        this.$message.error("请选择一个下单客户下拉框中的选项!");
       } else if (!this.saleMan) {
         this.$message.warning("业务员未选择!");
       } else {
@@ -1124,6 +1138,7 @@ export default {
     },
     //确认新增物资
     makeSureMaterial() {
+      this.onblur();
       //记录是理重还是磅重
       var getisPound = 1;
       this.materialList1.forEach(e => {
@@ -1205,9 +1220,11 @@ export default {
     //删除物资行数据
     deleteMaterialRow(index, rows) {
       rows.splice(index, 1);
+      this.onblur();
     },
     //删除一车数据
     deleteRow(index, rows) {
+      this.onblur();
       //删除车序号相同的行
       if (this.spanArr[index] == 1) {
         //动态调整车序号
@@ -1225,6 +1242,7 @@ export default {
     },
     //准备生成部分订单
     createACar() {
+      this.onblur();
       let i = 0;
       this.materialList.forEach(e => {
         if (!/(^[1-9]\d*$)/.test(e.meterNumber) && e.meterNumber != null) {
@@ -1284,6 +1302,7 @@ export default {
     },
     //添加物资到订单
     addMaterialToSaleOrder() {
+      this.onblur();
       if (this.materialList.length == 0) {
         this.$message.warning("请至少为这一车添加一个物资!");
       } else if (!this.saleShipperAddressName && this.values == "no") {
@@ -1356,6 +1375,7 @@ export default {
     },
     // 添加物资到某个车序号
     addToCxh() {
+      this.onblur();
       console.log("wkk");
       if (!this.toCxh) {
         this.$message.warning("请先在左侧输入要添加物资的车序号!");
@@ -1365,6 +1385,7 @@ export default {
     },
     //添加物资到某个车序号
     addMaterialToCxh(toCxh) {
+      this.onblur();
       let i = 0;
       this.materialList.forEach(e => {
         if (!/(^[1-9]\d*$)/.test(e.meterNumber) && e.meterNumber != null) {
@@ -1507,6 +1528,7 @@ export default {
     },
     //确认物资修改
     makeSureChange() {
+      this.onblur();
       if (!this.selectedMaterialId) {
         this.$message.warning("请先选择一个物资!");
       } else {

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

@@ -158,10 +158,10 @@
         <el-table-column fixed="right" label="操作" width="200">
           <template slot-scope="scope">
             <el-button type="text" size="mini" @click="updateMaterial(scope)">
-              物资异常
+              物资变更
             </el-button>
             <el-button type="text" size="mini" @click="updateAddress(scope)">
-              收货地址异常
+              收货地址变更
             </el-button>
           </template>
         </el-table-column>
@@ -279,6 +279,9 @@
     <div class="addressDialog">
       <!-- 收货地址弹出框 -->
       <el-dialog title="收货地址" :visible.sync="addressDialog" width="90%">
+        <div style="magin-bottom:20px,color: red;">
+          原收货地址:{{ oldAddress }}
+        </div>
         <div class="addressItem">
           <el-form :inline="true">
             <el-form-item>
@@ -364,6 +367,7 @@ export default {
       currentTable: false,
       title: "",
       capacityNumber: null,
+      oldAddress: null,
       //是否磅重销售
       options2: [
         {
@@ -485,7 +489,9 @@ export default {
   },
   methods: {
     updateAddress(scope) {
+      console.log(scope);
       this.capacityNumber = scope.row.capacityNumber;
+      this.oldAddress = scope.row.completeAddress;
       this.orderSaleMap = scope.row;
       console.log(this.orderSaleMap);
       let title = `请选择对-${scope.row.capacityNumber}-进行的操作?`;

+ 31 - 1
src/views/appoint/components/ship/addDeliveryAttorney.vue

@@ -66,13 +66,43 @@ export default {
       value2: undefined
     };
   },
+  computed: {
+    a1() {
+      return this.form1.attorneyPickupContactPerson;
+    }
+  },
+  watch: {
+    a1() {
+      this.getPersonInfo();
+    }
+  },
   created() {
     this.form1 = {
-      downSwimPortId: 11
+      downSwimPortId: 11,
+      attorneyTime: new Date()
     };
   },
   mounted() {},
   methods: {
+    getPersonInfo() {
+      console.log(this.form1);
+      console.log("我尽力了");
+      this.axios
+        .post(
+          "/api/v1/tms/getPersonByName?personName=" +
+            this.form1.attorneyPickupContactPerson
+        )
+        .then(res => {
+          console.log(this.form1);
+          this.$set(this.form1, "attorenyPickupIdcard", res.data.data.personId);
+          this.$set(
+            this.form1,
+            "attorneyContactTelephone",
+            res.data.data.personPhone
+          );
+          console.log(this.form1);
+        });
+    },
     onDrawer() {
       this.drawer = true;
     },

+ 39 - 53
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -2,11 +2,6 @@
   <div>
     <div class="shipReport">
       <div class="title">船舶动态表</div>
-      <div>
-        <el-button type="primary" @click="gotoexcel()"
-          ><i class="el-icon-download"></i>导出(Excel)</el-button
-        >
-      </div>
       <table-item :tableData="tableData" :col="col"> </table-item>
     </div>
   </div>
@@ -17,116 +12,120 @@ import tableItem from "./tableItem";
 export default {
   name: "TableView",
   components: {
-    tableItem,
+    tableItem
   },
   data() {
     return {
       tableTitle: "船舶动态表",
       // 树型结构表头数据
       col: [
+        {
+          prop: "materialType",
+          label: "矿种"
+        },
         {
           prop: "pm",
-          label: "品名",
+          label: "品名"
         },
         {
           prop: "portName",
-          label: "港口名称",
+          label: "港口名称"
         },
         {
           prop: "tonnage",
-          label: "下游港口吨位",
+          label: "下游港口吨位"
         },
         {
           label: "未到闸船舶",
           children: [
             {
               prop: "capacity1",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber1",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue1",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime1",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "等闸船舶",
           children: [
             {
               prop: "capacity2",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber2",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue2",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime2",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "已过闸船舶",
           children: [
             {
               prop: "capacity3",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber3",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue3",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime3",
-              label: "离港时间",
-            },
-          ],
+              label: "离港时间"
+            }
+          ]
         },
         {
           label: "到港待卸船舶",
           children: [
             {
               prop: "capacity4",
-              label: "船名",
+              label: "船名"
             },
             {
               prop: "capacityNumber4",
-              label: "吨位",
+              label: "吨位"
             },
             {
               prop: "locationValue4",
-              label: "位置",
+              label: "位置"
             },
             {
               prop: "outPortTime4",
-              label: "离港时间",
+              label: "离港时间"
             },
             {
               prop: "dgsj",
-              label: "到港时间",
-            },
-          ],
-        },
+              label: "到港时间"
+            }
+          ]
+        }
       ],
       // 表格数据
-      tableData: [],
+      tableData: []
     };
   },
   created() {},
@@ -135,33 +134,20 @@ export default {
     console.log(this.$refs.excelDom);
   },
   methods: {
-    gotoexcel() {
-      let _this = this;
-      let result = JSON.parse(JSON.stringify(_this.tableData));
-      console.log(result);
-      result.unshift({
-        pm: "品名",
-        portName: "港口名称",
-        tonnage: "下游港口吨位",
-        capacity1: "船名",
-        capacityNumber1: "吨位",
-        locationValue1: "位置",
-      });
-    },
     initialization() {
-      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then((res) => {
+      this.axios.post("/api/v1/tms/selectAllShipDynamaics").then(res => {
         if (res.data.code == "200") {
           this.tableData = res.data.data;
           console.log(this.tableData);
         } else {
           this.$message({
             type: "warning",
-            message: res.data.data,
+            message: res.data.data
           });
         }
       });
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 73 - 40
src/views/statisticalReport/components/tableItem.vue

@@ -1,39 +1,40 @@
 <template>
   <div>
     <el-table
-      :show-summary='isShowSum'
-      :data='tableData'
-      :height='height'
-      style='width: 100%'
+      :show-summary="isShowSum"
+      :data="tableData"
+      :height="height"
+      style="width: 100%"
       :span-method="objectSpanMethod"
       :border="true"
+      :header-cell-style="headerCellStyle"
     >
       <el-table-column
-        v-if='isShowBox'
-        type='selection'
-        width='50'
-        align='center'
+        v-if="isShowBox"
+        type="selection"
+        width="50"
+        align="center"
       >
       </el-table-column>
       <template>
         <column-item
-          v-for='item in col'
-          :key='item.label'
-          :col='item'
+          v-for="item in col"
+          :key="item.label"
+          :col="item"
         ></column-item>
       </template>
       <template #empty>
-        <div class='empty' style='height:12.5rem;'>
-          <span class='empty-desc'>暂无数据</span>
+        <div class="empty" style="height:12.5rem;">
+          <span class="empty-desc">暂无数据</span>
         </div>
       </template>
     </el-table>
   </div>
 </template>
 <script>
-import ColumnItem from './columnItem'
+import ColumnItem from "./columnItem";
 export default {
-  name: 'TableItem',
+  name: "TableItem",
   components: {
     ColumnItem
   },
@@ -56,12 +57,12 @@ export default {
     // 判断单元格文字是居中还是左对齐显示,默认居中
     alignType: {
       type: String,
-      default: 'center'
+      default: "center"
     },
     // 设置表格高度,固定表头
     height: {
       type: String,
-      default: null// 默认不固定表头
+      default: null // 默认不固定表头
     },
     // 判断是否显示多选框
     isShowBox: {
@@ -70,63 +71,95 @@ export default {
     }
   },
   methods: {
-    flitterData (arr) {
-      var spanOneArr = []
-      let concatOne = 0
+    headerCellStyle({ row, column, rowIndex, columnIndex }) {
+      let columnIndexList1 = [4];
+      let columnIndexList2 = [5];
+      let columnIndexList3 = [6];
+      let columnIndexList4 = [7];
+      if (columnIndexList1.includes(columnIndex) && rowIndex == 0) {
+        //如果有多个css样式,使用;隔开
+        return "color:#fff;cursor: pointer;background-color:red !important";
+      }
+      if (columnIndexList2.includes(columnIndex) && rowIndex == 0) {
+        //如果有多个css样式,使用;隔开
+        return "color:#fff;cursor: pointer;background-color:green !important";
+      }
+      if (columnIndexList3.includes(columnIndex) && rowIndex == 0) {
+        //如果有多个css样式,使用;隔开
+        return "color:#fff;cursor: pointer;background-color:blue !important";
+      }
+      if (columnIndexList4.includes(columnIndex) && rowIndex == 0) {
+        //如果有多个css样式,使用;隔开
+        return "color:#000;cursor: pointer;background-color:yellow !important ";
+      }
+    },
+    flitterData(arr) {
+      var spanOneArr = [];
+      let concatOne = 0;
       arr.forEach((item, index) => {
         if (index === 0) {
-          spanOneArr.push(1)
+          spanOneArr.push(1);
         } else {
           // name 修改
-          if (item.batchId === arr[index - 1].batchId) { // 第一列需合并相同内容的判断条件
-            spanOneArr[concatOne] += 1
-            spanOneArr.push(0)
+          if (item.batchId === arr[index - 1].batchId) {
+            // 第一列需合并相同内容的判断条件
+            spanOneArr[concatOne] += 1;
+            spanOneArr.push(0);
           } else {
-            spanOneArr.push(1)
-            concatOne = index
+            spanOneArr.push(1);
+            concatOne = index;
           }
         }
-      })
+      });
       return {
         one: spanOneArr
-      }
+      };
     },
-    objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
       if (columnIndex === 0) {
-        const _row = (this.flitterData(this.tableData).one)[rowIndex]
-        const _col = _row > 0 ? 1 : 0
+        const _row = this.flitterData(this.tableData).one[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
         return {
           rowspan: _row,
           colspan: _col
-        }
+        };
       }
       if (columnIndex === 1) {
         // this.tableData  修改
-        const _row = (this.flitterData(this.tableData).one)[rowIndex]
-        const _col = _row > 0 ? 1 : 0
+        const _row = this.flitterData(this.tableData).one[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
         return {
           rowspan: _row,
           colspan: _col
-        }
+        };
       }
       if (columnIndex === 2) {
         // this.tableData  修改
-        const _row = (this.flitterData(this.tableData).one)[rowIndex]
-        const _col = _row > 0 ? 1 : 0
+        const _row = this.flitterData(this.tableData).one[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
         return {
           rowspan: _row,
           colspan: _col
-        }
+        };
+      }
+      if (columnIndex === 3) {
+        // this.tableData  修改
+        const _row = this.flitterData(this.tableData).one[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
       }
       if (row.type === 1) {
         return {
           rowspan: 1,
           colspan: 17
-        }
+        };
       }
     }
   }
-}
+};
 </script>
 <style>
 /* 处理表格表头和内容错位问题 */