You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
412 lines
14 KiB
412 lines
14 KiB
<template> |
|
<div> |
|
<avue-crud :option="option" :table-loading="loading" :data="data" v-model="form" v-model:page="page" ref="crud" |
|
@row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" |
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
@refresh-change="refreshChange" @on-load="onLoad"> |
|
<template #menu-left> |
|
<el-button type="primary" @click="addFn(null,true)">新增</el-button> |
|
<el-button type="danger" @click="handleDelete()">删除</el-button> |
|
</template> |
|
<template #menu-right> |
|
|
|
</template> |
|
<template #menu="scope"> |
|
<el-button type="primary" text plain style="border: 0; background-color: transparent !important" |
|
size="medium" @click.stop="addFn(scope.row,false)">修改</el-button> |
|
</template> |
|
|
|
</avue-crud> |
|
<!-- 增加 修改 --> |
|
<addEditDialog v-if="isOpen" :row-id="rowId" :showDialog="isOpen" @closeDialog="closeDialog" :moldAddMore="moldAddMore"></addEditDialog> |
|
</div> |
|
</template> |
|
<script> |
|
import addEditDialog from './components/addMonthEditDialog.vue' |
|
import {getMonthList,deleteMonth} from '@/api/qualityManagement/qualityObjective' |
|
export default { |
|
components: { |
|
addEditDialog, |
|
Table |
|
}, |
|
data() { |
|
return { |
|
loading:false, |
|
selectionList: [], |
|
rowId:'', |
|
option: { |
|
height: 'auto', |
|
calcHeight: 32, |
|
tip: false, |
|
size: 'medium', |
|
simplePage: true, |
|
searchShow: true, |
|
searchMenuSpan: 18, |
|
searchIcon: true, |
|
searchIndex: 3, |
|
tree: false, |
|
border: true, |
|
index: true, |
|
selection: true, |
|
editBtn: false, |
|
viewBtn: false, |
|
delBtn: false, |
|
addBtn: false, |
|
editBtnText: '修改', |
|
labelWidth: 120, |
|
menuWidth: 70, |
|
dialogWidth: 640, |
|
dialogClickModal: false, |
|
searchEnter: true, |
|
excelBtn: false, |
|
filterBtn: true, |
|
searchShowBtn: false, |
|
columnSort: true, |
|
excelBtn: true, |
|
columnSort: true, |
|
index: false, |
|
showOverflowTooltip: true, |
|
searchLabelPosition: 'left', |
|
searchGutter: 24, |
|
searchSpan: 6, |
|
menuAlign: 'left', |
|
gridBtn: false, |
|
searchMenuPosition: 'right', |
|
addBtnIcon: ' ', |
|
viewBtnIcon: ' ', |
|
delBtnIcon: ' ', |
|
editBtnIcon: ' ', |
|
align: 'center', |
|
column: [ |
|
{ |
|
label: '月份', |
|
prop: 'month', |
|
type: "month", |
|
sortable: true, |
|
filter: true, |
|
format:'YYYY-MM', |
|
valueFormat:'YYYY-MM', |
|
span: 24, |
|
search: true, |
|
width: 120, |
|
searchLabelWidth: 50, |
|
}, |
|
{ |
|
label: '后工序审理实际值', |
|
prop: 'afterReviewActual', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '后工序审理目标值', |
|
prop: 'afterReviewTarget', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '后工序批次性实际值', |
|
prop: 'afterBatActual', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '后工序批次目标值', |
|
prop: 'afterBatTarget', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
|
|
{ |
|
label: '质量损失额实际值', |
|
prop: 'lossActual', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '质量损失额目标值', |
|
prop: 'lossTarget', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '出厂不合格品率实际值', |
|
prop: 'unqualifiedActual', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 200, |
|
}, |
|
{ |
|
label: '出厂不合格品率目标值', |
|
prop: 'unqualifiedTarget', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 200, |
|
}, |
|
{ |
|
label: '适航宇航实际值', |
|
prop: 'spaceActual', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '适航宇航目标值', |
|
prop: 'spaceTarget', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '投诉实际值', |
|
prop: 'complaintActual', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '投诉目标值', |
|
prop: 'complaintTarget', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '低层次实际值', |
|
prop: 'lowActual', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
{ |
|
label: '低层次目标值', |
|
prop: 'lowTarget', |
|
sortable: true, |
|
filter: true, |
|
span: 24, |
|
search: false, |
|
width: 180, |
|
}, |
|
|
|
|
|
] |
|
}, |
|
query:{}, |
|
form: { |
|
name: '', |
|
}, |
|
page: { |
|
pageSize: 10, |
|
currentPage: 1, |
|
total: 0, |
|
}, |
|
isOpen: false, |
|
moldAddMore:false, |
|
} |
|
}, |
|
methods: { |
|
addFn(row,flag) { |
|
this.isOpen = true |
|
this.rowId = row ? row.id : '' |
|
console.log('row----------',row) |
|
this.moldAddMore = flag |
|
}, |
|
closeDialog(val) { |
|
this.isOpen = false |
|
if(val){ |
|
this.onLoad() |
|
} |
|
}, |
|
searchChange(params, done) { |
|
this.query = params; |
|
this.page.currentPage = 1; |
|
this.onLoad(); |
|
done(); |
|
}, |
|
searchReset(){ |
|
this.query = {} |
|
this.onLoad() |
|
}, |
|
refreshChange() { |
|
this.onLoad(); |
|
}, |
|
currentChange(currentPage) { |
|
this.page.currentPage = currentPage; |
|
}, |
|
sizeChange(pageSize) { |
|
this.page.pageSize = pageSize; |
|
}, |
|
handleDelete() { |
|
if (this.selectionList.length === 0) { |
|
this.$message.warning('请选择至少一条数据'); |
|
return; |
|
} |
|
this.$confirm('确定将选择数据删除?', { |
|
confirmButtonText: '确定', |
|
cancelButtonText: '取消', |
|
type: 'warning', |
|
}).then(() => { |
|
deleteMonth({ |
|
ids:this.selectionList.map(item => item.id).join(',') |
|
}).then(res =>{ |
|
if(res.data.code == 200){ |
|
this.$message.success('删除成功') |
|
this.onLoad() |
|
} |
|
}) |
|
}) |
|
}, |
|
// 多选 |
|
selectionChange(list) { |
|
this.selectionList = list; |
|
}, |
|
onLoad() { |
|
this.loading = true |
|
getMonthList({ |
|
current:this.page.currentPage, |
|
size:this.page.pageSize, |
|
...this.query |
|
}).then(res =>{ |
|
this.data = res.data.data.records |
|
this.page.total = res.data.data.total |
|
this.loading = false |
|
}) |
|
// this.data = [ |
|
// { |
|
// "actualBhgpl": 22.0, |
|
// "actualDcc": 22.0, |
|
// "actualHgxpcx": 22.0, |
|
// "actualHgxsld": 22.0, |
|
// "actualShyh": 22.0, |
|
// "actualTs": 22.0, |
|
// "actualZlsse": 22.0, |
|
// "keyValue": 4, |
|
// "mauId": 4, |
|
// "mauMonth": "2024-05", |
|
// "targetBhgpl": 32.0, |
|
// "targetDcc": 22.0, |
|
// "targetHgxpcx": 22.0, |
|
// "targetHgxsld": 22.0, |
|
// "targetShyh": 22.0, |
|
// "targetTs": 22.0, |
|
// "targetZlsse": 32.0, |
|
// "updateMan": { |
|
// "userId": 541, |
|
// "userName": "崔殿龙" |
|
// }, |
|
// "updateTime": "2024-04-16 14:05:59" |
|
// }, |
|
// { |
|
// "actualBhgpl": 7.0, |
|
// "actualDcc": 13.0, |
|
// "actualHgxpcx": 3.0, |
|
// "actualHgxsld": 1.0, |
|
// "actualShyh": 9.0, |
|
// "actualTs": 11.0, |
|
// "actualZlsse": 5.0, |
|
// "keyValue": 1, |
|
// "mauId": 1, |
|
// "mauMonth": "2024-04", |
|
// "targetBhgpl": 18.0, |
|
// "targetDcc": 14.0, |
|
// "targetHgxpcx": 4.0, |
|
// "targetHgxsld": 12.0, |
|
// "targetShyh": 10.0, |
|
// "targetTs": 12.0, |
|
// "targetZlsse": 16.0, |
|
// "updateMan": { |
|
// "userId": 541, |
|
// "userName": "崔殿龙" |
|
// }, |
|
// "updateTime": "2024-04-16 13:48:56" |
|
// }, |
|
// { |
|
// "actualBhgpl": 11.0, |
|
// "actualDcc": 11.0, |
|
// "actualHgxpcx": 11.0, |
|
// "actualHgxsld": 11.0, |
|
// "actualShyh": 11.0, |
|
// "actualTs": 11.0, |
|
// "actualZlsse": 11.1, |
|
// "keyValue": 3, |
|
// "mauId": 3, |
|
// "mauMonth": "2024-03", |
|
// "targetBhgpl": 11.0, |
|
// "targetDcc": 11.0, |
|
// "targetHgxpcx": 11.0, |
|
// "targetHgxsld": 11.0, |
|
// "targetShyh": 11.0, |
|
// "targetTs": 11.0, |
|
// "targetZlsse": 12.0, |
|
// "updateMan": { |
|
// "userId": 541, |
|
// "userName": "崔殿龙" |
|
// }, |
|
// "updateTime": "2024-04-23 09:09:16" |
|
// }, |
|
// { |
|
// "actualBhgpl": 7.0, |
|
// "actualDcc": 7.0, |
|
// "actualHgxpcx": 77.0, |
|
// "actualHgxsld": 7.0, |
|
// "actualShyh": 7.0, |
|
// "actualTs": 77.0, |
|
// "actualZlsse": 7.0, |
|
// "keyValue": 15, |
|
// "mauId": 15, |
|
// "mauMonth": "2024-02", |
|
// "targetBhgpl": 17.0, |
|
// "targetDcc": 7.0, |
|
// "targetHgxpcx": 7.0, |
|
// "targetHgxsld": 12.0, |
|
// "targetShyh": 7.0, |
|
// "targetTs": 7.0, |
|
// "targetZlsse": 17.0, |
|
// "updateMan": { |
|
// "userId": 541, |
|
// "userName": "崔殿龙" |
|
// }, |
|
// "updateTime": "2024-04-16 15:51:52" |
|
// } |
|
// ] |
|
// this.page.total = this.data.length |
|
// this.loading = false |
|
// setTimeout(() => { |
|
// this.selectionClear() |
|
// }, 500) |
|
} |
|
} |
|
} |
|
</script> |
|
<style lang="scss" scoped></style> |