|
|
|
@ -9,18 +9,18 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item> |
|
|
|
<span slot="label" style="" @click="getBaseList(89)"><a herf="#">不良代码:</a></span> |
|
|
|
<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="'不良数量:'"> |
|
|
|
<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="'报告日期:'"> |
|
|
|
<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"> |
|
|
|
@ -30,7 +30,7 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item :label="'不良原因:'"> |
|
|
|
<el-form-item :label=labels.defectDesc> |
|
|
|
<el-input :readonly="true" v-model="pageData.defectDesc" style="width: 495px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -45,7 +45,7 @@ |
|
|
|
<el-form-item style="margin-top: 15px;"> |
|
|
|
<el-button type="primary" style="margin-left: -10px; margin-bottom: 5px;" |
|
|
|
@click="reportDefectFun"> |
|
|
|
插入</el-button> |
|
|
|
{{ buttons.insertButton }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -54,10 +54,11 @@ |
|
|
|
<el-form-item style="margin-top: 15px;"> |
|
|
|
<el-button type="primary" @click="closeDialog" |
|
|
|
style="margin-left: -10px; margin-bottom: 5px;"> |
|
|
|
关闭</el-button> |
|
|
|
{{buttons.closeButton}}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">对语言设置</el-button> |
|
|
|
|
|
|
|
</el-form> |
|
|
|
</el-container> |
|
|
|
@ -66,7 +67,7 @@ |
|
|
|
<!-- 不良记录 --> |
|
|
|
<el-container> |
|
|
|
<fieldset class="customer-fieldset" style="margin-top: -35px; margin-bottom: 15px;"> |
|
|
|
<legend>不良记录</legend> |
|
|
|
<legend>{{labels.defectList}}</legend> |
|
|
|
<el-container style="width: 580px;" class="customer-tab"> |
|
|
|
<el-table |
|
|
|
height="250" |
|
|
|
@ -111,10 +112,26 @@ import { |
|
|
|
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, |
|
|
|
@ -292,6 +309,84 @@ export default { |
|
|
|
} |
|
|
|
], |
|
|
|
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: '不良记录', |
|
|
|
}, |
|
|
|
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: '*' |
|
|
|
}, |
|
|
|
], |
|
|
|
queryLabel: { |
|
|
|
functionId: functionId, |
|
|
|
table_id: '*', |
|
|
|
languageCode: this.$i18n.locale, |
|
|
|
objectType: 'label' |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
/*组件*/ |
|
|
|
@ -325,6 +420,8 @@ export default { |
|
|
|
}); |
|
|
|
//刷新当前不良记录列表 |
|
|
|
this.refreshPageTable(); |
|
|
|
//初始化标题 |
|
|
|
this.titleCon = this.labels.titleCon; |
|
|
|
}, |
|
|
|
|
|
|
|
/*关闭modal*/ |
|
|
|
@ -419,6 +516,37 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 保存 默认配置 列 |
|
|
|
async saveMultiLanguage() { |
|
|
|
// 保存页面 button label title 属性 |
|
|
|
let buttons = this.buttonList; |
|
|
|
let labels = this.labelsList; |
|
|
|
await saveButtonList(buttons) |
|
|
|
await saveButtonList(labels) |
|
|
|
this.getMultiLanguageList() |
|
|
|
}, |
|
|
|
|
|
|
|
getMultiLanguageList() { |
|
|
|
//首先查询当前按钮的多语言 |
|
|
|
searchFunctionButtonList(this.queryButton).then(({data}) => { |
|
|
|
if (JSON.stringify(data.data) != '{}') { |
|
|
|
this.buttons = data.data |
|
|
|
} else { |
|
|
|
// saveButtonList(this.buttonList).then(({data}) => { |
|
|
|
// }) |
|
|
|
} |
|
|
|
}); |
|
|
|
//其次查询当前标签的多语言 |
|
|
|
searchFunctionButtonList(this.queryLabel).then(({data}) => { |
|
|
|
if (JSON.stringify(data.data) != '{}') { |
|
|
|
this.labels = data.data |
|
|
|
} else { |
|
|
|
// saveButtonList(this.buttonList).then(({data}) => { |
|
|
|
// }) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
pageData: { |
|
|
|
@ -431,6 +559,7 @@ export default { |
|
|
|
created() { |
|
|
|
// this.factoryList() |
|
|
|
// this.getLanguageList() |
|
|
|
this.getMultiLanguageList()//刷新按钮 |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
|