3 changed files with 0 additions and 1143 deletions
-
221src/views/modules/scheduleReport/com_create_recheck.vue
-
333src/views/modules/scheduleReport/com_cutting_material.vue
-
589src/views/modules/scheduleReport/com_defect_roll.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> |
|||
@ -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> |
|||
@ -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> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue