Merge branch 'master' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu
# Conflicts:
# 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
| | |
| | | type: 'warning', |
| | | onClick: function () { |
| | | } |
| | | },{ |
| | | name: "空æåºåº", |
| | | // icon: 'el-icon-upload2', |
| | | class: '', |
| | | value: 'EmptyTrayOutbound', |
| | | type: 'primary', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | ] |
| | | |
| | |
| | | ? "api/Task/GenerateOutboundTask?orderDetailId=" |
| | | : "api/Task/GenerateOutboundTask?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("æä½æå"); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <vol-box v-model="show" title="空æåºåº" :width="800" :height="600"> |
| | | <template #content> |
| | | <el-form ref="form" :model="form" label-width="90px"> |
| | | <el-form-item label="åºåºæ°é:"> |
| | | <el-select v-model="num" placeholder="è¯·éæ©åºåºæ°é"> |
| | | <el-option v-for="item in 6" :key="item" :label="item.toString()" :value="item"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </template> |
| | | <template #footer> |
| | | <div> |
| | | <el-button type="danger" size="small" plain @click="submit"> |
| | | <i class="el-icon-check">确认</i> |
| | | </el-button> |
| | | <el-button size="small" type="primary" plain @click="() => { this.show = false }"> |
| | | <i class="el-icon-close">å
³é</i> |
| | | </el-button> |
| | | </div> |
| | | </template> |
| | | </vol-box> |
| | | </template> |
| | | |
| | | <script> |
| | | import VolBox from '@/components/basic/VolBox.vue' |
| | | export default { |
| | | components: { |
| | | 'vol-box': VolBox |
| | | }, |
| | | data() { |
| | | return { |
| | | num: 1, |
| | | show: false |
| | | } |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.show = true |
| | | }, |
| | | submit() { |
| | | this.$emit('parentCall', ($vue) => { |
| | | this.http.post(`/api/Task/PalletOutboundTask?num=${this.num}`, {}, 'æ°æ®å¤çä¸...') |
| | | .then((x) => { |
| | | if (!x.status) { |
| | | this.$message.error(x.message) |
| | | } else { |
| | | this.show = false |
| | | this.$Message.success(x.message) |
| | | $vue.refresh(); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | |
| | | import gridBody from './extend/outOrderDetail.vue' |
| | | import gridHeader from './extend/NoStockOut.vue' |
| | | import gridFooter from './extend/EmptyTrayOutbound.vue' |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: gridHeader, |
| | | gridBody: gridBody, |
| | | gridFooter: '', |
| | | gridFooter: gridFooter, |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { |
| | | view: [ |
| | | |
| | | |
| | | /* { |
| | | name: 'åºåº', |
| | | type: 'primary', |
| | |
| | | }); |
| | | } |
| | | }, */ |
| | | { |
| | | name: '空æçåºåº', |
| | | type: 'primary', |
| | | value: '空æçåºåº', |
| | | onClick: function () { |
| | | // { |
| | | // name: '空æçåºåº', |
| | | // type: 'primary', |
| | | // value: '空æçåºåº', |
| | | // onClick: function () { |
| | | |
| | | |
| | | const platformOptions = Array.from({ length: 1 }, (_, i) => { |
| | | const num = 1; |
| | | return { label: `ç«å°${num}`, value: `1-2` }; |
| | | }); |
| | | // 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 quantityOptions = Array.from({ length: 6 }, (_, i) => ({ |
| | | // label: (i + 1).toString(), |
| | | // value: i + 1 |
| | | // })); |
| | | |
| | | const warehouseOptions = ref([]); |
| | | const isLoadingWarehouses = ref(false); |
| | | // 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 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 mountNode = document.createElement('div'); |
| | | // document.body.appendChild(mountNode); |
| | | |
| | | |
| | | const formData = reactive({ |
| | | warehouseCode: '', |
| | | palletCode: '', |
| | | selectedPlatform: platformOptions[0].value, |
| | | quantity: 1 |
| | | }); |
| | | // 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', |
| | | } |
| | | }, |
| | | [ |
| | | // 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: 'warehouseCode', |
| | | // label: 'åºåºç«å°', |
| | | // prop: 'selectedPlatform', |
| | | // style: { |
| | | // marginBottom: '24px' |
| | | // } |
| | | // }, [ |
| | | // h(ElSelect, { |
| | | // placeholder: 'è¯·éæ©ä»åºåºå', |
| | | // modelValue: formData.warehouseCode, |
| | | // placeholder: 'è¯·éæ©åºåºç«å°', |
| | | // modelValue: formData.selectedPlatform, |
| | | // 'onUpdate:modelValue': (val) => { |
| | | // formData.warehouseCode = val; |
| | | // formData.selectedPlatform = val; |
| | | // }, |
| | | // style: { |
| | | // width: '100%', |
| | |
| | | // borderRadius: '4px', |
| | | // borderColor: '#dcdfe6' |
| | | // } |
| | | // }, warehouseOptions.value.map(platform => |
| | | // }, platformOptions.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:'quantity', |
| | | // label: 'æç®±å·', |
| | | // prop: 'palletCode', |
| | | // style:{ |
| | | // marginBottom:'24px' |
| | | // marginBottom: '16px' |
| | | // } |
| | | // },[h(ElSelect,{ |
| | | // placeholder:'è¯·éæ©ç©ºç®±æ°é', |
| | | // modelValue:formData.quantity, |
| | | // }, [ |
| | | // h(ElInput, { |
| | | // type: 'text', |
| | | // placeholder: 'å¯éè¾å
¥æç®±å·ï¼ä¸å¡«åèªå¨åé
空æç®±', |
| | | // modelValue: formData.palletCode, |
| | | // 'onUpdate:modelValue':(val)=>{ |
| | | // formData.quantity=val; |
| | | // formData.palletCode = val; |
| | | // }, |
| | | // style:{ |
| | | // width:'100%', |
| | |
| | | // borderRadius:'4px', |
| | | // borderColor:'#dcdfe6' |
| | | // }, |
| | | // filterable:false |
| | | // }, |
| | | // quantityOptions.map(option=> |
| | | // h(ElOption,{ |
| | | // label:option.label, |
| | | // value:option.value |
| | | // attrs: { |
| | | // placeholderStyle: 'color: #909399;' |
| | | // } |
| | | // }) |
| | | // ) |
| | | // )]), |
| | | 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; |
| | | } |
| | | // 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, { |
| | | // http.post('/api/Task/PalletOutboundTask?palletCode=' + formData.palletCode + '&endStation=' + formData.selectedPlatform, { |
| | | |
| | | }).then(({ data, status, message }) => { |
| | | if (status) { |
| | | // }).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' |
| | | } |
| | | }, 'ç¡®å®') |
| | | ]) |
| | | ]) |
| | | }); |
| | | // 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); |
| | | } |
| | | } |
| | | // vnode.appContext = this.$.appContext; |
| | | // render(vnode, mountNode); |
| | | // } |
| | | // } |
| | | ], box: [], detail: [] |
| | | }, //æ©å±çæé® |
| | | methods: { |
| | |
| | | } |
| | | } |
| | | |
| | | var EmptyTrayOutboundBtn = this.buttons.find(x => x.value == "EmptyTrayOutbound"); |
| | | if (EmptyTrayOutboundBtn != null) { |
| | | EmptyTrayOutboundBtn.onClick = () => { |
| | | this.$refs.gridFooter.open(); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | |
| | | { title: "ç©æç¼å·", field: "materielCode" ,type:'like'}, |
| | | { title: "ç©æåç§°", field: "materielName" ,type:'like'}, |
| | | { title: "åæ®ç¼å·", field: "orderNo" ,type:'like'}, |
| | | { title: "æçå·", field: "palletCode" ,type:'like'}, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | |
| | | Task<WebResponseContent> RequestInboundTask(string palletCode, string stationCode); |
| | | |
| | | Task<WebResponseContent> PalletOutboundTask(string endStation, string palletCode = ""); |
| | | Task<WebResponseContent> PalletOutboundTask(int num); |
| | | |
| | | Task<WebResponseContent> TaskCompleted(string taskNum); |
| | | |
| | | Task<WebResponseContent> GenerateOutboundTasksAsync(int[] keys, string outStation); |
| | | |
| | | Task<WebResponseContent> GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews); |
| | | Task<WebResponseContent> GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews,string station=null); |
| | | |
| | | Task<WebResponseContent> GenerateOutboundBatchTasksAsync(int orderDetailId, decimal batchQuantity, string outStation); |
| | | |
| | |
| | | using AutoMapper; |
| | | using Dm.filter; |
| | | using MailKit.Search; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Extensions.Logging; |
| | | using Newtonsoft.Json; |
| | | using Org.BouncyCastle.Asn1.Ocsp; |
| | |
| | | { |
| | | if (item.PickedQty > 0) |
| | | { |
| | | var barModel = new BarcodeInfo |
| | | { |
| | | Barcode = item.CurrentBarcode, |
| | | SupplyCode = item.SupplyCode, |
| | | BatchNo = item.BatchNo, |
| | | Unit = item.BarcodeUnit, |
| | | Unit = detail.BarcodeUnit, |
| | | Qty = 0 |
| | | }; |
| | | // åä½ä¸ä¸è´æ¶è½¬æ¢ |
| | | if (item.BarcodeUnit != item.Unit) |
| | | if (detail.BarcodeUnit != detail.Unit) |
| | | { |
| | | var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, item.Unit, item.BarcodeUnit); |
| | | var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, detail.Unit, detail.BarcodeUnit); |
| | | barModel.Unit = convertResult.Unit; |
| | | barModel.Qty = convertResult.Quantity; |
| | | } |
| | | |
| | | else |
| | | { |
| | | barModel.Qty = item.PickedQty; |
| | | } |
| | | detailModel.Qty += barModel.Qty; |
| | | detailModel.Barcodes.Add(barModel); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | if (item.PickedQty > 0) |
| | | { |
| | | <<<<<<< .mine |
| | | var barModel = new WIDESEA_DTO.Outbound.BarcodesModel |
| | | { |
| | | barcode = item.CurrentBarcode, |
| | |
| | | detailModel.qty += barModel.qty; |
| | | detailModel.currentDeliveryQty += barModel.qty; |
| | | detailModel.barcodes.Add(barModel); |
| | | ======= |
| | | barcode = item.CurrentBarcode, |
| | | supplyCode = item.SupplyCode, |
| | | batchNo = item.BatchNo, |
| | | unit = detail.BarcodeUnit, |
| | | qty = item.PickedQty |
| | | }; |
| | | // åä½ä¸ä¸è´æ¶è½¬æ¢ |
| | | if (detail.BarcodeUnit != detail.Unit) |
| | | { |
| | | var convertResult = await _materialUnitService.ConvertAsync(item.MaterielCode, item.PickedQty, detail.Unit, detail.BarcodeUnit); |
| | | barModel.unit = convertResult.Unit; |
| | | barModel.qty = convertResult.Quantity; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | >>>>>>> .theirs |
| | | } |
| | | <<<<<<< .mine |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ======= |
| | | else |
| | | { |
| | | barModel.qty = item.PickedQty; |
| | | } |
| | | |
| | | detailModel.qty += barModel.qty; |
| | | detailModel.currentDeliveryQty += barModel.qty; |
| | | detailModel.barcodes.Add(barModel); |
| | | >>>>>>> .theirs |
| | | } |
| | | feedmodel.details.Add(detailModel); |
| | | } |
| | |
| | | /// </summary> |
| | | /// <param name="inTask"></param> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> PalletOutboundTask(string endStation, string palletCode = "") |
| | | public async Task<WebResponseContent> PalletOutboundTask(int num) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_StockInfo stockInfo; |
| | | if (string.IsNullOrEmpty(palletCode)) |
| | | { |
| | | stockInfo = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt() && !string.IsNullOrWhiteSpace(x.LocationCode)).First(); |
| | | } |
| | | else |
| | | { |
| | | stockInfo = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.PalletCode == palletCode && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt()).First(); |
| | | } |
| | | var stockInfos = _stockRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletType == PalletTypeEnum.Empty.ObjToInt() && x.StockStatus == StockStatusEmun.å
¥åºå®æ.ObjToInt()).ToList(); |
| | | |
| | | if (stockInfo == null) |
| | | if (stockInfos.Count() == 0) |
| | | { |
| | | return WebResponseContent.Instance.Error("æªæ¾å°ç©ºæçåºå"); |
| | | } |
| | | for (int i = 0; i < num; i++) |
| | | { |
| | | var stockInfo = stockInfos.Where(x=>x.StockStatus != StockStatusEmun.åºåºéå®.ObjToInt()).FirstOrDefault(); |
| | | Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode); |
| | | if (locationInfo == null) |
| | | { |
| | |
| | | { |
| | | CurrentAddress = stockInfo.LocationCode, |
| | | Grade = 0, |
| | | NextAddress = endStation, |
| | | NextAddress = "1-2", |
| | | PalletCode = stockInfo.PalletCode, |
| | | Roadway = locationInfo.RoadwayNo, |
| | | SourceAddress = stockInfo.LocationCode, |
| | | TargetAddress = endStation, |
| | | TargetAddress = "1-2", |
| | | TaskStatus = TaskStatusEnum.New.ObjToInt(), |
| | | TaskType = TaskTypeEnum.OutEmpty.ObjToInt(), |
| | | WarehouseId = stockInfo.WarehouseId, |
| | |
| | | containerType= "CT_KUBOT_STANDARD", |
| | | fromLocationCode=stockInfo.LocationCode??"", |
| | | toStationCode="", |
| | | toLocationCode=endStation, |
| | | toLocationCode="1-2", |
| | | deadline=0,storageTag="" |
| | | } |
| | | } |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error("ä¸åæºå¨äººä»»å¡å¤±è´¥ï¼"); |
| | | } |
| | | } |
| | | |
| | | return content.OK("空æåºåºæå!"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// <param name="orderDetailId"></param> |
| | | /// <param name="stockSelectViews"></param> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews) |
| | | public async Task<WebResponseContent> GenerateOutboundTask(int orderDetailId, List<StockSelectViewDTO> stockSelectViews,string station=null) |
| | | { |
| | | try |
| | | { |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error("æ¾ä¸å°åæ®"); |
| | | } |
| | | (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(outboundOrder.Details.First().Id, stockSelectViews); |
| | | (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(outboundOrder.Details.First().Id, stockSelectViews,station); |
| | | |
| | | WebResponseContent content =await GenerateOutboundTaskDataUpdate(result.Item1, result.Item2, result.Item3, result.Item4, result.Item5); |
| | | |
| | |
| | | /// <param name="stockSelectViews"></param> |
| | | /// <returns></returns> |
| | | /// <exception cref="Exception"></exception> |
| | | public (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) OutboundTaskDataHandle(int orderDetailId, List<StockSelectViewDTO> stockSelectViews) |
| | | public (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) OutboundTaskDataHandle(int orderDetailId, List<StockSelectViewDTO> stockSelectViews,string station=null) |
| | | { |
| | | List<Dt_Task> tasks = new List<Dt_Task>(); |
| | | Dt_OutboundOrderDetail outboundOrderDetail = _outboundOrderDetailService.Repository.QueryFirst(x => x.Id == orderDetailId); |
| | |
| | | (int)OutOrderTypeEnum.Issue => TaskTypeEnum.Outbound, |
| | | (int)OutOrderTypeEnum.Allocate => TaskTypeEnum.OutAllocate, |
| | | (int)OutOrderTypeEnum.Quality => TaskTypeEnum.OutQuality, |
| | | _ => new TaskTypeEnum() |
| | | _ => TaskTypeEnum.Outbound |
| | | }; |
| | | tasks = GetTasks(result.Item1, typeEnum); |
| | | tasks = GetTasks(result.Item1, typeEnum,station); |
| | | result.Item2.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | result.Item3.ForEach(x => |
| | | { |
| | |
| | | using Autofac.Core; |
| | | using MailKit.Search; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_BasicService; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_DTO.Allocate; |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Mes; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_InboundService; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models; |
| | | using WIDESEA_OutboundService; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | |
| | | private readonly ILocationInfoService _locationInfoService; |
| | | private readonly IDailySequenceService _dailySequenceService; |
| | | private readonly IMaterialUnitService _materialUnitService; |
| | | private readonly IOutStockLockInfoService _outStockLockInfoService; |
| | | private readonly IOutboundOrderDetailService _outboundOrderDetailService; |
| | | private readonly ILogger<InboundOrderController> _logger; |
| | | public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService) : base(service) |
| | | public InboundOrderController(IInboundOrderService service, WIDESEA_IBasicService.IErpApiService erpApiService, WIDESEA_IBasicService.IInvokeMESService invokeMESService, IESSApiService eSSApiService, IDailySequenceService dailySequenceService, ILocationInfoService locationInfoService, ILogger<InboundOrderController> logger, IMaterialUnitService materialUnitService, IInboundService inboundService, IOutStockLockInfoService outStockLockInfoService, IOutboundOrderDetailService outboundOrderDetailService) : base(service) |
| | | { |
| | | this.erpApiService = erpApiService; |
| | | _invokeMESService = invokeMESService; |
| | |
| | | _logger = logger; |
| | | _materialUnitService = materialUnitService; |
| | | _inboundService = inboundService; |
| | | _outStockLockInfoService = outStockLockInfoService; |
| | | _outboundOrderDetailService = outboundOrderDetailService; |
| | | } |
| | | |
| | | [HttpPost, Route("Test"), AllowAnonymous, MethodParamsValidate] |
| | | public async Task<WebResponseContent> Test() |
| | | { |
| | | |
| | | |
| | | // Service.Db.Deleteable<Dt_InboundOrder>().Where(x=>x.UpperOrderNo== "12020251100040").ExecuteCommand(); |
| | | //_inboundService.InboundOrderDetailService.Db.Deleteable<Dt_InboundOrderDetail>() |
| | | // .Where(p => SqlFunc.Subqueryable<Dt_InboundOrder>().Where(s => s.Id == p.OrderId && s.UpperOrderNo == "12020251100040").Any()).ExecuteCommand(); |
| | |
| | | } |
| | | |
| | | [HttpPost, Route("PalletOutboundTask"), AllowAnonymous, MethodParamsValidate] |
| | | public async Task<WebResponseContent> PalletOutboundTask(string endStation, string palletCode = "") |
| | | public async Task<WebResponseContent> PalletOutboundTask(int num) |
| | | { |
| | | |
| | | var result = await Service.PalletOutboundTask(endStation, palletCode); |
| | | |
| | | return result; |
| | | return await Service.PalletOutboundTask(num); |
| | | } |
| | | |
| | | |
| | |
| | | /// <param name="stockSelectViews"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, HttpGet, Route("GenerateOutboundTask"), AllowAnonymous] |
| | | public async Task<WebResponseContent> GenerateOutboundTask(int orderDetailId, [FromBody] List<StockSelectViewDTO> stockSelectViews) |
| | | public async Task<WebResponseContent> GenerateOutboundTask(int orderDetailId, string station, [FromBody] List<StockSelectViewDTO> stockSelectViews) |
| | | { |
| | | return await Service.GenerateOutboundTask(orderDetailId, stockSelectViews); |
| | | return await Service.GenerateOutboundTask(orderDetailId, stockSelectViews, station); |
| | | } |
| | | |
| | | /// <summary> |