This commit is contained in:
helloDy
2023-06-28 13:58:24 +08:00
parent fcd9576fd9
commit 80796fd241
10 changed files with 1569 additions and 18 deletions

View File

@@ -0,0 +1,208 @@
<!--
* @Author: Do not edit
* @Date: 2023-06-20 11:16:51
* @LastEditTime: 2023-06-28 13:54:25
* @LastEditors: DY
* @Description: 评估计划
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<div>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="供应商名称">
<el-input v-model="formInline.supplierName" placeholder="供应商"></el-input>
</el-form-item>
<el-form-item label="评估模板">
<el-select v-model="formInline.evaluationTemplateId" filterable clearable placeholder="评估模板">
<el-option
v-for="item in modalOptions"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="评估类型">
<el-select v-model="formInline.evaluationType" clearable placeholder="评估类型">
<el-option
v-for="item in typeOptions"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<!-- <el-form-item label="评估类型">
<el-select v-model="formInline.evaluationType" filterable placeholder="评估类型">
<el-option
v-for="item in typeOptions"
:key="item.value"
:label="item.name"
:value="item.value">
</el-option>
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
<div>
<el-table
:data="tableData"
v-loading="dataListLoading"
style="width: 100%">
<el-table-column type="expand">
<template slot-scope="props">
<el-form label-position="left" inline class="demo-table-expand">
<el-form-item label="供应商列表">
<span>{{ props.row.name }}</span>
</el-form-item>
<br>
<el-form-item label="负责人列表">
<span>{{ props.row.shop }}</span>
</el-form-item>
</el-form>
</template>
</el-table-column>
<el-table-column
label="评估类型"
prop="evaluationType">
</el-table-column>
<el-table-column
label="标题"
prop="title">
</el-table-column>
<el-table-column
label="评估模板"
prop="evaluationTemplateName">
</el-table-column>
<el-table-column
label="说明"
prop="description">
</el-table-column>
<el-table-column
label="上次启动时间"
prop="lastStartTime">
</el-table-column>
<el-table-column
label="上次启动评估时间段"
prop="lastStartEvaluationPeriod">
</el-table-column>
<el-table-column
label="预计下次启动时间"
prop="estimatedNextStartTime">
</el-table-column>
<el-table-column
label="提醒人"
prop="reminder">
</el-table-column>
<el-table-column
label="状态"
prop="desc">
</el-table-column>
</el-table>
</div>
</el-card>
</template>
<script>
export default {
data() {
return {
urlOptions: {
addURL: '/supplier/qmsEvaluationPlan',
getDataListURL: "/supplier/qmsEvaluationPlan/page",
getTemplateListURL: '/supplier/qmsEvaluationTemplate/page'
// deleteURL: '/supplier/qmsEvaluationTemplate'
},
dataListLoading: false,
typeOptions: [
{
name: '年度',
id: 0
},
{
name: '季度',
id: 1
},
{
name: '月度',
id: 2
}
],
modalOptions: [],
formInline: {
page: 1,
limit: 10,
evaluationTemplateId: undefined,
evaluationType: undefined,
supplierName: '',
total: 0
},
tableData: []
}
},
mounted() {
this.getTemplate()
},
methods: {
getTemplate() {
this.$http
.get(this.urlOptions.getTemplateListURL, {
params: {
limit: 999,
page: 1
},
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.modalOptions = [];
return this.$message.error(res.msg);
}
this.modalOptions = res.data.list;
})
.catch(() => {
this.dataListLoading = false;
});
},
onSubmit() {
this.dataListLoading = true
this.$http
.get(this.urlOptions.getDataListURL, {
params: this.formInline,
})
.then(({ data: res }) => {
this.dataListLoading = false;
if (res.code !== 0) {
this.tableData = [];
this.formInline.total = 0;
return this.$message.error(res.msg);
}
this.tableData = res.data.list;
this.formInline.total = res.data.total;
})
.catch(() => {
this.dataListLoading = false;
});
}
}
}
</script>
<style scoped>
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
width: 90px;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 50%;
}
</style>