Browse Source

删除多余的代码

LIrui
DouDou 2 years ago
parent
commit
4b28080f08
  1. 221
      src/views/modules/scheduleReport/com_create_recheck.vue
  2. 333
      src/views/modules/scheduleReport/com_cutting_material.vue
  3. 589
      src/views/modules/scheduleReport/com_defect_roll.vue

221
src/views/modules/scheduleReport/com_create_recheck.vue

@ -1,221 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag
:close-on-click-modal="false"
:visible.sync="createRecheckShow"
width="300px" style="height: 680px;" class="customer-dialog">
<el-container>
<el-container style="height: 160px;">
<el-form :inline="true" label-position="top" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item>
<span slot="label" style="" >排产日期:</span>
<el-date-picker
type="date"
v-model="pageData.scheduleDate" style="width: 100px">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="'排产数量:'">
<el-input type="number" min="0" v-model="pageData.qtytoSchedule " style="width: 100px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: -10px;">
<el-col :span="24" >
<el-form-item :label="'开始时间:'">
<el-date-picker style="width: 170px;"
v-model="pageData.planStartTime "
type="datetime"
placeholder="">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="'预计时长:'">
<el-input type="number" controls-position="right" min="0" v-model="pageData.timeRequired " style="width: 100px"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item>
<span slot="label" style="" @click="getBaseList(88)"><a herf="#">机台编号:</a></span>
<el-input v-model="pageData.resourceId " style="width: 100px"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
<el-container style="margin-left: -0px; margin-top: 20px">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 不良代码 和日期 -->
<el-row style="margin-top: 15px;">
<el-col>
<el-form-item style="margin-top: 15px;">
<el-button @click="createRecheck" type="primary"
style="margin-left: -10px; margin-bottom: 5px;">
创建</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col>
<el-form-item style="margin-top: 10px;">
<el-button type="primary" @click="closeDialog"
style="margin-left: -10px; margin-bottom: 10px;">
关闭</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
</el-container>
</el-dialog>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import {
soscheduleNewReinspectjob
}
from '@/api/yieldReport/produce_order.js';
export default {
data() {
return {
titleCon: '创建重检派工单',
createRecheckShow:false,
tagNo: '',
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
scheduleDate: '',
workCenterNo: '',
resourceId: '',
scheduledDate: '',
planStartTime:'',
qtytoSchedule: '',
timeRequired: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
buttonTags:{
createRollFlag: true
},
dataListLoading: false,
}
},
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
methods: {
//
init(row) {
this.createRecheckShow= true
//
this.pageData.orderNo = row.orderNo;
this.pageData.itemNo = row.itemNo;
this.pageData.seqNo = row.seqNo;
this.pageData.rollNo = row.rollNo;
this.pageData.operatorId = row.operatorId;
this.pageData.scheduleDate = this.dayjs(new Date()).format('YYYY-MM-DD');
this.pageData.workCenterNo = row.workCenterNo;
//
this.pageData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.createRecheckShow = false
Object.assign(this.$data.pageData, this.$options.data.call(this).pageData);
},
/*创建重检*/
createRecheck(){
if (this.pageData.qtytoSchedule<=0){
this.$message.warning('排产数量不能小于0')
return
}
if (this.pageData.timeRequired<=0){
this.$message.warning('预计重检时长不能小于0')
return
}
soscheduleNewReinspectjob(this.pageData).then(({data}) => {
if(data.code == 0){
this.$message.success(data.msg);
//
this.closeDialog();
}else{
this.$message.warning(data.msg);
}
});
},
/*列表方法的回调*/
getBaseData(val){
if (this.tagNo == 88){
this.pageData.resourceId = val.ResourceID;
}
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val == 88){
strVal = this.pageData.resourceId;
}
this.$refs.baseList.init(val, strVal)
})
},
},
/*监听器*/
watch:{
pageData: {
deep: true,
handler: function (newV, oldV) {
this.pageData.resourceId = this.pageData.resourceId.toUpperCase();
}
}
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped >
</style>

333
src/views/modules/scheduleReport/com_cutting_material.vue

@ -1,333 +0,0 @@
<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;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 材料卷号和BOM序号 -->
<el-row>
<el-col :span="16">
<el-form-item :label=labels.rmRollNo>
<el-input v-model="pageData.rmRollNo" disabled="disabled" style="width: 120px">
</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-input>
</el-form-item>
</el-col>
</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-input>
</el-form-item>
</el-col>
</el-row>
</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="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
processCuttingMaterialRoll,
} from "@/api/yieldReport/com_cutting_material.js";
/*打印标签专用的js*/
import {
printMaterialLabel,
} from "@/views/modules/yieldReport/print_roll_label.js"
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000017';
export default {
data() {
return {
titleCon: '材料退料',
showDefault: false,
sfdcTimeList: [],
selectFlag: true,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
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,
seqNo: '',
orderNo: '',
itemNo: 0,
rollNo: '',
rmRollNo: '',
rmPartNo: '',
transQty: 0,
oriTransQty: 0,
bomItemNo: '',
histSeqNo: -1,
operatorId: '',
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: '确定',
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: '材料退料',
rmRollNo: '材料卷号:',
transQty: '退料数量:',
bomItemNo: 'BOM序号:',
returnQtyMoreThanDeliveryQty: '退料数量超过了该记录上的发料数量!',
pleaseEnterValidQty: '请输入有效的数量!',
},
labelsList: [
{
functionId: functionId,
languageValue: '材料退料',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号:',
objectId: 'rmRollNo',
objectType: 'label',
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',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData, operatorData, materialData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
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.$nextTick(() => {
this.$refs.transQty.focus();
});
//
this.timeArray = [];
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
this.$emit('update: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);
return false;
}
},
/*处理材料下料的记录*/
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);
}else{
this.$message.success(data.msg);
//
this.$emit('refreshPageData');
//
let printList = data.printList;
printMaterialLabel(printList);
//
this.closeDialog();
}
});
},
//
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}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

