Browse Source

修改禅道bug 联调进出场导入 报表

Qukatie 6 months ago
parent
commit
37243ff7a0

+ 8 - 0
src/api/boxManagement/boxPoolDynamics/index.js

@@ -41,3 +41,11 @@ export const detail = (params) => {
     params: params
   })
 }
+//查询明细
+export const emptyContainerEntryFtp = (params) => {
+  return request({
+    url: '/api/blade-los/ftp/emptyContainerEntryFtp',
+    method: 'get',
+    params: params
+  })
+}

+ 1 - 0
src/main.js

@@ -203,6 +203,7 @@ Vue.prototype.checkLock = checkLock;
 Vue.prototype.onLock = onLock;
 Vue.prototype.unLock = unLock;
 Vue.prototype.checkLocks = checkLocks;
+Vue.prototype.inLocks =inLocks
 new Vue({
   router,
   store,

+ 2 - 4
src/util/lock.js

@@ -13,7 +13,7 @@ export async function checkLocks(data) {
   })
   return option
 }
-export function inLocks(moduleName, tableName, id, no) {
+export async  function  inLocks(moduleName, tableName, id, no) {
   const data = {
     moduleName: moduleName,
     tableName: tableName,
@@ -21,18 +21,16 @@ export function inLocks(moduleName, tableName, id, no) {
     no: localStorage.getItem("browserID"),
     billNo: no
   };
-  console.log(this.$route.name)
   this.inDetailsKey(this.$route.name, {
     moduleName: moduleName,
     tableName: tableName,
     billId: id,
     billNo: no
   });
-  checkLock(data).then(res => {
+  await checkLock(data).then(res => {
     if (res.data.code == 200) {
       this.onLock(data).then(res => {
         if (res.data.code == 200) {
-          this.showLock = false
           return false
         } else {
           return true

+ 13 - 62
src/views/boxManagement/boxPoolDynamics/components/importModule.vue

@@ -88,16 +88,16 @@ export default {
                         label: '动态日期',
                         prop: 'boxStatusDate',
                         overHidden: true,
-                        width:100,
+                        width: 100,
                         type: "date",
                         format: 'yyyy-MM-dd',
                         valueFormat: 'yyyy-MM-dd'
                     },
-                    {
-                        label: '单据号',
-                        prop: 'billNo',
-                        overHidden: true,
-                    },
+                    // {
+                    //     label: '单据号',
+                    //     prop: 'billNo',
+                    //     overHidden: true,
+                    // },
                     {
                         label: '结果',
                         prop: 'result',
@@ -116,16 +116,6 @@ export default {
     },
     created() { },
     methods: {
-        calculateCheckDigit(containerNo) {
-            let charCode = "0123456789A?BCDEFGHIJK?LMNOPQRSTU?VWXYZ";
-            let num = 0;
-            for (let i = 0; i < 10; i++) {
-                let idx = charCode.indexOf(containerNo[i]);
-                idx = idx * Math.pow(2, i);
-                num += idx;
-            }
-            return num = (num % 11) % 10;
-        },
         //去重判断
         mergeAndDeduplicate(arr1, arr2) {
             // 合并两个数组
@@ -214,52 +204,13 @@ export default {
             if (this.selectionList.length == 0) {
                 return this.$message.error("请选择数据");
             }
-            for (let item of this.selectionList) {
-                const regex = /^([a-zA-Z]{4})([0-9]{7})$/;
-                if (regex.test(item.boxCode)) {
-                    if (this.calculateCheckDigit(item.boxCode) == item.boxCode[10]) {
-                        this.loading = true
-                        getDicinit('POST', this.url, this.selectionList).then(res => {
-                            this.excelBox = false
-                            this.$emit('refreshData')
-                        }).finally(() => {
-                            this.loading = false;
-                        })
-                    } else {
-                        this.$confirm(`箱号:${item.boxCode}是否强制加入系统?`, '提示', {
-                            confirmButtonText: '确定',
-                            cancelButtonText: '取消',
-                            type: 'warning'
-                        }).then(() => {
-                            this.loading = true
-                            getDicinit('POST', this.url, this.selectionList).then(res => {
-                                console.log(11111)
-                                this.excelBox = false
-                                this.$emit('refreshData')
-                            }).finally(() => {
-                                this.loading = false;
-                            })
-                        })
-                        return
-                    }
-                } else {
-                    this.$confirm(`箱号:${item.boxCode}是否强制加入系统?`, '提示', {
-                        confirmButtonText: '确定',
-                        cancelButtonText: '取消',
-                        type: 'warning'
-                    }).then(() => {
-                        this.loading = true
-                        getDicinit('POST', this.url, this.selectionList).then(res => {
-                            console.log(11111)
-                            this.excelBox = false
-                            this.$emit('refreshData')
-                        }).finally(() => {
-                            this.loading = false;
-                        })
-                    })
-                    return
-                }
-            }
+            this.loading = true
+            getDicinit('POST', this.url, this.selectionList).then(res => {
+                this.excelBox = false
+                this.$emit('refreshData')
+            }).finally(() => {
+                this.loading = false;
+            })
         },
         cellStyle({ row, column, rowIndex, columnIndex }) {
             if (row.result == '失败') {

+ 122 - 3
src/views/boxManagement/boxPoolDynamics/index.vue

@@ -6,14 +6,17 @@
 
             <el-button v-if="roleName.includes('admin') || roleName.includes('箱管')" type="success" plain size="small"
                 @click="allClick('POL空箱出场(EXCEL)')">POL空箱出场(EXCEL)</el-button>
-<!--            <el-button v-if="roleName.includes('admin') || roleName.includes('箱管')" type="info" plain size="small"
+            <!--            <el-button v-if="roleName.includes('admin') || roleName.includes('箱管')" type="info" plain size="small"
                 @click="allClick('POD空箱进场(EXCEL)')">POD空箱进场(EXCEL)</el-button>-->
             <!-- <el-button type="primary" plain size="small"
                                 @click="allClick('POL返场(EXCEL)')">POL返场(EXCEL)</el-button> -->
 
             <el-button v-if="roleName.includes('admin') || roleName.includes('箱管')" type="danger" plain size="small"
                 @click="allClick('POL无货返空(EXCEL)')">POL无货返空(EXCEL)</el-button>
-
+            <el-button v-if="roleName.includes('admin') || roleName.includes('箱管')" type="primary" plain size="small"
+                @click="allClick('进场导入')">进场导入</el-button>
+            <el-button v-if="roleName.includes('admin') || roleName.includes('箱管')" type="info" plain size="small"
+                @click="allClick('出场导入')">出场导入</el-button>
             <el-tabs v-model="activeName" type="card" style="margin-top: 8px;">
                 <el-tab-pane label="按港口" name="1">
                     <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page"
@@ -86,7 +89,7 @@
 </template>
 
 <script>
-import { getList, getList2, getList3 } from "@/api/boxManagement/boxPoolDynamics/index.js";
+import { getList, getList2, getList3, emptyContainerEntryFtp } from "@/api/boxManagement/boxPoolDynamics/index.js";
 import { getWorkDicts } from "@/api/system/dictbiz";
 import detailsPage from "./detailsPage";
 import importModule from "./components/importModule.vue";
@@ -664,6 +667,122 @@ export default {
                 // this.excelType = 2
                 // this.excelBox = true
             }
+            if (name == '进场导入') {
+                this.$DialogForm.show({
+                    title: '进场导入',
+                    width: '30%',
+                    // data: this.assemblyForm.hmmEdi,
+                    menuPosition: 'right',
+                    option: {
+                        submitText: '确定',
+                        emptyText: '取消',
+                        // labelWidth: 130,
+                        column: [
+                            {
+                                label: "场站",
+                                span: 24,
+                                prop: "corpId",
+                                type: 'select',
+                                filterable: true,
+                                remote: true,
+                                dicUrl: "/api/blade-los/bcorps/selectList?status=0&corpTypeName=场站&size=5&current=1&shortName={{key}}",
+                                props: {
+                                    label: "shortName",
+                                    value: "id",
+                                    desc: 'code',
+                                    res: "data.records"
+                                },
+                                rules: [{
+                                    required: true,
+                                    message: "选择场站",
+                                    trigger: "blur",
+                                }],
+                            },
+                        ]
+                    },
+                    beforeClose: (done) => {
+                        done()
+                    },
+                    callback: (res) => {
+                        res.done()
+                        console.log(res)
+                        let obj = {
+                            corpId: res.data.corpId,
+                            type: 'IN'
+                        }
+                        emptyContainerEntryFtp(obj).then(res => {
+                            this.$message.success("操作成功!");
+                            this.refreshChange()
+                        })
+                        res.close()
+                    }
+                })
+                // this.excelOption.column.forEach(item => {
+                //     if (item.prop == 'excelFile') {
+                //         item.action = "/api/blade-los/boxPool/emptyContainerEntry"
+                //     }
+                // })
+                // this.excelType = 2
+                // this.excelBox = true
+            }
+            if (name == '出场导入') {
+                this.$DialogForm.show({
+                    title: '进场导入',
+                    width: '30%',
+                    // data: this.assemblyForm.hmmEdi,
+                    menuPosition: 'right',
+                    option: {
+                        submitText: '确定',
+                        emptyText: '取消',
+                        // labelWidth: 130,
+                        column: [
+                            {
+                                label: "场站",
+                                span: 24,
+                                prop: "corpId",
+                                type: 'select',
+                                filterable: true,
+                                remote: true,
+                                dicUrl: "/api/blade-los/bcorps/selectList?status=0&corpTypeName=场站&size=5&current=1&shortName={{key}}",
+                                props: {
+                                    label: "shortName",
+                                    value: "id",
+                                    desc: 'code',
+                                    res: "data.records"
+                                },
+                                rules: [{
+                                    required: true,
+                                    message: "选择场站",
+                                    trigger: "blur",
+                                }],
+                            },
+                        ]
+                    },
+                    beforeClose: (done) => {
+                        done()
+                    },
+                    callback: (res) => {
+                        res.done()
+                        console.log(res)
+                        let obj = {
+                            corpId: res.data.corpId,
+                            type: 'OUT'
+                        }
+                        emptyContainerEntryFtp(obj).then(res => {
+                            this.$message.success("操作成功!");
+                            this.refreshChange()
+                        })
+                        res.close()
+                    }
+                })
+                // this.excelOption.column.forEach(item => {
+                //     if (item.prop == 'excelFile') {
+                //         item.action = "/api/blade-los/boxPool/emptyContainerEntry"
+                //     }
+                // })
+                // this.excelType = 2
+                // this.excelBox = true
+            }
         },
         addButton() {
             this.isShow = false

+ 2 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/formbottom.vue

@@ -32,9 +32,9 @@
                             <span style="color: #1e9fff">订舱日期</span>
                         </span>
                         <el-date-picker v-model="assemblyForm.bookingDate" type="date" style="width: 100%;"
-                            value-format="yyyy-MM-dd HH:mm" size="small"
+                            value-format="yyyy-MM-dd" size="small"
                             :disabled="detailData.seeDisabled || (assemblyForm.billType == 'MH' && assemblyForm.masterBillNo > 0)"
-                            placeholder="请选择截港时间">
+                            placeholder="请选择订舱日期">
                         </el-date-picker>
                     </el-form-item>
                 </el-col>

+ 2 - 0
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -547,6 +547,7 @@ export default {
                 polFreeBoxUseDays: '7',
                 podFreeBoxUseDays: '14',
                 boxBelongsTo: 'SOC',
+                bookingDate:dateFormat(new Date(), "yyyy-MM-dd"),
                 filesList: [], // 文件中心
                 feeCenterListD: [], // 收
                 feeCenterListC: [], // 付
@@ -593,6 +594,7 @@ export default {
                 polFreeBoxUseDays: '7',
                 podFreeBoxUseDays: '14',
                 boxBelongsTo: 'SOC',
+                bookingDate:dateFormat(new Date(), "yyyy-MM-dd"),
                 filesList: [], // 文件中心
                 feeCenterListD: [], // 收
                 feeCenterListC: [], // 付

+ 4 - 3
src/views/iosBasicData/businessCenter/bookingCabin/detailsPage.vue

@@ -162,7 +162,8 @@
         </avue-form>
       </trade-card>
     </div>
-    <reports :id="form.id" :assemblyForm="form" businessValue="MYDL" ref="report"></reports>
+    <business-reports :id="form.id"  ref="print" businessValue="YDC" :type="true"></business-reports>
+    <reports :id="form.id" :assemblyForm="form" businessValue="YDC" ref="report"></reports>
     <!--审核弹窗-->
     <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
@@ -177,8 +178,8 @@ import { losbfeestemplateGetListTemplate } from "@/api/iosBasicData/bills";
 import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
-import businessReports from "@/components/tradeAgency/businessReports.vue";
-import reports from "@/components/tradeAgency/reports.vue";
+import businessReports from "@/components/boxManagement/businessReports.vue";
+import reports from "@/components/boxManagement/reports.vue";
 import { deptGetDetailPol } from '@/api/iosBasicData/bills'
 import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
 import { getDicinit } from "@/api/dicSelect/index";

+ 9 - 9
src/views/iosBasicData/businessCenter/customerLetter/detailsPage.vue

@@ -7,12 +7,11 @@
         </el-button>
       </div>
       <div class="add-customer-btn">
-        <!-- <el-button size="small" style="margin-right: 8px" :disabled="!form.id"
-                    @click="$refs.print.openDialog()">预 览
-                </el-button>
-                <el-button v-if="roleName.indexOf('admin') != -1" size="small" style="margin-right: 8px"
-                    :disabled="!form.id" @click="$refs.report.openDialog()">报表设计
-                </el-button> -->
+        <el-button size="small" style="margin-right: 8px" :disabled="!form.id" @click="$refs.print.openDialog()">预 览
+        </el-button>
+        <el-button v-if="roleName.indexOf('admin') != -1" size="small" style="margin-right: 8px" :disabled="!form.id"
+          @click="$refs.report.openDialog()">报表设计
+        </el-button>
         <!--        <el-button class="el-button&#45;&#45;small-yh" style="margin-left: 6px;" type="danger" size="small"
           @click="allClick('预定订舱')">预定订舱
         </el-button>-->
@@ -381,7 +380,8 @@
         </el-tab-pane>
       </el-tabs>
     </div>
-    <reports :id="form.id" :form="form" businessValue="MYDL" ref="report"></reports>
+    <business-reports :id="form.id" ref="print" businessValue="KHTS" :type="true"></business-reports>
+    <reports :id="form.id" :assemblyForm="form" businessValue="KHTS" ref="report"></reports>
     <!--审核弹窗-->
     <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
@@ -397,8 +397,8 @@ import { losbfeestemplateGetListTemplate } from "@/api/iosBasicData/bills";
 import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
-import businessReports from "@/components/tradeAgency/businessReports.vue";
-import reports from "@/components/tradeAgency/reports.vue";
+import businessReports from "@/components/boxManagement/businessReports.vue";
+import reports from "@/components/boxManagement/reports.vue";
 import freightRate from "./components/freightRate.vue";
 import { deptGetDetailPol } from '@/api/iosBasicData/bills'
 import { getDicinit } from "@/api/dicSelect/index";

+ 8 - 8
src/views/iosBasicData/financeProfit/index.vue

@@ -316,14 +316,14 @@ export default {
                         searchslot: true,
                         searchOrder: 6
                     },
-                    {
-                        label: "核算部门",
-                        prop: "accDeptName",
-                        overHidden: true,
-                        search: true,
-                        searchslot: true,
-                        searchOrder: 12
-                    },
+                    // {
+                    //     label: "核算部门",
+                    //     prop: "accDeptName",
+                    //     overHidden: true,
+                    //     search: true,
+                    //     searchslot: true,
+                    //     searchOrder: 12
+                    // },
                     {
                         label: "航线",
                         prop: "lineCnName",

+ 31 - 5
src/views/ow/owPut/detailsPage.vue

@@ -41,17 +41,18 @@
           <trade-card title="基础信息">
             <avue-form :option="optionForm" v-model="form" ref="form">
               <tempalte slot="purchaseCompanyName">
-                <dic-select v-model="form.purchaseCompanyName" placeholder="USER" key="id" label="shortName" res="records"
-                  @selectChange="dicChange('purchaseCompanyName', $event)" :disabled="form.whetherEnable == '是'"
+                <dic-select v-model="form.purchaseCompanyName" placeholder="USER" key="id" label="shortName"
+                  res="records" @selectChange="dicChange('purchaseCompanyName', $event)"
+                  :disabled="form.whetherEnable == '是'"
                   url="/blade-los/bcorps/selectList?status=0&current=1&size=5&corpTypeName=箱东" :filterable="true"
                   :remote="true" dataName="shortName" :slotRight="true" rightLabel="code">
                 </dic-select>
               </tempalte>
               <tempalte slot="containerNumber">
                 <dic-select v-model="form.containerNumber" placeholder="放箱号" :key="containerNumberKey"
-                  label="internalContainerNumber" :disabled="editDisabled || form.whetherEnable == '是'"
+                  label="containerNumber" :disabled="editDisabled || form.whetherEnable == '是'"
                   :url="'/blade-los/putbox/selectContainerNumber?boxType=' + (form.boxTypeQuantityOne ? form.boxTypeQuantityOne : '') + '&polId=' + (form.polId ? form.polId : '') + '&podId=' + (form.podId ? form.podId : '') + '&polStationId=' + (form.polStationId ? form.polStationId : '')"
-                  :filterable="true">
+                  :filterable="true" @selectChange="dicChange('containerNumber', $event)">
                 </dic-select>
               </tempalte>
               <!-- <tempalte slot="polStationCname">
@@ -2081,7 +2082,7 @@ export default {
     this.saveLocalCurrency(this.deptId)
   },
   methods: {
-      verifyChange(name, row) {
+    verifyChange(name, row) {
       if (row[name]) {
         getAccurate({ accurate: row[name] }).then(res => {
           if (res.data.data.records.length == 0) {
@@ -2247,6 +2248,31 @@ export default {
       );
     },
     dicChange(name, row) {
+      if (name == 'containerNumber') {
+        if (row) {
+          this.form.boxCondition = row.boxCondition
+          this.form.polId = row.polId
+          this.form.polCode = row.polCode
+          this.form.polEname = row.polEname
+          this.form.polCname = row.polCname
+          this.form.podId = row.podId
+          this.form.podCode = row.podCode
+          this.form.podEname = row.podEname
+          this.form.podCname = row.podCname
+          this.form.polStationId = row.polStationId
+          this.form.polStationCode = row.polStationCode
+          this.form.polStationEname = row.polStationEname
+          this.form.polStationCname = row.polStationCname
+          this.form.podStationId = row.podStationId
+          this.form.podStationCode = row.podStationCode
+          this.form.podStationEname = row.podStationEname
+          this.form.podStationCname = row.podStationCname
+          this.form.boxTypeQuantityOne = row.boxType
+          this.form.boxNumber = row.remainingNum
+          this.form.effectiveDate = row.effectiveStartDate
+          this.form.expiryDate = row.effectiveEndDate
+        }
+      }
       if (name == 'purchaseCompanyName') {
         if (row) {
           this.form.purchaseCompanyId = row.id