Browse Source

1.海运出口 客户订舱 提单合计和分箱合计 统一保留两位小数
2.海运出口 成本模板 目的港id改为交货地id
3.海运出口 进口 入货通知 修改弹窗联动 新建时获取默认值
4.海运出口 画拆单 合票弹窗
5.OW拿 OW放 新加导入导出功能
6.OW拿 箱明细合计不正确
7.放箱号 调出出场未加入已出场合计
8.放箱号 POL堆场下拉数据港口改为场站

qukaidi 6 days ago
parent
commit
1abf215f9e

+ 6 - 5
src/views/boxManagement/containerNumber/detailsPage.vue

@@ -288,9 +288,9 @@
         >
           <template slot="menuLeft">
             <!-- <el-button type="info" plain size="small" :disabled="editDisabled || searchStatus" @click="allClick('一键保存')">一键保存</el-button>
-            <el-button type="info" plain size="small" :disabled="editDisabled || searchStatus" @click="allClick('一键编辑')">一键编辑</el-button>
+            <el-button type="info" plain size="small" :disabled="editDisabled || searchStatus" @click="allClick('一键编辑')">一键编辑</el-button> -->
             <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0||form.whetherManuallyCreate==1" @click="allClick('批量删除')"
-              >批量删除</el-button> -->
+              >批量删除</el-button>
             <el-button type="success" size="small" :disabled="!form.id" @click="allClick('导出')">导出</el-button>
             <el-button
               v-if="form.boxClass != 'OW(拿)'"
@@ -322,7 +322,8 @@
                     item.boxDynamics == "已返场" ||
                     item.boxDynamics == "退租出场" ||
                     item.boxDynamics == "直接退租出场" ||
-                    item.boxDynamics == "场内退租出场"
+                    item.boxDynamics == "场内退租出场" ||
+                    item.boxDynamics == "调箱出场"
                 ).length || 0
               }}</el-tag
             >
@@ -440,11 +441,11 @@
             <dic-select
               v-if="row.$cellEdit"
               v-model="row.polCyCname"
-              placeholder="港口"
+              placeholder="场站"
               key="id"
               label="cnName"
               res="records"
-              url="/blade-los/bports/list?status=0"
+               url="/blade-los/bcorps/selectList?current=1&size=10&corpTypeName=场站&status=0"
               :filterable="true"
               :remote="true"
               dataName="cnName"

+ 970 - 918
src/views/iosBasicData/OceanFreightImport/bills/assembly/DocumentCenter.vue

@@ -1,124 +1,184 @@
 <template>
-    <div>
-        <el-form :model="assemblyForm" ref="form" label-width="90px" style="margin-bottom: 4px" class="demo-ruleForm">
-            <el-row :gutter="10">
-                <el-col :span="6">
-                    <el-form-item label="客户名称" prop="corpCnName">
-                        <span slot="label">
-                            <span style="color: #1e9fff">客户名称</span>
-                        </span>
-                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.corpCnName" size="small"
-                            autocomplete="off" disabled clearable placeholder="客户名称"></el-input>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="6">
-                    <el-form-item label="提单号" prop="mblno">
-                        <span slot="label">
-                            <span style="color: #1e9fff">提单号</span>
-                        </span>
-                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.mblno" size="small"
-                            autocomplete="off" disabled clearable placeholder="提单号"></el-input>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="6">
-                    <el-form-item label="箱型箱量" prop="containers">
-                        <span slot="label">
-                            <span style="color: #1e9fff">箱型箱量</span>
-                        </span>
-                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.quantityCntrDescr" size="small"
-                            autocomplete="off" disabled clearable placeholder="箱型箱量"></el-input>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="6">
-                    <el-form-item label="HB/L NO" prop="hblno">
-                        <span slot="label">
-                            <span style="color: #1e9fff">HB/L NO</span>
-                        </span>
-                        <el-input type="age" style="width: 100%;" v-model="assemblyForm.hblno" size="small"
-                            autocomplete="off" disabled clearable placeholder="HB/L NO"></el-input>
-                    </el-form-item>
-                </el-col>
-            </el-row>
-        </el-form>
-        <el-row>
-            <el-col :span="5">
-                <el-scrollbar>
-                    <basic-container>
-                        <avue-tree :option="treeOption" :data="feesTypeData" @node-click="nodeClick">
-                        </avue-tree>
-                    </basic-container>
-                </el-scrollbar>
-            </el-col>
-            <el-col :span="19">
-                <basic-container>
-                    <avue-crud :option="documentOption" :table-loading="loading" :data="documentData"
-                        :page.sync="documentPage" :search.sync="documentSearch" id="out-table"
-                        :header-cell-class-name="headerClassName" :before-open="beforeOpen" ref="documentCrud"
-                        @search-change="searchChange" @search-reset="searchReset" @refresh-change="refreshChange"
-                        @on-load="reportslogListfun"
-                        @resetColumn="resetColumnTwo('documentCrud', 'documentOption', 'documentOptionBack', 312.1)"
-                        @saveColumn="saveColumnTwo('documentCrud', 'documentOption', 'documentOptionBack', 312.1)">
-                        <template slot="menuLeft">
-                            <el-button type="primary" size="small" icon="el-icon-plus" :disabled="disabled"
-                                @click="addbtnfun()">新增
-                            </el-button>
-                        </template>
-                        <template slot-scope="scope" slot="menu">
-                            <el-button type="text" size="small" :disabled="disabled"
-                                @click="printEditing(scope.row)">编辑</el-button>
-                            <el-button type="text" size="small" :disabled="disabled" @click="printDelete(scope.row)">
-                                <span v-if="disabled">删除</span>
-                                <span v-else 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>
-        </el-row>
-
-
-        <!--添加编辑弹窗-->
-        <el-dialog title="单证操作" :close-on-click-modal="false" :visible.sync="documentVisible" append-to-body width="60%"
-            :before-close="corpTypeClose">
-            <Dispatch-Notice v-if="businesstypeData.reportsType == 'PCTZD'"
-                :documentForm="documentForm"></Dispatch-Notice>
-            <Purchase-Notice v-else-if="businesstypeData.reportsType == 'RHTZ'"
-                :documentForm="documentForm"></Purchase-Notice>
-            <BillofLadingDetails v-else-if="businesstypeData.reportsType == 'TDXQ'" :documentForm="documentForm">
-            </BillofLadingDetails>
-            <span v-else>啥也不是</span>
-            <span slot="footer" class="dialog-footer">
-                <!--<el-button type="success" @click="documentSubmit(true)" >保存并打印</el-button>-->
-                <el-button v-if="addShow" type="success" :disabled="!documentForm.id"
-                    @click="dialogPreviewfun(editData)">打印</el-button>
-                <el-button @click="printingCanceling">取 消</el-button>
-                <el-button type="primary" @click="documentSubmit(false)">确 定</el-button>
+  <div>
+    <el-form :model="assemblyForm" ref="form" label-width="90px" style="margin-bottom: 4px" class="demo-ruleForm">
+      <el-row :gutter="10">
+        <el-col :span="6">
+          <el-form-item label="客户名称" prop="corpCnName">
+            <span slot="label">
+              <span style="color: #1e9fff">客户名称</span>
             </span>
