Browse Source

部分代码

LIrui
DouDou 2 years ago
parent
commit
d5993520f3
  1. 5
      src/api/scheduleReport/com_scan_material.js
  2. 7
      src/api/scheduleReport/com_separate_roll.js
  3. 19
      src/api/yieldReport/com_separate_roll.js
  4. 442
      src/views/modules/scheduleReport/com_die_cutting_report.vue
  5. 216
      src/views/modules/scheduleReport/com_scan_material.vue
  6. 326
      src/views/modules/scheduleReport/com_separate_roll.vue
  7. 2
      src/views/modules/scheduleReport/produce_order.vue

5
src/api/scheduleReport/com_scan_material.js

@ -1,4 +1,7 @@
import { createAPI } from '@/utils/httpRequest.js'
// 查询材料卷信息
export const getRmRollData = data => createAPI('schedule/getRmRollData', 'POST', data)
// 材料下机操作
export const processCuttingMaterialRoll = data => createAPI('schedule/processCuttingMaterialRoll', '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 createSplitSfdcRoll = data => createAPI('schedule/createSplitSfdcRoll', 'POST', data)

19
src/api/yieldReport/com_separate_roll.js

@ -1,19 +0,0 @@
import { createAPI } from '@/utils/httpRequest.js'
// 校验创建分卷的操作
export const checkCreateSplitSfdcRoll = data => createAPI('schedule/checkCreateSplitSfdcRoll', 'POST', data)
// 执行创建分卷的操作
export const createSplitSfdcRoll = data => createAPI('schedule/createSplitSfdcRoll', 'POST', data)
// 校验fqc创建分卷的操作
export const otherCheckCreateSplitSfdcRoll = data => createAPI('schedule/otherCheckCreateSplitSfdcRoll', 'POST', data)
// 执行fqc创建分卷的操作
export const otherCreateSplitSfdcRoll = data => createAPI('schedule/otherCreateSplitSfdcRoll', 'POST', data)
// 换包装分卷
export const workbenchCreateslittingrollRepackAction = data => createAPI('schedule/workbench_createslittingroll_Repack_action', 'POST', data)

442
src/views/modules/scheduleReport/com_die_cutting_report.vue

@ -35,7 +35,7 @@
<span>{{ this.currentRollOps.rollNo }}</span>
</el-form-item>
<el-form-item>
<el-button class="customer-bun-max" type="primary" @click="warnCreateNewRollConfirm"
<el-button class="customer-bun-max" type="primary" @click="scanMaterialModal"
style="margin-left: 5px; margin-bottom: 5px;">{{ buttons.scanMaterialButton }}
</el-button>
</el-form-item>
@ -94,7 +94,7 @@
v-loading="dataListLoading"
:summary-method="sfdcRollListSummaries"
highlight-current-row
@current-change="selectSfdcRoll"
@current-change="setSfdcRoll"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnRollArray" :key="index"
@ -136,6 +136,15 @@
</fieldset>
</el-form>
</el-dialog>
<!-- 扫描材料的组件 -->
<comScanMaterial :close-on-click-modal="false" ref="comScanMaterial"
@refreshPageData="refreshPageData">
</comScanMaterial>
<!-- 创建分卷的操作 -->
<comSeparateRoll :close-on-click-modal="false" ref="comSeparateRoll"
@refreshPageData="refreshPageData">
</comSeparateRoll>
</div>
</template>
@ -151,35 +160,15 @@ import {
printSfdcLabel,
} from "@/views/modules/scheduleReport/print_roll_label.js"
import comScanMaterial from './com_scan_material' /* 扫描卷的组件 */
import comSeparateRoll from "./com_separate_roll";
var functionId = 'C10000001';
export default {
data() {
return {
titleCon: '',
visible: false,
rollSplitButton: false, //
selectSfdcRollData: '',// 2022-11-17
showMalformedMaterialFlag: false,// 2022-11-17
malformedMaterialButtonFlag: true,// 2022-11-17
showDefault: false,
showNotOverFlag: false,
showOperatorFlag: false,
showSwitchFlag: false,
showSeparateFlag: false,
showFinishFlag: false,
showFinishPartFlag: false,
showMergeFlag: false,
showTuningFlag: false,
showProduceFlag: false,
showDefectFlag: false,
showToolFlag: false,
showReplaceToolFlag: false,
showMaterialFlag: false,
showKeyMaterialFlag: false,
showReplaceMaterialFlag: false,
showCuttingMaterialFlag: false,
showDownFlag: false,
showFinishScheduleFlag: false,
activeTable: 'sfdc_rollOps',
sfdcRollOpsList: [],
sfdcRollList: [],
@ -403,27 +392,12 @@ export default {
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
scheduledDate: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
preItemNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false,
repairOrderFlag: '',
checkMultipleRoll: ''
},
currentRollOps: {
site: this.$store.state.user.site,
@ -558,10 +532,6 @@ export default {
planStartDate: '刷新',
lotSize: '原始派工单需求数量',
scheduledDate: ' 排产日期',
shiftNo: '班次',
preItemNo: '前道工序',
nextItemNo: ' 后道工序',
onlyCurrentRoll: '仅显示当前卷信息',
rollButtons: '卷操作',
listDesc: '列表信息',
rollopsList: '生产卷操作信息',
@ -922,9 +892,11 @@ export default {
}
},
components: {
comScanMaterial, /* 扫描卷的组件 */
comSeparateRoll, /* 创建分卷 */
},
methods: {
init(seqNo) {
//
this.scheduleData.seqNo = seqNo;
@ -965,99 +937,28 @@ export default {
await this.refreshCurrentTabTable();
},
selectSfdcRoll(row) {
this.malformedMaterialButtonFlag = false
this.selectSfdcRollData = row
//
setSfdcRoll(row) {
this.currentSfdcRollRow = row;
},
//
getUserSpecialSecurity() {
//
if (!this.sfdcRollList) {
this.rollSplitButton = true
return
}
//
let data = {
userSpecialSecurityNo: 240,
username: this.$store.state.user.name
}
getUserSpecialSecurity(data).then(({data}) => {
if (data.userSpecialSecurity == 'Y') {
this.rollSplitButton = false
} else {
this.rollSplitButton = true
}
})
},
rollSplit() {
//
this.$confirm(`确实要创建一个异常卷?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let dto = {
site: this.$store.state.user.site,
orderNo: this.scheduleData.orderNo,
itemNo: this.scheduleData.itemNo,
seqNo: this.scheduleData.seqNo,
userId: this.$store.state.user.name,
}
rollSplit(dto).then(({data}) => {
if (data && data.code == 0) {
this.getSfdcRollList()
this.$message.success(data.msg)
} else {
this.$message.warning(data.msg)
}
})
})
},
malformedMaterialModal() {
if (!this.selectSfdcRollData) {
this.$message.warning('请选择机器下机卷!')
return;
}
/*扫描材料卷*/
scanMaterialModal() {
//
this.$nextTick(() => {
this.showMalformedMaterialFlag = true;
this.$refs.comMalformedMaterial.init(this.scheduleData, this.operatorData, this.selectSfdcRollData)
this.$refs.comScanMaterial.init(this.scheduleData)
});
},
scannerMaterial(row) {
},
//
sfdcDefectListSummaries(param) {
const {columns, data} = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 1) {
sums[index] = this.labels.totalSum;
return;
}
if (index == 4) {
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index];
}
sums[index] = (sums[index] ? sums[index] : 0)
}
/*创建分卷的modal调用*/
separateRollModal() {
// 76
this.$nextTick(() => {
this.showSeparateFlag = true;
this.$refs.comSeparateRoll.init(this.scheduleData)
});
return sums;
},
//
sfdcRollListSummaries(param) {
const {columns, data} = param;
@ -1087,35 +988,7 @@ export default {
});
return sums;
},
//
switchRollReverse() {
if (this.currentRollOps.rollNo === '暂无卷号') {
this.$message.warning(this.labels.noneRollNo);
return;
}
this.$confirm(this.labels.sureDeleteRoll + this.currentRollOps.rollNo + this.labels.currentRollNo, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//
this.scheduleData.repairOrderFlag = 'Y'
this.scheduleData.checkMultipleRoll = 'Y'
switchrollReverse(this.scheduleData).then(({data}) => {
if (data.code == 0) {
this.$message.success(data.msg)
this.refreshPageData()
}
if (data.code == 400) {
this.$message.warning(data.msg)
}
if (data.code == 500) {
this.$message.error(data.msg)
}
})
});
},
//
getScheduleDataBySeqNo() {
getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => {
@ -1149,31 +1022,12 @@ export default {
this.refreshCurrentTabTable();
},
//
getSfdcMaterialList() {
getSfdcMaterialByCon(this.searchData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
},
//
getSfdcRollOpsList() {
getSfdcRollOpsByCon(this.searchData).then(({data}) => {
this.sfdcRollOpsList = data.rows;
});
},
//
getSfdcDefectList() {
getSfdcDefectByCon(this.searchData).then(({data}) => {
this.sfdcDefectList = data.rows;
});
},
//
getSfdcRollList() {
getSfdcRollByCon(this.searchData).then(({data}) => {
this.sfdcRollList = data.rows;
});
},
//table
async refreshCurrentTabTable() {
@ -1197,62 +1051,6 @@ export default {
}
},
/*提示是否扫描材料卷*/
warnCreateNewRollConfirm() {
//
this.buttonTags.createNewRollFlag = true;
//
this.$confirm(this.labels.sureCreateNewRoll, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//
this.createNewRollFun();
});
},
//
createNewRollFun() {
//
this.scheduleData.operatorId = this.operatorData.operatorId;
checkCreateNewSfdcRoll(this.scheduleData).then(({data}) => {
if (data.code === 200) {
//
this.createNewRollDo();
} else {
//
this.buttonTags.createNewRollFlag = false;
this.$message.error(data.msg)
}
});
},
/*切换卷操作*/
switchRollModal() {
//1.
//checkProduceButton('switchRollFlag');
//
this.$nextTick(() => {
this.showSwitchFlag = true;
this.$refs.comSwitchRoll.init(this.scheduleData, this.operatorData)
});
},
/*创建分卷的modal调用*/
separateRollModal() {
//1.
//checkProduceButton('separateRollFlag');
// 76
this.$nextTick(() => {
this.showSeparateFlag = true;
this.$refs.comSeparateRoll.init(this.scheduleData, this.operatorData)
});
},
/*结束卷操作*/
finishRollModal() {
//1.
@ -1260,35 +1058,7 @@ export default {
//
this.$nextTick(() => {
this.showFinishFlag = true;
this.$refs.comFinishRoll.init(this.scheduleData, this.operatorData)
});
},
/*合并卷modal*/
mergeRollModal() {
//1.
//checkProduceButton('mergeRollFlag');
//
let currentRollNo = this.currentRollOps.rollNo;
if (currentRollNo === '暂无卷号') {
this.$message.error(this.labels.noRollCantMerge);
return false;
}
//
this.$nextTick(() => {
this.showMergeFlag = true;
this.$refs.comMergeRoll.init(this.scheduleData, this.operatorData)
});
},
/*开始调机modal*/
startTuningModal() {
//1.
//checkProduceButton('startTuningFlag');
//
this.$nextTick(() => {
this.showTuningFlag = true;
this.$refs.comStartTuning.init(this.scheduleData, this.operatorData)
this.$refs.comFinishRoll.init(this.scheduleData)
});
},
@ -1299,91 +1069,7 @@ export default {
//
this.$nextTick(() => {
this.showProduceFlag = true;
this.$refs.comStartProduce.init(this.scheduleData, this.operatorData)
});
},
/*报告不良modal*/
defectRollModal() {
//1.
//checkProduceButton('defectRollFlag');
//
this.$nextTick(() => {
this.showDefectFlag = true;
this.$refs.comDefectRoll.init(this.scheduleData, this.operatorData)
});
},
/*生产过程的工具组件*/
produceToolModal() {
//1.
//checkProduceButton('produceToolFlag');
//
this.$nextTick(() => {
this.showToolFlag = true;
this.$refs.comProduceTool.init(this.scheduleData, this.operatorData, 0)
});
},
/*生产过程的工具组件*/
produceMaterialModal() {
//1.
//checkProduceButton('produceMaterialFlag');
//
this.$nextTick(() => {
this.showMaterialFlag = true;
this.$refs.comProduceMaterial.init(this.scheduleData, this.operatorData)
});
},
//
produceKeyMaterialModal() {
//1.
//checkProduceButton('produceMaterialFlag');
//
this.$nextTick(() => {
this.showKeyMaterialFlag = true;
this.$refs.comProduceKeyMaterial.init(this.scheduleData, this.operatorData)
});
},
/*生产过程的停机组件*/
produceDownModal() {
//1.
//checkProduceButton('produceDownFlag');
//
this.$nextTick(() => {
this.showDownFlag = true;
this.$refs.comProduceDown.init(this.scheduleData, this.operatorData)
});
},
/*替换工具的组件*/
replaceToolModal(toolRow) {
//1.
//checkProduceButton('produceDownFlag');
//
this.$nextTick(() => {
this.showReplaceToolFlag = true;
this.$refs.comReplaceTool.init(this.scheduleData, this.operatorData, toolRow)
});
},
/*替换工具的组件*/
replaceMaterialModal(materialRow) {
//1.
//checkProduceButton('produceDownFlag');
//
this.$nextTick(() => {
this.showReplaceMaterialFlag = true;
this.$refs.comReplaceMaterial.init(this.scheduleData, this.operatorData, materialRow)
});
},
/*材料下料的modal*/
cuttingMaterialModal(materialRow) {
this.$nextTick(() => {
this.showCuttingMaterialFlag = true;
this.$refs.comCuttingMaterial.init(this.scheduleData, this.operatorData, materialRow);
this.$refs.comStartProduce.init(this.scheduleData)
});
},
@ -1391,69 +1077,7 @@ export default {
finishMaterialModal(materialRow) {
this.$nextTick(() => {
this.showMaterialFlag = true;
this.$refs.comProduceMaterial.init(this.scheduleData, this.operatorData)
});
},
//modal
showFinishScheduleModal() {
//
this.showFinishScheduleFlag = true;
this.$nextTick(() => {
this.$refs.comFinishSchedule.init(this.scheduleData, this.operatorData);
});
},
//
processFinishScheduleOperation() {
//
this.refreshPageTables();
},
//
createNewRollDo() {
createNewRoll(this.scheduleData).then(({data}) => {
//
if (data.success) {
this.$message.success(data.msg);
//
this.refreshPageData();
} else {
//
this.buttonTags.createNewRollFlag = false;
this.$message.error(data.msg);
}
});
},
/*提醒是否重新打开的提示*/
warnReopenSfdcRollsConfirm(sfdcRollRow) {
this.$confirm(this.labels.sureReopenSfdcRoll + sfdcRollRow.rollNo + this.labels.sureLabel, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//sfdcRolls
this.reopenSfdcRollsOperation(sfdcRollRow);
});
},
/*执行重新sfdcRolls表的记录*/
reopenSfdcRollsOperation(sfdcRollRow) {
let sfdcRoll = {
'site': this.scheduleData.site, 'orderNo': this.scheduleData.orderNo,
'itemNo': this.scheduleData.itemNo, 'seqNo': this.scheduleData.seqNo,
'rollNo': sfdcRollRow.rollNo, 'operatorId': this.scheduleData.operatorId
};
reopenSfdcRolls(sfdcRoll).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.resultMap.resultMsg);
//
this.refreshPageData();
}
this.$refs.comProduceMaterial.init(this.scheduleData)
});
},

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

@ -1,33 +1,34 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="200px" style="height: 360px;" class="customer-dialog">
<el-container style="height: 150px;">
: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-row>
<el-col :span="16">
<el-form-item :label=labels.rmRollNo>
<el-input v-model="pageData.rmRollNo" disabled="disabled" style="width: 120px">
<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=labels.transQty>
<el-input ref="transQty" @blur="checkValidQty"
v-model="pageData.transQty"
style="width: 120px">
<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-row>
<el-col :span="16">
<el-form-item :label=labels.bomItemNo>
<el-input v-model="pageData.bomItemNo" disabled="disabled"
style="width: 120px">
<el-form-item label="数量">
<el-input v-model="pageData.rollQty"
style="width: 180px;" disabled class="customer-color">
</el-input>
</el-form-item>
</el-col>
@ -35,9 +36,8 @@
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="processCuttingMaterialBun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="scanRmRollNoFun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
@ -45,7 +45,8 @@
<script>
import {
processCuttingMaterialRoll,
getRmRollData,
scanRmRollNo,
} from "@/api/scheduleReport/com_scan_material.js";
var functionId = 'C10000002';
@ -53,10 +54,8 @@ var functionId = 'C10000002';
export default {
data() {
return {
titleCon: '材料退料',
showDefault: false,
sfdcTimeList: [],
selectFlag: true,
titleCon: '扫描材料',
visible: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
@ -65,23 +64,12 @@ export default {
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
timeArray: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
@ -91,22 +79,9 @@ export default {
rollNo: '',
rmRollNo: '',
rmPartNo: '',
transQty: 0,
oriTransQty: 0,
bomItemNo: '',
histSeqNo: -1,
operatorId: '',
rollQty: 0,
closedFlag: 'N'
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
dataListLoading: false,
buttons: {
confirmButton: '确定',
@ -134,17 +109,12 @@ export default {
objectType: 'button'
},
labels: {
titleCon: '材料退料',
rmRollNo: '材料卷号:',
transQty: '退料数量:',
bomItemNo: 'BOM序号:',
returnQtyMoreThanDeliveryQty: '退料数量超过了该记录上的发料数量!',
pleaseEnterValidQty: '请输入有效的数量!',
titleCon: '扫描材料',
},
labelsList: [
{
functionId: functionId,
languageValue: '材料退料',
languageValue: '扫描材料',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
@ -156,26 +126,8 @@ export default {
tableId: '*'
}, {
functionId: functionId,
languageValue: '退料数量:',
objectId: 'transQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: 'BOM序号:',
objectId: 'bomItemNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '退料数量超过了该记录上的发料数量!',
objectId: 'returnQtyMoreThanDeliveryQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请输入有效的数量!',
objectId: 'pleaseEnterValidQty',
languageValue: '卷数量:',
objectId: 'rollQty',
objectType: 'label',
tableId: '*'
},
@ -191,114 +143,68 @@ export default {
methods: {
//
init(scheduleData, operatorData, materialData) {
init(scheduleData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
this.scheduleData = JSON.parse(JSON.stringify(scheduleData));;
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollNo = scheduleData.rollNo;
this.pageData.rmRollNo = materialData.rmRollNo;
this.pageData.rmPartNo = materialData.partNo;
this.pageData.bomItemNo = materialData.sAPBOMItemNo;
this.pageData.transQty = materialData.transQty
this.pageData.oriTransQty = materialData.transQty;
this.pageData.histSeqNo = materialData.histSeqNo;
this.pageData.operatorId = operatorData.operatorId;
this.getMultiLanguageList(); //
this.pageData.rollQty = 0;
this.pageData.rmRollNo = '';
this.pageData.rollNo = '';
this.pageData.rmPartNo = '';
this.visible = true;
//
this.$nextTick(() => {
this.$refs.transQty.focus();
this.$refs.rmRollNo.focus();
});
//
this.timeArray = [];
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
this.visible = false;
},
/*检查材料卷号的数据*/
checkValidQty() {
//
let transQty = this.pageData.transQty;
//
if (transQty > this.pageData.oriTransQty){
this.$message.error(this.labels.returnQtyMoreThanDeliveryQty);
return false;
}
//
if(transQty < 0){
this.$message.error(this.labels.pleaseEnterValidQty);
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;
/*处理材料下料的记录*/
processCuttingMaterialBun(){
//
let transQty = this.pageData.transQty;
//
if (transQty > this.pageData.oriTransQty){
this.$message.error(this.labels.returnQtyMoreThanDeliveryQty);
return false;
}
//
if(transQty <= 0){
this.$message.error(this.labels.pleaseEnterValidQty);
return false;
}
//
processCuttingMaterialRoll(this.pageData).then(({data}) => {
if(data.code == 500){
this.$message.error(data.msg);
//
getRmRollData(this.pageData).then(({data}) => {
if (data.code == 200){
this.pageData.rollQty = data.row.rollQty;
this.pageData.rmPartNo = data.row.partNo;
}else{
this.$message.success(data.msg);
//
this.$emit('refreshPageData');
//
let printList = data.printList;
printMaterialLabel(printList);
//
this.closeDialog();
this.$message.error(data.msg);
return false;
}
});
})
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
/*扫描材料上机*/
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;
}
});
})
},
},

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

@ -0,0 +1,326 @@
<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="createSeparateRolllBun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getSeqStandardRollQty,
createSplitSfdcRoll,/*执行创建分卷的操作*/
} 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,
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.pageData.rollQty = 0;
this.pageData.rollNums = 1;
this.visible = true;
//
this.$nextTick(() => {
this.$refs.rollQty.focus();
});
this.titleCon = this.labels.titleCon;//
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update: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;
}
},
checkCreateSeparateRolllBun() {
//
if (this.pageData.operatorId == '' || this.pageData.operatorId == null) {
this.$message.error(this.labels.pleaseSwitchOperator);
return false;
}
//
let rollQty = parseFloat(this.pageData.rollQty);
//
if (rollQty <= 0 || !Number.isInteger(rollQty)){
this.$message.error('卷数量无效!');
return false;
}
//
let rollNums = parseFloat(this.pageData.rollNums);
//
if (rollNums <= 0 || !Number.isInteger(rollNums)){
this.$message.error(this.labels.rollQtyMustMoreTanZeroAndBeInteger);
return false;
}
//
checkCreateSplitSfdcRoll(this.pageData)
.then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == '201') {
//
this.$confirm(data.resultMap.resultMsg, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//
this.createSeparateRolllOperation();
});
} else { //
this.createSeparateRolllOperation();
}
});
},
/*执行创建分卷的操作*/
createSeparateRolllOperation() {
//
createSplitSfdcRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
//
let printList = data.printList;
printSfdcLabel(printList);
//
setTimeout(() =>{
//
this.closeDialog();
}, 1000)
}
})
},
},
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>

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

@ -26,7 +26,7 @@
</el-button>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="switchOperatorModal(1)" class="customer-bun-mid"
<el-button type="primary" @click="switchOperatorModal()" class="customer-bun-mid"
:disabled="reportButton.fqcReportButton"
style="margin-left: 10px; margin-bottom: 5px;">{{ buttons.fqcReportButton }}
</el-button>

Loading…
Cancel
Save