Ver Fonte

货代bug 2023-12-21

caojunjie há 1 ano atrás
pai
commit
2de1a76824

+ 2 - 2
src/api/iosBasicData/reports.js

@@ -12,7 +12,7 @@ export const getList = (current, size, params) => {
   })
 }
 
-export const getDetail = (id) => {
+export const reportsDetail = (id) => {
   return request({
     url: '/api/blade-los/reports/detail',
     method: 'get',
@@ -22,7 +22,7 @@ export const getDetail = (id) => {
   })
 }
 
-export const remove = (ids) => {
+export const reportsRemove = (ids) => {
   return request({
     url: '/api/blade-los/reports/remove',
     method: 'post',

+ 5 - 1
src/views/approveDataH/index.vue

@@ -343,9 +343,13 @@ export default {
           this.$router.$avueRouter.closeTag(row.url);
           this.$router.push({
             path: row.url,
-            query: {}
+            query: {
+                billId:row.billId
+            }
           });
         }
+      }else {
+          this.$message.warning('当前数据无法跳转')
       }
     },
     //审批通过

+ 6 - 0
src/views/iosBasicData/SeafreightExportF/bills/approvalDetails.vue

@@ -708,6 +708,12 @@ export default {
         }
     },
     created() {
+        // billId
+        console.log(this.$route.query,711)
+        if (this.$route.query.billId) {
+            // 从审批里查看跳进来的
+            this.billsDetailfun(this.$route.query.billId)
+        }
         this.$store.commit('HYCKLOS_IN_DETAIL')
         this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
         // 判断是否员id, 有id 就不显示

+ 1 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/containers.vue

@@ -292,7 +292,7 @@ import {getToken} from "@/util/auth";
           // 上传成功
           onSuccess(res, done, loading, column) {
               this.excelBox = false;
-              this.$message.success("导入成功!");
+              // this.$message.success("导入成功!");
               this.containersListfun()
               loading = false;
               done();

+ 337 - 29
src/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue

@@ -27,6 +27,13 @@
                             <el-button type="primary" size="small" icon="el-icon-plus" @click="addbtnfun()">新增单证
                             </el-button>
                         </template>
+                        <template slot-scope="scope" slot="menu">
+                            <el-button type="text" size="small" @click="printEditing(scope.row)" >编辑</el-button>
+                            <el-button type="text" size="small" @click="printDelete(scope.row)" >
+                                <span style="color: red">删除</span>
+                            </el-button>
+                            <el-button type="text" size="small" @click="dialogPreviewfun(scope.row)">打印预览</el-button>
+                        </template>
                     </avue-crud>
                 </basic-container>
             </el-col>
@@ -46,33 +53,38 @@
         <!--添加编辑弹窗-->
         <el-dialog title="单证操作" :visible.sync="documentVisible" append-to-body width="60%" :before-close="corpTypeClose">
             <Dispatch-Notice v-if="businesstypeData.code == 'PCTZD'" :documentForm="documentForm"></Dispatch-Notice>
-            <Purchase-Notice v-if="businesstypeData.code == 'RHTZ'" :documentForm="documentForm"></Purchase-Notice>
+            <Purchase-Notice v-else-if="businesstypeData.code == 'RHTZ'" :documentForm="documentForm"></Purchase-Notice>
             <span v-else>啥也不是</span>
             <span slot="footer" class="dialog-footer">
-                <el-button type="success" >保存并打印</el-button>
-                <el-button @click="documentVisible = false">取 消</el-button>
-                <el-button type="primary" @click="documentSubmit">确 定</el-button>
+                <el-button type="success" @click="documentSubmit(true)" >保存并打印</el-button>
+                <el-button @click="printingCanceling">取 消</el-button>
+                <el-button type="primary" @click="documentSubmit(false)">确 定</el-button>
             </span>
         </el-dialog>
 
+        <!--费用打印-->
+        <reportContainer ref="reportContainer"></reportContainer>
     </div>
 </template>
 
 <script>
-import {getList as reportsList} from "@/api/iosBasicData/reports";
+import {getList as reportsList, reportsGetReportData,reportsDetail,reportsRemove} from "@/api/iosBasicData/reports";
 import {reportslogList, reportslogSubmit} from "@/api/iosBasicData/bills";
 import {bbusinesstypeList} from "@/api/iosBasicData/bbusinesstype";
 import bbusinesstype from "@/views/iosBasicData/bbusinesstype/index.vue";
 import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
 import DispatchNotice from '@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsFrame/DispatchNotice.vue'
 import PurchaseNotice from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsFrame/PurchaseNotice.vue";
+import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
 
     export default {
-        components: {reportformsList, bbusinesstype,DispatchNotice,PurchaseNotice},
+        components: {reportContainer, reportformsList, bbusinesstype,DispatchNotice,PurchaseNotice},
         data(){
             return {
                 documentVisible:false, // 单证添加编辑弹窗
+                editData:{}, // 编辑弹窗的数据
                 documentForm:{}, // 添加编辑弹窗的数据
+                documenturl:'', // 报表的url 暂存
                 corpTypeVisible:false,
                 // 左侧配置项
                 treeOption: {
@@ -101,11 +113,11 @@ import PurchaseNotice from "@/views/iosBasicData/SeafreightExportF/bills/assembl
                     index: true,
                     selection: true,
                     dialogClickModal: false,
-                    menuWidth:260,
                     addBtn:false,
-                    viewBtn: true,
+                    viewBtn:false,
                     delBtn:false,
                     editBtn:false,
+                    menuWidth:'160',
                     column: [
                         {
                             label: "报表编码",
@@ -113,8 +125,13 @@ import PurchaseNotice from "@/views/iosBasicData/SeafreightExportF/bills/assembl
                             overHidden:true,
                         },
                         {
-                            label: "备注",
-                            prop: "remarks",
+                            label: "创建人",
+                            prop: "createUserName",
+                            overHidden:true,
+                        },
+                        {
+                            label: "创建时间",
+                            prop: "createTime",
                             overHidden:true,
                         },
                     ]
@@ -144,37 +161,104 @@ import PurchaseNotice from "@/views/iosBasicData/SeafreightExportF/bills/assembl
             this.reportsListfun()
         },
         methods:{
+            // 打印预览按钮
+            dialogPreviewfun(row){
+                console.log(row,157)
+                console.log(JSON.parse(row.printContent),153)
+                this.handleReportPreview(JSON.parse(row.printContent).url,JSON.parse(row.printContent).data)
+            },
             // 新建单证按钮
             addbtnfun(){
                 if(!this.businesstypeData.id){
                     this.$message.warning("请先选择报表类型");
                     return
                 }
-                console.log(this.businesstypeData,153)
-                // 打开报表选择框
+                reportsGetReportData({
+                    billId:this.assemblyForm.id,
+                    reportCode:this.businesstypeData.code,
+                    groupCode:this.businesstypeData.cnName,
+                }).then(res=>{
+                    console.log(this.businesstypeData,181)
+                    // 字段过长报错 只把可用的字段摘出来
+                    // if (this.businesstypeData.code == 'RHTZ') {
+                    //     this.documentForm.quantity = res.data.data.data.quantity
+                    //     this.documentForm.grossWeight = res.data.data.data.grossWeight
+                    //     this.documentForm.measurement = res.data.data.data.measurement
+                    //     this.documentForm.quantityCntrTypesDescr = res.data.data.data.quantityCntrTypesDescr
+                    //     this.documentForm.destinationName = res.data.data.data.destinationName
+                    //     this.documentForm.vesselCnName = res.data.data.data.vesselCnName
+                    //     this.documentForm.etd = res.data.data.data.etd
+                    //     this.documentForm.mblno = res.data.data.data.mblno
+                    // }
+                    this.documentForm = res.data.data.data
+                    this.documenturl = res.data.data.url;
+                    // 打开报表选择框
+                    this.documentVisible = true
+                })
+            },
+            // 编辑
+            printEditing(row){
+                this.businesstypeData.code = row.reportsCode
+                this.editData = row
+                this.documentForm = JSON.parse(row.printContent).data
+                this.documenturl = JSON.parse(row.printContent).url;
                 this.documentVisible = true
             },
+            // 删除
+            printDelete(row){
+                this.$confirm("确定将选择数据删除?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(()=>{
+                    reportsRemove(row.id).then(res=>{
+                        this.$message.success('操作成功')
+                        this.reportslogListfun(this.documentPage, this.query);
+                    })
+                })
+            },
             // 单证弹窗的确认按钮
-            documentSubmit(){
-                // 打印时间
-                // printTime
-                let obj = {
-                    remarks:this.assemblyForm.remarks,
-                    businessType:this.assemblyForm.businessType,
-                    billId:this.assemblyForm.billId,
-                    billNo:this.assemblyForm.billNo,
-                    mblno:this.assemblyForm.mblno,
-                    hblno:this.assemblyForm.hblno,
-                    reportsCode:this.businesstypeData.code,
-                    groupCode:this.businesstypeData.groupCode,
-                    printContent:JSON.stringify(this.documentForm),
+            documentSubmit(type){
+                let obj = {}
+                if (this.editData.id){
+                    obj = this.editData
+                }else {
+                    obj.remarks = this.assemblyForm.remarks
+                    obj.businessType = this.assemblyForm.businessType
+                    obj.billId = this.assemblyForm.billId
+                    obj.billNo = this.assemblyForm.billNo
+                    obj.mblno = this.assemblyForm.mblno
+                    obj.hblno = this.assemblyForm.hblno
+                    obj.reportsCode = this.businesstypeData.code
+                    obj.groupCode = this.businesstypeData.groupCode
                 }
-                console.log(obj,204)
-                return
-                reportslogSubmit().then(res=>{
-                    console.log(res,151)
+                console.log(this.documentForm,235)
+                console.log(this.documenturl,236)
+                obj.printContent = JSON.stringify({
+                    data:this.documentForm,
+                    url:this.documenturl
+                })
+                // 保存
+                reportslogSubmit(obj).then(res=>{
+                    if (type) {
+                        this.handleReportPreview(this.documenturl,this.documentForm)
+                    }else {
+                        this.$message.success('操作成功')
+                    }
+                    this.reportslogListfun(this.documentPage, this.query);
+                    this.editData = {}
+                    this.documentForm = {}
+                    this.documenturl = {}
+                    this.documentVisible = false
                 })
             },
+            // 打印取消
+            printingCanceling(){
+                this.editData = {}
+                this.documentForm = {}
+                this.documenturl = {}
+                this.documentVisible = false
+            },
             // 左侧筛选
             nodeClick(data) {
                 this.businesstypeData = data
@@ -226,6 +310,230 @@ import PurchaseNotice from "@/views/iosBasicData/SeafreightExportF/bills/assembl
                     this.loading = false;
                 })
             },
+            // 预览报表
+            handleReportPreview(url,data){
+                console.log(url,1670)
+                console.log(data,1671)
+                Stimulsoft.Base.StiLicense.key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
+                // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
+                Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile( '/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
+                Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml' )
+                // 工具栏
+                var options = new Stimulsoft.Viewer.StiViewerOptions()
+                options.height = '100%'
+                options.appearance.scrollbarsMode = true // 滚动条模式
+                options.toolbar.showDesignButton = false // 显示设计按钮
+                options.toolbar.showAboutButton = false // 显示关于按钮
+                options.toolbar.showResourcesButton = false // 显示资源按钮
+                options.toolbar.showFullScreenButton = false // 显示全屏按钮
+                options.toolbar.showOpenButton = false // 显示打开按钮
+                options.appearance.showTooltips = false // 显示工具提示
+                options.appearance.showDialogsHelp = false // 显示对话框帮助
+                options.exports.showExportToDocument = false // 显示导出到文档
+                options.toolbar.showParametersButton = true // 显示参数按钮
+                options.appearance.bookmarksPrint = true // 书签打印
+                // options.toolbar.showPrintButton = false // 打印按钮是否显示   下面直接自定义控制打印弹窗是否开启
+
+                // printDestination 参数:用于指定报表打印的目标位置,可以是打印机、PDF 文件或者直接打印到浏览器等。
+                // Stimulsoft.Viewer.StiPrintDestination.Direct:表示直接打印到打印机,即将报表内容直接发送至打印机进行打印。
+                // 通过设置不同的 printDestination 参数,你可以控制报表打印的行为,例如是直接打印到打印机,还是生成 PDF 文件,或者直接在浏览器中预览打印内容等。
+                options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
+                // htmlRenderMode html渲染模式
+                options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
+                // 是创建一个 Stimulsoft 报表查看器的实例的代码
+                let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
+
+                // 报表
+                console.log("创建一个报表实例");
+                console.log()
+                let report = new window.Stimulsoft.Report.StiReport();
+
+                // 加载文件
+                console.log("从url加载报表");
+                // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
+                report.load(url)
+
+                data.pageOne = 'Page : 1 of 1'
+                // 处理超长数据
+                if (data.hshipperDetails) {
+                    var consignerIndex2 = data.hshipperDetails.indexOf( '\n' )
+                    for (let i = 0; i < 4; i++) {
+                        consignerIndex2 = data.hshipperDetails.indexOf( '\n', consignerIndex2 + 1 );
+                    }
+                    if (consignerIndex2 != -1) {
+                        var hshipperDetails = data.hshipperDetails.substring(consignerIndex2 + 2, data.hshipperDetails.length)
+                        data.hshipperDetails = data.hshipperDetails.substring(0, consignerIndex2) + ' *'
+                        data.commodityDescr += '\n*' + hshipperDetails
+                    }
+                }
+
+                if (data.hconsigneeDetails) {
+                    var consigneeIndex2 = data.hconsigneeDetails.indexOf( '\n' )
+                    for (let i = 0; i < 3; i++) {
+                        consigneeIndex2 = data.hconsigneeDetails.indexOf( '\n', consigneeIndex2 + 1 );
+                    }
+                    if (consigneeIndex2 != -1) {
+                        var hconsigneeDetails = data.hconsigneeDetails.substring(consigneeIndex2 + 2, data.hconsigneeDetails.length)
+                        data.hconsigneeDetails = data.hconsigneeDetails.substring(0, consigneeIndex2) + ' **'
+                        data.commodityDescr += '\n**' + hconsigneeDetails
+                    }
+                }
+
+                if (data.hnotifyDetails) {
+                    var notifierIndex2 = data.hnotifyDetails.indexOf( '\n' )
+                    for (let i = 0; i < 3; i++) {
+                        notifierIndex2 = data.hnotifyDetails.indexOf( '\n', notifierIndex2 + 1 );
+                    }
+                    if (notifierIndex2 != -1) {
+                        var hnotifyDetails = data.hnotifyDetails.substring(notifierIndex2 + 2, data.hnotifyDetails.length)
+                        data.hnotifyDetails = data.hnotifyDetails.substring(0, notifierIndex2) + ' ***'
+                        data.commodityDescr += '\n***' + hnotifyDetails
+                    }
+                }
+
+                // 处理箱号
+                if (this.isPrintTheBoxNumber) {
+                    data.commodityDescr += '\n.\n.\n'
+                }
+
+                // PLACE & DATE OF ISSUE
+                data.placeAndDateOfIssue = ''
+                if (data.issueAt) {
+                    data.placeAndDateOfIssue += data.issueAt
+                }
+                if (data.issueDate) {
+                    let date = new Date(data.issueDate.replace(/-/g,'/'));
+                    let yyyy = date.getFullYear();
+                    let mmmm = date.toDateString().split(" ")[1]
+                    let dd = date.getDate()
+                    data.placeAndDateOfIssue += ', ' + dd + '-' + mmmm + '-' + yyyy
+                }
+
+                // Total number of containers or packages received by the Carriers
+                if (data.preContainersList) {
+                    let boxMap = new Map();
+                    for (let boxQuantity of data.preContainersList) {
+                        if (boxMap.get(boxQuantity.cntrTypeCode)) {
+                            let v = boxMap.get(boxQuantity.cntrTypeCode)
+                            boxMap.set(boxQuantity.cntrTypeCode, v + boxQuantity.quantity)
+                        } else {
+                            boxMap.set(boxQuantity.cntrTypeCode, boxQuantity.quantity)
+                        }
+                    }
+                    let boxs = ''
+                    boxMap.forEach(function (value, key, map) {
+                        boxs += value + 'x' + key + ', '
+                    })
+                    boxs = boxs.substring(0, boxs.length - 2)
+
+                    data.boxQuantity = boxs + ' CONTAINER(S) ONLY'
+                }
+
+                // Number of original B/Ls
+                if (data.numberOfObl) {
+                    data.numberOfObl += ' (' + data.numberOfOblDigit + ')'
+                }
+
+                if (data.commodityDescr) {
+                    var descriptionIndex2 = data.commodityDescr.indexOf( '\n' )
+                    for (let i = 0; i < 19; i++) {
+                        descriptionIndex2 = data.commodityDescr.indexOf( '\n', descriptionIndex2 + 1 );
+                    }
+                    if (descriptionIndex2 != -1) {
+                        data.pageOne = 'Page : 1 of 2'
+                        data.pageTwo = 'Page : 2 of 2'
+                        var extraLongText = data.commodityDescr.substring(descriptionIndex2 + 2, data.commodityDescr.length)
+                        data.commodityDescr = data.commodityDescr.substring(0, descriptionIndex2)
+                        data.extraLongTips = '** TO BE CONTINUED ON ATTACHED LIST **'
+                        data.extraLongText = extraLongText
+                    }
+                }
+
+                // console.log(data.hshipperDetails, 'hshipperDetails2')
+
+                // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
+                var dataSet = new Stimulsoft.System.Data.DataSet(
+                    'reportData'
+                )
+
+                dataSet.readJson(data) // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
+                // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
+                // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
+                report.regData('reportData', 'reportData', dataSet)
+                // 从模版和数据加载报表
+                // loadReport(report, '', {})
+
+                // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
+                viewer.report = report;
+
+                this.$refs.reportContainer.showContainer(
+                    ()=> {
+                        setTimeout(() => {
+                            viewer.renderHtml('reportContainer')
+                            this.createViewerButtons(viewer)
+                        }, 50)
+                    },
+                    ()=>{
+                    },
+                )
+                console.log("加载成功完成!");
+            },
+            createViewerButtons (viewer){
+                viewer.jsObject.collections.images['myClose.png'] =
+                    'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
+                const closeBtn = viewer.jsObject.SmallButton(
+                    'closeBtn',
+                    '关闭',
+                    'myClose.png'
+                )
+                // 增加打印弹窗配置
+                const printBtn = viewer.jsObject.SmallButton(
+                    'printBtn',
+                    '打印报表',
+                    'myClose.png'
+                )
+                // console.log(viewer.jsObject.print(),'1013')
+                // 获取 关闭按钮的dom元素位置
+                const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
+                const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
+                const userButtonCell = buttonsTable.rows[0].insertCell(0)
+                // 获取打印按钮的位置
+                const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild // 打印按钮
+                const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0] // 打印按钮dom位置
+
+
+                userButtonPrint.addEventListener("click", (event)=>{
+                    console.log("打印点击");
+                    // event.preventDefault()
+                });
+                userButtonPrint.addEventListener("mouseover", (event) => {
+                    console.log("移入打印按钮");
+                    console.log(event,1035)
+
+                });
+
+                userButtonCell.className = 'stiJsViewerClearAllStyles'
+                userButtonCell.appendChild(closeBtn) // 添加关闭节点
+
+                // userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
+
+
+                let that=this
+                // 关闭按钮的监听点击
+                closeBtn.action = function() {
+                    console.log(that.$refs.ReportContainer,'1022')
+                    if (that.$refs.reportContainer)
+                        that.$refs.reportContainer.hideContainer()
+                }
+
+                // // // 打印按钮监听
+                // printBtn.action = (e)=>{
+                //     console.log('打印')
+                //     window.print()
+                // }
+
+            },
+
             //自定义列保存
             async saveColumnTwo(ref, option, optionBack, code) {
                 /**

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

@@ -524,7 +524,7 @@
                                                   :filterable="true"
                                                   :clearable="true"
                                                   :remote="true"
-                                                  :disabled="detailData.seeDisabled"
+                                                  :disabled="detailData.seeDisabled || generateBillsfalse"
                                                   :buttonIf="false"
                                                   :forParameter="{key:'id',label:'cnName',value:'cnName'}"
                                                   @remoteMethod="remoteMethod($event,'packingUnit')"

+ 105 - 13
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -1068,9 +1068,6 @@
                 }
                 let arr = selection.map(item=>{
                     let obj = {}
-                    obj.corpId = item.corpId
-                    obj.corpCnName = item.corpCnName
-                    obj.corpEnName = item.corpEnName
                     obj.feeId = item.feeId
                     obj.feeCnName = item.feeCnName
                     obj.feeEnName = item.feeEnName
@@ -1095,9 +1092,9 @@
                     return obj
                 })
                 if (dc == 'D') {
-                    this.assemblyForm.feeCenterListC = [...this.assemblyForm.feeCenterListC,...arr]
+                    this.assemblyForm.feeCenterListC = [...arr,...this.assemblyForm.feeCenterListC]
                 }else {
-                    this.assemblyForm.feeCenterListD = [...this.assemblyForm.feeCenterListD,...arr]
+                    this.assemblyForm.feeCenterListD = [...arr,...this.assemblyForm.feeCenterListD]
                 }
             },
             // 往来单位弹窗开启
@@ -1200,7 +1197,7 @@
                     obj.taxRate = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].taxRate
 
                 }
-                this.assemblyForm.feeCenterListD.push(obj)
+                this.assemblyForm.feeCenterListD.unshift(obj)
             },
             // 应付新增
             addCfun(){
@@ -1274,6 +1271,27 @@
                     });
                     return
                 }
+                let sum = '请输入'
+                if (!row.corpId) {
+                    sum += ` 序号${index + 1}往来单位`
+                }
+                if (!row.feeId) {
+                    sum += ` 序号${index + 1}费用简称`
+                }
+                if (!row.elementsCode) {
+                    sum += ` 序号${index + 1}核算要素`
+                }
+                if (!row.curCode) {
+                    sum += ` 序号${index + 1}币种`
+                }
+                if(sum != '请输入') {
+                    this.$confirm(sum, {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    })
+                    return;
+                }
                 // 收付 D=收 C=付
                 row.dc = dc
                 row.pid = this.pid
@@ -1318,6 +1336,7 @@
                 // 判断必填项
                 let sum = '请输入'
                 for (let item of selectionArr) {
+                    console.log(item,1339)
                     if (!item.id) {
                         this.$message.warning(`序号${item.$index + 1}请先保存再进行生成账单`)
                         return
@@ -1404,15 +1423,49 @@
             batchDelete(dc){
                 let arr = []
                 if (dc == 'D') {
-                    arr = this.selectionDList.map(item=>{
-                        return item.id
-                    })
+                    for(let item of this.selectionDList) {
+                        if (item.id) {
+                            arr.push(item.id)
+                        }
+                    }
                 }else {
-                    arr = this.selectionCList.map(item=>{
-                        return item.id
-                    })
+                    for(let item of this.selectionCList) {
+                        if (item.id) {
+                            arr.push(item.id)
+                        }
+                    }
                 }
-                this.deletefun({id:arr.join(',')})
+                this.$confirm("确定将选择数据删除?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(()=>{
+                    if (arr.length != 0) {
+                        feecenterRemove(arr.join(',')).then(res=>{
+                            this.$message({
+                                type: "success",
+                                message: "操作成功!"
+                            });
+                            this.$emit('billsDetailfun')
+                        })
+                    }
+                    if (dc == 'D') {
+                        for (let index = this.selectionDList.length; index >= 0; index--) {
+                            this.assemblyForm.feeCenterListD.splice(index, 1)
+                        }
+                        // for (let item of this.selectionDList) {
+                        //     this.assemblyForm.feeCenterListD.splice(item.$index, 1)
+                        // }
+                    }else {
+                        for (let index = this.selectionCList.length; index >= 0; index--) {
+                            this.assemblyForm.feeCenterListC.splice(index, 1)
+                        }
+                        // for (let item of this.selectionCList) {
+                        //     this.assemblyForm.feeCenterListC.splice(item.$index, 1)
+                        // }
+                    }
+                })
+                // this.deletefun({id:arr.join(',')})
             },
             // 应收删除
             deletefun(row,index,dc) {
@@ -1677,6 +1730,45 @@
                     });
                     return
                 }
+                // 判断必填项
+                let sum = '请输入'
+                for (let item of this.assemblyForm.feeCenterListD) {
+                    if (!item.corpId) {
+                        sum += ` 应收序号${item.$index + 1}往来单位`
+                    }
+                    if (!item.feeId) {
+                        sum += ` 应收序号${item.$index + 1}费用简称`
+                    }
+                    if (!item.elementsCode) {
+                        sum += ` 应收序号${item.$index + 1}核算要素`
+                    }
+                    if (!item.curCode) {
+                        sum += ` 应收序号${item.$index + 1}币种`
+                    }
+                }
+                for (let item of this.assemblyForm.feeCenterListC) {
+                    if (!item.corpId) {
+                        sum += ` 应付序号${item.$index + 1}往来单位`
+                    }
+                    if (!item.feeId) {
+                        sum += ` 应付序号${item.$index + 1}费用简称`
+                    }
+                    if (!item.elementsCode) {
+                        sum += ` 应付序号${item.$index + 1}核算要素`
+                    }
+                    if (!item.curCode) {
+                        sum += ` 应付序号${item.$index + 1}币种`
+                    }
+                }
+                if(sum != '请输入') {
+                    this.$confirm(sum, {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    })
+                    return;
+                }
+
                 this.$confirm("确定保存全部的费用信息?", {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",

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

@@ -29,7 +29,7 @@
                             </span>
                             <el-input type="age" style="width: 100%;" v-model="assemblyForm.cyContacts"
                                       size="small" autocomplete="off"
-                                      :disabled="detailData.seeDisabled"
+                                      :disabled="detailData.seeDisabled || generateBillsfalse"
                                       clearable placeholder="请输入联系人" ></el-input>
                         </el-form-item>
                     </el-col>
@@ -41,7 +41,7 @@
                         </span>
                         <el-input type="age" style="width: 100%;" v-model="assemblyForm.cyAddress"
                                   size="small" autocomplete="off"
-                                  :disabled="detailData.seeDisabled"
+                                  :disabled="detailData.seeDisabled || generateBillsfalse"
                                   clearable placeholder="请输入地址" ></el-input>
                     </el-form-item>
                 </el-col>
@@ -52,7 +52,7 @@
                 </span>
                 <el-input type="textarea" style="width: 100%;" v-model="assemblyForm.cyRemarks"
                           size="small" autocomplete="off"
-                          :disabled="detailData.seeDisabled" rows="3"
+                          :disabled="detailData.seeDisabled || generateBillsfalse" rows="3"
                           clearable placeholder="备注内容把" ></el-input>
             </el-form-item>
 

+ 95 - 43
src/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsFrame/DispatchNotice.vue

@@ -2,17 +2,17 @@
     <div>
         <el-form :model="documentForm" ref="form" label-width="90px" style="margin-bottom: 4px" class="demo-ruleForm">
             <el-form-item label="TO:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.TO"
+                <el-input type="age" style="width: 100%;" v-model="documentForm.to"
                           size="small" autocomplete="off" clearable placeholder="TO" >
                 </el-input>
             </el-form-item>
             <el-form-item label="CC:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.CC"
+                <el-input type="age" style="width: 100%;" v-model="documentForm.cc"
                           size="small" autocomplete="off" clearable placeholder="CC" >
                 </el-input>
             </el-form-item>
             <el-form-item label="FM:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.from"
+                <el-input type="age" style="width: 100%;" v-model="documentForm.fm"
                           size="small" autocomplete="off" clearable placeholder="FM" >
                 </el-input>
             </el-form-item>
@@ -20,118 +20,142 @@
                 <el-row>
                     <el-col :span="12">
                         <el-input type="age" style="width: 100%;" v-model="documentForm.mblno"
-                                  size="small" autocomplete="off" clearable placeholder="提单号码" >
+                                  size="small" autocomplete="off" clearable placeholder="MBL NO" >
                         </el-input>
                     </el-col>
                     <el-col :span="11">
                         <span style="margin-left: 15px"></span>
-                        <el-input type="age" style="width: 100%;" v-model="documentForm.mblno"
-                                  size="small" autocomplete="off" clearable placeholder="提单号码" >
-                        </el-input>
+                        <el-date-picker v-model="documentForm.datetime" clearable style="width: 100%"
+                                        type="date" size="small"
+                                        value-format="yyyy-MM-dd"
+                                        placeholder="请选择时间">
+                        </el-date-picker>
                     </el-col>
                 </el-row>
             </el-form-item>
             <el-form-item label="船名/航次:" prop="corpCnName" >
                 <el-row>
                     <el-col :span="12">
-                        <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
+                        <el-input type="age" style="width: 100%;" v-model="documentForm.vesselCnName"
                                   size="small" autocomplete="off" clearable placeholder="船名/航次" >
                         </el-input>
                     </el-col>
                     <el-col :span="11">
                         <span style="margin-left: 15px"></span>
-                        <el-input type="age" style="width: 100%;" v-model="documentForm.FM"
+                        <el-input type="age" style="width: 100%;" v-model="documentForm.billNo"
                                   size="small" autocomplete="off" clearable placeholder="业务编号" >
                         </el-input>
                     </el-col>
                 </el-row>
             </el-form-item>
             <el-form-item label="箱量:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                          size="small" autocomplete="off" clearable placeholder="船名/航次" >
+                <el-input type="age" style="width: 100%;" v-model="documentForm.quantityCntrTypesDescr"
+                          size="small" autocomplete="off" clearable placeholder="箱量" >
                 </el-input>
             </el-form-item>
+
             <el-form-item label="场站:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                          size="small" autocomplete="off" clearable placeholder="船名/航次" >
-                </el-input>
+                <search-query :datalist="cyData"
+                              :selectValue="documentForm.cyCnName"
+                              :filterable="true"
+                              :clearable="true"
+                              :remote="true"
+                              :buttonIf="false"
+                              :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                              placeholder="请选择场站"
+                              @remoteMethod="cyBcorpslistByType"
+                              @corpChange="corpChange($event,'cy')"
+                              @corpFocus="cyBcorpslistByType" >
+                </search-query>
             </el-form-item>
             <el-row>
                 <el-col :span="12">
                     <el-form-item label="联系人:" prop="corpCnName" >
-                        <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                                  size="small" autocomplete="off" clearable placeholder="船名/航次" >
+                        <el-input type="age" style="width: 100%;" v-model="documentForm.cyContacts"
+                                  size="small" autocomplete="off" clearable placeholder="场站联系人" >
                         </el-input>
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="联系电话:" prop="corpCnName" >
-                        <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                                  size="small" autocomplete="off" clearable placeholder="船名/航次" >
+                        <el-input type="age" style="width: 100%;" v-model="documentForm.cyTel"
+                                  size="small" autocomplete="off" clearable placeholder="场站联系电话" >
                         </el-input>
                     </el-form-item>
                 </el-col>
             </el-row>
             <el-form-item label="工厂名称:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                          size="small" autocomplete="off" clearable placeholder="船名/航次" >
+                <el-input type="age" style="width: 100%;" v-model="documentForm.factoryName"
+                          size="small" autocomplete="off" clearable placeholder="工厂名称" >
                 </el-input>
             </el-form-item>
             <el-form-item label="工厂地址:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                          size="small" autocomplete="off" clearable placeholder="船名/航次" >
+                <el-input type="age" style="width: 100%;" v-model="documentForm.factoryAddress"
+                          size="small" autocomplete="off" clearable placeholder="工厂地址" >
                 </el-input>
             </el-form-item>
             <el-row>
                 <el-col :span="12">
                     <el-form-item label="联系人:" prop="corpCnName" >
-                        <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                                  size="small" autocomplete="off" clearable placeholder="船名/航次" >
+                        <el-input type="age" style="width: 100%;" v-model="documentForm.factoryContacts"
+                                  size="small" autocomplete="off" clearable placeholder="工厂联系人" >
                         </el-input>
                     </el-form-item>
                 </el-col>
                 <el-col :span="12">
                     <el-form-item label="联系电话:" prop="corpCnName" >
-                        <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                                  size="small" autocomplete="off" clearable placeholder="联系电话" >
+                        <el-input type="age" style="width: 100%;" v-model="documentForm.factoryTel"
+                                  size="small" autocomplete="off" clearable placeholder="工厂联系电话" >
                         </el-input>
                     </el-form-item>
                 </el-col>
             </el-row>
             <el-form-item label="派车时间:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                          size="small" autocomplete="off" clearable placeholder="船名/航次" >
-                </el-input>
+                <el-date-picker v-model="documentForm.dispatchTime" clearable style="width: 100%"
+                                type="date" size="small"
+                                value-format="yyyy-MM-dd"
+                                placeholder="选择派车时间">
+                </el-date-picker>
             </el-form-item>
             <el-form-item label="费用确认:" prop="corpCnName" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.vesselVoyno"
-                          size="small" autocomplete="off" clearable placeholder="船名/航次" >
+                <el-input type="age" style="width: 100%;" v-model="documentForm.costConfirmation"
+                          size="small" autocomplete="off" clearable placeholder="费用确认" >
                 </el-input>
             </el-form-item>
             <div style="display: flex;align-items: center;margin-left: 25px">
-                <span>请于</span>
-                <el-input type="age" style="width: 30%;" v-model="documentForm.vesselVoyno"
-                          size="small" autocomplete="off" clearable placeholder="船名/航次" >
-                </el-input>
+                <span style="width: 60px;text-align: right;">请于</span>
+                <el-date-picker v-model="documentForm.timeOn" clearable style="width: 30%"
+                                type="date" size="small"
+                                value-format="yyyy-MM-dd"
+                                placeholder="请选择时间">
+                </el-date-picker>
                 <span>前到达指定工厂,并于</span>
-                <el-input type="age" style="width: 30%;" v-model="documentForm.vesselVoyno"
-                          size="small" autocomplete="off" clearable placeholder="船名/航次" >
-                </el-input>
+                <el-date-picker v-model="documentForm.endTime" clearable style="width: 30%"
+                                type="date" size="small"
+                                value-format="yyyy-MM-dd"
+                                placeholder="请选择时间">
+                </el-date-picker>
                 <span>前回场站</span>
             </div>
             <el-form-item label="备注:" prop="remarks" >
-                <el-input type="age" style="width: 100%;" v-model="documentForm.remarks"
-                          size="small" autocomplete="off" clearable placeholder="备注" >
-                </el-input>
+                <el-input type="textarea" style="width: 100%;" v-model="documentForm.bookingRemarks"
+                          size="small" autocomplete="off" rows="3"
+                          clearable placeholder="备注"></el-input>
             </el-form-item>
         </el-form>
     </div>
 </template>
 
 <script>
+    import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+    import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
+
     export default {
+        components: {SearchQuery},
         data() {
-            return {}
+            return {
+                cyData:[], // 场站
+            }
         },
         props:{
             documentForm:{
@@ -140,7 +164,35 @@
             }
         },
         methods:{
-
+            corpChange(value,name) {
+                if (name == 'cy') {
+                    if (!value) {
+                        this.$set(this.documentForm,'cyId','')
+                        this.$set(this.documentForm,'cyCode','')
+                        this.$set(this.documentForm,'cyCnName','')
+                        this.$set(this.documentForm,'cyEnName','')
+                        this.$set(this.documentForm,'cyContacts','')
+                        this.$set(this.documentForm,'cyTel','')
+                    }
+                    for(let item of this.cyData) {
+                        if (item.cnName == value) {
+                            this.$set(this.documentForm,'cyId',item.id)
+                            this.$set(this.documentForm,'cyCode',item.code)
+                            this.$set(this.documentForm,'cyCnName',item.cnName)
+                            this.$set(this.documentForm,'cyEnName',item.enName)
+                            this.$set(this.documentForm,'cyContacts',item.contacts)
+                            this.$set(this.documentForm,'cyTel',item.tel)
+                        }
+                    }
+                }
+            },
+            // 获取场站数据
+            cyBcorpslistByType(cnName){
+                let corpType = '1712286771737272322'
+                getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
+                    this.cyData = res.data.data.records
+                })
+            },
         }
 
     }

+ 97 - 42
src/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsFrame/PurchaseNotice.vue

@@ -3,14 +3,14 @@
         <el-row>
             <el-col :span="12">
                 <el-form-item label="TO:" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.TO"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.to"
                               size="small" autocomplete="off" clearable placeholder="TO" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="ATTN:" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.attn"
                               size="small" autocomplete="off" clearable placeholder="ATTN" >
                     </el-input>
                 </el-form-item>
@@ -20,128 +20,144 @@
             </el-col>
             <el-col :span="12">
                 <el-form-item label="件数:" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.quantity"
                               size="small" autocomplete="off" clearable placeholder="件数" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="重量:" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.grossWeight"
                               size="small" autocomplete="off" clearable placeholder="重量" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="体积:" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.measurement"
                               size="small" autocomplete="off" clearable placeholder="体积" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="箱量:" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
-                              size="small" autocomplete="off" clearable placeholder="箱量" >
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.quantityCntrTypesDescr"
+                              size="small" autocomplete="off" clearable placeholder="请输入箱量" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="目的港:" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
-                              size="small" autocomplete="off" clearable placeholder="目的港" >
-                    </el-input>
+                    <search-query :datalist="destinationData"
+                                  :selectValue="documentForm.destinationName"
+                                  :filterable="true"
+                                  :clearable="true"
+                                  :remote="true"
+                                  :buttonIf="false"
+                                  :forParameter="{key:'id',label:'enName',value:'enName'}"
+                                  @remoteMethod="destinationBportsListfun"
+                                  @corpChange="corpChange($event,'destinationName')"
+                                  @corpFocus="destinationBportsListfun" >
+                    </search-query>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="预配船名/航次" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.vesselCnName"
                               size="small" autocomplete="off" clearable placeholder="预配船名/航次" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="预计开航日:" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
-                              size="small" autocomplete="off" clearable placeholder="预计开航日" >
-                    </el-input>
+                    <el-date-picker v-model="documentForm.etd" clearable style="width: 100%"
+                                    type="date" size="small"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="选择预计开航日/ETD">
+                    </el-date-picker>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="提单号" prop="corpCnName" >
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.mblno"
                               size="small" autocomplete="off" clearable placeholder="提单号" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="24">
                 <el-form-item label="请于:" prop="corpCnName" >
-                    <el-input type="age" style="width: 50%;" v-model="documentForm.ATTN"
-                              size="small" autocomplete="off" clearable placeholder="提单号" >
-                    </el-input>
+                    <el-date-picker v-model="documentForm.goodsTime" clearable style="width: 30%"
+                                    type="date" size="small"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="请选择时间">
+                    </el-date-picker>
                     <span style="margin-left: 10px">前将货物送至指定位置</span>
                 </el-form-item>
             </el-col>
             <el-col :span="24">
                 <el-form-item label="请于:" prop="corpCnName" >
-                    <el-input type="age" style="width: 50%;" v-model="documentForm.ATTN"
-                              size="small" autocomplete="off" clearable placeholder="提单号" >
-                    </el-input>
+                    <el-date-picker v-model="documentForm.clearanceTime" clearable style="width: 30%"
+                                    type="date" size="small"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="请选择时间">
+                    </el-date-picker>
                     <span style="margin-left: 10px">前通关</span>
                 </el-form-item>
             </el-col>
             <el-col :span="24">
                 <el-form-item label="截单和VGM截止时间:" prop="corpCnName" label-width="130px">
-                    <el-input type="age" style="width: 50%;" v-model="documentForm.ATTN"
-                              size="small" autocomplete="off" clearable placeholder="提单号" >
-                    </el-input>
+                    <el-date-picker v-model="documentForm.vgmDeadline" clearable style="width: 50%"
+                                    type="date" size="small"
+                                    value-format="yyyy-MM-dd"
+                                    placeholder="请选择截单和VGM截止时间">
+                    </el-date-picker>
                 </el-form-item>
             </el-col>
             <el-col :span="24">
                 <el-form-item label="船代:" prop="corpCnName">
-                    <el-input type="age" style="width: 50%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 50%;" v-model="documentForm.shippingAgency"
                               size="small" autocomplete="off" clearable placeholder="船代" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="入货地点:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
-                              size="small" autocomplete="off" clearable placeholder="入货地点" >
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.deliverylocation"
+                              size="small" autocomplete="off" clearable placeholder="请选择入货地点" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="集装箱提取检查代码:" prop="corpCnName" label-width="130px">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.containerCheck"
                               size="small" autocomplete="off" clearable placeholder="集装箱提取检查代码" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="联系人:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.contacts"
                               size="small" autocomplete="off" clearable placeholder="联系人" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="联系电话:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.Telephone"
                               size="small" autocomplete="off" clearable placeholder="联系电话" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="24">
                 <el-form-item label="REMARKS:" prop="corpCnName">
-                    <el-input type="textarea" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="textarea" style="width: 100%;" v-model="documentForm.remarks"
                               size="small" autocomplete="off" clearable placeholder="REMARKS" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="24">
                 <el-form-item label="HLCL免费箱使" prop="corpCnName" label-width="95px">
-                    <el-input type="number" style="width: 50%;" v-model="documentForm.ATTN"
+                    <el-input type="number" style="width: 50%;" v-model="documentForm.hlclBoxenvoy"
                               size="small" autocomplete="off" clearable placeholder="HLCL免费箱使" >
                     </el-input>
                     <span style="margin-left: 10px">天</span>
@@ -149,42 +165,48 @@
             </el-col>
             <el-col :span="12">
                 <el-form-item label="部门:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
-                              size="small" autocomplete="off" clearable placeholder="部门" >
-                    </el-input>
+                    <tree-select v-model="documentForm.department" filterable
+                                 :data="departmentData"
+                                 :props="{label: 'title', children:'children'}"
+                                 nodeKey="title"
+                                 size="small"
+                                 :multiple="false"
+                                 placeholder="请选择部门"
+                                 @input="corpChange($event,'department')">
+                    </tree-select>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="FAX:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.fax"
                               size="small" autocomplete="off" clearable placeholder="FAX" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="操作:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.operate"
                               size="small" autocomplete="off" clearable placeholder="操作" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="EMAIL:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.ematl"
                               size="small" autocomplete="off" clearable placeholder="EMAIL" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="TEL:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.tel"
                               size="small" autocomplete="off" clearable placeholder="TEL" >
                     </el-input>
                 </el-form-item>
             </el-col>
             <el-col :span="12">
                 <el-form-item label="手机:" prop="corpCnName">
-                    <el-input type="age" style="width: 100%;" v-model="documentForm.ATTN"
+                    <el-input type="age" style="width: 100%;" v-model="documentForm.mobilePhone"
                               size="small" autocomplete="off" clearable placeholder="手机" >
                     </el-input>
                 </el-form-item>
@@ -196,10 +218,17 @@
 </template>
 
 <script>
+    import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+    import {bportsList} from "@/api/iosBasicData/bports";
+    import {getDeptTree} from "@/api/system/dept";
+    import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
+
     export default {
+        components: {TreeSelect, SearchQuery},
         data(){
             return {
-
+                destinationData:[], // 目的港数据
+                departmentData:[], // 部门
             }
         },
         props:{
@@ -211,9 +240,35 @@
 
         },
         created() {
-
+            this.getLazylistfun()
         },
         methods:{
+            corpChange(value,name){
+                if (name == 'destinationName') {
+                    for(let item of this.destinationData) {
+                        if (item.enName == value) {
+                            this.$set(this.documentForm,'destinationId',item.id)
+                            this.$set(this.documentForm,'destinationName',item.enName)
+                            this.$set(this.documentForm,'destinationCode',item.code)
+                            this.$set(this.documentForm,'destinationNamePrint',item.enName)
+                        }
+                    }
+                }else {
+                    this.$set(this.documentForm,name,value)
+                }
+            },
+            // 目的地
+            destinationBportsListfun(enName){
+                bportsList(1,10,{enName}).then(res=>{
+                    this.destinationData = res.data.data.records
+                })
+            },
+            // 获取机构管理接口
+            getLazylistfun(){
+                getDeptTree().then(res=>{
+                    this.departmentData = res.data.data
+                })
+            },
 
         }
     }

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

@@ -65,7 +65,7 @@
 </template>
 
 <script>
-  import {getList, getDetail, add, update, remove,reportsGetReportData} from "@/api/iosBasicData/reports";
+  import {getList, reportsDetail, add, update, reportsRemove,reportsGetReportData} from "@/api/iosBasicData/reports";
   import {getUserApprovalList} from "@/api/approval/processConfig";
   import {mapGetters} from "vuex";
   import {billsDetail} from '@/api/iosBasicData/bills'
@@ -1046,7 +1046,7 @@
           type: "warning"
         })
           .then(() => {
-            return remove(row.id);
+            return reportsRemove(row.id);
           })
           .then(() => {
             this.onLoad(this.page);
@@ -1067,7 +1067,7 @@
           type: "warning"
         })
           .then(() => {
-            return remove(this.ids);
+            return reportsRemove(this.ids);
           })
           .then(() => {
             this.onLoad(this.page);
@@ -1080,7 +1080,7 @@
       },
       beforeOpen(done, type) {
         if (["edit", "view"].includes(type)) {
-          getDetail(this.form.id).then(res => {
+          reportsDetail(this.form.id).then(res => {
             this.form = res.data.data;
           });
         }

+ 3 - 3
src/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue

@@ -192,7 +192,7 @@
 
             <el-table-column
                 prop="accBillNo"
-                label="操作">
+                label="操作(无参数)">
             </el-table-column>
             <el-table-column
                 prop="bookingNo"
@@ -274,7 +274,7 @@
             </el-table-column>
             <el-table-column
                 prop="voyageNo"
-                label="结算单号">
+                label="结算单号(暂无字段)">
                 <template slot-scope="{ row }">
                     <span class="textHide" >{{row.voyageNo}}</span>
                 </template>
@@ -290,7 +290,7 @@
             </el-table-column>
             <el-table-column
                 prop="eta"
-                label="三检单号">
+                label="三检单号(暂无字段)">
                 <template slot-scope="{ row }">
                     <span class="textHide" >{{row.voyageNo}}</span>
                 </template>

+ 5 - 8
src/views/iosBasicData/finstlbills/finstlbillsDetails.vue

@@ -767,7 +767,7 @@
 
                 if (!this.form.id) {
                     this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                        item.lineNo = index
+                        item.lineNo = Number(index) + 1
                         item.pType = item.businessType
                         item.accBillId = item.id
                         item.accBillNo = item.billNo
@@ -881,6 +881,7 @@
                 }
                 finstlbillslistAccBillV1(obj).then(res=>{
                     this.tableData = res.data.data.map(item=>{
+                        this.$set(item,'currentStlCurCode',item.curCode)
                         if(item.curCode == 'CNY') {
                             this.$set(item,'amountRMB',item.amount)
                             this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
@@ -893,11 +894,6 @@
                             this.$set(item,'unsettledAmountUSD',item.unsettledAmount)
                             this.$set(item,'stlTtlAmountUSD',item.stlTtlAmount)
                             this.$set(item,'currentStlAmountUSD',(Number(item.amount) - Number(item.stlTtlAmount)).toFixed(2))
-                            // this.$set(item,'amountUSD',(Number(item.amount) / Number(item.exrate)).toFixed(2))
-                            // this.$set(item,'currentInvoiceAmountUSD',(Number(item.currentInvoiceAmount) / Number(item.exrate)).toFixed(2))
-                            // this.$set(item,'unsettledAmountUSD',(Number(item.unsettledAmount) / Number(item.exrate)).toFixed(2))
-                            // this.$set(item,'stlTtlAmountUSD',(Number(item.stlTtlAmount) / Number(item.exrate)).toFixed(2))
-                            // this.$set(item,'currentStlAmountUSD',((Number(item.amount) - Number(item.stlTtlAmount)) / Number(item.exrate)).toFixed(2))
                         }
                         return item
                     })
@@ -1003,9 +999,10 @@
                 this.form.billNoFormat = 'HYDZ'
                 this.form.businessTypeCode = 'HYDZ'
                 this.form.businessType = 'CHK' //对账单
+                this.form.businessTypes = this.form.businessTypes.join(',') // 业务类型
                 // 保留id
                 this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                    item.lineNo = index
+                    item.lineNo = Number(index) + 1
                     item.pType = item.businessType
                     item.accBillId = item.id
                     item.accBillNo = item.billNo
@@ -1031,7 +1028,7 @@
                 this.form.businessType = 'CHK' // 对账单
 
                 this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                    item.lineNo = index
+                    item.lineNo = Number(index) + 1
                     item.pType = item.businessType
                     item.accBillId = item.id
                     item.accBillNo = item.billNo

+ 22 - 25
src/views/iosBasicData/finstlbills/index.vue

@@ -50,26 +50,6 @@
                              @click="rowDel(row)">删除
                   </el-button>
               </template>
-              <template slot-scope="scope" slot="billNo">
-                  <avue-text-ellipsis :text="scope.row.billNo" :height="30" use-tooltip placement="top">
-                      <small slot="more">...</small>
-                  </avue-text-ellipsis>
-              </template>
-              <template slot-scope="scope" slot="corpCnName">
-                  <avue-text-ellipsis :text="scope.row.corpCnName" :height="30" use-tooltip placement="top">
-                      <small slot="more">...</small>
-                  </avue-text-ellipsis>
-              </template>
-              <template slot-scope="scope" slot="corpEnName">
-                  <avue-text-ellipsis :text="scope.row.corpEnName" :height="30" use-tooltip placement="top">
-                      <small slot="more">...</small>
-                  </avue-text-ellipsis>
-              </template>
-              <template slot-scope="scope" slot="corpArgreementNo">
-                  <avue-text-ellipsis :text="scope.row.corpArgreementNo" :height="30" use-tooltip placement="top">
-                      <small slot="more">...</small>
-                  </avue-text-ellipsis>
-              </template>
 
           </avue-crud>
       </basic-container>
@@ -124,6 +104,7 @@
             {
               label: "单据编号",
               prop: "billNo",
+              overHidden:true,
             },
             {
               label: "对账/结算日期",
@@ -134,80 +115,96 @@
               label: "客户中文名称",
               prop: "corpCnName",
               width:"120",
+              overHidden:true,
             },
             {
               label: "客户英文名称",
               prop: "corpEnName",
               width:"120",
+              overHidden:true,
             },
             {
               label: "客户是否已签约",
               prop: "corpIsSigned",
               width:"120",
-                dicData:[],
-                props: {
-                    label: "dictValue",
-                    value: "dictKey"
-                },
+              dicData:[],
+              props: {
+                  label: "dictValue",
+                  value: "dictKey"
+              },
+              overHidden:true,
             },
             {
               label: "客户约号",
               prop: "corpArgreementNo",
+              overHidden:true,
             },
             {
               label: "客户账期备注",
               prop: "corpAccRemarks",
               width:"120",
+              overHidden:true,
             },
             {
               label: "业务类型",
               prop: "businessTypes",
               width:"120",
+              overHidden:true,
             },
             {
               label: "业务单据编号",
               prop: "businessNo",
               width:"120",
+              overHidden:true,
             },
             {
               label: "账单编号",
               prop: "accountNo",
               width:"100",
+              overHidden:true,
             },
             {
               label: "对账单编号",
               prop: "checkNo",
               width:"100",
+              overHidden:true,
             },
             {
               label: "业务所在部门",
               prop: "deptName",
               width:"120",
+              overHidden:true,
             },
             {
               label: "业务操作",
               prop: "operatorName",
               width:"100",
+              overHidden:true,
             },
             {
               label: "业务员",
               prop: "salesName",
+              overHidden:true,
             },
             {
               label: "费用收付",
               prop: "dc",
+              overHidden:true,
             },
             {
               label: "币种",
               prop: "curCode",
+              overHidden:true,
             },
             {
               label: "中文船名",
               prop: "vesselCnName",
+              overHidden:true,
             },
             {
               label: "英文船名",
               prop: "vesselEnName",
+              overHidden:true,
             },
             {
               label: "航次",