Browse Source

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

luobang 2 years ago
parent
commit
7d37968166

+ 5 - 0
src/views/appoint/components/ship/addDeliveryAttorney.vue

@@ -205,6 +205,11 @@ export default {
           this.form1,
           "batchId",
           selection.resultForeignShipName + selection.materialName
+        );
+         this.$set(
+          this.form1,
+          "attorneyTime",
+          selection.noticeDeliveryTime
         );
         this.batchIds = selection.batchId;
       }

+ 159 - 128
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -3,19 +3,18 @@
     <div class="shipReport">
       <div class="title">船舶动态表</div>
       <div class="top">
-        <!-- <el-input
-          class="el-input"
-          placeholder="请输入品名"
-          v-model="input"
-          clearable
-        >
-        </el-input>
-        <el-button type="primary" class="btn" @click="onclick">
+        <el-date-picker
+          v-model="endTime"
+          @change="DateChange"
+          type="datetime"
+          placeholder="选择截止时间">
+        </el-date-picker>
+        <!-- <el-button type="primary" class="btn" @click="onclick">
           <i class="el-icon-search"></i>查询
         </el-button> -->
-        <el-button type="primary" class="btn" @click="reflush">
+        <!-- <el-button type="primary" class="btn" @click="reflush">
           <i class="el-icon-search"></i>刷新
-        </el-button>
+        </el-button> -->
         <el-button type="primary" class="btn" @click="getPdfs()">
           <i class="el-icon-download"></i>下载PDF
         </el-button>
@@ -23,7 +22,7 @@
           <i class="el-icon-download"></i>下载Excel
         </el-button>
       </div>
-      <table-item ref="ship" :tableData="tableData" :col="col" id="pdfDom">
+      <table-item ref="ship" v-bind.sync="option" id="pdfDom">
       </table-item>
     </div>
   </div>
@@ -40,117 +39,121 @@ export default {
   },
   data() {
     return {
+      endTime:null,
+      option:{
+        endTime:null,
+        deadline:null,
+           // 树型结构表头数据
+        col: [
+          {
+            prop: 'materialType',
+            label: '矿种'
+          },
+          {
+            prop: 'pm',
+            label: '品名'
+          },
+          {
+            prop: 'portName',
+            label: '港口名称'
+          },
+          {
+            prop: 'tonnage',
+            label: '下游港口吨位'
+          },
+          {
+            label: '未到闸船舶',
+            children: [
+              {
+                prop: 'capacity1',
+                label: '船名'
+              },
+              {
+                prop: 'capacityNumber1',
+                label: '吨位'
+              },
+              {
+                prop: 'locationValue1',
+                label: '位置'
+              },
+              {
+                prop: 'outPortTime1',
+                label: '离港时间'
+              }
+            ]
+          },
+          {
+            label: '等闸船舶',
+            children: [
+              {
+                prop: 'capacity2',
+                label: '船名'
+              },
+              {
+                prop: 'capacityNumber2',
+                label: '吨位'
+              },
+              {
+                prop: 'locationValue2',
+                label: '位置'
+              },
+              {
+                prop: 'outPortTime2',
+                label: '离港时间'
+              }
+            ]
+          },
+          {
+            label: '已过闸船舶',
+            children: [
+              {
+                prop: 'capacity3',
+                label: '船名'
+              },
+              {
+                prop: 'capacityNumber3',
+                label: '吨位'
+              },
+              {
+                prop: 'locationValue3',
+                label: '位置'
+              },
+              {
+                prop: 'outPortTime3',
+                label: '离港时间'
+              }
+            ]
+          },
+          {
+            label: '到港待卸船舶',
+            children: [
+              {
+                prop: 'capacity4',
+                label: '船名'
+              },
+              {
+                prop: 'capacityNumber4',
+                label: '吨位'
+              },
+              {
+                prop: 'locationValue4',
+                label: '位置'
+              },
+              {
+                prop: 'outPortTime4',
+                label: '离港时间'
+              },
+              {
+                prop: 'dgsj',
+                label: '到港时间'
+              }
+            ]
+          }
+        ],
+        // 表格数据
+        tableData: [],
+      },
       htmlTitle: '船舶动态表',
-      // 树型结构表头数据
-      col: [
-        {
-          prop: 'materialType',
-          label: '矿种'
-        },
-        {
-          prop: 'pm',
-          label: '品名'
-        },
-        {
-          prop: 'portName',
-          label: '港口名称'
-        },
-        {
-          prop: 'tonnage',
-          label: '下游港口吨位'
-        },
-        {
-          label: '未到闸船舶',
-          children: [
-            {
-              prop: 'capacity1',
-              label: '船名'
-            },
-            {
-              prop: 'capacityNumber1',
-              label: '吨位'
-            },
-            {
-              prop: 'locationValue1',
-              label: '位置'
-            },
-            {
-              prop: 'outPortTime1',
-              label: '离港时间'
-            }
-          ]
-        },
-        {
-          label: '等闸船舶',
-          children: [
-            {
-              prop: 'capacity2',
-              label: '船名'
-            },
-            {
-              prop: 'capacityNumber2',
-              label: '吨位'
-            },
-            {
-              prop: 'locationValue2',
-              label: '位置'
-            },
-            {
-              prop: 'outPortTime2',
-              label: '离港时间'
-            }
-          ]
-        },
-        {
-          label: '已过闸船舶',
-          children: [
-            {
-              prop: 'capacity3',
-              label: '船名'
-            },
-            {
-              prop: 'capacityNumber3',
-              label: '吨位'
-            },
-            {
-              prop: 'locationValue3',
-              label: '位置'
-            },
-            {
-              prop: 'outPortTime3',
-              label: '离港时间'
-            }
-          ]
-        },
-        {
-          label: '到港待卸船舶',
-          children: [
-            {
-              prop: 'capacity4',
-              label: '船名'
-            },
-            {
-              prop: 'capacityNumber4',
-              label: '吨位'
-            },
-            {
-              prop: 'locationValue4',
-              label: '位置'
-            },
-            {
-              prop: 'outPortTime4',
-              label: '离港时间'
-            },
-            {
-              prop: 'dgsj',
-              label: '到港时间'
-            }
-          ]
-        }
-      ],
-      // 表格数据
-
-      tableData: [],
       input: '',
       //万州港库存信息
       stockString: null,
@@ -164,6 +167,7 @@ export default {
   },
   created() {},
   mounted() {
+    this.initialDate()
     this.initialization()
     this.getStockString()
     this.getDownStockString()
@@ -175,15 +179,42 @@ export default {
     reflush() {
       this.$router.go(0)
     },
+    initialDate(){
+      let now=new Date();
+      now.setMinutes(0);
+      now.setSeconds(0);
+      if(now.getHours() >=8 && now.getHours() < 18){
+        now.setHours(8);
+      }else if(now.getHours() >= 18){
+        now.setHours(18)
+      }else if(now.getHours() < 8 ){
+        now = new Date(now.getTime()-1000*60*60*24);
+        now.setHours(18)
+      }
+      this.endTime=now;
+      this.DateChange();
+    },
+    DateChange(){
+      this.option.deadline=this.endTime.getFullYear()+'年'+(this.endTime.getMonth()+1)+'月'+this.endTime.getDate()+'日(数据截止于'+this.endTime.getHours()+':'+this.perfix(this.endTime.getMinutes())+')';
+      this.option.endTime=this.endTime.getTime();
+      this.onclick();
+    },
+    perfix(num){
+      let arr=new Array(2).fill('0');
+      return (arr.join()+num).slice(-2);
+    },
     onclick() {
+      let map={
+        oneDate:this.endTime.getTime()
+      }
       this.axios
-        .post('/api/v1/tms/selectAllShipDynamaics?con=' + this.input)
+        .post('/api/v1/tms/selectAllShipDynamaics?con=' + this.input,map)
         .then(res => {
           if (res.data.code == '200') {
-            this.tableData = res.data.data
+            this.option.tableData = res.data.data
             console.log('aaad' + res.data.data)
           } else if (res.data.data == '暂时没有船舶动态') {
-            this.tableData = []
+            this.option.tableData = []
           }
         })
     },
@@ -479,9 +510,9 @@ export default {
     initialization() {
       this.axios.post('/api/v1/tms/selectAllShipDynamaics').then(res => {
         if (res.data.code == '200') {
-          this.tableData = res.data.data
-          console.log('this.tableData:', this.tableData)
-          this.tableData.forEach(item => {
+          this.option.tableData = res.data.data
+          console.log('this.option.tableData:', this.option.tableData)
+          this.option.tableData.forEach(item => {
             try {
               item.tonnage = item.tonnage.toFixed(2)
             } catch (error) {}
@@ -519,7 +550,7 @@ export default {
               }
             } catch (error) {}
           })
-          console.log(this.tableData)
+          console.log(this.option.tableData)
         } else {
           this.$message({
             type: 'warning',

+ 14 - 7
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -1090,7 +1090,7 @@
           ></el-input>
         </el-form-item>
         <el-form-item label="签收地址">
-          <el-input v-model="location" style="width:400px"></el-input>
+          <el-input v-model="location" style="width:400px" :disabled="orgCode!='wuliuyunshubu'"></el-input>
         </el-form-item>
         <el-form-item label="抵达图片(车头、满货箱)" style="">
           <el-upload
@@ -2515,11 +2515,17 @@ export default {
         this.$message.warning('该车未出厂,不允许签收')
         return
       }
-      if (row.arrivalAddress) {
-        this.location = row.arrivalAddress
-      } else {
-        this.location = row.addressPlace
-      }
+      //获取车辆定位
+      this.axios
+        .get('/api/v1/otms/getCurrentLocation?capcityNumber=' + row.newCapacityNo)
+        .then(res => {
+          if (res.data.status=='succeed' && res.data.data.result.status!=1001) {
+            this.location=res.data.data.result.adr;
+          }else{
+            this.location=null;
+            this.$message.warning("获取不到车辆定位!请联系销售公司上传!");
+          }
+      });
       this.orderNumber = row.orderNo
       this.capacityNumber = row.capacityNo
       this.arrivalReceiving = true
@@ -2558,7 +2564,7 @@ export default {
     },
     arrivalAndReceive() {
       if (!this.location) {
-        this.$message.warning('请填写签收地址')
+        this.$message.warning('签收地址必须取车辆定位!若取不到请联系销售公司上传!')
         return
       }
       if (this.fileListArrival.length < 2) {
@@ -2625,6 +2631,7 @@ export default {
       this.dialogVisible = true
     },
     closeUpload() {
+      this.location=null
       this.arrivalReceiving = false
       this.isLoading = false
       this.$refs.arrival.clearFiles()

+ 60 - 33
src/views/statisticalReport/components/tableItem.vue

@@ -288,6 +288,16 @@ export default {
     ColumnItem
   },
   props: {
+    //截止时间戳
+    endTime: {
+      type: String,
+      default:() => ''
+    },
+    //截止时间字符串
+    deadline: {
+      type: String,
+      default:() => ''
+    },
     // 表格数据
     tableData: {
       type: Array,
@@ -332,34 +342,34 @@ export default {
       runStockStringArr: [],
       spanArr: [],
       loadTable: [],
-      controlLinesTable: [],
-      deadline:null
+      controlLinesTable: []
     }
   },
   mounted() {
-    this.getStockString()
-    this.getDownStockString()
-    this.getRunStockList()
-    this.searchLoadData()
-    this.getControlLines()
-    this.initialDate()
+    this.getStockString()//万港
+    this.getDownStockString()//下游
+    this.getRunStockList()//在途
+    this.searchLoadData()//装车
+    this.getControlLines()//控制线
+  },
+  watch:{
+    endTime(){
+        this.getStockString()//万港
+        this.getDownStockString()//下游
+        this.getRunStockList()//在途
+        this.searchLoadData()//装车
+        this.getControlLines()//控制线
+    }
   },
   methods: {
-    initialDate(){
-      let now=new Date();
-      this.deadline=now.getFullYear()+'年'+(now.getMonth()+1)+'月'+now.getDate()+'日';
-      if(now.getHours()>=8&&now.getHours()<18){
-        this.deadline+='(数据截止于8:00)';
-      }else{
-        this.deadline+='(数据截止于18:00)';
-      }
-      console.log("deadline:",this.deadline);
-    },
     getStockString() {
-      let that = this
+      let stockStringArr=[]
+      let map={
+        oneDate:this.endTime
+      }
       this.axios
         .post(
-          '/api/v1/wmsh/getLoadPortStockList?apiId=158&pageSize=1000&pageNum=1'
+          '/api/v1/wmsh/getLoadPortStockList?apiId=158&pageSize=1000&pageNum=1',map
         )
         .then(res => {
           console.log(res)
@@ -397,7 +407,7 @@ export default {
             console.log(arr1, 'arr1')
             let index = 2.1
             arr1.forEach(e => {
-              this.stockStringArr.push({
+              stockStringArr.push({
                 class: 'type',
                 value: `${index.toFixed(1)}${e[0]['type']}${
                   e[0]['typeTotalTonnage']
@@ -405,12 +415,13 @@ export default {
               })
               index = index + 0.1
               e.forEach(e1 => {
-                this.stockStringArr.push({
+                stockStringArr.push({
                   class: 'normal',
                   value: `${e1['materialName']}/“${e1['resultForeignShipName']}”/${e1['gmTonnage']}吨;`
                 })
               })
             })
+            this.stockStringArr=stockStringArr;
             //处理打印字符串
             this.stockString =
               '万港库存:' + this.stockMap.stockTonnage + '吨:'
@@ -421,8 +432,11 @@ export default {
         })
     },
     getDownStockString() {
-      let that = this
-      this.axios.post('/api/v1/wmsh/getDownPortStockList').then(res => {
+      let downStockStringArr=[]
+      let map={
+        oneDate:this.endTime
+      }
+      this.axios.post('/api/v1/wmsh/getDownPortStockList',map).then(res => {
         console.log('下游港口吨位')
         console.log(res.data.data)
         if (res.status == '200') {
@@ -457,7 +471,7 @@ export default {
           console.log(arr1, 'arr1')
           let index = 1.1
           arr1.forEach(e => {
-            this.downStockStringArr.push({
+            downStockStringArr.push({
               class: 'type',
               value: `${index.toFixed(1)}${e[0]['type']}${
                 e[0]['typeTotalTonnage']
@@ -465,12 +479,13 @@ export default {
             })
             index = index + 0.1
             e.forEach(e1 => {
-              this.downStockStringArr.push({
+              downStockStringArr.push({
                 class: 'normal',
                 value: `${e1['portName']}/${e1['materialName']}/“${e1['resultForeignShipName']}”/${e1['gmTonnage']}吨;`
               })
             })
           })
+          this.downStockStringArr=downStockStringArr;
           //处理打印字符串
           this.downStockString =
             '下游港口库存:' + this.downStockMap.downStockTonnage + '吨:'
@@ -481,8 +496,11 @@ export default {
       })
     },
     getRunStockList() {
-      let that = this
-      this.axios.post('/api/v1/wmsh/getRunStockList').then(res => {
+      let runStockStringArr=[]
+      let map={
+        oneDate:this.endTime
+      }
+      this.axios.post('/api/v1/wmsh/getRunStockList',map).then(res => {
         console.log(res)
         if (res.status == '200') {
           let resultActualInstallations = 0
@@ -515,7 +533,7 @@ export default {
           console.log(arr1, 'arr1')
           let index = 3.1
           arr1.forEach(e => {
-            this.runStockStringArr.push({
+            runStockStringArr.push({
               class: 'type',
               value: `${index.toFixed(1)}${e[0]['type']}${
                 e[0]['typeTotalTonnage']
@@ -525,12 +543,13 @@ export default {
             //按物资分
             let temp = [];
             e.forEach(e1 => {
-              this.runStockStringArr.push({
+              runStockStringArr.push({
                 class: 'normal',
                 value: `${e1['materialName']}:/“${e1['resultForeignShipName']}”/${e1['gmTonnage']}吨;`
               })
             })
           })
+          this.runStockStringArr=runStockStringArr;
           //处理打印字符串
           this.runStockString =
             '在途货物:' + this.runStockMap.runStockTonnage + '吨:'
@@ -651,7 +670,14 @@ export default {
     },
     //查询装车数据
     searchLoadData() {
-      let map = {}
+      let startTime=new Date(this.endTime-1000*60*60*24);
+      let endTime=new Date(this.endTime);
+      startTime.setHours(8);
+      endTime.setHours(8);
+      let map = {
+        startTime:startTime.getTime(),
+        endTime:endTime.getTime()
+      }
       this.axios.post('/api/v1/tms/getLoadData', map).then(res => {
         if (res.data.code == '200') {
           this.getSpanArr(res.data.data)
@@ -704,9 +730,10 @@ export default {
     },
     //查询控制线数据
     getControlLines() {
+      let endTime=new Date(this.endTime);
       let map = {
-        year: new Date().getFullYear(),
-        month: new Date().getMonth() + 1
+        year: endTime.getFullYear(),
+        month: endTime.getMonth() + 1
       }
       this.axios.post('/api/v1/tms/getControlLinesTable', map).then(res => {
         if (res.data.code == '200') {