Browse Source

FQC标签打印 2022-05-20 sxm

master
[li_she] 4 years ago
parent
commit
45c60c7fe6
  1. 2
      src/views/modules/common/column.vue
  2. 616
      src/views/modules/common/com-roll-label.vue
  3. 405
      src/views/modules/yieldReport/otherReport/fqc_merge_roll.vue
  4. 19
      src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue

2
src/views/modules/common/column.vue

@ -60,7 +60,7 @@
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="updateColumnList()" >确定</el-button> <el-button type="primary" @click="updateColumnList()" >确定</el-button>
<el-button @click="visible = false">取消</el-button>
<el-button @click="visible = false" type="primary">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>

616
src/views/modules/common/com-roll-label.vue

@ -0,0 +1,616 @@
<template>
<div class="sl-el">
<el-dialog ref="printLoading" :close-on-click-modal="false" :show-close="false" :close-on-press-escape="false"
title="标签打印"
:visible.sync="visible"
width="800px" v-drag>
<el-container>
<el-main style="width: 75%;margin-top: -20px">
<el-row>
<el-col :span="18">
<el-form @submit.native.prevent label-position="top">
<el-form-item style="width: 60%" :label="'请输入卷号:'">
<el-input readonly v-model="rollNos" class="input-with-select"
@keyup.enter.native="getBoxSoAndReportFile()">
<el-button @click="getBoxSoAndReportFile()" slot="append" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6"></el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>请选择标签:</span>
<el-table
:data="reportFileList"
border
ref="reportFileTable"
highlight-current-row
@current-change="handleCurrentChange"
height="150px">
<el-table-column
v-for="(item,index) in reportColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<span>打印格式名称:</span>
<el-input type="textarea" v-model="selectReportString" readonly :rows="3"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-tabs style="font-size: 14px" v-model="activeName" type="border-card" @tab-click="handleClick"
class="customer-tab">
<el-tab-pane label="打印参数" name="first">
<el-table
:data="reportParamList"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
border
:height="height"
>
<el-table-column
v-for="(item,index) in printParamColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="item.columnHidden">
<span v-if="scope.row.valuetypeDb === 'T'">
<el-input v-model='scope.row[item.columnProp]'> </el-input>
</span>
<span v-if="scope.row.valuetypeDb === 'D'">
<el-date-picker style="width: 100%;"
v-model='scope.row[item.columnProp]'> </el-date-picker>
</span>
<span v-if="scope.row.valuetypeDb === 'I'">
<el-input type="number" v-model='scope.row[item.columnProp]' min="1"> </el-input>
</span>
</span>
<span v-else>{{ scope.row[item.columnProp] }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</el-main>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="bartenderPrint()">打印</el-button>
<el-button type="primary" @click="closeDialog()">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
checkRollCustomer,
getRollCustomer,
getReportFileByCustomer,
getReportSubFileList,
getReportParameters,
printLabel
} from '@/api/print/rollPrint.js';
export default {
components: {},
data() {
return {
visible: false,
rollNos: '',
activeName: 'first',
height: 200,
//
reportColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "reportid",
columnLabel: "报告编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: "this.$route.meta.menuId",
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "Reportfile",
columnLabel: "报告文件名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: "this.$route.meta.menuId",
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "Remark",
columnLabel: "备注",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: "this.$route.meta.menuId",
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "DefaultFlag",
columnLabel: "默认格式",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: "this.$route.meta.menuId",
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
},
],
//
printParamColumnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "parametername",
columnLabel: "参数名",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: "this.$route.meta.menuId",
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "parameterdesc",
columnLabel: "参数标题",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: "this.$route.meta.menuId",
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "optionvalue",
columnLabel: "参数值",
columnHidden: true,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: "this.$route.meta.menuId",
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "valuetype",
columnLabel: "参数类型",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: "this.$route.meta.menuId",
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
},
],
//
//
reportFileList: [],
//
selectReportFileList: [],
selectReportString: '',
//
orderInfo: {
userName: this.$store.state.user.name,
rollNo: '',
customerId: '',
totalQty: 0,
perBoxQty: 0,
boxQty: 0,
lastBoxQty: 0,
rollNos: [],
//
reportFileList: [],
//
param: []
},
//
printParamList: [],
//
reportParamList: [],
buttons: {
settingLanguageList: '按语言设置',
edit: '编辑',
delete: '删除',
deleteList: '批量删除',
cz: '操作',
search: '查询',
download: '导出',
settingTable: '设置列表',
defaultTable: '设置默认配置',
list: "列表",
addList: '批量添加',
settingLanguage: "按控件设置"
},
// end
buttonList: [
{
functionId: "this.$route.meta.menuId",
languageValue: '按语言设置',
objectId: 'settingLanguageList',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '编辑',
objectId: 'edit',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '删除',
objectId: 'delete',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '批量删除',
objectId: 'deleteList',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '操作',
objectId: 'cz',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '查询',
objectId: 'search',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '导出',
objectId: 'download',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '设置列表',
objectId: 'settingTable',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '设置默认配置',
objectId: 'defaultTable',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '列表',
objectId: 'list',
objectType: "button",
tableId: "common1001"
},
{
functionId: "this.$route.meta.menuId",
languageValue: '按控件设置',
objectId: 'settingLanguage',
objectType: "button",
tableId: "common1001"
}
],
}
},
watch: {
orderInfo: {
handler: function (val, oldVal) {
if (this.orderInfo.totalQty > 0 && this.orderInfo.perBoxQty > 0) {
this.orderInfo.lastBoxQty = this.decimalUtil.mod(this.orderInfo.totalQty, this.orderInfo.perBoxQty)
if (this.decimalUtil.div(this.orderInfo.totalQty, this.orderInfo.perBoxQty) < 1) {
this.orderInfo.boxQty = 1
} else {
this.orderInfo.boxQty = this.decimalUtil.formatDown(this.decimalUtil.div(this.orderInfo.totalQty, this.orderInfo.perBoxQty), 0)
}
}
},
//
deep: true
},
updateData: {
deep: true,
handler: function (newV, oldV) {
this.updateData.projectID = this.updateData.projectID.toUpperCase();
this.updateData.oriSOOrderNo = this.updateData.oriSOOrderNo.toUpperCase();
this.updateData.orderType = this.updateData.orderType.toUpperCase();
}
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 800;
})
},
methods: {
closeDialog() {
this.visible = false
this.selectReportString = ''
this.reportParamList = []
},
init(val) {
this.visible = true
this.rollNos = val
this.searchBoxLabelSO()
},
// bartender
bartenderPrint() {
if (!this.rollNos) {
this.$message.warning('请输入卷号')
return
}
if (this.selectReportFileList.length === 0) {
this.$message.warning('选择模板进行打印')
return
}
const loading = this.$loading({
lock: true,
text: '正在打印',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let rollNoList = this.rollNos.split(";")
this.orderInfo.reportFileList = this.selectReportFileList
this.orderInfo.param = this.reportParamList
this.orderInfo.rollNos = rollNoList
this.printParamList = JSON.parse(JSON.stringify(this.reportParamList))
printLabel(this.orderInfo).then(({data}) => {
if (data.code === 0) {
this.$message.success(data.msg)
this.visible = false
} else {
this.$message.warning(data.msg)
}
loading.close();
})
},
//
searchBoxLabelSO() {
if (!this.rollNos) {
this.$message.warning('请输入卷号')
return
}
let rollNoList = this.rollNos.split(";")
this.reportFileList = []
checkRollCustomer(rollNoList).then(({data}) => {
if (data.code === 0) {
getRollCustomer(rollNoList[0]).then(({data}) => {
if (data.code === 0) {
let query = {
customerId: data.data.customerId ? data.data.customerId : '*',
reportFamily: '卷标签'
}
getReportFileByCustomer(query).then(({data}) => {
if (data.code === 0) {
this.reportFileList = data.dataList
this.$refs.reportFileTable.setCurrentRow(this.reportFileList[0]);
} else {
this.$message.warning(data.msg)
Object.assign(this.$data, this.$options.data.call(this.orderInfo));
Object.assign(this.$data, this.$options.data.call(this.selectReportString));
Object.assign(this.$data, this.$options.data.call(this.reportParamList));
}
})
} else {
this.$message.warning(data.msg)
}
})
} else {
this.$message.warning(data.msg)
}
})
},
//
getBoxSoAndReportFile() {
this.searchBoxLabelSO()
},
handleClick() {
},
//
handleCurrentChange(val) {
if (!val) return
this.selectReportFileList = []
let query = {
reportId: val.reportid,
defaultFlag: val.DefaultFlag,
reportFile: val.Reportfile,
reportFamily: '外箱标签',
customerId: this.orderInfo.customerId,
}
this.selectReportFileList.push(query)
this.searchReportSubFileList(query)
this.searchReportParameters(query)
},
//
searchReportSubFileList(val) {
let str = ''
str += val.reportId + ' | ' + val.reportFile + '\n'
this.selectReportString = str
getReportSubFileList(val).then(({data}) => {
if (data.code === 0) {
for (let item of data.data) {
str += item.reportid + ' | ' + item.Reportfile + '\n'
let reportFile = {
reportId: item.reportid,
defaultFlag: 'Y',
reportFile: item.Reportfile,
reportFamily: '外箱标签',
customerId: this.orderInfo.customerId,
}
this.selectReportFileList.push(reportFile)
}
this.selectReportString = str
}
})
},
//
searchReportParameters(val) {
let printParamList = JSON.parse(JSON.stringify(this.printParamList))
getReportParameters(val.reportId).then(({data}) => {
if (data.code === 0) {
this.reportParamList = data.data
if (printParamList) {
for (let item1 of printParamList) {
for (let item2 of this.reportParamList) {
if (item1.parametername === item2.parametername) {
item2.optionvalue = item1.optionvalue
}
}
}
}
}
})
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if (columnIndex === 2) {
return 'customer-text-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if (columnIndex === 2) {
return 'padding: 0px 0px;';
}
},
},
created() {
}
}
</script>
<style scoped>
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
/deep/ .sl-el .el-tabs__item {
padding: 0 13px;
height: 26px;
line-height: 26px;
font-size: 12px;
font-weight: 500;
}
/deep/ div.table-input {
padding: 0px 0px;
height: 25px !important;
}
/*table中input*/
div.table-input /deep/ input.el-input__inner {
padding: 0px 0px;
height: 23px !important;
text-align: right;
}
</style>

405
src/views/modules/yieldReport/otherReport/fqc_merge_roll.vue

@ -0,0 +1,405 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="300px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 100px;"
label-width="80px">
<!-- 当前卷 -->
<el-row>
<el-col :span="10">
<el-form-item class="customer-item" label="当前卷号:">
<el-input v-model="pageData.rollNo" readonly style="width: 100px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-item" label="当前卷数量:">
<el-input v-model="pageData.rollQty" @blur="checkValidQty" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="customer-item" label="">
</el-form-item>
</el-col>
</el-row>
<!-- 新卷 -->
<el-row>
<el-col :span="10">
<el-form-item class="customer-item" label="新卷卷号:">
<el-input ref="newRollNo" v-model="pageData.newRollNo" style="width: 100px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-item" label="新卷数量:">
<el-input v-model="pageData.newRollQty" @blur="checkValidQty" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="customer-item" label="总数量:">
<el-input v-model="pageData.totalQty" readonly style="width: 60px;"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: -20px;">
<el-button type="primary" @click="warnMergeSfdcRollsConfirm"> </el-button>
<el-button type="primary" @click="closeDialog">关闭</el-button>
</span>
</el-dialog>
<com-roll-label ref="comRollLabel" ></com-roll-label>
</div>
</template>
<script>
import comRollLabel from "../../common/com-roll-label";/*切换操作员*/
import {
getMergeRollPageData,
checkMergeSfdcRoll,/*校验是否合并卷*/
processMergeSfdcRoll,/*执行合并卷的操作*/
getSfdcFlowLabelData,/*执行打印的请求*/
} from "@/api/yieldReport/com_merge_roll.js";
/*打印标签专用的js*/
import {
printSfdcLabel,
} from "@/views/modules/yieldReport/print_roll_label.js";
export default {
data() {
return {
titleCon: '合并卷',
rollType: '',
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
scheduledDate: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
seqNo: '',
rollNo: '',
rollQty: 0,
newRollNo: '',/*参与合并的新卷号*/
newRollQty: 0,/*参与合并的新卷号*/
reportTime: '',
reportedFlag: 'N',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
currentRollFlag: false
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
}
},
components: {
comRollLabel,//
},
methods: {
//
init(scheduleData, operatorData, rollType) {
this.rollType = rollType ? 1 : 0
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
this.pageData.reportTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollNo = scheduleData.rollNo;
this.pageData.operatorId = operatorData.operatorId;
this.pageData.newRollNo = '';
this.pageData.newRollQty = 0;
this.pageData.totalQty = 0;
//
this.refreshPageData();
//
this.$nextTick(() => {
this.$refs.newRollNo.focus();
});
},
/*刷新页面的参数*/
refreshPageData() {
getMergeRollPageData(this.pageData).then(({data}) => {
//
if (data.code == 200) {
this.pageData.rollQty = data.row.resultQty;//
this.pageData.totalQty = data.row.resultQty;//
} else {
this.pageData.rollQty = 0;//
this.pageData.totalQty = 0;//
}
});
},
/*关闭modal*/
closeDialog() {
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*检验良品的总数量*/
checkValidQty() {
//
let rollQty = parseInt(this.pageData.rollQty);
if (rollQty == null || rollQty == '') {
//this.$message.error('!');
this.pageData.rollQty = 0;//
}
//
if (rollQty <= 0) {
//this.$message.error('!');
this.pageData.rollQty = 0;//
} else {
this.pageData.rollQty = rollQty;
}
//
let newRollQty = parseInt(this.pageData.newRollQty);
if (newRollQty == null || newRollQty == '') {
//this.$message.error('!');
this.pageData.newRollQty = 0;//
}
if (newRollQty <= 0) {
//this.$message.error('!');
this.pageData.newRollQty = 0;//
} else {
this.pageData.newRollQty = newRollQty;
}
//
this.pageData.totalQty = newRollQty + rollQty;
},
/*执行是否需要提示的操作*/
warnMergeSfdcRollsConfirm() {
//
let newRollQty = this.pageData.newRollQty;
if (newRollQty == null || newRollQty == '') {
this.$message.error('请输入新卷数量!');
this.pageData.newRollQty = 0;//
return false;
}
if (newRollQty <= 0 || !Number.isInteger(newRollQty)) {
this.$message.error('新卷数量必须是大于零的整数!');
this.pageData.newRollQty = 0;//
return false;
}
//
if (this.pageData.rollNo === this.pageData.newRollNo) {
this.$message.error('相同卷号无法合并!');
this.pageData.newRollNo = '';
return false;
}
let requestData = {
'site': this.pageData.site,
'orderNo': this.pageData.orderNo,
'itemNo': this.pageData.itemNo,
'seqNo': this.pageData.seqNo,
'rollNo': this.pageData.rollNo,
'rollQty': this.pageData.rollQty,
'newRollNo': this.pageData.newRollNo,
'newRollQty': this.pageData.newRollQty,
'username': this.pageData.username,
'operatorId': this.pageData.operatorId,
parkFlag: this.rollType == 1 ? 'Y' : 'N',
'newRollFlag': false
};
//
checkMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == 300) {
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning"
}).then(() => {
//
requestData.newRollFlag = true;
checkMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == 300) {
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning"
}).then(() => {
//
processMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.$nextTick(() => {
this.$refs.comRollLabel.init(data.rollNo)
});
// --
setTimeout(() => {
this.closeDialog();
}, 1000);
}
});
});
} else {
//
processMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.$nextTick(() => {
this.$refs.comRollLabel.init(data.rollNo)
});
setTimeout(() => {
this.closeDialog();
}, 1000);
}
});
}
});
});
//
} else {
//
requestData.newRollFlag = true;
checkMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == 300) {
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning"
}).then(() => {
//
processMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
let printRow = {
site: this.pageData.site, orderNo: this.pageData.orderNo,
rollNo: data.rollNo
};
this.printSfdcFlowLabel(printRow);
// --
setTimeout(() => {
this.closeDialog();
}, 1000);
}
});
});
} else {
//
processMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
let printRow = {
site: this.pageData.site, orderNo: this.pageData.orderNo,
rollNo: data.rollNo
};
this.printSfdcFlowLabel(printRow);
// --
setTimeout(() => {
this.closeDialog();
}, 1000);
}
});
}
});
}
});
},
/*打印流转标签*/
printSfdcFlowLabel(sfdcRow) {
//
getSfdcFlowLabelData(sfdcRow).then(({data}) => {
//
if (data.code === 200) {
let printList = data.printList;
printSfdcLabel(printList);
} else {
this.$message.error(data.msg);
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button {
margin-top: 25px;
}
/*调节fieldset下的样式*/
.customer-fieldset .customer-item {
margin-top: -15px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf {
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
</style>

19
src/views/modules/yieldReport/otherReport/fqc_produce_report_normal.vue

@ -263,6 +263,9 @@
width="115" width="115"
:label="'操作'"> :label="'操作'">
<template slot-scope="scope"> <template slot-scope="scope">
<a class="customer-a"
@click="rollPrintLabel(scope.row)"
>打印</a>
<a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag != 'N'" <a class="customer-a" v-if="operatorData.operatorName != '' && scope.row.finishedFlag != 'N'"
@click="warnReopenSfdcRollsConfirm(scope.row)" @click="warnReopenSfdcRollsConfirm(scope.row)"
>重打开</a> >重打开</a>
@ -442,6 +445,8 @@
<!-- 为生产下机拆卷 --> <!-- 为生产下机拆卷 -->
<notOverFinishRoll ref="notOverFinishRoll" :visible.sync="showNotOverFlag" <notOverFinishRoll ref="notOverFinishRoll" :visible.sync="showNotOverFlag"
@refreshPageData="refreshPageData"></notOverFinishRoll> @refreshPageData="refreshPageData"></notOverFinishRoll>
<com-roll-label ref="comRollLabel" ></com-roll-label>
</div> </div>
</template> </template>
@ -474,12 +479,13 @@ import {
checkSfdcDefect checkSfdcDefect
} from "@/api/yieldReport/produce_report_normal.js"; } from "@/api/yieldReport/produce_report_normal.js";
/*引入组件*/ /*引入组件*/
import comRollLabel from "../../common/com-roll-label";/*切换操作员*/
import comSwitchOperator from "../com_switch_operator";/*切换操作员*/ import comSwitchOperator from "../com_switch_operator";/*切换操作员*/
import otherSwitchRoll from "./other_switch_roll";/*切换卷操作*/ import otherSwitchRoll from "./other_switch_roll";/*切换卷操作*/
import comSeparateRoll from "../com_separate_roll"; import comSeparateRoll from "../com_separate_roll";
import comFinishRoll from "../com_finish_roll";/*结束卷数的组件*/ import comFinishRoll from "../com_finish_roll";/*结束卷数的组件*/
import comFinishPartRoll from "../com_finish_part_roll";// import comFinishPartRoll from "../com_finish_part_roll";//
import comMergeRoll from "../com_merge_roll";/*合并卷的组件*/
import comMergeRoll from "./fqc_merge_roll";/*合并卷的组件*/
import comStartTuning from "../com_start_tuning";/*开始调机组件*/ import comStartTuning from "../com_start_tuning";/*开始调机组件*/
import comStartProduce from "../com_start_produce";/*开始生产组件*/ import comStartProduce from "../com_start_produce";/*开始生产组件*/
import comDefectRoll from "../com_defect_roll";/*报告不良品卷*/ import comDefectRoll from "../com_defect_roll";/*报告不良品卷*/
@ -2788,6 +2794,7 @@ export default {
} }
}, },
components: { components: {
comRollLabel,//
comSwitchOperator,/*切换用户的组件*/ comSwitchOperator,/*切换用户的组件*/
otherSwitchRoll,/*切换卷操作*/ otherSwitchRoll,/*切换卷操作*/
comSeparateRoll,/*創建分卷组件*/ comSeparateRoll,/*創建分卷组件*/
@ -2810,6 +2817,12 @@ export default {
notOverFinishRoll, /*未结生产订单下机*/ notOverFinishRoll, /*未结生产订单下机*/
}, },
methods: { methods: {
//
rollPrintLabel(val){
this.$nextTick(() => {
this.$refs.comRollLabel.init(val.rollNo)
});
},
// //
sfdcDefectListSummaries(param){ sfdcDefectListSummaries(param){
const { columns, data } = param; const { columns, data } = param;
@ -3341,6 +3354,10 @@ export default {
this.$message.error(data.msg); this.$message.error(data.msg);
} else if (data.code == 200) { } else if (data.code == 200) {
this.$message.success(data.msg) this.$message.success(data.msg)
//
this.$nextTick(() => {
this.$refs.comRollLabel.init(data.rollNos)
});
// //
this.getSfdcRollList() this.getSfdcRollList()
}else { }else {

Loading…
Cancel
Save