commit
This commit is contained in:
+11
-2
@@ -17,7 +17,9 @@ import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.POST;
|
||||
@@ -72,7 +74,7 @@ public class GhKhZpController {
|
||||
}
|
||||
cnd.groupBy("zb.id");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(khzpService.listPage(pageNumber, pageSize, sql));
|
||||
return Result.success(khzpService.listPageMap(pageNumber, pageSize, sql));
|
||||
}
|
||||
|
||||
@At
|
||||
@@ -107,6 +109,8 @@ public class GhKhZpController {
|
||||
}
|
||||
}
|
||||
baseService.dao().insertOrUpdate(record);
|
||||
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@@ -122,7 +126,12 @@ public class GhKhZpController {
|
||||
}
|
||||
});
|
||||
});
|
||||
return Result.success(khzb);
|
||||
NutMap nutMap = Lang.obj2nutmap(khzb);
|
||||
Kh_record record = khZbService.dao().fetch(Kh_record.class, Cnd.where("zb_id", "=", id).and("union_id", "=", SecurityUtil.getUnionId()));
|
||||
if(record != null) {
|
||||
nutMap.put("fillTime", record.getFillTime());
|
||||
}
|
||||
return Result.success(nutMap);
|
||||
}
|
||||
|
||||
@At
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ public class GhkhGhzbController {
|
||||
@POST
|
||||
@SaCheckPermission("ghkh.khzb")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Result doEdit(@Param(value = "kh_zb") Kh_zb kh_zb) {
|
||||
public Result doEdit(@Param(value = "kh_zb") Kh_zb kh_zb, @Param(value = "type") String type) {
|
||||
khZbService.updateIgnoreNull(kh_zb);
|
||||
|
||||
List<kh_nr> query = khNrService.query(Cnd.where("zb_id", "=", kh_zb.getId()));
|
||||
|
||||
+6
-5
@@ -35,17 +35,13 @@ import java.util.List;
|
||||
@IocBean
|
||||
public class GhkhXghshController {
|
||||
|
||||
|
||||
@Inject
|
||||
private KhXghshService khXghshService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/ghkh/xghsh.html")
|
||||
@SaCheckPermission("ghkh.xghsh")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
public void index() {}
|
||||
|
||||
@At
|
||||
@SaCheckPermission("ghkh.xghsh")
|
||||
@@ -162,6 +158,11 @@ public class GhkhXghshController {
|
||||
baseService.dao().update(record);
|
||||
}
|
||||
|
||||
List<Kh_record> list = khZbService.dao().query(Kh_record.class, Cnd.where("zb_id", "=", pf[0].getZb_id()).desc("totalScore"));
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setSort(i + 1);
|
||||
}
|
||||
khZbService.dao().update(list);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -52,14 +52,13 @@ public class GhkhXjkhzbController {
|
||||
public Result doAdd(@Param(value = "kh_zb") Kh_zb kh_zb) {
|
||||
kh_zb.setCreateUserId(SecurityUtil.getUserId());
|
||||
kh_zb.setCreateUserName(SecurityUtil.getUserUsername());
|
||||
kh_zb.setCreateTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); Kh_zb zb = khZbService.insert(kh_zb);
|
||||
kh_zb.setCreateTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
|
||||
Kh_zb zb = khZbService.insert(kh_zb);
|
||||
for (kh_nr nr : kh_zb.getNrs()) {
|
||||
nr.setZb_id(zb.getId());
|
||||
khNrService.insertWith(nr, "bzs");
|
||||
}
|
||||
|
||||
return Result.success();
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
|
||||
@@ -60,7 +60,7 @@ public class Kh_bz extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String remark;
|
||||
|
||||
@Column
|
||||
|
||||
@@ -44,11 +44,13 @@ public class Kh_record {
|
||||
@Column
|
||||
@Comment("校工会评分")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
@Default(value = "0")
|
||||
private Integer xgh_score;
|
||||
|
||||
@Column
|
||||
@Comment("线上最终得分")
|
||||
@ColDefine(type = ColType.INT, width = 4)
|
||||
@Default(value = "0")
|
||||
private Double onLineFinalScore;
|
||||
|
||||
@Column
|
||||
|
||||
@@ -122,9 +122,9 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="备注" prop="remark" width="300px">
|
||||
<el-table-column label="考核验收方式" prop="remark" width="300px">
|
||||
<template v-slot="{row}">
|
||||
<el-input v-if="!is_view" v-model.number="row.remark" maxlength="4" placeholder="请填写备注"></el-input>
|
||||
<el-input v-if="!is_view" v-model.number="row.remark" placeholder="请填写考核验收方式"></el-input>
|
||||
<span v-else>{{ row.remark }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -1,42 +1,45 @@
|
||||
<template>
|
||||
<el-form :model="data" ref="form" :rules="formRules" label-width="90px">
|
||||
<el-form :model="data" ref="form" :rules="formRules" label-width="100px">
|
||||
|
||||
<el-form-item prop="nr" label="考核内容">
|
||||
<el-input disabled v-model="data.nr" type="text"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="bz" label="考核标准">
|
||||
<el-input disabled v-model="data.bz" type="text"></el-input>
|
||||
<el-input disabled v-model="data.bz" type="textarea" :autosize="{ minRows: 2, maxRows: 10}"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="remark" label="备注">
|
||||
<el-input disabled v-model="data.remark" type="text"></el-input>
|
||||
<el-form-item prop="remark" label="考核验收方式">
|
||||
<el-input disabled v-model="data.remark" type="textarea" :autosize="{ minRows: 2, maxRows: 10}"
|
||||
placeholder="暂无考核验收方式"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="clnr" label="材料内容">
|
||||
<el-form-item prop="clnr" label="材料说明">
|
||||
<el-input v-model="data.clnr" type="textarea" :autosize="{ minRows: 2, maxRows: 10}"
|
||||
placeholder="暂无" :disabled="is_view"></el-input>
|
||||
placeholder="暂无材料说明" :disabled="is_view"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="佐证材料">
|
||||
<span v-if="is_view&&!data.files">暂无佐证材料</span>
|
||||
<file-upload
|
||||
v-else
|
||||
<template v-if="is_view">
|
||||
<span v-if="!data.files">暂无佐证材料</span>
|
||||
<file-preview v-else :files="data.files" complete_result></file-preview>
|
||||
</template>
|
||||
<template v-else>
|
||||
<file-upload
|
||||
:value.sync="data.files"
|
||||
:upload_number="5"
|
||||
:upload_number="20"
|
||||
upload_mode="drag"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
:accept="'.pdf,.doc,.docx,.jpg,.png'"
|
||||
></file-upload>
|
||||
></file-upload>
|
||||
</template>
|
||||
</el-form-item>
|
||||
|
||||
<slot name="extra"></slot>
|
||||
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
const METHOD_NAME = "change"
|
||||
|
||||
@@ -22,8 +22,8 @@ layout("/layouts/platform.html"){
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="线下成绩占比" prop="offline">
|
||||
<el-input :min="0" :max="100" v-model="formData.offline" type="number">
|
||||
<el-form-item label="线下成绩占比" prop="offLine">
|
||||
<el-input :min="0" :max="100" v-model="formData.offLine" type="number">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
@@ -71,10 +71,12 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
</template>
|
||||
<template #edit_func>
|
||||
<el-button type="primary" @click="doEdit()">提交</el-button>
|
||||
<el-button type="primary" @click="doEdit('save')">暂存</el-button>
|
||||
<el-button type="primary" @click="doEdit('submit')">提交</el-button>
|
||||
</template>
|
||||
<template #edit_footer>
|
||||
<el-button type="primary" @click="doEdit()">提交</el-button>
|
||||
<el-button type="primary" @click="doEdit('save')">暂存</el-button>
|
||||
<el-button type="primary" @click="doEdit('submit')">提交</el-button>
|
||||
</template>
|
||||
<template #edit>
|
||||
<kh-zb :form_data="formData" @change="v=>{this.formData=v}"></kh-zb>
|
||||
@@ -125,7 +127,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'kh-zb': httpVueLoader('/components/module/kh/KhZb.vue')
|
||||
'kh-zb': httpVueLoader('/components/module/kh/KhZb.vue?v=' + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
toggleEnable(enable, id) {
|
||||
@@ -165,17 +167,51 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
doEdit() {
|
||||
this.$axios.post(base + "/platform/ghkh/khzb/doEdit", {kh_zb: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
this.$refs.guava.index()
|
||||
this.pageData()
|
||||
})
|
||||
doEdit(type) {
|
||||
let flag = true
|
||||
if (!this.formData.annual) {
|
||||
this.$message({message: "年度不能为空", type: 'error'})
|
||||
return
|
||||
}
|
||||
if (!this.formData.assessment) {
|
||||
this.$message({message: "考核名称不能为空", type: 'error'})
|
||||
return
|
||||
}
|
||||
if(type === 'submit') {
|
||||
this.formData.nrs.forEach(nr => {
|
||||
nr.bzs.forEach(bz => {
|
||||
if (!nr.content) {
|
||||
this.$message({message: "考核内容不能为空", type: 'error'})
|
||||
flag = false
|
||||
throw Error()
|
||||
} else if (!bz.inspection) {
|
||||
this.$message({message: "考核标准不能为空", type: 'error'})
|
||||
flag = false;
|
||||
throw Error()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
if(this.formData.appealTimeRange && this.formData.appealTimeRange.length > 0) {
|
||||
this.$set(this.formData, 'startApplyTime', this.formData.appealTimeRange[0])
|
||||
this.$set(this.formData, 'endApplyTime', this.formData.appealTimeRange[1])
|
||||
}
|
||||
if(this.formData.fillTimeRange && this.formData.fillTimeRange.length > 0) {
|
||||
this.$set(this.formData, 'startDateTime', this.formData.fillTimeRange[0])
|
||||
this.$set(this.formData, 'endDateTime', this.formData.fillTimeRange[1])
|
||||
}
|
||||
if (flag) {
|
||||
this.$axios.post(base + "/platform/ghkh/khzb/doEdit", {kh_zb: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
this.$refs.guava.index()
|
||||
this.pageData()
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
doDelete(id) {
|
||||
|
||||
@@ -85,7 +85,7 @@ layout("/layouts/platform.html"){
|
||||
<template scope="scope">
|
||||
<span class="text-warning" v-if="scope.row.state==2">待评分</span>
|
||||
<span class="text-success"
|
||||
v-else-if="scope.row.state==3">考核成功</span>
|
||||
v-else-if="scope.row.state==3">校工会已审核</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -130,8 +130,7 @@ layout("/layouts/platform.html"){
|
||||
</el-input>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary
|
||||
:summary-method="getSummaries" size="small">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary size="small" :summary-method="getSummaries">
|
||||
<el-table-column align="center" header-align="center" label="序号"
|
||||
type="index" width="60">
|
||||
</el-table-column>
|
||||
@@ -180,7 +179,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料" header-align="center" align="center">
|
||||
<el-table-column label="佐证材料" header-align="center" align="center" prop="files">
|
||||
<template scope="{row, $index}">
|
||||
<el-button type="primary" plain size="small"
|
||||
@click="doView(nr.content,row.inspection,row, $index, idx)">
|
||||
@@ -363,7 +362,7 @@ layout("/layouts/platform.html"){
|
||||
if (index === 0) {
|
||||
sums[index] = '小计';
|
||||
return;
|
||||
} else if (index === 5) {
|
||||
} else if (['inspection', 'addition', 'files'].includes(column.property)) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -19,15 +19,15 @@ layout("/layouts/platform.html"){
|
||||
<h3 style="color: #1867b0">新建考核指标</h3>
|
||||
</div>
|
||||
<div>
|
||||
<el-button type="primary" @click="doAdd()">暂存</el-button>
|
||||
<el-button type="primary" @click="doAdd()">提交</el-button>
|
||||
<el-button type="primary" @click="doAdd('save')">暂存</el-button>
|
||||
<el-button type="primary" @click="doAdd('submit')">提交</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<template>
|
||||
<kh-zb :form_data="formData" @change="v=>{this.formData=v}"></kh-zb>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary" @click="doAdd()">暂存</el-button>
|
||||
<el-button type="primary" @click="doAdd()">提交</el-button>
|
||||
<el-button type="primary" @click="doAdd('save')">暂存</el-button>
|
||||
<el-button type="primary" @click="doAdd('submit')">提交</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-card>
|
||||
@@ -48,46 +48,35 @@ layout("/layouts/platform.html"){
|
||||
'kh-zb': httpVueLoader('/components/module/kh/KhZb.vue?v=' + moment(new Date()).unix()),
|
||||
},
|
||||
methods: {
|
||||
doAdd() {
|
||||
doAdd(type) {
|
||||
let flag = true
|
||||
if (!this.formData.annual) {
|
||||
this.$message({
|
||||
message: "年度不能为空",
|
||||
type: 'error'
|
||||
})
|
||||
this.$message({message: "年度不能为空", type: 'error'})
|
||||
return
|
||||
}
|
||||
if (!this.formData.assessment) {
|
||||
this.$message({
|
||||
message: "考核名称不能为空",
|
||||
type: 'error'
|
||||
})
|
||||
this.$message({message: "考核名称不能为空", type: 'error'})
|
||||
return
|
||||
}
|
||||
this.formData.nrs.forEach(nr => {
|
||||
nr.bzs.forEach(bz => {
|
||||
if (!nr.content) {
|
||||
this.$message({
|
||||
message: "考核内容不能为空",
|
||||
type: 'error'
|
||||
})
|
||||
flag = false;
|
||||
throw Error()
|
||||
} else if (!bz.inspection) {
|
||||
this.$message({
|
||||
message: "考核标准不能为空",
|
||||
type: 'error'
|
||||
})
|
||||
flag = false;
|
||||
throw Error()
|
||||
}
|
||||
if(type === 'submit') {
|
||||
this.formData.nrs.forEach(nr => {
|
||||
nr.bzs.forEach(bz => {
|
||||
if (!nr.content) {
|
||||
this.$message({message: "考核内容不能为空", type: 'error'})
|
||||
flag = false
|
||||
throw Error()
|
||||
} else if (!bz.inspection) {
|
||||
this.$message({message: "考核标准不能为空", type: 'error'})
|
||||
flag = false;
|
||||
throw Error()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
if (this.formData.fillTimeRange && this.formData.fillTimeRange.length === 2) {
|
||||
this.formData.startDateTime = this.formData.fillTimeRange[0];
|
||||
this.formData.endDateTime = this.formData.fillTimeRange[1];
|
||||
}
|
||||
|
||||
if (this.formData.appealTimeRange && this.formData.appealTimeRange.length === 2) {
|
||||
this.formData.startApplyTime = this.formData.appealTimeRange[0];
|
||||
this.formData.endApplyTime = this.formData.appealTimeRange[1];
|
||||
@@ -95,12 +84,10 @@ layout("/layouts/platform.html"){
|
||||
if (flag) {
|
||||
this.$axios.post(base + "/platform/ghkh/Xjkhzb/doAdd", {kh_zb: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
sublime.jumpPagePjax('/platform/ghkh/khzb')
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/ghkh/khzb')
|
||||
} else {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'error'
|
||||
});
|
||||
this.$message({message: res.msg, type: 'error'})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -44,15 +44,15 @@ layout("/layouts/platform.html"){
|
||||
<el-table-column label="考核名称" prop="assessment" header-align="center" show-overflow-tooltip align="center"></el-table-column>
|
||||
<el-table-column label="填报时间" width="300px" header-align="center" show-overflow-tooltip align="center">
|
||||
<template scope="scope">
|
||||
<span>{{scope.row.startdatetime}} - {{scope.row.enddatetime}}</span>
|
||||
<span>{{scope.row.startDateTime}} - {{scope.row.endDateTime}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="name" header-align="center" align="center">
|
||||
<template scope="scope">
|
||||
<span class="text-info" v-if="!scope.row.state">未填报</span>
|
||||
<span class="text-success" v-if="scope.row.state==1">填报中</span>
|
||||
<span class="text-warning" v-if="scope.row.state==2">待校工会评分</span>
|
||||
<span class="text-success" v-if="scope.row.state==3">考核成功</span>
|
||||
<span class="text-warning" v-if="scope.row.state==2">待评分</span>
|
||||
<span class="text-success" v-if="scope.row.state==3">校工会已审核</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="250px">
|
||||
@@ -107,8 +107,7 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary
|
||||
:summary-method="getSummaries" size="small">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary size="small" :summary-method="getSummaries">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index"
|
||||
width="100px">
|
||||
</el-table-column>
|
||||
@@ -147,15 +146,15 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料数量" header-align="center" align="center" width="100">
|
||||
<el-table-column label="佐证材料数量" header-align="center" align="center" width="100" prop="fileCount">
|
||||
<template scope="scope">
|
||||
<span v-if="scope.row.zp?.files?.length > 0" class="text-primary" style="font-weight: bolder; font-size: 16px">
|
||||
<span v-if="scope.row.zp?.files?.length > 0" class="text-success" style="font-weight: bolder; font-size: 16px">
|
||||
{{ scope.row.zp?.files?.length || 0 }}</span>
|
||||
<span v-else>0</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料" header-align="center" align="center" width="250px">
|
||||
<el-table-column label="佐证材料" header-align="center" align="center" width="250px" prop="files">
|
||||
<template scope="props">
|
||||
<el-button v-if="!props.row.isEvidence" plain size="small" type="info">此项无需佐证材料</el-button>
|
||||
<el-button :type="props.row.zp?.files?.length > 0 ? 'success' : 'primary'"
|
||||
@@ -191,8 +190,7 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary
|
||||
:summary-method="getSummaries" size="small">
|
||||
<el-table :data="nr.bzs" style="width: 100%" border show-summary size="small" :summary-method="getSummaries">
|
||||
<el-table-column align="center" header-align="center" label="序号" type="index" width="80">
|
||||
</el-table-column>
|
||||
|
||||
@@ -204,6 +202,13 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="单项分" prop="single_score" header-align="center" align="center"
|
||||
v-if="examConfig.displaySingleItem === true" width="250px">
|
||||
<template scope="{row}">
|
||||
<el-input v-model.number="row.single_score" readonly maxlength="4"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="标准分" prop="score" header-align="center" align="center"
|
||||
width="250px">
|
||||
<template scope="{row}">
|
||||
@@ -213,21 +218,31 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="自评得分" prop="zpf" header-align="center" align="center"
|
||||
width="250px">
|
||||
width="250px" v-if="examConfig.selfAssessment === true">
|
||||
<template scope="{row}">
|
||||
<el-input v-if="row.zpf" v-model.number="row.zpf" maxlength="4"
|
||||
readonly placeholder="请填写自评分"></el-input>
|
||||
<el-input v-else value="暂无" maxlength="4"
|
||||
readonly></el-input>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="有关佐证材料" header-align="center" align="center"
|
||||
width="250px">
|
||||
<el-table-column label="佐证材料数量" header-align="center" align="center" width="100" prop="fileCount">
|
||||
<template scope="scope">
|
||||
<span v-if="scope.row.zp?.files?.length > 0" class="text-success" style="font-weight: bolder; font-size: 16px">
|
||||
{{ scope.row.zp?.files?.length || 0 }}</span>
|
||||
<span v-else>0</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="佐证材料" header-align="center" align="center"
|
||||
width="250px" prop="files">
|
||||
<template scope="{row}">
|
||||
<el-button type="primary" :disabled="!row.zp||!row.zp.zpf||!row.isEvidence"
|
||||
plain size="small"
|
||||
<el-button v-if="!row.isEvidence" plain size="small" type="info">此项无需佐证材料</el-button>
|
||||
<el-button :type="row.zp?.files?.length > 0 ? 'success' : 'primary'"
|
||||
plain
|
||||
:disabled="!row.isEvidence" size="small"
|
||||
v-else
|
||||
@click="viewUpload(nr.content,row.inspection,row)">
|
||||
查看佐证材料
|
||||
</el-button>
|
||||
@@ -331,7 +346,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
components: {
|
||||
'upload-materials': httpVueLoader('/components/module/kh/UploadMaterials.vue'),
|
||||
'upload-materials': httpVueLoader('/components/module/kh/UploadMaterials.vue?v=' + new Date().getTime()),
|
||||
'calcscore-table': httpVueLoader('/components/module/kh/CalcScoreTab.vue?ver=' + Math.random()),
|
||||
},
|
||||
|
||||
@@ -347,7 +362,6 @@ layout("/layouts/platform.html"){
|
||||
this.relationYear = {year: this.formData.annual, bz_relation_id: row.bz_relation_id}
|
||||
},
|
||||
autoFillScore(scoreTable) {
|
||||
|
||||
this.formData.nrs.some(nr => {
|
||||
nr.bzs.some(v => {
|
||||
if (v.id === this.current_bz_id) {
|
||||
@@ -374,18 +388,13 @@ layout("/layouts/platform.html"){
|
||||
} else {
|
||||
this.$set(v.zp, 'zpf', scoreTable.length * v.single_score)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return true
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
//自定义材料内容
|
||||
//自定义材料说明
|
||||
renderScoreTable(relation_id, score_data) {
|
||||
|
||||
if (score_data) {
|
||||
let res = ''
|
||||
switch (relation_id) {
|
||||
@@ -435,15 +444,17 @@ layout("/layouts/platform.html"){
|
||||
"bz_id": b.id, "clnr": b.zp?.clnr, "zpf": b.zp?.zpf, "files": b.zp?.files,
|
||||
"id": b.zp?.id ? b.zp?.id : null
|
||||
})
|
||||
if(!b.zp?.clnr) {
|
||||
msg = '考核内容第' + (i + 1) + '项,考核标准第' + (j + 1) + '项,材料内容为空,是否继续提交?'
|
||||
valid = false
|
||||
break outerLoop
|
||||
}
|
||||
if(b.isEvidence === true && !b.zp?.files) {
|
||||
msg = '考核内容第' + (i + 1) + '项,考核标准第' + (j + 1) + '项,佐证材料为空,是否继续提交?'
|
||||
valid = false
|
||||
break outerLoop
|
||||
if(v === 'submit') {
|
||||
if(!b.zp?.clnr) {
|
||||
msg = '考核内容第' + (i + 1) + '项,考核标准第' + (j + 1) + '项,材料说明为空,是否继续提交?'
|
||||
valid = false
|
||||
break outerLoop
|
||||
}
|
||||
if(b.isEvidence === true && !b.zp?.files) {
|
||||
msg = '考核内容第' + (i + 1) + '项,考核标准第' + (j + 1) + '项,佐证材料为空,是否继续提交?'
|
||||
valid = false
|
||||
break outerLoop
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -477,7 +488,8 @@ layout("/layouts/platform.html"){
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
loading.close()
|
||||
if (v === 'submit') {
|
||||
this.$refs.guava.index()
|
||||
/*if (v === 'submit') {
|
||||
this.$refs.guava.index()
|
||||
return
|
||||
}
|
||||
@@ -485,7 +497,7 @@ layout("/layouts/platform.html"){
|
||||
this.$nextTick(() => {
|
||||
this.formData = resa.data
|
||||
})
|
||||
})
|
||||
})*/
|
||||
}).catch(error => {
|
||||
loading.close()
|
||||
})
|
||||
@@ -522,8 +534,9 @@ layout("/layouts/platform.html"){
|
||||
this.idx = idx
|
||||
},
|
||||
addForm() {
|
||||
this.formData.nrs[this.idx].bzs[this.index].zp = this.data
|
||||
this.$set(this.formData.nrs[this.idx].bzs[this.index], 'zp', this.data)
|
||||
this.dialog = false
|
||||
this.$forceUpdate()
|
||||
},
|
||||
cancelForm() {
|
||||
this.visible = false
|
||||
@@ -537,14 +550,20 @@ layout("/layouts/platform.html"){
|
||||
if (index === 0) {
|
||||
sums[index] = '小计';
|
||||
return;
|
||||
} else if ([1, 2, 5].includes(index)) {
|
||||
} else if (['inspection', 'files'].includes(column.property)) {
|
||||
sums[index] = '';
|
||||
return;
|
||||
} else if (index === 4 && this.examConfig.selfAssessment === true) {
|
||||
const zpfs = data.map(v => v['zp']['zpf'])
|
||||
} else if (column.property === 'zp.zpf' && this.examConfig.selfAssessment === true) {
|
||||
const zpfs = data.map(v => v['zp']['zpf'] || 0)
|
||||
sums[index] = zpfs.reduce((a, b) => {
|
||||
return a + b;
|
||||
})
|
||||
}) + ' 分'
|
||||
return;
|
||||
} else if (column.property === 'fileCount') {
|
||||
const zpfs = data.map(v => v['zp']['files']?.length || 0)
|
||||
sums[index] = zpfs.reduce((a, b) => {
|
||||
return a + b;
|
||||
}) + ' 个'
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
@@ -609,23 +628,27 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
async openEdit(row) {
|
||||
// 考核还未开始
|
||||
if(this.$moment().isBefore(this.$moment(row.startDateTime))) {
|
||||
this.$message.error("该考核未开始")
|
||||
return
|
||||
}
|
||||
if(this.$moment().isAfter(this.$moment(row.endDateTime))) {
|
||||
this.$message.error("该考核已结束")
|
||||
return
|
||||
}
|
||||
if(this.$moment().isAfter(this.$moment(row.startDateTime)) && this.$moment().isBefore(this.$moment(row.endDateTime))) {
|
||||
if (![1, 2].includes(row.state)) {
|
||||
this.$message.error("当前状态不能修改")
|
||||
// 考核还没结束
|
||||
if(this.$moment().isBefore(this.$moment(row.endDateTime))) {
|
||||
if(row.state === 3) {
|
||||
this.$message.error("当前时间未在申诉期内,不能修改")
|
||||
return
|
||||
}
|
||||
} else if(this.$moment().isAfter(this.$moment(row.endDateTime)) && this.$moment().isBefore(this.$moment(row.startApplyTime))) {
|
||||
if(row.state === 3) {
|
||||
this.$message.error("当前时间未在申诉期内,不能修改")
|
||||
return
|
||||
}
|
||||
} else {
|
||||
if(this.$moment().isBefore(this.$moment(row.startApplyTime))) {
|
||||
this.$message.error("该考核申诉期未开始")
|
||||
return
|
||||
}
|
||||
}
|
||||
if(this.$moment().isBefore(this.$moment(row.startApplyTime))) {
|
||||
this.$message.error("该考核申诉期未开始")
|
||||
return
|
||||
}
|
||||
if(this.$moment().isAfter(this.$moment(row.endApplyTime))) {
|
||||
this.$message.error("该考核申诉期已结束")
|
||||
|
||||
Reference in New Issue
Block a user