-        </el-dialog>
-
-        <!--费用打印-->
-        <reportContainer ref="reportContainer"></reportContainer>
-        <mail-component ref="mailComponentRef" />
-        <!--打印预览弹窗-->
-        <el-dialog append-to-body title="预览报表" class="el-dialogDeep" :visible.sync="previewDialog" width="60%"
-            :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag
-            :before-close="corpTypeClose">
-            <avue-crud :option="PreviewOption" :table-loading="loading" :data="PreviewData" :page.sync="PreviewPage"
-                :search.sync="PreviewQuery" ref="crud" id="out-table" :header-cell-class-name="headerClassName"
-                @resetColumn="resetColumnTwo('crud', 'PreviewOption', 'PreviewOptionBack', 312.3)"
-                @saveColumn="saveColumnTwo('crud', 'PreviewOption', 'PreviewOptionBack', 312.3)"
-                @search-change="PreviewSearchChange" @search-reset="PreviewSearchReset"
-                @current-change="PreviewCurrentChange" @size-change="PreviewSizeChange"
-                @refresh-change="PreviewRefreshChange">
-                <template slot-scope="scope" slot="menu">
-                    <el-link type="primary" :disabled="scope.row.status == 1"
-                        @click="handleReportPreview(scope.row.url, documentForm)">预览报表</el-link>
-                </template>
-            </avue-crud>
-        </el-dialog>
-
-    </div>
+            <el-input
+              type="age"
+              style="width: 100%;"
+              v-model="assemblyForm.corpCnName"
+              size="small"
+              autocomplete="off"
+              disabled
+              clearable
+              placeholder="客户名称"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="提单号" prop="mblno">
+            <span slot="label">
+              <span style="color: #1e9fff">提单号</span>
+            </span>
+            <el-input
+              type="age"
+              style="width: 100%;"
+              v-model="assemblyForm.mblno"
+              size="small"
+              autocomplete="off"
+              disabled
+              clearable
+              placeholder="提单号"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="箱型箱量" prop="containers">
+            <span slot="label">
+              <span style="color: #1e9fff">箱型箱量</span>
+            </span>
+            <el-input
+              type="age"
+              style="width: 100%;"
+              v-model="assemblyForm.quantityCntrDescr"
+              size="small"
+              autocomplete="off"
+              disabled
+              clearable
+              placeholder="箱型箱量"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="HB/L NO" prop="hblno">
+            <span slot="label">
+              <span style="color: #1e9fff">HB/L NO</span>
+            </span>
+            <el-input
+              type="age"
+              style="width: 100%;"
+              v-model="assemblyForm.hblno"
+              size="small"
+              autocomplete="off"
+              disabled
+              clearable
+              placeholder="HB/L NO"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-row>
+      <el-col :span="5">
+        <el-scrollbar>
+          <basic-container>
+            <avue-tree :option="treeOption" :data="feesTypeData" @node-click="nodeClick"> </avue-tree>
+          </basic-container>
+        </el-scrollbar>
+      </el-col>
+      <el-col :span="19">
+        <basic-container>
+          <avue-crud
+            :option="documentOption"
+            :table-loading="loading"
+            :data="documentData"
+            :page.sync="documentPage"
+            :search.sync="documentSearch"
+            id="out-table"
+            :header-cell-class-name="headerClassName"
+            :before-open="beforeOpen"
+            ref="documentCrud"
+            @search-change="searchChange"
+            @search-reset="searchReset"
+            @refresh-change="refreshChange"
+            @on-load="reportslogListfun"
+            @resetColumn="resetColumnTwo('documentCrud', 'documentOption', 'documentOptionBack', 312.1)"
+            @saveColumn="saveColumnTwo('documentCrud', 'documentOption', 'documentOptionBack', 312.1)"
+          >
+            <template slot="menuLeft">
+              <el-button type="primary" size="small" icon="el-icon-plus" :disabled="disabled" @click="addbtnfun()">新增 </el-button>
+            </template>
+            <template slot-scope="scope" slot="menu">
+              <el-button type="text" size="small" :disabled="disabled" @click="printEditing(scope.row)">编辑</el-button>
+              <el-button type="text" size="small" :disabled="disabled" @click="printDelete(scope.row)">
+                <span v-if="disabled">删除</span>
+                <span v-else 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>
+    </el-row>
+
+    <!--添加编辑弹窗-->
+    <el-dialog
+      title="单证操作"
+      :close-on-click-modal="false"
+      :visible.sync="documentVisible"
+      append-to-body
+      width="60%"
+      :before-close="corpTypeClose"
+    >
+      <Dispatch-Notice v-if="businesstypeData.reportsType == 'PCTZD'" :documentForm="documentForm"></Dispatch-Notice>
+      <Purchase-Notice
+        ref="purchaseNotice"
+        v-else-if="businesstypeData.reportsType == 'RHTZ' && documentVisible"
+        :documentForm="documentForm"
+      ></Purchase-Notice>
+      <BillofLadingDetails v-else-if="businesstypeData.reportsType == 'TDXQ'" :documentForm="documentForm"> </BillofLadingDetails>
+      <span v-else>啥也不是</span>
+      <span slot="footer" class="dialog-footer">
+        <!--<el-button type="success" @click="documentSubmit(true)" >保存并打印</el-button>-->
+        <el-button v-if="addShow" type="success" :disabled="!documentForm.id" @click="dialogPreviewfun(editData)">打印</el-button>
+        <el-button @click="printingCanceling">取 消</el-button>
+        <el-button type="primary" @click="documentSubmit(false)">确 定</el-button>
+      </span>
+    </el-dialog>
+
+    <!--费用打印-->
+    <reportContainer ref="reportContainer"></reportContainer>
+    <mail-component ref="mailComponentRef" />
+    <!--打印预览弹窗-->
+    <el-dialog
+      append-to-body
+      title="预览报表"
+      class="el-dialogDeep"
+      :visible.sync="previewDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+      :before-close="corpTypeClose"
+    >
+      <avue-crud
+        :option="PreviewOption"
+        :table-loading="loading"
+        :data="PreviewData"
+        :page.sync="PreviewPage"
+        :search.sync="PreviewQuery"
+        ref="crud"
+        id="out-table"
+        :header-cell-class-name="headerClassName"
+        @resetColumn="resetColumnTwo('crud', 'PreviewOption', 'PreviewOptionBack', 312.3)"
+        @saveColumn="saveColumnTwo('crud', 'PreviewOption', 'PreviewOptionBack', 312.3)"
+        @search-change="PreviewSearchChange"
+        @search-reset="PreviewSearchReset"
+        @current-change="PreviewCurrentChange"
+        @size-change="PreviewSizeChange"
+        @refresh-change="PreviewRefreshChange"
+      >
+        <template slot-scope="scope" slot="menu">
+          <el-link type="primary" :disabled="scope.row.status == 1" @click="handleReportPreview(scope.row.url, documentForm)">预览报表</el-link>
+        </template>
+      </avue-crud>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
@@ -127,835 +187,827 @@ 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/OceanFreightImport/bills/assembly/reportformsList.vue";
-import DispatchNotice from '@/views/iosBasicData/OceanFreightImport/bills/assembly/reportformsFrame/DispatchNotice.vue'
+import DispatchNotice from "@/views/iosBasicData/OceanFreightImport/bills/assembly/reportformsFrame/DispatchNotice.vue";
 import PurchaseNotice from "@/views/iosBasicData/OceanFreightImport/bills/assembly/reportformsFrame/PurchaseNotice.vue";
 import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
