散料入库

This commit is contained in:
zgf committed 2023-08-23 04:10:59 +08:00
1 parent 630e33a27a
commit 2097bffabb
6 files changed
+387 -246

No files matched your search

+4 -4
View File
@@ -154,7 +154,7 @@ namespace HHWMS.Web
var taskfromlocatioin = _unitwork.FindSingle<Location>(x => x.Code.Equals(task.FromLocation)); var taskfromlocatioin = _unitwork.FindSingle<Location>(x => x.Code.Equals(task.FromLocation));
switch (task.TaskType) switch (task.TaskType)
{ {
case TaskTypeEnum.料盒入库: case TaskTypeEnum.盘料盒入库:
// 更新库位 // 更新库位
// 起始库位为空 // 起始库位为空
// 目标库位为有货 // 目标库位为有货
@@ -163,7 +163,7 @@ namespace HHWMS.Web
// 测试 创建料盒出库任务 // 测试 创建料盒出库任务
newTask.ZoneCode = "L"; newTask.ZoneCode = "L";
newTask.TaskNo = _unitwork.GetSerialNumber("out", 4); newTask.TaskNo = _unitwork.GetSerialNumber("out", 4);
newTask.TaskType = TaskTypeEnum.料盒出库; newTask.TaskType = TaskTypeEnum.盘料盒出库;
newTask.ContainerCode = task.FromLocation; newTask.ContainerCode = task.FromLocation;
newTask.FromLocation = task.ToLocation; newTask.FromLocation = task.ToLocation;
newTask.ToLocation = task.FromLocation; newTask.ToLocation = task.FromLocation;
@@ -171,7 +171,7 @@ namespace HHWMS.Web
//newTask.Station = task.Station; //newTask.Station = task.Station;
_unitwork.Add(newTask); _unitwork.Add(newTask);
break; break;
case TaskTypeEnum.料盒出库: case TaskTypeEnum.盘料盒出库:
// 更新库位 // 更新库位
// 起始库位为空 // 起始库位为空
// 目标库位为有货 // 目标库位为有货
@@ -218,7 +218,7 @@ namespace HHWMS.Web
var fromL = _unitwork.FindSingle<Location>(x => x.Row.Equals(tasktolocatioin.Row) && x.Type == "G1"); var fromL = _unitwork.FindSingle<Location>(x => x.Row.Equals(tasktolocatioin.Row) && x.Type == "G1");
newTask.ZoneCode = "L"; newTask.ZoneCode = "L";
newTask.TaskNo = _unitwork.GetSerialNumber("in", 4); newTask.TaskNo = _unitwork.GetSerialNumber("in", 4);
newTask.TaskType = TaskTypeEnum.料盒入库; newTask.TaskType = TaskTypeEnum.盘料盒入库;
newTask.ContainerCode = fromL.Code; newTask.ContainerCode = fromL.Code;
newTask.FromLocation = fromL.Code; newTask.FromLocation = fromL.Code;
newTask.ToLocation = "L01-01-19-01"; newTask.ToLocation = "L01-01-19-01";
@@ -1,35 +1,91 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System; using System;
using System.Linq;
using HHWMS.Web.Models;
using Microsoft.AspNetCore.Mvc;
using WalkingTec.Mvvm.Core; using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Mvc; using WalkingTec.Mvvm.Mvc;
using WalkingTec.Mvvm.Core.Extensions;
using HHWMS.Web;
using HHWMS.Web.Models;
using Microsoft.EntityFrameworkCore;
using System.Linq;
using Newtonsoft.Json;
using System.Collections.Generic;
namespace HHWMS.Web.Controllers namespace HHWMS.Web.Controllers;
[Area("receipt")]
[ActionDescription("散料操作")]
public class ReceiptSLInController : BaseController
{ {
[Area("receipt")] private readonly IUnitWork _unitWork;
[ActionDescription("散料操作")]
public partial class ReceiptSLInController : BaseController public ReceiptSLInController(IUnitWork unitWork)
{ {
private readonly IUnitWork _unitwork; _unitWork = unitWork;
public ReceiptSLInController(IUnitWork unitwork) }
{
_unitwork = unitwork;
}
#region Search
[ActionDescription("Sys.Search")]
public ActionResult Index()
{
return PartialView("Index");
}
#endregion #region Search
[ActionDescription("Sys.Search")]
public ActionResult Index()
{
return PartialView("Index");
}
#endregion
[HttpPost]
public ActionResult CallBox()
{
// 查询站台占用
var stations = _unitWork.Find<Location>(x => (x.Code == StationCode.散料库左抽屉
|| x.Code == StationCode.散料库右抽屉)
&& x.Status != LocationStatus.任务锁).ToList();
if (stations.Count == 0) return JsonMore(null, 500, "无可用站台!");
// 查找没任务的仓位,分两边查,那边站台能用 查哪边
var box = _unitWork.Find<Location>(x => (x.ZoneCode == ZoneCodeEnum.散料库)
& (x.Status != LocationStatus.任务锁)
&& x.Status != LocationStatus.满货
&& x.Status != LocationStatus.空仓位
&& x.Row == stations.First().Row).FirstOrDefault();
if (box == null && stations.Count == 2)
box = _unitWork.Find<Location>(x => (x.ZoneCode == ZoneCodeEnum.散料库)
& (x.Status != LocationStatus.任务锁)
&& x.Status != LocationStatus.满货
&& x.Status != LocationStatus.空仓位
&& x.Row == stations.Last().Row).FirstOrDefault();
if (box == null) return JsonMore(null, 500, "库内没有可用散料箱!");
var toLocation = box.Row == 1 ? StationCode.散料库右抽屉 : StationCode.散料库左抽屉;
// 创建任务
var task = new TaskHeader
{
ZoneCode = ZoneCodeEnum.散料库,
TaskNo = _unitWork.GetSerialNumber("SOut"),
TaskType = TaskTypeEnum.散料盒出库,
ContainerCode = box.ContainerCode,
FromLocation = box.Code,
ToLocation = toLocation,
Status = TaskStatusEnum.新建,
CreateTime = DateTime.Now,
CreateBy = Wtm.LoginUserInfo.ITCode
};
_unitWork.Add(task);
return JsonMore(null);
}
/// <summary>
/// 扫描唯一码,并验证,返回入库单明细
/// </summary>
/// <param name="uniqueCode"></param>
/// <returns></returns>
[HttpPost]
public ActionResult ScanUniqueCode(string uniqueCode)
{
var receiptDetail = _unitWork.FindSingle<ReceiptDetail>(x => x.UniqueCode.Equals(uniqueCode));
if (receiptDetail != null)
{
if (receiptDetail.Status == ReceiptStatusEnum.收完)
{
return JsonMore(null, 500, $"{uniqueCode}已绑定,无需重新绑定!");
}
return JsonMore(receiptDetail);
}
return JsonMore(null, 500, $"{uniqueCode}不存在!");
} }
} }
@@ -1,131 +1,156 @@
<el-row id="slapp" :gutter="20"> <el-row id="slapp">
<el-col :span="6"> <el-card class="box-card" :span="16">
<el-card class="box-card" :span="8"> <el-form ref="form" :model="form" label-width="100px">
<el-select v-model="value" clearable filterable placeholder="请选择单据" size="big" style="width:100%" <el-row>
@@change="changeselect" @@clear="clearReceipt"> <el-col :span="16">
<el-option v-for="item in options" <el-form-item label="散料盒编码">
:key="item.value" <el-input v-model="form.code"
:label="item.label" placeholder="请扫描散料盒编码">
:value="item.value"> </el-input>
</el-option> </el-form-item>
</el-select> </el-col>
<el-col :span="6">
<el-table :data="tableData" height="700" border <el-form-item style="float: left">
style="width: 100%"> <el-button type="primary" @@click="callBox">呼叫料盒</el-button>
<el-table-column prop="name" </el-form-item>
label="唯一码" </el-col>
align="center"> </el-row>
<el-form-item label="尺寸" prop="size">
<el-select v-model="form.size"
placeholder="请选择料盘尺寸"
style="width: 100%"
@@change="changeSize"
clearable>
<el-option v-for="item in boxSize"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="唯一码" prop="uniqueCode">
<el-input v-model="form.uniqueCode"
@@change="scanUniqueCode"
ref="uniqueCode">
</el-input>
</el-form-item>
<el-table :data="bindingData" stripe max-height="450" border style="width: 100%">
<el-table-column fixed="left" label="操作" width="120" align="center">
<template slot-scope="scope">
<el-button @@click.native.prevent="deleteRow(scope.$index, bindingData)"
type="text"
size="small">
移除
</el-button>
</template>
</el-table-column>
<el-table-column label="周转箱"
align="center"
prop="boxCode">
</el-table-column>
<el-table-column label="唯一码"
align="center"
prop="uniqueCode">
</el-table-column>
<el-table-column label="数量"
align="center"
prop="qty" v-if="false">
</el-table-column>
<el-table-column label="数量"
align="center"
prop="bindQty">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.bindQty" @@change="handleEdit(scope.$index, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="尺寸"
align="center"
prop="size"
:formatter="sizeFormatter">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> <el-form-item style="float: right">
</el-col> <el-button type="primary" @@click="onSubmit">绑定</el-button>
<el-col :span="18"> <el-button @@click="resetForm('form')">重置</el-button>
<el-card class="box-card" :span="16"> </el-form-item>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> </el-form>
<el-form-item label="单据名称"> </el-card>
<el-input v-model="form.code" readonly></el-input>
</el-form-item>
<el-form-item label="周转箱编码" prop="boxCode">
<el-input v-model="form.boxCode" @@change="scanBox"></el-input>
</el-form-item>
<el-form-item label="料盘尺寸" prop="size">
<el-select v-model="form.size" placeholder="请选择料盘尺寸" style="width:100%" @@change="changeSize" clearable>
<el-option v-for="item in form.boxSize"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="唯一码" prop="uniqueCode">
<el-input v-model="form.uniqueCode" @@change="scanUniqueCode" ref="uniqueCode"></el-input>
</el-form-item>
<el-table :data="bindingData" height="450" border
style="width: 100%">
<el-table-column fixed="left"
label="操作"
width="120"
align="center">
<template slot-scope="scope">
<el-button @@click.native.prevent="deleteRow(scope.$index, bindingData)"
type="text"
size="small">
移除
</el-button>
</template>
</el-table-column>
<el-table-column label="入库单编码" align="center" prop="receiptCode" v-if="false"></el-table-column>
<el-table-column label="周转箱" align="center" prop="boxCode"></el-table-column>
<el-table-column label="索引" align="center" prop="index"></el-table-column>
<el-table-column label="唯一码" align="center" prop="uniqueCode"></el-table-column>
<el-table-column label="料盘尺寸" align="center" prop="size" :formatter="sizeFormatter"></el-table-column>
</el-table>
<el-form-item style="float:right">
<el-button type="primary" @@click="onSubmit">绑定</el-button>
<el-button @@click="resetForm('form')">重置</el-button>
</el-form-item>
</el-form>
</el-card>
</el-col>
</el-row> </el-row>
<script> <script>
var app = new Vue({ var app = new Vue({
el: '#slapp', el: "#slapp",
data() { data() {
var validatePass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请输入周转箱编码'));
}
else if (value == 'M00000001' || value == 'M00000002' || value == 'E00000001' || value == 'E00000002') {
callback();
} else {
callback(new Error('请输入正确周转箱编码'));
}
};
return { return {
form: { form: {
code: '', code: "",
boxCode: '', size: "",
boxSize: [], uniqueCode: "",
size: '',
uniqueCode: ''
}, },
options: [], boxSize: [
value: '', { label: "8mm", value: "8" },
tableData: [], { label: "10mm", value: "10" },
{ label: "16mm", value: "16" },
{ label: "24mm", value: "24" },
{ label: "散料", value: "1" },
],
bindingData: [], bindingData: [],
dataIndex:[], qty: ''
rules: { };
boxCode: [
{ validator: validatePass, trigger: 'blur' }
]
}
}
}, },
mounted: function() { mounted: function () {
// 获取所有单据编码 // 获取所有单据编码
$.ajax({ // $.ajax({
type: "post", // type: "post",
dataType: "json", // dataType: "json",
data:{}, // data:{},
url: "/receipt/ReceiptIn/SelectReceiptCode", // url: "/receipt/ReceiptIn/SelectReceiptCode",
success: function (json) { // success: function (json) {
app.options = json.Data; // app.options = json.Data;
}, // },
error: function (json) { // error: function (json) {
alert("加载失败"); // alert("加载失败");
} // }
}); // });
}, },
methods: { methods: {
callBox() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {},
url: "/receipt/ReceiptSLIn/CallBox",
success: function (json) {
if (json.Code == 200) {
_this.$message({
message: "呼叫成功!",
});
// _this.resetForm('form');
} else {
_this.$message({
message: "呼叫失败!" + json.Msg,
type: "warning",
duration: "10000",
});
}
},
error: function (json) {
_this.$message({
message: "呼叫失败!",
type: "error",
duration: "10000",
});
},
});
},
sizeFormatter(row) { sizeFormatter(row) {
return row.size + 'mm'; var rr = this.boxSize.filter((item) => item.value == row.size)[0].label;
return rr;
}, },
onSubmit() { onSubmit() {
var _this = this; var _this = this;
console.log('submit!'); console.log("submit!");
console.log(this.form); console.log(this.form);
// 提交已绑定数据 // 提交已绑定数据
@@ -137,85 +162,33 @@
success: function (json) { success: function (json) {
if (json.Success) { if (json.Success) {
_this.$message({ _this.$message({
message: '绑定成功!' message: "绑定成功!",
}); });
_this.resetForm('form'); _this.resetForm("form");
} } else {
else{
_this.$message({ _this.$message({
message: '绑定失败!', message: "绑定失败!",
type: 'warning' type: "warning",
duration: "10000",
}); });
} }
}, },
error: function (json) { error: function (json) {
_this.$message({ _this.$message({
message: '绑定失败!', message: "绑定失败!",
type: 'error' type: "error",
duration: "10000",
}); });
} },
}); });
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.form.boxSize = []; this.boxSize = [];
this.bindingData = []; this.bindingData = [];
}, },
clearReceipt() { // 扫描散料箱
this.tableData = []; scanBox(data) {
},
// 选择单据后,查询明细
changeselect(data) {
var _this = this;
_this.form.code = data;
// 调用后台方法,查询单据明细数据
if (data != "") {
$.ajax({
type: "post",
dataType: "json",
data: { Code: data },
url: "/receipt/ReceiptIn/SelectReceipt",
success: function (json) {
_this.tableData = json.Data;
// 对比待绑定列表,删除在其表内的明细
_this.bindingData.forEach(function (item) {
_this.tableData.forEach(function (value, index, arr) {
if (value.name == item.uniqueCode) {
arr.splice(index, 1);
}
});
})
console.log(json.Data);
},
error: function (json) {
_this.$message({
message: '加载单据明细失败!',
type: 'error'
});
}
});
}
},
// 扫描周转箱
scanBox(data){
this.form.size = '';
this.form.boxSize = [];
if (data == "M00000001" || data == "M00000002") {
this.form.boxSize = [{ label: "8mm", value: "8" }]
this.form.size = this.form.boxSize[0].value;
this.dataIndex = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
}
else if (data == "E00000001" || data == "E00000002") {
this.form.boxSize = [{ label: "10mm", value: "10" }, { label: "16mm", value: "16" }, { label: "24mm", value: "24" }];
this.dataIndex = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
}
else {
this.$message({
message: '输入周转箱编码不正确!',
type: 'warning'
});
return;
}
this.$refs.uniqueCode.focus(); this.$refs.uniqueCode.focus();
}, },
// 选择尺寸后 // 选择尺寸后
@@ -224,57 +197,80 @@
}, },
// 扫描唯一码 // 扫描唯一码
scanUniqueCode(data) { scanUniqueCode(data) {
if (this.dataIndex.length == 0) { var _this = this;
// 1. 判断条件
if (this.form.code == "" || this.form.size == "") {
this.$message({ this.$message({
message: '该周转箱已放满!', message: "请先扫描料箱箱编码并选择物料尺寸!",
type: 'warning' type: "warning",
}); });
this.form.uniqueCode = ''; this.form.uniqueCode = "";
return; return;
} }
if (this.form.boxCode == '' || this.form.size == '') { //2. 判断唯一码是否合理,调用后台,并返回唯一码对应的数量
this.$message({ var isExit = this.bindingData.findIndex(function (value) {
message: '请先输入周转箱编码并选择料盘尺寸!', return value.uniqueCode == data;
type: 'warning'
});
this.form.uniqueCode = '';
return;
}
var isExit = this.tableData.findIndex(function (value, index, arr) {
return value.name == data;
}) })
if (isExit == -1) { if (isExit != -1) {
this.$message({ this.$message({
message: '唯一码'+ data + '不正确!', message: '唯一码' + data + '已绑定!',
type: 'warning' type: 'warning'
}); });
this.form.uniqueCode = ''; this.form.uniqueCode = '';
return; return;
} }
// 1.明细减少 $.ajax({
this.tableData.forEach(function (item, index, arr) { type: "post",
if (item.name == data) { dataType: "json",
arr.splice(index, 1); data: { uniqueCode: _this.form.uniqueCode },
} url: "/receipt/ReceiptSLIn/ScanUniqueCode",
success: function (json) {
if (json.Code != 200) {
_this.$message({
message: "扫描失败!" + json.Msg,
type: "warning",
duration: "10000",
});
} else {
// 3.已扫描增加
_this.bindingData.push({
boxCode: _this.form.code,
uniqueCode: data,
qty: json.Data.Qty - json.Data.CompletedQty,
bindQty: json.Data.Qty - json.Data.CompletedQty,
size: _this.form.size,
});
}
},
error: function (json) {
_this.$message({
message: "扫描失败!",
type: "error",
duration: "10000",
});
},
}); });
// 2.已扫描增加
this.bindingData.push({ this.form.uniqueCode = "";
receiptCode: this.form.code,
boxCode: this.form.boxCode,
index: this.dataIndex.shift(),
uniqueCode : data,
size: this.form.size
})
this.form.uniqueCode = '';
}, },
// 删除已绑定行 // 删除已绑定行
deleteRow(index, rows) { deleteRow(index, rows) {
if (this.form.code == rows[index].receiptCode) {
this.tableData.push({ name: rows[index].uniqueCode });
}
this.dataIndex.unshift(rows[index].index);
rows.splice(index, 1); rows.splice(index, 1);
} },
} handleEdit(index, row) {
console.log(index, row, this.bindingData);
if (row.qty < row.bindQty) {
this.$message({
message: "数量不能大于剩余绑定数量!" + row.qty,
type: "warning",
duration: "1000",
});
this.bindingData[index].bindQty = row.qty;
}
else if (row.bindQty <= 0) {
this.bindingData[index].bindQty = row.qty;
}
},
},
}); });
</script> </script>
@@ -42,6 +42,10 @@ namespace HHWMS.Web
{ {
task.ErrorMsg += ex.Message; task.ErrorMsg += ex.Message;
} }
if(task.TaskDetails.Count(x => x.Status == TaskStatusEnum.新建) == 0)
{
task.Status = TaskStatusEnum.已下发;
}
_unitwork.Update(task); _unitwork.Update(task);
} }
@@ -79,8 +83,8 @@ namespace HHWMS.Web
// 根据不同任务类型 创建任务 // 根据不同任务类型 创建任务
switch (task.TaskType) switch (task.TaskType)
{ {
case TaskTypeEnum.料盒入库: case TaskTypeEnum.盘料盒入库:
case TaskTypeEnum.料盒出库: case TaskTypeEnum.盘料盒出库:
var taskInfo = new TaskInfo(); var taskInfo = new TaskInfo();
taskInfo.TaskType = (int)task.TaskType; taskInfo.TaskType = (int)task.TaskType;
taskInfo.TaskId = task.TaskNo; taskInfo.TaskId = task.TaskNo;
+84 -3
View File
@@ -29,13 +29,13 @@ namespace HHWMS.Web.Models
/// 入库任务 /// 入库任务
/// </summary> /// </summary>
[Display(Name = "TaskType.In")] [Display(Name = "TaskType.In")]
料盒入库 = 1, 盘料盒入库 = 1,
/// <summary> /// <summary>
/// 出库任务 /// 出库任务
/// </summary> /// </summary>
[Display(Name = "TaskType.Out")] [Display(Name = "TaskType.Out")]
料盒出库 = 2, 盘料盒出库 = 2,
/// <summary> /// <summary>
/// 盘料入库 /// 盘料入库
@@ -47,7 +47,19 @@ namespace HHWMS.Web.Models
/// 盘料出库 /// 盘料出库
/// </summary> /// </summary>
[Display(Name = "TaskType.POut")] [Display(Name = "TaskType.POut")]
盘料出库 = 4 盘料出库 = 4,
/// <summary>
/// 散料入库
/// </summary>
[Display(Name = "TaskType.SIn")]
散料盒入库 = 5,
/// <summary>
/// 散料出库
/// </summary>
[Display(Name = "TaskType.SOut")]
散料盒出库 = 6
} }
/// <summary> /// <summary>
@@ -145,6 +157,11 @@ namespace HHWMS.Web.Models
/// </summary> /// </summary>
public const string 有货 = "some"; public const string 有货 = "some";
/// <summary>
/// 满货 = "full";
/// </summary>
public const string 满货 = "full";
/// <summary> /// <summary>
/// 空容器 = "emptyContainer" /// 空容器 = "emptyContainer"
/// </summary> /// </summary>
@@ -257,6 +274,70 @@ namespace HHWMS.Web.Models
} }
/// <summary>
/// 区域
/// </summary>
public static class ZoneCodeEnum
{
/// <summary>
/// 盘料库 = "L";
/// </summary>
public const string 盘料库 = "L";
/// <summary>
/// 散料库 = "C";
/// </summary>
public const string 散料库 = "C";
}
/// <summary>
/// 站台类型
/// </summary>
public static class StationCode
{
/// <summary>
/// 散料库左抽屉 = "C02-02-18-02";
/// </summary>
public const string 散料库左抽屉 = "C02-02-18-02";
/// <summary>
/// 散料库右抽屉 = "C02-01-18-02";
/// </summary>
public const string 散料库右抽屉 = "C02-01-18-02";
/// <summary>
/// 盘料库左工位 = "L01-02-34-02";
/// </summary>
public const string 盘料库左工位 = "L01-02-34-02";
/// <summary>
/// 盘料库右工位 = "L01-01-34-02";
/// </summary>
public const string 盘料库右工位 = "L01-01-34-02";
/// <summary>
/// 左料塔 = "L01";
/// </summary>
public const string 左料塔 = "L01";
/// <summary>
/// 右料塔 = "L02";
/// </summary>
public const string 右料塔 = "L02";
/// <summary>
/// 左料塔工位 = "L01-01";
/// </summary>
public const string 左料塔工位 = "L01-01";
/// <summary>
/// 右料塔工位 = "L01-02";
/// </summary>
public const string 右料塔工位 = "L01-02";
}
/// <summary> /// <summary>
/// 料塔类型 /// 料塔类型
/// </summary> /// </summary>
+6 -2
View File
@@ -26,6 +26,10 @@ namespace HHWMS.Web.Models
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string MaterialCode { get; set; } public string MaterialCode { get; set; }
[Display(Name = "Inventory.UniqueCode", Description = "唯一编码")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string UniqueCode { get; set; }
[Display(Name = "Inventory.MaterialType", Description = "物料类型")] [Display(Name = "Inventory.MaterialType", Description = "物料类型")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
public string MaterialType { get; set; } public string MaterialType { get; set; }
@@ -65,11 +69,11 @@ namespace HHWMS.Web.Models
[Display(Name = "Receipt.CompletedQty", Description = "完成数量")] [Display(Name = "Receipt.CompletedQty", Description = "完成数量")]
[Column(TypeName = "decimal(12,4)")] [Column(TypeName = "decimal(12,4)")]
public decimal? CompletedQty { get; set; } public decimal? CompletedQty { get; set; } = Decimal.Zero;
[Display(Name = "Inventory.Qty", Description = "数量")] [Display(Name = "Inventory.Qty", Description = "数量")]
[Column(TypeName = "decimal(12,4)")] [Column(TypeName = "decimal(12,4)")]
public decimal? Qty { get; set; } public decimal? Qty { get; set; } = Decimal.Zero;
[Display(Name = "Inventory.Status", Description = "物料状态")] [Display(Name = "Inventory.Status", Description = "物料状态")]
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")] [StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]