Browse Source

模切工站 FQC工站

master
DouDou 2 years ago
parent
commit
1180caae6c
  1. 13
      src/api/scheduleReport/com_die_cutting_report.js
  2. 11
      src/api/scheduleReport/com_fqc_report.js
  3. 7
      src/api/scheduleReport/com_scan_material.js
  4. 7
      src/api/scheduleReport/com_separate_roll.js
  5. 4
      src/api/scheduleReport/produce_order.js
  6. 1208
      src/views/modules/scheduleReport/com_die_cutting_report.vue
  7. 987
      src/views/modules/scheduleReport/com_fqc_report.vue
  8. 223
      src/views/modules/scheduleReport/com_scan_material.vue
  9. 318
      src/views/modules/scheduleReport/com_separate_roll.vue
  10. 146
      src/views/modules/scheduleReport/print_roll_label.js
  11. 677
      src/views/modules/scheduleReport/produce_order.vue

13
src/api/scheduleReport/com_die_cutting_report.js

@ -0,0 +1,13 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取派工单信息
export const getScheduleDataBySeqNo = data => createAPI('schedule/getScheduleDataBySeqNo', 'POST', data)
// 获取当前上机卷信息
export const getCurrentRollOpsBySeqNo = data => createAPI('schedule/getCurrentRollOpsBySeqNo', 'POST', data)
// 获取当前派工单的上机卷记录
export const getSfdcRollOpsByCon = data => createAPI('schedule/getSfdcRollOpsByCon', 'POST', data)
// 获取当前上机卷信息
export const getSoFinalRollsByCon = data => createAPI('schedule/getSoFinalRollsByCon', 'POST', data)

11
src/api/scheduleReport/com_fqc_report.js

@ -0,0 +1,11 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取派工单信息
export const getScheduleDataBySeqNo = data => createAPI('schedule/getScheduleDataBySeqNo', 'POST', data)
// 获取当前上机卷信息
export const getSoFinalRollsByCon = data => createAPI('schedule/getSoFinalRollsByCon', 'POST', data)
// 检验当前的卷信息
export const scanFinalRollNo = data => createAPI('schedule/scanFinalRollNo', 'POST', data)

7
src/api/scheduleReport/com_scan_material.js

@ -0,0 +1,7 @@
import { createAPI } from '@/utils/httpRequest.js'
// 查询材料卷信息
export const getRmRollData = data => createAPI('schedule/getRmRollData', 'POST', data)
// 材料下机操作
export const scanRmRollNo = data => createAPI('schedule/scanRmRollNo', 'POST', data)

7
src/api/scheduleReport/com_separate_roll.js

@ -0,0 +1,7 @@
import { createAPI } from '@/utils/httpRequest.js'
//获取当前派工单的标准卷数量
export const getSeqStandardRollQty = data => createAPI('schedule/getSeqStandardRollQty', 'POST', data)
// 执行创建分卷的操作
export const createSeparateRoll = data => createAPI('schedule/createSeparateRoll', 'POST', data)

4
src/api/scheduleReport/produce_order.js

@ -0,0 +1,4 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取
export const getProduceScheduleList = data => createAPI('schedule/getProduceScheduleData', 'POST', data)

1208
src/views/modules/scheduleReport/com_die_cutting_report.vue
File diff suppressed because it is too large
View File

987
src/views/modules/scheduleReport/com_fqc_report.vue