-import BillofLadingDetails
-    from "@/views/iosBasicData/OceanFreightImport/bills/assembly/reportformsFrame/BillofLadingDetails.vue";
+import BillofLadingDetails from "@/views/iosBasicData/OceanFreightImport/bills/assembly/reportformsFrame/BillofLadingDetails.vue";
 import { dateFormat } from "@/util/date";
 import { isProcurement } from "@/api/basicData/configuration";
 import mailComponent from "@/components/iosbasic-data/mail-component.vue";
 export default {
-    components: { BillofLadingDetails, reportContainer, reportformsList, bbusinesstype, DispatchNotice, PurchaseNotice, mailComponent },
-    data() {
-        return {
-            textareaNumber: 5,
-            addShow: false,
-            previewDialog: false, // 打印预览弹窗
-            PreviewOption: {}, // 打印预览弹窗的配置项
-            PreviewOptionBack: {
-                height: 'auto',
-                calcHeight: 30,
-                tip: false,
-                searchShow: true,
-                searchMenuSpan: 6,
-                border: true,
-                index: true,
-                selection: true,
-                dialogClickModal: false,
-                menuWidth: 100,
-                addBtn: false,
-                viewBtn: false,
-                delBtn: false,
-                editBtn: false,
-                column: [
-                    {
-                        label: "组别",
-                        prop: "groupCode",
-                        rules: [{
-                            required: true,
-                            message: "请输入组别",
-                            trigger: "blur"
-                        }]
-                    },
-                    {
-                        label: "报表编码",
-                        prop: "code",
-                        rules: [{
-                            required: true,
-                            message: "请输入报表编码",
-                            trigger: "blur"
-                        }]
-                    },
-                    {
-                        label: "中文名称",
-                        prop: "cnName",
-                        rules: [{
-                            required: true,
-                            message: "请输入中文名称",
-                            trigger: "blur"
-                        }]
-                    },
-                    {
-                        label: "英文名称",
-                        prop: "enName"
-                    },
-                    {
-                        label: "报表格式",
-                        prop: "content",
-                        rules: [{
-                            required: true,
-                            message: "请输入报表格式",
-                            trigger: "blur"
-                        }]
-                    },
-                    {
-                        label: "备注",
-                        prop: "remarks"
-                    },
-                ]
-            },
-            PreviewData: [], // 打印预览弹窗获取的数据
-            PreviewQuery: {}, // 搜索项
-            // 打印预览弹窗分页数据
-            PreviewPage: {
-                pageSize: 10,
-                currentPage: 1,
-                total: 0
-            },
-
-            documentVisible: false, // 单证添加编辑弹窗
-            editData: {}, // 编辑弹窗的数据
-            documentForm: {}, // 添加编辑弹窗的数据
-            documenturl: '', // 报表的url 暂存
-            // 左侧配置项
-            treeOption: {
-                nodeKey: "id",
-                // lazy: true,
-                addBtn: false,
-                menu: false,
-                size: "small",
-                props: {
-                    labelText: "标题",
-                    label: "cnName",
-                    value: "value",
-                    children: "children"
-                }
-            },
-            feesTypeData: [
-                {
-                    cnName: '入货通知',
-                    classifyCode: '单证',
-                    groupCode: '入货通知',
-                    reportsType: 'RHTZ',
-                    businessType: 'HYJK'
-                },
-                {
-                    cnName: '派车通知单',
-                    classifyCode: '单证',
-                    groupCode: '派车通知单',
-                    reportsType: 'PCTZD',
-                    businessType: 'HYJK'
-                },
-                {
-                    cnName: '提单详情',
-                    classifyCode: '单证',
-                    groupCode: '提单详情',
-                    reportsType: 'TDXQ',
-                    businessType: 'HYJK'
-                }
-            ], // 左侧获取的数据
-            documentOption: {},
-            documentOptionBack: {
-                dialogDrag: true,
-                height: 'auto',
-                calcHeight: 30,
-                tip: false,
-                searchShow: true,
-                searchMenuSpan: 6,
-                border: true,
-                index: true,
-                selection: true,
-                dialogClickModal: false,
-                addBtn: false,
-                viewBtn: false,
-                delBtn: false,
-                editBtn: false,
-                menuWidth: '160',
-                column: [
-                    {
-                        label: "报表编码",
-                        prop: "reportsCode",
-                        overHidden: true,
-                    },
-                    {
-                        label: "单据类型",
-                        prop: "groupCode",
-                        overHidden: true,
-                    },
-                    {
-                        label: "创建人",
-                        prop: "createUserName",
-                        overHidden: true,
-                    },
-                    {
-                        label: "创建时间",
-                        prop: "createTime",
-                        overHidden: true,
-                    },
-                ]
-            },
-            documentSearch: {},
-            documentPage: {
-                pageSize: 10,
-                currentPage: 1,
-                total: 0,
-                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
-            },
-            query: {},
-            documentData: [],
-            loading: false,
-            businesstypeData: {}, // 左侧选择的数据
-
+  components: { BillofLadingDetails, reportContainer, reportformsList, bbusinesstype, DispatchNotice, PurchaseNotice, mailComponent },
+  data() {
+    return {
+      textareaNumber: 5,
+      addShow: false,
+      previewDialog: false, // 打印预览弹窗
+      PreviewOption: {}, // 打印预览弹窗的配置项
+      PreviewOptionBack: {
+        height: "auto",
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth: 100,
+        addBtn: false,
+        viewBtn: false,
+        delBtn: false,
+        editBtn: false,
+        column: [
+          {
+            label: "组别",
+            prop: "groupCode",
+            rules: [
+              {
+                required: true,
+                message: "请输入组别",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "报表编码",
+            prop: "code",
+            rules: [
+              {
+                required: true,
+                message: "请输入报表编码",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "中文名称",
+            prop: "cnName",
+            rules: [
+              {
+                required: true,
+                message: "请输入中文名称",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "英文名称",
+            prop: "enName"
+          },
+          {
+            label: "报表格式",
+            prop: "content",
+            rules: [
+              {
+                required: true,
+                message: "请输入报表格式",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "备注",
+            prop: "remarks"
+          }
+        ]
+      },
+      PreviewData: [], // 打印预览弹窗获取的数据
+      PreviewQuery: {}, // 搜索项
+      // 打印预览弹窗分页数据
+      PreviewPage: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+
+      documentVisible: false, // 单证添加编辑弹窗
+      editData: {}, // 编辑弹窗的数据
+      documentForm: {}, // 添加编辑弹窗的数据
+      documenturl: "", // 报表的url 暂存
+      // 左侧配置项
+      treeOption: {
+        nodeKey: "id",
+        // lazy: true,
+        addBtn: false,
+        menu: false,
+        size: "small",
+        props: {
+          labelText: "标题",
+          label: "cnName",
+          value: "value",
+          children: "children"
         }
-    },
-    props: {
-        assemblyForm: {
-            type: Object,
-            default: {}
+      },
+      feesTypeData: [
+        {
+          cnName: "入货通知",
+          classifyCode: "单证",
+          groupCode: "入货通知",
+          reportsType: "RHTZ",
+          businessType: "HYJK"
         },
-        detailData: {
-            type: Object,
-            default: {}
-        },
-        disabled: {
-            type: Boolean,
-            default: false,
+        {
+          cnName: "派车通知单",
+          classifyCode: "单证",
+          groupCode: "派车通知单",
+          reportsType: "PCTZD",
+          businessType: "HYJK"
         },
+        {
+          cnName: "提单详情",
+          classifyCode: "单证",
+          groupCode: "提单详情",
+          reportsType: "TDXQ",
+          businessType: "HYJK"
+        }
+      ], // 左侧获取的数据
+      documentOption: {},
+      documentOptionBack: {
+        dialogDrag: true,
+        height: "auto",
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        selection: true,
+        dialogClickModal: false,
+        addBtn: false,
+        viewBtn: false,
+        delBtn: false,
+        editBtn: false,
+        menuWidth: "160",
+        column: [
+          {
+            label: "报表编码",
+            prop: "reportsCode",
+            overHidden: true
+          },
+          {
+            label: "单据类型",
+            prop: "groupCode",
+            overHidden: true
+          },
+          {
+            label: "创建人",
+            prop: "createUserName",
+            overHidden: true
+          },
+          {
+            label: "创建时间",
+            prop: "createTime",
+            overHidden: true
+          }
+        ]
+      },
+      documentSearch: {},
+      documentPage: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      query: {},
+      documentData: [],
+      loading: false,
+      businesstypeData: {} // 左侧选择的数据
+    };
+  },
+  props: {
+    assemblyForm: {
+      type: Object,
+      default: {}
     },
-    async created() {
-        this.documentOption = await this.getColumnData(this.getColumnName(312.1), this.documentOptionBack);
-        this.PreviewOption = await this.getColumnData(this.getColumnName(312.3), this.PreviewOptionBack);
-        isProcurement({ "param": "textarea.number" }).then(res => {
-            if (res.data.data) {
-                this.textareaNumber = res.data.data
-            }
-        })
-        // this.reportsListfun()
+    detailData: {
+      type: Object,
+      default: {}
     },
-    methods: {
-        // 打印预览按钮
-        async dialogPreviewfun(row) {
-            this.editData = row
-            if (row.printContent) {
-                this.documentForm = JSON.parse(row.printContent).data
-            }
-            this.PreviewPage.currentPage = 1;
-            const data = await this.PreviewOnLoad(this.PreviewPage, {
-                businessType: 'HYJK',
-                classifyCode: '单证',
-                groupCode: row.groupCode
-            });
-            this.$nextTick(() => {
-                if (data.length == 1) {
-                    this.handleReportPreview(data[0].url, this.documentForm)
-                } else {
-                    this.previewDialog = true
-                }
-            })
-
-            // let documentaa = null // 暂存url数据
-            // reportsList(1,20,{
-            //     businessType:'HYJK',
-            //     classifyCode:'单证',
-            //     groupCode:row.groupCode,
-            // }).then(resz=>{
-            //     const h = this.$createElement;
-            //     const that = this
-            //     this.$msgbox({
-            //         title: "请选择数据",
-            //         message: h('el-select',
-            //             {
-            //                 props: {
-            //                     value: documentaa,
-            //                     filterable: true,
-            //                     size:'small'
-            //                 },
-            //                 ref: 'selectView',
-            //                 on: {
-            //                     change:e => {
-            //                         documentaa = e
-            //                         that.$refs.selectView.value = e  // select下拉框值改变,回显到页面上
-            //                     },
-            //                 },
-            //             },
-            //             [
-            //                 resz.data.data.records.map(it => {
-            //                     return h('el-option', {
-            //                         props: {
-            //                             label: it.cnName,
-            //                             key: it.id,
-            //                             value: it.url,
-            //                         },
-            //                     });
-            //                 })
-            //             ]
-            //         ),
-            //         showCancelButton: true,
-            //         closeOnClickModal: false,
-            //         confirmButtonText: '确定',
-            //         cancelButtonText: '取消',
-            //     }).then( _ => {
-            //         // 成功操作。。。。
-            //         this.documenturl = documentaa
-            //         this.handleReportPreview(this.documenturl,JSON.parse(row.printContent).data)
-            //     }).catch(msg => {
-            //         // 取消操作。。。。
-            //     });
-            // })
-        },
-        PreviewSearchReset() {
-            this.PreviewQuery = {};
-            this.PreviewOnLoad(this.PreviewPage, {
-                businessType: 'HYJK',
-                classifyCode: '单证',
-                groupCode: this.editData.groupCode
-            });
-        },
-        PreviewSearchChange(params, done) {
-            this.PreviewQuery = params;
-            this.PreviewPage.currentPage = 1;
-            this.PreviewOnLoad(this.PreviewPage, params);
-            done();
-        },
-        PreviewCurrentChange(currentPage) {
-            this.PreviewPage.currentPage = currentPage;
-        },
-        PreviewSizeChange(pageSize) {
-            this.PreviewPage.pageSize = pageSize;
-        },
-        PreviewRefreshChange() {
-            this.PreviewOnLoad(this.PreviewPage, {
-                businessType: 'HYJK',
-                classifyCode: '单证',
-                groupCode: this.editData.groupCode
-            });
-        },
-        // 打印预览弹窗数据
-        async PreviewOnLoad(page, params = {}) {
-            const res = await reportsList(page.currentPage, page.pageSize, Object.assign(params, this.PreviewQuery))
-            const data = res.data.data;
-            this.PreviewPage.total = data.total;
-            this.PreviewData = data.records;
-            return data.records
-        },
-        // 新建单证按钮
-        addbtnfun() {
-            if (!this.assemblyForm.id) {
-                this.$message.warning("请先保存数据");
-                return;
-            }
-            if (!this.businesstypeData.cnName) {
-                this.$message.warning("请先选择报表类型");
-                return
-            }
-            this.addShow = false
-            reportsGetReportData({
-                billId: this.assemblyForm.id,
-                reportCode: this.businesstypeData.classifyCode,
-                groupCode: this.businesstypeData.groupCode,
-                reportsType: this.businesstypeData.reportsType,
-                type: 'HYJK'
-            }).then(res => {
-                this.editData.groupCode = this.businesstypeData.groupCode
-                res.data.data.data.hlclBoxenvoy = res.data.data.data.polFreeBoxUseDays
-                this.documentForm = res.data.data.data
-                // 联系人
-                this.documentForm.corpAttnName = this.documentForm.corpAttnName + '' + this.documentForm.corpAttnTel
-                // this.documenturl = this.businesstypeData.url;
-                // 打开报表选择框
-                this.documentVisible = true
-            })
-        },
-        // 编辑
-        printEditing(row) {
-            // this.businesstypeData.code = row.reportsCode
-            if (!this.businesstypeData.cnName) {
-                this.$message.warning("请先选择报表类型");
-                return
-            }
-            this.addShow = true
-            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(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.id
-                obj.billNo = this.assemblyForm.billNo
-                obj.mblno = this.assemblyForm.mblno
-                obj.hblno = this.assemblyForm.hblno
-                obj.reportsCode = this.businesstypeData.reportsType
-                obj.groupCode = this.businesstypeData.groupCode
-                obj.reportsType = this.businesstypeData.reportsType
-
-            }
-            obj.printContent = JSON.stringify({
-                data: {
-                    ...this.documentForm,
-                    to: this.documentForm.corpCnName,
-                    attn: this.documentForm.corpAttnName,
-                    fm: this.documentForm.createUserName,
-                    fax: this.documentForm.fax,
-                    cc: this.documentForm.cc,
-                    email: this.documentForm.ematl,
-                    department: this.documentForm.corpAttnName,
-                    operate: this.documentForm.operatorName,
-                    mobilePhone: this.documentForm.mobilePhone,
-                    remarks: this.documentForm.cyRemarks,
-                    contacts: this.documentForm.cyContacts,
-                    deliverylocation: this.documentForm.cyCnName,
-                    shippingAgency: this.documentForm.bookingAgentCnName,
-                    Telephone: this.documentForm.cyTel,
-                    datetime: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss')
-                }
-            })
-            // 保存
-            reportslogSubmit(obj).then(res => {
-                if (type) {
-                    let documentaa = null // 暂存url数据
-                    reportsList(1, 20, {
-                        businessType: 'HYJK',
-                        classifyCode: '单证',
-                        groupCode: res.data.data.groupCode,
-                    }).then(resz => {
-                        const h = this.$createElement;
-                        const that = this
-                        this.$msgbox({
-                            title: "请选择数据",
-                            message: h('el-select',
-                                {
-                                    props: {
-                                        value: documentaa,
-                                        filterable: true,
-                                        size: 'small'
-                                    },
-                                    ref: 'selectView',
-                                    on: {
-                                        change: e => {
-                                            documentaa = e
-                                            that.$refs.selectView.value = e  // select下拉框值改变,回显到页面上
-                                        },
-                                    },
-                                },
-                                [
-                                    resz.data.data.records.map(it => {
-                                        return h('el-option', {
-                                            props: {
-                                                label: it.cnName,
-                                                key: it.id,
-                                                value: it.url,
-                                            },
-                                        });
-                                    })
-                                ]
-                            ),
-                            showCancelButton: true,
-                            closeOnClickModal: false,
-                            confirmButtonText: '确定',
-                            cancelButtonText: '取消',
-                        }).then(_ => {
-                            // 成功操作。。。。
-                            this.documenturl = documentaa
-                            this.handleReportPreview(this.documenturl, this.documentForm)
-                            this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: res.data.data.reportsCode });
-                            this.editData = {}
-                            this.documentForm = {}
-                            this.documenturl = {}
-                            this.documentVisible = false
-                        }).catch(msg => {
-                            // 取消操作。。。。
-                        });
-                    })
-                } else {
-                    this.$message.success('操作成功')
-                    this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: res.data.data.reportsCode });
-                    this.editData = {}
-                    this.documentForm = {}
-                    this.documenturl = {}
-                    this.documentVisible = false
-                }
-            })
-        },
-        // 打印取消
-        printingCanceling() {
-            this.editData = {}
-            this.documentForm = {}
-            this.documenturl = {}
-            this.documentVisible = false
-        },
-        // 左侧筛选
-        nodeClick(data) {
-            this.editData = {}
-            this.documentForm = {}
-            this.businesstypeData = {}
-            this.businesstypeData = data
-            this.reportslogListfun(this.documentPage, { reportsType: data.reportsType });
-        },
-        // 左侧数据获取
-        // reportsListfun(){
-        //     reportsList(1,20,{
-        //         businessType:'HYJK',
-        //         classifyCode:'单证',
-        //         groupCode:'派车通知单,入货通知,提单详情',
-        //         code:'BZRHTZ,TDXQ,PCTZD,'
-        //     }).then(res=>{
-        //         this.feesTypeData = res.data.data.records
-        //     })
-        // },
-        // 类别弹窗关闭
-        corpTypeClose(done) {
-            this.editData = {}
-            this.documentForm = {}
-            this.businesstypeData = {}
-            done();
-        },
-        // 点击搜索触发
-        searchChange(params, done) {
-            this.query = params;
-            this.documentPage.currentPage = 1;
-            this.reportslogListfun(this.documentPage, params);
-            done();
-        },
-        // 清空搜索回调方法
-        searchReset() {
-            this.query = {};
-            this.reportslogListfun(this.documentPage);
-        },
-        // 点击刷新按钮
-        refreshChange() {
-            this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: this.businesstypeData.content });
-        },
-        // 打开前的回调
-        beforeOpen(done, type) {
-            // 编辑和查看
-            if (["edit", "view"].includes(type)) {
-
-            }
-        },
-        // 单证中心数据获取
-        reportslogListfun(documentPage, params = {}) {
-            if (!this.assemblyForm.id) {
-                return
-            }
-            this.loading = true;
-            reportslogList(documentPage.currentPage, documentPage.pageSize, {
-                ...Object.assign(params, this.query),
-                billId: this.assemblyForm.id
-            }).then(res => {
-                const data = res.data.data;
-                this.documentPage.total = data.total;
-                this.documentData = data.records;
-                this.loading = false;
-            })
-        },
-        testMail(e) {
-            console.info('eeeeeeeeeeeeeeeeeeee----', e)
-            this.$refs.mailComponentRef.dialogVisible = true
-            this.$refs.mailComponentRef.formData.attachments = e.fileName
-            this.$refs.mailComponentRef.formData.fileType = e.formatName
-            this.$refs.mailComponentRef.formData.fileContent = e.data
-        },
-        // 预览报表
-        handleReportPreview(url, data) {
-            console.log(url, 1670)
-            console.log(data, 1671)
-            // 处理时间
-            data.end = data.end ? data.end.slice(0, 10) : ''
-            data.goodsTime = data.goodsTime ? data.goodsTime.slice(0, 10) : ''
-            data.clearanceTime = data.clearanceTime ? data.clearanceTime.slice(0, 10) : ''
-            data.vgmDeadline = data.vgmDeadline ? data.vgmDeadline.slice(0, 10) : ''
-
-            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 // 打印按钮是否显示   下面直接自定义控制打印弹窗是否开启
-            options.toolbar.showSendEmailButton = true // 显示发送邮件按钮
-            options.email.showEmailDialog = false
-            options.email.showExportDialog = 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)
-            viewer.onEmailReport = this.testMail
-            // 报表
-            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) {
-                let arrDeteil = []
-                arrDeteil = data.hshipperDetails.split('\n')
-                if (arrDeteil.length > this.textareaNumber) {
-                    data.hshipperDetails = arrDeteil.slice(0, this.textareaNumber).join('\n') + '*'
-                    data.commodityDescr += "\n*" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join('\n')
-                } else {
-                    data.hshipperDetails = data.hshipperDetails
-                }
-            }
-
-            if (data.hconsigneeDetails) {
-                let arrDeteil = []
-                arrDeteil = data.hconsigneeDetails.split('\n')
-                if (arrDeteil.length > this.textareaNumber) {
-                    data.hconsigneeDetails = arrDeteil.slice(0, this.textareaNumber).join('\n') + '**'
-                    data.commodityDescr += "\n**" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join('\n')
-                } else {
-                    data.hconsigneeDetails = data.hconsigneeDetails
-                }
-            }
-
-            if (data.hnotifyDetails) {
-                let arrDeteil = []
-                arrDeteil = data.hnotifyDetails.split('\n')
-                if (arrDeteil.length > this.textareaNumber) {
-                    data.hnotifyDetails = arrDeteil.slice(0, this.textareaNumber).join('\n') + '***'
-                    data.commodityDescr += "\n***" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join('\n')
-                } else {
-                    data.hnotifyDetails = data.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)
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  async created() {
+    this.documentOption = await this.getColumnData(this.getColumnName(312.1), this.documentOptionBack);
+    this.PreviewOption = await this.getColumnData(this.getColumnName(312.3), this.PreviewOptionBack);
+    isProcurement({ param: "textarea.number" }).then(res => {
+      if (res.data.data) {
+        this.textareaNumber = res.data.data;
+      }
+    });
+    // this.reportsListfun()
+  },
+  methods: {
+    // 打印预览按钮
+    async dialogPreviewfun(row) {
+      this.editData = row;
+      if (row.printContent) {
+        this.documentForm = JSON.parse(row.printContent).data;
+      }
+      this.PreviewPage.currentPage = 1;
+      const data = await this.PreviewOnLoad(this.PreviewPage, {
+        businessType: "HYJK",
+        classifyCode: "单证",
+        groupCode: row.groupCode
+      });
+      this.$nextTick(() => {
+        if (data.length == 1) {
+          this.handleReportPreview(data[0].url, this.documentForm);
+        } else {
+          this.previewDialog = true;
+        }
+      });
+
+      // let documentaa = null // 暂存url数据
+      // reportsList(1,20,{
+      //     businessType:'HYJK',
+      //     classifyCode:'单证',
+      //     groupCode:row.groupCode,
+      // }).then(resz=>{
+      //     const h = this.$createElement;
+      //     const that = this
+      //     this.$msgbox({
+      //         title: "请选择数据",
+      //         message: h('el-select',
+      //             {
+      //                 props: {
+      //                     value: documentaa,
+      //                     filterable: true,
+      //                     size:'small'
+      //                 },
+      //                 ref: 'selectView',
+      //                 on: {
+      //                     change:e => {
+      //                         documentaa = e
+      //                         that.$refs.selectView.value = e  // select下拉框值改变,回显到页面上
+      //                     },
+      //                 },
+      //             },
+      //             [
+      //                 resz.data.data.records.map(it => {
+      //                     return h('el-option', {
+      //                         props: {
+      //                             label: it.cnName,
+      //                             key: it.id,
+      //                             value: it.url,
+      //                         },
+      //                     });
+      //                 })
+      //             ]
+      //         ),
+      //         showCancelButton: true,
+      //         closeOnClickModal: false,
+      //         confirmButtonText: '确定',
+      //         cancelButtonText: '取消',
+      //     }).then( _ => {
+      //         // 成功操作。。。。
+      //         this.documenturl = documentaa
+      //         this.handleReportPreview(this.documenturl,JSON.parse(row.printContent).data)
+      //     }).catch(msg => {
+      //         // 取消操作。。。。
+      //     });
+      // })
+    },
+    PreviewSearchReset() {
+      this.PreviewQuery = {};
+      this.PreviewOnLoad(this.PreviewPage, {
+        businessType: "HYJK",
+        classifyCode: "单证",
+        groupCode: this.editData.groupCode
+      });
+    },
+    PreviewSearchChange(params, done) {
+      this.PreviewQuery = params;
+      this.PreviewPage.currentPage = 1;
+      this.PreviewOnLoad(this.PreviewPage, params);
+      done();
+    },
+    PreviewCurrentChange(currentPage) {
+      this.PreviewPage.currentPage = currentPage;
+    },
+    PreviewSizeChange(pageSize) {
+      this.PreviewPage.pageSize = pageSize;
+    },
+    PreviewRefreshChange() {
+      this.PreviewOnLoad(this.PreviewPage, {
+        businessType: "HYJK",
+        classifyCode: "单证",
+        groupCode: this.editData.groupCode
+      });
+    },
+    // 打印预览弹窗数据
+    async PreviewOnLoad(page, params = {}) {
+      const res = await reportsList(page.currentPage, page.pageSize, Object.assign(params, this.PreviewQuery));
+      const data = res.data.data;
+      this.PreviewPage.total = data.total;
+      this.PreviewData = data.records;
+      return data.records;
+    },
+    // 新建单证按钮
+    addbtnfun() {
+      if (!this.assemblyForm.id) {
+        this.$message.warning("请先保存数据");
+        return;
+      }
+      if (!this.businesstypeData.cnName) {
+        this.$message.warning("请先选择报表类型");
+        return;
+      }
+      this.addShow = false;
+      reportsGetReportData({
+        billId: this.assemblyForm.id,
+        reportCode: this.businesstypeData.classifyCode,
+        groupCode: this.businesstypeData.groupCode,
+        reportsType: this.businesstypeData.reportsType,
+        type: "HYJK"
+      }).then(res => {
+        this.editData.groupCode = this.businesstypeData.groupCode;
+        res.data.data.data.hlclBoxenvoy = res.data.data.data.polFreeBoxUseDays;
+        this.documentForm = res.data.data.data;
+        // 联系人
+        this.documentForm.corpAttnName = this.documentForm.corpAttnName + "" + this.documentForm.corpAttnTel;
+        // this.documenturl = this.businesstypeData.url;
+        // 打开报表选择框
+        this.documentVisible = true;
+        if (this.businesstypeData.reportsType == "RHTZ") {
+          setTimeout(() => {
+            this.$refs.purchaseNotice.openDialog();
+          }, 200);
+        }
+      });
+    },
+    // 编辑
+    printEditing(row) {
+      // this.businesstypeData.code = row.reportsCode
+      if (!this.businesstypeData.cnName) {
+        this.$message.warning("请先选择报表类型");
+        return;
+      }
+      this.addShow = true;
+      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(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.id;
+        obj.billNo = this.assemblyForm.billNo;
+        obj.mblno = this.assemblyForm.mblno;
+        obj.hblno = this.assemblyForm.hblno;
+        obj.reportsCode = this.businesstypeData.reportsType;
+        obj.groupCode = this.businesstypeData.groupCode;
+        obj.reportsType = this.businesstypeData.reportsType;
+      }
+      obj.printContent = JSON.stringify({
+        data: {
+          ...this.documentForm,
+          to: this.documentForm.corpCnName,
+          attn: this.documentForm.corpAttnName,
+          fm: this.documentForm.createUserName,
+          cc: this.documentForm.cc,
+          department: this.documentForm.corpAttnName,
+          remarks: this.documentForm.cyRemarks,
+          contacts: this.documentForm.cyContacts,
+          deliverylocation: this.documentForm.cyCnName,
+          shippingAgency: this.documentForm.bookingAgentCnName,
+          Telephone: this.documentForm.cyTel,
+          datetime: dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss")
+        }
+      });
+      // 保存
+      reportslogSubmit(obj).then(res => {
+        if (type) {
+          let documentaa = null; // 暂存url数据
+          reportsList(1, 20, {
+            businessType: "HYJK",
+            classifyCode: "单证",
+            groupCode: res.data.data.groupCode
+          }).then(resz => {
+            const h = this.$createElement;
+            const that = this;
+            this.$msgbox({
+              title: "请选择数据",
+              message: h(
+                "el-select",
+                {
+                  props: {
+                    value: documentaa,
+                    filterable: true,
+                    size: "small"
+                  },
+                  ref: "selectView",
+                  on: {
+                    change: e => {
+                      documentaa = e;
+                      that.$refs.selectView.value = e; // select下拉框值改变,回显到页面上
                     }
-                }
-                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 节点里最前面增加一个子级节点
+                [
+                  resz.data.data.records.map(it => {
+                    return h("el-option", {
+                      props: {
+                        label: it.cnName,
+                        key: it.id,
+                        value: it.url
+                      }
+                    });
+                  })
+                ]
+              ),
+              showCancelButton: true,
+              closeOnClickModal: false,
+              confirmButtonText: "确定",
+              cancelButtonText: "取消"
+            })
+              .then(_ => {
+                // 成功操作。。。。
+                this.documenturl = documentaa;
+                this.handleReportPreview(this.documenturl, this.documentForm);
+                this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: res.data.data.reportsCode });
+                this.editData = {};
+                this.documentForm = {};
+                this.documenturl = {};
+                this.documentVisible = false;
+              })
+              .catch(msg => {
+                // 取消操作。。。。
+              });
+          });
+        } else {
+          this.$message.success("操作成功");
+          this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: res.data.data.reportsCode });
+          this.editData = {};
+          this.documentForm = {};
+          this.documenturl = {};
+          this.documentVisible = false;
+        }
+      });
+    },
+    // 打印取消
+    printingCanceling() {
+      this.editData = {};
+      this.documentForm = {};
+      this.documenturl = {};
+      this.documentVisible = false;
+    },
+    // 左侧筛选
+    nodeClick(data) {
+      this.editData = {};
+      this.documentForm = {};
+      this.businesstypeData = {};
+      this.businesstypeData = data;
+      this.reportslogListfun(this.documentPage, { reportsType: data.reportsType });
+    },
+    // 左侧数据获取
+    // reportsListfun(){
+    //     reportsList(1,20,{
+    //         businessType:'HYJK',
+    //         classifyCode:'单证',
+    //         groupCode:'派车通知单,入货通知,提单详情',
+    //         code:'BZRHTZ,TDXQ,PCTZD,'
+    //     }).then(res=>{
+    //         this.feesTypeData = res.data.data.records
+    //     })
+    // },
+    // 类别弹窗关闭
+    corpTypeClose(done) {
+      this.editData = {};
+      this.documentForm = {};
+      this.businesstypeData = {};
+      done();
+    },
+    // 点击搜索触发
+    searchChange(params, done) {
+      this.query = params;
+      this.documentPage.currentPage = 1;
+      this.reportslogListfun(this.documentPage, params);
+      done();
+    },
+    // 清空搜索回调方法
+    searchReset() {
+      this.query = {};
+      this.reportslogListfun(this.documentPage);
+    },
+    // 点击刷新按钮
+    refreshChange() {
+      this.reportslogListfun(this.documentPage, { ...this.query, reportsCode: this.businesstypeData.content });
+    },
+    // 打开前的回调
+    beforeOpen(done, type) {
+      // 编辑和查看
+      if (["edit", "view"].includes(type)) {
+      }
+    },
+    // 单证中心数据获取
+    reportslogListfun(documentPage, params = {}) {
+      if (!this.assemblyForm.id) {
+        return;
+      }
+      this.loading = true;
+      reportslogList(documentPage.currentPage, documentPage.pageSize, {
+        ...Object.assign(params, this.query),
+        billId: this.assemblyForm.id
+      }).then(res => {
+        const data = res.data.data;
+        this.documentPage.total = data.total;
+        this.documentData = data.records;
+        this.loading = false;
+      });
+    },
+    testMail(e) {
+      console.info("eeeeeeeeeeeeeeeeeeee----", e);
+      this.$refs.mailComponentRef.dialogVisible = true;
+      this.$refs.mailComponentRef.formData.attachments = e.fileName;
+      this.$refs.mailComponentRef.formData.fileType = e.formatName;
+      this.$refs.mailComponentRef.formData.fileContent = e.data;
+    },
+    // 预览报表
+    handleReportPreview(url, data) {
+      console.log(url, 1670);
+      console.log(data, 1671);
+      // 处理时间
+      data.end = data.end ? data.end.slice(0, 10) : "";
+      data.goodsTime = data.goodsTime ? data.goodsTime.slice(0, 10) : "";
+      data.clearanceTime = data.clearanceTime ? data.clearanceTime.slice(0, 10) : "";
+      data.vgmDeadline = data.vgmDeadline ? data.vgmDeadline.slice(0, 10) : "";
+
+      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 // 打印按钮是否显示   下面直接自定义控制打印弹窗是否开启
+      options.toolbar.showSendEmailButton = true; // 显示发送邮件按钮
+      options.email.showEmailDialog = false;
+      options.email.showExportDialog = 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);
+      viewer.onEmailReport = this.testMail;
+      // 报表
+      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) {
+        let arrDeteil = [];
+        arrDeteil = data.hshipperDetails.split("\n");
+        if (arrDeteil.length > this.textareaNumber) {
+          data.hshipperDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "*";
+          data.commodityDescr += "\n*" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
+        } else {
+          data.hshipperDetails = data.hshipperDetails;
+        }
+      }
+
+      if (data.hconsigneeDetails) {
+        let arrDeteil = [];
+        arrDeteil = data.hconsigneeDetails.split("\n");
+        if (arrDeteil.length > this.textareaNumber) {
+          data.hconsigneeDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "**";
+          data.commodityDescr += "\n**" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
+        } else {
+          data.hconsigneeDetails = data.hconsigneeDetails;
+        }
+      }
+
+      if (data.hnotifyDetails) {
+        let arrDeteil = [];
+        arrDeteil = data.hnotifyDetails.split("\n");
+        if (arrDeteil.length > this.textareaNumber) {
+          data.hnotifyDetails = arrDeteil.slice(0, this.textareaNumber).join("\n") + "***";
+          data.commodityDescr += "\n***" + arrDeteil.slice(this.textareaNumber, arrDeteil.length).join("\n");
+        } else {
+          data.hnotifyDetails = data.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')
 
-            let that = this
-            // 关闭按钮的监听点击
-            closeBtn.action = function () {
-                console.log(that.$refs.ReportContainer, '1022')
-                if (that.$refs.reportContainer)
-                    that.$refs.reportContainer.hideContainer()
-            }
+      // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
+      var dataSet = new Stimulsoft.System.Data.DataSet("reportData");
 
-            // // // 打印按钮监听
-            // printBtn.action = (e)=>{
-            //     console.log('打印')
-            //     window.print()
-            // }
+      dataSet.readJson(data); // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
+      // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
+      // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
+      report.regData("reportData", "reportData", dataSet);
+      // 从模版和数据加载报表
+      // loadReport(report, '', {})
 
-        },
+      // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
+      viewer.report = report;
 
-        //自定义列保存
-        async saveColumnTwo(ref, option, optionBack, code) {
-            /**
-             * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
-             * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
-             * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
-             */
-            const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
-            if (inSave) {
-                this.$message.success("保存成功");
-                //关闭窗口
-                this.$refs[ref].$refs.dialogColumn.columnBox = false;
-            }
-        },
-        //自定义列重置
-        async resetColumnTwo(ref, option, optionBack, code) {
-            this[option] = this[optionBack];
-            const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
-            if (inSave) {
-                this.$message.success("重置成功");
-                this.$refs[ref].$refs.dialogColumn.columnBox = false;
-            }
-        },
-        // 更改表格颜色
-        headerClassName(tab) {
-            //颜色间隔
-            let back = ""
-            if (tab.columnIndex >= 0 && tab.column.level === 1) {
-                if (tab.columnIndex % 2 === 0) {
-                    back = "back-one"
-                } else if (tab.columnIndex % 2 === 1) {
-                    back = "back-two"
-                }
-            }
-            return back;
+      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) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = "";
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one";
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two";
+        }
+      }
+      return back;
     }
-}
+  }
+};
 </script>
 
 <style scoped lang="scss">
 ::v-deep#out-table .back-one {
-    background: #ecf5ff !important;
+  background: #ecf5ff !important;
 }
 
 ::v-deep#out-table .back-two {
-    background: #ecf5ff !important;
+  background: #ecf5ff !important;
 }
 
 ::v-deep .el-form-item {
-    margin-bottom: 0px;
+  margin-bottom: 0px;
 }
 </style>

