| | |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | WebResponseContent AgvBoxApplyPass(AgvCTUCancelDTO applyPassDTO, APIEnum SecureReply = APIEnum.AGV_CTUCancelTask); |
| | | |
| | | /// <summary> |
| | | /// æ¥åWMSæå¨å®æä»»å¡ |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent RecWMSTaskCompleted(int taskNum); |
| | | } |
| | | } |
| | |
| | | // return WebResponseContent.Instance.Error(ex.Message); |
| | | // } |
| | | //} |
| | | [HttpPost, HttpGet, Route("RecWMSTaskCompleted"), AllowAnonymous] |
| | | public WebResponseContent RecWMSTaskCompleted(int taskNum) |
| | | { |
| | | return Service.RecWMSTaskCompleted(taskNum); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return BaseDal.QueryFirst(x => x.PalletCode == PalletCode && x.SourceAddress == locationCode && (x.TaskState == (int)TaskStatusEnum.SC_Execute || x.TaskState == (int)TaskStatusEnum.SC_Executing)); |
| | | } |
| | | /// <summary> |
| | | /// æ¥åWMSæå¨å®æä»»å¡ |
| | | /// </summary> |
| | | /// <param name="taskNum"></param> |
| | | /// <returns></returns> |
| | | public WebResponseContent RecWMSTaskCompleted(int taskNum) |
| | | { |
| | | try |
| | | { |
| | | Dt_Task task = BaseDal.QueryFirst(x => x.TaskNum == taskNum); |
| | | if (task != null) |
| | | { |
| | | task.TaskState = TaskStatusEnum.Finish.ObjToInt(); |
| | | BaseDal.DeleteAndMoveIntoHty(task, OperateTypeEnum.äººå·¥å®æ); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "æ å¨ å® æ", |
| | | name: "ä»» å¡ æ å¨ å® æ", |
| | | icon: '', |
| | | class: '', |
| | | type: 'success', |
| | | value: 'TaskHandCompleted', |
| | | onClick: function () { |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <vol-box |
| | | :lazy="true" |
| | | v-model="model" |
| | | title="éæ©éè´åæå¤§æ°é" |
| | | :width="280" |
| | | :padding="0" |
| | | > |
| | | <div> |
| | | <div> |
| | | <!-- æç´¢é
ç½® --> |
| | | <div class="search-form"> |
| | | <label>éè´åæ°éï¼</label> |
| | | <el-input style="width: 160px" v-model="MaterialCode"></el-input> |
| | | </div> |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="filteredData" |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | height="500px" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | > |
| | | <el-table-column type="selection" width="55"> </el-table-column> |
| | | <el-table-column |
| | | v-for="(item, index) in tableColumns.filter((x) => !x.hidden)" |
| | | :key="index" |
| | | :prop="item.prop" |
| | | :label="item.title" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <div><el-button type="primary" @click="onSelect">确认</el-button></div> |
| | | </template> |
| | | </vol-box> |
| | | </template> |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | |
| | | /******注æï¼å¦æåºç°æç¤ºæ²¡ææéçé®é¢ï¼è§åå°å¼åææ¡£ä¸çãéååå°æéã*****/ |
| | | |
| | | //è¿é使ç¨çvue2è¯æ³ï¼ä¹å¯ä»¥åævue3è¯æ³ |
| | | export default { |
| | | components: { |
| | | "vol-box": VolBox, |
| | | }, |
| | | methods: {}, |
| | | data() { |
| | | return { |
| | | model: false, //å¼¹åºæ¡ |
| | | wareId: null, |
| | | showDetialBox: false, |
| | | MaterialCode:null, |
| | | selection:null, |
| | | tableData: [], |
| | | filteredData: [], |
| | | tableColumns: [ |
| | | { |
| | | prop: "quantity", |
| | | title: "éè´åæ°é", |
| | | type: "string", |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | watch: { |
| | | MaterialCode(newVal) { |
| | | this.filterLocalData(newVal); |
| | | } |
| | | }, |
| | | methods: { |
| | | open(val) { |
| | | //æå¼ä¸»è¡¨éæ©æ°æ® |
| | | this.model = true; |
| | | this.wareId=val; |
| | | this.getData(); |
| | | }, |
| | | filterLocalData(code) { |
| | | if (code) { |
| | | this.filteredData = this.tableData.filter((item) => { |
| | | return item.quantity.includes(code); |
| | | }); |
| | | console.log(this.filteredData.length); |
| | | console.log(this.tableData.length); |
| | | } else { |
| | | this.filteredData = [...this.tableData]; // éç½®ä¸ºå®æ´æ°æ® |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selection = val; |
| | | if (this.selection.length > 1) { |
| | | this.$message.error("ä»
鿩䏿¡æ°æ®"); |
| | | // æ¸
空éä¸çç¬¬ä¸æ¡æ°æ® |
| | | this.$refs.singleTable.clearSelection(); |
| | | } |
| | | console.log(this.selection); |
| | | }, |
| | | getData() { |
| | | this.http |
| | | .post( |
| | | "/api/PurchaseOrderDetail/GetOrderQuantity?purchaseOrderNo=" + this.wareId, |
| | | null, |
| | | "æ¥è¯¢ä¸" |
| | | ) |
| | | .then((x) => { |
| | | this.tableData=x.data.map((i) => ({ |
| | | "quantity":i |
| | | })) |
| | | this.filteredData=x.data.map((i) => ({ |
| | | "quantity":i |
| | | })) |
| | | }); |
| | | }, |
| | | onSelect() { |
| | | if (!this.selection) { |
| | | return this.$message.error("è¯·éæ©æ°æ®"); |
| | | } |
| | | this.$emit("parentCall", ($parent) => { |
| | | //å¦ï¼ååç¼è¾è¡¨åæ°æ® |
| | | $parent.editFormFields.quantity = this.selection[0].quantity; |
| | | this.model = false; |
| | | }); |
| | | this.MaterialCode = null; |
| | | this.tableData = []; |
| | | this.filteredData = []; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | .search-form { |
| | | display: flex; |
| | | padding: 10px; |
| | | line-height: 34px; |
| | | button { |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | import gridBody from './extend/materielcodeprintView.vue' |
| | | import modelHeader from './extend/materielcodeSelectView.vue' |
| | | import modelBody from './extend/purchaseOrderNoSelectView.vue' |
| | | import modelFooter from './extend/GetOrderQuantityView.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: modelHeader, |
| | | modelBody: modelBody, |
| | | modelFooter: '' |
| | | modelFooter: 'modelFooter' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | |
| | | } |
| | | }); |
| | | }); |
| | | this.editFormOptions.forEach((option) => { |
| | | option.forEach((item) => { |
| | | if (item.field == 'quantity') { |
| | | //åå§åå¼¹åºæ¡éæ©å¨é
ç½® |
| | | item.extra = { |
| | | icon: 'el-icon-zoom-out', //æ¾ç¤ºå¾æ |
| | | text: 'éè´åæå¤§æ°é', //æ¾ç¤ºææ¬ |
| | | style: 'color: #3a8ee6;font-size: 13px;cursor: pointer;', |
| | | //触åäºä»¶ |
| | | click: (item) => { |
| | | this.$refs.modelFooter.open(this.editFormFields.purchaseOrderNo); |
| | | } |
| | | }; |
| | | } |
| | | }); |
| | | }); |
| | | // warehouseIdOption.onChange = (val, option) => { |
| | | // this.editFormFields.materielCode = ""; |
| | | // materielCodeOption.data = []; |
| | |
| | | let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted'); |
| | | if (TaskHandCompletedBtn) { |
| | | TaskHandCompletedBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .post("api/Task/TaskCompleted?taskNum="+param, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('任塿å¨å®æ'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | this.$confirm("æ¯å¦ç¡®è®¤å®æä»»å¡","æå¨ä»»å¡å®æè¦å",{ |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | center: true, |
| | | }).then(() => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .post("api/Task/TaskCompleted?taskNum="+param, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('任塿å¨å®æ'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | |
| | | { |
| | | title: "æ°é", |
| | | field: "quantity", |
| | | required: true, |
| | | type:"int" |
| | | }, |
| | | ], |
| | | [ |
| | |
| | | /// åºåæ¿åºåº |
| | | /// </summary> |
| | | [Description("åºåæ¿åºåº")] |
| | | WMS_MES_ProductOutBound |
| | | WMS_MES_ProductOutBound, |
| | | /// <summary> |
| | | /// åè°WCSä»»å¡å®æ |
| | | /// </summary> |
| | | [Description("åè°WCSä»»å¡å®æ")] |
| | | FeedBackWCSTaskCompleted |
| | | } |
| | | } |
| | |
| | | { |
| | | WebResponseContent GetPurchaseOrderDetailMaterielCode(int warehouseId); |
| | | WebResponseContent GetPurchaseOrderNos(string materielCode); |
| | | |
| | | WebResponseContent GetOrderQuantity(string purchaseOrderNo); |
| | | } |
| | | } |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent GetOrderQuantity(string purchaseOrderNo) |
| | | { |
| | | try |
| | | { |
| | | List<Dt_PurchaseOrder> purchaseOrders = BaseDal.Db.Queryable<Dt_PurchaseOrder>().Where(x => x.PurchaseOrderNo == purchaseOrderNo).ToList(); |
| | | List<float> orderQuantity = purchaseOrders.Select(x => x.OrderQuantity).ToList(); |
| | | return WebResponseContent.Instance.OK(data: orderQuantity); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.APIEnum; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.OtherEnum; |
| | |
| | | } |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | FeedBackWCSTaskCompleted(taskNum); |
| | | return InboundTaskCompleted(taskNum); |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup) |
| | | { |
| | | FeedBackWCSTaskCompleted(taskNum); |
| | | return OutboundTaskCompleted(taskNum); |
| | | } |
| | | else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.RelocationGroup) |
| | | { |
| | | FeedBackWCSTaskCompleted(taskNum); |
| | | return RelocationTaskCompleted(task); |
| | | } |
| | | else |
| | |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | public WebResponseContent FeedBackWCSTaskCompleted(int taskNum) |
| | | { |
| | | try |
| | | { |
| | | Dt_ApiInfo? url = _apiInfoRepository.QueryData(x => x.ApiCode == APIEnum.FeedBackWCSTaskCompleted.ToString()).First(); |
| | | string? apiAddrss = url.ApiAddress; |
| | | if (string.IsNullOrEmpty(apiAddrss)) |
| | | { |
| | | return WebResponseContent.Instance.Error($"{taskNum},æªæ¾å°WCSä»»å¡å®ææ¥å£,è¯·æ£æ¥æ¥å£é
ç½®"); |
| | | } |
| | | string responseStr = HttpHelper.Get(apiAddrss + "?taskNum=" + taskNum); |
| | | WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(responseStr) ?? WebResponseContent.Instance.Error("æªæ¾å°ä»»å¡å®æè¿åå¼"); |
| | | return content; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | return Service.GetPurchaseOrderNos(materielCode); |
| | | } |
| | | |
| | | [HttpPost, HttpGet, Route("GetOrderQuantity"), AllowAnonymous] |
| | | public WebResponseContent GetOrderQuantity(string purchaseOrderNo) |
| | | { |
| | | return Service.GetOrderQuantity(purchaseOrderNo); |
| | | } |
| | | } |
| | | } |