refactor(project): 优化订单和项目模块的弹窗宽度及数据处理逻辑

- 统一使用 $.common.isNotEmpty 判断字段非空,提升数据格式化准确性
- 调整弹窗宽度为1400px,优化显示效果
- 优化产品列表渲染逻辑,增强代码可读性和维护性
- 修改模态框打开方式,支持自定义宽度参数
- 使用 ?? 操作符替代 || 进行默认值赋值,提高代码健壮性
dev_1.0.0
chenhao 2025-11-06 17:08:57 +08:00
parent 52125a6419
commit c238a27a36
9 changed files with 96 additions and 93 deletions

View File

@ -1161,9 +1161,10 @@ var table = {
});
},
// 添加信息
add: function (id) {
add: function (id,width) {
table.set();
$.modal.open("添加" + table.options.modalName, $.operate.addUrl(id));
width=width??800;
$.modal.open("添加" + table.options.modalName, $.operate.addUrl(id),width);
},
// 添加信息以tab页展现
addTab: function (id) {
@ -1181,7 +1182,8 @@ var table = {
return url;
},
// 修改信息
edit: function (id) {
edit: function (id,width) {
width = width ?? 800;
table.set();
if ($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
@ -1190,9 +1192,9 @@ var table = {
return;
}
var url = table.options.updateUrl.replace("{id}", row[table.options.uniqueId]);
$.modal.open("修改" + table.options.modalName, url);
$.modal.open("修改" + table.options.modalName, url,width);
} else {
$.modal.open("修改" + table.options.modalName, $.operate.editUrl(id));
$.modal.open("修改" + table.options.modalName, $.operate.editUrl(id),width);
}
},
// 修改信息以tab页展现

View File

@ -154,11 +154,11 @@
function viewDetail(id) {
$.modal.openFull("订单详情", ctx + "project/order/view/" + id)
$.modal.openFull("订单详情", ctx + "project/order/view/" + id,1400)
}
function viewProjectDetail(id) {
$.modal.openFull("项目详情", ctx + "sip/project/view/" + id)
$.modal.openFull("项目详情", ctx + "sip/project/view/" + id,1400)
}
function signOrder(orderId,versionCode) {

View File

@ -351,46 +351,46 @@
let tr=$(`
<tr>
<td style="text-align: center;" class="indexBox">${length + 1}</td>
<td class="product-bom-code-column"> <input type="hidden" name="${submitName}[${length}].id" value="${data.id || ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('${queryParam}','${title}',this)" value="${data.productBomCode || ''}" name="${submitName}[${length}].productBomCode"></td>
<td class="model-column"><input readonly class="form-control model" type="text" onclick="selectProduct('${queryParam}','${title}',this)" value="${data.model || ''}" name="${submitName}[${length}].model"></td>
<td class="product-desc-column"><textarea name="${submitName}[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc || ''}</textarea></td>
<td class="quantity-column"><input value="${data.quantity || ''}" name="${submitName}[${length}].quantity" type="number" min="0" class="form-control quantity" step="${quantityStepFlag ? 0.1 : 1}" required></td>
<td class="catalogue-price-column"><input value="${data.cataloguePrice || ''}" name="${submitName}[${length}].cataloguePrice" readonly type="hidden" class="form-control cataloguePrice" required>
<input value="${data.cataloguePriceFormmat || ''}" ${flag?"readonly":''} onfocus="getData(this,'cataloguePrice')" onblur="this.value=formatAmountNumber(this.value)" type="text" class="form-control catalogue-price-format" required>
<td class="product-bom-code-column"> <input type="hidden" name="${submitName}[${length}].id" value="${data.id ?? ''}"><input class="form-control productBomCode" type="text" onclick="selectProduct('${queryParam}','${title}',this)" value="${data.productBomCode ?? ''}" name="${submitName}[${length}].productBomCode"></td>
<td class="model-column"><input readonly class="form-control model" type="text" onclick="selectProduct('${queryParam}','${title}',this)" value="${data.model ?? ''}" name="${submitName}[${length}].model"></td>
<td class="product-desc-column"><textarea name="${submitName}[${length}].productDesc" required class="form-control productDesc" placeholder="自动带入" readonly>${data.productDesc ?? ''}</textarea></td>
<td class="quantity-column"><input value="${data.quantity ?? ''}" name="${submitName}[${length}].quantity" type="number" min="0" class="form-control quantity" step="${quantityStepFlag ? 0.1 : 1}" required></td>
<td class="catalogue-price-column"><input value="${data.cataloguePrice ?? ''}" name="${submitName}[${length}].cataloguePrice" readonly type="hidden" class="form-control cataloguePrice" required>
<input value="${data.cataloguePriceFormmat ?? ''}" ${flag?"readonly":''} onfocus="getData(this,'cataloguePrice')" onblur="this.value=formatAmountNumber(this.value)" type="text" class="form-control catalogue-price-format" required>
</td>
<td class="guidance-discount-column">
<input value="${data.guidanceDiscount || ''}" name="${submitName}[${length}].guidanceDiscount" readonly type="hidden" class="form-control guidanceDiscount" >
<input value="${data.guidanceDiscount ?? ''}" name="${submitName}[${length}].guidanceDiscount" readonly type="hidden" class="form-control guidanceDiscount" >
<label style="display: flex;align-items: center">
<input style="width: calc(100% - 10px);" value="${data.guidanceDiscountFormat || ''}" readonly type="number" min="0" max="100" step="0.01" class="form-control guidance-discount-format" required>%
<input style="width: calc(100% - 10px);" value="${data.guidanceDiscountFormat ?? ''}" readonly type="number" min="0" max="100" step="0.01" class="form-control guidance-discount-format" required>%
</label>
</td >
<td class="discount-column"><input value="${data.discount || ''}" name="${submitName}[${length}].discount" type="hidden" class="form-control discount" required>
<label style="display: flex;align-items: center"><input style="width: calc(100% - 10px);" value="${data.discountFormat || ''}" type="number" min="0" max="100" step="0.01" class="form-control discount-format" required>%
<td class="discount-column"><input value="${data.discount ?? ''}" name="${submitName}[${length}].discount" type="hidden" class="form-control discount" required>
<label style="display: flex;align-items: center"><input style="width: calc(100% - 10px);" value="${data.discountFormat ?? ''}" type="number" min="0" max="100" step="0.01" class="form-control discount-format" required>%
</label>
</td>
<td class="price-column">
<input value="${data.price || ''}" name="${submitName}[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat || ''}" onfocus="getData(this,'price')" onblur="this.value=formatAmountNumber(this.value)" class="form-control price-formmat" placeholder="自动计算" required >
<input value="${data.price ?? ''}" name="${submitName}[${length}].price" type="hidden" class="form-control price" placeholder="自动计算" required readonly>
<input type="text" value="${data.priceFormmat ?? ''}" onfocus="getData(this,'price')" onblur="this.value=formatAmountNumber(this.value)" class="form-control price-formmat" placeholder="自动计算" required >
</td>
<td class="discount-column-zd hide-column" >
<input type="text" value="${data.zdDiscount || ''}" class="form-control" placeholder="自动计算" required readonly>
<input type="text" value="${data.zdDiscount ?? ''}" class="form-control" placeholder="自动计算" required readonly>
</td>
<td class="all-price-column">
<input value="${data.allPrice || ''}" name="${submitName}[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat || ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
<input value="${data.allPrice ?? ''}" name="${submitName}[${length}].allPrice" type="hidden" class="form-control allPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.allPriceFormmat ?? ''}" class="form-control allPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td class="all-price-discount-column hide-column">
<input type="hidden" value="${data.allPriceDisCount || ''}" class="form-control allPrice-discount" placeholder="自动计算" readonly>
<input type="text" value="${data.allPriceDisCountFormat || ''}" class="form-control allPrice-discount-format" placeholder="自动计算" required readonly>
<input type="hidden" value="${data.allPriceDisCount ?? ''}" class="form-control allPrice-discount" placeholder="自动计算" readonly>
<input type="text" value="${data.allPriceDisCountFormat ?? ''}" class="form-control allPrice-discount-format" placeholder="自动计算" required readonly>
</td>
<td class="catalogue-all-price-column">
<input value="${data.catalogueAllPrice || ''}" name="${submitName}[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat || ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
<input value="${data.catalogueAllPrice ?? ''}" name="${submitName}[${length}].catalogueAllPrice" type="hidden" class="form-control catalogueAllPrice" placeholder="自动计算" required readonly>
<input type="text" value="${data.catalogueAllPriceFormmat ?? ''}" class="form-control catalogueAllPrice-formmat" placeholder="自动计算" required readonly>
</td>
<td class="tax-rate-column">
<input value="${data.taxRate || '13'}" name="${submitName}[${length}].taxRate" type="number" class="form-control tax-rate" readonly>
<input value="${data.taxRate ?? '13'}" name="${submitName}[${length}].taxRate" type="number" class="form-control tax-rate" readonly>
</td>
<td class="remark-column"><input value="${data.remark || ''}" name="${submitName}[${length}].remark" type="text" class="form-control" ></td>
<td class="remark-column"><input value="${data.remark ?? ''}" name="${submitName}[${length}].remark" type="text" class="form-control" ></td>
<td class="del-row-column"><span style="cursor:pointer;color: #ff5722" onclick="delProductRow(this)" class="delRow">删除</span></td>
</tr>`)

View File

@ -358,32 +358,32 @@
function initProductList() {
let softwareProjectProductInfoListAll = [[${projectInfo.softwareProjectProductInfoList}]] || []
softwareProjectProductInfoListAll.forEach((ele) => {
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound(ele.discount*100) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
addProduct(ele)
})
let hardwareProjectProductInfoListAll = [[${projectInfo.hardwareProjectProductInfoList}]] || []
hardwareProjectProductInfoListAll.forEach((ele) => {
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound((ele.discount*100)) : ""
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound((ele.discount*100)) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
addProduct2(ele)
})
let maintenanceProjectProductInfoListAll = [[${projectInfo.maintenanceProjectProductInfoList}]] || []
maintenanceProjectProductInfoListAll.forEach((ele) => {
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound((ele.discount*100)) : ""
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound((ele.discount*100)) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound((ele.guidanceDiscount*100)) : ""
addProduct3(ele)
})
if (!canUpdate){

View File

@ -152,7 +152,7 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="sip:project:add">
<a class="btn btn-success" onclick="$.operate.add(null,1400)" shiro:hasPermission="sip:project:add">
<i class="fa fa-plus"></i> 添加
</a>
@ -318,7 +318,7 @@
titleTooltip:true,
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs mb5' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>项目详情</a> ');
actions.push('<a class="btn btn-success btn-xs mb5' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\',1400)"><i class="fa fa-edit"></i>项目详情</a> ');
actions.push('<a class="btn btn-success btn-xs mb5' + editFlag + '" href="javascript:void(0)" onclick="openOrder(' + row.id + ',' + row.canGenerate + ')" name="disableBtn' + row.canGenerate + '"><i class="fa fa-refresh"></i>生成订单</a> ');
actions.push('<a class="btn btn-danger btn-xs mb5' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
@ -377,7 +377,7 @@
$('[name="projectStage"]').selectpicker("refresh");
}
function viewDetail(id){
$.modal.openFull("订单详情", prefix + "/view/"+id)
$.modal.open("订单详情", prefix + "/view/"+id,1400)
}
function initHighlight() {
$('span.highlight').parent().parent().addClass('highlightRow')

View File

@ -1250,13 +1250,13 @@ ${
ele.allPriceDisCount = preciseCurrencyRound(preciseCurrencyRound(ele.price*discountFold) * ele.quantity)
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount * 100) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound(ele.discount * 100) : ""
ele.zdDiscount = discountFold * 100 + '%'
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
addProduct(ele)
}) : '';
hardwareProjectProductInfoList ? hardwareProjectProductInfoList.forEach((ele) => {
@ -1264,12 +1264,12 @@ ${
ele.allPriceDisCount = preciseCurrencyRound(preciseCurrencyRound(ele.price*discountFold) * ele.quantity)
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount * 100) : ""
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound(ele.discount * 100) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
ele.zdDiscount = discountFold * 100 + '%'
addProduct2(ele)
@ -1279,12 +1279,12 @@ ${
ele.allPriceDisCount = preciseCurrencyRound(preciseCurrencyRound(ele.price*discountFold) * ele.quantity)
ele.allPriceDisCountFormat = formatAmountNumber(ele.allPriceDisCount)
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount * 100) : ""
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound(ele.discount * 100) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound(ele.guidanceDiscount * 100) : ""
ele.zdDiscount = discountFold * 100 + '%'
addProduct3(ele)
}) : '';

View File

@ -1282,30 +1282,31 @@
$('#productTable2 tbody').html('')
$('#productTable3 tbody').html('')
res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => {
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
console.log(ele.priceFormmat)
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound(ele.discount*100) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
addProduct(ele)
}) : '';
res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => {
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound(ele.discount*100) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
addProduct2(ele)
}) : '';
res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => {
ele.cataloguePriceFormmat = ele.cataloguePrice ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = ele.price ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = ele.catalogueAllPrice ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = ele.allPrice ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = ele.discount ? preciseCurrencyRound(ele.discount*100) : ""
ele.guidanceDiscountFormat = ele.guidanceDiscount ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
ele.cataloguePriceFormmat = $.common.isNotEmpty(ele.cataloguePrice) ? formatAmountNumber(ele.cataloguePrice) : ""
ele.priceFormmat = $.common.isNotEmpty(ele.price) ? formatAmountNumber(ele.price) : ""
ele.catalogueAllPriceFormmat = $.common.isNotEmpty(ele.catalogueAllPrice) ? formatAmountNumber(ele.catalogueAllPrice) : ""
ele.allPriceFormmat = $.common.isNotEmpty(ele.allPrice) ? formatAmountNumber(ele.allPrice) : ""
ele.discountFormat = $.common.isNotEmpty(ele.discount) ? preciseCurrencyRound(ele.discount*100) : ""
ele.guidanceDiscountFormat = $.common.isNotEmpty(ele.guidanceDiscount) ? preciseCurrencyRound(ele.guidanceDiscount*100) : ""
addProduct3(ele)
}) : '';
window.localStorage.removeItem('getDetail')

View File

@ -115,7 +115,7 @@
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.addFull()" shiro:hasPermission="project:order:add">
<a class="btn btn-success" onclick="$.operate.add(null,1400)" shiro:hasPermission="project:order:add">
<i class="fa fa-plus"></i> 添加
</a>
@ -154,14 +154,14 @@
}
}
function viewDetail(id){
$.modal.openFull("订单详情", ctx + "project/order/view/"+id)
$.modal.open("订单详情", ctx + "project/order/view/"+id,1400)
}
function viewApproveLog(id) {
$.modal.open("订单详情", ctx + "project/order/approveLog/" + id)
$.modal.open("订单详情", ctx + "project/order/approveLog/" + id,1400)
}
function viewProjectDetail(id){
$.modal.openFull("项目详情", ctx + "sip/project/view/"+id)
$.modal.open("项目详情", ctx + "sip/project/view/"+id,1400)
}
$(function() {
// $('#content').load(ctx + 'project/order/add');
@ -287,7 +287,7 @@
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="viewApproveLog(\'' + row.id + '\')"><i class="fa fa-edit"></i>审批历史</a> ');
} else {
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editFull(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\',1400)"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="viewDetail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
}

View File

@ -168,15 +168,15 @@
}
function viewDetail(id) {
$.modal.openFull("订单详情", ctx + "project/order/view/" + id)
$.modal.openFull("订单详情", ctx + "project/order/view/" + id,1400)
}
function viewApproveLog(id) {
$.modal.open("订单详情", ctx + "project/order/approveLog/" + id)
$.modal.open("订单详情", ctx + "project/order/approveLog/" + id,1400)
}
function viewProjectDetail(id) {
$.modal.openFull("项目详情", ctx + "sip/project/view/" + id)
$.modal.openFull("项目详情", ctx + "sip/project/view/" + id,1400)
}