Merge remote-tracking branch 'origin/master'
commit
ab440f6896
|
@ -339,9 +339,6 @@
|
|||
|
||||
$(function () {
|
||||
initProductList()
|
||||
var layerIndex = parent.layer.index
|
||||
parent.layer.full(layerIndex)
|
||||
|
||||
$("input[name='estimatedOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
|
@ -490,14 +487,14 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode3">
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode2">
|
||||
${hardwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.productCode}">${ele.productCode}</option>`
|
||||
}).join('')
|
||||
}
|
||||
|
||||
</select></td>
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control model" lay-search="" lay-filter="productModel1">
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel2">
|
||||
${hardwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.model}">${ele.model}</option>`
|
||||
}).join('')
|
||||
|
@ -526,14 +523,14 @@ ${hardwareProjectProductInfoList.map((ele) => {
|
|||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode2">
|
||||
<td class="layui-form"><select name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode3">
|
||||
${hardwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.productCode}">${ele.productCode}</option>`
|
||||
}).join('')
|
||||
}
|
||||
|
||||
</select></td>
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel2">
|
||||
<td class="layui-form"><select name="maintenanceProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel3">
|
||||
${hardwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.model}">${ele.model}</option>`
|
||||
}).join('')
|
||||
|
|
|
@ -377,8 +377,6 @@
|
|||
$(function () {
|
||||
initProductList()
|
||||
var layerIndex = parent.layer.index
|
||||
parent.layer.full(layerIndex)
|
||||
|
||||
$("input[name='estimatedOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
|
@ -556,13 +554,13 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td class="layui-form"><input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}">
|
||||
<select value="${data.productBomCode || ''}" name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
||||
<select value="${data.productBomCode || ''}" name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode2">
|
||||
${hardwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.productCode}">${ele.productCode}</option>`
|
||||
}).join('')
|
||||
}
|
||||
</select></td>
|
||||
<td class="layui-form"><select value="${data.model || ''}" name="hardwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel1">
|
||||
<td class="layui-form"><select value="${data.model || ''}" name="hardwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel2">
|
||||
${hardwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.model}">${ele.model}</option>`
|
||||
}).join('')
|
||||
|
@ -591,13 +589,13 @@ ${hardwareProjectProductInfoList.map((ele) => {
|
|||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td class="layui-form"><input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}">
|
||||
<select value="${data.productBomCode || ''}" name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
||||
<select value="${data.productBomCode || ''}" name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode3">
|
||||
${maintenanceProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.productCode}">${ele.productCode}</option>`
|
||||
}).join('')
|
||||
}
|
||||
</select></td>
|
||||
<td class="layui-form"><select value="${data.model || ''}" name="maintenanceProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel1">
|
||||
<td class="layui-form"><select value="${data.model || ''}" name="maintenanceProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel3">
|
||||
${maintenanceProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.model}">${ele.model}</option>`
|
||||
}).join('')
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</li>
|
||||
<li>
|
||||
<label>最终客户:</label>
|
||||
<input type="text" name="customerCode"/>
|
||||
<input type="text" name="customerName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>项目阶段:</label>
|
||||
|
@ -135,10 +135,10 @@
|
|||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="sip:product:add">
|
||||
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="sip:product:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.editFull()"
|
||||
shiro:hasPermission="sip:product:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
|
@ -265,7 +265,7 @@
|
|||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs mb5' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>项目详情</a> ');
|
||||
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> ');
|
||||
actions.push('<a class="btn btn-success btn-xs mb5' + editFlag + '" href="javascript:void(0)" onclick=`openOrder(${row})`><i class="fa fa-refresh"></i>生成订单</a> ');
|
||||
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>');
|
||||
return actions.join('');
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>合同编号<span class="is-required">*</span></td>
|
||||
<td><input type="text" name="orderCode" class="form-control" placeholder="自动生成">
|
||||
<td><input type="text" name="orderCode" class="form-control" readonly placeholder="自动生成">
|
||||
</td>
|
||||
<td>币种<span class="is-required">*</span></td>
|
||||
<td>
|
||||
|
@ -244,7 +244,7 @@
|
|||
<div class="layui-tab-item layui-show">
|
||||
<div class="section-title">配置信息</div>
|
||||
<h3>软件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct()">添加</button>
|
||||
<button type="button" class="add-btn" onclick="addProduct({})">添加</button>
|
||||
<table id="productTable" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -267,7 +267,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3>硬件</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct2()">添加</button>
|
||||
<button type="button" class="add-btn" onclick="addProduct2({})">添加</button>
|
||||
<table id="productTable2" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -290,7 +290,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3>维保</h3>
|
||||
<button type="button" class="add-btn" onclick="addProduct3()">添加</button>
|
||||
<button type="button" class="add-btn" onclick="addProduct3({})">添加</button>
|
||||
<table id="productTable3" class="productTable">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -328,7 +328,17 @@
|
|||
上传</i>
|
||||
</button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
<table id="fileBox">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>合同名称</th>
|
||||
<th>上传人</th>
|
||||
<th>上传时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -378,9 +388,6 @@
|
|||
|
||||
$(function () {
|
||||
initProductList()
|
||||
var layerIndex = parent.layer.index
|
||||
parent.layer.full(layerIndex)
|
||||
|
||||
$("input[name='estimatedOrderTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
|
@ -466,8 +473,7 @@
|
|||
$('[name="agentCode"]').val(rows[0].agentCode);
|
||||
changeBg()
|
||||
$('[name="industryType"]').val(rows[0].industryType);
|
||||
|
||||
|
||||
initProjectList()
|
||||
$.modal.close(index);
|
||||
}
|
||||
|
||||
|
@ -501,12 +507,12 @@
|
|||
|
||||
|
||||
// 添加软件
|
||||
function addProduct() {
|
||||
function addProduct(data) {
|
||||
let length = $('#productTable tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td class="layui-form"><select name="softwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
||||
<td class="layui-form"><input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><select name="softwareProjectProductInfoList[${length}].productBomCode" value="${data.productBomCode || ''}" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
||||
${softwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.productCode}">${ele.productCode}</option>`
|
||||
}).join('')
|
||||
|
@ -518,15 +524,16 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
}).join('')
|
||||
}
|
||||
</select></td>
|
||||
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${softwareProjectProductInfoList[0]?.description||''}</textarea></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="softwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${softwareProjectProductInfoList[0]?.description || ''}</textarea></td>
|
||||
<td><input value="${data.quantity || ''}" name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input value="${data.cataloguePrice || ''}" name="softwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input value="${data.guidanceDiscount || ''}" name="softwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.discount || ''}" name="softwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.price || ''}" name="softwareProjectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="softwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="softwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.remark || ''}" name="softwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
|
@ -535,34 +542,35 @@ ${softwareProjectProductInfoList.map((ele) => {
|
|||
initPrice()
|
||||
}
|
||||
|
||||
function addProduct2() {
|
||||
function addProduct2(data) {
|
||||
let length = $('#productTable2 tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode2">
|
||||
<td class="layui-form"><input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode2" value="${data.productBomCode || ''}">
|
||||
${hardwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.productCode}">${ele.productCode}</option>`
|
||||
}).join('')
|
||||
}
|
||||
|
||||
</select></td>
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel2">
|
||||
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel2" value="${data.model || ''}">
|
||||
${hardwareProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.model}">${ele.model}</option>`
|
||||
}).join('')
|
||||
}
|
||||
|
||||
</select></td>
|
||||
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${hardwareProjectProductInfoList[0]?.description||''}</textarea></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.id ? data.productDesc : (hardwareProjectProductInfoList[0]?.description || '')}</textarea></td>
|
||||
<td><input value="${data.quantity || ''}" name="hardwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input value="${data.cataloguePrice || ''}" name="hardwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input value="${data.guidanceDiscount || ''}" name="hardwareProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.discount || ''}" name="hardwareProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.price || ''}" name="hardwareProjectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="hardwareProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="hardwareProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.remark || ''}" name="hardwareProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
|
@ -571,34 +579,35 @@ ${hardwareProjectProductInfoList.map((ele) => {
|
|||
initPrice()
|
||||
}
|
||||
|
||||
function addProduct3() {
|
||||
function addProduct3(data) {
|
||||
let length = $('#productTable3 tbody').find('tr').length
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td class="indexBox">${length + 1}</td>
|
||||
<td class="layui-form"><select name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode3">
|
||||
<td class="layui-form"><input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}"><select name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode3" value="${data.productBomCode || ''}">
|
||||
${maintenanceProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.productCode}">${ele.productCode}</option>`
|
||||
}).join('')
|
||||
}
|
||||
|
||||
</select></td>
|
||||
<td class="layui-form"><select name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control model" lay-search="" lay-filter="productModel1">
|
||||
<td class="layui-form"><select name="maintenanceProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel3">
|
||||
${maintenanceProjectProductInfoList.map((ele) => {
|
||||
return `<option value="${ele.model}">${ele.model}</option>`
|
||||
}).join('')
|
||||
}
|
||||
|
||||
</select></td>
|
||||
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${maintenanceProjectProductInfoList[0]?.description||''}</textarea></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${maintenanceProjectProductInfoList[0]?.description || ''}</textarea></td>
|
||||
<td><input name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required value="${data.quantity || ''}" ></td>
|
||||
<td><input value="${data.cataloguePrice || ''}" name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||
<td><input value="${data.guidanceDiscount || ''}" name="maintenanceProjectProductInfoList[${length}].guidanceDiscount" type="number" class="form-control guidanceDiscount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.discount || ''}" name="maintenanceProjectProductInfoList[${length}].discount" type="number" class="form-control discount" min="0" max="1" step="0.1" required></td>
|
||||
<td><input value="${data.price || ''}" name="maintenanceProjectProductInfoList[${length}].price" type="number" class="form-control price" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.allPrice || ''}" name="maintenanceProjectProductInfoList[${length}].allPrice" type="number" class="form-control allPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.catalogueAllPrice || ''}" name="maintenanceProjectProductInfoList[${length}].catalogueAllPrice" type="number" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly></td>
|
||||
<td><input value="${data.remark || ''}" name="maintenanceProjectProductInfoList[${length}].remark" type="text" class="form-control" ></td>
|
||||
|
||||
<td><span style="cursor:pointer;color: ff5722" class="delRow">删除</span></td>
|
||||
|
||||
</tr>`)
|
||||
|
@ -621,29 +630,29 @@ ${maintenanceProjectProductInfoList.map((ele) => {
|
|||
}
|
||||
|
||||
function initSearchProduct() {
|
||||
layui.use(function (){
|
||||
var form=layui.form
|
||||
layui.use(function () {
|
||||
var form = layui.form
|
||||
form.render()
|
||||
|
||||
form.on('select(productCode1)',function (data) {
|
||||
form.on('select(productCode1)', function (data) {
|
||||
searchProduct(data.value, 'code', data.elem)
|
||||
})
|
||||
form.on('select(productCode2)',function (data) {
|
||||
form.on('select(productCode2)', function (data) {
|
||||
searchProduct(data.value, 'code', data.elem)
|
||||
})
|
||||
form.on('select(productCode3)',function (data) {
|
||||
form.on('select(productCode3)', function (data) {
|
||||
searchProduct(data.value, 'code', data.elem)
|
||||
})
|
||||
form.on('select(productModel1)',function (data) {
|
||||
form.on('select(productModel1)', function (data) {
|
||||
searchProduct(data.value, 'model', data.elem)
|
||||
})
|
||||
form.on('select(productModel2)',function (data) {
|
||||
form.on('select(productModel2)', function (data) {
|
||||
searchProduct(data.value, 'model', data.elem)
|
||||
})
|
||||
form.on('select(productModel3)',function (data) {
|
||||
form.on('select(productModel3)', function (data) {
|
||||
searchProduct(data.value, 'model', data.elem)
|
||||
})
|
||||
$('.layui-input').on('mouseout',function (){
|
||||
$('.layui-input').on('mouseout', function () {
|
||||
$(this).blur()
|
||||
})
|
||||
})
|
||||
|
@ -734,13 +743,6 @@ ${maintenanceProjectProductInfoList.map((ele) => {
|
|||
})
|
||||
}
|
||||
|
||||
function changeInstitution() {
|
||||
if ($('[name="operateInstitution"]').val() == 'h3c') {
|
||||
$('[name="partnerName"]').val('新华三')
|
||||
$('[name="partnerCode"]').val('')
|
||||
}
|
||||
}
|
||||
|
||||
function changeBg() {
|
||||
if ($('[name="bgProperty"]').val() != 'YYS') {
|
||||
let datas = [[${@dict.getType('bg_hysy')}]]
|
||||
|
@ -797,17 +799,8 @@ ${maintenanceProjectProductInfoList.map((ele) => {
|
|||
let data = JSON.parse(res.currentTarget.response)
|
||||
if (data.code === 0) {
|
||||
$.modal.msgSuccess('导入成功');
|
||||
|
||||
data.data.forEach((row) => {
|
||||
addRow(row)
|
||||
})
|
||||
|
||||
$('.discount').on('change', function () {
|
||||
|
||||
changeTotal($(this))
|
||||
})
|
||||
$('.discount').on('focus', function () {
|
||||
$(this).blur()
|
||||
addFile(row)
|
||||
})
|
||||
} else {
|
||||
$.modal.msgError(data.msg || '导入失败');
|
||||
|
@ -824,65 +817,6 @@ ${maintenanceProjectProductInfoList.map((ele) => {
|
|||
xhr.send(data);
|
||||
});
|
||||
|
||||
function initTable() {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'fileName',
|
||||
align: 'center',
|
||||
title: '合同名称',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='contractFileList[%s].fileName' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'uploadUser',
|
||||
align: 'center',
|
||||
title: '上传人',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='contractFileList[%s].uploadUser' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'uploadTime',
|
||||
align: 'center',
|
||||
title: '上传时间',
|
||||
formatter: function (value, row, index) {
|
||||
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='contractFileList[%s].uploadTime' value='%s' required>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function (value, row, index) {
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
}
|
||||
|
||||
function importList() {
|
||||
if (!$('[name="projectId"]').val()) {
|
||||
$.modal.alertWarning("请先选择项目");
|
||||
|
@ -890,6 +824,35 @@ ${maintenanceProjectProductInfoList.map((ele) => {
|
|||
}
|
||||
$('#uploadInput').click()
|
||||
}
|
||||
|
||||
function addFile() {
|
||||
let tr = $(`
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>`)
|
||||
$('#fileBox tbody').append(tr)
|
||||
|
||||
}
|
||||
|
||||
function initProjectList() {
|
||||
let id = $('[name="projectId"]').val()
|
||||
$.operate.get(ctx + `sip/project/query/${id}`, function (res) {
|
||||
$('#productTable tbody').html('')
|
||||
$('#productTable2 tbody').html('')
|
||||
$('#productTable3 tbody').html('')
|
||||
res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => {
|
||||
addProduct(ele)
|
||||
}) : ''
|
||||
res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
|
||||
addProduct2(ele)
|
||||
}) : ''
|
||||
res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
|
||||
addProduct3(ele)
|
||||
}) : ''
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
|
@ -24,11 +24,8 @@
|
|||
</li>
|
||||
<li>
|
||||
<label>供货商:</label>
|
||||
<select name="bgProperty" class="form-control">
|
||||
<option value="">请选择供货商</option>
|
||||
<option value="">省代</option>
|
||||
<option value="">非省代</option>
|
||||
</select>
|
||||
<input type="text" name="supplier" placeholder="项目负责人" />
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<label>订单状态:</label>
|
||||
|
@ -50,10 +47,10 @@
|
|||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="product:order:add">
|
||||
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="product:order:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="product:order:edit">
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.editFull()" shiro:hasPermission="product:order:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="product:order:remove">
|
||||
|
@ -153,7 +150,7 @@
|
|||
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-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + 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>');
|
||||
return actions.join('');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue