| | |
| | | <script> |
| | | import VolBox from "@/components/basic/VolBox.vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | |
| | | import { stationManager, STATION_STORAGE_KEY } from "@/../src/uitils/stationManager"; |
| | | export default { |
| | | components: { VolBox }, |
| | | data() { |
| | |
| | | { prop: "palletCode", title: "æçç¼å·", type: "string", width: 150 }, |
| | | { prop: "locationCode", title: "è´§ä½ç¼å·", type: "string", width: 180 }, |
| | | { prop: "useableQuantity", title: "å¯ç¨æ°é", type: "string" }, |
| | | {prop:"orderDetailId",title:"åæ®æç»ä¸»é®",type:"string",width:150,hidden:true}, |
| | | ], |
| | | selection: [], |
| | | selectionSum: 0, |
| | |
| | | ], |
| | | }; |
| | | }, |
| | | onMounted() { |
| | | // 仿¬å°åå¨å è½½ä¿åçç«å°å¼ |
| | | const savedStation = stationManager.getStation(); |
| | | console.log(savedStation); |
| | | if (savedStation) { |
| | | outboundForm.selectedPlatform = savedStation; |
| | | } else if (stationOptions.length > 0) { |
| | | // å¦ææ²¡æä¿åçå¼ï¼ä½¿ç¨ç¬¬ä¸ä¸ªé项 |
| | | //stationValue.value = stationOptions[0].value; |
| | | } |
| | | }, |
| | | methods: { |
| | | open(row) { |
| | | this.row = row; |
| | |
| | | } |
| | | // é置表åé¿å
æ®çå¼ |
| | | this.outboundForm.selectedPlatform = ""; |
| | | const savedStation = stationManager.getStation(); |
| | | console.log(savedStation); |
| | | if (savedStation) { |
| | | this.outboundForm.selectedPlatform = savedStation; |
| | | } |
| | | this.showOutboundDialog = true; |
| | | }, |
| | | |
| | |
| | | this.$refs.outboundFormRef.validate((valid) => { |
| | | if (!valid) return; |
| | | |
| | | |
| | | console.log(this.selection) |
| | | if (this.selection.length <= 0) { |
| | | return this.$message.error("请å¾é"); |
| | | } |
| | | let url = this.pkcx |
| | | ? "api/Task/GenerateOutboundTask?orderDetailId=" |
| | | : "api/Task/GenerateOutboundTask?orderDetailId="; |
| | | ? "api/Task/GenerateAllocatOutboundTask?orderDetailId=" |
| | | : "api/Task/GenerateAllocatOutboundTask?orderDetailId="; |
| | | this.http |
| | | .post(url + this.row.id, this.selection, "æ°æ®å¤çä¸") |
| | | .post(url + this.row.id+"&station="+this.outboundForm.selectedPlatform, this.selection, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | |
| | | const url = "api/StockInfo/GetAllocateStockSelect?materielCode="; |
| | | this.http |
| | | .post( |
| | | url + this.row.materielCode + "&orderId=" + this.row.orderId, |
| | | url + this.row.materielCode + "&orderId=" + this.row.orderId + "&orderDetailId=" + this.row.id, |
| | | null, |
| | | "æ¥è¯¢ä¸" |
| | | ) |