|
|
|
@ -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> |
|
|
|
|