zhangsiqi
9 months ago
2 changed files with 202 additions and 0 deletions
@ -0,0 +1,48 @@ |
|||
package com.ruoyi.erp.controller; |
|||
|
|||
|
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.entity.SysUser; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
import com.ruoyi.common.utils.ShiroUtils; |
|||
import com.ruoyi.erp.domain.ErpBomVo; |
|||
import com.ruoyi.erp.service.IErpBomService; |
|||
import org.apache.shiro.authz.annotation.RequiresPermissions; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Controller; |
|||
import org.springframework.ui.ModelMap; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
|
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
@Controller |
|||
@RequestMapping("/erp/estimate") |
|||
public class ErpEstimateContorller extends BaseController { |
|||
private String prefix = "erp/estimate"; |
|||
@Autowired |
|||
private IErpBomService erpBomService; |
|||
@GetMapping("") |
|||
public String estimate(ModelMap mmap) |
|||
{ |
|||
mmap.put("currentUser", ShiroUtils.getSysUser()); |
|||
return prefix + "/estimate"; |
|||
} |
|||
|
|||
/** |
|||
* 查询bom列表 |
|||
*/ |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(ErpBomVo erpBomVo) |
|||
{ |
|||
SysUser curUser = ShiroUtils.getSysUser(); |
|||
Long userId = curUser.getUserId(); |
|||
startPage(); |
|||
List<ErpBomVo> list = erpBomService.selectErpBomList(erpBomVo); |
|||
return getDataTable(list); |
|||
} |
|||
} |
@ -0,0 +1,154 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('估价列表')" /> |
|||
<th:block th:include="include :: select2-css" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>估价单号:</label> |
|||
<input type="text" /> |
|||
</li> |
|||
<li> |
|||
<label>客户ID:</label> |
|||
<input type="text" /> |
|||
</li> |
|||
<li> |
|||
<label>客户公司名称:</label> |
|||
<input type="text" /> |
|||
</li> |
|||
<li> |
|||
<label>料号:</label> |
|||
<input type="text" /> |
|||
</li> |
|||
<li> |
|||
<label>物料名称:</label> |
|||
<input type="text" /> |
|||
</li> |
|||
<li> |
|||
<label>估价状态:</label> |
|||
<select> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</li> |
|||
<li class="select-time"> |
|||
<label>录入时间:</label> |
|||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> |
|||
<span>-</span> |
|||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> |
|||
</li> |
|||
<li> |
|||
<label>业务员:</label> |
|||
<select> |
|||
<option value="">所有</option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:ctc:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="erp:ctc:edit"> |
|||
<i class="fa fa-edit"></i> 编辑 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="erp:ctc:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a>--> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="erp:ctc:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: select2-js" /> |
|||
<script th:src="@{/js/activiti.js}"></script> |
|||
<!-- <script th:src="@{/ajax/libs/vue/vue.js}"></script>--> |
|||
<!-- <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>--> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('erp:ctc:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('erp:ctc:remove')}]]; |
|||
var cancelFlag = [[${@permission.hasPermi('erp:ctc:cancel')}]]; |
|||
var restoreFlag = [[${@permission.hasPermi('erp:ctc:restore')}]]; |
|||
var ctcTypeDatas = [[${@dict.getType('sys_erp_ctcType')}]]; |
|||
var currencyDatas = [[${@dict.getType('sys_common_currency')}]]; |
|||
var userName = [[${@permission.getPrincipalProperty('userName')}]]; |
|||
var prefix = ctx + "erp/estimate"; |
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
cancelUrl: prefix + "/cancel/{id}", |
|||
restoreUrl: prefix + "/restore/{id}", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "估价表", |
|||
fixedColumns: true, // 启用冻结列 |
|||
fixedRightNumber: 1, // 冻结右列个数 |
|||
columns: [ |
|||
{checkbox: true}, |
|||
{title: '估价状态',field: ''}, |
|||
{title: '员工ID',field: 'staffNo',visible: false}, |
|||
{title: '业务员',field: 'saleStaff'}, |
|||
{title: '估价单号',field: ''}, |
|||
{title: '使用状态',field: 'useStatus',visible: false}, |
|||
{title: '客户ID',field: 'enterpriseCode'}, |
|||
{title: '客户公司名称',field: 'enterpriseName'}, |
|||
{title: '物料合计',field: 'enterprise'}, |
|||
{title: '数量合计',field: 'enterpriseSum'}, |
|||
{title: '估价币种',field: 'currency', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(currencyDatas, value); |
|||
} |
|||
}, |
|||
{title: '物料合计',field: 'enterprise'}, |
|||
{title: '数量合计',field: 'enterpriseSum'}, |
|||
{title: '报价币种',field: 'commonCurrency'}, |
|||
{title: '国内汇率',field: 'rmbTax',visible: false}, |
|||
{title: '美元汇率',field: 'usdTax',visible: false}, |
|||
{title: '不含税总价(RMB)',field: 'noRmbSum'}, |
|||
{title: '含税总价(RMB)',field: 'rmbSum'}, |
|||
{title: '不含税总价(美元)',field: 'noUsdSum'}, |
|||
{title: '含税总价(美元)',field: 'usdSum'}, |
|||
{title: '录入人',field: 'createBy'}, |
|||
{title: '录入时间',field: 'createTime'}, |
|||
{title: '上次录入时间',field: 'updateTime'}, |
|||
{title: '备注',field: '',visible: false}, |
|||
{title: '操作',align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> '); |
|||
if(row.delFlag == '0'){ |
|||
actions.push('<a class="btn btn-danger btn-xs ' + cancelFlag + '" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i>作废</a> '); |
|||
}else{ |
|||
actions.push('<a class="btn btn-success btn-xs ' + restoreFlag + '" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.id + '\')"><i class="fa fa-window-restore"></i>恢复</a> '); |
|||
} |
|||
return actions.join(''); |
|||
} |
|||
} |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue