Browse Source

[fix]销售模块,销售订单中审核功能部分添加审核主题,销售订单添加详情页面。

dev
zhangsiqi 5 months ago
parent
commit
2b746fc62b
  1. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  2. 20
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  3. 8
      ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html
  4. 16
      ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html
  5. 2
      ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html
  6. 310
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html
  7. 308
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html
  8. 416
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html
  9. 79
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskZozjVerify.html

10
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java

@ -158,7 +158,13 @@ public class SysSalesOrderController extends BaseController
mmap.put("sysSalesOrder", sysSalesOrder); mmap.put("sysSalesOrder", sysSalesOrder);
return prefix + "/edit"; return prefix + "/edit";
} }
@GetMapping("/detail/{id}")
public String detail(@PathVariable("id") Long id, ModelMap mmap)
{
SysSalesOrder sysSalesOrder = sysSalesOrderService.selectSysSalesOrderById(id);
mmap.put("sysSalesOrder", sysSalesOrder);
return prefix + "/detail";
}
/** /**
* 修改保存销售订单 * 修改保存销售订单
*/ */
@ -358,7 +364,7 @@ public class SysSalesOrderController extends BaseController
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
String processInstanceId = task.getProcessInstanceId(); String processInstanceId = task.getProcessInstanceId();
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
SysSalesOrderVo sysSalesOrderVo = sysSalesOrderService.selectSysSalesOrderById(new Long(processInstance.getBusinessKey())); SysSalesOrderVo sysSalesOrderVo = sysSalesOrderService.selectSysSalesOrderById(Long.valueOf(processInstance.getBusinessKey()));
mmap.put("formData", sysSalesOrderVo); mmap.put("formData", sysSalesOrderVo);
mmap.put("taskId", taskId); mmap.put("taskId", taskId);
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1);

20
ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html

@ -87,21 +87,21 @@
<div class="flex-row-m"> <div class="flex-row-m">
<h4 class="form-header h4">计算</h4> <h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_add" type="text" readonly/> <label class=" col-sm-2">物料合计:</label><input class="col-sm-3" name="enterprise" id="enterprise_add" type="text" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/> <label class=" col-sm-2">数量合计:</label><input class="col-sm-3" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_add" type="number" readonly/> <label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-3" name="noRmb" id="noRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_add" type="number" readonly/> <label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-3" name="noRmbSum" id="noRmbSum_add" type="number" readonly/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_add" type="number" readonly/> <label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-3" name="rmb" id="rmb_add" type="number" readonly/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_add" type="number" readonly/> <label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-3" name="rmbSum" id="rmbSum_add" type="number" readonly/>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-4" name="noUsd" id="noUsd_add" type="number" readonly/> <label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-3" name="noUsd" id="noUsd_add" type="number" readonly/>
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-4" name="noUsdSum" id="noUsdSum_add" type="number" readonly/> <label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-3" name="noUsdSum" id="noUsdSum_add" type="number" readonly/>
<label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-4" name="usd" id="usd_add" type="number" readonly/> <label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-3" name="usd" id="usd_add" type="number" readonly/>
<label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-4" name="usdSum" id="usdSum_add" type="number" readonly/> <label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-3" name="usdSum" id="usdSum_add" type="number" readonly/>
</div> </div>
</div> </div>
</form> </form>

8
ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

