Browse Source

2025-10-30

销售发货装箱增加托清单
master
fengyuan_yang 2 months ago
parent
commit
1ebed825b9
  1. 9
      src/api/boxManage/boxManage.js
  2. 1
      src/views/modules/boxManage/com_saleBoxManage_boxing.vue
  3. 491
      src/views/modules/boxManage/com_saleBoxManage_pallet.vue
  4. 56
      src/views/modules/boxManage/saleBoxManage.vue

9
src/api/boxManage/boxManage.js

@ -22,3 +22,12 @@ export const searchOutboundNotificationWithDetail = data => createAPI('/boxForNo
// 更新出库通知单状态 // 更新出库通知单状态
export const updateOrderStatus = data => createAPI('/boxForNotification/updateOrderStatus','post',data) export const updateOrderStatus = data => createAPI('/boxForNotification/updateOrderStatus','post',data)
// ==================== 托清单相关接口 ====================
export const searchPalletList = data => createAPI('/boxForNotification/searchPalletList','post',data)
export const newPallet = data => createAPI('/boxForNotification/newPallet','post',data)
export const searchPalletDetail = data => createAPI('/boxForNotification/searchPalletDetail','post',data)
export const deletePallet = data => createAPI('/boxForNotification/deletePallet','post',data)
export const updatePalletStatus = data => createAPI('/boxForNotification/updatePalletStatus','post',data)
export const scanPalletBox = data => createAPI('/boxForNotification/scanPalletBox','post',data)
export const deletePalletBox = data => createAPI('/boxForNotification/deletePalletBox','post',data)

1
src/views/modules/boxManage/com_saleBoxManage_boxing.vue

@ -353,7 +353,6 @@ export default {
boxNo: data.boxNo, boxNo: data.boxNo,
buNo: this.searchData.buNo, buNo: this.searchData.buNo,
} }
console.log(data2)
this.searchBox(data2) this.searchBox(data2)
this.boxModelFlag = true this.boxModelFlag = true
this.boxActionType='add' this.boxActionType='add'

491
src/views/modules/boxManage/com_saleBoxManage_pallet.vue

