| | |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "è¾
æè¾éä»»å¡éå", |
| | | icon: '', |
| | | class: '', |
| | | type: 'warning', |
| | | value: 'FLconverTaskResending', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | |
| | | ] |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | let FLconverTaskResendingBtn = this.buttons.find(x => x.value == 'FLconverTaskResending'); |
| | | if (FLconverTaskResendingBtn) { |
| | | FLconverTaskResendingBtn.onClick = function () { |
| | | this.$confirm("æ¯å¦ç¡®è®¤éåè¾
æè¾éä»»å¡","æå¨ä»»å¡éåè¦å",{ |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | center: true, |
| | | }).then(() => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("è¯·éæ©ä¸æ¡æ°æ®!"); |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .post("api/Task/FLconverTaskResending?taskNum="+param, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('æå¨ä»»å¡éåæå'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | let StackerCraneTaskPriorityBtn = this.buttons.find(x => x.value == 'StackerCraneTaskPriority'); |
| | | if (StackerCraneTaskPriorityBtn) { |
| | | StackerCraneTaskPriorityBtn.onClick = function () { |
| | |
| | | <div class="xname">æçç±»å:</div> |
| | | <div class="xbci" :title="bcData.R_BC_TrayType">{{ bcData.R_BC_TrayType || '-' }}</div> |
| | | </div> |
| | | <!-- æ°å¢ï¼å½ååç¶ææ¾ç¤º --> |
| | | <div class="bcankuang"> |
| | | <div class="xname">å½åæå¨å:</div> |
| | | <div class="xbci" :title="bcData.R_BC_Column">{{ bcData.R_BC_Column || 'æªç¥' }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <!-- æ°å¢ï¼å åæºå½ååæåæ¾ç¤ºï¼ä¸PPä»ä¸è´ï¼ --> |
| | | <div id="bc-nowcolumn" :class="{ 'abnormal-column': bcData.R_BC_Status !== 'æ£å¸¸' }"> |
| | | <div>æ¿æå åæºå½åæå¨å: |
| | | <span :title="bcData.R_BC_Column">{{ bcData.R_BC_Column || 'æªç¥' }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼åæ¹æ ¼å±ç¤ºåºåï¼ä¸PPä»é»è¾ä¸è´ï¼ --> |
| | | <div class="bc-column-container" :class="{ 'pp-status-abnormal': bcData.R_BC_Status !== 'æ£å¸¸' }"> |
| | | <!-- 䏿¹1-24å --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="num in 37" |
| | | :key="num" |
| | | class="column-grid-item" |
| | | :class="{ 'active': num == bcData.R_BC_Column }" |
| | | :title="`åå·: ${num}`" |
| | | > |
| | | {{ num }} |
| | | </div> |
| | | </div> |
| | | <!-- 䏿¹25-47å (23个) --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="i in 34" |
| | | :key="'bc-lower-' + i" |
| | | class="column-grid-item" |
| | | :class="{ 'active': (103 + i) == bcData.R_BC_Column }" |
| | | :title="`åå·: ${103 + i}`" |
| | | > |
| | | {{ 103 + i }} |
| | | </div> |
| | | </div> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="i in 34" |
| | | :key="'bc-lower-' + i" |
| | | class="column-grid-item" |
| | | :class="{ 'active': (203 + i) == bcData.R_BC_Column }" |
| | | :title="`åå·: ${203 + i}`" |
| | | > |
| | | {{ 203 + i }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | }, |
| | | setup() { |
| | | const store = useStore(); |
| | | // ä»
åå¨BCæ°æ®ï¼ä¸å
¶ä»æ°æ®é离 |
| | | const bcData = ref({}); |
| | | |
| | | // å»¶è¿æ´æ°é
ç½®ï¼è§£å³éªçé®é¢ |
| | | const UPDATE_DELAY = 300; // å»¶è¿300msæ´æ°UI |
| | | let updateTimer = null; // 宿¶å¨å®ä¾ |
| | | const UPDATE_DELAY = 300; |
| | | let updateTimer = null; |
| | | |
| | | // BCæ°æ®æ å°è§å |
| | | // BCæ°æ®æ å°è§åï¼æ°å¢R_BC_Columnåå·å¤çï¼ |
| | | const bcStatusMap = { |
| | | R_BC_Status: { |
| | | 1: "æ£å¸¸", |
| | | 2: "æ
é", |
| | | 3: "æ¥å", |
| | | 0: "æ£å¸¸", |
| | | 1: "æ
é", |
| | | 2: "æ¥å", |
| | | 3: "æªç¥" |
| | | }, |
| | | R_BC_AutoStatus: { |
| | | 0: "ç»´ä¿®", |
| | |
| | | 2: "䏿ç(2)", |
| | | 3: "大æç(3)", |
| | | 4: "ç¹å¤§æç(4)", |
| | | } |
| | | }, |
| | | // æ°å¢ï¼åå·æ å°ï¼ä¸PPä»ä¸è´ï¼ |
| | | R_BC_Column: (val) => val !== undefined ? val : "æªç¥" |
| | | }; |
| | | |
| | | // BCåæ®µåç» |
| | | const bcFieldGroups = { |
| | | permissionFields: { |
| | | keys: ["R_BC_IsCanPut1", "R_BC_IsCanTake1", "R_BC_IsCanPut2", "R_BC_IsCanTake2", |
| | |
| | | } |
| | | }; |
| | | |
| | | // å¤çBCåå§æ°æ® |
| | | const processBCData = (rawData) => { |
| | | if (!rawData) return {}; |
| | | const processedData = { ...rawData }; |
| | | |
| | | // å¤çæ ¸å¿ç¶æå段 |
| | | // å¤çæ ¸å¿ç¶æå段ï¼å
å«åå·ï¼ |
| | | Object.keys(bcStatusMap).forEach(key => { |
| | | if (processedData.hasOwnProperty(key)) { |
| | | processedData[key] = bcStatusMap[key][processedData[key]] || processedData[key]; |
| | | const mapper = bcStatusMap[key]; |
| | | processedData[key] = typeof mapper === 'function' |
| | | ? mapper(processedData[key]) |
| | | : (mapper[processedData[key]] || processedData[key]); |
| | | } |
| | | }); |
| | | |
| | | // å¤çåç»å段 |
| | | Object.values(bcFieldGroups).forEach(group => { |
| | | group.keys.forEach(key => { |
| | | if (processedData.hasOwnProperty(key)) { |
| | |
| | | return processedData; |
| | | }; |
| | | |
| | | // å»¶è¿æ´æ°BCæ°æ®ï¼é¿å
é«é¢å·æ° |
| | | const delayedUpdateBCData = (newRawData) => { |
| | | if (updateTimer) { |
| | | clearTimeout(updateTimer); |
| | | } |
| | | |
| | | updateTimer = setTimeout(() => { |
| | | // åªå¤çå
å«BCç¹å¾åæ®µçæ°æ® |
| | | if (newRawData && newRawData.R_BC_Status !== undefined) { |
| | | bcData.value = processBCData(newRawData); |
| | | |
| | | // æ´æ°æ ·å¼ |
| | | nextTick(() => { |
| | | const valueElements = document.getElementsByClassName("xbci"); |
| | | for (let i = 0; i < valueElements.length; i++) { |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // åå§å è½½æ°æ® |
| | | const initialData = store.state.homedata; |
| | | if (initialData && initialData.R_BC_Status !== undefined) { |
| | | bcData.value = processBCData(initialData); |
| | | } |
| | | |
| | | // ç嬿°æ®ååï¼åªå¤çBCæ°æ® |
| | | const unwatch = watch( |
| | | () => store.state.homedata, |
| | | (newData) => { |
| | |
| | | { deep: true } |
| | | ); |
| | | |
| | | // ç»ä»¶å¸è½½æ¶æ¸
ç |
| | | onUnmounted(() => { |
| | | unwatch(); |
| | | if (updateTimer) { |
| | |
| | | margin-left: 1.7%; |
| | | border-radius: 10px; |
| | | } |
| | | </style> |
| | | |
| | | /* æ°å¢ï¼BCå åæºå½ååæåæ ·å¼ï¼ä¸PPä»ä¸è´ï¼ */ |
| | | #bc-nowcolumn { |
| | | width: 100%; |
| | | height: 70px; |
| | | float: left; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 1.5cqw; |
| | | font-weight: bold; |
| | | color: #00ff4c; |
| | | } |
| | | |
| | | /* æ°å¢ï¼BCå åæºå¼å¸¸ç¶ææååè² */ |
| | | #bc-nowcolumn.abnormal-column { |
| | | color: red !important; |
| | | } |
| | | #bc-nowcolumn.abnormal-column span { |
| | | color: red !important; |
| | | } |
| | | |
| | | /* æ°å¢ï¼BCå容卿 ·å¼ */ |
| | | .bc-column-container { |
| | | width: 95%; |
| | | margin: 0 auto; |
| | | position: relative; |
| | | clear: both; |
| | | padding-top: 15px; |
| | | } |
| | | |
| | | /* å¤ç¨ï¼æ¹æ ¼å®¹å¨æ ·å¼ï¼ä¸PPä»ä¸è´ï¼ */ |
| | | .column-grid-container { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | gap: 2px; |
| | | position: relative; |
| | | z-index: 2; |
| | | margin-bottom: 10px; |
| | | padding: 0 2px; |
| | | } |
| | | |
| | | /* å¤ç¨ï¼æ¹æ ¼æ ·å¼ï¼ä¸PPä»ä¸è´ï¼ */ |
| | | .column-grid-item { |
| | | flex: 1; |
| | | min-width: 24px; |
| | | max-width: 60px; |
| | | height: 30px; |
| | | border: 1px solid #fff; |
| | | border-radius: 8px 8px 0 0; |
| | | color: white; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: clamp(8px, 1vw, 14px); |
| | | box-sizing: border-box; |
| | | transition: background-color 0.3s ease; |
| | | } |
| | | |
| | | /* å¤ç¨ï¼å½ååé«äº®æ ·å¼ */ |
| | | .column-grid-item.active { |
| | | background-color: green; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* å¤ç¨ï¼å¼å¸¸ç¶æä¸å½åå红è²é«äº® */ |
| | | .pp-status-abnormal .column-grid-item.active { |
| | | background-color: red !important; |
| | | } |
| | | </style> |
| | |
| | | <div class="xname">æçç±»å:</div> |
| | | <div class="xzhi" :title="gmData.R_GM_TrayType">{{ gmData.R_GM_TrayType || '-' }}</div> |
| | | </div> |
| | | <!-- æ°å¢ï¼å½ååç¶ææ¾ç¤º --> |
| | | <div class="zhankuang"> |
| | | <div class="xname">å½åæå¨å:</div> |
| | | <div class="xzhi" :title="gmData.R_GM_Column">{{ gmData.R_GM_Column || 'æªç¥' }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- GMå
³èç«å°ï¼å
¥åº7003ï¼ --> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼å åæºå½ååæåæ¾ç¤º --> |
| | | <div id="gm-nowcolumn" :class="{ 'abnormal-column': gmData.R_GM_Status !== 'æ£å¸¸' }"> |
| | | <div>å¹²èå åæºå½åæå¨å: |
| | | <span :title="gmData.R_GM_Column">{{ gmData.R_GM_Column || 'æªç¥' }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼åæ¹æ ¼å±ç¤ºåºå --> |
| | | <div class="gm-column-container" :class="{ 'pp-status-abnormal': gmData.R_GM_Status !== 'æ£å¸¸' }"> |
| | | <!-- 䏿¹1-24å --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="num in 20" |
| | | :key="num" |
| | | class="column-grid-item" |
| | | :class="{ 'active': num == gmData.R_GM_Column }" |
| | | :title="`åå·: ${num}`" |
| | | > |
| | | {{ num }} |
| | | </div> |
| | | </div> |
| | | <!-- 䏿¹25-47å (23个) --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="i in 19" |
| | | :key="'gm-lower-' + i" |
| | | class="column-grid-item" |
| | | :class="{ 'active': (20 + i) == gmData.R_GM_Column }" |
| | | :title="`åå·: ${20 + i}`" |
| | | > |
| | | {{ 20 + i }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | setup() { |
| | | const store = useStore(); |
| | | // ä»
åå¨GMæ°æ®ï¼ä¸å
¶ä»ä»æ°æ®é离 |
| | | const gmData = ref({}); |
| | | |
| | | // å»¶è¿æ´æ°é
ç½®ï¼è§£å³éªçé®é¢ |
| | | const UPDATE_DELAY = 300; // 300mså»¶è¿ï¼å¹³è¡¡å®æ¶æ§åçé¢ç¨³å®æ§ |
| | | let updateTimer = null; // 宿¶å¨å®ä¾ |
| | | const UPDATE_DELAY = 300; |
| | | let updateTimer = null; |
| | | |
| | | // GMæ°æ®æ å°è§åé
ç½®ï¼æåè½åç»ï¼ |
| | | // GMæ°æ®æ å°è§åï¼æ°å¢åå·å¤çï¼ |
| | | const gmStatusConfig = { |
| | | coreStatus: { |
| | | R_GM_Status: { 1: "æ£å¸¸", 2: "æ
é", 3: "æ¥å" }, |
| | | R_GM_Status: { 0: "æ£å¸¸", 1: "æ
é", 2: "æ¥å", 3: "æªç¥" }, |
| | | R_GM_AutoStatus: { 0: "ç»´ä¿®", 1: "æå¨", 2: "åèªå¨", 3: "èªå¨" }, |
| | | R_GM_WorkStatus: { 0: "å¾
æº", 1: "åè´§ä¸", 2: "åè´§å®æ", 4: "æ¾è´§ä¸", 5: "æ¾è´§å®æ", 6: "ä»»å¡å®æ" }, |
| | | R_GM_WorkType: { 0: "æ ä½ä¸ä»»å¡(0)", 1: "åæ¾è´§ä½ä¸(1)", 2: "åªåè´§ä½ä¸(2)", 3: "åªæ¾è´§ä½ä¸(3)", 4: "ç§»å¨å°æå®ä½ç½®" }, |
| | | R_GM_TrayType: { "-1": "空箱(-1)", 1: "å°æç(1)", 2: "䏿ç(2)", 3: "大æç(3)", 4: "ç¹å¤§æç(4)" } |
| | | R_GM_TrayType: { "-1": "空箱(-1)", 1: "å°æç(1)", 2: "䏿ç(2)", 3: "大æç(3)", 4: "ç¹å¤§æç(4)" }, |
| | | // æ°å¢ï¼åå·æ å°å¤ç |
| | | R_GM_Column: (val) => val !== undefined ? val : "æªç¥" |
| | | }, |
| | | onlineStatus: { |
| | | keys: ["R_GM_Online3", "R_GM_Online4", "R_GM_Online5"], |
| | |
| | | } |
| | | }; |
| | | |
| | | // å¤çGMåå§æ°æ® |
| | | // å¤çGMåå§æ°æ®ï¼å
å«åå·å¤çï¼ |
| | | const processGMData = (rawData) => { |
| | | if (!rawData) return {}; |
| | | const processed = { ...rawData }; |
| | | |
| | | // å¤çæ ¸å¿ç¶æå段 |
| | | Object.entries(gmStatusConfig.coreStatus).forEach(([key, map]) => { |
| | | Object.entries(gmStatusConfig.coreStatus).forEach(([key, handler]) => { |
| | | if (processed.hasOwnProperty(key)) { |
| | | processed[key] = map[processed[key]] || processed[key]; |
| | | // åå·å段使ç¨å½æ°å¤çï¼å
¶ä»ä½¿ç¨æ å°è¡¨ |
| | | processed[key] = typeof handler === 'function' |
| | | ? handler(processed[key]) |
| | | : (handler[processed[key]] || processed[key]); |
| | | } |
| | | }); |
| | | |
| | |
| | | return processed; |
| | | }; |
| | | |
| | | // å»¶è¿æ´æ°GMæ°æ®ï¼é¿å
é«é¢å·æ°å¯¼è´çéªç |
| | | const delayedUpdateGMData = (newRawData) => { |
| | | if (updateTimer) clearTimeout(updateTimer); |
| | | |
| | | updateTimer = setTimeout(() => { |
| | | // ä»
å¤çå
å«GMç¹å¾åæ®µçæ°æ® |
| | | if (newRawData && newRawData.R_GM_Status !== undefined) { |
| | | gmData.value = processGMData(newRawData); |
| | | |
| | | // æ´æ°æ ·å¼ |
| | | nextTick(() => { |
| | | const valueElements = document.getElementsByClassName("xzhi"); |
| | | for (let i = 0; i < valueElements.length; i++) { |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // åå§å è½½æ°æ® |
| | | const initialData = store.state.homedata; |
| | | if (initialData && initialData.R_GM_Status !== undefined) { |
| | | gmData.value = processGMData(initialData); |
| | | } |
| | | |
| | | // ç嬿°æ®ååï¼åªå¤çGMæ°æ® |
| | | const unwatch = watch( |
| | | () => store.state.homedata, |
| | | (newData) => { |
| | |
| | | { deep: true } |
| | | ); |
| | | |
| | | // ç»ä»¶å¸è½½æ¶æ¸
çèµæº |
| | | onUnmounted(() => { |
| | | unwatch(); |
| | | if (updateTimer) clearTimeout(updateTimer); |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* åææ ·å¼ä¿æä¸å */ |
| | | .ding { |
| | | float: left; |
| | | width: 20px; |
| | |
| | | margin-left: 1.7%; |
| | | border-radius: 10px; |
| | | } |
| | | </style> |
| | | |
| | | |
| | | /* æ°å¢ï¼GMå åæºå½ååæ ·å¼ */ |
| | | #gm-nowcolumn { |
| | | width: 100%; |
| | | height: 70px; |
| | | float: left; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 1.5cqw; |
| | | font-weight: bold; |
| | | color: #00ff4c; |
| | | } |
| | | |
| | | /* å¼å¸¸ç¶ææååè² */ |
| | | #gm-nowcolumn.abnormal-column { |
| | | color: red !important; |
| | | } |
| | | #gm-nowcolumn.abnormal-column span { |
| | | color: red !important; |
| | | } |
| | | |
| | | /* å容卿 ·å¼ */ |
| | | .gm-column-container { |
| | | width: 95%; |
| | | margin: 0 auto; |
| | | position: relative; |
| | | clear: both; |
| | | padding-top: 15px; |
| | | } |
| | | |
| | | /* æ¹æ ¼å®¹å¨æ ·å¼ */ |
| | | .column-grid-container { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | gap: 2px; |
| | | position: relative; |
| | | z-index: 2; |
| | | margin-bottom: 10px; |
| | | padding: 0 2px; |
| | | } |
| | | |
| | | /* æ¹æ ¼æ ·å¼ */ |
| | | .column-grid-item { |
| | | flex: 1; |
| | | min-width: 24px; |
| | | max-width: 60px; |
| | | height: 30px; |
| | | border: 1px solid #fff; |
| | | border-radius: 8px 8px 0 0; |
| | | color: white; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: clamp(8px, 1vw, 14px); |
| | | box-sizing: border-box; |
| | | transition: background-color 0.3s ease; |
| | | } |
| | | |
| | | /* å½ååé«äº® */ |
| | | .column-grid-item.active { |
| | | background-color: green; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* å¼å¸¸ç¶æä¸å½åå红è²é«äº® */ |
| | | .pp-status-abnormal .column-grid-item.active { |
| | | background-color: red !important; |
| | | } |
| | | </style> |
| | |
| | | <div class="xname">æçç±»å:</div> |
| | | <div class="xzhi" :title="ymData.R_YM_TrayType">{{ ymData.R_YM_TrayType || '-' }}</div> |
| | | </div> |
| | | <!-- æ°å¢ï¼å½åæå¨åæ¾ç¤º --> |
| | | <div class="zhankuang"> |
| | | <div class="xname">å½åæå¨å:</div> |
| | | <div class="xzhi" :title="ymData.R_YM_Column">{{ ymData.R_YM_Column || 'æªç¥' }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- YMå
³èç«å°ï¼åºå
¥åº9001ï¼ --> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼å åæºå½ååæåæ¾ç¤º --> |
| | | <div id="ym-nowcolumn" :class="{ 'abnormal-column': ymData.R_YM_Status !== 'æ£å¸¸' }"> |
| | | <div>油墨å åæºå½åæå¨å: |
| | | <span :title="ymData.R_YM_Column">{{ ymData.R_YM_Column || 'æªç¥' }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼åæ¹æ ¼å±ç¤ºåºå --> |
| | | <div class="ym-column-container" :class="{ 'pp-status-abnormal': ymData.R_YM_Status !== 'æ£å¸¸' }"> |
| | | <!-- 䏿¹1-24å --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="num in 32" |
| | | :key="num" |
| | | class="column-grid-item" |
| | | :class="{ 'active': num == ymData.R_YM_Column }" |
| | | :title="`åå·: ${num}`" |
| | | > |
| | | {{ num }} |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | setup() { |
| | | const store = useStore(); |
| | | // ä»
åå¨YMæ°æ®ï¼ä¸å
¶ä»æ°æ®é离 |
| | | const ymData = ref({}); |
| | | |
| | | // å»¶è¿æ´æ°é
ç½®ï¼è§£å³éªçé®é¢ |
| | | const UPDATE_DELAY = 300; // å»¶è¿300msæ´æ°UI |
| | | let updateTimer = null; // 宿¶å¨å®ä¾ |
| | | const UPDATE_DELAY = 300; |
| | | let updateTimer = null; |
| | | |
| | | // YMæ°æ®æ å°è§å |
| | | // YMæ°æ®æ å°è§åï¼æ°å¢åå·å¤çï¼ |
| | | const ymStatusMap = { |
| | | R_YM_Status: { |
| | | 1: "æ£å¸¸", |
| | | 2: "æ
é", |
| | | 3: "æ¥å", |
| | | 0: "æ£å¸¸", |
| | | 1: "æ
é", |
| | | 2: "æ¥å", |
| | | 3: "æªç¥" |
| | | }, |
| | | R_YM_AutoStatus: { |
| | | 0: "ç»´ä¿®", |
| | |
| | | 2: "䏿ç(2)", |
| | | 3: "大æç(3)", |
| | | 4: "ç¹å¤§æç(4)", |
| | | } |
| | | }, |
| | | // æ°å¢ï¼åå·æ å°å¤ç |
| | | R_YM_Column: (val) => val !== undefined ? val : "æªç¥" |
| | | }; |
| | | |
| | | // YMåæ®µåç» |
| | |
| | | } |
| | | }; |
| | | |
| | | // å¤çYMåå§æ°æ® |
| | | // å¤çYMåå§æ°æ®ï¼å
å«åå·å¤çï¼ |
| | | const processYMData = (rawData) => { |
| | | if (!rawData) return {}; |
| | | const processedData = { ...rawData }; |
| | |
| | | // å¤çæ ¸å¿ç¶æå段 |
| | | Object.keys(ymStatusMap).forEach(key => { |
| | | if (processedData.hasOwnProperty(key)) { |
| | | processedData[key] = ymStatusMap[key][processedData[key]] || processedData[key]; |
| | | const mapper = ymStatusMap[key]; |
| | | processedData[key] = typeof mapper === 'function' |
| | | ? mapper(processedData[key]) |
| | | : (mapper[processedData[key]] || processedData[key]); |
| | | } |
| | | }); |
| | | |
| | |
| | | return processedData; |
| | | }; |
| | | |
| | | // å»¶è¿æ´æ°YMæ°æ®ï¼é¿å
é«é¢å·æ° |
| | | // å»¶è¿æ´æ°YMæ°æ® |
| | | const delayedUpdateYMData = (newRawData) => { |
| | | if (updateTimer) { |
| | | clearTimeout(updateTimer); |
| | | } |
| | | |
| | | updateTimer = setTimeout(() => { |
| | | // åªå¤çå
å«YMç¹å¾åæ®µçæ°æ® |
| | | if (newRawData && newRawData.R_YM_Status !== undefined) { |
| | | ymData.value = processYMData(newRawData); |
| | | |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // åå§å è½½æ°æ® |
| | | const initialData = store.state.homedata; |
| | | if (initialData && initialData.R_YM_Status !== undefined) { |
| | | ymData.value = processYMData(initialData); |
| | | } |
| | | |
| | | // ç嬿°æ®ååï¼åªå¤çYMæ°æ® |
| | | const unwatch = watch( |
| | | () => store.state.homedata, |
| | | (newData) => { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* åææ ·å¼ä¿æä¸å */ |
| | | .ding { |
| | | float: left; |
| | | width: 20px; |
| | |
| | | margin-left: 1.7%; |
| | | border-radius: 10px; |
| | | } |
| | | </style> |
| | | |
| | | /* æ°å¢ï¼YMå åæºå½ååæ ·å¼ */ |
| | | #ym-nowcolumn { |
| | | width: 100%; |
| | | height: 70px; |
| | | float: left; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 1.5cqw; |
| | | font-weight: bold; |
| | | color: #00ff4c; |
| | | } |
| | | |
| | | /* å¼å¸¸ç¶ææååè² */ |
| | | #ym-nowcolumn.abnormal-column { |
| | | color: red !important; |
| | | } |
| | | #ym-nowcolumn.abnormal-column span { |
| | | color: red !important; |
| | | } |
| | | |
| | | /* å容卿 ·å¼ */ |
| | | .ym-column-container { |
| | | width: 95%; |
| | | margin: 0 auto; |
| | | position: relative; |
| | | clear: both; |
| | | padding-top: 15px; |
| | | } |
| | | |
| | | /* æ¹æ ¼å®¹å¨æ ·å¼ */ |
| | | .column-grid-container { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | gap: 2px; |
| | | position: relative; |
| | | z-index: 2; |
| | | margin-bottom: 10px; |
| | | padding: 0 2px; |
| | | } |
| | | |
| | | /* æ¹æ ¼æ ·å¼ */ |
| | | .column-grid-item { |
| | | flex: 1; |
| | | min-width: 24px; |
| | | max-width: 60px; |
| | | height: 30px; |
| | | border: 1px solid #fff; |
| | | border-radius: 8px 8px 0 0; |
| | | color: white; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: clamp(8px, 1vw, 14px); |
| | | box-sizing: border-box; |
| | | transition: background-color 0.3s ease; |
| | | } |
| | | |
| | | /* å½ååé«äº® */ |
| | | .column-grid-item.active { |
| | | background-color: green; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* å¼å¸¸ç¶æä¸å½åå红è²é«äº® */ |
| | | .pp-status-abnormal .column-grid-item.active { |
| | | background-color: red !important; |
| | | } |
| | | </style> |
| | |
| | | <!-- PPä»å åæºç¶æé¢æ¿ --> |
| | | <div class="skuang"> |
| | | <div class="zhuname">PPä»å åæº</div> |
| | | |
| | | <div class="zhankuang"> |
| | | <div class="xname">å åæºç¶æ:</div> |
| | | <div class="xzhi" :title="ppData.R_PP_Status">{{ ppData.R_PP_Status }}</div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="nowcolumn" :class="{ 'abnormal-column': ppData.R_PP_Status !== 'æ£å¸¸' }"> |
| | | <div>PPå åæºå½åæå¨å: |
| | | <span :title="ppData.R_PP_Column">{{ ppData.R_PP_Column || 'æªç¥' }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="column-container" :class="{ 'pp-status-abnormal': ppData.R_PP_Status !== 'æ£å¸¸' }"> |
| | | <!-- 䏿¹1-24å --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="num in 24" |
| | | :key="num" |
| | | class="column-grid-item" |
| | | :class="{ 'active': num == ppData.R_PP_Column }" |
| | | :title="`åå·: ${num}`" |
| | | > |
| | | {{ num }} |
| | | </div> |
| | | </div> |
| | | <!-- 䏿¹25-47å (23个) --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="i in 23" |
| | | :key="'lower-' + i" |
| | | class="column-grid-item" |
| | | :class="{ 'active': (24 + i) == ppData.R_PP_Column }" |
| | | :title="`åå·: ${24 + i}`" |
| | | > |
| | | {{ 24 + i }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | setup() { |
| | | const store = useStore(); |
| | | // ä»
åå¨PPæ°æ®ï¼é¿å
ä¸ZHæ°æ®æ··æ· |
| | | const ppData = ref({}); |
| | | |
| | | // å»¶è¿æ´æ°é
ç½®ï¼è§£å³é«é¢å·æ°å¯¼è´çéªç |
| | | const UPDATE_DELAY = 300; // å»¶è¿300msæ´æ°UI |
| | | let updateTimer = null; // 宿¶å¨å®ä¾ |
| | | // å»¶è¿æ´æ°é
ç½® |
| | | const UPDATE_DELAY = 300; |
| | | let updateTimer = null; |
| | | |
| | | // PPæ°æ®æ å°è§åï¼ä»
å¤çPPç¸å
³åæ®µï¼ |
| | | // PPæ°æ®æ å°è§å |
| | | const statusMap = { |
| | | R_PP_Status: { |
| | | 1: "æ£å¸¸", |
| | | 2: "æ
é", |
| | | 3: "æ¥å", |
| | | 0: "æ£å¸¸", |
| | | 1: "æ
é", |
| | | 2: "æ¥å", |
| | | 3: "æªç¥" |
| | | }, |
| | | R_PP_AutoStatus: { |
| | | 0: "ç»´ä¿®", |
| | |
| | | 2: "䏿ç(2)", |
| | | 3: "大æç(3)", |
| | | 4: "ç¹å¤§æç(4)", |
| | | } |
| | | }, |
| | | R_PP_Column: (val) => val !== undefined ? val : "æªç¥" |
| | | }; |
| | | |
| | | // PPç¸å
³å¸å°å段åç» |
| | |
| | | // å¤çPPåå§æ°æ® |
| | | const processPPData = (rawData) => { |
| | | if (!rawData) return {}; |
| | | |
| | | // å¤å¶åå§æ°æ®ï¼é¿å
ç´æ¥ä¿®æ¹ |
| | | const processed = { ...rawData }; |
| | | |
| | | // å¤çç¶æåæ®µæ å° |
| | | Object.keys(statusMap).forEach(key => { |
| | | if (processed.hasOwnProperty(key)) { |
| | | processed[key] = statusMap[key][processed[key]] || processed[key]; |
| | | const mapper = statusMap[key]; |
| | | processed[key] = typeof mapper === 'function' |
| | | ? mapper(processed[key]) |
| | | : (mapper[processed[key]] || processed[key]); |
| | | } |
| | | }); |
| | | |
| | |
| | | return processed; |
| | | }; |
| | | |
| | | // å»¶è¿æ´æ°PPæ°æ®ï¼é¿å
é«é¢å·æ° |
| | | // å»¶è¿æ´æ°PPæ°æ® |
| | | const delayedUpdatePPData = (newRawData) => { |
| | | // æ¸
é¤ä¹åç宿¶å¨ï¼ç¡®ä¿åªæ§è¡æå䏿¬¡æ´æ° |
| | | if (updateTimer) { |
| | | clearTimeout(updateTimer); |
| | | } |
| | | |
| | | // å»¶è¿æå®æ¶é´åæ´æ°æ°æ® |
| | | if (updateTimer) clearTimeout(updateTimer); |
| | | updateTimer = setTimeout(() => { |
| | | // åªå¤çå
å«PPç¹å¾åæ®µçæ°æ® |
| | | if (newRawData && newRawData.R_PP_Status !== undefined) { |
| | | ppData.value = processPPData(newRawData); |
| | | |
| | | // æ´æ°æ ·å¼ |
| | | nextTick(() => { |
| | | const valueElements = document.getElementsByClassName("xzhi"); |
| | | for (let i = 0; i < valueElements.length; i++) { |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // åå§å è½½æ°æ® |
| | | const initialData = store.state.homedata; |
| | | if (initialData && initialData.R_PP_Status !== undefined) { |
| | | ppData.value = processPPData(initialData); |
| | | } |
| | | |
| | | // ç嬿°æ®ååï¼åªå¤çPPæ°æ® |
| | | |
| | | const unwatch = watch( |
| | | () => store.state.homedata, |
| | | (newData) => { |
| | | // ä»
彿°æ®å
å«PPç¹å¾åæ®µæ¶ææ´æ° |
| | | if (newData && newData.R_PP_Status !== undefined) { |
| | | delayedUpdatePPData(newData); |
| | | } |
| | | }, |
| | | { deep: true } // 深度çå¬å¯¹è±¡å
é¨åå |
| | | { deep: true } |
| | | ); |
| | | |
| | | // ç»ä»¶å¸è½½æ¶æ¸
çèµæº |
| | | onUnmounted(() => { |
| | | unwatch(); |
| | | if (updateTimer) { |
| | | clearTimeout(updateTimer); |
| | | } |
| | | if (updateTimer) clearTimeout(updateTimer); |
| | | }); |
| | | }); |
| | | |
| | |
| | | background: rgba(255, 255, 255, 0.2); |
| | | margin-left: 1.7%; |
| | | border-radius: 10px; |
| | | padding-bottom: 20px; |
| | | } |
| | | </style> |
| | | |
| | | |
| | | /* å åæºå½ååæ ·å¼ */ |
| | | #nowcolumn { |
| | | width: 100%; |
| | | height: 70px; |
| | | float: left; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 1.5cqw; |
| | | font-weight: bold; |
| | | color: #00ff4c; |
| | | } |
| | | |
| | | /* å åæºç¶æå¼å¸¸æ¶ï¼å½ååæååä¸ºçº¢è² */ |
| | | #nowcolumn.abnormal-column { |
| | | color: red !important; |
| | | } |
| | | #nowcolumn.abnormal-column span { |
| | | color: red !important; |
| | | } |
| | | |
| | | /* åå®¹å¨ */ |
| | | .column-container { |
| | | width: 95%; |
| | | margin: 0 auto; |
| | | position: relative; |
| | | clear: both; |
| | | padding-top: 15px; |
| | | } |
| | | |
| | | /* èè²åå²çº¿ */ |
| | | .column-separator { |
| | | width: 100%; |
| | | height: 20px; |
| | | background-color: #3bc0ed; |
| | | position: absolute; |
| | | top: 0; /* è°æ´å°æ¹æ ¼é¡¶é¨å¯¹é½ */ |
| | | left: 0; |
| | | z-index: 1; /* ç¡®ä¿å¨æ¹æ ¼ä¸æ¹ */ |
| | | border-radius: 4px 4px 0 0; |
| | | } |
| | | |
| | | .column-grid-container { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: nowrap; /* ç¦æ¢æ¢è¡ */ |
| | | justify-content: space-between; /* åååå¸ */ |
| | | align-items: center; |
| | | gap: 2px; /* æ¹æ ¼ä¹é´çé´è· */ |
| | | position: relative; |
| | | z-index: 2; |
| | | margin-bottom: 10px; |
| | | padding: 0 2px; /* é¿å
è¾¹ç¼æ¹æ ¼è´´è¾¹ */ |
| | | } |
| | | |
| | | /* åæ¹æ ¼æ ·å¼ - å
³é®ä¿®æ¹ */ |
| | | .column-grid-item { |
| | | flex: 1; /* æ ¸å¿ï¼æ¯ä¸ªæ¹æ ¼å¹³ååé
å©ä½ç©ºé´ */ |
| | | min-width: 24px; /* æå°å®½åº¦ï¼é¿å
è¿å°ï¼ */ |
| | | max-width: 60px; /* æå¤§å®½åº¦ï¼é¿å
è¿å¤§ï¼ */ |
| | | height: 30px; |
| | | border: 1px solid #fff; |
| | | border-radius:8px 8px 0 0; |
| | | color: white; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: clamp(8px, 1vw, 14px); /* èªéåºåä½ */ |
| | | box-sizing: border-box; |
| | | transition: background-color 0.3s ease; |
| | | } |
| | | |
| | | /* å½ååé«äº®ï¼æ£å¸¸ç¶æï¼ */ |
| | | .column-grid-item.active { |
| | | background-color: green; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* å åæºç¶æå¼å¸¸æ¶ï¼å½ååé«äº®ä¸ºçº¢è² */ |
| | | .pp-status-abnormal .column-grid-item.active { |
| | | background-color: red !important; |
| | | } |
| | | </style> |
| | |
| | | <div class="xname">æçç±»å:</div> |
| | | <div class="xzhi" :title="zhData.R_ZH_TrayType">{{ zhData.R_ZH_TrayType || '-' }}</div> |
| | | </div> |
| | | <!-- æ°å¢ï¼å½åæå¨åæ¾ç¤º --> |
| | | <div class="zhankuang"> |
| | | <div class="xname">å½åæå¨å:</div> |
| | | <div class="xzhi" :title="zhData.R_ZH_Column">{{ zhData.R_ZH_Column || 'æªç¥' }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- ZHå
³èç«å°ï¼å
¥åº301+å
¥åº302ï¼ --> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼å åæºå½ååæåæ¾ç¤º --> |
| | | <div id="zh-nowcolumn" :class="{ 'abnormal-column': zhData.R_ZH_Status !== 'æ£å¸¸' }"> |
| | | <div>é»çå åæºå½åæå¨å: |
| | | <span :title="zhData.R_ZH_Column">{{ zhData.R_ZH_Column || 'æªç¥' }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼åæ¹æ ¼å±ç¤ºåºå --> |
| | | <div class="zh-column-container" :class="{ 'pp-status-abnormal': zhData.R_ZH_Status !== 'æ£å¸¸' }"> |
| | | <!-- 䏿¹1-24å --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="num in 28" |
| | | :key="num" |
| | | class="column-grid-item" |
| | | :class="{ 'active': num == zhData.R_ZH_Column }" |
| | | :title="`åå·: ${num}`" |
| | | > |
| | | {{ num }} |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | setup() { |
| | | const store = useStore(); |
| | | // ä»
åå¨ZHæ°æ®ï¼ä¸å
¶ä»æ°æ®é离 |
| | | const zhData = ref({}); |
| | | |
| | | // å»¶è¿æ´æ°é
ç½®ï¼è§£å³éªçé®é¢ |
| | | const UPDATE_DELAY = 300; // å»¶è¿300msæ´æ°UI |
| | | let updateTimer = null; // 宿¶å¨å®ä¾ |
| | | const UPDATE_DELAY = 300; |
| | | let updateTimer = null; |
| | | |
| | | // ZHæ°æ®æ å°è§å |
| | | // ZHæ°æ®æ å°è§åï¼æ°å¢åå·å¤çï¼ |
| | | const zhStatusMap = { |
| | | R_ZH_Status: { |
| | | 1: "æ£å¸¸", |
| | | 2: "æ
é", |
| | | 3: "æ¥å", |
| | | 0: "æ£å¸¸", |
| | | 1: "æ
é", |
| | | 2: "æ¥å", |
| | | 3: "æªç¥" |
| | | }, |
| | | R_ZH_AutoStatus: { |
| | | 0: "ç»´ä¿®", |
| | |
| | | 2: "䏿ç(2)", |
| | | 3: "大æç(3)", |
| | | 4: "ç¹å¤§æç(4)", |
| | | } |
| | | }, |
| | | // æ°å¢ï¼åå·æ å°å¤ç |
| | | R_ZH_Column: (val) => val !== undefined ? val : "æªç¥" |
| | | }; |
| | | |
| | | // ZHåæ®µåç» |
| | |
| | | } |
| | | }; |
| | | |
| | | // å¤çZHåå§æ°æ® |
| | | // å¤çZHåå§æ°æ®ï¼å
å«åå·å¤çï¼ |
| | | const processZHData = (rawData) => { |
| | | if (!rawData) return {}; |
| | | const processedData = { ...rawData }; |
| | |
| | | // å¤çæ ¸å¿ç¶æå段 |
| | | Object.keys(zhStatusMap).forEach(key => { |
| | | if (processedData.hasOwnProperty(key)) { |
| | | processedData[key] = zhStatusMap[key][processedData[key]] || processedData[key]; |
| | | const mapper = zhStatusMap[key]; |
| | | processedData[key] = typeof mapper === 'function' |
| | | ? mapper(processedData[key]) |
| | | : (mapper[processedData[key]] || processedData[key]); |
| | | } |
| | | }); |
| | | |
| | |
| | | return processedData; |
| | | }; |
| | | |
| | | // å»¶è¿æ´æ°ZHæ°æ®ï¼é¿å
é«é¢å·æ° |
| | | // å»¶è¿æ´æ°ZHæ°æ® |
| | | const delayedUpdateZHData = (newRawData) => { |
| | | if (updateTimer) { |
| | | clearTimeout(updateTimer); |
| | | } |
| | | |
| | | updateTimer = setTimeout(() => { |
| | | // åªå¤çå
å«ZHç¹å¾åæ®µçæ°æ® |
| | | if (newRawData && newRawData.R_ZH_Status !== undefined) { |
| | | zhData.value = processZHData(newRawData); |
| | | |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // åå§å è½½æ°æ® |
| | | const initialData = store.state.homedata; |
| | | if (initialData && initialData.R_ZH_Status !== undefined) { |
| | | zhData.value = processZHData(initialData); |
| | | } |
| | | |
| | | // ç嬿°æ®ååï¼åªå¤çZHæ°æ® |
| | | const unwatch = watch( |
| | | () => store.state.homedata, |
| | | (newData) => { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* åææ ·å¼ä¿æä¸å */ |
| | | .ding { |
| | | float: left; |
| | | width: 20px; |
| | |
| | | margin-left: 1.7%; |
| | | border-radius: 10px; |
| | | } |
| | | </style> |
| | | |
| | | /* æ°å¢ï¼ZHå åæºå½ååæ ·å¼ */ |
| | | #zh-nowcolumn { |
| | | width: 100%; |
| | | height: 70px; |
| | | float: left; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 1.5cqw; |
| | | font-weight: bold; |
| | | color: #00ff4c; |
| | | } |
| | | |
| | | /* å¼å¸¸ç¶ææååè² */ |
| | | #zh-nowcolumn.abnormal-column { |
| | | color: red !important; |
| | | } |
| | | #zh-nowcolumn.abnormal-column span { |
| | | color: red !important; |
| | | } |
| | | |
| | | /* å容卿 ·å¼ */ |
| | | .zh-column-container { |
| | | width: 95%; |
| | | margin: 0 auto; |
| | | position: relative; |
| | | clear: both; |
| | | padding-top: 15px; |
| | | } |
| | | |
| | | /* æ¹æ ¼å®¹å¨æ ·å¼ */ |
| | | .column-grid-container { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | gap: 2px; |
| | | position: relative; |
| | | z-index: 2; |
| | | margin-bottom: 10px; |
| | | padding: 0 2px; |
| | | } |
| | | |
| | | /* æ¹æ ¼æ ·å¼ */ |
| | | .column-grid-item { |
| | | flex: 1; |
| | | min-width: 24px; |
| | | max-width: 60px; |
| | | height: 30px; |
| | | border: 1px solid #fff; |
| | | border-radius: 8px 8px 0 0; |
| | | color: white; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: clamp(8px, 1vw, 14px); |
| | | box-sizing: border-box; |
| | | transition: background-color 0.3s ease; |
| | | } |
| | | |
| | | /* å½ååé«äº® */ |
| | | .column-grid-item.active { |
| | | background-color: green; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* å¼å¸¸ç¶æä¸å½åå红è²é«äº® */ |
| | | .pp-status-abnormal .column-grid-item.active { |
| | | background-color: red !important; |
| | | } |
| | | </style> |
| | |
| | | <div class="skuang"> |
| | | <div class="csjuname">æµè¯æ¶ä»å åæº</div> |
| | | <div class="csjankuang"> |
| | | <div class="xname">å åæºç¶æ:</div> |
| | | <div class="xname">å å åæºç¶æ: |
| | | </div> |
| | | <div class="xcsji" :title="csjData.R_CSJ_Status">{{ csjData.R_CSJ_Status || '-' }}</div> |
| | | </div> |
| | | <div class="csjankuang"> |
| | |
| | | <div class="csjankuang"> |
| | | <div class="xname">æçç±»å:</div> |
| | | <div class="xcsji" :title="csjData.R_CSJ_TrayType">{{ csjData.R_CSJ_TrayType || '-' }}</div> |
| | | </div> |
| | | <!-- æ°å¢ï¼å½åæå¨åæ¾ç¤º --> |
| | | <div class="csjankuang"> |
| | | <div class="xname">å½åæå¨å:</div> |
| | | <div class="xcsji" :title="csjData.R_CSJ_Column">{{ csjData.R_CSJ_Column || 'æªç¥' }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼å åæºå½ååæåæ¾ç¤º --> |
| | | <div id="csj-nowcolumn" :class="{ 'abnormal-column': csjData.R_CSJ_Status !== 'æ£å¸¸' }"> |
| | | <div>æµè¯æ¶å åæºå½åæå¨å: |
| | | <span :title="csjData.R_CSJ_Column">{{ csjData.R_CSJ_Column || 'æªç¥' }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æ°å¢ï¼åæ¹æ ¼å±ç¤ºåºå --> |
| | | <div class="csj-column-container" :class="{ 'pp-status-abnormal': csjData.R_CSJ_Status !== 'æ£å¸¸' }"> |
| | | <!-- 䏿¹1-24å --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="num in 20" |
| | | :key="num" |
| | | class="column-grid-item" |
| | | :class="{ 'active': num == csjData.R_CSJ_Column }" |
| | | :title="`åå·: ${num}`" |
| | | > |
| | | {{ num }} |
| | | </div> |
| | | </div> |
| | | <!-- 䏿¹25-47å (23个) --> |
| | | <div class="column-grid-container"> |
| | | <div |
| | | v-for="i in 23" |
| | | :key="'csj-lower-' + i" |
| | | class="column-grid-item" |
| | | :class="{ 'active': (20 + i) == csjData.R_CSJ_Column }" |
| | | :title="`åå·: ${20 + i}`" |
| | | > |
| | | {{ 20 + i }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | setup() { |
| | | const store = useStore(); |
| | | // ä»
åå¨CSJæ°æ®ï¼ä¸å
¶ä»æ°æ®é离 |
| | | const csjData = ref({}); |
| | | |
| | | // å»¶è¿æ´æ°é
ç½®ï¼è§£å³éªçé®é¢ |
| | | const UPDATE_DELAY = 300; // å»¶è¿300msæ´æ°UI |
| | | let updateTimer = null; // 宿¶å¨å®ä¾ |
| | | const UPDATE_DELAY = 300; |
| | | let updateTimer = null; |
| | | |
| | | // CSJæ°æ®æ å°è§å |
| | | // CSJæ°æ®æ å°è§åï¼æ°å¢åå·å¤çï¼ |
| | | const csjStatusMap = { |
| | | R_CSJ_Status: { |
| | | 1: "æ£å¸¸", |
| | | 2: "æ
é", |
| | | 3: "æ¥å", |
| | | 0: "æ£å¸¸", |
| | | 1: "æ
é", |
| | | 2: "æ¥å", |
| | | 3: "æªç¥" |
| | | }, |
| | | R_CSJ_AutoStatus: { |
| | | 0: "ç»´ä¿®", |
| | |
| | | 2: "䏿ç(2)", |
| | | 3: "大æç(3)", |
| | | 4: "ç¹å¤§æç(4)", |
| | | } |
| | | }, |
| | | // æ°å¢ï¼åå·æ å°å¤ç |
| | | R_CSJ_Column: (val) => val !== undefined ? val : "æªç¥" |
| | | }; |
| | | |
| | | // CSJåæ®µåç» |
| | |
| | | } |
| | | }; |
| | | |
| | | // å¤çCSJåå§æ°æ® |
| | | // å¤çCSJåå§æ°æ®ï¼å
å«åå·å¤çï¼ |
| | | const processCSJData = (rawData) => { |
| | | if (!rawData) return {}; |
| | | const processedData = { ...rawData }; |
| | |
| | | // å¤çæ ¸å¿ç¶æå段 |
| | | Object.keys(csjStatusMap).forEach(key => { |
| | | if (processedData.hasOwnProperty(key)) { |
| | | processedData[key] = csjStatusMap[key][processedData[key]] || processedData[key]; |
| | | const mapper = csjStatusMap[key]; |
| | | processedData[key] = typeof mapper === 'function' |
| | | ? mapper(processedData[key]) |
| | | : (mapper[processedData[key]] || processedData[key]); |
| | | } |
| | | }); |
| | | |
| | |
| | | return processedData; |
| | | }; |
| | | |
| | | // å»¶è¿æ´æ°CSJæ°æ®ï¼é¿å
é«é¢å·æ° |
| | | // å»¶è¿æ´æ°CSJæ°æ® |
| | | const delayedUpdateCSJData = (newRawData) => { |
| | | if (updateTimer) { |
| | | clearTimeout(updateTimer); |
| | | } |
| | | |
| | | updateTimer = setTimeout(() => { |
| | | // åªå¤çå
å«CSJç¹å¾åæ®µçæ°æ® |
| | | if (newRawData && newRawData.R_CSJ_Status !== undefined) { |
| | | csjData.value = processCSJData(newRawData); |
| | | |
| | |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | // åå§å è½½æ°æ® |
| | | const initialData = store.state.homedata; |
| | | if (initialData && initialData.R_CSJ_Status !== undefined) { |
| | | csjData.value = processCSJData(initialData); |
| | | } |
| | | |
| | | // ç嬿°æ®ååï¼åªå¤çCSJæ°æ® |
| | | const unwatch = watch( |
| | | () => store.state.homedata, |
| | | (newData) => { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | /* åææ ·å¼ä¿æä¸å */ |
| | | .ding { |
| | | float: left; |
| | | width: 20px; |
| | |
| | | margin-left: 1.7%; |
| | | border-radius: 10px; |
| | | } |
| | | </style> |
| | | |
| | | /* æ°å¢ï¼CSJå åæºå½ååæ ·å¼ */ |
| | | #csj-nowcolumn { |
| | | width: 100%; |
| | | height: 70px; |
| | | float: left; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 1.5cqw; |
| | | font-weight: bold; |
| | | color: #00ff4c; |
| | | } |
| | | |
| | | /* å¼å¸¸ç¶ææååè² */ |
| | | #csj-nowcolumn.abnormal-column { |
| | | color: red !important; |
| | | } |
| | | #csj-nowcolumn.abnormal-column span { |
| | | color: red !important; |
| | | } |
| | | |
| | | /* å容卿 ·å¼ */ |
| | | .csj-column-container { |
| | | width: 95%; |
| | | margin: 0 auto; |
| | | position: relative; |
| | | clear: both; |
| | | padding-top: 15px; |
| | | } |
| | | |
| | | /* æ¹æ ¼å®¹å¨æ ·å¼ */ |
| | | .column-grid-container { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: nowrap; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | gap: 2px; |
| | | position: relative; |
| | | z-index: 2; |
| | | margin-bottom: 10px; |
| | | padding: 0 2px; |
| | | } |
| | | |
| | | /* æ¹æ ¼æ ·å¼ */ |
| | | .column-grid-item { |
| | | flex: 1; |
| | | min-width: 24px; |
| | | max-width: 60px; |
| | | height: 30px; |
| | | border: 1px solid #fff; |
| | | border-radius: 8px 8px 0 0; |
| | | color: white; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | font-size: clamp(8px, 1vw, 14px); |
| | | box-sizing: border-box; |
| | | transition: background-color 0.3s ease; |
| | | } |
| | | |
| | | /* å½ååé«äº® */ |
| | | .column-grid-item.active { |
| | | background-color: green; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* å¼å¸¸ç¶æä¸å½åå红è²é«äº® */ |
| | | .pp-status-abnormal .column-grid-item.active { |
| | | background-color: red !important; |
| | | } |
| | | </style> |
| | |
| | | { |
| | | return Service.RecWMSTaskHandCancel(taskNum); |
| | | } |
| | | |
| | | //è¾
æè¾é线任å¡éå |
| | | [HttpPost, HttpGet, Route("FLconverTaskResending"), AllowAnonymous] |
| | | public WebResponseContent FLconverTaskResending(int taskNum) |
| | | { |
| | | try |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == taskNum); |
| | | if (task == null) |
| | | { |
| | | return WebResponseContent.Instance.Error("æªæ¾å°è¯¥ä»»å¡ä¿¡æ¯"); |
| | | } |
| | | if (task.TaskState == TaskStatusEnum.Line_Executing.ObjToInt() && task.DeviceCode.Contains("FL")) |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.New); |
| | | } |
| | | else |
| | | { |
| | | return WebResponseContent.Instance.Error("éè¾é线æ§è¡ä¸ç¶ææéè¾
æä»ä»»å¡"); |
| | | } |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (conveyorLineSignalRead1.STB && conveyorLineStatus1.Online && conveyorLineStatus1.Goods && !conveyorLineStatus1.Alarm && !conveyorLineSignalWrite1.ACK) |
| | | { |
| | | StackerCraneJob_PP.pPReadData.R_PP_Boxcode = device.Communicator.Read<string>("DB900.578.0"); |
| | | StackerCraneJob_PP.pPReadData.R_PP_Boxcode = device.Communicator.Read<string>("DB900.528.0"); |
| | | } |
| | | StackerCraneJob_PP.pPReadData.R_PP_HandShake4 = conveyorLineStatus1.HandShake; |
| | | StackerCraneJob_PP.pPReadData.R_PP_Online4 = conveyorLineStatus1.Online; |
| | |
| | | /// æçç±»å |
| | | /// </summary> |
| | | public short R_PP_TrayType; |
| | | |
| | | /// <summary> |
| | | /// å½åå |
| | | /// </summary> |
| | | public short R_PP_Column; |
| | | |
| | | ///ç«å° |
| | | |
| | |
| | | pPReadData.R_PP_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt(); |
| | | pPReadData.R_PP_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType); |
| | | pPReadData.R_PP_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType); |
| | | pPReadData.R_PP_Column = commonStackerCrane.Communicator.Read<short>("DB11.42.0"); |
| | | string pPData = JsonConvert.SerializeObject(pPReadData); |
| | | _webSocketServer.PublishAllClientPayload(pPData); |
| | | } |
| | |
| | | if (item.StationCode == "7003") { |
| | | if (conveyorLineSignalRead1.STB && conveyorLineStatus1.Online && conveyorLineStatus1.Goods && !conveyorLineStatus1.Alarm && !conveyorLineSignalWrite1.ACK) |
| | | { |
| | | StackerCraneJob_GM.gMReadData.R_GM_Boxcode = device.Communicator.Read<string>("DB900.478.0"); |
| | | StackerCraneJob_GM.gMReadData.R_GM_Boxcode = device.Communicator.Read<string>("DB900.438.0"); |
| | | } |
| | | StackerCraneJob_GM.gMReadData.R_GM_HandShake3 = conveyorLineStatus1.HandShake; |
| | | StackerCraneJob_GM.gMReadData.R_GM_Online3 = conveyorLineStatus1.Online; |
| | |
| | | /// </summary> |
| | | public short R_GM_TrayType; |
| | | |
| | | /// <summary> |
| | | /// å½åå |
| | | /// </summary> |
| | | public short R_GM_Column; |
| | | |
| | | |
| | | ///ç«å° |
| | | |
| | | |
| | | ///<summary> |
| | | /// è¯»åæ¡ç |
| | | /// </summary> |
| | |
| | | using AutoMapper; |
| | | using HslCommunication.WebSocket; |
| | | using WIDESEAWCS_Tasks.å¹²èä»; |
| | | using WIDESEAWCS_Tasks.æ¿æä»; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | |
| | | gMReadData.R_GM_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt(); |
| | | gMReadData.R_GM_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType); |
| | | gMReadData.R_GM_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType); |
| | | gMReadData.R_GM_Column = commonStackerCrane.Communicator.Read<short>("DB11.42.0"); |
| | | string gMData = JsonConvert.SerializeObject(gMReadData); |
| | | _webSocketServer.PublishAllClientPayload(gMData); |
| | | } |
| | |
| | | /// æçç±»å |
| | | /// </summary> |
| | | public short R_BC_TrayType; |
| | | |
| | | /// <summary> |
| | | /// å½åå |
| | | /// </summary> |
| | | public short R_BC_Column; |
| | | } |
| | | } |
| | |
| | | bCReadData.R_BC_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt(); |
| | | bCReadData.R_BC_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType); |
| | | bCReadData.R_BC_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType); |
| | | bCReadData.R_BC_Column = commonStackerCrane.Communicator.Read<short>("DB11.42.0"); |
| | | string bCData = JsonConvert.SerializeObject(bCReadData); |
| | | _webSocketServer.PublishAllClientPayload(bCData); |
| | | } |
| | |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | using WIDESEAWCS_Tasks.HoisterJob; |
| | | using WIDESEAWCS_Tasks.StackerCraneJob; |
| | | using WIDESEAWCS_Tasks.æ¿æä»; |
| | | using WIDESEAWCS_Tasks.油墨ä»; |
| | | using WIDESEAWCS_Tasks.é»çä»; |
| | | |
| | |
| | | yMReadData.R_YM_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt(); |
| | | yMReadData.R_YM_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType); |
| | | yMReadData.R_YM_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType); |
| | | yMReadData.R_YM_Column = commonStackerCrane.Communicator.Read<short>("DB11.42.0"); |
| | | string yMData = JsonConvert.SerializeObject(yMReadData); |
| | | _webSocketServer.PublishAllClientPayload(yMData); |
| | | } |
| | |
| | | /// </summary> |
| | | public short R_YM_TrayType; |
| | | |
| | | /// <summary> |
| | | /// å½åå |
| | | /// </summary> |
| | | public short R_YM_Column; |
| | | |
| | | |
| | | ///æåæº |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | public short R_CSJ_TrayType; |
| | | |
| | | /// <summary> |
| | | /// å½åå |
| | | /// </summary> |
| | | public short R_CSJ_Column; |
| | | |
| | | |
| | | ///åç«å°è¯»å103 |
| | | |
| | |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | using WIDESEAWCS_Tasks.HoisterJob; |
| | | using WIDESEAWCS_Tasks.StackerCraneJob; |
| | | using WIDESEAWCS_Tasks.æ¿æä»; |
| | | using WIDESEAWCS_Tasks.æµè¯æ¶ä»; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | |
| | | cSJReadData.R_CSJ_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt(); |
| | | cSJReadData.R_CSJ_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType); |
| | | cSJReadData.R_CSJ_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType); |
| | | cSJReadData.R_CSJ_Column = commonStackerCrane.Communicator.Read<short>("DB11.42.0"); |
| | | string cSJData = JsonConvert.SerializeObject(cSJReadData); |
| | | _webSocketServer.PublishAllClientPayload(cSJData); |
| | | } |
| | |
| | | using AutoMapper; |
| | | using WIDESEAWCS_Tasks.é»çä»; |
| | | using HslCommunication.WebSocket; |
| | | using WIDESEAWCS_Tasks.æ¿æä»; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | |
| | | zHReadData.R_ZH_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt(); |
| | | zHReadData.R_ZH_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType); |
| | | zHReadData.R_ZH_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType); |
| | | zHReadData.R_ZH_Column = commonStackerCrane.Communicator.Read<short>("DB11.42.0"); |
| | | string zHData = JsonConvert.SerializeObject(zHReadData); |
| | | _webSocketServer.PublishAllClientPayload(zHData); |
| | | } |
| | |
| | | /// </summary> |
| | | public short R_ZH_TrayType; |
| | | |
| | | /// <summary> |
| | | /// å½åå |
| | | /// </summary> |
| | | public short R_ZH_Column; |
| | | |
| | | ///åç«å°è¯»å301 |
| | | |
| | | |
| | | ///åè´§æçç±»å(读) |
| | | public short R_ZH_TakePalletType1; |
| | | /// <summary> |
| | |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | { |
| | | name: "æ´æ°ç©ææ¯å¦è¿æ", |
| | | icon: '', |
| | | class: '', |
| | | value: 'UpdateExpirationlabel', |
| | | type: 'success', |
| | | onClick: function () { |
| | | } |
| | | }, |
| | | ] |
| | | |
| | | export default buttons |
| | |
| | | //æ¤jsæä»¶æ¯ç¨æ¥èªå®ä¹æ©å±ä¸å¡ä»£ç ï¼å¯ä»¥æ©å±ä¸äºèªå®ä¹é¡µé¢æè
éæ°é
ç½®çæç代ç |
| | | |
| | | let extension = { |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | components: { |
| | | //æ¥è¯¢ç颿©å±ç»ä»¶ |
| | | gridHeader: '', |
| | | gridBody: '', |
| | | gridFooter: '', |
| | | //æ°å»ºãç¼è¾å¼¹åºæ¡æ©å±ç»ä»¶ |
| | | modelHeader: '', |
| | | modelBody: '', |
| | | modelFooter: '' |
| | | }, |
| | | tableAction: '', //æå®æå¼ 表çæé(è¿éå¡«å表å,é»è®¤ä¸ç¨å¡«å) |
| | | buttons: { view: [], box: [], detail: [] }, //æ©å±çæé® |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let UpdateExpirationlabelBtn = this.buttons.find(x => x.value == 'UpdateExpirationlabel'); |
| | | if (UpdateExpirationlabelBtn) { |
| | | UpdateExpirationlabelBtn.onClick = function () { |
| | | this.http |
| | | .post("api/StockInfo/UpdateExpirationlabel", "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('æ´æ°å®æ'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | 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) { |
| | | // ç¹å»ç¼è¾æé®å¼¹åºæ¡åæ§è¡ |
| | | if (this.currentAction === 'Edit') { // 夿å½åæ¯ç¼è¾æä½ |
| | | // è·åå½åç»å½ç¨æ·ï¼å设ä»å
¨å±åéè·åï¼å
·ä½æ ¹æ®ä½ ç项ç®å®ç°ï¼ |
| | | const currentUser = this.$store.state.userInfo?.username || 'system'; |
| | | |
| | | // è·åå½åæ¶é´å¹¶æ ¼å¼å为å端éè¦çæ ¼å¼ |
| | | const now = new Date(); |
| | | const formattedDate = now.toISOString().slice(0, 19).replace('T', ' '); |
| | | |
| | | // 设置修æ¹äººå段 |
| | | this.editFormFields.modifier = currentUser; |
| | | // è®¾ç½®ä¿®æ¹æ¶é´å段 |
| | | this.editFormFields.modifyDate = formattedDate; |
| | | } |
| | | 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) { |
| | | // ç¹å»ç¼è¾æé®å¼¹åºæ¡åæ§è¡ |
| | | if (this.currentAction === 'Edit') { // 夿å½åæ¯ç¼è¾æä½ |
| | | // è·åå½åç»å½ç¨æ·ï¼å设ä»å
¨å±åéè·åï¼å
·ä½æ ¹æ®ä½ ç项ç®å®ç°ï¼ |
| | | const currentUser = this.$store.state.userInfo?.username || 'system'; |
| | | |
| | | // è·åå½åæ¶é´å¹¶æ ¼å¼å为å端éè¦çæ ¼å¼ |
| | | const now = new Date(); |
| | | const formattedDate = now.toISOString().slice(0, 19).replace('T', ' '); |
| | | |
| | | // 设置修æ¹äººå段 |
| | | this.editFormFields.modifier = currentUser; |
| | | // è®¾ç½®ä¿®æ¹æ¶é´å段 |
| | | this.editFormFields.modifyDate = formattedDate; |
| | | } |
| | | } |
| | | }; |
| | | export default extension; |
| | | |
| | | } |
| | | }; |
| | | export default extension; |
| | |
| | | Unit = item.Unit, |
| | | WarehouseId = warehouse.WarehouseId, |
| | | RowNo = item.RowId, |
| | | PurchaseOrderId = purchaseOrder.Id, |
| | | }; |
| | | purchaseOrderDetails.Add(purchaseOrderDetail); |
| | | } |
| | |
| | | { |
| | | return content.Error($"订å{item.SaleOrder}ç»ç«¯å®¢æ·è·å失败!"); |
| | | } |
| | | // æ°å¢ï¼å¤æDataæ¯å¦ä¸ºç©ºéå |
| | | if (responseContent.Data == null || responseContent.Data.Count == 0) |
| | | { |
| | | return content.Error($"订å{item.SaleOrder}å¨ERP䏿 对åºç»ç«¯å®¢æ·æ°æ®!"); |
| | | } |
| | | //夿ç»ç«¯å®¢æ·æ¯å¦åå¨ |
| | | Dt_CustomerInfo? customerInfoEnd = customerInfos.Where(x => x.Code == responseContent.Data[0].Endcustomer).FirstOrDefault(); |
| | | if (customerInfoEnd == null) |
| | |
| | | public List<Dt_ProStockInfo> GetProStocks(Dt_ErpProScrapSheetDetail erpProScrapSheetDetail, List<string> locationInfos) |
| | | { |
| | | List<Dt_ProStockInfo>? proStockInfos = null; |
| | | proStockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => locationInfos.Contains(x.LocationCode) && x.ProStockAttribute == ProStockAttributeEnum.æå.ObjToInt()) |
| | | proStockInfos = Db.Queryable<Dt_ProStockInfo>().Where(x => locationInfos.Contains(x.LocationCode) && (x.ProStockAttribute == ProStockAttributeEnum.æå.ObjToInt()|| x.ProStockAttribute == ProStockAttributeEnum.å°¾æ°.ObjToInt())) |
| | | .Includes(x => x.proStockInfoDetails) |
| | | .Where(x => x.proStockInfoDetails |
| | | .Any(v => |
| | |
| | | //æ¥æ¾å¯ç¨æ¥åºåºå |
| | | public List<Dt_ProStockInfo> GetUseableStocks(int warehoseId, Dt_ErpProScrapSheetDetail erpProScrapSheetDetail) |
| | | { |
| | | //为尾æ°ä»æ¶æ¥åºåºåº |
| | | if(warehoseId == 8) |
| | | { |
| | | warehoseId = 7; |
| | | } |
| | | List<string> locationCodes = _basicRepository.LocationInfoRepository.GetCanOutLocationCodes(warehoseId); |
| | | return BaseDal.GetProStocks(erpProScrapSheetDetail, locationCodes); |
| | | } |
| | |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.人工å é¤ : OperateTypeEnum.èªå¨å é¤); |
| | | _stockService.ProStockInfoService.Repository.DeleteAndMoveIntoHty(proStockInfo, App.User.UserId == 0 ? OperateTypeEnum.èªå¨å é¤ : OperateTypeEnum.人工å é¤); |
| | | _stockService.ProStockInfoDetailService.Repository.DeleteAndMoveIntoHty(proStockInfo.proStockInfoDetails, App.User.UserId == 0 ? OperateTypeEnum.èªå¨å é¤ : OperateTypeEnum.人工å é¤); |
| | | _basicService.LocationInfoService.UpdateLocationStatus(prolocationInfo, proStockInfo.PalletType, LocationStatusEnum.Free, proStockInfo.WarehouseId); |
| | | if (prolocationInfo != null) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationStatus(prolocationInfo, proStockInfo.PalletType, LocationStatusEnum.Free, proStockInfo.WarehouseId); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? OperateTypeEnum.人工å é¤ : OperateTypeEnum.èªå¨å é¤); |
| | | _stockService.ProStockInfoService.Repository.UpdateData(proStockInfo); |
| | | _stockService.ProStockInfoDetailService.Repository.UpdateData(proStockInfo.proStockInfoDetails); |
| | | _basicService.LocationInfoService.UpdateLocationStatus(prolocationInfo, proStockInfo.PalletType, LocationStatusEnum.Free, proStockInfo.WarehouseId); |
| | | if (prolocationInfo != null) |
| | | { |
| | | _basicService.LocationInfoService.UpdateLocationStatus(prolocationInfo, proStockInfo.PalletType, LocationStatusEnum.Free, proStockInfo.WarehouseId); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | |
| | | } |
| | | catch(Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | |
| | | //"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=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æ°æ®åºè¿æ¥ |
| | | //æ§WMSæ°æ®åºè¿æ¥1 |
| | | //"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", |
| | | //è·¨å |
| | | "Cors": { |