@ -58,7 +58,11 @@
</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" />
<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"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:customerQuote:edit')}]]; var editFlag = [[${@permission.hasPermi('system:customerQuote:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:customerQuote:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:customerQuote:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:customerQuote:cancel')}]]; var cancelFlag = [[${@permission.hasPermi('system:customerQuote:cancel')}]];
@ -183,6 +187,8 @@
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i> 作废</a>'); actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.id + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 编辑 // 编辑
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
}else{
actions.push('<a class="btn btn-default btn-xs" disabled href="javascript:void(0)"><i class="fa fa-edit"></i> 编辑</a> ');
} }
// 已作废 // 已作废
if(row.useStatus=="2" && !row.restoreInstanceId){ if(row.useStatus=="2" && !row.restoreInstanceId){
@ -194,7 +200,7 @@
// 有待办人展示审批按钮, // 有待办人展示审批按钮,
if (row.todoUserId) { if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(","); var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName) || loginName == 'admin'){ if(todoUserIdList.includes(loginName)){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+row.instanceTypeName+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+row.instanceTypeName+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
} }

16
ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html

@ -68,7 +68,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">国内税率:</label> <label class="col-sm-4 control-label">国内税率:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly name="rmbTax" th:field="*{rmbTax}" id="rmbTax_edit" class="form-control" type="number" placeholder="13%" /> <input name="rmbTax" th:field="*{rmbTax}" id="rmbTax_edit" class="form-control" type="number" placeholder="13%" disabled/>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -97,12 +97,16 @@
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2">不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_detail" th:field="*{noRmb}" type="number" disabled /> <label class="col-sm-2">不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_detail" th:field="*{noRmb}" type="number" disabled />
<label class="col-sm-2">不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_detail" th:field="*{noRmbSum}" type="number" disabled/> <label class="col-sm-2">不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_detail" th:field="*{noRmbSum}" type="number" disabled/>
</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_detail" type="number" th:field="*{rmb}" disabled/> <label class="col-sm-2">含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_detail" type="number" th:field="*{rmb}" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_detail" th:field="*{rmbSum}" type="number" disabled/> <label class="col-sm-2">含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_detail" th:field="*{rmbSum}" type="number" disabled/>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12 form-row">
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-4" name="noUsd" id="noUsd_detail" th:field="*{noUsd}" type="number" disabled/> <label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-4" name="noUsd" id="noUsd_detail" th:field="*{noUsd}" type="number" disabled/>
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-4" name="noUsdSum" id="noUsdSum_detail" th:field="*{noUsdSum}" type="number" disabled/> <label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-4" name="noUsdSum" id="noUsdSum_detail" th:field="*{noUsdSum}" type="number" disabled/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-4" name="usd" id="usd_detail" th:field="*{usd}" type="number" disabled/> <label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-4" name="usd" id="usd_detail" th:field="*{usd}" type="number" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-4" name="usdSum" id="usdSum_detail" th:field="*{usdSum}" type="number" disabled/> <label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-4" name="usdSum" id="usdSum_detail" th:field="*{usdSum}" type="number" disabled/>
</div> </div>
@ -132,13 +136,12 @@
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]]; var userName = [[${@permission.getPrincipalProperty('userName')}]];
var sysCustomerQuote = [[${sysCustomerQuote}]]; var sysCustomerQuote = [[${formData}]];
var prefix = ctx + "system/customerQuote" var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val(); var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-customerQuote-edit").validate({ $("#form-customerQuote-edit").validate({
focusCleanup: true, focusCleanup: true,
}); });
var customerCode1 = [[${sysCustomerQuote.customerCode}]];
//计算 //计算
$(function() { $(function() {
/*业务员列表*/ /*业务员列表*/
@ -152,9 +155,10 @@
//alert(JSON.stringify(data)); //alert(JSON.stringify(data));
for (let i in usertData) { for (let i in usertData) {
// console.log(finishProductData[i].finishProductCode) // console.log(finishProductData[i].finishProductCode)
$("#form-customerQuote-edit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); $("#form-customerQuote-edit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" +
usertData[i].userName + "</option>");
} }
$("#form-customerQuote-edit select[name='businessMembers']").val(userName).trigger("change") $("#form-customerQuote-edit select[name='businessMembers']").val(sysCustomerQuote.businessMembers);
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }

2
ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html

@ -158,7 +158,7 @@
// console.log(finishProductData[i].finishProductCode) // console.log(finishProductData[i].finishProductCode)
$("#form-customerQuote-edit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); $("#form-customerQuote-edit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
} }
$("#form-customerQuote-edit select[name='businessMembers']").val(userName).trigger("change") $("#form-customerQuote-edit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change")
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }

310
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html

@ -85,7 +85,7 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input required type="radio" th:id="${'confirmFax_' + dict.dictCode}" <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}"> name="confirmFax" th:value="${dict.dictValue}" th:checked="${dict.isDefault == 'Y' ? true : false}">
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
@ -132,24 +132,6 @@
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/> <label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/>
</div> </div>
</div> </div>
<div class="other container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
<a class="btn btn-danger multiple disabled" onclick="insertNRow()">
<i class="fa fa-remove"></i> 添加无料号物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table>
</div>
</div>
</div>
<hr/> <hr/>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label> <label class="col-sm-3 control-label" for="reApply">是否继续申请:</label>
@ -161,22 +143,304 @@
</div> </div>
</div> </div>
</form> </form>
<div class="other container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
<a class="btn btn-danger multiple disabled" onclick="insertNRow()">
<i class="fa fa-remove"></i> 添加无料号物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table>
</div>
</div>
</div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script th:src="@{/js/activiti.js}"></script> <script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script> <script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script type="text/javascript"> <script th:inline="javascript">
var prefix = ctx + "system/customerQuote"; var prefix = ctx + "erp/bom";
$("#form-edit").validate({focusCleanup: true});
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var sysCustomerQuote = [[${formData}]];
var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-edit").validate({
focusCleanup: true,
});
$(function() {
/*业务员列表*/
$.ajax({
url: ctx + 'system/user/list',
type: 'post',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#form-edit select[name='businessMembers']").append("<option value='"
+ usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("#form-edit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change")
} else {
$.modal.msgError(res.msg);
}
}
});
var confirmFax = $("input[name='confirmFax']");
confirmFax.val([sysCustomerQuote.confirmFax]);
$("input[name='rmbTax']").val([sysCustomerQuote.taxRate]);
confirmFax.change(function () {
if ($("input[name='confirmFax']").val() == "1") {
$("input[name='rmbTax']").val(sysCustomerQuote.taxRate);
} else {
$("input[name='rmbTax']").val(0);
}
});
$("#commonCurrency_edit").val(sysCustomerQuote.commonCurrency).trigger('change');
});
$(function() {
var options = {
id: "bootstrap-table-Quote-child",
url: ctx + "system/quoteChild/list",
queryParams: queryParams,
pagination: false,
sidePagination: "client",
clickToSelect: true,
showExport: true,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
showPaginationSwitch: false,
model: "物料报价信息",
columns: [
{checkbox: true},
{title: '序号',align: 'center',
formatter: function (value, row, index) {
return $.table.serialNumber(index);
}
},
{title: '报价子表id',field: 'id',align: 'center',visible: false},
{title: '物料报价主表id',field: 'quoteId',align: 'center',visible: false},
{title: '物料索引',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
$.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{
title: '图片', field: 'photoUrl', align: 'center',
formatter: function (value, row, index) {
return $.table.imageView(value);
}
},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
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: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'},
{title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center'},
{title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center'},
{title: '物料的不含税总价(美元)', field: 'materialNoUsdSum',align: 'center'},
{field: 'remark',align: 'center',title: '备注',visible: false},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
],
onEditableSave:function(field, row, oldValue, $el){
var commonCurrency1 = $("#commonCurrency_edit option:selected").val();
var rmb1 = $("#rmbTax_edit").val();
if (rmb1 =='' || rmb1== null){
rmb1 = 0;
}else{
rmb1 = $("#rmbTax_edit").val();
}
var rmb = Number(rmb1).toFixed(2) / 100;
var usd = $("#usdTax_edit").val();
if (usd =='' || usd== null){
usd = 0;
}else{
usd = Number(usd).toFixed(2);
}
console.log(commonCurrency1);
if(commonCurrency1 == 1){
row.materialRmb = Number(row.materialNoRmb * Number(1 + rmb));
row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2);
row.materialNoUsd = Number(row.materialNoRmb / usd).toFixed(2);
row.materialNoUsdSum = Number(row.materialNum) * Number(row.materialNoUsd);
row.materialUsd = Number(row.materialNoUsd).toFixed(2)
row.materialUsdSum = Number(row.materialNum * Number(row.materialUsd)).toFixed(2);
}
else if(commonCurrency1 == 2){
row.materialUsd = Number(row.materialNoUsd).toFixed(2);
row.materialUsdSum = Number(row.materialNum * row.materialUsd).toFixed(2);
row.materialNoUsdSum = Number(row.materialNoUsd * row.materialNum).toFixed(2);
row.materialNoRmb = Number(row.materialNoUsd * usd).toFixed(2);
row.materialRmb = Number(row.materialNoRmb * (1 + rmb)).toFixed(2);
row.materialNoRmbSum = Number(row.materialNoRmb * row.materialNum).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2);
}
getTotalAmount()
},
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
quoteId: sysCustomerQuote.supplierCode,
};
curParams.quoteId = sysCustomerQuote.supplierCode;
return curParams;
}
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var formData = $("#form-edit").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-table-Quote-child").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData));
var rows = tableData.length;
var materialType = $('#selectMaterialType').select2('val'); var materialType = $('#selectMaterialType').select2('val');
$('#materialType').val(materialType); $('#materialType').val(materialType);
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); $.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize());
} }
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
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();
$("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1);
var timestamp = new Date().getTime();
var totalNum = $("#bootstrap-table-Quote-child").bootstrapTable('getData').length;
$("#bootstrap-table-Quote-child").bootstrapTable('insertRow', {
index: totalNum,
row: {
id:'',
quoteId:$("#supplierCode").val(),
materialId:rowData.id,
materialCode: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
photoUrl: rowData.photoUrl,
unit: rowData.unit,
processMethod: rowData.processMethod,
countTax: '',
usdTax: '',
materialSole: "",
materialNum: "",
materialNoRmb: "",
materialNoUsd: "",
materialRmb: "",
materialNoRmbSum: "",
materialRmbSum: "",
materialUsd: "",
materialUsdSum: "",
materialNoUsdSum: "",
remark: "",
}
})
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(rowData){
$.table.bootstrapTable('remove', {
field: 'id',
values: rowData.id
})
let enterpriseSum = $("#enterpriseSum_edit").val();
$("#enterpriseSum_edit").val((enterpriseSum==null?0:enterpriseSum) - rowData.materialNum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
//计算
function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true);
var enterprise = "";
let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0;
let rmbSum = 0;let noUsd = 0;let usd = 0;
let noUsdSum = 0;let usdSum = 0;
for(var i=0;i<getData.length;i++){
enterprise += getData[i].materialName + ": 数量" + getData[i].materialNum +"; ";
enterpriseSum +=getData[i].materialNum;
noRmb += getData[i].materialNoRmb ;
rmb +=getData[i].materialRmb;
noRmbSum += getData[i].materialNoRmbSum;
rmbSum += getData[i].materialRmbSum;
noUsd += getData[i].materialNoUsd ;
usd += getData[i].materialUsd ;
noUsdSum += getData[i].materialNoUsdSum;
usdSum += getData[i].materialUsdSum;
}
$("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(enterpriseSum);
$("#noRmb_edit").val(noRmb);
$("#rmb_edit").val(rmb);
$("#noRmbSum_edit").val(noRmbSum);
$("#rmbSum_edit").val(rmbSum);
$("#noUsd_edit").val(noUsd);
$("#usd_edit").val(usd);
$("#noUsdSum_edit").val(noUsdSum);
$("#usdSum_edit").val(usdSum);
} }
</script> </script>

308
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html

@ -3,7 +3,6 @@
<head> <head>
<th:block th:include="include :: header('业务主管审核')" /> <th:block th:include="include :: header('业务主管审核')" />
<th:block th:include="include :: select2-css" /> <th:block th:include="include :: select2-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
@ -99,7 +98,7 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
@ -131,21 +130,7 @@
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/> <label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/>
</div> </div>
</div> </div>
<div class="other container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table>
</div>
</div>
</div>
<hr/> <hr/>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label" for="ywzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> <label class="col-sm-3 control-label" for="ywzgVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
@ -164,18 +149,301 @@
</div> </div>
</div> </div>
</form> </form>
<div class="other container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table>
</div>
</div>
</div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<script th:src="@{/js/activiti.js}"></script> <script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script> <script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script type="text/javascript"> <script th:inline="javascript">
var prefix = ctx + "erp/bom"; var prefix = ctx + "erp/bom";
$("#form-edit").validate({focusCleanup: true});
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var sysCustomerQuote = [[${formData}]];
var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-edit").validate({ $("#form-edit").validate({
focusCleanup: true focusCleanup: true,
}); });
$(function() {
/*业务员列表*/
$.ajax({
url: ctx + 'system/user/list',
type: 'post',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#form-edit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("#form-edit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change")
} else {
$.modal.msgError(res.msg);
}
}
});
var confirmFax = $("input[name='confirmFax']");
confirmFax.val([sysCustomerQuote.confirmFax]);
$("input[name='rmbTax']").val([sysCustomerQuote.taxRate]);
confirmFax.change(function () {
if ($("input[name='confirmFax']").val() == "1") {
$("input[name='rmbTax']").val(sysCustomerQuote.taxRate);
} else {
$("input[name='rmbTax']").val(0);
}
});
$("#commonCurrency_edit").val(sysCustomerQuote.commonCurrency).trigger('change');
});
$(function() {
var options = {
id: "bootstrap-table-Quote-child",
url: ctx + "system/quoteChild/list",
queryParams: queryParams,
pagination: false,
sidePagination: "client",
clickToSelect: true,
showExport: true,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
showPaginationSwitch: false,
model: "物料报价信息",
columns: [
{checkbox: true},
{title: '序号',align: 'center',
formatter: function (value, row, index) {
return $.table.serialNumber(index);
}
},
{title: '报价子表id',field: 'id',align: 'center',visible: false},
{title: '物料报价主表id',field: 'quoteId',align: 'center',visible: false},
{title: '物料索引',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
$.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{
title: '图片', field: 'photoUrl', align: 'center',
formatter: function (value, row, index) {
return $.table.imageView(value);
}
},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
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: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'},
{title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center'},
{title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center'},
{title: '物料的不含税总价(美元)', field: 'materialNoUsdSum',align: 'center'},
{field: 'remark',align: 'center',title: '备注',visible: false},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
],
onEditableSave:function(field, row, oldValue, $el){
var commonCurrency1 = $("#commonCurrency_edit option:selected").val();
var rmb1 = $("#rmbTax_edit").val();
if (rmb1 =='' || rmb1== null){
rmb1 = 0;
}else{
rmb1 = $("#rmbTax_edit").val();
}
var rmb = Number(rmb1).toFixed(2) / 100;
var usd = $("#usdTax_edit").val();
if (usd =='' || usd== null){
usd = 0;
}else{
usd = Number(usd).toFixed(2);
}
console.log(commonCurrency1);
if(commonCurrency1 == 1){
row.materialRmb = Number(row.materialNoRmb * Number(1 + rmb));
row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2);
row.materialNoUsd = Number(row.materialNoRmb / usd).toFixed(2);
row.materialNoUsdSum = Number(row.materialNum) * Number(row.materialNoUsd);
row.materialUsd = Number(row.materialNoUsd).toFixed(2)
row.materialUsdSum = Number(row.materialNum * Number(row.materialUsd)).toFixed(2);
}
else if(commonCurrency1 == 2){
row.materialUsd = Number(row.materialNoUsd).toFixed(2);
row.materialUsdSum = Number(row.materialNum * row.materialUsd).toFixed(2);
row.materialNoUsdSum = Number(row.materialNoUsd * row.materialNum).toFixed(2);
row.materialNoRmb = Number(row.materialNoUsd * usd).toFixed(2);
row.materialRmb = Number(row.materialNoRmb * (1 + rmb)).toFixed(2);
row.materialNoRmbSum = Number(row.materialNoRmb * row.materialNum).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2);
}
getTotalAmount()
},
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
quoteId: sysCustomerQuote.supplierCode,
};
curParams.quoteId = sysCustomerQuote.supplierCode;
return curParams;
}
function submitHandler() {
if ($.validate.form()) {
var formData = $("#form-edit").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-table-Quote-child").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData));
var rows = tableData.length;
if(rows==0){
$.modal.alertWarning("子表数据不能为空!");
}else{
formData.push({"name": "sysCustomerQuoteChildList", "value": tableData});
var jsonData = $.common.formDataToJson(formData);
$.operate.saveJson(prefix + "/edit", jsonData);
}
}
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
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();
$("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1);
var timestamp = new Date().getTime();
var totalNum = $("#bootstrap-table-Quote-child").bootstrapTable('getData').length;
$("#bootstrap-table-Quote-child").bootstrapTable('insertRow', {
index: totalNum,
row: {
id:'',
quoteId:$("#supplierCode").val(),
materialId:rowData.id,
materialCode: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
photoUrl: rowData.photoUrl,
unit: rowData.unit,
processMethod: rowData.processMethod,
countTax: '',
usdTax: '',
materialSole: "",
materialNum: "",
materialNoRmb: "",
materialNoUsd: "",
materialRmb: "",
materialNoRmbSum: "",
materialRmbSum: "",
materialUsd: "",
materialUsdSum: "",
materialNoUsdSum: "",
remark: "",
}
})
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(rowData){
$.table.bootstrapTable('remove', {
field: 'id',
values: rowData.id
})
let enterpriseSum = $("#enterpriseSum_edit").val();
$("#enterpriseSum_edit").val((enterpriseSum==null?0:enterpriseSum) - rowData.materialNum);
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
//计算
function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true);
var enterprise = "";
let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0;
let rmbSum = 0;let noUsd = 0;let usd = 0;
let noUsdSum = 0;let usdSum = 0;
for(var i=0;i<getData.length;i++){
enterprise += getData[i].materialName + ": 数量" + getData[i].materialNum +"; ";
enterpriseSum +=getData[i].materialNum;
noRmb += getData[i].materialNoRmb ;
rmb +=getData[i].materialRmb;
noRmbSum += getData[i].materialNoRmbSum;
rmbSum += getData[i].materialRmbSum;
noUsd += getData[i].materialNoUsd ;
usd += getData[i].materialUsd ;
noUsdSum += getData[i].materialNoUsdSum;
usdSum += getData[i].materialUsdSum;
}
$("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(enterpriseSum);
$("#noRmb_edit").val(noRmb);
$("#rmb_edit").val(rmb);
$("#noRmbSum_edit").val(noRmbSum);
$("#rmbSum_edit").val(rmbSum);
$("#noUsd_edit").val(noUsd);
$("#usd_edit").val(usd);
$("#noUsdSum_edit").val(noUsdSum);
$("#usdSum_edit").val(usdSum);
}
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val'); var materialType = $('#selectMaterialType').select2('val');

416
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html

@ -1,13 +1,12 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml"> <html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<th:block th:include="include :: header('业务经理审核')" /> <th:block th:include="include :: header('业务经理审核')" />
<th:block th:include="include :: select2-css" /> <th:block th:include="include :: select2-css" />
<link th:href="@{/ajax/libs/element-ui/element-ui.css}" rel="stylesheet"/>
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> <form class="form-horizontal m" id="form-ywjl-audit" th:object="${formData}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input type="hidden" name="p_COM_comment" /> <input type="hidden" name="p_COM_comment" />
@ -47,7 +46,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<label class="col-sm-4 control-label">业务员:</label> <label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select readonly class="form-control" name="businessMembers" required th:field="*{businessMembers}"> <select class="form-control" name="businessMembers" th:field="*{businessMembers}" id="businessMembers" required>
<option value="">请选择</option> <option value="">请选择</option>
</select> </select>
</div> </div>
@ -67,7 +66,8 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">报价币种:</label> <label class="col-sm-4 control-label">报价币种:</label>
<div class="col-sm-8"> <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 value="">请选择</option>
<option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" ></option> <option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}" ></option>
</select> </select>
@ -83,8 +83,8 @@
<label class="col-sm-6 control-label is-required">是否含税:</label> <label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input required type="radio" th:id="${'confirmFax_' + dict.dictCode}" <input type="radio" th:id="${'confirmFax_' + dict.dictCode}"
name="confirmFax" th:value="${dict.dictValue}" th:field="*{confirmFax}" th:checked="${dict.isDefault == 'Y' ? true : false}"> name="confirmFax" th:value="${dict.dictValue}" th:field="*{confirmFax}" th:checked="${dict.isDefault == 'Y' ? true : false}" required>
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
@ -99,7 +99,7 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
@ -119,33 +119,23 @@
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-1" name="noRmb" id="noRmb_edit" th:field="*{noRmb}" type="number" disabled /> <label class="col-sm-2"> 不含税单价(RMB):</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-1" 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="noRmbSum" id="noRmbSum_edit" th:field="*{noRmbSum}" type="number" disabled/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-1" name="rmb" id="rmb_edit" type="number" th:field="*{rmb}" disabled/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-1" name="rmbSum" id="rmbSum_edit" th:field="*{rmbSum}" type="number" disabled/>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12 form-row">
<label class="col-sm-2">不含税单价(美元):</label><input placeholder="USD" class="col-sm-1" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/> <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="USD" class="col-sm-1" name="noUsdSum" id="noUsdSum_edit" th:field="*{noUsdSum}" type="number" 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="USD" class="col-sm-1" name="usd" id="usd_edit" th:field="*{usd}" type="number" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/>
</div> </div>
</div> <div class="col-xs-12 form-row">
<div class="other container"> <label class="col-sm-2">不含税单价(美元):</label><input placeholder="USD" class="col-sm-4" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/>
<div class="form-row"> <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="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
</div>
</div> </div>
<div class="row"> <div class="col-xs-12 form-row">
<div class="col-sm-12 select-table table-striped"> <label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-4" name="usd" id="usd_edit" th:field="*{usd}" type="number" disabled/>
<table id="bootstrap-table-Quote-child"></table> <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>
</div> </div>
</div> </div>
<hr/> <hr/>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label" for="ywjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> <label class="col-sm-3 control-label" for="ywjlVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
@ -164,123 +154,274 @@
</div> </div>
</div> </div>
</form> </form>
<div class="other container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" disabled>
<i class="fa fa-plus"></i> 添加物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table>
</div>
</div>
</div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<script th:src="@{/js/activiti.js}"></script> <th:block th:include="include :: datetimepicker-js" />
<script th:src="@{/ajax/libs/vue/vue.js}"></script> <script th:inline="javascript">
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
<script type="text/javascript"> var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
new Vue({ var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
el: '#app', var processMethodDatas = [[${@dict.getType('processMethod')}]];
data: function() { var userName = [[${@permission.getPrincipalProperty('userName')}]];
return { var sysCustomerQuote = [[${formData}]];
fileList: [], var prefix = ctx + "system/customerQuote"
fileUploadUrl: ctx + "common/uploadSingleFile", var commonCurrency = $("#commonCurrency_edit option:selected").val();
fileDeleteUrl: ctx + "common/deleteFile", $("#form-ywjl-audit").validate({focusCleanup: true});
getListByAttachIdUrl: ctx + "system/attach/file/getListByAttachId", $(function() {
fileIdList:[], $.ajax({
removeFileIdList:[], url: ctx + 'system/user/list',
type: 'post',
} success: function (res) {
}, console.log(res)
mounted() { if (res.rows.length > 0) {
var usertData = res.rows;
// 控制下拉框选中 for (let i in usertData) {
var materialType = $("#materialType").val(); $("#form-ywjl-audit select[name='businessMembers']").append("<option value='" +
$("#selectMaterialType").val(materialType).trigger("change"); usertData[i].userName + "'>" + usertData[i].userName + "</option>");
var that = this;
// 页面渲染完成,可以执行需要的操作
console.log('页面已渲染完成');
console.log($("#id").val());
console.log($("#photoAttachId").val());
var attachId = $("#photoAttachId").val();
if(attachId){
$.ajax({
type: "get",
url: that.getListByAttachIdUrl,
data: {attachId:attachId},
cache: false,
async: false, // 设置成同步
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
result.data.forEach((item) => {
that.fileIdList.push(item.id);
that.fileList.push({name: item.name, url: item.url, attachFileId: item.id,isBind:true});
});
} else {
$.modal.msgError(result.msg);
}
},
error: function(error) {
$.modal.msgError("获取附件失败。");
} }
}); $("#form-ywjl-audit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change");;
} else {
$.modal.msgError(res.msg);
}
} }
}, });
methods: { var confirmFax = $("input[name='confirmFax']");
uploadSuccess(response, file, fileList) { confirmFax.val([sysCustomerQuote.confirmFax]);
console.log(response); $("input[name='rmbTax']").val([sysCustomerQuote.taxRate]);
if(response.code == web_status.SUCCESS){ confirmFax.change(function () {
var attachFileId = response.data.id; if ($("input[name='confirmFax']").val() == "1") {
file.attachFileId = attachFileId; $("input[name='rmbTax']").val(sysCustomerQuote.taxRate);
file.isBind = false; } else {
this.fileIdList.push(attachFileId); $("input[name='rmbTax']").val(0);
$("#fileIdStr").val(this.fileIdList.join(";")); }
$.modal.msgSuccess("上传成功"); });
$("#commonCurrency_edit").val(sysCustomerQuote.commonCurrency).trigger('change');
});
$(function() {
var options = {
id: "bootstrap-table-Quote-child",
url: ctx + "system/quoteChild/list",
queryParams: queryParams,
pagination: false,
sidePagination: "client",
clickToSelect: true,
showExport: true,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
showPaginationSwitch: false,
model: "物料报价信息",
columns: [
{checkbox: true},
{title: '序号',align: 'center',
formatter: function (value, row, index) {
return $.table.serialNumber(index);
}
},
{title: '报价子表id',field: 'id',align: 'center',visible: false},
{title: '物料报价主表id',field: 'quoteId',align: 'center',visible: false},
{title: '物料索引',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
$.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{
title: '图片', field: 'photoUrl', align: 'center',
formatter: function (value, row, index) {
return $.table.imageView(value);
}
},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '加工方式',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
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: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'},
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center'},
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center'},
{title: '物料的含税单价(美元)',field: 'materialUsd',align: 'center'},
{title: '物料的含税总价(美元)',field: 'materialUsdSum',align: 'center'},
{title: '物料的不含税总价(美元)', field: 'materialNoUsdSum',align: 'center'},
{field: 'remark',align: 'center',title: '备注',visible: false},
{title: '操作', align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
],
onEditableSave:function(field, row, oldValue, $el){
var commonCurrency1 = $("#commonCurrency_edit option:selected").val();
var rmb1 = $("#rmbTax_edit").val();
if (rmb1 =='' || rmb1== null){
rmb1 = 0;
}else{ }else{
$.modal.alertError(response.msg); rmb1 = $("#rmbTax_edit").val();
} }
}, var rmb = Number(rmb1).toFixed(2) / 100;
uploadRemove(file, fileList) { var usd = $("#usdTax_edit").val();
console.log(file, fileList); if (usd =='' || usd== null){
var attachFileId = file.attachFileId; usd = 0;
var isBind = file.isBind;
if(isBind==false){
$.ajax({
type: "get",
url: this.fileDeleteUrl,
data: {id:attachFileId},
cache: false,
async: false, // 设置成同步
dataType: 'json',
success: function(result) {
if (result.code == web_status.SUCCESS) {
var index = this.fileIdList.indexOf(attachFileId);
if(index!=-1){
this.fileIdList.splice(index,1);
$("#fileIdStr").val(this.fileIdList.join(";"));
}
$.modal.msgSuccess("删除附件成功。");
} else {
$.modal.alertError(result.msg);
}
},
error: function(error) {
$.modal.alertError("删除附件失败。");
}
});
}else{ }else{
var index = this.fileIdList.indexOf(attachFileId); usd = Number(usd).toFixed(2);
if(index!=-1){ }
this.fileIdList.splice(index,1); console.log(commonCurrency1);
$("#fileIdStr").val(this.fileIdList.join(";")); if(commonCurrency1 == 1){
// 保存的时候才删除 row.materialRmb = Number(row.materialNoRmb * Number(1 + rmb));
this.removeFileIdList.push(attachFileId); row.materialNoRmbSum = Number(row.materialNum * Number(row.materialNoRmb)).toFixed(2);
$("#removeFileIdStr").val(this.removeFileIdList.join(";")); row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2);
} row.materialNoUsd = Number(row.materialNoRmb / usd).toFixed(2);
row.materialNoUsdSum = Number(row.materialNum) * Number(row.materialNoUsd);
row.materialUsd = Number(row.materialNoUsd).toFixed(2)
row.materialUsdSum = Number(row.materialNum * Number(row.materialUsd)).toFixed(2);
}
else if(commonCurrency1 == 2){
row.materialUsd = Number(row.materialNoUsd).toFixed(2);
row.materialUsdSum = Number(row.materialNum * row.materialUsd).toFixed(2);
row.materialNoUsdSum = Number(row.materialNoUsd * row.materialNum).toFixed(2);
row.materialNoRmb = Number(row.materialNoUsd * usd).toFixed(2);
row.materialRmb = Number(row.materialNoRmb * (1 + rmb)).toFixed(2);
row.materialNoRmbSum = Number(row.materialNoRmb * row.materialNum).toFixed(2);
row.materialRmbSum = Number(row.materialRmb * row.materialNum).toFixed(2);
} }
getTotalAmount()
}, },
} };
}) $.table.init(options);
var prefix = ctx + "erp/bom";
$("#form-edit").validate({
focusCleanup: true
}); });
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
quoteId: sysCustomerQuote.supplierCode,
};
curParams.quoteId = sysCustomerQuote.supplierCode;
return curParams;
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData);
var timestamp = new Date().getTime();
$("#bootstrap-table-Quote-child").bootstrapTable('insertRow', {
index: 1,
row: {
id:'',
quoteId:$("#supplierCode").val(),
materialId:rowData.id,
materialCode: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
brand: rowData.brand,
photoUrl: rowData.photoUrl,
unit: rowData.unit,
processMethod: rowData.processMethod,
countTax: '',
usdTax: '',
materialSole: "",
materialNum: "",
materialNoRmb: "",
materialNoUsd: "",
materialRmb: "",
materialNoRmbSum: "",
materialRmbSum: "",
materialUsd: "",
materialUsdSum: "",
materialNoUsdSum: "",
remark: "",
}
})
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(rowData){
$.table.bootstrapTable('remove', {
field: 'index',
values: rowData.index
})
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
//计算
function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true);
var enterprise = "";
let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0;
let rmbSum = 0;let noUsd = 0;let usd = 0;
let noUsdSum = 0;let usdSum = 0;
for(var i=0;i<getData.length;i++){
enterprise += getData[i].materialName + ": 数量" + getData[i].materialNum +"; ";
enterpriseSum +=getData[i].materialNum;
noRmb += getData[i].materialNoRmb ;
rmb +=getData[i].materialRmb;
noRmbSum += getData[i].materialNoRmbSum;
rmbSum += getData[i].materialRmbSum;
noUsd += getData[i].materialNoUsd ;
usd += getData[i].materialUsd ;
noUsdSum += getData[i].materialNoUsdSum;
usdSum += getData[i].materialUsdSum;
}
$("#enterprise_edit").val(enterprise);
$("#enterpriseSum_edit").val(enterpriseSum);
$("#noRmb_edit").val(noRmb);
$("#rmb_edit").val(rmb);
$("#noRmbSum_edit").val(noRmbSum);
$("#rmbSum_edit").val(rmbSum);
$("#noUsd_edit").val(noUsd);
$("#usd_edit").val(usd);
$("#noUsdSum_edit").val(noUsdSum);
$("#usdSum_edit").val(usdSum);
}
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val'); var materialType = $('#selectMaterialType').select2('val');
@ -289,10 +430,9 @@
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); $.operate.save(prefix + "/complete/" + taskId, $('#form-ywjl-audit').serialize());
} }
} }
</script> </script>
</body> </body>
</html> </html>