@ -0,0 +1,987 @@
<script src="print_roll_label.js"></script>
<template>
<div class="produce-report customer-css">
<el-dialog v-drag
width="900px" class="customer-dialog" :visible.sync="visible"
:title="titleCon" v-bind="$attrs" v-on="$listeners">
<el-form :inline="true" label-position="top" style="height: 507px;"
label-width="80px">
<!-- 第一行信息 -->
<el-form style="margin-top: -10px;">
<el-form-item :label=labels.orderNo class="customer-item">
<el-input v-model="scheduleData.orderNo" :readonly="true" style="width: 130px;"></el-input>
</el-form-item>
<el-form-item :label=labels.partNo class="customer-item">
<el-input v-model="scheduleData.partNo" :readonly="true" style="width: 130px;"></el-input>
</el-form-item>
<el-form-item :label=labels.partDesc class="customer-item">
<el-input v-model="scheduleData.partDesc" :readonly="true" style="width: 200px;"></el-input>
</el-form-item>
<el-form-item :label=labels.seqNo class="customer-item">
<el-input v-model="scheduleData.seqNo" :readonly="true" style="width: 80px;"></el-input>
</el-form-item>
<!-- <el-form-item :label="''" style="margin-left: -5px;" class="customer-item">
<el-checkbox style="margin-left: 30px; margin-top: 20px;" true-label="true" false-label="false"
v-model="scheduleData.currentRollFlag">{{ labels.onlyCurrentRoll }}
</el-checkbox>
</el-form-item>-->
</el-form>
<!-- 第四行菜单 -->
<fieldset class="customer-fieldset" style="width: 880px;">
<legend class="customer-legend">{{ labels.rollButtons }}</legend>
<el-form>
<el-form-item class="customer-roll-css" style="width: 130px; font-size: 16px; color: #387877;">
<el-input v-model="searchData.rollNo" ref="rollNo" style="width: 180px"
@keyup.enter.native="scanFinalRollNoFun">
</el-input>
</el-form-item>
<el-form-item>
<el-button class="customer-bun-mid" type="primary" @click="refreshPageData"
style="margin-left: 200px; margin-top: 0px; margin-bottom: 5px;">
{{ buttons.refreshButton }}
</el-button>
</el-form-item>
</el-form>
</fieldset>
<!-- 列表展示区域 -->
<fieldset class="customer-fieldset" style="margin-bottom: 10px; width: 880px; height: 400px;">
<legend class="customer-legend">{{ labels.listDesc }}</legend>
<el-tabs v-model="activeTable" style="margin-top: -3px; width: 870px; height: 375px;"
type="border-card" @tab-click="tabClick" class="customer-tab">
<!-- 下机记录 -->
<el-tab-pane :label=labels.rollList name="sfdc_roll">
<el-table
height="350"
:data="soFinalRollList"
border
v-loading="dataListLoading"
highlight-current-row
@current-change="setSfdcRoll"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnRollArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false: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-column
fixed="left"
header-align="center"
align="center"
width="150"
:label=labels.rollListOperation>
<template slot-scope="scope">
<!-- <a class="customer-a" v-if="operatorData.operatorName != ''"
@click="printSfdcFlowLabel(scope.row)"
>{{ labels.rollListPrint }}</a>-->
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</fieldset>
</el-form>
</el-dialog>
</div>
</template>
<script>
import {
getScheduleDataBySeqNo,
getSoFinalRollsByCon,
scanFinalRollNo,
} from "@/api/scheduleReport/com_fqc_report.js";
/*打印标签专用的js*/
import {
printSfdcLabel,
} from "@/views/modules/scheduleReport/print_roll_label.js"
import comScanMaterial from './com_scan_material' /* 扫描卷的组件 */
import comSeparateRoll from "./com_separate_roll";
var functionId = 'C10000004';
export default {
data() {
return {
titleCon: '',
visible: false,
activeTable: 'sfdc_roll',
soFinalRollList: [],
columnRollArray: [
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303RollFinalRollNo',
tableId: "5303Roll",
tableName: "下机卷",
columnProp: "finalRollNo",
headerAlign: "center",
align: "center",
columnLabel: "卷号",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303RollCreatedDate',
tableId: "5303Roll",
tableName: "下机卷",
columnProp: "createdDate",
headerAlign: "center",
align: "center",
columnLabel: "创建时间",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303RollCreatedBy',
tableId: "5303Roll",
tableName: "下机卷",
columnProp: "createdBy",
headerAlign: "center",
align: "center",
columnLabel: "创建人",
columnWidth: 90,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303RollRollQty',
tableId: "5303Roll",
tableName: "下机卷",
columnProp: "rollQty",
headerAlign: "center",
align: "center",
columnLabel: "卷数量",
columnWidth: 55,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: false
},
],
searchData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
partNo: '',
workCenterNo: '',
rollNo: '',
functionName: '',
statusCode: 1,
},
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
rollNo: '',
partDesc: '',
functionName: '',
currentRollFlag: false,
statusCode: 1,
},
currentRollOps: {
site: this.$store.state.user.site,
seqNo: '',
rollNo: '',
finishedFlag: '',
},
dataListLoading: false,
buttons: {
scanMaterialButton: '扫描材料卷',
separateRoll: '创建分卷',
refreshButton: '刷新',
},
buttonList: [
{
functionId: functionId,
languageValue: '扫描材料卷',
objectId: 'scanMaterialButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '切换卷',
objectId: 'switchRoll',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '创建分卷',
objectId: 'separateRoll',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '结束卷',
objectId: 'finishRoll',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '合并卷',
objectId: 'mergeRoll',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '结单',
objectId: 'finishSchedule',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '刷新',
objectId: 'refreshButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '切换用户',
objectId: 'switchOperator',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '开始调机',
objectId: 'startTuning',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '开始生产',
objectId: 'startProduce',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '报告不良',
objectId: 'reportDefect',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '刀模板',
objectId: 'toolButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料',
objectId: 'materialButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '报告其他停机',
objectId: 'downTime',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '其他操作',
objectId: 'otherOperation',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '产量报告',
objectId: 'preReport',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '删除卷',
objectId: 'deleteRoll',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '未生产下机拆卷',
objectId: 'notProduce',
objectType: 'button',
tableId: '*'
}
],
labels: {
componentTitle: '机台工作台',
orderNo: '订单号',
partNo: '物料编码',
partDesc: '物料名称/规则',
seqNo: '派工单号',
needDate: '要求完工日期',
planStartDate: '刷新',
lotSize: '原始派工单需求数量',
scheduledDate: ' 排产日期',
rollButtons: '卷操作',
listDesc: '列表信息',
rollList: '扫描卷',
scanButtons: '扫描',
rollListDelete: '删除卷',
rollListPrint: '打印卷标签',
toolListOperation: '操作',
materialListOperation: '操作',
rollListOperation: '操作',
noneRollNo: '!',
sureDeleteRoll: '确定要删除',
currentRollNo: '当前卷?',
confirmLabel: '确定',
cancelLabel: '取消',
sureLabel: '吗?',
rollSplit: '创建分卷',
scannerMaterial: '扫描材料',
materialMalformed: '材料异常处理',
},
labelsList: [
{
functionId: functionId,
languageValue: '机台工作台',
objectId: 'componentTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '订单号',
objectId: 'orderNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '物料编码',
objectId: 'partNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '物料名称/规则',
objectId: 'partDesc',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '派工单号',
objectId: 'seqNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '要求完工日期',
objectId: 'needDate',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '要求开工日期',
objectId: 'planStartDate',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '原始派工单需求数量',
objectId: 'lotSize',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '排产日期',
objectId: 'scheduledDate',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '班次',
objectId: 'shiftNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '前道工序',
objectId: 'preItemNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '后道工序',
objectId: 'nextItemNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '仅显示当前卷信息',
objectId: 'onlyCurrentRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷操作',
objectId: 'rollButtons',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '列表信息',
objectId: 'listDesc',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '时间',
objectId: 'timeList',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '刀模板记录',
objectId: 'toolList',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料',
objectId: 'materialList',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '生产卷操作信息',
objectId: 'rollopsList',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '不良记录',
objectId: 'defectList',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '扫描卷',
objectId: 'rollList',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '生产调机',
objectId: 'produceButtons',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '不良',
objectId: 'defectButtons',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '扫描',
objectId: 'scanButtons',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '停机',
objectId: 'downTimeButtons',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '其他操作',
objectId: 'otherButtons',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '刀模替换',
objectId: 'toolListReplace',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '结束使用',
objectId: 'toolListFinish',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '不良',
objectId: 'defectButtons',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '换料',
objectId: 'materialListReplace',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '下料',
objectId: 'materialListCutting',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '生产结束',
objectId: 'materialListFinish',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '重打开',
objectId: 'rollListReopen',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '删除卷',
objectId: 'rollListDelete',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '打印卷标签',
objectId: 'rollListPrint',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '操作',
objectId: 'toolListOperation',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '操作',
objectId: 'materialListOperation',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '操作',
objectId: 'rollListOperation',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '!',
objectId: 'noneRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确定要删除',
objectId: 'sureDeleteRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前卷?',
objectId: 'currentRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确定',
objectId: 'confirmLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '取消',
objectId: 'cancelLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请先选择派工单!',
objectId: 'pleaseSelectSeqNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确实要创建一个新卷吗?',
objectId: 'sureCreateNewRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '参与无法合并卷!',
objectId: 'noRollCantMerge',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确实要重新打开卷',
objectId: 'sureReopenSfdcRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '吗?',
objectId: 'sureLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确实要删除该卷吗?',
objectId: 'sureDeleteCurrentRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确实要结束该工具的使用吗?',
objectId: 'sureEndThisToolUsed',
objectType: 'label',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
components: {
comScanMaterial, /* 扫描卷的组件 */
comSeparateRoll, /* 创建分卷 */
},
methods: {
init(seqNo) {
//
this.scheduleData.seqNo = seqNo;
this.currentRollOps.seqNo = seqNo;
this.soFinalRollList = [];
//table
this.activeTable = 'sfdc_roll';
//
this.$nextTick(() => {
this.$refs.rollNo.focus();
});
//
this.refreshPageData();
//
this.visible = true;
},
//
async refreshPageData() {
await getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => {
this.scheduleData.seqNo = data.row.seqNo;
this.scheduleData.orderNo = data.row.orderNo;
this.scheduleData.itemNo = data.row.itemNo;
this.scheduleData.resourceId = data.row.resourceId;
this.scheduleData.partNo = data.row.partNo;
this.scheduleData.partDesc = data.row.partDesc;
this.scheduleData.scheduledDate = data.row.scheduledDate;
this.scheduleData.workCenterNo = data.row.workCenterNo;
this.scheduleData.closedFlag = data.row.closedFlag;
this.scheduleData.statusCode = 1;
this.searchData.orderNo = data.row.orderNo;
this.searchData.seqNo = data.row.seqNo;
//
this.titleCon = this.labels.componentTitle + ' - ' + data.row.itemDesc;
})
//table
await this.refreshCurrentTabTable();
},
//
setSfdcRoll(row) {
this.currentSfdcRollRow = row;
},
/*fqc检查卷号的数据*/
scanFinalRollNoFun() {
//null
if (this.searchData.rollNo == null || this.searchData.rollNo == '') {
this.$message.error('卷号不能为空!');
return false;
} else {
this.searchData.rollNo = this.searchData.rollNo.trim();
}
//
scanFinalRollNo(this.searchData).then(({data}) => {
if (data.code == 200){
this.getSoFinalList();
this.searchData.rollNo = '';
}else{
this.$message.error(data.msg);
this.searchData.rollNo = '';
return false;
}
})
},
//
getScheduleDataBySeqNo() {
getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => {
this.scheduleData.seqNo = data.row.seqNo;
this.scheduleData.orderNo = data.row.orderNo;
this.scheduleData.itemNo = data.row.itemNo;
this.scheduleData.partNo = data.row.partNo;
this.scheduleData.partDesc = data.row.partDesc;
this.scheduleData.scheduledDate = data.row.scheduledDate;
this.scheduleData.workCenterNo = data.row.workCenterNo;
});
},
//
tabClick(tab, event) {
//
this.refreshCurrentTabTable();
},
getSoFinalList() {
getSoFinalRollsByCon(this.searchData).then(({data}) => {
this.soFinalRollList = data.rows;
});
},
//table
async refreshCurrentTabTable() {
//
this.searchData = JSON.parse(JSON.stringify(this.scheduleData));
//
if (this.scheduleData.currentRollFlag) {
//
this.searchData.rollNo = this.currentRollOps.rollNo;
} else {
this.searchData.rollNo = '';
}
//
if (this.activeTable == 'sfdc_roll') {
this.getSoFinalList();
}
},
/*结束卷操作*/
finishRollModal() {
//1.
//checkProduceButton('finishRollFlag');
//
this.$nextTick(() => {
this.showFinishFlag = true;
this.$refs.comFinishRoll.init(this.scheduleData)
});
},
/*开始调机modal*/
startProduceModal() {
//1.
//checkProduceButton('startProduceFlag');
//
this.$nextTick(() => {
this.showProduceFlag = true;
this.$refs.comStartProduce.init(this.scheduleData)
});
},
/*材料结束生产的modal*/
finishMaterialModal(materialRow) {
this.$nextTick(() => {
this.showMaterialFlag = true;
this.$refs.comProduceMaterial.init(this.scheduleData)
});
},
/*提醒是否删除的提示*/
warnDeleteSfdcRollsConfirm(sfdcRollRow) {
this.$confirm(this.labels.sureDeleteCurrentRoll, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//sfdcRolls
this.deleteSfdcRollsOperation(sfdcRollRow);
});
},
/*执行删除sfdcRolls的数据功能*/
deleteSfdcRollsOperation(sfdcRollRow) {
let sfdcRoll = {
'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'rollNo': sfdcRollRow.rollNo, 'oriRollNo': sfdcRollRow.oriRollNo, 'operatorId': this.scheduleData.operatorId
};
//
deleteSfdcRolls(sfdcRoll).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.resultMap.resultMsg);
//
this.refreshPageData();
}
});
},
/*结束使用 工具确认功能*/
warnFinishToolConfirm(toolRow) {
this.$confirm(this.labels.sureEndThisToolUsed, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//使
this.finishToolOperation(toolRow);
});
},
/*执行删除sfdcRolls的数据功能*/
finishToolOperation(toolRow) {
let toolData = {
'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'histSeqNo': toolRow.histSeqNo, 'toolInstanceId': toolRow.toolInstanceId
};
//
processFinishTool(toolData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.refreshPageData();
}
});
},
/*结束使用 材料确认功能*/
warnFinishMaterialWithNoRemainderConfirm(materialRow) {
this.$confirm(this.labels.sureEndThisToolUsed, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//使
this.finishMaterialWithNoRemainderOperation(materialRow);
});
},
/*执行结束使用 材料的数据功能*/
finishMaterialWithNoRemainderOperation(materialRow) {
let materialData = {
'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'histSeqNo': materialRow.histSeqNo, 'rollNo': materialRow.rollNo
};
//使
finishMaterialWithNoRemainder(materialData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.refreshPageData();
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
}
/*当前按钮的通用样式*/
.customer-css .customer-bun-mid {
width: 60px;
text-align: center;
}
.customer-css .customer-bun-min {
width: 50px;
text-align: center;
}
.customer-css .customer-bun-max {
width: 80px;
text-align: center;
}
/*当前按钮的通用样式*/
.customer-css .el-button--medium {
padding: 5px 5px;
}
.customer-css .customer-roll-css span {
margin-left: 15px;
font-size: 16px;
color: #387877;
}
/*定制组件的样式*/
.customer-css /deep/ .el-dialog {
top: 6vh !important;
margin-top: 0px !important;
margin-bottom: 10px;
}
/*自定义当前el-input的样式 */
.customer-item .el-input {
margin-right: 25px;
}
</style>

223
src/views/modules/scheduleReport/com_scan_material.vue

@ -0,0 +1,223 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
:visible.sync="visible"
width="200px" style="height: 460px;" class="customer-dialog">
<el-container style="height: 160px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 材料卷号和BOM序号 -->
<el-row>
<el-col :span="16">
<el-form-item label="卷号:">
<el-input v-model="pageData.rmRollNo" ref="rmRollNo" style="width: 180px"
@keyup.enter.native="checkRmRollNo">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="物料编码:">
<el-input v-model="pageData.rmPartNo"
style="width: 180px;" disabled class="customer-color">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="数量">
<el-input v-model="pageData.rollQty"
style="width: 180px;" disabled class="customer-color">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="scanRmRollNoFun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getRmRollData,
scanRmRollNo,
} from "@/api/scheduleReport/com_scan_material.js";
var functionId = 'C10000002';
export default {
data() {
return {
titleCon: '扫描材料',
visible: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
rollNo: '',
partDesc: '',
scheduledDate: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
rollNo: '',
rmRollNo: '',
rmPartNo: '',
rollQty: 0,
closedFlag: 'N'
},
dataListLoading: false,
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '扫描材料',
},
labelsList: [
{
functionId: functionId,
languageValue: '扫描材料',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号:',
objectId: 'rmRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数量:',
objectId: 'rollQty',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData) {
//
this.scheduleData = JSON.parse(JSON.stringify(scheduleData));;
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollQty = 0;
this.pageData.rmRollNo = '';
this.pageData.rollNo = '';
this.pageData.rmPartNo = '';
this.visible = true;
//
this.$nextTick(() => {
this.$refs.rmRollNo.focus();
});
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
this.visible = false;
//
this.$emit('refreshPageData');
},
/*检查材料卷号的数据*/
checkRmRollNo() {
//null
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo == '') {
this.$message.error('卷号不能为空!');
return false;
} else {
this.pageData.rmRollNo = this.pageData.rmRollNo.trim();
}
this.pageData.rollNo = this.pageData.rmRollNo;
//
getRmRollData(this.pageData).then(({data}) => {
if (data.code == 200){
this.pageData.rollQty = data.row.rollQty;
this.pageData.rmPartNo = data.row.partNo;
}else{
this.$message.error(data.msg);
return false;
}
})
},
/*扫描材料上机*/
scanRmRollNoFun(){
//
scanRmRollNo(this.pageData).then(({data}) => {
if (data.code == 200){
this.$message.success(data.msg);
//
this.closeDialog();
}else{
this.$message.error(data.msg);
return false;
}
})
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

318
src/views/modules/scheduleReport/com_separate_roll.vue

@ -0,0 +1,318 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
:visible.sync="visible"
width="200px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 100px;"
label-width="80px">
<!-- 半成品卷卷号 -->
<el-row>
<el-col :span="24" style="margin-top: -5px;">
<el-form-item :label=labels.rollQty>
<el-input ref="rollQty" v-model="pageData.rollQty" style="width: 180px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="margin-top: -5px;">
<el-form-item :label=labels.rollNums>
<el-input v-model="pageData.rollNums" style="width: 180px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="createSeparateRollFun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getSeqStandardRollQty,
createSeparateRoll,/*执行创建分卷的操作*/
} from '@/api/scheduleReport/com_separate_roll.js';
/*打印标签专用的js*/
import {
printSfdcLabel,
} from "@/views/modules/scheduleReport/print_roll_label.js";
var functionId = 'C10000003';
export default {
data() {
return {
titleCon: '创建分卷',
visible: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
rollNo: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
seqNo: '',
rollNo: '',
reportDate: '',
reportTime: '',
rollQty: 0,
standardRollQty: 0,
rollNums: 1
},
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '创建分卷',
rollQty: '良品数量:',
rollNums: '卷数:',
confirmLabel: '确认',
cancelLabel: '取消',
},
labelsList: [
{
functionId: functionId,
languageValue: '创建分卷',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前时间:',
objectId: 'currentTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '良品数量:',
objectId: 'rollQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数:',
objectId: 'rollNums',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '良品数量必须是正整数!',
objectId: 'approvedQtyMustBeInteger',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数必须是正整数!',
objectId: 'rollQtyMustBeInteger',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '良品数量必须大于零且是整数!',
objectId: 'approvedQtyMustMoreTanZeroAndBeInteger',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数必须大于零且是整数!',
objectId: 'rollQtyMustMoreTanZeroAndBeInteger',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请先切换人员!',
objectId: 'pleaseSwitchOperator',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确认',
objectId: 'confirmLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '取消',
objectId: 'cancelLabel',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData) {
//
this.scheduleData = scheduleData;
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
//
this.getSeqStandardRollQtyFun();
//
this.pageData.rollNums = 1;
this.visible = true;
//
this.$nextTick(() => {
this.$refs.rollQty.focus();
});
this.titleCon = this.labels.titleCon;//
},
//
getSeqStandardRollQtyFun() {
//
getSeqStandardRollQty(this.pageData).then(({data}) => {
if (data.code == 200) {
this.pageData.standardRollQty = data.standardRollQty;
this.pageData.rollQty = data.standardRollQty;
}else{
this.$message.error(data.msg);
}
})
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.visible = false;
},
/*检查材料卷号的数据*/
checkValidQty() {
//
let rollQty = parseFloat(this.pageData.rollQty);
//
if (rollQty <= 0 || !Number.isInteger(rollQty)){
this.$message.error('卷数量无效!');
return false;
}
},
/*检查材料卷号的数据*/
checkRollNums() {
//
let rollNums = parseFloat(this.pageData.rollNums);
//
if (rollNums <= 0 || !Number.isInteger(rollNums)){
this.$message.error('卷数量无效!');
return false;
}
},
//
createSeparateRollFun() {
//
let rollQty = parseInt(this.pageData.rollQty);
//
if (rollQty <= 0 || !Number.isInteger(rollQty)){
this.$message.error('卷数量无效!');
return false;
}
//
if(rollQty < this.pageData.standardRollQty){
let rollNums = parseInt(this.pageData.rollNums);
if(rollNums > 1){
this.$message.error('当前的工单得尾数卷只能有一卷!');
return false;
}
}
//
let rollNums = parseFloat(this.pageData.rollNums);
//
if (rollNums <= 0 || !Number.isInteger(rollNums)){
this.$message.error('当前卷数无效!');
return false;
}
//
createSeparateRoll(this.pageData).then(({data}) => {
//
if (data.code == 200) {
this.$message.success(data.msg);
//this.closeDialog();
//
this.pageData.rollQty = this.pageData.standardRollQty;
this.pageData.rollNums = 1;
} 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>

146
src/views/modules/scheduleReport/print_roll_label.js

@ -0,0 +1,146 @@
/*调用js打印标签*/
import getLodop from '@/utils/LodopFuncs.js'
import { createAPI } from "@/utils/httpRequest.js";
/*打印材料卷标签*/
export function printMaterialLabel(printList) {
const LODOP = getLodop()
if (LODOP) {
LODOP.SET_SHOW_MODE("LANGUAGE",1);
//循环调用打印机
for(let i = 0; i < printList.length; i++){
let printData = printList[i];
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,700,600,"");
LODOP.ADD_PRINT_LINE(5,5,6,255,0,1);
LODOP.ADD_PRINT_LINE(25,5,26,255,0,1);
LODOP.ADD_PRINT_LINE(42,5,43,255,0,1);
LODOP.ADD_PRINT_LINE(59,5,60,255,0,1);
LODOP.ADD_PRINT_LINE(84,5,85,255,0,1);
LODOP.ADD_PRINT_LINE(119,5,120,255,0,1);
LODOP.ADD_PRINT_LINE(136,5,137,255,0,1);
LODOP.ADD_PRINT_LINE(153,5,154,185,0,1);
LODOP.ADD_PRINT_LINE(170,5,171,185,0,1);
LODOP.ADD_PRINT_LINE(187,5,188,185,0,1);
LODOP.ADD_PRINT_LINE(205,5,204,255,0,1);
LODOP.ADD_PRINT_LINE(220,5,221,255,0,1);
LODOP.ADD_PRINT_LINE(220,5,5,6,0,1);
LODOP.ADD_PRINT_LINE(220,254,5,255,0,1);
LODOP.ADD_PRINT_LINE(220,65,25,66,0,1);
LODOP.ADD_PRINT_LINE(120,135,136,136,0,1);
LODOP.ADD_PRINT_LINE(120,174,136,175,0,1);
LODOP.ADD_PRINT_LINE(204,186,136,187,0,1);
LODOP.ADD_PRINT_TEXT(7,91,90,15,"原材料标签");
LODOP.SET_PRINT_STYLEA(0,"FontName","黑体");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.ADD_PRINT_TEXT(28,7,60,15,"卷序号");
LODOP.ADD_PRINT_TEXT(45,7,60,15,"料号");
LODOP.ADD_PRINT_TEXT(65,7,60,20,"厂商");
LODOP.SET_PRINT_STYLEA(0,"FontSize",11);
LODOP.ADD_PRINT_TEXT(95,7,70,30,"品名规格");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(122,7,60,15,"数量");
LODOP.ADD_PRINT_TEXT(139,7,60,15,"单位");
LODOP.ADD_PRINT_TEXT(156,7,60,15,"入库日期");
LODOP.ADD_PRINT_TEXT(173,7,60,15,"有效期");
LODOP.ADD_PRINT_TEXT(190,7,60,15,"入库人员");
LODOP.ADD_PRINT_TEXT(206,7,60,15,"校验签章");
LODOP.ADD_PRINT_TEXT(122,137,38,20,"库位");
LODOP.ADD_PRINT_TEXT(27,70,150,20, printData.rollNo);
LODOP.ADD_PRINT_TEXT(45,115,100,20, printData.partNo);
LODOP.ADD_PRINT_TEXT(66,70,190,15, printData.supplierDesc);
LODOP.ADD_PRINT_TEXT(88,70,187,35, printData.partDesc +' '+ printData.spec);
LODOP.ADD_PRINT_TEXT(122,69,65,20, printData.rollQty);
LODOP.ADD_PRINT_TEXT(121,176,83,20,printData.locationId);
LODOP.ADD_PRINT_TEXT(138,130,50,20, printData.umid);
LODOP.ADD_PRINT_TEXT(155,100,80,17, printData.rollDate);
LODOP.ADD_PRINT_TEXT(174,100,80,20, printData.expiredDate);
LODOP.ADD_PRINT_BARCODE(137,187,100,75,"QRCode", printData.rollNo);
LODOP.ADD_PRINT_TEXT(189,120,90,17, printData.createdBy);
}
//LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
LODOP.PRINT();
console.log("原材料标签打印成功! 数量为: "+printList.length+"张。")
}
}
/*打印流程标签*/
export function printSfdcLabel(printList) {
const LODOP = getLodop()
if (LODOP) {
LODOP.SET_SHOW_MODE("LANGUAGE",1);
//循环调用打印机
for(let i = 0; i < printList.length; i++){
let printData = printList[i];
LODOP.NewPage();
LODOP.SET_PRINT_PAGESIZE(0,700,600,"");
LODOP.ADD_PRINT_LINE(5,5,6,254,0,1);
LODOP.ADD_PRINT_LINE(25,5,26,254,0,1);
LODOP.ADD_PRINT_LINE(40,5,41,254,0,1);
LODOP.ADD_PRINT_LINE(55,5,56,254,0,1);
LODOP.ADD_PRINT_LINE(90,5,91,254,0,1);
LODOP.ADD_PRINT_LINE(105,5,106,254,0,1);
LODOP.ADD_PRINT_LINE(120,5,121,254,0,1);
LODOP.ADD_PRINT_LINE(135,5,136,254,0,1);
LODOP.ADD_PRINT_LINE(152,5,153,185,0,1);
LODOP.ADD_PRINT_LINE(169,5,170,185,0,1);
LODOP.ADD_PRINT_LINE(187,5,186,185,0,1);
LODOP.ADD_PRINT_LINE(203,5,204,254,0,1);
LODOP.ADD_PRINT_LINE(218,6,219,255,0,1);
LODOP.ADD_PRINT_LINE(218,5,5,6,0,1);
LODOP.ADD_PRINT_LINE(218,254,5,255,0,1);
LODOP.ADD_PRINT_LINE(185,65,25,66,0,1);
LODOP.ADD_PRINT_LINE(203,186,136,187,0,1);
//区分判断 显示不同的表
if (printData.nextItemDesc === '仓库'){
LODOP.ADD_PRINT_TEXT(7,96,90,15,"物料明细表");
}else{
LODOP.ADD_PRINT_TEXT(7,97,90,15,"流程标签");
}
LODOP.SET_PRINT_STYLEA(0,"FontName","黑体");
LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
LODOP.ADD_PRINT_TEXT(27,7,60,15,"卷号");
LODOP.ADD_PRINT_TEXT(42,7,60,15,"料号");
LODOP.ADD_PRINT_TEXT(65,8,70,25,"品名规格");
LODOP.SET_PRINT_STYLEA(0,"FontSize",10);
LODOP.ADD_PRINT_TEXT(92,5,60,17,"客户料号");
LODOP.ADD_PRINT_TEXT(107,7,60,15,"客户名称");
LODOP.ADD_PRINT_TEXT(123,7,60,17,"创建人/日期");
LODOP.SET_PRINT_STYLEA(0,"FontSize",7);
LODOP.ADD_PRINT_TEXT(138,7,60,15,"数量");
LODOP.ADD_PRINT_TEXT(154,7,50,15,"工序");
LODOP.ADD_PRINT_TEXT(172,7,47,20,"下道");
LODOP.ADD_PRINT_TEXT(27,70,150,15, printData.rollNo);
LODOP.ADD_PRINT_TEXT(42,115,100,15, printData.partNo);
LODOP.ADD_PRINT_TEXT(55,70,185,35, printData.partDesc);
LODOP.ADD_PRINT_TEXT(92,70,185,15, printData.customerPartNo);
LODOP.ADD_PRINT_TEXT(107,70,180,15, printData.customerName);
LODOP.ADD_PRINT_TEXT(122,70,45,15, printData.createdBy);
LODOP.ADD_PRINT_TEXT(122,135,130,15, printData.createdDate);
LODOP.ADD_PRINT_TEXT(137,79,70,15, printData.rollQty);
LODOP.ADD_PRINT_TEXT(155,70,115,15, printData.itemDesc);
LODOP.SET_PRINT_STYLEA(0,"FontSize",8);
LODOP.ADD_PRINT_TEXT(171,70,115,15, printData.nextItemDesc);
LODOP.ADD_PRINT_BARCODE(138,188,100,75,"QRCode", printData.rollNo);
if (printData.customerName === '伊连特' && printData.customerName != ''){
LODOP.ADD_PRINT_IMAGE(187,10,23,16, "<img src='/static/img/sfdc_ul.jpg'/>");
LODOP.SET_PRINT_STYLEA(0, "Stretch", 1);//(不变形)原比例扩展缩放模式
//设置
LODOP.ADD_PRINT_TEXT(188,50,100,20, printData.ul);
LODOP.ADD_PRINT_TEXT(205,11, 120, 15, "Factory ID: YR");
}
}
//LODOP.PRINT_DESIGN();
//LODOP.PREVIEW();
LODOP.PRINT();
console.log("流转标签打印成功!数量:"+printList.length+"张。");
}
}
// 打印数据
export const getRollInfList = data => createAPI(`/schedule/getRollInfList`,'POST',data)

677
src/views/modules/scheduleReport/produce_order.vue

@ -0,0 +1,677 @@
<template>
<div class="customer-css">
<!-- 菜单按钮区域 -->
<fieldset class="customer-field" style="width: 675px; padding: 0.35em 0.75em 0.425em;">
<!-- 查询产品 -->
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 5px;">
<el-form-item label="工站:">
<el-select v-model="searchData.itemNo">
<el-option value="-1" label="全部"></el-option>
<el-option value="10" label="模切工站"></el-option>
<el-option value="20" label="FQC工站"></el-option>
</el-select>
</el-form-item>
<el-form-item label="工单号:">
<el-input v-model="searchData.orderNo" style="width: 120px" @keyup.enter.native="refreshPageTables"></el-input>
</el-form-item>
<el-form-item :label="' '" >
<el-button type="primary" @click="refreshPageTables()" class="customer-bun-mid"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.searchButton }}
</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="dieCuttingReportModal" class="customer-bun-mid"
:disabled="reportButton.dieCuttingButton"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.dieCuttingButton }}
</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="fqcReportModal()" class="customer-bun-mid"
:disabled="reportButton.fqcReportButton"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.fqcReportButton }}
</el-button>
</el-form-item>
</el-form>
</fieldset>
<!-- 工单主表信息 -->
<el-main style="margin-left: -20px; margin-top: -20px; width: 104%;">
<el-table @row-click="setCurrentRow"
:height="height"
highlight-current-row
:data="produceScheduleList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false: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-main>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn" v-drag></column>
<!-- 模切报工的组件 -->
<comDieCuttingReport :close-on-click-modal="false" ref="comDieCuttingReport">
</comDieCuttingReport>
<!-- fqc报工的组件 -->
<comFqcReport :close-on-click-modal="false" ref="comFqcReport">
</comFqcReport>
</div>
</template>
<script>
import {
getProduceScheduleList,
reportCheck,
getUserSpecialSecurity,
closeOrOpenProduceOrder,
pauseOrOpenProduceOrder,
costRollUpProduceOrder,
manualProduceOrder,
repairSOFlagProduceOrder,
workbenchCancelallops,
getShopOrder,
getScheduleMultiReportSpecialAuth,/* 获取派工单的特殊权限 */
} from '@/api/scheduleReport/produce_order.js'
/* 动态表头 */
import {
saveTableDefaultList,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from '@/api/table.js'
/* 引入组件 */
import Chooselist from '@/views/modules/common/Chooselist'/* 列表组件 */
import column from '@/views/modules/common/column'
import comDieCuttingReport from './com_die_cutting_report' /* 模切报工的组件 */
import comFqcReport from './com_fqc_report' /* 模切报工的组件 */
var functionId = '600001';
export default {
data() {
return {
height: 800,
authEdit: false,
authAdd: false,
authDelete: false,
menuId: this.$route.meta.menuId,
menuShow: false,
visible: false,
searchData: {
site: this.$store.state.user.site,
itemNo: '',
orderNo: '',
status: 1,
username: this.$store.state.user.name,
searchFlag: true,
exportFlag: "N",
},
currentRow: {},
produceScheduleList: [],
dataListLoading: false,
columnList: [
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceOrderNo',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'orderNo',
headerAlign: 'center',
align: 'center',
columnLabel: '生产订单号',
columnWidth: 120,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceItemNo',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'itemNo',
headerAlign: 'center',
align: 'center',
columnLabel: '工序号',
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceItemDesc',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'itemDesc',
headerAlign: 'center',
align: 'center',
columnLabel: '工序描述',
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceQtyRequired',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'qtyRequired',
headerAlign: 'center',
align: 'center',
columnLabel: '需求数量',
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceQtyReported',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'qtyReported',
headerAlign: 'center',
align: 'right',
columnLabel: '已报告数量',
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProducePartNo',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'partNo',
headerAlign: 'center',
align: 'center',
columnLabel: '产品编码',
columnWidth: 120,
columnHidden: false,
columnImage: false,
columnSortable: true,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProducePartDesc',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'partDesc',
headerAlign: 'center',
align: 'center',
columnLabel: '产品名称',
columnWidth: 180,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceRemark',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'remark',
headerAlign: 'center',
align: 'center',
columnLabel: '备注',
columnWidth: 180,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceScheduledDate',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'scheduledDate',
headerAlign: 'center',
align: 'center',
columnLabel: '排产日期',
columnWidth: 120,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceShiftNo',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'shiftNo',
headerAlign: 'center',
align: 'center',
columnLabel: '班次',
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: functionId,
serialNumber: '600001ProduceCustomerName',
tableId: '600001Produce',
tableName: '待生产工单',
columnProp: 'customerName',
headerAlign: 'center',
align: 'center',
columnLabel: '客户名称',
columnWidth: 180,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
],
reportButton: {
dieCuttingButton: true,
fqcReportButton: true,
},
queryTable: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: '600001Produce',
languageCode: this.$i18n.locale
},
// table
userColumnList: [],
buttons: {
searchButton: '查询',
dieCuttingButton: '模切工站',
fqcReportButton: 'FQC报工',
},
// start
exportList: [],
exportName: "生产工单",
exportHeader: [],
exportFooter: [],
exportDefaultValue: "",
// end
}
},
components: {
Chooselist, /* 选择的组件 */
column,/* 动态列 */
comDieCuttingReport, /* 模切工站页面的组件 */
comFqcReport,/* fqc工站的组件*/
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 190
})
},
methods: {
/* 查询派工单 */
getProduceScheduleList() {
// ;
this.searchData.searchFlag = true
getProduceScheduleList(this.searchData).then(({data}) => {
//
this.produceScheduleList = data.rows
})
},
/* 刷新页面table */
refreshPageTables() {
this.currentRow = {}
this.getProduceScheduleList()
},
/* 设置选中行的参数 */
setCurrentRow(row, column, event) {
this.currentRow = JSON.parse(JSON.stringify(row));
//
if(10 === this.currentRow.itemNo){
this.reportButton.dieCuttingButton = false;
this.reportButton.fqcReportButton = true;
}else if(20 === this.currentRow.itemNo){
this.reportButton.dieCuttingButton = true;
this.reportButton.fqcReportButton = false;
}
},
// modal
dieCuttingReportModal() {
//
if (JSON.stringify(this.currentRow) == '{}') {
this.$message.error('请先选择好工单!')
return false
}
//
this.$nextTick(() => {
this.$refs.comDieCuttingReport.init(this.currentRow.seqNo)
})
},
//
fqcReportModal() {
//
if (JSON.stringify(this.currentRow) == '{}') {
this.$message.error('请先选择好工单!')
return false
}
this.$nextTick(() => {
//
this.$refs.comFqcReport.init(this.currentRow.seqNo);
})
},
//
processFinishScheduleOperation() {
//
this.refreshPageTables()
},
/* 列表方法的回调 */
getBaseData(val) {
if (this.tagNo === 88) {
this.searchData.resourceId = val.ResourceID
}
},
//
getBaseList(val) {
this.tagNo = val
this.$nextTick(() => {
let strVal = ''
if (val === 88) {
strVal = this.searchData.resourceId
}
this.$refs.baseList.init(val, strVal, " AND WorkCenterNo <> 'FQC'")
})
},
//
userSetting() {
this.visible = true
let queryTable = {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: '600001Produce',
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable)
})
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data && data.code == 0 && data.rows.length > 0) {
// this.columnList = []
this.columnList = data.rows
} else {
this.getColumnList()
}
})
},
//
async saveColumnList() {
//
if (this.userColumnList) {
// user
await removerUser(this.queryTable)
}
//
await removerDefault(this.queryTable)
// table
let sumColumnList = this.columnList// concat(this.columnList1);
sumColumnList = sumColumnList.map(item => {
return item = {
tableId: item.tableId,
tableName: item.tableName,
columnProp: item.columnProp,
columnLabel: item.columnLabel,
columnHidden: item.columnHidden,
columnImage: item.columnImage,
columnSortable: item.columnSortable,
columnWidth: item.columnWidth,
format: item.format,
functionId: this.$route.meta.menuId,
sortLv: item.sortLv,
status: true,
fixed: item.fixed,
serialNumber: item.serialNumber,
columnType: item.columnType,
align: item.align
}
})
await saveTableDefaultList(sumColumnList)
// button label title
/* let buttons = this.buttonList.map(item => {
return item = {
functionId: this.$route.meta.menuId,
languageValue: item.languageValue,
objectId: item.objectId,
objectType: item.objectType,
tableId: item.tableId
}
})
await saveButtonList(buttons) */
this.getFunctionButtonList()
this.getColumnList()
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (data && data.code == 0) {
// this.showDefault = false
this.columnList = data.rows
} else {
// this.showDefault = true
}
})
},
fields() {
let json = "{"
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
//excel
async createExportData() {
// ;
this.searchData.searchFlag = true;
this.searchData.exportFlag = "Y";
await getProduceScheduleList(this.searchData).then(({data}) => {
//
this.exportList = data.rows
})
//sql
this.searchData.exportFlag = "N";
return this.exportList;
},
startDownload() {
// this.exportData = this.dataList
},
finishDownload() {
},
},
created() {
//
getProduceScheduleList(this.searchData).then(({data}) => {
//
this.searchData.searchFlag = false;
this.searchData.exportFlag = 'N';
this.produceScheduleList = data.rows
})
//
//this.getTableUserColumn()
}
}
</script>
<style>
.el-textarea__inner {
padding: 5px 5px;
}
</style>
<!--当前页面的标签样式-->
<style scoped lang="scss">
/*针对el-card*/
.customer-card .el-form-item__content {
margin-top: -15px;
}
.customer-card .el-form-item {
height: 22px;
}
.customer-border .el-form-item__content {
margin-top: -30px;
}
/*全局年与日类型 宽度*/
div.el-time-width {
width: 110px !important;
}
/* 全局时间右边框*/
.customer-css input.el-input__inner {
height: 22px !important;
padding-right: 0px !important;
}
/* 控制el-card标签的数据*/
div.customer-el-card {
margin-left: 110px;
margin-top: -15px;
height: 20px;
width: 60px;
}
/* 颜色控制 */
div.customer-el-card-pink {
background: #FF00FF;
}
div.customer-el-card-orange {
background: #FFD700;
}
div.customer-el-card-blue {
background: #0000CD;
}
/*清掉样式*/
.el-radio + .el-radio {
margin-left: 0px;
}
/*当前按钮的通用样式*/
.customer-css .customer-bun-mid {
width: 65px;
text-align: center;
}
/*当前按钮的通用样式*/
.customer-css .el-button--medium {
padding: 5px 5px;
}
/*添加主菜单和明细菜单的样式*/
.customer-css .customer-dropdown .el-button--primary {
padding: 2px;
font-size: 12px;
}
.el-dropdown-menu--medium .el-dropdown-menu__item {
line-height: 18px;
padding: 0 17px;
font-size: 12px;
}
hr {
margin-top: 0px;
}
/*控制上下间距*/
</style>
Loading…
Cancel
Save