7 changed files with 802 additions and 278 deletions
-
8src/store/modules/user.js
-
5src/views/modules/pad/padCODelNotify.vue
-
2src/views/modules/print/print_package_label-NOOREVIEW.js
-
274src/views/modules/production/bagLabels.vue
-
601src/views/modules/production/outboundLabelScan.vue
-
188src/views/modules/production/scanForm.vue
-
2src/views/modules/production/shippingScan.vue
@ -1,125 +1,534 @@ |
|||
<script> |
|||
import {searchOutboundLabelScanList} from "../../../api/production/generateReport"; |
|||
import { |
|||
searchDelHeaderList, |
|||
searchDelNotifyDetail, |
|||
updateDelNotifyDetail, |
|||
} from '@/api/pad.js' |
|||
import scanForm from "./scanForm.vue"; |
|||
import dayjs from "dayjs"; |
|||
|
|||
import {Decimal} from "decimal.js"; |
|||
export default { |
|||
data(){ |
|||
return{ |
|||
outboundLabelList:[], |
|||
name: "shippingScan", |
|||
components:{ |
|||
scanForm, |
|||
}, |
|||
data() { |
|||
return { |
|||
allNum:0, |
|||
notifyQty:0, |
|||
height:200, |
|||
delNotifyHeaderTableLoading:false, |
|||
// 搜索表单对象 |
|||
searchData:{ |
|||
site:"", |
|||
startDate:dayjs().format("YYYY-MM-DD"), |
|||
endDate:dayjs().format("YYYY-MM-DD"), |
|||
customerId:undefined, |
|||
delNotifyNo:undefined, |
|||
delNotifyItemNo:undefined, |
|||
partNo:undefined, |
|||
partDescription:undefined, |
|||
orderNo:undefined, |
|||
scanType:'', |
|||
shipFlag:false, |
|||
no:1, |
|||
size:50, |
|||
total:0, |
|||
}, |
|||
scanFlag:false, |
|||
checkoutDelNotifyDetailDialogVisible:false, |
|||
// 主表对象 |
|||
delNotifyHeader:{ |
|||
|
|||
}, |
|||
exportDataStandard: { |
|||
'通知单号': 'delNotifyNo', |
|||
'通知单号序号': 'delNotifyItemNo', |
|||
'产品编码': 'partNo', |
|||
'产品名称': 'partDescription', |
|||
'扫描数量': 'scanQty', |
|||
'袋装类型': 'scanType', |
|||
'销售订单号': 'orderNo', |
|||
'操作员': 'createBy', |
|||
'扫描时间': 'createData', |
|||
// 子表对象 |
|||
delNotifyDetail:{ |
|||
|
|||
}, |
|||
fileName:'发货扫描报表-'+this.getStrDate(), |
|||
// 主表 |
|||
delNotifyHeaderList:[], |
|||
// 子表 |
|||
delNotifyDetailList:[], |
|||
no:1, |
|||
size:50, |
|||
total:0, |
|||
} |
|||
}, |
|||
methods:{ |
|||
searchOutboundLabelList(){ |
|||
searchOutboundLabelScanList(this.searchData).then(({data})=>{ |
|||
mounted () { |
|||
this.$nextTick(() => { |
|||
this.height = window.innerHeight - 475 |
|||
}) |
|||
}, |
|||
methods: { |
|||
searchDelHeaderList(){ |
|||
let params = JSON.parse(JSON.stringify(this.searchData)) |
|||
params.no = this.no; |
|||
params.size = this.size; |
|||
if (this.searchData.shipFlag){ |
|||
params.shipFlag = "N"; |
|||
}else { |
|||
params.shipFlag = null; |
|||
} |
|||
this.delNotifyHeaderList = []; |
|||
this.delNotifyDetailList = []; |
|||
this.delNotifyHeaderTableLoading = true; |
|||
searchDelHeaderList(params).then(({data})=>{ |
|||
this.delNotifyHeaderTableLoading = false; |
|||
if (data && data.code === 0){ |
|||
this.delNotifyHeaderList = data.data.records; |
|||
this.total = data.data.total; |
|||
this.delNotifyDetailList = data.data.records[0].delNotifyDetailVoList |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
}).catch((error)=>{ |
|||
this.delNotifyHeaderTableLoading = false; |
|||
}) |
|||
}, |
|||
// 分页 |
|||
sizeChangeHandle(val){ |
|||
this.size = val; |
|||
this.no = 1; |
|||
this.searchDelHeaderList(); |
|||
}, |
|||
currentChangeHandle(val){ |
|||
this.no = val; |
|||
this.searchDelHeaderList(); |
|||
}, |
|||
getSignNumber(number){ |
|||
return new Decimal(number).toSignificantDigits().toNumber() |
|||
}, |
|||
rowClickDelNotifyHeaderTable(row){ |
|||
// 缓存对象 |
|||
this.delNotifyHeader = row |
|||
this.delNotifyDetailList = this.delNotifyHeader.delNotifyDetailVoList; |
|||
}, |
|||
updateDelNotifyDetailBtn(status){ |
|||
this.delNotifyDetail.approveResultFlag = status; |
|||
console.log(this.$store.state.user) |
|||
this.delNotifyDetail.approvedBy = this.$store.state.user.name; |
|||
this.updateDelNotifyDetail(); |
|||
}, |
|||
updateDelNotifyDetail(){ |
|||
updateDelNotifyDetail(this.delNotifyDetail).then(({data})=>{ |
|||
if (data && data.code === 0){ |
|||
this.outboundLabelList = data.rows |
|||
this.searchDelHeaderList(); |
|||
this.checkoutDelNotifyDetailDialogVisible = false; |
|||
this.$message.success(data.msg) |
|||
}else { |
|||
this.$message.warning(data.msg) |
|||
} |
|||
}).catch((error)=>{ |
|||
this.$message.error(error); |
|||
this.$message.error("网络异常") |
|||
}) |
|||
}, |
|||
getStrDate () { |
|||
let dd = new Date() |
|||
let Y = dd.getFullYear() |
|||
let M = (dd.getMonth() + 1) < 10 ? '0' + (dd.getMonth() + 1) : (dd.getMonth() + 1)// 获取当前月份的日期,不足10补0 |
|||
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 获取当前几号,不足10补0 |
|||
let H = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours() |
|||
let MM = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes() |
|||
let S = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds() |
|||
return Y + M + D + H + MM + S |
|||
checkoutDelNotifyDetailBtn(row){ |
|||
this.delNotifyDetail = JSON.parse(JSON.stringify(row)); |
|||
this.checkoutDelNotifyDetailDialogVisible = true; |
|||
}, |
|||
createExportData () { |
|||
return this.outboundLabelList |
|||
clickScan(row){ |
|||
this.delNotifyDetail = JSON.parse(JSON.stringify(row)) |
|||
this.allNum = this.delNotifyDetail.allNum |
|||
this.notifyQty = this.delNotifyDetail.notifyQty |
|||
this.scanFlag = true |
|||
}, |
|||
changeAllNum(val){ |
|||
this.allNum = val; |
|||
this.delNotifyDetail.allNum = val; |
|||
} |
|||
}, |
|||
created() { |
|||
this.searchOutboundLabelList(); |
|||
this.searchDelHeaderList(); |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
<div> |
|||
<el-form :model="searchData" :inline="true" label-position="top"> |
|||
<el-form-item label="通知单单号"> |
|||
<el-input v-model="searchData.delNotifyNo"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="通知单号序号"> |
|||
<el-input v-model="searchData.delNotifyItemNo"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="产品编码"> |
|||
<el-input v-model="searchData.partNo"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="产品名称规格"> |
|||
<el-input v-model="searchData.partDescription"></el-input> |
|||
</el-form-item> |
|||
<br> |
|||
<el-form-item label="销售订单号"> |
|||
<el-input v-model="searchData.orderNo"></el-input> |
|||
</el-form-item> |
|||
<el-form-item label="扫描袋装类型"> |
|||
<el-select v-model="searchData.scanType"> |
|||
<el-option value="" label="全部"></el-option> |
|||
<el-option value="标准数量" label="标准数量"></el-option> |
|||
<el-option value="零数量" label="零数量"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label=" "> |
|||
<el-button @click="searchOutboundLabelList">查询</el-button> |
|||
<download-excel |
|||
:fields="exportDataStandard" |
|||
:data="outboundLabelList" |
|||
type="xlsx" |
|||
:name="fileName" |
|||
:header="['发货扫描列表']" |
|||
:footer="[]" |
|||
:defaultValue="'这一行这一列没有数据'" |
|||
:fetch="createExportData" |
|||
:before-generate="()=>{}" |
|||
:before-finish="()=>{}" |
|||
worksheet="导出信息" |
|||
class="el-button el-button--primary el-button--medium"> |
|||
{{'导出'}} |
|||
</download-excel> |
|||
</el-form-item> |
|||
</el-form> |
|||
<el-table :data="outboundLabelList" height="81vh" |
|||
stripe border> |
|||
<el-table-column label="通知单号" header-align="center" align="center" show-overflow-tooltip prop="delNotifyNo"/> |
|||
<el-table-column label="通知单号序号" header-align="center" align="left" show-overflow-tooltip prop="delNotifyItemNo"/> |
|||
<el-table-column label="产品编码" header-align="center" prop="partNo" show-overflow-tooltip></el-table-column> |
|||
<el-table-column prop="partDescription" header-align="center" align="left" show-overflow-tooltip label="产品名称规格"/> |
|||
<el-table-column label="数量" header-align="center" align="center" show-overflow-tooltip prop="scanQty"/> |
|||
<el-table-column label="类型" header-align="center" align="left" show-overflow-tooltip prop="scanType"/> |
|||
<el-table-column prop="orderNo" header-align="center" align="left" label="销售订单号"/> |
|||
<el-table-column label="操作员" header-align="center" align="left" show-overflow-tooltip prop="createBy"/> |
|||
<el-table-column label="扫描时间" header-align="center" align="center" show-overflow-tooltip prop="createData"/> |
|||
</el-table> |
|||
</div> |
|||
<div style="padding: 10px"> |
|||
<el-form ref="searchDataForm" label-position="top" :model="searchData" label-width="80px"> |
|||
<el-row :gutter="20"> |
|||
<el-col :span="7"> |
|||
<el-row> |
|||
<el-col :span="11"> |
|||
<el-form-item label="通知单日期"> |
|||
<el-date-picker |
|||
style="width: 100%" |
|||
:editable="false" |
|||
v-model="searchData.startDate" |
|||
value-format="yyyy-MM-dd" |
|||
type="date"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item label=" " style="text-align: center"> |
|||
--> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="11"> |
|||
<el-form-item label=" "> |
|||
<el-date-picker |
|||
style="width: 100%" |
|||
:editable="false" |
|||
v-model="searchData.endDate" |
|||
value-format="yyyy-MM-dd" |
|||
type="date"> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item label="客户编号"> |
|||
<el-input v-model="searchData.customerId" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item label="通知单单号"> |
|||
<el-input v-model="searchData.delNotifyNo" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="3"> |
|||
<el-form-item label="工厂编号" prop="site"> |
|||
<el-select filterable v-model="searchData.site" default-first-option style="width: 100%"> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="1-沪声" value="1"></el-option> |
|||
<el-option label="2-赫艾" value="2"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"> |
|||
<el-form-item :label="' '"> |
|||
<el-button type="primary" style="height: 20px;font-size: 14px;line-height: 10px" @click="searchDelHeaderList">查 询</el-button> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<div v-loading="delNotifyHeaderTableLoading"> |
|||
<el-table |
|||
:height="height" |
|||
:data="delNotifyHeaderList" |
|||
border highlight-current-row |
|||
@row-click="rowClickDelNotifyHeaderTable" |
|||
style="margin-top: 10px;"> |
|||
<el-table-column |
|||
prop="delNotifyNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="通知单号"/> |
|||
<el-table-column |
|||
prop="notifyDate" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="要求发货日期"/> |
|||
<el-table-column |
|||
prop="customerId" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="客户编码"/> |
|||
<el-table-column |
|||
prop="customerName" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="客户名称"/> |
|||
<el-table-column |
|||
prop="billAirwayNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="运单号"/> |
|||
<el-table-column |
|||
prop="forwarderId" |
|||
header-align="center" |
|||
align="left" |
|||
width="80" |
|||
label="货代"/> |
|||
<el-table-column |
|||
prop="remark" |
|||
header-align="center" |
|||
align="left" |
|||
show-overflow-tooltip |
|||
min-width="120" |
|||
label="备注"/> |
|||
<el-table-column |
|||
prop="notifyDate" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="通知单日期"/> |
|||
<el-table-column |
|||
prop="receiver" |
|||
header-align="center" |
|||
align="left" |
|||
width="100" |
|||
label="经手人"/> |
|||
<el-table-column |
|||
prop="delAddId" |
|||
header-align="center" |
|||
align="left" |
|||
show-overflow-tooltip |
|||
width="120" |
|||
label="送货地址"/> |
|||
<el-table-column |
|||
prop="creditFlag" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="退货标记"/> |
|||
<el-table-column |
|||
prop="site" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="工厂编码"/> |
|||
<el-table-column |
|||
prop="shipFlag" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="是否发货"/> |
|||
<el-table-column |
|||
prop="shipResult" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="发货状态信息"/> |
|||
<el-table-column |
|||
prop="realShipDate" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="实际发货日期"/> |
|||
</el-table> |
|||
<div style=" font-size: 18px;"> |
|||
<el-pagination |
|||
@size-change="sizeChangeHandle" |
|||
@current-change="currentChangeHandle" |
|||
:current-page="no" |
|||
:page-sizes="[50, 100, 500, 1000]" |
|||
:page-size="size" |
|||
:total="total" |
|||
layout="total, sizes, prev, pager, next, jumper"> |
|||
</el-pagination> |
|||
</div> |
|||
|
|||
<el-table :data="delNotifyDetailList" |
|||
height="250" |
|||
border stripe |
|||
style="margin-top: 10px;"> |
|||
<el-table-column label="操作" width="150px" header-align="center" fixed align="center"> |
|||
<template slot-scope="{row,$index}"> |
|||
<el-link style="cursor: pointer" @click="clickScan(row)">扫描记录</el-link> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="delNotifyItemNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150px" |
|||
label="通知单号序号"> |
|||
<template slot-scope="{row,$index}"> |
|||
{{getSignNumber(row.delNotifyItemNo)}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="partNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="产品编码"/> |
|||
<el-table-column |
|||
prop="partDescription" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
show-overflow-tooltip |
|||
label="产品名称规格"/> |
|||
<el-table-column |
|||
prop="approveResultFlag" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
show-overflow-tooltip |
|||
label="出货检验结果"> |
|||
<template slot-scope="{row,$index}"> |
|||
<span v-if="row.approveResultFlag === 'Y'">合格</span> |
|||
<span v-else-if="row.approveResultFlag === 'N'">不合格</span> |
|||
<span v-else>待检验</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="notifyQty" |
|||
header-align="center" |
|||
align="right" |
|||
width="120" |
|||
label="通知单数量"/> |
|||
<el-table-column |
|||
prop="shipQty" |
|||
header-align="center" |
|||
align="right" |
|||
width="120" |
|||
label="发货数量"/> |
|||
<el-table-column |
|||
prop="allNum" |
|||
header-align="center" |
|||
align="right" |
|||
width="120" |
|||
label="扫描数量"> |
|||
<template slot-scope="{row}"> |
|||
{{row.allNum?row.allNum:0}} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
prop="umid" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="销售计量单位"/> |
|||
<el-table-column |
|||
prop="orderNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="销售订单号"/> |
|||
<el-table-column |
|||
prop="itemNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="订单序号"/> |
|||
<el-table-column |
|||
prop="customerPONo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="客户采购订单号"/> |
|||
<el-table-column |
|||
prop="orderType" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="订单类型"/> |
|||
<el-table-column |
|||
prop="custPartNo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="客户产品编号"/> |
|||
<el-table-column |
|||
prop="intSales" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="内部销售"/> |
|||
<el-table-column |
|||
prop="extSales" |
|||
header-align="center" |
|||
align="left" |
|||
width="120" |
|||
label="外部销售"/> |
|||
<el-table-column |
|||
prop="subOrderType" |
|||
header-align="center" |
|||
align="left" |
|||
width="180" |
|||
label="零部件订单类型"/> |
|||
<el-table-column |
|||
prop="techInfo" |
|||
header-align="center" |
|||
align="left" |
|||
width="150" |
|||
label="技术注意事项"/> |
|||
<el-table-column |
|||
prop="remark" |
|||
header-align="center" |
|||
align="left" |
|||
show-overflow-tooltip |
|||
width="180" |
|||
label="备注"/> |
|||
</el-table> |
|||
</div> |
|||
|
|||
<!--检验弹框--> |
|||
<el-dialog |
|||
title="出货检验" |
|||
:visible.sync="checkoutDelNotifyDetailDialogVisible" |
|||
width="40%"> |
|||
<el-form :model="delNotifyDetail" label-position="top" label-width="120"> |
|||
<el-row :gutter="30"> |
|||
<el-col :span="10"> |
|||
<el-form-item label="通知单号"> |
|||
<el-input disabled v-model="delNotifyDetail.delNotifyNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="工厂编号" prop="site"> |
|||
<el-select filterable disabled v-model="delNotifyDetail.site" readonly style="width: 100%"> |
|||
<el-option label="全部" value=""></el-option> |
|||
<el-option label="1-沪声" value="1"></el-option> |
|||
<el-option label="2-赫艾" value="2"></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item label="产品编码"> |
|||
<el-input disabled v-model="delNotifyDetail.partNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="产品描述"> |
|||
<el-input disabled v-model="delNotifyDetail.partDescription" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item label="通知单数量"> |
|||
<div class="right"> |
|||
<el-input disabled v-model="delNotifyDetail.notifyQty" type="number" readonly></el-input> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="发货数量"> |
|||
<div class="right"> |
|||
<el-input disabled v-model="delNotifyDetail.shipQty" type="number" readonly></el-input> |
|||
</div> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item label="销售订单"> |
|||
<el-input disabled v-model="delNotifyDetail.delNotifyNo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="客户采购订单"> |
|||
<el-input disabled v-model="delNotifyDetail.customerPONo" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item label="内部销售"> |
|||
<el-input disabled v-model="delNotifyDetail.intSales" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"> |
|||
<el-form-item label="外部销售"> |
|||
<el-input disabled v-model="delNotifyDetail.extSales" readonly></el-input> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
<span slot="footer" class="dialog-footer" style="text-align: center"> |
|||
<el-button type="primary" @click="updateDelNotifyDetailBtn('Y')">合 格</el-button> |
|||
<el-button @click="updateDelNotifyDetailBtn('N')">不 合 格</el-button> |
|||
</span> |
|||
</el-dialog> |
|||
<scan-form :is-report="true" :scan-flag.sync="scanFlag" @changeAllNum="changeAllNum" :all-num="allNum" :notify-qty="notifyQty" :detail="delNotifyDetail"></scan-form> |
|||
</div> |
|||
</template> |
|||
|
|||
<style scoped> |
|||
|
|||
.el-select-dropdown__item{ |
|||
font-size: 18px; |
|||
} |
|||
.right /deep/ .el-input--medium .el-input__inner{ |
|||
text-align: right; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue