PP仓出库MES,AGV对接流程
PP仓出库MES,AGV对接流程
已删除5个文件
已修改23个文件
已添加57个文件
| | |
| | | Agv_FLSendTask, |
| | | |
| | | /// <summary> |
| | | /// PPAGVä»»å¡åé |
| | | /// </summary> |
| | | [Description("PPAGVä»»å¡åé")] |
| | | Agv_PPSendTask, |
| | | |
| | | /// <summary> |
| | | /// åè°WMSä»»å¡å®æ |
| | | /// </summary> |
| | | [Description("åè°WMSä»»å¡å®æ")] |
| | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è·¯ç±é
置信æ¯"); |
| | | } |
| | | router = routers.FirstOrDefault(); |
| | | string stationCode = router?.NextPosi ?? ""; |
| | | Dt_StationManger? stationManger = _stationMangerRepository.QueryFirst(x => x.StationCode == stationCode); |
| | | Dt_StationManger? stationManger = _stationMangerRepository.QueryData(x => true).FirstOrDefault(x=>x.StationCode== router?.NextPosi); |
| | | if (stationManger == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç«å°é
置信æ¯"); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_DTO.Agv; |
| | | using WIDESEAWCS_Common.APIEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_Tasks.StackerCraneJob; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | public partial class AGV_PPJob |
| | | { |
| | | public void SendAGVTask() |
| | | { |
| | | try |
| | | { |
| | | var newTasks = _taskService.Db.Queryable<Dt_Task>().Where(x => (x.TaskState == TaskStatusEnum.New.ObjToInt()||x.TaskState==TaskStatusEnum.AGV_Execute.ObjToInt()) && nameof(AGV_PPJob).Contains(x.DeviceCode) && !string.IsNullOrEmpty(x.DeviceCode)).ToList().OrderBy(x => x.Grade).ThenBy(x => x.CreateDate).ToList(); |
| | | foreach (var task in newTasks) |
| | | { |
| | | try |
| | | { |
| | | AgvTaskDTO TaskDTO = new AgvTaskDTO() |
| | | { |
| | | TaskCode = task.AgvTaskNum, |
| | | ReqCode = DateTime.Now.ToString("yyyyMMddHHmmss") + task.AgvTaskNum, |
| | | TaskTyp = task.TaskType < TaskTypeEnum.Inbound.ObjToInt() ? "FLC" : "FLR", |
| | | ctnrCode = task.PalletCode, |
| | | PositionCodePath = new List<CodePath>() |
| | | { |
| | | new CodePath() |
| | | { |
| | | type="00", |
| | | positionCode=task.CurrentAddress |
| | | }, |
| | | new CodePath() |
| | | { |
| | | type="00", |
| | | positionCode=task.NextAddress |
| | | } |
| | | }, |
| | | }; |
| | | WebResponseContent content = _taskService.AgvSendTask(TaskDTO, APIEnum.Agv_PPSendTask); |
| | | if (!content.Status) throw new Exception(content.Message); |
| | | task.TaskState = TaskStatusEnum.AGV_Executing.ObjToInt(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | task.TaskState = TaskStatusEnum.Exception.ObjToInt(); |
| | | task.ExceptionMessage = ex.Message; |
| | | } |
| | | } |
| | | _taskService.UpdateData(newTasks); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(nameof(AGV_FLJob), ex.Message, ex); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using AutoMapper; |
| | | using Newtonsoft.Json; |
| | | using Quartz; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Reflection.Metadata; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_DTO.Agv; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_IBasicInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.Service; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public partial class AGV_PPJob : JobBase, IJob |
| | | { |
| | | public readonly ITaskService _taskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | | private readonly IRouterService _routerService; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | | private readonly IMapper _mapper; |
| | | |
| | | public AGV_PPJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IStationMangerRepository stationMangerRepository, IMapper mapper) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | | _routerService = routerService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | | _mapper = mapper; |
| | | } |
| | | public Task Execute(IJobExecutionContext context) |
| | | { |
| | | try |
| | | { |
| | | SendAGVTask(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.Out.WriteLine(nameof(AGV_PPJob) + ":" + ex.Message); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
| | | } |
| | | } |
| | |
| | | ConveyorLineSignal conveyorLineSignalRead = conveyorLineInfoRead.Signal.ByteToBoolObject<ConveyorLineSignal>(); |
| | | |
| | | ConveyorLineSignal conveyorLineSignalWrite = conveyorLineInfoWrite.Signal.ByteToBoolObject<ConveyorLineSignal>(); |
| | | if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) |
| | | { |
| | | if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK) |
| | | { |
| | | if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode)) |
| | | { |
| | | WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode); |
| | | if (content.Status) |
| | | { |
| | | device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | } |
| | | } |
| | | } |
| | | else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt()); |
| | | if (task != null) |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: item.StackerCraneStationCode, deviceCode: task.Roadway, nextAddress: task.TargetAddress); |
| | | } |
| | | #region |
| | | //if (item.StationType == StationTypeEnum.StationType_OnlyInbound.ObjToInt()) |
| | | //{ |
| | | // if (conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && !conveyorLineSignalWrite.ACK) |
| | | // { |
| | | // if (!string.IsNullOrEmpty(conveyorLineInfoRead.Barcode)) |
| | | // { |
| | | // WebResponseContent content = _taskService.RequestWMSTask(conveyorLineInfoRead.Barcode, item.StationCode); |
| | | // if (content.Status) |
| | | // { |
| | | // device.SetValue(W_ConveyorLineDB.ACK, true, item.StationCode); |
| | | // } |
| | | // } |
| | | // } |
| | | // else if (!conveyorLineSignalRead.STB && conveyorLineStatus.Online && conveyorLineStatus.Goods && !conveyorLineStatus.Alarm && conveyorLineSignalWrite.ACK) |
| | | // { |
| | | // Dt_Task task = _taskRepository.QueryFirst(x => x.CurrentAddress == item.StationCode && x.PalletCode == conveyorLineInfoRead.Barcode && x.DeviceCode == item.StationDeviceCode && x.TaskState == TaskStatusEnum.New.ObjToInt()); |
| | | // if (task != null) |
| | | // { |
| | | // _taskService.UpdateTask(task, TaskStatusEnum.SC_Execute, currentAddress: item.StackerCraneStationCode, deviceCode: task.Roadway, nextAddress: task.TargetAddress); |
| | | // } |
| | | |
| | | device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode); |
| | | } |
| | | // device.SetValue(W_ConveyorLineDB.ACK, false, item.StationCode); |
| | | // } |
| | | |
| | | } |
| | | else if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) |
| | | //} |
| | | #endregion |
| | | if (item.StationType == StationTypeEnum.StationType_OnlyOutbound.ObjToInt()) |
| | | { |
| | | if (conveyorLineSignalRead.STB) |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | a<template> |
| | | <div> |
| | | <vol-box |
| | | v-model="showDetialBox" |
| | | :lazy="true" |
| | | width="75%" |
| | | :padding="15" |
| | | title="åæ®æç»ä¿¡æ¯" |
| | | > |
| | | <div class="box-head"> |
| | | <el-alert :closable="false" style="width: 100%"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <span>å·²éä¸ {{ selection.length }} 项</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px" |
| | | @click="lockstocks" |
| | | >éå®åºå</el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="outbound" |
| | | >ç´æ¥åºåº</el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="getData" |
| | | >å·æ°</el-link |
| | | ></el-col |
| | | > |
| | | </el-row> |
| | | </el-alert> |
| | | </div> |
| | | <div class="box-table" style="margin-top: 1%"> |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="tableData" |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | @current-change="handleCurrentChange" |
| | | height="500px" |
| | | @row-click="handleRowClick" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | label="åºå·" |
| | | type="index" |
| | | fixed="left" |
| | | width="55" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" |
| | | :key="index" |
| | | :prop="item.prop" |
| | | :label="item.title" |
| | | :width="item.width" |
| | | align="center" |
| | | > |
| | | <template #default="scoped"> |
| | | <div v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-link |
| | | type="primary" |
| | | :disabled="getButtonEnable(item.prop, scoped.row)" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i :class="item.icon" style="font-size: 22px"></i></el-link |
| | | ></el-tooltip> |
| | | </div> |
| | | |
| | | <div v-else-if="item.type == 'tag'"> |
| | | <el-tag size="small"> |
| | | {{ getDictionary(scoped.row, item) }} |
| | | </el-tag> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </vol-box> |
| | | <stock-select ref="child" @parentCall="parentCall"></stock-select> |
| | | <selected-stock |
| | | ref="selectedStock" |
| | | @parentCall="parentCall" |
| | | ></selected-stock> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | import VolForm from "@/components/basic/VolForm.vue"; |
| | | import StockSelect from "./StockSelect.vue"; |
| | | import SelectedStock from "./SelectedStock.vue"; |
| | | export default { |
| | | components: { VolBox, VolForm, StockSelect, SelectedStock }, |
| | | data() { |
| | | return { |
| | | row: null, |
| | | showDetialBox: false, |
| | | flag: false, |
| | | currentRow: null, |
| | | selection: [], |
| | | tableData: [], |
| | | tableColumns: [ |
| | | { |
| | | prop: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "orderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | field: "targetAddressCode", |
| | | title: "线边ä»å°åç ", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "width", |
| | | title: "è£å宽", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | prop: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "int", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "overOutQuantity", |
| | | title: "å·²åºæ°é", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "tag", |
| | | width: 180, |
| | | bindKey: "orderDetailStatusEnum", |
| | | }, |
| | | { |
| | | prop: "assignStock", |
| | | title: "æå®åºå", |
| | | type: "icon", |
| | | width: 90, |
| | | icon: "el-icon-s-grid", |
| | | }, |
| | | { |
| | | prop: "viewDetail", |
| | | title: "åºåºè¯¦ç»", |
| | | type: "icon", |
| | | width: 90, |
| | | icon: "el-icon-s-operation", |
| | | }, |
| | | { |
| | | prop: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | }, |
| | | { |
| | | prop: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | paginations: { |
| | | sort: "id", |
| | | order: "desc", |
| | | Foots: "", |
| | | total: 0, |
| | | // 2020.08.29å¢å èªå®ä¹å页æ¡å¤§å° |
| | | sizes: [30, 60, 100, 120], |
| | | size: 30, // é»è®¤åé¡µå¤§å° |
| | | Wheres: [], |
| | | page: 1, |
| | | rows: 30, |
| | | }, |
| | | searchFormOptions: [ |
| | | [ |
| | | { |
| | | title: "åæ®ç¼å·", |
| | | field: "allocation_code", |
| | | type: "like", |
| | | }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | | field: "allocation_type", |
| | | type: "select", |
| | | dataKey: "OrderType", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "allocation_state", |
| | | type: "select", |
| | | dataKey: "OrderState", |
| | | data: [], |
| | | }, |
| | | ], |
| | | ], |
| | | searchFormFields: { |
| | | allocation_code: "", |
| | | allocation_type: "", |
| | | allocation_state: "", |
| | | }, |
| | | dictionaryList: null, |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | this.getDictionaryData(); |
| | | this.getData(); |
| | | }, |
| | | getData() { |
| | | var wheres = [{ name: "orderId", value: this.row.id }]; |
| | | var param = { |
| | | page: this.paginations.page, |
| | | rows: this.paginations.rows, |
| | | sort: this.paginations.sort, |
| | | order: this.paginations.order, |
| | | wheres: JSON.stringify(wheres), // æ¥è¯¢æ¡ä»¶ï¼æ ¼å¼ä¸º[{ name: "åæ®µ", value: "xx" }] |
| | | }; |
| | | this.http |
| | | .post("api/MesPPCutOutboundOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | // console.log(x.rows); |
| | | this.tableData = x.rows; |
| | | }); |
| | | }, |
| | | tableButtonClick(row, column) { |
| | | if (column.prop == "assignStock") { |
| | | this.$refs.child.open(row); |
| | | } else { |
| | | //ç¹å»æå¼åºåºè¯¦æ
|
| | | this.$refs.selectedStock.open(row); |
| | | } |
| | | }, |
| | | lockstocks() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | this.http |
| | | .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }, |
| | | outbound() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | |
| | | this.http |
| | | .post("api/Task/GenerateOutboundTasks", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }, |
| | | setCurrent(row) { |
| | | this.$refs.singleTable.setCurrentRow(row); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.currentRow = val; |
| | | }, |
| | | getButtonEnable(propName, row) { |
| | | if (propName == "assignStock") { |
| | | if ( |
| | | row.orderDetailStatus !== 0 && |
| | | row.orderDetailStatus !== 60 && |
| | | row.orderDetailStatus !== 70 && |
| | | row.orderDetailStatus !== 80 |
| | | ) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | return false; |
| | | }, |
| | | parentCall(fun) { |
| | | if (typeof fun != "function") { |
| | | return console.log("æ©å±ç»ä»¶éè¦ä¼ å
¥ä¸ä¸ªåè°æ¹æ³æè½è·åç¶çº§Vue对象"); |
| | | } |
| | | fun(this); |
| | | }, |
| | | handleRowClick(row) { |
| | | this.$refs.singleTable.toggleRowSelection(row); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | }, |
| | | getDictionaryData() { |
| | | if (this.dictionaryList) { |
| | | return; |
| | | } |
| | | var param = []; |
| | | this.tableColumns.forEach((x) => { |
| | | if (x.type == "tag" && x.bindKey != "") { |
| | | param.push(x.bindKey); |
| | | } |
| | | }); |
| | | this.http |
| | | .post("api/Sys_Dictionary/GetVueDictionary", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | if (x.length > 0) { |
| | | this.dictionaryList = x; |
| | | } |
| | | }); |
| | | }, |
| | | getDictionary(row, column) { |
| | | if (this.dictionaryList) { |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.prop]); |
| | | console.log(dicItem); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } else { |
| | | return row[column.prop]; |
| | | } |
| | | } else { |
| | | return row[column.prop]; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .text-button { |
| | | border: 0px; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .text-button:hover { |
| | | background-color: #f0f9eb !important; |
| | | } |
| | | |
| | | .el-table .warning-row { |
| | | background: oldlace; |
| | | } |
| | | |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .box-table .el-table tbody tr.current-row > td { |
| | | background-color: #f0f9eb !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .el-table .success-row { |
| | | background: #f0f9eb; |
| | | } |
| | | |
| | | .box-table .el-table { |
| | | border: 1px solid #ebeef5; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <vol-box |
| | | v-model="showDetialBox" |
| | | :lazy="true" |
| | | width="75%" |
| | | :padding="15" |
| | | title="åæ®æç»ä¿¡æ¯" |
| | | > |
| | | <div class="box-head"> |
| | | <el-alert :closable="false" style="width: 100%"> |
| | | <el-row> |
| | | <el-col :span="16"> |
| | | <span>å·²éä¸ {{ selection.length }} 项</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px" |
| | | @click="lockstocks" |
| | | >éå®åºå</el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="outbound" |
| | | >ç´æ¥åºåº</el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px; margin-right: 10px" |
| | | @click="getData" |
| | | >å·æ°</el-link |
| | | ></el-col |
| | | > |
| | | </el-row> |
| | | </el-alert> |
| | | </div> |
| | | <div class="box-table" style="margin-top: 1%"> |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="tableData" |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | @current-change="handleCurrentChange" |
| | | height="500px" |
| | | @row-click="handleRowClick" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | label="åºå·" |
| | | type="index" |
| | | fixed="left" |
| | | width="55" |
| | | align="center" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" |
| | | :key="index" |
| | | :prop="item.prop" |
| | | :label="item.title" |
| | | :width="item.width" |
| | | align="center" |
| | | > |
| | | <template #default="scoped"> |
| | | <div v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-link |
| | | type="primary" |
| | | :disabled="getButtonEnable(item.prop, scoped.row)" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i :class="item.icon" style="font-size: 22px"></i></el-link |
| | | ></el-tooltip> |
| | | </div> |
| | | |
| | | <div v-else-if="item.type == 'tag'"> |
| | | <el-tag size="small"> |
| | | {{ getDictionary(scoped.row, item) }} |
| | | </el-tag> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </vol-box> |
| | | <stock-select ref="child" @parentCall="parentCall"></stock-select> |
| | | <selected-stock |
| | | ref="selectedStock" |
| | | @parentCall="parentCall" |
| | | ></selected-stock> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | import VolForm from "@/components/basic/VolForm.vue"; |
| | | import StockSelect from "./StockSelect.vue"; |
| | | import SelectedStock from "./SelectedStock.vue"; |
| | | export default { |
| | | components: { VolBox, VolForm, StockSelect, SelectedStock }, |
| | | data() { |
| | | return { |
| | | row: null, |
| | | showDetialBox: false, |
| | | flag: false, |
| | | currentRow: null, |
| | | selection: [], |
| | | tableData: [], |
| | | tableColumns: [ |
| | | { |
| | | prop: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "orderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "warehouse", |
| | | title: "åºåº", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "carrierCode", |
| | | title: "è½½å
·å·", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | // { |
| | | // prop: "orderQuantity", |
| | | // title: "åæ®æ°é", |
| | | // type: "string", |
| | | // width: 90, |
| | | // }, |
| | | // { |
| | | // prop: "lockQuantity", |
| | | // title: "é宿°é", |
| | | // type: "int", |
| | | // width: 90, |
| | | // }, |
| | | // { |
| | | // prop: "overOutQuantity", |
| | | // title: "å·²åºæ°é", |
| | | // type: "string", |
| | | // width: 90, |
| | | // }, |
| | | { |
| | | prop: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "tag", |
| | | width: 180, |
| | | bindKey: "orderDetailStatusEnum", |
| | | }, |
| | | // { |
| | | // prop: "assignStock", |
| | | // title: "æå®åºå", |
| | | // type: "icon", |
| | | // width: 90, |
| | | // icon: "el-icon-s-grid", |
| | | // }, |
| | | // { |
| | | // prop: "viewDetail", |
| | | // title: "åºåºè¯¦ç»", |
| | | // type: "icon", |
| | | // width: 90, |
| | | // icon: "el-icon-s-operation", |
| | | // }, |
| | | { |
| | | prop: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | }, |
| | | { |
| | | prop: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | paginations: { |
| | | sort: "id", |
| | | order: "desc", |
| | | Foots: "", |
| | | total: 0, |
| | | // 2020.08.29å¢å èªå®ä¹å页æ¡å¤§å° |
| | | sizes: [30, 60, 100, 120], |
| | | size: 30, // é»è®¤åé¡µå¤§å° |
| | | Wheres: [], |
| | | page: 1, |
| | | rows: 30, |
| | | }, |
| | | searchFormOptions: [ |
| | | [ |
| | | { |
| | | title: "åæ®ç¼å·", |
| | | field: "allocation_code", |
| | | type: "like", |
| | | }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | | field: "allocation_type", |
| | | type: "select", |
| | | dataKey: "OrderType", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "allocation_state", |
| | | type: "select", |
| | | dataKey: "OrderState", |
| | | data: [], |
| | | }, |
| | | ], |
| | | ], |
| | | searchFormFields: { |
| | | allocation_code: "", |
| | | allocation_type: "", |
| | | allocation_state: "", |
| | | }, |
| | | dictionaryList: null, |
| | | }; |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | | this.getDictionaryData(); |
| | | this.getData(); |
| | | }, |
| | | getData() { |
| | | var wheres = [{ name: "orderId", value: this.row.id }]; |
| | | var param = { |
| | | page: this.paginations.page, |
| | | rows: this.paginations.rows, |
| | | sort: this.paginations.sort, |
| | | order: this.paginations.order, |
| | | wheres: JSON.stringify(wheres), // æ¥è¯¢æ¡ä»¶ï¼æ ¼å¼ä¸º[{ name: "åæ®µ", value: "xx" }] |
| | | }; |
| | | this.http |
| | | .post("api/MesPPOutboundOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | // console.log(x.rows); |
| | | this.tableData = x.rows; |
| | | }); |
| | | }, |
| | | tableButtonClick(row, column) { |
| | | if (column.prop == "assignStock") { |
| | | this.$refs.child.open(row); |
| | | } else { |
| | | //ç¹å»æå¼åºåºè¯¦æ
|
| | | this.$refs.selectedStock.open(row); |
| | | } |
| | | }, |
| | | lockstocks() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | this.http |
| | | .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }, |
| | | outbound() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | |
| | | this.http |
| | | .post("api/Task/GenerateOutboundTasks", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }, |
| | | setCurrent(row) { |
| | | this.$refs.singleTable.setCurrentRow(row); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.currentRow = val; |
| | | }, |
| | | getButtonEnable(propName, row) { |
| | | if (propName == "assignStock") { |
| | | if ( |
| | | row.orderDetailStatus !== 0 && |
| | | row.orderDetailStatus !== 60 && |
| | | row.orderDetailStatus !== 70 && |
| | | row.orderDetailStatus !== 80 |
| | | ) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | return false; |
| | | }, |
| | | parentCall(fun) { |
| | | if (typeof fun != "function") { |
| | | return console.log("æ©å±ç»ä»¶éè¦ä¼ å
¥ä¸ä¸ªåè°æ¹æ³æè½è·åç¶çº§Vue对象"); |
| | | } |
| | | fun(this); |
| | | }, |
| | | handleRowClick(row) { |
| | | this.$refs.singleTable.toggleRowSelection(row); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | }, |
| | | getDictionaryData() { |
| | | if (this.dictionaryList) { |
| | | return; |
| | | } |
| | | var param = []; |
| | | this.tableColumns.forEach((x) => { |
| | | if (x.type == "tag" && x.bindKey != "") { |
| | | param.push(x.bindKey); |
| | | } |
| | | }); |
| | | this.http |
| | | .post("api/Sys_Dictionary/GetVueDictionary", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | if (x.length > 0) { |
| | | this.dictionaryList = x; |
| | | } |
| | | }); |
| | | }, |
| | | getDictionary(row, column) { |
| | | if (this.dictionaryList) { |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.prop]); |
| | | console.log(dicItem); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } else { |
| | | return row[column.prop]; |
| | | } |
| | | } else { |
| | | return row[column.prop]; |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .text-button { |
| | | border: 0px; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | .text-button:hover { |
| | | background-color: #f0f9eb !important; |
| | | } |
| | | |
| | | .el-table .warning-row { |
| | | background: oldlace; |
| | | } |
| | | |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .box-table .el-table tbody tr.current-row > td { |
| | | background-color: #f0f9eb !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .el-table .success-row { |
| | | background: #f0f9eb; |
| | | } |
| | | |
| | | .box-table .el-table { |
| | | border: 1px solid #ebeef5; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/mesPPCutOutOrderDetail.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import gridBody from './extend/mesPPoutOrderDetail.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ©å±é¡µé¢åå§åæä½ |
| | | this.columns.push({ |
| | | field: 'æä½', |
| | | title: 'æä½', |
| | | width: 90, |
| | | fixed: 'right', |
| | | align: 'center', |
| | | formatter: (row) => { |
| | | return ( |
| | | '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">æ¥çæç»</i>' |
| | | ); |
| | | }, |
| | | click: (row) => { |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | return true; |
| | | }, |
| | | searchAfter(result) { |
| | | //æ¥è¯¢åï¼resultè¿åçæ¥è¯¢æ°æ®,å¯ä»¥å¨æ¾ç¤ºå°è¡¨æ ¼åå¤çè¡¨æ ¼çå¼ |
| | | return true; |
| | | }, |
| | | addBefore(formData) { |
| | | //æ°å»ºä¿ååformData为对象ï¼å
æ¬æç»è¡¨ï¼å¯ä»¥ç»ç»è¡¨å设置å¼ï¼èªå·±è¾åºçformDataçå¼ |
| | | return true; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | | //æ¥è¯¢çé¢ç¹å»è¡äºä»¶ |
| | | this.$refs.table.$refs.table.toggleRowSelection(row); //åå»è¡æ¶éä¸å½åè¡; |
| | | }, |
| | | modelOpenAfter(row) { |
| | | //ç¹å»ç¼è¾ãæ°å»ºæé®å¼¹åºæ¡åï¼å¯ä»¥å¨æ¤å¤åé»è¾ï¼å¦ï¼ä»åå°è·åæ°æ® |
| | | //(1)夿æ¯ç¼è¾è¿æ¯æ°å»ºæä½ï¼ this.currentAction=='Add'; |
| | | //(2)ç»å¼¹åºæ¡è®¾ç½®é»è®¤å¼ |
| | | //(3)this.editFormFields.åæ®µ='xxx'; |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | |
| | | name: 'mesOutboundOrder', |
| | | component: () => import('@/views/outbound/mesOutboundOrder.vue') |
| | | }, { |
| | | path: '/mesPPOutboundOrder', |
| | | name: 'mesPPOutboundOrder', |
| | | component: () => import('@/views/outbound/mesPPOutboundOrder.vue') |
| | | },{ |
| | | path: '/mesPPOutboundOrderDetail', |
| | | name: 'mesPPOutboundOrderDetail', |
| | | component: () => import('@/views/outbound/mesPPOutboundOrderDetail.vue') |
| | | },{ |
| | | path: '/mesPPCutOutboundOrder', |
| | | name: 'mesPPCutOutboundOrder', |
| | | component: () => import('@/views/outbound/mesPPCutOutboundOrder.vue') |
| | | }, { |
| | | path: '/mesPPCutOutboundOrderDetail', |
| | | name: 'mesPPCutOutboundOrderDetail', |
| | | component: () => import('@/views/outbound/mesPPCutOutboundOrderDetail.vue') |
| | | },{ |
| | | path: '/returnOrder', |
| | | name: 'returnOrder', |
| | | component: () => import('@/views/inbound/returnOrder.vue') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/mesPPCutOutboundOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "PPä»å°å·MESåºåºå", |
| | | name: "mesPPCutOutboundOrder", |
| | | url: "/mesPPCutOutboundOrder/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | orderType: "", |
| | | orderNo: "", |
| | | upperOrderNo: "", |
| | | orderStatus: "", |
| | | remark: "", |
| | | warehouseId: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "åæ®ç±»å", |
| | | required: true, |
| | | field: "orderType", |
| | | type: "select", |
| | | dataKey: "outOrderType", |
| | | data: [], |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | readonly: true, |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "orderStatus", |
| | | type: "select", |
| | | dataKey: "inboundState", |
| | | data: [], |
| | | readonly: true, |
| | | }, |
| | | { |
| | | title: "ä»åº", |
| | | field: "warehouseId", |
| | | type: "select", |
| | | dataKey: "warehouses", |
| | | data: [], |
| | | required: true, |
| | | }, |
| | | { |
| | | title: "夿³¨", |
| | | field: "remark", |
| | | type: "textarea", |
| | | }, |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | orderNo: "", |
| | | upperOrderNo: "", |
| | | orderType: "", |
| | | orderStatus: "", |
| | | createType: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "orderNo", type: "like" }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | | field: "orderType", |
| | | type: "select", |
| | | dataKey: "outOrderType", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "orderStatus", |
| | | type: "select", |
| | | dataKey: "outboundStatusEnum", |
| | | data: [], |
| | | }, |
| | | ], |
| | | [ |
| | | { |
| | | title: "å建æ¹å¼", |
| | | field: "createType", |
| | | type: "select", |
| | | dataKey: "createType", |
| | | data: [], |
| | | }, |
| | | { title: "å建è
", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | width: 160, |
| | | align: "left", |
| | | // link: true |
| | | }, |
| | | { |
| | | field: "orderType", |
| | | title: "åæ®ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "outOrderType", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderStatus", |
| | | title: "åæ®ç¶æ", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "outboundStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "createType", |
| | | title: "å建æ¹å¼", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "createType", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "åºåºæç»å", |
| | | table: "OnboundOrderDetail", |
| | | columns: [ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "string" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "number" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "rowNo", |
| | | title: "è¡å·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "number" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "overOutQuantity", |
| | | title: "å·²åºæ°é", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "orderDetailStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "LayerCode", |
| | | title: "å±å«", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "Sequence", |
| | | title: "åºå", |
| | | type: "int", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ], |
| | | sortName: "id", |
| | | key: "id", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/mesPPCutOutboundOrderDetail.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "åºåºåæç»", |
| | | name: "mesPPCutOutboundOrderDetail", |
| | | url: "/mesPPCutOutboundOrderDetail/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | deviceCode: "", |
| | | deviceName: "", |
| | | deviceType: "", |
| | | deviceStatus: "", |
| | | deviceIp: "", |
| | | devicePort: "", |
| | | devicePlcType: "", |
| | | deviceRemark: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "设å¤ç¼å·", |
| | | required: true, |
| | | field: "deviceCode", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤åç§°", |
| | | required: true, |
| | | field: "deviceName", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤ç±»å", |
| | | required: true, |
| | | field: "deviceType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "设å¤ç¶æ", |
| | | required: true, |
| | | field: "deviceStatus", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | [ |
| | | { title: "设å¤IP", required: true, field: "deviceIp", type: "string" }, |
| | | { |
| | | title: "设å¤ç«¯å£", |
| | | required: true, |
| | | field: "devicePort", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "PLCç±»å", |
| | | required: true, |
| | | field: "devicePlcType", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "夿³¨", |
| | | field: "deviceRemark", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | deviceCode: "", |
| | | deviceType: "", |
| | | deviceStatus: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "设å¤ç¼å·", field: "deviceCode" }, |
| | | { title: "设å¤ç±»å", field: "deviceType" }, |
| | | { title: "设å¤ç¶æ", field: "deviceStatus" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "overOutQuantity", |
| | | title: "å·²åºæ°é", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "targetAddressCode", |
| | | title: "线边ä»å°åç ", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "width", |
| | | title: "è£å宽", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "LayerCode", |
| | | title: "å±å«", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "Sequence", |
| | | title: "åºå", |
| | | type: "int", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/mesPPOutboundOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "PPä»å¤§å·MESåºåºå", |
| | | name: "mesPPOutboundOrder", |
| | | url: "/mesPPOutboundOrder/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([[]]); |
| | | const searchFormFields = ref({ |
| | | orderNo: "", |
| | | materialCode: "", |
| | | batchNo: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "orderNo", type: "like" }, |
| | | { title: "ç©æç¼å·", field: "materialCode", type: "like" }, |
| | | { title: "æ¹æ¬¡å·", field: "batchNo", type: "like" }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "æå±ä»åº", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "taskNo", |
| | | title: "ä»»å¡åå·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | // { |
| | | // field: "batchNo", |
| | | // title: "æ¹æ¬¡å·", |
| | | // type: "decimal", |
| | | // width: 90, |
| | | // align: "left", |
| | | // }, |
| | | { |
| | | field: "OrderStatus", |
| | | title: "订åç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "orderDetailStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "materialCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 200, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materialName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createType", |
| | | title: "å建æ¹å¼", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "createType", data: [] }, |
| | | }, |
| | | { |
| | | field: "unit", |
| | | title: "åä½", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "overOutQuantity", |
| | | title: "å·²åºæ°é", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "line", |
| | | title: "线ä½", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "targetAddressCode", |
| | | title: "线边ä»å°åç ", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "width", |
| | | title: "è£å宽", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "åºåºæç»å", |
| | | table: "OnboundOrderDetail", |
| | | columns: [ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | { |
| | | field: "Warehouse", |
| | | title: "åºåº", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "CarrierCode", |
| | | title: "è½½å
·å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | bind: { key: "orderDetailStatusEnum", data: [] }, |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ], |
| | | sortName: "id", |
| | | key: "id", |
| | | }); |
| | | |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/mesPPOutboundOrderDetail.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "PPä»å¤§å·MESåºåºåæç»", |
| | | name: "mesPPOutboundOrderDetail", |
| | | url: "/mesPPOutboundOrderDetail/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | orderNo: "", |
| | | materialCode: "", |
| | | batchNo: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "orderNo", type:"like" }, |
| | | { title: "ç©æç¼å·", field: "materialCode" ,type:"like"}, |
| | | { title: "æ¹æ¬¡å·", field: "batchNo" ,type:"like"}, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "OrderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "Warehouse", |
| | | title: "åºåº", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "CarrierCode", |
| | | title: "è½½å
·å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createType", |
| | | title: "å建æ¹å¼", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "createType", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | |
| | | { |
| | | return QueryData(x => x.LocationCode, x => x.WarehouseId == warehouseId && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·åMESæå®å¯åºåºè´§ä½ç¼å· |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | public List<string> GetCanOutLocationCodes(string locationcode) |
| | | { |
| | | return QueryData(x => x.LocationCode, x => x.LocationCode == locationcode && x.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && (x.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || x.EnableStatus == EnableStatusEnum.Normal.ObjToInt())).Distinct().ToList(); |
| | | } |
| | | } |
| | | } |
| | |
| | | /// |
| | | /// </summary> |
| | | public DateTime DataTime { get; set; } |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | /// <summary> |
| | | /// æ°é |
| | | /// </summary> |
| | | public float Quantity { get; set; } |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// åºåº |
| | | /// </summary> |
| | | public string Warehouse { get; set; } |
| | | /// <summary> |
| | | /// åºåºåç§° |
| | | /// </summary> |
| | | public string WarehouseName { get; set; } |
| | | /// <summary> |
| | | /// è£åå宽度 |
| | | /// </summary> |
| | | public float CutedWidth { get; set; } |
| | | /// <summary> |
| | | /// è½½å
·å· |
| | | /// </summary> |
| | | public string CarrierCode { get; set; } |
| | | /// <summary> |
| | | /// ç©ææ¹æ¬¡ |
| | | /// </summary> |
| | | public string MaterialLot { get; set; } |
| | | |
| | | public static MesResponseContent Instance |
| | | { |
| | |
| | | { |
| | | public string Contacts { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// PPåºåæ¥è¯¢ï¼åå¤MES |
| | | /// </summary> |
| | | public class QueryPpByWidthModelCount |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// PP大å·åºåº |
| | | /// </summary> |
| | | public class PPSubsectionOutModel |
| | | { |
| | | /// <summary> |
| | | /// ä»»å¡åå· |
| | | /// </summary> |
| | | public string TaskNo { get; set; } |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | public string MaterialName { get; set; } |
| | | /// <summary> |
| | | /// éæ±æ°é |
| | | /// </summary> |
| | | public float RequiredQuantity { get; set; } |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// 线边ä»å°åç |
| | | /// </summary> |
| | | public string TargetAddressCode { get; set; } |
| | | /// <summary> |
| | | /// è£å宽 |
| | | /// </summary> |
| | | public float Width { get; set; } |
| | | /// <summary> |
| | | /// è½½å
·å表 |
| | | /// </summary> |
| | | public List<CarrierInfo> Carriers { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// è½½å
·å表æç» |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class CarrierInfo |
| | | { |
| | | /// <summary> |
| | | /// åºåº |
| | | /// </summary> |
| | | public string Warehouse { get; set; } |
| | | /// <summary> |
| | | /// è½½å
·å· |
| | | /// </summary> |
| | | public string CarrierCode { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// ppå°å·åºåº |
| | | /// </summary> |
| | | public class PPCutOutModle |
| | | { |
| | | /// <summary> |
| | | /// ä»»å¡åå· |
| | | /// </summary> |
| | | public string TaskNo { get; set; } |
| | | /// <summary> |
| | | /// ç©æè¯¦æ
|
| | | /// </summary> |
| | | public List<MaterialDetail> MaterialDetails { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// ç©æè¯¦æ
æç» |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class MaterialDetail |
| | | { |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | public string MaterialName { get; set; } |
| | | /// <summary> |
| | | /// éæ±æ°é |
| | | /// </summary> |
| | | public float RequiredQuantity { get; set; } |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// å±å« |
| | | /// </summary> |
| | | public string LayerCode { get; set; } |
| | | /// <summary> |
| | | /// åºå |
| | | /// </summary> |
| | | public int Sequence { get; set; } |
| | | /// <summary> |
| | | /// 线边ä»å°å |
| | | /// </summary> |
| | | public string TargetAddressCode { get; set; } |
| | | /// <summary> |
| | | /// è£å宽 |
| | | /// </summary> |
| | | public float Width { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// PPå
¥åº |
| | | /// </summary> |
| | | public class PPBackModel |
| | | { |
| | | /// <summary> |
| | | /// æºå°åç |
| | | /// </summary> |
| | | public string SourceAddressCode { get; set; } |
| | | /// <summary> |
| | | ///è½½å
·å· |
| | | /// </summary> |
| | | public string CarrierCode { get; set; } |
| | | /// <summary> |
| | | /// æ¹æ¬¡ä¿¡æ¯ |
| | | /// </summary> |
| | | public List<MaterialLotInfo> MaterialLotInfo { get; set; } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// æ¹æ¬¡ä¿¡æ¯æç» |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class MaterialLotInfo |
| | | { |
| | | /// <summary> |
| | | /// ç©ææ¹æ¬¡ |
| | | /// </summary> |
| | | public string MaterialLot { get; set; } |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | /// <summary> |
| | | /// éåºæ°é |
| | | /// </summary> |
| | | public float Quantity { get; set; } |
| | | /// <summary> |
| | | /// è£åå宽度 |
| | | /// </summary> |
| | | public float CutedWidth { get; set; } |
| | | /// <summary> |
| | | /// åç©ææ¹æ¬¡å· |
| | | /// </summary> |
| | | public string MaterialLotOld { get; set; } |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | public string Unit { get; set; } |
| | | /// <summary> |
| | | /// çäº§æ¥æ |
| | | /// </summary> |
| | | public string ProductionDate { get; set; } |
| | | /// <summary> |
| | | /// æææ |
| | | /// </summary> |
| | | public string ExpirationDate { get; set; } |
| | | } |
| | | /// <summary> |
| | | /// PPåºåæ¥è¯¢ |
| | | /// </summary> |
| | | public class QueryPpByWidthModel |
| | | { |
| | | /// <summary> |
| | | /// ç©æç¼ç |
| | | /// </summary> |
| | | public string MaterialCode { get; set; } |
| | | /// <summary> |
| | | /// è£åå宽度 |
| | | /// </summary> |
| | | public float CutedWidth { get; set; } |
| | | /// <summary> |
| | | /// åºåºç±»å |
| | | /// </summary> |
| | | public int WarehouseType { get; set; } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | List<string> GetCanOutLocationCodes(int warehouseId); |
| | | |
| | | /// <summary> |
| | | /// è·åMESæå®å¯åºåºè´§ä½ç¼å· |
| | | /// </summary> |
| | | /// <param name="warehouseId"></param> |
| | | /// <returns></returns> |
| | | List<string> GetCanOutLocationCodes(string locationcode); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | public interface IMesPPBackInboundOrderDetailRepository : IRepository<Dt_MesPPBackInboundOrderDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IInboundRepository |
| | | { |
| | | public interface IMesPPBackInboundOrderRepository : IRepository<Dt_MesPPBackInboundOrder> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | public interface IMesPPBackInboundOrderDetailService : IService<Dt_MesPPBackInboundOrderDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | |
| | | namespace WIDESEA_IInboundService |
| | | { |
| | | public interface IMesPPBackInboundOrderService : IService<Dt_MesPPBackInboundOrder> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | public interface IMesPPCutOutboundOrderDetailRepository : IRepository<Dt_MesPPCutOutboundOrderDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | public interface IMesPPCutOutboundOrderRepository : IRepository<Dt_MesPPCutOutboundOrder> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | public interface IMesPPOutboundOrderDetailRepository : IRepository<Dt_MesPPOutboundOrderDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundRepository |
| | | { |
| | | public interface IMesPPOutboundOrderRepository : IRepository<Dt_MesPPOutboundOrder> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IMesPPCutOutboundOrderDetailService : IService<Dt_MesPPCutOutboundOrderDetail> |
| | | { |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IMesPPCutOutboundOrderService : IService<Dt_MesPPCutOutboundOrder> |
| | | { |
| | | IMesPPCutOutboundOrderRepository Repository { get; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Microsoft.AspNetCore.Hosting.Server; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IMesPPOutboundOrderDetailService : IService<Dt_MesPPOutboundOrderDetail> |
| | | { |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | | public interface IMesPPOutboundOrderService : IService<Dt_MesPPOutboundOrder> |
| | | { |
| | | IMesPPOutboundOrderRepository Repository { get; } |
| | | |
| | | (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPOutboundOrder mesOutboundOrder); |
| | | |
| | | (List<Dt_StockInfo>, Dt_MesPPCutOutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPCutOutboundOrder mesPPOutboundOrder, Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail); |
| | | } |
| | | } |
| | |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | |
| | | Dt_OutStockLockInfo GetOutStockLockInfo(Dt_OutboundOrder outboundOrder, Dt_OutboundOrderDetail outboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// PP大å·åºåº |
| | | /// </summary> |
| | | /// <param name="mesOutboundOrder"></param> |
| | | /// <param name="outStock"></param> |
| | |
| | | Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesOutboundOrder mesOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); |
| | | |
| | | /// <summary> |
| | | /// PPå°å·åºåº |
| | | /// </summary> |
| | | /// <param name="mesOutboundOrder"></param> |
| | | /// <param name="outStock"></param> |
| | | /// <param name="assignQuantity"></param> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder,Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="mesOutboundOrder"></param> |
| | | /// <param name="outStock"></param> |
| | | /// <param name="assignQuantity"></param> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesPPOutboundOrder mesPPOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="orderDetailId"></param> |
| | |
| | | IOutboundOrderService OutboundOrderService { get; } |
| | | |
| | | IOutStockLockInfoService OutboundStockLockInfoService { get; } |
| | | |
| | | IMesPPOutboundOrderService MesPPOutboundOrderService { get; } |
| | | |
| | | IMesPPOutboundOrderDetailService MesPPOutboundOrderDetailService { get; } |
| | | |
| | | IMesPPCutOutboundOrderService MesPPCutOutboundOrderService { get; } |
| | | |
| | | IMesPPCutOutboundOrderDetailService MesPPCutOutboundOrderDetailService { get; } |
| | | } |
| | | } |
| | |
| | | List<Dt_StockInfo> GetOutboundStocks(List<Dt_StockInfo> stockInfos, string materielCode, float needQuantity, out float residueQuantity); |
| | | |
| | | List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, int warehoseId); |
| | | |
| | | List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string palletcode,int warehoseId); |
| | | WebResponseContent StockQueryData(SaveModel saveModel); |
| | | } |
| | | } |
| | |
| | | MesResponseContent SubstrateBack(SubstrateBackModel model); |
| | | |
| | | /// <summary> |
| | | /// PP大å·åºåº-è¿è¡åå· |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | MesResponseContent PPSubsectionOut(PPSubsectionOutModel model); |
| | | |
| | | /// <summary> |
| | | /// PPå°å·åºåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | MesResponseContent PPCutOut(PPCutOutModle model); |
| | | |
| | | /// <summary> |
| | | /// PPå
¥åº(大å·ãå°å·ãå¼ æ) |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | MesResponseContent PPBack(PPBackModel model); |
| | | /// <summary> |
| | | /// PPåºåæ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | MesResponseContent QueryPpByWidth(QueryPpByWidthModel model); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="roadwayNos"></param> |
| | |
| | | /// <returns></returns> |
| | | WebResponseContent UpdateTaskInfo(WCSTaskDTO task); |
| | | |
| | | /// <summary> |
| | | /// PPä»agvæ¬è¿ä»»å¡ |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | | /// <returns></returns> |
| | | WebResponseContent AGVTasks(SaveModel saveModel); |
| | | |
| | | |
| | | WebResponseContent GeneratePKOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | public class MesPPBackInboundOrderDetailRepository : RepositoryBase<Dt_MesPPBackInboundOrderDetail>, IMesPPBackInboundOrderDetailRepository |
| | | { |
| | | public MesPPBackInboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_InboundRepository |
| | | { |
| | | public class MesPPBackInboundOrderRepository : RepositoryBase<Dt_MesPPBackInboundOrder>, IMesPPBackInboundOrderRepository |
| | | { |
| | | public MesPPBackInboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public class MesPPBackInboundOrderDetailService : ServiceBase<Dt_MesPPBackInboundOrderDetail, IMesPPBackInboundOrderDetailRepository>, IMesPPBackInboundOrderDetailService |
| | | { |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockService _stockService; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IMesPPBackInboundOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public MesPPBackInboundOrderDetailService(IMesPPBackInboundOrderDetailRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _stockService = stockService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_InboundService |
| | | { |
| | | public class MesPPBackInboundOrderService : ServiceBase<Dt_MesPPBackInboundOrder, IMesPPBackInboundOrderRepository>, IMesPPBackInboundOrderService |
| | | { |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockService _stockService; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IMesPPBackInboundOrderRepository Repository => BaseDal; |
| | | |
| | | public MesPPBackInboundOrderService(IMesPPBackInboundOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _stockService = stockService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using SqlSugar; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models.Inbound |
| | | { |
| | | /// <summary> |
| | | /// PPå
¥åºå |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_MesPPBackInboundOrder), "PPå
¥åºå")] |
| | | public class Dt_MesPPBackInboundOrder : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [CodeRule(RuleCodeEnum.InboundOrderRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·")] |
| | | public string InboundOrderNo { get; set; } |
| | | /// <summary> |
| | | /// åå°åç |
| | | /// </summary> |
| | | //[CodeRule(RuleCodeEnum.InboundOrderRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åå°åç ")] |
| | | public string SourceAddressCode { get; set; } |
| | | /// <summary> |
| | | /// è½½å
·å· |
| | | /// </summary> |
| | | //[CodeRule(RuleCodeEnum.InboundOrderRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "è½½å
·å·")] |
| | | public string CarrierCode { get; set; } |
| | | /// <summary> |
| | | /// åæ®ç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç±»å")] |
| | | public int OrderType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç¶æ")] |
| | | public int OrderStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¹å¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¹å¼")] |
| | | public int CreateType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºåæç» |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_MesPPBackInboundOrderDetail.OrderId), nameof(Id))] |
| | | public List<Dt_MesPPBackInboundOrderDetail> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using SqlSugar; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models.Inbound |
| | | { |
| | | /// <summary> |
| | | /// PPå
¥åºåæç» |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_MesPPBackInboundOrderDetail), "PPå
¥åºåæç»")] |
| | | public class Dt_MesPPBackInboundOrderDetail : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºåä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
¥åºå主é®")] |
| | | public int OrderId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string MaterialLot { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æè§æ ¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "ç©æè§æ ¼")] |
| | | public string MaterielSpec { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®æ°é")] |
| | | public float OrderQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç»çæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ç»çæ°é", DefaultValue = "0")] |
| | | public float ReceiptQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 䏿¶æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "䏿¶æ°é", DefaultValue = "0")] |
| | | public float OverInQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 订åæç»ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "订åæç»ç¶æ")] |
| | | public int OrderDetailStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¶è´§åæç»è¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "æ¶è´§åæç»è¡å·")] |
| | | public int RowNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | /// <summary> |
| | | /// è£å宽 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "è£å宽")] |
| | | public float CutedWidth { get; set; } |
| | | /// <summary> |
| | | /// åç©ææ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åç©ææ¹æ¬¡å·")] |
| | | public string MaterialLotOld { get; set; } |
| | | /// <summary> |
| | | /// çäº§æ¥æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "çäº§æ¥æ")] |
| | | public string ProductionDate { get; set; } |
| | | /// <summary> |
| | | /// æææ¥æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "æææ¥æ")] |
| | | public string EffectiveDate { get; set; } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using SqlSugar; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models.Outbound |
| | | { |
| | | /// <summary> |
| | | /// PPä»å°å·MESåºåºå |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_MesPPCutOutboundOrder))] |
| | | public class Dt_MesPPCutOutboundOrder : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [CodeRule(RuleCodeEnum.OutboundOrderRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·", IsOnlyIgnoreUpdate = true)] |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡åå· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ä»»å¡åå·")] |
| | | public string TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç±»å", IsOnlyIgnoreUpdate = true)] |
| | | public int OrderType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç¶æ")] |
| | | public int OrderStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¹å¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¹å¼", IsOnlyIgnoreUpdate = true)] |
| | | public int CreateType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåæç» |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_MesPPCutOutboundOrderDetail.OrderId), nameof(Id))] |
| | | public List<Dt_MesPPCutOutboundOrderDetail> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// PPä»å°å·MESåºåºåæç» |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_MesPPCutOutboundOrderDetail), "PPä»å°å·MESåºåºåæç»")] |
| | | public class Dt_MesPPCutOutboundOrderDetail : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºå主é®")] |
| | | public int OrderId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterielCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterielName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¹æ¬¡å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "æ¹æ¬¡å·")] |
| | | public string BatchNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®æ°é")] |
| | | public float OrderQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宿°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "é宿°é", DefaultValue = "0")] |
| | | public float LockQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²åºæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å·²åºæ°é", DefaultValue = "0")] |
| | | public float OverOutQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 订åæç»ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "订åæç»ç¶æ")] |
| | | public int OrderDetailStatus { get; set; } |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å±å« |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "å±å«")] |
| | | public string LayerCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºå |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºå")] |
| | | public int Sequence { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è£å宽 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "è£å宽")] |
| | | public float Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 线边ä»å°åç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "线边ä»å°åç ")] |
| | | public string TargetAddressCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 夿³¨ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "夿³¨")] |
| | | public string Remark { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.DB.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_Model.Models |
| | | { |
| | | /// <summary> |
| | | /// PPä»å¤§å·MESåºåºå |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_MesPPOutboundOrder))] |
| | | public class Dt_MesPPOutboundOrder : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [CodeRule(RuleCodeEnum.OutboundOrderRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·", IsOnlyIgnoreUpdate = true)] |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡åå· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ä»»å¡åå·")] |
| | | public string TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç±»å", IsOnlyIgnoreUpdate = true)] |
| | | public int OrderType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç¶æ")] |
| | | public int OrderStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¹å¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¹å¼", IsOnlyIgnoreUpdate = true)] |
| | | public int CreateType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æç¼å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ç©æç¼å·")] |
| | | public string MaterialCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ç©æåç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 200, ColumnDescription = "ç©æåç§°")] |
| | | public string MaterialName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åä½")] |
| | | public string Unit { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®æ°é")] |
| | | public float OrderQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宿°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "é宿°é", DefaultValue = "0")] |
| | | public float LockQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²åºæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å·²åºæ°é", DefaultValue = "0")] |
| | | public float OverOutQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// çº¿ä½ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "线ä½")] |
| | | public string Line { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 线边ä»å°åç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "线边ä»å°åç ")] |
| | | public string TargetAddressCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è£å宽 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "è£å宽")] |
| | | public float Width { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºåæç» |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_MesPPOutboundOrderDetail.OrderId), nameof(Id))] |
| | | public List<Dt_MesPPOutboundOrderDetail> Details { get; set; } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using SqlSugar; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models.Outbound |
| | | { |
| | | /// <summary> |
| | | /// PPä»å¤§å·MESåºåºåæç» |
| | | /// </summary> |
| | | [SugarTable(nameof(Dt_MesPPOutboundOrderDetail))] |
| | | public class Dt_MesPPOutboundOrderDetail : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int OrderId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåº |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åºåº")] |
| | | public string Warehouse { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è½½å
·å· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "è½½å
·å·")] |
| | | public string CarrierCode { get; set; } |
| | | /// <summary> |
| | | /// 订åæç»ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false,ColumnDescription = "订åæç»ç¶æ")] |
| | | public int OrderDetailStatus { get; set; } |
| | | } |
| | | } |
| | |
| | | public float StockQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// è£åå宽度 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "è£åå宽度")] |
| | | public float CutedWidth { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåºæ°é", DefaultValue = "0")] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | public class MesPPCutOutboundOrderDetailRepository : RepositoryBase<Dt_MesPPCutOutboundOrderDetail>, IMesPPCutOutboundOrderDetailRepository |
| | | { |
| | | public MesPPCutOutboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | public class MesPPCutOutboundOrderRepository : RepositoryBase<Dt_MesPPCutOutboundOrder>, IMesPPCutOutboundOrderRepository |
| | | { |
| | | public MesPPCutOutboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | public class MesPPOutboundOrderDetailRepository : RepositoryBase<Dt_MesPPOutboundOrderDetail>, IMesPPOutboundOrderDetailRepository |
| | | { |
| | | public MesPPOutboundOrderDetailRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_OutboundRepository |
| | | { |
| | | public class MesPPOutboundOrderRepository : RepositoryBase<Dt_MesPPOutboundOrder>, IMesPPOutboundOrderRepository |
| | | { |
| | | public MesPPOutboundOrderRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage) |
| | | { |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | using WIDESEA_OutboundRepository; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public class MesPPCutOutboundOrderDetailService : ServiceBase<Dt_MesPPCutOutboundOrderDetail, IMesPPCutOutboundOrderDetailRepository>, IMesPPCutOutboundOrderDetailService |
| | | { |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockService _stockService; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IMesPPCutOutboundOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public MesPPCutOutboundOrderDetailService(IMesPPCutOutboundOrderDetailRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _stockService = stockService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | using WIDESEA_OutboundRepository; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public class MesPPCutOutboundOrderService : ServiceBase<Dt_MesPPCutOutboundOrder, IMesPPCutOutboundOrderRepository>, IMesPPCutOutboundOrderService |
| | | { |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockService _stockService; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IMesPPCutOutboundOrderRepository Repository => BaseDal; |
| | | |
| | | public MesPPCutOutboundOrderService(IMesPPCutOutboundOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _stockService = stockService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | using WIDESEA_OutboundRepository; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public class MesPPOutboundOrderDetailService : ServiceBase<Dt_MesPPOutboundOrderDetail, IMesPPOutboundOrderDetailRepository>, IMesPPOutboundOrderDetailService |
| | | { |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockService _stockService; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IMesPPOutboundOrderDetailRepository Repository => BaseDal; |
| | | |
| | | public MesPPOutboundOrderDetailService(IMesPPOutboundOrderDetailRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _stockService = stockService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | using WIDESEA_OutboundRepository; |
| | | |
| | | namespace WIDESEA_OutboundService |
| | | { |
| | | public class MesPPOutboundOrderService : ServiceBase<Dt_MesPPOutboundOrder, IMesPPOutboundOrderRepository>, IMesPPOutboundOrderService |
| | | { |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IStockService _stockService; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | public IMesPPOutboundOrderRepository Repository => BaseDal; |
| | | |
| | | public MesPPOutboundOrderService(IMesPPOutboundOrderRepository BaseDal, IBasicRepository basicRepository, IStockService stockService, IOutStockLockInfoService outStockLockInfoService, IBasicService basicService, IRecordService recordService) : base(BaseDal) |
| | | { |
| | | _basicRepository = basicRepository; |
| | | _stockService = stockService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _basicService = basicService; |
| | | _recordService = recordService; |
| | | } |
| | | |
| | | public (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPOutboundOrder mesPPOutboundOrder) |
| | | { |
| | | List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>(); |
| | | |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | |
| | | float originalNeedQuantity = mesPPOutboundOrder.OrderQuantity; |
| | | |
| | | float needQuantity = originalNeedQuantity; |
| | | |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(mesPPOutboundOrder.MaterialCode, "", mesPPOutboundOrder.Details.FirstOrDefault()?.CarrierCode ?? "",mesPPOutboundOrder.WarehouseId); |
| | | if (!stockInfos.Any()) |
| | | { |
| | | throw new Exception($"æªæ¾å°å¯åé
åºå"); |
| | | } |
| | | List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, mesPPOutboundOrder.MaterialCode, needQuantity, out float residueQuantity); |
| | | mesPPOutboundOrder.LockQuantity += needQuantity - residueQuantity; |
| | | outStocks.AddRange(autoAssignStocks); |
| | | float assignQuantity = needQuantity - residueQuantity; |
| | | |
| | | float orderQuantity = mesPPOutboundOrder.OrderQuantity; |
| | | for (int j = 0; j < autoAssignStocks.Count; j++) |
| | | { |
| | | float detailAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPOutboundOrder.MaterialCode).Sum(x => x.AssignQuantity);//åºåºè®¢åæç»å·²åé
æ°é |
| | | |
| | | float palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPOutboundOrder.MaterialCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//åºåºè¯¦æ
å·²åé
æ°é |
| | | |
| | | float palletOutboundQuantity = autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity); |
| | | if (palletAssignQuantity < palletOutboundQuantity)//妿åºåºè¯¦æ
å·²åé
æ°éå°äºæçå·²åé
æ°éï¼åå¯ä»¥ç»§ç»æ·»å 该æçåºåºä¿¡æ¯ |
| | | { |
| | | float orderDetailNeedQuantity = mesPPOutboundOrder.OrderQuantity - detailAssignQuantity; |
| | | if (orderDetailNeedQuantity > autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity) |
| | | { |
| | | mesPPOutboundOrder.LockQuantity += autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity; |
| | | Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, autoAssignStocks[j], autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity); |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | } |
| | | else |
| | | { |
| | | Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, autoAssignStocks[j], mesPPOutboundOrder.OrderQuantity - mesPPOutboundOrder.LockQuantity); |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | mesPPOutboundOrder.LockQuantity = mesPPOutboundOrder.OrderQuantity; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList())); |
| | | |
| | | return (outStocks, mesPPOutboundOrder, outStockLockInfos, locationInfos); |
| | | } |
| | | |
| | | |
| | | public (List<Dt_StockInfo>, Dt_MesPPCutOutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) AssignStockOutbound(Dt_MesPPCutOutboundOrder mesPPOutboundOrder, Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail) |
| | | { |
| | | List<Dt_StockInfo> outStocks = new List<Dt_StockInfo>(); |
| | | |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>(); |
| | | List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>(); |
| | | //Dt_MesPPCutOutboundOrder outboundOrder = BaseDal.Db.Queryable<Dt_MesPPCutOutboundOrder>().Where(x=>x.Id==mesPPOutboundOrder.OrderId).First(); |
| | | float originalNeedQuantity = mesPPCutOutboundOrderDetail.OrderQuantity; |
| | | |
| | | float needQuantity = originalNeedQuantity; |
| | | |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(mesPPCutOutboundOrderDetail.MaterielCode, "", mesPPOutboundOrder.WarehouseId); |
| | | if (!stockInfos.Any()) |
| | | { |
| | | throw new Exception($"æªæ¾å°å¯åé
åºå"); |
| | | } |
| | | List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, mesPPCutOutboundOrderDetail.MaterielCode, needQuantity, out float residueQuantity); |
| | | mesPPCutOutboundOrderDetail.LockQuantity += needQuantity - residueQuantity; |
| | | outStocks.AddRange(autoAssignStocks); |
| | | float assignQuantity = needQuantity - residueQuantity; |
| | | |
| | | float orderQuantity = mesPPCutOutboundOrderDetail.OrderQuantity; |
| | | for (int j = 0; j < autoAssignStocks.Count; j++) |
| | | { |
| | | float detailAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode).Sum(x => x.AssignQuantity);//åºåºè®¢åæç»å·²åé
æ°é |
| | | |
| | | float palletAssignQuantity = outStockLockInfos.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode && x.PalletCode == autoAssignStocks[j].PalletCode).Sum(x => x.AssignQuantity);//åºåºè¯¦æ
å·²åé
æ°é |
| | | |
| | | float palletOutboundQuantity = autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity); |
| | | if (palletAssignQuantity < palletOutboundQuantity)//妿åºåºè¯¦æ
å·²åé
æ°éå°äºæçå·²åé
æ°éï¼åå¯ä»¥ç»§ç»æ·»å 该æçåºåºä¿¡æ¯ |
| | | { |
| | | float orderDetailNeedQuantity = mesPPCutOutboundOrderDetail.OrderQuantity - detailAssignQuantity; |
| | | if (orderDetailNeedQuantity > autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity) |
| | | { |
| | | mesPPCutOutboundOrderDetail.LockQuantity += autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity; |
| | | Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, mesPPCutOutboundOrderDetail, autoAssignStocks[j], autoAssignStocks[j].Details.Sum(x => x.OutboundQuantity) - palletAssignQuantity); |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | } |
| | | else |
| | | { |
| | | Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(mesPPOutboundOrder, mesPPCutOutboundOrderDetail, autoAssignStocks[j], mesPPCutOutboundOrderDetail.OrderQuantity - mesPPCutOutboundOrderDetail.LockQuantity); |
| | | outStockLockInfos.Add(outStockLockInfo); |
| | | mesPPCutOutboundOrderDetail.LockQuantity = mesPPCutOutboundOrderDetail.OrderQuantity; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | locationInfos.AddRange(_basicService.LocationInfoService.Repository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList())); |
| | | |
| | | return (outStocks, mesPPCutOutboundOrderDetail, outStockLockInfos, locationInfos); |
| | | } |
| | | } |
| | | } |
| | |
| | | using WIDESEA_IRecordService; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_IOutboundService |
| | | { |
| | |
| | | |
| | | return outStockLockInfo; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PP大å·åºåº |
| | | /// </summary> |
| | | /// <param name="mesOutboundOrder"></param> |
| | | /// <param name="outStock"></param> |
| | | /// <param name="assignQuantity"></param> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesOutboundOrder mesOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null) |
| | | { |
| | | |
| | |
| | | |
| | | return outStockLockInfo; |
| | | } |
| | | /// <summary> |
| | | /// PPå°å·åºåº |
| | | /// </summary> |
| | | /// <param name="mesPPCutOutboundOrderDetail"></param> |
| | | /// <param name="outStock"></param> |
| | | /// <param name="assignQuantity"></param> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder,Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null) |
| | | { |
| | | |
| | | Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() |
| | | { |
| | | PalletCode = outStock.PalletCode, |
| | | AssignQuantity = assignQuantity, |
| | | MaterielCode = mesPPCutOutboundOrderDetail.MaterielCode, |
| | | BatchNo = outStock.Details.FirstOrDefault()?.BatchNo ?? "", |
| | | LocationCode = outStock.LocationCode, |
| | | MaterielName = mesPPCutOutboundOrderDetail.MaterielName, |
| | | OrderDetailId = mesPPCutOutboundOrderDetail.Id, |
| | | OrderNo = mesPPCutOutboundOrder.OrderNo, |
| | | OrderType = mesPPCutOutboundOrder.OrderType, |
| | | OriginalQuantity = outStock.Details.Where(x => x.MaterielCode == mesPPCutOutboundOrderDetail.MaterielCode).Sum(x => x.StockQuantity), |
| | | Status = taskNum == null ? OutLockStockStatusEnum.å·²åé
.ObjToInt() : OutLockStockStatusEnum.åºåºä¸.ObjToInt(), |
| | | StockId = outStock.Id, |
| | | TaskNum = taskNum, |
| | | OrderQuantity = mesPPCutOutboundOrderDetail.OrderQuantity, |
| | | Unit = mesPPCutOutboundOrderDetail.Unit |
| | | }; |
| | | |
| | | return outStockLockInfo; |
| | | } |
| | | |
| | | public Dt_OutStockLockInfo GetOutStockLockInfo(Dt_MesPPOutboundOrder mesPPOutboundOrder, Dt_StockInfo outStock, float assignQuantity, int? taskNum = null) |
| | | { |
| | | |
| | | Dt_OutStockLockInfo outStockLockInfo = new Dt_OutStockLockInfo() |
| | | { |
| | | PalletCode = outStock.PalletCode, |
| | | AssignQuantity = assignQuantity, |
| | | MaterielCode = mesPPOutboundOrder.MaterialCode, |
| | | BatchNo = outStock.Details.FirstOrDefault()?.BatchNo ?? "", |
| | | LocationCode = outStock.LocationCode, |
| | | MaterielName = mesPPOutboundOrder.MaterialName, |
| | | OrderDetailId = mesPPOutboundOrder.Id, |
| | | OrderNo = mesPPOutboundOrder.OrderNo, |
| | | OrderType = mesPPOutboundOrder.OrderType, |
| | | OriginalQuantity = outStock.Details.Where(x => x.MaterielCode == mesPPOutboundOrder.MaterialCode).Sum(x => x.StockQuantity), |
| | | Status = taskNum == null ? OutLockStockStatusEnum.å·²åé
.ObjToInt() : OutLockStockStatusEnum.åºåºä¸.ObjToInt(), |
| | | StockId = outStock.Id, |
| | | TaskNum = taskNum, |
| | | OrderQuantity = mesPPOutboundOrder.OrderQuantity, |
| | | Unit = mesPPOutboundOrder.Unit |
| | | }; |
| | | |
| | | return outStockLockInfo; |
| | | } |
| | | |
| | | public List<Dt_OutStockLockInfo> OutStockLockInfos(string OrderNo) |
| | | { |
| | |
| | | |
| | | public IOutStockLockInfoService OutboundStockLockInfoService { get; } |
| | | |
| | | public OutboundService(IOutboundOrderDetailService outboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService) |
| | | public IMesPPOutboundOrderService MesPPOutboundOrderService { get; } |
| | | |
| | | public IMesPPOutboundOrderDetailService MesPPOutboundOrderDetailService { get; } |
| | | |
| | | public IMesPPCutOutboundOrderService MesPPCutOutboundOrderService { get; } |
| | | |
| | | public IMesPPCutOutboundOrderDetailService MesPPCutOutboundOrderDetailService { get; } |
| | | |
| | | public OutboundService(IOutboundOrderDetailService outboundOrderDetailService,IMesPPOutboundOrderService mesPPOutboundOrderService, IOutboundOrderService outboundOrderService, IOutStockLockInfoService outboundStockLockInfoService, IMesOutboundOrderService mesOutboundOrderService) |
| | | { |
| | | OutboundOrderDetailService = outboundOrderDetailService; |
| | | OutboundOrderService = outboundOrderService; |
| | | OutboundStockLockInfoService = outboundStockLockInfoService; |
| | | MesOutboundOrderService = mesOutboundOrderService; |
| | | MesPPOutboundOrderService = mesPPOutboundOrderService; |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | using WIDESEA_IStockRepository; |
| | | using WIDESEA_IStockService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_StockRepository; |
| | | |
| | | namespace WIDESEA_StockService |
| | | { |
| | |
| | | |
| | | return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes); |
| | | } |
| | | |
| | | public List<Dt_StockInfo> GetUseableStocks(string materielCode, string batchNo, string palletcode, int warehoseId) |
| | | { |
| | | Dt_StockInfo stockInfo = BaseDal.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletcode && x.WarehouseId == warehoseId).Includes(x => x.Details).First(); |
| | | |
| | | List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(stockInfo.LocationCode); |
| | | |
| | | return BaseDal.GetStockInfos(materielCode, batchNo, locationCodes); |
| | | } |
| | | } |
| | | } |
| | |
| | | using WIDESEA_ITaskInfoService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | using System.Diagnostics.Metrics; |
| | | using System.Reflection.Metadata; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | using WIDESEA_DTO.Task; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | | { |
| | |
| | | return MesResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PP大å·åºåº-è¿è¡åå· |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public MesResponseContent PPSubsectionOut(PPSubsectionOutModel model) |
| | | { |
| | | MesResponseContent modelCount = new MesResponseContent(); |
| | | try |
| | | { |
| | | foreach (var item in model.Carriers) |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == item.Warehouse); |
| | | if (warehouse == null) |
| | | { |
| | | return MesResponseContent.Instance.Error("ä»åºä¿¡æ¯æªé
ç½®"); |
| | | } |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == item.CarrierCode); |
| | | if (stockInfo == null) |
| | | { |
| | | return MesResponseContent.Instance.Error("æªæ¾å°æ¤è½½å
·ç¼å·åºå"); |
| | | } |
| | | Dt_MesPPOutboundOrder mesPPOutboundOrder = BaseDal.Db.Queryable<Dt_MesPPOutboundOrder>().Where(x => x.TaskNo == model.TaskNo).Includes(x => x.Details).First(); |
| | | if (mesPPOutboundOrder != null) |
| | | { |
| | | return MesResponseContent.Instance.Error("å·²å卿¤ä»»å¡åå·"); |
| | | } |
| | | Dt_MesPPOutboundOrderDetail mesPPOutboundOrderDetail = new Dt_MesPPOutboundOrderDetail() |
| | | { |
| | | Warehouse = item.Warehouse, |
| | | CarrierCode = item.CarrierCode, |
| | | }; |
| | | |
| | | Dt_MesPPOutboundOrder mesOutboundOrder = new Dt_MesPPOutboundOrder() |
| | | { |
| | | CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(), |
| | | MaterialCode = model.MaterialCode, |
| | | MaterialName = model.MaterialName, |
| | | OrderQuantity = model.RequiredQuantity, |
| | | TaskNo = model.TaskNo, |
| | | Unit = model.Unit,//PPéè¦è½¬æ¢æç±³(鿱平æ¹(PNLæ°*é¢ç§¯)/宽度) |
| | | Width = model.Width, |
| | | TargetAddressCode = model.TargetAddressCode, |
| | | OrderType = TaskTypeEnum.MesHandPickOutbound.ObjToInt(), |
| | | OrderStatus = OutOrderStatusEnum.æªå¼å§.ObjToInt(), |
| | | WarehouseId = warehouse.WarehouseId, |
| | | Details = new List<Dt_MesPPOutboundOrderDetail> { mesPPOutboundOrderDetail } |
| | | }; |
| | | //Db.InsertNav(mesOutboundOrder).Include(x=>x.Details).ExecuteCommand(); |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | |
| | | List<Dt_StockInfo>? stockInfos = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | (List<Dt_StockInfo>, Dt_MesPPOutboundOrder, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesPPOutboundOrderService.AssignStockOutbound(mesOutboundOrder); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound); |
| | | result.Item2.OrderStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | |
| | | stockInfos = result.Item1; |
| | | mesOutboundOrder = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | mesPPOutboundOrderDetail.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("æ åºå"); |
| | | } |
| | | } |
| | | tasks.ForEach(x => |
| | | { |
| | | x.TargetAddress = model.TargetAddressCode; |
| | | }); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | int id = BaseDal.AddData(tasks); |
| | | outStockLockInfos.ForEach(x => |
| | | { |
| | | x.OrderNo = mesOutboundOrder.TaskNo; |
| | | x.OrderDetailId = id; |
| | | }); |
| | | //_outboundService.MesPPOutboundOrderService.Repository.AddData(mesOutboundOrder); |
| | | Db.InsertNav(mesOutboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0) |
| | | { |
| | | WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | if (!content.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return MesResponseContent.Instance.Error(content.Message); |
| | | } |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks); |
| | | |
| | | } |
| | | return MesResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return MesResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PPå°å·åºåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public MesResponseContent PPCutOut(PPCutOutModle model) |
| | | { |
| | | try |
| | | { |
| | | foreach (var item in model.MaterialDetails) |
| | | { |
| | | Dt_Warehouse warehouse = _basicService.WarehouseService.Repository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString()); |
| | | if (warehouse == null) |
| | | { |
| | | return MesResponseContent.Instance.Error("ä»åºåºç¡ä¿¡æ¯æªé
ç½®"); |
| | | } |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == item.MaterialCode); |
| | | if (materielInfo == null) |
| | | { |
| | | return MesResponseContent.Instance.Error($"æªæ¾å°è¯¥ç©æä¿¡æ¯"); |
| | | } |
| | | Dt_MesPPCutOutboundOrder mesPPCutOutboundOrder = BaseDal.Db.Queryable<Dt_MesPPCutOutboundOrder>().Where(x => x.TaskNo == model.TaskNo).Includes(x => x.Details).First(); |
| | | if (mesPPCutOutboundOrder != null) |
| | | { |
| | | return MesResponseContent.Instance.Error("å·²å卿¤ä»»å¡åå·"); |
| | | } |
| | | Dt_MesPPCutOutboundOrderDetail mesPPCutOutboundOrderDetail = new Dt_MesPPCutOutboundOrderDetail() |
| | | { |
| | | MaterielCode = item.MaterialCode, |
| | | MaterielName = item.MaterialName, |
| | | OrderQuantity = item.RequiredQuantity, |
| | | Unit = item.Unit, |
| | | LayerCode = item.LayerCode, |
| | | Sequence = item.Sequence, |
| | | TargetAddressCode = item.TargetAddressCode, |
| | | Width = item.Width, |
| | | }; |
| | | Dt_MesPPCutOutboundOrder mesPPOutboundOrder = new Dt_MesPPCutOutboundOrder() |
| | | { |
| | | CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(), |
| | | TaskNo = model.TaskNo, |
| | | OrderType = TaskTypeEnum.MesOutbound.ObjToInt(), |
| | | OrderStatus = OutOrderStatusEnum.æªå¼å§.ObjToInt(), |
| | | WarehouseId = warehouse.WarehouseId, |
| | | Details = new List<Dt_MesPPCutOutboundOrderDetail> { mesPPCutOutboundOrderDetail } |
| | | }; |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | |
| | | List<Dt_StockInfo>? stockInfos = null; |
| | | List<Dt_OutStockLockInfo>? outStockLockInfos = null; |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | { |
| | | (List<Dt_StockInfo>, Dt_MesPPCutOutboundOrderDetail, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.MesPPOutboundOrderService.AssignStockOutbound(mesPPOutboundOrder, mesPPCutOutboundOrderDetail); |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | tasks = GetTasks(result.Item1, TaskTypeEnum.MesOutbound); |
| | | result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | x.Status = OutLockStockStatusEnum.åºåºä¸.ObjToInt(); |
| | | }); |
| | | |
| | | stockInfos = result.Item1; |
| | | mesPPCutOutboundOrderDetail = result.Item2; |
| | | outStockLockInfos = result.Item3; |
| | | locationInfos = result.Item4; |
| | | |
| | | } |
| | | else |
| | | { |
| | | throw new Exception("æ åºå"); |
| | | } |
| | | } |
| | | tasks.ForEach(x => |
| | | { |
| | | x.TargetAddress = mesPPCutOutboundOrderDetail.TargetAddressCode; |
| | | }); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | int id = BaseDal.AddData(tasks); |
| | | outStockLockInfos.ForEach(x => |
| | | { |
| | | x.OrderNo = mesPPOutboundOrder.TaskNo; |
| | | x.OrderDetailId = id; |
| | | }); |
| | | //_outboundService.MesPPOutboundOrderService.Repository.AddData(mesOutboundOrder); |
| | | Db.InsertNav(mesPPOutboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | if (stockInfos != null && stockInfos.Count > 0 && outStockLockInfos != null && outStockLockInfos.Count > 0 && locationInfos != null && locationInfos.Count > 0) |
| | | { |
| | | WebResponseContent content = _outboundService.MesOutboundOrderService.LockOutboundStockDataUpdate(stockInfos, outStockLockInfos, locationInfos, tasks: tasks); |
| | | |
| | | if (!content.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return MesResponseContent.Instance.Error(content.Message); |
| | | } |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | PushTasksToWCS(tasks, "AGV_PP"); |
| | | } |
| | | return MesResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | return MesResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PPå
¥åº(大å·ãå°å·ãå¼ æ) |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public MesResponseContent PPBack(PPBackModel model) |
| | | { |
| | | try |
| | | { |
| | | foreach (var item in model.MaterialLotInfo) |
| | | { |
| | | //è·åç©æä¿¡æ¯ |
| | | Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterielCode == item.MaterialCode); |
| | | if (materielInfo == null) |
| | | { |
| | | return MesResponseContent.Instance.Error($"ç©æ{item.MaterialCode}ä¸åå¨!"); |
| | | } |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString()); |
| | | if (warehouse == null) |
| | | { |
| | | return MesResponseContent.Instance.Error($"æªæ¾å°ä»åºä¿¡æ¯"); |
| | | } |
| | | Dt_MesPPBackInboundOrderDetail mesPPBackInboundOrderDetail = new Dt_MesPPBackInboundOrderDetail() |
| | | { |
| | | MaterialLot = item.MaterialLot, |
| | | MaterielCode = item.MaterialCode, |
| | | OrderQuantity = item.Quantity, |
| | | CutedWidth = item.CutedWidth, |
| | | MaterialLotOld = item.MaterialLotOld, |
| | | Unit = item.Unit, |
| | | ProductionDate = item.ProductionDate, |
| | | EffectiveDate = item.ExpirationDate, |
| | | OrderDetailStatus = OrderDetailStatusEnum.New.ObjToInt(), |
| | | }; |
| | | Dt_MesPPBackInboundOrder mesPPBackInboundOrder = new Dt_MesPPBackInboundOrder() |
| | | { |
| | | WarehouseId = warehouse.WarehouseId, |
| | | SourceAddressCode = model.SourceAddressCode, |
| | | CarrierCode = model.CarrierCode, |
| | | OrderStatus = InOrderStatusEnum.æªå¼å§.ObjToInt(), |
| | | CreateType = OrderCreateTypeEnum.UpperSystemPush.ObjToInt(), |
| | | Details = new List<Dt_MesPPBackInboundOrderDetail> { mesPPBackInboundOrderDetail } |
| | | }; |
| | | |
| | | Dt_StockInfoDetail stockInfoDetail = new Dt_StockInfoDetail() |
| | | { |
| | | BatchNo = mesPPBackInboundOrderDetail.MaterialLot, |
| | | MaterielCode = mesPPBackInboundOrderDetail.MaterielCode, |
| | | MaterielName = materielInfo.MaterielName, |
| | | OrderNo = "", |
| | | SerialNumber = "", |
| | | StockQuantity = mesPPBackInboundOrderDetail.OrderQuantity, |
| | | OutboundQuantity = 0, |
| | | Unit = materielInfo.MaterielUnit, |
| | | Status = StockStatusEmun.ç»çæå.ObjToInt(), |
| | | ProductionDate = mesPPBackInboundOrderDetail.ProductionDate, |
| | | EffectiveDate = mesPPBackInboundOrderDetail.EffectiveDate, |
| | | InboundOrderRowNo = mesPPBackInboundOrderDetail.RowNo, |
| | | }; |
| | | |
| | | Dt_StockInfo stockInfo = new Dt_StockInfo() |
| | | { |
| | | PalletCode = model.CarrierCode, |
| | | StockStatus = StockStatusEmun.ç»çæå.ObjToInt(), |
| | | WarehouseId = mesPPBackInboundOrder.WarehouseId, |
| | | Details = new List<Dt_StockInfoDetail> { stockInfoDetail } |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | Db.InsertNav(mesPPBackInboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | Db.InsertNav(stockInfo).Include(x => x.Details).ExecuteCommand(); |
| | | WebResponseContent content = DeviceRequestInboundTask(mesPPBackInboundOrder, stockInfo); |
| | | if (!content.Status) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return MesResponseContent.Instance.Error(content.Message); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | } |
| | | return MesResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return MesResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | |
| | | } |
| | | |
| | | public WebResponseContent DeviceRequestInboundTask(Dt_MesPPBackInboundOrder mesPPBackInboundOrder, Dt_StockInfo stockInfo) |
| | | { |
| | | try |
| | | { |
| | | Dt_Task task = Repository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode); |
| | | if (task != null) |
| | | { |
| | | PushTasksToWCS(new List<Dt_Task> { task }); |
| | | return WebResponseContent.Instance.Error($"该æçå·²çæä»»å¡"); |
| | | } |
| | | if (Repository.QueryFirst(x => x.SourceAddress == stockInfo.PalletCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该ç«ç¹å·²ææªæ§è¡çä»»å¡"); |
| | | } |
| | | //Dt_StockInfo stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); |
| | | //if (stockInfos == null) |
| | | //{ |
| | | // return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | //} |
| | | //if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æå¨ç»çæå.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.åºåºå®æ.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.æ£é宿.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.éåº.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.MESéåº.ObjToInt()) |
| | | //{ |
| | | // return WebResponseContent.Instance.Error($"该æçç¶æä¸æ£ç¡®,ä¸å¯ç³è¯·å
¥åº"); |
| | | //} |
| | | //if (!string.IsNullOrEmpty(stockInfo.LocationCode)) |
| | | //{ |
| | | // return WebResponseContent.Instance.Error($"该æçå·²ç»å®è´§ä½"); |
| | | //} |
| | | //åªå
¥å¹³åº,é夿平åºå®ä¹è´§ä½ç±»åãããããããããããã |
| | | Dt_LocationInfo? locationInfos = _basicRepository.LocationInfoRepository.QueryFirst(x => x.WarehouseId == stockInfo.WarehouseId && x.LocationType == LocationTypeEnum.MediumPallet.ObjToInt()); |
| | | Dt_LocationInfo? locationInfo = _basicService.LocationInfoService.AssignLocation(locationInfos.RoadwayNo, stockInfo.PalletType, stockInfo.WarehouseId); |
| | | if (locationInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"è´§ä½åé
失败,æªæ¾å°å¯åé
è´§ä½"); |
| | | } |
| | | |
| | | Dt_Task newTask = new Dt_Task() |
| | | { |
| | | CurrentAddress = mesPPBackInboundOrder.SourceAddressCode, |
| | | Grade = 0, |
| | | NextAddress = locationInfo.LocationCode, |
| | | PalletCode = stockInfo.PalletCode, |
| | | Roadway = locationInfo.RoadwayNo,//å··éå·å
å«AGV |
| | | SourceAddress = mesPPBackInboundOrder.SourceAddressCode, |
| | | TargetAddress = locationInfo.LocationCode, |
| | | TaskType = TaskTypeEnum.Inbound.ObjToInt(), |
| | | TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | PalletType = stockInfo.PalletType |
| | | }; |
| | | LocationStatusEnum lastStatus = (LocationStatusEnum)locationInfo.LocationStatus; |
| | | _unitOfWorkManage.BeginTran(); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationStatusEnum.Lock, LocationChangeType.InboundAssignLocation); |
| | | _basicService.LocationInfoService.UpdateLocationStatus(locationInfo, newTask.PalletType, LocationStatusEnum.Lock, newTask.WarehouseId); |
| | | BaseDal.AddData(newTask); |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfo); |
| | | _unitOfWorkManage.CommitTran(); |
| | | |
| | | PushTasksToWCS(new List<Dt_Task> { newTask }); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// PPåºåæ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public MesResponseContent QueryPpByWidth(QueryPpByWidthModel model) |
| | | { |
| | | MesResponseContent content = new MesResponseContent(); |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString()); |
| | | List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => |
| | | x.WarehouseId == warehouse.WarehouseId && |
| | | x.StockStatus == (int)StockStatusEmun.å
¥åºå®æ).Includes(x => x.Details).ToList(); |
| | | Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(x => x.MaterielCode == model.MaterialCode && x.CutedWidth == model.CutedWidth)); |
| | | if (stockInfo == null) |
| | | { |
| | | return content.Error($"PPä»ç«åº/å¹³åºï¼ç©æç¼å·:{model.MaterialCode},è£å宽:{model.CutedWidth},æªæ¾å°æ¤ç©æåºåä¿¡æ¯"); |
| | | } |
| | | var stock = stockInfo.Details.FirstOrDefault(); |
| | | if (stock != null) |
| | | { |
| | | content.BSucc = true; |
| | | content.StrCode = "0000"; |
| | | content.StrMsg = "æ§è¡æå"; |
| | | content.DataTime = DateTime.Now; |
| | | content.MaterialCode = stock.MaterielCode; |
| | | content.Quantity = stock.StockQuantity; |
| | | content.Unit = stock.Unit; |
| | | content.Warehouse = warehouse.WarehouseCode; |
| | | content.WarehouseName = warehouse.WarehouseName; |
| | | content.CutedWidth = stock.CutedWidth; |
| | | content.CarrierCode = stockInfo.PalletCode; |
| | | content.MaterialLot = stock.BatchNo; |
| | | } |
| | | return content; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return MesResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | using WIDESEA_ITaskInfoRepository; |
| | | using WIDESEA_ITaskInfoService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | using WIDESEA_TaskInfoRepository; |
| | | |
| | | namespace WIDESEA_TaskInfoService |
| | |
| | | } |
| | | } |
| | | |
| | | public WebResponseContent AGVTasks(SaveModel saveModel) |
| | | { |
| | | try |
| | | { |
| | | var palletCode = saveModel.MainData["barcode"].ToString(); |
| | | var stationCode = saveModel.MainData["address"].ToString(); |
| | | var warehouseId = saveModel.MainData["warehouseId"].ObjToInt(); |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseId == warehouseId); |
| | | if (warehouse == null) |
| | | { |
| | | return WebResponseContent.Instance.Error("æªæ¾å°åºåº"); |
| | | } |
| | | |
| | | Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode && x.WarehouseId == warehouseId); |
| | | if (task != null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æçå·²çæä»»å¡"); |
| | | } |
| | | if (Repository.QueryFirst(x => x.SourceAddress == stationCode && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null && warehouse.WarehouseCode != WarehouseEnum.HA58.ToString()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该ç«ç¹å·²ææªæ§è¡çä»»å¡"); |
| | | } |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); |
| | | if (stockInfo == null) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | } |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æçç¶æä¸æ£ç¡®"); |
| | | } |
| | | if (warehouseId != stockInfo.WarehouseId) |
| | | { |
| | | return WebResponseContent.Instance.Error($"ä»åºä¸æ£ç¡®"); |
| | | } |
| | | Dt_Task newTask = new Dt_Task() |
| | | { |
| | | CurrentAddress = stationCode, |
| | | Grade = 0, |
| | | NextAddress ="", |
| | | PalletCode = palletCode, |
| | | Roadway = warehouse.Remark,//æ¥è¯¢å¯¹åºçº¿è¾¹ä»å°åå··éå· |
| | | SourceAddress = stationCode, |
| | | TargetAddress = "", |
| | | TaskType = TaskTypeEnum.OutAllocate.ObjToInt(), |
| | | TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | WarehouseId = stockInfo.WarehouseId, |
| | | PalletType = stockInfo.PalletType |
| | | }; |
| | | _unitOfWorkManage.BeginTran(); |
| | | BaseDal.AddData(newTask); |
| | | PushTasksToWCS(new List<Dt_Task> { newTask}); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºä»»å¡å®æ |
| | | /// </summary> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | | /// <summary> |
| | | /// PPä»å°å·MESåºåºå |
| | | /// </summary> |
| | | [Route("api/mesPPBackInboundOrder")] |
| | | [ApiController] |
| | | public class MesPPBackInboundOrderController : ApiBaseController<IMesPPCutOutboundOrderService, Dt_MesPPCutOutboundOrder> |
| | | { |
| | | public MesPPBackInboundOrderController(IMesPPCutOutboundOrderService service) : base(service) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return _taskService.SubstrateBack(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// PP大å·åºåº-è¿è¡åå· |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("PPSubsectionOut"), AllowAnonymous] |
| | | public MesResponseContent PPSubsectionOut([FromBody] Root<PPSubsectionOutModel> model) |
| | | { |
| | | return _taskService.PPSubsectionOut(model.Content); |
| | | } |
| | | /// <summary> |
| | | /// PPå°å·åºåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("PPCutOut"), AllowAnonymous] |
| | | public MesResponseContent PPCutOut([FromBody] Root<PPCutOutModle> model) |
| | | { |
| | | return _taskService.PPCutOut(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PPå
¥åº(大å·ãå°å·ãå¼ æ) |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("PPBack"), AllowAnonymous] |
| | | public MesResponseContent PPBack([FromBody] Root<PPBackModel> model) |
| | | { |
| | | return _taskService.PPBack(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PPåºåæ¥è¯¢ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("QueryPpByWidth"), AllowAnonymous] |
| | | public MesResponseContent QueryPpByWidth([FromBody] Root<QueryPpByWidthModel> model) |
| | | { |
| | | return _taskService.QueryPpByWidth(model.Content); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç©æåºåºï¼WMS忥åºåºç©ææ¹æ¬¡è³MES |
| | |
| | | { |
| | | return _taskService.UploadMesMaterialLotaAcept(model); |
| | | } |
| | | |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Autofac.Core; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Outbound |
| | | { |
| | | /// <summary> |
| | | /// PPä»å°å·MESåºåºå |
| | | /// </summary> |
| | | [Route("api/mesPPCutOutboundOrder")] |
| | | [ApiController] |
| | | public class MesPPCutOutboundOrderController : ApiBaseController<IMesPPCutOutboundOrderService, Dt_MesPPCutOutboundOrder> |
| | | { |
| | | public MesPPCutOutboundOrderController(IMesPPCutOutboundOrderService service) : base(service) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Autofac.Core; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Outbound |
| | | { |
| | | /// <summary> |
| | | /// PPä»å°å·MESåºåºå |
| | | /// </summary> |
| | | [Route("api/mesPPCutOutboundOrderDetail")] |
| | | [ApiController] |
| | | public class MesPPCutOutboundOrderDetailController : ApiBaseController<IMesPPCutOutboundOrderDetailService, Dt_MesPPCutOutboundOrderDetail> |
| | | { |
| | | public MesPPCutOutboundOrderDetailController(IMesPPCutOutboundOrderDetailService service) : base(service) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Autofac.Core; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.MES; |
| | | using WIDESEA_DTO.Outbound; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Outbound |
| | | { |
| | | /// <summary> |
| | | /// MESåºåºå |
| | | /// </summary> |
| | | [Route("api/mesPPOutboundOrder")] |
| | | [ApiController] |
| | | public class MesPPOutboundOrderController : ApiBaseController<IMesPPOutboundOrderService, Dt_MesPPOutboundOrder> |
| | | { |
| | | public MesPPOutboundOrderController(IMesPPOutboundOrderService service) : base(service) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Outbound |
| | | { |
| | | /// <summary> |
| | | /// MESåºåºå |
| | | /// </summary> |
| | | [Route("api/mesPPOutboundOrderDetail")] |
| | | [ApiController] |
| | | public class MesPPOutboundOrderDetailController : ApiBaseController<IMesPPOutboundOrderDetailService, Dt_MesPPOutboundOrderDetail> |
| | | { |
| | | public MesPPOutboundOrderDetailController(IMesPPOutboundOrderDetailService service) : base(service) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return Service.UpdateTaskInfo(task); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// PPä»AGVæ¬è¿ä»»å¡ |
| | | /// </summary> |
| | | /// <param name="task"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("AGVTasks"), AllowAnonymous] |
| | | public WebResponseContent AGVTasks([FromBody] SaveModel saveModel) |
| | | { |
| | | return Service.AGVTasks(saveModel); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/AGVTasks", |
| | | "style": { |
| | | "navigationBarTitleText": "AGVæ¬è¿ä»»å¡", |
| | | "enablePullDownRefresh": false |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/stash/InEmpty", |
| | | "style": { |
| | | "navigationBarTitleText": "空箱å
¥åº", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <view> |
| | | <view class="itemstyle"> |
| | | <uni-forms label-width="180"> |
| | | <uni-forms-item label="æçæ¡ç :"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«ææçæ¡ç " ref='midInput' :focus="!focus" v-model="barcode" |
| | | @input="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item label="å°åç :"> |
| | | <uni-easyinput type="text" placeholder="è¯·æ«æå°åç " ref='midInput' :focus="!focus" v-model="address" |
| | | @input="barcodeInput" /> |
| | | </uni-forms-item> |
| | | <uni-forms-item> |
| | | <button @click="AGVTasks" type="primary" size="default" style="margin-top: 2%;">ç¡®è®¤å®æ</button> |
| | | </uni-forms-item> |
| | | </uni-forms> |
| | | </view> |
| | | <u-toast ref="uToast" /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | export default { |
| | | data() { |
| | | return { |
| | | focus: false, |
| | | barcode: "", |
| | | address: "", |
| | | warehouseId: "", |
| | | } |
| | | }, |
| | | onShow() {}, |
| | | onLoad(res) { |
| | | this.focus = false; |
| | | this.warehouseId=res.warehouseId; |
| | | }, |
| | | methods: { |
| | | voiceSpeech(src) { |
| | | innerAudioContext.src = src; // '../../static/success.mp3'; |
| | | innerAudioContext.play(); |
| | | }, |
| | | barcodeInput() { |
| | | this.$nextTick(function(x) { |
| | | if (this.barcode.length > 0) { |
| | | this.focus = true; |
| | | } |
| | | }) |
| | | }, |
| | | AGVTasks() { |
| | | if (this.barcode == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«ææçç ", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | if (this.address == "") { |
| | | this.$refs.uToast.show({ |
| | | title: "è¯·æ«æå°åç ", |
| | | type: 'error' |
| | | }) |
| | | return; |
| | | } |
| | | var postDate = { |
| | | MainData: { |
| | | barcode: this.barcode, |
| | | address: this.address, |
| | | warehouseId:this.warehouseId, |
| | | } |
| | | } |
| | | this.$u.post('http://127.0.0.1:9293/api/Task/AGVTasks', postDate).then( |
| | | res => { |
| | | if (res.status) { |
| | | this.$refs.uToast.show({ |
| | | title: "ä»»å¡å建æåæå", |
| | | type: "success" |
| | | }) |
| | | this.barcode = ""; |
| | | } else { |
| | | this.$refs.uToast.show({ |
| | | title: res.message, |
| | | type: "error" |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/common/uni-ui.scss'; |
| | | |
| | | .content { |
| | | display: flex; |
| | | height: 150px; |
| | | } |
| | | |
| | | .content-text { |
| | | font-size: 14px; |
| | | color: #666; |
| | | } |
| | | |
| | | .itemstyle { |
| | | margin-top: 30px; |
| | | margin-left: 5%; |
| | | } |
| | | |
| | | .headerstyle { |
| | | width: 90%; |
| | | } |
| | | </style> |