订单基本完成

master
wangjiuyun 2025-06-09 14:17:32 +08:00
parent 543dfc25f8
commit e6e41c6da0
10 changed files with 428 additions and 251 deletions

View File

@ -931,7 +931,10 @@ var table = {
},
success: function () {
$(':focus').blur();
}
},
end: function () {
$.common.isEmpty(options.end) ? '' : options.end();
},
}, btnCallback));
if ($.common.isNotEmpty(options.full) && options.full === true) {
top.layer.full(index);

View File

@ -66,9 +66,22 @@
input, textarea, .productTable td {
position: relative;
}
.productTable label[id*="iscount"]{
.productTable label[id*="iscount"] {
top: -30px !important;
}
table tr:nth-child(odd) {
background: #f3f3f3;
}
input[type=checkbox], input[type=radio] {
margin-top: 0;
}
label {
margin-bottom: 0 !important;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -77,15 +90,15 @@
<table>
<tr>
<td class="shortTd">项目编码<span class="is-required">*</span></td>
<td><input type="text" name="projectCode" class="form-control" placeholder="保存后自动生成" readonly>
<td><input type="text" name="projectCode" class="form-control" placeholder="保存后自动生成"
readonly>
</td>
<td class="shortTd">项目名称<span class="is-required">*</span></td>
<td><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符"
class="form-control"></td>
<td class="shortTd">最终客户<span class="is-required">*</span></td>
<td><input name="customerName" class="form-control" type="text" required onclick="selectCustomer()">
<input name="customerCode" class="form-control" type="hidden"></td>
</tr>
<td>预计金额(元)<span class="is-required">*</span></td>
<td><input type="number" name="estimatedAmount" class="form-control" required></td>
<tr>
<td class="shortTd">BG<span class="is-required">*</span></td>
<td>
@ -137,6 +150,18 @@
onclick="selectPeople()">
<input name="hzSupportUser" class="form-control" type="hidden"></td>
</tr>
<tr>
<td class="shortTd">最终客户<span class="is-required">*</span></td>
<td><input name="customerName" class="form-control" type="text" required onclick="selectCustomer()">
<input name="customerCode" class="form-control" type="hidden"></td>
<td class="shortTd">联系人</td>
<td><input name=" customerUserName" class="form-control" type="text">
</td>
<td class="shortTd">联系方式</td>
<td><input name="customerPhone" class="form-control" type="text">
</td>
</tr>
</tr>
<tr>
<td>合作渠道</td>
<td>
@ -158,30 +183,46 @@
<td><input type="text" name="contactWay" class="form-control" placeholder="姓名+电话"></td>
</tr>
<tr>
<td>预计金额(元)<span class="is-required">*</span></td>
<td><input type="number" name="estimatedAmount" class="form-control" required></td>
<td>预计下单时间</td>
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd">
</td>
<td>预计发货时间</td>
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
></td>
<td>POC测试</td>
<td>
<select name="countryProduct" class="form-control">
<option value="">请选择</option>
<option value="1"></option>
<option value="0"></option>
</select>
</td>
</tr>
<tr>
<td>竞争对手</td>
<td colspan="5" class="checkbox-group">
<td colspan="3" class="checkbox-group">
<div class="checkbox-box">
<label><input type="checkbox" name="competitorList[0]" value="华为">华为</label>
<label><input type="checkbox" name="competitorList[1]" value="锐捷">锐捷</label>
<label><input type="checkbox" name="competitorList[2]" value="深信服">深信服</label>
<label><input type="checkbox" name="competitorList[3]" value="中兴">中兴</label>
<label><input type="checkbox" name="competitorList[4]" value="曙云">曙云</label>
<div style="float: right;display: flex;flex-display:row;align-items: center">
<span>其它:</span><input type="text" name="competitorList[5]" class="form-control"
style="width: 400px">
</div>
</div>
<div>
其它:<input type="text" name="competitorList[5]" class="form-control" style="width: 400px">
</div>
</td>
<td>是否国产</td>
<td>
<select name="countryProduct" class="form-control">
<option value="">请选择</option>
<option value="1"></option>
<option value="0"></option>
</select>
</td>
</tr>
<tr>
@ -196,8 +237,13 @@
placeholder="限制200个字符"></textarea>
</td>
</tr>
</table>
<tr>
<td>服务器配置</td>
<td colspan="5"><textarea name="serverConfiguration" class="form-control" maxlength="200"
placeholder="限制200个字符"></textarea></td>
</tr>
</table>
<div class="section-title">配置信息</div>
<h3>软件</h3>
<button type="button" class="add-btn" onclick="addProduct()">添加</button>
@ -268,39 +314,30 @@
<tbody>
</tbody>
</table>
<div>
<table>
<tr>
<td>服务器配置</td>
<td><textarea name="serverConfiguration" class="form-control" maxlength="200"
placeholder="限制200个字符"></textarea></td>
<td>是否国产</td>
<td>
<select name="countryProduct" class="form-control">
<option value="">请选择</option>
<option value="1"></option>
<option value="0"></option>
</select>
</td>
</tr>
</table>
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this" lay-id="11">工作进度</li>
<li lay-id="22">POC测试</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<button type="button" class="add-btn" onclick="addLog()">添加</button>
<table id="workLog">
<thead>
<tr>
<th>序号</th>
<th>更新内容</th>
<th>更新人员</th>
<th>更新时间</th>
</tr>
</thead>
<tbody></tbody>
<!-- 可动态添加行 -->
</table>
</div>
<div class="layui-tab-item"></div>
</div>
</div>
<div class="section-title">工作进度</div>
<button type="button" class="add-btn" onclick="addLog()">添加</button>
<table id="workLog">
<thead>
<tr>
<th>序号</th>
<th>更新内容</th>
<th>更新人员</th>
<th>更新时间</th>
</tr>
</thead>
<tbody></tbody>
<!-- 可动态添加行 -->
</table>
</form>
</div>
<th:block th:include="include :: footer"/>
@ -325,22 +362,22 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
softwareProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
hardwareProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
maintenanceProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
})
@ -349,7 +386,7 @@
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-product-add').serialize());
}else{
} else {
$.modal.alertWarning("请完善表单");
}
}
@ -482,7 +519,7 @@ ${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><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>
@ -518,7 +555,7 @@ ${hardwareProjectProductInfoList.map((ele) => {
}
</select></td>
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${hardwareProjectProductInfoList[0]?.description||''}</textarea></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>
@ -554,7 +591,7 @@ ${hardwareProjectProductInfoList.map((ele) => {
}
</select></td>
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${maintenanceProjectProductInfoList[0]?.description||''}</textarea></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>
@ -606,7 +643,7 @@ ${hardwareProjectProductInfoList.map((ele) => {
form.on('select(productModel3)', function (data) {
searchProduct(data.value, 'model', data.elem)
})
$('.layui-input').on('mouseout',function (){
$('.layui-input').on('mouseout', function () {
$(this).blur()
})
})

View File

@ -66,9 +66,22 @@
input, textarea, .productTable td {
position: relative;
}
.productTable label[id*="iscount"]{
.productTable label[id*="iscount"] {
top: -30px !important;
}
table tr:nth-child(odd) {
background: #f3f3f3;
}
input[type=checkbox], input[type=radio] {
margin-top: 0;
}
label {
margin-bottom: 0 !important;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -85,10 +98,9 @@
<td><input type="text" th:field="*{projectName}" name="projectName" maxlength="40"
placeholder="限制40个字符"
class="form-control"></td>
<td class="shortTd">最终客户<span class="is-required">*</span></td>
<td><input name="customerName" th:field="*{customerName}" class="form-control" type="text" required
onclick="selectCustomer()">
<input name="customerCode" th:field="*{customerCode}" class="form-control" type="hidden"></td>
<td>预计金额RMB<span class="is-required">*</span></td>
<td><input type="number" name="estimatedAmount" class="form-control" th:field="*{estimatedAmount}"
required></td>
</tr>
<tr>
<td class="shortTd">BG<span class="is-required">*</span></td>
@ -143,6 +155,18 @@
onclick="selectPeople()" th:field="*{hzSupportUserName}">
<input name="hzSupportUser" class="form-control" type="hidden" th:field="*{hzSupportUser}"></td>
</tr>
<tr>
<td class="shortTd">最终客户<span class="is-required">*</span></td>
<td><input name="customerName" class="form-control" th:field="*{customerName}" type="text" required
onclick="selectCustomer()">
<input name="customerCode" class="form-control" th:field="*{customerCode}" type="hidden"></td>
<td class="shortTd">联系人</td>
<td><input name=" customerUserName" class="form-control" type="text" th:field="*{customerUserName}">
</td>
<td class="shortTd">联系方式</td>
<td><input name="customerPhone" class="form-control" type="text" th:field="*{customerPhone}">
</td>
</tr>
<tr>
<td>合作渠道</td>
<td>
@ -165,9 +189,7 @@
th:field="*{contactWay}"></td>
</tr>
<tr>
<td>预计金额RMB<span class="is-required">*</span></td>
<td><input type="number" name="estimatedAmount" class="form-control" th:field="*{estimatedAmount}"
required></td>
<td>预计下单时间</td>
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd"
th:value="${#dates.format(projectInfo.estimatedOrderTime, 'yyyy-MM-dd')}">
@ -175,23 +197,37 @@
<td>预计发货时间</td>
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
th:value="${#dates.format(projectInfo.estimatedDeliverTime, 'yyyy-MM-dd')}"></td>
<td>POC测试</td>
<td>
<select name="countryProduct" class="form-control" th:field="*{countryProduct}" readonly="">
<option value="">根据POC记录变化</option>
<option value="1"></option>
<option value="0"></option>
</select>
</td>
</tr>
<tr>
<td>竞争对手</td>
<td colspan="5" class="checkbox-group">
<td colspan="3" class="checkbox-group">
<div class="checkbox-box">
<label><input type="checkbox" name="competitorList[0]" value="华为">华为</label>
<label><input type="checkbox" name="competitorList[1]" value="锐捷">锐捷</label>
<label><input type="checkbox" name="competitorList[2]" value="深信服">深信服</label>
<label><input type="checkbox" name="competitorList[3]" value="中兴">中兴</label>
<label><input type="checkbox" name="competitorList[4]" value="曙云">曙云</label>
<div style="float: right;display: flex;flex-display:row;align-items: center">
<span>其它:</span><input type="text" name="competitorList[5]" class="form-control"
style="width: 400px">
</div>
</div>
<div>
其它:<input type="text" name="competitorList[5]"
class="form-control" style="width: 400px">
</div>
</td>
<td>是否国产</td>
<td>
<select name="countryProduct" class="form-control" th:field="*{countryProduct}">
<option value="">请选择</option>
<option value="1"></option>
<option value="0"></option>
</select>
</td>
</tr>
<tr>
@ -207,6 +243,12 @@
placeholder="限制200个字符" th:field="*{projectDesc}"></textarea>
</td>
</tr>
<tr>
<td>服务器配置</td>
<td colspan="5"><textarea name="serverConfiguration" class="form-control" maxlength="200"
placeholder="限制200个字符" th:field="*{serverConfiguration}"></textarea></td>
</tr>
</table>
<div class="section-title">配置信息</div>
@ -279,51 +321,46 @@
<tbody>
</tbody>
</table>
<div>
<table>
<tr>
<td>服务器配置</td>
<td><textarea name="serverConfiguration" class="form-control" maxlength="200"
placeholder="限制200个字符" th:field="*{serverConfiguration}"></textarea></td>
<td>是否国产</td>
<td>
<select name="countryProduct" class="form-control" th:field="*{countryProduct}">
<option value="">请选择</option>
<option value="1"></option>
<option value="0"></option>
</select>
</td>
</tr>
</table>
<div class="layui-tab">
<ul class="layui-tab-title">
<li class="layui-this" lay-id="11">工作进度</li>
<li lay-id="22">操作日志</li>
<li lay-id="33">POC测试</li>
</ul>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<button type="button" class="add-btn" onclick="addLog({})">添加</button>
<table id="workLog">
<thead>
<tr>
<th>序号</th>
<th>更新内容</th>
<th>更新人员</th>
<th>更新时间</th>
</tr>
</thead>
<tbody></tbody>
<!-- 可动态添加行 -->
</table>
</div>
<div class="layui-tab-item">
<table id="sysLog">
<thead>
<tr>
<th>序号</th>
<th>操作人员</th>
<th>操作内容</th>
<th>操作时间</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div class="layui-tab-item">
</div>
</div>
</div>
<div class="section-title">工作进度</div>
<button type="button" class="add-btn" onclick="addLog({})">添加</button>
<table id="workLog">
<thead>
<tr>
<th>序号</th>
<th>更新内容</th>
<th>更新人员</th>
<th>更新时间</th>
</tr>
</thead>
<tbody></tbody>
<!-- 可动态添加行 -->
</table>
<div class="section-title">操作日志</div>
<table id="sysLog">
<thead>
<tr>
<th>序号</th>
<th>操作人员</th>
<th>操作内容</th>
<th>操作时间</th>
</tr>
</thead>
<tbody></tbody>
</table>
</form>
</div>
<th:block th:include="include :: footer"/>
@ -348,8 +385,8 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
softwareProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || []
softwareProjectProductInfoListAll.forEach((ele) => {
@ -359,8 +396,8 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
hardwareProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
hardwareProjectProductInfoListAll.forEach((ele) => {
@ -371,8 +408,8 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
maintenanceProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
maintenanceProjectProductInfoListAll.forEach((ele) => {
@ -386,7 +423,7 @@
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-product-add').serialize());
}else{
} else {
$.modal.alertWarning("请完善表单");
}
}
@ -505,12 +542,12 @@
// 添加软件
function initData() {
let competitorList=[[${projectInfo.competitorList}]]||[]
competitorList.forEach((ele,index)=>{
if(ele){
$(`input[type="checkbox"][value="${ele}"]`).attr('checked',true)
let competitorList = [[${projectInfo.competitorList}]] || []
competitorList.forEach((ele, index) => {
if (ele) {
$(`input[type="checkbox"][value="${ele}"]`).attr('checked', true)
}
if((!$(`input[type="checkbox"][value="${ele}"]`).length)&&ele){
if ((!$(`input[type="checkbox"][value="${ele}"]`).length) && ele) {
$(`[name="competitorList[5]"]`).val(ele)
}
})
@ -537,13 +574,13 @@
<td class="layui-form"><input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}">
<select value="${data.productBomCode || ''}" name="softwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
${softwareProjectProductInfoList.map((ele) => {
return `<option value="${ele.productCode}" ${ele.productCode==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${ele.productCode}</option>`
}).join('')
}
</select></td>
<td class="layui-form"><select value="${data.model || ''}" name="softwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel1">
${softwareProjectProductInfoList.map((ele) => {
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
</select></td>
@ -572,13 +609,13 @@ ${softwareProjectProductInfoList.map((ele) => {
<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="productCode2">
${hardwareProjectProductInfoList.map((ele) => {
return `<option value="${ele.productCode}" ${ele.productCode==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${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="productModel2">
${hardwareProjectProductInfoList.map((ele) => {
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
</select></td>
@ -607,13 +644,13 @@ ${hardwareProjectProductInfoList.map((ele) => {
<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="productCode3">
${maintenanceProjectProductInfoList.map((ele) => {
return `<option value="${ele.productCode}" ${ele.productCode==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${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="productModel3">
${maintenanceProjectProductInfoList.map((ele) => {
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
</select></td>
@ -669,7 +706,7 @@ ${maintenanceProjectProductInfoList.map((ele) => {
form.on('select(productModel3)', function (data) {
searchProduct(data.value, 'model', data.elem)
})
$('.layui-input').on('mouseout',function (){
$('.layui-input').on('mouseout', function () {
$(this).blur()
})
})

View File

@ -417,11 +417,12 @@
yes: function (index, layero) {
let body = parent.layer.getChildFrame('body', index)
if ($(body.find('#form-order-add').get(0)).validate().form()) {
$.operate.save( ctx + "project/order/add", body.find('#form-order-add').serialize(), function (res) {
if (res.code == web_status.SUCCESS) {
parent.layer.close(index)
}
});
layero.find('iframe')[0].contentWindow.saveSelect()
// $.operate.save( ctx + "project/order/add", body.find('#form-order-add').serialize(), function (res) {
// if (res.code == web_status.SUCCESS) {
// parent.layer.close(index)
// }
// });
}else{
$.modal.alertWarning("请完善表单");

View File

@ -61,6 +61,9 @@
full: false,
index: 1000,
width: 800,
end:function(){
window.localStorage.removeItem('layerTable')
},
yes: function (index, layero) {
let body = parent.layer.getChildFrame('body', index)
if ($(body.find('#form-agent-add').get(0)).validate().form()) {

View File

@ -76,6 +76,9 @@
full: false,
index: 1000,
width: 800,
end:function(){
window.localStorage.removeItem('layerTable')
},
yes: function (index, layero) {
let body = parent.layer.getChildFrame('body', index)
if ($(body.find('#form-info-add').get(0)).validate().form()) {

View File

@ -67,6 +67,9 @@
full: false,
index: 1000,
width: 800,
end:function(){
window.localStorage.removeItem('layerTable')
},
yes: function (index, layero) {
let body = parent.layer.getChildFrame('body', index)
if ($(body.find('#form-partner-add').get(0)).validate().form()) {

View File

@ -75,9 +75,24 @@
margin-left: 20px;
display: inline-block;
}
.productTable label[id*="iscount"]{
.productTable label[id*="iscount"] {
top: -30px !important;
}
table tr:nth-child(odd) {
background: #f3f3f3;
}
.saveBox {
padding: 30px 40px;
width: 300px;
}
.saveRemark {
font-size: 10px;
color: #999999;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -89,6 +104,8 @@
<td>
<input name="projectId" class="form-control" type="hidden">
<input name="orderId" class="form-control" type="hidden">
<input name="processType" value="0" class="form-control" type="hidden">
<input name="orderStatus" value="1" class="form-control" type="hidden">
<input type="text" name="projectCode" placeholder="请选择" class="form-control"
onclick="searchProject()">
</td>
@ -187,9 +204,9 @@
</tr>
<tr>
<td>汇智责任人</td>
<td><input name="duty" class="form-control" type="text"
<td><input name="dutyName" class="form-control" type="text"
onclick="selectPeople()">
<!-- <input name="duty" class="form-control" type="hidden"></td>-->
<input name="duty" class="form-control" type="hidden"></td>
<td>Email</td>
<td><input type="text" name="dutyEmail"
class="form-control"></td>
@ -225,7 +242,7 @@
</tr>
<tr>
<td>进货商联系人</td>
<td><input name="partnerName" class="form-control" type="text"></td>
<td><input name="partnerUserName" class="form-control" type="text"></td>
<td>Email</td>
<td><input type="text" name="partnerEmail"
class="form-control"></td>
@ -385,31 +402,61 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
softwareProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
hardwareProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
maintenanceProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
})
}
function saveSelect() {
var options = {
title: "确认并提交订单",
maxmin: false,
full: false,
type: 1,
btn: ['确认', '取消'],
content: `
<div class="saveBox">
<div><input type="radio" name="saveType" checked onclick="changeSaveType(0)">电子订单流程</div>
<div class="saveRemark">进货商已经签订框架协议</div>
<div><input type="radio" name="saveType" onclick="changeSaveType(1)">纸质合同流程</div>
<div class="saveRemark">进货商未签订框架协议</div>
<div style="margin-top: 10px"><span style="margin-right: 5px;">保存草稿</span><input type="radio" name="orderCheck" checked onclick="changeStatus(1)"><span></span>&nbsp;&nbsp;<input type="radio" name="orderCheck" onclick="changeStatus(0)"><span></span></div>
</div>
`,
yes: function (index, layero) {
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
},
};
layer.open(options)
}
function changeSaveType(val) {
$('[name="processType"]').val(val)
}
function changeStatus(val) {
$('[name="orderStatus"]').val(val)
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
}else{
saveSelect()
} else {
$.modal.alertWarning("请完善表单");
}
}
@ -501,7 +548,7 @@
function selectPeople() {
var url = prefix + "/selectPeople";
var options = {
title: '选择代理商',
title: '选择责任人',
width: "680",
height: '600',
url: url,
@ -540,7 +587,7 @@
$('[name="partnerCode"]').val(rows[0].partnerCode);
$('[name="partnerName"]').val(rows[0].partnerName);
$('[name="level"]').val(rows[0].level);
$('[name="partnerPeople"]').val(rows[0].contactPerson);
$('[name="partnerUserName"]').val(rows[0].contactPerson);
$('[name="partnerPhone"]').val(rows[0].contactPhone);
@ -550,11 +597,11 @@
function doSubmitPeople(index, layero) {
var rows = layero.find("iframe")[0].contentWindow.getSelections();
if (rows.length == 0) {
$.modal.alertWarning("请选择一个代理商");
$.modal.alertWarning("请选择一个责任人");
return;
}
// $('[name="duty"]').val(rows[0].userId);
$('[name="duty"]').val(rows[0].userName);
$('[name="duty"]').val(rows[0].userId);
$('[name="dutyName"]').val(rows[0].userName);
$('[name="dutyPhone"]').val(rows[0].phonenumber);
$('[name="dutyEmail"]').val(rows[0].email);
@ -571,13 +618,13 @@
<td class="indexBox">${length + 1}</td>
<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==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${ele.productCode}</option>`
}).join('')
}
</select></td>
<td class="layui-form"><select name="softwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel1">
${softwareProjectProductInfoList.map((ele) => {
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
</select></td>
@ -606,19 +653,19 @@ ${softwareProjectProductInfoList.map((ele) => {
<td class="indexBox">${length + 1}</td>
<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==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${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" value="${data.model || ''}">
${hardwareProjectProductInfoList.map((ele) => {
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
</select></td>
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc||''}</textarea></td>
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</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>
@ -643,14 +690,14 @@ ${hardwareProjectProductInfoList.map((ele) => {
<td class="indexBox">${length + 1}</td>
<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==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${ele.productCode}</option>`
}).join('')
}
</select></td>
<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==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
@ -891,7 +938,7 @@ ${
<input value="${data.fileName || ''}" name="contractFileList[${length}].fileName" readonly class="form-control"></td>
<td><input value="${data.createByName || ''}" name="contractFileList[${length}].createBy" readonly class="form-control"></td>
<td><input value="${data.uploadTime || ''}" name="contractFileList[${length}].uploadTime" readonly class="form-control" ></td>
<td><span style="cursor:pointer;color: #1686d8;margin-right: 5px;" onclick="preview('${data.filePath}')">预览</span><span style="cursor:pointer;color: #1686d8;margin-right: 5px;" onclick="downFile('${data.filePath}')">下载</span><span style="cursor:pointer;color: #dd242a" class="delfile">删除</span></td>
<td><span style="cursor:pointer;color: #1686d8;margin-right: 5px;" onclick="preview('${data.filePath}','${data.fileName}')">预览</span><span style="cursor:pointer;color: #1686d8;margin-right: 5px;" onclick="downFile('${data.filePath}','${data.fileName}')">下载</span><span style="cursor:pointer;color: #dd242a" class="delfile">删除</span></td>
</tr>`)
$('#fileBox tbody').append(tr)
$('.delfile').on('click', function () {
@ -918,16 +965,15 @@ ${
})
}
function downFile(filePath) {
$.operate.get(prefix + `/file/download?filePath=${filePath}`, function (res) {
window.location.href = res.data
})
function downFile(filePath, fileName) {
window.location.href = prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName);
}
function preview(filePath) {
$.operate.get(prefix + `/file/download?filePath=${filePath}`, function (res) {
window.open(res.data)
})
function preview(filePath, fileName) {
let iframe = window.open('', 'iframe')
let url = ctx+prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName)
iframe.document.write(`<iframe src='${url}' style="width: 100%;height
:100%">`)
}
</script>
</body>

View File

@ -46,12 +46,6 @@
cursor: pointer;
}
.checkbox-box {
display: flex;
flex-direction: row;
gap: 10px;
}
.checkbox-box label {
display: flex;
flex-direction: row;
@ -75,9 +69,24 @@
margin-left: 20px;
display: inline-block;
}
.productTable label[id*="iscount"]{
.productTable label[id*="iscount"] {
top: -30px !important;
}
table tr:nth-child(odd) {
background: #f3f3f3;
}
.saveBox {
padding: 30px 40px;
width: 300px;
}
.saveRemark {
font-size: 10px;
color: #999999;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -89,6 +98,9 @@
<td>
<input name="projectId" class="form-control" type="hidden" th:field="*{projectId}">
<input name="id" class="form-control" type="hidden" th:field="*{id}">
<input name="processType" class="form-control" type="hidden" th:field="*{processType}">
<input name="orderStatus" class="form-control" type="hidden" th:field="*{orderStatus}">
<input type="text" name="projectCode" th:field="*{projectCode}" placeholder="请选择"
class="form-control"
onclick="searchProject()">
@ -100,18 +112,17 @@
<td><input name="customerName" class="form-control" th:field="*{customerName}" type="text" readonly
placeholder="选择项目后带入"
required>
<!-- <input name="customerCode" class="form-control" th:field="*{customerCode}" type="hidden"></td>-->
</tr>
<tr>
<td>BG<span class="is-required">*</span></td>
<td>
<!-- <select name="bgProperty" class="form-control" th:field="*{bgProperty}"-->
<!-- th:with="type=${@dict.getType('bg_type')}"-->
<!-- readonly required>-->
<!-- <option value="">请选择BG</option>-->
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}"-->
<!-- th:value="${dict.dictValue}"></option>-->
<!-- </select>-->
<select name="bgProperty" class="form-control" th:field="*{bgProperty}"
th:with="type=${@dict.getType('bg_type')}"
readonly required>
<option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</td>
<td>行业<span class="is-required">*</span></td>
<td id="industryTypeBox">
@ -122,8 +133,7 @@
</td>
<td>代表处<span class="is-required">*</span></td>
<td colspan="3">
<!-- <input name="agentName" class="form-control" th:field="*{agentName}" type="text" readonly required>-->
<!-- <input name="agentCode" class="form-control" th:field="*{agentCode}" type="hidden">-->
<input name="agentName" class="form-control" th:field="*{agentName}" type="text" readonly required>
</td>
</tr>
<tr>
@ -163,7 +173,9 @@
</td>
<td>执行单有效截止时间<span class="is-required">*</span></td>
<td colspan="3">
<input name="orderEndTime" class="form-control" th:value="${#dates.format(projectOrderInfo.orderEndTime, 'yyyy-MM-dd')}" placeholder="yyyy-MM-dd"
<input name="orderEndTime" class="form-control"
th:value="${#dates.format(projectOrderInfo.orderEndTime, 'yyyy-MM-dd')}"
placeholder="yyyy-MM-dd"
required>
</td>
</tr>
@ -171,14 +183,16 @@
<td>要求到货时间<span class="is-required">*</span></td>
<td>
<input name="deliveryTime" class="form-control" th:value="${#dates.format(projectOrderInfo.deliveryTime, 'yyyy-MM-dd')}" placeholder="yyyy-MM-dd"
<input name="deliveryTime" class="form-control"
th:value="${#dates.format(projectOrderInfo.deliveryTime, 'yyyy-MM-dd')}"
placeholder="yyyy-MM-dd"
required>
</td>
<td>公司直发</td>
<td colspan="3">
<select name="companyDelivery" class="form-control" th:field="*{companyDelivery}"
th:with="type=${@dict.getType('company_delivery')}"
>
>
<option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
@ -198,9 +212,9 @@
</tr>
<tr>
<td>汇智责任人</td>
<td><input name="duty" class="form-control" type="text"
onclick="selectPeople()">
<!-- <input name="duty" class="form-control" th:field="*{duty}" type="hidden">-->
<td><input name="dutyName" class="form-control" type="text"
onclick="selectPeople()" th:field="*{dutyName}">
<input name="duty" class="form-control" th:field="*{duty}" type="hidden">
</td>
<td>Email</td>
<td><input type="text" name="dutyEmail" th:field="*{dutyEmail}"
@ -235,16 +249,16 @@
</select>
</td>
</tr>
<!-- <tr>-->
<!-- <td>进货商联系人</td>-->
<!-- <td><input name="partnerPeople" class="form-control" type="text" th:field="*{partnerName}"></td>-->
<!-- <td>Email</td>-->
<!-- <td><input type="text" name="partnerEmail" th:field="*{partnerEmail}"-->
<!-- class="form-control"></td>-->
<!-- <td>联系方式<span class="is-required">*</span></td>-->
<!-- <td><input name="partnerPhone" class="form-control" type="text" required th:field="*{partnerPhone}">-->
<!-- </td>-->
<!-- </tr>-->
<tr>
<td>进货商联系人</td>
<td><input name="partnerUserName" class="form-control" type="text" th:field="*{partnerUserName}"></td>
<td>Email</td>
<td><input type="text" name="partnerEmail" th:field="*{partnerEmail}"
class="form-control"></td>
<td>联系方式<span class="is-required">*</span></td>
<td><input name="partnerPhone" class="form-control" type="text" required th:field="*{partnerPhone}">
</td>
</tr>
<tr>
<td>供货商<span class="is-required">*</span></td>
<td colspan="5">
@ -398,16 +412,16 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
softwareProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
initProjectList()
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
hardwareProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
initProjectList()
@ -415,8 +429,8 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
maintenanceProjectProductInfoList.unshift({
model:'',
productCode:''
model: '',
productCode: ''
})
initProjectList()
});
@ -425,14 +439,52 @@
})
}
function changeSaveType(val) {
$('[name="processType"]').val(val)
}
function saveSelect() {
let value = [[${projectOrderInfo.processType}]]
let value2 = [[${projectOrderInfo.orderStatus}]]
var options = {
title: "确认并提交订单",
maxmin: false,
full: false,
type: 1,
btn: ['确认', '取消'],
content: `
<div class="saveBox">
<div><input type="radio" name="saveType" ${value == 0 ? 'checked' : ''} onclick="changeSaveType(0)">电子订单流程</div>
<div class="saveRemark">进货商已经签订框架协议</div>
<div><input type="radio" name="saveType" ${value == 1 ? 'checked' : ''} onclick="changeSaveType(1)">纸质合同流程</div>
<div class="saveRemark">进货商未签订框架协议</div>
<div style="margin-top: 10px"><span style="margin-right: 5px;">保存草稿</span><input type="radio" name="orderCheck" ${value2 == 1 ? 'checked' : ''} onclick="changeStatus(1)"><span></span>&nbsp;&nbsp;<input type="radio" ${value2 == 0 ? 'checked' : ''} name="orderCheck" onclick="changeStatus(0)"><span></span></div>
</div>
`,
yes: function (index, layero) {
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
},
end: function () {
parent.$('.layui-layer-btn').show()
}
};
layer.open(options)
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
}else{
parent.$('.layui-layer-btn').hide()
saveSelect()
} else {
$.modal.alertWarning("请完善表单");
}
}
function changeStatus(val) {
$('[name="orderStatus"]').val(val)
}
$(function () {
initProductList()
$("input[name='estimatedOrderTime']").datetimepicker({
@ -495,7 +547,7 @@
function selectPeople() {
var url = prefix + "/selectPeople";
var options = {
title: '选择代理商',
title: '选择责任人',
width: "680",
height: '600',
url: url,
@ -511,7 +563,6 @@
return;
}
$('#projectNameBox').text(rows[0].projectName)
$('[name="customerCode"]').val(rows[0].customerCode);
$('[name="customerName"]').val(rows[0].customerName);
$('[name="projectCode"]').val(rows[0].projectCode);
$('[name="projectId"]').val(rows[0].id);
@ -534,7 +585,7 @@
$('[name="partnerCode"]').val(rows[0].partnerCode);
$('[name="partnerName"]').val(rows[0].partnerName);
$('[name="level"]').val(rows[0].level);
$('[name="partnerPeople"]').val(rows[0].contactPerson);
$('[name="partnerUserName"]').val(rows[0].contactPerson);
$('[name="partnerPhone"]').val(rows[0].contactPhone);
@ -543,16 +594,18 @@
function initData() {
changeBg()
$('[name="industryType"]').val([[${projectOrderInfo.industryType}]]);
$('#projectNameBox').text([[${projectOrderInfo.projectName}]])
}
function doSubmitPeople(index, layero) {
var rows = layero.find("iframe")[0].contentWindow.getSelections();
if (rows.length == 0) {
$.modal.alertWarning("请选择一个代理商");
$.modal.alertWarning("请选择一个责任人");
return;
}
// $('[name="duty"]').val(rows[0].userId);
$('[name="duty"]').val(rows[0].userName);
$('[name="dutyName"]').val(rows[0].userName);
$('[name="duty"]').val(rows[0].userId);
$('[name="dutyPhone"]').val(rows[0].phonenumber);
$('[name="dutyEmail"]').val(rows[0].email);
@ -569,13 +622,13 @@
<td class="indexBox">${length + 1}</td>
<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==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${ele.productCode}</option>`
}).join('')
}
</select></td>
<td class="layui-form"><select name="softwareProjectProductInfoList[${length}].model" required class="form-control model" lay-search="" lay-filter="productModel1">
${softwareProjectProductInfoList.map((ele) => {
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
</select></td>
@ -604,19 +657,19 @@ ${softwareProjectProductInfoList.map((ele) => {
<td class="indexBox">${length + 1}</td>
<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==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${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" value="${data.model || ''}">
${hardwareProjectProductInfoList.map((ele) => {
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
</select></td>
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td>
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</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>
@ -641,14 +694,14 @@ ${hardwareProjectProductInfoList.map((ele) => {
<td class="indexBox">${length + 1}</td>
<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==data.productBomCode?'selected':''}>${ele.productCode}</option>`
return `<option value="${ele.productCode}" ${ele.productCode == data.productBomCode ? 'selected' : ''}>${ele.productCode}</option>`
}).join('')
}
</select></td>
<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==data.model?'selected':''}>${ele.model}</option>`
return `<option value="${ele.model}" ${ele.model == data.model ? 'selected' : ''}>${ele.model}</option>`
}).join('')
}
@ -889,7 +942,7 @@ ${
<input value="${data.fileName || ''}" name="contractFileList[${length}].fileName" readonly class="form-control"></td>
<td><input value="${data.createByName || ''}" name="contractFileList[${length}].createBy" readonly class="form-control"></td>
<td><input value="${data.uploadTime || ''}" name="contractFileList[${length}].uploadTime" readonly class="form-control" ></td>
<td><span style="cursor:pointer;color: #1686d8;margin-right: 5px;" onclick="preview('${data.filePath}')">预览</span><span style="cursor:pointer;color: #1686d8;margin-right: 5px;" onclick="downFile('${data.filePath}')">下载</span><span style="cursor:pointer;color: #dd242a" class="delfile">删除</span></td>
<td><span style="cursor:pointer;color: #1686d8;margin-right: 5px;" onclick="preview('${data.filePath}','${data.fileName}')">预览</span><span style="cursor:pointer;color: #1686d8;margin-right: 5px;" onclick="downFile('${data.filePath}','${data.fileName}')">下载</span><span style="cursor:pointer;color: #dd242a" class="delfile">删除</span></td>
</tr>`)
$('#fileBox tbody').append(tr)
$('.delfile').on('click', function () {
@ -916,16 +969,15 @@ ${
})
}
function downFile(filePath) {
$.operate.get(prefix + `/file/download?filePath=${filePath}`, function (res) {
window.location.href = res.data
})
function downFile(filePath, fileName) {
window.location.href = prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName);
}
function preview(filePath) {
$.operate.get(prefix + `/file/download?filePath=${filePath}`, function (res) {
window.open(res.data)
})
function preview(filePath, fileName) {
let iframe = window.open('', 'iframe')
let url = prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName)
iframe.document.write(`<iframe src='${url}' style="width: 100%;height
:100%">`)
}
</script>
</body>

View File

@ -29,7 +29,7 @@
</li>
<li>
<label>订单状态:</label>
<select name="bgProperty" class="form-control">
<select name="orderStatus" class="form-control">
<option value="">请选择</option>
<option value="0">草稿</option>
<option value="1">待审批</option>
@ -121,28 +121,20 @@
field: 'createTime',
title: '下单时间'
},
{
field: 'orderStatus',
title: '订单状态'
},
{
field: 'a',
title: '物流状态'
},
{
field: 'province',
title: '属地'
},
// {
// field: 'orderStatus',
// title: '订单状态'
// },
{
field: 'dutyName',
title: '汇智负责人'
},
{
field: 'notifierName',
field: 'notifier',
title: '通知人'
},
{
field: 'notifierEmail',
field: 'partnerName',
title: '进货商'
},
{