| | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | // import gridHeader from "./demo_Product/Dt_BillGroupStockDetail.vue"; |
| | | import gridBody from "./extend/SupplementationData.vue" |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | //æ¡æ¶åå§åé
ç½®åï¼ |
| | | let OutBoundBtn = this.buttons.find((x) => x.value == 'OutBound') |
| | | if (OutBoundBtn) { |
| | | OutBoundBtn.onClick = function () { |
| | | // this.$Message.success('ç¹å»äºæé®') |
| | | let row = this.$refs.table.getSelected() //è·åéä¸çè¡ |
| | | if (row <= 0) { |
| | | //å¦ææ²¡æéä¸è¡ |
| | | this.$Message.error('è¯·éæ©ä¸è¡æ°æ®') |
| | | return |
| | | } |
| | | let locationCode = row[0].locationCode |
| | | let palletCode = row[0].palletCode |
| | | this.http |
| | | .get( |
| | | `/api/Task/CreateAndSendOutboundTask?locationCode=${locationCode}&palletCode=${palletCode}`, |
| | | {}, |
| | | 'æ£å¨å建任å¡' |
| | | ) |
| | | .then((res) => { |
| | | //示ä¾ï¼è°ç¨åå°æ¥å£ |
| | | if (res.status) { |
| | | this.$Message.success('åå»ºä»»å¡æå') |
| | | console.log(res) |
| | | this.refresh() //å·æ°è¡¨æ ¼ |
| | | } else { |
| | | this.$Message.error(res.message) //é误æç¤º |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | var btnSupplementationData = this.buttons.find(x => x.value == "SupplementationData"); |
| | | if (btnSupplementationData != null) { |
| | | btnSupplementationData.onClick = () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) { |
| | | return this.$error("è¯·éæ©æ°æ®!"); |
| | | } else if (rows.length > 1) { |
| | | return this.$error("åªè½éæ©åæ¡æ°æ®"); |
| | | } |
| | | this.$refs.gridBody.open(rows[0].palletCode); |
| | | this.refresh(); |
| | | } |
| | | |
| | | } |
| | | //示ä¾ï¼å¨æé®çæå颿·»å ä¸ä¸ªæé® |
| | | // this.buttons.unshift({ |
| | | // //ä¹å¯ä»¥ç¨pushæè
spliceæ¹æ³æ¥ä¿®æ¹buttonsæ°ç» |