parent
4fa2e91662
commit
93b466f670
3 changed files with 568 additions and 0 deletions
@ -0,0 +1,125 @@ |
||||
<template> |
||||
<el-dialog |
||||
:title="infoTitle" |
||||
append-to-body |
||||
:modelValue="openShow" |
||||
width="30%" |
||||
@close="closeDialog" |
||||
> |
||||
<avue-form ref="form" :option="option"></avue-form> |
||||
|
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
// import { |
||||
// updateProcess, |
||||
// } from '../../api/flowManagement/index'; |
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
infoTitle: { |
||||
type: String, |
||||
default: '新增', |
||||
}, |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow: false, |
||||
option: { |
||||
submitBtn: false, |
||||
emptyBtn: false, |
||||
column: [ |
||||
{ |
||||
label: '问题描述', |
||||
prop: 'input', |
||||
span: 24, |
||||
rules: [{ required: true, message: '请输入', trigger: 'blur' }], |
||||
}, |
||||
{ |
||||
label: '原因', |
||||
prop: 'input2', |
||||
type: 'textarea', |
||||
rows: 3, |
||||
span: 24, |
||||
rules: [{ required: true, message: '请输入', trigger: 'blur' }], |
||||
}, |
||||
{ |
||||
label: '措施', |
||||
prop: 'input2', |
||||
type: 'textarea', |
||||
span: 24, |
||||
rows: 3, |
||||
rules: [{ required: true, message: '请输入', trigger: 'blur' }], |
||||
}, |
||||
{ |
||||
label: '免责理由', |
||||
prop: 'input2', |
||||
type: 'textarea', |
||||
span: 24, |
||||
rows: 3, |
||||
rules: [{ required: true, message: '请输入', trigger: 'blur' }], |
||||
}, |
||||
{ |
||||
label: '免责金额', |
||||
prop: 'input2', |
||||
type: 'number', |
||||
span: 24, |
||||
rules: [{ required: true, message: '请输入', trigger: 'blur' }], |
||||
}, |
||||
{ |
||||
label: '固化文件', |
||||
prop: 'imgUrl', |
||||
type: 'upload', |
||||
multiple: true, |
||||
span: 24, |
||||
// propsHttp: { |
||||
// url: 'url', |
||||
// name: 'name', |
||||
// res: 'data', |
||||
// }, |
||||
// action, |
||||
}, |
||||
], |
||||
}, |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
}, |
||||
methods: { |
||||
closeDialog() { |
||||
this.openShow = false; |
||||
this.$emit('closeDialog'); |
||||
}, |
||||
submit() { |
||||
this.$refs.form.validate(async valid => { |
||||
if (valid) { |
||||
let params = { |
||||
id: this.$route.query.id, |
||||
approvalStatus: '', |
||||
|
||||
// status: this.option.column[0].value, |
||||
// reason: this.option.column[1].value, |
||||
}; |
||||
// updateProcess(params).then((res) => { |
||||
// if (res.code == 200) { |
||||
// this.$message.success('操作成功'); |
||||
// this.closeDialog(); |
||||
// } |
||||
// }); |
||||
} |
||||
}); |
||||
}, |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,98 @@ |
||||
<template> |
||||
<el-dialog title="审核" append-to-body :modelValue="openShow" width="30%" @close="closeDialog"> |
||||
<avue-form ref="form" :option="option"></avue-form> |
||||
|
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
// import { |
||||
// updateProcess, |
||||
// } from '../../api/flowManagement/index'; |
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false, |
||||
}, |
||||
rowItem:{ |
||||
type: Object, |
||||
default: {}, |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow: false, |
||||
option: { |
||||
submitBtn: false, |
||||
emptyBtn: false, |
||||
column: [ |
||||
{ |
||||
label: '审批结果', |
||||
prop: 'input', |
||||
span: 24, |
||||
type: 'radio', |
||||
dicData: [ |
||||
{ label: '审批通过', value: 0 }, |
||||
{ label: '审批不通过', value: 1 }, |
||||
], |
||||
rules: [{ required: true, message: '请输入姓名', trigger: 'blur' }], |
||||
}, |
||||
{ |
||||
label: '驳回原因', |
||||
prop: 'input2', |
||||
// type: 'select', |
||||
type: 'textarea', |
||||
span: 24, |
||||
// dicData: [ |
||||
// { |
||||
// label: '不需要结算', |
||||
// value: '1', |
||||
// }, |
||||
// { |
||||
// label: '基础数据有误', |
||||
// value: '2', |
||||
// } |
||||
// ] |
||||
}, |
||||
], |
||||
}, |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.openShow = this.showDialog; |
||||
}, |
||||
methods: { |
||||
closeDialog() { |
||||
this.openShow = false; |
||||
this.$emit('closeDialog'); |
||||
}, |
||||
submit() { |
||||
this.$refs.form.validate(async (valid) => { |
||||
if (valid) { |
||||
let params = { |
||||
id: this.$route.query.id, |
||||
approvalStatus:'', |
||||
|
||||
// status: this.option.column[0].value, |
||||
// reason: this.option.column[1].value, |
||||
}; |
||||
// updateProcess(params).then((res) => { |
||||
// if (res.code == 200) { |
||||
// this.$message.success('操作成功'); |
||||
// this.closeDialog(); |
||||
// } |
||||
// }); |
||||
|
||||
} |
||||
}) |
||||
} |
||||
}, |
||||
}; |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,345 @@ |
||||
<template> |
||||
<basic-container> |
||||
<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="addDialog()">新增</el-button> |
||||
</template> |
||||
<template #menu-right> </template> |
||||
<template #menu="{ row }"> |
||||
<el-button type="text" @click="updateDialog(row)">修改</el-button> |
||||
<el-button type="text" @click="review(row)">审核</el-button> |
||||
</template> |
||||
</avue-crud> |
||||
|
||||
<!-- 新增 --> |
||||
<addDialog |
||||
v-if="infoShow" |
||||
:showDialog="infoShow" |
||||
@closeDialog="closeDialog" |
||||
:infoTitle="infoTitle" |
||||
></addDialog> |
||||
|
||||
<!-- 审核 --> |
||||
<checkDialog v-if="checkResultOpen" @closeDialog="closeDialog" :show-dialog="checkResultOpen" :rowItem="rowItem"></checkDialog> |
||||
</basic-container> |
||||
</template> |
||||
|
||||
<script> |
||||
import addDialog from './components/addDialog.vue'; |
||||
import checkDialog from './components/checkDialog.vue'; |
||||
export default { |
||||
components: { |
||||
addDialog, |
||||
checkDialog |
||||
}, |
||||
data() { |
||||
return { |
||||
checkResultOpen: false, |
||||
infoShow: false, |
||||
infoTitle: '新增', |
||||
form: {}, |
||||
selectionList: [], |
||||
query: {}, |
||||
loading: false, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
columnSort: true, |
||||
tip: false, |
||||
height: 'auto', |
||||
calcHeight: 32, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
searchIcon: true, |
||||
searchIndex: 3, |
||||
tree: false, |
||||
border: true, |
||||
index: true, |
||||
selection: false, |
||||
addBtn: false, |
||||
editBtn: false, |
||||
viewBtn: false, |
||||
delBtn: false, |
||||
editBtnText: '修改', |
||||
labelWidth: 120, |
||||
menuWidth: 100, |
||||
dialogWidth: 900, |
||||
dialogClickModal: false, |
||||
searchEnter: true, |
||||
excelBtn: false, |
||||
filterBtn: true, |
||||
searchShowBtn: false, |
||||
excelBtn: true, |
||||
showOverflowTooltip: true, |
||||
addBtnIcon: ' ', |
||||
viewBtnIcon: ' ', |
||||
delBtnIcon: ' ', |
||||
editBtnIcon: ' ', |
||||
gridBtn: false, |
||||
searchLabelPosition: 'left', |
||||
searchGutter: 24, |
||||
searchSpan: 6, |
||||
menuAlign: 'left', |
||||
gridBtn: false, |
||||
searchMenuPosition: 'right', |
||||
align: 'center', |
||||
column: [ |
||||
{ |
||||
label: '提出人', |
||||
prop: 'arr1', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '岗位', |
||||
prop: 'arr2', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '发生时间', |
||||
prop: 'arr3', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '免责问题描述', |
||||
prop: 'arr4', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '原因', |
||||
prop: 'arr5', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '措施', |
||||
prop: 'arr6', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '免责理由', |
||||
prop: 'arr7', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
{ |
||||
label: '免责金额', |
||||
prop: 'arr8', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
}, |
||||
// { |
||||
// label: '固化文件', |
||||
// prop: 'arr9', |
||||
// search: true, |
||||
// sortable: true, |
||||
// span: 12, |
||||
// }, |
||||
{ |
||||
label: '状态', |
||||
prop: 'arr10', |
||||
search: true, |
||||
sortable: true, |
||||
span: 12, |
||||
type: 'select', |
||||
dicData: [ |
||||
{ |
||||
label: '待工艺员审批', |
||||
value: 0, |
||||
}, |
||||
{ |
||||
label: '待质量工程师审批', |
||||
value: 1, |
||||
}, |
||||
{ |
||||
label: '待业务主管审批', |
||||
value: 2, |
||||
}, |
||||
{ |
||||
label: '工艺员驳回', |
||||
value: 3, |
||||
}, |
||||
{ |
||||
label: '质量工程师退回', |
||||
value: 4, |
||||
}, |
||||
{ |
||||
label: '业务主管审批', |
||||
value: 5, |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
}, |
||||
|
||||
data: [], |
||||
rowItem:{} |
||||
}; |
||||
}, |
||||
methods: { |
||||
// 审核 |
||||
review(row) { |
||||
this.checkResultOpen = true; |
||||
this.rowItem = row; |
||||
}, |
||||
// 新增 |
||||
addDialog() { |
||||
this.infoShow = true; |
||||
this.infoTitle = '新增'; |
||||
}, |
||||
// 修改 |
||||
updateDialog() { |
||||
this.infoShow = true; |
||||
this.infoTitle = '修改'; |
||||
}, |
||||
// 关闭 |
||||
closeDialog() { |
||||
this.infoShow = false; |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
rowSave(row, done, loading) { |
||||
// addPersonAbility(row).then( |
||||
// () => { |
||||
// this.onLoad(this.page); |
||||
// this.$message({ |
||||
// type: 'success', |
||||
// message: '操作成功!', |
||||
// }); |
||||
// done(); |
||||
// }, |
||||
// error => { |
||||
// window.console.log(error); |
||||
// loading(); |
||||
// } |
||||
// ); |
||||
}, |
||||
rowUpdate(row, index, done, loading) { |
||||
// updatePersonAbility(row).then( |
||||
// () => { |
||||
// this.onLoad(this.page); |
||||
// this.$message({ |
||||
// type: 'success', |
||||
// message: '操作成功!', |
||||
// }); |
||||
// done(); |
||||
// }, |
||||
// error => { |
||||
// window.console.log(error); |
||||
// loading(); |
||||
// } |
||||
// ); |
||||
}, |
||||
rowDel(row) { |
||||
this.$confirm('确定将选择数据删除?', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning', |
||||
}) |
||||
.then(() => { |
||||
// return removePersonAbility(row.id); |
||||
}) |
||||
.then(() => { |
||||
this.onLoad(this.page); |
||||
this.$message({ |
||||
type: 'success', |
||||
message: '操作成功!', |
||||
}); |
||||
}); |
||||
}, |
||||
|
||||
searchReset() { |
||||
this.query = {}; |
||||
this.onLoad(this.page); |
||||
}, |
||||
searchChange(params, done) { |
||||
this.query = params; |
||||
this.page.currentPage = 1; |
||||
this.onLoad(this.page, params); |
||||
done(); |
||||
}, |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
selectionClear() { |
||||
this.selectionList = []; |
||||
this.$refs.crud.toggleSelection(); |
||||
}, |
||||
|
||||
currentChange(currentPage) { |
||||
this.page.currentPage = currentPage; |
||||
}, |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
refreshChange() { |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
handleChange(file, fileList) { |
||||
// proxy.$Export.xlsx(file.raw).then((data) => { |
||||
// data.value = data.results; |
||||
// }); |
||||
this.$message({ |
||||
type: 'success', |
||||
message: '操作成功!', |
||||
}); |
||||
}, |
||||
|
||||
onLoad(page, params = {}) { |
||||
this.data = [ |
||||
{ |
||||
arr1: '张三', |
||||
arr2: '热表分厂', |
||||
arr3: '2026-01-09', |
||||
arr4: '问题描述1', |
||||
arr5: '正常操作', |
||||
arr6: '下次注意', |
||||
arr7: '正常损耗', |
||||
arr8: '55', |
||||
// arr9: '', |
||||
arr10: '4', |
||||
}, |
||||
]; |
||||
// this.loading = true; |
||||
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
||||
// this.data = res.data.data.records; |
||||
// this.loading = false; |
||||
// this.page.total = res.data.data.total; |
||||
// this.selectionClear(); |
||||
// }); |
||||
}, |
||||
}, |
||||
mounted() {}, |
||||
}; |
||||
</script> |
||||
d |
||||
Loading…
Reference in new issue