commit
This commit is contained in:
+20
-4
@@ -1,6 +1,7 @@
|
||||
package io.v.nutz.sys.controllers.platform.sys.club.manage;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.policy.HackLoopTableRenderPolicy;
|
||||
@@ -12,10 +13,7 @@ import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.model.Audit;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.sys.constant.club.ClubRegistAuditState;
|
||||
import io.v.nutz.sys.models.Sys_club;
|
||||
import io.v.nutz.sys.models.Sys_club_user;
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import io.v.nutz.sys.models.Sys_user_role;
|
||||
import io.v.nutz.sys.models.*;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
@@ -227,6 +225,24 @@ public class ClubInfoManageController {
|
||||
XWPFTemplate.compile(officeTemplateUtil.getPath("clubUserApply"), Configure.builder().build()).render(map).writeAndClose(response.getOutputStream());
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("sys.club.clubInfoManage")
|
||||
public Object onBelongUnion(String id, String belongUnionId) {
|
||||
Sys_club club = dao.fetch(Sys_club.class, id);
|
||||
if(club == null) {
|
||||
return Result.error("协会信息为空");
|
||||
}
|
||||
if(StrUtil.isBlank(belongUnionId)) {
|
||||
return Result.error("挂靠分工会信息为空");
|
||||
}
|
||||
Sys_union union = dao.fetch(Sys_union.class, belongUnionId);
|
||||
club.setBelongUnionId(belongUnionId);
|
||||
club.setBelongUnionName(union.getUnionname());
|
||||
dao.update(club);
|
||||
return null;
|
||||
}
|
||||
|
||||
private String getRoleId(int sf) {
|
||||
if(sf == 1) {
|
||||
return Roles.club01;
|
||||
|
||||
@@ -183,4 +183,14 @@ public class Sys_club {
|
||||
@Comment("归属分工会名称(如果是基层单位申请的协会)")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String unionName;
|
||||
|
||||
@Column
|
||||
@Comment("挂靠分工会")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String belongUnionId;
|
||||
|
||||
@Column
|
||||
@Comment("挂靠分工会名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String belongUnionName;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package io.v.nutz.zhgh.zc.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.service.ViService;
|
||||
import io.v.nutz.zhgh.zc.model.ZcPdPlan;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @ClassName ZcDjPlanController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2024/2/27 14:13
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/platform/zcgl/zcdj/plan")
|
||||
public class ZcPdPlanController {
|
||||
|
||||
@Inject("ZcPdPlan")
|
||||
private ViService<ZcPdPlan> viService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zcgl/zcPdPlan.html")
|
||||
@RequiresPermissions("zc.pdPlan")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object pageData(PageForm page, String year) {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.andEX("year", "=", year);
|
||||
cnd.asc("startDate");
|
||||
return viService.list(page, cnd);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object doSubmit(ZcPdPlan zcPdPlan) {
|
||||
zcPdPlan.setCreateDate(DateUtil.now());
|
||||
viService.insertOrUpdate(zcPdPlan);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
public Object doDelete(String id) {
|
||||
viService.delete(id);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -10,21 +10,25 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.ViTool;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.services.SysUnionService;
|
||||
import io.v.nutz.sys.services.SysUserService;
|
||||
import io.v.nutz.base.utils.ViTool;
|
||||
import io.v.nutz.zhgh.zc.model.Zgfw_Zcxx;
|
||||
import io.v.nutz.zhgh.zc.model.zcDepreciationRecord;
|
||||
import io.v.nutz.zhgh.zc.model.zgfwZclb;
|
||||
import io.v.nutz.zhgh.zc.service.ZgfwZcxxService;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
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.json.Json;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
@@ -36,11 +40,8 @@ import org.nutz.mvc.upload.UploadAdaptor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
import java.time.ZoneId;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -141,23 +142,39 @@ public class ZgfwAddZcxxController {
|
||||
|
||||
@At("/doSubmit")
|
||||
@Ok("json")
|
||||
@ViReturn
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doSubmit(Zgfw_Zcxx zcxx) {
|
||||
try {
|
||||
|
||||
LocalDate rkLocalDate = zcxx.getDepreciationDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
Period period = Period.between(LocalDate.now(), rkLocalDate);
|
||||
|
||||
int year = Calendar.getInstance().get(Calendar.YEAR);
|
||||
if (StrUtil.isBlank(zcxx.getZcbh())) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT count(1) FROM `zgfw_zcxx` where LEFT(zcbh,4) = @year and LENGTH(zcbh) = 8
|
||||
""").setParam("year", year);
|
||||
int count = zgfwZcxxService.count(sql);
|
||||
String bh = String.format("%04d", count + 1);
|
||||
zcxx.setZcbh(year + bh);
|
||||
}
|
||||
zgfwZcxxService.insert(zcxx);
|
||||
if (period.getYears() * 12 + period.getMonths() >= 0) {
|
||||
// LocalDate rkLocalDate = zcxx.getDepreciationDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
// Period period = Period.between(LocalDate.now(), rkLocalDate);
|
||||
|
||||
if (StrUtil.isBlank(zcxx.getZcbh())) {
|
||||
zcxx.setZcbh(getZcbh(zcxx));
|
||||
}
|
||||
zgfwZcxxService.insert(zcxx);
|
||||
/* if (period.getYears() * 12 + period.getMonths() >= 0) {
|
||||
zcDepreciationRecord record = new zcDepreciationRecord();
|
||||
record.setZcid(zcxx.getZcid());
|
||||
record.setOperationTime(DateUtil.now());
|
||||
record.setDepreciationDate(zcxx.getDepreciationDate());
|
||||
record.setSurplus(Math.max(period.getYears() * 12 + period.getMonths(), 0));
|
||||
zgfwZcxxService.insert(record);
|
||||
}*/
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@ViReturn
|
||||
public Object doEdit(Zgfw_Zcxx zcxx, HttpSession session) {
|
||||
// LocalDate rkLocalDate = zcxx.getDepreciationDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
// Period period = Period.between(LocalDate.now(), rkLocalDate);
|
||||
// Zgfw_Zcxx fetch = zgfwZcxxService.fetch(Cnd.where("zcid", "=", zcxx.getZcid()));
|
||||
/* if (period.getYears() * 12 + period.getMonths() >= 0) {
|
||||
if (fetch.getDepreciationDate() == null || !fetch.getDepreciationDate().equals(zcxx.getDepreciationDate())) {
|
||||
zgfwZcxxService.dao().clear(zcDepreciationRecord.class, Cnd.where("zcid", "=", zcxx.getZcid()));
|
||||
zcDepreciationRecord record = new zcDepreciationRecord();
|
||||
record.setZcid(zcxx.getZcid());
|
||||
record.setOperationTime(DateUtil.now());
|
||||
@@ -165,46 +182,14 @@ public class ZgfwAddZcxxController {
|
||||
record.setSurplus(Math.max(period.getYears() * 12 + period.getMonths(), 0));
|
||||
zgfwZcxxService.insert(record);
|
||||
}
|
||||
return Result.success().addMsg("添加成功");
|
||||
} catch (Exception e) {
|
||||
return Result.error();
|
||||
}
|
||||
*/
|
||||
zgfwZcxxService.updateIgnoreNull(zcxx);
|
||||
session.removeAttribute("id");
|
||||
return Result.success().addMsg("修改成功");
|
||||
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
public Object doEdit(Zgfw_Zcxx zcxx, HttpSession session) {
|
||||
try {
|
||||
LocalDate rkLocalDate = zcxx.getDepreciationDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
||||
Period period = Period.between(LocalDate.now(), rkLocalDate);
|
||||
Zgfw_Zcxx fetch = zgfwZcxxService.fetch(Cnd.where("zcid", "=", zcxx.getZcid()));
|
||||
if (period.getYears() * 12 + period.getMonths() >= 0) {
|
||||
if (fetch.getDepreciationDate() == null || !fetch.getDepreciationDate().equals(zcxx.getDepreciationDate())) {
|
||||
zgfwZcxxService.dao().clear(zcDepreciationRecord.class, Cnd.where("zcid", "=", zcxx.getZcid()));
|
||||
zcDepreciationRecord record = new zcDepreciationRecord();
|
||||
record.setZcid(zcxx.getZcid());
|
||||
record.setOperationTime(DateUtil.now());
|
||||
record.setDepreciationDate(zcxx.getDepreciationDate());
|
||||
record.setSurplus(Math.max(period.getYears() * 12 + period.getMonths(), 0));
|
||||
zgfwZcxxService.insert(record);
|
||||
}
|
||||
}
|
||||
|
||||
zgfwZcxxService.updateIgnoreNull(zcxx);
|
||||
session.removeAttribute("id");
|
||||
|
||||
return Result.success().addMsg("修改成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载模板
|
||||
*
|
||||
* @param response
|
||||
*/
|
||||
@At("/downLoadTemp")
|
||||
@Ok("void")
|
||||
public void downLoadTemp(HttpServletResponse response) {
|
||||
@@ -212,30 +197,102 @@ public class ZgfwAddZcxxController {
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
List<Zgfw_Zcxx> list = new ArrayList<>();
|
||||
list.add(Zgfw_Zcxx.getDefault());
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, Zgfw_Zcxx.class, list);
|
||||
ViTool.excelResponse(response, "固定资产模板.xlsx");
|
||||
workbook.write(response.getOutputStream());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@ViReturn
|
||||
public Object doExcelSubmit(@Param(value = "data", required = false) Zgfw_Zcxx[] zxccList) {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public Object doExcelSubmit(String data) {
|
||||
int i = 1;
|
||||
List<String> insertid = new ArrayList<>();
|
||||
try {
|
||||
List<Zgfw_Zcxx> zgfw_zcxxes = Json.fromJsonAsList(Zgfw_Zcxx.class, data);
|
||||
for (Zgfw_Zcxx zgfw_zcxx : zgfw_zcxxes) {
|
||||
zgfw_zcxx.setZcghlx(zgfw_zcxx.getZcghlx().equalsIgnoreCase("校工会") ? "2" : "1");
|
||||
String zcid = zgfwZcxxService.insert(zgfw_zcxx).getZcid();
|
||||
insertid.add(zcid);
|
||||
i++;
|
||||
}
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
for (String id : insertid) {
|
||||
zgfwZcxxService.clear(Cnd.where("zcid", "=", id));
|
||||
}
|
||||
return Result.error().addMsg("导入失败,请检查第" + i + "行的数据!");
|
||||
}
|
||||
}
|
||||
|
||||
zgfwZcxxService.doAddByExcelImport(zxccList);
|
||||
/**
|
||||
* @param zcxx
|
||||
* @return java.lang.String
|
||||
* @author zhf
|
||||
* @description GH为工会的首字母大写方式
|
||||
* 00为校工会
|
||||
* 01为航空学院工会(其他院级工会编号见附表)
|
||||
* Z为专用设备首字母大写方式
|
||||
* T为通用设备首字母大写方式
|
||||
* J为家具设备首字母大写方式
|
||||
* 202203为设备编号年月
|
||||
* 001为设备的数字编号
|
||||
*/
|
||||
public String getZcbh(Zgfw_Zcxx zcxx) {
|
||||
String one = "GH";
|
||||
String two = "";
|
||||
String three = "";
|
||||
String four = "";
|
||||
String five = "";
|
||||
|
||||
String zcghlx = zcxx.getZcghlx();
|
||||
if (zcghlx.equals("1")) {
|
||||
if (Lang.isNotEmpty(zcxx.getZclydwh())) {
|
||||
Sys_union union = zgfwZcxxService.dao().fetch(Sys_union.class, Cnd.where("unionname", "=", zcxx.getZclydwh()));
|
||||
two = union.getUnioncode();
|
||||
}
|
||||
} else {
|
||||
two = "00";
|
||||
}
|
||||
|
||||
zgfwZclb zclb = zgfwZcxxService.dao().fetch(zgfwZclb.class, Cnd.where("contentCode", "=", zcxx.getContentCode()));
|
||||
if (Lang.isNotEmpty(zclb)) {
|
||||
if (zclb.getCategory().equals("专用设备")) {
|
||||
three = "Z";
|
||||
} else if (zclb.getCategory().equals("通用设备")) {
|
||||
three = "T";
|
||||
} else if (zclb.getCategory().equals("家具设备")) {
|
||||
three = "J";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
four = DateUtil.format(new Date(), "yyyyMM");
|
||||
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM
|
||||
`zgfw_zcxx`
|
||||
WHERE
|
||||
YEAR(zcgzrq) = @zcgzrq_ny
|
||||
AND zcbh LIKE @zcbhCode
|
||||
""").setParam("zcgzrq_ny", DateUtil.thisYear()).setParam("zcbhCode", "%" + three + "%");
|
||||
int count = zgfwZcxxService.count(sql);
|
||||
five = String.format("%03d", count + 1);
|
||||
|
||||
if (StrUtil.isNotBlank(two) && StrUtil.isNotBlank(three) && StrUtil.isNotBlank(four) && StrUtil.isNotBlank(five)) {
|
||||
return one + two + "-" + three + "-" + four + "-" + five;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@At("/readExcelTable")
|
||||
@Ok("json:full")
|
||||
@ViReturn
|
||||
public Object readExcelTable(@Param(value = "zxccList", required = false) Zgfw_Zcxx[] zxccList) {
|
||||
return zgfwZcxxService.matchUserId(zxccList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,33 +1,56 @@
|
||||
package io.v.nutz.zhgh.zc.controller;
|
||||
|
||||
|
||||
import cn.afterturn.easypoi.entity.ImageEntity;
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.base.utils.ViTool;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
import io.v.nutz.sys.services.SysUserService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.zc.model.ZcPdPlan;
|
||||
import io.v.nutz.zhgh.zc.model.Zgfw_Zcxx;
|
||||
import io.v.nutz.zhgh.zc.model.Zgfw_Zcxx_bdxx;
|
||||
import io.v.nutz.zhgh.zc.service.ZgfwZcxxBdService;
|
||||
import io.v.nutz.zhgh.zc.service.ZgfwZcxxService;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.boot.starter.ftp.FtpService;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
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.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.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资产变更
|
||||
@@ -43,6 +66,8 @@ public class ZgfwGdzcbgController {
|
||||
|
||||
@Inject
|
||||
private SysUserService sysUserService;
|
||||
@Inject
|
||||
private FtpService ftpService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zcgl/gdzcbg.html")
|
||||
@@ -53,39 +78,53 @@ public class ZgfwGdzcbgController {
|
||||
|
||||
@At("/data")
|
||||
@Ok("json")
|
||||
@ViReturn
|
||||
@RequiresPermissions("zc.bg")
|
||||
public Object data(@Param("pageNumber") Integer pageNumber, @Param("pageSize") Integer pageSize, @Param("searchName") String searchName, @Param("searchKeyword") String searchKeyword,
|
||||
@Param(value = "zcghlx", required = false) String zcghlx,
|
||||
@Param(value = "zcgzrq", required = false) String zcgzrq,
|
||||
@Param(value = "zclydwh", required = false) String zclydwh,
|
||||
@Param(value = "zcrksj", required = false) String zcrksj, String pageOrderName, String pageOrderBy) {
|
||||
public Object data(PageForm page,
|
||||
Integer isPd,
|
||||
String zcpdid,
|
||||
String zcghlx,
|
||||
String unionid,
|
||||
String zcgzrq, String zclydwh, String zcrksj) {
|
||||
try {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
zc.*,
|
||||
lyrur.username lyr,
|
||||
jsrur.username jsr,
|
||||
ut.unionname
|
||||
ut.unionname,
|
||||
bd.zcbdid,
|
||||
COUNT(bd.zcid) AS isPd
|
||||
FROM
|
||||
zgfw_zcxx zc
|
||||
LEFT JOIN zgfw_zcxx_bdxx bd ON bd.pdPlanId=@zcpdid and bd.zcid = zc.zcid
|
||||
LEFT JOIN sys_user lyrur ON zc.zclyrid = lyrur.id
|
||||
LEFT JOIN sys_user jsrur ON zc.zcjsrid = jsrur.id
|
||||
LEFT JOIN sys_union ut ON ut.`id` = zc.zclydwh $condition
|
||||
""");
|
||||
""").setParam("zcpdid", zcpdid);
|
||||
CndPlus cndPlus = CndPlus.create();
|
||||
cndPlus.andEx(searchName, "like", "%" + searchKeyword + "%");
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
cndPlus.andEx("zc.zcghlx", "=", "1");
|
||||
cndPlus.andEx("zc.zclydwhid", "=", Vi.getUnionId());
|
||||
} else {
|
||||
// cndPlus.andExcludeEmpty("zc.zcghlx", "=", "2");
|
||||
}
|
||||
cndPlus.andEx("zc.zclydwhid", "=", unionid);
|
||||
cndPlus.andEx(page.getSearchName(), "like", "%" + page.getSearchKeyword() + "%");
|
||||
cndPlus.andEx("zc.zcghlx", "=", zcghlx);
|
||||
cndPlus.andEx("zc.zcgzrq", "=", zcgzrq);
|
||||
cndPlus.andEx("zc.zclydwh", "=", zclydwh);
|
||||
cndPlus.andEx("zc.zcrksj", "=", zcrksj);
|
||||
if (StrUtil.isNotBlank(pageOrderName) && StrUtil.isNotBlank(pageOrderBy)) {
|
||||
cndPlus.orderBy(pageOrderName, pageOrderBy.equals("desc") ? "desc" : "asc");
|
||||
} else {
|
||||
cndPlus.desc("zc.zcghlx");
|
||||
if (isPd != 0) {
|
||||
cndPlus.and("( SELECT COUNT(*) FROM zgfw_zcxx_bdxx WHERE pdPlanId = '%s' AND zcid = zc.zcid )".formatted(zcpdid), isPd == 1 ? ">=" : "<", 1);
|
||||
}
|
||||
if (StrUtil.isNotBlank(page.getPageOrderName()) && StrUtil.isNotBlank(page.getPageOrderBy())) {
|
||||
cndPlus.orderBy(page.getPageOrderName(), page.getPageOrderBy().equals("desc") ? "desc" : "asc");
|
||||
} else {
|
||||
cndPlus.desc("zc.zcghlx").asc("zc.contentCode").asc("zc.zcgzrq");
|
||||
}
|
||||
cndPlus.groupBy("zc.zcid");
|
||||
sql.setCondition(cndPlus);
|
||||
Pagination pagination = zgfwZcxxService.listPage(pageNumber, pageSize, sql);
|
||||
Pagination pagination = zgfwZcxxService.listPageMap(page.getPageNumber(), page.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
} catch (Exception e) {
|
||||
return Result.error();
|
||||
@@ -98,59 +137,39 @@ public class ZgfwGdzcbgController {
|
||||
@Ok("json")
|
||||
public Object doChange(@Param("..") Zgfw_Zcxx_bdxx zcxxBdxx, String zczt) {
|
||||
try {
|
||||
Zgfw_Zcxx zcxx = zgfwZcxxService.fetch(zcxxBdxx.getZcid());
|
||||
Sys_user user = null;
|
||||
if (zczt.equals("报废") || zczt.equals("待报废")) {
|
||||
zcxxBdxx.setZcnowlyrid(Strings.isBlank(zcxxBdxx.getZcnowlyrid()) ? zcxxBdxx.getZcoldlyrid() : zcxxBdxx.getZcnowlyrid());
|
||||
zcxxBdxx.setZcnowlydwh(Strings.isBlank(zcxxBdxx.getZcnowlydwh()) ? zcxxBdxx.getZcoldlydwh() : zcxxBdxx.getZcnowlydwh());
|
||||
zcxxBdxx.setZcnowcfdmc(Strings.isBlank(zcxxBdxx.getZcnowcfdmc()) ? zcxxBdxx.getZcoldcfdmc() : zcxxBdxx.getZcnowcfdmc());
|
||||
} else {
|
||||
user = zgfwZcxxBdService.dao().fetch(Sys_user.class, zcxxBdxx.getZcnowlyrid());
|
||||
zcxxBdxx.setZcnowlyrid(Strings.isBlank(zcxxBdxx.getZcnowlyrid()) ? zcxxBdxx.getZcoldlyrid() : zcxxBdxx.getZcnowlyrid());
|
||||
zcxxBdxx.setZcnowlydwh(Strings.isBlank(zcxxBdxx.getZcnowlydwh()) ? zcxxBdxx.getZcoldlydwh() : zcxxBdxx.getZcnowlydwh());
|
||||
zcxxBdxx.setZcnowcfdmc(Strings.isBlank(zcxxBdxx.getZcnowcfdmc()) ? zcxxBdxx.getZcoldcfdmc() : zcxxBdxx.getZcnowcfdmc());
|
||||
}
|
||||
zcxxBdxx.setZcoldlyrid(zcxx.getZclyrid());
|
||||
zcxxBdxx.setZcbdsj(DateUtil.now());
|
||||
zcxxBdxx.setZcnowlyrid(Strings.isBlank(zcxxBdxx.getZcnowlyrid()) ? zcxxBdxx.getZcoldlyrid() : zcxxBdxx.getZcnowlyrid());
|
||||
zcxxBdxx.setZcnowlydwh(Strings.isBlank(zcxxBdxx.getZcnowlydwh()) ? zcxxBdxx.getZcoldlydwh() : zcxxBdxx.getZcnowlydwh());
|
||||
zcxxBdxx.setZcnowcfdmc(Strings.isBlank(zcxxBdxx.getZcnowcfdmc()) ? zcxxBdxx.getZcoldcfdmc() : zcxxBdxx.getZcnowcfdmc());
|
||||
zcxxBdxx.setZcbdsj(sdf.format(new Date()));
|
||||
zcxxBdxx.setZcbdshrid(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
zgfwZcxxBdService.insert(zcxxBdxx);
|
||||
zcxx.setZclyrid(zcxxBdxx.getZcnowlyrid());
|
||||
Zgfw_Zcxx zcxx = zgfwZcxxService.fetch(zcxxBdxx.getZcid());
|
||||
//zcxx.setZclyrid(zcxxBdxx.getZcnowlyrid());
|
||||
zcxx.setZclydwh(zcxxBdxx.getZcnowlydwh());
|
||||
zcxx.setZccfdmc(zcxxBdxx.getZcnowcfdmc());
|
||||
zcxx.setZclyrname(user == null ? null : user.getUsername());
|
||||
zcxx.setZclyrgh(user == null ? null : user.getLoginname());
|
||||
zcxx.setZczt(zczt);
|
||||
zcxx.setZcjsrid(ShiroUtil.getPrincipalProperty("id").toString());
|
||||
zcxx.setZcjsrname(ShiroUtil.getPrincipalProperty("username").toString());
|
||||
zcxx.setZcjsrgh(Vi.getUnion().getUnionname());
|
||||
zgfwZcxxService.update(zcxx);
|
||||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@RequiresPermissions("zc.bg")
|
||||
public Object queryChangeData(String zcid) {
|
||||
try {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
bd.`zcoldcfdmc` oldcfd,
|
||||
bd.`zcnowcfdmc` nowcfd,
|
||||
shr.`username` shrname,
|
||||
bd.`zcbdsj`,
|
||||
bd.zcnowlydwh,
|
||||
bd.zcoldlydwh,
|
||||
oldlyr.username oldlyrusername,
|
||||
nowlyr.username nowlyrusername
|
||||
bd.*
|
||||
FROM
|
||||
zgfw_zcxx_bdxx bd
|
||||
LEFT JOIN `sys_user` oldlyr ON bd.zcoldlyrid = oldlyr.`id`
|
||||
LEFT JOIN `sys_user` nowlyr ON bd.`zcnowlyrid` = nowlyr.`id`
|
||||
LEFT JOIN sys_user oldlyr ON bd.zcoldlyrid = oldlyr.`id`
|
||||
LEFT JOIN sys_union oldlydw ON bd.`zcoldlydwh` = oldlydw.`id`
|
||||
LEFT JOIN sys_user nowlyr ON bd.`zcnowlyrid` = nowlyr.`id`
|
||||
LEFT JOIN sys_union nowlydw ON bd.`zcnowlydwh` = nowlydw.`id`
|
||||
LEFT JOIN sys_user shr ON bd.`zcbdshrid` = shr.`id`
|
||||
WHERE
|
||||
bd.`zcid` = @zcid
|
||||
@@ -191,7 +210,6 @@ public class ZgfwGdzcbgController {
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@RequiresPermissions("zc.bg")
|
||||
public Object openEditData(String zcid) {
|
||||
try {
|
||||
Sql sql = Sqls.create("SELECT xx.*,u.`username`,un.`unionname` FROM zgfw_zcxx xx \n" +
|
||||
@@ -204,4 +222,138 @@ public class ZgfwGdzcbgController {
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ViReturn
|
||||
public Object doSubmit(Zgfw_Zcxx_bdxx zcxxBdxx, String zclyrname, String zclyrgh, String zclyrid, String zclydwh, String zclydwhid) {
|
||||
Zgfw_Zcxx zcxx = zgfwZcxxService.fetch(zcxxBdxx.getZcid());
|
||||
|
||||
zcxxBdxx.setZcoldlyrid(zcxx.getZclyrid());
|
||||
zcxxBdxx.setZcnowlyrid(zclydwhid);
|
||||
zgfwZcxxBdService.insert(zcxxBdxx);
|
||||
|
||||
|
||||
zcxx.setZczt(zcxxBdxx.getZczt());
|
||||
if (zcxx.getZcghlx().equals("2")) {
|
||||
zcxx.setZclyrname(zclyrname);
|
||||
zcxx.setZclyrgh(zclyrgh);
|
||||
zcxx.setZclyrid(zclyrid);
|
||||
zcxx.setZclydwh(zclydwh);
|
||||
zcxx.setZclydwhid(zclydwhid);
|
||||
} else {
|
||||
zcxx.setZclyrname(ShiroUtil.getPlatformUsername());
|
||||
zcxx.setZclyrgh(ShiroUtil.getPlatformLoginname());
|
||||
zcxx.setZclyrid(ShiroUtil.getUserId());
|
||||
zcxx.setZclydwh(((Sys_union) ShiroUtil.getPrincipalProperty("union")).getUnionname());
|
||||
zcxx.setZclydwhid(((Sys_union) ShiroUtil.getPrincipalProperty("union")).getId());
|
||||
}
|
||||
|
||||
zgfwZcxxService.update(zcxx);
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ViReturn
|
||||
public Object doPdDelete(String zcbdid) {
|
||||
zgfwZcxxBdService.delete(zcbdid);
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@ViReturn
|
||||
public Object getPdPlan(String year) {
|
||||
return zgfwZcxxService.dao().query(ZcPdPlan.class, Cnd.NEW().andEX("year", "=", year).desc("startDate"));
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresAuthentication
|
||||
public void doHzExcel(String zcpdid, String zcghlx, HttpServletResponse response) {
|
||||
try {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String unitname = "校工会";
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
zc.zcbh,
|
||||
zc.zcmc,
|
||||
bd.zcrksj,
|
||||
u.username,
|
||||
bd.mobile,
|
||||
zc.zccfdmc,
|
||||
bd.pdzt,
|
||||
bd.wpdzt,
|
||||
bd.zczt,
|
||||
it.name unitname,
|
||||
bd.zcFile
|
||||
FROM
|
||||
zgfw_zcxx zc
|
||||
LEFT JOIN zgfw_zcxx_bdxx bd ON bd.zcid=zc.zcid AND bd.pdPlanId=@zcpdid
|
||||
left join sys_unit it on it.id=zc.zclydwhid
|
||||
LEFT JOIN `user` u ON u.id=bd.zcbdshrid
|
||||
$condition
|
||||
""").setParam("zcpdid", zcpdid);
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin,A06")) {
|
||||
/*if (ShiroUtil.hasRole("H04")) {
|
||||
cnd.andEX("zc.zcghlx", "=", "1");
|
||||
cnd.andEX("zc.zclydwhid", "=", Vi.getUnionId());
|
||||
unitname = Vi.getUnit().getName();
|
||||
} else {
|
||||
cnd.andEX("zc.zcghlx", "=", "2");
|
||||
}*/
|
||||
cnd.andEX("zc.zcghlx", "=", "1");
|
||||
cnd.andEX("zc.zclydwhid", "=", Vi.getUnionId());
|
||||
unitname = Vi.getUnit().getName();
|
||||
|
||||
}
|
||||
cnd.andEX("zc.zcghlx", "=", zcghlx);
|
||||
cnd.groupBy("zc.zcbh");
|
||||
cnd.asc("zc.zcbh");
|
||||
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> maps = sysUserService.listMap(sql);
|
||||
|
||||
for (int i = 0; i < maps.size(); i++) {
|
||||
maps.get(i).put("index", i + 1);
|
||||
String zcFile1 = maps.get(i).getString("zcFile");
|
||||
if (StrUtil.isNotBlank(zcFile1)) {
|
||||
List<NutMap> zcFile = Json.fromJsonAsList(NutMap.class, zcFile1);
|
||||
ByteArrayOutputStream signOs = new ByteArrayOutputStream();
|
||||
ftpService.download(zcFile.get(0).getString("filepath"), signOs);
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(signOs.toByteArray());
|
||||
BufferedImage bufferImg = ImageIO.read(bais);
|
||||
ImageIO.write(bufferImg, "jpg", signOs);
|
||||
ImageEntity imageEntity = new ImageEntity(signOs.toByteArray(), 200, 1000);
|
||||
maps.get(i).put("img", imageEntity);
|
||||
} else {
|
||||
maps.get(i).put("img", null);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
map.put("maplist", maps);
|
||||
map.put("applyDate", DateUtil.format(new Date(), "yyyy年MM月dd日"));
|
||||
if (Lang.isNotEmpty(maps)) {
|
||||
map.put("unitname", unitname);
|
||||
}
|
||||
|
||||
String templateUrl = "templates/zc/pdHz.xlsx";
|
||||
response.setContentType("application/octet-stream");
|
||||
ViTool.excelResponse(response, "杭州医学院固定资产盘点汇总表.xlsx");
|
||||
TemplateExportParams params = new TemplateExportParams(
|
||||
templateUrl);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(params, map);
|
||||
workbook.write(response.getOutputStream());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import io.v.nutz.zhgh.zc.service.ZgfwZcxxBdService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
@@ -33,34 +32,33 @@ public class ZgfwZcSjkbController {
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@RequiresPermissions("zc.sjkb")
|
||||
public Object data(){
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
count( CASE WHEN zczt = '在用' THEN '在用' END ) AS zy,
|
||||
count( CASE WHEN zczt = '闲置' THEN '闲置' END ) AS xz,
|
||||
count( CASE WHEN zczt = '未使用' THEN '未使用' END ) AS wsy,
|
||||
count( CASE WHEN zczt = '待报废' THEN '待报废' END ) AS dbf,
|
||||
count( CASE WHEN zczt = '校外转入' THEN '校外转入' END ) AS xwzr,
|
||||
count( CASE WHEN zczt = '校内转入' THEN '校内转入' END ) AS xnzr,
|
||||
count( CASE WHEN zczt = '其它' THEN '其它' END ) AS qt
|
||||
FROM
|
||||
zgfw_zcxx
|
||||
""");
|
||||
List<Record> zttj = zgfwZcxxBdService.list(sql);
|
||||
/* StringBuffer sb=new StringBuffer();
|
||||
sb.append("SELECT un.unionname,COUNT(CASE WHEN zcid IS NOT NULL THEN 0 END) sl FROM hy_unioninfomgr un LEFT JOIN zgfw_zcxx zc ON zc.zclydwh=un.`id` GROUP BY id");
|
||||
List<Record> fghtj = zgfwZcxxBdService.list(Sqls.create(sb.toString()));*/
|
||||
|
||||
Sql sql1 = Sqls.create("""
|
||||
SELECT
|
||||
COUNT( CASE WHEN zcdj < 2000 THEN '1' END ) a,
|
||||
COUNT( CASE WHEN zcdj >= 2000 AND zcdj < 4000 THEN '2' END ) b,
|
||||
COUNT( CASE WHEN zcdj >= 4000 AND zcdj < 6000 THEN '3' END ) c,
|
||||
COUNT( CASE WHEN zcdj >= 6000 AND zcdj < 8000 THEN '4' END ) d,
|
||||
COUNT( CASE WHEN zcdj >= 8000 AND zcdj < 10000 THEN '5' END ) e,
|
||||
COUNT( CASE WHEN zcdj >= 10000 THEN '3' END ) f
|
||||
FROM
|
||||
zgfw_zcxx
|
||||
""");
|
||||
List<Record> jgtj = zgfwZcxxBdService.list(sql1);
|
||||
StringBuffer sf=new StringBuffer();
|
||||
//sf.append("SELECT COUNT(CASE WHEN zczt='1' THEN '1' END) zy,COUNT(CASE WHEN zczt='2' THEN '2' END) ty,COUNT(CASE WHEN zczt='3' THEN '3' END) bf FROM zgfw_zcxx ");
|
||||
sf.append("SELECT\n" +
|
||||
"\tcount( CASE WHEN zczt = '在用' THEN '在用' END ) AS zy,\n" +
|
||||
"\tcount( CASE WHEN zczt = '闲置' THEN '闲置' END ) AS xz,\n" +
|
||||
"\tcount( CASE WHEN zczt = '损坏' THEN '损坏' END ) AS sh,\n" +
|
||||
"\tcount( CASE WHEN zczt = '外携' THEN '外携' END ) AS wx\n" +
|
||||
"FROM\n" +
|
||||
"\tzgfw_zcxx");
|
||||
List<Record> zttj = zgfwZcxxBdService.list(Sqls.create(sf.toString()));
|
||||
|
||||
StringBuffer sr=new StringBuffer();
|
||||
sr.append("SELECT\n" +
|
||||
"\tCOUNT( CASE WHEN zcdj < 2000 THEN '1' END ) a,\n" +
|
||||
"\tCOUNT( CASE WHEN zcdj >= 2000 AND zcdj < 4000 THEN '2' END ) b,\n" +
|
||||
"\tCOUNT( CASE WHEN zcdj >= 4000 AND zcdj < 6000 THEN '3' END ) c,\n" +
|
||||
"\tCOUNT( CASE WHEN zcdj >= 6000 AND zcdj < 8000 THEN '4' END ) d,\n" +
|
||||
"\tCOUNT( CASE WHEN zcdj >= 8000 AND zcdj < 10000 THEN '5' END ) e,\n" +
|
||||
"\tCOUNT( CASE WHEN zcdj >= 10000 THEN '3' END ) f \n" +
|
||||
"FROM\n" +
|
||||
"\tzgfw_zcxx");
|
||||
List<Record> jgtj = zgfwZcxxBdService.list(Sqls.create(sr.toString()));
|
||||
|
||||
List<Record> list = zgfwZcxxBdService.list(Sqls.create("SELECT SUBSTR(MIN(zcgzrq),1,4) ksnf,SUBSTR(MAX(zcgzrq),1,4) jsnf FROM zgfw_zcxx"));
|
||||
Record record = list.get(0);
|
||||
|
||||
@@ -7,10 +7,11 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.OfficeTemplateUtil;
|
||||
import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.zc.model.Zgfw_Zcxx;
|
||||
import io.v.nutz.zhgh.zc.model.zcDepreciationRecord;
|
||||
import io.v.nutz.zhgh.zc.service.ZgfwZcxxBdService;
|
||||
@@ -25,7 +26,6 @@ import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.trans.Trans;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -57,52 +57,42 @@ public class ZgfwZcTzglController {
|
||||
@Inject
|
||||
private ZgfwZcxxBdService zgfwZcxxBdService;
|
||||
|
||||
@Inject
|
||||
private OfficeTemplateUtil officeTemplateUtil;
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zc.tzgl")
|
||||
public Object data(PageForm pageForm, @Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param(value = "zcghlx", required = false) String zcghlx,
|
||||
@Param(value = "zcgzrq", required = false) String zcgzrq,
|
||||
@Param(value = "zclydwh", required = false) String zclydwh,
|
||||
@Param(value = "zcrksj", required = false) String zcrksj,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy,
|
||||
@Param(value = "contentCode", required = false) String contentCode) {
|
||||
public Object data(PageForm pageForm, String searchName, String searchKeyword, String zcghlx,
|
||||
String zcgzrq, String zclydwh, String zcrksj, String unionid, String pageOrderName, String pageOrderBy, String contentCode) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
xx.*,
|
||||
lb.content
|
||||
xx.*
|
||||
FROM
|
||||
`zgfw_zcxx` xx
|
||||
LEFT JOIN zgfw_zclb lb ON xx.contentCode = lb.contentCode
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(searchName)&&StrUtil.isNotBlank(searchKeyword)){
|
||||
cnd.andEX(searchName, "like", "%" + searchKeyword + "%");
|
||||
CndPlus cndPlus = CndPlus.create();
|
||||
if (!ShiroUtil.hasAnyRoles("sysadmin")) {
|
||||
cndPlus.andEx("xx.zcghlx", "=", "1");
|
||||
cndPlus.andEx("xx.zclydwhid", "=", Vi.getUnionId());
|
||||
}
|
||||
cnd.andEX("xx.contentCode", "=", contentCode);
|
||||
cnd.andEX("xx.zcghlx", "=", zcghlx);
|
||||
cnd.andEX("xx.zcgzrq", "=", zcgzrq);
|
||||
cnd.andEX("xx.zclydwh", "=", zclydwh);
|
||||
cnd.andEX("xx.zcrksj", "=", zcrksj);
|
||||
cndPlus.andEx(searchName, "like", "%" + searchKeyword + "%");
|
||||
cndPlus.andEx("xx.contentCode", "=", contentCode);
|
||||
cndPlus.andEx("xx.zcghlx", "=", zcghlx);
|
||||
cndPlus.andEx("xx.zcgzrq", "=", zcgzrq);
|
||||
cndPlus.andEx("xx.zclydwh", "=", zclydwh);
|
||||
cndPlus.andEx("xx.zcrksj", "=", zcrksj);
|
||||
cndPlus.andEx("xx.zclydwhid", "=", unionid);
|
||||
if (StrUtil.isNotBlank(pageOrderName) && StrUtil.isNotBlank(pageOrderBy)) {
|
||||
cnd.orderBy(pageOrderName, pageOrderBy.equals("desc") ? "desc" : "asc");
|
||||
cndPlus.orderBy(pageOrderName, pageOrderBy.equals("desc") ? "desc" : "asc");
|
||||
} else {
|
||||
cnd.desc("xx.zcghlx");
|
||||
cndPlus.desc("xx.zcghlx");
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
sql.setCondition(cndPlus);
|
||||
Pagination pagination = zgfwZcxxService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@ViReturn
|
||||
@RequiresPermissions("zc.tzgl")
|
||||
public Object doDel(String id) {
|
||||
Trans.exec(() -> {
|
||||
zgfwZcxxService.delete(id);
|
||||
@@ -112,8 +102,8 @@ public class ZgfwZcTzglController {
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@ViReturn
|
||||
@RequiresPermissions("zc.tzgl")
|
||||
public Object bgzt(String zcid, String zczt) {
|
||||
Zgfw_Zcxx fetch = zgfwZcxxService.fetch(zcid);
|
||||
fetch.setZczt(zczt);
|
||||
@@ -123,7 +113,6 @@ public class ZgfwZcTzglController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresPermissions("zc.tzgl")
|
||||
public void downloadrzd(String id, HttpServletResponse response) {
|
||||
try {
|
||||
List<Record> query = zgfwZcxxService.list(Sqls.create("select * from zgfw_zcxx where zcid='" + id + "'"));
|
||||
@@ -137,13 +126,12 @@ public class ZgfwZcTzglController {
|
||||
response.setContentType("application/octet-stream");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes("UTF-8"), "ISO-8859-1") + "\".xls");
|
||||
|
||||
|
||||
TemplateExportParams params = new TemplateExportParams(
|
||||
officeTemplateUtil.getPath("rzd"));
|
||||
Thread.currentThread().getContextClassLoader().getResource("docTemplate/zc/rzd.xls").getPath());
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(params, record);
|
||||
workbook.write(response.getOutputStream());
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -152,7 +140,6 @@ public class ZgfwZcTzglController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zc.tzgl")
|
||||
public Object doZj() {
|
||||
Trans.exec(() -> {
|
||||
|
||||
|
||||
@@ -7,11 +7,10 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import cn.wizzer.framework.page.Pagination;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.dao.CndPlus;
|
||||
import io.v.nutz.base.utils.ViTool;
|
||||
import io.v.nutz.sys.models.Sys_union;
|
||||
import io.v.nutz.sys.services.SysUnionService;
|
||||
import io.v.nutz.base.utils.ViTool;
|
||||
import io.v.nutz.zhgh.zc.service.ZgfwZcxxBdService;
|
||||
import io.v.nutz.zhgh.zc.service.ZgfwZcxxService;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
@@ -26,7 +25,6 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Strings;
|
||||
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.util.ArrayList;
|
||||
@@ -60,20 +58,8 @@ public class ZgfwZcZhcxController {
|
||||
|
||||
@At
|
||||
@Ok("json")
|
||||
@ViReturn
|
||||
@RequiresPermissions("zc.zhcx")
|
||||
public Object data(@Param(value = "pageNumber", required = false) Integer pageNumber,
|
||||
@Param(value = "pageSize", required = false) Integer pageSize,
|
||||
@Param(value = "searchName", required = false) String searchName,
|
||||
@Param(value = "searchKeyword", required = false) String searchKeyword,
|
||||
@Param(value = "zczt", required = false) String zczt,
|
||||
@Param(value = "startTime", required = false) String startTime,
|
||||
@Param(value = "endTime", required = false) String endTime,
|
||||
@Param(value = "zcghlx", required = false) String zcghlx,
|
||||
@Param(value = "zcrksj", required = false) String zcrksj,
|
||||
@Param(value = "ghid", required = false) String ghid,
|
||||
@Param(value = "pageOrderName", required = false) String pageOrderName,
|
||||
@Param(value = "pageOrderBy", required = false) String pageOrderBy) {
|
||||
public Object data(Integer pageNumber, Integer pageSize, String searchName, String searchKeyword, String zczt, String startTime, String endTime, String zcghlx,
|
||||
String zcrksj, String ghid, String pageOrderName, String pageOrderBy) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
xx.*
|
||||
@@ -99,7 +85,7 @@ public class ZgfwZcZhcxController {
|
||||
cndPlus.and(Cnd.cri().where().andBetween("zcgzrq", startTime, endTime));
|
||||
}
|
||||
sql.setCondition(cndPlus);
|
||||
Pagination pagination = zgfwZcxxService.listPage(pageNumber, pageSize, sql);
|
||||
Pagination pagination = zgfwZcxxService.listPageMap(pageNumber, pageSize, sql);
|
||||
return Result.success().addData(pagination);
|
||||
}
|
||||
|
||||
@@ -112,7 +98,6 @@ public class ZgfwZcZhcxController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@RequiresPermissions("zc.zhcx")
|
||||
public void doExport(String searchKeyword, String searchName, String zczt, String zcghlx, String ghid, String startTime, String endTime, HttpServletResponse response) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -135,33 +120,27 @@ public class ZgfwZcZhcxController {
|
||||
}
|
||||
sql.setCondition(cnd);
|
||||
List<Record> list = zgfwZcxxService.list(sql);
|
||||
list.forEach(v -> {
|
||||
v.set("zcghlx", v.getString("zcghlx").equals("1") ? "院级工会" : "校工会");
|
||||
});
|
||||
|
||||
|
||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||
entityList.add(new ExcelExportEntity("领用单位号", "zclydwh", 20));
|
||||
entityList.add(new ExcelExportEntity("仪器编号", "zcbh", 20));
|
||||
entityList.add(new ExcelExportEntity("仪器名称", "zcmc", 20));
|
||||
entityList.add(new ExcelExportEntity("型号", "zcxh", 20));
|
||||
entityList.add(new ExcelExportEntity("规格", "zcgg", 20));
|
||||
entityList.add(new ExcelExportEntity("单价", "zcdj", 20));
|
||||
entityList.add(new ExcelExportEntity("厂家", "zccj", 20));
|
||||
entityList.add(new ExcelExportEntity("出厂号", "zccch", 20));
|
||||
entityList.add(new ExcelExportEntity("资产名称", "zcmc", 20));
|
||||
entityList.add(new ExcelExportEntity("类别名称", "content", 20));
|
||||
entityList.add(new ExcelExportEntity("型号规格", "zcxh", 20));
|
||||
entityList.add(new ExcelExportEntity("购置日期", "zcgzrq", 20));
|
||||
entityList.add(new ExcelExportEntity("现状", "zczt", 20));
|
||||
entityList.add(new ExcelExportEntity("存放地名称", "zccfdmc", 20));
|
||||
entityList.add(new ExcelExportEntity("数量", "sl", 20));
|
||||
entityList.add(new ExcelExportEntity("单价", "zcdj", 20));
|
||||
entityList.add(new ExcelExportEntity("备注(存放地点)", "zccfdmc", 20));
|
||||
entityList.add(new ExcelExportEntity("单位", "zclydwh", 20));
|
||||
entityList.add(new ExcelExportEntity("领用人", "zclyrname", 20));
|
||||
entityList.add(new ExcelExportEntity("经手人", "zcjsrname", 20));
|
||||
entityList.add(new ExcelExportEntity("入库时间", "zcrksj", 20));
|
||||
entityList.add(new ExcelExportEntity("单据号", "zcdjh", 20));
|
||||
entityList.add(new ExcelExportEntity("合同号", "zchth", 20));
|
||||
entityList.add(new ExcelExportEntity("经费卡号", "zcjfkh", 20));
|
||||
entityList.add(new ExcelExportEntity("经费卡金额", "zcjfkje", 20));
|
||||
entityList.add(new ExcelExportEntity("国标分类号", "zcgbflh", 20));
|
||||
entityList.add(new ExcelExportEntity("国别", "zcgb", 20));
|
||||
entityList.add(new ExcelExportEntity("发票号", "zcfph", 20));
|
||||
entityList.add(new ExcelExportEntity("供货商", "zcghs", 20));
|
||||
entityList.add(new ExcelExportEntity("领用人工号", "zclyrgh", 20));
|
||||
entityList.add(new ExcelExportEntity("资产编号", "zcbh", 20));
|
||||
entityList.add(new ExcelExportEntity("资产归属", "zcghlx", 20));
|
||||
|
||||
try {
|
||||
ViTool.excelResponse(response, "资产总账表.xls");
|
||||
ViTool.excelResponse(response, "固定资产台账.xls");
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), entityList, list);
|
||||
workbook.write(response.getOutputStream());
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package io.v.nutz.zhgh.zc.controller.mobile;
|
||||
|
||||
import io.v.nutz.base.service.ViService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @ClassName ZcPdMobileController
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2024/3/3 15:44
|
||||
*/
|
||||
@IocBean
|
||||
@Ok("json:full")
|
||||
@At("/mobile/zc/zcPd")
|
||||
public class ZcPdMobileController {
|
||||
|
||||
@Inject
|
||||
private ViService viService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/mobile/zc/zcPd.html")
|
||||
@RequiresPermissions("zc.bg")
|
||||
public void index() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -6,8 +6,8 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.base.annontation.ViReturn;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.base.query.PageForm;
|
||||
import io.v.nutz.base.service.BaseService;
|
||||
import io.v.nutz.zhgh.zc.model.Zgfw_Zcxx;
|
||||
import io.v.nutz.zhgh.zc.model.zgfwZclb;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
@@ -18,7 +18,6 @@ import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
||||
@@ -47,10 +46,7 @@ public class zgfwZclbController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zcgl.zclb")
|
||||
public Object doEdit(zgfwZclb zgfw_zclb,
|
||||
@Param(value = "oldContentCode", required = false) String oldContentCode,
|
||||
@Param(value = "oldDepreciationYear", required = false) String oldDepreciationYear) {
|
||||
public Object doEdit(zgfwZclb zgfw_zclb, String oldContentCode, String oldDepreciationYear) {
|
||||
if (!oldContentCode.equals(zgfw_zclb.getContentCode())) {
|
||||
zgfwZclb zgfwZclb = baseService.dao().fetch(zgfwZclb.class, Cnd.where("contentCode", "=", zgfw_zclb.getContentCode()));
|
||||
if (zgfwZclb != null) {
|
||||
@@ -80,7 +76,6 @@ public class zgfwZclbController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zcgl.zclb")
|
||||
public Object doAdd(zgfwZclb zgfw_zclb) {
|
||||
zgfwZclb zgfwZclb = baseService.dao().fetch(zgfwZclb.class, Cnd.where("contentCode", "=", zgfw_zclb.getContentCode()));
|
||||
if (zgfwZclb != null) {
|
||||
@@ -92,9 +87,7 @@ public class zgfwZclbController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zcgl.zclb")
|
||||
public Object pageData(PageForm page,
|
||||
@Param(value = "category", required = false) String category) {
|
||||
public Object pageData(PageForm page, String category) {
|
||||
Sql sql = Sqls.create("SELECT * FROM `zgfw_zclb` $condition");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(page.getSearchName()) && StrUtil.isNotBlank(page.getSearchKeyword())) {
|
||||
@@ -109,7 +102,6 @@ public class zgfwZclbController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zcgl.zclb")
|
||||
public Object doDelete(String id) {
|
||||
baseService.dao().clear(zgfwZclb.class, Cnd.where("id", "=", id));
|
||||
return null;
|
||||
@@ -117,9 +109,8 @@ public class zgfwZclbController {
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresPermissions("zcgl.zclb")
|
||||
public Object queryLb() {
|
||||
return baseService.dao().query(zgfwZclb.class, Cnd.NEW().asc("contentCode"));
|
||||
return baseService.dao().query(zgfwZclb.class, Cnd.NEW().asc("category"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package io.v.nutz.zhgh.zc.model;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
/**
|
||||
* @ClassName ZcDJPlan
|
||||
* @Description TODO
|
||||
* @Author zhf
|
||||
* @Date 2024/2/27 14:16
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
public class ZcPdPlan {
|
||||
|
||||
@Column
|
||||
@Name
|
||||
@Comment("id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
private String id;
|
||||
|
||||
@Column
|
||||
@Comment("年度")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String year;
|
||||
|
||||
@Column
|
||||
@Comment("开始时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String startDate;
|
||||
|
||||
@Column
|
||||
@Comment("时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String endDate;
|
||||
|
||||
@Column
|
||||
@Comment("说明")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 300)
|
||||
private String note;
|
||||
|
||||
@Column
|
||||
@Comment("创建时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String createDate;
|
||||
|
||||
}
|
||||
@@ -5,11 +5,9 @@ import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Comment("资产信息")
|
||||
@Table("Zgfw_Zcxx")
|
||||
public class Zgfw_Zcxx implements Serializable {
|
||||
|
||||
@@ -22,22 +20,47 @@ public class Zgfw_Zcxx implements Serializable {
|
||||
|
||||
@Column
|
||||
@Comment("编号")
|
||||
@Excel(name = "资产编号", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Excel(name = "编号", width = 30)
|
||||
private String zcbh;
|
||||
|
||||
@Column
|
||||
@Comment("名称")
|
||||
@Comment("资产名称")
|
||||
@Excel(name = "资产名称", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Excel(name = "名称", width = 30)
|
||||
private String zcmc;
|
||||
|
||||
@Column
|
||||
@Comment("资产所属编码")
|
||||
@Excel(name = "类别编号", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String contentCode;
|
||||
|
||||
@Column
|
||||
@Comment("资产所属类别")
|
||||
@Excel(name = "类别名称", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String content;
|
||||
|
||||
@Column
|
||||
@Comment("型号")
|
||||
@Excel(name = "型号规格", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Excel(name = "型号", width = 30)
|
||||
private String zcxh;
|
||||
|
||||
@Column
|
||||
@Comment("购置日期")
|
||||
@Excel(name = "购置日期", importFormat = "yyyy-MM-dd", exportFormat = "yyyy-MM-dd", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String zcgzrq;
|
||||
|
||||
@Column
|
||||
@Comment("数量")
|
||||
@Excel(name = "数量", width = 30)
|
||||
@ColDefine(type = ColType.INT)
|
||||
private Integer sl;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("规格")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@@ -45,10 +68,27 @@ public class Zgfw_Zcxx implements Serializable {
|
||||
|
||||
@Column
|
||||
@Comment("单价")
|
||||
@ColDefine(type = ColType.FLOAT, width = 30)
|
||||
@Excel(name = "单价", width = 30)
|
||||
@ColDefine(type = ColType.FLOAT, width = 30)
|
||||
private String zcdj;
|
||||
|
||||
@Column
|
||||
@Comment("存放地名称")
|
||||
@Excel(name = "备注(存放地点)", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zccfdmc;
|
||||
|
||||
@Column
|
||||
@Comment("领用单位")
|
||||
@Excel(name = "领用单位", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zclydwh;
|
||||
|
||||
@Column
|
||||
@Comment("领用单位id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zclydwhid;
|
||||
|
||||
@Column
|
||||
@Comment("厂家")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@@ -59,17 +99,6 @@ public class Zgfw_Zcxx implements Serializable {
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zccch;
|
||||
|
||||
@Column
|
||||
@Comment("购置日期")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
@Excel(name = "购置日期", importFormat = "yyyy-MM-dd", exportFormat = "yyyy-MM-dd", width = 30)
|
||||
private String zcgzrq;
|
||||
|
||||
@Column
|
||||
@Comment("存放地名称")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Excel(name = "存放地名称", width = 30)
|
||||
private String zccfdmc;
|
||||
|
||||
@Column
|
||||
@Comment("领用人id")
|
||||
@@ -78,11 +107,13 @@ public class Zgfw_Zcxx implements Serializable {
|
||||
|
||||
@Column
|
||||
@Comment("领用人姓名")
|
||||
@Excel(name = "领用人", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zclyrname;
|
||||
|
||||
@Column
|
||||
@Comment("领用人工资号")
|
||||
@Excel(name = "领用人工号", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zclyrgh;
|
||||
|
||||
@@ -104,60 +135,71 @@ public class Zgfw_Zcxx implements Serializable {
|
||||
@Column
|
||||
@Comment("入库时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
@Excel(name = "入库时间", importFormat = "yyyy-MM-dd", exportFormat = "yyyy-MM-dd", width = 30)
|
||||
private String zcrksj;
|
||||
|
||||
@Column
|
||||
@Comment("单据号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zcdjh;
|
||||
|
||||
@Column
|
||||
@Comment("合同号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zchth;
|
||||
|
||||
@Column
|
||||
@Comment("经费卡号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zcjfkh;
|
||||
|
||||
@Column
|
||||
@Comment("经费卡金额")
|
||||
@ColDefine(type = ColType.FLOAT, width = 30)
|
||||
private String zcjfkje;
|
||||
|
||||
@Column
|
||||
@Comment("国标分类号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String zcgbflh;
|
||||
|
||||
@Column
|
||||
@Comment("分类号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||
private String zcflh;
|
||||
|
||||
@Column
|
||||
@Comment("国别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String zcgb;
|
||||
|
||||
@Column
|
||||
@Comment("发票号")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zcfph;
|
||||
|
||||
@Column
|
||||
@Comment("供货商")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
private String zcghs;
|
||||
|
||||
@Column
|
||||
@Comment("状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String zczt;
|
||||
|
||||
@Column
|
||||
@Comment("领用单位")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String zclydwh;
|
||||
@Comment("盘点状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String pdzt;
|
||||
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("分工会资产、校工会资产")
|
||||
@Excel(name = "资产类型(1院级工会2.校工会)", width = 30)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
@Excel(name = "所属工会类型", width = 30)
|
||||
private String zcghlx;
|
||||
|
||||
@Column
|
||||
@Comment("数量")
|
||||
@ColDefine(type = ColType.INT)
|
||||
@Excel(name = "数量", width = 30)
|
||||
private Integer sl;
|
||||
|
||||
public static Zgfw_Zcxx getDefault() {
|
||||
Zgfw_Zcxx d = new Zgfw_Zcxx();
|
||||
d.setZclydwh("1C08:工会");
|
||||
d.setZcbh("17004130");
|
||||
d.setZcmc("微型电子计算机");
|
||||
d.setZcxh("R6948");
|
||||
d.setZcgg("7459");
|
||||
d.setZcdj(String.valueOf(9700.00f));
|
||||
d.setZccj("Dell");
|
||||
d.setZccch("");
|
||||
d.setZcgzrq("");
|
||||
d.setZczt("在用");
|
||||
d.setZccfdmc("田家炳楼305");
|
||||
d.setZclyrname("庄菁");
|
||||
d.setZclyrgh("10010");
|
||||
d.setZclyrgh("");
|
||||
d.setZcjsrname("庄菁");
|
||||
d.setZcrksj("");
|
||||
d.setZcghlx("院级工会固定资产,工会固定资产");
|
||||
d.setBz("");
|
||||
return d;
|
||||
}
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("资产所属类别")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
@Excel(name = "资产所属类别", width = 30)
|
||||
private String contentCode;
|
||||
|
||||
@Column
|
||||
@Comment("资产折旧到期时间")
|
||||
@@ -165,12 +207,4 @@ public class Zgfw_Zcxx implements Serializable {
|
||||
private Date depreciationDate;
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("备注")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Excel(name = "备注", width = 300)
|
||||
private String bz;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,143 +1,114 @@
|
||||
package io.v.nutz.zhgh.zc.model;
|
||||
|
||||
import io.v.nutz.sys.models.Sys_file;
|
||||
import lombok.Data;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Comment("资产变更信息表")
|
||||
/**
|
||||
* 表的字段名称以前端页面显示为准
|
||||
*/
|
||||
@Data
|
||||
@Table("Zgfw_Zcxx_bdxx")
|
||||
public class Zgfw_Zcxx_bdxx implements Serializable {
|
||||
|
||||
@Name
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Prev(els = {@EL("uuid()")})
|
||||
@Comment("资产变动信息id")
|
||||
private String zcbdid;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("资产id")
|
||||
private String zcid;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("原先领用人id")
|
||||
private String zcoldlyrid;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("原先单位id")
|
||||
private String zcoldlydwh;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Comment("原先存放地点")
|
||||
private String zcoldcfdmc;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("现在领用人id")
|
||||
private String zcnowlyrid;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("现在单位id")
|
||||
private String zcnowlydwh;
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("现在单位id")
|
||||
private String zcnowlydwhid;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 100)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 100)
|
||||
@Comment("现在存放地点")
|
||||
private String zcnowcfdmc;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 20)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
@Comment("变动日期")
|
||||
private String zcbdsj;
|
||||
|
||||
@Column
|
||||
@ColDefine(type = ColType.VARCHAR,width = 32)
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
@Comment("变动审核人")
|
||||
private String zcbdshrid;
|
||||
|
||||
@Column
|
||||
@Comment("入库时间")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
private String zcrksj;
|
||||
|
||||
public String getZcbdid() {
|
||||
return zcbdid;
|
||||
}
|
||||
@Column
|
||||
@Comment("账面价值")
|
||||
@ColDefine(type = ColType.FLOAT, width = 10, precision = 2)
|
||||
private Integer zmjz;
|
||||
|
||||
public void setZcbdid(String zcbdid) {
|
||||
this.zcbdid = zcbdid;
|
||||
}
|
||||
@Column
|
||||
@Comment("联系电话")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||
private String mobile;
|
||||
|
||||
public String getZcid() {
|
||||
return zcid;
|
||||
}
|
||||
@Column
|
||||
@Comment("盘点状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String pdzt;
|
||||
|
||||
public void setZcid(String zcid) {
|
||||
this.zcid = zcid;
|
||||
}
|
||||
@Column
|
||||
@Comment("未盘点原因")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String wpdzt;
|
||||
|
||||
public String getZcoldlyrid() {
|
||||
return zcoldlyrid;
|
||||
}
|
||||
@Column
|
||||
@Comment("状态")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 10)
|
||||
private String zczt;
|
||||
|
||||
public void setZcoldlyrid(String zcoldlyrid) {
|
||||
this.zcoldlyrid = zcoldlyrid;
|
||||
}
|
||||
@Column
|
||||
@Comment("盘点计划id")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String pdPlanId;
|
||||
|
||||
public String getZcoldlydwh() {
|
||||
return zcoldlydwh;
|
||||
}
|
||||
@Column
|
||||
@Comment("资产照片")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<Sys_file> zcFile;
|
||||
|
||||
public void setZcoldlydwh(String zcoldlydwh) {
|
||||
this.zcoldlydwh = zcoldlydwh;
|
||||
}
|
||||
|
||||
public String getZcoldcfdmc() {
|
||||
return zcoldcfdmc;
|
||||
}
|
||||
|
||||
public void setZcoldcfdmc(String zcoldcfdmc) {
|
||||
this.zcoldcfdmc = zcoldcfdmc;
|
||||
}
|
||||
|
||||
public String getZcnowlyrid() {
|
||||
return zcnowlyrid;
|
||||
}
|
||||
|
||||
public void setZcnowlyrid(String zcnowlyrid) {
|
||||
this.zcnowlyrid = zcnowlyrid;
|
||||
}
|
||||
|
||||
public String getZcnowlydwh() {
|
||||
return zcnowlydwh;
|
||||
}
|
||||
|
||||
public void setZcnowlydwh(String zcnowlydwh) {
|
||||
this.zcnowlydwh = zcnowlydwh;
|
||||
}
|
||||
|
||||
public String getZcnowcfdmc() {
|
||||
return zcnowcfdmc;
|
||||
}
|
||||
|
||||
public void setZcnowcfdmc(String zcnowcfdmc) {
|
||||
this.zcnowcfdmc = zcnowcfdmc;
|
||||
}
|
||||
|
||||
public String getZcbdsj() {
|
||||
return zcbdsj;
|
||||
}
|
||||
|
||||
public void setZcbdsj(String zcbdsj) {
|
||||
this.zcbdsj = zcbdsj;
|
||||
}
|
||||
|
||||
public String getZcbdshrid() {
|
||||
return zcbdshrid;
|
||||
}
|
||||
|
||||
public void setZcbdshrid(String zcbdshrid) {
|
||||
this.zcbdshrid = zcbdshrid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@Table
|
||||
@Comment("资产折旧记录表")
|
||||
public class zcDepreciationRecord {
|
||||
|
||||
@Column
|
||||
@@ -36,6 +35,7 @@ public class zcDepreciationRecord {
|
||||
private int surplus;
|
||||
|
||||
|
||||
|
||||
@Column
|
||||
@Comment("操作日期")
|
||||
@ColDefine(type = ColType.VARCHAR, width = 30)
|
||||
@@ -47,4 +47,12 @@ public class zcDepreciationRecord {
|
||||
private Date depreciationDate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import org.nutz.dao.entity.annotation.*;
|
||||
*/
|
||||
@Table
|
||||
@Data
|
||||
@Comment("资产类型")
|
||||
public class zgfwZclb {
|
||||
|
||||
@Column
|
||||
@@ -42,4 +41,5 @@ public class zgfwZclb {
|
||||
private int depreciationYear;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ZgfwZcxxServiceImpl extends ViServiceImpl<Zgfw_Zcxx> implements Zgf
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
public void doAddByExcelImport(Zgfw_Zcxx[] zxccList) {
|
||||
for (Zgfw_Zcxx zgfw_zcxx : zxccList) {
|
||||
zgfw_zcxx.setZcghlx(zgfw_zcxx.getZcghlx().equals("院级工会固定资产") ? "1" : "2");
|
||||
zgfw_zcxx.setZcghlx(zgfw_zcxx.getZcghlx().equals("院级工会") ? "1" : "2");
|
||||
}
|
||||
dao().insert(zxccList);
|
||||
}
|
||||
@@ -39,11 +39,11 @@ public class ZgfwZcxxServiceImpl extends ViServiceImpl<Zgfw_Zcxx> implements Zgf
|
||||
String lyr_name = zcxx.getZclyrname();
|
||||
String lyr_id = getUserId(lyr_name, lyr_gh);
|
||||
zcxx.setZclyrid(lyr_id);
|
||||
|
||||
/*
|
||||
String jsr_gh = zcxx.getZcjsrgh();
|
||||
String jsr_name = zcxx.getZcjsrname();
|
||||
String jsr_id = getUserId(jsr_name, jsr_gh);
|
||||
zcxx.setZcjsrid(jsr_id);
|
||||
zcxx.setZcjsrid(jsr_id);*/
|
||||
}
|
||||
return zxccList;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,687 @@
|
||||
<!--#
|
||||
layout("/mobile/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.van-card {
|
||||
background: #ffffff;
|
||||
margin: 10px auto 0;
|
||||
width: 96%;
|
||||
border-radius: 10px;
|
||||
padding: 14px 12px;
|
||||
}
|
||||
|
||||
.van-card__thumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.van-card__content > div {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.train-title {
|
||||
flex: 0.6;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.van-doc-card {
|
||||
margin: 14px;
|
||||
padding: 12px;
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
line-height: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.van-divider {
|
||||
margin: 6px 0 5px 0px;
|
||||
border-color: #081776;
|
||||
}
|
||||
|
||||
.van-tabs {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.van-empty {
|
||||
height: 70%;
|
||||
top: 54%;
|
||||
background-color: #F6F7F9;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
<van-nav-bar
|
||||
@click-left="history.back()"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
title="资产列表"
|
||||
></van-nav-bar>
|
||||
|
||||
<div class="search-fixed">
|
||||
<van-dropdown-menu :active-color="themeColor">
|
||||
<van-dropdown-item :options="yearOption" @change="getPdPlan"
|
||||
v-model="pageForm.year"></van-dropdown-item>
|
||||
<van-dropdown-item :options="pdPlanList" v-model="pageForm.zcpdid"></van-dropdown-item>
|
||||
<van-dropdown-item :options="zcLxList" @change="doSearch"
|
||||
v-model="pageForm.zcghlx"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
<van-tabs @click="doSearch" style="margin-top: 53px" v-model="pageForm.isPd">
|
||||
<van-tab title="全部"></van-tab>
|
||||
<van-tab title="已盘点"></van-tab>
|
||||
<van-tab title="未盘点"></van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<div style="margin: 0px auto 0 auto">
|
||||
<van-list
|
||||
:finished="finished"
|
||||
:finished-text="tableData.length>0?'没有更多了':''"
|
||||
:loading="mLoading"
|
||||
@load="onLoad" v-if="tableData.length>0"
|
||||
v-model="mLoading">
|
||||
<div class="van-doc-card" v-for="o in tableData">
|
||||
<div @click="welfareClick(o)" style="position: relative">
|
||||
|
||||
<div>
|
||||
<div class="van-ellipsis"
|
||||
style="margin-top: 6px; font-size: 15px;font-weight: bold;flex: 1">
|
||||
{{o.zcmc}}({{o.zcbh}})
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="train-title"><span
|
||||
style="color: grey">资产规格:</span>{{o.zcxh?o.zcxh:'暂无'}}
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">资产类型:</span>{{o.zcghlx==='1'?'院级工会':'校工会'}}
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">购置日期:</span>{{o.zcgzrq}}
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">存放地名称:</span>{{o.zccfdmc}}
|
||||
</div>
|
||||
<van-divider></van-divider>
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">领用人:</span>
|
||||
{{o.zclyrname?o.zclyrname:'暂无'}}
|
||||
</div>
|
||||
<div class="train-title"><span style="color: grey">领用工会:</span>
|
||||
{{o.zclydwh}}
|
||||
</div>
|
||||
<van-button :color="themeColor" @click.stop="openView(o)" plain round
|
||||
size="mini"
|
||||
style="position: absolute; left: 55%; bottom: 0%; width: 74px; height: 28px"
|
||||
type="primary">
|
||||
查看
|
||||
</van-button>
|
||||
|
||||
<van-button :color="themeColor"
|
||||
:disabled="pdPlanList.length==0||!pageForm.zcpdid||!pdPlanList.find(p=>p.id===pageForm.zcpdid).isShow"
|
||||
@click.stop="openPd(o)"
|
||||
round size="mini"
|
||||
style="position: absolute; left: 77%; bottom: 0%; width: 74px; height: 28px"
|
||||
type="primary"
|
||||
v-if="!o.isPd">
|
||||
开始盘点
|
||||
</van-button>
|
||||
|
||||
<van-button
|
||||
:disabled="pdPlanList.length==0||!pageForm.zcpdid||!pdPlanList.find(p=>p.id===pageForm.zcpdid).isShow"
|
||||
@click.stop="doDelete(o)"
|
||||
round size="mini"
|
||||
style="position: absolute; left: 77%; bottom: 0%; width: 74px; height: 28px"
|
||||
type="danger"
|
||||
v-if="o.isPd">
|
||||
删除盘点
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<div :style="{color:themeColor}"
|
||||
style="text-align: right;position: fixed;bottom: 20px;right: 20px">
|
||||
<van-button :color="themeColor" hairline size="mini" type="primary">
|
||||
总:{{pageForm.totalCount}}条
|
||||
</van-button>
|
||||
<van-button :color="themeColor" @click="doHzExcel" hairline size="mini" type="primary">
|
||||
导出盘点汇总表
|
||||
</van-button>
|
||||
|
||||
</div>
|
||||
<van-empty
|
||||
class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
v-if="mLoading==false&&tableData.length==0"
|
||||
></van-empty>
|
||||
</div>
|
||||
|
||||
|
||||
<van-popup :style="{ height: '100%',width:'100%' }" position="right" v-model="addPdShow">
|
||||
|
||||
<van-nav-bar
|
||||
@click-left="addPdShow=false;doSearch()"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
title="新增盘点"
|
||||
></van-nav-bar>
|
||||
|
||||
<van-form @submit="onSubmit">
|
||||
<van-field :value="formData.zcbh" label="资产编号" readonly required></van-field>
|
||||
<van-field :value="formData.zcmc" label="资产名称" readonly required></van-field>
|
||||
<!-- <van-field :value="formData.zmjz" @touchstart.native.stop="zmjzShow = true" clickable
|
||||
label="账面价值" placeholder="请输入账面价值"
|
||||
readonly></van-field>
|
||||
<van-number-keyboard
|
||||
:show="zmjzShow"
|
||||
@blur="zmjzShow = false"
|
||||
close-button-text="完成"
|
||||
extra-key="."
|
||||
hide-on-click-outside
|
||||
safe-area-inset-bottom
|
||||
theme="custom"
|
||||
v-model="formData.zmjz"
|
||||
></van-number-keyboard>-->
|
||||
|
||||
<van-field :rules="[{ required: true, message: '' }]" :value="formData.zcrksj"
|
||||
@click="zcrksjShow = true"
|
||||
clickable label="入库日期" placeholder="请输入入库日期"
|
||||
readonly
|
||||
required></van-field>
|
||||
|
||||
<van-calendar :color="themeColor" :min-date="new Date('1999-01-01')"
|
||||
@confirm="onConfirmZcrksj" v-model="zcrksjShow"></van-calendar>
|
||||
|
||||
<van-field :rules="[{ required: true, message: '' }]" :value="formData.zcbdsj"
|
||||
@click="zcbdsjShow = true"
|
||||
clickable label="盘点日期" placeholder="请输入盘点日期"
|
||||
readonly
|
||||
required></van-field>
|
||||
|
||||
<van-calendar :color="themeColor" :min-date="new Date('1999-01-01')"
|
||||
@confirm="onConfirmZcbdsj"
|
||||
required v-model="zcbdsjShow"></van-calendar>
|
||||
|
||||
<van-field :rules="[{ required: true, message: '' }]"
|
||||
@input="userRemoteMethod"
|
||||
clickable
|
||||
label="责任人" placeholder="请输入责任人"
|
||||
required
|
||||
v-model="formData.zcbdshr_name"></van-field>
|
||||
|
||||
<van-action-sheet :actions="userList"
|
||||
:close-on-click-overlay="false"
|
||||
@cancel="userList = []"
|
||||
@select="onUserSelect"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
v-model="zcbdshrShow">
|
||||
</van-action-sheet>
|
||||
|
||||
|
||||
<van-field :value="formData.zcnowlydwh" label="院级工会" placeholder="输入责任人联动" readonly
|
||||
required :rules="[{ required: true, message: '' }]"></van-field>
|
||||
|
||||
<template v-if="formData.zcghlx==='2'">
|
||||
<van-field @input="lyrRemoteMethod"
|
||||
clickable
|
||||
label="领用人" placeholder="请输入领用人"
|
||||
v-model="formData.zclyrname"></van-field>
|
||||
|
||||
<van-action-sheet :actions="userList"
|
||||
:close-on-click-overlay="false"
|
||||
@cancel="userList = []"
|
||||
@select="onLyrUserSelect"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
v-model="zclyrnameShow">
|
||||
</van-action-sheet>
|
||||
</template>
|
||||
|
||||
<van-field :rules="[{ required: true, message: '' }]"
|
||||
clickable
|
||||
label="存放地点"
|
||||
maxlength="20" placeholder="请输入存放地点"
|
||||
required
|
||||
v-model="formData.zcnowcfdmc"></van-field>
|
||||
|
||||
<van-field :rules="[{ required: true, message: '' }]" :value="formData.pdzt"
|
||||
@click="pdztShow = true"
|
||||
clickable label="盘点情况" placeholder="请选择盘点情况"
|
||||
readonly
|
||||
required></van-field>
|
||||
|
||||
<van-popup :style="{ height: '40%' }" position="bottom" v-model="pdztShow">
|
||||
<van-picker
|
||||
:columns="pdztColumns"
|
||||
@cancel="pdztShow = false"
|
||||
@confirm="(v)=>{formData.pdzt = v;pdztShow = false}"
|
||||
show-toolbar
|
||||
title="盘点情况"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-field v-model="formData.wpdzt" :rules="[{ required: true, message: '' }]" required
|
||||
v-if="formData.pdzt!='已盘点'&&formData.pdzt!=null"
|
||||
clickable label="盘点情况" placeholder="请输入盘点情况"
|
||||
|
||||
></van-field>
|
||||
|
||||
<!-- <van-popup :style="{ height: '40%' }" position="bottom" v-model="wpdztShow">
|
||||
<van-picker
|
||||
:columns="wpdztColumns"
|
||||
@cancel="wpdztShow = false"
|
||||
@confirm="(v)=>{formData.wpdzt = v;wpdztShow = false}"
|
||||
show-toolbar
|
||||
title="盘点情况"
|
||||
></van-picker>
|
||||
</van-popup>-->
|
||||
|
||||
<van-field :rules="[{ required: true, message: '' }]" :value="formData.zczt"
|
||||
@click="zcztShow = true"
|
||||
clickable label="使用现状" placeholder="请选择使用现状"
|
||||
readonly
|
||||
required></van-field>
|
||||
|
||||
<van-popup :style="{ height: '40%' }" position="bottom" v-model="zcztShow">
|
||||
<van-picker
|
||||
:columns="zcztColumns"
|
||||
@cancel="zcztShow = false"
|
||||
@confirm="(v)=>{formData.zczt = v;zcztShow = false}"
|
||||
show-toolbar
|
||||
show-toolbar
|
||||
title="使用现状"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field :rules="[{ required: true, message: '请上传资产照片' }]" input-align="left"
|
||||
label="资产照片"
|
||||
name="files" required
|
||||
style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">资产照片</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :files.sync="formData.zcFile" :max="1"></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
|
||||
<div style="margin: 16px;">
|
||||
<van-button :color="themeColor" block native-type="submit" round type="info">提交
|
||||
</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
|
||||
|
||||
</van-popup>
|
||||
|
||||
|
||||
<van-popup :style="{ height: '100%',width:'100%' }" position="right" v-model="viewPdShow">
|
||||
|
||||
<van-nav-bar
|
||||
@click-left="viewPdShow=false"
|
||||
fixed
|
||||
left-arrow
|
||||
placeholder
|
||||
title="查看盘点信息"
|
||||
></van-nav-bar>
|
||||
|
||||
<van-tabs @click="openVIewTab" v-model="viewTabs">
|
||||
<van-tab :name="1" title="基本信息">
|
||||
<van-cell-group>
|
||||
<van-field :value="viewData.zcmc" label="资产名称" readonly></van-field>
|
||||
<van-field :value="viewData.zcbh" label="资产编号" readonly></van-field>
|
||||
<van-field :value="viewData.zcdj" label="单价" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.sl" label="数量" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.zcghlx==='1'?'院级工会':'校工会'" label="资产类型"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.zcxh" label="规格型号" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.contentCode" label="类别编号" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.content" label="类别名称" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.zccfdmc" label="存放地点" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.zcrksj" label="入库日期" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.zcgzrq" label="购置日期" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.zclyrname" label="领用人" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.zclydwh" label="领用工会" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.pdzt" label="盘点情况" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="viewData.zczt" label="使用现状" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
|
||||
</van-cell-group>
|
||||
</van-tab>
|
||||
<van-tab :name="2" title="盘点信息">
|
||||
<van-collapse accordion v-if="viewData.bdData&&viewData.bdData.length>0"
|
||||
v-model="collapseName">
|
||||
<van-collapse-item :name="i" :title="o.zcbdsj" v-for="(o,i) in viewData.bdData">
|
||||
<van-field :value="o.zcnowlydwh" label="院级工会" readonly></van-field>
|
||||
<!-- <van-field :value="o.zmjz" label="账面价值" placeholder="暂无"
|
||||
readonly></van-field>-->
|
||||
<van-field :value="o.zcrksj" label="入库时间" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="o.shrname" label="责任人" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="o.mobile" label="联系方式" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="o.pdzt" label="盘点情况" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="o.wpdzt" label="情况说明" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field :value="o.zczt" label="使用现状" placeholder="暂无"
|
||||
readonly></van-field>
|
||||
<van-field abel="资产照片" name="zcfile"
|
||||
required style="flex-flow: column">
|
||||
<template #label>
|
||||
<div class="mb10">资产照片</div>
|
||||
</template>
|
||||
<template #input>
|
||||
<vant-file-upload :del="false" :files.sync="o.zcfile"
|
||||
view></vant-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-collapse-item>
|
||||
</van-collapse>
|
||||
<van-empty class="custom-image"
|
||||
description="暂无数据"
|
||||
image="/none.svg"
|
||||
style="z-index: 1;position: fixed;height: 75%"
|
||||
v-if="viewData.bdData&&viewData.bdData.length==0"
|
||||
></van-empty>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
|
||||
</van-popup>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [mobileMixins],
|
||||
data() {
|
||||
return {
|
||||
collapseName: "",
|
||||
viewTabs: 1,
|
||||
viewData: {
|
||||
bdData: []
|
||||
},
|
||||
viewPdShow: false,
|
||||
zcztColumns: ["在用", "闲置", "损坏", "外携"],
|
||||
zcztShow: false,
|
||||
pdztColumns: ["已盘点", "盘亏", "盘盈", "报废"],
|
||||
pdztShow: false,
|
||||
wpdztColumns: ["盘亏", "报废已清拖", "其他"],
|
||||
wpdztShow: false,
|
||||
userList: [],
|
||||
zcbdshrShow: false,
|
||||
zcbdsjShow: false,
|
||||
zcrksjShow: false,
|
||||
zmjzShow: false,
|
||||
addPdShow: false,
|
||||
yearOption: [],
|
||||
pdPlanList: [],
|
||||
zcLxList: [
|
||||
{value: '', text: "全部类型"},
|
||||
{value: 2, text: "校工会"},
|
||||
{value: 1, text: "院级工会"},
|
||||
],
|
||||
pageForm: {
|
||||
isPd: 2,
|
||||
zcghlx: ''
|
||||
},
|
||||
|
||||
zclyrnameShow: false
|
||||
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'vant-file-upload': httpVueLoader('/components/plugins/VantFileUpload.vue')
|
||||
},
|
||||
methods: {
|
||||
|
||||
doHzExcel() {
|
||||
window.open("/platform/zcgl/gdzcbg/doHzExcel?zcpdid=" + this.pageForm.zcpdid + "&zcghlx=" + this.pageForm.zcghlx)
|
||||
},
|
||||
doDelete(o) {
|
||||
vant.Dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '确认要删除本次盘点吗?',
|
||||
}).then(async () => {
|
||||
const loading = this.$toast.loading({
|
||||
message: '删除中...',
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const resp = await $.post("/platform/zcgl/gdzcbg/doPdDelete", {zcbdid: o.zcbdid})
|
||||
if (resp.code === 0) {
|
||||
await this.doSearch()
|
||||
this.$toast.success(resp.msg);
|
||||
} else {
|
||||
this.$toast.fail(resp.msg);
|
||||
}
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
async openVIewTab(val) {
|
||||
if (val === 2) {
|
||||
await this.getPdData(this.viewData.zcid)
|
||||
if (this.viewData.bdData && this.viewData.bdData.length > 0) {
|
||||
this.collapseName = 0
|
||||
}
|
||||
} else {
|
||||
this.collapseName = ""
|
||||
}
|
||||
},
|
||||
async openView(row) {
|
||||
this.viewTabs = 1
|
||||
this.viewData = clone(row)
|
||||
this.viewPdShow = true
|
||||
},
|
||||
async getPdData(zcid) {
|
||||
const data = await $.post("/platform/zcgl/gdzcbg/queryChangeData", {zcid: zcid})
|
||||
if (data.code === 0) {
|
||||
data.data.forEach(v => {
|
||||
if (v.zcfile) {
|
||||
v.zcfile = JSON.parse(v.zcfile)
|
||||
}
|
||||
})
|
||||
this.$set(this.viewData, "bdData", data.data)
|
||||
} else {
|
||||
this.$set(this.viewData, "bdData", [])
|
||||
}
|
||||
},
|
||||
onUserSelect(u) {
|
||||
this.$set(this.formData, 'zcbdshrid', u.id)
|
||||
this.$set(this.formData, 'zcbdshr_name', u.name)
|
||||
if (this.formData.zcghlx === "2") {
|
||||
this.$set(this.formData, "zcnowlydwh", "校工会")
|
||||
} else {
|
||||
this.$set(this.formData, "zcnowlydwh", u.unionname)
|
||||
this.$set(this.formData, "zcnowlydwhid", u.unionid)
|
||||
}
|
||||
|
||||
this.$set(this.formData, "mobile", u.mobile)
|
||||
this.zcbdshrShow = false
|
||||
},
|
||||
onLyrUserSelect(u) {
|
||||
this.$set(this.formData, "zclyrid", u.id)
|
||||
this.$set(this.formData, "zclyrgh", u.loginname)
|
||||
this.$set(this.formData, "zclyrname", u.username)
|
||||
if (this.formData.zcghlx === "2") {
|
||||
this.$set(this.formData, "zclydwh", "校工会")
|
||||
} else {
|
||||
this.$set(this.formData, "zclydwh", u.unionname)
|
||||
}
|
||||
this.$set(this.formData, "zclydwhid", u.unionid)
|
||||
this.zclyrnameShow = false
|
||||
},
|
||||
onConfirmZcbdsj(date) {
|
||||
this.$set(this.formData, "zcbdsj", moment(date).format('YYYY/MM/DD'))
|
||||
this.zcbdsjShow = false
|
||||
},
|
||||
onConfirmZcrksj(date) {
|
||||
this.$set(this.formData, "zcrksj", moment(date).format('YYYY/MM/DD'))
|
||||
this.zcrksjShow = false
|
||||
},
|
||||
async onSubmit() {
|
||||
let formData = clone(this.formData)
|
||||
formData.pdPlanId = this.pageForm.zcpdid
|
||||
formData.zcFile = JSON.stringify(formData.zcFile)
|
||||
const resp = await $.post("/platform/zcgl/gdzcbg/doSubmit", formData)
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success('新增盘点成功');
|
||||
await this.doSearch();
|
||||
this.addPdShow = false
|
||||
} else {
|
||||
this.$toast.fail('新增盘点失败');
|
||||
}
|
||||
},
|
||||
async openPd(row) {
|
||||
this.formData = row
|
||||
this.$set(this.formData, "zcrksj", row.zcgzrq)
|
||||
this.$set(this.formData, "zcbdsj", moment(new Date()).format('YYYY/MM/DD'))
|
||||
this.$set(this.formData, "zcnowcfdmc", row.zccfdmc)
|
||||
|
||||
this.addPdShow = true
|
||||
},
|
||||
async userRemoteMethod(event) {
|
||||
if (event) {
|
||||
let arr = []
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}") {
|
||||
arr = await searchUser(event, null, null, null, null)
|
||||
} else {
|
||||
arr = await searchUser(event, "${@shiro.getPrincipalProperty('unit').getUnionid()}", null, null, null)
|
||||
}
|
||||
|
||||
this.userList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")",
|
||||
id: v.id,
|
||||
mobile: v.mobile,
|
||||
unionname: v.unionname,
|
||||
loginname: v.loginname,
|
||||
username: v.username,
|
||||
}
|
||||
})
|
||||
this.zcbdshrShow = true
|
||||
}
|
||||
},
|
||||
async lyrRemoteMethod(event) {
|
||||
if (event) {
|
||||
let arr = []
|
||||
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}") {
|
||||
arr = await searchUser(event, null, null, null, null)
|
||||
} else {
|
||||
arr = await searchUser(event, "${@shiro.getPrincipalProperty('unit').getUnionid()}", null, null, null)
|
||||
}
|
||||
|
||||
this.userList = arr.map(v => {
|
||||
return {
|
||||
name: v.username + "(" + v.loginname + ")",
|
||||
id: v.id,
|
||||
mobile: v.mobile,
|
||||
unionname: v.unionname,
|
||||
loginname: v.loginname,
|
||||
username: v.username,
|
||||
unionid: v.unionid,
|
||||
}
|
||||
})
|
||||
this.zclyrnameShow = true
|
||||
}
|
||||
},
|
||||
async doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.finished = false;
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
await this.onLoad();
|
||||
},
|
||||
async onLoad() {
|
||||
this.mLoading = true
|
||||
const res = await $.post('/platform/zcgl/gdzcbg/data', this.pageForm)
|
||||
const {code, data} = res
|
||||
if (this.refreshing) {
|
||||
this.tableData = [];
|
||||
this.refreshing = false;
|
||||
}
|
||||
this.mLoading = false;
|
||||
if (code === 0) {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
|
||||
if (this.tableData.length === 0) {
|
||||
this.finished = true;
|
||||
} else {
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.finished = true;
|
||||
this.pageForm.pageNumber++
|
||||
} else {
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async getPdPlan() {
|
||||
const resp = await $.post("/platform/zcgl/gdzcbg/getPdPlan", {year: this.pageForm.year})
|
||||
resp.data.forEach(v => {
|
||||
const startDate = moment(v.startDate).format('YYYY-MM-DD')
|
||||
const endDate = moment(v.endDate).format('YYYY-MM-DD')
|
||||
v.text = startDate + "至" + endDate
|
||||
v.value = v.id
|
||||
v.isShow = (moment().format('YYYY-MM-DD hh:mm:ss') > v.startDate && moment().format('YYYY-MM-DD hh:mm:ss') < v.endDate)
|
||||
})
|
||||
this.pdPlanList = resp.data
|
||||
if (this.pdPlanList && this.pdPlanList.length > 0) {
|
||||
this.$set(this.pageForm, "zcpdid", this.pdPlanList[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "zcpdid", '')
|
||||
}
|
||||
//
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
const toast = vant.Toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true,
|
||||
message: '数据查询中',
|
||||
});
|
||||
this.mLoading = true
|
||||
for (let i = new Date().getFullYear() - 5; i <= new Date().getFullYear(); i++) {
|
||||
this.yearOption.unshift({value: i, text: i + '年'},)
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearOption[0].value)
|
||||
await this.getPdPlan();
|
||||
setTimeout(async () => {
|
||||
toast.clear();
|
||||
this.mLoading = false
|
||||
await this.doSearch()
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -150,7 +150,14 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" sortable header-align="center" label="状态"
|
||||
<el-table-column align="center" sortable header-align="center" label="挂靠分工会"
|
||||
show-overflow-tooltip prop="belongunionname">
|
||||
<template slot-scope="{ row }">
|
||||
<span>{{ row.belongunionname || '暂无' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!--<el-table-column align="center" sortable header-align="center" label="状态"
|
||||
show-overflow-tooltip prop="isjs">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip content="正常" v-if="!scope.row.isjs" placement="top">
|
||||
@@ -161,7 +168,7 @@ layout("/layouts/platform.html"){
|
||||
<i class="fa fa-circle text-danger ml5"></i>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column align="center" header-align="center" label="操作" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
@@ -177,7 +184,9 @@ layout("/layouts/platform.html"){
|
||||
<el-dropdown-item :command="{type:'edit',data:row}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
|
||||
<el-dropdown-item :command="{type:'openBelong',data:row}">
|
||||
挂靠分工会
|
||||
</el-dropdown-item>
|
||||
<!--#if(@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('xxhgly')){#-->
|
||||
<el-dropdown-item :command="{type:'delete',data:row}">
|
||||
删除
|
||||
@@ -555,6 +564,26 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="设置挂靠分工会" :visible.sync="belongDialogVisible" :close-on-click-modal="false" width="30%" top="2%">
|
||||
|
||||
<div class="demo-input-suffix">
|
||||
挂靠分工会:
|
||||
<el-select v-model="belongUnionId" placeholder="请选择挂靠分工会" style="width: 80%">
|
||||
<el-option
|
||||
v-for="item in unionOptions"
|
||||
:key="item.id"
|
||||
:label="item.unionname"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="belongDialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" :disabled="subDis" @click="onBelong">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
let E = window.wangEditor
|
||||
@@ -569,6 +598,11 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unionOptions: '',
|
||||
belongUnionId: '',
|
||||
belongDialogVisible: false,
|
||||
selectBelongRow: {},
|
||||
|
||||
filterText: '',
|
||||
defaultProps: {
|
||||
children: 'child',
|
||||
@@ -647,6 +681,28 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openBelong(row) {
|
||||
this.selectBelongRow = row
|
||||
this.belongUnionId = row.belongunionid || ''
|
||||
this.belongDialogVisible = true
|
||||
},
|
||||
async onBelong() {
|
||||
if (!this.belongUnionId) {
|
||||
this.$message.warning('请选择挂靠分工会')
|
||||
return
|
||||
}
|
||||
const resp = await $.post("/platform/sys/club/clubInfoManage/onBelongUnion", {
|
||||
id: this.selectBelongRow.id,
|
||||
belongUnionId: this.belongUnionId
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.belongDialogVisible = false
|
||||
this.$message.success(resp.msg)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
async viewInfo(row) {
|
||||
this.$refs.applyInfo.getInfo(row.id)
|
||||
this.$refs.guava.edit()
|
||||
@@ -919,6 +975,8 @@ layout("/layouts/platform.html"){
|
||||
this.doDissolve(data.id)
|
||||
} else if (type === 'delete') {
|
||||
this.doDelete(data.id)
|
||||
} else if (type === 'openBelong') {
|
||||
this.openBelong(data)
|
||||
}
|
||||
},
|
||||
openView(row) {
|
||||
@@ -1055,6 +1113,7 @@ layout("/layouts/platform.html"){
|
||||
this.typeOptions = await getClubType()
|
||||
this.personTypeOptions = await getDictOptions("PERSON_TYPE")
|
||||
this.userStateOptions = await getDictOptions("USER_STATE")
|
||||
this.unionOptions = await getUnion()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<!--<link rel="stylesheet" type="text/css" href="http://unpkg.com/view-design/dist/styles/iview.css">
|
||||
<script type="text/javascript" src="http://unpkg.com/view-design/dist/iview.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="${base!}/assets/platform/plugins/iview/styles/iview.css">
|
||||
<script src="${base!}/assets/platform/plugins/iview/iview.min.js"></script>-->
|
||||
|
||||
|
||||
<style>
|
||||
#app {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
input[type=file] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
margin-bottom: 20px;
|
||||
letter-spacing: 2px;
|
||||
@@ -76,222 +91,280 @@ layout("/layouts/platform.html"){
|
||||
.el-table th.gutter {
|
||||
display: table-cell !important
|
||||
}
|
||||
.el-card__header {
|
||||
padding: 5px 20px !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<el-card class="addFormCard" shadow="never" v-show="AddFormCardShow">
|
||||
<div class="card-title">
|
||||
<span class="title-left">{{sfedit==false?'资产登记':'修改资产'}}</span>
|
||||
</span>
|
||||
<transition name="el-zoom-in-top">
|
||||
<el-card class="box-card" shadow="never" v-show="AddFormCardShow">
|
||||
<template #header>
|
||||
<h3 style="color: #1867b0">{{sfedit==false?'资产登记':'修改资产'}}</h3>
|
||||
</template>
|
||||
<div>
|
||||
<el-form :model="FormData" :rules="ruleForm" label-width="120px" ref="AddForm">
|
||||
<el-row gutter="10">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产名称" prop="zcmc">
|
||||
<el-input v-model="FormData.zcmc"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单  价" prop="zcdj">
|
||||
<el-input-number :precision="2" v-model="FormData.zcdj">
|
||||
</el-input-number>
|
||||
<span style="position: absolute;right: 10px;color: #C0C4CC;">元</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="数  量" prop="sl">
|
||||
<el-input-number v-model="FormData.sl">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产类型" prop="zcghlx">
|
||||
<el-radio-group @change="zcghlxChange" v-model="FormData.zcghlx">
|
||||
<el-radio label="1">院级工会</el-radio>
|
||||
<el-radio label="2">校工会</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="型号规格" prop="zcxh">
|
||||
<el-input v-model="FormData.zcxh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="类别名称" prop="contentCode">
|
||||
<el-select @change="contentCodeChange" clearable placeholder="类别名称"
|
||||
v-model="FormData.contentCode">
|
||||
<el-option :label="item.content+'('+item.contentCode+')'"
|
||||
:value="item.contentCode"
|
||||
v-for="item in lbList"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="资产规格" prop="zcgg">
|
||||
<el-input v-model="FormData.zcgg"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="厂  家" prop="zccj">
|
||||
<el-input v-model="FormData.zccj"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出 厂 号" prop="zccch">
|
||||
<el-input v-model="FormData.zccch"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="存放地点" prop="zccfdmc">
|
||||
<el-input v-model="FormData.zccfdmc"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- </el-row>
|
||||
|
||||
<el-row>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="购置日期" prop="zcgzrq">
|
||||
<el-date-picker @change="$set(FormData, 'zcrksj', FormData.zcgzrq)"
|
||||
placeholder="请输入购置日期" v-model="FormData.zcgzrq"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入库日期" prop="zcrksj">
|
||||
<el-date-picker placeholder="请输入入库日期" v-model="FormData.zcrksj"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="折旧到期时间" prop="depreciationDate">
|
||||
<el-date-picker v-model="FormData.depreciationDate"
|
||||
value-format="yyyy-MM-dd"
|
||||
disabled></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产编号" prop="zcbh">
|
||||
<el-input placeholder="不填为系统自动生成或自己编写"
|
||||
v-model="FormData.zcbh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领用人" prop="zclyrgh">
|
||||
<el-select :loading="loading"
|
||||
:remote-method="SearchJsr"
|
||||
@change="zclyrChange"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="可输入姓名或者工资号查询"
|
||||
remote
|
||||
v-model="FormData.zclyrgh">
|
||||
<el-option :label="item.username+'-'+item.loginname"
|
||||
:value="item.loginname"
|
||||
v-for="item in JsrOption"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="FormData.zclyrname" clearable></el-input>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="领用人工号" prop="zclyrgh">
|
||||
<el-input disabled v-model="FormData.zclyrgh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="经 手 人" prop="zcjsrname">
|
||||
<el-select v-model="FormData.zcjsrname"
|
||||
clearable
|
||||
:loading="loading"
|
||||
:remote-method="SearchJsr"
|
||||
placeholder="可输入姓名或者工资号查询"
|
||||
filterable
|
||||
remote>
|
||||
<el-option v-for="item in JsrOption"
|
||||
:label="item.username+'-'+item.loginname"
|
||||
:value="item.username"></el-option>
|
||||
</el-select>
|
||||
<!– <el-input v-model="FormData.zcjsrname" clearable></el-input>–>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领用工会" prop="zclydwh">
|
||||
<!-- <el-select v-model="FormData.zclydwh"
|
||||
ref="dwelement"
|
||||
clearable
|
||||
:loading="loading"
|
||||
:remote-method="SearchLydw"
|
||||
placeholder="可输入名称或者编号查询"
|
||||
filterable
|
||||
remote>
|
||||
<el-option v-for="item in LydwOption" :label="item.unionname+'-'+item.dwcode"
|
||||
:value="item.unioninfomgr_id"></el-option>
|
||||
</el-select>-->
|
||||
<!-- <el-select v-model="FormData.zclydwh">
|
||||
<el-option value="1C08:工会"></el-option>
|
||||
<el-option value="1C10:分工会"></el-option>
|
||||
</el-select>-->
|
||||
<el-input :value="FormData.zclydwh" disabled
|
||||
v-if="FormData.zcghlx==='2'"></el-input>
|
||||
|
||||
<el-select @change="zclydwhidChange" clearable="true"
|
||||
filterable="true" placeholder="所属工会"
|
||||
style="width: 100%" v-else
|
||||
v-model="FormData.zclydwhid">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in unions"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="供 货 商" prop="zcghs">
|
||||
<el-input v-model="FormData.zcghs"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发 票 号" prop="zcfph">
|
||||
<el-input v-model="FormData.zcfph"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单 据 号" prop="zcdjh">
|
||||
<el-input v-model="FormData.zcdjh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合 同 号" prop="zchth">
|
||||
<el-input v-model="FormData.zchth"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经费卡号" prop="zcjfkh">
|
||||
<el-input v-model="FormData.zcjfkh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="卡上金额" prop="zcjfkje">
|
||||
<el-input-number v-model="FormData.zcjfkje" :precision="2">
|
||||
</el-input-number>
|
||||
<span style="position: absolute;right: 10px;color: #C0C4CC;">元</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="国  别" prop="zcgb">
|
||||
<el-input v-model="FormData.zcgb"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="国标分类号" prop="zcgbflh">
|
||||
<el-input v-model="FormData.zcgbflh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="分类号" prop="zcflh">
|
||||
<el-input v-model="FormData.zcflh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
|
||||
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="盘点情况" prop="pdzt">
|
||||
<el-select clearable filterable placeholder="请选择盘点情况"
|
||||
v-model="FormData.pdzt">
|
||||
<el-option label="已盘点" value="已盘点"></el-option>
|
||||
<el-option label="盘亏" value="盘亏"></el-option>
|
||||
<el-option label="盘盈" value="盘盈"></el-option>
|
||||
<el-option label="报废" value="报废"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="使用现状" prop="zczt">
|
||||
<el-select clearable filterable placeholder="请选择使用现状"
|
||||
v-model="FormData.zczt">
|
||||
<el-option label="在用" value="在用"></el-option>
|
||||
<el-option label="闲置" value="闲置"></el-option>
|
||||
<el-option label="损坏" value="损坏"></el-option>
|
||||
<el-option label="外携" value="外携"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<div class="submitClass">
|
||||
<el-button @click="()=>{window.location.href = document.referrer}" v-if="sfedit">返
|
||||
回
|
||||
</el-button>
|
||||
<el-button @click="doSubmit" type="primary">{{sfedit==false?'登 记':'确 定'}}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-form :model="FormData" :rules="ruleForm" label-width="120px" ref="AddForm">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产名称" prop="zcmc">
|
||||
<el-input v-model="FormData.zcmc"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单  价" prop="zcdj">
|
||||
<el-input-number :precision="2" v-model="FormData.zcdj">
|
||||
</el-input-number>
|
||||
<span style="position: absolute;right: 10px;color: #C0C4CC;">元</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="数  量" prop="sl">
|
||||
<el-input-number v-model="FormData.sl">
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产类型">
|
||||
<el-radio label="1" v-model="FormData.zcghlx">分工会固定资产</el-radio>
|
||||
<el-radio label="2" v-model="FormData.zcghlx">工会固定资产</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产规格型号" prop="zcxh">
|
||||
<el-input v-model="FormData.zcxh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产所属类别" prop="contentCode">
|
||||
<el-select @change="contentCodeChange" clearable placeholder="所属类别"
|
||||
v-model="FormData.contentCode">
|
||||
<el-option :label="item.content+'('+item.contentCode+')'"
|
||||
:value="item.contentCode"
|
||||
v-for="item in lbList"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="资产规格" prop="zcgg">
|
||||
<el-input v-model="FormData.zcgg"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="厂  家" prop="zccj">
|
||||
<el-input v-model="FormData.zccj"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出 厂 号" prop="zccch">
|
||||
<el-input v-model="FormData.zccch"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="存放地点" prop="zccfdmc">
|
||||
<el-input v-model="FormData.zccfdmc"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="购置日期" prop="zcgzrq">
|
||||
<el-date-picker v-model="FormData.zcgzrq"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入库日期" prop="zcrksj">
|
||||
<el-date-picker @change="zcrksjChange" v-model="FormData.zcrksj"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="折旧到期时间" prop="depreciationDate">
|
||||
<el-date-picker disabled
|
||||
v-model="FormData.depreciationDate"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="资产编号" prop="zcbh">
|
||||
<el-input disabled placeholder="系统自动生成"
|
||||
v-model="FormData.zcbh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领用人" prop="zclyrid">
|
||||
<el-select :loading="loading"
|
||||
:remote-method="SearchLyr"
|
||||
@change="zclyrChange"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="可输入姓名或者工资号查询"
|
||||
remote
|
||||
v-model="FormData.zclyrid">
|
||||
<el-option :label="item.username+'-'+item.loginname"
|
||||
:value="item.id"
|
||||
v-for="item in LyrOption"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="FormData.zclyrname" clearable></el-input>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领用人工号" prop="zclyrgh">
|
||||
<el-input disabled v-model="FormData.zclyrgh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="经 手 人" prop="zcjsrname">
|
||||
<el-select :loading="loading"
|
||||
:remote-method="SearchJsr"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="可输入姓名或者工资号查询"
|
||||
remote
|
||||
v-model="FormData.zcjsrname">
|
||||
<el-option :label="item.username+'-'+item.loginname"
|
||||
:value="item.username"
|
||||
v-for="item in JsrOption"></el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="FormData.zcjsrname" clearable></el-input>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="领用单位" prop="zclydwh">
|
||||
<!-- <el-select v-model="FormData.zclydwh"
|
||||
ref="dwelement"
|
||||
clearable
|
||||
:loading="loading"
|
||||
:remote-method="SearchLydw"
|
||||
placeholder="可输入名称或者编号查询"
|
||||
filterable
|
||||
remote>
|
||||
<el-option v-for="item in LydwOption" :label="item.unionname+'-'+item.dwcode"
|
||||
:value="item.unioninfomgr_id"></el-option>
|
||||
</el-select>-->
|
||||
<!-- <el-select v-model="FormData.zclydwh">
|
||||
<el-option value="1C08:工会"></el-option>
|
||||
<el-option value="1C10:分工会"></el-option>
|
||||
</el-select>-->
|
||||
<el-input disabled v-model="FormData.zclydwh"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状  态" prop="zczt">
|
||||
<!-- <el-radio v-model="FormData.zczt" label="1">在用</el-radio>
|
||||
<el-radio v-model="FormData.zczt" label="2">停用</el-radio>
|
||||
<el-radio v-model="FormData.zczt" label="3">报废</el-radio>-->
|
||||
<!-- <el-input v-model="FormData.zczt" clearable></el-input>-->
|
||||
<el-select clearable filterable v-model="FormData.zczt">
|
||||
<el-option label="在用" value="在用"></el-option>
|
||||
<el-option label="闲置" value="闲置"></el-option>
|
||||
<el-option label="未使用" value="未使用"></el-option>
|
||||
<el-option label="待报废" value="待报废"></el-option>
|
||||
<el-option label="校外转入" value="校外转入"></el-option>
|
||||
<el-option label="校内转入" value="校内转入"></el-option>
|
||||
<el-option label="其它" value="其它"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="bz">
|
||||
<el-input v-model="FormData.bz" type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
|
||||
<div class="submitClass">
|
||||
<el-button @click="()=>{window.location.href = document.referrer}" v-if="sfedit">返
|
||||
回
|
||||
</el-button>
|
||||
<el-button @click="doSubmit" type="primary">{{sfedit==false?'登 记':'确 定'}}
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</el-card>
|
||||
</transition>
|
||||
|
||||
<transition name="el-zoom-in-bottom">
|
||||
<el-card class="excelCard" v-show="ExcelCardShow">
|
||||
<div class="mb10">
|
||||
<!-- <span class="excelBack" @click="ExcelCardShow=!ExcelCardShow;AddFormCardShow=!ExcelCardShow;">< 返回</span>-->
|
||||
@@ -320,145 +393,149 @@ layout("/layouts/platform.html"){
|
||||
<span style="float: left;line-height: 30px;">
|
||||
<el-button @click="file=null;tableData=[];" size="small"
|
||||
type="error">删除</el-button>
|
||||
<el-button @click="readExcel" size="small" type="primary">读取</el-button>
|
||||
<el-button @click="readExcel" size="small" type="info">读取</el-button>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="tableData" border empty-text="暂无数据 待上传文件" height="650px">
|
||||
<el-table-column label="编号" width="150px">
|
||||
<el-table-column label="资产名称" width="250px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcbh"></el-input>
|
||||
<el-input disabled v-model="scope.row.zcmc"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" width="150px">
|
||||
<el-table-column label="类别编号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcmc"></el-input>
|
||||
<el-input v-model="scope.row.contentCode"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" width="150px">
|
||||
<el-table-column label="类别名称" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.content"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcxh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="购置日期" width="155px">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.zcgzrq"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="规格" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcgg"></el-input>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="数量" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.sl"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价(元)" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :precision="2" v-model="scope.row.zcdj"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="厂家" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zccj"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出厂号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zccch"></el-input>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="购置日期" width="155px">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.zcgzrq"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="存放地" width="200px">
|
||||
<el-table-column label="备注(存放地点)" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zccfdmc"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="领用人" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zclyrname" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用人编号" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zclyrgh" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="经手人" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcjsrname" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
|
||||
<el-table-column label="入库时间" width="155px">
|
||||
<el-table-column label="单位" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.zcrksj"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
<el-input v-model="scope.row.zclydwh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="单据号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcdjh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zchth"></el-input>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="经费卡号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcjfkh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="卡金额(元)" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :precision="2" v-model="scope.row.zcjfkje"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="分类号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcgbflh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="国别" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcgb"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcfph"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供货商" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcghs"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zczt" clearable></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="领用单位" width="250px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zclydwh" disabled></el-input>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="领用人" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input clearable v-model="scope.row.zclyrname"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="所属工会类型" width="150px">
|
||||
<el-table-column label="领用人工号" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input clearable v-model="scope.row.zclyrgh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产编号" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcbh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="领用人" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zclyrname" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领用人编号" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zclyrgh" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="经手人" width="170px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcjsrname" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库时间" width="155px">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.zcrksj"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcdjh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zchth"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!– <el-table-column label="经费卡号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcjfkh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="卡金额(元)" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :precision="2" v-model="scope.row.zcjfkje"></el-input-number>
|
||||
</template>
|
||||
</el-table-column>–>
|
||||
<el-table-column label="分类号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcgbflh"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="国别" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcgb"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcfph"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供货商" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.zcghs"></el-input>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="资产类型" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-select style="width: 100%" v-model="scope.row.zcghlx">
|
||||
<el-option label="分工会固定资产" value="1"></el-option>
|
||||
<el-option label="工会固定资产" value="2"></el-option>
|
||||
<el-option label="校工会" value="2"></el-option>
|
||||
<el-option label="院级工会" value="1"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" >
|
||||
<template slot-scope="scope">
|
||||
<el-input disabled v-model="scope.row.bz"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
@@ -475,13 +552,16 @@ layout("/layouts/platform.html"){
|
||||
<el-button @click="doSubExcel" type="primary">上 传</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</guava>
|
||||
</transition>
|
||||
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
data: function () {
|
||||
return {
|
||||
unions: [],
|
||||
lbList: [],
|
||||
FormData: {},
|
||||
AddFormCardShow: true,
|
||||
@@ -495,24 +575,25 @@ layout("/layouts/platform.html"){
|
||||
sfedit: false,
|
||||
ruleForm: {
|
||||
zcmc: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcxh: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zcxh: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcgg: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcdj: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zccj: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zccch:[{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcgzrq: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zccfdmc: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zclyrname: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zclyrgh: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zclyrname: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zclyrgh: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zcjsrname: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcrksj: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zcrksj: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zchth:[{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcjfkh: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcjfkje: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcfph: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zcghs: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zczt: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zclydwh: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zczt: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
// zclydwh: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
zcghlx: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sl: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
contentCode: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
}
|
||||
@@ -520,8 +601,31 @@ layout("/layouts/platform.html"){
|
||||
|
||||
},
|
||||
methods: {
|
||||
contentCodeChange() {
|
||||
this.$set(this.FormData, "zcrksj", null);
|
||||
zclydwhidChange(val) {
|
||||
const union = this.unions.find(v => v.id === val)
|
||||
if (union) {
|
||||
this.FormData.zclydwh = union.unionname
|
||||
} else {
|
||||
this.FormData.zclydwh = null
|
||||
}
|
||||
},
|
||||
zcghlxChange(val) {
|
||||
if (val === "2") {
|
||||
this.$set(this.FormData, "zclydwh", "校工会")
|
||||
} else {
|
||||
this.$set(this.FormData, "zclydwh", null)
|
||||
this.$set(this.FormData, "zclydwhid", null)
|
||||
}
|
||||
|
||||
},
|
||||
contentCodeChange(val) {
|
||||
if (val) {
|
||||
const lb = this.lbList.find(v => v.contentCode === val)
|
||||
this.$set(this.FormData, "content", lb.category);
|
||||
} else {
|
||||
this.$set(this.FormData, "content", null);
|
||||
}
|
||||
|
||||
},
|
||||
zcrksjChange(val) {
|
||||
if (!this.FormData.contentCode) {
|
||||
@@ -535,10 +639,22 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.FormData, "depreciationDate", depreciationDate)
|
||||
},
|
||||
zclyrChange(val) {
|
||||
const {loginname, unionname, username} = this.JsrOption.find(v => v.id == val)
|
||||
this.FormData.zclyrgh = loginname
|
||||
this.FormData.zclydwh = unionname
|
||||
const {
|
||||
loginname,
|
||||
username,
|
||||
id,
|
||||
unionname,
|
||||
unionid
|
||||
} = this.JsrOption.find(v => v.loginname == val)
|
||||
this.FormData.zclyrid = id
|
||||
this.FormData.zclyrname = username
|
||||
if (this.FormData.zcghlx === '2') {
|
||||
this.FormData.zclydwh = "校工会"
|
||||
} else {
|
||||
|
||||
this.FormData.zclydwh = unionname
|
||||
}
|
||||
this.FormData.zclydwhid = unionid
|
||||
},
|
||||
handleUpload: function (file) {
|
||||
var self = this;
|
||||
@@ -623,7 +739,7 @@ layout("/layouts/platform.html"){
|
||||
$.post(base + "/platform/zcgl/zcdj/doEdit", self.FormData, function (data) {
|
||||
if (data.code === 0) {
|
||||
self.$message.success('修改成功!');
|
||||
location.href = "/platform/zcgl/tzgl";
|
||||
sublime.jumpPagePjax("/platform/zcgl/tzgl")
|
||||
}
|
||||
})
|
||||
} else {//添加
|
||||
@@ -632,6 +748,7 @@ layout("/layouts/platform.html"){
|
||||
// self.FormData = {};
|
||||
self.$refs.AddForm.resetFields()
|
||||
self.FormData.zcid = undefined
|
||||
self.FormData.zclydwhid = undefined
|
||||
self.$message.success('登记成功!');
|
||||
}
|
||||
});
|
||||
@@ -674,37 +791,36 @@ layout("/layouts/platform.html"){
|
||||
downLoadTemp: function () {
|
||||
window.location.href = '/platform/zcgl/zcdj/downLoadTemp';
|
||||
},
|
||||
findOne: function () {
|
||||
var self = this;
|
||||
$.post(base + "/platform/zcgl/zcdj/findOne", function (data) {
|
||||
findOne() {
|
||||
$.post(base + "/platform/zcgl/zcdj/findOne", (data) => {
|
||||
if (data.data != 1) {
|
||||
self.SearchJsr(data.data.zcjsrid);
|
||||
self.SearchLyr(data.data.zclyrname);
|
||||
self.SearchLydw(data.data.zclydwh);
|
||||
self.FormData = data.data;
|
||||
this.SearchJsr(data.data.zclyrgh);
|
||||
this.SearchLyr(data.data.zclyrgh);
|
||||
this.SearchLydw(data.data.zclydwh);
|
||||
this.FormData = data.data;
|
||||
|
||||
self.sfedit = true;
|
||||
this.sfedit = true;
|
||||
} else {
|
||||
var sj = new Date();
|
||||
/* var sj = new Date();
|
||||
|
||||
var n = sj.getFullYear().toString();
|
||||
var y = (sj.getMonth() + 1).toString();
|
||||
var r = sj.getDate().toString();
|
||||
//查询当前系统中提案数量
|
||||
var n = sj.getFullYear().toString();
|
||||
var y = (sj.getMonth() + 1).toString();
|
||||
var r = sj.getDate().toString();
|
||||
//查询当前系统中提案数量
|
||||
$.post(base + "/platform/zcgl/zcdj/findZcCount", {}, function (data) {
|
||||
if (data.code == 0) {
|
||||
var count = data.data;
|
||||
if (count <= 9) {
|
||||
self.$set(self.FormData, "zcbh", n + y + r + "00" + count);
|
||||
} else if (count >= 10 && count <= 99) {
|
||||
self.$set(self.FormData, "zcbh", n + y + r + "0" + count);
|
||||
//self.FormData.zcbh = n + "0" + count;
|
||||
} else if (count >= 100) {
|
||||
self.$set(self.FormData, "zcbh", n + y + r + "" + count);
|
||||
//self.FormData.zcbh = n + "" + count;
|
||||
}
|
||||
}
|
||||
}, "json");
|
||||
if (data.code == 0) {
|
||||
var count = data.data;
|
||||
if (count <= 9) {
|
||||
self.$set(self.FormData, "zcbh", n + y + r + "00" + count);
|
||||
} else if (count >= 10 && count <= 99) {
|
||||
self.$set(self.FormData, "zcbh", n + y + r + "0" + count);
|
||||
//self.FormData.zcbh = n + "0" + count;
|
||||
} else if (count >= 100) {
|
||||
self.$set(self.FormData, "zcbh", n + y + r + "" + count);
|
||||
//self.FormData.zcbh = n + "" + count;
|
||||
}
|
||||
}
|
||||
}, "json");*/
|
||||
|
||||
}
|
||||
})
|
||||
@@ -732,8 +848,11 @@ layout("/layouts/platform.html"){
|
||||
this.findOne();
|
||||
const data = await $.post("/platform/zcgl/zclb/queryLb")
|
||||
this.lbList = data.data
|
||||
|
||||
this.unions = await getUnions(null)
|
||||
},
|
||||
mounted() {
|
||||
|
||||
if (GetQueryString("importType") !== '') {
|
||||
this.AddFormCardShow = !this.AddFormCardShow
|
||||
this.ExcelCardShow = !this.AddFormCardShow
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,177 +17,199 @@ Created by lyw on 2020/2/17 17:21
|
||||
.el-divider__text {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
.el-descriptions__table {
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
|
||||
.el-descriptions-item__cell {
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
|
||||
.item-center {
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
margin-right: 110px;
|
||||
}
|
||||
|
||||
.item-center .el-form-item__content {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item-sign {
|
||||
width: 200px;
|
||||
height: 130px;
|
||||
}
|
||||
|
||||
.item-form {
|
||||
padding: 0 25px;
|
||||
}
|
||||
|
||||
.el-collapse-item__wrap {
|
||||
padding: 10px 10px;
|
||||
}
|
||||
|
||||
.el-collapse-item__header {
|
||||
border-bottom: 1px solid #eee;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.item-number {
|
||||
color: red;
|
||||
font-weight: 600
|
||||
}
|
||||
|
||||
.el-collapse-item__header {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.el-collapse-item__arrow {
|
||||
color: #1582dc;
|
||||
font-weight: 800 !important;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
||||
style="width: 120px;">
|
||||
<el-option label="编号" value="xx.zcbh"></el-option>
|
||||
<el-option label="名称" value="xx.zcmc"></el-option>
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
v-model="pageForm.searchKeyword">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 120px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="资产编号" value="xx.zcbh"></el-option>
|
||||
<el-option label="资产名称" value="xx.zcmc"></el-option>
|
||||
<el-option label="存放地" value="xx.zccfdmc"></el-option>
|
||||
<el-option label="领用单位" value="xx.zclydwh"></el-option>
|
||||
<el-option label="领用工会" value="xx.zclydwh"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select v-model="pageForm.zcghlx" clearable placeholder="请选择资产类型">
|
||||
<el-option value="2" label="工会固定资产"></el-option>
|
||||
<el-option value="1" label="分工会固定资产"></el-option>
|
||||
<el-select clearable placeholder="请选择资产类型" v-model="pageForm.zcghlx">
|
||||
<el-option label="校工会" value="2"></el-option>
|
||||
<el-option label="院级工会" value="1"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-select v-model="pageForm.contentCode" clearable placeholder="所属类别">
|
||||
<el-option v-for="item in lbList" :label="item.content+'('+item.contentCode+')'"
|
||||
:value="item.contentCode"></el-option>
|
||||
<el-select clearable placeholder="所属类别" v-model="pageForm.contentCode">
|
||||
<el-option :label="item.content+'('+item.contentCode+')'"
|
||||
:value="item.contentCode"
|
||||
v-for="item in lbList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker type="date"
|
||||
placeholder="请选择购置时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="pageForm.zcgzrq"></el-date-picker>
|
||||
<el-date-picker placeholder="请选择购置时间"
|
||||
type="date"
|
||||
v-model="pageForm.zcgzrq"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker type="date"
|
||||
placeholder="请选择入库时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
v-model="pageForm.zcrksj"></el-date-picker>
|
||||
<div class="btn-group tool-button"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}&&pageForm.zcghlx==='1'">
|
||||
<el-select clearable="true"
|
||||
filterable="true" placeholder="所属工会"
|
||||
style="width: 100%"
|
||||
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-button icon="el-icon-search" @click="doSearch"
|
||||
<el-button @click="doSearch" icon="el-icon-search"
|
||||
type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right">
|
||||
<el-button size="medium" @click="doZj"> 折旧</el-button>
|
||||
<el-button size="medium" @click="goExcelImport"><i class="el-icon-upload"></i> 从excel导入</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
<el-card class="mt20" shadow="never">
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="台账列表">
|
||||
<template #func>
|
||||
<el-button @click="goExcelImport" size="small" type="primary"><i class="el-icon-upload"></i>
|
||||
从excel导入
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<!--个人-->
|
||||
<el-table :data="tableData" header-align="center" @sort-change="pageOrder">
|
||||
<el-table :data="tableData" @sort-change="pageOrder" header-align="center">
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="zcbh"
|
||||
label="编号"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zcbh)}}
|
||||
</template>
|
||||
<el-table-column align="center" header-align="center" label="资产编号" prop="zcbh">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="150"
|
||||
prop="zcmc"
|
||||
label="名称"
|
||||
show-overflow-tooltip
|
||||
header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zcmc)}}
|
||||
</template>
|
||||
<el-table-column align="center" header-align="center" label="资产名称" prop="zcmc"
|
||||
show-overflow-tooltip
|
||||
width="150">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zcxh"
|
||||
label="型号规格"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="型号规格"
|
||||
prop="zcxh"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zcxh)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="content"
|
||||
label="资产所属类别"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.content)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zcgzrq"
|
||||
label="购置日期"
|
||||
header-align="center"
|
||||
sortable
|
||||
align="center">
|
||||
<!-- <el-table-column show-overflow-tooltip align="center" header-align="center" label="类别编号"
|
||||
prop="contentCode">
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="类别名称" prop="content" show-overflow-tooltip header-align="center"
|
||||
align="center">
|
||||
</el-table-column>-->
|
||||
<el-table-column align="center" header-align="center" label="购置日期"
|
||||
prop="zcgzrq"
|
||||
show-overflow-tooltip
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
{{isNull(scope.row.zcgzrq)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zclyrname"
|
||||
label="领用人"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="领用人"
|
||||
prop="zclyrname"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zclyrname)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zclydwh"
|
||||
label="领用单位"
|
||||
sortable
|
||||
header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="领用工会"
|
||||
prop="zclydwh"
|
||||
show-overflow-tooltip
|
||||
sortable>
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zclydwh)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zccfdmc"
|
||||
label="存放地名称"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="存放地名称"
|
||||
prop="zccfdmc"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zccfdmc)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
prop="zczt"
|
||||
sortable
|
||||
header-align="center"
|
||||
align="center">
|
||||
<!-- <template scope="scope">
|
||||
<span v-if="scope.row.zczt==1"><i class="fa fa-circle text-success ml5"></i> 在用</span>
|
||||
<span v-if="scope.row.zczt==2"><i class="fa fa-circle text-warning ml5"></i> 停用</span>
|
||||
<span v-if="scope.row.zczt==3"><i class="fa fa-circle text-danger ml5"></i> 报废</span>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" prop="zcghlx" header-align="center" align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="使用现状"
|
||||
prop="zczt"
|
||||
sortable>
|
||||
<template scope="scope">
|
||||
{{scope.row.zcghlx==='1'?'分工会固定资产':'工会固定资产'}}
|
||||
{{isNull(scope.row.zczt)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="资产类型" prop="zcghlx"
|
||||
sortable>
|
||||
<template scope="scope">
|
||||
{{scope.row.zcghlx==='1'?'院级工会':'校工会'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
header-align="center"
|
||||
align="center">
|
||||
label="操作">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown @command="({func, data})=>{func(data)}">
|
||||
@@ -199,10 +221,13 @@ Created by lyw on 2020/2/17 17:21
|
||||
<el-dropdown-item :command="{func:viewInfo,data:scope}">
|
||||
查看
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{func:hrefEdit,data:scope.row.zcid}">
|
||||
<el-dropdown-item
|
||||
:command="{func:hrefEdit,data:scope.row.zcid}"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
|
||||
编辑
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{func:doDel,data:scope.row.zcid}">
|
||||
<el-dropdown-item :command="{func:doDel,data:scope.row.zcid}"
|
||||
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')}">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -212,72 +237,41 @@ Created by lyw on 2020/2/17 17:21
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
<template #view>
|
||||
<el-tabs v-model="activeNames">
|
||||
<el-tab-pane label="基本信息" name="1">
|
||||
<el-descriptions :column="2" border class="table_fixed">
|
||||
<el-descriptions-item label="编号">
|
||||
{{viewData.zcbh}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="名称">
|
||||
{{viewData.zcmc}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单价">
|
||||
{{viewData.zcdj}}元
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="数量">
|
||||
{{viewData.sl}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号">
|
||||
{{viewData.zcxh}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="资产所属类别">
|
||||
{{viewData.content}}({{viewData.contentCode}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="购置日期">
|
||||
{{viewData.zcgzrq}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="入库日期">
|
||||
{{viewData.zcrksj}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="折旧到期时间">
|
||||
{{viewData.depreciationDate}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
{{viewData.zczt}}
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="国标分类号">
|
||||
{{viewData.zcgbflh}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="分类号">
|
||||
{{viewData.zcflh}}
|
||||
</el-descriptions-item>-->
|
||||
<el-descriptions-item label="领用人">
|
||||
{{viewData.zclyrname}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="领用单位">
|
||||
{{viewData.zclydwh}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="经手人">
|
||||
{{viewData.zcjsrname}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="存放地名称">
|
||||
{{viewData.zccfdmc}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-descriptions border>
|
||||
<el-descriptions-item label="资产名称">
|
||||
<div style="font-weight:bold;">
|
||||
{{ viewData.zcmc}}
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单价">{{viewData.zcdj}}元</el-descriptions-item>
|
||||
<el-descriptions-item label="数量">{{viewData.sl}}</el-descriptions-item>
|
||||
<el-descriptions-item label="资产类型"> {{viewData.zcghlx==='1'?'院级工会':'校工会'}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号">{{viewData.zcxh}}</el-descriptions-item>
|
||||
<el-descriptions-item label="类别编号">{{viewData.contentCode}}</el-descriptions-item>
|
||||
<el-descriptions-item label="类别名称">{{viewData.content}}</el-descriptions-item>
|
||||
<el-descriptions-item label="存放地点">{{viewData.zccfdmc}}</el-descriptions-item>
|
||||
<el-descriptions-item label="入库日期">{{viewData.zcrksj}}</el-descriptions-item>
|
||||
<el-descriptions-item label="购置日期">{{viewData.zcgzrq}}</el-descriptions-item>
|
||||
<el-descriptions-item label="资产编号">{{viewData.zcbh}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领用人">{{viewData.zclyrname}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领用工会">{{viewData.zclydwh}}</el-descriptions-item>
|
||||
<el-descriptions-item label="盘点情况">{{viewData.pdzt}}</el-descriptions-item>
|
||||
<el-descriptions-item label="使用现状">{{viewData.zczt}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
@@ -310,7 +304,9 @@ Created by lyw on 2020/2/17 17:21
|
||||
viewDialogVisible: false,
|
||||
activeNames: "1",
|
||||
zcid: "",
|
||||
ghlist: []
|
||||
ghlist: [],
|
||||
|
||||
unions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -419,7 +415,7 @@ Created by lyw on 2020/2/17 17:21
|
||||
const data = await $.post("/platform/zcgl/zclb/queryLb")
|
||||
this.lbList = data.data
|
||||
this.pageData();
|
||||
this.getUnion();
|
||||
this.unions = await getUnions(null)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
@change="doSearch"
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
|
||||
|
||||
<table-tool :app="this" label="计划列表">
|
||||
<template #func>
|
||||
<el-button @click="openAdd" icon="el-icon-s-promotion" size="small"
|
||||
type="primary">新建盘点计划
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData"
|
||||
class="vi-table"
|
||||
ref="table"
|
||||
row-key="id" style="width: 100%">
|
||||
|
||||
<el-table-column :index="indexMethod" align="center" header-align="center"
|
||||
label="序号" type="index"
|
||||
width="80px"></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看
|
||||
</el-button>
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑
|
||||
</el-button>
|
||||
<el-button @click="doDelete(row)" size="mini" type="danger">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:title="title"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%">
|
||||
<el-form :model="formData" :rules="formRules" label-width="100px" ref="addForm">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker
|
||||
:disabled="isView"
|
||||
placeholder="选择年度"
|
||||
style="width: 100%"
|
||||
type="year"
|
||||
v-model="formData.year"
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划时间" prop="planDate">
|
||||
<el-date-picker
|
||||
:disabled="isView"
|
||||
end-placeholder="结束日期"
|
||||
start-placeholder="开始日期"
|
||||
style="width: 100%"
|
||||
type="datetimerange"
|
||||
v-model="formData.planDate"
|
||||
value-format="yyyy-MM-dd HH:mm:ss">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="说明" prop="note">
|
||||
<el-input
|
||||
:disabled="isView"
|
||||
:rows="3"
|
||||
placeholder="请输入说明"
|
||||
type="textarea"
|
||||
v-model="formData.note">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span class="dialog-footer" slot="footer" v-if="!isView">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button @click="doSubmit" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
isView: false,
|
||||
title: "",
|
||||
dialogVisible: false,
|
||||
pageForm: {
|
||||
year: moment().format('YYYY') + ""
|
||||
},
|
||||
formData: {
|
||||
year: null,
|
||||
planDate: [],
|
||||
note: null,
|
||||
},
|
||||
formRules: {
|
||||
year: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
||||
planDate: [{
|
||||
required: true,
|
||||
message: '必选',
|
||||
trigger: ['blur', 'change']
|
||||
}],
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'year', label: '年度'},
|
||||
{prop: 'startDate', label: '开始时间'},
|
||||
{prop: 'endDate', label: '结束时间'},
|
||||
{prop: 'createDate', label: "创建时间"},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.isView = true
|
||||
this.title = "查看计划"
|
||||
this.formData = {
|
||||
year: row.year,
|
||||
planDate: [row.startDate, row.endDate],
|
||||
note: row.note
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
openEdit(row) {
|
||||
this.isView = false
|
||||
this.title = "编辑计划"
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
year: row.year,
|
||||
planDate: [row.startDate, row.endDate],
|
||||
note: row.note
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
async doDelete(row) {
|
||||
const confirm = await this.$confirm('确定删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post(loc() + '/doDelete', {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
doSubmit() {
|
||||
this.$refs["addForm"].validate(async (valid) => {
|
||||
if (valid) {
|
||||
const formData = clone(this.formData)
|
||||
formData.startDate = formData.planDate[0]
|
||||
formData.endDate = formData.planDate[1]
|
||||
const resp = await $.post('/platform/zcgl/zcdj/plan/doSubmit', formData)
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.notifySuccess(resp.msg)
|
||||
} else {
|
||||
this.notifyError(resp.msg)
|
||||
}
|
||||
this.dialogVisible = false
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
openAdd() {
|
||||
this.title = "新增计划"
|
||||
this.formData = {
|
||||
year: moment().format('YYYY') + "",
|
||||
planDate: [],
|
||||
note: null
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -7,52 +7,54 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" clearable @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 120px;">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
v-model="pageForm.searchKeyword">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 120px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="内容" value="content"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.category" clearable placeholder="所属类别">
|
||||
<el-option v-for="item in categoryList" :label="item" :value="item"></el-option>
|
||||
<el-select clearable placeholder="所属类别" v-model="pageForm.category">
|
||||
<el-option :label="item" :value="item" v-for="item in categoryList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button type="primary" @click="openAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增内容
|
||||
</el-button>
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="类别列表" :app="this"></table-tool>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="类别列表">
|
||||
<template #func>
|
||||
<el-button @click="openAdd" size="small" type="primary">
|
||||
<i class="ti-plus"></i>
|
||||
新增内容
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||
<el-table-column label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="250">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
|
||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
||||
<el-button @click="openEdit(row)" size="small" type="primary">编辑</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="small" type="danger">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -62,31 +64,33 @@ layout("/layouts/platform.html"){
|
||||
</guava>
|
||||
|
||||
<el-dialog
|
||||
title=""
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisible"
|
||||
width="40%"
|
||||
:close-on-click-modal="false">
|
||||
title="资产类型"
|
||||
width="40%">
|
||||
|
||||
<el-form :model="formData" :rules="rules" ref="ruleForm" label-width="120px">
|
||||
<el-form :model="formData" :rules="rules" label-width="120px" ref="ruleForm">
|
||||
<el-form-item label="编码" prop="contentCode">
|
||||
<el-input v-model="formData.contentCode" maxlength="30" placeholder="编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="内容" prop="content">
|
||||
<el-input v-model="formData.content" maxlength="30" placeholder="内容"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="折旧年限(年)" prop="depreciationYear">
|
||||
<el-input v-model="formData.depreciationYear" maxlength="30" placeholder="折旧年限(年)"></el-input>
|
||||
<el-input maxlength="30" placeholder="编码" v-model="formData.contentCode"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属类别" prop="content">
|
||||
<el-select v-model="formData.category" clearable placeholder="所属类别" style="width: 100%">
|
||||
<el-option v-for="item in categoryList" :label="item" :value="item"></el-option>
|
||||
<el-input maxlength="30" placeholder="所属类别" v-model="formData.content"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="折旧年限(年)" prop="depreciationYear">
|
||||
<el-input maxlength="30" placeholder="折旧年限(年)"
|
||||
v-model="formData.depreciationYear"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="资产大类" prop="content">
|
||||
<el-select clearable placeholder="资产大类" style="width: 100%"
|
||||
v-model="formData.category">
|
||||
<el-option :label="item" :value="item" v-for="item in categoryList"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="formData.id?doEdit():doAdd()">确 定</el-button>
|
||||
<el-button @click="formData.id?doEdit():doAdd()" type="primary">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -99,12 +103,12 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'contentCode', label: '编码'},
|
||||
{prop: 'content', label: '内容'},
|
||||
{prop: 'category', label: '所属类别'},
|
||||
{prop: 'content', label: '所属类别'},
|
||||
// {prop: 'category', label: '资产大类'},
|
||||
{prop: 'depreciationYear', label: '折旧年限(年)'},
|
||||
],
|
||||
dialogVisible: false,
|
||||
categoryList: ['房屋及构筑物', '通用设备', '专用设备', '家具、用具及装具'],
|
||||
categoryList: ['专用设备', '通用设备', '家具设备'],
|
||||
pageForm: {
|
||||
searchName: 'content'
|
||||
},
|
||||
@@ -112,7 +116,11 @@ layout("/layouts/platform.html"){
|
||||
contentCode: [{required: true, message: '请输入编码', trigger: ['change', 'blur']}],
|
||||
content: [{required: true, message: '请输入内容', trigger: ['change', 'blur']}],
|
||||
category: [{required: true, message: '请选择所属类别', trigger: ['change', 'blur']}],
|
||||
depreciationYear: [{required: true, message: '请输入折旧年限', trigger: ['change', 'blur']}],
|
||||
depreciationYear: [{
|
||||
required: true,
|
||||
message: '请输入折旧年限',
|
||||
trigger: ['change', 'blur']
|
||||
}],
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -161,7 +169,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
resp = await $.post(loc() + "/doEdit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
@@ -176,7 +184,7 @@ layout("/layouts/platform.html"){
|
||||
if (valid) {
|
||||
const resp = await $.post(loc() + "/doAdd", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
this.dialogVisible = false
|
||||
} else {
|
||||
|
||||
@@ -2,47 +2,50 @@
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<style>
|
||||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.el-card {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<div class="p10">
|
||||
<el-card shadow="never">
|
||||
<div id="zttj" style="width: 47%;height: 450px;display: inline-block;"></div>
|
||||
<div style="height: 400px;width: 1px;background-color: gainsboro;display: inline-block;"></div>
|
||||
<div id="jgtj" style="width: 47%;height: 450px;display: inline-block;"></div>
|
||||
</el-card>
|
||||
<!-- <el-card>
|
||||
<div id="fghtj" style="width: 100%;height: 450px;display: inline-block;"></div>
|
||||
</el-card>-->
|
||||
<el-card shadow="never">
|
||||
<div id="nftj" style="width: 100%;height: 450px;display: inline-block;"></div>
|
||||
</el-card>
|
||||
</div>
|
||||
<el-card>
|
||||
<div id="zttj" style="width: 47%;height: 450px;display: inline-block;"></div>
|
||||
<div style="height: 400px;width: 1px;background-color: gainsboro;display: inline-block;"></div>
|
||||
<div id="jgtj" style="width: 47%;height: 450px;display: inline-block;"></div>
|
||||
</el-card>
|
||||
<!-- <el-card>
|
||||
<div id="fghtj" style="width: 100%;height: 450px;display: inline-block;"></div>
|
||||
</el-card>-->
|
||||
<el-card>
|
||||
<div id="nftj" style="width: 100%;height: 450px;display: inline-block;"></div>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
data: function () {
|
||||
return {
|
||||
ghlist: [],
|
||||
nflist: []
|
||||
ghlist:[],
|
||||
nflist:[]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
data: function () {
|
||||
var self = this;
|
||||
$.post(base + "/platform/zcgl/sjkb/data", function (data) {
|
||||
data:function () {
|
||||
var self=this;
|
||||
$.post(base+"/platform/zcgl/sjkb/data",function (data) {
|
||||
self.initZttj(data.data.zttj);
|
||||
var union = data.data.fghtj;
|
||||
var sl = []
|
||||
var union=data.data.fghtj;
|
||||
var sl=[]
|
||||
union.forEach(function (val) {
|
||||
self.ghlist.push(val.unionname);
|
||||
sl.push(val.sl)
|
||||
})
|
||||
var jg = data.data.jgtj[0];
|
||||
var jgsl = [];
|
||||
var jg=data.data.jgtj[0];
|
||||
var jgsl=[];
|
||||
jgsl.push(jg.a);
|
||||
jgsl.push(jg.b);
|
||||
jgsl.push(jg.c);
|
||||
@@ -50,8 +53,8 @@ layout("/layouts/platform.html"){
|
||||
jgsl.push(jg.e);
|
||||
jgsl.push(jg.f);
|
||||
|
||||
var nf = data.data.nftj;
|
||||
var nfsl = []
|
||||
var nf=data.data.nftj;
|
||||
var nfsl=[]
|
||||
nf.forEach(function (val) {
|
||||
self.nflist.push(val.year);
|
||||
nfsl.push(val.sl);
|
||||
@@ -64,7 +67,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
initZttj: function (data) {
|
||||
var self = this;
|
||||
var lmxjHj = echarts.init(document.getElementById("zttj"));
|
||||
var lmxjHj= echarts.init(document.getElementById("zttj"));
|
||||
var option = {
|
||||
title: {
|
||||
text: '固定资产状态统计',
|
||||
@@ -78,7 +81,7 @@ layout("/layouts/platform.html"){
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
data: ['在用', '闲置', '未使用', '待报废', '校外转入', '校内转入', '其它']
|
||||
data: ['在用','闲置','损坏','外携']
|
||||
},
|
||||
series: [
|
||||
{
|
||||
@@ -89,11 +92,8 @@ layout("/layouts/platform.html"){
|
||||
data: [
|
||||
{value: data[0].zy, name: '在用'},
|
||||
{value: data[0].xz, name: '闲置'},
|
||||
{value: data[0].wsy, name: '未使用'},
|
||||
{value: data[0].dbf, name: '待报废'},
|
||||
{value: data[0].xwzr, name: '校外转入'},
|
||||
{value: data[0].xnzr, name: '校内转入'},
|
||||
{value: data[0].qt, name: '其它'}
|
||||
{value: data[0].sh, name: '损坏'},
|
||||
{value: data[0].wx, name: '外携'},
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
@@ -108,7 +108,7 @@ layout("/layouts/platform.html"){
|
||||
lmxjHj.setOption(option);
|
||||
|
||||
},
|
||||
initFghtj: function (data) {
|
||||
initFghtj:function (data) {
|
||||
var dom = document.getElementById("fghtj");
|
||||
var myChart = echarts.init(dom);
|
||||
optionwwrstj = null;
|
||||
@@ -121,7 +121,7 @@ layout("/layouts/platform.html"){
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
title : {
|
||||
text: '固定资产所属分工会统计',
|
||||
},
|
||||
grid: { // 控制图的大小,调整下面这些值就可以,
|
||||
@@ -134,11 +134,13 @@ layout("/layouts/platform.html"){
|
||||
data: this.ghlist,
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
formatter: function (value) {
|
||||
formatter:function(value)
|
||||
{
|
||||
return value.split("").join("\n");
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
@@ -160,7 +162,7 @@ layout("/layouts/platform.html"){
|
||||
myChart.setOption(optionwwrstj, true);
|
||||
}
|
||||
},
|
||||
initjgtj: function (data) {
|
||||
initjgtj:function (data) {
|
||||
var dom = document.getElementById("jgtj");
|
||||
var myChart = echarts.init(dom);
|
||||
optionwwrstj = null;
|
||||
@@ -173,14 +175,14 @@ layout("/layouts/platform.html"){
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
title : {
|
||||
text: '固定资产购置价格统计',
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ["2000以下", "2000-4000", "4000-6000", "6000-8000", "8000-10000", "10000以上"],
|
||||
data: ["2000以下","2000-4000","4000-6000","6000-8000","8000-10000","10000以上"],
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
interval:0,
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
@@ -201,7 +203,7 @@ layout("/layouts/platform.html"){
|
||||
myChart.setOption(optionwwrstj, true);
|
||||
}
|
||||
},
|
||||
initNftj: function (data) {
|
||||
initNftj:function (data) {
|
||||
var dom = document.getElementById("nftj");
|
||||
var myChart = echarts.init(dom);
|
||||
optionwwrstj = null;
|
||||
@@ -214,7 +216,7 @@ layout("/layouts/platform.html"){
|
||||
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
title : {
|
||||
text: '固定资产年度数量统计',
|
||||
},
|
||||
xAxis: {
|
||||
@@ -250,4 +252,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -15,62 +15,67 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<guava>
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword" @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 120px;"
|
||||
clearable>
|
||||
<el-option label="编号" value="zcbh"></el-option>
|
||||
<el-option label="名称" value="zcmc"></el-option>
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
|
||||
v-model="pageForm.searchKeyword">
|
||||
<el-select clearable placeholder="查询类型" slot="prepend"
|
||||
style="width: 120px;"
|
||||
v-model="pageForm.searchName">
|
||||
<el-option label="资产编号" value="zcbh"></el-option>
|
||||
<el-option label="资产名称" value="zcmc"></el-option>
|
||||
<el-option label="存放地" value="zccfdmc"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.zczt" placeholder="资产状态" style="width: 180px;" clearable>
|
||||
<el-select clearable placeholder="资产状态" style="width: 180px;"
|
||||
v-model="pageForm.zczt">
|
||||
<el-option label="在用" value="在用"></el-option>
|
||||
<el-option label="闲置" value="闲置"></el-option>
|
||||
<el-option label="未使用" value="未使用"></el-option>
|
||||
<el-option label="待报废" value="待报废"></el-option>
|
||||
<el-option label="校外转入" value="校外转入"></el-option>
|
||||
<el-option label="校内转入" value="校内转入"></el-option>
|
||||
<el-option label="其它" value="其它"></el-option>
|
||||
<el-option label="损坏" value="损坏"></el-option>
|
||||
<el-option label="外携" value="外携"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
v-model="time"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="购置日期"
|
||||
end-placeholder="购置日期"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
range-separator="-"
|
||||
start-placeholder="购置日期"
|
||||
type="daterange"
|
||||
v-model="time"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.zcghlx" placeholder="请选择资产类型">
|
||||
<el-option value="2" label="工会固定资产"></el-option>
|
||||
<el-option value="1" label="分工会固定资产"></el-option>
|
||||
<el-select placeholder="请选择资产类型" v-model="pageForm.zcghlx">
|
||||
<el-option label="校工会" value="2"></el-option>
|
||||
<el-option label="院级工会" value="1"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5" v-if="pageForm.zcghlx==='1'">
|
||||
<el-select v-model="pageForm.ghid" placeholder="领用工会" style="width: 180px;" clearable>
|
||||
<el-option v-for="item in ghlist" :label="item.unionname" :value="item.id"></el-option>
|
||||
<el-select clearable placeholder="领用工会" style="width: 180px;"
|
||||
v-model="pageForm.ghid">
|
||||
<el-option :label="item.unionname" :value="item.id"
|
||||
v-for="item in ghlist"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-button icon="el-icon-search" @click="doSearch" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
<div class="pull-right offscreen-right mt5">
|
||||
<el-button type="primary" @click="doAllExport" icon="el-icon-download">总账导出</el-button>
|
||||
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="资产列表">
|
||||
<template #func>
|
||||
<el-button @click="doAllExport" size="small" type="primary"><i class="download"></i>
|
||||
台账导出
|
||||
</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
<!--个人-->
|
||||
<el-table
|
||||
:data="tableData"
|
||||
@@ -78,149 +83,140 @@ layout("/layouts/platform.html"){
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="zcbh"
|
||||
label="编号"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zcbh)}}
|
||||
</template>
|
||||
<el-table-column align="center" header-align="center" label="资产编号" prop="zcbh"
|
||||
width="150px">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="150"
|
||||
prop="zcmc"
|
||||
show-overflow-tooltip
|
||||
label="名称"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zcmc)}}
|
||||
</template>
|
||||
<el-table-column align="center" header-align="center" label="资产名称" prop="zcmc"
|
||||
show-overflow-tooltip
|
||||
width="150">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zcxh"
|
||||
label="型号"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="型号规格"
|
||||
prop="zcxh"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zcxh)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zcgg"
|
||||
label="规格"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zcgg)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zcgzrq"
|
||||
label="购置日期"
|
||||
sortable
|
||||
header-align="center"
|
||||
align="center">
|
||||
<!-- <el-table-column show-overflow-tooltip align="center" header-align="center" label="类别编号"
|
||||
prop="contentCode">
|
||||
</el-table-column>-->
|
||||
<!-- <el-table-column label="类别名称" prop="content" show-overflow-tooltip header-align="center"
|
||||
align="center">
|
||||
</el-table-column>-->
|
||||
<el-table-column align="center" header-align="center" label="购置日期"
|
||||
prop="zcgzrq"
|
||||
show-overflow-tooltip
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
{{isNull(scope.row.zcgzrq)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zclyrname"
|
||||
label="领用人"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="领用人"
|
||||
prop="zclyrname"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zclyrname)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zclydwh"
|
||||
label="领用单位"
|
||||
header-align="center"
|
||||
sortable
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="领用工会" prop="zclydwh"
|
||||
show-overflow-tooltip
|
||||
sortable>
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zclydwh)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
prop="zccfdmc"
|
||||
label="存放地名称"
|
||||
header-align="center"
|
||||
align="center">
|
||||
<el-table-column align="center" header-align="center" label="存放地名称"
|
||||
prop="zccfdmc"
|
||||
show-overflow-tooltip>
|
||||
<template scope="scope">
|
||||
{{isNull(scope.row.zccfdmc)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
prop="zczt"
|
||||
header-align="center"
|
||||
sortable
|
||||
align="center">
|
||||
<!-- <template scope="scope">
|
||||
<span v-if="scope.row.zczt==1"><i class="fa fa-circle text-success ml5"></i> 在用</span>
|
||||
<span v-if="scope.row.zczt==2"><i class="fa fa-circle text-warning ml5"></i> 停用</span>
|
||||
<span v-if="scope.row.zczt==3"><i class="fa fa-circle text-danger ml5"></i> 报废</span>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" prop="zcghlx" header-align="center" align="center" sortable>
|
||||
<el-table-column align="center" header-align="center" label="使用现状"
|
||||
prop="zczt"
|
||||
sortable>
|
||||
<template scope="scope">
|
||||
{{scope.row.zcghlx==='1'?'分工会固定资产':'工会固定资产'}}
|
||||
{{isNull(scope.row.zczt)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="资产类型" prop="zcghlx"
|
||||
sortable>
|
||||
<template scope="scope">
|
||||
{{scope.row.zcghlx==='1'?'院级工会':'校工会'}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="200"
|
||||
label="操作"
|
||||
align="center"
|
||||
header-align="center"
|
||||
align="center">
|
||||
label="操作"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" @click="viewInfo(scope)">查看</el-button>
|
||||
<el-button size="mini" type="primary" @click="doExport(scope.row.zcid)">导出</el-button>
|
||||
<el-button @click="viewInfo(scope)" size="small" type="primary">查看
|
||||
</el-button>
|
||||
<!-- <el-button size="small" @click="doExport(scope.row.zcid)">导出</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
<el-row class="el-pagination-container">
|
||||
<el-pagination
|
||||
@size-change="pageSizeChange"
|
||||
@current-change="pageNumberChange"
|
||||
:current-page="pageForm.pageNumber"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pageForm.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pageForm.totalCount">
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:total="pageForm.totalCount"
|
||||
@current-change="pageNumberChange"
|
||||
@size-change="pageSizeChange"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<el-descriptions border>
|
||||
<el-descriptions-item label="资产名称">
|
||||
<div style="font-weight:bold;">
|
||||
{{ viewData.zcmc}}
|
||||
</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="单价">{{viewData.zcdj}}元</el-descriptions-item>
|
||||
<el-descriptions-item label="数量">{{viewData.sl}}</el-descriptions-item>
|
||||
<el-descriptions-item label="资产类型"> {{viewData.zcghlx==='1'?'院级工会':'校工会'}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="规格型号">{{viewData.zcxh}}</el-descriptions-item>
|
||||
<el-descriptions-item label="类别编号">{{viewData.contentCode}}</el-descriptions-item>
|
||||
<el-descriptions-item label="类别名称">{{viewData.content}}</el-descriptions-item>
|
||||
<el-descriptions-item label="存放地点">{{viewData.zccfdmc}}</el-descriptions-item>
|
||||
<el-descriptions-item label="入库日期">{{viewData.zcrksj}}</el-descriptions-item>
|
||||
<el-descriptions-item label="购置日期">{{viewData.zcgzrq}}</el-descriptions-item>
|
||||
<el-descriptions-item label="资产编号">{{viewData.zcbh}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领用人">{{viewData.zclyrname}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领用工会">{{viewData.zclydwh}}</el-descriptions-item>
|
||||
<el-descriptions-item label="盘点情况">{{viewData.pdzt}}</el-descriptions-item>
|
||||
<el-descriptions-item label="使用现状">{{viewData.zczt}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
|
||||
<!-- 个人 查看详情-->
|
||||
<el-dialog
|
||||
title="详情"
|
||||
:visible.sync="viewDialogVisible"
|
||||
width="60%"
|
||||
custom-class="ViewDialogClass"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="viewDialogVisible"
|
||||
custom-class="ViewDialogClass"
|
||||
title="详情"
|
||||
width="60%"
|
||||
>
|
||||
<el-tabs v-model="activeNames">
|
||||
<el-tab-pane label="基本信息" name="1">
|
||||
@@ -260,7 +256,7 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item label="领用人">{{viewData.zclyrname}}</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item label="领用单位">{{viewData.zclydwh}}</el-form-item>
|
||||
<el-form-item label="领用工会">{{viewData.zclydwh}}</el-form-item>
|
||||
</el-col>
|
||||
<el-col span="12">
|
||||
<el-form-item label="经手人">{{viewData.zcjsrname}}</el-form-item>
|
||||
@@ -353,17 +349,17 @@ layout("/layouts/platform.html"){
|
||||
const {searchKeyword, searchName, zczt, zcghlx, ghid} = this.pageForm
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
if (this.time && this.time .length>0) {
|
||||
if (this.time && this.time.length > 0) {
|
||||
startTime = this.time[0];
|
||||
endTime = this.time[1];
|
||||
}
|
||||
window.location.href = '/platform/zcgl/zhcx/doExport?searchKeyword='+searchKeyword+
|
||||
'&searchName='+searchName+
|
||||
'&zczt='+zczt+
|
||||
'&zcghlx='+zcghlx+
|
||||
"&ghid="+ghid+
|
||||
'&startTime='+startTime+
|
||||
'&endTime='+endTime
|
||||
window.location.href = '/platform/zcgl/zhcx/doExport?searchKeyword=' + searchKeyword +
|
||||
'&searchName=' + searchName +
|
||||
'&zczt=' + zczt +
|
||||
'&zcghlx=' + zcghlx +
|
||||
"&ghid=" + ghid +
|
||||
'&startTime=' + startTime +
|
||||
'&endTime=' + endTime
|
||||
},
|
||||
|
||||
doExport(id) {
|
||||
@@ -418,10 +414,9 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
viewInfo: function (scope) {
|
||||
var self = this;
|
||||
self.viewData = JSON.parse(JSON.stringify(scope.row));
|
||||
self.viewDialogVisible = true;
|
||||
viewInfo(scope) {
|
||||
this.viewData = JSON.parse(JSON.stringify(scope.row));
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
getUnion: function () {
|
||||
var self = this;
|
||||
@@ -439,4 +434,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
@@ -9,51 +9,51 @@ layout("/layouts/platform.html"){
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
placeholder="年度"
|
||||
value-format="yyyy"
|
||||
format="yyyy年"
|
||||
placeholder="年度"
|
||||
type="year"
|
||||
v-model="pageForm.year"
|
||||
type="year">
|
||||
value-format="yyyy">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" clearable @keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型" style="width: 120px;">
|
||||
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容" v-model="pageForm.searchKeyword">
|
||||
<el-select placeholder="查询类型" slot="prepend" style="width: 120px;" v-model="pageForm.searchName">
|
||||
<el-option label="内容" value="zcmc"></el-option>
|
||||
<el-option label="编号" value="zcbh"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select v-model="pageForm.contentCode" clearable placeholder="所属类别">
|
||||
<el-option v-for="item in lbList" :label="item.content+'('+item.contentCode+')'"
|
||||
:value="item.contentCode"></el-option>
|
||||
<el-select clearable placeholder="所属类别" v-model="pageForm.contentCode">
|
||||
<el-option :label="item.content+'('+item.contentCode+')'" :value="item.contentCode"
|
||||
v-for="item in lbList"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button mt5">
|
||||
<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>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="资产折旧信息" :app="this"></table-tool>
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="资产折旧信息"></table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" style="width: 100%">
|
||||
<el-table-column type="index" label="序号" width="80px"></el-table-column>
|
||||
<el-table-column label="序号" type="index" width="80px"></el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" header-align="center" label="操作" width="150">
|
||||
<el-table-column align="center" header-align="center" label="操作" width="250">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="danger" @click="doDelete(row.id)">删除</el-button>
|
||||
<el-button @click="doDelete(row.id)" size="small" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -123,4 +123,4 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
#-->
|
||||
|
||||
Reference in New Issue
Block a user