|
@@ -109,7 +109,7 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
|
|
|
@Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("排产单"))
|
|
@Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("排产单"))
|
|
|
@{
|
|
@{
|
|
|
var inputs = new List<InputViewModel>
|
|
var inputs = new List<InputViewModel>
|
|
|
- {
|
|
|
|
|
|
|
+ {
|
|
|
new InputViewModel("id", hide:true),
|
|
new InputViewModel("id", hide:true),
|
|
|
new InputViewModel("productionOrderNo",displayName:"流转单编号").SetOuterBefore("<div class=\"type2\">"),
|
|
new InputViewModel("productionOrderNo",displayName:"流转单编号").SetOuterBefore("<div class=\"type2\">"),
|
|
|
new InputViewModel("semiProductNo", displayName: "半成品编码").SetSearchIcon("query_semiProduct_modal","#modal"),
|
|
new InputViewModel("semiProductNo", displayName: "半成品编码").SetSearchIcon("query_semiProduct_modal","#modal"),
|
|
@@ -142,6 +142,27 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <div class="modal fade" id="changeTypeModal" role="dialog" tabindex="-1" aria-labelledby="ModalLabel" aria-hidden="true">
|
|
|
|
|
+ <div class="modal-dialog modal-dialog-centered" role="document">
|
|
|
|
|
+ <div class="modal-content">
|
|
|
|
|
+ @Html.Partial("Modals/_ModalHeader", new ModalHeaderViewModel("变更排产单类型", ""))
|
|
|
|
|
+ @{
|
|
|
|
|
+
|
|
|
|
|
+ var inputs3 = new List<InputViewModel>
|
|
|
|
|
+ {
|
|
|
|
|
+ //new InputViewModel("currentProductStoreHouseNo", hide:true),
|
|
|
|
|
+ new InputViewModel("id", hide:true),
|
|
|
|
|
+ new InputViewModel("productionOrderNo", displayName: "流转单号"),
|
|
|
|
|
+ new InputViewModel("productionType",InputTypes.List, "排产单类型").SetSelectOptions(productionType),
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+ @Html.Partial("Modals/_ModalBody", new ModalBodyViewModel(inputs3))
|
|
|
|
|
+ @Html.Partial("Modals/_ModalFooter", "0")
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
</section>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -172,6 +193,7 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
|
|
|
//showHours: true,
|
|
//showHours: true,
|
|
|
//minuteStep: 10
|
|
//minuteStep: 10
|
|
|
};
|
|
};
|
|
|
|
|
+ var isUpdate
|
|
|
$(function () {
|
|
$(function () {
|
|
|
//$("#planProduceDate").datetimepicker(datePickerOpt).on('show',
|
|
//$("#planProduceDate").datetimepicker(datePickerOpt).on('show',
|
|
|
// function (event) {
|
|
// function (event) {
|
|
@@ -234,8 +256,8 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //$("#productionType").off("change.productionType");
|
|
|
|
|
- $("#productionType").off("change.productionType").on("change.productionType", ChangeProductionType);
|
|
|
|
|
|
|
+ $("#productionType").off("change.productionType");
|
|
|
|
|
+ //$("#productionType").off("change.productionType").on("change.productionType", ChangeProductionType);
|
|
|
if (rows[0].productionOrderStatus === 2) {
|
|
if (rows[0].productionOrderStatus === 2) {
|
|
|
$(".type2").css("display", "none");
|
|
$(".type2").css("display", "none");
|
|
|
} else {
|
|
} else {
|
|
@@ -267,12 +289,13 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
|
|
|
data.surfaceColor = res.surfaceColor;
|
|
data.surfaceColor = res.surfaceColor;
|
|
|
}
|
|
}
|
|
|
let isValidate = rows[0].productionOrderStatus !== 2;
|
|
let isValidate = rows[0].productionOrderStatus !== 2;
|
|
|
|
|
+ data.kgWeight = data.kgWeight == 0 ? "" : data.kgWeight;
|
|
|
BtnUpdate({
|
|
BtnUpdate({
|
|
|
readonly: "semiProductNo",
|
|
readonly: "semiProductNo",
|
|
|
data: data,
|
|
data: data,
|
|
|
isValidate: isValidate,
|
|
isValidate: isValidate,
|
|
|
disabled:
|
|
disabled:
|
|
|
- "productionOrderNo,model,material,rigidity,surfaceColor,partNo,timeCreated"
|
|
|
|
|
|
|
+ "productionOrderNo,model,material,rigidity,surfaceColor,productionType,partNo,timeCreated"
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
@@ -323,6 +346,7 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#Tool1").append(
|
|
$("#Tool1").append(
|
|
|
|
|
+ '<button type="button" class="btn btn-default menu-btn" onclick="f_changeOrderType()"><i class="iconfont icon-model"></i>修改排产单类型</button>'+
|
|
|
'<div class="tool-radio"><input name="proType" type="radio" id="allProduction" checked value=""/><label for="allProduction">全部</label></div>' +
|
|
'<div class="tool-radio"><input name="proType" type="radio" id="allProduction" checked value=""/><label for="allProduction">全部</label></div>' +
|
|
|
'<div class="tool-radio"><input name="proType" type="radio" id="machineShop" value="0"/><label for="machineShop">车间加工</label></div>' +
|
|
'<div class="tool-radio"><input name="proType" type="radio" id="machineShop" value="0"/><label for="machineShop">车间加工</label></div>' +
|
|
|
'<div class="tool-radio"><input name="proType" type="radio" id="outFinish" value="1"/><label for="outFinish">外购成品</label></div>' +
|
|
'<div class="tool-radio"><input name="proType" type="radio" id="outFinish" value="1"/><label for="outFinish">外购成品</label></div>' +
|
|
@@ -433,11 +457,31 @@ new SelectListItem{Text = @"去料加工",Value = "2"},
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
|
-
|
|
|
|
|
- function ChangeProductionType() {
|
|
|
|
|
|
|
+ function f_changeOrderType() {
|
|
|
|
|
+ var rows = config.table.bootstrapTable("getSelections");
|
|
|
|
|
+ if (rows.length === 1) {
|
|
|
|
|
+ if (rows[0].isLock == 'Y') {
|
|
|
|
|
+ abp.message.warn("排产单已删除,不可进行更改!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (rows[0].productionOrderStatus > 1 && rows[0].productionOrderStatus !== 7) {
|
|
|
|
|
+ abp.message.warn("排产单已审核或者生产入库,不可进行更改!");
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ var data = rows[0];
|
|
|
|
|
+ OpenModal(window.appUrl + "ProductionOrders/UpdateProductionType",
|
|
|
|
|
+ {
|
|
|
|
|
+ data: data,
|
|
|
|
|
+ modal: $("#changeTypeModal"),
|
|
|
|
|
+ disabled:"productionOrderNo",
|
|
|
|
|
+ success: function () { $("#changeTypeModal").modal("hide"); RefreshTable(); }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ function ChangeProductionType() {
|
|
|
var type = $("#productionType").val();
|
|
var type = $("#productionType").val();
|
|
|
abp.ajax({
|
|
abp.ajax({
|
|
|
- url: window.appUrl + 'ProductionOrders/GetNewProductionOrderNo?isOutsourcing=' + type,
|
|
|
|
|
|
|
+ url: window.appUrl + 'ProductionOrders/GetNewProductionOrderNo?isOutsourcing=' + type,
|
|
|
async: true,
|
|
async: true,
|
|
|
type: "Post",
|
|
type: "Post",
|
|
|
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
|
|
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
|