589
src/views/modules/scheduleReport/com_defect_roll.vue

@ -1,589 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="610px" style="height: 680px;" class="customer-dialog">
<el-container>
<el-container style="height: 140px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 不良代码 和日期 -->
<el-row>
<el-col :span="6">
<el-form-item>
<span slot="label" style="" @click="getBaseList(89)"><a herf="#">{{labels.defectCode}}</a></span>
<el-input ref="defectCode" v-model="pageData.defectCode" @blur="checkDefectDesc" @keydown="upCaseDefectCode"
style="width: 120px" @keyup.enter.native="getDefectDesc" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label=labels.defectQty>
<el-input v-model="pageData.defectQty" style="width: 120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label=labels.reportDate >
<el-date-picker v-model="pageData.reportDate"
style="width: 120px" format="yyyy-MM-dd"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-form-item :label=labels.defectDesc>
<el-input :readonly="true" v-model="pageData.defectDesc" style="width: 495px"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
<el-container style="margin-left: 60px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 不良代码 和日期 -->
<el-row style="margin-top: 0px;">
<el-col :span="6">
<el-form-item style="margin-top: 15px;">
<el-button type="primary" style="margin-left: -10px; margin-bottom: 5px;"
@click="reportDefectFun">
{{ buttons.insertButton }}</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col :span="6">
<el-form-item style="margin-top: 15px;">
<el-button type="primary" @click="closeDialog"
style="margin-left: -10px; margin-bottom: 5px;">
{{buttons.closeButton}}</el-button>
</el-form-item>
<el-form-item style="margin-top: 15px;">
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
</el-container>
<!-- 不良记录 -->
<el-container>
<fieldset class="customer-fieldset" style="margin-top: -35px; margin-bottom: 15px;">
<legend>{{labels.defectList}}</legend>
<el-container style="width: 580px;" class="customer-tab">
<el-table
height="250"
:data="sfdcDefectList"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: -5px;">
<el-table-column
v-for="(item,index) in columnDefectArray" :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"
: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-container>
</fieldset>
</el-container>
</el-dialog>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import {
getScheduleDefectHist,
checkDefectCode,
reportDefectCode,
}
from '@/api/yieldReport/com_defect_roll.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000011';
export default {
data() {
return {
titleCon: '报告不良',
showDefault: false,
scheduleData: {
site: this.$store.state.user.site,
userName: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
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: '',
operatorId: '',
operatorName: '',
reportDate: '',
defectCode: '',
defectDesc: '',
defectQty: 0,
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
sfdcDefectList: [],
columnDefectArray: [
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5305DefectHistSeqNo',
tableId: "5305Material",
tableName: "不良卷",
columnProp: "histSeqNo",
headerAlign: "center",
align: "center",
columnLabel: "序号",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5305DefectDefectCode',
tableId: "5305Defect",
tableName: "不良卷",
columnProp: "defectCode",
headerAlign: "center",
align: "center",
columnLabel: "不良代码",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5305DefectDefectCode',
tableId: "5305Defect",
tableName: "不良卷",
columnProp: "defectDesc",
headerAlign: "center",
align: "center",
columnLabel: "不良描述",
columnWidth: 160,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5305DefectDefectQty',
tableId: "5305Defect",
tableName: "不良卷",
columnProp: "defectQty",
headerAlign: "center",
align: "center",
columnLabel: "不良数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5305DefectReportedDate',
tableId: "5305Defect",
tableName: "不良卷",
columnProp: "reportedDate",
headerAlign: "center",
align: "center",
columnLabel: "报告日期",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5305DefectReportedBy',
tableId: "5305Defect",
tableName: "不良卷",
columnProp: "reportedBy",
headerAlign: "center",
align: "center",
columnLabel: "报告人",
columnWidth: 75,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5305DefectRemark',
tableId: "5305Defect",
tableName: "不良卷",
columnProp: "remark",
headerAlign: "center",
align: "center",
columnLabel: "备注",
columnWidth: 160,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
dataListLoading: false,
buttons: {
insertButton: '插入',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '插入',
objectId: 'insertButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '报告不良',
defectCode: '不良代码:',
defectQty: '不良数量:',
reportDate: '报告日期:',
defectDesc: '不良原因:',
defectList: '不良记录',
defectQtyMustMoreTanZero: '不良数量必须大于0!',
pleaseScanDefectCode: '请扫描不良代码!',
},
labelsList: [
{
functionId: functionId,
languageValue: '报告不良',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '不良代码:',
objectId: 'defectCode',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '不良数量:',
objectId: 'defectQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '报告日期:',
objectId: 'reportDate',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '不良原因:',
objectId: 'defectDesc',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '不良记录',
objectId: 'defectList',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '不良数量必须大于0!',
objectId: 'defectQtyMustMoreTanZero',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫描不良代码!',
objectId: 'pleaseScanDefectCode',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
methods: {
//
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
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.operatorName = operatorData.operatorName;
//
this.pageData.defectQty = 0;
this.pageData.defectCode = '';
this.pageData.defectDesc = '';
//
this.pageData.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD');
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.defectCode.focus();
});
//
this.refreshPageTable();
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*刷新页面的table数据*/
refreshPageTable(){
getScheduleDefectHist(this.pageData).then(({data}) => {
this.sfdcDefectList = data.rows;
});
},
/*检查不良代码*/
getDefectDesc(){
checkDefectCode(this.pageData).then(({data}) => {
//
if(data.code == 500){
//this.$message.error(data.msg);
this.pageData.defectDesc = ''
}else{
let resultMap = data.resultMap;
this.pageData.defectDesc = resultMap.defectDesc;
}
})
},
/*不提示错误信息的*/
checkDefectDesc(){
checkDefectCode(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.pageData.defectDesc = ''
}else{
let resultMap = data.resultMap;
this.pageData.defectDesc = resultMap.defectDesc;
}
})
},
/*报告不良代码*/
reportDefectFun(){
//
if(this.pageData.defectQty <= 0){
this.$message.error('不良数量必须大于0!');
return false;
}
if(this.pageData.defectCode == null || this.pageData.defectCode == ''){
this.$message.error('请扫描不良代码!');
return false;
}
reportDefectCode(this.pageData).then(({data}) => {
if(data.code == 500){
this.$message.error(data.msg);
}else{
//
this.pageData.defectQty = 0;
this.pageData.defectCode = '';
this.pageData.defectDesc = '';
//
this.refreshPageTable();
}
});
},
/*强制大写属性编码*/
upCaseDefectCode(){
this.pageData.defectCode = this.pageData.defectCode.toUpperCase();
},
/*列表方法的回调*/
getBaseData(val){
if (this.tagNo === 89){
this.pageData.defectCode = val.DefectCode;
this.pageData.defectDesc = val.DefectDesc;
}
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 89){
strVal = this.pageData.defectCode;
}
this.$refs.baseList.init(val, strVal)
})
},
//
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}) => {
// })
}
});
},
},
watch:{
pageData: {
deep: true,
handler: function (newV, oldV) {
this.pageData.defectCode = this.pageData.defectCode.toUpperCase();
}
}
},
created() {
// this.factoryList()
// this.getLanguageList()
},
}
</script>
<style scoped lang="scss">
</style>
Loading…
Cancel
Save