2025-05-30 02:10:24 +00:00
<!DOCTYPE html>
< html lang = "zh" xmlns:th = "http://www.thymeleaf.org" xmlns:shiro = "http://www.pollix.at/thymeleaf/shiro" >
< head >
2025-05-30 09:32:14 +00:00
< th:block th:include = "include :: header('项目管理列表')" / >
2025-05-30 02:10:24 +00:00
< / head >
2025-05-30 09:32:14 +00:00
< style >
.sortBox {
display: flex;
float: right;
flex-direction: column;
gap: 0;
height: 20px;
justify-content: center;
2025-06-05 07:52:23 +00:00
margin-right: 30px;
2025-05-30 09:32:14 +00:00
}
2025-06-13 02:44:54 +00:00
.bootstrap-table table {
table-layout: fixed;
}
2025-05-30 09:32:14 +00:00
.sortBox div {
font-size: 10px;
transform: scale(1.2, 1);
cursor: pointer;
color: #bbb;
}
.sortBox .timeAction {
color: #000;
}
.timeSearch {
display: flex;
gap: 20px;
align-items: center;
}
.highlightRow {
color: red;
}
2025-06-06 11:59:13 +00:00
.disableBtnfalse {
color: #ccc;
}
2025-06-10 08:44:04 +00:00
.select-list li p, .select-list li label:not(.radio-box){
width: 80px;
}
2025-05-30 09:32:14 +00:00
< / style >
2025-05-30 02:10:24 +00:00
< body class = "gray-bg" >
2025-05-30 09:32:14 +00:00
< div class = "container-div" >
2025-06-10 08:44:04 +00:00
<!-- <div th:replace="layout/product - list::configInfoTable('','','')"></div> -->
2025-05-30 09:32:14 +00:00
< div class = "row" >
< div class = "col-sm-12 search-collapse" >
< form id = "formId" >
< div class = "select-list" >
< ul >
< li >
< label > 项目编号:< / label >
< input type = "text" name = "projectCode" / >
< / li >
< li >
< label > 项目名称:< / label >
< input type = "text" name = "projectName" / >
< / li >
< li >
2025-06-05 07:52:23 +00:00
< label > 最终客户:< / label >
2025-06-06 09:34:50 +00:00
< input type = "text" name = "customerName" / >
2025-05-30 09:32:14 +00:00
< / li >
< li >
2025-06-05 07:52:23 +00:00
< label > BG: < / label >
< select name = "bgProperty" class = "form-control" th:with = "type=${@dict.getType('bg_type')}"
onchange="changeBg()" required>
< option value = "" > 请选择BG< / option >
2025-06-03 09:38:14 +00:00
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}"
th:value="${dict.dictValue}">< / option >
< / select >
2025-05-30 09:32:14 +00:00
< / li >
2025-06-05 07:52:23 +00:00
< li >
< label > 行业:< / label >
2025-06-06 11:59:13 +00:00
< div id = "industryTypeBox" style = "float: right" >
2025-06-05 07:52:23 +00:00
< select name = "industryType" class = "form-control" required >
< option value = "" > 请先选择BG< / option >
< / select >
< / div >
< / li >
2025-06-10 08:44:04 +00:00
< li >
< label > 代表处:< / label >
< input type = "text" name = "agentName" / >
< / li >
2025-05-30 09:32:14 +00:00
< li >
< label > 项目把握度:< / label >
2025-06-05 07:52:23 +00:00
< select name = "projectGraspDegree" onchange = "changeTimeType()" value = "0" >
< option value = "" > 请选择< / option >
2025-06-06 08:41:11 +00:00
< option value = "A" > A< / option >
< option value = "B" > B< / option >
< option value = "C" > C< / option >
2025-06-03 09:38:14 +00:00
< / select >
2025-05-30 09:32:14 +00:00
< / li >
< li >
2025-06-10 08:44:04 +00:00
< label > 项目阶段:< / label >
< select name = "projectStage" class = "form-control"
th:with="type=${@dict.getType('project_stage')}">
2025-06-11 08:15:09 +00:00
< option value = "" > 请选择项目阶段< / option >
2025-06-10 08:44:04 +00:00
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}"
th:value="${dict.dictValue}">< / option >
< / select >
2025-06-05 07:52:23 +00:00
< / li >
< li >
2025-06-10 08:44:04 +00:00
< label > 汇智负责人:< / label >
< input type = "text" name = "hzSupportUserName" / >
2025-05-30 09:32:14 +00:00
< / li >
2025-06-13 02:44:54 +00:00
< li >
< label > POC: < / label >
< select type = "text" name = "poc" >
< option value = "" > 请选择POC< / option >
< option value = "1" > 是< / option >
< option value = "0" > 否< / option >
< / select >
< / li >
2025-06-10 08:44:04 +00:00
2025-05-30 09:32:14 +00:00
< li class = "timeSearch" style = "width: 80%" >
< div >
< label > 时间选择:< / label >
< select name = "timeType" onchange = "changeTimeType()" value = "0" >
< option value = "0" > 预计下单时间< / option >
2025-06-11 08:15:09 +00:00
< option value = "2" > 更新时间< / option >
2025-05-30 09:32:14 +00:00
< / select >
< / div >
< div class = "timeSearch" >
< input name = "estimatedOrderTimeStart" type = "text" class = "input-sm form-control"
id="laydate-startTime"
placeholder="yyyy-MM-dd"/>
< span > 到< / span >
< input name = "estimatedOrderTime" type = "text" class = "input-sm form-control"
id="laydate-endTime"
placeholder="yyyy-MM-dd"/>
< / div >
< / 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 >
2025-06-05 07:52:23 +00:00
2025-05-30 09:32:14 +00:00
< / ul >
< input type = "hidden" name = "orderByColumn" / >
< input type = "hidden" name = "isAsc" / >
< / div >
< / form >
< / div >
< div class = "btn-group-sm" id = "toolbar" role = "group" >
2025-06-13 09:52:41 +00:00
< a class = "btn btn-success" onclick = "$.operate.addFull()" shiro:hasPermission = "sip:project:add" >
2025-05-30 09:32:14 +00:00
< i class = "fa fa-plus" > < / i > 添加
< / a >
2025-06-11 09:55:55 +00:00
2025-05-30 09:32:14 +00:00
< a class = "btn btn-danger multiple disabled" onclick = "$.operate.removeAll()"
shiro:hasPermission="sip:product:remove">
< i class = "fa fa-remove" > < / i > 删除
< / a >
2025-06-13 09:52:41 +00:00
< a class = "btn btn-warning" onclick = "$.table.exportExcel()" shiro:hasPermission = " sip:project:export" >
2025-05-30 09:32:14 +00:00
< i class = "fa fa-download" > < / i > 导出
< / a >
< / div >
< div class = "col-sm-12 select-table table-striped" >
< table id = "bootstrap-table" > < / table >
2025-05-30 02:10:24 +00:00
< / div >
< / div >
2025-05-30 09:32:14 +00:00
< / div >
< th:block th:include = "include :: footer" / >
2025-06-13 02:44:54 +00:00
< th:block th:include = "include :: bootstrap-table-fixed-columns-js" / >
2025-05-30 09:32:14 +00:00
< script th:inline = "javascript" >
2025-06-13 09:52:41 +00:00
var editFlag = [[${@permission.hasPermi('sip:project:edit')}]];
var removeFlag = [[${@permission.hasPermi('sip:project:remove')}]];
2025-05-30 09:32:14 +00:00
var prefix = ctx + "sip/project";
$(function () {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "项目管理",
2025-06-13 02:44:54 +00:00
fixedColumns: true,
fixedRightNumber:1,
2025-05-30 09:32:14 +00:00
columns: [{
checkbox: true
},
2025-05-30 02:10:24 +00:00
{
field: 'id',
title: '',
2025-05-30 09:32:14 +00:00
visible: false,
2025-05-30 02:10:24 +00:00
},
{
field: 'projectCode',
2025-06-10 08:44:04 +00:00
title: '项目编号',
2025-06-13 02:44:54 +00:00
width: 100,
2025-05-30 09:32:14 +00:00
escape: true,
formatter: (value, row, index) => {
if (row.highlight) {
return `< span class = "highlight" > ${value}< / span > `
2025-06-06 11:59:13 +00:00
} else {
2025-06-06 08:41:11 +00:00
return `< span > ${value}< / span > `
2025-05-30 09:32:14 +00:00
}
}
2025-05-30 02:10:24 +00:00
},
{
field: 'projectName',
2025-06-13 02:44:54 +00:00
title: '项目名称',
width: 300
2025-05-30 02:10:24 +00:00
},
{
field: 'customerName',
2025-06-13 02:44:54 +00:00
title: '最终客户',
width: 200
2025-06-05 07:52:23 +00:00
},
{
field: 'bgProperty',
title: 'BG',
2025-06-13 02:44:54 +00:00
width: 100,
2025-06-05 07:52:23 +00:00
formatter: function (value, row, index) {
return $.table.selectDictLabel([[${@dict.getType('bg_type')}]], value);
}
2025-05-30 02:10:24 +00:00
},
{
field: 'industryType',
2025-06-05 07:52:23 +00:00
title: '行业',
2025-06-13 02:44:54 +00:00
width: 100,
2025-06-05 07:52:23 +00:00
formatter: function (value, row, index) {
2025-06-10 08:44:04 +00:00
if (row.bgProperty === 'YYS') {
2025-06-05 07:52:23 +00:00
return $.table.selectDictLabel([[${@dict.getType('bg_yys')}]], value);
2025-06-06 11:59:13 +00:00
} else {
2025-06-10 08:44:04 +00:00
return $.table.selectDictLabel([[${@dict.getType('bg_hysy')}]], value);
2025-06-05 07:52:23 +00:00
}
}
2025-05-30 02:10:24 +00:00
},
{
2025-06-05 07:52:23 +00:00
field: 'agentName',
2025-06-13 02:44:54 +00:00
title: '代表处',
width: 100
2025-05-30 02:10:24 +00:00
},
{
field: 'projectGraspDegree',
2025-06-05 07:52:23 +00:00
title: '项目把握度',
2025-06-13 02:44:54 +00:00
width: 100,
2025-06-11 08:15:09 +00:00
formatter: function (value, row, index) {
2025-06-13 09:52:41 +00:00
return value?'< div style = "text-align: center" > '+value+'< / div > ':'-'
2025-06-11 08:15:09 +00:00
}
2025-05-30 02:10:24 +00:00
},
{
2025-05-30 09:32:14 +00:00
field: 'projectStage',
2025-06-05 07:52:23 +00:00
title: '项目阶段',
2025-06-13 02:44:54 +00:00
width: 100,
2025-06-05 07:52:23 +00:00
formatter: function (value, row, index) {
return $.table.selectDictLabel([[${@dict.getType('project_stage')}]], value);
}
2025-05-30 02:10:24 +00:00
},
{
2025-06-09 07:59:26 +00:00
field: 'hzSupportUserName',
2025-06-13 02:44:54 +00:00
title: '汇智负责人',
width: 100
2025-05-30 02:10:24 +00:00
},
2025-06-10 08:44:04 +00:00
{
2025-06-13 02:44:54 +00:00
field: 'poc',
title: 'POC',
width: 100,
formatter: function (value, row, index) {
return value==='1'?'是':'否';
}
2025-06-10 08:44:04 +00:00
},
2025-05-30 02:10:24 +00:00
{
field: 'estimatedAmount',
2025-06-10 08:44:04 +00:00
title: '预计金额(元)',
2025-06-13 02:44:54 +00:00
width: 140,
2025-06-10 08:44:04 +00:00
formatter: function (value, row, index) {
return value?formatAmountNumber(value):'';
}
2025-05-30 02:10:24 +00:00
},
{
field: 'estimatedOrderTime',
2025-05-30 09:32:14 +00:00
title: '预计下单时间',
2025-06-05 07:52:23 +00:00
class: 'time1',
width: 140
2025-05-30 02:10:24 +00:00
},
{
2025-06-05 07:52:23 +00:00
field: 'updateTime',
2025-06-10 08:44:04 +00:00
title: '更新时间',
2025-06-05 07:52:23 +00:00
class: 'time3',
2025-06-11 08:15:09 +00:00
width: 160,
formatter: function (value, row, index) {
return value;
}
2025-05-30 02:10:24 +00:00
},
{
title: '操作',
align: 'center',
2025-06-13 02:44:54 +00:00
width: 300,
2025-06-10 08:44:04 +00:00
titleTooltip:true,
2025-05-30 09:32:14 +00:00
formatter: function (value, row, index) {
2025-05-30 02:10:24 +00:00
var actions = [];
2025-06-06 09:34:50 +00:00
actions.push('< a class = "btn btn-success btn-xs mb5' + editFlag + '" href = "javascript:void(0)" onclick = "$.operate.editFull(\'' + row.id + '\')" > < i class = "fa fa-edit" > < / i > 项目详情< / a > ');
2025-06-06 11:59:13 +00:00
actions.push('< a class = "btn btn-success btn-xs mb5' + editFlag + '" href = "javascript:void(0)" onclick = "openOrder(' + row.id + ',' + row.canGenerate + ')" name = "disableBtn' + row.canGenerate + '" > < i class = "fa fa-refresh" > < / i > 生成订单< / a > ');
2025-06-05 07:52:23 +00:00
actions.push('< a class = "btn btn-danger btn-xs mb5' + removeFlag + '" href = "javascript:void(0)" onclick = "$.operate.remove(\'' + row.id + '\')" > < i class = "fa fa-remove" > < / i > 删除< / a > ');
2025-05-30 02:10:24 +00:00
return actions.join('');
}
2025-05-30 09:32:14 +00:00
}],
onPostBody: () => {
initHighlight()
}
};
$.table.init(options);
initSrot()
changeTimeType()
layui.use('laydate', function () {
var laydate = layui.laydate;
var startDate = laydate.render({
elem: '#laydate-startTime',
max: $('#laydate-endTime').val(),
theme: 'molv',
trigger: 'click',
done: function (value, date) {
// 结束时间大于开始时间
if (value !== '') {
endDate.config.min.year = date.year;
endDate.config.min.month = date.month - 1;
endDate.config.min.date = date.date;
} else {
endDate.config.min.year = '';
endDate.config.min.month = '';
endDate.config.min.date = '';
}
}
});
var endDate = laydate.render({
elem: '#laydate-endTime',
min: $('#laydate-startTime').val(),
theme: 'molv',
trigger: 'click',
done: function (value, date) {
// 开始时间小于结束时间
if (value !== '') {
startDate.config.max.year = date.year;
startDate.config.max.month = date.month - 1;
startDate.config.max.date = date.date;
} else {
startDate.config.max.year = '';
startDate.config.max.month = '';
startDate.config.max.date = '';
}
}
});
})
});
function initHighlight() {
$('span.highlight').parent().parent().addClass('highlightRow')
}
function initSrot() {
2025-06-13 09:52:41 +00:00
let sort1 = $(`< div class = "sortBox" > < div class = "sortBtn timeAction" onclick = "changeSort(this,0)" sort = "asc" > ▲< / div > < div class = "sortBtn" onclick = "changeSort(this,0)" sort = "desc" > ▼< / div > < / div > `)
2025-05-30 09:32:14 +00:00
$('thead .time1 .th-inner').append(sort1)
2025-06-13 09:52:41 +00:00
let sort2 = $(`< div class = "sortBox" > < div class = "sortBtn" onclick = "changeSort(this,1)" sort = "asc" > ▲< / div > < div onclick = "changeSort(this,1)" class = "sortBtn" sort = "desc" > ▼< / div > < / div > `)
2025-05-30 09:32:14 +00:00
$('thead .time2 .th-inner').append(sort2)
2025-06-13 09:52:41 +00:00
let sort3 = $(`< div class = "sortBox" > < div class = "sortBtn" onclick = "changeSort(this,2)" sort = "asc" > ▲< / div > < div onclick = "changeSort(this,2)" class = "sortBtn" sort = "desc" > ▼< / div > < / div > `)
2025-05-30 09:32:14 +00:00
$('thead .time3 .th-inner').append(sort3)
}
2025-06-13 09:52:41 +00:00
2025-05-30 09:32:14 +00:00
function changeSort(ele, index) {
2025-06-13 09:52:41 +00:00
2025-05-30 09:32:14 +00:00
let arr = ['estimated_orderTime', 'estimated_deliverTime', 'update_time']
$('.sortBox').find('.timeAction').removeClass('timeAction')
$(ele).addClass('timeAction')
$('input[name="orderByColumn"]').val(arr[index])
$('input[name="isAsc"]').val($(ele).attr('sort'))
$.table.search()
}
function changeTimeType() {
let timeType = $("[name='timeType']").val()
if (timeType == 0) {
$('#laydate-startTime').attr('name', 'estimatedOrderTimeStart')
$('#laydate-endTime').attr('name', 'estimatedOrderTimeEnd')
} else if (timeType == 1) {
$('#laydate-startTime').attr('name', 'estimatedDeliverTimeStart')
$('#laydate-endTime').attr('name', 'estimatedDeliverTimeEnd')
} else if (timeType == 2) {
$('#laydate-startTime').attr('name', 'updateTimeStart')
$('#laydate-endTime').attr('name', 'updateTimeEnd')
}
}
2025-06-06 11:59:13 +00:00
2025-06-05 07:52:23 +00:00
function changeBg() {
if ($('[name="bgProperty"]').val() != 'YYS') {
let datas = [[${@dict.getType('bg_hysy')}]]
let str = ``
datas.forEach((ele) => {
str += `< option value = "${ele.dictValue}" > ${ele.dictLabel}< / option > `
})
$('#industryTypeBox').html(`
< select name = "industryType" class = "form-control" required >
< option value = "" > 请选择行业< / option >
${str}
< / select >
`)
} else {
let datas = [[${@dict.getType('bg_yys')}]]
let str = ``
datas.forEach((ele) => {
str += `< option value = "${ele.dictValue}" > ${ele.dictLabel}< / option > `
})
$('#industryTypeBox').html(`
< select name = "industryType" class = "form-control" required >
< option value = "" > 请选择行业< / option >
${str}
< / select >
`)
}
2025-05-30 09:32:14 +00:00
2025-06-05 07:52:23 +00:00
}
2025-05-30 09:32:14 +00:00
2025-06-06 11:59:13 +00:00
function openOrder(id, canAdd) {
if (!canAdd) {
$.modal.alertWarning("该项目已存在订单");
return
}
var options = {
title: "新建订单",
url: ctx + `project/order/add`,
maxmin: false,
full: true,
index: 1000,
width: 1050,
2025-06-09 07:59:26 +00:00
btn: ['确定', '关闭'],
2025-06-06 11:59:13 +00:00
yes: function (index, layero) {
let body = parent.layer.getChildFrame('body', index)
2025-06-08 07:14:25 +00:00
if ($(body.find('#form-order-add').get(0)).validate().form()) {
2025-06-09 06:17:32 +00:00
layero.find('iframe')[0].contentWindow.saveSelect()
2025-06-08 07:14:25 +00:00
}else{
$.modal.alertWarning("请完善表单");
2025-06-06 11:59:13 +00:00
}
},
};
window.localStorage.setItem('projcetDataId', id)
$.modal.openOptions(options)
}
2025-05-30 09:32:14 +00:00
< / script >
2025-05-30 02:10:24 +00:00
< / body >
< / html >