Browse Source
新增 销售订单发货前端页面 新增销售订单修改保存后端发货接口 新增 通过销售订单号查询销售订单子表后端接口 新增 根据销售单号和物料号更新销售单子表数据后端接口 新增 通过销售订单号查询销售订单子表后端接口 新增 销售发货的同时 生成仓库出库单后端接口 新增 销售发货的同时 生成仓库出库单明细后端接口 新增 销售发货的同时生成销售出货通知单列表后端接口dev
liuxiaoxu
5 months ago
14 changed files with 597 additions and 7 deletions
@ -0,0 +1,231 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('销售订单出货')" /> |
|||
<th:block th:include="include :: datetimepicker-css" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-salesDeliverGoods-edit" th:object="${sysSalesOrder}"> |
|||
<input name="salesOrderId" th:field="*{salesOrderId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">订单类型:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="salesOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}" disabled> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{salesOrderType}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">销售单号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">申请人员:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="applyUser" th:field="*{applyUser}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- <div class="form-group">--> |
|||
<!-- <label class="col-sm-3 control-label">出库类型:</label>--> |
|||
<!-- <div class="col-sm-8">--> |
|||
<!-- <select name="warehouseOutType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_out_type')}" disabled>--> |
|||
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{warehouseOutType}"></option>--> |
|||
<!-- </select>--> |
|||
<!-- </div>--> |
|||
<!-- </div>--> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户ID:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">客户名称:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" readonly> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">收货联系人:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="customerDelivery" th:field="*{customerDelivery}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">收货电话:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="deliveryPhone" th:field="*{deliveryPhone}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">收货地址:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="deliveryAddress" th:field="*{deliveryAddress}" class="form-control" type="text" disabled> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">备注:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="remark" th:field="*{remark}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
<!--物料信息--> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<th:block th:include="include :: datetimepicker-js" /> |
|||
<!--用于可以修改列表字段的插件--> |
|||
<th:block th:include="include :: bootstrap-table-editable-js" /> |
|||
<script th:inline="javascript"> |
|||
|
|||
var sysSalesOrder = [[${sysSalesOrder}]]; |
|||
|
|||
var prefix = ctx + "system/salesOrder"; |
|||
$("#form-salesDeliverGoods-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
// 新增提交 |
|||
function submitHandler() { |
|||
// 获取表单数据 |
|||
const salesOrderData = $("#form-salesDeliverGoods-edit").serializeArray().reduce((obj, item) => { |
|||
obj[item.name] = item.value; |
|||
return obj; |
|||
}, {}); |
|||
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据 |
|||
var table = $('#bootstrap-table').bootstrapTable('getData'); |
|||
|
|||
// 将表数据转换成与complaintNoticeData格式一致的数组 |
|||
var materialDataList = table.map(function(item) { |
|||
// 根据实际字段名调整 |
|||
return { |
|||
"id":item.id, |
|||
"materialCode": item.materialCode, |
|||
"materialName": item.materialName, |
|||
"materialType": item.materialType, |
|||
"describe": item.describe, |
|||
"unit": item.unit, |
|||
"brand": item.brand, |
|||
"processMethod": item.processMethod, |
|||
"materialNum": item.materialNum, |
|||
"finishNum": item.finishNum, |
|||
"hasApplyShippingNum": item.hasApplyShippingNum, |
|||
"outBoundQuantity": item.outBoundQuantity, |
|||
"applyShippingNum": item.applyShippingNum, |
|||
// ...其他字段 |
|||
}; |
|||
}); |
|||
|
|||
const combinedData = Object.assign({}, salesOrderData, { |
|||
sysSalesOrderChildList: materialDataList, |
|||
}); |
|||
// 合并表单数据和表格数据 |
|||
console.log(combinedData) |
|||
// 使用 JSON.stringify() 序列化数据 |
|||
const jsonData = JSON.stringify(combinedData); |
|||
// 发送 AJAX 请求到后端接口 |
|||
$.operate.saveJson(prefix + "/salesDeliverGoods", jsonData); |
|||
} |
|||
|
|||
//物料信息展示列表 |
|||
$(function() { |
|||
var options = { |
|||
modalName: "选择物料", |
|||
url: prefix + "/salesDeliverGoodsDetailList", |
|||
queryParams: queryParams, |
|||
showSearch: false, |
|||
showRefresh: false, |
|||
showToggle: false, |
|||
showColumns: false, |
|||
pagination: false, // 设置不分页 |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
title: '销售订单详情ID', |
|||
field: 'id', |
|||
visible: false |
|||
}, |
|||
{ |
|||
title: '料号', |
|||
field: 'materialCode', |
|||
}, |
|||
{ |
|||
title: '图片', |
|||
field: 'photoUrl', |
|||
}, |
|||
{ |
|||
title: '物料名称', |
|||
field: 'materialName', |
|||
}, |
|||
{ |
|||
title: '物料类型', |
|||
field: 'materialType', |
|||
}, |
|||
{ |
|||
title: '描述', |
|||
field: 'describe', |
|||
}, |
|||
{ |
|||
title: '单位', |
|||
field: 'unit', |
|||
}, |
|||
{ |
|||
title: '品牌', |
|||
field: 'brand', |
|||
}, |
|||
|
|||
{ |
|||
title: '加工方式', |
|||
field: 'processMethod', |
|||
}, |
|||
{ |
|||
title: '订单数量', |
|||
field: 'materialNum', |
|||
}, |
|||
{ |
|||
title: '已完成数', |
|||
field: 'finishNum', |
|||
|
|||
}, |
|||
{ |
|||
title: '已申请出货数', |
|||
field: 'hasApplyShippingNum', |
|||
|
|||
}, |
|||
{ |
|||
title: '已出库数', |
|||
field: 'outBoundQuantity', |
|||
}, |
|||
{ |
|||
title: '申请出货数', |
|||
field: 'applyShippingNum', |
|||
editable:true, |
|||
}, |
|||
] |
|||
}; |
|||
$.table.init(options); |
|||
}) |
|||
|
|||
function queryParams(params) { |
|||
var curParams = { |
|||
// 传递参数查询参数 |
|||
salesOrderCode: sysSalesOrder.salesOrderCode |
|||
}; |
|||
return curParams; |
|||
} |
|||
|
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue