浏览代码

修改禅道1895

Qukatie 1 年之前
父节点
当前提交
a09efb9e79

+ 24 - 0
src/enums/column-name.js

@@ -1674,6 +1674,30 @@ const columnName = [{
   {
     code: 359,
     name: '鑫信恒源-采购售后-退货出库-历史列表'
+  },
+  {
+    code: 360,
+    name: '鑫信恒源-放单-工作申请列表'
+  },
+  {
+    code: 361,
+    name: '鑫信恒源-放单-工作申请明细列表'
+  },
+  {
+    code: 362,
+    name: '鑫信恒源-放单-调度管理列表'
+  },
+  {
+    code: 363,
+    name: '鑫信恒源-放单-调度管理明细列表'
+  },
+  {
+    code: 364,
+    name: '鑫信恒源-放单-放单管理列表'
+  },
+  {
+    code: 365,
+    name: '鑫信恒源-放单-放单管理明细列表'
   }
 ]
 export const getColumnName = (key) => {

+ 55 - 37
src/views/iosBasicData/AirtransportExport/bills/billsDetails.vue

@@ -8,7 +8,8 @@
                 </el-button>
             </div>
             <div class="add-customer-btn">
-
+                <el-button  size="small" type="primary" style="margin-right: 8px" @click="addEdit">新 建
+                </el-button>
                 <el-button size="small" style="margin-right: 8px"
                            :loading="saveLoading" @click="previewDialogfun" >预 览
                 </el-button>
@@ -455,20 +456,27 @@ import {
                         ],
                         [
                             {
-                                label: "MB/L NO",
-                                text:"请输入MB/L NO",
-                                prop: "mblno",
-                                span:18,
+                                label: "HB/L NO",  //弹窗点击确认还是取消申请 调后台接口获取到一个编号
+                                prop: "HB/L NO",
+                                type:'button',
+                                span:4,
                                 disabled:false,
-
                             },
                             {
-                                label: "",  // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
+                                label: "",
+                                text:"请输入HB/L NO",
+                                prop: "hblno",
+                                labelWidth:'6px',
+                                span:14,
+                                disabled:true,
+                            },
+                            {
+                                label: "", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP
                                 text:"付款方式",
-                                prop: "mpaymode",
-                                type:'select',
+                                prop: "hpaymode",
                                 labelWidth:'30px',
                                 disabled:false,
+                                type:'select',
                                 span:6,
                                 dicData:[],
                                 forParameter:{
@@ -480,27 +488,20 @@ import {
                         ],
                         [
                             {
-                                label: "HB/L NO",  //弹窗点击确认还是取消申请 调后台接口获取到一个编号
-                                prop: "HB/L NO",
-                                type:'button',
-                                span:4,
+                                label: "MB/L NO",
+                                text:"请输入MB/L NO",
+                                prop: "mblno",
+                                span:18,
                                 disabled:false,
+
                             },
                             {
-                                label: "",
-                                text:"请输入HB/L NO",
-                                prop: "hblno",
-                                labelWidth:'6px',
-                                span:14,
-                                disabled:true,
-                            },
-                            {
-                                label: "", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP
+                                label: "",  // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
                                 text:"付款方式",
-                                prop: "hpaymode",
+                                prop: "mpaymode",
+                                type:'select',
                                 labelWidth:'30px',
                                 disabled:false,
-                                type:'select',
                                 span:6,
                                 dicData:[],
                                 forParameter:{
@@ -723,6 +724,21 @@ import {
             this.postSelectByUserfun()
         },
         methods:{
+            addEdit(){
+                if(this.form.billStatus>=3){
+                 this.$emit('toAddEdit')
+                 }else{
+                 this.$confirm('此操作将保存并新建, 是否继续?', '提示', {
+                 confirmButtonText: '确定',
+                 cancelButtonText: '取消',
+                   type: 'warning'
+              }).then(() => {
+                    this.editCustomer('toAddEdit')
+              }).catch(() => {
+                
+              });
+             }
+           },
             // 报表弹窗
             previewDialogfun(){
                 this.previewDialog = true
@@ -1006,13 +1022,13 @@ import {
                             // 航线带出往来单位的优势航线
                             this.$set(this.form,'lineCnName',item.advantageRoute)
                             // 带出发货人数据
-                            this.$set(this.form,'hshipperId',item.id)
-                            this.$set(this.form,'hshipperCnName',item.cnName)
-                            this.$set(this.form,'hshipperEnName',item.enName)
-                            this.$set(this.form,'hshipperCode',item.code)
-                            this.$set(this.form,'hshipperDetails',item.details)
-                            this.$set(this.form,'hshipperCntyName',item.cntyName)
-                            this.$set(this.form,'hshipperCntyCode',item.cntyCode)
+                            // this.$set(this.form,'hshipperId',item.id)
+                            // this.$set(this.form,'hshipperCnName',item.cnName)
+                            // this.$set(this.form,'hshipperEnName',item.enName)
+                            // this.$set(this.form,'hshipperCode',item.code)
+                            // this.$set(this.form,'hshipperDetails',item.details)
+                            // this.$set(this.form,'hshipperCntyName',item.cntyName)
+                            // this.$set(this.form,'hshipperCntyCode',item.cntyCode)
                         }
                     }
                 }
@@ -1258,7 +1274,7 @@ import {
                 this.detailData.seeDisabled = false
             },
             // 大保存按钮
-            editCustomer(){
+            editCustomer(status){
                 this.$refs.form.validate((valid)=>{
                     if (valid) {
                         // 判断必填项
@@ -1338,12 +1354,12 @@ import {
                         // 赋值 ETD 日期
                         this.form.billDate = this.form.etd?this.form.etd.slice(0,10) + ' 00:00:00':null // 单据日期
                         // 调用保存接口
-                        this.billsSubmitfun()
+                        this.billsSubmitfun(status)
                     }
                 })
             },
             // 主表保存接口大保存
-            billsSubmitfun(){
+            billsSubmitfun(status){
                 // if (this.form.cargoType = 'dry') {
                 //     // 普货
                 //     this.form.billNoFormat = 'KYCK-PH'
@@ -1473,7 +1489,7 @@ import {
                         message: "操作成功!"
                     });
                     // this.detailData.seeDisabled = true
-                    this.billsDetailfun(res.data.data.id)
+                    this.billsDetailfun(res.data.data.id,status)
                 }).catch(err=>{
                     this.pageLoading = false
                 })
@@ -1546,7 +1562,7 @@ import {
                 })
             },
             // 详情接口
-            async billsDetailfun(id){
+            async billsDetailfun(id,status){
                 const res = await aeabillsDetail(id)
                 this.form = res.data.data;
                 this.copyFormData = JSON.parse(JSON.stringify(res.data.data))
@@ -1658,7 +1674,9 @@ import {
                 for(let item of this.form.filesList) {
                     this.$set(item,'edit',false)
                 }
-
+                if(status=='toAddEdit'){
+                        this.$emit(status)
+                    }
             },
             // tbas切换
             handleClick(tba,event) {

+ 12 - 2
src/views/iosBasicData/AirtransportExport/bills/index.vue

@@ -406,7 +406,7 @@
           </avue-crud>
       </basic-container>
 
-      <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack"></bills-details>
+      <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack" @toAddEdit="toAddEdit" :key="datekey"></bills-details>
 
       <el-dialog
           title="主单列表"
@@ -475,6 +475,7 @@ import { getDeptTree } from "@/api/system/dept";
     components:{TreeSelect, SearchQuery, feesTemplateItems, billsDetails,SplitList},
     data() {
       return {
+        datekey:Date.now(),
           // 展开和收回
           fold:false,
           maxShow:3,
@@ -745,7 +746,7 @@ import { getDeptTree } from "@/api/system/dept";
                   },
                   {
                       label: "装货港",
-                      prop: "polCnName",
+                      prop: "polEnName",
                       width:"120",
                       overHidden:true,
                   },
@@ -807,6 +808,12 @@ import { getDeptTree } from "@/api/system/dept";
                       searchOrder:11,
                   },
                   {
+              label: "箱型/箱量",
+              prop: "quantityCntrDescr",
+                width:"120",
+                overHidden:true,
+            },
+                  {
                       label: "业务来源",
                       prop: "srcType",
                       type: 'select',
@@ -1604,6 +1611,9 @@ import { getDeptTree } from "@/api/system/dept";
                 })
                 .catch(_ => {});
         },
+        toAddEdit(){
+            this.datekey=Date.now()
+        },
         // 详情的返回列表
         goBack() {
             // 初始化数据

+ 32 - 13
src/views/iosBasicData/AirtransportImport/bills/billsDetails.vue

@@ -8,7 +8,8 @@
                 </el-button>
             </div>
             <div class="add-customer-btn">
-
+                <el-button  size="small" type="primary" style="margin-right: 8px" @click="addEdit">新 建
+                </el-button>
                 <el-button size="small" style="margin-right: 8px"
                            :loading="saveLoading" @click="previewDialogfun" >预 览
                 </el-button>
@@ -723,6 +724,21 @@ import {
             this.postSelectByUserfun()
         },
         methods:{
+            addEdit(){
+            if(this.form.billStatus>=3){
+                this.$emit('toAddEdit')
+            }else{
+              this.$confirm('此操作将保存并新建, 是否继续?', '提示', {
+                 confirmButtonText: '确定',
+                 cancelButtonText: '取消',
+                 type: 'warning'
+              }).then(() => {
+                 this.editCustomer('toAddEdit')
+              }).catch(() => {
+              
+              });
+            }
+        },
             // 报表弹窗
             previewDialogfun(){
                 this.previewDialog = true
@@ -1004,13 +1020,13 @@ import {
                             // 航线带出往来单位的优势航线
                             this.$set(this.form,'lineCnName',item.advantageRoute)
                             // 带出发货人数据
-                            this.$set(this.form,'hshipperId',item.id)
-                            this.$set(this.form,'hshipperCnName',item.cnName)
-                            this.$set(this.form,'hshipperEnName',item.enName)
-                            this.$set(this.form,'hshipperCode',item.code)
-                            this.$set(this.form,'hshipperDetails',item.details)
-                            this.$set(this.form,'hshipperCntyName',item.cntyName)
-                            this.$set(this.form,'hshipperCntyCode',item.cntyCode)
+                            // this.$set(this.form,'hshipperId',item.id)
+                            // this.$set(this.form,'hshipperCnName',item.cnName)
+                            // this.$set(this.form,'hshipperEnName',item.enName)
+                            // this.$set(this.form,'hshipperCode',item.code)
+                            // this.$set(this.form,'hshipperDetails',item.details)
+                            // this.$set(this.form,'hshipperCntyName',item.cntyName)
+                            // this.$set(this.form,'hshipperCntyCode',item.cntyCode)
                         }
                     }
                 }
@@ -1253,7 +1269,7 @@ import {
                 this.detailData.seeDisabled = false
             },
             // 大保存按钮
-            editCustomer(){
+            editCustomer(status){
                 this.$refs.form.validate((valid)=>{
                     if (valid) {
                         // 判断必填项
@@ -1333,12 +1349,12 @@ import {
                         // 赋值 ETD 日期
                         this.form.billDate = this.form.eta?this.form.eta.slice(0,10) + ' 00:00:00':null // 单据日期
                         // 调用保存接口
-                        this.billsSubmitfun()
+                        this.billsSubmitfun(status)
                     }
                 })
             },
             // 主表保存接口大保存
-            billsSubmitfun(){
+            billsSubmitfun(status){
                 // if (this.form.cargoType = 'dry') {
                 //     // 普货
                 //     this.form.billNoFormat = 'KYJK-PH'
@@ -1468,7 +1484,7 @@ import {
                         message: "操作成功!"
                     });
                     // this.detailData.seeDisabled = true
-                    this.billsDetailfun(res.data.data.id)
+                    this.billsDetailfun(res.data.data.id,status)
                 }).catch(err=>{
                     this.pageLoading = false
                 })
@@ -1541,7 +1557,7 @@ import {
                 })
             },
             // 详情接口
-            async billsDetailfun(id){
+            async billsDetailfun(id,status){
                 const res = await aeabillsDetail(id)
                 this.form = res.data.data;
                 this.copyFormData = JSON.parse(JSON.stringify(res.data.data))
@@ -1653,6 +1669,9 @@ import {
                 for(let item of this.form.filesList) {
                     this.$set(item,'edit',false)
                 }
+                if(status=='toAddEdit'){
+                    this.$emit(status)
+                }
 
             },
             // tbas切换

+ 19 - 8
src/views/iosBasicData/AirtransportImport/bills/index.vue

@@ -406,7 +406,7 @@
           </avue-crud>
       </basic-container>
 
-      <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack"></bills-details>
+      <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack" @toAddEdit="toAddEdit" :key="datekey"></bills-details>
 
       <el-dialog
           title="主单列表"
@@ -475,6 +475,7 @@ import { getDeptTree } from "@/api/system/dept";
     components:{TreeSelect, SearchQuery, feesTemplateItems, billsDetails,SplitList},
     data() {
       return {
+        datekey:Date.now(),
           // 展开和收回
           fold:false,
           maxShow:3,
@@ -677,22 +678,22 @@ import { getDeptTree } from "@/api/system/dept";
                       searchOrder:6,
                   },
                   {
-                      label: "MB/L NO",
-                      prop: "mblno",
+                      label: "HB/L NO",
+                      prop: "hblno",
                       width: "80",
                       overHidden: true,
                       search:true,
                       span:6,
-                      searchOrder:1,
+                      searchOrder:5,
                   },
                   {
-                      label: "HB/L NO",
-                      prop: "hblno",
+                      label: "MB/L NO",
+                      prop: "mblno",
                       width: "80",
                       overHidden: true,
                       search:true,
                       span:6,
-                      searchOrder:5,
+                      searchOrder:1,
                   },
                   {
                       label: "开船日期",
@@ -745,7 +746,7 @@ import { getDeptTree } from "@/api/system/dept";
                   },
                   {
                       label: "装货港",
-                      prop: "polCnName",
+                      prop: "polEnName",
                       width:"120",
                       overHidden:true,
                   },
@@ -807,6 +808,12 @@ import { getDeptTree } from "@/api/system/dept";
                       searchOrder:11,
                   },
                   {
+              label: "箱型/箱量",
+              prop: "quantityCntrDescr",
+                width:"120",
+                overHidden:true,
+            },
+                  {
                       label: "业务来源",
                       prop: "srcType",
                       type: 'select',
@@ -1604,6 +1611,10 @@ import { getDeptTree } from "@/api/system/dept";
                 })
                 .catch(_ => {});
         },
+        toAddEdit(){
+            this.datekey=Date.now()
+         
+        },
         // 详情的返回列表
         goBack() {
             // 初始化数据

+ 61 - 42
src/views/iosBasicData/OceanFreightImport/bills/billsDetails.vue

@@ -27,7 +27,8 @@
                 <!--        </el-dropdown-item>-->
                 <!--    </el-dropdown-menu>-->
                 <!--</el-dropdown>-->
-
+                <el-button  size="small" type="primary" style="margin-right: 8px" @click="addEdit">新 建
+                </el-button>
                 <el-button size="small" style="margin-right: 8px"
                            :loading="saveLoading" @click="previewDialogfun" >预 览
                 </el-button>
@@ -481,20 +482,27 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         ],
                         [
                             {
-                                label: "MB/L NO",
-                                text:"请输入MB/L NO",
-                                prop: "mblno",
-                                span:18,
+                                label: "HB/L NO",  //弹窗点击确认还是取消申请 调后台接口获取到一个编号
+                                prop: "HB/L NO",
+                                type:'button',
+                                span:4,
                                 disabled:false,
-
                             },
                             {
-                                label: "",  // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
+                                label: "",
+                                text:"请输入HB/L NO",
+                                prop: "hblno",
+                                labelWidth:'6px',
+                                span:14,
+                                disabled:true,
+                            },
+                            {
+                                label: "", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP
                                 text:"付款方式",
-                                prop: "mpaymode",
-                                type:'select',
+                                prop: "hpaymode",
                                 labelWidth:'30px',
                                 disabled:false,
+                                type:'select',
                                 span:6,
                                 dicData:[],
                                 forParameter:{
@@ -506,27 +514,20 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         ],
                         [
                             {
-                                label: "HB/L NO",  //弹窗点击确认还是取消申请 调后台接口获取到一个编号
-                                prop: "HB/L NO",
-                                type:'button',
-                                span:4,
+                                label: "MB/L NO",
+                                text:"请输入MB/L NO",
+                                prop: "mblno",
+                                span:18,
                                 disabled:false,
+
                             },
                             {
-                                label: "",
-                                text:"请输入HB/L NO",
-                                prop: "hblno",
-                                labelWidth:'6px',
-                                span:14,
-                                disabled:true,
-                            },
-                            {
-                                label: "", // HB/L 付款方式 PP=预付, CC=到付, FPA, Other', 申请之后默认 PP
+                                label: "",  // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
                                 text:"付款方式",
-                                prop: "hpaymode",
+                                prop: "mpaymode",
+                                type:'select',
                                 labelWidth:'30px',
                                 disabled:false,
-                                type:'select',
                                 span:6,
                                 dicData:[],
                                 forParameter:{
@@ -536,6 +537,12 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                                 },
                             },
                         ],
+                        {
+                            label: "REF MBLNO", // Co-Loader 中文名称  往来单位 类别
+                            text:"请输入REF MBLNO",
+                            prop: "refno",
+                            disabled:false,
+                        },
                         [
                             {
                                 label: "OP",  // 操作id 用户管理下拉 模糊搜索
@@ -599,12 +606,6 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                                 }]
                             },
                         ],
-                        {
-                            label: "REF MBLNO", // Co-Loader 中文名称  往来单位 类别
-                            text:"请输入REF MBLNO",
-                            prop: "refno",
-                            disabled:false,
-                        },
                     ]
                 },
                 activeName:'first',
@@ -731,6 +732,21 @@ import {editypesList} from "@/api/iosBasicData/editypes";
             this.postSelectByUserfun()
         },
         methods:{
+            addEdit(){
+            if(this.form.billStatus>=3){
+                this.$emit('toAddEdit')
+            }else{
+              this.$confirm('此操作将保存并新建, 是否继续?', '提示', {
+                 confirmButtonText: '确定',
+                 cancelButtonText: '取消',
+                 type: 'warning'
+              }).then(() => {
+                 this.editCustomer('toAddEdit')
+              }).catch(() => {
+              
+              });
+            }
+        },
             // 获取EDI列表数据
             editypesListfun(){
                 editypesList(1,30).then(res=>{
@@ -1036,13 +1052,13 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                             // 航线带出往来单位的优势航线
                             this.$set(this.form,'lineCnName',item.advantageRoute)
                             // 带出发货人数据
-                            this.$set(this.form,'hshipperId',item.id)
-                            this.$set(this.form,'hshipperCnName',item.cnName)
-                            this.$set(this.form,'hshipperEnName',item.enName)
-                            this.$set(this.form,'hshipperCode',item.code)
-                            this.$set(this.form,'hshipperDetails',item.details)
-                            this.$set(this.form,'hshipperCntyName',item.cntyName)
-                            this.$set(this.form,'hshipperCntyCode',item.cntyCode)
+                            // this.$set(this.form,'hshipperId',item.id)
+                            // this.$set(this.form,'hshipperCnName',item.cnName)
+                            // this.$set(this.form,'hshipperEnName',item.enName)
+                            // this.$set(this.form,'hshipperCode',item.code)
+                            // this.$set(this.form,'hshipperDetails',item.details)
+                            // this.$set(this.form,'hshipperCntyName',item.cntyName)
+                            // this.$set(this.form,'hshipperCntyCode',item.cntyCode)
                         }
                     }
                 }
@@ -1263,7 +1279,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                 this.detailData.seeDisabled = false
             },
             // 大保存按钮
-            editCustomer(){
+            editCustomer(status){
                 this.$refs.form.validate((valid)=>{
                     if (valid) {
                         // 判断必填项
@@ -1325,12 +1341,12 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         // 赋值 ETA 日期
                         this.form.billDate = this.form.eta?this.form.eta.slice(0,10) + ' 00:00:00':null // 单据日期
                         // 调用保存接口
-                        this.billsSubmitfun()
+                        this.billsSubmitfun(status)
                     }
                 })
             },
             // 主表保存接口大保存
-            billsSubmitfun(){
+            billsSubmitfun(status){
                 if (this.form.cargoType == 'dry') {
                     // 普货
                     this.form.billNoFormat = 'HYJK-PH'
@@ -1449,7 +1465,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         message: "操作成功!"
                     });
                     // this.detailData.seeDisabled = true
-                    this.billsDetailfun(res.data.data.id)
+                    this.billsDetailfun(res.data.data.id,status)
                 }).catch(err=>{
                     this.pageLoading = false
                 })
@@ -1521,7 +1537,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                 })
             },
             // 详情接口
-            async billsDetailfun(id){
+            async billsDetailfun(id,status){
                 const res = await billsDetail(id)
                 this.form = res.data.data;
                 this.copyFormData = JSON.parse(JSON.stringify(res.data.data))
@@ -1615,6 +1631,9 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                 for(let item of this.form.filesList) {
                     this.$set(item,'edit',false)
                 }
+                if(status=='toAddEdit'){
+                        this.$emit(status)
+                    }
 
             },
             // tbas切换

+ 12 - 2
src/views/iosBasicData/OceanFreightImport/bills/index.vue

@@ -417,7 +417,7 @@
           </avue-crud>
       </basic-container>
 
-      <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack"></bills-details>
+      <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack" @toAddEdit="toAddEdit" :key="datekey"></bills-details>
 
       <el-dialog
           title="主单列表"
@@ -479,6 +479,7 @@ import { getDeptTree } from "@/api/system/dept";
     components:{TreeSelect, SearchQuery, feesTemplateItems, billsDetails,SplitList},
     data() {
       return {
+        datekey:Date.now(),
           ediData:[], // 获取的 edi 数据
           // 展开和收回
           fold:false,
@@ -750,7 +751,7 @@ import { getDeptTree } from "@/api/system/dept";
                   },
                   {
                       label: "装货港",
-                      prop: "polCnName",
+                      prop: "polEnName",
                       width:"120",
                       overHidden:true,
                   },
@@ -812,6 +813,12 @@ import { getDeptTree } from "@/api/system/dept";
                       searchOrder:11,
                   },
                   {
+              label: "箱型/箱量",
+              prop: "quantityCntrDescr",
+                width:"120",
+                overHidden:true,
+            },
+                  {
                       label: "业务来源",
                       prop: "srcType",
                       type: 'select',
@@ -1630,6 +1637,9 @@ import { getDeptTree } from "@/api/system/dept";
                 })
                 .catch(_ => {});
         },
+        toAddEdit(){
+            this.datekey=Date.now()
+        },
         // 详情的返回列表
         goBack() {
             // 初始化数据

+ 29 - 4
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue

@@ -414,7 +414,7 @@
                             <el-date-picker v-model="assemblyForm.etd" clearable style="width: 100%"
                                             type="date" size="small" :disabled="detailData.seeDisabled || generateBillsfalse"
                                             value-format="yyyy-MM-dd" :picker-options="etdPickerOptions"
-                                            placeholder="请选择ETD日期">
+                                            placeholder="请选择ETD日期" @change="handlePick">
                             </el-date-picker>
                         </el-form-item>
                         <div>
@@ -1077,6 +1077,27 @@ import {getWorkDicts} from "@/api/system/dictbiz";
             this.getHsCode()
         },
         methods:{
+            //ETD监听
+            handlePick(val){
+                // if(this.form.id){
+                //     this.$confirm('此操作将更新汇率, 是否继续?', '提示', {
+                //     confirmButtonText: '确定',
+                //     cancelButtonText: '取消',
+                //     type: 'warning'
+                // }).then(() => {
+                //     this.$message({
+                //         type: 'success',
+                //         message: '更新成功!'
+                //     });
+                // }).catch(() => {
+                //     this.$message({
+                //         type: 'info',
+                //         message: '已取消操作'
+                //     });
+                // });
+                // }
+                console.log(val,111)
+            },
             // 易燃易爆品闪点类型为数字
             dgFlashPointInput(val){
                 this.$set(this.assemblyForm,'dgFlashPoint',regularInteger(val))
@@ -1159,6 +1180,7 @@ import {getWorkDicts} from "@/api/system/dictbiz";
                 let cnPorArr = ['pol','pod','pot']
                 if (arr.indexOf(name) != -1) {
                     if (!value) {
+                        console.log(1111)
                         this.$set(this.assemblyForm,name + 'Id','')
                         this.$set(this.assemblyForm,name + 'CnName','')
                         this.$set(this.assemblyForm,name + 'EnName','')
@@ -1173,9 +1195,12 @@ import {getWorkDicts} from "@/api/system/dictbiz";
                             this.$set(this.assemblyForm,name + 'CnName',item.cnName)
                             this.$set(this.assemblyForm,name + 'EnName',item.enName)
                             this.$set(this.assemblyForm,name + 'Code',item.code)
-                            this.$set(this.assemblyForm,name + 'Details',item.details)
-                            // 国家名称
-                            this.$set(this.assemblyForm,name + 'CntyName',item.cntyName)
+                            // this.$set(this.assemblyForm,name + 'Details',item.details)
+                            if(!this.assemblyForm[name + 'Details']){
+                                this.$set(this.assemblyForm,name + 'Details',item.details)  
+                            }
+                           // 国家名称
+                           this.$set(this.assemblyForm,name + 'CntyName',item.cntyName)
                             // 国家代码
                             this.$set(this.assemblyForm,name + 'CntyCode',item.cntyCode)
                         }

+ 78 - 41
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -15,8 +15,10 @@
                 <!--    <div>-->
 
                 <!--    </div>-->
+                <el-button  size="small" type="primary" style="margin-right: 8px" @click="addEdit">新 建
+                </el-button>
                 <el-dropdown style="line-height: 0" v-if="saberTenantId=='409341'">
-                    <el-button size="small" type="warning" style="margin-right: 8px" :disabled="form.id">
+                    <el-button size="small" type="warning" style="margin-right: 8px" :disabled="form.billStatus>=3">
                         导入模板<i class="el-icon-arrow-down el-icon--right"></i>
                     </el-button>
                     <el-dropdown-menu slot="dropdown">
@@ -499,31 +501,6 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         ],
                         [
                             {
-                                label: "MB/L NO",
-                                text:"请输入MB/L NO",
-                                prop: "mblno",
-                                span:18,
-                                disabled:false,
-
-                            },
-                            {
-                                label: "",  // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
-                                text:"请选择付款方式",
-                                prop: "mpaymode",
-                                type:'select',
-                                labelWidth:'30px',
-                                disabled:false,
-                                span:6,
-                                dicData:[],
-                                forParameter:{
-                                    key:'dictKey',
-                                    label:'dictValue',
-                                    value:'dictKey',
-                                },
-                            },
-                        ],
-                        [
-                            {
                                 label: "HB/L NO",  //弹窗点击确认还是取消申请 调后台接口获取到一个编号
                                 prop: "HB/L NO",
                                 type:'button',
@@ -560,6 +537,31 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                             prop: "bookingNo",
                             disabled:false,
                         },
+                        [
+                            {
+                                label: "MB/L NO",
+                                text:"请输入MB/L NO",
+                                prop: "mblno",
+                                span:18,
+                                disabled:false,
+
+                            },
+                            {
+                                label: "",  // MB/L 付款方式 PP=预付, CC=到付, FPA, Other
+                                text:"请选择付款方式",
+                                prop: "mpaymode",
+                                type:'select',
+                                labelWidth:'30px',
+                                disabled:false,
+                                span:6,
+                                dicData:[],
+                                forParameter:{
+                                    key:'dictKey',
+                                    label:'dictValue',
+                                    value:'dictKey',
+                                },
+                            },
+                        ],
                         {
                             label: "REF MBLNO", // Co-Loader 中文名称  往来单位 类别
                             text:"请输入REF MBLNO",
@@ -786,6 +788,21 @@ import {editypesList} from "@/api/iosBasicData/editypes";
             this.postSelectByUserfun()
         },
         methods:{
+        addEdit(){
+            if(this.form.billStatus>=3){
+                this.$emit('toAddEdit')
+            }else{
+              this.$confirm('此操作将保存并新建, 是否继续?', '提示', {
+                 confirmButtonText: '确定',
+                 cancelButtonText: '取消',
+                 type: 'warning'
+              }).then(() => {
+                 this.editCustomer('toAddEdit')
+              }).catch(() => {
+              
+              });
+            }
+        },
             //文档导入
         importData(row) {
            if(row==0){
@@ -811,12 +828,27 @@ import {editypesList} from "@/api/iosBasicData/editypes";
         },
        // 上传成功
        onSuccess(res, done, loading, column) {
-           const obj = Object.assign(res,this.removeEmptyValues(this.form));
-           this.form=obj;
+        //    const obj = Object.assign(res,this.removeEmptyValues(this.form));
+        this.$confirm('此操作将覆盖数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+            this.form=res;
            this.excelBox = false;
            this.$message.success("导入成功!");
            loading = false;
            done();
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消操作'
+          });          
+          this.excelBox = false;
+          loading = false;
+          done();
+        });
+
        },
             // 获取EDI列表数据
             editypesListfun(){
@@ -1161,6 +1193,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                     // 往来单位
                     for(let item of this.columnforfun('corpCnName').dicData) {
                         if (item.cnName == value) {
+                            console.log(1111)
                             this.form.corpCnName = item.cnName
                             this.form.corpEnName = item.enName
                             this.form.corpId = item.id
@@ -1177,13 +1210,13 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                             // 航线带出往来单位的优势航线
                             this.$set(this.form,'lineCnName',item.advantageRoute)
                             // 带出发货人数据
-                            this.$set(this.form,'hshipperId',item.id)
-                            this.$set(this.form,'hshipperCnName',item.cnName)
-                            this.$set(this.form,'hshipperEnName',item.enName)
-                            this.$set(this.form,'hshipperCode',item.code)
-                            this.$set(this.form,'hshipperDetails',item.details)
-                            this.$set(this.form,'hshipperCntyName',item.cntyName)
-                            this.$set(this.form,'hshipperCntyCode',item.cntyCode)
+                            // this.$set(this.form,'hshipperId',item.id)
+                            // this.$set(this.form,'hshipperCnName',item.cnName)
+                            // this.$set(this.form,'hshipperEnName',item.enName)
+                            // this.$set(this.form,'hshipperCode',item.code)
+                            // this.$set(this.form,'hshipperDetails',item.details)
+                            // this.$set(this.form,'hshipperCntyName',item.cntyName)
+                            // this.$set(this.form,'hshipperCntyCode',item.cntyCode)
                         }
                     }
                 }
@@ -1420,7 +1453,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                 this.detailData.seeDisabled = false
             },
             // 大保存按钮
-            editCustomer(){
+            editCustomer(status){
                 this.$refs.form.validate((valid)=>{
                     if (valid) {
                         // 判断必填项
@@ -1482,12 +1515,12 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         // 赋值 ETD 日期
                         this.form.billDate = this.form.etd?this.form.etd.slice(0,10) + ' 00:00:00':null // 单据日期
                         // 调用保存接口
-                        this.billsSubmitfun()
+                        this.billsSubmitfun(status)
                     }
                 })
             },
             // 主表保存接口大保存
-            billsSubmitfun(){
+            billsSubmitfun(status){
                 if (this.form.cargoType == 'dry') {
                     // 普货
                     this.form.billNoFormat = 'HYCK-PH'
@@ -1607,9 +1640,10 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                         message: "操作成功!"
                     });
                     // this.detailData.seeDisabled = true
-                    this.billsDetailfun(res.data.data.id)
+                    this.billsDetailfun(res.data.data.id,status)
                 }).catch(err=>{
                     this.pageLoading = false
+                }).finally(() => {
                 })
             },
             // 提取箱专用的保存
@@ -1693,7 +1727,7 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                 })
             },
             // 详情接口
