Преглед изворни кода

refactor(ui): 统一设备展示格式并简化服务列表操作

- 在检查、维修、维修检查、工单等列表页统一显示设备名称和设备编号
- 调整忽略保养页设备编号与名称的显示顺序
- 移除服务列表页的接收、转派、完成、提交审核等操作按钮
- 服务列表页统一改为"查看详情"入口,操作收归详情页处理
- 删除列表页中不再使用的 handleDealEdit、handleDispatching、handleEdit、handleExamine 方法
dazhaxie пре 2 недеља
родитељ
комит
68b9a05e4e

+ 1 - 1
pages/check/check.vue

@@ -25,7 +25,7 @@
           <view class="mt-2 d-flex j-between">
             <view class="text-color-3 f-size-32 f-weight-bold">{{
               item.sbName
-            }}</view>
+            }} ({{ item.sbNo }})</view>
           </view>
           <view class="f-size-26 text-color-6 f-weight-4 mt-2">{{
             item.startTime

+ 1 - 1
pages/maintain/maintain-ignore.vue

@@ -7,7 +7,7 @@
           @click="handleDetail(item.id)" @longpress="showMask(item.id, $event)">
           <common-mask :item="item" :maskId="maskId" @hide="maskId = 0" @del="handleDel(item.id)" />
           <view class="d-flex j-between border-bottom pb-2 a-center">
-            <view class="text-color-b f-size-26 text-overflow">{{ item.sbNo }} ({{ item.sbName }})</view>
+            <view class="text-color-b f-size-26 text-overflow">{{ item.sbName }} ({{ item.sbNo }})</view>
             <my-badge :text="statusMap[item.status]" :status="dict[item.status]" />
           </view>
           <view class="mt-2 d-flex j-between">

+ 1 - 1
pages/repair-check/repair-check.vue

@@ -15,7 +15,7 @@
                 >
                     <common-mask :item="item" :maskId="maskId" @hide="maskId = 0" @del="handleDel(item.id)" />
                     <view class="d-flex j-between border-bottom pb-2 a-center">
-                        <view class="text-color-b f-size-26">{{ item.sbName }}</view>
+                        <view class="text-color-b f-size-26">{{ item.sbName }} ({{ item.sbNo }})</view>
                         <my-badge
                             :text="$BaseTool.Object.getField(statusMap, item.status)"
                             :status="

+ 1 - 1
pages/repair/repair.vue

@@ -15,7 +15,7 @@
                 >
                     <common-mask :item="item" :maskId="maskId" @hide="maskId = 0" @del="handleDel(item.id)" />
                     <view class="d-flex j-between border-bottom pb-2 a-center">
-                        <view class="text-color-b f-size-26">{{ item.sbName }}</view>
+                        <view class="text-color-b f-size-26">{{ item.sbName }} ({{ item.sbNo }})</view>
                         <my-badge
                             :text="$BaseTool.Object.getField(statusMap, item.status)"
                             :status="

+ 3 - 79
pages/service/service.vue

@@ -22,35 +22,10 @@
                     <view class="f-size-26 text-color-6 f-weight-4 mt-2">{{
                         item.applyTime
                         }}</view>
+                    <!-- 列表页不再直接提供接收/转派/完成/提交审核等操作,统一进入详情页处理 -->
                     <view class="d-flex j-end edit-box">
-                        <view class="text-color-3 f-size-32 edit" v-if="
-                            item.status ===
-                            $DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.NOT_ALLOCATED">
-                            <view @click.stop="handleDealEdit(item)">接收</view>
-                        </view>
-                        <!-- 仅维修中(状态2)可转派,与后端 transfer 接口状态校验保持一致;审核中(状态4)等状态不显示 -->
-                        <view class="text-color-3 f-size-32 edit" v-if="
-                            item.status ===
-                            $DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING &&
-                            !item.fourRepairUser && item.repairUserId
-                        ">
-                            <view @click.stop="handleDispatching(item)">转派</view>
-                        </view>
-                        <view class="text-color-3 f-size-32 edit" v-if="
-                            [
-                                $DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.PROCESSING,
-                                $DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK,
-                            ].includes(item.status)
-                        ">
-                            <view @click.stop="handleEdit(item)">完成</view>
-                        </view>
-                        <view class="text-color-3 f-size-32 edit" v-if="
-                            item.status ===
-                            $DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.WAIT_SUBMIT ||
-                            item.status ===
-                            $DictCache.VALUE.REPAIR_APPLICATION_FORM_STATUS.REBACK
-                        ">
-                            <view @click.stop="handleExamine(item)">提交审核</view>
+                        <view class="text-color-3 f-size-32 edit" @click.stop="handleDetail(item)">
+                            <view>查看详情</view>
                         </view>
                     </view>
                 </view>
@@ -131,28 +106,6 @@ export default {
             e.preventDefault()
             // #endif
         },
-        // 提交审批验收
-        handleExamine(item) {
-            var that = this;
-            uni.showModal({
-                title: '提示',
-                content: '确认提交审核?',
-                success: function (res) {
-                    if (res.confirm) {
-                        that.$Http
-                            .examine({
-                                id: item.id
-                            })
-                            .then((res) => {
-                                uni.showToast({
-                                    title: '已提交,请等待审核'
-                                });
-                                that.initData();
-                            });
-                    }
-                }
-            });
-        },
         handleDel(id) {
             const that = this;
             const params = [];
@@ -174,35 +127,6 @@ export default {
                 }
             });
         },
-        handleDealEdit(item) {
-            const that = this;
-            uni.showModal({
-                title: '提示',
-                content: '确认接收该维修任务?',
-                success: function (res) {
-                    if (res.confirm) {
-                        that.$Http.repairFormDeal(item).then((res) => {
-                            that.page = 1;
-                            that.loadMore = true;
-                            that.listData = [];
-                            that.initData();
-                        });
-                    }
-                }
-            });
-        },
-        handleDispatching(item) {
-
-            uni.navigateTo({
-                url: '/pages/repair-detail/transfer?id=' + item.id
-            });
-
-        },
-        handleEdit(item) {
-            uni.navigateTo({
-                url: '/pages/service-add/service-add?id=' + item.id
-            });
-        },
         // tab
         change(index) {
             this.current = index;

+ 1 - 1
pages/work-order/work-order.vue

@@ -35,7 +35,7 @@
                     <view class="mt-2 d-flex j-between">
                         <view class="text-color-3 f-size-32 f-weight-bold">{{
                             item.sbName
-                        }}</view>
+                        }} ({{ item.sbNo }})</view>
                     </view>
                     <view class="f-size-26 text-color-6 f-weight-4 mt-2">{{
                         item.applyTime