@ -0,0 +1,491 @@
<template>
<div class="customer-css">
<el-form label-position="top" style="margin-top: 1px; margin-left: 0px;">
<el-form-item >
<el-button type="primary" @click="searchTable()">查询</el-button>
<el-button v-if="searchData.orderStatus === '待包装'" type="primary" @click="newPallet()">新增托</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
:height=searchData.height
border
v-loading="dataListLoading"
style="width: 100%; ">
<el-table-column
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" v-if="scope.row.status==='已封托'" @click="palletModelOpen(scope.row)">查看</a>
<template v-if="searchData.orderStatus === '待包装'">
<a type="text" size="small" v-if="scope.row.status!=='已封托'" @click="palletModelOpen(scope.row)">装托</a>
<a type="text" size="small" v-if="scope.row.status==='未封托'" @click="fengTuo(scope.row)">封托</a>
<a type="text" size="small" v-if="scope.row.status==='已封托'" @click="chaiTuo(scope.row)">拆托</a>
<a type="text" size="small" v-if="scope.row.status!=='已封托'" @click="deletePallet(scope.row)">删除</a>
</template>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in columnList" :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-dialog title="箱清单" :visible.sync="palletModelFlag" width="700px" @close="searchTable" style="margin-top: 7px" v-drag :close-on-click-modal="false">
<el-form class="sl" inline="inline" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row>
<el-form-item label="销售发货单号">
<el-input v-model="palletData.orderNo" disabled style="width: 130px"></el-input>
</el-form-item>
<el-form-item label="托盘号">
<el-input v-model="palletData.palletNo" disabled style="width: 130px"></el-input>
</el-form-item>
</el-row>
<el-row v-if="!scanDisabled">
<el-form-item label="扫描装托">
<el-input v-model="scanBoxNo" ref="scanBoxNo" :disabled="scanDisabled" @keyup.enter.native="handlePalletAction" style="width: 200px"></el-input>
</el-form-item>
<el-form-item label="操作类型" >
<el-radio-group v-model="palletActionType" >
<el-radio label="add" border>添加</el-radio>
<el-radio label="delete" border>删除</el-radio>
</el-radio-group>
</el-form-item>
</el-row>
</el-form>
<el-table
:height="300"
:data="modelList"
stripe
border
style="width: 100%;">
<el-table-column
prop="orderId"
header-align="center"
align="center"
min-width="60"
label="序号">
</el-table-column>
<el-table-column
prop="boxNo"
header-align="center"
align="center"
min-width="100"
label="箱号">
</el-table-column>
<el-table-column
prop="boxesQty"
header-align="center"
align="right"
min-width="100"
label="数量">
</el-table-column>
<el-table-column
prop="receivedDate"
header-align="center"
align="center"
min-width="100"
label="装托日期">
</el-table-column>
<el-table-column
prop="receivedBy"
header-align="center"
align="left"
min-width="100"
label="装托人">
</el-table-column>
</el-table>
<el-footer style="height:40px;margin-top: 25px;text-align:center">
<el-button @click="palletModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
</div>
</template>
<script>
import {
deletePallet,
newPallet,
scanPalletBox,
searchPalletDetail,
searchPalletList,
updatePalletStatus,
deletePalletBox
} from '../../../api/boxManage/boxManage'
export default {
components: {
},
data() {
return {
dataList: [],
searchData: {
site: '',
username: '',
buNo: '',
orderNo: '',
palletType: '',
orderStatus: '',
height:'300',
page: 1,
limit: 1000
},
scanDisabled: false,
dataListLoading: false,
currentRow:'',
columnList: [
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750002Table2PalletNo',
tableId: "750002Table2",
tableName: "托清单",
columnProp: "palletNo",
headerAlign: "center",
align: "left",
columnLabel: "托盘标签",
columnWidth: '120',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750002Table2Status',
tableId: "750002Table2",
tableName: "托清单",
columnProp: "status",
headerAlign: "center",
align: "center",
columnLabel: "状态",
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750002Table2BoxesQty',
tableId: "750002Table2",
tableName: "托清单",
columnProp: "boxesQty",
headerAlign: "center",
align: "right",
columnLabel: "箱数",
columnWidth: '80',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750002Table2CreatedBy',
tableId: "750002Table2",
tableName: "托清单",
columnProp: "createdBy",
headerAlign: "center",
align: "left",
columnLabel: "创建人",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: this.functionId,
serialNumber: '750002Table2CreatedDate',
tableId: "750002Table2",
tableName: "托清单",
columnProp: "createdDate",
headerAlign: "center",
align: "left",
columnLabel: "创建时间",
columnWidth: '100',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
modelList:[],
palletData:{
site:'',
orderNo:'',
palletNo:'',
buNo:'',
boxesQty: 0,
},
scanBoxNo:'',
palletModelFlag: false,
palletActionType: 'add', // /
}
},
methods: {
//
init(inData) {
//
this.searchData = JSON.parse(JSON.stringify(inData));
//
this.searchTable();
},
searchTable(){
searchPalletList(this.searchData).then(({data}) => {
//
if (data && data.code == 0) {
this.dataList = data.rows
} else {
this.dataList = [];
}
});
},
newPallet(){
this.$confirm(`确定为此销售发货单新建托?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let inData={
site: this.searchData.site,
createdBy: this.$store.state.user.name,
buNo: this.searchData.buNo,
orderNo: this.searchData.orderNo,
palletType: this.searchData.palletType,
status:'未封托',
boxesQty: 0,
}
newPallet(inData).then(({data}) => {
if (data && data.code == 0) {
this.$message.success( '操作成功')
this.searchTable();
let data2={
site: this.searchData.site,
palletNo: data.palletNo,
buNo: this.searchData.buNo,
}
this.searchPallet(data2)
this.palletModelFlag = true
this.palletActionType='add'
this.$nextTick(() => {
this.$refs.scanBoxNo.focus();
});
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
palletModelOpen(row){
let inData={
site: row.site,
palletNo: row.palletNo,
buNo: row.buNo,
}
this.searchPallet(inData)
if(row.status==='未封托'){
this.scanDisabled=false
}else {
this.scanDisabled = true
}
this.scanBoxNo=''
this.palletModelFlag = true
this.palletActionType='add'
this.$nextTick(() => {
this.$refs.scanBoxNo.focus();
});
},
searchPallet(inData){
searchPalletDetail(inData).then(({data}) => {
if (data && data.code == 0) {
this.modelList=data.rows
this.palletData=data.row
}
})
},
deletePallet(row){
this.$confirm(`确定删除此托?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let inData={
id: row.id,
}
deletePallet(inData).then(({data}) => {
if (data && data.code == 0) {
this.$message.success( '操作成功')
this.searchTable();
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
fengTuo(row){
this.$confirm(`确定封托?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let inData={
id: row.id,
status: '已封托'
}
updatePalletStatus(inData).then(({data}) => {
if (data && data.code == 0) {
this.$message.success( '操作成功')
this.searchTable();
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
chaiTuo(row){
this.$confirm(`确定拆托?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let inData={
id: row.id,
status: '未封托'
}
updatePalletStatus(inData).then(({data}) => {
if (data && data.code == 0) {
this.$message.success( '操作成功')
this.searchTable();
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
})
},
handlePalletAction(){
if(this.palletActionType==='add'){
this.addBoxToPallet()
}else{
this.deleteBoxFromPallet()
}
},
addBoxToPallet(){
if(!this.scanBoxNo){
this.$message.warning('请扫描箱号')
return
}
let inData={
site: this.palletData.site,
buNo: this.palletData.buNo,
palletNo: this.palletData.palletNo,
boxNo: this.scanBoxNo,
receivedBy: this.$store.state.user.name,
}
scanPalletBox(inData).then(({data}) => {
if (data && data.code == 0) {
this.$message.success('装托成功')
this.scanBoxNo=''
let data2={
site: this.palletData.site,
palletNo: this.palletData.palletNo,
buNo: this.palletData.buNo,
}
this.searchPallet(data2)
this.$refs.scanBoxNo.focus();
} else {
this.$message.error(data.msg)
this.scanBoxNo=''
this.$refs.scanBoxNo.focus();
}
})
},
deleteBoxFromPallet(){
if(!this.scanBoxNo){
this.$message.warning('请扫描箱号')
return
}
let inData={
site: this.palletData.site,
buNo: this.palletData.buNo,
palletNo: this.palletData.palletNo,
boxNo: this.scanBoxNo,
}
deletePalletBox(inData).then(({data}) => {
if (data && data.code == 0) {
this.$message.success('删除成功')
this.scanBoxNo=''
let data2={
site: this.palletData.site,
palletNo: this.palletData.palletNo,
buNo: this.palletData.buNo,
}
this.searchPallet(data2)
this.$refs.scanBoxNo.focus();
} else {
this.$message.error(data.msg)
this.scanBoxNo=''
this.$refs.scanBoxNo.focus();
}
})
},
}
}
</script>
<style scoped>
.rq .auto /deep/ .el-form-item__content{
height: auto;
line-height: 1.5;
}
/deep/ .el-table__fixed-right-patch {
display: none !important;
}
.sl .el-radio--medium.is-bordered {
padding: 2px 5px 0px 5px;
border-radius: 4px;
height: 20px;
}
</style>

56
src/views/modules/boxManage/saleBoxManage.vue

@ -150,6 +150,9 @@
<el-tab-pane label="箱清单" name="boxing"> <el-tab-pane label="箱清单" name="boxing">
<boxing ref="boxing"></boxing> <boxing ref="boxing"></boxing>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="托清单" name="pallet">
<pallet ref="pallet"></pallet>
</el-tab-pane>
<el-tab-pane label="已扫描卷" name="rollDetail"> <el-tab-pane label="已扫描卷" name="rollDetail">
<el-table <el-table
:data="rollList" :data="rollList"
@ -331,6 +334,7 @@
import excel from "@/utils/excel-util.js"; import excel from "@/utils/excel-util.js";
import boxing from "./com_saleBoxManage_boxing.vue" import boxing from "./com_saleBoxManage_boxing.vue"
import pallet from "./com_saleBoxManage_pallet.vue"
import { import {
searchRollForOrderNo, searchRollForOrderNo,
searchSoReceiveCasesData, searchSoReceiveCasesData,
@ -701,6 +705,7 @@ export default {
/*组件*/ /*组件*/
components: { components: {
boxing, boxing,
pallet
}, },
mounted() { mounted() {
@ -761,6 +766,9 @@ export default {
if(this.activeName==='boxing'){ if(this.activeName==='boxing'){
this.refreshBoxingTable(); this.refreshBoxingTable();
} }
if(this.activeName==='pallet'){
this.refreshPalletTable();
}
if(this.activeName==='rollDetail'){ if(this.activeName==='rollDetail'){
this.refreshRollsTable(); this.refreshRollsTable();
} }
@ -783,15 +791,47 @@ export default {
}); });
}, },
refreshBoxingTable(){ refreshBoxingTable(){
let inData={
site: this.currentRow.site,
buNo: this.currentRow.buNo,
orderNo: this.currentRow.orderNo,
boxType: this.currentRow.orderType,
height:Number(this.height)-25,
orderStatus: this.currentRow.orderStatus
//
if (!this.currentRow || !this.currentRow.orderNo) {
return;
} }
this.$refs.boxing.init(inData)
this.$nextTick(() => {
if (!this.$refs.boxing) {
return;
}
let inData={
site: this.currentRow.site,
buNo: this.currentRow.buNo,
orderNo: this.currentRow.orderNo,
boxType: this.currentRow.orderType,
height:Number(this.height)-25,
orderStatus: this.currentRow.orderStatus
}
this.$refs.boxing.init(inData)
})
},
refreshPalletTable(){
this.$nextTick(() => {
//
if (!this.$refs.pallet) {
return;
}
// init
if (typeof this.$refs.pallet.init !== 'function') {
return;
}
// 使
let inData={
site: this.currentRow ? this.currentRow.site : '',
buNo: this.currentRow ? this.currentRow.buNo : '',
orderNo: this.currentRow ? this.currentRow.orderNo : '',
palletType: this.currentRow ? this.currentRow.orderType : '',
height: Number(this.height)-25,
orderStatus: this.currentRow ? this.currentRow.orderStatus : ''
}
this.$refs.pallet.init(inData)
})
}, },
refreshRollsTable(){ refreshRollsTable(){
let templateData = { let templateData = {

Loading…
Cancel
Save