+ 69 - 27
src/views/iosBasicData/OceanFreightImport/bills/assembly/reportformsFrame/PurchaseNotice.vue

@@ -359,8 +359,26 @@
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="部门:" prop="corpCnName">
-          <tree-select
+        <el-form-item label="操作员:" prop="operatorName">
+          <!-- <el-input type="age" style="width: 100%;" v-model="documentForm.operatorName" size="small" autocomplete="off" clearable placeholder="操作">
+          </el-input> -->
+          <dic-select
+            v-model="documentForm.operatorName"
+            placeholder="操作员"
+            key="id"
+            label="realName"
+            res="records"
+            url="/blade-user/page?roleId='操作员'"
+            :filterable="true"
+            :remote="true"
+            dataName="realName"
+            @selectChange="dicChange('operatorName', $event)"
+          ></dic-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="部门:" prop="accDeptName">
+          <!-- <tree-select
             v-model="documentForm.accDeptName"
             filterable
             :data="departmentData"
@@ -369,41 +387,33 @@
             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.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.operatorName" size="small" autocomplete="off" clearable placeholder="操作">
-          </el-input>
+          </tree-select> -->
+          <dic-select
+            v-model="documentForm.accDeptName"
+            placeholder="港口"
+            label="title"
+            url="/blade-system/dept/lazy-tree?parentId=0"
+            :filterable="true"
+            :multiple="true"
+            :collapseTags="true"
+            dataType="string"
+            @selectChange="dicChange('accDeptName', $event)"
+          ></dic-select>
         </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.ematl" size="small" autocomplete="off" clearable placeholder="EMAIL">
