From 96e240ad712e6f439cc5df23829dd0e1a8b01979 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期一, 02 三月 2026 13:01:09 +0800
Subject: [PATCH] 新增故障登记跟踪页面 模块

---
 pages/MJGL/Sb_EquipRepairCheckTaskReport/Sb_EquipRepairCheckTaskReport.vue |  216 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 210 insertions(+), 6 deletions(-)

diff --git a/pages/MJGL/Sb_EquipRepairCheckTaskReport/Sb_EquipRepairCheckTaskReport.vue b/pages/MJGL/Sb_EquipRepairCheckTaskReport/Sb_EquipRepairCheckTaskReport.vue
index c060bd6..80a96d0 100644
--- a/pages/MJGL/Sb_EquipRepairCheckTaskReport/Sb_EquipRepairCheckTaskReport.vue
+++ b/pages/MJGL/Sb_EquipRepairCheckTaskReport/Sb_EquipRepairCheckTaskReport.vue
@@ -1,22 +1,226 @@
 <template>
     <view>
-        
+        <view class="tabs" id="tabs">
+            <view :class="tabs == 0 ? 'on':''" @tap="switchTab(0)">寰呯淮淇�</view>
+            <view :class="tabs == 1 ? 'on':''" @tap="switchTab(1)">宸茬淮淇�</view>
+            <view :class="tabs == 2 ? 'on':''" @tap="switchTab(2)">宸查獙鏀�</view>
+        </view>
+
+        <!-- 璁惧鐐规浠诲姟鍒楄〃 -->
+        <view class="list" v-for="(item,index) in reportBillsDisplay" :key="index">
+            <uni-card :title="item.鏁呴殰鐧昏鍗曞彿" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index">
+                <view class="card-detail">
+                    <view class="detail" v-for="(field, index) in CommonUtils.emptyValueFilter(item, HFieldList)"
+                        :key="index">
+                        <template v-if="field.ColmType == 'DateTime'">
+                            <text>{{field.ColmCols}}锛�</text>{{dayjs(item[field.ColmCols]).format('YYYY-MM-DD HH:mm:ss')}}
+                        </template>
+                        <template v-else>
+                            <text>{{field.ColmCols}}锛�</text>{{item[field.ColmCols]}}
+                        </template>
+                    </view>
+                </view>
+                <view class="more" v-if="showDetail == index && operations != index">
+                    <view class="part" style="border-right: 1px solid #eee;">
+                        <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏀惰捣
+                    </view>
+                    <view class="part" @tap.stop="operations = operations==index?-1:index">
+                        <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鎿嶄綔
+                    </view>
+                </view>
+                <view class="more" v-if="showDetail != index && operations != index">
+                    <view class="part" style="border-right: 1px solid #eee;">
+                        <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鏇村淇℃伅
+                    </view>
+                    <view class="part" @tap.stop="operations = operations==index?-1:index">
+                        <uni-icons type="more-filled" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>鎿嶄綔
+                    </view>
+                </view>
+                <view class="op" v-if="operations == index">
+                    <!-- <button class="op3" size="mini" plain @tap.stop="edit(item)">缂栬緫</button> -->
+                    <!-- <button class="op4" size="mini" plain @tap.stop="del(item)">鍒犻櫎</button> -->
+                    <button class="op3" size="mini" v-if="tabs == 0" plain @tap.stop="pushBill(0, item)">涓嬫帹娲惧伐鍗�</button>
+                    <button class="op3" size="mini" v-if="tabs == 1" plain @tap.stop="pushBill(1, item)">涓嬫帹缁翠慨鍗�</button>
+                    <button class="op3" size="mini" v-if="tabs == 2" plain @tap.stop="pushBill(2, item)">涓嬫帹楠屾敹鍗�</button>
+                    <button class="op5" size="mini" plain @tap.stop="operations = -1">鍙栨秷鎿嶄綔</button>
+                </view>
+            </uni-card>
+        </view>
+        <view class="over" v-if="reportBillsDisplay.length == 0">鏆傛棤鏁版嵁</view>
     </view>
 </template>
 
 <script>
