提交
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<easy-captcha.version>1.6.2</easy-captcha.version>
|
||||
<commons-lang3.version>3.8.1</commons-lang3.version>
|
||||
<emoji-java.veision>4.0.0</emoji-java.veision>
|
||||
<jsoup.veision>1.11.2</jsoup.veision>
|
||||
<jsoup.veision>1.12.1</jsoup.veision>
|
||||
<pinyin4j.veision>2.5.1</pinyin4j.veision>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<tencentcloud-sdk-java.version>4.0.11</tencentcloud-sdk-java.version>
|
||||
@@ -45,13 +45,11 @@
|
||||
<artifactId>asm-util</artifactId>
|
||||
<version>7.3.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm-all</artifactId>
|
||||
<version>2.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.openjdk.nashorn</groupId>
|
||||
<artifactId>nashorn-core</artifactId>
|
||||
@@ -73,47 +71,47 @@
|
||||
<version>0.3.17</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.4.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>ooxml-schemas</artifactId>
|
||||
<version>1.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<version>1.4.32</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.artofsolving</groupId>
|
||||
<artifactId>jodconverter</artifactId>
|
||||
<version>2.2.2</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>jurt</artifactId>
|
||||
<groupId>org.openoffice</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>javax.annotation-api</artifactId>
|
||||
<version>1.3.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.xfire</groupId>
|
||||
<artifactId>xfire-all</artifactId>
|
||||
<version>1.2.6</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring</artifactId>
|
||||
<groupId>org.springframework</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>xfire-spring</artifactId>
|
||||
<groupId>org.codehaus.xfire</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<groupId>xerces</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>stax-api</artifactId>
|
||||
<groupId>stax</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>xfire-xmlbeans</artifactId>
|
||||
<groupId>org.codehaus.xfire</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
@@ -170,13 +168,6 @@
|
||||
<artifactId>thumbnailator</artifactId>
|
||||
<version>0.4.8</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.apache.poi</groupId>-->
|
||||
<!-- <artifactId>ooxml-schemas</artifactId>-->
|
||||
<!-- <version>1.4</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>io.v</groupId>
|
||||
<artifactId>vi-nutz</artifactId>
|
||||
@@ -202,6 +193,18 @@
|
||||
<artifactId>juh</artifactId>
|
||||
<groupId>org.openoffice</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>poi</artifactId>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>ridl</artifactId>
|
||||
<groupId>org.openoffice</groupId>
|
||||
@@ -214,22 +217,6 @@
|
||||
<artifactId>unoil</artifactId>
|
||||
<groupId>org.openoffice</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<groupId>commons-io</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
<groupId>org.springframework</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>ooxml-schemas</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -251,11 +238,21 @@
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.8.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>kotlin-stdlib-common</artifactId>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.13</version>
|
||||
<version>4.3.5</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
@@ -277,10 +274,6 @@
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
@@ -293,6 +286,10 @@
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<groupId>commons-logging</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<groupId>com.squareup.okhttp</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>okio</artifactId>
|
||||
<groupId>com.squareup.okio</groupId>
|
||||
@@ -322,7 +319,7 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!-- html -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
@@ -362,7 +359,32 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>ooxml-schemas</artifactId>
|
||||
<version>1.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>xmlbeans</artifactId>
|
||||
<groupId>org.apache.xmlbeans</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.nutz</groupId>
|
||||
<artifactId>nutzboot-starter-test-junit4</artifactId>
|
||||
@@ -401,11 +423,11 @@
|
||||
<version>${easy-captcha.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-validator</groupId>
|
||||
<artifactId>commons-validator</artifactId>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework</groupId>-->
|
||||
<!-- <artifactId>spring-core</artifactId>-->
|
||||
<!-- <version>4.3.21.RELEASE</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
</dependencies>
|
||||
<dependencyManagement>
|
||||
|
||||
@@ -3,6 +3,7 @@ package io.v.nutz.jf.controller.activitybx;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.common.models.Goods;
|
||||
import io.v.nutz.jf.model.ActivityBx;
|
||||
import io.v.nutz.jf.service.ActivityBxService;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
@@ -14,10 +15,14 @@ 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.json.Json;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
* @date 2020/11/14 14:55
|
||||
@@ -49,29 +54,33 @@ public class AccountingCon {
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(Integer year, Integer isAudit, String unitId, String unionId, String searchName, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("\t\n" +
|
||||
"SELECT\n" +
|
||||
"\tact.*,\n" +
|
||||
"\tu.loginname bxr_loginname,\n" +
|
||||
"\tu.unionname bxr_unionname,\n" +
|
||||
"\tu.unioncode,\n" +
|
||||
"\ts.state_name,\n" +
|
||||
"\ts.state_color \n" +
|
||||
"FROM\n" +
|
||||
"\t`activity_bx` act\n" +
|
||||
"\tLEFT JOIN `user` u ON act.user_id = u.id\n" +
|
||||
"\tLEFT JOIN state s ON act.state_id = s.state_id $condition");
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
bx.*,
|
||||
bxr.loginname bxr_loginname,
|
||||
bxr.unionname bxr_unionname,
|
||||
bxr.unioncode,
|
||||
state.state_name,
|
||||
state.state_color,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
activity_bx bx
|
||||
LEFT JOIN `user` bxr ON bx.user_id = bxr.id
|
||||
LEFT JOIN state state ON state.state_id = bx.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = bx.projectTypeCode
|
||||
$condition
|
||||
""");
|
||||
|
||||
Cnd cnd = Cnd.NEW();
|
||||
|
||||
if (isAudit == 1) {
|
||||
cnd.and("act.state_id", ">=", 1020);
|
||||
cnd.and("bx.state_id", ">=", 1020);
|
||||
} else {
|
||||
cnd.and("act.state_id", isAudit == 2 ? ">" : "=", 1020);
|
||||
cnd.and("bx.state_id", isAudit == 2 ? ">" : "=", 1020);
|
||||
}
|
||||
|
||||
|
||||
Vi.cndPlus(cnd, "act.year", "=", year);
|
||||
Vi.cndPlus(cnd, "bx.year", "=", year);
|
||||
if (Vi.isNotBlank(searchName, searchKeyword)) {
|
||||
cnd.where().andLike(searchName, searchKeyword);
|
||||
}
|
||||
@@ -79,18 +88,20 @@ public class AccountingCon {
|
||||
if (Vi.isNotBlank(pageOrderName, pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy);
|
||||
} else {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
cnd.asc("bx.state_id").desc("bx.apply_time");
|
||||
}
|
||||
Vi.cndPlus(cnd, "u.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "u.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPage(pageNumber, pageSize, sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object doReview(String id, String idea, String sign, Boolean flag) {
|
||||
public Object doReview(String id, String idea, String sign, Boolean flag, String goods) {
|
||||
List<Goods> goodsList = Json.fromJsonAsList(Goods.class, goods);
|
||||
ActivityBx aid = activityBxService.fetch(id);
|
||||
aid.setGoods(goodsList);
|
||||
aid.setState_id(flag ? "1030" : "1025");
|
||||
aid.setAccounting_name(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
aid.setAccounting_time(DateUtil.getDate());
|
||||
@@ -102,5 +113,11 @@ public class AccountingCon {
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object getGoods(String id) {
|
||||
return activityBxService.dao().query(Goods.class, Cnd.where("reid", "=", id));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -65,4 +65,13 @@ public class ApplyController {
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object doEdit(@Param("activityBx") ActivityBx activityBx) {
|
||||
activityBx.setApply_time(DateUtil.getDate());
|
||||
activityBx.setState_id("1020");
|
||||
activityBxService.doEdit(activityBx);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,25 +1,24 @@
|
||||
package io.v.nutz.jf.controller.activitybx;
|
||||
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.base.utils.Html2Text;
|
||||
import io.v.nutz.base.utils.Roles;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.jf.model.ActivityBx;
|
||||
import io.v.nutz.jf.model.ActivityFile;
|
||||
import io.v.nutz.jf.service.ActivityBxService;
|
||||
import io.v.nutz.jf.service.ActivityFileService;
|
||||
import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.util.MoneyUtil;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
@@ -28,16 +27,17 @@ import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.dao.util.cri.Static;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
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.Param;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Base64;
|
||||
import java.util.Calendar;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -73,29 +73,6 @@ public class ReimbursementCon {
|
||||
public void index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object doAdd(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign) {
|
||||
activityBx.setYear(Calendar.getInstance().get(Calendar.YEAR));
|
||||
if (ShiroUtil.hasAnyRoles(new String[]{"xghhdwy", "A06"}) && activityBx.getActivity_type().equals(2)) {
|
||||
activityBx.setState_id("1020");
|
||||
activityBx.setActivity_type(2);
|
||||
} else if (ShiroUtil.hasAnyRoles(new String[]{"H02"}) && activityBx.getActivity_type().equals(3)) {
|
||||
activityBx.setState_id("1000");
|
||||
activityBx.setActivity_type(3);
|
||||
} else {
|
||||
activityBx.setState_id("1010");
|
||||
activityBx.setActivity_type(1);
|
||||
}
|
||||
activityBx.setApply_time(DateUtil.getDate());
|
||||
activityBx.setUser_id(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
activityBxService.doAdd(activityBx);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 多功能查询
|
||||
*
|
||||
@@ -148,7 +125,7 @@ public class ReimbursementCon {
|
||||
Vi.cndPlus(cnd, "bxr.unitid", "=", unitId);
|
||||
Vi.cndPlus(cnd, "bxr.unionid", "=", unionId);
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPage(pageNumber, pageSize, sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@@ -157,7 +134,7 @@ public class ReimbursementCon {
|
||||
return queryOne(id);
|
||||
}
|
||||
|
||||
private Record queryOne(String id) {
|
||||
private NutMap queryOne(String id) {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"\tact.*,\n" +
|
||||
"\t`user`.loginname,\n" +
|
||||
@@ -196,49 +173,28 @@ public class ReimbursementCon {
|
||||
"\tLEFT JOIN sys_signature us_s ON us_s.id = act.user_signature \n" +
|
||||
"WHERE\n" +
|
||||
"\tact.id = @id").setParam("id", id);
|
||||
Record record = activityBxService.list(sql).get(0);
|
||||
record.set("Goods", baseService.dao().query("Goods", Cnd.where("reid", "=", id)));
|
||||
List<NutMap> listMap = baseService.listMap(sql);
|
||||
NutMap map = null;
|
||||
if (Lang.isNotEmpty(listMap)) {
|
||||
map = listMap.get(0);
|
||||
map.setv("goods", baseService.dao().query("Goods", Cnd.where("reid", "=", id)));
|
||||
|
||||
if (record.size() == 0) {
|
||||
return null;
|
||||
String activity_id = map.getString("activity_id");
|
||||
if (Strings.isNotBlank(activity_id)) {
|
||||
List<ActivityFile> files = activityFileService.query(Cnd.where("activity_id", "=", activity_id).desc("time"));
|
||||
LinkedHashMap<String, List<ActivityFile>> collect = files.stream().collect(Collectors.groupingBy(ActivityFile::getTime, LinkedHashMap::new, Collectors.toList()));
|
||||
|
||||
map.setv("activity_files", collect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String activity_id = record.getString("activity_id");
|
||||
if (Strings.isNotBlank(activity_id)) {
|
||||
List<ActivityFile> files = activityFileService.query(Cnd.where("activity_id", "=", activity_id).desc("time"));
|
||||
LinkedHashMap<String, List<ActivityFile>> collect = files.stream().collect(Collectors.groupingBy(ActivityFile::getTime, LinkedHashMap::new, Collectors.toList()));
|
||||
|
||||
record.set("activity_files", collect);
|
||||
}
|
||||
|
||||
return record;
|
||||
return map;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object doEdit(@Param("activityBx") ActivityBx activityBx, @Param("sign") String sign, String[] delNotesList) {
|
||||
|
||||
if (delNotesList != null && delNotesList.length > 0) {
|
||||
for (String s : delNotesList) {
|
||||
if (Strings.isNotBlank(s)) {
|
||||
baseService.clear("goods", Cnd.where("id", "=", s));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!activityBx.getGoods().isEmpty()) {
|
||||
activityBx.getGoods().forEach(goods -> {
|
||||
if (Strings.isBlank(goods.getId())) {
|
||||
goods.setReid(activityBx.getId());
|
||||
baseService.insert(goods);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (Strings.isNotBlank(sign)) {
|
||||
activityBx.setUser_signature(sysSignatureService.insert(new Sys_signature(sign)).getId());
|
||||
}
|
||||
|
||||
activityBxService.doEdit(activityBx);
|
||||
public Object doEdit(String files, String id) {
|
||||
List<Sys_file> fileList = Json.fromJsonAsList(Sys_file.class, files);
|
||||
activityBxService.update(Chain.make("resultsFiles", fileList).add("state_id", 1060), Cnd.where("id", "=", id));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,22 @@ package io.v.nutz.jf.controller.activitybx;
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.jf.model.ActivityBx;
|
||||
import io.v.nutz.jf.service.ActivityBxService;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.sys.services.SysUnionService;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import io.v.nutz.web.commons.utils.FileUtil;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.ddr.poi.html.HtmlRenderPolicy;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
@@ -17,12 +26,17 @@ import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -45,6 +59,10 @@ public class ReimbursementViewCon {
|
||||
private SysUnionService sysUnionService;
|
||||
|
||||
|
||||
@Inject
|
||||
private FtpService ftpService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/jf/activitybx/reimbursementview.html")
|
||||
@RequiresPermissions("sys.jf.activity_bx.reimbursementview")
|
||||
@@ -55,19 +73,22 @@ public class ReimbursementViewCon {
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(Integer year, String searchName, String unitId, String unionId, String searchKeyword, int pageNumber, int pageSize, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"\tact.*,\n" +
|
||||
"\tu.loginname,\n" +
|
||||
"\tun.unionname,\n" +
|
||||
"\tun.unioncode,\n" +
|
||||
"\ts.state_name,\n" +
|
||||
"\ts.state_color \n" +
|
||||
"FROM\n" +
|
||||
"\t`activity_bx` act\n" +
|
||||
"\tLEFT JOIN `user` u ON act.user_id = u.id\n" +
|
||||
"\tLEFT JOIN sys_unit su ON su.id = u.unitid\n" +
|
||||
"\tLEFT JOIN sys_union un ON su.unionid = un.id\n" +
|
||||
"\tLEFT JOIN state s ON act.state_id = s.state_id $condition");
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
bxr.loginname bxr_loginname,
|
||||
bxr.unionname bxr_unionname,
|
||||
bxr.unioncode,
|
||||
state.state_name,
|
||||
state.state_color,
|
||||
abs.`name` absName
|
||||
FROM
|
||||
activity_bx act
|
||||
LEFT JOIN `user` bxr ON act.user_id = bxr.id
|
||||
LEFT JOIN state state ON state.state_id = act.state_id
|
||||
LEFT JOIN activity_basic_settings abs ON abs.`code` = act.projectTypeCode
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,wyh02")) {
|
||||
SqlExpressionGroup group2 = new SqlExpressionGroup();
|
||||
@@ -93,9 +114,98 @@ public class ReimbursementViewCon {
|
||||
cnd.asc("act.state_id").desc("act.apply_time");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
return activityBxService.listPage(pageNumber, pageSize, sql);
|
||||
return activityBxService.listPageMap(pageNumber, pageSize, sql);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
public void doExport(String id, HttpServletResponse response) throws Exception {
|
||||
NutMap nutMap = activityBxService.queryOne(id);
|
||||
|
||||
nutMap.setv("apply_time", nutMap.getString("apply_time").substring(0, 10));
|
||||
List<NutMap> goods = nutMap.getAsList("goods", NutMap.class);
|
||||
|
||||
for (int i = 0; i < goods.size(); i++) {
|
||||
goods.get(i).put("ranking", i + 1);
|
||||
}
|
||||
if (nutMap.get("a_s") != null) {
|
||||
nutMap.setv("a_sign", Vi.getImg(nutMap.getString("a_s")));
|
||||
nutMap.setv("accounting_time", nutMap.getString("apply_time"));
|
||||
}
|
||||
|
||||
HackLoopTableRenderPolicy policy = new HackLoopTableRenderPolicy();
|
||||
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
|
||||
htmlRenderPolicy.getConfig().setShowDefaultTableBorderInTableCell(true);
|
||||
|
||||
Configure config = Configure.newBuilder().bind("goods", policy)
|
||||
.bind("n.activity_content", htmlRenderPolicy)
|
||||
.bind("n.activity_arrange", htmlRenderPolicy).build();
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("goods", goods);
|
||||
map.put("n", nutMap);
|
||||
map.put("schoolName", Globals.schoolName);
|
||||
String fileName = Globals.schoolName + "活动申报登记表";
|
||||
|
||||
response.addHeader("Content-Type", "application/octet-stream");
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".docx");
|
||||
InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream("docTemplate/funds2.docx");
|
||||
XWPFTemplate.compile(inputStream, config).render(map, response.getOutputStream());
|
||||
inputStream.close();
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
public void downloadResults(Integer year, HttpServletResponse response) throws IOException {
|
||||
|
||||
List<ActivityBx> activityBxList = activityBxService.query(Cnd.where("year", "=", year));
|
||||
try {
|
||||
|
||||
response.reset();
|
||||
response.setContentType("application/x-msdownload;charset=utf-8");
|
||||
|
||||
/**
|
||||
* 创建临时文件夹
|
||||
*/
|
||||
String tmpPath = "tmp/" + R.UU32();
|
||||
File tmpDir = new File(tmpPath + "/" + year + "活动申报");
|
||||
tmpDir.mkdirs();
|
||||
for (ActivityBx map : activityBxList) {
|
||||
if (Lang.isNotEmpty(map)) {
|
||||
for (Sys_file file : map.getResultsFiles()) {
|
||||
String fileName = map.getFundsUnitName() + "活动名称:【" + map.getActivity_name() + "】——" + file.getFilename();
|
||||
|
||||
if (Lang.isNotEmpty(file)) {
|
||||
FileOutputStream outputStream = new FileOutputStream(tmpDir.getPath() + "/" + fileName);
|
||||
ftpService.download(file.getFilepath(), outputStream);
|
||||
outputStream.close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
String aimsDir = "zipTmp/" + R.UU32();
|
||||
String aimsName = year + "活动申报.zip";
|
||||
String aimsPath = aimsDir + "/" + aimsName;
|
||||
FileUtil.compressToZip(tmpDir.getPath(), aimsDir, aimsName);
|
||||
|
||||
response.setHeader("content-disposition", "attachment;filename="
|
||||
+ URLEncoder.encode(aimsName, "UTF-8"));
|
||||
|
||||
File aimsFile = new File(aimsPath);
|
||||
FileInputStream inputStream = new FileInputStream(aimsFile);
|
||||
org.apache.commons.io.IOUtils.copy(inputStream, response.getOutputStream());
|
||||
inputStream.close();
|
||||
aimsFile.delete();
|
||||
|
||||
FileUtil.deleteDir(new File(tmpPath));
|
||||
FileUtil.deleteDir(new File(aimsDir));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载名单
|
||||
|
||||
@@ -36,6 +36,12 @@ public class ActivityBx {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String mobile;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("申报(承办)单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 200)
|
||||
private String fundsUnitName;
|
||||
|
||||
@Column
|
||||
@Comment("申请时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
@@ -76,6 +82,21 @@ public class ActivityBx {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String activity_name;
|
||||
|
||||
@Column
|
||||
@Comment("活动计划结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String startPlannedDate;
|
||||
|
||||
@Column
|
||||
@Comment("活动计划结束时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String endPlannedDate;
|
||||
|
||||
@Column
|
||||
@Comment("活动项目类型")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String projectTypeCode;
|
||||
|
||||
@Column
|
||||
@Comment("活动id (未必有)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@@ -106,6 +127,11 @@ public class ActivityBx {
|
||||
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
|
||||
private Double activity_money;
|
||||
|
||||
@Column
|
||||
@Comment("申报金额")
|
||||
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
|
||||
private Double funds_money;
|
||||
|
||||
@Column
|
||||
@Comment("报销卡号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
@@ -271,6 +297,11 @@ public class ActivityBx {
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> files;
|
||||
|
||||
@Column
|
||||
@Comment("成果附件")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> resultsFiles;
|
||||
|
||||
@Column
|
||||
@Comment("附件数量")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package io.v.nutz.jf.service;
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseService;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.jf.model.ActivityBx;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
@@ -12,4 +13,6 @@ public interface ActivityBxService extends BaseService<ActivityBx> {
|
||||
void doAdd(ActivityBx activityBx);
|
||||
|
||||
void doEdit(ActivityBx activityBx);
|
||||
|
||||
NutMap queryOne(String id);
|
||||
}
|
||||
|
||||
@@ -1,13 +1,25 @@
|
||||
package io.v.nutz.jf.service.impl;
|
||||
|
||||
|
||||
import cn.wizzer.framework.base.service.BaseServiceImpl;
|
||||
import io.v.nutz.base.service.impl.BaseServiceImpl;
|
||||
import io.v.nutz.jf.model.ActivityBx;
|
||||
import io.v.nutz.jf.model.ActivityFile;
|
||||
import io.v.nutz.jf.service.ActivityBxService;
|
||||
import io.v.nutz.jf.service.ActivityFileService;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author zhf
|
||||
@@ -20,6 +32,8 @@ public class ActivityBxServiceImpl extends BaseServiceImpl<ActivityBx> implement
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Inject
|
||||
private ActivityFileService activityFileService;
|
||||
|
||||
@Override
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@@ -32,4 +46,66 @@ public class ActivityBxServiceImpl extends BaseServiceImpl<ActivityBx> implement
|
||||
public void doEdit(ActivityBx activityBx) {
|
||||
updateWith(activityBx, "goods");
|
||||
}
|
||||
|
||||
@Override
|
||||
public NutMap queryOne(String id) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
act.*,
|
||||
`user`.loginname,
|
||||
s.state_name,
|
||||
s.state_color,
|
||||
d_c.username dc_username,
|
||||
d_c.loginname dc_loginname,
|
||||
a.username a_username,
|
||||
a.loginname a_loginname,
|
||||
c_t.username ct_username,
|
||||
c_t.loginname ct_loginname,
|
||||
u_c.username uc_username,
|
||||
u_c.loginname uc_loginname,
|
||||
ucc_c.username ucc_username,
|
||||
ucc_c.loginname ucc_loginname,
|
||||
dc_s.`data` dc_s,
|
||||
a_s.`data` a_s,
|
||||
ct_s.`data` ct_s,
|
||||
uc_s.`data` uc_s,
|
||||
ucc_s.`data` ucc_s,
|
||||
us_s.`data` us_s
|
||||
FROM
|
||||
activity_bx act
|
||||
LEFT JOIN sys_user `user` ON act.user_id = `user`.id
|
||||
LEFT JOIN state s ON act.state_id = s.state_id
|
||||
LEFT JOIN sys_user d_c ON d_c.id = act.division_chairman_name
|
||||
LEFT JOIN sys_user a ON a.id = act.accounting_name
|
||||
LEFT JOIN sys_user c_t ON c_t.id = act.confirm_trade_name
|
||||
LEFT JOIN sys_user u_c ON u_c.id = act.union_cashier_name
|
||||
LEFT JOIN sys_user ucc_c ON ucc_c.id = act.union_chairman_name
|
||||
LEFT JOIN sys_signature dc_s ON dc_s.id = act.division_chairman
|
||||
LEFT JOIN sys_signature a_s ON a_s.id = act.accounting
|
||||
LEFT JOIN sys_signature ct_s ON ct_s.id = act.confirm_trade
|
||||
LEFT JOIN sys_signature uc_s ON uc_s.id = act.union_cashier
|
||||
LEFT JOIN sys_signature ucc_s ON ucc_s.id = act.union_chairman
|
||||
LEFT JOIN sys_signature us_s ON us_s.id = act.user_signature
|
||||
WHERE
|
||||
act.id = @id
|
||||
""").setParam("id", id);
|
||||
NutMap record = listMap(sql).get(0);
|
||||
record.setv("goods", dao().query("goods", Cnd.where("reid", "=", id)));
|
||||
|
||||
if (record.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
String activity_id = record.getString("activity_id");
|
||||
if (Strings.isNotBlank(activity_id)) {
|
||||
List<ActivityFile> files = activityFileService.query(Cnd.where("activity_id", "=", activity_id).desc("time"));
|
||||
LinkedHashMap<String, List<ActivityFile>> collect = files.stream().collect(Collectors.groupingBy(ActivityFile::getTime, LinkedHashMap::new, Collectors.toList()));
|
||||
|
||||
record.setv("activity_files", collect);
|
||||
}
|
||||
|
||||
return record;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -19,8 +19,48 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动时间">
|
||||
{{ viewData.activity_time }}
|
||||
<el-form-item label="联系方式">
|
||||
{{ viewData.mobile }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动主体类型">
|
||||
{{
|
||||
viewData.activity_type === 40002 ? "分工会活动" : viewData.activity_type === 40003 ?
|
||||
"协会(社团)活动" :
|
||||
"校工会活动"
|
||||
}}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动名称">
|
||||
{{ 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>
|
||||
|
||||
@@ -31,28 +71,22 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报销金额">
|
||||
{{ viewData.activity_money }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="报销卡号">
|
||||
{{ viewData.activity_card_number }}
|
||||
<el-form-item label="申报金额">
|
||||
{{ viewData.funds_money }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="活动地点">
|
||||
{{ viewData.venue }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备  注">
|
||||
<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>
|
||||
|
||||
|
||||
@@ -66,84 +100,74 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="物品名称" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品名称" v-model="row.name"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="物品价格" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品价格" v-model="row.price"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</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="签  字:">
|
||||
<el-image v-if="viewData.us_s"
|
||||
style="width: 300px; height: 100px"
|
||||
:src="viewData.us_s"
|
||||
fit="contain"></el-image>
|
||||
<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-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 label="附件" name="100">
|
||||
<el-form label-position="top">
|
||||
<!– <el-form-item label="活动资料" v-if="viewData.activity_id">
|
||||
<span v-if="!Object.keys(viewData.activity_files).length">暂无</span>
|
||||
<div class="block">
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="(v,k) in viewData.activity_files" :timestamp="k" placement="top"
|
||||
icon="el-icon-more"
|
||||
type="primary">
|
||||
<el-card v-for="file in v" style="margin-bottom: 20px;position: relative">
|
||||
<!-- <el-tab-pane label="附件" name="100">
|
||||
<el-form label-position="top">
|
||||
<!– <el-form-item label="活动资料" v-if="viewData.activity_id">
|
||||
<span v-if="!Object.keys(viewData.activity_files).length">暂无</span>
|
||||
<div class="block">
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="(v,k) in viewData.activity_files" :timestamp="k" placement="top"
|
||||
icon="el-icon-more"
|
||||
type="primary">
|
||||
<el-card v-for="file in v" style="margin-bottom: 20px;position: relative">
|
||||
|
||||
<div style="display: flex;flex-direction:row;">
|
||||
<h4>{{ file.name }} </h4>
|
||||
<h4><span style="font-size: 14px;color: rgb(200,200,200)">{{ file.type }}</span></h4>
|
||||
</div>
|
||||
<div style="display: flex;flex-direction:row;">
|
||||
<h4>{{ file.name }} </h4>
|
||||
<h4><span style="font-size: 14px;color: rgb(200,200,200)">{{ file.type }}</span></h4>
|
||||
</div>
|
||||
|
||||
<div style="margin: 20px 0">
|
||||
<file-upload :files="file.files"
|
||||
:view="true"></file-upload>
|
||||
</div>
|
||||
<div style="margin: 20px 0">
|
||||
<file-upload :files="file.files"
|
||||
:view="true"></file-upload>
|
||||
</div>
|
||||
|
||||
<div style="text-align: right" class="text-primary">{{ file.user_name }}</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</el-form-item>–>
|
||||
<div style="text-align: right" class="text-primary">{{ file.user_name }}</div>
|
||||
</el-card>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</el-form-item>–>
|
||||
|
||||
<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-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-form>
|
||||
</el-tab-pane>-->
|
||||
</el-form>
|
||||
</el-tab-pane>-->
|
||||
<el-tab-pane label="院级工会主席审核信息" name="2" v-if="hasPane(2)&&viewData.division_chairman_name">
|
||||
<el-form label-width="130px" style="padding: 20px 0">
|
||||
|
||||
@@ -196,7 +220,10 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.accounting_idea ? viewData.accounting_idea : '暂无' }}</div>
|
||||
<div class="textarea-div">{{
|
||||
viewData.accounting_idea ? viewData.accounting_idea : '暂无'
|
||||
}}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.a_s"
|
||||
@@ -226,7 +253,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.confirm_trade_idea ? viewData.confirm_trade_idea : '暂无' }}</div>
|
||||
<div class="textarea-div">
|
||||
{{ viewData.confirm_trade_idea ? viewData.confirm_trade_idea : '暂无' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.ct_s"
|
||||
@@ -256,7 +285,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}</div>
|
||||
<div class="textarea-div">
|
||||
{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.ucc_s"
|
||||
@@ -286,7 +317,9 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="审核意见:">
|
||||
<div class="textarea-div">{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}</div>
|
||||
<div class="textarea-div">
|
||||
{{ viewData.union_chairman_idea ? viewData.union_chairman_idea : '暂无' }}
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="签  字:">
|
||||
<el-image v-if="viewData.uc_s"
|
||||
@@ -345,11 +378,10 @@ module.exports = {
|
||||
const {data, code, msg} = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
this.loading = false
|
||||
if (data) {
|
||||
this.viewData.files = []
|
||||
console.log(data)
|
||||
this.activeName = this.handle ? "999" : "1"
|
||||
this.viewData = data
|
||||
this.viewData.files = JSON.parse(data.files)
|
||||
this.viewData.resultsFiles = JSON.parse(data.resultsFiles)
|
||||
this.viewData.goods = data.goods
|
||||
|
||||
} else {
|
||||
@@ -374,4 +406,4 @@ module.exports = {
|
||||
max-height: 100px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -90,12 +90,12 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="项目编号" prop="projectCode">
|
||||
<el-input disabled placeholder="选择活动类型自动生成"
|
||||
v-model="formData.projectCode"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="项目编号" prop="projectCode">
|
||||
<el-input disabled placeholder="选择活动类型自动生成"
|
||||
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%;"
|
||||
@@ -164,9 +164,9 @@ layout("/layouts/platform.html"){
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="活动地址" prop="address">
|
||||
<el-form-item label="活动地址" prop="venue">
|
||||
<el-input maxlength="50" placeholder="请填写活动地址" type="text"
|
||||
v-model="formData.address"></el-input>
|
||||
v-model="formData.venue"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -321,7 +321,7 @@ layout("/layouts/platform.html"){
|
||||
projectTypeCode: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
plannedDate: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
address: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
mobile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
}
|
||||
@@ -424,7 +424,7 @@ layout("/layouts/platform.html"){
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
const formData = JSON.parse(JSON.stringify(this.formData))
|
||||
const formData = clone(this.formData)
|
||||
const {plannedDate} = formData
|
||||
if (plannedDate && plannedDate.length) {
|
||||
formData.startPlannedDate = formData.plannedDate[0]
|
||||
@@ -432,19 +432,18 @@ layout("/layouts/platform.html"){
|
||||
formData.startTime = formData.plannedDate[0]
|
||||
formData.endTime = formData.plannedDate[1]
|
||||
formData.plannedDate = undefined
|
||||
|
||||
}
|
||||
const resp = await $.post("/platform/jf/activity_bx/apply/doAdd", {
|
||||
activityBx: JSON.stringify(formData),
|
||||
sign: this.formData.sign
|
||||
const url = "/platform/jf/activity_bx/apply"
|
||||
const resp = await $.post(url + (formData.id ? "/doEdit" : "/doAdd"), {
|
||||
activityBx: JSON.stringify(formData)
|
||||
})
|
||||
closeLoadingFunc(loading, resp, async () => {
|
||||
location.reload();
|
||||
}, (data, msg) => {
|
||||
this.$message.error(msg);
|
||||
})
|
||||
// 添加成功 跳转到申请记录页面
|
||||
//window.location.href = '/platform/jf/activity_bx/reimbursement'
|
||||
loading.close()
|
||||
if (resp.code === 0) {
|
||||
sublime.jumpPagePjax("/platform/jf/activity_bx/reimbursement")
|
||||
} else {
|
||||
this.$message.error(resp.msg);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -462,34 +461,40 @@ layout("/layouts/platform.html"){
|
||||
apply_time: moment().format('YYYY-MM-DD'),
|
||||
activity_card_number: '${@shiro.getPrincipalProperty("bank_number")}'
|
||||
}
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
this.projectType = await getActivityTwoLevelType("50000")
|
||||
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40002")
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40003")
|
||||
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40001")
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
}
|
||||
|
||||
if (this.formData.activity_type) {
|
||||
await this.getProjectCodeChange()
|
||||
}
|
||||
|
||||
},
|
||||
findOne(id){
|
||||
async findOne(id) {
|
||||
const resp = await $.get("/platform/jf/activity_bx/reimbursement/findOne", {id})
|
||||
|
||||
if (resp.code === 0) {
|
||||
resp.data.activity_type = resp.data.activity_type + ""
|
||||
resp.data.plannedDate = [resp.data.startPlannedDate, resp.data.endPlannedDate]
|
||||
this.formData = resp.data
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.activityType = await getActivityTwoLevelType("40000")
|
||||
this.projectType = await getActivityTwoLevelType("50000")
|
||||
const id = GetQueryString("id")
|
||||
if (id){
|
||||
if (id) {
|
||||
this.findOne(id)
|
||||
}else{
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
|
||||
if ("${@shiro.hasRole('H04')&&!(@shiro.hasRole('A06')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40002")
|
||||
this.$set(this.formData, "fundsUnitName", '${@shiro.getPrincipalProperty("union").getUnionname()}')
|
||||
} else if ("${@shiro.hasRole('H02')&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('A06'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40003")
|
||||
} else if ("${(@shiro.hasRole('xghng')||@shiro.hasRole('H10'))&&!(@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')||@shiro.hasRole('H02'))}" === 'true') {
|
||||
this.$set(this.formData, "activity_type", "40001")
|
||||
this.$set(this.formData, "fundsUnitName", '校工会')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -9,25 +9,28 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<search :page_form.sync="pageForm" @search="doSearch" :has_sh="true">
|
||||
<search :has_sh="true" :page_form.sync="pageForm" @search="doSearch">
|
||||
<template #column>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
<el-select @change="flushUnits" @clear="flushUnits"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select clearable="true" filterable="true" placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
@@ -35,8 +38,9 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</search>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -44,52 +48,57 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" prop="activity_name" header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name">
|
||||
<template scope="scope">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(社团)活动" :
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(社团)活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动项目类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" header-align="center" label="申请类型" prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
@@ -97,7 +106,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -109,8 +118,8 @@ layout("/layouts/platform.html"){
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item v-if="[1020].includes(row.state_id)"
|
||||
:command="{type:'primary',data:row}">
|
||||
<el-dropdown-item :command="{type:'primary',data:row}"
|
||||
v-if="[1020].includes(row.state_id)">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
|
||||
@@ -128,84 +137,91 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<activity-bx-info ref="act_info2" :handle="true" label="校工会负责人审核" :panes="[2,3]">
|
||||
<activity-bx-info handle label="校工会负责人审核" ref="act_info2">
|
||||
<template #handle>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<el-form-item label="审核信息 " label-width="135px" class="view-header">
|
||||
<el-form :model="formData" :rules="formRules" label-position="right"
|
||||
label-width="120px"
|
||||
ref="form"
|
||||
style="padding: 20px 0">
|
||||
<el-form-item class="view-header" label="审核信息 " label-width="135px">
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="20">
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="username" label="审核人">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
<el-form-item label="审核人" prop="username">
|
||||
<el-input disabled
|
||||
v-model="formData.username"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="time" label="审核时间">
|
||||
<el-input v-model="formData.time" disabled></el-input>
|
||||
<el-form-item label="审核时间" prop="time">
|
||||
<el-input disabled v-model="formData.time"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="time" label="实际总费用">
|
||||
<el-input v-model="formData.activity_money" disabled
|
||||
placeholder="根据实际物品费用自动计算"></el-input>
|
||||
<el-form-item label="实际总费用" prop="time">
|
||||
<el-input disabled placeholder="根据实际物品费用自动计算"
|
||||
v-model="formData.activity_money"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24">
|
||||
<!-- <el-col :span="24">
|
||||
|
||||
<el-form-item label="购置物品及价格">
|
||||
<el-table :data="formData.goods" border size="mini" style="width: 100%">
|
||||
<el-form-item label="购置物品及价格">
|
||||
<el-table :data="formData.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">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="物品名称" disabled v-model="row.name"
|
||||
type="text"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="预算费用" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="预算费用" disabled v-model="row.price"
|
||||
type="number"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="actualPrice" label="实际费用" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="实际费用"
|
||||
v-model="row.actualPrice"
|
||||
:disabled="formData.apply_type==2"
|
||||
type="number" @input="blur"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="notes" label="说明" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="说明"
|
||||
v-model="row.notes"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<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 disabled 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 disabled maxlength="50" placeholder="预算费用"
|
||||
type="number"
|
||||
v-model="row.price"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center"
|
||||
label="实际费用"
|
||||
prop="actualPrice">
|
||||
<template slot-scope="{row}">
|
||||
<el-input :disabled="formData.apply_type==2" @input="blur"
|
||||
maxlength="50"
|
||||
placeholder="实际费用"
|
||||
type="number" v-model="row.actualPrice"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!– <el-table-column prop="notes" label="说明" align="center"
|
||||
header-align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-input maxlength="50" placeholder="说明"
|
||||
v-model="row.notes"></el-input>
|
||||
</template>
|
||||
</el-table-column>–>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="idea" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.idea" rows="4" maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
<el-form-item label="审核意见" prop="idea">
|
||||
<el-input maxlength="500" placeholder="请填写您的审核意见" rows="4"
|
||||
type="textarea"
|
||||
v-model="formData.idea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item prop="sign" label="签  字">
|
||||
<sign prefix="medicalAid" :qz.sync="formData.sign"></sign>
|
||||
<el-form-item label="签  字" prop="sign">
|
||||
<sign :qz.sync="formData.sign" prefix="medicalAid"></sign>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -213,10 +229,12 @@ layout("/layouts/platform.html"){
|
||||
</el-form>
|
||||
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button type="danger" @click="doReview(false)" :disabled="subDis" :loading="subLoading1">拒
|
||||
绝
|
||||
<el-button :disabled="subDis" :loading="subLoading1"
|
||||
@click="doReview(false)"
|
||||
type="danger">退 回
|
||||
</el-button>
|
||||
<el-button type="success" @click="doReview(true)" :disabled="subDis" :loading="subLoading2">通
|
||||
<el-button :disabled="subDis" :loading="subLoading2" @click="doReview(true)"
|
||||
type="success">通
|
||||
过
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -258,7 +276,7 @@ layout("/layouts/platform.html"){
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -282,19 +300,30 @@ layout("/layouts/platform.html"){
|
||||
async doReview(flag) {
|
||||
this.$refs["form"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const resp = await $.post(location.href + "/doReview", {data: JSON.stringify(this.formData)})
|
||||
requestLaterMsgFun(vue, resp, null, null, (v) => {
|
||||
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
const confirm = await this.$confirm('确定要提交审核?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
this.formData.flag = flag
|
||||
this.subDis = true
|
||||
flag ? this.subLoading2 = true : this.subLoading1 = true
|
||||
const formData = clone(this.formData)
|
||||
formData.goods = JSON.stringify(formData.goods)
|
||||
const resp = await $.post(loc() + "/doReview", formData)
|
||||
requestLaterMsgFun(vue, resp, null, null, (v) => {
|
||||
|
||||
this.subDis = false
|
||||
this.subLoading1 = false
|
||||
this.subLoading2 = false
|
||||
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -303,7 +332,6 @@ layout("/layouts/platform.html"){
|
||||
this.formData = {
|
||||
goods: []
|
||||
}
|
||||
console.log(row)
|
||||
this.$set(row, "reviewLoading", true)
|
||||
this.formData = {
|
||||
id,
|
||||
@@ -313,15 +341,13 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
this.$set(row, "reviewLoading", false)
|
||||
this.$refs.act_info2.getActInfo(id)
|
||||
const goods = await $.get(loc() + "/getGoods", {activity_id: activity_id})
|
||||
if (apply_type == 2) {
|
||||
let a = 0
|
||||
goods.data.forEach(v => {
|
||||
v.actualPrice = v.price
|
||||
a += v.price
|
||||
})
|
||||
this.$set(this.formData, "activity_money", a)
|
||||
}
|
||||
const goods = await $.get(loc() + "/getGoods", {id: id})
|
||||
let a = 0
|
||||
goods.data.forEach(v => {
|
||||
v.actualPrice = v.price
|
||||
a += v.price
|
||||
})
|
||||
this.$set(this.formData, "activity_money", a)
|
||||
this.$set(this.formData, "goods", goods.data)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
@@ -351,4 +377,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -98,15 +98,16 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请类型" prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" header-align="center" label="申请类型" prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
|
||||
<el-table-column align="center" header-align="center" label="申请时间" prop="apply_time"
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
|
||||
@@ -137,16 +138,21 @@ layout("/layouts/platform.html"){
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'edit',data:row}"
|
||||
v-if="[1020].includes(row.state_id)">
|
||||
v-if="[1020,1025].includes(row.state_id)">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'uploadResults',data:row}"
|
||||
v-if="[1030].includes(row.state_id)">
|
||||
上传成果
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
v-if="[1020].includes(row.state_id)">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'exportWwj',data:row,apply_type:1}"
|
||||
v-if="row.state_id==1060&&row.apply_type!=2">
|
||||
<el-dropdown-item
|
||||
:command="{type:'exportWwj',data:row,apply_type:1}"
|
||||
v-if="row.state_id==1060&&row.apply_type!=2">
|
||||
导出申请表
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item v-if="[1060].includes(row.state_id)"
|
||||
@@ -154,10 +160,10 @@ layout("/layouts/platform.html"){
|
||||
导出报销表
|
||||
</el-dropdown-item>-->
|
||||
<!--# if(@shiro.hasRole('sysadmin')){ #-->
|
||||
<el-dropdown-item :command="{type:'edit',data:row}"
|
||||
v-if="![1020].includes(row.state_id)">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item :command="{type:'edit',data:row}"
|
||||
v-if="![1020].includes(row.state_id)">
|
||||
编辑
|
||||
</el-dropdown-item>-->
|
||||
<el-dropdown-item :command="{type:'delete',data:row}"
|
||||
v-if="![1020].includes(row.state_id)">
|
||||
删除
|
||||
@@ -256,7 +262,8 @@ layout("/layouts/platform.html"){
|
||||
<el-date-picker disabled
|
||||
placeholder="活动时间"
|
||||
style="width: 100%" type="date"
|
||||
v-model="formData.activity_time" value-format="yyyy-MM-dd">
|
||||
v-model="formData.activity_time"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -339,7 +346,8 @@ layout("/layouts/platform.html"){
|
||||
label="操作"
|
||||
width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="formData.goods.length==0" @click="delNotesItem(scope)" circle
|
||||
<el-button :disabled="formData.goods.length==0"
|
||||
@click="delNotesItem(scope)" circle
|
||||
icon="el-icon-delete"
|
||||
type="danger"></el-button>
|
||||
</template>
|
||||
@@ -383,6 +391,17 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
title="成果提交"
|
||||
width="30%">
|
||||
<file-upload :files.sync="formData.files" card></file-upload>
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button @click="uploadResults" type="primary">提交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -422,14 +441,15 @@ layout("/layouts/platform.html"){
|
||||
activity_type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_content: [{validator: validAc, trigger: ['blur', 'change']}],
|
||||
},
|
||||
activity: []
|
||||
activity: [],
|
||||
dialogVisible: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0')
|
||||
},
|
||||
methods: {
|
||||
@@ -439,15 +459,48 @@ layout("/layouts/platform.html"){
|
||||
this.openView(data)
|
||||
} else if (type == 'edit') {
|
||||
this.openEdit(data)
|
||||
} else if (type == 'uploadResults') {
|
||||
this.openUploadResults(data)
|
||||
} else if (type == 'delete') {
|
||||
this.doDelete(data)
|
||||
} else if (type == 'exportWwj') {
|
||||
this.exportWwj(data, apply_type)
|
||||
}
|
||||
},
|
||||
async uploadResults() {
|
||||
if (!this.formData.files || this.formData.files.length === 0) {
|
||||
this.$message.error("请上传成果后在提交");
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm("确定要提交成果吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post("/platform/jf/activity_bx/reimbursement/doEdit", {
|
||||
files: JSON.stringify(this.formData.files),
|
||||
id: this.formData.id
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$message({
|
||||
message: resp.msg,
|
||||
type: 'success'
|
||||
});
|
||||
this.doSearch()
|
||||
this.dialogVisible = false
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
openUploadResults(data) {
|
||||
this.formData = data
|
||||
|
||||
this.dialogVisible = true
|
||||
},
|
||||
exportWwj(row, apply_type) {
|
||||
const {id, activity_id, activity_type, otherFiles, photoFiles, billFiles} = row
|
||||
let filesName = null
|
||||
/*let filesName = null
|
||||
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
|
||||
|
||||
if (filesName != null) {
|
||||
@@ -470,7 +523,8 @@ layout("/layouts/platform.html"){
|
||||
} else {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
|
||||
}
|
||||
}
|
||||
}*/
|
||||
window.open("/platform/jf/activity_bx/reimbursementview/doExport?id=" + id)
|
||||
},
|
||||
blur() {
|
||||
let num = 0
|
||||
|
||||
@@ -9,38 +9,40 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 150px"
|
||||
placeholder="选择年">
|
||||
placeholder="选择年"
|
||||
style="width: 150px"
|
||||
type="year" v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<!--分工会查询-->
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
||||
clearable="true"
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
|
||||
filterable="true"
|
||||
placeholder="所属工会" style="width: 100%;"
|
||||
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
||||
|
||||
filterable="true">
|
||||
<el-option v-for="item in unions" :label="item.unionname" :value="item.id"></el-option>
|
||||
v-model="pageForm.unionId">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
||||
clearable="true"
|
||||
filterable="true">
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
||||
<el-select clearable="true" filterable="true" placeholder="所属单位"
|
||||
style="width: 100%;"
|
||||
v-model="pageForm.unitId">
|
||||
<el-option :label="item.name" :value="item.id"
|
||||
v-for="item in units"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="$emit('search')">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;">
|
||||
<el-input @keyup.enter.native="$emit('search')" clearable placeholder="请输入内容"
|
||||
v-model="pageForm.searchKeyword">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 120px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="姓名" value="username"></el-option>
|
||||
<el-option label="工号" value="loginname"></el-option>
|
||||
<el-option label="活动名称" value="activity_name"></el-option>
|
||||
@@ -48,18 +50,23 @@ layout("/layouts/platform.html"){
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button icon="el-icon-download" @click="download">导出名单</i>
|
||||
<el-button @click="downloadResults" icon="el-icon-download">下载全部成果</i>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- <div class="pull-right offscreen-right">
|
||||
<el-button @click="download" icon="el-icon-download">导出名单</i>
|
||||
</el-button>
|
||||
</div>-->
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" row-key="id"
|
||||
style="width: 100%"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
@@ -67,51 +74,58 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动名称" prop="activity_name" show-overflow-tooltip header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="活动名称"
|
||||
prop="activity_name"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
<el-link type="primary" @click="openView(scope.row)">
|
||||
<el-link @click="openView(scope.row)" type="primary">
|
||||
{{scope.row.activity_name}}
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请人姓名" prop="user_name" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请人姓名"
|
||||
prop="user_name"></el-table-column>
|
||||
|
||||
<el-table-column label="工号" prop="bxr_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="工号"
|
||||
prop="bxr_loginname"></el-table-column>
|
||||
|
||||
<el-table-column label="所属工会" prop="bxr_unionname" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="所属工会"
|
||||
prop="bxr_unionname"
|
||||
sortable></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="活动主体类型" prop="activity_type" header-align="center" align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动主体类型"
|
||||
prop="activity_type" sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ? "协会(社团)活动" :
|
||||
{{ row.activity_type == 40002 ? "分工会活动" : row.activity_type == 40003 ?
|
||||
"协会(社团)活动" :
|
||||
"校工会活动"}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="活动项目类型" prop="absName" header-align="center"
|
||||
align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="活动项目类型"
|
||||
prop="absName" sortable>
|
||||
<template slot-scope="{row}">
|
||||
{{row.absName}}({{row.projectTypeCode}})
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="申请类型" prop="apply_type" header-align="center" sortable
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="申请类型"
|
||||
prop="apply_type"
|
||||
sortable>
|
||||
<template scope="{row}">
|
||||
{{ row.apply_type == 1 ? "经费申报" : "报销申请" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="申请时间"
|
||||
prop="apply_time"
|
||||
sortable></el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="state_id" header-align="center" label="申请状态" sortable>
|
||||
<el-table-column align="center" header-align="center" label="申请状态"
|
||||
prop="state_id" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
@@ -119,7 +133,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
<!--下拉操作按钮-->
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right"
|
||||
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
||||
width="120px">
|
||||
<template slot-scope="{row}">
|
||||
<el-dropdown @command="dropdownCommand">
|
||||
@@ -131,14 +145,14 @@ layout("/layouts/platform.html"){
|
||||
<el-dropdown-item :command="{type:'view',data:row}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<!--<el-dropdown-item v-if="row.state_id==1060&&row.apply_type!=2"
|
||||
:command="{type:'exportWwj',data:row}">
|
||||
<el-dropdown-item :command="{type:'exportWwj',data:row}"
|
||||
v-if="row.state_id==1060&&row.apply_type!=2">
|
||||
导出申请表
|
||||
</el-dropdown-item>-->
|
||||
<el-dropdown-item v-if="1060==row.state_id"
|
||||
:command="{type:'exportWwj',data:row}">
|
||||
导出报销表
|
||||
</el-dropdown-item>
|
||||
<!-- <el-dropdown-item v-if="1060==row.state_id"
|
||||
:command="{type:'exportWwj',data:row}">
|
||||
导出报销表
|
||||
</el-dropdown-item>-->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -175,7 +189,11 @@ layout("/layouts/platform.html"){
|
||||
activity_number: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_time: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
venue: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_content: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
activity_content: [{
|
||||
required: true,
|
||||
message: '必填',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
@@ -185,7 +203,7 @@ layout("/layouts/platform.html"){
|
||||
'search': httpVueLoader('/components/activityBx/ActivityBxSearch.vue'),
|
||||
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
||||
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
|
||||
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand(command) {
|
||||
@@ -197,34 +215,42 @@ layout("/layouts/platform.html"){
|
||||
this.exportWwj(data)
|
||||
}
|
||||
},
|
||||
downloadResults() {
|
||||
if (!(this.pageForm.year && this.pageForm.year.length)) {
|
||||
this.$message.error("请选择日期");
|
||||
return
|
||||
}
|
||||
window.open("/platform/jf/activity_bx/reimbursementview/downloadResults?year=" + this.pageForm.year)
|
||||
},
|
||||
exportWwj(row) {
|
||||
const {id, apply_type, activity_type, otherFiles, photoFiles, billFiles} = row
|
||||
|
||||
let filesName = null
|
||||
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
|
||||
/* let filesName = null
|
||||
if (billFiles == undefined || JSON.parse(billFiles).length == 0) filesName = "发票"
|
||||
|
||||
if (filesName != null) {
|
||||
this.$confirm('您没有上传' + filesName + '是否需要去上传', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let activityType = ""
|
||||
if (activity_type == 40001) activityType = "/school?id="
|
||||
if (activity_type == 40002) activityType = "/union?id="
|
||||
if (activity_type == 40003) activityType = "/club?id="
|
||||
window.location.href = "/platform/activity/apply" + activityType + activity_id
|
||||
if (filesName != null) {
|
||||
this.$confirm('您没有上传' + filesName + '是否需要去上传', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
let activityType = ""
|
||||
if (activity_type == 40001) activityType = "/school?id="
|
||||
if (activity_type == 40002) activityType = "/union?id="
|
||||
if (activity_type == 40003) activityType = "/club?id="
|
||||
window.location.href = "/platform/activity/apply" + activityType + activity_id
|
||||
|
||||
}).catch(() => {
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
} else {
|
||||
if (apply_type == 2) {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
|
||||
} else {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (apply_type == 2) {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursement/doExport?id=" + id
|
||||
} else {
|
||||
window.location.href = "/platform/jf/activity_bx/reimbursementview/doExport?id=" + id
|
||||
}
|
||||
}*/
|
||||
window.open("/platform/jf/activity_bx/reimbursementview/doExport?id=" + id)
|
||||
},
|
||||
download() {
|
||||
if (!(this.pageForm.year && this.pageForm.year.length)) {
|
||||
|
||||
Reference in New Issue
Block a user