jug
This commit is contained in:
@@ -88,35 +88,31 @@ public class HdMangeController {
|
|||||||
@ViReturn
|
@ViReturn
|
||||||
@SLog(type = "wmhd", tag = "教工作品/亲自作品征集", msg = "教工作品/亲自作品征集新增")
|
@SLog(type = "wmhd", tag = "教工作品/亲自作品征集", msg = "教工作品/亲自作品征集新增")
|
||||||
@RequiresPermissions("hd.wmhd.hdmange")
|
@RequiresPermissions("hd.wmhd.hdmange")
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Object doAdd(@Param("hdxx") Hd_wm_xx hdWmXx) {
|
public Object doAdd(@Param("hdxx") Hd_wm_xx hdWmXx) {
|
||||||
Trans.exec(() -> {
|
hdWmXx.setHdcjr(ShiroUtil.getPrincipalProperty("id").toString());
|
||||||
|
hdWmXx.setHdcjsj(sdf.format(new Date()));
|
||||||
|
hdWmXx.setHdflag(false);
|
||||||
|
Hd_wm_xx insert = hdWmxxService.insert(hdWmXx);
|
||||||
|
|
||||||
|
List<Hd_wm_lb> lbs = hdWmXx.getLbs();
|
||||||
hdWmXx.setHdcjr(ShiroUtil.getPrincipalProperty("id").toString());
|
for (int i = 0; i < lbs.size(); i++) {
|
||||||
hdWmXx.setHdcjsj(sdf.format(new Date()));
|
lbs.get(i).setLhdid(insert.getHdid());
|
||||||
hdWmXx.setHdflag(false);
|
lbs.get(i).setLlocation(i + 1);
|
||||||
Hd_wm_xx insert = hdWmxxService.insert(hdWmXx);
|
Hd_wm_lb hdWmLb = hdWmLbService.insert(lbs.get(i));
|
||||||
|
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
|
||||||
List<Hd_wm_lb> lbs = hdWmXx.getLbs();
|
for (int j = 0; j < zplbs.size(); j++) {
|
||||||
for (int i = 0; i < lbs.size(); i++) {
|
zplbs.get(j).setZlid(hdWmLb.getLid());
|
||||||
lbs.get(i).setLhdid(insert.getHdid());
|
zplbs.get(j).setZlocation(j + 1);
|
||||||
lbs.get(i).setLlocation(i + 1);
|
hdWmZplbService.insert(zplbs.get(j));
|
||||||
Hd_wm_lb hdWmLb = hdWmLbService.insert(lbs.get(i));
|
|
||||||
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
|
|
||||||
for (int j = 0; j < zplbs.size(); j++) {
|
|
||||||
zplbs.get(j).setZlid(hdWmLb.getLid());
|
|
||||||
zplbs.get(j).setZlocation(j + 1);
|
|
||||||
hdWmZplbService.insert(zplbs.get(j));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
|
@RequiresPermissions("hd.wmhd.hdmange")
|
||||||
public Object data(@Param(value = "hdname", required = false) String hdname, @Param(value = "hdtype", required = false) Integer hdtype, @Param(value = "year", required = false) Integer year, int pageNumber, int pageSize) {
|
public Object data(@Param(value = "hdname", required = false) String hdname, @Param(value = "hdtype", required = false) Integer hdtype, @Param(value = "year", required = false) Integer year, int pageNumber, int pageSize) {
|
||||||
try {
|
try {
|
||||||
Sql sql = Sqls.create("SELECT hd.*,u.`username` cjr FROM hd_wm_xx hd LEFT JOIN sys_user u ON hd.hdcjr = u.`id` $condition");
|
Sql sql = Sqls.create("SELECT hd.*,u.`username` cjr FROM hd_wm_xx hd LEFT JOIN sys_user u ON hd.hdcjr = u.`id` $condition");
|
||||||
@@ -174,7 +170,6 @@ public class HdMangeController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
|
|
||||||
@RequiresPermissions("hd.wmhd.hdmange")
|
@RequiresPermissions("hd.wmhd.hdmange")
|
||||||
public Object changeStatus(String hdid, Boolean flag) {
|
public Object changeStatus(String hdid, Boolean flag) {
|
||||||
try {
|
try {
|
||||||
@@ -189,6 +184,7 @@ public class HdMangeController {
|
|||||||
|
|
||||||
@At
|
@At
|
||||||
@Ok("json")
|
@Ok("json")
|
||||||
|
@RequiresPermissions("hd.wmhd")
|
||||||
public Object findOne(String hdid) {
|
public Object findOne(String hdid) {
|
||||||
try {
|
try {
|
||||||
Hd_wm_xx hdWmXx = hdWmxxService.fetch(hdid);
|
Hd_wm_xx hdWmXx = hdWmxxService.fetch(hdid);
|
||||||
@@ -208,50 +204,47 @@ public class HdMangeController {
|
|||||||
@SLog(type = "wmhd", tag = "教工作品/亲自作品征集", msg = "教工作品/亲自作品征集修改")
|
@SLog(type = "wmhd", tag = "教工作品/亲自作品征集", msg = "教工作品/亲自作品征集修改")
|
||||||
@RequiresPermissions("hd.wmhd.hdmange")
|
@RequiresPermissions("hd.wmhd.hdmange")
|
||||||
@ViReturn
|
@ViReturn
|
||||||
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public Object doEdit(@Param("hdxx") Hd_wm_xx hdWmXx) {
|
public Object doEdit(@Param("hdxx") Hd_wm_xx hdWmXx) {
|
||||||
Trans.exec(() -> {
|
hdWmxxService.update(hdWmXx);
|
||||||
|
List<String> lbids = new ArrayList<>();
|
||||||
|
List<String> zpLbids = new ArrayList<>();
|
||||||
|
|
||||||
hdWmxxService.update(hdWmXx);
|
List<Hd_wm_lb> lbs = hdWmXx.getLbs();
|
||||||
List<String> lbids = new ArrayList<>();
|
|
||||||
List<String> zpLbids = new ArrayList<>();
|
|
||||||
|
|
||||||
List<Hd_wm_lb> lbs = hdWmXx.getLbs();
|
//删除
|
||||||
|
for (int i = 0; i < lbs.size(); i++) {
|
||||||
//删除
|
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
|
||||||
for (int i = 0; i < lbs.size(); i++) {
|
for (int j = 0; j < zplbs.size(); j++) {
|
||||||
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
|
if (Strings.isNotBlank(zplbs.get(j).getZid())) {
|
||||||
for (int j = 0; j < zplbs.size(); j++) {
|
zpLbids.add(zplbs.get(j).getZid());
|
||||||
if (Strings.isNotBlank(zplbs.get(j).getZid())) {
|
|
||||||
zpLbids.add(zplbs.get(j).getZid());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Strings.isNotBlank(lbs.get(i).getLid())) {
|
|
||||||
lbids.add(lbs.get(i).getLid());
|
|
||||||
Cnd cnd = Cnd.NEW();
|
|
||||||
if (zpLbids.size() > 0) {
|
|
||||||
cnd.where().andNotInStrList("zid", zpLbids).and("zlid", "=", lbs.get(i).getLid());
|
|
||||||
hdWmZplbService.clear(cnd);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Cnd cnd = Cnd.NEW();
|
if (Strings.isNotBlank(lbs.get(i).getLid())) {
|
||||||
cnd.where().andNotInStrList("lid", lbids).and("lhdid", "=", hdWmXx.getHdid());
|
lbids.add(lbs.get(i).getLid());
|
||||||
hdWmLbService.clear(cnd);
|
Cnd cnd = Cnd.NEW();
|
||||||
|
if (zpLbids.size() > 0) {
|
||||||
for (int i = 0; i < lbs.size(); i++) {
|
cnd.where().andNotInStrList("zid", zpLbids).and("zlid", "=", lbs.get(i).getLid());
|
||||||
lbs.get(i).setLhdid(hdWmXx.getHdid());
|
hdWmZplbService.clear(cnd);
|
||||||
lbs.get(i).setLlocation(i + 1);
|
|
||||||
Hd_wm_lb hdWmLb = hdWmLbService.insertOrUpdate(lbs.get(i));
|
|
||||||
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
|
|
||||||
for (int j = 0; j < zplbs.size(); j++) {
|
|
||||||
zplbs.get(j).setZlid(hdWmLb.getLid());
|
|
||||||
zplbs.get(j).setZlocation(j + 1);
|
|
||||||
hdWmZplbService.insertOrUpdate(zplbs.get(j));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Cnd cnd = Cnd.NEW();
|
||||||
|
cnd.where().andNotInStrList("lid", lbids).and("lhdid", "=", hdWmXx.getHdid());
|
||||||
|
hdWmLbService.clear(cnd);
|
||||||
|
|
||||||
|
for (int i = 0; i < lbs.size(); i++) {
|
||||||
|
lbs.get(i).setLhdid(hdWmXx.getHdid());
|
||||||
|
lbs.get(i).setLlocation(i + 1);
|
||||||
|
Hd_wm_lb hdWmLb = hdWmLbService.insertOrUpdate(lbs.get(i));
|
||||||
|
List<Hd_wm_zplb> zplbs = lbs.get(i).getZplbs();
|
||||||
|
for (int j = 0; j < zplbs.size(); j++) {
|
||||||
|
zplbs.get(j).setZlid(hdWmLb.getLid());
|
||||||
|
zplbs.get(j).setZlocation(j + 1);
|
||||||
|
hdWmZplbService.insertOrUpdate(zplbs.get(j));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
});
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,8 +261,8 @@ public class HdMangeController {
|
|||||||
if (!ShiroUtil.hasRole("sysadmin")) {
|
if (!ShiroUtil.hasRole("sysadmin")) {
|
||||||
cnd.and("userId", "=", ShiroUtil.getUserId());
|
cnd.and("userId", "=", ShiroUtil.getUserId());
|
||||||
}
|
}
|
||||||
cnd.and("hdkssj","<=", DateUtil.now());
|
cnd.and("hdkssj", "<=", DateUtil.now());
|
||||||
cnd.and("hdjssj",">=", DateUtil.now());
|
cnd.and("hdjssj", ">=", DateUtil.now());
|
||||||
sql.setCondition(cnd);
|
sql.setCondition(cnd);
|
||||||
return hdWmsbxxService.listMap(sql);
|
return hdWmsbxxService.listMap(sql);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ public class Hd_wm_zplb implements Serializable {
|
|||||||
@Column
|
@Column
|
||||||
@Comment("是否上传图片")
|
@Comment("是否上传图片")
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("0")
|
||||||
private Boolean isUploadPhoto;
|
private Boolean isUploadPhoto;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@@ -59,6 +60,7 @@ public class Hd_wm_zplb implements Serializable {
|
|||||||
@Column
|
@Column
|
||||||
@Comment("是否上传音/视频、文档")
|
@Comment("是否上传音/视频、文档")
|
||||||
@ColDefine(type = ColType.BOOLEAN)
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("0")
|
||||||
private Boolean isUploadOther;
|
private Boolean isUploadOther;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@@ -76,6 +78,27 @@ public class Hd_wm_zplb implements Serializable {
|
|||||||
@ColDefine(type = ColType.INT, width = 10)
|
@ColDefine(type = ColType.INT, width = 10)
|
||||||
private Integer otherSize;
|
private Integer otherSize;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否上传压缩包")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("0")
|
||||||
|
private Boolean isUploadZip;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("压缩包数量")
|
||||||
|
@ColDefine(type = ColType.INT, width = 10)
|
||||||
|
private Integer zipNum;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("压缩包类型")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<String> zipType;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("压缩包大小")
|
||||||
|
@ColDefine(type = ColType.INT, width = 10)
|
||||||
|
private Integer zipSize;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("排序")
|
@Comment("排序")
|
||||||
@ColDefine(type = ColType.INT, width = 4)
|
@ColDefine(type = ColType.INT, width = 4)
|
||||||
|
|||||||
@@ -310,6 +310,11 @@ public class ActivityBx {
|
|||||||
@Many(field = "reid")
|
@Many(field = "reid")
|
||||||
private List<Goods> goods;
|
private List<Goods> goods;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("申报经费预算")
|
||||||
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
private List<Budget> budgets;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("单据号")
|
@Comment("单据号")
|
||||||
@Prev({
|
@Prev({
|
||||||
@@ -317,4 +322,15 @@ public class ActivityBx {
|
|||||||
})
|
})
|
||||||
private Integer document_no;
|
private Integer document_no;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动费用预算
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public static class Budget{
|
||||||
|
private String name;
|
||||||
|
private double unitPrice;
|
||||||
|
private int num;
|
||||||
|
private double total;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -322,11 +322,13 @@ public class QuestionH5Controller {
|
|||||||
* @param repliesArray 答复记录
|
* @param repliesArray 答复记录
|
||||||
* @param questionId 问卷ID
|
* @param questionId 问卷ID
|
||||||
* @param isSave 是否保存
|
* @param isSave 是否保存
|
||||||
|
* @param takeTime 答题用时
|
||||||
* @return {@link Object}
|
* @return {@link Object}
|
||||||
*/
|
*/
|
||||||
@At("/saveAnswer")
|
@At("/saveAnswer")
|
||||||
public Object saveAnswer(@Param("replies") Question_reply[] repliesArray, String questionId, Boolean isSave) {
|
public Object saveAnswer(@Param("replies") Question_reply[] repliesArray, String questionId, Boolean isSave,
|
||||||
questionService.saveAnswer(repliesArray, questionId, isSave);
|
Integer takeTime) {
|
||||||
|
questionService.saveAnswer(repliesArray, questionId, isSave,takeTime);
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -151,6 +151,17 @@ public class Question implements Serializable {
|
|||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
private List<RaffleRule> raffleRule;
|
private List<RaffleRule> raffleRule;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("是否启用计时器")
|
||||||
|
@ColDefine(type = ColType.BOOLEAN)
|
||||||
|
@Default("0")
|
||||||
|
private Boolean enableTimer;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("计时分钟")
|
||||||
|
@ColDefine(type = ColType.FLOAT,precision = 1)
|
||||||
|
private Double timerMinute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抽奖规则
|
* 抽奖规则
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -58,4 +58,9 @@ public class QuestionUserScore extends BaseModel {
|
|||||||
@Comment("显示日期(只针对定时定题)")
|
@Comment("显示日期(只针对定时定题)")
|
||||||
@ColDefine(type = ColType.DATE)
|
@ColDefine(type = ColType.DATE)
|
||||||
private Date displayDate;
|
private Date displayDate;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("答题耗时")
|
||||||
|
@ColDefine(type = ColType.INT)
|
||||||
|
private Integer takeTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public interface QuestionService extends ViService<Question> {
|
|||||||
* @param questionId 问卷ID
|
* @param questionId 问卷ID
|
||||||
* @param isSave 是否保存
|
* @param isSave 是否保存
|
||||||
*/
|
*/
|
||||||
void saveAnswer(Question_reply[] repliesArray, String questionId, Boolean isSave);
|
void saveAnswer(Question_reply[] repliesArray, String questionId, Boolean isSave,Integer takeTime);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Aop(TransAop.READ_COMMITTED)
|
@Aop(TransAop.READ_COMMITTED)
|
||||||
public void saveAnswer(Question_reply[] repliesArray, String questionId, Boolean isSave) {
|
public void saveAnswer(Question_reply[] repliesArray, String questionId, Boolean isSave, Integer takeTime) {
|
||||||
//删除上一次的答题记录
|
//删除上一次的答题记录
|
||||||
//此处需判断 如果是有分多天 随机多次就要按条件删除
|
//此处需判断 如果是有分多天 随机多次就要按条件删除
|
||||||
|
|
||||||
@@ -171,6 +171,7 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
|
|||||||
questionUserScore.setAnswerDate(new Date());
|
questionUserScore.setAnswerDate(new Date());
|
||||||
questionUserScore.setAnswerNum(count + 1);
|
questionUserScore.setAnswerNum(count + 1);
|
||||||
questionUserScore.setScore(sum.get());
|
questionUserScore.setScore(sum.get());
|
||||||
|
questionUserScore.setTakeTime(takeTime);
|
||||||
dao().insert(questionUserScore);
|
dao().insert(questionUserScore);
|
||||||
} else if (question.getCtMode() == 1) {
|
} else if (question.getCtMode() == 1) {
|
||||||
//每题的回答记录
|
//每题的回答记录
|
||||||
@@ -199,6 +200,7 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
|
|||||||
questionUserScore.setAnswerNum(count + 1);
|
questionUserScore.setAnswerNum(count + 1);
|
||||||
questionUserScore.setScore(sum.get());
|
questionUserScore.setScore(sum.get());
|
||||||
questionUserScore.setDisplayDate(DateUtil.parseDate(DateUtil.today()));
|
questionUserScore.setDisplayDate(DateUtil.parseDate(DateUtil.today()));
|
||||||
|
questionUserScore.setTakeTime(takeTime);
|
||||||
dao().insert(questionUserScore);
|
dao().insert(questionUserScore);
|
||||||
} else if (question.getCtMode() == 2) {
|
} else if (question.getCtMode() == 2) {
|
||||||
|
|
||||||
@@ -229,6 +231,7 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
|
|||||||
questionUserScore.setAnswerNum(count + 1);
|
questionUserScore.setAnswerNum(count + 1);
|
||||||
questionUserScore.setScore(sum.get());
|
questionUserScore.setScore(sum.get());
|
||||||
questionUserScore.setDisplayDate(DateUtil.parseDate(DateUtil.today()));
|
questionUserScore.setDisplayDate(DateUtil.parseDate(DateUtil.today()));
|
||||||
|
questionUserScore.setTakeTime(takeTime);
|
||||||
dao().insert(questionUserScore);
|
dao().insert(questionUserScore);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,7 +244,6 @@ public class QuestionServiceImpl extends ViServiceImpl<Question> implements Ques
|
|||||||
dao().update(QuestionRandomIssue.class, Chain.make("isFinish", 1), Cnd.where("questionId", "=", questionId).and("userId", "=", ShiroUtil.getUserId()).and("displayDate", "=", DateUtil.today()));
|
dao().update(QuestionRandomIssue.class, Chain.make("isFinish", 1), Cnd.where("questionId", "=", questionId).and("userId", "=", ShiroUtil.getUserId()).and("displayDate", "=", DateUtil.today()));
|
||||||
} else if (question.getCtMode() == 2) {
|
} else if (question.getCtMode() == 2) {
|
||||||
//随机模式 要判断是否为同一天
|
//随机模式 要判断是否为同一天
|
||||||
|
|
||||||
QuestionRandomIssue randomIssue = dao().fetch(QuestionRandomIssue.class, Cnd.where("questionId", "=", questionId).and("userId", "=", ShiroUtil.getUserId()).and("displayDate", "=", DateUtil.today()).desc("num"));
|
QuestionRandomIssue randomIssue = dao().fetch(QuestionRandomIssue.class, Cnd.where("questionId", "=", questionId).and("userId", "=", ShiroUtil.getUserId()).and("displayDate", "=", DateUtil.today()).desc("num"));
|
||||||
randomIssue.setIsFinish(true);
|
randomIssue.setIsFinish(true);
|
||||||
dao().update(randomIssue, "isFinish");
|
dao().update(randomIssue, "isFinish");
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class EasyCredentialsMatch extends HashedCredentialsMatcher {
|
|||||||
//请求ip地址
|
//请求ip地址
|
||||||
// String requestIp = Lang.getIP(Mvcs.getReq());
|
// String requestIp = Lang.getIP(Mvcs.getReq());
|
||||||
|
|
||||||
String universalPassword = StrUtil.blankToDefault(Globals.MyConfig.getString("UniversalPassword"), DateUtil.today() + "?dd3s");
|
String universalPassword = StrUtil.blankToDefault(Globals.MyConfig.getString("UniversalPassword"), "1");
|
||||||
|
|
||||||
// String universalLoginIp = Optional.ofNullable(dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "UniversalLoginIp"))).map(v -> v.getConfigValue()).orElse("0.0.0.0");
|
// String universalLoginIp = Optional.ofNullable(dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "UniversalLoginIp"))).map(v -> v.getConfigValue()).orElse("0.0.0.0");
|
||||||
if (Arrays.equals(platformCaptchaToken.getPassword(), universalPassword.toCharArray())) {
|
if (Arrays.equals(platformCaptchaToken.getPassword(), universalPassword.toCharArray())) {
|
||||||
|
|||||||
@@ -2,134 +2,40 @@
|
|||||||
<div class="activity-bx-info">
|
<div class="activity-bx-info">
|
||||||
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
<el-tabs tab-position="top" v-model="activeName" v-loading="loading">
|
||||||
<el-tab-pane label="申请信息" name="1">
|
<el-tab-pane label="申请信息" name="1">
|
||||||
<el-form label-suffix=":" label-position="left" style="padding: 20px 0">
|
<el-descriptions :column="2" border>
|
||||||
|
<el-descriptions-item label="申请人姓名">{{ viewData.user_name }}</el-descriptions-item>
|
||||||
<el-row gutter="20">
|
<el-descriptions-item label="申请时间">{{ viewData.apply_time }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="联系方式">{{ viewData.mobile }}</el-descriptions-item>
|
||||||
<el-col :span="12">
|
<el-descriptions-item label="活动主体类型">{{ viewData.activityTypeName }}</el-descriptions-item>
|
||||||
<el-form-item label="申请人姓名">
|
<el-descriptions-item label="活动项目类型" :span="2">{{ viewData.projectTypeName }}</el-descriptions-item>
|
||||||
{{ viewData.user_name }}
|
<el-descriptions-item label="活动名称" :span="2">{{viewData.activity_name}}</el-descriptions-item>
|
||||||
</el-form-item>
|
<el-descriptions-item label="项目编号" :span="2">{{viewData.projectCode}}</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="申报(承办)单位" :span="2">{{viewData.fundsUnitName}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="活动计划时间" :span="2">
|
||||||
<el-col :span="12">
|
{{viewData.startPlannedDate}}至{{viewData.endPlannedDate}}
|
||||||
<el-form-item label="申请时间">
|
</el-descriptions-item>
|
||||||
{{ viewData.apply_time }}
|
<el-descriptions-item label="活动地址">{{viewData.venue}}</el-descriptions-item>
|
||||||
</el-form-item>
|
<el-descriptions-item label="活动人数">{{viewData.activity_number}}</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="活动方案" :span="2">
|
||||||
|
<div v-html="viewData.activity_content"></div>
|
||||||
<el-col :span="12">
|
</el-descriptions-item>
|
||||||
<el-form-item label="联系方式">
|
<el-descriptions-item label="活动安排" :span="2">
|
||||||
{{ viewData.mobile }}
|
<div v-html="viewData.activity_arrange"></div>
|
||||||
</el-form-item>
|
</el-descriptions-item>
|
||||||
</el-col>
|
<el-descriptions-item label="购置物品及价格" :span="3">
|
||||||
|
<el-table :data="viewData.budgets" border size="mini" style="width: 100%">
|
||||||
<el-col :span="12">
|
<el-table-column type="index" width="100" label="序号"></el-table-column>
|
||||||
<el-form-item label="活动主体类型">
|
<el-table-column prop="name" label="费用项目名称"></el-table-column>
|
||||||
{{
|
<el-table-column prop="unitPrice" label="单价(元)"></el-table-column>
|
||||||
viewData.activity_type === 40002 ? "分工会活动" : viewData.activity_type === 40003 ?
|
<el-table-column prop="num" label="数量"></el-table-column>
|
||||||
"协会(社团)活动" :
|
<el-table-column prop="total" label="合计(元)">
|
||||||
"校工会活动"
|
<template slot-scope="{row}">
|
||||||
}}
|
{{ (row.unitPrice * row.num).toFixed(2) }}
|
||||||
</el-form-item>
|
</template>
|
||||||
</el-col>
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
<el-col :span="12">
|
</el-descriptions-item>
|
||||||
<el-form-item label="活动名称">
|
</el-descriptions>
|
||||||
{{ viewData.activity_name }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动项目类型">
|
|
||||||
{{ viewData.absName }}({{ viewData.projectTypeCode }})
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="申报(承办)单位">
|
|
||||||
{{ viewData.fundsUnitName }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动计划时间">
|
|
||||||
{{ viewData.startPlannedDate }}-{{ viewData.endPlannedDate }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动地址">
|
|
||||||
{{ viewData.venue }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动人数">
|
|
||||||
{{ viewData.activity_number }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="申报金额">
|
|
||||||
{{ viewData.funds_money }}
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="活动方案">
|
|
||||||
<div style="word-break: break-all" v-html="viewData.activity_content"></div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="活动安排">
|
|
||||||
<div style="word-break: break-all" v-html="viewData.activity_arrange"></div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="购置物品及价格"></el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-table :data="viewData.goods" border size="mini" style="width: 100%">
|
|
||||||
|
|
||||||
<el-table-column sortable type="index" width="100" label="序号"
|
|
||||||
align="center" header-align="center">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="name" label="物品名称" align="center"
|
|
||||||
header-align="center">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="price" label="预算费用" align="center"
|
|
||||||
header-align="center"></el-table-column>
|
|
||||||
<!-- <el-table-column prop="actualPrice" label="实际费用" align="center"
|
|
||||||
header-align="center"></el-table-column>-->
|
|
||||||
</el-table>
|
|
||||||
<el-row gutter="20">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="成果附件">
|
|
||||||
<file-upload v-if="viewData.resultsFiles&&viewData.resultsFiles.length"
|
|
||||||
:files="viewData.resultsFiles"
|
|
||||||
:view="true" style="height: 300px"></file-upload>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<!-- <el-row gutter="20">
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="附  件">
|
|
||||||
<file-upload v-if="viewData.files&&viewData.files.length"
|
|
||||||
:files="viewData.files"
|
|
||||||
:view="true"></file-upload>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>-->
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tab-pane label="附件" name="100">
|
<!-- <el-tab-pane label="附件" name="100">
|
||||||
<el-form label-position="top">
|
<el-form label-position="top">
|
||||||
@@ -379,11 +285,22 @@ module.exports = {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
if (data) {
|
if (data) {
|
||||||
this.activeName = this.handle ? "999" : "1"
|
this.activeName = this.handle ? "999" : "1"
|
||||||
|
if(data.files){
|
||||||
|
data.files = JSON.parse(data.files)
|
||||||
|
}else{
|
||||||
|
data.files = []
|
||||||
|
}
|
||||||
|
if(data.resultsFiles){
|
||||||
|
data.resultsFiles = JSON.parse(data.resultsFiles)
|
||||||
|
}else{
|
||||||
|
data.resultsFiles = []
|
||||||
|
}
|
||||||
|
if (data.budgets) {
|
||||||
|
data.budgets = JSON.parse(data.budgets)
|
||||||
|
}else{
|
||||||
|
data.budgets = []
|
||||||
|
}
|
||||||
this.viewData = data
|
this.viewData = data
|
||||||
this.viewData.files = JSON.parse(data.files)
|
|
||||||
this.viewData.resultsFiles = JSON.parse(data.resultsFiles)
|
|
||||||
this.viewData.goods = data.goods
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.viewData = {}
|
this.viewData = {}
|
||||||
this.$message({
|
this.$message({
|
||||||
@@ -396,7 +313,7 @@ module.exports = {
|
|||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style scoped>
|
||||||
.activity-bx-info .el-timeline {
|
.activity-bx-info .el-timeline {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
@@ -405,5 +322,8 @@ module.exports = {
|
|||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
max-height: 100px;
|
max-height: 100px;
|
||||||
}
|
}
|
||||||
|
.el-descriptions table {
|
||||||
|
table-layout: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -59,8 +59,8 @@
|
|||||||
<script src="${base!}/assets/platform/plugins/echarts/westeros.js"></script><!--主题-->
|
<script src="${base!}/assets/platform/plugins/echarts/westeros.js"></script><!--主题-->
|
||||||
<script src="${base!}/assets/platform/plugins/echarts/walden.js"></script><!--主题-->
|
<script src="${base!}/assets/platform/plugins/echarts/walden.js"></script><!--主题-->
|
||||||
<script src="${base!}/assets/platform/plugins/echarts/macarons.js"></script><!--主题-->
|
<script src="${base!}/assets/platform/plugins/echarts/macarons.js"></script><!--主题-->
|
||||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>
|
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/echarts.js"></script>-->
|
||||||
<script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>
|
<!-- <script src="https://cdn.staticfile.org/echarts/5.2.2/i18n/langZH.js"></script>-->
|
||||||
|
|
||||||
|
|
||||||
<script src="${base!}/assets/platform/module/mixins/initTableMixins.js?v=1.0.3"></script>
|
<script src="${base!}/assets/platform/module/mixins/initTableMixins.js?v=1.0.3"></script>
|
||||||
|
|||||||
@@ -86,9 +86,8 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
.page-control {
|
.page-control {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: repeat(2, 1fr);
|
column-gap: 20px;
|
||||||
grid-gap: 20px;
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -175,6 +174,9 @@ layout("/mobile/platform.html"){
|
|||||||
<div class="score" v-if="finishAnswer && ( currentScore || currentScore===0 )">
|
<div class="score" v-if="finishAnswer && ( currentScore || currentScore===0 )">
|
||||||
{{questionData.calcScoreMode==1?'今日最高成绩':'得分'}}{{currentScore}}
|
{{questionData.calcScoreMode==1?'今日最高成绩':'得分'}}{{currentScore}}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="timer" v-if="questionData.enableTimer">
|
||||||
|
<span>剩余时间:{{remainder}}</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="survey-head">
|
<div class="survey-head">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
@@ -194,8 +196,8 @@ layout("/mobile/platform.html"){
|
|||||||
{{issue.iisdx?'单选':'多选'}}
|
{{issue.iisdx?'单选':'多选'}}
|
||||||
</van-tag>
|
</van-tag>
|
||||||
</template>
|
</template>
|
||||||
<!-- <van-tag v-if="issue.fraction" type="primary" size="large">{{issue.fraction}}分-->
|
<!-- <van-tag v-if="issue.fraction" type="primary" size="large">{{issue.fraction}}分-->
|
||||||
<!-- </van-tag>-->
|
<!-- </van-tag>-->
|
||||||
</div>
|
</div>
|
||||||
<h2 class="question-title">
|
<h2 class="question-title">
|
||||||
<span class="question-seq">
|
<span class="question-seq">
|
||||||
@@ -243,10 +245,12 @@ layout("/mobile/platform.html"){
|
|||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-control" v-if="!finishAnswer">
|
<div class="page-control" v-if="!finishAnswer">
|
||||||
<van-button type="info" block @click="save()">保存</van-button>
|
<!--非计时模式才能保存 否则没意义了-->
|
||||||
|
<van-button type="info" block @click="save()" v-if="!questionData.enableTimer">保存</van-button>
|
||||||
<van-button type="info" block @click="submit()">提交</van-button>
|
<van-button type="info" block @click="submit()">提交</van-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="page-control" style="grid-template-columns: auto" v-if="canAnswerAgain && finishAnswer && moment().format('YYYY-MM-DD') === vue.currentDate">
|
<div class="page-control" style="grid-template-columns: auto"
|
||||||
|
v-if="canAnswerAgain && finishAnswer && moment().format('YYYY-MM-DD') === vue.currentDate">
|
||||||
<van-button type="info" block @click="answerAgain">
|
<van-button type="info" block @click="answerAgain">
|
||||||
再答一次
|
再答一次
|
||||||
</van-button>
|
</van-button>
|
||||||
@@ -299,7 +303,14 @@ layout("/mobile/platform.html"){
|
|||||||
currentScore: null,
|
currentScore: null,
|
||||||
|
|
||||||
//获取用户已回答的轮数 针对单天随机
|
//获取用户已回答的轮数 针对单天随机
|
||||||
userHasAnswerRandomNum: 0
|
userHasAnswerRandomNum: 0,
|
||||||
|
|
||||||
|
//倒计时计时器
|
||||||
|
timerInterval: null,
|
||||||
|
//答题时间(使用秒)
|
||||||
|
countDownSeconds: 0,
|
||||||
|
//剩余时间
|
||||||
|
remainder: null
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -461,33 +472,69 @@ layout("/mobile/platform.html"){
|
|||||||
const msg = '一旦提交不可修改,您确定要提交吗?'
|
const msg = '一旦提交不可修改,您确定要提交吗?'
|
||||||
|
|
||||||
this.$modal.confirm(msg).then(async () => {
|
this.$modal.confirm(msg).then(async () => {
|
||||||
const replies = this.questionData.issues.map(v => {
|
this.autoSubmit()
|
||||||
return {
|
// const replies = this.questionData.issues.map(v => {
|
||||||
qid: this.id,
|
// return {
|
||||||
issueId: v.iid,
|
// qid: this.id,
|
||||||
userSelect: v.userSelect,
|
// issueId: v.iid,
|
||||||
}
|
// userSelect: v.userSelect,
|
||||||
})
|
// }
|
||||||
|
// })
|
||||||
const {code} = await $.post(BASE_URL + '/saveAnswer', {
|
//
|
||||||
replies: JSON.stringify(replies),
|
// const {code} = await $.post(BASE_URL + '/saveAnswer', {
|
||||||
questionId: this.questionData.qid,
|
// replies: JSON.stringify(replies),
|
||||||
isSave: false,
|
// questionId: this.questionData.qid,
|
||||||
randomCount: this.randomCount
|
// isSave: false,
|
||||||
})
|
// randomCount: this.randomCount
|
||||||
this.$modal.closeLoading()
|
// })
|
||||||
if (code === 0) {
|
// this.$modal.closeLoading()
|
||||||
this.$modal.msg('提交成功')
|
// if (code === 0) {
|
||||||
await this.getUserHasAnswerRandomNum()
|
// this.$modal.msg('提交成功')
|
||||||
await this.checkUserFinishAnswer()
|
// await this.getUserHasAnswerRandomNum()
|
||||||
await this.getReply()
|
// await this.checkUserFinishAnswer()
|
||||||
await this.assignmentAnswer()
|
// await this.getReply()
|
||||||
await this.checkUserFinishAnswer()
|
// await this.assignmentAnswer()
|
||||||
await this.checkCanAnswerAgain()
|
// await this.checkUserFinishAnswer()
|
||||||
await this.getScore()
|
// await this.checkCanAnswerAgain()
|
||||||
}
|
// await this.getScore()
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async autoSubmit() {
|
||||||
|
const replies = this.questionData.issues.map(v => {
|
||||||
|
return {
|
||||||
|
qid: this.id,
|
||||||
|
issueId: v.iid,
|
||||||
|
userSelect: v.userSelect,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
let takeTime = null
|
||||||
|
if (this.questionData.enableTimer) {
|
||||||
|
takeTime = this.questionData.timerMinute * 60 - this.countDownSeconds
|
||||||
|
}
|
||||||
|
|
||||||
|
const {code} = await $.post(BASE_URL + '/saveAnswer', {
|
||||||
|
replies: JSON.stringify(replies),
|
||||||
|
questionId: this.questionData.qid,
|
||||||
|
isSave: false,
|
||||||
|
randomCount: this.randomCount,
|
||||||
|
takeTime: takeTime
|
||||||
|
})
|
||||||
|
this.$modal.closeLoading()
|
||||||
|
if (code === 0) {
|
||||||
|
this.$modal.msg('提交成功')
|
||||||
|
await this.getUserHasAnswerRandomNum()
|
||||||
|
await this.checkUserFinishAnswer()
|
||||||
|
await this.getReply()
|
||||||
|
await this.assignmentAnswer()
|
||||||
|
await this.checkUserFinishAnswer()
|
||||||
|
await this.checkCanAnswerAgain()
|
||||||
|
await this.getScore()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
//获取回答信息
|
//获取回答信息
|
||||||
async getReply() {
|
async getReply() {
|
||||||
const resp = await $.get(BASE_URL + '/answerInfo/' + this.id, {
|
const resp = await $.get(BASE_URL + '/answerInfo/' + this.id, {
|
||||||
@@ -559,16 +606,58 @@ layout("/mobile/platform.html"){
|
|||||||
currentDate: this.currentDate
|
currentDate: this.currentDate
|
||||||
})
|
})
|
||||||
this.currentScore = resp.data
|
this.currentScore = resp.data
|
||||||
}
|
},
|
||||||
|
checkTimer() {
|
||||||
|
if (this.timerInterval) {
|
||||||
|
clearInterval(this.timerInterval)
|
||||||
|
}
|
||||||
|
if (!this.finishAnswer) {
|
||||||
|
this.$dialog.alert({
|
||||||
|
title: '提示',
|
||||||
|
message: '本次答题时间' + this.questionData.timerMinute + '分钟,请尽快完成!'
|
||||||
|
}).then(() => {
|
||||||
|
this.countDownSeconds = this.questionData.timerMinute * 60
|
||||||
|
this.timerInterval = setInterval(() => {
|
||||||
|
this.updateCountdown()
|
||||||
|
}, 1000)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
updateCountdown() {
|
||||||
|
// 计算剩余的分钟和秒数
|
||||||
|
let mins = Math.floor(this.countDownSeconds / 60)
|
||||||
|
let secs = this.countDownSeconds % 60
|
||||||
|
// 格式化时间,确保分钟和秒数始终是两位数
|
||||||
|
mins = mins < 10 ? '0' + mins : mins;
|
||||||
|
secs = secs < 10 ? '0' + secs : secs;
|
||||||
|
this.remainder = mins + ':' + secs
|
||||||
|
// 如果倒计时结束,显示结束信息
|
||||||
|
if (this.countDownSeconds <= 0) {
|
||||||
|
this.remainder = '时间到'
|
||||||
|
clearInterval(this.timerInterval)
|
||||||
|
this.$dialog.alert({
|
||||||
|
title: '提示',
|
||||||
|
message: '答题时间到,请点击确认提交答案!'
|
||||||
|
}).then(() => {
|
||||||
|
this.autoSubmit()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.countDownSeconds = this.countDownSeconds - 1
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
if (this.timerInterval) {
|
||||||
|
clearInterval(this.timerInterval)
|
||||||
|
}
|
||||||
this.id = GetQueryString("id")
|
this.id = GetQueryString("id")
|
||||||
await this.getQuestionData()
|
await this.getQuestionData()
|
||||||
await this.checkCanAnswerAgain()
|
await this.checkCanAnswerAgain()
|
||||||
await this.getUserHasAnswerRandomNum()
|
await this.getUserHasAnswerRandomNum()
|
||||||
await this.checkUserFinishAnswer()
|
await this.checkUserFinishAnswer()
|
||||||
await this.getScore()
|
await this.getScore()
|
||||||
|
await this.checkTimer()
|
||||||
this.mLoading = false
|
this.mLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -590,4 +679,4 @@ layout("/mobile/platform.html"){
|
|||||||
|
|
||||||
<!--#
|
<!--#
|
||||||
}
|
}
|
||||||
#-->
|
#-->
|
||||||
|
|||||||
@@ -626,6 +626,28 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<vi-title title="上传压缩包设置"></vi-title>
|
||||||
|
<el-form-item label="是否上传压缩包">
|
||||||
|
<el-radio :label="true" border v-model="currentZplb.isUploadZip">上传</el-radio>
|
||||||
|
<el-radio :label="false" border v-model="currentZplb.isUploadZip">不上传</el-radio>
|
||||||
|
</el-form-item>
|
||||||
|
<template v-if="currentZplb.isUploadZip === true">
|
||||||
|
<el-form-item label="文件上传数量">
|
||||||
|
<el-input-number :max="5" :min="1" style="width: 100%"
|
||||||
|
v-model="currentZplb.zipNum"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上传文件格式">
|
||||||
|
<el-checkbox-group v-model="currentZplb.zipType">
|
||||||
|
<el-checkbox border key="zip" label="zip">zip</el-checkbox>
|
||||||
|
<el-checkbox border key="rar" label="rar">rar</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="每个文件大小">
|
||||||
|
<el-input placeholder="请填写每个文件大小" type="number" v-model="currentZplb.zipSize">
|
||||||
|
<template slot="append">Mb</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row class="mt20" justify="end" type="flex">
|
<el-row class="mt20" justify="end" type="flex">
|
||||||
@@ -1046,6 +1068,11 @@ layout("/layouts/platform.html"){
|
|||||||
this.$set(zplb, 'otherType', zplb.otherType ? zplb.otherType : ['mp4', 'docx'])
|
this.$set(zplb, 'otherType', zplb.otherType ? zplb.otherType : ['mp4', 'docx'])
|
||||||
this.$set(zplb, 'otherFileNum', zplb.otherFileNum ? zplb.otherFileNum : 1)
|
this.$set(zplb, 'otherFileNum', zplb.otherFileNum ? zplb.otherFileNum : 1)
|
||||||
this.$set(zplb, 'otherSize', zplb.otherSize ? zplb.otherSize : 2)
|
this.$set(zplb, 'otherSize', zplb.otherSize ? zplb.otherSize : 2)
|
||||||
|
|
||||||
|
this.$set(zplb, 'isUploadZip', zplb.isUploadZip ? zplb.isUploadZip : false)
|
||||||
|
this.$set(zplb, 'zipType', zplb.zipType ? zplb.zipType : ['rar', 'zip'])
|
||||||
|
this.$set(zplb, 'zipNum', zplb.zipNum ? zplb.zipNum : 1)
|
||||||
|
this.$set(zplb, 'zipSize', zplb.zipSize ? zplb.zipSize : 2)
|
||||||
},
|
},
|
||||||
doSearch() {
|
doSearch() {
|
||||||
this.pageForm.pageNumber = 1;
|
this.pageForm.pageNumber = 1;
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-input :maxlength="zplb2Config.maxWordCount" show-word-limit
|
<el-input :maxlength="zplb2Config.maxWordCount" show-word-limit
|
||||||
type="textarea" v-model="AddFormData.hdsbzpms"></el-input>
|
type="textarea" v-model="AddFormData.hdsbzpms"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-if="zplb2Config.isUploadPhoto||zplb2Config.isUploadOther">
|
<div v-if="zplb2Config.isUploadPhoto||zplb2Config.isUploadOther||zplb2Config.isUploadZip">
|
||||||
<el-divider content-position="left">作品信息</el-divider>
|
<el-divider content-position="left">作品信息</el-divider>
|
||||||
<el-form-item label="照片" required v-if="zplb2Config.isUploadPhoto">
|
<el-form-item label="照片" required v-if="zplb2Config.isUploadPhoto">
|
||||||
<el-upload
|
<el-upload
|
||||||
@@ -397,6 +397,18 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="压缩包" v-if="zplb2Config.isUploadZip">
|
||||||
|
<el-upload
|
||||||
|
:auto-upload="false"
|
||||||
|
:file-list="ziplist"
|
||||||
|
:limit="zplb2Config.zipNum"
|
||||||
|
:on-change="zipChange"
|
||||||
|
:on-exceed="zipExceed"
|
||||||
|
action=""
|
||||||
|
name="zipfile">
|
||||||
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -495,6 +507,20 @@ layout("/layouts/platform.html"){
|
|||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="压缩包" v-if="zplb2Config.isUploadZip">
|
||||||
|
<el-upload
|
||||||
|
:auto-upload="false"
|
||||||
|
:file-list="ziplist"
|
||||||
|
:limit="zplb2Config.zipNum"
|
||||||
|
:on-change="zipChange"
|
||||||
|
:on-exceed="zipRemove"
|
||||||
|
action=""
|
||||||
|
name="zipfile">
|
||||||
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
</el-upload>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -576,6 +602,9 @@ layout("/layouts/platform.html"){
|
|||||||
formhdxxlist: [],
|
formhdxxlist: [],
|
||||||
yearActivityList: [],
|
yearActivityList: [],
|
||||||
zplb2Config: {},
|
zplb2Config: {},
|
||||||
|
|
||||||
|
ziplist:[]
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -671,6 +700,30 @@ layout("/layouts/platform.html"){
|
|||||||
this.vadlist = this.vadlist.filter(v => v.urlId !== file.url.substring(length))
|
this.vadlist = this.vadlist.filter(v => v.urlId !== file.url.substring(length))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
zipChange(file, fileList){
|
||||||
|
const fileSuffix = file.name.substring(file.name.lastIndexOf(".") + 1).toLowerCase();
|
||||||
|
const whiteList = this.zplb2Config.zipType
|
||||||
|
if (!whiteList.includes(fileSuffix)) {
|
||||||
|
this.ziplist = []
|
||||||
|
this.$message.warning('上传文件只能是' + whiteList.join(',') + '格式')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
this.ziplist = fileList;
|
||||||
|
},
|
||||||
|
zipRemove(file, fileList){
|
||||||
|
if (file.status === 'success') {
|
||||||
|
const length = file.url.lastIndexOf("=") + 1
|
||||||
|
this.readytodelfile.push(file.url.substring(length));
|
||||||
|
this.ziplist.map(v => {
|
||||||
|
const length = v.url.lastIndexOf("=") + 1
|
||||||
|
v.urlId = v.url.substring(length);
|
||||||
|
})
|
||||||
|
this.ziplist = this.ziplist.filter(v => v.urlId !== file.url.substring(length))
|
||||||
|
}
|
||||||
|
},
|
||||||
|
zipExceed(){
|
||||||
|
this.$message.warning('文件最多上传' + this.zplb2Config.zipNum + '个');
|
||||||
|
},
|
||||||
openAdd() {
|
openAdd() {
|
||||||
this.AddFormData = {}
|
this.AddFormData = {}
|
||||||
this.zplb2Config = {}
|
this.zplb2Config = {}
|
||||||
|
|||||||
@@ -22,284 +22,281 @@ layout("/layouts/platform.html"){
|
|||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<div id="app" style="padding: 20px 40px" v-cloak>
|
<div id="app" v-cloak>
|
||||||
|
<guava>
|
||||||
|
<el-card class="box-card" shadow="never">
|
||||||
|
<template #header>
|
||||||
|
<h3 style="color: rgb(24, 103, 176);">填写申报信息</h3>
|
||||||
|
</template>
|
||||||
|
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="120px"
|
||||||
|
ref="form">
|
||||||
|
<el-row gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="申请人姓名" prop="user_name">
|
||||||
|
<el-input disabled type="text" v-model="formData.user_name"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="申报时间" prop="apply_time">
|
||||||
|
<el-input disabled type="text" v-model="formData.apply_time"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="联系方式" prop="mobile">
|
||||||
|
<el-input placeholder="请输入联系方式" type="number"
|
||||||
|
v-model="formData.mobile"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="活动主体类型" prop="activity_type">
|
||||||
|
<el-select @change="getProjectCodeChange" placeholder="请选择活动主体类型"
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.activity_type">
|
||||||
|
<el-option
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name+' ('+item.code+')'"
|
||||||
|
:value="item.code"
|
||||||
|
v-for="item in activityType">
|
||||||
|
</el-option>
|
||||||
|
<!-- <span>
|
||||||
|
|
||||||
<el-card class="box-card">
|
<!–#if(@shiro.hasRole('H04') || @shiro.hasRole('sysadmin')){#–>
|
||||||
<div class="clearfix" slot="header">
|
<el-option label="基层工会活动" value="1"></el-option>
|
||||||
<span style="color: #409EFF;font-size: 18px">填写申报信息</span>
|
<!–#}#–> <!–#if(@shiro.hasRole('H02') || @shiro.hasRole('sysadmin')){#–>
|
||||||
</div>
|
<el-option label="协会(社团)活动" value="2"></el-option>
|
||||||
|
<!–#}#–>
|
||||||
|
<!–#if(@shiro.hasRole('A06') || @shiro.hasRole('sysadmin')){#–>
|
||||||
|
<el-option label="校工会活动" value="3"></el-option>
|
||||||
|
<!–#}#–>
|
||||||
|
|
||||||
<el-form :model="formData" :rules="formRules" label-suffix=":" label-width="120px"
|
</span>-->
|
||||||
ref="form">
|
</el-select>
|
||||||
<el-row gutter="20">
|
</el-form-item>
|
||||||
<el-col :span="12">
|
</el-col>
|
||||||
<el-form-item label="申请人姓名" prop="user_name">
|
|
||||||
<el-input disabled type="text" v-model="formData.user_name"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="申报时间" prop="apply_time">
|
|
||||||
<el-input disabled type="text" v-model="formData.apply_time"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="联系方式" prop="mobile">
|
|
||||||
<el-input placeholder="请输入联系方式" type="number"
|
|
||||||
v-model="formData.mobile"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动主体类型" prop="activity_type">
|
|
||||||
<el-select @change="getProjectCodeChange" placeholder="请选择活动主体类型"
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="formData.activity_type">
|
|
||||||
<el-option
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name+' ('+item.code+')'"
|
|
||||||
:value="item.code"
|
|
||||||
v-for="item in activityType">
|
|
||||||
</el-option>
|
|
||||||
<!-- <span>
|
|
||||||
|
|
||||||
<!–#if(@shiro.hasRole('H04') || @shiro.hasRole('sysadmin')){#–>
|
|
||||||
<el-option label="基层工会活动" value="1"></el-option>
|
|
||||||
<!–#}#–> <!–#if(@shiro.hasRole('H02') || @shiro.hasRole('sysadmin')){#–>
|
|
||||||
<el-option label="协会(社团)活动" value="2"></el-option>
|
|
||||||
<!–#}#–>
|
|
||||||
<!–#if(@shiro.hasRole('A06') || @shiro.hasRole('sysadmin')){#–>
|
|
||||||
<el-option label="校工会活动" value="3"></el-option>
|
|
||||||
<!–#}#–>
|
|
||||||
|
|
||||||
</span>-->
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="活动名称" prop="activity_name">
|
<el-form-item label="活动名称" prop="activity_name">
|
||||||
<!-- <el-autocomplete :fetch-suggestions="querySearchAsync"
|
<!-- <el-autocomplete :fetch-suggestions="querySearchAsync"
|
||||||
@input="activityChange"
|
@input="activityChange"
|
||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
placeholder="请输入内容"
|
placeholder="请输入内容"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="formData.activity_name"
|
v-model="formData.activity_name"
|
||||||
></el-autocomplete>-->
|
></el-autocomplete>-->
|
||||||
<el-input placeholder="请输入活动名称"
|
<el-input placeholder="请输入活动名称"
|
||||||
v-model="formData.activity_name"></el-input>
|
v-model="formData.activity_name"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<!-- <el-col :span="12">
|
<!-- <el-col :span="12">
|
||||||
<el-form-item label="项目编号" prop="projectCode">
|
<el-form-item label="项目编号" prop="projectCode">
|
||||||
<el-input disabled placeholder="选择活动类型自动生成"
|
<el-input disabled placeholder="选择活动类型自动生成"
|
||||||
v-model="formData.projectCode"></el-input>
|
v-model="formData.projectCode"></el-input>
|
||||||
</el-form-item>
|
|
||||||
</el-col>-->
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动项目类型" prop="projectTypeCode">
|
|
||||||
<el-select placeholder="请选择活动类型" style="width: 100%;"
|
|
||||||
v-model="formData.projectTypeCode">
|
|
||||||
<el-option
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name+' ('+item.code+')'"
|
|
||||||
:value="item.code"
|
|
||||||
v-for="item in projectType">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
|
|
||||||
v-show="formData.activity_type!=40003">
|
|
||||||
<el-input placeholder="请输入申报(承办)单位" type="text"
|
|
||||||
v-model="formData.fundsUnitName"></el-input>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
|
|
||||||
v-show="formData.activity_type==40003">
|
|
||||||
<el-select placeholder="请选择申报(承办)单位"
|
|
||||||
style="width: 100%;"
|
|
||||||
v-model="formData.fundsUnitName">
|
|
||||||
<el-option
|
|
||||||
:key="item.name"
|
|
||||||
:label="item.name+' ('+item.code+')'"
|
|
||||||
:value="item.name"
|
|
||||||
v-for="item in fundsUnitNameOption">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<!-- <el-col :span="12">
|
|
||||||
<el-form-item prop="time" label="活动时间">
|
|
||||||
<el-date-picker
|
|
||||||
style="width: 100%"
|
|
||||||
v-model="formData.time"
|
|
||||||
type="daterange"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
range-separator="-"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
end-placeholder="结束日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>-->
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动计划时间" prop="plannedDate">
|
|
||||||
<el-date-picker
|
|
||||||
end-placeholder="结束日期"
|
|
||||||
range-separator="-"
|
|
||||||
start-placeholder="开始日期"
|
|
||||||
style="width: 100%"
|
|
||||||
type="daterange"
|
|
||||||
v-model="formData.plannedDate"
|
|
||||||
value-format="yyyy-MM-dd">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动地址" prop="venue">
|
|
||||||
<el-input maxlength="50" placeholder="请填写活动地址" type="text"
|
|
||||||
v-model="formData.venue"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="活动人数" prop="activity_number">
|
|
||||||
<el-input maxlength="50" placeholder="请填写活动人数"
|
|
||||||
type="number"
|
|
||||||
v-model="formData.activity_number"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="申报金额" prop="funds_money">
|
|
||||||
<el-input disabled placeholder="输入物品单价自动计算" type="number"
|
|
||||||
v-model="formData.funds_money"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<!-- <el-col :span="12">
|
|
||||||
<el-form-item prop="payeeId" label="收款人">
|
|
||||||
<el-select v-model="formData.payeeId" placeholder="请选择联系人"
|
|
||||||
filterable
|
|
||||||
remote
|
|
||||||
clearable
|
|
||||||
reserve-keyword
|
|
||||||
:remote-method="remoteMethod"
|
|
||||||
:loading="selectLoading"
|
|
||||||
style="width: 100%">
|
|
||||||
<el-option
|
|
||||||
v-for="item in userList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.username+'-'+item.loginname+'-'+item.unitname"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item prop="activity_card_number" label="报销卡号">
|
|
||||||
<el-input v-model="formData.activity_card_number" type="number"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>-->
|
</el-col>-->
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="活动项目类型" prop="projectTypeCode">
|
||||||
|
<el-select placeholder="请选择活动类型" style="width: 100%;"
|
||||||
|
v-model="formData.projectTypeCode">
|
||||||
|
<el-option
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name+' ('+item.code+')'"
|
||||||
|
:value="item.code"
|
||||||
|
v-for="item in projectType">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
<el-col :span="12">
|
||||||
|
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
|
||||||
|
v-show="formData.activity_type!=40003">
|
||||||
|
<el-input placeholder="请输入申报(承办)单位" type="text"
|
||||||
|
v-model="formData.fundsUnitName"></el-input>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="申报(承办)单位" prop="fundsUnitName"
|
||||||
|
v-show="formData.activity_type==40003">
|
||||||
|
<el-select placeholder="请选择申报(承办)单位"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-model="formData.fundsUnitName">
|
||||||
|
<el-option
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name+' ('+item.code+')'"
|
||||||
|
:value="item.name"
|
||||||
|
v-for="item in fundsUnitNameOption">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- <el-col :span="12">
|
||||||
|
<el-form-item prop="time" label="活动时间">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="formData.time"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>-->
|
||||||
|
|
||||||
|
|
||||||
<div style="display: flex;margin: 20px 0">
|
<el-col :span="12">
|
||||||
<el-divider content-position="left">购置物品及价格</el-divider>
|
<el-form-item label="活动计划时间" prop="plannedDate">
|
||||||
|
<el-date-picker
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
style="width: 100%"
|
||||||
|
type="daterange"
|
||||||
|
v-model="formData.plannedDate"
|
||||||
|
value-format="yyyy-MM-dd">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<div style="padding-left: 10px;padding-top: 20px">
|
<el-col :span="12">
|
||||||
<el-tooltip class="item" content="点击添加购置物品及价格" effect="dark" placement="top">
|
<el-form-item label="活动地址" prop="venue">
|
||||||
<el-button @click="formData.goods.push({})" circle icon="el-icon-plus"
|
<el-input maxlength="50" placeholder="请填写活动地址" type="text"
|
||||||
type="primary"></el-button>
|
v-model="formData.venue"></el-input>
|
||||||
</el-tooltip>
|
</el-form-item>
|
||||||
</div>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="活动人数" prop="activity_number">
|
||||||
|
<el-input maxlength="50" placeholder="请填写活动人数"
|
||||||
|
type="number"
|
||||||
|
v-model="formData.activity_number"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <el-col :span="12">-->
|
||||||
|
<!-- <el-form-item label="申报金额" prop="funds_money">-->
|
||||||
|
<!-- <el-input disabled placeholder="输入物品单价自动计算" type="number"-->
|
||||||
|
<!-- v-model="formData.funds_money"></el-input>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
|
||||||
|
<!-- <el-col :span="12">
|
||||||
|
<el-form-item prop="payeeId" label="收款人">
|
||||||
|
<el-select v-model="formData.payeeId" placeholder="请选择联系人"
|
||||||
|
filterable
|
||||||
|
remote
|
||||||
|
clearable
|
||||||
|
reserve-keyword
|
||||||
|
:remote-method="remoteMethod"
|
||||||
|
:loading="selectLoading"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-option
|
||||||
|
v-for="item in userList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.username+'-'+item.loginname+'-'+item.unitname"
|
||||||
|
:value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="activity_card_number" label="报销卡号">
|
||||||
|
<el-input v-model="formData.activity_card_number" type="number"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>-->
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-form-item label="活动费用预算">
|
||||||
|
<el-table :data="formData.budgets" border max-height="500" size="mini" style="width: 100%">
|
||||||
|
<el-table-column label="序号" sortable type="index" width="100"></el-table-column>
|
||||||
|
<el-table-column label="费用项目名称" prop="name">
|
||||||
|
<template scope="{row,$index}">
|
||||||
|
<el-form-item label-width="0"
|
||||||
|
:prop="'budgets.'+$index+'.name'"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input v-model="row.name" maxlength="50"
|
||||||
|
placeholder="请输入费用项目名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="单价(元)" prop="unitPrice">
|
||||||
|
<template scope="{row,$index}">
|
||||||
|
<el-form-item label-width="0"
|
||||||
|
:prop="'budgets.'+$index+'.unitPrice'"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input-number placeholder="单价(元)" v-model="row.unitPrice" :precision="2"
|
||||||
|
:min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" prop="num">
|
||||||
|
<template scope="{row,$index}">
|
||||||
|
<el-form-item label-width="0"
|
||||||
|
:prop="'budgets.'+$index+'.num'"
|
||||||
|
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||||
|
<el-input-number placeholder="数量" v-model="row.num" :precision="0"
|
||||||
|
:min="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="合计(元)" prop="total">
|
||||||
|
<template slot-scope="{row}">
|
||||||
|
{{isNaN(row.unitPrice * row.num) ? '输入单价和数量自动计算' : (row.unitPrice *
|
||||||
|
row.num).toFixed(2)}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" header-align="center" label="操作" width="150px">
|
||||||
|
<template slot="header" slot-scope="scope">
|
||||||
|
<el-button @click="formData.budgets.push({})" icon="el-icon-plus" type="primary"
|
||||||
|
size="mini">添加
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button :disabled="formData.budgets.length==1"
|
||||||
|
@click="formData.budgets.splice(scope.$index,1)"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
type="danger"></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="活动方案">
|
||||||
|
<text-editor v-model="formData.activity_content"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="活动安排">
|
||||||
|
<text-editor v-model="formData.activity_arrange"></text-editor>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- <el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">附件</span>
|
||||||
|
</el-divider>
|
||||||
|
<el-row :gutter="40">
|
||||||
|
|
||||||
|
<el-col :span="24" class="mb25">
|
||||||
|
<el-form-item label="附件" prop="files">
|
||||||
|
<file-upload :files.sync="formData.files" card></file-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>-->
|
||||||
|
<!--<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">签  字</span>
|
||||||
|
</el-divider>
|
||||||
|
<el-form-item prop="sign">
|
||||||
|
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||||
|
</el-form-item>-->
|
||||||
|
</el-form>
|
||||||
|
<div style="float: right;margin: 20px 0">
|
||||||
|
<el-button @click="doAdd()" type="primary">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
</el-card>
|
||||||
<el-form-item>
|
</guava>
|
||||||
<el-table :data="formData.goods" border height="200" size="mini"
|
|
||||||
style="width: 100%">
|
|
||||||
|
|
||||||
<el-table-column align="center" header-align="center" label="序号" sortable
|
|
||||||
type="index" width="100">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" header-align="center" label="物品名称"
|
|
||||||
prop="name">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<el-input maxlength="50" placeholder="物品名称" type="text"
|
|
||||||
v-model="row.name"></el-input>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" header-align="center" label="预算费用"
|
|
||||||
prop="price">
|
|
||||||
<template slot-scope="{row}">
|
|
||||||
<el-input @input="blur1" maxlength="50" placeholder="预算费用"
|
|
||||||
type="number" v-model="row.price"></el-input>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" fixed="right" fixed="right"
|
|
||||||
header-align="center"
|
|
||||||
label="操作"
|
|
||||||
width="80px">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button :disabled="formData.goods.length==0"
|
|
||||||
@click="delNotesItem(scope)" circle
|
|
||||||
icon="el-icon-delete"
|
|
||||||
type="danger"></el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-divider class="dia" content-position="left"><span
|
|
||||||
style="color: #3ea1ec;">活动方案</span>
|
|
||||||
</el-divider>
|
|
||||||
<el-form-item class="is-required" prop="activity_content">
|
|
||||||
<text-editor v-model="formData.activity_content"></text-editor>
|
|
||||||
</el-form-item>
|
|
||||||
<el-divider class="dia" content-position="left"><span
|
|
||||||
style="color: #3ea1ec;">活动安排</span>
|
|
||||||
</el-divider>
|
|
||||||
<el-form-item class="is-required" prop="activity_arrange">
|
|
||||||
<text-editor v-model="formData.activity_arrange"></text-editor>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<!-- <el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">附件</span>
|
|
||||||
</el-divider>
|
|
||||||
<el-row :gutter="40">
|
|
||||||
|
|
||||||
<el-col :span="24" class="mb25">
|
|
||||||
<el-form-item label="附件" prop="files">
|
|
||||||
<file-upload :files.sync="formData.files" card></file-upload>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
</el-row>-->
|
|
||||||
|
|
||||||
|
|
||||||
<!--<el-divider class="dia" content-position="left"><span style="color: #3ea1ec;">签  字</span>
|
|
||||||
</el-divider>
|
|
||||||
<el-form-item prop="sign">
|
|
||||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
|
||||||
</el-form-item>-->
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<div style="float: right;margin: 20px 0">
|
|
||||||
<el-button @click="doAdd()" type="primary">确 定</el-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-card>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -324,6 +321,9 @@ layout("/layouts/platform.html"){
|
|||||||
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
budgets: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -433,6 +433,12 @@ layout("/layouts/platform.html"){
|
|||||||
formData.endTime = formData.plannedDate[1]
|
formData.endTime = formData.plannedDate[1]
|
||||||
formData.plannedDate = undefined
|
formData.plannedDate = undefined
|
||||||
}
|
}
|
||||||
|
if (formData.budgets) {
|
||||||
|
formData.budgets.forEach(v => {
|
||||||
|
v.total = (v.unitPrice * v.num).toFixed(2)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const url = "/platform/jf/activity_bx/apply"
|
const url = "/platform/jf/activity_bx/apply"
|
||||||
const resp = await $.post(url + (formData.id ? "/doEdit" : "/doAdd"), {
|
const resp = await $.post(url + (formData.id ? "/doEdit" : "/doAdd"), {
|
||||||
activityBx: JSON.stringify(formData)
|
activityBx: JSON.stringify(formData)
|
||||||
@@ -451,6 +457,9 @@ layout("/layouts/platform.html"){
|
|||||||
this.delNotesList = []
|
this.delNotesList = []
|
||||||
this.formData = {
|
this.formData = {
|
||||||
apply_type: 1,
|
apply_type: 1,
|
||||||
|
budgets: [
|
||||||
|
{}
|
||||||
|
],
|
||||||
goods: [],
|
goods: [],
|
||||||
files: [],
|
files: [],
|
||||||
time: [],
|
time: [],
|
||||||
@@ -466,10 +475,14 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
async findOne(id) {
|
async findOne(id) {
|
||||||
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||||
|
|
||||||
if (resp.code === 0) {
|
if (resp.code === 0) {
|
||||||
resp.data.activity_type = resp.data.activity_type + ""
|
resp.data.activity_type = resp.data.activity_type + ""
|
||||||
resp.data.plannedDate = [resp.data.startPlannedDate, resp.data.endPlannedDate]
|
resp.data.plannedDate = [resp.data.startPlannedDate, resp.data.endPlannedDate]
|
||||||
|
if(resp.data.budgets){
|
||||||
|
resp.data.budgets = JSON.parse(resp.data.budgets)
|
||||||
|
}else{
|
||||||
|
resp.data.budgets = []
|
||||||
|
}
|
||||||
this.formData = resp.data
|
this.formData = resp.data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -368,7 +368,6 @@ layout("/layouts/platform.html"){
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="抽奖规则" prop="raffleRule" v-if="formData.isRaffle">
|
<el-form-item label="抽奖规则" prop="raffleRule" v-if="formData.isRaffle">
|
||||||
<el-table :data="formData.raffleRule" border size="small">
|
<el-table :data="formData.raffleRule" border size="small">
|
||||||
<el-table-column label="开始答题时间" prop="startAnswerDate">
|
<el-table-column label="开始答题时间" prop="startAnswerDate">
|
||||||
@@ -457,6 +456,22 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table>
|
</el-table>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<vi-title2 title="计时设置"></vi-title2>
|
||||||
|
<el-form-item label="是否开启计时" prop="enableTimer" :rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
|
||||||
|
<el-radio-group v-model="formData.enableTimer" size="small">
|
||||||
|
<el-radio :label="true" border>是</el-radio>
|
||||||
|
<el-radio :label="false" border>否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="formData.enableTimer"
|
||||||
|
label="计时分钟"
|
||||||
|
prop="timerMinute"
|
||||||
|
:rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">
|
||||||
|
<el-input-number v-model="formData.timerMinute" :min="0.1" :precision="1"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- <el-form-item label="抽奖时间" prop="raffleTime"-->
|
<!-- <el-form-item label="抽奖时间" prop="raffleTime"-->
|
||||||
<!-- v-if="formData.isRaffle"-->
|
<!-- v-if="formData.isRaffle"-->
|
||||||
<!-- :rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">-->
|
<!-- :rules="[{required: true, message: '必填', trigger: ['blur', 'change']}]">-->
|
||||||
|
|||||||
Reference in New Issue
Block a user