供应商评分
This commit is contained in:
parent
7401dba03f
commit
8d356872a7
|
|
@ -125,14 +125,54 @@ export function editSupplierBindMaterialApi(data) {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 实时分页查询供应商评分
|
||||
export function supplierScorePageApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/ims-supplier-score-rule/page',
|
||||
method: 'get',
|
||||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
},
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
// 分页查询供应商历史评分
|
||||
export function supplierScoreHistApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/ims-supplier-score-rule/hist',
|
||||
method: 'get',
|
||||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
},
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询供应商评分规则分数设定
|
||||
export function supplierScoreRuleListApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/ims-supplier-score-rule/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
},
|
||||
params:data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增/编辑供应商评分规则分数设定
|
||||
export function editSupplierRuleApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/ims-supplier-score-rule/add-or-edit',
|
||||
method: 'post',
|
||||
headers: {
|
||||
//"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,14 +8,16 @@
|
|||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
}" clearable>
|
||||
}" clearable >
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<el-select v-model="queryParams.supplierId" placeholder="请选择供应商" style="width: 240px;">
|
||||
<el-option label="供应商1" :value="1"></el-option>
|
||||
<el-option label="供应商2" :value="2"></el-option>
|
||||
<el-option label="供应商3" :value="2"></el-option>
|
||||
<el-option v-for="item in supplierOptions"
|
||||
:key="item.supplierId"
|
||||
:label="item.supplierName"
|
||||
:value="item.supplierId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
|
@ -43,18 +45,17 @@
|
|||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120" />
|
||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="交货及时率分数" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="产品合格率分数" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="产品合格率分数" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="公司资质认证分数" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="注册资金分数" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="上一年度营业额分数" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="员工数分数" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="订单数量分数" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="订单金额分数" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="总分" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="150" />
|
||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="交货及时率分数" align="center" prop="deliveryOnTimeScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="产品合格率分数" align="center" prop="productPassScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="公司资质认证分数" align="center" prop="companyQualificationCertificationScore" :show-overflow-tooltip="true" width="130"/>
|
||||
<el-table-column label="注册资金分数" align="center" prop="registFundScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="上一年度营业额分数" align="center" prop="lastYearOperatingIncomeScore" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="员工数分数" align="center" prop="workersNumScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="订单数量分数" align="center" prop="orderNumScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="订单金额分数" align="center" prop="orderAmountScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="总分" align="center" prop="totalScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
@ -103,15 +104,15 @@
|
|||
</el-col>
|
||||
<el-col :span="24" v-for="(item,index) in rulesList" :key="index">
|
||||
<el-form-item :label="item.ruleName" required>
|
||||
<div v-for="(sub,sindex) in item.sectionListDTO" :key="sindex" style="width: 100%;display: flex;margin-bottom: 10px;">
|
||||
<div v-for="(sub,sindex) in item.sectionVOList" :key="sindex" style="width: 100%;display: flex;margin-bottom: 10px;">
|
||||
<el-input value="0" disabled v-model="sub.leftValue" style="width: 30%;">
|
||||
<template slot="append">{{ item.unitName }}</template>
|
||||
<!-- <template slot="append">{{ item.unitName }}</template> -->
|
||||
</el-input>
|
||||
<div style="width: 5%;text-align: center;">-</div>
|
||||
<el-input value="0" v-model.number="sub.rightValue" :disabled="sindex<(item.sectionListDTO.length-1)" style="width: 30%;" maxlength="8" @blur="checkRange(sub)">
|
||||
<template slot="append">{{ item.unitName }}</template>
|
||||
<el-input value="0" v-model.number="sub.rightValue" :disabled="sindex<(item.sectionVOList.length-1)" style="width: 30%;" maxlength="8" @blur="checkRange(sub)">
|
||||
<!-- <template slot="append">{{ item.unitName }}</template> -->
|
||||
</el-input>
|
||||
<el-input value="0" v-model.number="sub.sectionScore" :disabled="sindex<(item.sectionListDTO.length-1)" maxlength="5" @blur="checkScore(item,sindex)" style="width: 25%;margin-left: 2%;margin-right: 2%;">
|
||||
<el-input value="0" v-model.number="sub.sectionScore" :disabled="sindex<(item.sectionVOList.length-1)" maxlength="5" @blur="checkScore(item,sindex)" style="width: 25%;margin-left: 2%;margin-right: 2%;">
|
||||
<template slot="append">分</template>
|
||||
</el-input>
|
||||
<el-button
|
||||
|
|
@ -128,8 +129,8 @@
|
|||
>删除</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-input value="0" disabled v-model="item.sectionListDTO[item.sectionListDTO.length-1].rightValue" style="width: 64%;">
|
||||
<template slot="append">{{ item.unitName }}以上</template>
|
||||
<el-input value="0" disabled v-model="item.sectionVOList[item.sectionVOList.length-1].rightValue" style="width: 64%;">
|
||||
<template slot="append">以上</template>
|
||||
</el-input>
|
||||
<el-input value="0" v-model.number="item.setScore" @blur="checkScoreAll(item)" maxlength="5" style="width: 25%;margin-left: 2%;margin-right: 2%;">
|
||||
<template slot="append">分</template>
|
||||
|
|
@ -151,21 +152,35 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 历史评分 -->
|
||||
<el-dialog title="历史评分" :visible.sync="openHistory" width="1200px" append-to-body>
|
||||
<el-dialog title="历史评分" :visible.sync="openHistory" width="80%" append-to-body>
|
||||
<el-table v-loading="loading" :data="dialogTableData" height="500">
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="100" />
|
||||
<el-table-column label="评分周期" align="center" prop="areaName" :show-overflow-tooltip="true" width="100"/>
|
||||
<el-table-column label="评分时间" align="center" prop="" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="交货及时率分数" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="产品合格率分数" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="公司资质认证分数" align="center" prop="" :show-overflow-tooltip="true" width="130"/>
|
||||
<el-table-column label="注册资金分数" align="center" prop="" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="上一年度营业额分数" align="center" prop="" :show-overflow-tooltip="true" width="140"/>
|
||||
<el-table-column label="员工数分数" align="center" prop="" :show-overflow-tooltip="true" width="110"/>
|
||||
<el-table-column label="订单数量分数" align="center" prop="" :show-overflow-tooltip="true" width="110"/>
|
||||
<el-table-column label="订单金额分数" align="center" prop="" :show-overflow-tooltip="true" width="110"/>
|
||||
<el-table-column label="总分" align="center" prop="" :show-overflow-tooltip="true" width="100"/>
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" :show-overflow-tooltip="true" width="140"/>
|
||||
<el-table-column label="评分周期" align="center" prop="ruleType" :show-overflow-tooltip="true" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.ruleType==1">月度</span>
|
||||
<span v-if="scope.row.ruleType==2">季度</span>
|
||||
<span v-if="scope.row.ruleType==3">半年度</span>
|
||||
<span v-if="scope.row.ruleType==4">年度</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评分时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="150"/>
|
||||
<el-table-column label="交货及时率分数" align="center" prop="deliveryOnTimeScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="产品合格率分数" align="center" prop="productPassScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="公司资质认证分数" align="center" prop="companyQualificationCertificationScore" :show-overflow-tooltip="true" width="130"/>
|
||||
<el-table-column label="注册资金分数" align="center" prop="registFundScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="上一年度营业额分数" align="center" prop="lastYearOperatingIncomeScore" :show-overflow-tooltip="true" width="140"/>
|
||||
<el-table-column label="员工数分数" align="center" prop="workersNumScore" :show-overflow-tooltip="true" width="110"/>
|
||||
<el-table-column label="订单数量分数" align="center" prop="orderNumScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="订单金额分数" align="center" prop="orderAmountScore" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="总分" align="center" prop="totalScore" :show-overflow-tooltip="true" width="100"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2>0"
|
||||
:total="total2"
|
||||
:page.sync="queryParams2.pageNum"
|
||||
:limit.sync="queryParams2.pageSize"
|
||||
@pagination="getList2"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="openHistory=false">确 定</el-button>
|
||||
<el-button @click="openHistory=false">取 消</el-button>
|
||||
|
|
@ -175,10 +190,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||
import { systemMaterialTreeApi } from "@/api/dish/material";
|
||||
|
||||
// import { getPageCanteenApi } from "@/api/base/canteen";
|
||||
import { systemAreaTreeApi } from "@/api/base/stall";
|
||||
import { supplierPageApi,supplierScorePageApi,supplierScoreHistApi,supplierScoreRuleListApi,editSupplierRuleApi } from "@/api/foodManage/supplierManage";
|
||||
|
||||
export default {
|
||||
name: "",
|
||||
|
|
@ -207,14 +220,11 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
supplierName: undefined,
|
||||
areaId: undefined,
|
||||
linkman: undefined,
|
||||
status: undefined,
|
||||
categoryIdList: []
|
||||
},
|
||||
treeTypeOptions:[],//类别树
|
||||
supplierId: undefined,
|
||||
areaId: undefined
|
||||
},
|
||||
treeOptions:[],//区域树
|
||||
supplierOptions:[],//区域树
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
|
|
@ -227,111 +237,117 @@ export default {
|
|||
]
|
||||
},
|
||||
rulesList:[
|
||||
{
|
||||
ruleName:"交货及时率",
|
||||
sectionListDTO:[
|
||||
{
|
||||
leftValue:0,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
}
|
||||
],
|
||||
unitName:'%',
|
||||
setScore:null,
|
||||
},
|
||||
{
|
||||
ruleName:"产品合格率",
|
||||
sectionListDTO:[
|
||||
{
|
||||
leftValue:0,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
}
|
||||
],
|
||||
unitName:'%',
|
||||
setScore:null,
|
||||
},
|
||||
{
|
||||
ruleName:"公司资质认证",
|
||||
sectionListDTO:[
|
||||
{
|
||||
leftValue:0,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
}
|
||||
],
|
||||
unitName:'个',
|
||||
setScore:null,
|
||||
},
|
||||
{
|
||||
ruleName:"注册资金(万元)",
|
||||
sectionListDTO:[
|
||||
{
|
||||
leftValue:0,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
}
|
||||
],
|
||||
unitName:'万元',
|
||||
setScore:null,
|
||||
},
|
||||
{
|
||||
ruleName:"上一年度营业额(万元)",
|
||||
sectionListDTO:[
|
||||
{
|
||||
leftValue:0,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
}
|
||||
],
|
||||
unitName:'万元',
|
||||
setScore:null,
|
||||
},
|
||||
{
|
||||
ruleName:"员工数(人)",
|
||||
sectionListDTO:[
|
||||
{
|
||||
leftValue:0,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
}
|
||||
],
|
||||
unitName:'人',
|
||||
setScore:null,
|
||||
},
|
||||
{
|
||||
ruleName:"订单数量(个)",
|
||||
sectionListDTO:[
|
||||
{
|
||||
leftValue:0,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
}
|
||||
],
|
||||
unitName:'个',
|
||||
setScore:null,
|
||||
},
|
||||
{
|
||||
ruleName:"订单金额(万元)",
|
||||
sectionListDTO:[
|
||||
{
|
||||
leftValue:0,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
}
|
||||
],
|
||||
unitName:'万元',
|
||||
setScore:null,
|
||||
}
|
||||
// {
|
||||
// ruleName:"交货及时率",
|
||||
// sectionVOList:[
|
||||
// {
|
||||
// leftValue:0,
|
||||
// rightValue:null,
|
||||
// sectionScore:null,
|
||||
// }
|
||||
// ],
|
||||
// unitName:'%',
|
||||
// setScore:null,
|
||||
// },
|
||||
// {
|
||||
// ruleName:"产品合格率",
|
||||
// sectionVOList:[
|
||||
// {
|
||||
// leftValue:0,
|
||||
// rightValue:null,
|
||||
// sectionScore:null,
|
||||
// }
|
||||
// ],
|
||||
// unitName:'%',
|
||||
// setScore:null,
|
||||
// },
|
||||
// {
|
||||
// ruleName:"公司资质认证",
|
||||
// sectionVOList:[
|
||||
// {
|
||||
// leftValue:0,
|
||||
// rightValue:null,
|
||||
// sectionScore:null,
|
||||
// }
|
||||
// ],
|
||||
// unitName:'个',
|
||||
// setScore:null,
|
||||
// },
|
||||
// {
|
||||
// ruleName:"注册资金(万元)",
|
||||
// sectionVOList:[
|
||||
// {
|
||||
// leftValue:0,
|
||||
// rightValue:null,
|
||||
// sectionScore:null,
|
||||
// }
|
||||
// ],
|
||||
// unitName:'万元',
|
||||
// setScore:null,
|
||||
// },
|
||||
// {
|
||||
// ruleName:"上一年度营业额(万元)",
|
||||
// sectionVOList:[
|
||||
// {
|
||||
// leftValue:0,
|
||||
// rightValue:null,
|
||||
// sectionScore:null,
|
||||
// }
|
||||
// ],
|
||||
// unitName:'万元',
|
||||
// setScore:null,
|
||||
// },
|
||||
// {
|
||||
// ruleName:"员工数(人)",
|
||||
// sectionVOList:[
|
||||
// {
|
||||
// leftValue:0,
|
||||
// rightValue:null,
|
||||
// sectionScore:null,
|
||||
// }
|
||||
// ],
|
||||
// unitName:'人',
|
||||
// setScore:null,
|
||||
// },
|
||||
// {
|
||||
// ruleName:"订单数量(个)",
|
||||
// sectionVOList:[
|
||||
// {
|
||||
// leftValue:0,
|
||||
// rightValue:null,
|
||||
// sectionScore:null,
|
||||
// }
|
||||
// ],
|
||||
// unitName:'个',
|
||||
// setScore:null,
|
||||
// },
|
||||
// {
|
||||
// ruleName:"订单金额(万元)",
|
||||
// sectionVOList:[
|
||||
// {
|
||||
// leftValue:0,
|
||||
// rightValue:null,
|
||||
// sectionScore:null,
|
||||
// }
|
||||
// ],
|
||||
// unitName:'万元',
|
||||
// setScore:null,
|
||||
// }
|
||||
],
|
||||
openHistory: false,
|
||||
queryParams2: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
total2: 0,
|
||||
histRow:{},
|
||||
dialogTableData:[],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getTypeTreeData();
|
||||
created() {
|
||||
this.getTreeData();
|
||||
// this.getList();
|
||||
this.getSupplierData();
|
||||
this.getList();
|
||||
|
||||
},
|
||||
computed:{
|
||||
|
|
@ -345,22 +361,19 @@ export default {
|
|||
return sum
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//类型树
|
||||
getTypeTreeData() {
|
||||
let param = {
|
||||
// categoryType:1,
|
||||
}
|
||||
systemMaterialTreeApi(param).then((response) => {
|
||||
this.treeTypeOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
//区域树
|
||||
getTreeData() {
|
||||
systemAreaTreeApi({}).then((response) => {
|
||||
this.treeOptions = response.data;
|
||||
});
|
||||
},
|
||||
/** 查询供应商下拉结构 */
|
||||
getSupplierData() {
|
||||
supplierPageApi({ isPaging:1,areaIdList:[] }).then((response) => {
|
||||
this.supplierOptions = response.rows||[];
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -377,22 +390,22 @@ export default {
|
|||
let param = {
|
||||
"pageNum": this.queryParams.pageNum,
|
||||
"pageSize": this.queryParams.pageSize,
|
||||
"supplierName": this.queryParams.supplierName,
|
||||
"categoryIdList": this.queryParams.categoryIdList,
|
||||
"areaId": this.queryParams.areaId,
|
||||
"linkman": this.queryParams.linkman,
|
||||
"status": this.queryParams.status
|
||||
"supplierId": this.queryParams.supplierId,
|
||||
"areaId": this.queryParams.areaId,
|
||||
}
|
||||
// getPageCanteenApi(param).then(response => {
|
||||
// this.tableListData = response.rows;
|
||||
// this.total = Number(response.total);
|
||||
supplierScorePageApi(param).then(response => {
|
||||
this.tableListData = response.rows;
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
// });
|
||||
});
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleRules() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
supplierScoreRuleListApi({}).then(response => {
|
||||
this.rulesList = response.data;
|
||||
this.open = true;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
|
|
@ -407,12 +420,12 @@ export default {
|
|||
//item->评分项目(如:交货及时率) sub->评分区间(如 0%-10%)
|
||||
|
||||
handleAdd(item){
|
||||
let sub = item.sectionListDTO[item.sectionListDTO.length-1]
|
||||
let sub = item.sectionVOList[item.sectionVOList.length-1]
|
||||
if(!sub.rightValue||!sub.sectionScore){
|
||||
this.$modal.msgError('请输入'+item.ruleName+'和得分');
|
||||
}else{
|
||||
item.sectionListDTO.push({
|
||||
leftValue:item.sectionListDTO[item.sectionListDTO.length-1].rightValue,
|
||||
item.sectionVOList.push({
|
||||
leftValue:item.sectionVOList[item.sectionVOList.length-1].rightValue,
|
||||
rightValue:null,
|
||||
sectionScore:null,
|
||||
})
|
||||
|
|
@ -420,8 +433,8 @@ export default {
|
|||
},
|
||||
//item->评分项目(如:交货及时率) sub->评分区间(如 0%-10%)
|
||||
handleDel(item,sindex){
|
||||
item.sectionListDTO.splice(sindex,1)
|
||||
item.sectionListDTO[sindex].leftValue = item.sectionListDTO[sindex-1].rightValue
|
||||
item.sectionVOList.splice(sindex,1)
|
||||
item.sectionVOList[sindex].leftValue = item.sectionVOList[sindex-1].rightValue
|
||||
},
|
||||
//item->评分项目(如:交货及时率) sub->评分区间(如 0%-10%
|
||||
//区间输入框输入校验(不可大于前者值)
|
||||
|
|
@ -434,28 +447,29 @@ export default {
|
|||
//区间分数
|
||||
checkScore(item,sindex){
|
||||
if(sindex>0){
|
||||
if(item.sectionListDTO[sindex].sectionScore<item.sectionListDTO[sindex-1].sectionScore){
|
||||
item.sectionListDTO[sindex].sectionScore=item.sectionListDTO[sindex-1].sectionScore+1
|
||||
if(item.sectionVOList[sindex].sectionScore<item.sectionVOList[sindex-1].sectionScore){
|
||||
item.sectionVOList[sindex].sectionScore=item.sectionVOList[sindex-1].sectionScore+1
|
||||
}
|
||||
}
|
||||
if(item.setScore<item.sectionListDTO[sindex].sectionScore){
|
||||
item.setScore=item.sectionListDTO[sindex].sectionScore+1
|
||||
if(item.setScore<item.sectionVOList[sindex].sectionScore){
|
||||
item.setScore=item.sectionVOList[sindex].sectionScore+1
|
||||
}
|
||||
},
|
||||
//每项最后分数
|
||||
checkScoreAll(item){
|
||||
if(item.setScore<item.sectionListDTO[item.sectionListDTO.length-1].sectionScore){
|
||||
item.setScore=item.sectionListDTO[item.sectionListDTO.length-1].sectionScore+1
|
||||
if(item.setScore<item.sectionVOList[item.sectionVOList.length-1].sectionScore){
|
||||
item.setScore=item.sectionVOList[item.sectionVOList.length-1].sectionScore+1
|
||||
}
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.rulesList)
|
||||
try{
|
||||
this.rulesList.forEach(item => {
|
||||
let index = item.sectionListDTO.findIndex(v=>(!v.rightValue||!v.sectionScore))
|
||||
item.areaId = this.form.areaId
|
||||
item.ruleType = this.form.ruleType
|
||||
let index = item.sectionVOList.findIndex(v=>(!v.rightValue||!v.sectionScore))
|
||||
if(index>-1){
|
||||
this.$modal.msgError('请输入'+item.ruleName+'和得分');
|
||||
throw new Error()
|
||||
|
|
@ -469,22 +483,36 @@ export default {
|
|||
if(this.allScore!=100){
|
||||
this.$modal.msgError('供应商评分总分需要是100分!');
|
||||
}else{
|
||||
// addType(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("新增成功");
|
||||
// this.open = false;
|
||||
// this.getList();
|
||||
// });
|
||||
console.log(this.rulesList)
|
||||
editSupplierRuleApi(this.rulesList).then(response => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
handleView(row){
|
||||
// getType().then(response => {
|
||||
// this.form = response.data;
|
||||
this.histRow = row;
|
||||
this.getList2()
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList2() {
|
||||
let param = {
|
||||
"pageNum": this.queryParams2.pageNum,
|
||||
"pageSize": this.queryParams2.pageSize,
|
||||
"supplierId": this.histRow.supplierId,
|
||||
"areaIdList": [this.histRow.areaId],
|
||||
}
|
||||
this.loading = true;
|
||||
supplierScoreHistApi(param).then(response => {
|
||||
this.dialogTableData = response.rows;
|
||||
this.total2 = Number(response.total);
|
||||
this.openHistory = true;
|
||||
// });
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue