| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | import http from '@/api/http.js' |
| | | import { h,createVNode, render,reactive,ref } from 'vue'; |
| | | import { ElDialog , ElForm, ElFormItem, ElInput, ElButton, ElMessage ,ElSelect ,ElOption } from 'element-plus'; // å¼å
¥ElMessageï¼è§£å³æç¤ºæ ååº |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [ |
| | | { |
| | | name: 'ç»ç', |
| | | type: 'primary', |
| | | value: 'ç»ç', |
| | | onClick: function () { // ä¿®å¤1ï¼ç§»é¤æ ç¨rowåæ°ï¼å æ¥å¿è°è¯ |
| | | console.log('ç»çæé®è¢«ç¹å»ï¼å¼å§æ ¡éª'); |
| | | const selectedRows = this.$refs.table.getSelected(); |
| | | |
| | | // æ ¡éª1ï¼æ¯å¦éä¸è¡ |
| | | if (selectedRows.length === 0) { |
| | | console.log('æ ¡éªä¸éè¿ï¼æªéä¸ä»»ä½åæ®'); |
| | | ElMessage.warning('è¯·éæ©ä¸æ¡åæ®'); |
| | | return; |
| | | } |
| | | // æ ¡éª2ï¼æ¯å¦éä¸åè¡ |
| | | if (selectedRows.length > 1) { |
| | | console.log('æ ¡éªä¸éè¿ï¼éä¸å¤è¡åæ®'); |
| | | ElMessage.warning('åªè½éæ©ä¸æ¡åæ®'); |
| | | return; |
| | | } |
| | | |
| | | const targetRow = selectedRows[0]; |
| | | |
| | | this.$emit('openPalletDialog', targetRow.inboundOrderNo); |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¤éç»ç', |
| | | type: 'primary', |
| | | value: 'æ¤éç»ç', |
| | | onClick: function () { |
| | | console.log('æ¤éç»çæé®è¢«ç¹å»'); |
| | | const mountNode = document.createElement('div'); |
| | | document.body.appendChild(mountNode); |
| | | |
| | | // ååºå¼è¡¨åæ°æ®ï¼æçå·ï¼å¿
å¡«ï¼ |
| | | const formData = reactive({ |
| | | palletCode: '' // æçå·è¾å
¥æ¡ |
| | | }); |
| | | |
| | | // æäº¤è¡¨åçç»ä¸é»è¾ |
| | | const submitForm = async () => { |
| | | const formRef = vnode.component.refs.cancelPalletForm; |
| | | try { |
| | | // æ§è¡è¡¨åæ ¡éªï¼æçå·å¿
å¡«ï¼ |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | ElMessage.warning('请è¾å
¥ææçæçå·'); |
| | | return; |
| | | } |
| | | |
| | | // åèµ·æ¤éç»çè¯·æ± |
| | | try { |
| | | //console.log('åèµ·æ¤éç»ç请æ±ï¼æçå·ï¼', formData.palletCode.trim()); |
| | | const response = await http.post('/api/InboundOrder/CancelPalletGroup', { |
| | | palletCode: formData.palletCode.trim() |
| | | }); |
| | | |
| | | const { status, message, data } = response; |
| | | if (status) { |
| | | ElMessage.success(`æ¤éç»çæåï¼æçå·ï¼${formData.palletCode.trim()}`); |
| | | this.refresh(); // æååå·æ°å表 |
| | | // å
³éå¯¹è¯æ¡ |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } else { |
| | | console.log('æ¤éç»ç失败ï¼å端æç¤ºï¼', message); |
| | | ElMessage.error(message || data?.message || 'æ¤éç»ç失败'); |
| | | selectPalletCodeInput(); // éä¸è¾å
¥æ¡æ¹ä¾¿éæ°è¾å
¥ |
| | | } |
| | | } catch (error) { |
| | | console.error('æ¤éç»ç请æ±å¼å¸¸ï¼', error); |
| | | ElMessage.error('ç½ç»å¼å¸¸ææ¥å£é误ï¼è¯·ç¨åéè¯'); |
| | | selectPalletCodeInput(); |
| | | } |
| | | }; |
| | | |
| | | // éä¸è¾å
¥æ¡ææ¬ï¼æ¹ä¾¿éæ°è¾å
¥ï¼ |
| | | const selectPalletCodeInput = () => { |
| | | setTimeout(() => { |
| | | const inputRef = vnode.component.refs.palletCodeInput; |
| | | if (inputRef) { |
| | | const targetInput = inputRef.$el?.querySelector('input') || inputRef; |
| | | targetInput?.focus(); |
| | | targetInput?.select(); |
| | | } |
| | | }, 100); |
| | | }; |
| | | |
| | | // åå»ºå¯¹è¯æ¡VNode |
| | | const vnode = createVNode(ElDialog, { |
| | | title: 'æ¤éç»ç', |
| | | width: '400px', |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | onOpened: () => { |
| | | // å¯¹è¯æ¡æå¼åèªå¨èç¦è¾å
¥æ¡ |
| | | setTimeout(() => { |
| | | const inputRef = vnode.component.refs.palletCodeInput; |
| | | inputRef?.focus(); |
| | | }, 100); |
| | | }, |
| | | 'onUpdate:modelValue': (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } |
| | | } |
| | | }, { |
| | | default: () => h(ElForm, { |
| | | model: formData, |
| | | rules: { |
| | | palletCode: [ |
| | | { required: true, message: '请è¾å
¥æçå·', trigger: ['blur', 'enter'] }, |
| | | { min: 1, max: 50, message: 'æçå·é¿åº¦ä¸è½è¶
è¿50个å符', trigger: ['blur', 'input'] } |
| | | ] |
| | | }, |
| | | ref: 'cancelPalletForm' |
| | | }, [ |
| | | // æçå·è¾å
¥é¡¹ |
| | | h(ElFormItem, { label: 'æçå·', prop: 'palletCode', required: true }, [ |
| | | h(ElInput, { |
| | | type: 'text', |
| | | modelValue: formData.palletCode, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.palletCode = val; |
| | | }, |
| | | ref: 'palletCodeInput', |
| | | placeholder: 'æ«ç è¾å
¥ææå¨è¾å
¥æçå·', |
| | | maxLength: 50, |
| | | // çå¬å车äºä»¶ï¼æ«ç æªé»è®¤ä¼åéåè½¦ï¼ |
| | | onKeydown: (e) => { |
| | | if (e.key === 'Enter') { |
| | | e.preventDefault(); |
| | | submitForm(); |
| | | } |
| | | } |
| | | }) |
| | | ]), |
| | | // åºé¨æé®åº |
| | | h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [ |
| | | h(ElButton, { |
| | | type: 'text', |
| | | onClick: () => { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | ElMessage.info('åæ¶æ¤éç»ç'); |
| | | } |
| | | }, 'åæ¶'), |
| | | h(ElButton, { |
| | | type: 'primary', |
| | | onClick: submitForm.bind(this) // ç»å®thisä¸ä¸æ |
| | | }, '确认æ¤é') |
| | | ]) |
| | | ]) |
| | | }); |
| | | |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | } |
| | | }, |
| | | { |
| | | name: 'åæ¹å
¥åº', |
| | | type: 'primary', |
| | | value: 'åæ¹å
¥åº', |
| | | onClick: async function () { |
| | | console.log('åæ¹å
¥åºæé®è¢«ç¹å»ï¼å¼å§æ ¡éª'); |
| | | const selectedRows = this.$refs.table.getSelected(); |
| | | |
| | | // æ ¡éª1ï¼æ¯å¦éä¸è¡ï¼è³å°éæ©ä¸æ¡ï¼ |
| | | if (selectedRows.length === 0) { |
| | | console.log('æ ¡éªä¸éè¿ï¼æªéä¸ä»»ä½åæ®'); |
| | | ElMessage.warning('è¯·éæ©è³å°ä¸æ¡åæ®'); |
| | | return; |
| | | } |
| | | |
| | | // æ¶éææéä¸åæ®çç¼å·ï¼è¿æ»¤æ åæ®å·çå¼å¸¸è¡ï¼ |
| | | const inboundOrderNos = selectedRows |
| | | .filter(row => row.inboundOrderNo) |
| | | .map(row => row.inboundOrderNo); |
| | | |
| | | // æ ¡éª2ï¼æ¯å¦æææåæ®å· |
| | | if (inboundOrderNos.length === 0) { |
| | | console.log('æ ¡éªä¸éè¿ï¼éä¸åæ®æ ææç¼å·'); |
| | | ElMessage.warning('éä¸ç忮䏿 ææç¼å·ï¼è¯·éæ°éæ©'); |
| | | return; |
| | | } |
| | | |
| | | try { |
| | | console.log('åèµ·åæ¹å
¥åºè¯·æ±ï¼åæ°ï¼', { inboundOrderNos}); |
| | | const response = await http.post('/api/InboundOrder/BatchOrderFeedbackToMes', { |
| | | orderNos: inboundOrderNos, |
| | | inout:1 |
| | | }); |
| | | |
| | | const { status, message, data } = response; |
| | | if (status) { |
| | | console.log('åæ¹å
¥åºæåï¼å端è¿åï¼', data); |
| | | ElMessage.success(`åæ¹å
¥åºæåï¼å
±å¤ç${inboundOrderNos.length}æ¡åæ®`); |
| | | this.refresh(); // å
¥åºæååå·æ°å表ï¼å¤ç¨åæé»è¾ï¼ |
| | | } else { |
| | | console.log('åæ¹å
¥åºå¤±è´¥ï¼å端æç¤ºï¼', message); |
| | | ElMessage.error(message || data?.message || 'åæ¹å
¥åºå¤±è´¥'); |
| | | } |
| | | } catch (error) { |
| | | console.error('åæ¹å
¥åºè¯·æ±å¼å¸¸ï¼', error); |
| | | ElMessage.error('ç½ç»å¼å¸¸ææ¥å£é误ï¼è¯·ç¨åéè¯'); |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | name: '空æçå
¥åº', |
| | | type: 'primary', |
| | | value: '空æçå
¥åº', |
| | | |
| | | onClick: function () { |
| | | const mountNode = document.createElement('div'); |
| | | document.body.appendChild(mountNode); |
| | | |
| | | // ååºå¼è¡¨åæ°æ®ï¼æç®±ç ï¼å¿
å¡«ï¼æ«ç æª/æå¨è¾å
¥ï¼ |
| | | const formData = reactive({ |
| | | boxCode: '', |
| | | warehouseCode:'' |
| | | }); |
| | | |
| | | const warehouses = ref([]); |
| | | const isLoadingWarehouses = ref(false); |
| | | |
| | | const getWarehouseList = async () => { |
| | | isLoadingWarehouses.value = true; |
| | | try { |
| | | const { data, status } = await http.post('/api/LocationInfo/GetLocationTypes'); |
| | | if (status && Array.isArray(data)) { |
| | | // æ ¼å¼åä»åºé项ï¼éé
ElSelectçlabel-valueæ ¼å¼ |
| | | warehouses.value = data.map(item => ({ |
| | | label: item.locationTypeDesc, |
| | | value: item.locationType |
| | | })); |
| | | } else { |
| | | ElMessage.error('è·ååºåå表失败'); |
| | | warehouses.value = []; |
| | | } |
| | | } catch (err) { |
| | | ElMessage.error('åºåæ°æ®è¯·æ±å¼å¸¸ï¼è¯·ç¨åéè¯'); |
| | | warehouses.value = []; |
| | | } finally { |
| | | isLoadingWarehouses.value = false; |
| | | } |
| | | }; |
| | | |
| | | // æäº¤è¡¨åçç»ä¸é»è¾ï¼ä¾å车触ååæé®ç¹å»å
±ç¨ï¼ |
| | | const submitForm = async () => { |
| | | const formRef = vnode.component.refs.batchInForm; |
| | | try { |
| | | // æ§è¡è¡¨åæ ¡éªï¼æç®±ç å¿
å¡«ï¼ |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | ElMessage.warning('请è¾å
¥ææçæç®±ç '); |
| | | return; |
| | | } |
| | | |
| | | |
| | | http.post('/api/InboundOrder/EmptyMaterielGroup', { |
| | | palletCode: formData.boxCode.trim(), |
| | | warehouseCode:formData.warehouseCode |
| | | }).then(({ data, status, message }) => { |
| | | if (status) { |
| | | ElMessage.success(`å
¥åºæåï¼æç®±ç ï¼${formData.boxCode.trim()}`); |
| | | this.refresh(); |
| | | formData.boxCode = ''; |
| | | |
| | | setTimeout(() => { |
| | | const inputRef = vnode.component.refs.boxCodeInput; |
| | | inputRef?.focus(); |
| | | }, 100); |
| | | } else { |
| | | ElMessage.error(message || data?.message || 'å
¥åºå¤±è´¥'); |
| | | selectBoxCodeInput(); |
| | | } |
| | | }).catch(() => { |
| | | ElMessage.error('请æ±å¤±è´¥ï¼è¯·ç¨åéè¯'); |
| | | selectBoxCodeInput(); |
| | | }); |
| | | }; |
| | | |
| | | const selectBoxCodeInput = () => { |
| | | setTimeout(() => { |
| | | const inputRef = vnode.component.refs.boxCodeInput; |
| | | if (inputRef) { |
| | | const targetInput = inputRef.$el?.querySelector('input') || inputRef; |
| | | targetInput?.focus(); |
| | | targetInput?.select(); |
| | | } |
| | | }, 100); |
| | | } |
| | | const vnode = createVNode(ElDialog, { |
| | | title: '空æçå
¥åº', |
| | | width: '400px', |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | |
| | | onOpened: async () => { |
| | | await getWarehouseList(); |
| | | const inputRef = vnode.component.refs.boxCodeInput; |
| | | inputRef?.focus(); |
| | | }, |
| | | 'onUpdate:modelValue': (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } |
| | | } |
| | | }, { |
| | | default: () => h(ElForm, { |
| | | model: formData, |
| | | rules: { |
| | | boxCode: [ |
| | | { required: true, message: '请è¾å
¥æç®±ç ', trigger: ['blur', 'enter'] } |
| | | ], |
| | | warehouseCode:[ |
| | | { required: true, message: 'è¯·éæ©åºå', trigger: ['change', 'blur'] } |
| | | ] |
| | | }, |
| | | ref: 'batchInForm' |
| | | }, [ |
| | | //ä»åºæ°æ® |
| | | h(ElFormItem, { label: 'åºå', prop: 'warehouseCode', required: true }, [ |
| | | h(ElSelect, { |
| | | modelValue: formData.warehouseCode, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.warehouseCode = val; |
| | | }, |
| | | placeholder: 'è¯·éæ©å
¥åºåºå', |
| | | filterable: true, // æ¯ææç´¢ä»åº |
| | | loading: isLoadingWarehouses.value, // å è½½ç¶æ |
| | | style: { width: '100%' } |
| | | }, [ |
| | | // 渲æä»åºä¸æé项 |
| | | warehouses.value.map(item => h(ElOption, { |
| | | label: item.label, |
| | | value: item.value |
| | | })) |
| | | ]) |
| | | ]), |
| | | // æç®±ç è¾å
¥é¡¹ï¼æ¯æèç¦ãå车æäº¤ï¼ |
| | | h(ElFormItem, { label: 'æç®±ç ', prop: 'boxCode', required: true }, [ |
| | | h(ElInput, { |
| | | type: 'text', |
| | | modelValue: formData.boxCode, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.boxCode = val; |
| | | }, |
| | | ref: 'boxCodeInput', |
| | | placeholder: 'æ«ç è¾å
¥ææå¨è¾å
¥æç®±ç ', |
| | | // çå¬å车äºä»¶ï¼æ«ç æªé»è®¤ä¼åéåè½¦ï¼ |
| | | onKeydown: (e) => { |
| | | if (e.key === 'Enter') { |
| | | e.preventDefault(); |
| | | submitForm(); |
| | | } |
| | | } |
| | | }) |
| | | ]), |
| | | // åºé¨æé®åº |
| | | h('div', { style: { textAlign: 'right', marginTop: '16px' } }, [ |
| | | h(ElButton, { |
| | | type: 'text', |
| | | onClick: () => { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | ElMessage.info('åæ¶å
¥åºä»»å¡'); |
| | | } |
| | | }, 'åæ¶'), |
| | | h(ElButton, { |
| | | type: 'primary', |
| | | onClick: submitForm |
| | | }, 'ç¡®å®') |
| | | ]) |
| | | ]) |
| | | }); |
| | | |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | } |
| | | } |
| | | ], box: [], detail: [] }, |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | let wheres = [{ |
| | | 'name': 'orderType', |
| | | 'value': '115', |
| | | 'displayType': 'text'}]; |
| | | |
| | | |
| | | param.wheres.push(...wheres); |
| | | // this.searchFormFields.orderType=[115] |
| | | 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 http from '@/api/http.js' |
| | | import { h,createVNode, render,reactive ,ref } from 'vue'; |
| | | import { ElDialog , ElForm, ElFormItem, ElInput, ElButton, ElMessage ,ElSelect, ElOption} from 'element-plus'; |
| | | |
| | | import gridBody from './extend/outOrderDetail.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [ |
| | | /* { |
| | | name: 'åºåº', |
| | | type: 'primary', |
| | | value: 'åºåº', |
| | | onClick: function () { // ä¿®å¤ï¼ç¨ElMessageæ¿ä»£this.$message |
| | | const selectedRows = this.$refs.table.getSelected(); |
| | | if (selectedRows.length === 0) { |
| | | ElMessage.warning('请å
éæ©è¦çæä»»å¡çè¡'); |
| | | return; |
| | | } |
| | | if (selectedRows.length > 1) { |
| | | ElMessage.warning('åªè½éæ©ä¸è¡'); |
| | | return; |
| | | } |
| | | |
| | | |
| | | // æææ ¡éªéè¿ï¼è§¦å主ç»ä»¶æå¼åºåºå¼¹çª |
| | | console.log('æææ ¡éªéè¿ï¼è§¦åopenOutboundDialogäºä»¶ï¼åæ®æ°æ®ï¼', selectedRows[0]); |
| | | |
| | | this.$emit('openOutboundDialog', { |
| | | transNo: selectedRows[0].transNo, // åºåºåç¼å· |
| | | createDate: selectedRows[0].createDate || new Date().toLocaleDateString() // åºåºæ¥æ |
| | | }); |
| | | } |
| | | }, */ |
| | | { |
| | | name: '空æçåºåº', |
| | | type: 'primary', |
| | | value: '空æçåºåº', |
| | | onClick: function () { |
| | | |
| | | |
| | | const platformOptions = Array.from({ length: 1 }, (_, i) => { |
| | | const num = 1; |
| | | return { label: `ç«å°${num}`, value: `1-2` }; |
| | | }); |
| | | |
| | | const quantityOptions = Array.from({ length: 6 }, (_, i) => ({ |
| | | label: (i + 1).toString(), |
| | | value: i + 1 |
| | | })); |
| | | |
| | | const warehouseOptions = ref([]); |
| | | const isLoadingWarehouses = ref(false); |
| | | |
| | | const getWarehouseList = async () => { |
| | | isLoadingWarehouses.value = true; |
| | | try { |
| | | const { data, status } = await http.post('/api/LocationInfo/GetLocationTypes'); |
| | | if (status && Array.isArray(data)) { |
| | | // æ ¼å¼åä»åºé项ï¼éé
ElSelectçlabel-valueæ ¼å¼ |
| | | warehouseOptions.value = data.map(item => ({ |
| | | label: item.locationTypeDesc, |
| | | value: item.locationType |
| | | })); |
| | | } else { |
| | | ElMessage.error('è·ååºåå表失败'); |
| | | warehouseOptions.value = []; |
| | | } |
| | | } catch (err) { |
| | | ElMessage.error('åºåæ°æ®è¯·æ±å¼å¸¸ï¼è¯·ç¨åéè¯'); |
| | | warehouseOptions.value = []; |
| | | } finally { |
| | | isLoadingWarehouses.value = false; |
| | | } |
| | | }; |
| | | |
| | | const mountNode = document.createElement('div'); |
| | | document.body.appendChild(mountNode); |
| | | |
| | | |
| | | const formData = reactive({ |
| | | warehouseCode:'', |
| | | palletCode: '', |
| | | selectedPlatform: platformOptions[0].value, |
| | | quantity:1 |
| | | }); |
| | | |
| | | const vnode = createVNode(ElDialog, { |
| | | title: '空æçåºåº', |
| | | width: '500px', |
| | | modelValue: true, |
| | | appendToBody: true, |
| | | onOpened: async () => { |
| | | await getWarehouseList(); |
| | | const inputRef = vnode.component.refs.boxCodeInput; |
| | | inputRef?.focus(); |
| | | }, |
| | | 'onUpdate:modelValue': (isVisible) => { |
| | | if (!isVisible) { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } |
| | | }, |
| | | style: { |
| | | padding: '20px 0', |
| | | borderRadius: '8px' |
| | | } |
| | | }, { |
| | | default: () => h(ElForm, { |
| | | model: formData, |
| | | rules: { |
| | | warehouseCode:[ |
| | | { required: true, message: 'è¯·éæ©åºå', trigger: ['change', 'blur'] } |
| | | ], |
| | | palletCode: [ |
| | | { type: 'string', message: 'æç®±å·å¿
须为å符串', trigger: 'blur' } |
| | | ], |
| | | selectedPlatform: [ |
| | | { required: true, message: 'è¯·éæ©åºåºç«å°', trigger: 'change' } |
| | | ], |
| | | quantity:[ |
| | | { required: true, message: 'è¯·éæ©ç©ºç®±æ°é', trigger: 'change'} |
| | | ] |
| | | }, |
| | | ref: 'batchOutForm', |
| | | labelWidth: '100px', |
| | | style: { |
| | | padding: '0 30px', |
| | | } |
| | | }, |
| | | [ |
| | | // h(ElFormItem, { |
| | | // label: 'ä»åºåºå', |
| | | // prop: 'warehouseCode', |
| | | // style: { |
| | | // marginBottom: '24px' |
| | | // } |
| | | // }, [ |
| | | // h(ElSelect, { |
| | | // placeholder: 'è¯·éæ©ä»åºåºå', |
| | | // modelValue: formData.warehouseCode, |
| | | // 'onUpdate:modelValue': (val) => { |
| | | // formData.warehouseCode = val; |
| | | // }, |
| | | // style: { |
| | | // width: '100%', |
| | | // height: '40px', |
| | | // borderRadius: '4px', |
| | | // borderColor: '#dcdfe6' |
| | | // } |
| | | // }, warehouseOptions.value.map(platform => |
| | | // h(ElOption, { label: platform.label, value: platform.value }) |
| | | // )) |
| | | // ]), |
| | | h(ElFormItem, { |
| | | label: 'åºåºç«å°', |
| | | prop: 'selectedPlatform', |
| | | style: { |
| | | marginBottom: '24px' |
| | | } |
| | | }, [ |
| | | h(ElSelect, { |
| | | placeholder: 'è¯·éæ©åºåºç«å°', |
| | | modelValue: formData.selectedPlatform, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.selectedPlatform = val; |
| | | }, |
| | | style: { |
| | | width: '100%', |
| | | height: '40px', |
| | | borderRadius: '4px', |
| | | borderColor: '#dcdfe6' |
| | | } |
| | | }, platformOptions.map(platform => |
| | | h(ElOption, { label: platform.label, value: platform.value }) |
| | | )) |
| | | ]), |
| | | // h(ElFormItem,{ |
| | | // label:'åºåºæ°é', |
| | | // prop:'quantity', |
| | | // style:{ |
| | | // marginBottom:'24px' |
| | | // } |
| | | // },[h(ElSelect,{ |
| | | // placeholder:'è¯·éæ©ç©ºç®±æ°é', |
| | | // modelValue:formData.quantity, |
| | | // 'onUpdate:modelValue':(val)=>{ |
| | | // formData.quantity=val; |
| | | // }, |
| | | // style:{ |
| | | // width:'100%', |
| | | // height:'40px', |
| | | // borderRadius:'4px', |
| | | // borderColor:'#dcdfe6' |
| | | // }, |
| | | // filterable:false |
| | | // }, |
| | | // quantityOptions.map(option=> |
| | | // h(ElOption,{ |
| | | // label:option.label, |
| | | // value:option.value |
| | | // }) |
| | | // ) |
| | | // )]), |
| | | h(ElFormItem, { |
| | | label: 'æç®±å·', |
| | | prop: 'palletCode', |
| | | style: { |
| | | marginBottom: '16px' |
| | | } |
| | | }, [ |
| | | h(ElInput, { |
| | | type: 'text', |
| | | placeholder: 'å¯éè¾å
¥æç®±å·ï¼ä¸å¡«åèªå¨åé
空æç®±', |
| | | modelValue: formData.palletCode, |
| | | 'onUpdate:modelValue': (val) => { |
| | | formData.palletCode = val; |
| | | }, |
| | | style: { |
| | | width: '100%', |
| | | height: '40px', |
| | | borderRadius: '4px', |
| | | borderColor: '#dcdfe6' |
| | | }, |
| | | attrs: { |
| | | placeholderStyle: 'color: #909399;' |
| | | } |
| | | }) |
| | | ]), |
| | | |
| | | h('div', { |
| | | style: { |
| | | textAlign: 'right', |
| | | marginTop: '8px', |
| | | paddingRight: '4px' |
| | | } |
| | | }, [ |
| | | h(ElButton, { |
| | | type: 'text', |
| | | onClick: () => { |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | ElMessage.info('åæ¶åºåºæä½'); |
| | | }, |
| | | style: { |
| | | marginRight: '8px', |
| | | color: '#606266' |
| | | } |
| | | }, 'åæ¶'), |
| | | h(ElButton, { |
| | | type: 'primary', |
| | | onClick: async () => { |
| | | const formRef = vnode.component.refs.batchOutForm; |
| | | try { |
| | | await formRef.validate(); |
| | | } catch (err) { |
| | | return; |
| | | } |
| | | |
| | | http.post('/api/Task/PalletOutboundTask?palletCode='+formData.palletCode+'&endStation='+formData.selectedPlatform, { |
| | | |
| | | }).then(({ data, status, message }) => { |
| | | if (status) { |
| | | |
| | | ElMessage.success(`åºåºæå`); |
| | | this.refresh(); |
| | | render(null, mountNode); |
| | | document.body.removeChild(mountNode); |
| | | } else { |
| | | ElMessage.error(message || data?.message || 'åºåºå¤±è´¥'); |
| | | } |
| | | }).catch(() => { |
| | | ElMessage.error('请æ±å¤±è´¥ï¼è¯·ç¨åéè¯'); |
| | | }); |
| | | }, |
| | | style: { |
| | | borderRadius: '4px', |
| | | padding: '8px 20px' |
| | | } |
| | | }, 'ç¡®å®') |
| | | ]) |
| | | ]) |
| | | }); |
| | | |
| | | vnode.appContext = this.$.appContext; |
| | | render(vnode, mountNode); |
| | | } |
| | | } |
| | | ], 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) => { |
| | | const table = this.$refs.table.$refs.table; |
| | | if(table){ |
| | | table.clearSelection(); |
| | | table.toggleRowSelection(row,true); |
| | | } |
| | | const rowId =row.id; |
| | | console.log(rowId); |
| | | this.$refs.gridBody.open(row); |
| | | } |
| | | }); |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | // this.searchFormFields.orderType=[215] |
| | | |
| | | let wheres = [{ |
| | | 'name': 'orderType', |
| | | 'value': '215', |
| | | 'displayType': 'text'}]; |
| | | |
| | | |
| | | param.wheres.push(...wheres); |
| | | 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; |
| | | |
| | |
| | | path: '/materielToMes', |
| | | name: 'Dt_MaterielToMes', |
| | | component: () => import('@/views/inbound/Dt_MaterielToMes.vue') |
| | | }, |
| | | }, { |
| | | path:'/allocateinboundOrder', |
| | | name: 'allocateinboundOrder', |
| | | component: () => import('@/views/inbound/allocateinboundOrder.vue') |
| | | |
| | | },{ |
| | | path:'allocateoutboundOrder', |
| | | name: 'allocateoutboundOrder', |
| | | component: () => import('@/views/outbound/allocateoutboundOrder.vue') |
| | | }, |
| | | { |
| | | path: '/allocateOrder', |
| | | name: 'Dt_AllocateOrder', |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | @openPalletDialog="handleOpenPalletDialog" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | <!-- 2. ç»çå¼¹çªï¼ç¡®ä¿propsåäºä»¶ç»å®æ£ç¡® --> |
| | | <PalletDialog |
| | | v-model:visible="palletVisible" |
| | | :docNo="currentPalletDocNo" |
| | | @back-success="handlePalletBackSuccess" |
| | | ></PalletDialog> |
| | | |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/inbound/allocateinboundOrder.js"; |
| | | import ViewGrid from '@/components/basic/ViewGrid/ViewGrid.vue'; |
| | | import { ref, defineComponent } from "vue"; |
| | | import PalletDialog from "@/extension/inbound/extend/Pallet.vue"; |
| | | export default defineComponent({ |
| | | components: { |
| | | // å
³é®ä¿®å¤2ï¼ç»ä»¶æ³¨åå䏿¨¡æ¿æ ç¾åéé
ï¼kebab-case对åºview-gridï¼ |
| | | viewGrid: ViewGrid, // 注å为kebab-caseï¼æ¨¡æ¿ç¨<view-grid> |
| | | PalletDialog // 注åç»çå¼¹çª |
| | | |
| | | }, |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "è°æ¨å(æºä»è°å¤é¨ä»åº)", |
| | | name: "inboundOrder", |
| | | url: "/InboundOrder/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | orderType: "", |
| | | inboundOrderNo: "", |
| | | upperOrderNo: "", |
| | | remark: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { |
| | | title: "åæ®ç±»å", |
| | | required: true, |
| | | field: "orderType", |
| | | type: "select", |
| | | dataKey: "inOrderType", |
| | | data: [], |
| | | }, |
| | | { |
| | | field: "inboundOrderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "䏿¸¸åæ®ç¼å·", |
| | | field: "upperOrderNo", |
| | | type: "string", |
| | | }, |
| | | { |
| | | title: "夿³¨", |
| | | field: "remark", |
| | | type: "textarea", |
| | | }, |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | inboundOrderNo: "", |
| | | upperOrderNo: "", |
| | | orderType: "115", |
| | | orderStatus: "", |
| | | createType: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "inboundOrderNo", type: "like" }, |
| | | { title: "䏿¸¸åæ®ç¼å·", field: "upperOrderNo", type: "like" }, |
| | | { |
| | | title: "åæ®ç±»å", |
| | | field: "orderType", |
| | | type: "select", |
| | | dataKey: "inOrderType", |
| | | data: [], |
| | | }, |
| | | { |
| | | title: "åæ®ç¶æ", |
| | | field: "orderStatus", |
| | | type: "select", |
| | | dataKey: "inboundState", |
| | | 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: "inboundOrderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | link: true, |
| | | }, |
| | | { |
| | | field: "upperOrderNo", |
| | | title: "䏿¸¸åæ®ç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderType", |
| | | title: "åæ®ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "inOrderType", data: [] }, |
| | | }, |
| | | { |
| | | field: "businessType", |
| | | title: "ä¸å¡ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "businessType", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderStatus", |
| | | title: "åæ®ç¶æ", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | bind: { key: "inboundState", data: [] }, |
| | | }, |
| | | { |
| | | field: "createType", |
| | | title: "å建æ¹å¼", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "createType", data: [] }, |
| | | }, |
| | | { |
| | | field: "factoryArea", |
| | | title: "ååº", |
| | | type: "string", |
| | | width: 120, |
| | | 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: "è°æ¨åæç»", |
| | | table: "InboundOrderDetail", |
| | | 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: "select", |
| | | width: 150, |
| | | align: "left", |
| | | edit: { type: "" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "materielCode", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "MaterielNames", data: [] }, |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "supplyCode", |
| | | title: "ä¾åºåç¼å·", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "warehouseCode", |
| | | title: "ä»åºå·", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | required: true |
| | | }, |
| | | { |
| | | field: "barcode", |
| | | title: "æ¡ç ", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "decimal", |
| | | width: 90, |
| | | align: "left", |
| | | edit: { type: "number" }, |
| | | required: true, |
| | | }, |
| | | { |
| | | field: "receiptQuantity", |
| | | title: "ç»çæ°é", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "overInQuantity", |
| | | title: "䏿¶æ°é", |
| | | type: "string", |
| | | width: 200, |
| | | 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", |
| | | }); |
| | | // 6. ç»çå¼¹çªèå¨ï¼ææåéå¿
é¡»è¿åï¼ |
| | | const palletVisible = ref(false); |
| | | const currentPalletDocNo = ref(""); |
| | | |
| | | const handleOpenPalletDialog = (docNo) => { |
| | | console.log('主ç»ä»¶æ¶å°ç»çäºä»¶ï¼åæ®å·ï¼', docNo); |
| | | currentPalletDocNo.value = docNo; |
| | | palletVisible.value = true; |
| | | }; |
| | | |
| | | const handlePalletBackSuccess = () => { |
| | | console.log('ç»çåä¼ æåï¼å·æ°è¡¨æ ¼'); |
| | | grid.value?.refresh(); // æ¤æ¶gridRefå·²æè½½ï¼å¯è°ç¨æ¹æ³ |
| | | }; |
| | | |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | // ç»çå¼¹çªç¸å
³ |
| | | PalletDialog, // å¼¹çªç»ä»¶ï¼æ éè¿åï¼æ³¨åå³å¯ï¼ä½åééè¿åï¼ |
| | | palletVisible, |
| | | currentPalletDocNo, |
| | | handleOpenPalletDialog, |
| | | handlePalletBackSuccess |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | @openOutboundDialog="handleOpenOutboundDialog" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | <!-- åºåºæä½å¼¹çª --> |
| | | <OutboundDialog |
| | | v-model:visible="outboundVisible" |
| | | :selected-document="selectedOutboundDocument" |
| | | @outbound-success="handleOutboundSuccess" |
| | | ></OutboundDialog> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/outbound/allocateoutboundOrder.js"; |
| | | import ViewGrid from '@/components/basic/ViewGrid/ViewGrid.vue'; |
| | | import { ref, defineComponent } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import OutboundDialog from "@/extension/outbound/extend/OutBound.vue"; // å¼å
¥åºåºå¼¹çªç»ä»¶ |
| | | |
| | | |
| | | export default defineComponent({ |
| | | components: { |
| | | // å
³é®ä¿®å¤2ï¼ç»ä»¶æ³¨åå䏿¨¡æ¿æ ç¾åéé
ï¼kebab-case对åºview-gridï¼ |
| | | viewGrid: ViewGrid, // 注å为kebab-caseï¼æ¨¡æ¿ç¨<view-grid> |
| | | OutboundDialog // 注ååºåºå¼¹çªç»ä»¶ |
| | | }, |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "è°æ¨å(å¤é¨ä»åºè°æºä»)", |
| | | name: "outboundOrder", |
| | | url: "/OutboundOrder/", |
| | | 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: "upperOrderNo", |
| | | type: "string", |
| | | }, |
| | | { |
| | | 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: "215", |
| | | orderStatus: "", |
| | | createType: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "orderNo", type: "like" }, |
| | | { title: "䏿¸¸åæ®ç¼å·", field: "upperOrderNo", 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: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | width: 160, |
| | | align: "left", |
| | | // link: true, |
| | | }, |
| | | { |
| | | field: "upperOrderNo", |
| | | title: "䏿¸¸åæ®ç¼å·", |
| | | type: "string", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderType", |
| | | title: "åæ®ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "outOrderType", data: [] }, |
| | | }, |
| | | { |
| | | field: "businessType", |
| | | title: "ä¸å¡ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "businessType", 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: "factoryArea", |
| | | title: "ååº", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "departmentCode", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | hidden:true |
| | | }, |
| | | { |
| | | field: "departmentName", |
| | | title: "é¨é¨åç§°", |
| | | type: "string", |
| | | width: 160, |
| | | 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: "è°æ¨æç»å", |
| | | 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: "supplyCode", |
| | | title: "ä¾åºåç¼å·", |
| | | type: "string", |
| | | 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: "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", |
| | | }); |
| | | // è°æ¨å¼¹çªç¸å
³ |
| | | const outboundVisible = ref(false); |
| | | const selectedOutboundDocument = ref({}); // åå¨éä¸çè°æ¨åæ°æ® |
| | | |
| | | // æå¼è°æ¨å¼¹çªï¼ä»æ©å±é
ç½®çæé®äºä»¶è§¦åï¼ |
| | | const handleOpenOutboundDialog = (docData) => { |
| | | selectedOutboundDocument.value = docData; // ä¿åéä¸çåæ®æ°æ® |
| | | outboundVisible.value = true; // æ¾ç¤ºå¼¹çª |
| | | }; |
| | | |
| | | // è°æ¨æååçåè° |
| | | const handleOutboundSuccess = (docNo) => { |
| | | ElMessage.success(`åæ® ${docNo} è°æ¨æå`); |
| | | gridRef.value?.refresh(); // å·æ°è¡¨æ ¼æ°æ® |
| | | }; |
| | | |
| | | // åå§åæ©å±é
ç½®ï¼ä¸ºè°æ¨æé®æ·»å äºä»¶è§¦åé»è¾ |
| | | const initExtension = () => { |
| | | // æ¾å°"è°æ¨"æé®å¹¶ç»å®æå¼å¼¹çªçé»è¾ |
| | | const outboundBtn = extend.buttons.view.find(btn => btn.name === 'åºåº'); |
| | | if (outboundBtn) { |
| | | const originalOnClick = outboundBtn.onClick; |
| | | outboundBtn.onClick = function() { |
| | | // å
æ§è¡åææ ¡éªé»è¾ |
| | | const selectedRows = this.$refs.table.getSelected(); |
| | | if (selectedRows.length === 1) { |
| | | // æ ¡éªéè¿åï¼è§¦å主ç»ä»¶çåºåºå¼¹çªäºä»¶ |
| | | this.$emit('openOutboundDialog', selectedRows[0]); |
| | | } else { |
| | | // åæé»è¾å·²å¤çæç¤ºï¼æ ééå¤ |
| | | originalOnClick.call(this); |
| | | } |
| | | }; |
| | | } |
| | | }; |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | // åºåºç¸å
³ |
| | | outboundVisible, |
| | | selectedOutboundDocument, |
| | | handleOpenOutboundDialog, |
| | | handleOutboundSuccess |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseRepository; |
| | | using WIDESEA_DTO.Allocate; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Outbound; |
| | |
| | | _inboundOrderRepository = inboundOrderRepository; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºåé¦ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="HttpRequestException"></exception> |
| | | public async Task<ResponseModel> FeedbackInbound(FeedbackInboundRequestModel model) |
| | | { |
| | | string json =JsonConvert.SerializeObject(model, new JsonSerializerSettings |
| | |
| | | |
| | | return JsonConvert.DeserializeObject<ResponseModel>(body); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// åºåºåé¦ |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="HttpRequestException"></exception> |
| | | public async Task<ResponseModel> FeedbackOutbound(FeedbackOutboundRequestModel model) |
| | | { |
| | | string json = JsonConvert.SerializeObject(model, new JsonSerializerSettings |
| | |
| | | return JsonConvert.DeserializeObject<ResponseModel>(body); |
| | | } |
| | | |
| | | public async Task<ResponseModel> FeedbackAllocate(AllocateDto model) |
| | | { |
| | | string json = JsonConvert.SerializeObject(model, new JsonSerializerSettings |
| | | { |
| | | ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() |
| | | }); |
| | | var content = new StringContent(json, Encoding.UTF8, "application/json"); |
| | | var _client = _httpClientFactory.CreateClient("MESUrl"); |
| | | _client.DefaultRequestHeaders.Clear(); |
| | | _client.DefaultRequestHeaders.Add("Accept", "application/json"); |
| | | _logger.LogInformation("InvokeMESService FeedbackAllocate : " + json); |
| | | var response = await _client.PostAsync("AldAllocationOperation/AllocationOperation", content); |
| | | string body = await response.Content.ReadAsStringAsync(); |
| | | _logger.LogInformation("InvokeMESService FeedbackAllocate body: " + body); |
| | | if (!response.IsSuccessStatusCode) |
| | | { |
| | | |
| | | throw new HttpRequestException(body); |
| | | } |
| | | |
| | | return JsonConvert.DeserializeObject<ResponseModel>(body); |
| | | } |
| | | |
| | | public async Task<ResponseModel> NewMaterielToMes(MaterielToMesDTO model) |
| | | { |
| | | string json = JsonConvert.SerializeObject(model, new JsonSerializerSettings |
| | |
| | | |
| | | [Description("å
¥åºç¡®è®¤")] |
| | | å
¥åºç¡®è®¤ = 3, |
| | | |
| | | |
| | | [Description("å
¥åºå®æ")] |
| | | å
¥åºå®æ = 6, |
| | | |
| | |
| | | /// è¯·æ±æ¶é´ |
| | | /// </summary> |
| | | [JsonProperty("reqTime")] |
| | | public DateTime ReqTime { get; set; } |
| | | public string ReqTime { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 订åç¼å· |
| | |
| | | [JsonProperty("business_type")] |
| | | public string BusinessType { get; set; } |
| | | |
| | | public string fromWarehouse { get; set; } |
| | | |
| | | public string toWarehouse { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æ¯å¦åæ¹ |
| | | /// </summary> |
| | |
| | | [JsonProperty("factoryArea")] |
| | | public string FactoryArea { get; set; } |
| | | |
| | | [JsonProperty("operator")] |
| | | public string Operator { get; set; } |
| | | |
| | | /// <summary> |
| | | /// æä½ç±»å |
| | | /// </summary> |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_DTO.Allocate; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Outbound; |
| | |
| | | |
| | | Task<ResponseModel> FeedbackOutbound(FeedbackOutboundRequestModel model); |
| | | |
| | | Task<ResponseModel> FeedbackAllocate(AllocateDto model); |
| | | Task<string> GetToken(String username, string password); |
| | | |
| | | Task<ResponseModel> NewMaterielToMes(MaterielToMesDTO model); |
| | |
| | | } |
| | | |
| | | #region æ ¸å¿ä¸å¡æµç¨ |
| | | |
| | | /// <summary> |
| | | /// æ£é |
| | | /// </summary> |
| | | /// <param name="orderNo"></param> |
| | | /// <param name="palletCode"></param> |
| | | /// <param name="barcode"></param> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> ConfirmPicking(string orderNo, string palletCode, string barcode) |
| | | { |
| | | try |
| | |
| | | return WebResponseContent.Instance.Error($"æ£é确认失败ï¼{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// åæ¶æ£é |
| | | /// </summary> |
| | | /// <param name="orderNo"></param> |
| | | /// <param name="palletCode"></param> |
| | | /// <param name="barcode"></param> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> CancelPicking(string orderNo, string palletCode, string barcode) |
| | | { |
| | | try |
| | | { |
| | | if (await IsPalletReturned(palletCode)) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æç{palletCode}å·²ç»ååºï¼ä¸è½åæ¶åæ£"); |
| | | } |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | // 1. åç½®éªè¯ |
| | |
| | | return WebResponseContent.Instance.Error($"åæ¶åæ£å¤±è´¥ï¼{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ååº |
| | | /// </summary> |
| | | /// <param name="orderNo"></param> |
| | | /// <param name="palletCode"></param> |
| | | /// <param name="reason"></param> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> ReturnRemaining(string orderNo, string palletCode, string reason) |
| | | { |
| | | try |
| | |
| | | return WebResponseContent.Instance.Error("订åå·åæçç ä¸è½ä¸ºç©º"); |
| | | |
| | | // 2. è·ååºååä»»å¡ä¿¡æ¯ |
| | | var stockInfo = await _stockInfoService.Db.Queryable<Dt_StockInfo>() |
| | | .FirstAsync(x => x.PalletCode == palletCode); |
| | | var stockInfo = await _stockInfoService.Db.Queryable<Dt_StockInfo>().FirstAsync(x => x.PalletCode == palletCode); |
| | | |
| | | if (stockInfo == null) |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°æç {palletCode} 对åºçåºåä¿¡æ¯"); |
| | |
| | | // 3. åæéè¦ååºçè´§ç© |
| | | var returnAnalysis = await AnalyzeReturnItems(orderNo, palletCode, stockInfo.Id); |
| | | if (!returnAnalysis.HasItemsToReturn) |
| | | return await HandleNoReturnItems(orderNo, palletCode); |
| | | return await HandleNoReturnItems(orderNo, palletCode,task); |
| | | |
| | | // 4. æ§è¡ååºæä½ |
| | | await ExecuteReturnOperations(orderNo, palletCode, stockInfo, task, returnAnalysis); |
| | |
| | | |
| | | // 6. è·ååºåæç» |
| | | var stockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>() |
| | | .Where(x => x.Barcode == barcode && x.StockId == lockInfo.StockId) |
| | | .Where(x => x.Barcode == barcode && x.StockId == lockInfo.StockId && |
| | | x.Status != StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt()) |
| | | .FirstAsync(); |
| | | |
| | | if (stockDetail == null) |
| | |
| | | it.Status == (int)OutLockStockStatusEnum.åºåºä¸ && |
| | | it.PalletCode == palletCode && |
| | | it.CurrentBarcode == barcode && |
| | | it.AssignQuantity > it.PickedQty) |
| | | .FirstAsync(); |
| | | it.AssignQuantity > it.PickedQty).FirstAsync(); |
| | | |
| | | if (lockInfo == null) |
| | | { |
| | | // æ¥æ¾åä¸è®¢åä¸çè®°å½ |
| | | lockInfo = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>() |
| | | .Where(it => it.OrderNo == orderNo && |
| | | it.CurrentBarcode == barcode && |
| | | it.Status == (int)OutLockStockStatusEnum.åºåºä¸ && |
| | | it.AssignQuantity > it.PickedQty) |
| | | .FirstAsync(); |
| | | .Where(it => it.OrderNo == orderNo && it.CurrentBarcode == barcode && it.Status == (int)OutLockStockStatusEnum.åºåºä¸ && it.AssignQuantity > it.PickedQty).FirstAsync(); |
| | | |
| | | if (lockInfo == null) |
| | | { |
| | |
| | | var completedLockInfo = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>() |
| | | .Where(it => it.CurrentBarcode == barcode && |
| | | (it.Status == (int)OutLockStockStatusEnum.æ£é宿 || |
| | | it.PickedQty >= it.AssignQuantity)) |
| | | .FirstAsync(); |
| | | it.PickedQty >= it.AssignQuantity)).FirstAsync(); |
| | | |
| | | if (completedLockInfo != null) |
| | | throw new Exception($"æ¡ç {barcode}å·²ç»å®æåæ£ï¼ä¸è½éå¤åæ£"); |
| | |
| | | if (lockInfo.Status != (int)OutLockStockStatusEnum.æ£é宿) |
| | | return ValidationResult<(Dt_PickingRecord, Dt_OutStockLockInfo, Dt_OutboundOrderDetail)>.Error("å½åç¶æä¸å
è®¸åæ¶åæ£"); |
| | | |
| | | var stockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>() |
| | | .Where(it => it.Barcode == barcode && it.StockId == pickingRecord.StockId) |
| | | .FirstAsync(); |
| | | |
| | | if (stockDetail != null) |
| | | { |
| | | // æ£æ¥åºåç¶æ - å¦æç¶ææ¯å
¥åºç¡®è®¤æå
¥åºå®æï¼è¯´æå·²ç»ååº |
| | | if (stockDetail.Status == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt() || |
| | | stockDetail.Status == StockStatusEmun.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | return ValidationResult<(Dt_PickingRecord, Dt_OutStockLockInfo, Dt_OutboundOrderDetail)>.Error($"æ¡ç {barcode}å·²ç»ååºï¼ä¸è½åæ¶åæ£"); |
| | | } |
| | | } |
| | | |
| | | // æ£æ¥è®¢åç¶æ |
| | | var order = await _outboundOrderService.Db.Queryable<Dt_OutboundOrder>() |
| | | .Where(x => x.OrderNo == orderNo) |
| | |
| | | |
| | | return ValidationResult<(Dt_PickingRecord, Dt_OutStockLockInfo, Dt_OutboundOrderDetail)>.Success((pickingRecord, lockInfo, orderDetail)); |
| | | } |
| | | /// <summary> |
| | | /// æ£æ¥æ¡ç æ¯å¦å·²ç»ååº |
| | | /// </summary> |
| | | private async Task<bool> IsBarcodeReturned(string barcode, int stockId) |
| | | { |
| | | var stockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>() |
| | | .Where(it => it.Barcode == barcode && it.StockId == stockId) |
| | | .FirstAsync(); |
| | | |
| | | if (stockDetail == null) |
| | | return false; |
| | | |
| | | // å¦æç¶ææ¯å
¥åºç¡®è®¤æå
¥åºå®æï¼è¯´æå·²ç»ååº |
| | | return stockDetail.Status == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt() || |
| | | stockDetail.Status == StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ£æ¥éå®ä¿¡æ¯å¯¹åºçæ¡ç æ¯å¦å·²ç»ååº |
| | | /// </summary> |
| | | private async Task<bool> IsLockInfoReturned(Dt_OutStockLockInfo lockInfo) |
| | | { |
| | | var stockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>() |
| | | .Where(it => it.Barcode == lockInfo.CurrentBarcode && it.StockId == lockInfo.StockId) |
| | | .FirstAsync(); |
| | | |
| | | if (stockDetail == null) |
| | | return false; |
| | | |
| | | return stockDetail.Status == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt() || |
| | | stockDetail.Status == StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | } |
| | | private async Task ExecuteCancelLogic(Dt_OutStockLockInfo lockInfo, Dt_PickingRecord pickingRecord, |
| | | Dt_OutboundOrderDetail orderDetail, string orderNo) |
| | | { |
| | | decimal cancelQty = pickingRecord.PickQuantity; |
| | | |
| | | // 1. æ£æ¥åæ¶åæ°éä¸ä¼ä¸ºè´æ° |
| | | var currentStockDetail = await _stockInfoDetailService.Db.Queryable<Dt_StockInfoDetail>() |
| | | .Where(it => it.Barcode == pickingRecord.Barcode && it.StockId == pickingRecord.StockId) |
| | | .FirstAsync(); |
| | | |
| | | if (currentStockDetail != null && |
| | | (currentStockDetail.Status == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt() || |
| | | currentStockDetail.Status == StockStatusEmun.å
¥åºå®æ.ObjToInt())) |
| | | { |
| | | throw new Exception($"æ¡ç {pickingRecord.Barcode}å·²ç»ååºï¼æ æ³åæ¶åæ£"); |
| | | } |
| | | // æ£æ¥åæ¶åæ°éä¸ä¼ä¸ºè´æ° |
| | | decimal newOverOutQuantity = orderDetail.OverOutQuantity - cancelQty; |
| | | decimal newPickedQty = orderDetail.PickedQty - cancelQty; |
| | | |
| | |
| | | throw new Exception($"忶忣å°å¯¼è´æ°æ®å¼å¸¸ï¼å·²åºåº{newOverOutQuantity}ï¼å·²æ£é{newPickedQty}"); |
| | | } |
| | | |
| | | // 2. å¤çä¸åç±»åçåæ¶ |
| | | // å¤çä¸åç±»åçåæ¶ |
| | | if (lockInfo.IsSplitted == 1 && lockInfo.ParentLockId.HasValue) |
| | | { |
| | | await HandleSplitBarcodeCancel(lockInfo, pickingRecord, cancelQty); |
| | |
| | | await HandleNormalBarcodeCancel(lockInfo, pickingRecord, cancelQty); |
| | | } |
| | | |
| | | // 3. æ´æ°è®¢åæç» |
| | | // æ´æ°è®¢åæç» |
| | | await UpdateOrderDetailOnCancel(pickingRecord.OrderDetailId, cancelQty); |
| | | |
| | | // 4. å 餿£éè®°å½ |
| | | // å 餿£éè®°å½ |
| | | await Db.Deleteable<Dt_PickingRecord>() |
| | | .Where(x => x.Id == pickingRecord.Id) |
| | | .ExecuteCommandAsync(); |
| | | |
| | | // 5. éæ°æ£æ¥è®¢åç¶æ |
| | | // éæ°æ£æ¥è®¢åç¶æ |
| | | await UpdateOrderStatusForReturn(orderNo); |
| | | } |
| | | |
| | |
| | | if (parentLockInfo == null) |
| | | throw new Exception("æªæ¾å°ç¶éå®ä¿¡æ¯ï¼æ æ³åæ¶æå
忣"); |
| | | |
| | | if (await IsLockInfoReturned(parentLockInfo)) |
| | | { |
| | | throw new Exception($"ç¶æ¡ç {parentLockInfo.CurrentBarcode}å·²ç»ååºï¼æ æ³åæ¶æå
忣"); |
| | | } |
| | | if (await IsLockInfoReturned(lockInfo)) |
| | | { |
| | | throw new Exception($"æå
æ¡ç {lockInfo.CurrentBarcode}å·²ç»ååºï¼æ æ³åæ¶æå
忣"); |
| | | } |
| | | // æ¢å¤ç¶éå®ä¿¡æ¯çåé
æ°é |
| | | parentLockInfo.AssignQuantity += cancelQty; |
| | | await _outStockLockInfoService.Db.Updateable(parentLockInfo).ExecuteCommandAsync(); |
| | |
| | | |
| | | private async Task HandleNormalBarcodeCancel(Dt_OutStockLockInfo lockInfo, Dt_PickingRecord pickingRecord, decimal cancelQty) |
| | | { |
| | | if (await IsLockInfoReturned(lockInfo)) |
| | | { |
| | | throw new Exception($"æ¡ç {lockInfo.CurrentBarcode}å·²ç»ååºï¼æ æ³åæ¶åæ£"); |
| | | } |
| | | // æ¢å¤éå®ä¿¡æ¯ |
| | | lockInfo.PickedQty -= cancelQty; |
| | | if (lockInfo.PickedQty < 0) lockInfo.PickedQty = 0; |
| | |
| | | return await _stockInfoService.Db.Queryable<Dt_StockInfo>() |
| | | .FirstAsync(x => x.PalletCode == palletCode); |
| | | } |
| | | /// <summary> |
| | | /// æ£æ¥æ´ä¸ªæçæ¯å¦å·²ç»ååº |
| | | /// </summary> |
| | | private async Task<bool> IsPalletReturned(string palletCode) |
| | | { |
| | | var stockInfo = await _stockInfoService.Db.Queryable<Dt_StockInfo>() |
| | | .Where(x => x.PalletCode == palletCode) |
| | | .FirstAsync(); |
| | | |
| | | if (stockInfo == null) |
| | | return false; |
| | | |
| | | // 妿æçç¶ææ¯å
¥åºç¡®è®¤æå
¥åºå®æï¼è¯´æå·²ç»ååº |
| | | return stockInfo.StockStatus == StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt() || |
| | | stockInfo.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | } |
| | | private async Task<Dt_Task> GetCurrentTask(string orderNo, string palletCode) |
| | | { |
| | | // å
å°è¯éè¿è®¢åå·åæçå·æ¥æ¾ä»»å¡ |
| | |
| | | |
| | | // æ
åµ3ï¼æ£æ¥æå
è®°å½ |
| | | var splitRecords = await _splitPackageService.Db.Queryable<Dt_SplitPackageRecord>() |
| | | .Where(it => it.OrderNo == orderNo && it.PalletCode == palletCode && !it.IsReverted) |
| | | .Where(it => it.OrderNo == orderNo && it.PalletCode == palletCode && !it.IsReverted && it.Status != (int)SplitPackageStatusEnum.å·²ååº) |
| | | .ToListAsync(); |
| | | |
| | | if (splitRecords.Any()) |
| | |
| | | return totalQty; |
| | | } |
| | | |
| | | private async Task<WebResponseContent> HandleNoReturnItems(string orderNo, string palletCode) |
| | | private async Task<WebResponseContent> HandleNoReturnItems(string orderNo, string palletCode,Dt_Task originalTask) |
| | | { |
| | | // æ£æ¥æ¯å¦ææè´§ç©é½å·²æ£é宿 |
| | | var allPicked = await _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>() |
| | |
| | | |
| | | if (allPicked) |
| | | { |
| | | // å é¤åå§åºåºä»»å¡ |
| | | await _taskRepository.Db.Deleteable(originalTask).ExecuteCommandAsync(); |
| | | return WebResponseContent.Instance.OK("ææè´§ç©å·²æ£éå®æï¼æç为空"); |
| | | } |
| | | else |
| | | { |
| | | // å é¤åå§åºåºä»»å¡ |
| | | await _taskRepository.Db.Deleteable(originalTask).ExecuteCommandAsync(); |
| | | return WebResponseContent.Instance.Error("没æéè¦ååºçå©ä½è´§ç©"); |
| | | } |
| | | //空æçå¦ä½å¤ç è¿æä¸ä¸ªåºåºä»»å¡è¦å¤çã |
| | | |
| | | } |
| | | |
| | | private async Task ExecuteReturnOperations(string orderNo, string palletCode, Dt_StockInfo stockInfo, |
| | |
| | | { |
| | | // æ¢å¤åºåç¶æ |
| | | stockDetail.OutboundQuantity = Math.Max(0, stockDetail.OutboundQuantity - returnQty); |
| | | stockDetail.Status = StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | stockDetail.Status = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(); |
| | | await _stockInfoDetailService.Db.Updateable(stockDetail).ExecuteCommandAsync(); |
| | | } |
| | | else |
| | |
| | | OutboundQuantity = 0, |
| | | Barcode = lockInfo.CurrentBarcode, |
| | | InboundOrderRowNo = "", |
| | | Status = StockStatusEmun.å
¥åºå®æ.ObjToInt(), |
| | | Status = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(), |
| | | SupplyCode = lockInfo.SupplyCode, |
| | | WarehouseCode = lockInfo.WarehouseCode, |
| | | Unit = lockInfo.Unit, |
| | |
| | | { |
| | | // æ¢å¤åºåç¶æ |
| | | stockGood.OutboundQuantity = 0; |
| | | stockGood.Status = StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | stockGood.Status = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(); |
| | | |
| | | await _stockInfoDetailService.Db.Updateable(stockGood).ExecuteCommandAsync(); |
| | | } |
| | |
| | | private async Task UpdateStockInfoStatus(Dt_StockInfo stockInfo) |
| | | { |
| | | // æ´æ°åºåä¸»è¡¨ç¶æ |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºç¡®è®¤.ObjToInt(); |
| | | await _stockInfoService.Db.Updateable(stockInfo).ExecuteCommandAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// å建ååºä»»å¡ |
| | | /// </summary> |
| | | /// <param name="orderNo"></param> |
| | | /// <param name="palletCode"></param> |
| | | /// <param name="originalTask"></param> |
| | | /// <param name="analysis"></param> |
| | | /// <returns></returns> |
| | | private async Task CreateReturnTaskAndHandleESS(string orderNo, string palletCode, Dt_Task originalTask, ReturnAnalysisResult analysis) |
| | | { |
| | | var firstLocation = await _locationInfoService.Db.Queryable<Dt_LocationInfo>() |
| | |
| | | // ç» ESS åéæµå¨ä¿¡å·ååå»ºä»»å¡ |
| | | await SendESSCommands(palletCode, targetAddress, returnTask); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// ç»ESSä¸ä»»å¡ |
| | | /// </summary> |
| | | /// <param name="palletCode"></param> |
| | | /// <param name="targetAddress"></param> |
| | | /// <param name="returnTask"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | private async Task SendESSCommands(string palletCode, string targetAddress, Dt_Task returnTask) |
| | | { |
| | | try |
| | |
| | | |
| | | private WebResponseContent CreatePickingResponse(PickingResult result, string adjustedReason) |
| | | { |
| | | //if (result.SplitResults.Any()) |
| | | //{ |
| | | // var responseData = new { SplitResults = result.SplitResults, AdjustedReason = "" }; |
| | | // if (!string.IsNullOrEmpty(adjustedReason)) |
| | | // { |
| | | // responseData = new { SplitResults = result.SplitResults, AdjustedReason = adjustedReason }; |
| | | // } |
| | | // return WebResponseContent.Instance.OK("æ£é确认æåï¼å·²èªå¨æå
", responseData); |
| | | //} |
| | | |
| | | //if (!string.IsNullOrEmpty(adjustedReason)) |
| | | //{ |
| | | // return WebResponseContent.Instance.OK($"æ£é确认æåï¼{adjustedReason}ï¼"); |
| | | //} |
| | | |
| | | //return WebResponseContent.Instance.OK("æ£é确认æå"); |
| | | |
| | | if (result.SplitResults.Any()) |
| | | { |
| | | |
| | | return WebResponseContent.Instance.OK("æ£é确认æåï¼å·²èªå¨æå
", new { SplitResults = result.SplitResults }); |
| | | } |
| | | |
| | | return WebResponseContent.Instance.OK("æ£é确认æå", new { SplitResults = new List<SplitResult>() }); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | } |
| | | |
| | |
| | | using WIDESEA_Core.BaseServices; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_DTO.Allocate; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Task; |
| | | using WIDESEA_IAllocateService; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_IOutboundService; |
| | |
| | | private readonly IESSApiService _eSSApiService; |
| | | private readonly IStockService _stockService; |
| | | private readonly IRecordService _recordService; |
| | | |
| | | private readonly IAllocateService _allocateService; |
| | | private readonly IInvokeMESService _invokeMESService; |
| | | public IRepository<Dt_Task> Repository => BaseDal; |
| | | |
| | |
| | | |
| | | public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList(); |
| | | |
| | | public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_StockInfo> stockRepository, ILocationInfoService locationInfoService, IInboundOrderService inboundOrderService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IESSApiService eSSApiService, ILogger<TaskService> logger, IStockService stockService, IRecordService recordService, IInboundOrderDetailService inboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService, IInvokeMESService invokeMESService, IOutStockLockInfoService outStockLockInfoService) : base(BaseDal) |
| | | public TaskService(IRepository<Dt_Task> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_StockInfo> stockRepository, ILocationInfoService locationInfoService, IInboundOrderService inboundOrderService, ILocationStatusChangeRecordService locationStatusChangeRecordService, IESSApiService eSSApiService, ILogger<TaskService> logger, IStockService stockService, IRecordService recordService, IInboundOrderDetailService inboundOrderDetailService, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService, IInvokeMESService invokeMESService, IOutStockLockInfoService outStockLockInfoService, IAllocateService allocateService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | |
| | | _outboundOrderDetailService = outboundOrderDetailService; |
| | | _invokeMESService = invokeMESService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _allocateService = allocateService; |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | if (inboundOrder.OrderType == InOrderTypeEnum.Allocat.ObjToInt())//è°æ¨å
¥åº |
| | | { |
| | | if (inboundOrder != null && inboundOrder.OrderStatus == InOrderStatusEnum.å
¥åºå®æ.ObjToInt()) |
| | | { |
| | | var allocate = _allocateService.Repository.QueryData(x => x.OrderNo == inboundOrder.InboundOrderNo).First(); |
| | | var feedmodel = new AllocateDto |
| | | { |
| | | ReqCode = Guid.NewGuid().ToString(), |
| | | ReqTime = DateTime.Now.ToString(), |
| | | BusinessType = "2", |
| | | FactoryArea = inboundOrder.FactoryArea, |
| | | OperationType = 1, |
| | | Operator = inboundOrder.Operator, |
| | | OrderNo = inboundOrder.UpperOrderNo, |
| | | fromWarehouse = allocate?.FromWarehouse??"", |
| | | toWarehouse = allocate?.ToWarehouse??"", |
| | | Details = new List<AllocateDtoDetail>() |
| | | |
| | | }; |
| | | |
| | | var groupedData = inboundOrder.Details.GroupBy(item => new { item.MaterielCode, item.SupplyCode, item.BatchNo, item.lineNo, item.BarcodeUnit, item.WarehouseCode }) |
| | | .Select(group => new AllocateDtoDetail |
| | | { |
| | | MaterialCode = group.Key.MaterielCode, |
| | | LineNo = group.Key.lineNo, |
| | | WarehouseCode = group.Key.WarehouseCode, |
| | | Qty = group.Sum(x => x.BarcodeQty), |
| | | // warehouseCode= "1072", |
| | | Unit = group.Key.BarcodeUnit, |
| | | Barcodes = group.Select(row => new BarcodeInfo |
| | | { |
| | | Barcode = row.Barcode, |
| | | Qty = row.BarcodeQty, |
| | | BatchNo = row.BatchNo, |
| | | SupplyCode = row.SupplyCode, |
| | | Unit = row.Unit |
| | | }).ToList() |
| | | }).ToList(); |
| | | feedmodel.Details = groupedData; |
| | | |
| | | var result = await _invokeMESService.FeedbackAllocate(feedmodel); |
| | | if (result != null && result.code == 200) |
| | | { |
| | | _inboundOrderService.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.Id == inboundOrder.Id).ExecuteCommand(); |
| | | _inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 }) |
| | | .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand(); |
| | | } |
| | | } |
| | | } |
| | | else if (inboundOrder.OrderType == InOrderTypeEnum.ReCheck.ObjToInt()) //鿣å
¥åº |
| | | { |
| | |
| | | </PropertyGroup> |
| | | |
| | | <ItemGroup> |
| | | <ProjectReference Include="..\WIDESEA_IAllocateService\WIDESEA_IAllocateService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IBasicService\WIDESEA_IBasicService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IInboundService\WIDESEA_IInboundService.csproj" /> |
| | | <ProjectReference Include="..\WIDESEA_IOutboundService\WIDESEA_IOutboundService.csproj" /> |
| | |
| | | using System.Data.Common; |
| | | using System.Diagnostics.Eventing.Reader; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.AllocateEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | |
| | | { |
| | | OrderNo = model.OrderNo, |
| | | UpperOrderNo = model.OrderNo, |
| | | BusinessType=model.BusinessType, |
| | | FactoryArea=model.FactoryArea, |
| | | IsBatch=model.IsBatch, |
| | | BusinessType = model.BusinessType, |
| | | FactoryArea = model.FactoryArea, |
| | | IsBatch = model.IsBatch, |
| | | CreateType = model.OperationType, |
| | | Details = new List<Dt_AllocateOrderDetail>() |
| | | FromWarehouse=model.fromWarehouse, |
| | | ToWarehouse=model.toWarehouse, |
| | | Details = new List<Dt_AllocateOrderDetail>() |
| | | }; |
| | | Enum.TryParse<BusinessTypeEnum>(allocateOrder.BusinessType, out var businessType); |
| | | |
| | | |
| | | foreach (var detailDto in model.Details) |
| | | { |
| | | if (businessType == BusinessTypeEnum.æºä»è°å¤é¨ä»åº && (detailDto.Barcodes == null || !detailDto.Barcodes.Any())) |
| | | { |
| | | return WebResponseContent.Instance.Error($"æ¡ç ä¸è½ä¸ºç©º"); |
| | | } |
| | | if (detailDto.Barcodes != null && detailDto.Barcodes.Any()) |
| | | { |
| | | foreach (var barcodeDto in detailDto.Barcodes) |
| | |
| | | MaterielCode = detailDto.MaterialCode, |
| | | LineNo = detailDto.LineNo, |
| | | OrderQuantity = detailDto.Qty, |
| | | SupplyCode= barcodeDto.SupplyCode, |
| | | SupplyCode = barcodeDto.SupplyCode, |
| | | Unit = detailDto.Unit, |
| | | Barcode = barcodeDto.Barcode, |
| | | BatchNo = barcodeDto.BatchNo, |
| | |
| | | } |
| | | allocateOrder.Details.AddRange(allocateOrder.Details); |
| | | } |
| | | var content =await Service.ReceiveAllocateOrder(allocateOrder, model.OperationType); |
| | | var content = await Service.ReceiveAllocateOrder(allocateOrder, model.OperationType); |
| | | |
| | | if (content.Status) return WebResponseContent.Instance.OK(200); |
| | | else return WebResponseContent.Instance.Error(content.Message); |