-            async billsDetailfun(id){
+            async billsDetailfun(id,status){
                 const res = await billsDetail(id)
                 // this.form = res.data.data;
                 this.$set(this, 'form', res.data.data)
@@ -1798,7 +1832,10 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                 for(let item of this.form.filesList) {
                     this.$set(item,'edit',false)
                 }
-
+                if(status=='toAddEdit'){
+                        this.$emit(status)
+                    }
+                  
             },
             // tbas切换
             handleClick(tba,event) {

+ 19 - 2
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -418,7 +418,7 @@
           </avue-crud>
       </basic-container>
 
-      <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack"></bills-details>
+      <bills-details ref="billsDetails" v-if="!isShow" :detailData="detailData" @goBack="goBack" @toAddEdit="toAddEdit" :key="datekey"></bills-details>
 
       <el-dialog
           title="主单列表"
@@ -480,6 +480,7 @@ import { getDeptTree } from "@/api/system/dept";
     components:{TreeSelect, SearchQuery, feesTemplateItems, billsDetails,SplitList},
     data() {
       return {
+        datekey:Date.now(),
           ediData:[], // 获取的 edi 数据
           // 展开和收回
           fold:false,
@@ -760,7 +761,7 @@ import { getDeptTree } from "@/api/system/dept";
             },
             {
               label: "装货港",
-              prop: "polCnName",
+              prop: "polEnName",
                 width:"120",
                 overHidden:true,
             },
@@ -822,6 +823,18 @@ import { getDeptTree } from "@/api/system/dept";
                   searchOrder:11,
               },
               {
+              label: "箱型/箱量",
+              prop: "quantityCntrDescr",
+                width:"120",
+                overHidden:true,
+            },
+            // {
+            //   label: "箱量",
+            //   prop: "CntrDescr",
+            //     width:"120",
+            //     overHidden:true,
+            // },
+              {
                   label: "业务来源",
                   prop: "srcType",
                   type: 'select',
@@ -1662,6 +1675,10 @@ import { getDeptTree } from "@/api/system/dept";
                 })
                 .catch(_ => {});
         },
+        toAddEdit(){
+            this.datekey=Date.now()
+         
+        },
         // 详情的返回列表
         goBack() {
             // 初始化数据