任务编辑完善
This commit is contained in:
parent
d2306a41a5
commit
eaf166c99c
|
|
@ -26,6 +26,9 @@ public class BusiSubTask extends BaseEntity
|
||||||
@Excel(name = "产品需求ID")
|
@Excel(name = "产品需求ID")
|
||||||
private String productRequireId;
|
private String productRequireId;
|
||||||
|
|
||||||
|
private String size;
|
||||||
|
private String color;
|
||||||
|
|
||||||
/** 目标数量 */
|
/** 目标数量 */
|
||||||
@Excel(name = "目标数量")
|
@Excel(name = "目标数量")
|
||||||
private Long targetAmount;
|
private Long targetAmount;
|
||||||
|
|
@ -38,7 +41,24 @@ public class BusiSubTask extends BaseEntity
|
||||||
@Excel(name = "完成状态")
|
@Excel(name = "完成状态")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
|
public String getSize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSize(String size) {
|
||||||
|
this.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getColor() {
|
||||||
|
return color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setColor(String color) {
|
||||||
|
this.color = color;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="id" column="sub_id" />
|
<result property="id" column="sub_id" />
|
||||||
<result property="taskId" column="sub_task_id" />
|
<result property="taskId" column="sub_task_id" />
|
||||||
<result property="productRequireId" column="sub_product_require_id" />
|
<result property="productRequireId" column="sub_product_require_id" />
|
||||||
|
<result property="size" column="sub_size" />
|
||||||
|
<result property="color" column="sub_color" />
|
||||||
<result property="targetAmount" column="sub_target_amount" />
|
<result property="targetAmount" column="sub_target_amount" />
|
||||||
<result property="completedAmount" column="sub_completed_amount" />
|
<result property="completedAmount" column="sub_completed_amount" />
|
||||||
<result property="createBy" column="sub_create_by" />
|
<result property="createBy" column="sub_create_by" />
|
||||||
|
|
@ -51,10 +53,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBusiTaskById" parameterType="String" resultMap="BusiTaskBusiSubTaskResult">
|
<select id="selectBusiTaskById" parameterType="String" resultMap="BusiTaskBusiSubTaskResult">
|
||||||
select a.id, a.order_id, a.prison_line_id, a.task_name, a.create_by, a.create_time, a.update_by, a.update_time, a.status,
|
select a.id, a.order_id,bpl.disname line_name,bo.order_name, a.prison_line_id, a.task_name, a.create_by, a.create_time, a.update_by, a.update_time, a.status,
|
||||||
b.id as sub_id, b.task_id as sub_task_id, b.product_require_id as sub_product_require_id, b.target_amount as sub_target_amount, b.completed_amount as sub_completed_amount, b.create_by as sub_create_by, b.create_time as sub_create_time, b.status as sub_status
|
b.id as sub_id, b.task_id as sub_task_id, b.product_require_id as sub_product_require_id, b.target_amount as sub_target_amount, b.completed_amount as sub_completed_amount,
|
||||||
|
bpr.color as sub_color,bpr.size as sub_size,b.create_by as sub_create_by, b.create_time as sub_create_time, b.status as sub_status
|
||||||
from busi_task a
|
from busi_task a
|
||||||
|
LEFT JOIN busi_order bo on a.order_id = bo.id
|
||||||
|
LEFT JOIN busi_prison_line bpl on a.prison_line_id = bpl.id
|
||||||
left join busi_sub_task b on b.task_id = a.id
|
left join busi_sub_task b on b.task_id = a.id
|
||||||
|
LEFT JOIN busi_product_require bpr on bpr.id = b.product_require_id
|
||||||
where a.id = #{id}
|
where a.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,17 @@
|
||||||
<h4 class="form-header h4">生产任务信息</h4>
|
<h4 class="form-header h4">生产任务信息</h4>
|
||||||
<input name="id" th:field="*{id}" type="hidden">
|
<input name="id" th:field="*{id}" type="hidden">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">订单ID:</label>
|
<label class="col-sm-3 control-label is-required">订单:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="orderId" th:field="*{orderId}" class="form-control" type="text" required>
|
<input name="orderId" th:field="*{orderId}" class="form-control" type="hidden" >
|
||||||
|
<input th:field="*{orderName}" class="form-control" type="text" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-3 control-label is-required">产线ID:</label>
|
<label class="col-sm-3 control-label is-required">产线:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<input name="prisonLineId" th:field="*{prisonLineId}" class="form-control" type="text" required>
|
<input name="prisonLineId" th:field="*{prisonLineId}" class="form-control" type="hidden" >
|
||||||
|
<input th:field="*{lineName}" class="form-control" type="text" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -39,6 +41,8 @@
|
||||||
<th:block th:include="include :: footer" />
|
<th:block th:include="include :: footer" />
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
var prefix = ctx + "busi/task";
|
var prefix = ctx + "busi/task";
|
||||||
|
var sizeDatas = [[${@dict.getType('busi_size')}]];
|
||||||
|
var colorDatas = [[${@dict.getType('busi_color')}]];
|
||||||
$("#form-task-edit").validate({
|
$("#form-task-edit").validate({
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
|
@ -71,42 +75,36 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'productRequireId',
|
field: 'size',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '产品需求ID',
|
title: '尺码',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='busiSubTaskList[%s].productRequireId' value='%s'>", index, value);
|
var productRequireIdHtml = $.common.sprintf("<input class='form-control' type='hidden' name='busiSubTaskList[%s].productRequireId' value='%s'>", index, value);
|
||||||
return html;
|
var sizeHtml = $.table.selectDictLabel(sizeDatas, value);
|
||||||
|
return productRequireIdHtml+sizeHtml;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'color',
|
||||||
|
align: 'center',
|
||||||
|
title: '颜色',
|
||||||
|
formatter: function(value, row, index) {
|
||||||
|
var completedAmountHtml = $.common.sprintf("<input class='form-control' type='hidden' name='busiSubTaskList[%s].completedAmount' value='%s'>", index, value);
|
||||||
|
var statusHtml = $.common.sprintf("<input class='form-control' type='hidden' name='busiSubTaskList[%s].status' value='%s'>", index, value);
|
||||||
|
var colorHtml = $.table.selectDictLabel(colorDatas, value);
|
||||||
|
return completedAmountHtml+statusHtml+colorHtml;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'targetAmount',
|
field: 'targetAmount',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
title: '目标数量',
|
title: '目标数量',
|
||||||
formatter: function(value, row, index) {
|
formatter: function(value, row, index) {
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='busiSubTaskList[%s].targetAmount' value='%s'>", index, value);
|
var html = $.common.sprintf("<input class='form-control digits' type='text' name='busiSubTaskList[%s].targetAmount' value='%s' required>", index, value);
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
}]
|
||||||
{
|
|
||||||
field: 'completedAmount',
|
|
||||||
align: 'center',
|
|
||||||
title: '完成数量',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='busiSubTaskList[%s].completedAmount' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'status',
|
|
||||||
align: 'center',
|
|
||||||
title: '完成状态',
|
|
||||||
formatter: function(value, row, index) {
|
|
||||||
var html = $.common.sprintf("<input class='form-control' type='text' name='busiSubTaskList[%s].status' value='%s'>", index, value);
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
|
|
||||||
}]
|
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,13 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label>订单选择:</label>
|
<label>订单选择:</label>
|
||||||
<input type="text" name="orderId"/>
|
<input id="treeId" name="orderId" type="text" style="display: none;">
|
||||||
|
<input id="treeName" type="text" onclick="selectOrder()" readonly>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>产线选择:</label>
|
<label>产线选择:</label>
|
||||||
<input type="text" name="prisonLineId"/>
|
<input id="lineTreeId" name="prisonLineId" type="text" style="display: none;" />
|
||||||
|
<input type="text" onclick="selectPrisonLineTree()" id="lineTreeName" readonly>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label>任务名称:</label>
|
<label>任务名称:</label>
|
||||||
|
|
@ -120,6 +122,39 @@
|
||||||
};
|
};
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
});
|
});
|
||||||
|
/*订单选择*/
|
||||||
|
function selectOrder() {
|
||||||
|
var options = {
|
||||||
|
title: '选择订单',
|
||||||
|
width: "380",
|
||||||
|
height: "400",
|
||||||
|
url: ctx + "busi/order/selectOrder/" ,
|
||||||
|
callBack: function(index, layero){
|
||||||
|
var body = $.modal.getChildFrame(index);
|
||||||
|
$("#treeId").val(body.find('#treeId').val());
|
||||||
|
$("#treeName").val(body.find('#treeName').val());
|
||||||
|
$.modal.close(index);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*监区产线-新增-选择父监区产线树*/
|
||||||
|
function selectPrisonLineTree() {
|
||||||
|
var options = {
|
||||||
|
title: '监区产线选择',
|
||||||
|
width: "380",
|
||||||
|
url: ctx + "busi/prisonLine/selectPrisonLineTree/" + $("#lineTreeId").val(),
|
||||||
|
callBack: function(index, layer){
|
||||||
|
var body = $.modal.getChildFrame(index);
|
||||||
|
console.log(body);
|
||||||
|
$("#lineTreeId").val(body.find('#treeId').val());
|
||||||
|
$("#lineTreeName").val(body.find('#treeName').val());
|
||||||
|
$.modal.close(index);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$.modal.openOptions(options);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
Reference in New Issue