New file |
| | |
| | | package com.zy.crm.manager.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.crm.common.web.BaseController; |
| | | import com.zy.crm.manager.entity.CompanyMoney; |
| | | import com.zy.crm.manager.service.CompanyMoneyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class CompanyMoneyController extends BaseController { |
| | | |
| | | @Autowired |
| | | private CompanyMoneyService companyMoneyService; |
| | | |
| | | @RequestMapping(value = "/companyMoney/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(companyMoneyService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/companyMoney/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<CompanyMoney> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | wrapper.eq("user_id",getUserId()); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(companyMoneyService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/companyMoney/add/auth") |
| | | @ManagerAuth |
| | | public R add(CompanyMoney companyMoney) { |
| | | Date now = new Date(); |
| | | companyMoney.setUserId(getUserId()); |
| | | companyMoney.setCreateTime(now); |
| | | companyMoney.setUpdateTime(now); |
| | | companyMoney.setUpdateUserId(getUserId()); |
| | | companyMoneyService.insert(companyMoney); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/companyMoney/update/auth") |
| | | @ManagerAuth |
| | | public R update(CompanyMoney companyMoney){ |
| | | if (Cools.isEmpty(companyMoney) || null==companyMoney.getId()){ |
| | | return R.error(); |
| | | } |
| | | companyMoneyService.updateById(companyMoney); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/companyMoney/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | companyMoneyService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/companyMoney/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<CompanyMoney> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("companyMoney")); |
| | | convert(map, wrapper); |
| | | List<CompanyMoney> list = companyMoneyService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/companyMoneyQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<CompanyMoney> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<CompanyMoney> page = companyMoneyService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (CompanyMoney companyMoney : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", companyMoney.getId()); |
| | | map.put("value", companyMoney.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/companyMoney/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<CompanyMoney> wrapper = new EntityWrapper<CompanyMoney>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != companyMoneyService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(CompanyMoney.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | private BusinessTripOtherService businessTripOtherService; |
| | | @Autowired |
| | | private ReimburseOnlineService reimburseOnlineService; |
| | | @Autowired |
| | | private CompanyMoneyService companyMoneyService; |
| | | |
| | | //获取团队数据 |
| | | @RequestMapping(value = "/dashboard/companyData/auth") |
| | |
| | | int planPriOnlinePendingTaskCount = planService.selectCount(new EntityWrapper<Plan>().eq("status", 1).eq("settle",4)); |
| | | map.put("planPriOnlinePendingTaskCount", planPriOnlinePendingTaskCount); |
| | | |
| | | Double successMoney1 = companyMoneyService.selectMoneyReceivablesAll(getUserId(), year); |
| | | map.put("successMoney1", successMoney1==null? 0:successMoney1); |
| | | |
| | | Double successMoney2 = companyMoneyService.selectMoneyActualReceiptsAll(getUserId(), year); |
| | | map.put("successMoney2", successMoney2==null? 0:successMoney2); |
| | | |
| | | |
| | | return R.ok().add(map); |
New file |
| | |
| | | package com.zy.crm.manager.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("man_company_money") |
| | | public class CompanyMoney implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 年度 |
| | | */ |
| | | @ApiModelProperty(value= "年度") |
| | | private String year; |
| | | |
| | | /** |
| | | * 应收款 |
| | | */ |
| | | @ApiModelProperty(value= "应收款") |
| | | private Double receivables; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("user_id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("update_user_id") |
| | | private Long updateUserId; |
| | | |
| | | /** |
| | | * 员工ID,null表示数据属于公司 |
| | | */ |
| | | @ApiModelProperty(value= "员工ID,null表示数据属于公司") |
| | | private Long staff; |
| | | |
| | | /** |
| | | * 完成情况,预留字段 |
| | | */ |
| | | @ApiModelProperty(value= "完成情况,预留字段") |
| | | private String complete; |
| | | |
| | | /** |
| | | * 项目ID |
| | | */ |
| | | @ApiModelProperty(value= "项目ID") |
| | | @TableField("order_id") |
| | | private Long orderId; |
| | | |
| | | /** |
| | | * 实际收款 |
| | | */ |
| | | @ApiModelProperty(value= "实际收款") |
| | | @TableField("actual_receipts") |
| | | private Double actualReceipts; |
| | | |
| | | public CompanyMoney() {} |
| | | |
| | | public CompanyMoney(String year, Double receivables, Date createTime, Long userId, Date updateTime, Long updateUserId, Long staff, String complete, Long orderId, Double actualReceipts) { |
| | | this.year = year; |
| | | this.receivables = receivables; |
| | | this.createTime = createTime; |
| | | this.userId = userId; |
| | | this.updateTime = updateTime; |
| | | this.updateUserId = updateUserId; |
| | | this.staff = staff; |
| | | this.complete = complete; |
| | | this.orderId = orderId; |
| | | this.actualReceipts = actualReceipts; |
| | | } |
| | | |
| | | // CompanyMoney companyMoney = new CompanyMoney( |
| | | // null, // 年度 |
| | | // null, // 应收款 |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // |
| | | // null, // 员工ID,null表示数据属于公司 |
| | | // null, // 完成情况,预留字段 |
| | | // null, // 项目ID |
| | | // null // 实际收款 |
| | | // ); |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.crm.manager.entity.CompanyMoney; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface CompanyMoneyMapper extends BaseMapper<CompanyMoney> { |
| | | |
| | | Double selectMoneyReceivablesAll(@Param("userId")Long userId, @Param("year")String year); |
| | | Double selectMoneyActualReceiptsAll(@Param("userId")Long userId, @Param("year")String year); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.crm.manager.entity.CompanyMoney; |
| | | |
| | | public interface CompanyMoneyService extends IService<CompanyMoney> { |
| | | |
| | | Double selectMoneyReceivablesAll(Long userId, String year); |
| | | Double selectMoneyActualReceiptsAll(Long userId, String year); |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.crm.manager.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.crm.manager.entity.CompanyMoney; |
| | | import com.zy.crm.manager.mapper.CompanyMoneyMapper; |
| | | import com.zy.crm.manager.service.CompanyMoneyService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("companyMoneyService") |
| | | public class CompanyMoneyServiceImpl extends ServiceImpl<CompanyMoneyMapper, CompanyMoney> implements CompanyMoneyService { |
| | | |
| | | @Override |
| | | public Double selectMoneyReceivablesAll(Long userId, String year){return this.baseMapper.selectMoneyReceivablesAll(userId,year);} |
| | | @Override |
| | | public Double selectMoneyActualReceiptsAll(Long userId, String year){return this.baseMapper.selectMoneyActualReceiptsAll(userId,year);} |
| | | |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.crm.manager.mapper.CompanyMoneyMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.crm.manager.entity.CompanyMoney"> |
| | | <id column="id" property="id" /> |
| | | <result column="year" property="year" /> |
| | | <result column="receivables" property="receivables" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user_id" property="updateUserId" /> |
| | | <result column="staff" property="staff" /> |
| | | <result column="complete" property="complete" /> |
| | | <result column="order_id" property="orderId" /> |
| | | <result column="actual_receipts" property="actualReceipts" /> |
| | | |
| | | </resultMap> |
| | | |
| | | <select id="selectMoneyReceivablesAll" resultType="java.lang.Double"> |
| | | select sum(receivables) receivables from man_company_money |
| | | where year(create_time) = #{year} |
| | | and user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="selectMoneyActualReceiptsAll" resultType="java.lang.Double"> |
| | | select sum(actual_receipts) actualReceipts from man_company_money |
| | | where year(create_time) = #{year} |
| | | and user_id = #{userId} |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#companyMoney', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/companyMoney/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'id', align: 'center',title: 'ID', hide: true} |
| | | ,{field: 'orderId', align: 'center',title: '项目ID', hide: false} |
| | | ,{field: 'year', align: 'center',title: '年度', hide: false} |
| | | ,{field: 'receivables', align: 'center',title: '应收款', hide: false} |
| | | ,{field: 'actualReceipts', align: 'center',title: '实际收款', hide: false} |
| | | ,{field: 'userId', align: 'center',title: '业务员', hide: true} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间', hide: false} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间', hide: true} |
| | | ,{field: 'updateUserId', align: 'center',title: '更新人员', hide: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(companyMoney)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(companyMoney)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'companyMoney': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/companyMoney/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(companyMoney)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '600px', |
| | | title: (mData ? '修改' : '添加') + '订单状态', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/companyMoney/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/companyMoney/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">编号:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="companyMoney" lay-filter="companyMoney"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> |
| | | <button class="layui-btn layui-btn-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/companyMoney/companyMoney.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">年度: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="year" placeholder="请输入年度"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">应收款: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="receivables" placeholder="请输入应收款"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">项目ID: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="orderId" placeholder="请输入项目ID"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">实际收款: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="actualReceipts" placeholder="请输入实际收款"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <div class="layui-card-header testColorBlack" style="background-color: #FFFA1C1C">实时销售情况</div> |
| | | <div class="layui-card-body" style="padding-bottom: 20px;background-color: #FFC6A02D"> |
| | | <div class="layui-row"> |
| | | <div class="testColorBlack">个人数据</div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="testColorBlack" style="">个人数据</div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">年度销售目标</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="personYearTarget">124,543,233</span><em class="numberInfoSuffix">万元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">已完成销售任务</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="personSuccess">124,543,233</span><em class="numberInfoSuffix">万元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">未完成销售任务</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="personProgress">124,543,233</span><em class="numberInfoSuffix">万元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">完成率</div> |
| | | <div class="numberInfoValue"><span id="personRate">92</span>%</div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">个人项目实际收款</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="successMoney2">124,543,233</span><em class="numberInfoSuffix">万元</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top: 40px;"> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">跟踪项目数量</div> |
| | | <div class="numberInfoValue"> |
| | | <a href="#" id="openProgress" style="color: #1E9FFF"><span id="progressCount">124</span><em class="numberInfoSuffix">个</em></a> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">跟踪项目金额</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="progressMoney">124,543,233</span><em class="numberInfoSuffix">万元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">成交项目数量</div> |
| | | <div class="numberInfoValue"> |
| | | <a href="#" id="openSuccess" style="color: #1E9FFF"><span id="successCount">121</span><em class="numberInfoSuffix">个</em></a> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg3 text-center"> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">成交项目金额</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="successMoney">124,543,233</span><em class="numberInfoSuffix">万元</em> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-sm6 layui-col-lg2 text-center" style="margin-left: 3%"> |
| | | <div class="numberInfoSubTitle testColorBlack">个人项目应收款</div> |
| | | <div class="numberInfoValue"> |
| | | <span id="successMoney1">124,543,233</span><em class="numberInfoSuffix">万元</em> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | $("#businessTripPendingTaskCount").text(res.data.businessTripPendingTaskCount) |
| | | $("#reimburseOnlinePendingTaskCount").text(res.data.reimburseOnlinePendingTaskCount) |
| | | $("#planPriOnlinePendingTaskCount").text(res.data.planPriOnlinePendingTaskCount) |
| | | $("#successMoney1").text(res.data.successMoney1) |
| | | $("#successMoney2").text(res.data.successMoney2) |
| | | } |
| | | }); |
| | | |