+        <el-form-item label="EMAIL:" prop="email">
+          <el-input type="age" style="width: 100%;" v-model="documentForm.email" 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-form-item label="TEL:" prop="tel">
           <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.mobilePhone" size="small" autocomplete="off" clearable placeholder="手机">
-          </el-input>
-        </el-form-item>
-      </el-col>
     </el-row>
   </el-form>
 </template>
@@ -413,9 +423,10 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import { bportsList } from "@/api/iosBasicData/bports";
 import { getLazyList, getDeptTree } from "@/api/system/dept";
 import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
-
+import { getUser } from "@/api/system/user"
+import dicSelect from "@/components/dicSelect/main";
 export default {
-  components: { TreeSelect, SearchQuery },
+  components: { TreeSelect, SearchQuery,dicSelect },
   data() {
     return {
       destinationData: [], // 目的港数据
@@ -437,6 +448,30 @@ export default {
     });
   },
   methods: {
+    dicChange(name, row) {
+      if (name == "operatorName") {
+        if (row) {
+          this.$set(this.documentForm, "operatorId", row.id);
+          this.$set(this.documentForm, "operatorName", row.realName);
+          this.$set(this.documentForm, "accDeptName", row.deptName);
+          this.$set(this.documentForm, "email", row.email);
+          this.$set(this.documentForm, "tel", row.phone);
+        } else {
+          this.$set(this.documentForm, "operatorId", null);
+          this.$set(this.documentForm, "operatorName", null);
+          this.$set(this.documentForm, "accDeptName", null);
+          this.$set(this.documentForm, "email", null);
+          this.$set(this.documentForm, "tel", null);
+        }
+      }
+      if (name == "accDeptName") {
+        if (row) {
+          this.$set(this.documentForm, "accDeptName", row.names);
+        } else {
+          this.$set(this.documentForm, "accDeptName", null);
+        }
+      }
+    },
     corpChange(value, name) {
       if (name == "destinationName") {
         for (let item of this.destinationData) {
@@ -476,6 +511,13 @@ export default {
       getDeptTree().then(res => {
         this.departmentData = res.data.data;
       });
+    },
+    openDialog() {
+      getUser(this.documentForm.operatorId).then(res => {
+        this.$set(this.documentForm, "accDeptName", res.data.data.deptName);
+        this.$set(this.documentForm, "email", res.data.data.email);
+        this.$set(this.documentForm, "tel", res.data.data.phone);
+      });
     }
   }
 };

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

@@ -97,6 +97,9 @@
                 @click="handleDelete"
                 >{{ $t("btn118n.deleteCtnrList") }}
               </el-button>
+
+              <!-- <el-button type="danger" size="small" plain @click.stop="$refs.splitOrder.openDialog(assemblyForm)">拆单</el-button> -->
+              <!-- <el-button type="success" size="small" plain @click.stop="$refs.splitOrder.openDialog(assemblyForm)">合票</el-button> -->
               <el-button type="success" size="small" plain @click.stop="$refs.print.openDialog()">
                 {{ $t("btn118n.preview") }}
               </el-button>
@@ -334,6 +337,7 @@
       :treeType="false"
       :type="1"
     ></business-reports>
+    <split-order ref="splitOrder"></split-order>
   </div>
 </template>
 
@@ -366,8 +370,10 @@ import { billsAdd } from "@/api/iosBasicData/bills";
 import dicSelect from "@/components/dicSelect/main";
 import businessReports from "@/components/tradeAgency/businessReportsJK.vue";
 import { isProcurement } from "@/api/basicData/configuration";
+import splitOrder from "../components/splitOrder.vue";
+import mergeOrder from "../components/mergeOrder.vue";
 export default {
-  components: { SearchQuery, bports, extractBoxInformation, dicSelect, businessReports },
+  components: { SearchQuery, bports, extractBoxInformation, dicSelect, businessReports, splitOrder, mergeOrder },
   props: {
     assemblyForm: {},
     detailData: {},
@@ -395,7 +401,7 @@ export default {
         align: "center",
         menu: false,
         header: false,
-        border:true,
+        border: true,
         column: [
           {
             label: "操作类型",

+ 12 - 9
src/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue

@@ -130,7 +130,7 @@
         <el-button type="primary" @click="documentSubmit(false)">保 存</el-button>
       </div>
       <Dispatch-Notice v-if="businesstypeData.reportsType == 'PCTZD'" :documentForm="documentForm"></Dispatch-Notice>
-      <Purchase-Notice v-else-if="businesstypeData.reportsType == 'RHTZ'" :documentForm="documentForm"></Purchase-Notice>
+      <Purchase-Notice ref="purchaseNotice" v-else-if="businesstypeData.reportsType == 'RHTZ'&&documentVisible" :documentForm="documentForm"></Purchase-Notice>
       <BillofLadingDetails
         v-else-if="businesstypeData.reportsType == 'TDXQ' || businesstypeData.reportsType == 'DCWTS'"
         :documentForm="documentForm"
@@ -418,7 +418,7 @@ export default {
       mttachedMark: 15,
       mttachedCntry: 3,
       amendmentFee: 0,
-      isOccupyNum:false,
+      isOccupyNum: false
     };
   },
   props: {
@@ -588,11 +588,12 @@ export default {
         this.$message.warning("请先选择报表类型");
         return;
       }
-     
-      if (this.isOccupyNum&&this.businesstypeData.reportsType == "RHTZ") {
+
+      if (this.isOccupyNum && this.businesstypeData.reportsType == "RHTZ") {
         if (this.assemblyForm.boxBelongsTo == "SOC" && this.assemblyForm.billType == "MH") {
           if (
-            this.assemblyForm.preContainersList.length != this.assemblyForm.preContainersList.filter(item => item.containerNumberStatus == "已选择").length
+            this.assemblyForm.preContainersList.length !=
+            this.assemblyForm.preContainersList.filter(item => item.containerNumberStatus == "已选择").length
           ) {
             return this.$message.error("请选择放箱号");
           }
@@ -627,6 +628,12 @@ export default {
         // this.documenturl = this.businesstypeData.url;
         // 打开报表选择框
         this.documentVisible = true;
+
+        if (this.businesstypeData.reportsType == "RHTZ") {
+          setTimeout(() => {
+            this.$refs.purchaseNotice.openDialog();
+          }, 200);
+        }
       });
     },
     // 编辑
@@ -699,12 +706,8 @@ export default {
           to: this.documentForm.corpCnName,
           attn: this.documentForm.corpAttnName,
           fm: this.documentForm.createUserName,
-          fax: this.documentForm.fax,
           cc: this.documentForm.cc,
-          email: this.documentForm.ematl,
           department: this.documentForm.corpAttnName,
-          operate: this.documentForm.operatorName,
-          mobilePhone: this.documentForm.mobilePhone,
           remarks: this.documentForm.remarks,
           contacts: this.documentForm.cyContacts,
           deliverylocation: this.documentForm.cyCnName,

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

@@ -292,6 +292,7 @@ export default {
         calcHeight: 30,
         header: false,
         menu: false,
+        align: "center",
         column: [
           {
             label: "箱型",
@@ -402,6 +403,12 @@ export default {
         gwtSUM += Number(item.grossWeight ? item.grossWeight : 0);
         mrtSUM += Number(item.measurement ? item.measurement : 0);
       }
+      this.form.quantity = Number(this.form.quantity ? this.form.quantity : 0).toFixed(2);
+      this.form.grossWeight = Number(this.form.grossWeight ? this.form.grossWeight : 0).toFixed(2);
+      this.form.measurement = Number(this.form.measurement ? this.form.measurement : 0).toFixed(2);
+      qtySUM = Number(qtySUM ? qtySUM : 0).toFixed(2);
+      gwtSUM = Number(gwtSUM ? gwtSUM : 0).toFixed(2);
+      mrtSUM = Number(mrtSUM ? mrtSUM : 0).toFixed(2);
       if (qtySUM != this.form.quantity || gwtSUM != this.form.grossWeight || mrtSUM != this.form.measurement) {
         this.$alert(
           `<table border="1" align="center" style="width:100%;color:#F56C6C">
@@ -413,9 +420,9 @@ export default {
            </tr>
            <tr>
             <td align="center">提单合计</td>
-            <td align="center">${Number(this.form.quantity)}</td>
-            <td align="center">${Number(this.form.grossWeight)}</td>
-            <td align="center">${Number(this.form.measurement)}</td>
+            <td align="center">${this.form.quantity}</td>
+            <td align="center">${this.form.grossWeight}</td>
+            <td align="center">${this.form.measurement}</td>
            </tr>
            <tr>
             <td align="center">分箱合计</td>

+ 0 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/components/mergeOrder.vue


+ 178 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/components/splitOrder.vue

@@ -0,0 +1,178 @@
+<template>
+  <div>
+    <el-dialog title="拆单" :visible.sync="dialogVisible" append-to-body width="50%" :before-close="handleClose">
+      <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
+      
+      <avue-crud
+        v-if="dialogVisible"
+        :option="option"
+        :table-loading="loading"
+        :data="data"
+        ref="crud"
+        id="out-table"
+        :header-cell-class-name="headerClassName"
+        @on-load="onLoad"
+      >
+      </avue-crud>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" size="mini">取 消</el-button>
+        <el-button type="primary" @click="submit" size="mini">拆 单</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { MktSlotQuotation, quotationImportBatch } from "@/api/iosBasicData/bills";
+export default {
+  props: {},
+  data() {
+    return {
+      ids: null,
+      data: [],
+      dialogVisible: false,
+      loading: false,
+
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        column: [
+          {
+            label: "客户名称",
+            prop: "corpCnName",
+            disabled: false
+          },
+          {
+            label: "分单号",
+            prop: "hblno",
+            disabled: false
+          },
+          {
+            label: "开船日期",
+            prop: "etdList",
+            type: "daterange",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            defaultTime: ["00:00:00", "23:59:59"],
+            disabled: false
+          },
+          {
+            label: "箱型箱量",
+            prop: "quantityCntrDescr",
+            disabled: false
+          }
+        ]
+      },
+      option: {
+        height: 500,
+        calcHeight: 30,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        delBtn: false,
+        editBtn: false,
+        menu: false,
+        header: false,
+        align: "center",
+        column: [
+          {
+            label: "客户名称",
+            prop: "corpCnName",
+            overHidden: true
+          },
+          {
+            label: "分单号",
+            prop: "hblno",
+            overHidden: true
+          },
+          {
+            label: "开船日期",
+            prop: "etd",
+            overHidden: true
+          },
+          {
+            label: "箱型箱量",
+            prop: "quantityCntrDescr",
+            overHidden: true
+          }
+        ]
+      }
+    };
+  },
+  async created() {
+    // this.option = await this.getColumnData(this.getColumnName(309.6), this.optionBack);
+  },
+  methods: {
+    openDialog(val) {
+      this.dialogVisible = true;
+      let obj = {
+        ...val
+      };
+      // this.loading = true
+      // MktSlotQuotation(obj).then(res => {
+      //     this.data = res.data.data
+      // }).finally(() => {
+      //     this.loading = false
+      // })
+    },
+    submit() {
+      this.$emit("importData", this.quotationObj);
+      this.dialogVisible = false;
+    },
+    //自定义列保存
+    async saveColumn(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.searchReset();
+      }
+    },
+    //自定义列重置
+    async resetColumn(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = "";
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one";
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two";
+        }
+      }
+      return back;
+    }
+  }
+};
+</script>
+
+<style scoped>
+::v-deep#out-table .back-one {
+  background: #ecf5ff !important;
+  text-align: center;
+  padding: 4px 0;
+}
+
+::v-deep#out-table .back-two {
+  background: #ecf5ff !important;
+  text-align: center;
+  padding: 4px 0;
+}
+</style>

+ 87 - 53
src/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsFrame/PurchaseNotice.vue

@@ -205,7 +205,7 @@
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="PLACE OF STUFFING:" prop="placeOfStuffing2"  label-width="130px">
+        <el-form-item label="PLACE OF STUFFING:" prop="placeOfStuffing2" label-width="130px">
           <el-input
             type="age"
             style="width: 100%;"
@@ -219,7 +219,7 @@
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="FULL RETURN LOCATION:" prop="fullReturnLocation"  label-width="150px">
+        <el-form-item label="FULL RETURN LOCATION:" prop="fullReturnLocation" label-width="150px">
           <el-input
             type="age"
             style="width: 100%;"
@@ -234,20 +234,12 @@
       </el-col>
       <el-col :span="12">
         <el-form-item label="ADDRESS:" prop="address2">
-          <el-input
-            type="age"
-            style="width: 100%;"
-            v-model="documentForm.address2"
-            size="small"
-            autocomplete="off"
-            clearable
-            placeholder="ADDRESS"
-          >
+          <el-input type="age" style="width: 100%;" v-model="documentForm.address2" size="small" autocomplete="off" clearable placeholder="ADDRESS">
           </el-input>
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="DLINE AMEND BILL:" prop="dlineAmendBill"  label-width="130px">
+        <el-form-item label="DLINE AMEND BILL:" prop="dlineAmendBill" label-width="130px">
           <el-input
             type="age"
             style="width: 100%;"
@@ -383,8 +375,26 @@
         </el-form-item>
       </el-col>
       <el-col :span="12">
-        <el-form-item label="部门:" prop="corpCnName">
-          <tree-select
+        <el-form-item label="操作员:" prop="operatorName">
+          <!-- <el-input type="age" style="width: 100%;" v-model="documentForm.operatorName" size="small" autocomplete="off" clearable placeholder="操作">
+          </el-input> -->
+          <dic-select
+            v-model="documentForm.operatorName"
+            placeholder="操作员"
+            key="id"
+            label="realName"
+            res="records"
+            url="/blade-user/page?roleId='操作员'"
+            :filterable="true"
+            :remote="true"
+            dataName="realName"
+            @selectChange="dicChange('operatorName', $event)"
+          ></dic-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="部门:" prop="accDeptName">
+          <!-- <tree-select
             v-model="documentForm.accDeptName"
             filterable
             :data="departmentData"
@@ -393,41 +403,33 @@
             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.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.operatorName" size="small" autocomplete="off" clearable placeholder="操作">
-          </el-input>
+          </tree-select> -->
+          <dic-select
+            v-model="documentForm.accDeptName"
+            placeholder="港口"
+            label="title"
+            url="/blade-system/dept/lazy-tree?parentId=0"
+            :filterable="true"
+            :multiple="true"
+            :collapseTags="true"
+            dataType="string"
+            @selectChange="dicChange('accDeptName', $event)"
+          ></dic-select>
         </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.ematl" size="small" autocomplete="off" clearable placeholder="EMAIL">
+        <el-form-item label="EMAIL:" prop="email">
+          <el-input type="age" style="width: 100%;" v-model="documentForm.email" 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-form-item label="TEL:" prop="tel">
           <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.mobilePhone" size="small" autocomplete="off" clearable placeholder="手机">
-          </el-input>
-        </el-form-item>
-      </el-col>
     </el-row>
   </el-form>
 </template>
@@ -438,6 +440,7 @@ import { bportsList } from "@/api/iosBasicData/bports";
 import { getLazyList, getDeptTree } from "@/api/system/dept";
 import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
 import dicSelect from "@/components/dicSelect/main";
+import { getUser } from "@/api/system/user";
 export default {
   components: { TreeSelect, SearchQuery, dicSelect },
   data() {
@@ -455,7 +458,7 @@ export default {
     }
   },
   created() {
-    this.getLazylistfun();
+    // this.getLazylistfun();
     this.getWorkDicts("placeofStuffing").then(res => {
       this.placeOptions = res.data.data;
     });
@@ -472,6 +475,28 @@ export default {
         this.$set(this.documentForm, "portTerminalCyEnName", null);
         this.$set(this.documentForm, "portTerminalCyCnName", null);
       }
+      if (name == "operatorName") {
+        if (row) {
+          this.$set(this.documentForm, "operatorId", row.id);
+          this.$set(this.documentForm, "operatorName", row.realName);
+          this.$set(this.documentForm, "accDeptName", row.deptName);
+          this.$set(this.documentForm, "email", row.email);
+          this.$set(this.documentForm, "tel", row.phone);
+        } else {
+          this.$set(this.documentForm, "operatorId", null);
+          this.$set(this.documentForm, "operatorName", null);
+          this.$set(this.documentForm, "accDeptName", null);
+          this.$set(this.documentForm, "email", null);
+          this.$set(this.documentForm, "tel", null);
+        }
+      }
+      if (name == "accDeptName") {
+        if (row) {
+          this.$set(this.documentForm, "accDeptName", row.names);
+        } else {
+          this.$set(this.documentForm, "accDeptName", null);
+        }
+      }
     },
     corpChange(value, name) {
       if (name == "destinationName") {
@@ -483,21 +508,23 @@ export default {
             this.$set(this.documentForm, "destinationNamePrint", item.enName);
           }
         }
-      } else if (name == "department") {
-        this.$set(this.documentForm, "fax", null);
-        this.$set(this.documentForm, "ematl", null);
-        this.$set(this.documentForm, "tel", null);
-        if (value) {
-          getLazyList(null, { deptName: value }).then(res => {
-            if (res.data.data.length) {
-              this.$set(this.documentForm, "department", res.data.data[0].title);
-              this.$set(this.documentForm, "fax", res.data.data[0].fax);
-              this.$set(this.documentForm, "ematl", res.data.data[0].email);
-              this.$set(this.documentForm, "tel", res.data.data[0].tel);
-            }
-          });
-        }
-      } else {
+      }
+      // else if (name == "department") {
+      //   this.$set(this.documentForm, "fax", null);
+      //   this.$set(this.documentForm, "ematl", null);
+      //   this.$set(this.documentForm, "tel", null);
+      //   if (value) {
+      //     getLazyList(null, { deptName: value }).then(res => {
+      //       if (res.data.data.length) {
+      //         this.$set(this.documentForm, "department", res.data.data[0].title);
+      //         this.$set(this.documentForm, "fax", res.data.data[0].fax);
+      //         this.$set(this.documentForm, "ematl", res.data.data[0].email);
+      //         this.$set(this.documentForm, "tel", res.data.data[0].tel);
+      //       }
+      //     });
+      //   }
+      // }
+      else {
         this.$set(this.documentForm, name, value);
       }
     },
@@ -512,6 +539,13 @@ export default {
       getDeptTree().then(res => {
         this.departmentData = res.data.data;
       });
+    },
+    openDialog() {
+      getUser(this.documentForm.operatorId).then(res => {
+        this.$set(this.documentForm, "accDeptName", res.data.data.deptName);
+        this.$set(this.documentForm, "email", res.data.data.email);
+        this.$set(this.documentForm, "tel", res.data.data.phone);
+      });
     }
   }
 };

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

@@ -1803,7 +1803,7 @@ export default {
           return this.$message.error("单据已提交审核,请重新选择");
         }
         if (item.polId) podId.push(item.polId);
-        if (item.podId) destinationId.push(item.podId);
+        if (item.placeDeliveryId) destinationId.push(item.placeDeliveryId);
         if (item.lineId) airlineId.push(item.lineId);
         if (item.vesselId) shipNameId.push(item.vesselId);
         if (item.carrierId) shippingCompanyId.push(item.carrierId);
@@ -1817,7 +1817,7 @@ export default {
       }
       console.log([...new Set(destinationId)]);
       if ([...new Set(destinationId)].length > 1) {
-        return this.$message.error("请选择相同的卸货港");
+        return this.$message.error("请选择相同的交货地");
       }
       // if ([...new Set(airlineId)].length > 1) {
       //     return this.$message.error("请选择相同的航线");

+ 9 - 3
src/views/iosBasicData/businessCenter/customerBooking/detailsPage.vue

@@ -2931,6 +2931,12 @@ export default {
               gwtSUM += Number(item.grossWeight ? item.grossWeight : 0);
               mrtSUM += Number(item.measurement ? item.measurement : 0);
             }
+            this.form.quantity = Number(this.form.quantity ? this.form.quantity : 0).toFixed(2);
+            this.form.grossWeight = Number(this.form.grossWeight ? this.form.grossWeight : 0).toFixed(2);
+            this.form.measurement = Number(this.form.measurement ? this.form.measurement : 0).toFixed(2);
+            qtySUM = Number(qtySUM ? qtySUM : 0).toFixed(2);
+            gwtSUM = Number(gwtSUM ? gwtSUM : 0).toFixed(2);
+            mrtSUM = Number(mrtSUM ? mrtSUM : 0).toFixed(2);
             if (qtySUM != this.form.quantity || gwtSUM != this.form.grossWeight || mrtSUM != this.form.measurement) {
               this.$alert(
                 `<table border="1" align="center" style="width:100%;color:#F56C6C">
@@ -2942,9 +2948,9 @@ export default {
                   </tr>
                   <tr>
                     <td align="center">提单合计</td>
-                    <td align="center">${Number(this.form.quantity)}</td>
-                    <td align="center">${Number(this.form.grossWeight)}</td>
-                    <td align="center">${Number(this.form.measurement)}</td>
+                    <td align="center">${this.form.quantity}</td>
+                    <td align="center">${this.form.grossWeight}</td>
+                    <td align="center">${this.form.measurement}</td>
                   </tr>
                   <tr>
                     <td align="center">分箱合计</td>

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

@@ -263,13 +263,14 @@
                 <el-button type="primary" size="small" :disabled="editDisabled || selectionList.length == 0" @click="allClick('批量修改POD场站')">
                   批量修改POD场站
                 </el-button>
-                <!-- <el-button type="success" size="small">导入</el-button> -->
+                <el-button type="success" size="small" @click="allClick('客户还箱')">客户还箱</el-button>
+                <el-button type="success" size="small" @click="allClick('导出箱号')">导出箱号</el-button>
                 <!-- <el-button type="info" size="small" @click="allClick('启用')">启用</el-button> -->
                 <!-- <el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
                 <!-- <el-button size="small" style="margin-right: 8px" :disabled="!form.id || true"
                   @click="$refs.print.openDialog()">打印报表
                 </el-button> -->
-                   <el-tag style="margin-right: 8px;">
+                <el-tag style="margin-right: 8px;">
                   空箱进场:
                   {{ form.tradingBoxItemsList.filter(item => item.status == "待使用").length || 0 }}
                 </el-tag>
@@ -1420,7 +1421,7 @@ export default {
               res: "data"
             },
             tip: "请上传 .xls,.xlsx 标准格式文件",
-            action: "/api/blade-los/baccelements/importBAccElements"
+            action: "/api/blade-los/boxdynamicsrecord/importExcel?type=JC"
           }
         ]
       },
@@ -3430,11 +3431,13 @@ export default {
     },
     // 上传成功
     onSuccess(res, done, loading, column) {
-      if (res == "操作成功") {
+      console.log(res);
+      if (res == "操作成功" || res.msg == "操作成功") {
         this.$message.success("上传成功!");
       }
       this.excelBox = false;
       // this.$message.success("导入成功!");
+      this.getDetail(this.form.id);
       loading = false;
       done();
     },
@@ -4020,9 +4023,37 @@ export default {
           }
         });
       }
-      if (name == "导入") {
+      if (name == "客户还箱") {
         this.excelBox = true;
       }
+      if (name == "导出箱号") {
+        let ids = [];
+        if (this.boxQuery.code) {
+          for (let item of this.form.tradingBoxItemsList) {
+            ids.push(item.id);
+          }
+        } else {
+          if (this.selectionList.length == 0) {
+            return this.$message.error("请选择箱明细");
+          }
+          for (let item of this.selectionList) {
+            ids.push(item.id);
+          }
+        }
+
+        let data = {
+          id: this.form.id,
+          ids: ids.join(",")
+        };
+        const routeData = this.$router.resolve({
+          path: "/api/blade-los/boxdynamicsrecord/exportTemplateById", //跳转目标窗口的地址
+          query: {
+            "Blade-Auth": getToken(),
+            ...data //括号内是要传递给新窗口的参数
+          }
+        });
+        window.open(routeData.href.slice(1, routeData.href.length));
+      }
       if (name == "启用") {
         if (!this.form.id) {
           return this.$message.error("请保存数据再启用");
@@ -5310,6 +5341,10 @@ export default {
   color: #81b337;
 }
 
+::v-deep .el-dialog__body {
+  padding: 8px 20px !important;
+}
+
 .meetSize {
   font-size: 16px;
   color: #54bcbd;

+ 38 - 7
src/views/ow/owTask/detailsPage.vue

@@ -319,13 +319,15 @@
                 <el-button type="primary" size="small" :disabled="editDisabled" @click="allClick('批量修改POD场站')">
                   批量修改POD场站
                 </el-button>
+                <el-button type="success" size="small" :disabled="!form.id" @click="allClick('客户还箱')">客户还箱</el-button>
+                <el-button type="success" size="small" :disabled="!form.id" @click="allClick('导出箱号')"> 导出箱号</el-button>
                 <!-- <el-button type="primary" size="small" @click="allClick('卖箱')">卖箱</el-button> -->
                 <!-- <el-button size="small" style="margin-right: 8px" :disabled="!form.id || true"
                   @click="$refs.print.openDialog()">打印报表
                 </el-button> -->
                 <el-tag style="margin-right: 8px;">
                   空箱进场:
-                  {{ form.tradingBoxItemsList.filter(item => item.status == "待使用").length || 0 }}
+                  {{ form.tradingBoxItemsList.filter(item => item.status != "作废").length || 0 }}
                 </el-tag>
                 <el-tag type="success" style="margin-right: 8px;">
                   空箱出场:
@@ -340,7 +342,7 @@
                 <el-tag type="danger">
                   盘存:
                   {{
-                    form.tradingBoxItemsList.filter(item => item.status == "待使用").length -
+                    form.tradingBoxItemsList.filter(item => item.status != "作废").length -
                       form.tradingBoxItemsList.filter(item => item.status == "使用中" || item.status == "已还箱" || item.status == "退租").length || 0
                   }}
                 </el-tag>
@@ -1675,7 +1677,7 @@ export default {
               res: "data"
             },
             tip: "请上传 .xls,.xlsx 标准格式文件",
-            action: "/api/blade-los/baccelements/importBAccElements"
+            action: "/api/blade-los/boxdynamicsrecord/importExcel?type=JC"
           }
         ]
       },
@@ -3865,17 +3867,19 @@ export default {
     },
     // 上传成功
     onSuccess(res, done, loading, column) {
-      if (res == "操作成功") {
+      console.log(res);
+      if (res == "操作成功" || res.msg == "操作成功") {
         this.$message.success("上传成功!");
       }
       this.excelBox = false;
       // this.$message.success("导入成功!");
+      this.getDetail(this.form.id);
       loading = false;
       done();
     },
     // 下载模板
     handleGet() {
-      window.open(`/api/blade-los/baccelements/exportBAccElements/template?${this.website.tokenHeader}=${getToken()}`);
+      window.open(`/api/blade-los/boxdynamicsrecord/exportTemplate?${this.website.tokenHeader}=${getToken()}`);
     },
     polRefresh() {
       bportsDetail(this.form.polId).then(res => {
@@ -4522,9 +4526,36 @@ export default {
           }
         });
       }
-      if (name == "导入") {
+      if (name == "客户还箱") {
         this.excelBox = true;
       }
+      if (name == "导出箱号") {
+        let ids = [];
+        if (this.boxQuery.code) {
+          for (let item of this.form.tradingBoxItemsList) {
+            ids.push(item.id);
+          }
+        } else {
+          if (this.selectionList.length == 0) {
+            return this.$message.error("请选择箱明细");
+          }
+          for (let item of this.selectionList) {
+            ids.push(item.id);
+          }
+        }
+        let data = {
+          id: this.form.id,
+          ids: ids.join(",")
+        };
+        const routeData = this.$router.resolve({
+          path: "/api/blade-los/boxdynamicsrecord/exportTemplateById", //跳转目标窗口的地址
+          query: {
+            "Blade-Auth": getToken(),
+            ...data //括号内是要传递给新窗口的参数
+          }
+        });
+        window.open(routeData.href.slice(1, routeData.href.length));
+      }
       if (name == "导出") {
         let ids = [];
         if (this.boxQuery.code) {
@@ -5922,7 +5953,7 @@ export default {
 }
 
 ::v-deep .el-dialog__body {
-  padding: 0px 20px !important;
+  padding: 8px 20px !important;
 }
 
 .disabledBox {