+    import {
+        getUserInfo
+    } from '../../../utils/auth';
+    import {
+        CommonUtils
+    } from '../../../utils/common';
+    import dayjs from 'dayjs';
     export default {
+        // 鍣ㄥ叿鏁呴殰鐧昏璺熻釜 妯″潡
+        name: 'Sc_MouldRepairCheckTaskReport',
         data() {
             return {
-                
-            }
+                dayjs,
+                CommonUtils,
+                tabs: 0,
+                showDetail: -1,
+                operations: -1,
+
+                reportBillsDisplay: [],
+                reportBillsAwaitRepair: [], // 寰呯淮淇�
+                reportBillsRepaired: [], // 宸茬淮淇�
+                reportBillsChecked: [], // 宸查獙鏀�
+                HFieldList: [], // 瀛楁鍒楄〃
+            };
         },
         methods: {
-            
+            pushBill(tab, item) {
+                console.log('item: ', item);
+                let Query = `&HBillNo=${item['鏁呴殰鐧昏鍗曞彿']}&HInterID=${item['HInterID']}&HSourceBillType=3907`
+                if (tab == 0) {
+                    uni.navigateTo({
+                        url: '/pages/MJGL/Sb_EquipRepairSendWork/Sb_EquipRepairSendWorkBill?operationType=4' +
+                            Query
+                    })
+                } else if (tab == 1) {
+                    uni.navigateTo({
+                        url: '/pages/MJGL/Sb_EqpMaintenance/Sb_EqpMaintenanceBill?operationType=5' + Query +
+                            `&HSendWorkID=${item.HSendWorkID}`
+                    })
+                } else if (tab == 2) {
+                    uni.navigateTo({
+                        url: '/pages/MJGL/Sb_EquipRepairCheckBill/Sb_EquipRepairCheckBill?operationType=4' +
+                            Query + `&HSendWorkID=${item.HSendWorkID}`
+                    })
+                }
+            },
+            switchTab(tabIndex) {
+                this.tabs = tabIndex
+                switch (tabIndex) {
+                    case 0:
+                        this.reportBillsDisplay = this.reportBillsAwaitRepair;
+                        break;
+                    case 1:
+                        this.reportBillsDisplay = this.reportBillsRepaired;
+                        break;
+                    case 2:
+                        this.reportBillsDisplay = this.reportBillsChecked;
+                        break;
+                }
+            },
+            async getRepairList() {
+                try {
+                    let res = await CommonUtils.doRequest2Async({
+                        url: '/Sb_EquipRepairCheckTaskReport/RepairCheckList',
+                        data: {
+                            user: getUserInfo()["HEmpName"]
+                        }
+                    })
+
+                    let {
+                        count,
+                        data,
+                        Message,
+                        list
+                    } = res.data
+                    if (count == 1) {
+                        console.log('data: ', data);
+
+                        this.reportBillsAwaitRepair = data.h_p_Sb_EquipRepairCheckTaskReport
+                        this.reportBillsRepaired = data.h_p_Sb_EquipRepairCheckTaskReport1
+                        this.reportBillsChecked = data.h_p_Sb_EquipRepairCheckTaskReport2
+
+                        let fieldList = CommonUtils.fieldListFilterRole({
+                            ExcludeKeys: ['鏁呴殰鐧昏鍗曞彿'],
+                            FieldList: list
+                        })
+
+                        if (fieldList.status == false) {
+                            CommonUtils.showTips({
+                                title: '娓╅Θ鎻愮ず',
+                                message: `鑾峰彇琛ㄥ崟缁撴瀯澶辫触: ${fieldList.Message}`
+                            })
+                        }
+
+                        this.HFieldList = fieldList.data
+
+                        this.switchTab(0)
+                    } else {
+                        CommonUtils.showTips({
+                            title: '娓╅Θ鎻愮ず',
+                            message: `鑾峰彇鏁呴殰鐧昏鍗曞紓甯�: ${Message}`
+                        })
+                    }
+
+                } catch (err) {
+                    CommonUtils.showTips({
+                        title: '娓╅Θ鎻愮ず',
+                        message: `鑾峰彇鏁呴殰鐧昏鍗曞紓甯�: ${err}`
+                    })
+                }
+            }
+        },
+        onShow() {
+            this.getRepairList()
         }
     }
 </script>
 
-<style>
+<style lang="scss">
+    @import "@/pages/MJGL/style/MJBillStyle.scss";
 
-</style>
+    .more {
+        color: #888;
+        font-size: 26rpx;
+        display: flex;
+        border-top: 1px solid #eee;
+        padding-top: 20rpx;
+
+        .part {
+            width: 50%;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+        }
+    }
+
+    .op {
+        display: flex;
+        justify-content: space-around;
+        margin-top: 20rpx;
+
+        button {
+            padding: 0;
+            width: 150rpx;
+            font-size: 25rpx;
+        }
+
+        .op1 {
+            border: 1px solid #41a863;
+            color: #41a863;
+        }
+
+        .op2 {
+            border: 1px solid #d98d00;
+            color: #d98d00;
+        }
+
+        .op3 {
+            border: 1px solid #3a78ff;
+            color: #3a78ff;
+        }
+
+        .op4 {
+            border: 1px solid #da0000;
+            color: #da0000;
+        }
+
+        .op5 {
+            border: 1px solid #888;
+            color: #888;
+        }
+    }
+</style>
\ No newline at end of file

--
Gitblit v1.9.1