Browse Source

生产查询

master
常熟吴彦祖 4 months ago
parent
commit
b3bc038622
  1. 2
      src/api/boxManage/boxManage.js
  2. 1
      src/api/qc/outbound_notification.js
  3. 91
      src/views/modules/boxManage/com_saleBoxManage_boxing.vue
  4. 108
      src/views/modules/boxManage/saleBoxManage.vue

2
src/api/boxManage/boxManage.js

@ -8,3 +8,5 @@ export const searchBoxDetail = data => createAPI('/boxForNotification/searchBoxD
export const deleteSoReceiveBoxesData= data => createAPI('/boxForNotification/deleteSoReceiveBoxesData','post',data) export const deleteSoReceiveBoxesData= data => createAPI('/boxForNotification/deleteSoReceiveBoxesData','post',data)
export const updateBoxStatus= data => createAPI('/boxForNotification/updateBoxStatus','post',data) export const updateBoxStatus= data => createAPI('/boxForNotification/updateBoxStatus','post',data)
export const scanBoxRoll= data => createAPI('/boxForNotification/scanBoxRoll','post',data) export const scanBoxRoll= data => createAPI('/boxForNotification/scanBoxRoll','post',data)
export const deleteBoxRoll= data => createAPI('/boxForNotification/deleteBoxRoll','post',data)
export const searchRollForOrderNo= data => createAPI('/boxForNotification/searchRollForOrderNo','post',data)

1
src/api/qc/outbound_notification.js

@ -15,6 +15,7 @@ export const issueOutboundNotification = data => createAPI('/outbound/issueOutbo
// 查询拣货出库单明细 // 查询拣货出库单明细
export const getOutboundDetail = data => createAPI('/outbound/getOutboundDetail','post',data) export const getOutboundDetail = data => createAPI('/outbound/getOutboundDetail','post',data)
export const getOutboundDetailWithRoll = data => createAPI('/outbound/getOutboundDetailWithRoll','post',data)
// 新增拣货出库单明细 // 新增拣货出库单明细
export const saveOutboundDetail = data => createAPI('/outbound/saveOutboundDetail','post',data) export const saveOutboundDetail = data => createAPI('/outbound/saveOutboundDetail','post',data)
// 查物料 // 查物料

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

@ -18,7 +18,8 @@
width="150" width="150"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<a type="text" size="small" @click="boxModelOpen(scope.row)">装箱</a>
<a type="text" size="small" v-if="scope.row.status!=='未封箱'" @click="boxModelOpen(scope.row)">查看</a>
<a type="text" size="small" v-if="scope.row.status!=='已封箱'"@click="boxModelOpen(scope.row)">装箱</a>
<a type="text" size="small" v-if="scope.row.status==='未封箱'" @click="fengxiang(scope.row)">封箱</a> <a type="text" size="small" v-if="scope.row.status==='未封箱'" @click="fengxiang(scope.row)">封箱</a>
<a type="text" size="small" v-if="scope.row.status==='已封箱'" @click="chaixiang(scope.row)">拆箱</a> <a type="text" size="small" v-if="scope.row.status==='已封箱'" @click="chaixiang(scope.row)">拆箱</a>
<a type="text" size="small" v-if="scope.row.status!=='已封箱'" @click="deleteBox(scope.row)">删除</a> <a type="text" size="small" v-if="scope.row.status!=='已封箱'" @click="deleteBox(scope.row)">删除</a>
@ -43,7 +44,7 @@
</el-table> </el-table>
<el-dialog title="卷清单" :visible.sync="boxModelFlag" width="700px" @close="searchTable" style="margin-top: 7px" v-drag :close-on-click-modal="false"> <el-dialog title="卷清单" :visible.sync="boxModelFlag" width="700px" @close="searchTable" style="margin-top: 7px" v-drag :close-on-click-modal="false">
<el-form inline="inline" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-form class="sl" inline="inline" label-position="top" style="margin-left: 7px;margin-top: -5px;">
<el-row> <el-row>
<el-form-item label="销售发货单号"> <el-form-item label="销售发货单号">
<el-input v-model="boxData.orderNo" disabled style="width: 130px"></el-input> <el-input v-model="boxData.orderNo" disabled style="width: 130px"></el-input>
@ -54,8 +55,22 @@
<el-form-item label="所在仓库"> <el-form-item label="所在仓库">
<el-input v-model="boxData.wareHouseID" disabled style="width: 130px"></el-input> <el-input v-model="boxData.wareHouseID" disabled style="width: 130px"></el-input>
</el-form-item> </el-form-item>
</el-row>
<el-row v-if="!scanDisabled">
<el-form-item label="扫描装箱"> <el-form-item label="扫描装箱">
<el-input v-model="scanRollNo" ref="scanRollNo" @keyup.enter.native="handleScanEnter" style="width: 200px"></el-input>
<el-input v-model="scanRollNo" ref="scanRollNo" :disabled="scanDisabled" @keyup.enter.native="handleBoxAction" style="width: 200px"></el-input>
</el-form-item>
<!-- <el-form-item label="操作类型">-->
<!-- <el-radio-group v-model="boxActionType" size="small">-->
<!-- <el-radio-button label="add">添加</el-radio-button>-->
<!-- <el-radio-button label="delete">删除</el-radio-button>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="操作类型" >
<el-radio-group v-model="boxActionType" >
<el-radio label="add" border>添加</el-radio>
<el-radio label="delete" border>删除</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
@ -65,6 +80,13 @@
stripe stripe
border border
style="width: 100%;"> style="width: 100%;">
<el-table-column
prop="orderId"
header-align="center"
align="center"
min-width="60"
label="序号">
</el-table-column>
<el-table-column <el-table-column
prop="finalRollNo" prop="finalRollNo"
header-align="center" header-align="center"
@ -89,14 +111,14 @@
<el-table-column <el-table-column
prop="receivedDate" prop="receivedDate"
header-align="center" header-align="center"
align="right"
align="center"
min-width="100" min-width="100"
label="装箱日期"> label="装箱日期">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="receivedBy" prop="receivedBy"
header-align="center" header-align="center"
align="right"
align="left"
min-width="100" min-width="100"
label="装箱人"> label="装箱人">
</el-table-column> </el-table-column>
@ -112,6 +134,7 @@
<script> <script>
import { import {
deleteBoxRoll,
deleteSoReceiveBoxesData, deleteSoReceiveBoxesData,
newSoReceiveBoxesData, scanBoxRoll, newSoReceiveBoxesData, scanBoxRoll,
searchBoxDetail, searchBoxDetail,
@ -135,6 +158,7 @@ export default {
page: 1, page: 1,
limit: 1000 limit: 1000
}, },
scanDisabled: false,
dataListLoading: false, dataListLoading: false,
currentRow:'', currentRow:'',
columnList: [ columnList: [
@ -266,6 +290,7 @@ export default {
}, },
], ],
modelList:[], modelList:[],
rollList:[],
boxData:{ boxData:{
site:'', site:'',
orderNo:'', orderNo:'',
@ -276,7 +301,7 @@ export default {
}, },
scanRollNo:'', scanRollNo:'',
boxModelFlag: false, boxModelFlag: false,
boxActionType: 'add', // /
} }
}, },
methods: { methods: {
@ -326,6 +351,7 @@ export default {
console.log(data2) console.log(data2)
this.searchBox(data2) this.searchBox(data2)
this.boxModelFlag = true this.boxModelFlag = true
this.boxActionType='add'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.scanRollNo.focus(); this.$refs.scanRollNo.focus();
}); });
@ -344,8 +370,14 @@ export default {
buNo: row.buNo, buNo: row.buNo,
} }
this.searchBox(inData) this.searchBox(inData)
if(row.status==='未封箱'){
this.scanDisabled=false
}else {
this.scanDisabled = true
}
this.scanRollNo='' this.scanRollNo=''
this.boxModelFlag = true this.boxModelFlag = true
this.boxActionType='add'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.scanRollNo.focus(); this.$refs.scanRollNo.focus();
}); });
@ -421,7 +453,7 @@ export default {
}) })
}, },
handleScanEnter() {
handleBoxAction() {
const arr = this.scanRollNo.split(';'); const arr = this.scanRollNo.split(';');
if (arr.length < 3) { if (arr.length < 3) {
this.$message.error('扫描的标签格式不正确!'); this.$message.error('扫描的标签格式不正确!');
@ -433,6 +465,7 @@ export default {
finalRollNo: arr[2], finalRollNo: arr[2],
boxNo: this.boxData.boxNo, boxNo: this.boxData.boxNo,
}; };
if(this.boxActionType==='add'){
scanBoxRoll(inData).then(({data}) => { scanBoxRoll(inData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success('扫描成功'); this.$message.success('扫描成功');
@ -459,7 +492,45 @@ export default {
this.$refs.scanRollNo.focus(); this.$refs.scanRollNo.focus();
}); });
}); });
}else {
deleteBoxRoll(inData).then(({data}) => {
if (data && data.code === 0) {
this.$message.success('扫描成功');
this.searchBox({
site: this.boxData.site,
boxNo: this.boxData.boxNo,
buNo: this.boxData.buNo,
});
this.scanRollNo = '';
this.$nextTick(() => {
this.$refs.scanRollNo.focus();
});
} else {
this.$message.error(data.msg || '扫描失败');
this.scanRollNo = '';
this.$nextTick(() => {
this.$refs.scanRollNo.focus();
});
}
}).catch(() => {
this.$message.error('网络异常,扫描失败');
this.scanRollNo = '';
this.$nextTick(() => {
this.$refs.scanRollNo.focus();
});
});
}
}
},
watch: {
boxActionType() {
this.$nextTick(() => {
if (this.$refs.scanRollNo) {
this.$refs.scanRollNo.focus();
}
});
} }
}, },
} }
@ -474,5 +545,9 @@ export default {
/deep/ .el-table__fixed-right-patch { /deep/ .el-table__fixed-right-patch {
display: none !important; display: none !important;
} }
.sl .el-radio--medium.is-bordered {
padding: 2px 5px 0px 5px;
border-radius: 4px;
height: 20px;
}
</style> </style>

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

@ -104,6 +104,64 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="已扫描卷" name="rollDetail">
<el-table
:data="rollList"
:height="height - 20"
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="finalRollNo"
header-align="center"
align="center"
min-width="100"
label="卷号">
</el-table-column>
<el-table-column
prop="partNo"
header-align="center"
align="left"
min-width="100"
label="物料编码">
</el-table-column>
<el-table-column
prop="rollQty"
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-tab-pane>
</el-tabs> </el-tabs>
@ -118,7 +176,12 @@
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 {getOutboundDetail, searchOutboundNotification} from '../../../api/qc/outbound_notification'
import {
getOutboundDetail,
getOutboundDetailWithRoll,
searchOutboundNotification
} from '../../../api/qc/outbound_notification'
import {searchRollForOrderNo} from '../../../api/boxManage/boxManage'
export default { export default {
@ -144,6 +207,7 @@ export default {
pageSize: 50, pageSize: 50,
totalPage: 0, totalPage: 0,
tagNo:'', tagNo:'',
rollList:[],
mainDataList:[], mainDataList:[],
detailList:[], detailList:[],
dataListLoading: false, dataListLoading: false,
@ -337,6 +401,32 @@ export default {
fixed: '', fixed: '',
columnWidth: 100, columnWidth: 100,
}, },
{
columnProp: 'rollQty',
headerAlign: "center",
align: "right",
columnLabel: '已扫描数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{
columnProp: 'unScanQty',
headerAlign: "center",
align: "right",
columnLabel: '未扫描数量',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100,
},
{ {
columnProp: 'unit', columnProp: 'unit',
headerAlign: "center", headerAlign: "center",
@ -417,7 +507,9 @@ export default {
if(this.activeName==='outboundDetail'){ if(this.activeName==='outboundDetail'){
this.refreshDetailTable(); this.refreshDetailTable();
} }
if(this.activeName==='rollDetail'){
this.refreshRollsTable();
}
}, },
async exportExcel() { async exportExcel() {
this.searchData.limit = -1 this.searchData.limit = -1
@ -449,10 +541,20 @@ export default {
buNo: this.currentRow.buNo, buNo: this.currentRow.buNo,
orderNo: this.currentRow.orderNo, orderNo: this.currentRow.orderNo,
} }
getOutboundDetail(templateData).then(({data}) => {
getOutboundDetailWithRoll(templateData).then(({data}) => {
this.detailList = data.rows this.detailList = data.rows
}) })
}, },
refreshRollsTable(){
let templateData = {
site: this.currentRow.site,
buNo: this.currentRow.buNo,
orderNo: this.currentRow.orderNo,
}
searchRollForOrderNo(templateData).then(({data}) => {
this.rollList = data.rows
})
},
}, },
created() { created() {
// //

Loading…
Cancel
Save