Browse Source

关务:装箱明细,箱数据展开查看明细

java8
han\hanst 5 months ago
parent
commit
ad022788ff
  1. 2
      src/api/ecss/ecss.js
  2. 324
      src/views/modules/ecss/codelnotify.vue
  3. 692
      src/views/modules/ecss/codelnotifyConfirm.vue
  4. 512
      src/views/modules/ecss/components/PackingDetailTab.vue
  5. 301
      src/views/modules/ecss/createDeclaration.vue
  6. 188
      src/views/modules/ecss/pallet_upload_excel.vue

2
src/api/ecss/ecss.js

@ -48,6 +48,8 @@ export const searchCoDelPalletData= data => createAPI(`/ecss/coDel/searchCoDelPa
export const searchCoDelPalletDataNew= data => createAPI(`/ecss/coDel/searchCoDelPalletDataNew`,'post',data)
export const selectBoxList = data => createAPI(`/ecss/coDel/selectBoxList`,'post',data)
export const saveCoDelPalletDataByExcel= data => createAPI(`/ecss/coDel/saveCoDelPalletDataByExcel`,'post',data)
export const searchEcssCoDelPalletHeaderData= data => createAPI(`/ecss/coDel/searchEcssCoDelPalletHeaderData`,'post',data)
export const searchEcssCoDelPalletDetailData= data => createAPI(`/ecss/coDel/searchEcssCoDelPalletDetailData`,'post',data)

324
src/views/modules/ecss/codelnotify.vue

@ -57,20 +57,6 @@
<el-form-item :label="' '" >
<el-button @click="importModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入'}}</el-button>
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px">{{'导出'}}</el-button>
<!-- <download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button&#45;&#45;primary el-button&#45;&#45;medium">
{{ '导出' }}
</download-excel>-->
</el-form-item><br>
<el-form-item label=" ">
<el-button @click="exportInvoiceList()" type="primary" style="margin-left: 2px">{{'导出发票'}}</el-button>
@ -172,40 +158,11 @@
</el-table>
</el-tab-pane>
<el-tab-pane label="装箱明细" name="pallet">
<el-table
:data="dataList3"
:height="height"
border
v-loading="dataListLoading"
style="width: 100%; ">
<!-- <el-table-column-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="80"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a type="text" size="small" @click="deleteNotifySOSPlus(scope.row)">编辑</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column
v-for="(item,index) in columnList3" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<packing-detail-tab
ref="packingDetailTab"
:current-row="currentRow"
:height="height">
</packing-detail-tab>
</el-tab-pane>
<el-tab-pane label="相关文档" name="codelnotifyDocument">
<oss-components label="申请单号" style="margin-top: 5px" height="44vh" :columns="ossColumns"
@ -684,6 +641,7 @@
import Chooselist from '@/views/modules/common/Chooselist_eam'
import delUploadExcel from "./del_upload_excel.vue";
import delDetailUploadExcel from "./del_detail_upload_excel.vue";
import PackingDetailTab from "./components/PackingDetailTab.vue";
import {} from "@/api/sysLanguage.js"
import excel from "@/utils/excel-util.js";
import {
@ -713,6 +671,7 @@
delUploadExcel,
delDetailUploadExcel,
Chooselist,
PackingDetailTab,
},
data() {
return {
@ -775,7 +734,6 @@
buList:[],
dataList:[],
dataList2:[],
dataList3:[],
dataListLoading: false,
searchData: {
page: 1,
@ -1541,260 +1499,7 @@
columnWidth: 300
},
],
columnList3:[
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3ItemNo',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "itemNo",
headerAlign: "center",
align: "right",
columnLabel: "序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3PalletRemark',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "palletRemark",
headerAlign: "center",
align: "left",
columnLabel: "栈板码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3PalletQty',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "palletQty",
headerAlign: "center",
align: "right",
columnLabel: "托数",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3PoNo',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "poNo",
headerAlign: "center",
align: "left",
columnLabel: "PO",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3PN',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "pn",
headerAlign: "center",
align: "left",
columnLabel: "PN",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Qty',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "qty",
headerAlign: "center",
align: "right",
columnLabel: "数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3BoxQty',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "boxQty",
headerAlign: "center",
align: "right",
columnLabel: "箱数",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Rolls',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "rolls",
headerAlign: "center",
align: "right",
columnLabel: "Rolls",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Length',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "length",
headerAlign: "center",
align: "right",
columnLabel: "长(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Width',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "width",
headerAlign: "center",
align: "right",
columnLabel: "宽(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Height',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "height",
headerAlign: "center",
align: "right",
columnLabel: "高(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Volume',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "volume",
headerAlign: "center",
align: "right",
columnLabel: "体积",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001TableGrossWeight',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "grossWeight",
headerAlign: "center",
align: "right",
columnLabel: "毛重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001TableNetWeight',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "netWeight",
headerAlign: "center",
align: "right",
columnLabel: "净重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
],
ossColumns:[
{
userId: this.$store.state.user.name,
@ -2006,15 +1711,10 @@
});
}
if(this.activeName==='pallet'){
searchCoDelPalletDataNew(this.currentRow).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList3 = data.rows
} else {
this.dataList3 = [];
}
});
//
if (this.$refs.packingDetailTab) {
this.$refs.packingDetailTab.refresh();
}
}
},
tabClick (tab, event) {

692
src/views/modules/ecss/codelnotifyConfirm.vue

@ -135,17 +135,7 @@
</template>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- fixed="left"-->
<!-- header-align="center"-->
<!-- align="center"-->
<!-- width="100"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <a v-if="currentRow.notifyStatus==='已计划'" type="text" size="small" @click="openUpdateDetailModel(scope.row)">修改</a>-->
<!-- <a v-if="currentRow.notifyStatus==='已计划'" type="text" size="small" @click="deleteDelDetail(scope.row)">删除</a>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-tab-pane>
@ -153,7 +143,6 @@
<el-button @click="oneClickPacking()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'一键装箱'}}</el-button>
<el-button @click="upLoadPallet()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导入装箱单'}}</el-button>
<el-button @click="palletMaintenance()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'栈板维护'}}</el-button>
<!-- <el-button @click="newPalletModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'装箱'}}</el-button>-->
<el-button @click="exportExcel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'导出模版'}}</el-button>
<el-table
:data="dataList4"
@ -168,8 +157,6 @@
fixed="left"
label="操作">
<template slot-scope="scope">
<!-- <a type="text" size="small" @click="boxDetailModel(scope.row)">箱明细</a>-->
<a type="text" size="small" @click="updatePalletModel(scope.row)">修改</a>
<a type="text" size="small" @click="deletePallet(scope.row)">删除</a>
</template>
@ -194,103 +181,14 @@
</el-tab-pane>
<el-tab-pane label="装箱明细" name="pallet">
<el-table
:data="dataList3"
:height="height"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
header-align="center"
align="center"
width="70"
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateBoxModel(scope.row,1)">修改</a>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnList3" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<packing-detail-tab
ref="packingDetailTab"
:current-row="currentRow"
:height="height">
</packing-detail-tab>
</el-tab-pane>
</el-tabs>
<el-dialog title="栈板明细" :close-on-click-modal="false" v-drag :visible.sync="boxDetailModelFlag" width="600px">
<el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20">
<el-col :span="6">
<el-form-item :label="'发货通知单号'" >
<el-input v-model="boxDetailData.delNo" disabled ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="'序号'" >
<el-input v-model="boxDetailData.seqNo" disabled ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="' '" >
<el-button @click="newBoxModel()" type="primary" style="margin-left: 2px;margin-top: 0px">{{'新增箱'}}</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
:data="dataList5"
:height="height"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
header-align="center"
align="center"
width="100"
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateBoxModel(scope.row,0)">修改</a>
<a type="text" size="small" @click="deleteBox(scope.row)">删除</a>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnList5" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="boxDetailModelFlag=false">关闭</el-button>
</el-footer>
</el-dialog>
<el-dialog title="仓库确认" :close-on-click-modal="false" v-drag :visible.sync="confirmModelFlag" width="400px">
<el-form label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row :gutter="20">
@ -388,64 +286,6 @@
</el-col>
</el-row>
</el-form>
<br>
<el-table v-show="palletModelData.addFlag===0"
:height="240" class="zxClass"
:data="dataList8"
stripe ref="partTableRef"
highlight-current-row
border :row-style="{ height: '30px' }"
style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column
v-if="currentRow.buNo==='03-RFID' && currentRow.walMartOrderFlag==='Y'"
header-align="center"
align="center"
width="60"
fixed="left"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.newRow!==1" @click="copyColumn(scope.row)">复制</a>
<a type="text" size="small" v-if="scope.row.newRow===1" @click="deleteColumn(scope.$index)">删除</a>
</template>
</el-table-column>
<el-table-column
type="selection"
align="center"
width="55">
</el-table-column>
<el-table-column
prop="pn"
header-align="center"
align="center"
label="PN">
</el-table-column>
<el-table-column
prop="partDescription"
header-align="center"
align="center"
label="Description">
</el-table-column>
<el-table-column
prop="qty"
header-align="center"
align="center"
label="数量">
<template slot-scope="scope">
<el-input v-if="currentRow.buNo==='03-RFID' && currentRow.walMartOrderFlag==='Y'" v-model="scope.row.qty" style="width: 100px;"></el-input>
<span v-else>{{scope.row.qty}}</span>
</template>
</el-table-column>
<el-table-column
prop="nocartonsT"
header-align="center"
align="center"
label="箱数">
<template slot-scope="scope">
<span v-if="currentRow.buNo==='03-RFID' && currentRow.walMartOrderFlag==='Y'">{{scope.row.nocartons}}</span>
<el-input v-else v-model="scope.row.nocartons" style="width: 100px;"></el-input>
</template>
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="savePalletHeader()">保存</el-button>
<el-button type="primary" @click="palletModelFlag=false">关闭</el-button>
@ -503,7 +343,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item :label="''" >
<el-checkbox style="font-weight: bold" v-model="oneClickPackingModelData.boxRemnant">是否显示零数箱</el-checkbox>
<el-checkbox v-model="oneClickPackingModelData.boxRemnant">是否显示零数箱</el-checkbox>
</el-form-item>
</el-col>
</el-row>
@ -514,42 +354,53 @@
</el-footer>
</el-dialog>
<el-dialog title="栈板维护" :close-on-click-modal="false" v-drag :visible.sync="palletMaintenanceModelFlag" width="450px">
<el-dialog :close-on-click-modal="false" v-drag :visible.sync="palletMaintenanceModelFlag" width="450px">
<div slot="title" class="dialog-title">
<span>栈板维护</span>
<el-tooltip effect="dark" placement="top">
<div slot="content">
<div>栈板维护功能说明</div>
<div> 系统会自动加载当前BU下的所有栈板</div>
<div> 栈板高度单位为米(M)请输入准确数值</div>
<div> 只有托数大于0的栈板记录才会被保存</div>
</div>
<i class="el-icon-question" style="color: #17b3a3; margin-left: 8px; cursor: pointer; font-size: 16px;"></i>
</el-tooltip>
</div>
<!-- 栈板记录列表 -->
<div style="margin: 15px 0;">
<div style="margin-bottom: 10px;">
<span style="font-weight: bold; margin-right: 10px;">栈板记录:</span>
<el-button type="primary" size="small" @click="addPalletMaintenanceRecord">添加行</el-button>
</div>
<el-table :data="palletMaintenanceRecords" border style="width: 100%; margin-bottom: 15px;" class="zxClass"
max-height="200" v-if="palletMaintenanceRecords.length > 0">
<el-table-column label="栈板" min-width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.pallet" disabled style="width: 100%;">
<template slot="append">
<el-button @click="selectPalletMaintenance(scope.$index)" size="mini" type="primary">选择</el-button>
</template>
</el-input>
<el-input v-model="scope.row.pallet" disabled style="width: 100%;"></el-input>
</template>
</el-table-column>
<el-table-column label="栈板高度(M)" width="90">
<template slot-scope="scope">
<el-input v-model="scope.row.height" type="text" placeholder="请输入高度" style="width: 100%;"></el-input>
<el-table-column width="120">
<template slot="header">
<span>栈板高度(M)</span>
</template>
</el-table-column>
<el-table-column label="托数" width="80">
<template slot-scope="scope">
<el-input v-model="scope.row.palletQty" type="text" placeholder="请输入托数" style="width: 100%;"></el-input>
<el-input v-model="scope.row.height" type="text" placeholder="请输入高度" style="width: 100%;"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="40">
<el-table-column width="100">
<template slot="header">
<span>托数</span>
</template>
<template slot-scope="scope">
<a type="text" size="mini" @click="removePalletMaintenanceRecord(scope.$index)">删除</a>
<el-input v-model="scope.row.palletQty" type="text" placeholder="请输入托数" style="width: 100%;"></el-input>
</template>
</el-table-column>
</el-table>
<div v-if="palletMaintenanceRecords.length === 0" style="text-align: center; color: #999; padding: 20px; border: 1px dashed #ddd;">
暂无栈板记录请点击"添加行"按钮添加
正在加载栈板记录...
</div>
<!-- 操作提示 -->
<div v-if="palletMaintenanceRecords.length > 0" style="margin-top: 10px; padding: 8px 12px; background: #f0f9ff; border: 1px solid #b3d8ff; border-radius: 4px; font-size: 12px; color: #409EFF;">
<i class="el-icon-info" style="margin-right: 4px;"></i>
<span>提示托数大于0的记录才会被保存</span>
</div>
</div>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
@ -657,14 +508,15 @@
import Chooselist from '@/views/modules/common/Chooselist_eam'
import {} from "@/api/sysLanguage.js"
import palletUploadExcel from "./pallet_upload_excel.vue";
import PackingDetailTab from "./components/PackingDetailTab.vue";
import {
searchEcssCoDelNotifyHeaderForCK,
searchEcssCoDelNotifyDetail,
confirmEcssDel,
updateEcssDel,
cancerConfirmEcssDel,
searchCoDelPalletData,
searchCoDelPalletDataNew,
searchEcssCoDelPalletHeaderData,
searchEcssCoDelPalletDetailData,
savePalletHeader,
@ -685,11 +537,11 @@
components:{
palletUploadExcel,
Chooselist,
PackingDetailTab,
},
data() {
return {
multipleSelection: [],
oneOrAll:'1',
palletFlag:false,
palletList:[],
palletData:{},
@ -733,13 +585,10 @@
oneClickPackingModelData:{
boxRemnant: false,
},
//
oneClickPalletRecords: [],
currentOneClickPalletIndex: -1, //
//
palletMaintenanceModelFlag: false,
palletMaintenanceRecords: [],
currentPalletMaintenanceIndex: -1, //
palletModelFlag:false,
palletModelData:{
addFlag:0,
@ -1479,24 +1328,6 @@
fixed: '',
columnWidth: 100
},
// {
// userId: this.$store.state.user.name,
// functionId: 801002,
// serialNumber: '801002Table2ErpDelItemNo',
// tableId: "801002Table2",
// tableName: "",
// columnProp: "erpDelItemNo",
// headerAlign: "center",
// align: "right",
// columnLabel: "ERP",
// columnHidden: false,
// columnImage: false,
// columnSortable: false,
// sortLv: 0,
// status: true,
// fixed: '',
// columnWidth: 60
// },
{
userId: this.$store.state.user.name,
functionId: 801002,
@ -1535,42 +1366,6 @@
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3PalletRemark',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "palletRemark",
headerAlign: "center",
align: "left",
columnLabel: "栈板码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3PalletQty',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "palletQty",
headerAlign: "center",
align: "right",
columnLabel: "托数",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 801002,
@ -1625,24 +1420,6 @@
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3BoxQty',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "boxQty",
headerAlign: "center",
align: "right",
columnLabel: "箱数",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
@ -1661,115 +1438,8 @@
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3Length',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "length",
headerAlign: "center",
align: "right",
columnLabel: "长(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3Width',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "width",
headerAlign: "center",
align: "right",
columnLabel: "宽(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3Height',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "height",
headerAlign: "center",
align: "right",
columnLabel: "高(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3Volume',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "volume",
headerAlign: "center",
align: "right",
columnLabel: "体积",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002TableGrossWeight',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "grossWeight",
headerAlign: "center",
align: "right",
columnLabel: "毛重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002TableNetWeight',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "netWeight",
headerAlign: "center",
align: "right",
columnLabel: "净重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
],
columnList4:[
{
userId: this.$store.state.user.name,
@ -1879,42 +1549,6 @@
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table4GrossWeight',
tableId: "801002Table4",
tableName: "装箱栈板主表",
columnProp: "grossWeight",
headerAlign: "center",
align: "right",
columnLabel: "毛重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table4NetWeight',
tableId: "801002Table4",
tableName: "装箱栈板主表",
columnProp: "netWeight",
headerAlign: "center",
align: "right",
columnLabel: "净重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
],
columnList5:[
{
@ -2128,15 +1762,10 @@
});
}
if(this.activeName==='pallet'){
searchCoDelPalletDataNew(this.currentRow).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList3 = data.rows
} else {
this.dataList3 = [];
}
});
//
if (this.$refs.packingDetailTab) {
this.$refs.packingDetailTab.refresh();
}
}
if(this.activeName==='box'){
searchEcssCoDelPalletHeaderData(this.currentRow).then(({data}) => {
@ -2156,12 +1785,6 @@
},
confirmDo(){
/* if (!this.confirmModel.notifyDate) {
this.$alert('请选择预计发货日期!', '错误', {
confirmButtonText: '确定'
})
return false
} */
confirmEcssDel(this.confirmModel).then(({data}) => {
if (data && data.code === 0) {
this.searchTable()
@ -2251,24 +1874,12 @@
})
},
upLoadPallet(){
/* if(this.dataList3.length>0){
this.$alert('已经有明细无法再次导入请去手工装箱全部删除!', '错误', {
confirmButtonText: '确定'
})
return false
} */
if(this.currentRow.site===''||this.currentRow.site==null){
this.$alert('请先选择发货通知单!', '错误', {
confirmButtonText: '确定'
})
return false
}
/*if(this.currentRow.walMartOrderFlag==='Y'){
this.$alert('沃尔玛订单暂时无法导入装箱清单!', '错误', {
confirmButtonText: '确定'
})
return false
}*/
let inData={
site:this.currentRow.site,
buNo:this.currentRow.buNo,
@ -2353,7 +1964,6 @@
this.palletModelFlag=true
},
newPalletModel(){
this.oneOrAll=1;
if(this.currentRow.site===''||this.currentRow.site==null){
this.$alert('请先选择发货通知单!', '错误', {
confirmButtonText: '确定'
@ -2408,19 +2018,7 @@
this.$refs.partTableRef.toggleRowSelection(row,true);
});
},
//
copyColumn(row){
let copyrow = JSON.parse(JSON.stringify(row));
copyrow.qty=0;
copyrow.nocartons=0;
copyrow.newRow=1;
this.dataList8.push(copyrow);
this.toggleSelection(this.dataList8)
},
deleteColumn(index){
this.dataList8.splice(index,1);
this.toggleSelection(this.dataList8)
},
savePalletHeader(){
if (this.palletModelData.addFlag===0 && this.multipleSelection.length===0) {
this.$alert('请选择装箱物料!', '错误', {
@ -2570,53 +2168,17 @@
}
})
},
deleteBox(row){
this.$confirm('确认删除此明细?', '提示').then(() => {
deletePalletDetail(row).then(({data}) => {
if (data && data.code === 0) {
searchEcssCoDelPalletDetailData(this.boxDetailData).then(({data}) => {
if (data.code === 0) {
this.dataList5 = data.rows
}
})
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
oneClickPacking(){
this.oneOrAll = 2;
if(this.currentRow.site===''||this.currentRow.site==null){
this.$alert('请先选择发货通知单!', '错误', {
confirmButtonText: '确定'
})
return false
}
/* if(this.dataList4.length>0){
this.$alert('已存在装箱数据,不可一键装箱!', '错误', {
confirmButtonText: '确定'
})
return false
} */
this.oneClickPackingModelData={
boxRemnant: false,
}
//
this.oneClickPalletRecords = []
this.oneClickPalletRecords.push({
pallet: '',
palletQty: '',
height: ''
})
this.oneClickPackingModelFlag=true
},
saveOneClickPacking(){
@ -2625,9 +2187,7 @@
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
boxRemnant: this.oneClickPackingModelData.boxRemnant,
palletRecords: JSON.stringify(this.oneClickPalletRecords)
}
saveOneClickPacking(saveData).then(({data}) => {
if (data && data.code === 0) {
this.refreshCurrentTabTable()
@ -2646,24 +2206,6 @@
})
},
//
addOneClickPalletRecord() {
this.oneClickPalletRecords.push({
pallet: '',
palletQty: '',
height: ''
})
},
removeOneClickPalletRecord(index) {
this.oneClickPalletRecords.splice(index, 1)
},
selectOneClickPallet(index) {
this.currentOneClickPalletIndex = index
this.palletFlag = true
},
openPalletDialog () {
//
this.searchPalletList();
@ -2673,7 +2215,7 @@
this.palletFlag = false
},
searchPalletList () {
this.palletData.buNo = (this.oneOrAll===2 || this.oneOrAll===3)?this.currentRow.buNo:this.palletModelData.buNo
this.palletData.buNo = this.palletModelData.buNo
searchPalletList(this.palletData).then(({data}) => {
if (data && data.code === 0){
this.palletList = data.rows;
@ -2681,77 +2223,75 @@
})
},
palletRowDblclick (row) {
if (this.oneOrAll===2) {
//
if (this.currentOneClickPalletIndex >= 0) {
this.oneClickPalletRecords[this.currentOneClickPalletIndex].pallet = row.palletNo
}
} else if (this.oneOrAll===3) {
//
if (this.currentPalletMaintenanceIndex >= 0) {
this.palletMaintenanceRecords[this.currentPalletMaintenanceIndex].pallet = row.palletNo
}
} else {
this.palletModelData.pallet = row.palletNo
}
this.palletModelData.pallet = row.palletNo
this.palletFlag = false
},
//
palletMaintenance() {
this.oneOrAll = 3;
if(this.currentRow.site===''||this.currentRow.site==null){
this.$alert('请先选择发货通知单!', '错误', {
confirmButtonText: '确定'
})
return false
}
//
//
this.palletMaintenanceRecords = []
this.palletMaintenanceRecords.push({
pallet: '',
palletQty: '',
height: ''
})
// buNo
this.loadAllPalletsForMaintenance()
this.palletMaintenanceModelFlag = true
},
addPalletMaintenanceRecord() {
this.palletMaintenanceRecords.push({
pallet: '',
palletQty: '',
height: ''
// buNo
loadAllPalletsForMaintenance() {
let searchData = {
palletType: '', //
buNo: this.currentRow.buNo
}
searchPalletList(searchData).then(({data}) => {
if (data.code === 0) {
const pallets = data.rows || []
//
this.palletMaintenanceRecords = pallets.map(pallet => ({
pallet: pallet.palletNo,
palletQty: '', //
height: '' // 使
}))
}
}).catch(error => {
console.error('加载栈板列表失败:', error)
//
this.palletMaintenanceRecords = [{
pallet: '',
palletQty: '',
height: ''
}]
})
},
removePalletMaintenanceRecord(index) {
this.palletMaintenanceRecords.splice(index, 1)
},
selectPalletMaintenance(index) {
this.currentPalletMaintenanceIndex = index
this.palletFlag = true
},
savePalletMaintenance() {
//
for (let i = 0; i < this.palletMaintenanceRecords.length; i++) {
const record = this.palletMaintenanceRecords[i]
// 0
const validPalletRecords = this.palletMaintenanceRecords.filter(record => {
return record.palletQty && parseFloat(record.palletQty) > 0
})
if (validPalletRecords.length === 0) {
this.$alert('请至少输入一条有效的栈板记录!', '错误', {
confirmButtonText: '确定'
})
return false
}
//
for (let i = 0; i < validPalletRecords.length; i++) {
const record = validPalletRecords[i]
if (!record.pallet) {
this.$alert(`${i + 1}行栈板不能为空!`, '错误', {
confirmButtonText: '确定'
})
return false
}
if (!record.palletQty || record.palletQty <= 0) {
this.$alert(`${i + 1}行托数必须大于0!`, '错误', {
this.$alert(`栈板不能为空!`, '错误', {
confirmButtonText: '确定'
})
return false
}
if (!record.height || record.height <= 0) {
this.$alert(`${i + 1}栈板高度必须大于0!`, '错误', {
this.$alert(`栈板高度必须大于0!`, '错误', {
confirmButtonText: '确定'
})
return false
@ -2763,7 +2303,7 @@
site: this.currentRow.site,
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
palletRecords: JSON.stringify(this.palletMaintenanceRecords),
palletRecords: JSON.stringify(validPalletRecords),
}
// 使APImaintenanceOnly
@ -2784,6 +2324,10 @@
}
})
},
},
activated() {
this.searchTable()
@ -2800,4 +2344,44 @@
font-size: 12px;
height: 24px;
}
/* 对话框标题样式 */
.dialog-title {
display: flex;
align-items: center;
font-size: 16px;
font-weight: 500;
}
.dialog-title .el-icon-question:hover {
color: #66b1ff;
transform: scale(1.1);
transition: all 0.3s ease;
}
/* 表格头部提示图标样式 */
/deep/ .el-table th .el-icon-question:hover {
color: #409EFF;
transform: scale(1.1);
transition: all 0.2s ease;
}
/* 提示框内容样式 */
/deep/ .el-tooltip__popper {
max-width: 300px;
}
/deep/ .el-tooltip__popper .el-tooltip__content {
line-height: 1.6;
}
/deep/ .el-tooltip__popper .el-tooltip__content div {
margin-bottom: 4px;
}
/deep/ .el-tooltip__popper .el-tooltip__content div:first-child {
font-weight: bold;
margin-bottom: 8px;
color: #409EFF;
}
</style>

512
src/views/modules/ecss/components/PackingDetailTab.vue

@ -0,0 +1,512 @@
<template>
<div class="packing-detail-tab">
<el-table
:data="dataListBoxes"
:max-height="height * 1.5"
border
v-loading="dataListLoading"
style="width: 100%;"
:expand-row-keys="expandedBoxRows"
:row-key="getBoxRowKey"
@expand-change="handleBoxExpand">
<el-table-column type="expand">
<template slot-scope="props">
<!-- 加载状态 -->
<div v-if="props.row.loading" class="expand-loading">
<i class="el-icon-loading"></i>
<span>正在加载明细数据...</span>
</div>
<!-- 明细内容区域 -->
<div v-else class="expand-detail-container">
<!-- 明细表格 -->
<el-table
v-if="props.row.palletDetails && props.row.palletDetails.length > 0"
:data="props.row.palletDetails"
:max-height="300"
size="mini"
stripe
class="expand-detail-table">
<el-table-column
v-for="(item,index) in columnList3" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">
{{ formatDetailValue(scope.row[item.columnProp], item.columnProp) }}
</span>
<span v-if="item.columnImage">
<img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/>
</span>
</template>
</el-table-column>
</el-table>
<!-- 空数据状态 -->
<div v-else class="expand-empty-state">
<i class="el-icon-box"></i>
<p>暂无明细数据</p>
<span>该栈板下暂时没有装箱明细信息</span>
</div>
</div>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnListBoxes" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { selectBoxList, searchCoDelPalletDataNew } from "@/api/ecss/ecss.js"
export default {
name: "PackingDetailTab",
props: {
currentRow: {
type: Object,
default: () => ({})
},
height: {
type: Number,
default: 200
}
},
data() {
return {
dataListBoxes: [], //
expandedBoxRows: [], //
dataListLoading: false,
//
columnList3: [
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3ItemNo',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "itemNo",
headerAlign: "center",
align: "right",
columnLabel: "序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3PoNo',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "poNo",
headerAlign: "center",
align: "left",
columnLabel: "PO",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3PN',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "pn",
headerAlign: "center",
align: "left",
columnLabel: "PN",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3Qty',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "qty",
headerAlign: "center",
align: "right",
columnLabel: "数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3Rolls',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "rolls",
headerAlign: "center",
align: "right",
columnLabel: "Rolls",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
],
//
columnListBoxes: [
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3ItemNo',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "item_no",
headerAlign: "center",
align: "right",
columnLabel: "序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002Table3BoxQty',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "box_qty",
headerAlign: "center",
align: "right",
columnLabel: "箱数",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002TableGrossWeight',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "grossWeight",
headerAlign: "center",
align: "right",
columnLabel: "毛重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801002,
serialNumber: '801002TableNetWeight',
tableId: "801002Table3",
tableName: "装箱明细",
columnProp: "netWeight",
headerAlign: "center",
align: "right",
columnLabel: "净重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
]
}
},
watch: {
currentRow: {
handler(newVal) {
if (newVal && newVal.site) {
this.loadBoxList();
}
},
deep: true,
immediate: true
}
},
methods: {
//
loadBoxList() {
if (!this.currentRow || !this.currentRow.site) {
this.dataListBoxes = [];
return;
}
//
this.expandedBoxRows = [];
this.dataListLoading = true;
// ecss_CoDelBoxList
selectBoxList(this.currentRow).then(({data}) => {
if (data && data.code == 0) {
this.dataListBoxes = data.rows.map(row => ({
...row,
palletDetails: [], //
loading: false //
}))
} else {
this.dataListBoxes = [];
}
}).catch(error => {
console.error('加载箱数据失败:', error);
this.dataListBoxes = [];
}).finally(() => {
this.dataListLoading = false;
});
},
//
getBoxRowKey(row) {
// 使
return `${row.item_no || ''}_${row.palletRemark || ''}_${row.box_qty || ''}`;
},
//
handleBoxExpand(row, expandedRows) {
//
this.expandedBoxRows = expandedRows.map(expandedRow => this.getBoxRowKey(expandedRow));
if (expandedRows.includes(row)) {
//
this.loadPalletDetails(row);
}
},
//
loadPalletDetails(boxRow) {
if (boxRow.palletDetails && boxRow.palletDetails.length > 0) {
//
return;
}
//
this.$set(boxRow, 'loading', true);
//
let detailParams = {
site: this.currentRow.site,
buNo: this.currentRow.buNo,
delNo: this.currentRow.delNo,
seqNo: boxRow.item_no,
palletRemark: boxRow.palletRemark
};
// API
searchCoDelPalletDataNew(detailParams).then(({data}) => {
if (data && data.code == 0) {
//
this.$set(boxRow, 'palletDetails', data.rows);
} else {
this.$set(boxRow, 'palletDetails', []);
}
}).catch(error => {
console.error('加载栈板明细数据失败:', error);
this.$set(boxRow, 'palletDetails', []);
}).finally(() => {
//
this.$set(boxRow, 'loading', false);
});
},
//
formatDetailValue(value, columnProp) {
if (value === null || value === undefined || value === '') {
return '-';
}
//
if (columnProp === 'qty' || columnProp === 'rolls') {
return parseInt(value).toLocaleString();
}
return value;
},
//
refresh() {
this.loadBoxList();
}
}
}
</script>
<style scoped>
.packing-detail-tab {
width: 100%;
}
/* 展开明细容器样式 */
.expand-detail-container {
background: #fafafa;
border-radius: 6px;
overflow: visible;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* 加载状态样式 */
.expand-loading {
text-align: center;
padding: 30px;
color: #666;
background: #fafafa;
margin: 8px 16px;
border-radius: 6px;
}
.expand-loading i {
font-size: 18px;
margin-right: 8px;
color: #409eff;
}
/* 明细表格样式 */
.expand-detail-table {
margin: 0;
border: none;
}
/deep/ .expand-detail-table .el-table__body-wrapper {
overflow-y: auto;
}
/deep/ .expand-detail-table .el-table__header {
background: #f8f9fa;
}
/deep/ .expand-detail-table .el-table__header th {
background: #eef7f0;
color: #333;
font-weight: 500;
border-bottom: 2px solid #e9ecef;
}
/deep/ .expand-detail-table .el-table__row:hover > td {
background-color: #f0f9ff;
}
/deep/ .expand-detail-table .el-table__row.el-table__row--striped {
background: #fbfcfd;
}
/deep/ .expand-detail-table .el-table__row.el-table__row--striped:hover > td {
background-color: #f0f9ff;
}
/* 空数据状态样式 */
.expand-empty-state {
text-align: center;
padding: 40px 20px;
color: #999;
}
.expand-empty-state i {
font-size: 48px;
color: #ddd;
margin-bottom: 12px;
display: block;
}
.expand-empty-state p {
font-size: 16px;
margin: 0 0 8px 0;
color: #666;
}
.expand-empty-state span {
font-size: 13px;
color: #999;
}
/* 响应式调整 */
@media (max-width: 768px) {
.expand-detail-container {
margin: 8px 8px;
padding: 6px;
}
}
/* 确保主表格容器的滚动行为 */
/deep/ .el-table__expanded-cell {
padding: 0 !important;
}
/deep/ .el-table__expand-column .cell {
padding: 0;
}
/* 确保表格滚动条正常显示 */
/deep/ .el-table .el-table__body-wrapper {
overflow-y: auto;
}
/deep/ .el-table__body-wrapper::-webkit-scrollbar {
width: 6px;
}
/deep/ .el-table__body-wrapper::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}
/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
</style>

301
src/views/modules/ecss/createDeclaration.vue

@ -132,30 +132,11 @@
</el-table>
</el-tab-pane>
<el-tab-pane label="装箱明细" name="pallet">
<el-table
:data="dataList3"
:height="height"
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
v-for="(item,index) in columnList3" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<packing-detail-tab
ref="packingDetailTab"
:current-row="currentRow"
:height="height">
</packing-detail-tab>
</el-tab-pane>
</el-tabs>
<el-dialog title="创建报关单" :close-on-click-modal="false" v-drag :visible.sync="declarationFlag" width="1100px">
@ -497,6 +478,7 @@
<script>
import {} from "@/api/sysLanguage.js"
import PackingDetailTab from "./components/PackingDetailTab.vue";
import {
searchEcssCoDelNotifyHeaderForDanZheng,
searchEcssCoDelNotifyDetail,
@ -509,7 +491,7 @@
export default {
name: "null",
components:{
PackingDetailTab,
},
data() {
return {
@ -520,7 +502,6 @@
buList:[],
dataList:[],
dataList2:[],
dataList3:[],
detailList:[],
dataListLoading: false,
searchData: {
@ -1226,260 +1207,7 @@
columnWidth: 300
},
],
columnList3:[
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3ItemNo',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "itemNo",
headerAlign: "center",
align: "right",
columnLabel: "序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3PalletRemark',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "palletRemark",
headerAlign: "center",
align: "left",
columnLabel: "栈板码",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3PalletQty',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "palletQty",
headerAlign: "center",
align: "right",
columnLabel: "托数",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 40
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3PoNo',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "poNo",
headerAlign: "center",
align: "left",
columnLabel: "PO",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3PN',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "pn",
headerAlign: "center",
align: "left",
columnLabel: "PN",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Qty',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "qty",
headerAlign: "center",
align: "right",
columnLabel: "数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3BoxQty',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "boxQty",
headerAlign: "center",
align: "right",
columnLabel: "箱数",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Rolls',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "rolls",
headerAlign: "center",
align: "right",
columnLabel: "Rolls",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Length',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "length",
headerAlign: "center",
align: "right",
columnLabel: "长(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Width',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "width",
headerAlign: "center",
align: "right",
columnLabel: "宽(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Height',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "height",
headerAlign: "center",
align: "right",
columnLabel: "高(M)",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001Table3Volume',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "volume",
headerAlign: "center",
align: "right",
columnLabel: "体积",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001TableGrossWeight',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "grossWeight",
headerAlign: "center",
align: "right",
columnLabel: "毛重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
{
userId: this.$store.state.user.name,
functionId: 801001,
serialNumber: '801001TableNetWeight',
tableId: "801001Table3",
tableName: "装箱明细",
columnProp: "netWeight",
headerAlign: "center",
align: "right",
columnLabel: "净重",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 50
},
],
currentRow:{},
// start
exportData: [],
@ -1604,15 +1332,10 @@
});
}
if(this.activeName==='pallet'){
searchCoDelPalletDataNew(this.currentRow).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList3 = data.rows
} else {
this.dataList3 = [];
}
});
//
if (this.$refs.packingDetailTab) {
this.$refs.packingDetailTab.refresh();
}
}
},
tabClick (tab, event) {

188
src/views/modules/ecss/pallet_upload_excel.vue

@ -1,10 +1,10 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="450px" class="customer-dialog" @close="deleteFile">
<el-dialog :title="titleCon" :close-on-click-modal="false" :visible.sync="visible" width="380px" class="customer-dialog" @close="deleteFile">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-form-item label="BU">
<el-select v-model="pageData.buNo" placeholder="请选择" disabled style="width: 130px">
<el-select v-model="pageData.buNo" placeholder="请选择" disabled style="width: 110px">
<el-option
v-for = "i in buList"
:key = "i.buNo"
@ -14,7 +14,7 @@
</el-select>
</el-form-item>
<el-form-item :label="'CMC Invoice:'">
<el-input v-model="pageData.cmcInvoice" disabled style="width: 140px"></el-input>
<el-input v-model="pageData.cmcInvoice" disabled style="width: 110px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="exportExcel()">下载文件模板</el-button>
@ -24,21 +24,25 @@
<!-- 栈板托数记录 -->
<div style="margin: 15px 0;">
<div style="margin-bottom: 10px;">
<span style="font-weight: bold; margin-right: 10px;">栈板记录:</span>
<el-button type="primary" size="small" @click="addPalletRecord">添加行</el-button>
<span >栈板记录:</span>
<el-tooltip effect="dark" placement="top">
<div slot="content">
<div>栈板维护功能说明</div>
<div> 系统会自动加载当前BU下的所有栈板</div>
<div> 栈板高度单位为米(M)请输入准确数值</div>
<div> 只有托数大于0的栈板记录才会被保存</div>
</div>
<i class="el-icon-question" style="color: #17b3a3; margin-left: 8px; cursor: pointer; font-size: 16px;"></i>
</el-tooltip>
</div>
<el-table :data="palletRecords" border style="width: 100%; margin-bottom: 15px;" class="zxClass"
max-height="200" v-if="palletRecords.length > 0">
<el-table-column label="栈板" min-width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.pallet" disabled style="width: 100%;">
<template slot="append">
<el-button @click="selectPallet(scope.$index)" size="mini" type="primary">选择</el-button>
</template>
</el-input>
<el-input v-model="scope.row.pallet" disabled style="width: 100%;"></el-input>
</template>
</el-table-column>
<el-table-column label="栈板高度(M)" width="90">
<el-table-column label="栈板高度(M)" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.height" type="text" placeholder="请输入高度" style="width: 100%;"></el-input>
</template>
@ -48,20 +52,15 @@
<el-input v-model="scope.row.palletQty" type="text" placeholder="请输入托数" style="width: 100%;"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="40">
<template slot-scope="scope">
<a type="text" size="mini" @click="removePalletRecord(scope.$index)">删除</a>
</template>
</el-table-column>
</el-table>
<div v-if="palletRecords.length === 0" style="text-align: center; color: #999; padding: 20px; border: 1px dashed #ddd;">
暂无栈板记录请点击"添加行"按钮添加
正在加载栈板记录...
</div>
</div>
<!-- 文件上传区域 -->
<div style="margin: 15px 0;">
<div style="font-weight: bold; margin-bottom: 10px;">文件上传:</div>
<div style="margin-bottom: 10px;">文件上传:</div>
<el-upload class="customer-upload" drag action="javascript:void(0);" ref="uploadFile" :limit="1" accept=".xlsx,.xls"
:before-upload="beforeUploadHandle" :on-change="onChange" :auto-upload="false" style="text-align: left;">
<i class="el-icon-upload"></i>
@ -74,66 +73,7 @@
</span>
</el-dialog>
<!-- 栈板选择弹窗 -->
<el-dialog title="栈板" @close="closePalletDialog" @open="openPalletDialog" :visible.sync="palletFlag" width="559px" v-drag>
<el-form inline="inline" label-position="top" :model="palletData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="栈板类型">
<el-input v-model="palletData.palletType" clearable style="width: 110px"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" style="padding: 3px 12px" @click="searchPalletList()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="palletList"
stripe
highlight-current-row
border
@row-dblclick="palletRowDblclick"
style="width: 100%;">
<el-table-column
prop="palletNo"
header-align="center"
align="center"
width="120"
label="栈板编码">
</el-table-column>
<el-table-column
prop="palletType"
header-align="center"
align="center"
label="栈板类型">
</el-table-column>
<el-table-column
prop="applicationArea"
header-align="center"
align="center"
label="应用环境">
</el-table-column>
<el-table-column
prop="length"
header-align="center"
align="center"
label="长(M)">
</el-table-column>
<el-table-column
prop="width"
header-align="center"
align="center"
label="宽(M)">
</el-table-column>
<el-table-column
prop="height"
header-align="center"
align="center"
label="栈板高(M)">
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button @click="palletFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
@ -161,11 +101,6 @@
},
//
palletRecords: [],
//
palletFlag: false,
palletList: [],
palletData: {},
currentPalletIndex: -1, //
// start
exportData: [],
exportName: '装箱数据导入模版',
@ -299,12 +234,8 @@
createBy: this.$store.state.user.name,
}
//
this.palletRecords.push({
pallet: '',
palletQty: '',
height: ''
})
// buNo
this.loadAllPallets()
//
this.visible = true
@ -348,19 +279,20 @@
return false
}
//
for (let i = 0; i < this.palletRecords.length; i++) {
const record = this.palletRecords[i]
// 0
const validPalletRecords = this.palletRecords.filter(record => {
return record.palletQty && parseFloat(record.palletQty) > 0
})
//
for (let i = 0; i < validPalletRecords.length; i++) {
const record = validPalletRecords[i]
if (!record.pallet) {
this.$message.error(`${i + 1}行栈板不能为空!`)
return false
}
if (!record.palletQty || record.palletQty <= 0) {
this.$message.error(`${i + 1}行托数必须大于0!`)
this.$message.error(`栈板不能为空!`)
return false
}
if (!record.height || record.height <= 0) {
this.$message.error(`${i + 1}栈板高度必须大于0!`)
this.$message.error(`栈板高度必须大于0!`)
return false
}
}
@ -373,8 +305,8 @@
formData.append("walMartOrderFlag",this.pageData.walMartOrderFlag)
formData.append("username",this.$store.state.user.name)
formData.append("file", this.fileList[0].raw)
//
formData.append("palletRecords", JSON.stringify(this.palletRecords))
// 0
formData.append("palletRecords", JSON.stringify(validPalletRecords))
// formData.append("createBy", this.pageData.createBy)
saveCoDelPalletDataByExcel(formData).then(({data}) => {
if (data.code === 0) {
@ -468,54 +400,34 @@
return s
},
//
addPalletRecord() {
this.palletRecords.push({
pallet: '',
palletQty: '',
height: ''
})
console.log('添加栈板记录:', this.palletRecords)
},
removePalletRecord(index) {
this.palletRecords.splice(index, 1)
},
selectPallet(index) {
console.log('选择栈板,索引:', index)
this.currentPalletIndex = index
this.palletFlag = true
},
openPalletDialog() {
this.palletData = {}
this.searchPalletList()
},
closePalletDialog() {
this.palletData = {}
this.palletList = []
},
searchPalletList() {
// buNo
loadAllPallets() {
let searchData = {
palletType: this.palletData.palletType || '',
palletType: '', //
buNo: this.pageData.buNo
}
searchPalletList(searchData).then(({data}) => {
if (data.code === 0) {
this.palletList = data.rows || []
const pallets = data.rows || []
//
this.palletRecords = pallets.map(pallet => ({
pallet: pallet.palletNo,
palletQty: '', //
height: '' // 使
}))
}
}).catch(error => {
console.error('加载栈板列表失败:', error)
//
this.palletRecords = [{
pallet: '',
palletQty: '',
height: ''
}]
})
},
palletRowDblclick(row) {
if (this.currentPalletIndex >= 0) {
this.palletRecords[this.currentPalletIndex].pallet = row.palletNo
}
this.palletFlag = false
},
}
}
</script>

Loading…
Cancel
Save