常熟吴彦祖 3 weeks ago
parent
commit
978d8ddfa5
  1. 1
      src/api/production/generateReport.js
  2. 4
      src/views/modules/Abnormal/AbnormalFeedBack.vue
  3. 156
      src/views/modules/production/shippingScan.vue

1
src/api/production/generateReport.js

@ -82,6 +82,7 @@ export const removeScanLabel = data=>createAPI('/board/removeScanLabel','post',d
export const scanLabel = data=>createAPI('/board/scanLabel','post',data);
export const checkIsPacking = data=>createAPI('/board/checkIsPacking','get',data);
export const searchOutboundLabelScanList = data=>createAPI('/outbound/label/list','post',data);
export const queryEarlierInboundBagList = data=>createAPI('/outbound/label/fifo/list','post',data);
export const getTCPPackagePrintDataList = data =>createAPI('/board/getTCPPackagePrintDataList','post',data)

4
src/views/modules/Abnormal/AbnormalFeedBack.vue

@ -193,14 +193,14 @@
fixed="right"
header-align="center"
align="center"
width="400"
width="360"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="printResponsibilityBook(scope.row)">导出责任书</a>
<a type="text" size="small" v-if="(searchData.userId==='admin'||searchData.userId==='E0002')&&scope.row.status!='已完结'" @click="updateModel(scope.row)">修改</a>
<a type="text" size="small" @click="getFileModel(scope.row)">整改文件</a>
<a type="text" size="small" @click="getDetailModel(scope.row)">查看</a>
<a type="text" size="small" @click="doPrint(scope.row)">打印</a>
<a type="text" size="small" @click="printResponsibilityBook(scope.row)">导出责任书</a>
<a type="text" size="small" v-if="scope.row.status!='已完结'" @click="getDetailModel2(scope.row)">紧急处理方式</a>
<a type="text" size="small" v-if="scope.row.status!='已完结'" @click="getDetailModel3(scope.row)">长久处理方式</a>
<a type="text" size="small" v-if="scope.row.status!='已录入'&&scope.row.status!='已完结'&&isAuth('sys:abnormal:close')" @click="closeFeedBack(scope.row)">结束</a>

156
src/views/modules/production/shippingScan.vue

@ -9,7 +9,7 @@ import dayjs from "dayjs";
import {Decimal} from "decimal.js";
import {finallyPrintBoxLabel, getPrintBoxLabel, getPrintBoxLabelHandle} from "../../../api/pad";
import {printOutBoxLabel} from "../print/print_outBox_label";
import {queryStandardWeight} from "../../../api/production/generateReport";
import {queryEarlierInboundBagList, queryStandardWeight} from "../../../api/production/generateReport";
export default {
name: "shippingScan",
components:{
@ -56,6 +56,13 @@ export default {
endBoxQty:0,
scatteredBoxNo:0,
boxLabelTotalQty:0,
fifoDialogVisible:false,
fifoLoading:false,
fifoQuery:{
label:''
},
fifoList:[],
fifoCurrentLabel:{}
}
},
mounted () {
@ -169,6 +176,97 @@ export default {
this.$message.error(error)
})
},
// - rqrq
openFifoDialog(){
this.fifoDialogVisible = true
this.fifoQuery.label = ''
this.fifoList = []
this.fifoCurrentLabel = {}
},
// - rqrq
focusFifoScanInput(){
this.$nextTick(() => {
if (this.$refs.fifoScanInput){
this.$refs.fifoScanInput.focus()
}
})
},
// site;partNo;qty;seqNo;printId;weight - rqrq
parseBagLabelForFifo(){
const label = (this.fifoQuery.label || '').trim()
const arr = label.split(';')
if (arr.length < 5){
this.$message.warning("标签格式错误")
return null
}
if (!arr[3]){
this.$message.warning("标签jobNo为空")
return null
}
if (!arr[4]){
this.$message.warning("标签序号为空")
return null
}
if (!arr[1]){
this.$message.warning("产品编码为空")
return null
}
if (!arr[0]){
this.$message.warning("site编码为空")
return null
}
const seqNo = Number(arr[3])
const itemNo = Number(arr[4])
if (!Number.isFinite(seqNo) || !Number.isFinite(itemNo)){
this.$message.warning("标签格式错误")
return null
}
return {
site:arr[0],
partNo:arr[1],
seqNo:seqNo,
printId:itemNo
}
},
// - rqrq
queryFifoListByLabel(){
const params = this.parseBagLabelForFifo()
if (!params){
return
}
this.fifoLoading = true
queryEarlierInboundBagList(params).then(({data})=>{
this.fifoLoading = false
if (data && data.code === 0){
this.fifoCurrentLabel = data.row || {}
this.fifoList = data.rows || []
if (this.fifoList.length === 0){
this.$message.success("未查询到更早日期袋贴")
} else {
this.$message.warning("查询到更早日期袋贴,请优先使用")
}
this.fifoQuery.label = ''
this.focusFifoScanInput()
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.fifoLoading = false
this.$message.error(error)
})
},
formatLabelDate(row){
if (!row || !row.createTime){
return ''
}
return dayjs(row.createTime).format("YYYY-MM-DD")
},
getFifoCurrentLabelDate(){
if (!this.fifoCurrentLabel || !this.fifoCurrentLabel.createTime){
return ''
}
return dayjs(this.fifoCurrentLabel.createTime).format("YYYY-MM-DD")
},
boxLabelVisibleHandler(row){
this.selectDelNotifyDetail = {
site:row.site,
@ -284,6 +382,11 @@ export default {
this.searchDelHeaderList();
},
watch:{
fifoDialogVisible(newVal){
if (newVal){
this.focusFifoScanInput()
}
},
"selectDelNotifyDetail.shipQty"(newVal,oldVal){
if (this.selectDelNotifyDetail.qtyPerBox === 0 || !this.selectDelNotifyDetail.qtyPerBox){
this.boxNum = 0;
@ -392,11 +495,14 @@ export default {
<el-checkbox v-model="searchData.shipFlag">仅显示未完全发货清单</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="2">
<el-col :span="4">
<el-form-item :label="' '">
<el-button type="primary" style="height: 20px;font-size: 14px;line-height: 10px" @click="searchDelHeaderList"> </el-button>
<el-button type="warning" style="height: 20px;font-size: 14px;line-height: 10px" @click="openFifoDialog">查询先进先出</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div v-loading="delNotifyHeaderTableLoading">
@ -842,6 +948,52 @@ export default {
<el-button @click="boxLabelVisible = false">取消</el-button>
</span>
</el-dialog>
<el-dialog :visible.sync="fifoDialogVisible" v-drag :close-on-click-modal="false" title="查询先进先出" width="1300px">
<el-row :gutter="20">
<el-col :span="17">
<el-form :inline="true" label-position="top">
<el-form-item label="扫描袋贴">
<el-input ref="fifoScanInput" v-model="fifoQuery.label" clearable @keyup.enter.native="queryFifoListByLabel"></el-input>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" :loading="fifoLoading" @click="queryFifoListByLabel">查询</el-button>
</el-form-item>
</el-form>
<el-table :data="fifoList" border stripe v-loading="fifoLoading" height="420">
<el-table-column prop="partNo" label="产品编码" min-width="120" header-align="center" align="left"></el-table-column>
<el-table-column prop="partDesc" label="产品规格" min-width="180" header-align="center" align="left" show-overflow-tooltip></el-table-column>
<el-table-column prop="seqNo" label="Pack NO." min-width="90" header-align="center" align="left"></el-table-column>
<el-table-column prop="createTime" label="标签日期" min-width="110" header-align="center" align="center" :formatter="formatLabelDate"></el-table-column>
<el-table-column prop="printQty" label="数量" min-width="90" header-align="center" align="right"></el-table-column>
<el-table-column prop="warehouseId" label="仓库" min-width="90" header-align="center" align="left"></el-table-column>
<el-table-column prop="locationId" label="库位" min-width="90" header-align="center" align="left"></el-table-column>
<el-table-column prop="status" label="状态" min-width="90" header-align="center" align="center"></el-table-column>
</el-table>
</el-col>
<el-col :span="7">
<el-card shadow="always">
<div slot="header" style="font-weight: bold">当前扫描袋贴</div>
<el-form label-position="top" label-width="100px">
<el-form-item label="Pack NO.">
<el-input :value="fifoCurrentLabel.seqNo || ''" readonly></el-input>
</el-form-item>
<el-form-item label="产品编码">
<el-input :value="fifoCurrentLabel.partNo || ''" readonly></el-input>
</el-form-item>
<el-form-item label="标签日期">
<el-input :value="getFifoCurrentLabelDate()" readonly></el-input>
</el-form-item>
<el-form-item label="数量">
<el-input :value="fifoCurrentLabel.printQty || ''" readonly></el-input>
</el-form-item>
</el-form>
</el-card>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="fifoDialogVisible = false">关闭</el-button>
</span>
</el-dialog>
<scan-form :scan-flag.sync="scanFlag" @changeAllNum="changeAllNum" :all-num="allNum" :notify-qty="notifyQty" :detail="delNotifyDetail"></scan-form>
</div>
</template>

Loading…
Cancel
Save