79
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskZozjVerify.html

@ -7,7 +7,7 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> <form class="form-horizontal m" id="form-zozj-audit" th:object="${formData}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input type="hidden" name="p_COM_comment" /> <input type="hidden" name="p_COM_comment" />
@ -47,8 +47,7 @@
<div class="col-xs-12" shiro:hasPermission="system:customerQuote:edit"> <div class="col-xs-12" shiro:hasPermission="system:customerQuote:edit">
<label class="col-sm-4 control-label">业务员:</label> <label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select readonly class="form-control" name="businessMembers" required th:field="*{businessMembers}"> <select class="form-control" name="businessMembers" th:field="*{businessMembers}" required readonly >
<option value="">请选择</option>
</select> </select>
</div> </div>
</div> </div>
@ -76,15 +75,16 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">美元汇率:</label> <label class="col-sm-4 control-label">美元汇率:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="usdTax" th:field="*{usdTax}" id="usdTax_edit" class="form-control" type="number" placeholder="美元对人民币汇率"> <input name="usdTax" id="usdTax_edit" th:field="*{usdTax}"
class="form-control" type="number" placeholder="美元对人民币汇率">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-6 control-label is-required">是否含税:</label> <label class="col-sm-6 control-label is-required">是否含税:</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}"> <div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input required type="radio" th:id="${'confirmFax_' + dict.dictCode}" <input type="radio" th:id="${'confirmFax_' + dict.dictCode}" th:field="*{confirmFax}"
name="confirmFax" th:value="${dict.dictValue}" th:field="*{confirmFax}" th:checked="${dict.isDefault == 'Y' ? true : false}"> name="confirmFax" th:value="${dict.dictValue}" required>
<label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label> <label th:for="${'confirmFax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div> </div>
</div> </div>
@ -99,7 +99,7 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
@ -131,21 +131,7 @@
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/> <label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/>
</div> </div>
</div> </div>
<div class="other container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table>
</div>
</div>
</div>
<hr/> <hr/>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label" for="zozjVerifyApproved"><span style="color: red; ">*</span>审批意见:</label> <label class="col-sm-3 control-label" for="zozjVerifyApproved"><span style="color: red; ">*</span>审批意见:</label>
@ -164,25 +150,37 @@
</div> </div>
</div> </div>
</form> </form>
<div class="other container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 添加物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table>
</div>
</div>
</div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" /> <th:block th:include="include :: select2-js" />
<script th:src="@{/js/activiti.js}"></script> <script th:src="@{/js/activiti.js}"></script>
<script th:src="@{/ajax/libs/vue/vue.js}"></script> <script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script type="text/javascript"> <script th:inline="javascript">
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]]; var userName = [[${@permission.getPrincipalProperty('userName')}]];
var sysCustomerQuote = [[${sysCustomerQuote}]]; var sysCustomerQuote = [[${formData}]];
var prefix = ctx + "system/customerQuote" var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val(); var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-customerQuote-edit").validate({ $("#form-zozj-audit").validate({focusCleanup: true});
focusCleanup: true,
});
var customerCode1 = [[${sysCustomerQuote.customerCode}]];
$(function() { $(function() {
/*业务员列表*/ /*业务员列表*/
$.ajax({ $.ajax({
@ -192,22 +190,21 @@
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
var usertData = res.rows; var usertData = res.rows;
//alert(JSON.stringify(data));
for (let i in usertData) { for (let i in usertData) {
// console.log(finishProductData[i].finishProductCode) $("#form-zozj-audit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
$("#form-customerQuote-edit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
} }
$("#form-customerQuote-edit select[name='businessMembers']").val(userName).trigger("change") $("#form-zozj-audit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change")
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }
} }
}); });
$("input[name='customerFax']").val([sysCustomerQuote.customerFax]); var confirmFax = $("input[name='confirmFax']");
$("input[name='customerFax']").change(function () { confirmFax.val([sysCustomerQuote.confirmFax]).attr("checked", "check");
if ($("input[name='customerFax']").val() == "1") { $("input[name='rmbTax']").val([sysCustomerQuote.taxRate]);
var rmbTax_edit = Number($("input[name='rmbTax']").val()); confirmFax.change(function () {
$("input[name='rmbTax']").val(Number(rmbTax_edit % 100).toFixed(2)); if ($("input[name='confirmFax']").val() == "1") {
$("input[name='rmbTax']").val(sysCustomerQuote.taxRate);
} else { } else {
$("input[name='rmbTax']").val(0); $("input[name='rmbTax']").val(0);
} }
@ -331,7 +328,7 @@
}); });
//计算 //计算
function getTotalAmount(){ function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true); let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData');
var enterprise = ""; var enterprise = "";
let enterpriseSum = 0; let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0; let noRmb = 0;let rmb = 0;let noRmbSum = 0;
@ -361,16 +358,12 @@
$("#usdSum_edit").val(usdSum); $("#usdSum_edit").val(usdSum);
} }
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); $.operate.save(prefix + "/complete/" + taskId, $('#form-zozj-audit').serialize());
} }
} }
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save