已删除12个文件
已修改17个文件
已添加11个文件
| | |
| | | }); ; |
| | | builder.ConfigureApplication(); |
| | | |
| | | App.ExpDateTime = DateTime.Parse("2025-05-31 00:00:00"); |
| | | //App.ExpDateTime = DateTime.Parse("2025-05-31 00:00:00"); |
| | | |
| | | // 2ãé
ç½®æå¡ |
| | | builder.Services.AddSingleton(new AppSettings(builder.Configuration));//注å |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], 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>' |
| | | ); |
| | | }, |
| | | }); |
| | | }, |
| | | 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; |
| | | |
| | |
| | | prop: "pVer", |
| | | title: "产åçæ¬", |
| | | type: "string", |
| | | width: 150, |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "outSpecifyVer", |
| | | title: "ææ´¾çæ¬", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "pLot", |
| | |
| | | name: 'locationInfo', |
| | | component: () => import('@/views/basic/locationInfo.vue') |
| | | }, { |
| | | path: '/locationInfoRow', |
| | | name: 'locationInfoRow', |
| | | component: () => import('@/views/basic/locationInfoRow.vue') |
| | | }, { |
| | | path: '/materielInfo', |
| | | name: 'materielInfo', |
| | | component: () => import('@/views/basic/materielInfo.vue') |
| | |
| | | path: '/proInStatistics', |
| | | name: 'proInStatistics', |
| | | component: () => import('@/views/inbound/proInStatistics.vue') |
| | | }, |
| | | { |
| | | path: '/erpProInOrder', |
| | | name: 'erpProInOrder', |
| | | component: () => import('@/views/inbound/erpProInOrder.vue') |
| | | } |
| | | ] |
| | | export default viewgird |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="container"> |
| | | <div class="header"> |
| | | <h2 class="title">è´§ä½æå¾</h2> |
| | | </div> |
| | | |
| | | <div class="content-wrapper"> |
| | | <!-- æ§å¶é¢æ¿åºå --> |
| | | <div class="control-panel"> |
| | | <div class="form-group"> |
| | | <label>åºåï¼</label> |
| | | <el-select |
| | | size="mini" |
| | | filterable |
| | | v-model="Area.shelf_code" |
| | | placeholder="è¯·éæ©" |
| | | class="full-width" |
| | | > |
| | | <el-option |
| | | v-for="item in slectData" |
| | | :value="item.shelf_code" |
| | | :label="item.house_name" |
| | | :key="item.house_name" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label>æï¼</label> |
| | | <el-select |
| | | size="mini" |
| | | clearable |
| | | filterable |
| | | @change="SCChange" |
| | | v-model="Area.tunnel" |
| | | placeholder="è¯·éæ©" |
| | | class="full-width" |
| | | > |
| | | <el-option |
| | | v-for="item in scList" |
| | | :value="item" |
| | | :label="item" |
| | | :key="item" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | |
| | | <el-button type="success" class="refresh-btn" @click="GetViewData"> |
| | | å·æ° |
| | | </el-button> |
| | | |
| | | <div class="legend-section"> |
| | | <h4>说æ</h4> |
| | | <div class="legend-grid"> |
| | | <div |
| | | class="legend-item" |
| | | v-for="item in infoMsg" |
| | | :key="item.bgcolor" |
| | | > |
| | | <span |
| | | class="color-box" |
| | | :style="{ 'background-color': item.bgcolor }" |
| | | ></span> |
| | | <span class="legend-label">{{ item.msg }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- è´§ä½å±ç¤ºåºå --> |
| | | <div class="location-view"> |
| | | <div |
| | | class="layer-container" |
| | | v-for="layer in locationData" |
| | | :key="layer.index" |
| | | > |
| | | <h3 class="layer-title">第{{ layer.index }}å±</h3> |
| | | <div class="row" v-for="row in layer.rows" :key="row.index"> |
| | | <div |
| | | class="location-cell" |
| | | :style="{ 'background-color': GetBgColor(col) }" |
| | | v-for="col in row.cols" |
| | | :key="col.index" |
| | | @mouseenter="showTooltip(col, $event)" |
| | | @mouseleave="hideTooltip" |
| | | > |
| | | {{ row.index }}-{{ col.index }}-{{ layer.index }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- æ¬æµ®æç¤ºæ¡ --> |
| | | <div |
| | | v-if="showTooltipFlag" |
| | | class="location-tooltip" |
| | | :style="{ |
| | | left: tooltipPosition.x + 'px', |
| | | top: tooltipPosition.y + 'px', |
| | | }" |
| | | > |
| | | <div v-if="currentLocation"> |
| | | <p><strong>è´§ä½å·:</strong>{{ currentLocation.locationCode }}</p> |
| | | <p> |
| | | <strong>è´§ä½æåå±:</strong> {{ currentLocation.row }}æ{{ |
| | | currentLocation.layer |
| | | }}å{{ currentLocation.index }}å± |
| | | </p> |
| | | <p><strong>ç¶æ:</strong> {{ getStatusText(currentLocation) }}</p> |
| | | <p> |
| | | <strong>ç¦ç¨:</strong> |
| | | {{ currentLocation.location_lock == 3 ? "æ¯" : "å¦" }} |
| | | </p> |
| | | <!-- <p v-if="currentLocation.location_state > 0"> |
| | | <strong>ç©æç¼ç :</strong> |
| | | {{ currentLocation.material_code || "æ " }} |
| | | </p> |
| | | <p v-if="currentLocation.location_state > 0"> |
| | | <strong>æ°é:</strong> {{ currentLocation.quantity || "æ " }} |
| | | </p> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { ElButton } from "element-plus"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | slectData: [], |
| | | scList: [], |
| | | Area: { house_name: "", tunnel: "", shelf_code: "" }, |
| | | mian_height: "", |
| | | infoMsg: [ |
| | | { bgcolor: "lightgreen", msg: "空货ä½", state: 0 }, |
| | | { bgcolor: "orange", msg: "æè´§", state: 100 }, |
| | | { bgcolor: "#2BB3D5", msg: "éå®", state: "InAssigned" }, |
| | | { bgcolor: "#ccc", msg: "ç¦ç¨", state: 3 }, |
| | | // { bgcolor: "red", msg: "ç¦ç¨", state: 3 }, |
| | | { bgcolor: "#b7ba6b", msg: "å
¶å®", state: "else" }, |
| | | ], |
| | | locationData: [], |
| | | showTooltipFlag: false, |
| | | currentLocation: null, |
| | | tooltipPosition: { x: 0, y: 0 }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | GetBgColor() { |
| | | return (col) => { |
| | | var bgColor = "#b7ba6b"; |
| | | //ä¼å
æ¾ç¤ºç¦ç¨ç¶æ |
| | | if (col.location_lock == 3) { |
| | | this.infoMsg.forEach((el) => { |
| | | if (el.state == col.location_lock) { |
| | | bgColor = el.bgcolor; |
| | | } |
| | | }); |
| | | } else { |
| | | this.infoMsg.forEach((el) => { |
| | | if (col.location_state > 0 && col.location_state < 100) { |
| | | if (el.state == "InAssigned") { |
| | | bgColor = el.bgcolor; |
| | | } |
| | | } else if (el.state == col.location_state) { |
| | | bgColor = el.bgcolor; |
| | | } |
| | | }); |
| | | } |
| | | return bgColor; |
| | | }; |
| | | }, |
| | | }, |
| | | watch: { |
| | | //忢åºåº |
| | | "Area.shelf_code"(newValue, oldValue) { |
| | | this.scList = []; |
| | | this.slectData.forEach((e) => { |
| | | if (e.shelf_code == newValue) { |
| | | this.Area.tunnel = e.tunnel[0]; |
| | | this.scList = e.tunnel; |
| | | } |
| | | }); |
| | | this.GetViewData(); |
| | | }, |
| | | }, |
| | | methods: { |
| | | GetViewData() { |
| | | var _this = this; |
| | | this.http |
| | | .post("/api/LocationInfoRow/GetLocationStatu", _this.Area, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | _this.locationData = x; |
| | | console.log("å端è¿å:", x); |
| | | }); |
| | | }, |
| | | // 忢æ |
| | | SCChange() { |
| | | this.GetViewData(); |
| | | }, |
| | | showTooltip(location, event) { |
| | | this.currentLocation = location; |
| | | this.showTooltipFlag = true; |
| | | |
| | | // 设置æç¤ºæ¡ä½ç½®ï¼ç¨å¾®åç§»é¿å
鮿¡é¼ æ |
| | | this.tooltipPosition = { |
| | | x: event.clientX + 10, |
| | | y: event.clientY + 10, |
| | | }; |
| | | }, |
| | | |
| | | hideTooltip() { |
| | | this.showTooltipFlag = false; |
| | | this.currentLocation = null; |
| | | }, |
| | | |
| | | getStatusText(location) { |
| | | // if (location.location_lock === 3) return "ç¦ç¨"; |
| | | if (location.location_state === 0) return "空货ä½"; |
| | | if (location.location_state === 1) return "éå®"; |
| | | if (location.location_state === 10) return "æè´§éå®"; |
| | | if (location.location_state === 20) return "空é²éå®"; |
| | | if (location.location_state === 99) return "大æçéå®"; |
| | | if (location.location_state === 100) return "æè´§"; |
| | | // if (location.location_state > 0 && location.location_state < 100) |
| | | // return "éå®"; |
| | | return "å
¶ä»"; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | var mainHeight = document.getElementById("vol-main"); |
| | | this.mian_height = mainHeight.offsetHeight - 40 + "px"; |
| | | var _this = this; |
| | | //å è½½ä¸æé项 |
| | | this.http.get("/api/LocationInfoRow/GetArea", {}, "æ¥è¯¢ä¸").then((x) => { |
| | | _this.slectData = x; |
| | | //å 载第ä¸ä¸ªåºåï¼ç¬¬ä¸æ |
| | | _this.Area.shelf_code = _this.slectData[0].shelf_code; |
| | | _this.scList = _this.slectData[0].tunnel; |
| | | }); |
| | | }, |
| | | components: { ElButton }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | height: 100%; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .header { |
| | | text-align: center; |
| | | margin-bottom: 20px; |
| | | } |
| | | |
| | | .title { |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | margin: 0; |
| | | } |
| | | |
| | | .content-wrapper { |
| | | display: flex; |
| | | flex: 1; |
| | | min-height: 0; |
| | | } |
| | | |
| | | .control-panel { |
| | | width: 220px; |
| | | padding: 15px; |
| | | background-color: #f5f7fa; |
| | | border-radius: 4px; |
| | | margin-right: 15px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .form-group { |
| | | margin-bottom: 15px; |
| | | } |
| | | |
| | | .full-width { |
| | | width: 100%; |
| | | } |
| | | |
| | | .refresh-btn { |
| | | margin-top: 10px; |
| | | width: 100%; |
| | | } |
| | | |
| | | .legend-section { |
| | | margin-top: 30px; |
| | | } |
| | | |
| | | .legend-section h4 { |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .legend-grid { |
| | | display: grid; |
| | | grid-template-columns: 1fr; |
| | | gap: 8px; |
| | | } |
| | | |
| | | .legend-item { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .color-box { |
| | | display: inline-block; |
| | | width: 20px; |
| | | height: 20px; |
| | | margin-right: 8px; |
| | | border-radius: 3px; |
| | | } |
| | | |
| | | .legend-label { |
| | | font-size: 13px; |
| | | } |
| | | |
| | | .location-view { |
| | | flex: 1; |
| | | overflow: auto; |
| | | padding: 10px; |
| | | background-color: white; |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .layer-container { |
| | | margin-bottom: 25px; |
| | | } |
| | | |
| | | .layer-title { |
| | | margin: 0 0 10px 0; |
| | | font-size: 16px; |
| | | color: #333; |
| | | } |
| | | |
| | | .row { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .location-cell { |
| | | width: 66px; |
| | | height: 38px; |
| | | margin: 3px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | border-radius: 3px; |
| | | line-height: 38px; |
| | | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); |
| | | } |
| | | |
| | | .location-tooltip { |
| | | position: fixed; |
| | | z-index: 9999; |
| | | background-color: white; |
| | | border: 1px solid #ddd; |
| | | border-radius: 4px; |
| | | padding: 10px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| | | pointer-events: none; |
| | | max-width: 250px; |
| | | } |
| | | |
| | | .location-tooltip p { |
| | | margin: 5px 0; |
| | | font-size: 13px; |
| | | line-height: 1.4; |
| | | } |
| | | |
| | | .location-tooltip strong { |
| | | display: inline-block; |
| | | width: 70px; |
| | | color: #666; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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/erpProInOrder.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const table = ref({ |
| | | key: "id", |
| | | footer: "Foots", |
| | | cnName: "æåè°æ¨/å¯å®å
¥åºå", |
| | | name: "erpProInOrder", |
| | | url: "/erpProInOrder/", |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | |
| | | ], |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | warehouseId: "", |
| | | pCode: "", |
| | | pVer: "", |
| | | orderNo: "", |
| | | upperOrderNo: "" |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "产åç¼ç ", field: "pCode",type: "like"}, |
| | | { |
| | | title: "ä»åº", |
| | | field: "warehouseId", |
| | | type: "select", |
| | | dataKey: "warehouses", |
| | | data: [] |
| | | }, |
| | | { title: "产åçæ¬", field: "pVer",type: "like"}, |
| | | ], |
| | | [ |
| | | { title: "åæ®ç¼å·", field: "orderNo",type: "like"}, |
| | | { title: "䏿¸¸åæ®ç¼å·", field: "upperOrderNo",type: "like"}, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | | { |
| | | field: "id", |
| | | title: "Id", |
| | | type: "int", |
| | | width: 90, |
| | | hidden: true, |
| | | readonly: true, |
| | | require: true, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | | title: "æå±ä»åº", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "warehouses", data: [] }, |
| | | }, |
| | | { |
| | | field: "orderNo", |
| | | title: "åæ®ç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "upperOrderNo", |
| | | title: "䏿¸¸åæ®ç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "orderType", |
| | | title: "åæ®ç±»å", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | bind: { key: "proInOrderType", data: [{key:1,value:"è°æ¨å
¥åº"},{key:2,value:"éå®è½¬å
¥"}] }, |
| | | }, |
| | | { |
| | | field: "proInStatus", |
| | | title: "订åç¶æ", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | bind: { key: "inboundState", data: [] }, |
| | | }, |
| | | { |
| | | field: "pCode", |
| | | title: "产ååå·", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "pVer", |
| | | title: "产åçæ¬", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "dateCode", |
| | | title: "产å卿", |
| | | type: "string", |
| | | width: 90, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "qtyPcs", |
| | | title: "Pcsæ°é", |
| | | type: "string", |
| | | width: 120, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "proSaleOrderNo", |
| | | title: "éå®è®¢åå·", |
| | | type: "string", |
| | | width: 180, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "modifier", |
| | | title: "æä½äºº", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | } |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | return { |
| | | table, |
| | | extend, |
| | | editFormFields, |
| | | editFormOptions, |
| | | searchFormFields, |
| | | searchFormOptions, |
| | | columns, |
| | | detail, |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | bind: { key: "outOrderType", data: [{key:1,value:"订ååºè´§"}] }, |
| | | bind: { key: "proOutOrderType", data: [{key:1,value:"订ååºè´§"},,{key:2,value:"éå®åºåº"}] }, |
| | | }, |
| | | { |
| | | field: "proOrderStatus", |
| | |
| | | palletCode: "", |
| | | // locationCode: "", |
| | | materielCode:"", |
| | | batchNo:"" |
| | | batchNo:"", |
| | | specifyVer:"" |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | |
| | | // { title: "è´§ä½ç¼å·", field: "locationCode",type: "like" }, |
| | | { title: "è´§ä½ç¶æ", field: "locationStatus" ,type: "selectList",dataKey: "locationStatusEnum",data: [],}, |
| | | { title: "åºåç¶æ", field: "stockStatus",type: "selectList",dataKey: "stockStatusEmun",data: [],}, |
| | | { title: "产åç¼ç ", field: "productCode",type: "like"}, |
| | | ], |
| | | [ |
| | | { title: "产åç¼ç ", field: "productCode",type: "like"}, |
| | | |
| | | { title: "产åçæ¬", field: "productVersion",type: "like"}, |
| | | { title: "ææ´¾çæ¬", field: "specifyVer",type: "like"}, |
| | | { title: "æå±ä»åº", field: "warehouseId",type: "selectList",dataKey: "warehouses",data: [],}, |
| | | ] |
| | | ]); |
| | |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "specifyVer", |
| | | title: "ææ´¾çæ¬", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left" |
| | | }, |
| | | { |
| | | field: "dateCode", |
| | | title: "产å卿", |
| | | type: "string", |
| | | width: 140, |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace WIDESEA_DTO.Basic |
| | | { |
| | | public class LocationArea |
| | | { |
| | | /// <summary> |
| | | /// åºåºåç§° |
| | | /// </summary> |
| | | public string house_name { get; set; } |
| | | |
| | | /// <summary> |
| | | /// åºåºç¼å· |
| | | /// </summary> |
| | | public int shelf_code { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public int tunnel { get; set; } |
| | | } |
| | | |
| | | |
| | | public class LocationLayer |
| | | { |
| | | public int index { get; set; } |
| | | public List<LocationRow> rows { get; set; } |
| | | } |
| | | public class LocationRow |
| | | { |
| | | public int index { get; set; } |
| | | public List<LocationCol> cols { get; set; } |
| | | } |
| | | |
| | | public class LocationCol |
| | | { |
| | | public string locationCode { get; set; } |
| | | public int row { get; set; } |
| | | public int layer { get; set; } |
| | | |
| | | public int index { get; set; } |
| | | /// <summary> |
| | | /// æ£æµæç¶æ |
| | | /// </summary> |
| | | public string remark { get; set; } |
| | | /// <summary> |
| | | /// è´§ä½ç¶æ |
| | | /// </summary> |
| | | public int location_state { get; set; } |
| | | /// <summary> |
| | | /// éå®ç¶æ |
| | | /// </summary> |
| | | public int location_lock { get; set; } |
| | | } |
| | | |
| | | } |
| | |
| | | /// 产å卿 |
| | | /// </summary> |
| | | [PropertyValidate("产å卿")] |
| | | public int DateCode { get; set; } |
| | | public string DateCode { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºç±»å |
| | |
| | | namespace WIDESEA_DTO.ERP |
| | | { |
| | | /// <summary> |
| | | /// æåè°å
¥å¾
åè´§ä»è¡¨ |
| | | /// æåè°å
¥/éå®è½¬å
¥å¾
åè´§ä» |
| | | /// </summary> |
| | | [ModelValidate] |
| | | public class ErpProductWarehousingOrderDTO |
| | |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "çæ¬")] |
| | | public string ProductVersion { get; set; } |
| | | /// <summary> |
| | | /// çæ¬ |
| | | /// </summary> |
| | | [ExporterHeader(DisplayName = "çæ¬")] |
| | | public string SpecifyVer { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 产å卿 |
| | |
| | | { |
| | | IProOutOrderRepository Repository { get; } |
| | | /// <summary> |
| | | /// æ¥æ¶æååºåºå |
| | | /// æ¥æ¶ERPæååºåºåä¿¡æ¯(订ååºåº/å¯å®åºåº) |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<WebResponseContent> ProductDeliveryOrder(ErpProOutOrderDTO outOrderDTO); |
| | | /// <summary> |
| | | /// éå®é¨ä»¶ææ´¾ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | Task<WebResponseContent> ProductSpecifyVer(ErpProductSpecifyVerDTO erpProductSpecifyVerDTO); |
| | | /// <summary> |
| | | /// æååºå¾
åè´§åº(å¹³åº)+忥ERPåºåº(å·²ç»å®åºåºååºå) |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | [SugarColumn(IsNullable = true, ColumnDescription = "åºå屿§")] |
| | | public int ProStockAttribute { get; set; } |
| | | /// <summary> |
| | | /// å
¥åºåç¶æ |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "å
¥åºåç¶æ")] |
| | | public int ProInStatus { get; set; } |
| | | /// <summary> |
| | | /// 产åç¼ç |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "产åç¼ç ")] |
| | |
| | | public string ShipmentOrder { get; set; } |
| | | |
| | | /// <summary> |
| | | /// å
¥åºåå· |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = true, Length = 30, ColumnDescription = "å
¥åºåå·")] |
| | | public string ProInOrderNo { get; set; } |
| | | |
| | | /// <summary> |
| | | /// ä»åºä¸»é® |
| | | /// </summary> |
| | | [SugarColumn(IsNullable = false, ColumnDescription = "ä»åºä¸»é®")] |
| | |
| | | _invokeERPService = invokeERPService; |
| | | } |
| | | /// <summary> |
| | | /// æ¥æ¶ERPæååºåºå |
| | | /// æ¥æ¶ERPæååºåºåä¿¡æ¯(订ååºåº/å¯å®åºåº) |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> ProductDeliveryOrder(ErpProOutOrderDTO outOrderDTO) |
| | |
| | | return content; |
| | | } |
| | | /// <summary> |
| | | /// éå®ææ´¾ |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public async Task<WebResponseContent> ProductSpecifyVer(ErpProductSpecifyVerDTO erpProductSpecifyVerDTO) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x=>x.WarehouseCode==erpProductSpecifyVerDTO.WaType); |
| | | if (warehouse == null) |
| | | return await Task.FromResult(content.Error($"æªæ¾å°{erpProductSpecifyVerDTO.WaType}ä»åºä¿¡æ¯")); |
| | | //æ¥è¯¢å¯ææ´¾åºå |
| | | List<Dt_ProStockInfo> proStockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => x.ProStockAttribute == ProStockAttributeEnum.æå.ObjToInt()) |
| | | .Includes(x => x.proStockInfoDetails) |
| | | .Where(x => x.proStockInfoDetails |
| | | .Any(v => |
| | | v.SaleOrder == erpProductSpecifyVerDTO.OrderNo |
| | | && v.ProductCode == erpProductSpecifyVerDTO.PCode |
| | | && v.ProductVersion == erpProductSpecifyVerDTO.PVer |
| | | && v.LotNumber == erpProductSpecifyVerDTO.PLot |
| | | && v.DateCode == erpProductSpecifyVerDTO.DateCode |
| | | && (v.SpecifyVer==null||v.SpecifyVer=="") |
| | | )) |
| | | .ToList(); |
| | | List<Dt_ProStockInfoDetail> proStockInfoDetails = new List<Dt_ProStockInfoDetail>(); |
| | | List<Dt_ProStockInfoDetail> specifyVerDetails = new List<Dt_ProStockInfoDetail>(); |
| | | if (proStockInfos==null) |
| | | return await Task.FromResult(content.Error("å¯ææ´¾åºåä¸åå¨")); |
| | | proStockInfos = proStockInfos.OrderBy(x => x.proStockInfoDetails.FirstOrDefault()?.DateCode).ThenBy(x => x.CreateDate).ThenBy(x => x.proStockInfoDetails.Sum(x => x.StockPcsQty)).ToList(); |
| | | foreach (var item in proStockInfos) |
| | | { |
| | | proStockInfoDetails.AddRange(item.proStockInfoDetails); |
| | | } |
| | | if (proStockInfoDetails.Sum(x=>x.StockPcsQty)< erpProductSpecifyVerDTO.QtyPcs) |
| | | return await Task.FromResult(content.Error($"å¯ææ´¾åºåæ°éä¸è¶³,å¯ç¨:{proStockInfoDetails.Sum(x => x.StockPcsQty)}")); |
| | | float overQty = 0; |
| | | foreach (var item in proStockInfoDetails) |
| | | { |
| | | specifyVerDetails.Add(item); |
| | | overQty += item.StockPcsQty; |
| | | //已满足è·åæ°éä¸åæ´æ¹ |
| | | if (overQty>= erpProductSpecifyVerDTO.QtyPcs) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | specifyVerDetails.ForEach(x => |
| | | { |
| | | x.SpecifyVer = erpProductSpecifyVerDTO.Ver; |
| | | }); |
| | | _unitOfWorkManage.BeginTran(); |
| | | _stockRepository.ProStockInfoDetailRepository.UpdateData(specifyVerDetails); |
| | | _unitOfWorkManage.CommitTran(); |
| | | content.OK("ææ´¾æå"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | content.Error(ex.Message); |
| | | } |
| | | return await Task.FromResult(content); |
| | | } |
| | | /// <summary> |
| | | /// æååºå¾
åè´§åº(å¹³åº)+忥ERPåºåº(ç»å®äºåºåºååºå) |
| | | /// </summary> |
| | | /// <returns></returns> |
| | |
| | | sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.ProductVersion.Contains(searchParameters.Value))); |
| | | } |
| | | } |
| | | { |
| | | SearchParameters? searchParameters = searchParametersList.FirstOrDefault(x => x.Name == nameof(Dt_ProStockInfoDetail.SpecifyVer).FirstLetterToLower()); |
| | | if (searchParameters != null) |
| | | { |
| | | sugarQueryable1 = sugarQueryable1.Where(x => x.proStockInfoDetails.Any(v => v.SpecifyVer.Contains(searchParameters.Value))); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | { |
| | | x.ProductCode = string.Join(",", x.Details.Select(x => x.ProductCode).Distinct()); |
| | | x.ProductVersion = string.Join(",", x.Details.Select(x => x.ProductVersion).Distinct()); |
| | | x.SpecifyVer = string.Join(",", x.Details.Select(x => x.SpecifyVer).Distinct()); |
| | | x.DateCode = x.Details.FirstOrDefault()?.DateCode ?? ""; |
| | | x.LotNumber = x.Details.FirstOrDefault()?.LotNumber ?? ""; |
| | | x.ERPOrder = x.Details.FirstOrDefault()?.ERPOrder ?? ""; |
| | |
| | | { |
| | | x.ProductCode = string.Join(",", x.Details.Select(x => x.ProductCode).Distinct()); |
| | | x.ProductVersion = string.Join(",", x.Details.Select(x => x.ProductVersion).Distinct()); |
| | | x.SpecifyVer = string.Join(",", x.Details.Select(x => x.SpecifyVer).Distinct()); |
| | | x.DateCode = x.Details.FirstOrDefault()?.DateCode ?? ""; |
| | | x.LotNumber = x.Details.FirstOrDefault()?.LotNumber ?? ""; |
| | | x.ERPOrder = x.Details.FirstOrDefault()?.ERPOrder ?? ""; |
| | |
| | | { |
| | | x.ProductCode = string.Join(",", x.Details.Select(x => x.ProductCode).Distinct()); |
| | | x.ProductVersion = string.Join(",", x.Details.Select(x => x.ProductVersion).Distinct()); |
| | | x.SpecifyVer = string.Join(",", x.Details.Select(x => x.SpecifyVer).Distinct()); |
| | | x.DateCode = x.Details.FirstOrDefault()?.DateCode ?? ""; |
| | | x.LotNumber = x.Details.FirstOrDefault()?.LotNumber ?? ""; |
| | | x.ERPOrder = x.Details.FirstOrDefault()?.ERPOrder ?? ""; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | using HslCommunication.WebSocket; |
| | | using Microsoft.AspNetCore.Authorization; |
| | | using Microsoft.AspNetCore.Http; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using System.Collections.Generic; |
| | | using WIDESEA_Common.CommonEnum; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseController; |
| | | using WIDESEA_Core.Enums; |
| | | using WIDESEA_DTO.Basic; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_ISystemRepository; |
| | | using WIDESEA_Model.Models; |
| | | |
| | | namespace WIDESEA_WMSServer.Controllers.Basic |
| | | { |
| | | /// <summary> |
| | | /// è´§ä½ |
| | | /// </summary> |
| | | [Route("api/LocationInfoRow")] |
| | | [ApiController] |
| | | public class LocationInfoRowController : ApiBaseController<ILocationInfoService, Dt_LocationInfo> |
| | | { |
| | | private readonly ILocationInfoRepository _repository; |
| | | private readonly ISys_RoleDataPermissionRepository _permissionRepository; |
| | | private readonly ILocationInfoRepository _locationInfoRepository; |
| | | public LocationInfoRowController(ILocationInfoService service, ILocationInfoRepository repository, ISys_RoleDataPermissionRepository permissionRepository, ILocationInfoRepository locationInfoRepository) : base(service) |
| | | { |
| | | _repository = repository; |
| | | _permissionRepository = permissionRepository; |
| | | _locationInfoRepository = locationInfoRepository; |
| | | } |
| | | /// <summary> |
| | | /// è·ååºåºæé |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [HttpGet, HttpPost, Route("GetArea"), AllowAnonymous] |
| | | public object GetArea() |
| | | { |
| | | List<object> list = new List<object>(); |
| | | List<Dt_LocationInfo>? locations = null; |
| | | List<Sys_RoleDataPermission> permissions = _permissionRepository.QueryData(x => x.RoleId == App.User.RoleId); |
| | | if (permissions.Count > 0) |
| | | locations = _locationInfoRepository.QueryData(x => permissions.Select(k => k.WarehouseId).ToList().Contains(x.WarehouseId)); |
| | | foreach (var permission in permissions) |
| | | { |
| | | var Rows = locations.Where(x => x.WarehouseId == permission.WarehouseId).GroupBy(x => x.Row).Select(x => x.Key).OrderBy(x => x).ToList(); |
| | | var obj = new |
| | | { |
| | | house_name = permission.WarehouseName, |
| | | shelf_code = permission.WarehouseId, |
| | | tunnel = Rows |
| | | }; |
| | | list.Add(obj); |
| | | } |
| | | return list; |
| | | } |
| | | /// <summary> |
| | | /// è·åè´§ä½ä¿¡æ¯ |
| | | /// </summary> |
| | | /// <param name="area"></param> |
| | | /// <returns></returns> |
| | | [HttpPost, Route("GetLocationStatu"), AllowAnonymous] |
| | | public object GetLocationStatu([FromBody] LocationArea area) |
| | | { |
| | | List<LocationLayer> layers = new List<LocationLayer>(); |
| | | var data = _locationInfoRepository.QueryData(x => x.WarehouseId == area.shelf_code && x.Row == area.tunnel); |
| | | foreach (var layer in data.GroupBy(t => t.Layer)) |
| | | { |
| | | var rows = new List<LocationRow>(); |
| | | var data_rows = layer.GroupBy(t => t.Row); |
| | | foreach (var data_row in data_rows) |
| | | { |
| | | var cols = new List<LocationCol>(); |
| | | foreach (var data_col in data_row) |
| | | { |
| | | cols.Add(new LocationCol() |
| | | { |
| | | //å |
| | | row = data_col.Row, |
| | | layer = data_col.Layer, |
| | | index = data_col.Column, |
| | | locationCode = data_col.LocationCode, |
| | | location_state = data_col.LocationStatus, |
| | | location_lock = data_col.EnableStatus, |
| | | remark = data_col.Remark |
| | | }); |
| | | } |
| | | cols = cols.OrderBy(t => t.index).ToList(); |
| | | rows.Add(new LocationRow() |
| | | { |
| | | //è¡ |
| | | index = data_row.Key, |
| | | cols = cols |
| | | }); |
| | | } |
| | | rows = rows.OrderBy(t => t.index).ToList(); |
| | | layers.Add(new LocationLayer() |
| | | { |
| | | //å± |
| | | index = layer.Key, |
| | | rows = rows |
| | | }); |
| | | } |
| | | layers = layers.OrderBy(t => t.index).ToList(); |
| | | return layers; |
| | | } |
| | | } |
| | | } |
| | |
| | | /// éå®ææ´¾åæ¥æ¶ |
| | | /// </summary> |
| | | [HttpPost, Route("ProductSpecifyVer"), AllowAnonymous, MethodParamsValidate] |
| | | public ErpResponseContent ProductSpecifyVer([FromBody] Root<ErpProductSpecifyVerDTO> root) |
| | | public async Task<ErpResponseContent> ProductSpecifyVerAsync([FromBody] Root<ErpProductSpecifyVerDTO> root) |
| | | { |
| | | return Instance.OK(); |
| | | var content = await _outboundService.ProOutOrderService.ProductSpecifyVer(root.Content); |
| | | if (content.Status) return Instance.OK(); |
| | | else return Instance.Error(content.Message); |
| | | } |
| | | /// <summary> |
| | | /// æ¥æ¶ERPéæåä¿¡æ¯ |
| | |
| | | CreateMap<MESBagDetail, Dt_MesProInOrderDetail>().ForMember(x => x.OverInQuantity, b => b.MapFrom(b => 0)); |
| | | CreateMap<ErpProOutOrderDetailds, Dt_ProOutOrderDetail>().ForMember(x => x.ProOrderDetailStatus, b => b.MapFrom(b => 0)).ForMember(x => x.OverQtyPcs, b => b.MapFrom(b => 0)); |
| | | CreateMap<Dt_MesProInOrderDetail, Dt_ProStockInfoDetail>().ForMember(x => x.ProOutDetailStatus, b => b.MapFrom(b => StockStatusEmun.ç»çæå.ObjToInt())).ForMember(x => x.OutboundQuantity, b => b.MapFrom(b => 0)).ForMember(x => x.StockPcsQty, b => b.MapFrom(b => b.OKPCSQTY)); |
| | | CreateMap<ErpProductWarehousingOrderDTO, Dt_ErpProInOrder>().ForMember(x => x.ProSaleOrderNo, b => b.MapFrom(b => b.SaleOrder)).ForMember(x => x.Remark, b => b.MapFrom(b => b.Note)).ForMember(x => x.UpperOrderNo, b => b.MapFrom(b => b.TransferNo)).ForMember(x => x.ProStockAttribute, b => b.MapFrom(b => ProStockAttributeEnum.æå.ObjToInt())); |
| | | CreateMap<ErpProductWarehousingOrderDTO, Dt_ErpProInOrder>().ForMember(x => x.ProSaleOrderNo, b => b.MapFrom(b => b.SaleOrder)).ForMember(x => x.Remark, b => b.MapFrom(b => b.Note)).ForMember(x => x.UpperOrderNo, b => b.MapFrom(b => b.TransferNo)).ForMember(x => x.ProStockAttribute, b => b.MapFrom(b => ProStockAttributeEnum.æå.ObjToInt())).ForMember(x => x.ProInStatus, b => b.MapFrom(b => InOrderStatusEnum.æªå¼å§.ObjToInt())); |
| | | CreateMap<ErpProductTransferOrderDTO, Dt_ErpProTransferOrder>().ForMember(x => x.ProSaleOrderNo, b => b.MapFrom(b => b.SaleOrder)).ForMember(x => x.Remark, b => b.MapFrom(b => b.Note)).ForMember(x => x.UpperOrderNo, b => b.MapFrom(b => b.TransferNo)).ForMember(x => x.OrderType, b => b.MapFrom(b => ErpProOutTypeEnum.ProOutAllocat.ObjToInt())).ForMember(x => x.ProStockAttribute, b => b.MapFrom(b => ProStockAttributeEnum.ç å.ObjToInt())); |
| | | } |
| | | } |
| | |
| | | }); ; |
| | | builder.ConfigureApplication(); |
| | | |
| | | App.ExpDateTime = DateTime.Parse("2025-05-31 00:00:00"); |
| | | //App.ExpDateTime = DateTime.Parse("2025-05-31 00:00:00"); |
| | | |
| | | // 2ãé
ç½®æå¡ |
| | | builder.Services.AddSingleton(new AppSettings(builder.Configuration));//注å |
| | |
| | | //è¿æ¥å符串 |
| | | //"ConnectionString": "HTI6FB1H05Krd07mNm9yBCNhofW6edA5zLs9TY~MNthRYW3kn0qKbMIsGp~3yyPDF1YZUCPBQx8U0Jfk4PH~ajNFXVIwlH85M3F~v_qKYQ3CeAz3q1mLVDn8O5uWt1~3Ut2V3KRkEwYHvW2oMDN~QIDXPxDgXN0R2oTIhc9dNu7QNaLEknblqmHhjaNSSpERdDVZIgHnMKejU_SL49tralBkZmDNi0hmkbL~837j1NWe37u9fJKmv91QPb~16JsuI9uu0EvNZ06g6PuZfOSAeFH9GMMIZiketdcJG3tHelo=", |
| | | //"ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | "ConnectionString": "Data Source=.;Initial Catalog=WIDESEAWMS_HUAIAN;User ID=sa;Password=P@ssw0rd;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //"ConnectionString": "Data Source=10.30.4.92;Initial Catalog=WMS_TC;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |
| | | //æ§WMSæ°æ®åºè¿æ¥ |
| | | //"TeConnectionString": "Data Source=10.30.4.92;Initial Catalog=TeChuang;User ID=sa;Password=duo123456;Integrated Security=False;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False", |