¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | 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æä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | }, |
| | | onInited() { |
| | | //æ¡æ¶åå§åé
ç½®å |
| | | //妿è¦é
ç½®æç»è¡¨,卿¤æ¹æ³æä½ |
| | | //this.detailOptions.columns.forEach(column=>{ }); |
| | | }, |
| | | searchBefore(param) { |
| | | //ç颿¥è¯¢å,å¯ä»¥ç»param.wheresæ·»å æ¥è¯¢åæ° |
| | | //è¿åfalseï¼åä¸ä¼æ§è¡æ¥è¯¢ |
| | | 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: '/mesPPCutOutboundOrderDetail', |
| | | name: 'mesPPCutOutboundOrderDetail', |
| | | component: () => import('@/views/outbound/mesPPCutOutboundOrderDetail.vue') |
| | | },{ |
| | | }, |
| | | { |
| | | path: '/mesPPBackInboundOrder', |
| | | name: 'mesPPBackInboundOrder', |
| | | component: () => import('@/views/inbound/mesPPBackInboundOrder.vue') |
| | | }, |
| | | { |
| | | path: '/mesPPBackInboundOrderDetail', |
| | | name: 'mesPPBackInboundOrderDetail', |
| | | component: () => import('@/views/inbound/mesPPBackInboundOrderDetail.vue') |
| | | }, |
| | | { |
| | | path: '/returnOrder', |
| | | name: 'returnOrder', |
| | | component: () => import('@/views/inbound/returnOrder.vue') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/inbound/mesPPBackInboundOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "å
¥åºå", |
| | | name: "mesPPBackInboundOrder", |
| | | url: "/mesPPBackInboundOrder/", |
| | | 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: "", |
| | | 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: "warehouseId", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind:{key: "warehouses", data: []} |
| | | }, |
| | | { |
| | | field: "SourceAddressCode", |
| | | title: "æºå°åç ", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "CarrierCode", |
| | | title: "è½½å
·å·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderType", |
| | | title: "åæ®ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "inOrderType", 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: "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: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materielSpec", |
| | | title: "ç©æè§æ ¼", |
| | | type: "select", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | 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", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | import extend from "@/extension/inbound/inboundOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | 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: "", |
| | | 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: "warehouseId", |
| | | title: "ä»åº", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | bind:{key: "warehouses", data: []} |
| | | }, |
| | | { |
| | | field: "SourceAddressCode", |
| | | title: "æºå°åç ", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "CarrierCode", |
| | | title: "è½½å
·å·", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderType", |
| | | title: "åæ®ç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "inOrderType", 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: "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: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "materielSpec", |
| | | title: "ç©æè§æ ¼", |
| | | type: "select", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "batchNo", |
| | | 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", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_DTO.MES |
| | | { |
| | | /// <summary> |
| | | /// è¿å·¥æåº |
| | | /// </summary> |
| | | public class RworkTaskModel |
| | | { |
| | | /// <summary> |
| | | /// ä»»å¡åå· |
| | | /// </summary> |
| | | public string TaskNo { get; set; } |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | | public string ProductCode { get; set; } |
| | | /// <summary> |
| | | /// 产ååç§° |
| | | /// </summary> |
| | | public string ProductName { get; set; } |
| | | /// <summary> |
| | | /// 产åçæ¬ |
| | | /// </summary> |
| | | public string ProductVersion { get; set; } |
| | | /// <summary> |
| | | /// 卿 |
| | | /// </summary> |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// éæ±æ°é |
| | | /// </summary> |
| | | public float RequiredQuantity { get; set; } |
| | | /// <summary> |
| | | /// å·¥å |
| | | /// </summary> |
| | | public string FactoryCode { get; set; } |
| | | /// <summary> |
| | | /// éå®è®¢å |
| | | /// </summary> |
| | | public string SaleOrder { get; set; } |
| | | /// <summary> |
| | | /// åºåç±»å |
| | | /// </summary> |
| | | public int InventoryType { get; set; } |
| | | } |
| | | } |
| | |
| | | MesResponseContent QueryPpByWidth(QueryPpByWidthModel model); |
| | | |
| | | /// <summary> |
| | | /// æåè¿å·¥æåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | MesResponseContent RworkTask(RworkTaskModel model); |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="roadwayNos"></param> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using SqlSugar; |
| | | using WIDESEA_Core.Attributes; |
| | | using WIDESEA_Core.CodeConfigEnum; |
| | | using WIDESEA_Core.DB.Models; |
| | | |
| | | namespace WIDESEA_Model.Models.Outbound |
| | | { |
| | | /// <summary> |
| | | /// æåè¿å·¥æåºåºåºå |
| | | /// </summary> |
| | | public class Dt_MesRworkOutboundOrder : BaseEntity |
| | | { |
| | | /// <summary> |
| | | /// ä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主é®")] |
| | | public int Id { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | | public int WarehouseId { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¼å· |
| | | /// </summary> |
| | | [CodeRule(RuleCodeEnum.OutboundOrderRule)] |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "åæ®ç¼å·", IsOnlyIgnoreUpdate = true)] |
| | | public string OrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»»å¡åå· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "ä»»å¡åå·")] |
| | | public string TaskNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®æ°é")] |
| | | public float OrderQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// é宿°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "é宿°é", DefaultValue = "0")] |
| | | public float LockQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å·²åºæ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å·²åºæ°é", DefaultValue = "0")] |
| | | public float OverOutQuantity { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç¶æ")] |
| | | public int OrderStatus { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å建æ¹å¼ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å建æ¹å¼", IsOnlyIgnoreUpdate = true)] |
| | | public int CreateType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åæ®ç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åæ®ç±»å", IsOnlyIgnoreUpdate = true)] |
| | | public int OrderType { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åç¼ç ")] |
| | | public string ProductCode { get; set; } |
| | | /// <summary> |
| | | /// 产ååç§° |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产ååç§°")] |
| | | public string ProductName { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产åçæ¬ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åçæ¬")] |
| | | public string ProductVersion { get; set; } |
| | | /// <summary> |
| | | /// 卿 |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "卿")] |
| | | public string DateCode { get; set; } |
| | | /// <summary> |
| | | /// éæ±æ°é |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "éæ±æ°é", DefaultValue = "0")] |
| | | public float RequiredQuantity { get; set; } |
| | | /// <summary> |
| | | /// å·¥å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "å·¥å")] |
| | | public string FactoryCode { get; set; } |
| | | /// <summary> |
| | | /// éå®è®¢å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "éå®è®¢å")] |
| | | public string SaleOrder { get; set; } |
| | | /// <summary> |
| | | /// åºåç±»å |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "åºåç±»å", IsOnlyIgnoreUpdate = true)] |
| | | public int InventoryType { get; set; } |
| | | } |
| | | } |
| | |
| | | PalletCode = model.CarrierCode, |
| | | PalletType = palletTypeInfo.PalletType, |
| | | WarehouseId = warehouse.WarehouseId, |
| | | StockStatus = stockInfoDetail.StockQuantity<=0.0? StockStatusEmun.MES空æéåº.ObjToInt():StockStatusEmun.MESéåº.ObjToInt(), |
| | | StockStatus = stockInfoDetail.StockQuantity <= 0.0 ? StockStatusEmun.MES空æéåº.ObjToInt() : StockStatusEmun.MESéåº.ObjToInt(), |
| | | Details = new List<Dt_StockInfoDetail> { stockInfoDetail }, |
| | | Remark= stockInfoDetail.StockQuantity <= 0.0 ? StockStatusEmun.MES空æéåº.ToString() : StockStatusEmun.MESéåº.ToString() |
| | | Remark = stockInfoDetail.StockQuantity <= 0.0 ? StockStatusEmun.MES空æéåº.ToString() : StockStatusEmun.MESéåº.ToString() |
| | | }; |
| | | //Dt_Task task = new Dt_Task() |
| | | //{ |
| | |
| | | { |
| | | return MesResponseContent.Instance.Error("ä»åºä¿¡æ¯æªé
ç½®"); |
| | | } |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == item.CarrierCode); |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.QueryFirst(x => x.PalletCode == item.CarrierCode || x.WarehouseId == warehouse.WarehouseId); |
| | | if (stockInfo == null) |
| | | { |
| | | return MesResponseContent.Instance.Error("æªæ¾å°æ¤è½½å
·ç¼å·åºå"); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// PPåºåæ¥è¯¢ |
| | | /// </summary> |
| | |
| | | MesResponseContent content = new MesResponseContent(); |
| | | try |
| | | { |
| | | |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA58.ToString()); |
| | | List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => |
| | | x.WarehouseId == warehouse.WarehouseId && |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æåè¿å·¥æåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public MesResponseContent RworkTask(RworkTaskModel model) |
| | | { |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == WarehouseEnum.HA72.ToString()); |
| | | //è·ååºåè®°å½ |
| | | List<Dt_StockInfo> stockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => |
| | | x.WarehouseId == warehouse.WarehouseId && |
| | | x.StockStatus == (int)StockStatusEmun.å
¥åºå®æ).Includes(x => x.Details).ToList(); |
| | | Dt_StockInfo? stockInfo = stockInfos.FirstOrDefault(x => x.Details.Any(x => x.BatchNo == model.ProductVersion)); |
| | | if (stockInfo == null) |
| | | { |
| | | return MesResponseContent.Instance.Error($"å°¾æ°ä»:{model.ProductVersion}æ å¯ç¨åºå"); |
| | | } |
| | | Dt_Task exsit2 = Repository.QueryFirst(x => x.PalletCode == stockInfo.PalletCode); |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | throw; |
| | | } |
| | | return MesResponseContent.Instance.OK(); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | { |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | } |
| | | if (stockInfo.StockStatus != StockStatusEmun.ç»çæå.ObjToInt()) |
| | | if (stockInfo.StockStatus != StockStatusEmun.åºåºå®æ.ObjToInt()) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该æçç¶æä¸æ£ç¡®"); |
| | | } |
| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_IOutboundService; |
| | | using WIDESEA_Model.Models.Outbound; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_Model.Models.Inbound; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Inbound |
| | | { |
| | |
| | | /// </summary> |
| | | [Route("api/mesPPBackInboundOrder")] |
| | | [ApiController] |
| | | public class MesPPBackInboundOrderController : ApiBaseController<IMesPPCutOutboundOrderService, Dt_MesPPCutOutboundOrder> |
| | | public class MesPPBackInboundOrderController : ApiBaseController<IMesPPBackInboundOrderService, Dt_MesPPBackInboundOrder> |
| | | { |
| | | public MesPPBackInboundOrderController(IMesPPCutOutboundOrderService service) : base(service) |
| | | public MesPPBackInboundOrderController(IMesPPBackInboundOrderService service) : base(service) |
| | | { |
| | | |
| | | } |
| | |
| | | { |
| | | return _taskService.UploadMesMaterialLotaAcept(model); |
| | | } |
| | | /// <summary> |
| | | /// æåè¿å·¥æåº |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [HttpPost,Route("RworkTask"),AllowAnonymous] |
| | | public MesResponseContent RworkTask([FromBody] RworkTaskModel model) |
| | | { |
| | | return _taskService.RworkTask(model); |
| | | } |
| | | |
| | | } |
| | | } |