Browse Source

[feat]修复: 销售订单拒绝申请后重新审请。审核修改的销售订单信息。

dev
zhangsiqi 4 months ago
parent
commit
e683065b0c
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  2. 10
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java
  3. 1
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderVo.java
  4. 6
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml
  5. 7
      ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html
  6. 172
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html
  7. 58
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html
  8. 79
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html
  9. 88
      ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html

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

@ -517,9 +517,9 @@ public class SysSalesOrderController extends BaseController
}
@GetMapping("/getBinessMembers")
@ResponseBody
public TableDataInfo getBinessMembers(){
public TableDataInfo getBusinessMembers(){
startPage();
List<SysUser> list = sysUserService.selectRoleToUserList("ywyRole,ywjlRole,ywzgRole");
List<SysUser> list = sysUserService.selectRoleToUserList("ywyRole,ywjlRole,ywzgRole,zozjRole,admin");
return getDataTable(list);
}
}

10
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java

@ -20,15 +20,15 @@ public class SysSalesOrder extends BaseEntity {
/* 订单id*/
private Long salesOrderId;
/*使用状态*/
/*使用状态 0未使用,1使用,2已作废*/
private String useStatus;
/*审核状态*/
/*审核状态 (0未审核,1审核通过,2审核拒绝)*/
private String auditStatus;
/*出货状态*/
/*出货状态(0待出货通知,1待准备货,2待出货,3部分收货,4全部收货,5部分出货,6全部出货,7部分验收,8全部验收)*/
private String deliveryStatus;
/*收款结案状态*/
/*收款结案状态(0待收款,1部分收款,2全部收款,3已结案)*/
private String closeStatus;
/*生产状态*/
/**生产状态(0待评审、1待部门主管确认、2待工程审核、3待生产、4生产中、5部分完成、6全部完成)*/
private String makeStatus;
/* 订单编号*/
@Excel(name = "销售订单编号")

1
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrderVo.java

@ -20,6 +20,7 @@ public class SysSalesOrderVo extends SysSalesOrder{
/** 流程实例类型名称 */
private String instanceTypeName;
/**
* 关键词
*/

6
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderMapper.xml

@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deliveryPhone" column="delivery_phone" />
<result property="deliveryAddress" column="delivery_address" />
<result property="orderReceivingMode" column="order_receiving_mode" />
<result property="orderReceivingTime" column="order_receiving_time" />
<result property="customerContact" column="customer_contact" />
<result property="contactNumber" column="contact_number" />
<result property="customerFax" column="customer_fax" />
@ -79,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
common_currency,enterprise_name, material_sum, enterprise_sum, noRmbPrice, noRmbSum, rmbPrice,
rmbTaxSum,noUsdPrice, noUsdSum, usdPrice, usdTaxSum, payment_terms, delivery_time,
delivery_conditions, delivery_method, delivery_address,delivery_phone,customer_delivery,
order_receiving_mode,customer_contact, contact_number,contact_email, contact_post,
order_receiving_mode,order_receiving_time,customer_contact, contact_number,contact_email, contact_post,
customer_fax, business_members, confirm_tax, tax_rate,usd_tax,invoice,total_amount,
modification_time,standby_one,standby_two, first_add_time, update_info_time, file_upload,
create_by, create_time, update_by, update_time,trade_clause, remark, out_bound_quantity,
@ -94,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
s.customer_purser,s.common_currency,s.enterprise_name, s.material_sum, s.enterprise_sum,
s.noRmbPrice, s.noRmbSum, s.rmbPrice, s.rmbTaxSum,s.noUsdPrice, s.noUsdSum, s.usdPrice, s.usdTaxSum,
s.payment_terms, s.delivery_time,s.delivery_conditions, s.delivery_method, s.delivery_address,s.delivery_phone,
s.customer_delivery,s.order_receiving_mode,s.customer_contact, s.contact_number,s.contact_email, s.contact_post,
s.customer_delivery,s.order_receiving_mode,s.order_receiving_time,s.customer_contact, s.contact_number,s.contact_email, s.contact_post,
s.customer_fax,s.business_members, s.confirm_tax, s.tax_rate, s.usd_tax,s.invoice,s.total_amount, s.billing_time,
s.modification_time,s.standby_one,s.standby_two, s.first_add_time,s.update_info_time, s.file_upload, s.create_by,
s.create_time, s.update_by, s.update_time, s.remark,s.out_bound_quantity, s.un_bound_quantity, s.trade_clause,
@ -390,7 +391,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="applyTitle != null">apply_title = #{applyTitle},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
update_info_time = now()
</trim>
where sales_order_code = #{salesOrderCode}
</update>

7
ruoyi-admin/src/main/resources/templates/system/salesOrder/add.html

@ -317,6 +317,7 @@
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var warehouseDeptDatas = [[${@dict.getType('warehouseDept')}]];
var prefix = ctx + "system/salesOrder"
$(function() {
var options = {
@ -324,6 +325,8 @@
pagination: false,
sidePagination: "client",
model: "物料报价信息",
fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
@ -340,7 +343,9 @@
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center', formatter: function(value, row, index) {return $.table.selectDictLabel(sysUnitClassDatas, value);}},
{ title: '入库部门',field: 'warehouseDept',align: 'center',
formatter: function(value, row, index) {}
formatter: function(value, row, index) {
}
},
{title: '半成品类型',field: 'processMethod',align: 'center',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}},
{ title: '对外售价',field: 'materialSole',editable: true},

172
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskModifyApply.html

@ -12,7 +12,7 @@
</head>
<body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-modfify-audit" th:object="${formData}">
<form class="form-horizontal m" id="form-modify-audit" th:object="${formData}">
<input name="salesOrderId" th:field="*{salesOrderId}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
@ -20,6 +20,7 @@
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<!--驳回调整允许更新内容-->
<input type="hidden" name="saveEntity" value="true" />
<input type="hidden" name="p_B_reApply" class="form-control m-b" />
<div class="form-group">
<label class="col-sm-3 control-label">申请人:</label>
<div class="col-sm-8">
@ -74,8 +75,9 @@
<div class="form-group">
<label class="col-sm-3 control-label">客户联系人:</label>
<div class="col-sm-8">
<input id="customerContact" name="customerContact" th:field="*{customerContact}" class="form-control m-b" />
<select id="customerContact_edit" name="customerContact" th:field="*{customerContact}"
class="form-control">
</select>
</div>
</div>
<div class="form-group">
@ -99,7 +101,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">客户收货人:</label>
<div class="col-sm-8">
<select name="customerDelivery" th:field="*{customerDelivery}" class="form-control m-b" >
<select name="customerDelivery" id="customerDelivery_edit" th:field="*{customerDelivery}" class="form-control m-b" >
</select>
</div>
</div>
@ -118,13 +120,13 @@
<div class="form-group">
<label class="col-sm-3 control-label">客户订单号:</label>
<div class="col-sm-8">
<input name="salesOrderNumber" th:field="*{salesOrderNumber}" class="form-control" type="text">
<input name="salesOrderNumber" th:field="*{salesOrderNumber}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单类型:</label>
<div class="col-sm-8">
<select name="salesOrderType" class="form-control" type="text" th:with="dictList=${@dict.getType('sys_order_type')}" required>
<select name="salesOrderType" class="form-control" type="text" th:with="dictList=${@dict.getType('sys_order_type')}" disabled required>
<option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
</select>
</div>
@ -133,7 +135,7 @@
<label class="col-sm-3 control-label">接单日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="orderReceivingTime" class="form-control" th:field="*{orderReceivingTime}" placeholder="yyyy-mm-dd" type="text">
<input name="orderReceivingTime" class="form-control" placeholder="yyyy-mm-dd" type="text" th:field="*{orderReceivingTime}" />
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
@ -156,14 +158,14 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">美元汇率:</label>
<div class="col-sm-8">
<input name="usdTax" class="form-control" th:field="*{udsTax}" type="text" required />
<input name="usdTax" class="form-control" th:field="*{usdTax}" type="text" required />
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否含税:</label>
<div class="col-sm-8">
<div class="radio-box" th:each="dict : ${@dict.getType('sys_confirm_tax')}">
<input required type="radio" th:id="${'confirmTax_' + dict.dictCode}"
<input type="radio" th:id="${'confirmTax_' + dict.dictCode}" required
name="confirmTax" th:value="${dict.dictValue}" th:checked="${dict.default}">
<label th:for="${'confirmTax_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
</div>
@ -216,8 +218,8 @@
<label class="col-sm-3 control-label">客户验收时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="modificationTime" class="form-control" placeholder="yyyy-mm-dd" type="text">
<span class="input-group-addon" th:value="*{modificationTime}"><i class="fa fa-calendar"></i></span>
<input name="modificationTime" th:field="*{modificationTime}" class="form-control" placeholder="yyyy-mm-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
@ -237,8 +239,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">业务员:</label>
<div class="col-sm-8">
<select name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" required>
</select>
<input name="businessMembers" class="form-control m-b" th:field="*{businessMembers}" readonly required>
</div>
</div>
<div class="container">
@ -279,19 +280,24 @@
<div class="form-group">
<label class="col-sm-3 control-label" for="reApply">是否继续申请:</label>
<div class="col-sm-8">
<select id="reApply" name="p_B_reApply" class="form-control m-b">
<select id="reApply" name="reApply" class="form-control m-b">
<option value="true">重新申请</option>
<option value="false">结束流程</option>
</select>
</div>
</div>
</div>
<input type="hidden" name="salesOrderChildList" id="salesOrderChildList_modify"/>
</form>
<div class="other-container">
<div class="form-row">
<div class="btn-group-sm" id="toolbars" 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">
@ -313,24 +319,12 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrder = [[${formData}]];
$("#form-modfify-audit").validate({onkeyup: false,rules:{},messages: {}, focusCleanup: true});
var salesOrderCode = [[${formData.salesOrderCode}]];
var customerContact = [[${formData.customerContact}]];
var customerDelivery = [[${formData.customerDelivery}]];
var enterpriseCode = [[${formData.enterpriseCode}]];
$("#form-modify-audit").validate({onkeyup: false,rules:{},messages: {}, focusCleanup: true});
function submitHandler() {
if ($.validate.form()) {
var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-modfify-audit').serialize());
}
}
$("#form-modfify-audit").validate({focusCleanup: true});
var prefix = ctx + "system/salesOrder";
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrder = [[${formData}]];
$("#form-modfify-audit").validate({focusCleanup: true});
$(function() {
var options = {
id:'bootstrap-sub-table-editOrder4',
@ -341,10 +335,9 @@
model: "物料报价信息",
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
{field: 'materialIndex',align: 'center', title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
return $.table.serialNumber(index);
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
@ -418,7 +411,7 @@
{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.index + '\')"><i class="fa fa-remove"></i>删除</a> ');
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialId + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
@ -462,25 +455,6 @@
},
};
$.table.init(options);
$.ajax({
type: "post",
url:ctx + "system/customer/customerList",
dataType:"json",
delay:250,
cache:true,
success: function (res, params) {
if (res.rows.length > 0) {
var result = res.rows;
for (let i in result) {
$("#form-modfify-audit select[name='enterpriseCode']").append(
"<option value='" + result[i].enterpriseCode + "'>" + result[i].enterpriseCode + "</option>");
}
$("#form-modfify-audit select[name='enterpriseCode']").val(sysSalesOrder.enterpriseCode).trigger("change");
} else {
$.modal.msgError(res.msg);
}
},
});
$.ajax({
type: "post",
url:ctx + "system/customer/shippingList",
@ -488,16 +462,16 @@
delay:250,
cache:true,
data:{
enterpriseCode:sysSalesOrder.enterpriseCode,
enterpriseCode:enterpriseCode,
},
success: function (res, params) {
if (res.rows.length > 0) {
var result = res.rows;
for (let i in result) {
$("#form-modfify-audit select[name='customerDelivery']").append(
$("#form-modify-audit select[name='customerDelivery']").append(
"<option value='" + result[i].customerName + "'>" + result[i].customerName + "</option>");
}
$("#form-modfify-audit select[name='customerDelivery']").val(sysSalesOrder.customerDelivery).trigger()
$("#form-modify-audit select[name='customerDelivery']").val(customerDelivery).trigger("change");
}
}
});
@ -508,42 +482,22 @@
delay:250,
cache:true,
data:{
enterpriseCode:sysSalesOrder.enterpriseCode,
enterpriseCode:enterpriseCode,
},
success: function (res, params) {
if (res.rows.length > 0) {
var result = res.rows;
for (let i in result) {
$("#form-modfify-audit select[name='customerContact']").append(
$("#form-modify-audit select[name='customerContact']").append(
"<option value='" + result[i].customerName + "'>" + result[i].customerName + "</option>");
}
$("#form-modfify-audit select[name='customerContact']").val(sysSalesOrder.customerContact).trigger("change");
$("#form-modify-audit select[name='customerContact']").val(customerContact).trigger("change");
} else {
$.modal.msgError(res.msg);
}
},
});
$("#enterprise_edit").val(sysSalesOrder.enterprise);
$("#enterpriseSum_edit").val(sysSalesOrder.enterpriseSum);
$("#noRmb_edit").val(sysSalesOrder.noRmb);
$("#rmb_edit").val(sysSalesOrder.rmb);
$("#noRmbSum_edit").val(sysSalesOrder.noRmbSum);
$("#rmbTax_edit").val(sysSalesOrder.rmbSum);
$("#noUsd_edit").val(sysSalesOrder.noUsd);
$("#usd_edit").val(sysSalesOrder.usd);
$("#noUsdSum_edit").val(sysSalesOrder.noUsdSum);
$("#usdSum_edit").val(sysSalesOrder.usdSum);
binessMembers();
});
$('#enterpriseCode_edit').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='enterpriseName']").val(data.enterpriseName);
$("input[name='customerPurser']").val(data.customerPurser);
$("input[name='taxRate']").val(data.taxRate);
$("input[name='confirmFax']").val(data.confirmTax);
$("#commonCurrency_add").val(data.commonCurrency).trigger('change');
commonCurrency = $("#commonCurrency_edit option:selected").val();
console.log("commonCurrency",commonCurrency);
getBusinessMembers();
});
$('#customerContact_edit').on('select2:select', function (e) {
var data = e.params.data;
@ -556,17 +510,17 @@
$("input[name='deliveryPhone']").val(data1.customerPhone);
$("input[name='deliveryAddress']").val(data1.deliveryAddress);
});
function binessMembers(){
function getBusinessMembers(){
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
var userData = res.rows;
for (let i in userData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
"<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
@ -579,9 +533,9 @@
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
quoteId: sysSalesOrder.salesOrderCode,
quoteId: salesOrderCode
};
curParams.quoteId = sysSalesOrder.salesOrderCode;
curParams.quoteId = salesOrderCode
return curParams;
}
function doSubmit(index, layero,uniqueId){
@ -642,32 +596,12 @@
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(index){
function removeRow(materialId){
$("#bootstrap-sub-table-editOrder4").bootstrapTable('remove', {
field: 'index',
value: index
field: 'materialId',
values: materialId
})
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='deliveryTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='orderReceivingTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='modificationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
//计算
function getTotalAmount(){
let getData = $("#bootstrap-sub-table-editOrder4").bootstrapTable('getData');
@ -727,6 +661,24 @@
minView: "month",
autoclose: true
});
function submitHandler() {
if ($.validate.form()) {
$("#p_B_reApply").val();
$("#reApply").val()
var taskId = [[${taskId}]];
var tableData = $("#bootstrap-sub-table-editOrder4").bootstrapTable('getData');
if (tableData.length === 0) {
$.modal.alertWarning("子表数据不能为空!");
} else {
// 将子表数据添加到FormData中
$("#salesOrderChildList_modify").val(JSON.stringify(tableData));
var formData = $("#form-modify-audit").serialize();
// 发送请求
$.operate.save(prefix + "/complete/" + taskId, formData)
}
}
}
</script>
</body>
</html>

58
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwjlVerify.html

@ -316,7 +316,7 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]];
var sysSalesOrderCode = [[${formData.salesOrderCode}]];
$("#form-ywjl-audit").validate({focusCleanup: true});
$(function() {
var options = {
@ -374,6 +374,18 @@
};
$.table.init(options);
getBusinessMembers();
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
quoteId: sysSalesOrderCode
};
return curParams;
}
function customerInit(){
$.ajax({
type: "post",
url:ctx + "system/customer/customerList",
@ -435,50 +447,18 @@
}
},
});
binessMembers();
getTotalAmount();
});
$('#enterpriseCode_edit').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='enterpriseName']").val(data.enterpriseName);
$("input[name='customerPurser']").val(data.customerPurser);
$("input[name='taxRate']").val(data.taxRate);
$("input[name='confirmFax']").val(data.confirmTax);
$("#commonCurrency_add").val(data.commonCurrency).trigger('change');
commonCurrency = $("#commonCurrency_edit option:selected").val();
console.log("commonCurrency",commonCurrency);
});
$('#customerContact_edit').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='contactPost']").val(data.customerPosition);
$("input[name='contactNumber']").val(data.cellPhone);
$("input[name='contactEmail']").val(data.commonEmail);
});
$('#customerDelivery_edit').on('select2:select', function (e) {
var data1 = e.params.data;
$("input[name='deliveryPhone']").val(data1.customerPhone);
$("input[name='deliveryAddress']").val(data1.deliveryAddress);
});
function queryParams(params) {
var curParams = {
// 传递参数查询参数
pageSize: params.limit,
pageNum: params.offset / params.limit + 1,
quoteId: sysSalesOrderCode
};
return curParams;
}
function binessMembers(){
function getBusinessMembers(){
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
var userData = res.rows;
for (let i in userData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
"<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
@ -510,16 +490,12 @@
function submitHandler() {
var taskId = [[${taskId}]];
if ($.validate.form()) {
$("select[name='salesOrderType']").removeAttr("disabled");
$("#selectEngineer").removeAttr("disabled");
$("#commonCurrency_edit").removeAttr("disabled");
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
var tableData = $("#bootstrap-sub-table-editOrder1").bootstrapTable('getData');
$("input[name= 'salesOrderChildList']").val(JSON.stringify(tableData));
var formData = $("#form-ywjl-audit").serialize();
console.log("$(\"#form-ywjl-audit\").serialize()",formData);
$.operate.save(prefix + "/complete/" + taskId,formData);
}
}

79
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskYwzgVerify.html

@ -313,7 +313,10 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]];
var sysSalesOrderCode = [[${formData.salesOrderCode}]];
var customerContact = [[${formData.customerContact}]];
var customerDelivery = [[${formData.customerDelivery}]];
var enterpriseCode = [[${formData.enterpriseCode}]];
$("#form-ywzg-audit").validate({focusCleanup: true});
$(function() {
var options = {
@ -370,6 +373,9 @@
],
};
$.table.init(options);
getBusinessMembers();
});
function customerInit(){
$.ajax({
type: "post",
url:ctx + "system/customer/customerList",
@ -431,19 +437,7 @@
}
},
});
binessMembers();
getTotalAmount();
});
$('#enterpriseCode_edit').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='enterpriseName']").val(data.enterpriseName);
$("input[name='customerPurser']").val(data.customerPurser);
$("input[name='taxRate']").val(data.taxRate);
$("input[name='confirmFax']").val(data.confirmTax);
$("#commonCurrency_add").val(data.commonCurrency).trigger('change');
commonCurrency = $("#commonCurrency_edit option:selected").val();
console.log("commonCurrency",commonCurrency);
});
}
$('#customerContact_edit').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='contactPost']").val(data.customerPosition);
@ -464,17 +458,17 @@
};
return curParams;
}
function binessMembers(){
function getBusinessMembers(){
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
var userData = res.rows;
for (let i in userData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
"<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
@ -482,55 +476,6 @@
}
});
}
function doSubmit(index, layero,uniqueId){
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData:"+rowData);
var totalNum = $("#bootstrap-select-table").bootstrapTable('getData').length;
var commonCurrency1 = $("#commonCurrency_edit option:selected").val();
var rmbRateInput = parseFloat($("#rmbTax_detail").val()) || 0;
var rmbRate = rmbRateInput / 100;
rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数
var usdRate = parseFloat($("#usdTax_edit").val()) || 0;
$("#bootstrap-sub-table-editOrder2").bootstrapTable('insertRow', {
index: 1,
row: {
id:'',
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:rmbRateInput,
usdTax: usdRate,
materialSole: rowData.materialSole,
materialNum: 0,
materialNoRmb: 0.0,
materialNoUsd: 0.0,
materialRmb: 0.0,
materialNoRmbSum: 0.0,
materialRmbSum: 0,
materialUsd: 0.0,
materialUsdSum: 0.0,
materialNoUsdSum: 0.0,
remark: "",
}
})
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(index){
$("#bootstrap-sub-table-editOrder2").bootstrapTable('remove', {

88
ruoyi-admin/src/main/resources/templates/system/salesOrder/taskZozjVerify.html

@ -315,7 +315,10 @@
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysSalesOrderCode = [[${formData.sysSalesOrderCode}]];
var sysSalesOrderCode = [[${formData.salesOrderCode}]];
var customerContact = [[${formData.customerContact}]];
var customerDelivery = [[${formData.customerDelivery}]];
var enterpriseCode = [[${formData.enterpriseCode}]];
$(function() {
var options = {
id:'bootstrap-sub-table-editOrder3',
@ -371,6 +374,9 @@
],
};
$.table.init(options);
getBusinessMembers();
});
function customerInit(){
$.ajax({
type: "post",
url:ctx + "system/customer/customerList",
@ -384,7 +390,7 @@
$("#form-ywzg-audit select[name='enterpriseCode']").append(
"<option value='" + result[i].enterpriseCode + "'>" + result[i].enterpriseCode + "</option>");
}
$("#form-ywzg-audit select[name='enterpriseCode']").val(sysSalesOrder.enterpriseCode).trigger("change");
$("#form-ywzg-audit select[name='enterpriseCode']").val(enterpriseCode).trigger("change");
} else {
$.modal.msgError(res.msg);
}
@ -406,7 +412,7 @@
$("#form-ywzg-audit select[name='customerDelivery']").append(
"<option value='" + result[i].customerName + "'>" + result[i].customerName + "</option>");
}
$("#form-ywzg-audit select[name='customerDelivery']").val(sysSalesOrder.customerDelivery).trigger()
$("#form-ywzg-audit select[name='customerDelivery']").val(customerDelivery).trigger()
}
}
});
@ -417,7 +423,7 @@
delay:250,
cache:true,
data:{
enterpriseCode:sysSalesOrder.enterpriseCode,
enterpriseCode:enterpriseCode,
},
success: function (res, params) {
if (res.rows.length > 0) {
@ -426,15 +432,13 @@
$("#form-ywzg-audit select[name='customerContact']").append(
"<option value='" + result[i].customerName + "'>" + result[i].customerName + "</option>");
}
$("#form-ywzg-audit select[name='customerContact']").val(sysSalesOrder.customerContact).trigger("change");
$("#form-ywzg-audit select[name='customerContact']").val(customerContact).trigger("change");
} else {
$.modal.msgError(res.msg);
}
},
});
binessMembers();
getTotalAmount();
});
}
$('#enterpriseCode_edit').on('select2:select', function (e) {
var data = e.params.data;
$("input[name='enterpriseName']").val(data.enterpriseName);
@ -465,17 +469,17 @@
};
return curParams;
}
function binessMembers(){
function getBusinessMembers(){
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
var userData = res.rows;
for (let i in userData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
"<option value='" + userData[i].userName + "'>" + userData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
@ -483,62 +487,6 @@
}
});
}
function doSubmit(index, layero,uniqueId){
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData:"+rowData);
var totalNum = $("#bootstrap-select-table").bootstrapTable('getData').length;
var commonCurrency1 = $("#commonCurrency_edit option:selected").val();
var rmbRateInput = parseFloat($("#rmbTax_detail").val()) || 0;
var rmbRate = rmbRateInput / 100;
rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数
var usdRate = parseFloat($("#usdTax_edit").val()) || 0;
$("#bootstrap-sub-table-editOrder3").bootstrapTable('insertRow', {
index: 1,
row: {
id:'',
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:rmbRateInput,
usdTax: usdRate,
materialSole: rowData.materialSole,
materialNum: 0,
materialNoRmb: 0.0,
materialNoUsd: 0.0,
materialRmb: 0.0,
materialNoRmbSum: 0.0,
materialRmbSum: 0,
materialUsd: 0.0,
materialUsdSum: 0.0,
materialNoUsdSum: 0.0,
remark: "",
}
})
layer.close(index);
}
function insertRow() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
/* 删除指定表格行 */
function removeRow(index){
$("#bootstrap-sub-table-editOrder3").bootstrapTable('remove', {
field: 'index',
value: index
})
}
$("input[name='pricingDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
@ -567,10 +515,8 @@
}
var tableData = $("#bootstrap-sub-table-editOrder3").bootstrapTable('getData');
$("input[name= 'salesOrderChildList']").val(JSON.stringify(tableData));
var formData = $("#form-zozj-audit").serialize();
console.log("$(\"#form-zozj-audit\").serialize()",formData);
var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, formData);
$.operate.save(prefix + "/complete/" + taskId, $("#form-zozj-audit").serialize());
}
}

Loading…
Cancel
Save