|
|
@ -1,5 +1,5 @@ |
|
|
|
<!DOCTYPE html> |
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org"> |
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
|
|
<head> |
|
|
|
<th:block th:include="include :: header('业务经理审核')" /> |
|
|
|
<th:block th:include="include :: select2-css" /> |
|
|
@ -16,7 +16,7 @@ |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label">申请人:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<input name="applyUser" th:field="*{applyUser}" class="form-control" type="text" readonly> |
|
|
|
<input name="applyUserName" th:field="*{applyUserName}" class="form-control" type="text" readonly> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
@ -49,7 +49,7 @@ |
|
|
|
<div class="col-xs-12"> |
|
|
|
<label class="col-sm-4 control-label">业务员:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<select class="form-control" name="businessMembers" th:field="*{businessMembers}" id="businessMembers" required> |
|
|
|
<select class="form-control" name="businessMembers" disabled required th:field="*{businessMembers}"> |
|
|
|
<option value="">请选择</option> |
|
|
|
</select> |
|
|
|
</div> |
|
|
@ -69,8 +69,7 @@ |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-4 control-label">报价币种:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<select class="form-control" id="commonCurrency_edit" name="commonCurrency" |
|
|
|
th:with="dictList=${@dict.getType('sys_common_currency')}" th:field="*{commonCurrency}" required> |
|
|
|
<select class="form-control" id="commonCurrency_edit" name="commonCurrency" th:with="dictList=${@dict.getType('sys_common_currency')}" th:field="*{commonCurrency}" required> |
|
|
|
<option value="">请选择</option> |
|
|
|
<option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" ></option> |
|
|
|
</select> |
|
|
@ -86,8 +85,8 @@ |
|
|
|
<label class="col-sm-6 control-label is-required">是否含税:</label> |
|
|
|
<div class="col-sm-6"> |
|
|
|
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> |
|
|
|
<input type="radio" th:id="${'confirmFax_' + dict.dictCode}" |
|
|
|
name="confirmFax" th:value="${dict.dictValue}" th:field="*{confirmFax}" th:checked="${dict.isDefault == 'Y' ? true : false}" required> |
|
|
|
<input required type="radio" th:id="${'confirmFax_' + dict.dictCode}" |
|
|
|
name="confirmFax" th:value="${dict.dictValue}" th:field="*{confirmFax}" th:checked="${dict.isDefault == 'Y' ? true : false}"> |
|
|
|
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -117,25 +116,24 @@ |
|
|
|
<div class="container"> |
|
|
|
<h4 class="form-header h4">计算</h4> |
|
|
|
<div class="col-xs-12 form-row"> |
|
|
|
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" th:field="*{enterprise}" type="text" disabled/> |
|
|
|
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" th:field="*{enterpriseSum}" type="number" disabled/> |
|
|
|
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" type="text" readonly/> |
|
|
|
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" type="number" readonly/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="col-xs-12 form-row"> |
|
|
|
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" th:field="*{noRmb}" type="number" disabled /> |
|
|
|
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" th:field="*{noRmbSum}" type="number" disabled/> |
|
|
|
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" type="number" readonly/> |
|
|
|
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" type="number" readonly/> |
|
|
|
</div> |
|
|
|
<div class="col-xs-12 form-row"> |
|
|
|
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_edit" type="number" th:field="*{rmb}" disabled/> |
|
|
|
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" th:field="*{rmbSum}" type="number" disabled/> |
|
|
|
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_edit" type="number" readonly/> |
|
|
|
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" type="number" readonly/> |
|
|
|
</div> |
|
|
|
<div class="col-xs-12 form-row"> |
|
|
|
<label class="col-sm-2">不含税单价:</label><input placeholder="USD" class="col-sm-4" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/> |
|
|
|
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" th:field="*{noUsdSum}" type="number" disabled/> |
|
|
|
<div class="col-xs-12"> |
|
|
|
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-4" name="noUsd" id="noUsd_edit" type="number" readonly/> |
|
|
|
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" type="number" readonly/> |
|
|
|
</div> |
|
|
|
<div class="col-xs-12 form-row"> |
|
|
|
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-4" name="usd" id="usd_edit" th:field="*{usd}" type="number" disabled/> |
|
|
|
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-4" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/> |
|
|
|
<div class="col-xs-12"> |
|
|
|
<label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-4" name="usd" id="usd_edit" type="number" readonly/> |
|
|
|
<label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-4" name="usdSum" id="usdSum_edit" type="number" readonly/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -162,7 +160,7 @@ |
|
|
|
<div class="form-row"> |
|
|
|
<div class="btn-group-sm" id="toolbar" role="group"> |
|
|
|
<span>选择报价信息</span> |
|
|
|
<a class="btn btn-success" disabled> |
|
|
|
<a class="btn btn-success" onclick="insertRow()"> |
|
|
|
<i class="fa fa-plus"></i> 添加物料 |
|
|
|
</a> |
|
|
|
</div> |
|
|
@ -176,8 +174,12 @@ |
|
|
|
</div> |
|
|
|
<th:block th:include="include :: footer" /> |
|
|
|
<th:block th:include="include :: select2-js" /> |
|
|
|
<th:block th:include="include :: datetimepicker-js" /> |
|
|
|
<script th:src="@{/js/activiti.js}"></script> |
|
|
|
<script th:src="@{/ajax/libs/vue/vue.js}"></script> |
|
|
|
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> |
|
|
|
<script th:inline="javascript"> |
|
|
|
var prefix = ctx + "erp/bom"; |
|
|
|
$("#form-customerQuote-ywjl").validate({focusCleanup: true}); |
|
|
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|
|
|
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|
|
|
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; |
|
|
@ -186,8 +188,11 @@ |
|
|
|
var sysCustomerQuote = [[${formData}]]; |
|
|
|
var prefix = ctx + "system/customerQuote" |
|
|
|
var commonCurrency = $("#commonCurrency_edit option:selected").val(); |
|
|
|
$("#form-customerQuote-ywjl").validate({focusCleanup: true}); |
|
|
|
$("#form-customerQuote-ywjl").validate({ |
|
|
|
focusCleanup: true, |
|
|
|
}); |
|
|
|
$(function() { |
|
|
|
/*业务员列表*/ |
|
|
|
$.ajax({ |
|
|
|
url: ctx + 'system/salesOrder/getBinessMembers', |
|
|
|
type: 'get', |
|
|
@ -196,10 +201,9 @@ |
|
|
|
if (res.rows.length > 0) { |
|
|
|
var usertData = res.rows; |
|
|
|
for (let i in usertData) { |
|
|
|
$("#form-customerQuote-ywjl select[name='businessMembers']").append("<option value='" + |
|
|
|
usertData[i].userName + "'>" + usertData[i].userName + "</option>"); |
|
|
|
$("#form-customerQuote-ywjl select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); |
|
|
|
} |
|
|
|
$("#form-customerQuote-ywjl select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change");; |
|
|
|
$("#form-customerQuote-ywjl select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change") |
|
|
|
} else { |
|
|
|
$.modal.msgError(res.msg); |
|
|
|
} |
|
|
@ -267,12 +271,94 @@ |
|
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '国内税率',field: 'countTax',align: 'center',editable: true}, |
|
|
|
{title: '美元汇率',field: 'usdTax', align: 'center',editable: true}, |
|
|
|
{title: '对外售价',field: 'materialSole',editable: true}, |
|
|
|
{title: '物料的数量',field: 'materialNum',align: 'center',editable: true}, |
|
|
|
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: commonCurrency==1?true:false}, |
|
|
|
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',editable: commonCurrency==2?true:false}, |
|
|
|
{ title: '对外售价',field: 'materialSole', |
|
|
|
editable: { |
|
|
|
type: 'number', |
|
|
|
mode: 'inline', |
|
|
|
title: '对外售价', |
|
|
|
validate: function (value) { |
|
|
|
if (!value) { |
|
|
|
return '对外售价不能为空'; |
|
|
|
} |
|
|
|
if (isNaN(value)) { |
|
|
|
return '对外售价必须为数字'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '国内税率',field: 'countTax',align: 'center',}, |
|
|
|
{ title: '美元汇率',field: 'usdTax', align: 'center',}, |
|
|
|
{title: '物料的数量',field: 'materialNum',align: 'center', |
|
|
|
editable:{ |
|
|
|
type : 'text', |
|
|
|
mode: 'inline', |
|
|
|
title : '物料的数量', |
|
|
|
validate : function(value) { |
|
|
|
if (!value) { |
|
|
|
return '用量不能为空'; |
|
|
|
} |
|
|
|
if (isNaN(value)) { |
|
|
|
return '用量必须为数字'; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ title: '物料的不含税单价(RMB)', |
|
|
|
field: 'materialNoRmb', |
|
|
|
align: 'center', |
|
|
|
editable:{ |
|
|
|
type: 'text', // 使用'text'类型,因为我们需自定义验证小数 |
|
|
|
mode: 'inline', |
|
|
|
enabled: function() { |
|
|
|
return ($("#commonCurrency_add").val() === '1'); // 当货币类型为2时启用 |
|
|
|
}, |
|
|
|
title: '物料的不含税单价(RMB)', |
|
|
|
validate: function(value) { |
|
|
|
// 验证是否为空 |
|
|
|
if (!value) { |
|
|
|
return '金额不能为空'; |
|
|
|
} |
|
|
|
// 尝试转换为浮点数并检查是否成功 |
|
|
|
var num = parseFloat(value); |
|
|
|
if (isNaN(num)) { |
|
|
|
return '请输入有效的数字'; |
|
|
|
} |
|
|
|
// 检查小数点后是否有超过两位的数字 |
|
|
|
var decimalPart = num.toString().split('.')[1]; // 获取小数部分 |
|
|
|
if (decimalPart && decimalPart.length > 2) { |
|
|
|
return '请输入精确到小数点后两位的数字'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '物料的不含税单价(美元)', |
|
|
|
field: 'materialNoUsd', |
|
|
|
align: 'center', |
|
|
|
editable: { |
|
|
|
type: 'text', // 使用'text'类型,因为我们需自定义验证小数 |
|
|
|
mode: 'inline', |
|
|
|
enabled: function() { |
|
|
|
return ($("#commonCurrency_add").val() === '2'); // 当货币类型为2时启用 |
|
|
|
}, |
|
|
|
title: '物料的不含税单价(美元)', |
|
|
|
validate: function(value) { |
|
|
|
// 验证是否为空 |
|
|
|
if (!value) { |
|
|
|
return '金额不能为空'; |
|
|
|
} |
|
|
|
// 尝试转换为浮点数并检查是否成功 |
|
|
|
var num = parseFloat(value); |
|
|
|
if (isNaN(num)) { |
|
|
|
return '请输入有效的数字'; |
|
|
|
} |
|
|
|
// 检查小数点后是否有超过两位的数字 |
|
|
|
var decimalPart = num.toString().split('.')[1]; // 获取小数部分 |
|
|
|
if (decimalPart && decimalPart.length > 2) { |
|
|
|
return '请输入精确到小数点后两位的数字'; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'}, |
|
|
|
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'}, |
|
|
|
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'}, |
|
|
@ -342,9 +428,11 @@ |
|
|
|
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|
|
|
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|
|
|
console.log("rowData: "+rowData); |
|
|
|
let enterpriseSum = $("#enterpriseSum").val(); |
|
|
|
var timestamp = new Date().getTime(); |
|
|
|
var totalNum = $("#bootstrap-table-Quote-child4").bootstrapTable('getData').length; |
|
|
|
$("#bootstrap-table-Quote-child4").bootstrapTable('insertRow', { |
|
|
|
index: 1, |
|
|
|
index: totalNum, |
|
|
|
row: { |
|
|
|
id:'', |
|
|
|
quoteId:$("#supplierCode").val(), |
|
|
@ -386,8 +474,8 @@ |
|
|
|
/* 删除指定表格行 */ |
|
|
|
function removeRow(rowData){ |
|
|
|
$.table.bootstrapTable('remove', { |
|
|
|
field: 'index', |
|
|
|
values: rowData.index |
|
|
|
field: 'id', |
|
|
|
values: rowData.id |
|
|
|
}) |
|
|
|
} |
|
|
|
$("input[name='pricingDate']").datetimepicker({ |
|
|
@ -405,15 +493,15 @@ |
|
|
|
let noUsdSum = 0;let usdSum = 0; |
|
|
|
for(var i=0;i<getData.length;i++){ |
|
|
|
enterprise += getData[i].materialName + ": 数量 :" + getData[i].materialNum +"; "; |
|
|
|
enterpriseSum += parseFloat(getData[i].materialNum); |
|
|
|
noRmb += parseFloat(getData[i].materialNoRmb); |
|
|
|
rmb += parseFloat(getData[i].materialRmb) ; |
|
|
|
noRmbSum += parseFloat(getData[i].materialNoRmbSum); |
|
|
|
rmbSum += parseFloat(getData[i].materialRmbSum); |
|
|
|
noUsd += parseFloat(getData[i].materialNoUsd) ; |
|
|
|
usd += parseFloat(getData[i].materialUsd) ; |
|
|
|
noUsdSum += parseFloat(getData[i].materialNoUsdSum); |
|
|
|
usdSum += parseFloat(getData[i].materialUsdSum); |
|
|
|
enterpriseSum += Number(getData[i].materialNum); |
|
|
|
noRmb += Number(getData[i].materialNoRmb); |
|
|
|
rmb += Number(getData[i].materialRmb) ; |
|
|
|
noRmbSum += Number(getData[i].materialNoRmbSum); |
|
|
|
rmbSum += Number(getData[i].materialRmbSum); |
|
|
|
noUsd += Number(getData[i].materialNoUsd) ; |
|
|
|
usd += Number(getData[i].materialUsd) ; |
|
|
|
noUsdSum += Number(getData[i].materialNoUsdSum); |
|
|
|
usdSum += Number(getData[i].materialUsdSum); |
|
|
|
} |
|
|
|
$("#enterprise_edit").val(enterprise); |
|
|
|
$("#enterpriseSum_edit").val(enterpriseSum); |
|
|
@ -439,6 +527,7 @@ |
|
|
|
$.operate.save(prefix + "/complete/" + taskId, $('#form-customerQuote-ywjl').serialize()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</html> |