除编辑订单外大体完成

master
wangjiuyun 2025-06-08 15:14:25 +08:00
parent 30a669b650
commit 0da73fc2cb
7 changed files with 145 additions and 91 deletions

View File

@ -66,6 +66,9 @@
input, textarea, .productTable td {
position: relative;
}
.productTable label[id*="iscount"]{
top: -30px !important;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -321,12 +324,24 @@
}
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
softwareProjectProductInfoList.unshift({
model:'',
productCode:''
})
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
hardwareProjectProductInfoList.unshift({
model:'',
productCode:''
})
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
maintenanceProjectProductInfoList.unshift({
model:'',
productCode:''
})
})
}

View File

@ -66,6 +66,9 @@
input, textarea, .productTable td {
position: relative;
}
.productTable label[id*="iscount"]{
top: -30px !important;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -216,7 +219,7 @@
<th>产品编号</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 80px">数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
@ -239,7 +242,7 @@
<th>产品编号</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 80px">数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
@ -262,7 +265,7 @@
<th>产品编号</th>
<th>产品型号</th>
<th>描述</th>
<th>数量</th>
<th style="width: 80px">数量</th>
<th style="width: 90px">目录单价(RMB)</th>
<th style="width: 90px">指导折扣</th>
<th style="width: 90px">折扣</th>
@ -344,6 +347,10 @@
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
softwareProjectProductInfoList.unshift({
model:'',
productCode:''
})
let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || []
softwareProjectProductInfoListAll.forEach((ele) => {
addProduct(ele)
@ -351,6 +358,10 @@
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
hardwareProjectProductInfoList.unshift({
model:'',
productCode:''
})
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
hardwareProjectProductInfoListAll.forEach((ele) => {
addProduct2(ele)
@ -359,6 +370,10 @@
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
maintenanceProjectProductInfoList.unshift({
model:'',
productCode:''
})
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
maintenanceProjectProductInfoListAll.forEach((ele) => {
addProduct3(ele)
@ -490,8 +505,7 @@
// 添加软件
function initData() {
console.log(123, [[${projectInfo.competitorList}]])
let competitorList=[[${projectInfo.competitorList}]]
let competitorList=[[${projectInfo.competitorList}]]||[]
competitorList.forEach((ele,index)=>{
if(ele){
$(`input[type="checkbox"][value="${ele}"]`).attr('checked',true)
@ -523,13 +537,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}</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}</option>`
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
}).join('')
}
</select></td>
@ -558,13 +572,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}</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}</option>`
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
}).join('')
}
</select></td>
@ -593,13 +607,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}</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}</option>`
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
}).join('')
}
</select></td>
@ -706,7 +720,7 @@ ${maintenanceProjectProductInfoList.map((ele) => {
}
function initPrice() {
$('#productTable .quantity').on('input', function () {
$('.productTable .quantity').on('input', function () {
let num = $(this).val()
let priceVal = $(this).parent().parent().find('.price').val()
let cateVal = $(this).parent().parent().find('.cataloguePrice').val()
@ -717,14 +731,14 @@ ${maintenanceProjectProductInfoList.map((ele) => {
$(this).parent().parent().find('.catalogueAllPrice').val((num * cateVal).toFixed(2))
}
})
$('#productTable .cataloguePrice').on('input', function () {
$('.productTable .cataloguePrice').on('input', function () {
let val = $(this).val()
$(this).parent().parent().find('.price').val(val)
let quantity = $(this).parent().parent().find('.quantity').val()
if (quantity && val)
$(this).parent().parent().find('.catalogueAllPrice').val((val * quantity).toFixed(2))
})
$('#productTable .guidanceDiscount').on('input', function () {
$('.productTable .guidanceDiscount').on('input', function () {
let val = $(this).val()
let cataloguePrice = $(this).parent().parent().find('.cataloguePrice').val()
$(this).parent().parent().find('.discount').val(val)
@ -735,12 +749,12 @@ ${maintenanceProjectProductInfoList.map((ele) => {
$(this).parent().parent().find('.allPrice').val((price * quantity).toFixed(2))
}
})
$('#productTable .discount').on('input', function () {
$('.productTable .discount').on('input', function () {
let discount = $(this).val()
let val = $(this).parent().parent().find('.cataloguePrice').val()
$(this).parent().parent().find('.price').val((val * discount).toFixed(2))
})
$('#productTable .price').change('input', function () {
$('.productTable .price').change('input', function () {
let val = $(this).val()
let num = $(this).parent().parent().find('.quantity').val()
$(this).parent().parent().find('.allPrice').val((val * num).toFixed(2))

View File

@ -416,13 +416,15 @@
width: 1050,
yes: function (index, layero) {
let body = parent.layer.getChildFrame('body', index)
if ($(body.find('#form-product-add').get(0)).validate().form()) {
$.operate.save(prefix + "/add", body.find('#form-product-add').serialize(), function (res) {
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) {
$.table.search()
parent.layer.close(index)
}
});
}else{
$.modal.alertWarning("请完善表单");
}
},
};

View File

@ -74,7 +74,7 @@
title: '人员名称'
},
{
field: 'phonenumber ',
field: 'phonenumber',
title: '人员电话'
},
{

View File

@ -75,10 +75,13 @@
margin-left: 20px;
display: inline-block;
}
.productTable label[id*="iscount"]{
top: -30px !important;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form id="form-product-add">
<form id="form-order-add">
<div class="section-title">新建订单<span id="projectNameBox"></span></div>
<table>
<tr>
@ -165,8 +168,7 @@
<td>公司直发</td>
<td colspan="3">
<select name="companyDelivery" class="form-control"
th:with="type=${@dict.getType('company_delivery')}"
required>
th:with="type=${@dict.getType('company_delivery')}">
<option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
@ -185,9 +187,9 @@
</tr>
<tr>
<td>汇智责任人</td>
<td><input name="dutyName" class="form-control" type="text"
<td><input name="duty" 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>
@ -215,6 +217,7 @@
<td>
<select name="level" class="form-control" readonly :placeholder="选择后带入"
th:with="type=${@dict.getType('identify_level')}" style="pointer-events: none">
<option value="">选择后带入</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
@ -222,7 +225,7 @@
</tr>
<tr>
<td>进货商联系人</td>
<td><input name="partnerPeople" class="form-control" type="text"></td>
<td><input name="partnerName" class="form-control" type="text"></td>
<td>Email</td>
<td><input type="text" name="partnerEmail"
class="form-control"></td>
@ -366,7 +369,7 @@
<script th:inline="javascript">
var prefix = ctx + "project/order"
$("#form-product-add").validate({
$("#form-order-add").validate({
focusCleanup: true
});
var softwareProjectProductInfoList = []
@ -381,19 +384,31 @@
}
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
softwareProjectProductInfoList.unshift({
model:'',
productCode:''
})
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
hardwareProjectProductInfoList.unshift({
model:'',
productCode:''
})
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
maintenanceProjectProductInfoList.unshift({
model:'',
productCode:''
})
})
}
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-product-add').serialize());
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
}else{
$.modal.alertWarning("请完善表单");
}
@ -538,8 +553,8 @@
$.modal.alertWarning("请选择一个代理商");
return;
}
$('[name="duty"]').val(rows[0].userId);
$('[name="dutyName"]').val(rows[0].userName);
// $('[name="duty"]').val(rows[0].userId);
$('[name="duty"]').val(rows[0].userName);
$('[name="dutyPhone"]').val(rows[0].phonenumber);
$('[name="dutyEmail"]').val(rows[0].email);
@ -556,17 +571,17 @@
<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}</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}</option>`
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
}).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>${data.productDesc || ''}</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>
@ -591,19 +606,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}</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}</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.id ? data.productDesc : (hardwareProjectProductInfoList[0]?.description || '')}</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>
@ -628,19 +643,19 @@ ${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}</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}</option>`
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${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><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</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>

View File

@ -75,10 +75,13 @@
margin-left: 20px;
display: inline-block;
}
.productTable label[id*="iscount"]{
top: -30px !important;
}
</style>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form id="form-product-add" th:object="${projectOrderInfo}">
<form id="form-order-edit" th:object="${projectOrderInfo}">
<div class="section-title">编辑订单<span id="projectNameBox"></span></div>
<table>
<tr>
@ -97,18 +100,18 @@
<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>
<!-- <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">
@ -119,8 +122,8 @@
</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>-->
<!-- <input name="agentCode" class="form-control" th:field="*{agentCode}" type="hidden">-->
</td>
</tr>
<tr>
@ -160,7 +163,7 @@
</td>
<td>执行单有效截止时间<span class="is-required">*</span></td>
<td colspan="3">
<input name="orderEndTime" class="form-control" th:field="*{orderEndTime}" 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>
@ -168,14 +171,14 @@
<td>要求到货时间<span class="is-required">*</span></td>
<td>
<input name="deliveryTime" class="form-control" th:field="*{deliveryTime}" 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')}"
required>
>
<option value="">请选择</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
@ -195,9 +198,10 @@
</tr>
<tr>
<td>汇智责任人</td>
<td><input name="dutyName" class="form-control" type="text"
<td><input name="duty" class="form-control" type="text"
onclick="selectPeople()">
<input name="duty" class="form-control" th:field="*{dutyName}" type="hidden"></td>
<!-- <input name="duty" class="form-control" th:field="*{duty}" type="hidden">-->
</td>
<td>Email</td>
<td><input type="text" name="dutyEmail" th:field="*{dutyEmail}"
class="form-control"></td>
@ -225,25 +229,26 @@
<td>
<select name="level" class="form-control" readonly :placeholder="选择后带入" th:field="*{level}"
th:with="type=${@dict.getType('identify_level')}" style="pointer-events: none">
<option value="">选择后带入</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option>
</select>
</td>
</tr>
<tr>
<td>进货商联系人</td>
<td><input name="partnerPeople" class="form-control" type="text" th:field="*{partnerPeople}"></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="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>供货商<span class="is-required">*</span></td>
<td colspan="5">
<input name="supplier" class="form-control" type="text" required th:field="*{remark}">
<input name="supplier" class="form-control" type="text" required th:field="*{supplier}">
</td>
</tr>
<tr>
@ -377,7 +382,7 @@
<script th:inline="javascript">
var prefix = ctx + "project/order"
$("#form-product-add").validate({
$("#form-order-edit").validate({
focusCleanup: true
});
var softwareProjectProductInfoList = []
@ -392,26 +397,29 @@
}
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
softwareProjectProductInfoList = res.rows
let softwareProjectProductInfoListAll = [[${projectOrderInfo.softwareProjectProductInfoList}]] || []
softwareProjectProductInfoListAll.forEach((ele) => {
addProduct(ele)
softwareProjectProductInfoList.unshift({
model:'',
productCode:''
})
initProjectList()
})
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
hardwareProjectProductInfoList = res.rows
let hardwareProjectProductInfoListAll = [[${projectOrderInfo.hardwareProjectProductInfoList}]] || []
hardwareProjectProductInfoListAll.forEach((ele) => {
addProduct2(ele)
hardwareProjectProductInfoList.unshift({
model:'',
productCode:''
})
initProjectList()
})
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
maintenanceProjectProductInfoList = res.rows
let maintenanceProjectProductInfoListAll = [[${projectOrderInfo.maintenanceProjectProductInfoList}]] || []
maintenanceProjectProductInfoListAll.forEach((ele) => {
addProduct3(ele)
maintenanceProjectProductInfoList.unshift({
model:'',
productCode:''
})
})
initProjectList()
});
([[${projectOrderInfo.contractFileList}]] || []).forEach((ele) => {
addFile(ele)
})
@ -419,7 +427,7 @@
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-product-add').serialize());
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
}else{
$.modal.alertWarning("请完善表单");
}
@ -543,8 +551,8 @@
$.modal.alertWarning("请选择一个代理商");
return;
}
$('[name="duty"]').val(rows[0].userId);
$('[name="dutyName"]').val(rows[0].userName);
// $('[name="duty"]').val(rows[0].userId);
$('[name="duty"]').val(rows[0].userName);
$('[name="dutyPhone"]').val(rows[0].phonenumber);
$('[name="dutyEmail"]').val(rows[0].email);
@ -561,20 +569,20 @@
<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}</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}</option>`
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${ele.model}</option>`
}).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>${data.productDesc || ''}</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.guidanceDiscount || ''}" name="softwareProjectProductInfoList[${length}].guidanceDiscount" oninvalid="()=>{ return '0-1'}" 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>
@ -596,19 +604,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}</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}</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.id ? data.productDesc : (hardwareProjectProductInfoList[0]?.description || '')}</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>
@ -633,19 +641,19 @@ ${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}</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}</option>`
return `<option value="${ele.model}" ${ele.model==data.model?'selected':''}>${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><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</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>

View File

@ -74,7 +74,7 @@
title: '人员名称'
},
{
field: 'phonenumber ',
field: 'phonenumber',
title: '人员电话'
},
{