Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
已修改13个文件
已重命名1个文件
已添加7个文件
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <vol-box |
| | | :lazy="true" |
| | | v-model="model" |
| | | title="éæ©ç©æç¼å·" |
| | | :width="200" |
| | | :padding="0" |
| | | > |
| | | <div> |
| | | <div> |
| | | <!-- æç´¢é
ç½® --> |
| | | <div class="search-form"> |
| | | <label>ç©æç¼å·ï¼</label> |
| | | <el-input style="width: 100px" v-model="MaterialCode"></el-input> |
| | | </div> |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="filteredData" |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | height="500px" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" |
| | | :key="index" |
| | | :prop="item.prop" |
| | | :label="item.title" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <div><el-button type="primary" @click="onSelect">确认</el-button></div> |
| | | </template> |
| | | </vol-box> |
| | | </template> |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | |
| | | /******注æï¼å¦æåºç°æç¤ºæ²¡ææéçé®é¢ï¼è§åå°å¼åææ¡£ä¸çãéååå°æéã*****/ |
| | | |
| | | //è¿é使ç¨çvue2è¯æ³ï¼ä¹å¯ä»¥åævue3è¯æ³ |
| | | export default { |
| | | components: { |
| | | "vol-box": VolBox, |
| | | }, |
| | | methods: {}, |
| | | data() { |
| | | return { |
| | | model: false, //å¼¹åºæ¡ |
| | | wareId: null, |
| | | showDetialBox: false, |
| | | MaterialCode:null, |
| | | selection:null, |
| | | tableData: [], |
| | | filteredData: [], |
| | | tableColumns: [ |
| | | { |
| | | prop: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | watch: { |
| | | MaterialCode(newVal) { |
| | | this.filterLocalData(newVal); |
| | | } |
| | | }, |
| | | methods: { |
| | | open(val) { |
| | | //æå¼ä¸»è¡¨éæ©æ°æ® |
| | | this.model = true; |
| | | this.wareId=val; |
| | | this.getData(); |
| | | }, |
| | | filterLocalData(code) { |
| | | if (code) { |
| | | this.filteredData = this.tableData.filter((item) => { |
| | | return item.materielCode.includes(code); |
| | | }); |
| | | console.log(this.filteredData.length); |
| | | console.log(this.tableData.length); |
| | | } else { |
| | | this.filteredData = [...this.tableData]; // éç½®ä¸ºå®æ´æ°æ® |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | if (this.selection.length > 1) { |
| | | this.$message.error("ä»
鿩䏿¡æ°æ®"); |
| | | // æ¸
空éä¸çç¬¬ä¸æ¡æ°æ® |
| | | this.$refs.singleTable.clearSelection(); |
| | | } |
| | | console.log(this.selection); |
| | | }, |
| | | getData() { |
| | | this.http |
| | | .post( |
| | | "/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode?warehouseId=" + this.wareId, |
| | | null, |
| | | "æ¥è¯¢ä¸" |
| | | ) |
| | | .then((x) => { |
| | | this.tableData=x.data.map((i) => ({ |
| | | "materielCode":i |
| | | })) |
| | | this.filteredData=x.data.map((i) => ({ |
| | | "materielCode":i |
| | | })) |
| | | }); |
| | | }, |
| | | onSelect() { |
| | | if (!this.selection) { |
| | | return this.$message.error("è¯·éæ©æ°æ®"); |
| | | } |
| | | this.$emit("parentCall", ($parent) => { |
| | | //å¦ï¼ååç¼è¾è¡¨åæ°æ® |
| | | $parent.editFormFields.materielCode = this.selection[0].materielCode; |
| | | this.model = false; |
| | | }); |
| | | this.MaterialCode = null; |
| | | this.tableData = []; |
| | | this.filteredData = []; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .search-form { |
| | | display: flex; |
| | | padding: 10px; |
| | | line-height: 34px; |
| | | button { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <vol-box |
| | | :lazy="true" |
| | | v-model="model" |
| | | title="éæ©éè´åå·" |
| | | :width="280" |
| | | :padding="0" |
| | | > |
| | | <div> |
| | | <div> |
| | | <!-- æç´¢é
ç½® --> |
| | | <div class="search-form"> |
| | | <label>éè´åå·ï¼</label> |
| | | <el-input style="width: 160px" v-model="MaterialCode"></el-input> |
| | | </div> |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="filteredData" |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | height="500px" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" |
| | | :key="index" |
| | | :prop="item.prop" |
| | | :label="item.title" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <div><el-button type="primary" @click="onSelect">确认</el-button></div> |
| | | </template> |
| | | </vol-box> |
| | | </template> |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | |
| | | /******注æï¼å¦æåºç°æç¤ºæ²¡ææéçé®é¢ï¼è§åå°å¼åææ¡£ä¸çãéååå°æéã*****/ |
| | | |
| | | //è¿é使ç¨çvue2è¯æ³ï¼ä¹å¯ä»¥åævue3è¯æ³ |
| | | export default { |
| | | components: { |
| | | "vol-box": VolBox, |
| | | }, |
| | | methods: {}, |
| | | data() { |
| | | return { |
| | | model: false, //å¼¹åºæ¡ |
| | | wareId: null, |
| | | showDetialBox: false, |
| | | MaterialCode:null, |
| | | selection:null, |
| | | tableData: [], |
| | | filteredData: [], |
| | | tableColumns: [ |
| | | { |
| | | prop: "purchaseOrderNo", |
| | | title: "éè´åå·", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | watch: { |
| | | MaterialCode(newVal) { |
| | | this.filterLocalData(newVal); |
| | | } |
| | | }, |
| | | methods: { |
| | | open(val) { |
| | | //æå¼ä¸»è¡¨éæ©æ°æ® |
| | | this.model = true; |
| | | this.wareId=val; |
| | | this.getData(); |
| | | }, |
| | | filterLocalData(code) { |
| | | if (code) { |
| | | this.filteredData = this.tableData.filter((item) => { |
| | | return item.purchaseOrderNo.includes(code); |
| | | }); |
| | | console.log(this.filteredData.length); |
| | | console.log(this.tableData.length); |
| | | } else { |
| | | this.filteredData = [...this.tableData]; // éç½®ä¸ºå®æ´æ°æ® |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | if (this.selection.length > 1) { |
| | | this.$message.error("ä»
鿩䏿¡æ°æ®"); |
| | | // æ¸
空éä¸çç¬¬ä¸æ¡æ°æ® |
| | | this.$refs.singleTable.clearSelection(); |
| | | } |
| | | console.log(this.selection); |
| | | }, |
| | | getData() { |
| | | this.http |
| | | .post( |
| | | "/api/PurchaseOrderDetail/GetPurchaseOrderNos?materielCode=" + this.wareId, |
| | | null, |
| | | "æ¥è¯¢ä¸" |
| | | ) |
| | | .then((x) => { |
| | | this.tableData=x.data.map((i) => ({ |
| | | "purchaseOrderNo":i |
| | | })) |
| | | this.filteredData=x.data.map((i) => ({ |
| | | "purchaseOrderNo":i |
| | | })) |
| | | }); |
| | | }, |
| | | onSelect() { |
| | | if (!this.selection) { |
| | | return this.$message.error("è¯·éæ©æ°æ®"); |
| | | } |
| | | this.$emit("parentCall", ($parent) => { |
| | | //å¦ï¼ååç¼è¾è¡¨åæ°æ® |
| | | $parent.editFormFields.purchaseOrderNo = this.selection[0].purchaseOrderNo; |
| | | this.model = false; |
| | | }); |
| | | this.MaterialCode = null; |
| | | this.tableData = []; |
| | | this.filteredData = []; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .search-form { |
| | | display: flex; |
| | | padding: 10px; |
| | | line-height: 34px; |
| | | button { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/materielcodeprintView.vue' |
| | | import modelHeader from './extend/materielcodeSelectView.vue' |
| | | import modelBody from './extend/purchaseOrderNoSelectView.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelHeader: modelHeader, |
| | | modelBody: modelBody, |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | |
| | | let day = String(date.getDate()).padStart(2, "0"); |
| | | return year + "-" + month + "-" + day; |
| | | }, |
| | | // æ°å¢æ¹æ³ï¼å è½½ç©æç¼å·æ°æ® |
| | | async loadMaterielCodes(option) { |
| | | try { |
| | | option.loading = true; |
| | | const { page, pageSize, keyword } = option.pagination; |
| | | const res = await this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode", { |
| | | warehouseId: this.editFormFields.warehouseId, |
| | | keyword, |
| | | page, |
| | | pageSize |
| | | }, true); |
| | | |
| | | if (res.status) { |
| | | option.pagination.total = res.total || res.data.length; |
| | | const newData = res.data.map(item => ({ key: item, value: item })); |
| | | option.data = page === 1 ? newData : [...option.data, ...newData]; |
| | | } |
| | | } catch (error) { |
| | | this.$error("æ°æ®å 载失败"); |
| | | } finally { |
| | | option.loading = false; |
| | | } |
| | | }, |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { //æ¡æ¶åå§åé
ç½®åï¼ |
| | | this.$nextTick(() => { |
| | | let warehouseIdOption = this.getOption("warehouseId"); |
| | | let materielCodeOption = this.getOption("materielCode"); |
| | | let purchaseOrderNoOption = this.getOption("purchaseOrderNo"); |
| | | let materielQueryOption = this.getOption("materielQuery"); |
| | | warehouseIdOption.onChange = (val, option) => { |
| | | this.editFormFields.materielCode = ""; |
| | | materielCodeOption.data = []; |
| | | this.editFormFields.purchaseOrderNo = ""; |
| | | purchaseOrderNoOption.data = []; |
| | | if (val == null || val == 0) { |
| | | return this.$error("è¯·éæ©ä»åºï¼") |
| | | } |
| | | this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode?warehouseId=" + val, {}, true).then( |
| | | source => { |
| | | if (!source.status) return this.$error(source.message); |
| | | this.$nextTick(() => { |
| | | this.editFormOptions.forEach((option) => { |
| | | option.forEach((item) => { |
| | | if (item.field == 'materielCode') { |
| | | //åå§åå¼¹åºæ¡éæ©å¨é
ç½® |
| | | item.extra = { |
| | | icon: 'el-icon-zoom-out', //æ¾ç¤ºå¾æ |
| | | text: 'éæ©æ°æ®', //æ¾ç¤ºææ¬ |
| | | style: 'color: #3a8ee6;font-size: 13px;cursor: pointer;', |
| | | //触åäºä»¶ |
| | | click: (item) => { |
| | | this.$refs.modelHeader.open(this.editFormFields.warehouseId); |
| | | } |
| | | }; |
| | | } |
| | | }); |
| | | }); |
| | | this.editFormOptions.forEach((option) => { |
| | | option.forEach((item) => { |
| | | if (item.field == 'purchaseOrderNo') { |
| | | //åå§åå¼¹åºæ¡éæ©å¨é
ç½® |
| | | item.extra = { |
| | | icon: 'el-icon-zoom-out', //æ¾ç¤ºå¾æ |
| | | text: 'éæ©æ°æ®', //æ¾ç¤ºææ¬ |
| | | style: 'color: #3a8ee6;font-size: 13px;cursor: pointer;', |
| | | //触åäºä»¶ |
| | | click: (item) => { |
| | | this.$refs.modelBody.open(this.editFormFields.materielCode); |
| | | } |
| | | }; |
| | | } |
| | | }); |
| | | }); |
| | | // warehouseIdOption.onChange = (val, option) => { |
| | | // this.editFormFields.materielCode = ""; |
| | | // materielCodeOption.data = []; |
| | | // this.editFormFields.purchaseOrderNo = ""; |
| | | // purchaseOrderNoOption.data = []; |
| | | // if (val == null || val == 0) { |
| | | // return this.$error("è¯·éæ©ä»åºï¼") |
| | | // } |
| | | // this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderDetailMaterielCode?warehouseId=" + val, {}, true).then( |
| | | // source => { |
| | | // if (!source.status) return this.$error(source.message); |
| | | // this.$nextTick(() => { |
| | | |
| | | for (let i = 0; i < source.data.length; i++) { |
| | | materielCodeOption.data.push({ key: source.data[i], value: source.data[i] }) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | materielCodeOption.onChange = (val, option) => { |
| | | this.editFormFields.purchaseOrderNo = ""; |
| | | purchaseOrderNoOption.data = []; |
| | | if (val == null || val == 0) { |
| | | return this.$error("è¯·éæ©ç©æç¼å·ï¼") |
| | | } |
| | | this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderNos?materielCode=" + val, {}, true).then( |
| | | source => { |
| | | if (!source.status) return this.$error(source.message); |
| | | this.$nextTick(() => { |
| | | for (let i = 0; i < source.data.length; i++) { |
| | | purchaseOrderNoOption.data.push({ key: source.data[i], value: source.data[i] }) |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | // for (let i = 0; i < source.data.length; i++) { |
| | | // materielCodeOption.data.push({ key: source.data[i], value: source.data[i] }) |
| | | // } |
| | | // }) |
| | | // }) |
| | | // } |
| | | // materielCodeOption.onChange = (val, option) => { |
| | | // this.editFormFields.purchaseOrderNo = ""; |
| | | // purchaseOrderNoOption.data = []; |
| | | // if (val == null || val == 0) { |
| | | // return this.$error("è¯·éæ©ç©æç¼å·ï¼") |
| | | // } |
| | | // this.http.post("/api/PurchaseOrderDetail/GetPurchaseOrderNos?materielCode=" + val, {}, true).then( |
| | | // source => { |
| | | // if (!source.status) return this.$error(source.message); |
| | | // this.$nextTick(() => { |
| | | // for (let i = 0; i < source.data.length; i++) { |
| | | // purchaseOrderNoOption.data.push({ key: source.data[i], value: source.data[i] }) |
| | | // } |
| | | // }); |
| | | // }) |
| | | // } |
| | | }); |
| | | |
| | | this.columns.push({ |
| | |
| | | warehouseId: "", |
| | | purchaseOrderNo: "", |
| | | materielCode: "", |
| | | materielQuery:"", |
| | | productionDate: "", |
| | | effectiveDate: "", |
| | | }); |
| | |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "æç´¢ç©æ", |
| | | field: "materielQuery", |
| | | type: "string", |
| | | required: true, |
| | | }, |
| | | ], |
| | | [ |
| | | |
| | | { |
| | | title: "ç©æç¼ç ", |
| | | field: "materielCode", |
| | | type: "select", |
| | | data: [], |
| | | required: true, |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "éè´åå·", |
| | | field: "purchaseOrderNo", |
| | | type: "select", |
| | | data: [], |
| | | required: true, |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | |
| | | { |
| | | public class MaterielCodeInfoService : ServiceBase<Dt_MaterielCodeInfo, IMaterielCodeInfoRepository>, IMaterielCodeInfoService |
| | | { |
| | | public MaterielCodeInfoService(IMaterielCodeInfoRepository BaseDal) : base(BaseDal) |
| | | private readonly IBasicRepository _basicRepository; |
| | | public MaterielCodeInfoService(IMaterielCodeInfoRepository BaseDal, IBasicRepository basicRepository) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | } |
| | | public override WebResponseContent AddData(SaveModel saveModel) |
| | | { |
| | | string? MaterialCode = saveModel.MainData["materielCode"].ToString(); |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x=>x.MaterielCode== MaterialCode); |
| | | if (materielInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error("ç©æä¸åå¨"); |
| | | } |
| | | saveModel.MainData.Add(nameof(Dt_MaterielCodeInfo.MaterielName).FirstLetterToLower(), materielInfo.MaterielName); |
| | | return base.AddData(saveModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | [Description("å¤ç®±ç ")] |
| | | OutterCode, |
| | | |
| | | MatSerNumAnalysis |
| | | MatSerNumAnalysis, |
| | | ProSerNumAnalysis |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | [Description("订åå·")] |
| | | ODN, |
| | | |
| | | /// <summary> |
| | | /// æææ |
| | | /// </summary> |
| | | [Description("æææ")] |
| | | ED, |
| | | /// <summary> |
| | | /// 卿 |
| | | /// </summary> |
| | | [Description("卿")] |
| | | DC, |
| | | /// <summary> |
| | | /// åæ¿æ° |
| | | /// </summary> |
| | | [Description("åæ¿æ°")] |
| | | XQ, |
| | | /// <summary> |
| | | /// PCSæ°é |
| | | /// </summary> |
| | | [Description("PCSæ°é")] |
| | | PCSQ, |
| | | /// <summary> |
| | | /// åå§æ°æ® |
| | | /// </summary> |
| | | [Description("åå§æ°æ®")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | |
| | | namespace WIDESEA_DTO.Basic |
| | | { |
| | | /// <summary> |
| | | /// æåå
å¤å
ç è§£æ |
| | | /// </summary> |
| | | [AnalysisRule, ModelValidate] |
| | | public class ProSerNumAnalysisModel |
| | | { |
| | | /// <summary> |
| | | /// å
å
å· |
| | | /// </summary> |
| | | [AnalysisItemRule(AnalysisFormatTypeEnum.MTC), PropertyValidate("å
å
å·", NotNullAndEmpty = true)] |
| | | public string BagNO { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产åå· |
| | | /// </summary> |
| | | [AnalysisItemRule(AnalysisFormatTypeEnum.BHN), PropertyValidate("产åå·", NotNullAndEmpty = true)] |
| | | public string ProductCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 卿 |
| | | /// </summary> |
| | | [AnalysisItemRule(AnalysisFormatTypeEnum.DC), PropertyValidate("卿", NotNullAndEmpty = true)] |
| | | public string DateCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// Xæ¿æ° |
| | | /// </summary> |
| | | [AnalysisItemRule(AnalysisFormatTypeEnum.ED), PropertyValidate("Xæ¿æ°", NotNullAndEmpty = true)] |
| | | public string XQty { get; set; } |
| | | |
| | | /// <summary> |
| | | /// PCSæ°é |
| | | /// </summary> |
| | | [AnalysisItemRule(AnalysisFormatTypeEnum.PCSQ), PropertyValidate("PCSæ°é", NotNullAndEmpty = true)] |
| | | public string OKPCSQTY { get; set; } |
| | | /// <summary> |
| | | /// åå§æ°æ® |
| | | /// </summary> |
| | | [AnalysisItemRule(AnalysisFormatTypeEnum.BD), PropertyValidate("åå§æ°æ®", NotNullAndEmpty = true)] |
| | | public string SerialNumber { get; set; } |
| | | } |
| | | } |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IInboundRepository; |
| | |
| | | { |
| | | public IMesProInOrderRepository Repository => BaseDal; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | public MesProInOrderService(IMesProInOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManag) : base(BaseDal) |
| | | private readonly IInboundRepository _inboundRepository; |
| | | public MesProInOrderService(IMesProInOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManag, IInboundRepository inboundRepository) : base(BaseDal) |
| | | { |
| | | _unitOfWorkManage = unitOfWorkManag; |
| | | _inboundRepository = inboundRepository; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æåå
¥åºæ«ç |
| | | /// </summary> |
| | | /// <param name="Id"></param> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent ProInboundScan(int Id,string serNum) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | //è·å对åºMESæåå
¥åºåæ® |
| | | Dt_MesProInOrder mesProInOrder = BaseDal.Db.Queryable<Dt_MesProInOrder>().Includes(x => x.Details).First(); |
| | | if (mesProInOrder==null) |
| | | { |
| | | return content.Error("å½åMESå
¥åºåæ®ä¸åå¨"); |
| | | } |
| | | if (mesProInOrder.MesProStatus>= InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | return content.Error("å½å忮已å
¥åºæå
³éç¶æ"); |
| | | } |
| | | ProSerNumAnalysisModel model = CodeAnalysisHelper.CodeAnalysis<ProSerNumAnalysisModel>(AnalysisCodeEnum.ProSerNumAnalysis, serNum); |
| | | float SumPCSQty = mesProInOrder.Details.Sum(x => x.OKPCSQTY); |
| | | float OverPCSQty = mesProInOrder.Details.Sum(x=>x.OverInQuantity); |
| | | if ((OverPCSQty+model.OKPCSQTY.ObjToInt())>SumPCSQty) |
| | | { |
| | | return content.Error($"å½åå
¥åºè®¢åæ°é溢åº{(OverPCSQty + model.OKPCSQTY.ObjToInt())- SumPCSQty}"); |
| | | } |
| | | //è·å对åºå
å
æç» |
| | | Dt_MesProInOrderDetail? proInOrderDetail = mesProInOrder.Details.FirstOrDefault(x=>x.BagNo==model.BagNO) ?? throw new Exception($"æªæ¾å°"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | content.Error(ex.Message); |
| | | } |
| | | return content; |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// Xä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "Xä½")] |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "Xä½")] |
| | | public string XSite { get; set; } |
| | | /// <summary> |
| | | /// ERPå·¥å |
| | |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models.Outbound |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// æåè¿å·¥æåºåºåºå |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_MesRworkOutboundOrder), "æåè¿å·¥æåºåºåºå")] |
| | | public class Dt_MesRworkOutboundOrder : BaseEntity |
| | | { |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// è£åå宽度 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è£åå宽度")] |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "è£åå宽度")] |
| | | public float CutedWidth { get; set; } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | mesProInOrderDetails.Add(_mapper.Map<Dt_MesProInOrderDetail>(item)); |
| | | } |
| | | mesProInOrderDetails.ForEach(x => |
| | | { |
| | | x.OverInQuantity = 0; |
| | | }); |
| | | Dt_MesProInOrder mesProInOrder = new Dt_MesProInOrder() |
| | | { |
| | | WarehouseId = warehouse.WarehouseId, |
| | |
| | | public MesProInOrderController(IMesProInOrderService service) : base(service) |
| | | { |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_DTO.System; |
| | | using WIDESEA_DTO.Task; |
| | |
| | | CreateMap<Dt_ReceiveOrderDetail, Dt_CheckOrder>().ForMember(a => a.ReceivedQuantity, b => b.MapFrom(x => x.ReceivedQuantity)).ForMember(a => a.MaterielCode, b => b.MapFrom(x => x.MaterielCode)).ForMember(a => a.CheckOrderStatus, b => b.MapFrom(x => CheckOrderStatusEnum.NotCheck.ObjToInt())); |
| | | |
| | | CreateMap<Dt_Task, WMSTaskDTO>(); |
| | | CreateMap<MESBagDetail, Dt_MesProInOrderDetail>().ForMember(x => x.OverInQuantity, b => b.MapFrom(b => 0)); |
| | | } |
| | | } |
| | | } |