QuKatie 3 年之前
父节点
当前提交
c9575c9602

+ 74 - 0
src/utils/date.js

@@ -0,0 +1,74 @@
+export const calcDate = (date1, date2) => {
+  let date3 = date2 - date1;
+
+  let days = Math.floor(date3 / (24 * 3600 * 1000))
+
+  let leave1 = date3 % (24 * 3600 * 1000) //计算天数后剩余的毫秒数
+  let hours = Math.floor(leave1 / (3600 * 1000))
+
+  let leave2 = leave1 % (3600 * 1000) //计算小时数后剩余的毫秒数
+  let minutes = Math.floor(leave2 / (60 * 1000))
+
+  let leave3 = leave2 % (60 * 1000) //计算分钟数后剩余的毫秒数
+  let seconds = Math.round(date3 / 1000)
+  return {
+    leave1,
+    leave2,
+    leave3,
+    days: days,
+    hours: hours,
+    minutes: minutes,
+    seconds: seconds,
+  }
+}
+
+/**
+ * 日期格式化
+ */
+export function dateFormat(date, format) {
+  format = format || 'yyyy-MM-dd hh:mm:ss';
+  if (date !== 'Invalid Date') {
+    let o = {
+      "M+": date.getMonth() + 1, //month
+      "d+": date.getDate(), //day
+      "h+": date.getHours(), //hour
+      "m+": date.getMinutes(), //minute
+      "s+": date.getSeconds(), //second
+      "q+": Math.floor((date.getMonth() + 3) / 3), //quarter
+      "S": date.getMilliseconds() //millisecond
+    }
+    if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
+      (date.getFullYear() + "").substr(4 - RegExp.$1.length));
+    for (let k in o)
+      if (new RegExp("(" + k + ")").test(format))
+        format = format.replace(RegExp.$1,
+          RegExp.$1.length === 1 ? o[k] :
+          ("00" + o[k]).substr(("" + o[k]).length));
+    return format;
+  }
+  return '';
+
+}
+/**
+ * 获取上月第一天和下月最后一天
+ * type 1为 [yyyy-MM-dd,yyyy-MM-dd]
+ * type 2为 [yyyy-MM-dd 00:00:00,yyyy-MM-dd 23:59:59]
+ * type为空默认2
+ */
+export function defaultDate(type) {
+  type = type ? type : 2
+  const date = new Date();
+  const startDate = new Date(date.getFullYear(), date.getMonth() - 1, 1);
+  const endDate = new Date(date.getFullYear(), date.getMonth() + 2, 0);
+  if (type == 1) {
+    return [
+      dateFormat(startDate, "yyyy-MM-dd"),
+      dateFormat(endDate, "yyyy-MM-dd")
+    ];
+  } else {
+    return [
+      dateFormat(startDate, "yyyy-MM-dd") + " 00:00:00",
+      dateFormat(endDate, "yyyy-MM-dd") + " 23:59:59"
+    ];
+  }
+}

文件差异内容过多而无法显示
+ 417 - 294
src/views/kaihe/domesticTrade/myOrder/index.vue


+ 44 - 17
src/views/kaihe/domesticTrade/orderInformation/index.vue

@@ -9,7 +9,7 @@
     >返回列表
     </el-button>
 
-    <el-collapse v-model="activeNames" @change="">
+    <el-collapse v-model="activeNames">
       <el-collapse-item title="基础资料" name="1">
         <el-form ref="form" :model="form" label-width="130px" size="mini" class="selectForm" :rules="rules">
           <el-row>
@@ -49,7 +49,7 @@
                 >
                   <el-scrollbar>
                     <el-option
-                        v-for="(dict, index) in fMblnoOptions"
+                        v-for="dict in fMblnoOptions"
                         :key="dict.fId"
                         :label="dict.fName"
                         :value="dict.fId"
@@ -71,7 +71,7 @@
                 >
                   <el-scrollbar>
                     <el-option
