Bladeren bron

货代箱详细 2023-12-06

caojunjie 1 jaar geleden
bovenliggende
commit
f578986777

+ 26 - 1
src/api/iosBasicData/containers.js

@@ -96,4 +96,29 @@ export const containersImportBoxNo = (row) => {
     data: row
   })
 }
-
+// 箱货物明细单个保存
+export const containerscommoditySubmit = (row) => {
+  return request({
+    url: '/api/blade-los/containerscommodity/submit',
+    method: 'post',
+    data: row
+  })
+}
+// 箱货物明细批量保存
+export const containerscommoditySubmitList = (row) => {
+  return request({
+    url: '/api/blade-los/containerscommodity/submitList',
+    method: 'post',
+    data: row
+  })
+}
+// 箱货物明细删除
+export const containerscommodityRemove = (ids) => {
+  return request({
+    url: '/api/blade-los/containerscommodity/remove',
+    method: 'get',
+    params: {
+      ids
+    }
+  })
+}

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

@@ -1386,6 +1386,10 @@ const columnName = [{
     name: '货运代理-海运出口-费用付'
   },
   {
+    code: 309.4,
+    name: '货运代理-海运出口-配箱处理-货物明细'
+  },
+  {
     code: 310,
     name: '货运代理-账单管理-费用中心'
   },

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

@@ -13,6 +13,8 @@
             <PackingBusiness ref="PackingBusiness"
                              :assemblyForm="assemblyForm"
                              :detailData="detailData"
+                             :selectionList="selectionList"
+                             @billsDetailfun="billsDetailfun"
                              @allocationfun="allocationfun"
                              @withdrawfun="withdrawfun"></PackingBusiness>
         </div>
@@ -22,7 +24,9 @@
 <script>
 import containers from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/containers.vue";
 import PackingBusiness from "@/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/PackingBusiness.vue";
-import {containersSubmit} from "@/api/iosBasicData/containers";
+import {
+    containersSubmit
+} from "@/api/iosBasicData/containers";
 import {containersEqualDistribution} from "@/api/iosBasicData/containers";
 
 export default {
@@ -63,7 +67,10 @@ export default {
                 this.selectionList = list
                 if (list.length > 0) {
                     this.$refs.PackingBusiness.containersBillsList = this.selectionList[0].containersBillsList
-                    this.$refs.PackingBusiness.containersCommodityList = this.selectionList[0].containersCommodityList
+                    this.$refs.PackingBusiness.containersCommodityList = this.selectionList[0].containersCommodityList.map(item=>{
+                        item.edit = false
+                        return item
+                    })
                 }
             },
             // 分配

+ 649 - 64
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/PackingBusiness.vue

@@ -101,98 +101,632 @@
                 </div>
             </el-tab-pane>
             <el-tab-pane label="货物明细" name="second">
-                <div class="tbasTop">
-                    <el-table
-                        :row-style="{height:'20px',padding:'0px',fontSize:'12px'}"
-                        :cell-style="{padding:'0px',fontSize:'12px',textAlign:'center'}"
-                        :data="containersBillsList"
+                <avue-crud :option="optionDetail"
+                           :table-loading="loading"
+                           :data="containersCommodityList"
+                           v-model="Detailform"
+                           id="out-table"
+                           :header-cell-class-name="headerClassName"
+                           ref="crudDetail"
+                           :row-style="{height:'20px'}"
+                           :cell-style="{padding:'0px'}"
+                           @selection-change="handleSelectionChange"
+                           @row-save="rowSaveDetail"
+                           @row-update="addUpdateDetail"
+                           @resetColumn="resetColumnTwo('crudDetail', 'optionDetail', 'optionBackDetail', 309.4)"
+                           @saveColumn="saveColumnTwo('crudDetail', 'optionDetail', 'optionBackDetail', 309.4)" >
+                    <template slot="lineNoHeader" slot-scope="scope">
+                        <el-button type="primary" size="small" icon="el-icon-plus" circle
+                                   :disabled="detailData.seeDisabled || selectionList.length == 0" @click="DetailAdd"></el-button>
+                    </template>
 
-                        :header-cell-style="tableHeaderCellStyle"
-                        border
-                        stripe
-                        height="300px"
-                        style="width: 100%">
-                        <el-table-column
-                            prop="code"
-                            label="业务编号">
-                        </el-table-column>
-                        <el-table-column
-                            prop="hblno"
-                            label="HBLNO">
-                        </el-table-column>
-                        <el-table-column
-                            prop="mblno"
-                            label="MBLNO">
-                        </el-table-column>
-                        <el-table-column
-                            prop="polCnName"
-                            label="目的港">
-                        </el-table-column>
-                        <el-table-column
-                            prop="quantity"
-                            label="件数">
-                            <template slot-scope="scope">
-                                {{Number(scope.row.quantity).toFixed(0)}}
-                            </template>
-                        </el-table-column>
-                        <el-table-column
-                            prop="grossWeight"
-                            label="毛重">
-                            <template slot-scope="scope">
-                                {{Number(scope.row.grossWeight).toFixed(2)}}
-                            </template>
-                        </el-table-column>
-                        <el-table-column
-                            prop="measurement"
-                            label="尺码">
-                            <template slot-scope="scope">
-                                {{Number(scope.row.measurement).toFixed(2)}}
-                            </template>
-                        </el-table-column>
-                        <el-table-column
-                            prop="remarks"
-                            label="备注">
-                        </el-table-column>
-                        <el-table-column
-                            label="操作"
-                            width="100">
-                            <template slot-scope="scope">
-                                <el-button type="text" size="small"
-                                           :disabled="detailData.seeDisabled" @click="withdrawfun(scope.row,scope.$index)">撤回</el-button>
-                            </template>
-                        </el-table-column>
-                    </el-table>
-                </div>
+                    <template slot-scope="scope" slot="menu">
+                        <el-button
+                            v-if="!scope.row.$cellEdit"
+                            size="mini"
+                            type="text"
+                            icon="el-icon-edit"
+                            @click.stop="editfun(scope.row, scope.index)">
+                            编辑
+                        </el-button>
+                        <el-button type="text" size="small" @click="containerscommodityRemovefun(scope.row,scope.index)">删除</el-button>
+                    </template>
+                </avue-crud>
             </el-tab-pane>
         </el-tabs>
+        <div class="tbasTop">
+            <el-table
+                :row-style="{height:'20px',padding:'0px',fontSize:'12px'}"
+                :cell-style="{padding:'0px',fontSize:'12px',textAlign:'center'}"
+                :data="containersBillsList"
+
+                :header-cell-style="tableHeaderCellStyle"
+                border
+                stripe
+                height="300px"
+                style="width: 100%">
+                <el-table-column
+                    prop="code"
+                    label="业务编号">
+                </el-table-column>
+                <el-table-column
+                    prop="hblno"
+                    label="HBLNO">
+                </el-table-column>
+                <el-table-column
+                    prop="mblno"
+                    label="MBLNO">
+                </el-table-column>
+                <el-table-column
+                    prop="polCnName"
+                    label="目的港">
+                </el-table-column>
+                <el-table-column
+                    prop="quantity"
+                    label="件数">
+                    <template slot-scope="scope">
+                        {{Number(scope.row.quantity).toFixed(0)}}
+                    </template>
+                </el-table-column>
+                <el-table-column
+                    prop="grossWeight"
+                    label="毛重">
+                    <template slot-scope="scope">
+                        {{Number(scope.row.grossWeight).toFixed(2)}}
+                    </template>
+                </el-table-column>
+                <el-table-column
+                    prop="measurement"
+                    label="尺码">
+                    <template slot-scope="scope">
+                        {{Number(scope.row.measurement).toFixed(2)}}
+                    </template>
+                </el-table-column>
+                <el-table-column
+                    prop="remarks"
+                    label="备注">
+                </el-table-column>
+                <el-table-column
+                    label="操作"
+                    width="100">
+                    <template slot-scope="scope">
+                        <el-button type="text" size="small"
+                                   :disabled="detailData.seeDisabled" @click="withdrawfun(scope.row,scope.$index)">撤回</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </div>
     </div>
 </template>
 
 <script>
+    import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+    import {
+        containerscommodityRemove,
+        containerscommoditySubmit,
+        containerscommoditySubmitList
+    } from "@/api/iosBasicData/containers";
+    import { bcommodityList } from "@/api/iosBasicData/bcommodity";
+    import {getBunitsList} from "@/api/iosBasicData/bunits";
+    import {getWorkDicts} from "@/api/system/dictbiz";
 
     export default {
+        components: {SearchQuery},
         props:{
             assemblyForm:{},
             detailData:{},
+            // 选中的数据
+            selectionList:{
+                type:Array,
+            },
         },
         data(){
             return {
+                hscodeData:[], // 商品数据
+                packingUnitData:[], // 包装
+                dgPackingUnitData:[], // 危险品包装
                 // 当前选择箱子的数据
                 containersBillsList:[],
                 // 撤回的
                 subtractContainersBillsList:[],
+                // 货物明细
+                containersCommodityList:[],
                 // 要选择的数据
                 waitingBoxList:[],
                 // tabs切换
                 activeName:"first",
+                // 货物明细配置项
+                optionDetail:{},
+                optionBackDetail:{
+                    stripe:true,
+                    maxHeight:'250',
+                    calcHeight: 30,
+                    tip: false,
+                    searchShow: true,
+                    searchMenuSpan: 6,
+                    border: true,
+                    selection: true,
+                    dialogClickModal: false,
+                    addBtn:false,
+                    viewBtn:false,
+                    delBtn:false,
+                    editBtn:false,
+                    menuWidth:'100',
+                    cellBtn:true,
+                    column:[
+                        {
+                            label: "行号",
+                            prop: "lineNo",
+                            width: "55",
+                            headerslot:true,
+                            display:false,
+                            overHidden:true,
+                        },
+                        {
+                            label: "单据编号",
+                            prop: "billNo",
+                            display:false,
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "商品HS-CODE",
+                            prop: "hscode",
+                            labelWidth:100,
+                            overHidden:true,
+                            cell:true,
+                            type:"select",
+                            dicData:[],
+                            props: {
+                                label: "hsCode",
+                                value: "hsCode"
+                            },
+                            remote:true,
+                            dicUrl: '/api/blade-los/bcommodity/list?hsCode={{key}}',
+                            dicFormatter: (res => {
+                                return res.data.records
+                            }),
+                        },
+                        {
+                            label: "商品简称",
+                            prop: "commodityShName",
+                            labelWidth:100,
+                            display:false,
+                            overHidden:true,
+                        },
+                        {
+                            label: "商品中文名称",
+                            prop: "commodityCnName",
+                            labelWidth:100,
+                            display:false,
+                            overHidden:true,
+                        },
+                        {
+                            label: "商品英文名称",
+                            prop: "commodityEnName",
+                            labelWidth:100,
+                            display:false,
+                            overHidden:true,
+                        },
+                        {
+                            label: "货物短描",
+                            prop: "commodityShortDescr",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "货物描述",
+                            prop: "commodityDescr",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "唛头",
+                            prop: "marks",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "包装单位",
+                            prop: "packingUnit",
+                            labelWidth:100,
+                            overHidden:true,
+                            cell:true,
+                            type:"select",
+                            dicData:[],
+                            props: {
+                                label: "cnName",
+                                value: "cnName"
+                            },
+                            remote:true,
+                            dicUrl: '/api/blade-los/bunits/list?cnName={{key}}',
+                            dicFormatter: (res => {
+                                return res.data.records
+                            }),
+                        },
+                        {
+                            label: "装箱件数",
+                            prop: "quantity",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "装箱毛重(KGM)",
+                            prop: "grossWeight",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "装箱净重(KGM)",
+                            prop: "netWeight",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "装箱体积(CBM)",
+                            prop: "measurement",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "是否危险品",
+                            prop: "isDangerous",
+                            labelWidth:100,
+                            overHidden:true,
+                            type:"select",
+                            dicData:[],
+                            props: {
+                                label: "dictValue",
+                                value: "dictKey"
+                            }
+                        },
+                        {
+                            label: "危险品分类代码(IMDG CODE)",
+                            prop: "dgImdgCode",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "危险品分类代码名称",
+                            prop: "dgImdgName",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "危险品国际代码",
+                            prop: "dgUnCode",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "危险品名称",
+                            prop: "dgCommodityName",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "危险品包装单位",
+                            prop: "dgPackingUnit",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                            type:"select",
+                            dicData:[],
+                            props: {
+                                label: "cnName",
+                                value: "cnName"
+                            },
+                            remote:true,
+                            dicUrl: '/api/blade-los/bunits/list?cnName={{key}}',
+                            dicFormatter: (res => {
+                                return res.data.records
+                            }),
+                        },
+                        {
+                            label: "危险品包装等级",
+                            prop: "dgPackingLevel",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "易燃易爆品闪点",
+                            prop: "dgFlashPoint",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "易燃易爆品闪点单位",
+                            prop: "dgFlashPointUnit",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "危险品联系人",
+                            prop: "dgContacts",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "危险品联系人电话",
+                            prop: "dgTel",
+                            labelWidth:100,
+                            overHidden:true,
+                            display:false,
+                        },
+                        {
+                            label: "是否海洋污染物",
+                            prop: "dgIsMarinePollutant",
+                            labelWidth:100,
+                            overHidden:true,
+                            type:"select",
+                            dicData:[],
+                            props: {
+                                label: "dictValue",
+                                value: "dictKey"
+                            }
+                        },
+                        {
+                            label: "是否申报数量",
+                            prop: "dgIsDeclareQuantity",
+                            labelWidth:100,
+                            overHidden:true,
+                            type:"select",
+                            dicData:[],
+                            props: {
+                                label: "dictValue",
+                                value: "dictKey"
+                            }
+                        },
+                        {
+                            label: "CAS NO",
+                            prop: "dgCasNo",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "CAA INFO",
+                            prop: "dgCaaInfo",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "DC Weight",
+                            prop: "dgDcWeight",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "Emergency温度",
+                            prop: "dgEmerTemperature",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "Emergency温度单位",
+                            prop: "dgEmerTemperatureUnit",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "Control温度",
+                            prop: "dgCtrlTemperature",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "Control温度单位",
+                            prop: "dgCtrlTemperatureUnit",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "左超 厘米",
+                            prop: "overLeft",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "右超 厘米",
+                            prop: "overRight",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "前超 厘米",
+                            prop: "overFront",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "后超 厘米",
+                            prop: "overBack",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                        {
+                            label: "超高 厘米",
+                            prop: "overTop",
+                            labelWidth:100,
+                            overHidden:true,
+                        },
+                    ]
+                },
+                selectionDetailList:[], // 选中的数据
+                loading:false,
+                Detailform:{},
             }
         },
-        created() {
+        async created() {
+            this.optionDetail = await this.getColumnData(this.getColumnName(309.4), this.optionBackDetail);
+            this.bcommodityListfun()
+            this.packingUnitListfun()
+            this.dgPackingUnitListfun()
+            this.ifInvoiceWorkDictsfun()
+        },
+        watch:{
+            // 监听
+            "Detailform.isDangerous":{
+                // 执行方法
+                handler(oldValue,newValue) {
+                   if (oldValue == '1') {
+                       this.findObject(this.optionDetail.column, "dgImdgCode").display = true
+                       this.findObject(this.optionDetail.column, "dgImdgName").display = true
+                       this.findObject(this.optionDetail.column, "dgUnCode").display = true
+                       this.findObject(this.optionDetail.column, "dgCommodityName").display = true
+                       this.findObject(this.optionDetail.column, "dgPackingUnit").display = true
+                       this.findObject(this.optionDetail.column, "dgPackingLevel").display = true
+                       this.findObject(this.optionDetail.column, "dgFlashPoint").display = true
+                       this.findObject(this.optionDetail.column, "dgFlashPointUnit").display = true
+                       this.findObject(this.optionDetail.column, "dgContacts").display = true
+                       this.findObject(this.optionDetail.column, "dgTel").display = true
+                   }else {
+                       this.findObject(this.optionDetail.column, "dgImdgCode").display = false
+                       this.findObject(this.optionDetail.column, "dgImdgName").display = false
+                       this.findObject(this.optionDetail.column, "dgUnCode").display = false
+                       this.findObject(this.optionDetail.column, "dgCommodityName").display = false
+                       this.findObject(this.optionDetail.column, "dgPackingUnit").display = false
+                       this.findObject(this.optionDetail.column, "dgPackingLevel").display = false
+                       this.findObject(this.optionDetail.column, "dgFlashPoint").display = false
+                       this.findObject(this.optionDetail.column, "dgFlashPointUnit").display = false
+                       this.findObject(this.optionDetail.column, "dgContacts").display = false
+                       this.findObject(this.optionDetail.column, "dgTel").display = false
+                   }
+                },
+                deep: true, // 深度监听
+                immediate: true  // 第一次改变就执行
+            },
         },
         mounted() {
 
         },
         methods:{
+            // 货物详情弹窗开启
+            DetailAdd(){
+                this.$refs.crudDetail.rowAdd()
+            },
+            // 货物明细单个保存接口
+            rowSaveDetail(row,done,loading){
+                row.billNo = this.assemblyForm.billNo
+                row.ppId = this.assemblyForm.id
+                row.pid = this.selectionList[0].id
+                for (let item of this.hscodeData) {
+                    if (item.hsCode == row.hscode) {
+                        this.$set(row,'commodityShName',item.ncmCode)
+                        this.$set(row,'commodityCnName',item.cnName)
+                        this.$set(row,'commodityEnName',item.enName)
+                    }
+                }
+                for (let item of this.packingUnitData) {
+                    if (item.cnName == value) {
+                        this.$set(row,'packingUnitId',item.id)
+                        this.$set(row,'packingUnit',item.cnName)
+                    }
+                }
+                for (let item of this.dgPackingUnitData) {
+                    if (item.cnName == value) {
+                        this.$set(row,'dgPackingUnitId',item.id)
+                        this.$set(row,'dgPackingUnit',item.cnName)
+                    }
+                }
+                containerscommoditySubmit(row).then(res=>{
+                    this.$message.success("操作成功!");
+                    this.$emit('billsDetailfun')
+                    done();
+                },error => {
+                    loading();
+                })
+            },
+            // 行编辑保存
+            addUpdateDetail(row,index,done,loading){
+                for (let item of this.hscodeData) {
+                    if (item.hsCode == row.hscode) {
+                        this.$set(row,'commodityShName',item.ncmCode)
+                        this.$set(row,'commodityCnName',item.cnName)
+                        this.$set(row,'commodityEnName',item.enName)
+                    }
+                }
+                for (let item of this.packingUnitData) {
+                    if (item.cnName == row.cnName) {
+                        this.$set(row,'packingUnitId',item.id)
+                        this.$set(row,'packingUnit',item.cnName)
+                    }
+                }
+                for (let item of this.dgPackingUnitData) {
+                    if (item.cnName == row.cnName) {
+                        this.$set(row,'dgPackingUnitId',item.id)
+                        this.$set(row,'dgPackingUnit',item.cnName)
+                    }
+                }
+                containerscommoditySubmit(row).then(res=>{
+                    this.$message.success("操作成功!");
+                    this.$emit('billsDetailfun')
+                    done();
+                },error => {
+                    loading();
+                })
+            },
+            // 货物明细批量保存接口
+            containerscommoditySubmitListfun(){
+                containerscommoditySubmitList().then(res=>{
+
+                })
+            },
+            // 编辑
+            editfun(row,index) {
+                // this.Detailform = row
+                this.$set(row,'$cellEdit',true)
+            },
+            // 箱货物明细删除接口
+            containerscommodityRemovefun(row,index){
+                this.$confirm("确定将选择数据删除?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(()=>{
+                    containerscommodityRemove(row.id).then(res=>{
+                        this.$message.success("操作成功!");
+                        this.$emit('billsDetailfun')
+                    })
+                })
+            },
+            // 获取商品数据
+            bcommodityListfun(){
+                bcommodityList(1,10).then(res=>{
+                    this.hscodeData = res.data.data.records
+                    this.findObject(this.optionDetail.column, "hscode").dicData = res.data.data.records
+                })
+            },
+            // 获取包装单位
+            packingUnitListfun(){
+                getBunitsList(1,10).then(res=>{
+                    this.packingUnitData = res.data.data.records
+                    this.findObject(this.optionDetail.column, "packingUnit").dicData = res.data.data.records
+                })
+            },
+            // 获取危险品包装单位
+            dgPackingUnitListfun(){
+                getBunitsList(1,10).then(res=>{
+                    this.dgPackingUnitData = res.data.data.records
+                    this.findObject(this.optionDetail.column, "dgPackingUnit").dicData = res.data.data.records
+                })
+            },
+            // 全部是否字典
+            ifInvoiceWorkDictsfun(){
+                getWorkDicts('ifInvoice').then(res=>{
+                    this.findObject(this.optionDetail.column, "isDangerous").dicData = res.data.data
+                    this.findObject(this.optionDetail.column, "dgIsMarinePollutant").dicData = res.data.data
+                    this.findObject(this.optionDetail.column, "dgIsDeclareQuantity").dicData = res.data.data
+                })
+            },
+
             // 件数input
             quantityBlur(row){
                 this.$set(row,'editGrossWeight',((row.grossWeight / row.quantity) * row.editQuantity).toFixed(2))
@@ -211,11 +745,50 @@
                 // 先判断是否有id 有就把数据放到撤的数组里,增的数据清空
                 this.$emit('withdrawfun', {row,index})
             },
-
+            // 多选
+            handleSelectionChange(list){
+                this.selectionDetailList = list
+            },
             // 表头样式
             tableHeaderCellStyle({row,column,rowIndex, columnIndex}){
                 return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff;textAlign:center"
             },
+            // 更改表格颜色
+            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;
+            },
+            //自定义列保存
+            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;
+                }
+            },
 
         }
     }
