Compare commits
2 Commits
2be0ced2ce
...
6a62d079d5
Author | SHA1 | Date |
---|---|---|
|
6a62d079d5 | |
|
b7f4711697 |
|
@ -298,16 +298,38 @@
|
||||||
<tbody></tbody>
|
<tbody></tbody>
|
||||||
<!-- 可动态添加行 -->
|
<!-- 可动态添加行 -->
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer"/>
|
<th:block th:include="include :: footer"/>
|
||||||
<th:block th:include="include :: datetimepicker-js"/>
|
<th:block th:include="include :: datetimepicker-js"/>
|
||||||
|
<th:block th:include="include :: layui"/>
|
||||||
|
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "sip/project"
|
var prefix = ctx + "sip/project"
|
||||||
$("#form-product-add").validate({
|
$("#form-product-add").validate({
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
var softwareProjectProductInfoList = []
|
||||||
|
var hardwareProjectProductInfoList = []
|
||||||
|
var maintenanceProjectProductInfoList = []
|
||||||
|
|
||||||
|
function initProductList() {
|
||||||
|
let data = {
|
||||||
|
pageSize: 100000,
|
||||||
|
pageNum: 1,
|
||||||
|
isTable: 0,
|
||||||
|
}
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
|
||||||
|
softwareProjectProductInfoList = res.rows
|
||||||
|
})
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
|
||||||
|
hardwareProjectProductInfoList = res.rows
|
||||||
|
})
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
|
||||||
|
maintenanceProjectProductInfoList = res.rows
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
|
@ -316,6 +338,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
initProductList()
|
||||||
var layerIndex = parent.layer.index
|
var layerIndex = parent.layer.index
|
||||||
parent.layer.full(layerIndex)
|
parent.layer.full(layerIndex)
|
||||||
|
|
||||||
|
@ -433,8 +456,18 @@
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input name="softwareProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
<td class="layui-form"><select name="softwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
||||||
<td><input name="softwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
${softwareProjectProductInfoList.map((ele) => {
|
||||||
|
return `<option value="${ele.productCode}">${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>`
|
||||||
|
}).join('')
|
||||||
|
}
|
||||||
|
</select></td>
|
||||||
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||||
<td><input name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></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}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -451,13 +484,26 @@
|
||||||
initSearchProduct('1')
|
initSearchProduct('1')
|
||||||
initPrice()
|
initPrice()
|
||||||
}
|
}
|
||||||
|
|
||||||
function addProduct2() {
|
function addProduct2() {
|
||||||
let length = $('#productTable2 tbody').find('tr').length
|
let length = $('#productTable2 tbody').find('tr').length
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input name="hardwareProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode3">
|
||||||
<td><input name="hardwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
${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">
|
||||||
|
${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></textarea></td>
|
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||||
<td><input name="hardwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></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}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -474,13 +520,26 @@
|
||||||
initSearchProduct('2')
|
initSearchProduct('2')
|
||||||
initPrice()
|
initPrice()
|
||||||
}
|
}
|
||||||
|
|
||||||
function addProduct3() {
|
function addProduct3() {
|
||||||
let length = $('#productTable3 tbody').find('tr').length
|
let length = $('#productTable3 tbody').find('tr').length
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input name="maintenanceProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode2">
|
||||||
<td><input name="maintenanceProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
${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">
|
||||||
|
${hardwareProjectProductInfoList.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></textarea></td>
|
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||||
<td><input name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></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}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -512,13 +571,27 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function initSearchProduct(type) {
|
function initSearchProduct(type) {
|
||||||
$('.productTable .productBomCode').on('input', function () {
|
layui.use(function () {
|
||||||
let val = $(this).val()
|
var form = layui.form
|
||||||
searchProduct(val, 'code', this,type)
|
form.render()
|
||||||
})
|
form.on('select(productCode1)', function (data) {
|
||||||
$('.productTable .model').on('input', function () {
|
searchProduct(data.value, 'code', data.elem)
|
||||||
let val = $(this).val()
|
})
|
||||||
searchProduct(val, 'model', this,type)
|
form.on('select(productCode2)', function (data) {
|
||||||
|
searchProduct(data.value, 'code', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productCode3)', function (data) {
|
||||||
|
searchProduct(data.value, 'code', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel1)', function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel2)', function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel3)', function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
$('.productTable .delRow').on('click', function () {
|
$('.productTable .delRow').on('click', function () {
|
||||||
let ele = $(this)
|
let ele = $(this)
|
||||||
|
@ -538,42 +611,31 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchProduct(val, type, ele,typeId) {
|
function searchProduct(val, type, ele, typeId) {
|
||||||
if (!val) {
|
let selectObj = {}
|
||||||
$(ele).parent().parent().find('.productBomCode').val('')
|
let listName = $(ele).attr('name')
|
||||||
$(ele).parent().parent().find('.model').val('')
|
|
||||||
$(ele).parent().parent().find('.productDesc').val('')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let data = {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
isTable: 0,
|
|
||||||
type:typeId
|
|
||||||
}
|
|
||||||
if (type == 'code') {
|
if (type == 'code') {
|
||||||
data.productCode = val
|
if (listName.indexOf('softwareProjectProductInfoList') > -1) {
|
||||||
} else if (type == 'model') {
|
selectObj = softwareProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
data.model = val
|
} else if (listName.indexOf('hardwareProjectProductInfoList') > -1) {
|
||||||
}
|
selectObj = hardwareProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
$.operate.post(ctx + 'system/product/list', data, function (res) {
|
} else if (listName.indexOf('maintenanceProjectProductInfoList') > -1) {
|
||||||
if (res.rows.length) {
|
selectObj = maintenanceProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
if (type == 'code') {
|
|
||||||
$(ele).parent().parent().find('.model').val(res.rows[0].model)
|
|
||||||
} else if (type == 'model') {
|
|
||||||
$(ele).parent().parent().find('.productBomCode').val(res.rows[0].productCode)
|
|
||||||
}
|
|
||||||
$(ele).parent().parent().find('.productDesc').val(res.rows[0].description)
|
|
||||||
} else {
|
|
||||||
if (type == 'code') {
|
|
||||||
$(ele).parent().parent().find('.model').val('')
|
|
||||||
} else if (type == 'model') {
|
|
||||||
$(ele).parent().parent().find('.productBomCode').val('')
|
|
||||||
}
|
|
||||||
$(ele).parent().parent().find('.productDesc').val('')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
$(ele).parent().parent().find('.model+div').find('.layui-input').val(selectObj.model)
|
||||||
|
$(ele).parent().parent().find('.model').val(selectObj.model)
|
||||||
|
} else {
|
||||||
|
if (listName.indexOf('softwareProjectProductInfoList') > -1) {
|
||||||
|
selectObj = softwareProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
} else if (listName.indexOf('hardwareProjectProductInfoList') > -1) {
|
||||||
|
selectObj = hardwareProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
} else if (listName.indexOf('maintenanceProjectProductInfoList') > -1) {
|
||||||
|
selectObj = maintenanceProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
}
|
||||||
|
$(ele).parent().parent().find('.productBomCode+div').find('.layui-input').val(selectObj.model)
|
||||||
|
$(ele).parent().parent().find('.productBomCode').val(selectObj.productCode)
|
||||||
|
}
|
||||||
|
$(ele).parent().parent().find('.productDesc').val(selectObj.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
function initPrice() {
|
function initPrice() {
|
||||||
|
|
|
@ -167,11 +167,11 @@
|
||||||
required></td>
|
required></td>
|
||||||
<td>预计下单时间</td>
|
<td>预计下单时间</td>
|
||||||
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd"
|
<td><input name="estimatedOrderTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||||
th:field="*{estimatedOrderTime}">
|
th:value="${#dates.format(projectInfo.estimatedOrderTime, 'yyyy-MM-dd')}">
|
||||||
</td>
|
</td>
|
||||||
<td>预计发货时间</td>
|
<td>预计发货时间</td>
|
||||||
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
|
<td><input name="estimatedDeliverTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||||
th:field="*{estimatedDeliverTime}"></td>
|
th:value="${#dates.format(projectInfo.estimatedDeliverTime, 'yyyy-MM-dd')}"></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -325,12 +325,48 @@
|
||||||
</div>
|
</div>
|
||||||
<th:block th:include="include :: footer"/>
|
<th:block th:include="include :: footer"/>
|
||||||
<th:block th:include="include :: datetimepicker-js"/>
|
<th:block th:include="include :: datetimepicker-js"/>
|
||||||
|
<th:block th:include="include :: layui"/>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "sip/project"
|
var prefix = ctx + "sip/project"
|
||||||
$("#form-product-add").validate({
|
$("#form-product-add").validate({
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
var softwareProjectProductInfoList = []
|
||||||
|
var hardwareProjectProductInfoList = []
|
||||||
|
var maintenanceProjectProductInfoList = []
|
||||||
|
|
||||||
|
function initProductList() {
|
||||||
|
let data = {
|
||||||
|
pageSize: 100000,
|
||||||
|
pageNum: 1,
|
||||||
|
isTable: 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
|
||||||
|
softwareProjectProductInfoList = res.rows
|
||||||
|
let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || []
|
||||||
|
softwareProjectProductInfoListAll.forEach((ele) => {
|
||||||
|
addProduct(ele)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
|
||||||
|
hardwareProjectProductInfoList = res.rows
|
||||||
|
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
|
||||||
|
hardwareProjectProductInfoListAll.forEach((ele) => {
|
||||||
|
addProduct2(ele)
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
|
||||||
|
maintenanceProjectProductInfoList = res.rows
|
||||||
|
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
|
||||||
|
maintenanceProjectProductInfoListAll.forEach((ele) => {
|
||||||
|
addProduct3(ele)
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
|
@ -339,6 +375,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
initProductList()
|
||||||
var layerIndex = parent.layer.index
|
var layerIndex = parent.layer.index
|
||||||
parent.layer.full(layerIndex)
|
parent.layer.full(layerIndex)
|
||||||
|
|
||||||
|
@ -354,7 +391,6 @@
|
||||||
});
|
});
|
||||||
initData()
|
initData()
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function selectCustomer() {
|
function selectCustomer() {
|
||||||
|
@ -454,18 +490,6 @@
|
||||||
|
|
||||||
// 添加软件
|
// 添加软件
|
||||||
function initData() {
|
function initData() {
|
||||||
let softwareProjectProductInfoList = [[${projectInfo.softwareProjectProductInfoList}]]
|
|
||||||
softwareProjectProductInfoList.forEach((ele) => {
|
|
||||||
addProduct(ele)
|
|
||||||
})
|
|
||||||
let hardwareProjectProductInfoList = [[${projectInfo.hardwareProjectProductInfoList}]]
|
|
||||||
hardwareProjectProductInfoList.forEach((ele) => {
|
|
||||||
addProduct2(ele)
|
|
||||||
})
|
|
||||||
let maintenanceProjectProductInfoList = [[${projectInfo.maintenanceProjectProductInfoList}]]
|
|
||||||
maintenanceProjectProductInfoList.forEach((ele) => {
|
|
||||||
addProduct3(ele)
|
|
||||||
})
|
|
||||||
|
|
||||||
let arr2 = [[${projectInfo.projectWorkProgressList}]]
|
let arr2 = [[${projectInfo.projectWorkProgressList}]]
|
||||||
arr2.forEach((ele) => {
|
arr2.forEach((ele) => {
|
||||||
|
@ -487,8 +511,19 @@
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" value="${data.productBomCode || ''}" required></td>
|
<td class="layui-form"><input type="hidden" name="softwareProjectProductInfoList[${length}].id" value="${data.id || ''}">
|
||||||
<td><input name="softwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required value="${data.model || ''}"></td>
|
<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>`
|
||||||
|
}).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>`
|
||||||
|
}).join('')
|
||||||
|
}
|
||||||
|
</select></td>
|
||||||
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</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.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.cataloguePrice || ''}" name="softwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -505,13 +540,25 @@
|
||||||
initSearchProduct('1')
|
initSearchProduct('1')
|
||||||
initPrice()
|
initPrice()
|
||||||
}
|
}
|
||||||
|
|
||||||
function addProduct2(data) {
|
function addProduct2(data) {
|
||||||
let length = $('#productTable2 tbody').find('tr').length
|
let length = $('#productTable2 tbody').find('tr').length
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}"><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" value="${data.productBomCode || ''}" required></td>
|
<td class="layui-form"><input type="hidden" name="hardwareProjectProductInfoList[${length}].id" value="${data.id || ''}">
|
||||||
<td><input name="hardwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required value="${data.model || ''}"></td>
|
<select value="${data.productBomCode || ''}" name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
||||||
|
${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">
|
||||||
|
${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>${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.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.cataloguePrice || ''}" name="hardwareProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -528,13 +575,25 @@
|
||||||
initSearchProduct('2')
|
initSearchProduct('2')
|
||||||
initPrice()
|
initPrice()
|
||||||
}
|
}
|
||||||
|
|
||||||
function addProduct3(data) {
|
function addProduct3(data) {
|
||||||
let length = $('#productTable3 tbody').find('tr').length
|
let length = $('#productTable3 tbody').find('tr').length
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}"><input name="projectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" value="${data.productBomCode || ''}" required></td>
|
<td class="layui-form"><input type="hidden" name="maintenanceProjectProductInfoList[${length}].id" value="${data.id || ''}">
|
||||||
<td><input name="maintenanceProjectProductInfoList[${length}].model" type="text" class="form-control model" required value="${data.model || ''}"></td>
|
<select value="${data.productBomCode || ''}" name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
||||||
|
${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">
|
||||||
|
${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>${data.productDesc || ''}</textarea></td>
|
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td>
|
||||||
<td><input value="${data.quantity || ''}" name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
<td><input value="${data.quantity || ''}" name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></td>
|
||||||
<td><input value="${data.cataloguePrice || ''}" name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
<td><input value="${data.cataloguePrice || ''}" name="maintenanceProjectProductInfoList[${length}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -551,6 +610,7 @@
|
||||||
initSearchProduct('11,22')
|
initSearchProduct('11,22')
|
||||||
initPrice()
|
initPrice()
|
||||||
}
|
}
|
||||||
|
|
||||||
function addLog(data) {
|
function addLog(data) {
|
||||||
let length = $('#workLog tbody').find('tr').length
|
let length = $('#workLog tbody').find('tr').length
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
|
@ -565,13 +625,27 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function initSearchProduct(type) {
|
function initSearchProduct(type) {
|
||||||
$('.productTable .productBomCode').on('input', function () {
|
layui.use(function () {
|
||||||
let val = $(this).val()
|
var form = layui.form
|
||||||
searchProduct(val, 'code', this,type)
|
form.render()
|
||||||
})
|
form.on('select(productCode1)', function (data) {
|
||||||
$('.productTable .model').on('input', function () {
|
searchProduct(data.value, 'code', data.elem)
|
||||||
let val = $(this).val()
|
})
|
||||||
searchProduct(val, 'model', this,type)
|
form.on('select(productCode2)', function (data) {
|
||||||
|
searchProduct(data.value, 'code', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productCode3)', function (data) {
|
||||||
|
searchProduct(data.value, 'code', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel1)', function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel2)', function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel3)', function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
$('.productTable .delRow').on('click', function () {
|
$('.productTable .delRow').on('click', function () {
|
||||||
let ele = $(this)
|
let ele = $(this)
|
||||||
|
@ -592,42 +666,31 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchProduct(val, type, ele,typeId) {
|
function searchProduct(val, type, ele, typeId) {
|
||||||
if (!val) {
|
let selectObj = {}
|
||||||
$(ele).parent().parent().find('.productBomCode').val('')
|
let listName = $(ele).attr('name')
|
||||||
$(ele).parent().parent().find('.model').val('')
|
|
||||||
$(ele).parent().parent().find('.productDesc').val('')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let data = {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
isTable: 0,
|
|
||||||
type:typeId
|
|
||||||
}
|
|
||||||
if (type == 'code') {
|
if (type == 'code') {
|
||||||
data.productCode = val
|
if (listName.indexOf('softwareProjectProductInfoList') > -1) {
|
||||||
} else if (type == 'model') {
|
selectObj = softwareProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
data.model = val
|
} else if (listName.indexOf('hardwareProjectProductInfoList') > -1) {
|
||||||
}
|
selectObj = hardwareProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
$.operate.post(ctx + 'system/product/list', data, function (res) {
|
} else if (listName.indexOf('maintenanceProjectProductInfoList') > -1) {
|
||||||
if (res.rows.length) {
|
selectObj = maintenanceProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
if (type == 'code') {
|
|
||||||
$(ele).parent().parent().find('.model').val(res.rows[0].model)
|
|
||||||
} else if (type == 'model') {
|
|
||||||
$(ele).parent().parent().find('.productBomCode').val(res.rows[0].productCode)
|
|
||||||
}
|
|
||||||
$(ele).parent().parent().find('.productDesc').val(res.rows[0].description)
|
|
||||||
} else {
|
|
||||||
if (type == 'code') {
|
|
||||||
$(ele).parent().parent().find('.model').val('')
|
|
||||||
} else if (type == 'model') {
|
|
||||||
$(ele).parent().parent().find('.productBomCode').val('')
|
|
||||||
}
|
|
||||||
$(ele).parent().parent().find('.productDesc').val('')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
$(ele).parent().parent().find('.model+div').find('.layui-input').val(selectObj.model)
|
||||||
|
$(ele).parent().parent().find('.model').val(selectObj.model)
|
||||||
|
} else {
|
||||||
|
if (listName.indexOf('softwareProjectProductInfoList') > -1) {
|
||||||
|
selectObj = softwareProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
} else if (listName.indexOf('hardwareProjectProductInfoList') > -1) {
|
||||||
|
selectObj = hardwareProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
} else if (listName.indexOf('maintenanceProjectProductInfoList') > -1) {
|
||||||
|
selectObj = maintenanceProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
}
|
||||||
|
$(ele).parent().parent().find('.productBomCode+div').find('.layui-input').val(selectObj.model)
|
||||||
|
$(ele).parent().parent().find('.productBomCode').val(selectObj.productCode)
|
||||||
|
}
|
||||||
|
$(ele).parent().parent().find('.productDesc').val(selectObj.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
function initPrice() {
|
function initPrice() {
|
||||||
|
|
|
@ -210,7 +210,6 @@
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
if(row.bgProperty=='YYS'){
|
if(row.bgProperty=='YYS'){
|
||||||
return $.table.selectDictLabel([[${@dict.getType('bg_yys')}]], value);
|
return $.table.selectDictLabel([[${@dict.getType('bg_yys')}]], value);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
return $.table.selectDictLabel([[${@dict.getType('bg_hsys')}]], value);
|
return $.table.selectDictLabel([[${@dict.getType('bg_hsys')}]], value);
|
||||||
|
|
||||||
|
|
|
@ -66,56 +66,58 @@
|
||||||
input, textarea, .productTable td {
|
input, textarea, .productTable td {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[name="bgProperty"], #industryTypeBox select {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#projectNameBox {
|
||||||
|
margin-left: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<body class="white-bg">
|
<body class="white-bg">
|
||||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||||
<form id="form-product-add">
|
<form id="form-product-add">
|
||||||
<div class="section-title">新建订单</div>
|
<div class="section-title">新建订单<span id="projectNameBox"></span></div>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="shortTd">项目编号<span class="is-required">*</span></td>
|
<td class="shortTd">项目编号<span class="is-required">*</span></td>
|
||||||
<td><input type="text" name="projectCode" class="form-control" oninput="searchProject()">
|
<td>
|
||||||
|
<input name="projectId" class="form-control" type="hidden">
|
||||||
|
<input type="text" name="projectCode" placeholder="请选择" class="form-control"
|
||||||
|
onclick="searchProject()">
|
||||||
</td>
|
</td>
|
||||||
<td class="shortTd">项目名称<span class="is-required">*</span></td>
|
<td class="shortTd">项目名称<span class="is-required">*</span></td>
|
||||||
<td><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符"
|
<td><input type="text" name="projectName"
|
||||||
class="form-control"></td>
|
class="form-control" placeholder="选择项目后带入" readonly></td>
|
||||||
<td class="shortTd">最终客户<span class="is-required">*</span></td>
|
<td class="shortTd">最终客户<span class="is-required">*</span></td>
|
||||||
<td><input name="customerName" class="form-control" type="text" required onclick="selectCustomer()">
|
<td><input name="customerName" class="form-control" type="text" readonly placeholder="选择项目后带入"
|
||||||
|
required>
|
||||||
<input name="customerCode" class="form-control" type="hidden"></td>
|
<input name="customerCode" class="form-control" type="hidden"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>BG<span class="is-required">*</span></td>
|
<td>BG<span class="is-required">*</span></td>
|
||||||
<td colspan="2">
|
<td>
|
||||||
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
|
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
|
||||||
onchange="changeBg()" required>
|
readonly required>
|
||||||
<option value="">请选择BG</option>
|
<option value="">请选择BG</option>
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
th:value="${dict.dictValue}"></option>
|
th:value="${dict.dictValue}"></option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>行业<span class="is-required">*</span></td>
|
<td>行业<span class="is-required">*</span></td>
|
||||||
<td colspan="2" id="industryTypeBox">
|
<td id="industryTypeBox">
|
||||||
<select name="industryType" class="form-control"
|
<select name="industryType" class="form-control"
|
||||||
required>
|
required readonly>
|
||||||
<option value="">请先选择BG</option>
|
<option value="">请先选择BG</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
|
<td>代表处<span class="is-required">*</span></td>
|
||||||
</tr>
|
<td colspan="3">
|
||||||
<tr id="element1">
|
<input name="agentName" class="form-control" type="text" readonly required>
|
||||||
<td>属地<span class="is-required">*</span></td>
|
<input name="agentCode" class="form-control" type="hidden">
|
||||||
<td colspan="2">
|
|
||||||
<select name="province" class="province form-control m-b" data-first-title="选择省">
|
|
||||||
<option value="">请选择</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="地市">属地<span class="is-required">*</span></td>
|
|
||||||
<td colspan="2">
|
|
||||||
<select name="city" class="city form-control m-b" data-first-title="选择省">
|
|
||||||
<option value="">请选择</option>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>进货商商务接口人姓名<span class="is-required">*</span></td>
|
<td>进货商商务接口人姓名<span class="is-required">*</span></td>
|
||||||
|
@ -144,10 +146,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>实际进货金额<span class="is-required">*</span></td>
|
<td>实际进货金额<span class="is-required">*</span></td>
|
||||||
<td colspan="2"><input type="number" name="actualPurchaseAmount" class="form-control" required>
|
<td><input type="number" name="actualPurchaseAmount" class="form-control" required>
|
||||||
</td>
|
</td>
|
||||||
<td>执行单有效截止时间<span class="is-required">*</span></td>
|
<td>执行单有效截止时间<span class="is-required">*</span></td>
|
||||||
<td colspan="2">
|
<td colspan="3">
|
||||||
<input name="orderEndTime" class="form-control" placeholder="yyyy-MM-dd"
|
<input name="orderEndTime" class="form-control" placeholder="yyyy-MM-dd"
|
||||||
required>
|
required>
|
||||||
</td>
|
</td>
|
||||||
|
@ -155,11 +157,11 @@
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td>要求到货时间<span class="is-required">*</span></td>
|
<td>要求到货时间<span class="is-required">*</span></td>
|
||||||
<td colspan="2">
|
<td>
|
||||||
<input name="deliveryTime" class="form-control" placeholder="yyyy-MM-dd" required>
|
<input name="deliveryTime" class="form-control" placeholder="yyyy-MM-dd" required>
|
||||||
</td>
|
</td>
|
||||||
<td>公司直发</td>
|
<td>公司直发</td>
|
||||||
<td colspan="2">
|
<td colspan="3">
|
||||||
<select name="companyDelivery" class="form-control"
|
<select name="companyDelivery" class="form-control"
|
||||||
th:with="type=${@dict.getType('company_delivery')}"
|
th:with="type=${@dict.getType('company_delivery')}"
|
||||||
required>
|
required>
|
||||||
|
@ -208,7 +210,13 @@
|
||||||
<td><input type="text" name="partnerCode"
|
<td><input type="text" name="partnerCode"
|
||||||
class="form-control" readonly placeholder="选择后带入" required></td>
|
class="form-control" readonly placeholder="选择后带入" required></td>
|
||||||
<td>进货商类型<span class="is-required">*</span></td>
|
<td>进货商类型<span class="is-required">*</span></td>
|
||||||
<td><input name="level" class="form-control" placeholder="选择后带入" type="text" required></td>
|
<td>
|
||||||
|
<select name="level" class="form-control" readonly :placeholder="选择后带入"
|
||||||
|
th:with="type=${@dict.getType('identify_level')}" style="pointer-events: none">
|
||||||
|
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
||||||
|
th:value="${dict.dictValue}"></option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>供货商<span class="is-required">*</span></td>
|
<td>供货商<span class="is-required">*</span></td>
|
||||||
|
@ -310,7 +318,7 @@
|
||||||
<div class="layui-tab-item">内容-4</div>
|
<div class="layui-tab-item">内容-4</div>
|
||||||
<div class="layui-tab-item">
|
<div class="layui-tab-item">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<input id="uploadInput" type="file" accept=".xls,.xlsx" style="display: none">
|
<input id="uploadInput" type="file" accept=".pdf" style="display: none">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<button type="button" class="btn btn-white btn-sm" onclick="downloadTem()"><i
|
<button type="button" class="btn btn-white btn-sm" onclick="downloadTem()"><i
|
||||||
class="fa fa-download">
|
class="fa fa-download">
|
||||||
|
@ -340,6 +348,27 @@
|
||||||
$("#form-product-add").validate({
|
$("#form-product-add").validate({
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
var softwareProjectProductInfoList = []
|
||||||
|
var hardwareProjectProductInfoList = []
|
||||||
|
var maintenanceProjectProductInfoList = []
|
||||||
|
|
||||||
|
function initProductList() {
|
||||||
|
let data = {
|
||||||
|
pageSize: 100000,
|
||||||
|
pageNum: 1,
|
||||||
|
isTable: 0,
|
||||||
|
}
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '1'}, function (res) {
|
||||||
|
softwareProjectProductInfoList = res.rows
|
||||||
|
})
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '2'}, function (res) {
|
||||||
|
hardwareProjectProductInfoList = res.rows
|
||||||
|
})
|
||||||
|
$.operate.post(ctx + 'system/product/list', {...data, type: '11,22'}, function (res) {
|
||||||
|
maintenanceProjectProductInfoList = res.rows
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
|
@ -348,6 +377,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
initProductList()
|
||||||
var layerIndex = parent.layer.index
|
var layerIndex = parent.layer.index
|
||||||
parent.layer.full(layerIndex)
|
parent.layer.full(layerIndex)
|
||||||
|
|
||||||
|
@ -383,14 +413,14 @@
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
function selectCustomer() {
|
function searchProject() {
|
||||||
var url = prefix + "/selectCustomer";
|
var url = prefix + "/selectProject";
|
||||||
var options = {
|
var options = {
|
||||||
title: '选择客户',
|
title: '选择客户',
|
||||||
width: "680",
|
width: "680",
|
||||||
url: url,
|
url: url,
|
||||||
height: '600',
|
height: '600',
|
||||||
callBack: doSubmitCustomer
|
callBack: doSubmitProject
|
||||||
};
|
};
|
||||||
$.modal.openOptions(options);
|
$.modal.openOptions(options);
|
||||||
}
|
}
|
||||||
|
@ -407,18 +437,6 @@
|
||||||
$.modal.openOptions(options);
|
$.modal.openOptions(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectAgent() {
|
|
||||||
var url = prefix + "/selectAgent";
|
|
||||||
var options = {
|
|
||||||
title: '选择代理商',
|
|
||||||
width: "680",
|
|
||||||
height: '600',
|
|
||||||
url: url,
|
|
||||||
callBack: doSubmitAgent
|
|
||||||
};
|
|
||||||
$.modal.openOptions(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectPeople() {
|
function selectPeople() {
|
||||||
var url = prefix + "/selectPeople";
|
var url = prefix + "/selectPeople";
|
||||||
var options = {
|
var options = {
|
||||||
|
@ -431,14 +449,25 @@
|
||||||
$.modal.openOptions(options);
|
$.modal.openOptions(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSubmitCustomer(index, layero) {
|
function doSubmitProject(index, layero) {
|
||||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
||||||
if (rows.length == 0) {
|
if (rows.length == 0) {
|
||||||
$.modal.alertWarning("请选择一个用户");
|
$.modal.alertWarning("请选择一个用户");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$('#projectNameBox').text(rows[0].projectName)
|
||||||
$('[name="customerCode"]').val(rows[0].customerCode);
|
$('[name="customerCode"]').val(rows[0].customerCode);
|
||||||
$(' [name="customerName"]').val(rows[0].customerName);
|
$('[name="customerName"]').val(rows[0].customerName);
|
||||||
|
$('[name="projectCode"]').val(rows[0].projectCode);
|
||||||
|
$('[name="projectId"]').val(rows[0].id);
|
||||||
|
$('[name="projectName"]').val(rows[0].projectName);
|
||||||
|
$('[name="bgProperty"]').val(rows[0].bgProperty);
|
||||||
|
$('[name="agentName"]').val(rows[0].agentName);
|
||||||
|
$('[name="agentCode"]').val(rows[0].agentCode);
|
||||||
|
changeBg()
|
||||||
|
$('[name="industryType"]').val(rows[0].industryType);
|
||||||
|
|
||||||
|
|
||||||
$.modal.close(index);
|
$.modal.close(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,17 +499,6 @@
|
||||||
$.modal.close(index);
|
$.modal.close(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
function doSubmitAgent(index, layero) {
|
|
||||||
var rows = layero.find("iframe")[0].contentWindow.getSelections();
|
|
||||||
if (rows.length == 0) {
|
|
||||||
$.modal.alertWarning("请选择一个代理商");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$('[name="agentCode"]').val(rows[0].agentCode);
|
|
||||||
$('[name="agentName"]').val(rows[0].agentName);
|
|
||||||
|
|
||||||
$.modal.close(index);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加软件
|
// 添加软件
|
||||||
function addProduct() {
|
function addProduct() {
|
||||||
|
@ -488,8 +506,18 @@
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input name="softwareProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
<td class="layui-form"><select name="softwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode1">
|
||||||
<td><input name="softwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
${softwareProjectProductInfoList.map((ele) => {
|
||||||
|
return `<option value="${ele.productCode}">${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>`
|
||||||
|
}).join('')
|
||||||
|
}
|
||||||
|
</select></td>
|
||||||
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
<td><textarea name="softwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||||
<td><input name="softwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></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}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -512,8 +540,20 @@
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input name="hardwareProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
<td class="layui-form"><select name="hardwareProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode2">
|
||||||
<td><input name="hardwareProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
${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">
|
||||||
|
${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></textarea></td>
|
<td><textarea name="hardwareProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||||
<td><input name="hardwareProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></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}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -536,8 +576,20 @@
|
||||||
let tr = $(`
|
let tr = $(`
|
||||||
<tr>
|
<tr>
|
||||||
<td class="indexBox">${length + 1}</td>
|
<td class="indexBox">${length + 1}</td>
|
||||||
<td><input name="maintenanceProjectProductInfoList[${length}].productBomCode" type="text" class="form-control productBomCode" required></td>
|
<td class="layui-form"><select name="maintenanceProjectProductInfoList[${length}].productBomCode" required class="form-control productBomCode" lay-search="" lay-filter="productCode3">
|
||||||
<td><input name="maintenanceProjectProductInfoList[${length}].model" type="text" class="form-control model" required></td>
|
${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">
|
||||||
|
${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></textarea></td>
|
<td><textarea name="maintenanceProjectProductInfoList[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly></textarea></td>
|
||||||
<td><input name="maintenanceProjectProductInfoList[${length}].quantity" type="number" class="form-control quantity" step="1" required></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}].cataloguePrice" type="text" class="form-control cataloguePrice" required></td>
|
||||||
|
@ -568,14 +620,28 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function initSearchProduct(type) {
|
function initSearchProduct() {
|
||||||
$('.productTable .productBomCode').on('input', function () {
|
layui.use(function (){
|
||||||
let val = $(this).val()
|
var form=layui.form
|
||||||
searchProduct(val, 'code', this,type)
|
form.render()
|
||||||
})
|
form.on('select(productCode1)',function (data) {
|
||||||
$('.productTable .model').on('input', function () {
|
searchProduct(data.value, 'code', data.elem)
|
||||||
let val = $(this).val()
|
})
|
||||||
searchProduct(val, 'model', this,type)
|
form.on('select(productCode2)',function (data) {
|
||||||
|
searchProduct(data.value, 'code', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productCode3)',function (data) {
|
||||||
|
searchProduct(data.value, 'code', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel1)',function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel2)',function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
|
form.on('select(productModel3)',function (data) {
|
||||||
|
searchProduct(data.value, 'model', data.elem)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
$('.productTable .delRow').on('click', function () {
|
$('.productTable .delRow').on('click', function () {
|
||||||
let ele = $(this)
|
let ele = $(this)
|
||||||
|
@ -595,42 +661,31 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchProduct(val, type, ele,typeId) {
|
function searchProduct(val, type, ele) {
|
||||||
if (!val) {
|
let selectObj = {}
|
||||||
$(ele).parent().parent().find('.productBomCode').val('')
|
let listName = $(ele).attr('name')
|
||||||
$(ele).parent().parent().find('.model').val('')
|
|
||||||
$(ele).parent().parent().find('.productDesc').val('')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
let data = {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNum: 1,
|
|
||||||
isTable: 0,
|
|
||||||
type:typeId
|
|
||||||
}
|
|
||||||
if (type == 'code') {
|
if (type == 'code') {
|
||||||
data.productCode = val
|
if (listName.indexOf('softwareProjectProductInfoList') > -1) {
|
||||||
} else if (type == 'model') {
|
selectObj = softwareProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
data.model = val
|
} else if (listName.indexOf('hardwareProjectProductInfoList') > -1) {
|
||||||
}
|
selectObj = hardwareProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
$.operate.post(ctx + 'system/product/list', data, function (res) {
|
} else if (listName.indexOf('maintenanceProjectProductInfoList') > -1) {
|
||||||
if (res.rows.length) {
|
selectObj = maintenanceProjectProductInfoList.find((ele) => ele.productCode == val)
|
||||||
if (type == 'code') {
|
|
||||||
$(ele).parent().parent().find('.model').val(res.rows[0].model)
|
|
||||||
} else if (type == 'model') {
|
|
||||||
$(ele).parent().parent().find('.productBomCode').val(res.rows[0].productCode)
|
|
||||||
}
|
|
||||||
$(ele).parent().parent().find('.productDesc').val(res.rows[0].description)
|
|
||||||
} else {
|
|
||||||
if (type == 'code') {
|
|
||||||
$(ele).parent().parent().find('.model').val('')
|
|
||||||
} else if (type == 'model') {
|
|
||||||
$(ele).parent().parent().find('.productBomCode').val('')
|
|
||||||
}
|
|
||||||
$(ele).parent().parent().find('.productDesc').val('')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
)
|
$(ele).parent().parent().find('.model+div').find('.layui-input').val(selectObj.model)
|
||||||
|
$(ele).parent().parent().find('.model').val(selectObj.model)
|
||||||
|
} else {
|
||||||
|
if (listName.indexOf('softwareProjectProductInfoList') > -1) {
|
||||||
|
selectObj = softwareProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
} else if (listName.indexOf('hardwareProjectProductInfoList') > -1) {
|
||||||
|
selectObj = hardwareProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
} else if (listName.indexOf('maintenanceProjectProductInfoList') > -1) {
|
||||||
|
selectObj = maintenanceProjectProductInfoList.find((ele) => ele.model == val)
|
||||||
|
}
|
||||||
|
$(ele).parent().parent().find('.productBomCode+div').find('.layui-input').val(selectObj.model)
|
||||||
|
$(ele).parent().parent().find('.productBomCode').val(selectObj.productCode)
|
||||||
|
}
|
||||||
|
$(ele).parent().parent().find('.productDesc').val(selectObj.description)
|
||||||
}
|
}
|
||||||
|
|
||||||
function initPrice() {
|
function initPrice() {
|
||||||
|
@ -690,7 +745,7 @@
|
||||||
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
|
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
|
||||||
})
|
})
|
||||||
$('#industryTypeBox').html(`
|
$('#industryTypeBox').html(`
|
||||||
<select name="industryType" class="form-control" required>
|
<select name="industryType" class="form-control" readonly required>
|
||||||
<option value="">请选择行业</option>
|
<option value="">请选择行业</option>
|
||||||
${str}
|
${str}
|
||||||
</select>
|
</select>
|
||||||
|
@ -702,7 +757,7 @@
|
||||||
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
|
str += `<option value="${ele.dictValue}">${ele.dictLabel}</option> `
|
||||||
})
|
})
|
||||||
$('#industryTypeBox').html(`
|
$('#industryTypeBox').html(`
|
||||||
<select name="industryType" class="form-control" required>
|
<select name="industryType" class="form-control" required readonly>
|
||||||
<option value="">请选择行业</option>
|
<option value="">请选择行业</option>
|
||||||
${str}
|
${str}
|
||||||
</select>
|
</select>
|
||||||
|
@ -712,22 +767,25 @@
|
||||||
|
|
||||||
function downloadTem() {
|
function downloadTem() {
|
||||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||||
if(!$('[name="orderChannel"]').val()){
|
if (!$('[name="orderChannel"]').val()) {
|
||||||
$.modal.alertWarning("请先选择下单通路");
|
$.modal.alertWarning("请先选择下单通路");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if($('[name="orderChannel"]').val()==1){
|
if ($('[name="orderChannel"]').val() == 1) {
|
||||||
window.location.href = prefix + "/contract/export?fileName=文件111.xlsx"
|
window.location.href = prefix + "/contract/export?fileName=文件111.xlsx"
|
||||||
}else{
|
} else {
|
||||||
window.location.href = prefix + "/contract/export?fileName=文件222.xlsx"
|
window.location.href = prefix + "/contract/export?fileName=文件222.xlsx"
|
||||||
}
|
}
|
||||||
|
|
||||||
$.modal.closeLoading()
|
$.modal.closeLoading()
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('uploadInput').addEventListener('change', function (event) {
|
document.getElementById('uploadInput').addEventListener('change', function (event) {
|
||||||
const file = event.target.files[0];
|
const file = event.target.files[0];
|
||||||
let data = new FormData()
|
let data = new FormData()
|
||||||
data.append('file', file)
|
data.append('file', file)
|
||||||
|
data.append('projectId', $('[name="projectId"]').val())
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
var xhr = new XMLHttpRequest(); // 创建XMLHttpRequest对象
|
||||||
xhr.open('POST', prefix + '/importContractData', true); // 设置请求类型和URL
|
xhr.open('POST', prefix + '/importContractData', true); // 设置请求类型和URL
|
||||||
// 当请求完成时执行的回调函数
|
// 当请求完成时执行的回调函数
|
||||||
|
@ -820,6 +878,14 @@
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function importList() {
|
||||||
|
if (!$('[name="projectId"]').val()) {
|
||||||
|
$.modal.alertWarning("请先选择项目");
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$('#uploadInput').click()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -19,15 +19,9 @@
|
||||||
<input type="text" name="projectName" placeholder="项目名称" />
|
<input type="text" name="projectName" placeholder="项目名称" />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>项目负责人:</label>
|
<label>汇智负责人:</label>
|
||||||
<input type="text" name="dutyName" placeholder="项目负责人" />
|
<input type="text" name="dutyName" placeholder="项目负责人" />
|
||||||
</li>
|
</li>
|
||||||
<li id="element1">
|
|
||||||
<label>属地:</label>
|
|
||||||
<select name="province" class="province form-control m-b" data-first-title="选择省">
|
|
||||||
<option value="">请选择</option>
|
|
||||||
</select>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<label>供货商:</label>
|
<label>供货商:</label>
|
||||||
<select name="bgProperty" class="form-control">
|
<select name="bgProperty" class="form-control">
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('选择客户')"/>
|
<th:block th:include="include :: header('选择项目')"/>
|
||||||
</head>
|
</head>
|
||||||
<style>
|
<style>
|
||||||
.select-list li {
|
.select-list li {
|
||||||
|
@ -20,30 +20,17 @@
|
||||||
<div class="select-list">
|
<div class="select-list">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>客户编码:</label>
|
<label>项目编码:</label>
|
||||||
<input type="text" name="customerCode"/>
|
<input type="text" name="projectCode"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>客户名称:</label>
|
<label>项目名称:</label>
|
||||||
|
<input type="text" name="projectName"/>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>最终客户:</label>
|
||||||
<input type="text" name="customerName"/>
|
<input type="text" name="customerName"/>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<label>联系人:</label>
|
|
||||||
<input type="text" name="contactPerson"/>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label>联系电话:</label>
|
|
||||||
<input type="text" name="contactPhone"/>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label>所属行业:</label>
|
|
||||||
<select name="industryType" class="form-control"
|
|
||||||
th:with="type=${@dict.getType('industry_code')}" required>
|
|
||||||
<option value="">所有</option>
|
|
||||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}"
|
|
||||||
th:value="${dict.dictValue}"></option>
|
|
||||||
</select>
|
|
||||||
</li>
|
|
||||||
<li style="width: 46%;text-align: right;">
|
<li style="width: 46%;text-align: right;">
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||||
class="fa fa-search"></i> 搜索</a>
|
class="fa fa-search"></i> 搜索</a>
|
||||||
|
@ -61,9 +48,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<th:block th:include="include :: footer"/>
|
<th:block th:include="include :: footer"/>
|
||||||
<script>
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "system/customer";
|
var prefix = ctx + "sip/project";
|
||||||
|
let bgArr=[[${@dict.getType('bg_type')}]]
|
||||||
|
let hyArr1=[[${@dict.getType('bg_yys')}]]
|
||||||
|
let hyArr2=[[${@dict.getType('bg_hsys')}]]
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
url: prefix + "/list",
|
url: prefix + "/list",
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
@ -77,50 +69,39 @@
|
||||||
radio: true
|
radio: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'customerCode',
|
field: 'projectCode',
|
||||||
title: '客户编码'
|
title: '项目编码'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'projectName',
|
||||||
|
title: '项目名称'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'customerName',
|
field: 'customerName',
|
||||||
title: '客户名称'
|
title: '最终客户'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'customerPostcode',
|
field: 'bgProperty',
|
||||||
title: '客户邮编'
|
title: 'BG',
|
||||||
},
|
formatter:(value,row)=>{
|
||||||
{
|
return $.table.selectDictLabel(bgArr, value);
|
||||||
field: 'address',
|
}
|
||||||
title: '详细地址'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'contactPerson',
|
|
||||||
title: '联系人'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'contactPhone',
|
|
||||||
title: '联系电话'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'contactEmail',
|
|
||||||
title: '联系邮件'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'industryType',
|
field: 'industryType',
|
||||||
title: '所属行业',
|
title: '所属行业',
|
||||||
formatter:(value,row)=>{
|
formatter: function (value, row, index) {
|
||||||
const arr=[]
|
if(row.bgProperty=='YYS'){
|
||||||
$('[name="industryType"] option').each((index,item)=>{
|
return $.table.selectDictLabel(hyArr1, value);
|
||||||
arr.push({
|
}else{
|
||||||
text:$(item).text(),
|
return $.table.selectDictLabel(hyArr2, value);
|
||||||
value:$(item).val()
|
}
|
||||||
})
|
|
||||||
})
|
|
||||||
return arr.find((ele)=>ele.value==value)?.text
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'remark',
|
field: 'agentName',
|
||||||
title: '备注'
|
title: '办事处'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
};
|
};
|
|
@ -214,10 +214,10 @@ public class ProjectOrderInfoController extends BaseController
|
||||||
log.error("下载文件失败", e);
|
log.error("下载文件失败", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@GetMapping("/selectCustomer")
|
@GetMapping("/selectProject")
|
||||||
public String selectCustomer()
|
public String selectCustomer()
|
||||||
{
|
{
|
||||||
return prefix + "/selectCustomer";
|
return prefix + "/selectProject";
|
||||||
}
|
}
|
||||||
@GetMapping("/selectPartner")
|
@GetMapping("/selectPartner")
|
||||||
public String selectPartner()
|
public String selectPartner()
|
||||||
|
|
Loading…
Reference in New Issue