-                        v-for="(dict, index) in fMblnoOptions"
+                        v-for="dict in fMblnoOptions"
                         :key="dict.fId"
                         :label="dict.fName"
                         :value="dict.fId"
@@ -103,7 +103,7 @@
                   style="width: 100%"
                 >
                   <el-option
-                    v-for="(dict, index) in transport"
+                    v-for="dict in transport"
                     :key="dict.dictValue"
                     :label="dict.dictLabel"
                     :value="dict.dictValue"
@@ -120,7 +120,7 @@
                   style="width: 100%"
                 >
                   <el-option
-                    v-for="(dict, index) in paymentMethod"
+                    v-for="dict in paymentMethod"
                     :key="dict.dictValue"
                     :label="dict.dictLabel"
                     :value="dict.dictValue"
@@ -137,7 +137,7 @@
                   style="width: 100%"
                 >
                   <el-option
-                    v-for="(dict, index) in drawee"
+                    v-for="dict in drawee"
                     :key="dict.dictValue"
                     :label="dict.dictLabel"
                     :value="dict.dictValue"
@@ -154,7 +154,7 @@
                   style="width: 100%"
                 >
                   <el-option
-                    v-for="(dict, index) in cEsign"
+                    v-for="dict in cEsign"
                     :key="dict.dictValue"
                     :label="dict.dictLabel"
                     :value="dict.dictValue"
@@ -171,7 +171,7 @@
                   size="small"
                 >
                   <el-option
-                  v-for="(dict, index) in etentioncargo"
+                  v-for="dict in etentioncargo"
                   :key="dict.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
@@ -192,7 +192,7 @@
                 >
                   <el-scrollbar>
                     <el-option
-                        v-for="(dict, index) in vslidList"
+                        v-for="dict in vslidList"
                         :key="dict.fId"
                         :label="dict.fName"
                         :value="dict.fId"
@@ -215,7 +215,7 @@
                 >
                   <el-scrollbar>
                     <el-option
-                        v-for="(dict, index) in voyidList"
+                        v-for="dict in voyidList"
                         :key="dict.fId"
                         :label="dict.fNo"
                         :value="dict.fId"
@@ -404,7 +404,7 @@
                   style="width: 100%"
                 >
                   <el-option
-                    v-for="(dict, index) in insurance"
+                    v-for="dict in insurance"
                     :key="dict.dictValue"
                     :label="dict.dictLabel"
                     :value="dict.dictValue"
@@ -717,7 +717,6 @@
           border
           stripe
           show-summary
-          @selection-change=""
           :summary-method="warehouseDrSummaries"
         >
           <el-table-column type="selection" width="55" align="center"/>
@@ -1038,7 +1037,6 @@
           border
           stripe
           show-summary
-          @selection-change=""
           :summary-method="warehouseCrSummaries"
         >
           <el-table-column type="selection" width="55" align="center"/>
