diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs index b62cb3c..37787e7 100644 --- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs @@ -5,6 +5,7 @@ using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -15,18 +16,8 @@ public InquirePageViewModel() { - this.InquireModels = new List - { - new FunctionModel("/Images/库存查询.png", "库存查询"), - new FunctionModel("/Images/领用未归还.png", "领用未归还"), - new FunctionModel("/Images/入柜查询.png", "入柜查询"), - new FunctionModel("/Images/退SPD查询.png", "退SPD查询"), - new FunctionModel("/Images/指定耗材查询.png", "指定耗材查询"), - new FunctionModel("/Images/消耗查询.png", "消耗查询"), - new FunctionModel("/Images/监控查询.png", "监控查询"), - new FunctionModel("/Images/综合查询.png", "在途统计") - }; - this.InquireSelectedCommand = new RelayCommand(InquireSelected); + InquireModels = DataModelCreator.CreateInquirePageFuncModels(); + InquireSelectedCommand = new RelayCommand(InquireSelected); } private void InquireSelected(object sender) diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs index b62cb3c..37787e7 100644 --- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs @@ -5,6 +5,7 @@ using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -15,18 +16,8 @@ public InquirePageViewModel() { - this.InquireModels = new List - { - new FunctionModel("/Images/库存查询.png", "库存查询"), - new FunctionModel("/Images/领用未归还.png", "领用未归还"), - new FunctionModel("/Images/入柜查询.png", "入柜查询"), - new FunctionModel("/Images/退SPD查询.png", "退SPD查询"), - new FunctionModel("/Images/指定耗材查询.png", "指定耗材查询"), - new FunctionModel("/Images/消耗查询.png", "消耗查询"), - new FunctionModel("/Images/监控查询.png", "监控查询"), - new FunctionModel("/Images/综合查询.png", "在途统计") - }; - this.InquireSelectedCommand = new RelayCommand(InquireSelected); + InquireModels = DataModelCreator.CreateInquirePageFuncModels(); + InquireSelectedCommand = new RelayCommand(InquireSelected); } private void InquireSelected(object sender) diff --git a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs index fc0ad67..4a26e47 100644 --- a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public PutGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs index b62cb3c..37787e7 100644 --- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs @@ -5,6 +5,7 @@ using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -15,18 +16,8 @@ public InquirePageViewModel() { - this.InquireModels = new List - { - new FunctionModel("/Images/库存查询.png", "库存查询"), - new FunctionModel("/Images/领用未归还.png", "领用未归还"), - new FunctionModel("/Images/入柜查询.png", "入柜查询"), - new FunctionModel("/Images/退SPD查询.png", "退SPD查询"), - new FunctionModel("/Images/指定耗材查询.png", "指定耗材查询"), - new FunctionModel("/Images/消耗查询.png", "消耗查询"), - new FunctionModel("/Images/监控查询.png", "监控查询"), - new FunctionModel("/Images/综合查询.png", "在途统计") - }; - this.InquireSelectedCommand = new RelayCommand(InquireSelected); + InquireModels = DataModelCreator.CreateInquirePageFuncModels(); + InquireSelectedCommand = new RelayCommand(InquireSelected); } private void InquireSelected(object sender) diff --git a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs index fc0ad67..4a26e47 100644 --- a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public PutGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs index f1a1bb3..4088da7 100644 --- a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs @@ -12,41 +12,103 @@ public RecentUsePageViewModel() { - this.TimeSelections = new List + TimeSelections = new List { "近30天", "近90天", "近180天", "近365天" }; - this.RecentUseModels = new ObservableCollection + RecentUseModels = new ObservableCollection { - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344") + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + } }; } } diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs index b62cb3c..37787e7 100644 --- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs @@ -5,6 +5,7 @@ using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -15,18 +16,8 @@ public InquirePageViewModel() { - this.InquireModels = new List - { - new FunctionModel("/Images/库存查询.png", "库存查询"), - new FunctionModel("/Images/领用未归还.png", "领用未归还"), - new FunctionModel("/Images/入柜查询.png", "入柜查询"), - new FunctionModel("/Images/退SPD查询.png", "退SPD查询"), - new FunctionModel("/Images/指定耗材查询.png", "指定耗材查询"), - new FunctionModel("/Images/消耗查询.png", "消耗查询"), - new FunctionModel("/Images/监控查询.png", "监控查询"), - new FunctionModel("/Images/综合查询.png", "在途统计") - }; - this.InquireSelectedCommand = new RelayCommand(InquireSelected); + InquireModels = DataModelCreator.CreateInquirePageFuncModels(); + InquireSelectedCommand = new RelayCommand(InquireSelected); } private void InquireSelected(object sender) diff --git a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs index fc0ad67..4a26e47 100644 --- a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public PutGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs index f1a1bb3..4088da7 100644 --- a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs @@ -12,41 +12,103 @@ public RecentUsePageViewModel() { - this.TimeSelections = new List + TimeSelections = new List { "近30天", "近90天", "近180天", "近365天" }; - this.RecentUseModels = new ObservableCollection + RecentUseModels = new ObservableCollection { - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344") + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + } }; } } diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs index 7342ff4..293eeb0 100644 --- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public RefundSpdPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs index b62cb3c..37787e7 100644 --- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs @@ -5,6 +5,7 @@ using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -15,18 +16,8 @@ public InquirePageViewModel() { - this.InquireModels = new List - { - new FunctionModel("/Images/库存查询.png", "库存查询"), - new FunctionModel("/Images/领用未归还.png", "领用未归还"), - new FunctionModel("/Images/入柜查询.png", "入柜查询"), - new FunctionModel("/Images/退SPD查询.png", "退SPD查询"), - new FunctionModel("/Images/指定耗材查询.png", "指定耗材查询"), - new FunctionModel("/Images/消耗查询.png", "消耗查询"), - new FunctionModel("/Images/监控查询.png", "监控查询"), - new FunctionModel("/Images/综合查询.png", "在途统计") - }; - this.InquireSelectedCommand = new RelayCommand(InquireSelected); + InquireModels = DataModelCreator.CreateInquirePageFuncModels(); + InquireSelectedCommand = new RelayCommand(InquireSelected); } private void InquireSelected(object sender) diff --git a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs index fc0ad67..4a26e47 100644 --- a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public PutGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs index f1a1bb3..4088da7 100644 --- a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs @@ -12,41 +12,103 @@ public RecentUsePageViewModel() { - this.TimeSelections = new List + TimeSelections = new List { "近30天", "近90天", "近180天", "近365天" }; - this.RecentUseModels = new ObservableCollection + RecentUseModels = new ObservableCollection { - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344") + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + } }; } } diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs index 7342ff4..293eeb0 100644 --- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public RefundSpdPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs index 03f306b..65fb955 100644 --- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } - + public ObservableCollection SurgeryGoodsModels { get; set; } + public ReturnGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs index b62cb3c..37787e7 100644 --- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs @@ -5,6 +5,7 @@ using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -15,18 +16,8 @@ public InquirePageViewModel() { - this.InquireModels = new List - { - new FunctionModel("/Images/库存查询.png", "库存查询"), - new FunctionModel("/Images/领用未归还.png", "领用未归还"), - new FunctionModel("/Images/入柜查询.png", "入柜查询"), - new FunctionModel("/Images/退SPD查询.png", "退SPD查询"), - new FunctionModel("/Images/指定耗材查询.png", "指定耗材查询"), - new FunctionModel("/Images/消耗查询.png", "消耗查询"), - new FunctionModel("/Images/监控查询.png", "监控查询"), - new FunctionModel("/Images/综合查询.png", "在途统计") - }; - this.InquireSelectedCommand = new RelayCommand(InquireSelected); + InquireModels = DataModelCreator.CreateInquirePageFuncModels(); + InquireSelectedCommand = new RelayCommand(InquireSelected); } private void InquireSelected(object sender) diff --git a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs index fc0ad67..4a26e47 100644 --- a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public PutGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs index f1a1bb3..4088da7 100644 --- a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs @@ -12,41 +12,103 @@ public RecentUsePageViewModel() { - this.TimeSelections = new List + TimeSelections = new List { "近30天", "近90天", "近180天", "近365天" }; - this.RecentUseModels = new ObservableCollection + RecentUseModels = new ObservableCollection { - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344") + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + } }; } } diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs index 7342ff4..293eeb0 100644 --- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public RefundSpdPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs index 03f306b..65fb955 100644 --- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } - + public ObservableCollection SurgeryGoodsModels { get; set; } + public ReturnGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs b/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs index 6d87981..69aa94d 100644 --- a/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs @@ -18,9 +18,23 @@ { UserModels = new ObservableCollection { - new UserModel("266", "1", "管理员", "admin", "008108899", "2022/7/7 14:53", "已录入", "--", "正常"), - new UserModel("268", "0809", "管理员", "0809", "007667643", "2022/7/7 17:22", "已录入", "--", "正常"), - new UserModel("267", "77", "管理员", "77", "", "2022/7/7 17:06", "已录入", "--", "正常"), + new UserModel + { + UserId = "266", UserName = "1", UserRole = "管理员", UserSerialNum = "admin", + UserCardNum = "008108899", RegisterTime = "2022/7/7 14:53", FaceFeature = "已录入", + OpticalFeature = "--", UserState = "正常" + }, + new UserModel + { + UserId = "268", UserName = "0809", UserRole = "管理员", UserSerialNum = "0809", + UserCardNum = "007667643", RegisterTime = "2022/7/7 17:22", FaceFeature = "已录入", + OpticalFeature = "--", UserState = "正常" + }, + new UserModel + { + UserId = "267", UserName = "77", UserRole = "管理员", UserSerialNum = "77", UserCardNum = "", + RegisterTime = "2022/7/7 17:06", FaceFeature = "已录入", OpticalFeature = "--", UserState = "正常" + }, }; AddUserCommand = new RelayCommand(AddUser); @@ -35,8 +49,7 @@ private void UserItemSelected(object sender) { - var dataGrid = (DataGrid)sender; - var userModel = (UserModel)dataGrid.SelectedItem; + var userModel = (UserModel)sender; var window = new EditUserDialog { WindowStartupLocation = WindowStartupLocation.Manual, diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs index b62cb3c..37787e7 100644 --- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs @@ -5,6 +5,7 @@ using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -15,18 +16,8 @@ public InquirePageViewModel() { - this.InquireModels = new List - { - new FunctionModel("/Images/库存查询.png", "库存查询"), - new FunctionModel("/Images/领用未归还.png", "领用未归还"), - new FunctionModel("/Images/入柜查询.png", "入柜查询"), - new FunctionModel("/Images/退SPD查询.png", "退SPD查询"), - new FunctionModel("/Images/指定耗材查询.png", "指定耗材查询"), - new FunctionModel("/Images/消耗查询.png", "消耗查询"), - new FunctionModel("/Images/监控查询.png", "监控查询"), - new FunctionModel("/Images/综合查询.png", "在途统计") - }; - this.InquireSelectedCommand = new RelayCommand(InquireSelected); + InquireModels = DataModelCreator.CreateInquirePageFuncModels(); + InquireSelectedCommand = new RelayCommand(InquireSelected); } private void InquireSelected(object sender) diff --git a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs index fc0ad67..4a26e47 100644 --- a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public PutGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs index f1a1bb3..4088da7 100644 --- a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs @@ -12,41 +12,103 @@ public RecentUsePageViewModel() { - this.TimeSelections = new List + TimeSelections = new List { "近30天", "近90天", "近180天", "近365天" }; - this.RecentUseModels = new ObservableCollection + RecentUseModels = new ObservableCollection { - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344") + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + } }; } } diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs index 7342ff4..293eeb0 100644 --- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public RefundSpdPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs index 03f306b..65fb955 100644 --- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } - + public ObservableCollection SurgeryGoodsModels { get; set; } + public ReturnGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs b/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs index 6d87981..69aa94d 100644 --- a/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs @@ -18,9 +18,23 @@ { UserModels = new ObservableCollection { - new UserModel("266", "1", "管理员", "admin", "008108899", "2022/7/7 14:53", "已录入", "--", "正常"), - new UserModel("268", "0809", "管理员", "0809", "007667643", "2022/7/7 17:22", "已录入", "--", "正常"), - new UserModel("267", "77", "管理员", "77", "", "2022/7/7 17:06", "已录入", "--", "正常"), + new UserModel + { + UserId = "266", UserName = "1", UserRole = "管理员", UserSerialNum = "admin", + UserCardNum = "008108899", RegisterTime = "2022/7/7 14:53", FaceFeature = "已录入", + OpticalFeature = "--", UserState = "正常" + }, + new UserModel + { + UserId = "268", UserName = "0809", UserRole = "管理员", UserSerialNum = "0809", + UserCardNum = "007667643", RegisterTime = "2022/7/7 17:22", FaceFeature = "已录入", + OpticalFeature = "--", UserState = "正常" + }, + new UserModel + { + UserId = "267", UserName = "77", UserRole = "管理员", UserSerialNum = "77", UserCardNum = "", + RegisterTime = "2022/7/7 17:06", FaceFeature = "已录入", OpticalFeature = "--", UserState = "正常" + }, }; AddUserCommand = new RelayCommand(AddUser); @@ -35,8 +49,7 @@ private void UserItemSelected(object sender) { - var dataGrid = (DataGrid)sender; - var userModel = (UserModel)dataGrid.SelectedItem; + var userModel = (UserModel)sender; var window = new EditUserDialog { WindowStartupLocation = WindowStartupLocation.Manual, diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs index e1c3405..b90b88e 100644 --- a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs @@ -1,17 +1,30 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class TotalQueryPageViewModel : ViewModelBase { public RelayCommand GoBackCommand { get; set; } + public ObservableCollection TotalGoodsModels { get; set; } public TotalQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + TotalGoodsModels = new ObservableCollection + { + new TotalGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + RFID = null + }, + }; } private void GoBack() diff --git a/.vs/SubCabinetSolution/v17/.suo b/.vs/SubCabinetSolution/v17/.suo index 52bfd97..f877e47 100644 --- a/.vs/SubCabinetSolution/v17/.suo +++ b/.vs/SubCabinetSolution/v17/.suo Binary files differ diff --git a/SubCabinetSolution/Model/AdminFuncModel.cs b/SubCabinetSolution/Model/AdminFuncModel.cs index 0cbcb29..fe211e0 100644 --- a/SubCabinetSolution/Model/AdminFuncModel.cs +++ b/SubCabinetSolution/Model/AdminFuncModel.cs @@ -2,13 +2,7 @@ { public class AdminFuncModel { - public AdminFuncModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/ConsumeGoodsModel.cs b/SubCabinetSolution/Model/ConsumeGoodsModel.cs new file mode 100644 index 0000000..f305aa9 --- /dev/null +++ b/SubCabinetSolution/Model/ConsumeGoodsModel.cs @@ -0,0 +1,12 @@ +namespace SubCabinetSolution.Model +{ + public class ConsumeGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string OperatePerson { get; set; } + public string OperateTime { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/FunctionModel.cs b/SubCabinetSolution/Model/FunctionModel.cs index 26182c8..ef7301e 100644 --- a/SubCabinetSolution/Model/FunctionModel.cs +++ b/SubCabinetSolution/Model/FunctionModel.cs @@ -2,13 +2,7 @@ { public class FunctionModel { - public FunctionModel(string image, string title) - { - Image = image; - Title = title; - } - - public string Image { get; } - public string Title { get; } + public string Image { get; set; } + public string Title { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/GoodsModel.cs b/SubCabinetSolution/Model/GoodsModel.cs index 894e30f..6cee018 100644 --- a/SubCabinetSolution/Model/GoodsModel.cs +++ b/SubCabinetSolution/Model/GoodsModel.cs @@ -2,13 +2,7 @@ { public class GoodsModel { - public GoodsModel(string goodsName, string attr) - { - GoodsName = goodsName; - Attr = attr; - } - - public string GoodsName { get; } - public string Attr { get; } + public string GoodsName { get; set; } + public string Attr { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/RecentUseModel.cs b/SubCabinetSolution/Model/RecentUseModel.cs index c389921..7312e75 100644 --- a/SubCabinetSolution/Model/RecentUseModel.cs +++ b/SubCabinetSolution/Model/RecentUseModel.cs @@ -2,25 +2,17 @@ { public class RecentUseModel { - // jxDate jx近效期 - public RecentUseModel(string goodsName, string specification, string cabinetNum, string jxDate, string batch, - string validityPeriod, string rfId) - { - GoodsName = goodsName; - Specification = specification; - CabinetNum = cabinetNum; - JxDate = jxDate; - Batch = batch; - ValidityPeriod = validityPeriod; - RFID = rfId; - } + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } - public string GoodsName { get; } - public string Specification { get; } - public string CabinetNum { get; } - public string JxDate { get; } - public string Batch { get; } - public string ValidityPeriod { get; } - public string RFID { get; } + /// + /// jxDate jx近效期 + /// + public string JxDate { get; set; } + + public string Batch { get; set; } + public string ValidityPeriod { get; set; } + public string RFID { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryGoodsModel.cs b/SubCabinetSolution/Model/SurgeryGoodsModel.cs new file mode 100644 index 0000000..d8c2da9 --- /dev/null +++ b/SubCabinetSolution/Model/SurgeryGoodsModel.cs @@ -0,0 +1,11 @@ +namespace SubCabinetSolution.Model +{ + public class SurgeryGoodsModel + { + public string GoodsName { get; set; } + public string GoodsFormat { get; set; } + public string CabinetNum { get; set; } + public string RFIDNum { get; set; } + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/SurgeryModel.cs b/SubCabinetSolution/Model/SurgeryModel.cs index 0faf3b4..19380d0 100644 --- a/SubCabinetSolution/Model/SurgeryModel.cs +++ b/SubCabinetSolution/Model/SurgeryModel.cs @@ -2,17 +2,9 @@ { public class SurgeryModel { - public SurgeryModel(string doctorName, string deptName, string surgeryTime, string surgeryNum) - { - DoctorName = doctorName; - DeptName = deptName; - SurgeryTime = surgeryTime; - SurgeryNum = surgeryNum; - } - - public string DoctorName { get; } - public string DeptName { get; } - public string SurgeryTime { get; } - public string SurgeryNum { get; } + public string DoctorName { get; set; } + public string DeptName { get; set; } + public string SurgeryTime { get; set; } + public string SurgeryNum { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/Model/TotalGoodsModel.cs b/SubCabinetSolution/Model/TotalGoodsModel.cs new file mode 100644 index 0000000..6dd784f --- /dev/null +++ b/SubCabinetSolution/Model/TotalGoodsModel.cs @@ -0,0 +1,10 @@ +namespace SubCabinetSolution.Model +{ + public class TotalGoodsModel + { + public string GoodsName { get; set; } + public string Specification { get; set; } + public string CabinetNum { get; set; } + public string RFID { get; set; } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/Model/UserModel.cs b/SubCabinetSolution/Model/UserModel.cs index 2881d70..2a2f37f 100644 --- a/SubCabinetSolution/Model/UserModel.cs +++ b/SubCabinetSolution/Model/UserModel.cs @@ -2,30 +2,16 @@ { public class UserModel { - public UserModel(string userId, string userName, string userRole, string userSerialNum, string userCardNum, - string registerTime, string faceFeature, string opticalFeature, string userState) - { - UserId = userId; - UserName = userName; - UserRole = userRole; - UserSerialNum = userSerialNum; - UserCardNum = userCardNum; - RegisterTime = registerTime; - FaceFeature = faceFeature; - OpticalFeature = opticalFeature; - UserState = userState; - } - - public string UserId { get; } - public string UserName { get; } - public string UserRole { get; } - public string UserSerialNum { get; } - public string UserCardNum { get; } - public string RegisterTime { get; } + public string UserId { get; set; } + public string UserName { get; set; } + public string UserRole { get; set; } + public string UserSerialNum { get; set; } + public string UserCardNum { get; set; } + public string RegisterTime { get; set; } // 虹膜信息 - public string FaceFeature { get; } - public string OpticalFeature { get; } - public string UserState { get; } + public string FaceFeature { get; set; } + public string OpticalFeature { get; set; } + public string UserState { get; set; } } } \ No newline at end of file diff --git a/SubCabinetSolution/SubCabinetSolution.csproj b/SubCabinetSolution/SubCabinetSolution.csproj index ee396f2..f90a7a4 100644 --- a/SubCabinetSolution/SubCabinetSolution.csproj +++ b/SubCabinetSolution/SubCabinetSolution.csproj @@ -193,13 +193,17 @@ Designer + + + + diff --git a/SubCabinetSolution/Utils/DataModelCreator.cs b/SubCabinetSolution/Utils/DataModelCreator.cs new file mode 100644 index 0000000..10ac52e --- /dev/null +++ b/SubCabinetSolution/Utils/DataModelCreator.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using SubCabinetSolution.Model; + +namespace SubCabinetSolution.Utils +{ + public class DataModelCreator + { + public static List CreateAdminFuncModels() + { + return new List + { + //动态绑定字体图标需要替换转义 + new AdminFuncModel { Image = "\ue6a4", Title = "角色转换" }, + new AdminFuncModel { Image = "\ue6c6", Title = "人脸登记" }, + new AdminFuncModel { Image = "\ue675", Title = "登记卡号" }, + new AdminFuncModel { Image = "\ue66e", Title = "重置密码" }, + new AdminFuncModel { Image = "\ue665", Title = "删除用户" }, + new AdminFuncModel { Image = "\ue676", Title = "锁定用户" }, + new AdminFuncModel { Image = "\ue682", Title = "解除锁定" }, + new AdminFuncModel { Image = "\ue6c6", Title = "解除人脸" } + }; + } + + public static List CreateCabinetViewLeftFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/手术单领用.png", Title = "手术单领用" }, + new FunctionModel { Image = "/Images/归还.png", Title = "归还" }, + new FunctionModel { Image = "/Images/紧急领用.png", Title = "紧急领用" }, + new FunctionModel { Image = "/Images/上架.png", Title = "上架" }, + new FunctionModel { Image = "/Images/盘点.png", Title = "盘点" }, + new FunctionModel { Image = "/Images/退SPD库.png", Title = "退SPD库" }, + new FunctionModel { Image = "/Images/文档查询.png", Title = "查询" }, + new FunctionModel { Image = "/Images/主页.png", Title = "主页" } + }; + } + + public static List CreateCabinetViewBottomFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/settings.png", Title = "设置" }, + new FunctionModel { Image = "/Images/灯泡.png", Title = "灯光" }, + new FunctionModel { Image = "/Images/近消耗品.png", Title = "近消耗品" }, + }; + } + + public static List CreateInquirePageFuncModels() + { + return new List + { + new FunctionModel { Image = "/Images/库存查询.png", Title = "库存查询" }, + new FunctionModel { Image = "/Images/领用未归还.png", Title = "领用未归还" }, + new FunctionModel { Image = "/Images/入柜查询.png", Title = "入柜查询" }, + new FunctionModel { Image = "/Images/退SPD查询.png", Title = "退SPD查询" }, + new FunctionModel { Image = "/Images/指定耗材查询.png", Title = "指定耗材查询" }, + new FunctionModel { Image = "/Images/消耗查询.png", Title = "消耗查询" }, + new FunctionModel { Image = "/Images/监控查询.png", Title = "监控查询" }, + new FunctionModel { Image = "/Images/综合查询.png", Title = "在途统计" }, + }; + } + } +} \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs index 418fcc8..669ad99 100644 --- a/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/AdoptionPageViewModel.cs @@ -7,14 +7,36 @@ public class AdoptionPageViewModel : ViewModelBase { public ObservableCollection SurgeryModels { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public AdoptionPageViewModel() { - this.SurgeryModels = new ObservableCollection + SurgeryModels = new ObservableCollection { - new SurgeryModel("赵新明", "妇科", "2022-8-29 12:42:58", "138909"), - new SurgeryModel("郭仕仕", "普外-耳鼻喉科", "2022-8-29 12:43:30", "138848"), - new SurgeryModel("李紫杰", "神经外科", "2022-8-30 12:43:35", "138849") + new SurgeryModel + { + DoctorName = "赵新明", DeptName = "妇科", SurgeryTime = "2022-8-29 12:42:58", SurgeryNum = "138909" + }, + new SurgeryModel + { + DoctorName = "郭仕仕", DeptName = "普外-耳鼻喉科", SurgeryTime = "2022-8-29 12:43:30", SurgeryNum = "138848" + }, + new SurgeryModel + { + DoctorName = "李紫杰", DeptName = "神经外科", SurgeryTime = "2022-8-30 12:43:35", SurgeryNum = "138849" + } + }; + + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } }; } } diff --git a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs index 84cddf8..03a8a82 100644 --- a/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetMainPageViewModel.cs @@ -15,29 +15,28 @@ public CabinetMainPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; } diff --git a/SubCabinetSolution/ViewModel/CabinetViewModel.cs b/SubCabinetSolution/ViewModel/CabinetViewModel.cs index 5f0ffdd..2f0cfe3 100644 --- a/SubCabinetSolution/ViewModel/CabinetViewModel.cs +++ b/SubCabinetSolution/ViewModel/CabinetViewModel.cs @@ -9,6 +9,7 @@ using GalaSoft.MvvmLight.Views; using Newtonsoft.Json; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; using MessageBox = HandyControl.Controls.MessageBox; @@ -93,24 +94,10 @@ LoginOutCommand = new RelayCommand(LoginOut); // 初始化左侧功能列表 - FunctionModels = new List - { - new FunctionModel("/Images/手术单领用.png", "手术单领用"), - new FunctionModel("/Images/归还.png", "归还"), - new FunctionModel("/Images/紧急领用.png", "紧急领用"), - new FunctionModel("/Images/上架.png", "上架"), - new FunctionModel("/Images/盘点.png", "盘点"), - new FunctionModel("/Images/退SPD库.png", "退SPD库"), - new FunctionModel("/Images/文档查询.png", "查询"), - new FunctionModel("/Images/主页.png", "主页") - }; + FunctionModels = DataModelCreator.CreateCabinetViewLeftFuncModels(); // 初始化左侧底部功能列表 - SettingsModels = new List - { - new FunctionModel("/Images/settings.png", "设置"), - new FunctionModel("/Images/灯泡.png", "灯光"), - new FunctionModel("/Images/近消耗品.png", "近消耗品") - }; + SettingsModels = DataModelCreator.CreateCabinetViewBottomFuncModels(); + FuncSelectedCommand = new RelayCommand(ItemSelectionChanged); SettingsSelectedCommand = new RelayCommand(SettingsSelectionChanged); SearchDataCommand = new RelayCommand(SearchData); diff --git a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs index c619e0c..a3dcd44 100644 --- a/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ConsumeQueryPageViewModel.cs @@ -1,17 +1,33 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class ConsumeQueryPageViewModel : ViewModelBase { + public ObservableCollection ConsumeGoodsModels { get; set; } + public RelayCommand GoBackCommand { get; set; } public ConsumeQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + ConsumeGoodsModels = new ObservableCollection + { + new ConsumeGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + OperatePerson = null, + OperateTime = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs index 05d6af8..4c3f48a 100644 --- a/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs +++ b/SubCabinetSolution/ViewModel/EditUserDialogViewModel.cs @@ -4,6 +4,7 @@ using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; using SubCabinetSolution.Views; namespace SubCabinetSolution.ViewModel @@ -16,18 +17,7 @@ public EditUserDialogViewModel() { - AdminFuncModels = new List - { - //动态绑定字体图标需要替换转义 - new AdminFuncModel("\ue6a4", "角色转换"), - new AdminFuncModel("\ue6c6", "人脸登记"), - new AdminFuncModel("\ue675", "登记卡号"), - new AdminFuncModel("\ue66e", "重置密码"), - new AdminFuncModel("\ue665", "删除用户"), - new AdminFuncModel("\ue676", "锁定用户"), - new AdminFuncModel("\ue682", "解除锁定"), - new AdminFuncModel("\ue6c6", "解除人脸") - }; + AdminFuncModels = DataModelCreator.CreateAdminFuncModels(); CloseWindowCommand = new RelayCommand(CloseWindow); ItemSelectedCommand = new RelayCommand(ItemSelectionChanged); } diff --git a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs index e5a7f83..a37b202 100644 --- a/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/EmergencyPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public EmergencyPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs index b62cb3c..37787e7 100644 --- a/SubCabinetSolution/ViewModel/InquirePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/InquirePageViewModel.cs @@ -5,6 +5,7 @@ using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; using SubCabinetSolution.Model; +using SubCabinetSolution.Utils; namespace SubCabinetSolution.ViewModel { @@ -15,18 +16,8 @@ public InquirePageViewModel() { - this.InquireModels = new List - { - new FunctionModel("/Images/库存查询.png", "库存查询"), - new FunctionModel("/Images/领用未归还.png", "领用未归还"), - new FunctionModel("/Images/入柜查询.png", "入柜查询"), - new FunctionModel("/Images/退SPD查询.png", "退SPD查询"), - new FunctionModel("/Images/指定耗材查询.png", "指定耗材查询"), - new FunctionModel("/Images/消耗查询.png", "消耗查询"), - new FunctionModel("/Images/监控查询.png", "监控查询"), - new FunctionModel("/Images/综合查询.png", "在途统计") - }; - this.InquireSelectedCommand = new RelayCommand(InquireSelected); + InquireModels = DataModelCreator.CreateInquirePageFuncModels(); + InquireSelectedCommand = new RelayCommand(InquireSelected); } private void InquireSelected(object sender) diff --git a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs index fc0ad67..4a26e47 100644 --- a/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/PutGoodsPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public PutGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs index f1a1bb3..4088da7 100644 --- a/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RecentUsePageViewModel.cs @@ -12,41 +12,103 @@ public RecentUsePageViewModel() { - this.TimeSelections = new List + TimeSelections = new List { "近30天", "近90天", "近180天", "近365天" }; - this.RecentUseModels = new ObservableCollection + RecentUseModels = new ObservableCollection { - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344"), - new RecentUseModel("一次性双极电凝切割钳", "5*330直头KJ-SJ02", "1", "53", "20102515", "2022-10-24", - "8821033009373344") + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + }, + new RecentUseModel + { + GoodsName = "一次性双极电凝切割钳", Specification = "5*330直头KJ-SJ02", CabinetNum = "1", + JxDate = "53", Batch = "20102515", ValidityPeriod = "2022-10-24", + RFID = "8821033009373344" + } }; } } diff --git a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs index 7342ff4..293eeb0 100644 --- a/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/RefundSpdPageViewModel.cs @@ -12,34 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } + public ObservableCollection SurgeryGoodsModels { get; set; } public RefundSpdPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), - new GoodsModel("一次性医用口罩", "[2]") + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs index 03f306b..65fb955 100644 --- a/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/ReturnGoodsPageViewModel.cs @@ -12,33 +12,45 @@ public ObservableCollection FourthDoorGoods { get; set; } public ObservableCollection FifthDoorGoods { get; set; } public ObservableCollection SixthDoorGoods { get; set; } - + public ObservableCollection SurgeryGoodsModels { get; set; } + public ReturnGoodsPageViewModel() { - this.FirstDoorGoods = new ObservableCollection + FirstDoorGoods = new ObservableCollection { - new GoodsModel("止血纱布", "[19]"), - new GoodsModel("可吸收医用膜", "[89]"), - new GoodsModel("消融电极", "[59]"), - new GoodsModel("疝环充填补片", "[19]"), - new GoodsModel("微创扩展引流套", "[29]"), - new GoodsModel("创口贴", "[69]"), + new GoodsModel { GoodsName = "止血纱布", Attr = "[19]" }, + new GoodsModel { GoodsName = "可吸收医用膜", Attr = "[89]" }, + new GoodsModel { GoodsName = "消融电极", Attr = "[59]" }, + new GoodsModel { GoodsName = "疝环充填补片", Attr = "[19]" }, + new GoodsModel { GoodsName = "微创扩展引流套", Attr = "[29]" }, + new GoodsModel { GoodsName = "创口贴", Attr = "[69]" } }; - this.SecondDoorGoods = new ObservableCollection + SecondDoorGoods = new ObservableCollection { }; - this.ThirdDoorGoods = new ObservableCollection + ThirdDoorGoods = new ObservableCollection { }; - this.FourthDoorGoods = new ObservableCollection + FourthDoorGoods = new ObservableCollection { }; - this.FifthDoorGoods = new ObservableCollection + FifthDoorGoods = new ObservableCollection { }; - this.SixthDoorGoods = new ObservableCollection + SixthDoorGoods = new ObservableCollection { }; + SurgeryGoodsModels = new ObservableCollection + { + new SurgeryGoodsModel + { + GoodsName = null, + GoodsFormat = null, + CabinetNum = null, + RFIDNum = null, + Description = null + } + }; } } } \ No newline at end of file diff --git a/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs b/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs index 6d87981..69aa94d 100644 --- a/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/SettingsPageViewModel.cs @@ -18,9 +18,23 @@ { UserModels = new ObservableCollection { - new UserModel("266", "1", "管理员", "admin", "008108899", "2022/7/7 14:53", "已录入", "--", "正常"), - new UserModel("268", "0809", "管理员", "0809", "007667643", "2022/7/7 17:22", "已录入", "--", "正常"), - new UserModel("267", "77", "管理员", "77", "", "2022/7/7 17:06", "已录入", "--", "正常"), + new UserModel + { + UserId = "266", UserName = "1", UserRole = "管理员", UserSerialNum = "admin", + UserCardNum = "008108899", RegisterTime = "2022/7/7 14:53", FaceFeature = "已录入", + OpticalFeature = "--", UserState = "正常" + }, + new UserModel + { + UserId = "268", UserName = "0809", UserRole = "管理员", UserSerialNum = "0809", + UserCardNum = "007667643", RegisterTime = "2022/7/7 17:22", FaceFeature = "已录入", + OpticalFeature = "--", UserState = "正常" + }, + new UserModel + { + UserId = "267", UserName = "77", UserRole = "管理员", UserSerialNum = "77", UserCardNum = "", + RegisterTime = "2022/7/7 17:06", FaceFeature = "已录入", OpticalFeature = "--", UserState = "正常" + }, }; AddUserCommand = new RelayCommand(AddUser); @@ -35,8 +49,7 @@ private void UserItemSelected(object sender) { - var dataGrid = (DataGrid)sender; - var userModel = (UserModel)dataGrid.SelectedItem; + var userModel = (UserModel)sender; var window = new EditUserDialog { WindowStartupLocation = WindowStartupLocation.Manual, diff --git a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs index e1c3405..b90b88e 100644 --- a/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs +++ b/SubCabinetSolution/ViewModel/TotalQueryPageViewModel.cs @@ -1,17 +1,30 @@ -using CommonServiceLocator; +using System.Collections.ObjectModel; +using CommonServiceLocator; using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Command; using GalaSoft.MvvmLight.Views; +using SubCabinetSolution.Model; namespace SubCabinetSolution.ViewModel { public class TotalQueryPageViewModel : ViewModelBase { public RelayCommand GoBackCommand { get; set; } + public ObservableCollection TotalGoodsModels { get; set; } public TotalQueryPageViewModel() { - this.GoBackCommand = new RelayCommand(GoBack); + GoBackCommand = new RelayCommand(GoBack); + TotalGoodsModels = new ObservableCollection + { + new TotalGoodsModel + { + GoodsName = null, + Specification = null, + CabinetNum = null, + RFID = null + }, + }; } private void GoBack() diff --git a/SubCabinetSolution/Views/AdoptionPage.xaml b/SubCabinetSolution/Views/AdoptionPage.xaml index a148f7f..1938adf 100644 --- a/SubCabinetSolution/Views/AdoptionPage.xaml +++ b/SubCabinetSolution/Views/AdoptionPage.xaml @@ -12,31 +12,6 @@ mc:Ignorable="d"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -90,65 +65,60 @@ - + - + - - - - - - - - - - - - + + + + + + + + + + + + + +