@@ -226,5 +799,17 @@
     .tbasTop {
         margin: 10px 0;
     }
-    ::v-deep.el-table th.gutter { display: table-cell !important }
+    ::v-deep.el-table th.gutter {
+        display: table-cell !important
+    }
+    ::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>

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

@@ -1032,6 +1032,7 @@
         userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
 
         let that=this
+          // 关闭按钮的监听点击
         closeBtn.action = function() {
           console.log(that.$refs.ReportContainer,'1022')
           if (that.$refs.reportContainer)
@@ -1039,7 +1040,21 @@
         }
           // 打印按钮监听
           printBtn.action = (e)=>{
-              console.log(e,1042)
+              // console.log(document.body,1042)
+              // console.log(viewer.jsObject.controls.toolbar.lastChild.lastChild,1044)
+              // console.log(viewer.jsObject.controls.toolbar,1045)
+              // // stiJsViewerToolBar
+              // viewer.jsObject.controls.toolbar.style.disabled = 'none'
+              // console.log(document.body,1046)
+              // var body = JSON.parse(JSON.stringify(document.body.innerHTML))
+              // document.body.innerHTML = viewer.jsObject.controls.reportPanel.innerHTML
+              // window.print()
+              // window.close()
+              // // viewer.jsObject.controls.toolbar.lastChild.lastChild.style.disabled = 'block'
+              // document.body.innerHTML = body
+              // // console.log(printWinTmp,1047)
+              // // printWinTmp.print()
+              // // printWinTmp.close()
           }
 
       },