@@ -1813,7 +1811,6 @@ export default {
   },
   //页面跳转后传递参数
   activated() {
-    console.log(this.$route.query)
     if (this.$route.query.testing)this.dataElist = true
     this.modify = true
     let formDate
@@ -1826,10 +1823,17 @@ export default {
       this.approVal = true
       this.cancelButton = false
     } else if (this.$route.query.data) {
+      console.log(this.$route.query.data.fMblno)
       formDate = {
         fId: JSON.parse(this.$route.query.data).fId,
         num: JSON.parse(this.$route.query.data).num
       }
+      if(this.$route.query.data.fMblno){
+       formDate = {
+         fMblno: JSON.parse(this.$route.query.data).fMblno,
+         num: JSON.parse(this.$route.query.data).num
+        }
+      }
       this.id = formDate.fId
       this.formList = {
         fId: formDate.fId
@@ -1844,12 +1848,18 @@ export default {
       this.approvalTwo = true
       this.approVal = false
       this.cancelButton = false
-    }
+    }else if(this.$route.query.DC){
+       formDate = {
+         fMblno: JSON.parse(this.$route.query.DC).fMblno,
+         num: JSON.parse(this.$route.query.DC).num
+        }
+      }
     if (formDate) {
       addmodify(formDate).then(response => {
         console.log(response)
         if(response.code == 200){
           this.form = response.rows[0]
+          console.log(this.form)
           if (this.form.fMblno == null) {
             this.changeNum = false
           } else {
@@ -2146,7 +2156,16 @@ export default {
         this.form.fBillstatus === 4 ||
         this.form.fBillstatus === 9 ||
         this.modify == true) {
-        this.$router.push({ path: '/domesticTrade/myOrder' })
+        if(this.$route.query.DC){
+          if(JSON.parse(this.$route.query.DC).type=='D'){
+            this.$router.push({ path: '/analysis/generalLedgerDr' })
+          }else{
+            this.$router.push({ path: '/analysis/generalLedgerCr' })
+          }   
+        }else{
+          this.$router.push({ path: '/domesticTrade/myOrder' })
+        }
+        
       } else {
         this.$confirm('返回列表,是否保存?', '提示', {
           confirmButtonText: '保存',
@@ -2157,7 +2176,15 @@ export default {
             this.approval()
           })
           .catch(() => {
+          if(this.$route.query.DC){
+            if(JSON.parse(this.$route.query.DC).type=='D'){
+             this.$router.push({ path: '/analysis/generalLedgerDr' })
+            }else{
+             this.$router.push({ path: '/analysis/generalLedgerCr' })
+           }   
+          }else{
             this.$router.push({ path: '/domesticTrade/myOrder' })
+          }
             this.modify = true
           })
       }
@@ -3098,7 +3125,7 @@ export default {
   //border-top:1px dashed #ccc;
 }
 
-.selectForm > > > .el-form-item__label {
+.selectForm >>> .el-form-item__label {
   font-size: 12px !important;
 }
 .app-container /deep/ .el-collapse-item__content{

+ 53 - 1
src/views/reportManagement/kaihe-generalLedgerCr/index.vue

@@ -222,7 +222,47 @@
         align="center"
         :fixed="item.fixed"
         :show-overflow-tooltip="true"
-      />
+      >
+        <template slot-scope="scope">
+          <span v-if="item.label == 'shipsName'">
+            {{ scope.row.shipsName }}
+          </span>
+          <span v-if="item.label == 'voyage'">
+            {{ scope.row.voyage }}
+          </span>
+          <span v-if="item.label == 'unitOfAccount'">
+            {{ scope.row.unitOfAccount }}
+          </span>
+          <span v-if="item.label == 'blNo'">
+            <el-link :underline="false" type="primary"
+              ><div @click="handleUpdate(scope.row, 1)">
+                {{ scope.row.blNo }}
+              </div></el-link
+            >
+          </span>
+          <span v-if="item.label == 'portOfLoading'">
+            {{ scope.row.portOfLoading }}
+          </span>
+          <span v-if="item.label == 'destination'">
+            {{ scope.row.destination }}
+          </span>
+          <span v-if="item.label == 'sailingDate'">
+            {{ scope.row.sailingDate }}
+          </span>
+          <span v-if="item.label == 'auditDate'">
+            {{ scope.row.auditDate }}
+          </span>
+          <span v-if="item.label == 'receivable'">
+            {{ scope.row.receivable }}
+          </span>
+          <span v-if="item.label == 'handle'">
+            {{ scope.row.handle }}
+          </span>
+          <span v-if="item.label == 'profit'">
+            {{ scope.row.profit }}
+          </span>
+        </template>
+      </el-table-column>
     </el-table>
     <pagination
       v-show="page.total > 0"
@@ -308,6 +348,18 @@ export default {
     this.$refs.columnSetting.getRow(this.tableOption);
   },
   methods: {
+    handleUpdate(row, num) {
+      let res = {};
+      res = {
+        fMblno: row.blNo,
+        num: num,
+        type: "C",
+      };
+      this.$router.push({
+        path: "/domesticTrade/orderInformation",
+        query: { DC: JSON.stringify(res) },
+      });
+    },
     /** 导出按钮操作 */
     handleExport() {
       this.$confirm("是否确认导出所有应付总账主数据项?", "警告", {

+ 8 - 8
src/views/reportManagement/kaihe-generalLedgerCr/js/index.js

@@ -21,56 +21,56 @@ export const tableOption = [
     width: 150,
   },
   {
-    surface: "3",
+    surface: "4",
     label: "blNo",
     name: "提单号",
     checked: 0,
     width: 150,
   },
   {
-    surface: "3",
+    surface: "5",
     label: "portOfLoading",
     name: "起运港",
     checked: 0,
     width: 150,
   },
   {
-    surface: "3",
+    surface: "6",
     label: "destination",
     name: "目的港",
     checked: 0,
     width: 150,
   },
   {
-    surface: "3",
+    surface: "7",
     label: "sailingDate",
     name: "开船日期",
     checked: 0,
     width: 150,
   },
   {
-    surface: "3",
+    surface: "8",
     label: "auditDate",
     name: "审核日期",
     checked: 0,
     width: 150,
   },
   {
-    surface: "3",
+    surface: "9",
     label: "receivable",
     name: "应付金额",
     checked: 0,
     width: 150,
   },
   {
-    surface: "4",
+    surface: "10",
     label: "handle",
     name: "实付金额",
     checked: 0,
     width: 150,
   },
   {
-    surface: "5",
+    surface: "11",
     label: "profit",
     name: "未付金额",
     checked: 0,

+ 53 - 1
src/views/reportManagement/kaihe-generalLedgerDr/index.vue

@@ -222,7 +222,47 @@
         align="center"
         :fixed="item.fixed"
         :show-overflow-tooltip="true"
-      />
+      >
+        <template slot-scope="scope">
+          <span v-if="item.label == 'shipsName'">
+            {{ scope.row.shipsName }}
+          </span>
+          <span v-if="item.label == 'voyage'">
+            {{ scope.row.voyage }}
+          </span>
+          <span v-if="item.label == 'unitOfAccount'">
+            {{ scope.row.unitOfAccount }}
+          </span>
+          <span v-if="item.label == 'blNo'">
+            <el-link :underline="false" type="primary"
+              ><div @click="handleUpdate(scope.row,1)">
+                {{ scope.row.blNo }}
+              </div></el-link
+            >
+          </span>
+          <span v-if="item.label == 'portOfLoading'">
+            {{ scope.row.portOfLoading }}
+          </span>
+          <span v-if="item.label == 'destination'">
+            {{ scope.row.destination }}
+          </span>
+          <span v-if="item.label == 'sailingDate'">
+            {{ scope.row.sailingDate }}
+          </span>
+          <span v-if="item.label == 'auditDate'">
+            {{ scope.row.auditDate }}
+          </span>
+          <span v-if="item.label == 'receivable'">
+            {{ scope.row.receivable }}
+          </span>
+          <span v-if="item.label == 'handle'">
+            {{ scope.row.handle }}
+          </span>
+          <span v-if="item.label == 'profit'">
+            {{ scope.row.profit }}
+          </span>
+        </template>
+      </el-table-column>
     </el-table>
     <pagination
       v-show="page.total > 0"
@@ -308,6 +348,18 @@ export default {
     this.$refs.columnSetting.getRow(this.tableOption);
   },
   methods: {
+    handleUpdate(row, num) {
+      let res = {};
+      res = {
+        fMblno:row.blNo,
+        num: num,
+        type:'D'
+      };
+      this.$router.push({
+        path: "/domesticTrade/orderInformation",
+        query: { DC: JSON.stringify(res) },
+      });
+    },
     /** 导出按钮操作 */
     handleExport() {
       this.$confirm("是否确认导出所有应收总账主数据项?", "警告", {

部分文件因为文件数量过多而无法显示