|
|
@ -1,9 +1,33 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div class="mod-config"> |
|
|
<div class="mod-config"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;"> |
|
|
<el-button @click="getData()" type="primary" style="margin-left: 2px;margin-top: 0px">{{buttons.search}}</el-button> |
|
|
|
|
|
<el-button @click="addModal()" type="primary" :disabled = "authAdd" style="margin-left: 2px;margin-top: 0px">{{buttons.add}}</el-button> |
|
|
|
|
|
<el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button> |
|
|
|
|
|
|
|
|
<el-form-item :label="labels.defectCode"> |
|
|
|
|
|
<el-input v-model="searchData.defectCode" clearable style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="labels.defectDesc"> |
|
|
|
|
|
<el-input v-model="searchData.defectDesc" clearable style="width: 130px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="labels.workCenterNo"> |
|
|
|
|
|
<el-select v-model="searchData.workCenterNo" clearable filterable style="width: 130px"> |
|
|
|
|
|
<el-option |
|
|
|
|
|
v-for="i in workCenterList" |
|
|
|
|
|
:key="i.workCenterNo" |
|
|
|
|
|
:label="i.workCenterDesc" |
|
|
|
|
|
:value="i.workCenterNo"> |
|
|
|
|
|
</el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="labels.active"> |
|
|
|
|
|
<el-select v-model="searchData.active" clearable filterable style="width: 130px"> |
|
|
|
|
|
<el-option :label="labels.all" value=""></el-option> |
|
|
|
|
|
<el-option label="Y" value="Y"></el-option> |
|
|
|
|
|
<el-option label="N" value="N"></el-option> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item :label="' '"> |
|
|
|
|
|
<el-button @click="getData()" type="primary" >{{buttons.search}}</el-button> |
|
|
|
|
|
<el-button @click="addModal()" type="primary" :disabled="authAdd">{{buttons.add}}</el-button> |
|
|
|
|
|
<el-button @click="userSetting" type="primary" >{{ buttons.settingTable }}</el-button> |
|
|
<download-excel |
|
|
<download-excel |
|
|
:fields="fields()" |
|
|
:fields="fields()" |
|
|
:data="exportData" |
|
|
:data="exportData" |
|
|
@ -15,9 +39,11 @@ |
|
|
:before-generate="startDownload" |
|
|
:before-generate="startDownload" |
|
|
:before-finish="finishDownload" |
|
|
:before-finish="finishDownload" |
|
|
worksheet="导出信息" |
|
|
worksheet="导出信息" |
|
|
class="el-button el-button--primary el-button--medium"> |
|
|
|
|
|
|
|
|
class="el-button el-button--primary el-button--medium" |
|
|
|
|
|
> |
|
|
{{ buttons.download }} |
|
|
{{ buttons.download }} |
|
|
</download-excel> |
|
|
</download-excel> |
|
|
|
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-table |
|
|
<el-table |
|
|
:height="height" |
|
|
:height="height" |
|
|
@ -53,6 +79,16 @@ |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
|
|
|
<el-pagination |
|
|
|
|
|
style="margin-top: 8px" |
|
|
|
|
|
@size-change="sizeChangeHandle" |
|
|
|
|
|
@current-change="currentChangeHandle" |
|
|
|
|
|
:current-page="pageIndex" |
|
|
|
|
|
:page-sizes="[20, 50, 100, 200]" |
|
|
|
|
|
:page-size="pageSize" |
|
|
|
|
|
:total="totalPage" |
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
|
|
</el-pagination> |
|
|
<el-dialog :title=labels.reasons :close-on-click-modal="false" v-drag :visible.sync="modelFlag" width="500px" > |
|
|
<el-dialog :title=labels.reasons :close-on-click-modal="false" v-drag :visible.sync="modelFlag" width="500px" > |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
<el-form-item :label="labels.site"> |
|
|
<el-form-item :label="labels.site"> |
|
|
@ -108,7 +144,7 @@ |
|
|
} from "@/api/table.js" |
|
|
} from "@/api/table.js" |
|
|
import column from "@/views/modules/common/column"; |
|
|
import column from "@/views/modules/common/column"; |
|
|
import { |
|
|
import { |
|
|
getUnqualifiedInspectionReasonsData, |
|
|
|
|
|
|
|
|
getUnqualifiedInspectionReasonsDataWithPage, |
|
|
saveUnqualifiedInspectionReasonsData, |
|
|
saveUnqualifiedInspectionReasonsData, |
|
|
deleteUnqualifiedInspectionReasonsData |
|
|
deleteUnqualifiedInspectionReasonsData |
|
|
} from "@/api/qualityAssurance/unqualifiedInspectionReasons.js" |
|
|
} from "@/api/qualityAssurance/unqualifiedInspectionReasons.js" |
|
|
@ -164,6 +200,15 @@ |
|
|
active:'', |
|
|
active:'', |
|
|
user:'', |
|
|
user:'', |
|
|
}, |
|
|
}, |
|
|
|
|
|
searchData: { |
|
|
|
|
|
defectCode: '', |
|
|
|
|
|
defectDesc: '', |
|
|
|
|
|
workCenterNo: '', |
|
|
|
|
|
active: '' |
|
|
|
|
|
}, |
|
|
|
|
|
pageIndex: 1, |
|
|
|
|
|
pageSize: 20, |
|
|
|
|
|
totalPage: 0, |
|
|
dataList:[], |
|
|
dataList:[], |
|
|
dataListLoading: false, |
|
|
dataListLoading: false, |
|
|
workCenterList: [], |
|
|
workCenterList: [], |
|
|
@ -289,6 +334,7 @@ |
|
|
site:'工厂编码:', |
|
|
site:'工厂编码:', |
|
|
inspectionType:'检验类型:', |
|
|
inspectionType:'检验类型:', |
|
|
active:'在用:', |
|
|
active:'在用:', |
|
|
|
|
|
all:'全部', |
|
|
defectCode:'原因代码:', |
|
|
defectCode:'原因代码:', |
|
|
defectDesc:'原因描述', |
|
|
defectDesc:'原因描述', |
|
|
workCenterNo:'加工中心:', |
|
|
workCenterNo:'加工中心:', |
|
|
@ -334,14 +380,43 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
getData(){ |
|
|
|
|
|
let inData={ |
|
|
|
|
|
user:this.$store.state.user.name |
|
|
|
|
|
|
|
|
getData(resetPage = true){ |
|
|
|
|
|
if (resetPage) { |
|
|
|
|
|
this.pageIndex = 1 |
|
|
} |
|
|
} |
|
|
getUnqualifiedInspectionReasonsData(inData).then(({data}) => { |
|
|
|
|
|
this.dataList = data.rows |
|
|
|
|
|
|
|
|
this.dataListLoading = true |
|
|
|
|
|
const inData = { |
|
|
|
|
|
user: this.$store.state.user.name, |
|
|
|
|
|
page: this.pageIndex, |
|
|
|
|
|
limit: this.pageSize, |
|
|
|
|
|
defectCode: this.searchData.defectCode, |
|
|
|
|
|
defectDesc: this.searchData.defectDesc, |
|
|
|
|
|
workCenterNo: this.searchData.workCenterNo, |
|
|
|
|
|
active: this.searchData.active |
|
|
|
|
|
} |
|
|
|
|
|
getUnqualifiedInspectionReasonsDataWithPage(inData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0 && data.page) { |
|
|
|
|
|
this.dataList = data.page.list || [] |
|
|
|
|
|
this.totalPage = data.page.totalCount || 0 |
|
|
|
|
|
this.pageIndex = data.page.currPage || this.pageIndex |
|
|
|
|
|
this.pageSize = data.page.pageSize || this.pageSize |
|
|
|
|
|
} else { |
|
|
|
|
|
this.dataList = [] |
|
|
|
|
|
this.totalPage = 0 |
|
|
|
|
|
} |
|
|
|
|
|
this.dataListLoading = false |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.dataListLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
sizeChangeHandle(val) { |
|
|
|
|
|
this.pageSize = val |
|
|
|
|
|
this.getData(true) |
|
|
|
|
|
}, |
|
|
|
|
|
currentChangeHandle(val) { |
|
|
|
|
|
this.pageIndex = val |
|
|
|
|
|
this.getData(false) |
|
|
|
|
|
}, |
|
|
loadWorkCenterList() { |
|
|
loadWorkCenterList() { |
|
|
const inData = { |
|
|
const inData = { |
|
|
username: this.$store.state.user.name |
|
|
username: this.$store.state.user.name |
|
|
@ -432,7 +507,7 @@ |
|
|
saveUnqualifiedInspectionReasonsData(this.modelData).then(({data}) => { |
|
|
saveUnqualifiedInspectionReasonsData(this.modelData).then(({data}) => { |
|
|
if (data && data.code == 200) { |
|
|
if (data && data.code == 200) { |
|
|
this.modelFlag = false |
|
|
this.modelFlag = false |
|
|
this.getData(); |
|
|
|
|
|
|
|
|
this.getData(false); |
|
|
this.$message.success('操作成功') |
|
|
this.$message.success('操作成功') |
|
|
} else { |
|
|
} else { |
|
|
this.$alert(data.msg, '错误', { |
|
|
this.$alert(data.msg, '错误', { |
|
|
@ -456,7 +531,7 @@ |
|
|
deleteUnqualifiedInspectionReasonsData(inData).then(({data}) => { |
|
|
deleteUnqualifiedInspectionReasonsData(inData).then(({data}) => { |
|
|
if (data && data.code == 200) { |
|
|
if (data && data.code == 200) { |
|
|
this.modelFlag = false |
|
|
this.modelFlag = false |
|
|
this.getData(); |
|
|
|
|
|
|
|
|
this.getData(false); |
|
|
this.$message.success('操作成功') |
|
|
this.$message.success('操作成功') |
|
|
} else { |
|
|
} else { |
|
|
this.$alert(data.msg, '错误', { |
|
|
this.$alert(data.msg, '错误', { |
|
|
|