Browse Source

24-04-10 出库扫描报表

master
zelian_wu 2 years ago
parent
commit
a06622f911
  1. 8
      src/store/modules/user.js
  2. 5
      src/views/modules/pad/padCODelNotify.vue
  3. 2
      src/views/modules/print/print_package_label-NOOREVIEW.js
  4. 274
      src/views/modules/production/bagLabels.vue
  5. 601
      src/views/modules/production/outboundLabelScan.vue
  6. 188
      src/views/modules/production/scanForm.vue
  7. 2
      src/views/modules/production/shippingScan.vue

8
src/store/modules/user.js

@ -7,11 +7,11 @@ export default {
languageDefault: '',
userDisplay: '',
//客户环境
padSopUrl:'http://192.168.2.172/upload/',
tvSopUrl:'http://192.168.2.172/sopFile/',
// padSopUrl:'http://192.168.2.172/upload/',
// tvSopUrl:'http://192.168.2.172/sopFile/',
//自己环境
// padSopUrl:'http://192.168.1.83:81/upload/',
// tvSopUrl:'http://192.168.1.83:81/upload/',
padSopUrl:process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? 'http://192.168.1.83:81/upload/' :'http://192.168.2.172/upload/',
tvSopUrl:process.env.NODE_ENV !== 'production' && process.env.OPEN_PROXY ? 'http://192.168.1.83:81/sopFile/' :'http://192.168.2.172/sopFile/',
},
mutations: {
updateId (state, id) {

5
src/views/modules/pad/padCODelNotify.vue

@ -68,7 +68,8 @@
<el-table
:height="height"
:data="delNotifyHeaderList"
border stripe
highlight-current-row
border
@row-click="rowClickDelNotifyHeaderTable"
style="margin-top: 10px;">
<el-table-column
@ -178,7 +179,7 @@
<el-table :data="delNotifyDetailList"
height="250"
border stripe
border highlight-current-row
style="margin-top: 10px;">
<el-table-column label="操作" width="150px" header-align="center" fixed align="center">
<template slot-scope="{row,$index}">

2
src/views/modules/print/print_package_label-NOOREVIEW.js

@ -13,7 +13,7 @@ export function printPackageLabelNoPreview(printList) {
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,1000,700,"");
// LODOP.ADD_PRINT_BARCODE(133,286,130,88,"QRCode",printData.partSpec);
LODOP.ADD_PRINT_BARCODE(133,286,130,88,"QRCode",`${printData.site};${printData.partNo};${printData.unitQty}` );
LODOP.ADD_PRINT_BARCODE(133,286,130,88,"QRCode",`${printData.site};${printData.partNo};${printData.unitQty};${printData.seqNo}` );
LODOP.ADD_PRINT_TEXT(93,18,123,25,"Product No:");
LODOP.SET_PRINT_STYLEA(0,"FontName","Arial");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);

274
src/views/modules/production/bagLabels.vue

@ -1,4 +1,4 @@
<script >
<script>
import {
checkIsPacking,
getPackagePrintDataList,
@ -8,31 +8,30 @@ import {
getPhotoAddressData
} from '@/api/pad.js'
import {printPackageLabelNoPreview} from "../print/print_package_label-NOOREVIEW";
export default {
data(){
return{
searchData:{
seqNo:undefined,
flag:'',
},
number:1,
flag:false,
soScheduleRouting:{
export default {
data() {
return {
searchData: {
seqNo: undefined,
flag: '',
},
picData:{
site:'',
partNo:'',
number: 1,
flag: false,
soScheduleRouting: {},
picData: {
site: '',
partNo: '',
},
fileTitle:"文件名 ("+0+"/"+0+")",
fileName:'',
num:1,
currentData:'',
photoDatas:[],
uploadImg:[],
fileTitle: "文件名 (" + 0 + "/" + 0 + ")",
fileName: '',
num: 1,
currentData: '',
photoDatas: [],
uploadImg: [],
showviewer: false,
url: '',
photoUrl:'',
photoUrl: '',
}
},
mounted() {
@ -41,196 +40,194 @@ export default {
activated() {
this.$refs.focusInput.focus()
},
computed:{
seqNo:function (){
computed: {
seqNo: function () {
return this.searchData.seqNo;
}
},
watch:{
},
methods:{
selectBySeqNo(){
watch: {},
methods: {
selectBySeqNo() {
//
this.getSOScheduleRoutingData();
},
getSOScheduleRoutingData(){
if (!this.searchData.seqNo){
getSOScheduleRoutingData() {
if (!this.searchData.seqNo) {
this.$message.warning("派工单号为空")
return
}
let params = {
seqNo:this.searchData.seqNo,
userId:this.$store.state.user.name
seqNo: this.searchData.seqNo,
userId: this.$store.state.user.name
};
getSOScheduleRoutingDataPrint(params).then(({data})=>{
if (data && data.code === 0){
if (data.total === 0){
getSOScheduleRoutingDataPrint(params).then(({data}) => {
if (data && data.code === 0) {
if (data.total === 0) {
this.$message.warning("派工单不存在")
}else if (data.total === 1){
} else if (data.total === 1) {
this.soScheduleRouting = data.rows[0];
this.checkIsPacking()
}else {
this.soScheduleRouting = data.rows.find((item)=>item.site===this.$store.state.user.site && item.seqNo === this.searchData.seqNo)
} else {
this.soScheduleRouting = data.rows.find((item) => item.site === this.$store.state.user.site && item.seqNo === this.searchData.seqNo)
this.checkIsPacking()
}
if (data.row){
if (data.row) {
this.soScheduleRouting.qtyBag = data.row[0].qtyBag
this.soScheduleRouting.bag = data.row[0].bag
this.soScheduleRouting.qty = data.row[0].qty
this.soScheduleRouting.carton = data.row[0].carton
}
if (data.data){
if (data.data) {
this.soScheduleRouting.sScheduledDate2 = data.data.sScheduledDate;
this.soScheduleRouting.operatorName2 = data.data.operatorName;
this.soScheduleRouting.approveQty2 = data.data.qtyApprove;
}
}else {
} else {
this.$message.warning(data.msg)
this.cleanAll()
}
}).catch((error)=>{
}).catch((error) => {
this.cleanAll()
this.$message.error(error);
})
},
cleanAll(){
Object.keys( this.soScheduleRouting).forEach(key => {
cleanAll() {
Object.keys(this.soScheduleRouting).forEach(key => {
this.soScheduleRouting[key] = '';
});
Object.keys( this.picData).forEach(key => {
Object.keys(this.picData).forEach(key => {
this.picData[key] = '';
});
this.fileName=null;
this.fileTitle="文件名 ("+0+"/"+0+")";
this.photoUrl=null;
this.fileName = null;
this.fileTitle = "文件名 (" + 0 + "/" + 0 + ")";
this.photoUrl = null;
},
checkIsPacking(){
checkIsPacking() {
let params = {
site:this.soScheduleRouting.site,
workCenterNo:this.soScheduleRouting.sWorkCenterNo,
site: this.soScheduleRouting.site,
workCenterNo: this.soScheduleRouting.sWorkCenterNo,
}
checkIsPacking(params).then(({data})=>{
if (data && data.code === 0){
this.getData(this.soScheduleRouting.site,this.soScheduleRouting.partNo)
}else {
this.getData('','')
this.soScheduleRouting={};
checkIsPacking(params).then(({data}) => {
if (data && data.code === 0) {
this.getData(this.soScheduleRouting.site, this.soScheduleRouting.partNo)
} else {
this.getData('', '')
this.soScheduleRouting = {};
this.$message.warning(data.msg)
this.searchData = {
seqNo: undefined,
flag: '',
}
}
}).catch((error)=>{
}).catch((error) => {
this.$message.error(error)
this.searchData = {
seqNo: undefined,
flag: '',
}
this.soScheduleRouting={};
this.soScheduleRouting = {};
})
},
printLabel(){
if (!this.soScheduleRouting.site){
printLabel() {
if (!this.soScheduleRouting.site) {
this.$message.warning("请先扫描派工单号")
return
}
if (this.soScheduleRouting.qtyBag === null || this.soScheduleRouting.qtyBag === undefined){
if (this.soScheduleRouting.qtyBag === null || this.soScheduleRouting.qtyBag === undefined) {
this.$message.warning("未维护每袋数量")
return;
}
let params = {
previousSeqNo:this.soScheduleRouting.previousSeqNo,
site:this.soScheduleRouting.site,
orderNo:this.soScheduleRouting.orderNo
previousSeqNo: this.soScheduleRouting.previousSeqNo,
site: this.soScheduleRouting.site,
orderNo: this.soScheduleRouting.orderNo
}
if (this.searchData.flag === 'Y'){
if (this.searchData.flag === 'Y') {
this.flag = true;
return;
}
this.printPackageLabelNoPreview(params)
},
printPackageLabelNoPreview(params){
if (!params){
printPackageLabelNoPreview(params) {
if (!params) {
this.$message.warning("参数为空")
return
}
//
getPackagePrintDataList(params).then(({data})=>{
if (data && data.code === 0){
getPackagePrintDataList(params).then(({data}) => {
if (data && data.code === 0) {
printPackageLabelNoPreview(data.rows);
this.searchData.flag = '';
}else {
} else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
}).catch((error) => {
this.$message.error(error)
})
},
printLabelEntity(){
printLabelEntity() {
let params = {
previousSeqNo:this.soScheduleRouting.previousSeqNo,
site:this.soScheduleRouting.site,
orderNo:this.soScheduleRouting.orderNo
previousSeqNo: this.soScheduleRouting.previousSeqNo,
site: this.soScheduleRouting.site,
orderNo: this.soScheduleRouting.orderNo
}
params.number = this.number;
this.printPackageLabelNoPreview(params)
},
getData(site,partNo){
getData(site, partNo) {
this.picData.partNo = partNo;
this.picData.site= site;
this.picData.site = site;
this.getPhoto();
},
getPhoto(){
getPhoto() {
getPhotoAddressData(this.picData).then(({data}) => {
this.photoDatas = data.rows;
if(this.photoDatas.length==0){
this.fileTitle="文件名 ("+0+"/"+0+")";
this.photoUrl=null;
if (this.photoDatas.length == 0) {
this.fileTitle = "文件名 (" + 0 + "/" + 0 + ")";
this.photoUrl = null;
return false;
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb;
this.fileName = this.photoDatas[this.num - 1].attaFileNameDb;
this.fileTitle = "文件名 (" + this.num + "/" + this.photoDatas.length + ")";
this.photoUrl = this.$store.state.user.padSopUrl + this.photoDatas[this.num - 1].attaFileNameDb;
// this.photoUrl='http://192.168.1.83:81/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
})
},
nextPicture(){
if(this.photoDatas.length==0){
this.fileTitle="文件名 ("+0+"/"+0+")";
nextPicture() {
if (this.photoDatas.length == 0) {
this.fileTitle = "文件名 (" + 0 + "/" + 0 + ")";
this.$alert('该物料没有上传图片!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.num==this.photoDatas.length){
this.num=1;
}else{
this.num=this.num+1;
if (this.num == this.photoDatas.length) {
this.num = 1;
} else {
this.num = this.num + 1;
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb;
this.fileName = this.photoDatas[this.num - 1].attaFileNameDb;
this.fileTitle = "文件名 (" + this.num + "/" + this.photoDatas.length + ")";
this.photoUrl = this.$store.state.user.padSopUrl + this.photoDatas[this.num - 1].attaFileNameDb;
// this.photoUrl='http://192.168.1.83:81/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
},
lastPicture(){
if(this.photoDatas.length==0){
this.fileTitle="文件名 ("+0+"/"+0+")";
lastPicture() {
if (this.photoDatas.length == 0) {
this.fileTitle = "文件名 (" + 0 + "/" + 0 + ")";
this.$alert('该物料没有上传图片!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.num==1){
this.num=this.photoDatas.length;
}else{
this.num=this.num-1;
if (this.num == 1) {
this.num = this.photoDatas.length;
} else {
this.num = this.num - 1;
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb;
this.fileName = this.photoDatas[this.num - 1].attaFileNameDb;
this.fileTitle = "文件名 (" + this.num + "/" + this.photoDatas.length + ")";
this.photoUrl = this.$store.state.user.padSopUrl + this.photoDatas[this.num - 1].attaFileNameDb;
// this.photoUrl='http://192.168.1.83:81/upload/'+this.photoDatas[this.num-1].attaFileNameDb;
},
},
@ -239,9 +236,10 @@ export default {
<template>
<div style="padding: 5px">
<el-form size="medium" class="title" :model="seqNo" label-position="top" :inline="true" >
<el-form size="medium" class="title" :model="seqNo" label-position="top" :inline="true">
<el-form-item label="派工单号">
<el-input-number size="medium" style="width: 100%;margin-top: -5px;" :controls="false" ref="focusInput" :min="0" v-model="searchData.seqNo" @keyup.enter.native="selectBySeqNo"></el-input-number>
<el-input-number size="medium" style="width: 100%;margin-top: -5px;" :controls="false" ref="focusInput" :min="0"
v-model="searchData.seqNo" @keyup.enter.native="selectBySeqNo"></el-input-number>
</el-form-item>
<el-form-item label=" ">
<el-select v-model="searchData.flag" clearable>
@ -374,29 +372,32 @@ export default {
</el-col>
</el-row>
</el-form>
<div class="pad" style="float: left;width: 33%;margin-top: 2%">
<h5 style="margin-left: 30px;font-size: 20px">产品图片</h5>
<el-form inline="true" style="margin-left: 30px" label-position="top">
<el-form-item :label="'产品编码:'" style="margin-left: 0px">
<el-input v-model="picData.partNo" readonly style="width: 220px"></el-input>
</el-form-item>
</el-form>
<el-form inline="true" style="margin-top: 20px;margin-left: 30px" label-position="top">
<el-form-item :label="fileTitle">
<el-input v-model="fileName" style="width: 374px" readonly></el-input>
</el-form-item>
</el-form>
<el-form inline="true" style="margin-top: 20px;margin-left: 30px" label-position="top">
<el-form-item :label="' '">
<el-button @click="lastPicture()" style="margin-left: 10px;height: 35px;width: 90px" type="primary">上一张</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="nextPicture()" style="margin-left: 25px;height: 35px;width: 90px" type="primary">下一张</el-button>
</el-form-item>
</el-form>
</div>
<div id="padPhoto" style="text-align: center;float: left;width: 66%;vertical-align:middle;margin-top: 5px" >
<div class="pad" style="float: left;width: 33%;margin-top: 2%">
<h5 style="margin-left: 30px;font-size: 20px">产品图片</h5>
<el-form :inline="true" style="margin-left: 30px" label-position="top">
<el-form-item :label="'产品编码:'" style="margin-left: 0px">
<el-input v-model="picData.partNo" readonly style="width: 220px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" style="margin-top: 20px;margin-left: 30px" label-position="top">
<el-form-item :label="fileTitle">
<el-input v-model="fileName" style="width: 374px" readonly></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" style="margin-top: 20px;margin-left: 30px" label-position="top">
<el-form-item :label="' '">
<el-button @click="lastPicture()" style="margin-left: 10px;height: 35px;width: 90px" type="primary">
上一张
</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="nextPicture()" style="margin-left: 25px;height: 35px;width: 90px" type="primary">
下一张
</el-button>
</el-form-item>
</el-form>
</div>
<div id="padPhoto" style="text-align: center;float: left;width: 66%;vertical-align:middle;margin-top: 5px">
<img style="max-width: 100%;max-height: 450px;vertical-align:middle;" :src="photoUrl">
</div>
</el-card>
@ -408,7 +409,8 @@ export default {
}" width="15vw" top="30vh">
<el-form label-position="top" class="title">
<el-form-item label="零数量">
<el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput" :min="1" v-model="number" @keyup.enter.native="selectBySeqNo"></el-input-number>
<el-input-number size="medium" style="width: 100%;text-align: left" :controls="false" ref="dialogInput"
:min="1" v-model="number" @keyup.enter.native="selectBySeqNo"></el-input-number>
</el-form-item>
</el-form>
<div style="height: 20px;width: 100%"></div>
@ -421,29 +423,29 @@ export default {
</template>
<style scoped>
.title .el-input-number /deep/ .el-input__inner{
.title .el-input-number /deep/ .el-input__inner {
text-align: left;
margin-top: 5px;
padding-right: 5px !important;
padding-left: 5px !important;
}
.el-form-item--medium /deep/ .el-form-item__label{
.el-form-item--medium /deep/ .el-form-item__label {
font-size: 16px;
line-height: 30px;
height: 30px;
}
.el-form-item--medium /deep/ .el-form-item__content{
.el-form-item--medium /deep/ .el-form-item__content {
margin-bottom: 5px;
}
.el-form-item--medium /deep/ .el-form-item__content .el-button{
.el-form-item--medium /deep/ .el-form-item__content .el-button {
width: 80px;
height: 30px;
}
.el-form-item--medium /deep/ .el-form-item__content .el-input .el-input__inner{
.el-form-item--medium /deep/ .el-form-item__content .el-input .el-input__inner {
font-size: 16px;
line-height: 30px;
height: 30px !important;

601
src/views/modules/production/outboundLabelScan.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)// 100
let D = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate()// 100
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>

188
src/views/modules/production/scanForm.vue

@ -2,6 +2,7 @@
import {getPartValue, removeScanLabel, saveScanLabel, scanLabel} from "../../../api/production/generateReport";
import dayjs from "dayjs";
import {Decimal} from "decimal.js";
import {getPhotoAddressData} from "../../../api/pad";
export default {
name:"scanForm",
@ -21,6 +22,10 @@ export default {
notifyQty:{
type:Number,
default:0,
},
isReport:{
type:Boolean,
default:false,
}
},
computed:{
@ -41,7 +46,15 @@ export default {
set(val) {
// this.scanLabelDetailList = v
}
}
},
totalNum:{
get(){
return this.scanLabelDetailList.length;
},
set(val) {
// this.scanLabelDetailList = v
}
},
},
data(){
return{
@ -51,6 +64,11 @@ export default {
},
partValue:0,
scanLabelDetailList:[],
photoDatas:[],
fileTitle:'',
fileName:'',
photoUrl:'',
num:1,
}
},
methods:{
@ -95,15 +113,14 @@ export default {
scanLabel(paramsScan).then(({data})=>{
if (data && data.code === 0){
this.scanLabelDetailList = data.rows;
this.$emit("changeAllNum",this.scanLabelDetailList.reduce((pre, cur) => {
return pre + new Decimal(cur.scanQty).toNumber()
}, 0))
this.$emit("changeAllNum",this.total)
}else {
this.$message.warning(data.msg)
}
}).catch((error)=>{
this.$message.error(error)
})
this.getPhoto();
},
scanLabelEnter(){
if (this.total > this.notifyQty){
@ -111,7 +128,7 @@ export default {
return;
}
let arr = this.model.label.split(";");
if (arr.length !== 3){
if (arr.length < 3){
this.$message.warning("标签格式错误")
return
}
@ -123,10 +140,10 @@ export default {
this.$message.warning(`产品不匹配或每袋/每卷数量未维护`)
return;
}
if (this.model.flag !== 'Y' && this.partValue != arr[2]){
this.$message.warning(`标签数量与标准袋装数量不匹配`)
return;
}
// if (this.model.flag !== 'Y' && this.partValue != arr[2]){
// this.$message.warning(``)
// return;
// }
if (new Decimal(this.total).add(new Decimal(arr[2])).toNumber()> this.notifyQty){
this.$message.warning("扫描累计数量不允许超过要求发货数量")
return;
@ -137,7 +154,7 @@ export default {
delNotifyNo: this.detail.delNotifyNo,
delNotifyItemNo: this.detail.delNotifyItemNo,
scanQty:arr[2],
scanType:this.model.flag === 'Y'?'零数量':'标准数量',
scanType:arr[2] !== this.partValue?'零数量':'标准数量',
createBy:this.$store.state.user.userDisplay,
createData:dayjs().format("YYYY-MM-DD")
}
@ -162,11 +179,71 @@ export default {
label: '',
flag: '',
}
if (this.total < this.notifyQty){
if (this.isReport === false && this.total < this.notifyQty){
this.$message.warning("出货书数量未达到通知单需求数量")
}
this.scanLabelDetailList = [];
}
},
getPhoto(){
let params = {
site:this.detail.site,
partNo:this.detail.partNo,
}
this.photoDatas = [];
this.fileName='';
this.fileTitle="";
this.photoUrl='';
this.num=1;
getPhotoAddressData(params).then(({data}) => {
this.photoDatas = data.rows;
if(this.photoDatas.length===0){
this.fileTitle="文件名 ("+0+"/"+0+")";
setTimeout(() => {
this.$alert('该物料没有上传图片!', '错误', {
confirmButtonText: '确定'
})
}, 500);
return false;
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb;
})
},
lastPicture(){
if(this.photoDatas.length===0){
this.fileTitle="文件名 ("+0+"/"+0+")";
this.$alert('该物料没有上传图片!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.num===1){
this.num=this.photoDatas.length;
}else{
this.num=this.num-1;
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb;
},
nextPicture(){
if(this.photoDatas.length===0){
this.fileTitle="文件名 ("+0+"/"+0+")";
this.$alert('该物料没有上传图片!', '错误', {
confirmButtonText: '确定'
})
return false;
}
if(this.num===this.photoDatas.length){
this.num=1;
}else{
this.num=this.num+1;
}
this.fileName=this.photoDatas[this.num-1].attaFileNameDb;
this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")";
this.photoUrl=this.$store.state.user.padSopUrl+this.photoDatas[this.num-1].attaFileNameDb;
},
}
}
@ -177,41 +254,76 @@ export default {
<el-dialog
title="出货扫描" v-drag
:visible.sync="flag"
width="50%"
width="75%"
@open="scanLabel"
@close="closeScanDialog" @opened="openScanDialog">
<el-form :model="model" :inline="true" label-position="top">
<el-form-item label=" ">
<el-select v-model="model.flag" clearable>
<el-option value="" label="标准袋数"></el-option>
<el-option value="Y" label="零数袋"></el-option>
</el-select>
</el-form-item>
<el-form-item label="标签" style="width: 200px">
<!-- <el-form-item label=" ">-->
<!-- <el-select v-model="model.flag" clearable>-->
<!-- <el-option value="" label="标准袋数"></el-option>-->
<!-- <el-option value="Y" label="零数袋"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="标签" style="width: 200px " v-if="!isReport">
<el-input ref="focusInput" v-model="model.label" @keyup.enter.native="scanLabelEnter"></el-input>
</el-form-item>
<el-form-item label="合计">
<el-input-number disabled :controls="false" style="margin-top: -5px;text-align: right" v-model="total"></el-input-number>
</el-form-item>
<el-form-item label="袋数">
<el-input-number disabled :controls="false" style="margin-top: -5px;text-align: right" v-model="totalNum"></el-input-number>
</el-form-item>
</el-form>
<el-table :data="scanLabelDetailList" stripe border height="400">
<el-table-column label="操作" align="center">
<template slot-scope="{row,$index}">
<el-link style="cursor:pointer;" @click="removeScanLabel(row)">删除</el-link>
</template>
</el-table-column>
<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" show-overflow-tooltip>
<template slot-scope="{row,$index}">
{{detail.partNo}}
</template>
</el-table-column>
<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 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 style="display:flex;justify-content:space-between;align-items:center;">
<el-table :data="scanLabelDetailList" style="width: 60%" stripe border height="400" highlight-current-row>
<el-table-column label="操作" align="center" v-if="!isReport">
<template slot-scope="{row,$index}">
<el-link style="cursor:pointer;" @click="removeScanLabel(row)">删除</el-link>
</template>
</el-table-column>
<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" show-overflow-tooltip>
<template slot-scope="{row,$index}">
{{detail.partNo}}
</template>
</el-table-column>
<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 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 style="width: 700px;display: flex;flex-wrap: wrap;align-items: center;">
<div class="pad" style="width: 50%;">
<h5 style="margin-left: 30px;font-size: 20px">产品图片</h5>
<el-form :inline="true" style="margin-left: 30px" label-position="top">
<el-form-item :label="'产品编码:'" style="margin-left: 0px">
<el-input v-model="detail.partNo" readonly style="width: 220px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" style="margin-top: 20px;margin-left: 30px" label-position="top">
<el-form-item :label="fileTitle">
<el-input v-model="fileName" style="width: 374px" readonly></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" style="margin-top: 20px;margin-left: 30px" label-position="top">
<el-form-item :label="' '">
<el-button @click="lastPicture()" style="margin-left: 10px;height: 35px;width: 90px" type="primary">
上一张
</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="nextPicture()" style="margin-left: 25px;height: 35px;width: 90px" type="primary">
下一张
</el-button>
</el-form-item>
</el-form>
</div>
<div id="padPhoto" style="text-align: center;width: 50%;vertical-align:middle;margin-top: 5px">
<img style="max-width: 100%;max-height: 380px;vertical-align:middle;" :src="photoUrl">
</div>
</div>
</div>
<div style="height: 20px"></div>
</el-dialog>
</div>

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

@ -208,7 +208,7 @@ export default {
<el-table
:height="height"
:data="delNotifyHeaderList"
border stripe
border highlight-current-row
@row-click="rowClickDelNotifyHeaderTable"
style="margin-top: 10px;">
<el-table-column

Loading…
Cancel
Save