408249787@qq.com hai 2 días
pai
achega
5341477863

+ 4 - 0
.hbuilderx/launch.json

@@ -18,6 +18,10 @@
         {
             "openVueDevtools" : true,
             "type" : "uni-app:h5"
+        },
+        {
+            "playground" : "standard",
+            "type" : "uni-app:app-android"
         }
     ]
 }

+ 4 - 2
pages/maintain-detail/maintain-detail.vue

@@ -4,6 +4,8 @@
       <equipment-line title="状态" :content="statusMap[infoData.status]" />
       <equipment-line title="要求" :content="infoData.requirement" />
       <equipment-line title="执行标准" :content="infoData.remark" />
+      <equipment-line title="实际开始" :content="infoData.actualStartTime" />
+      <equipment-line title="完成时间" :content="infoData.actualEndTime" />
     </view>
     <view class="m3 p3 bg-color-white" style="border-radius: 16rpx">
       <view class="pb-3 border-bottom">
@@ -25,7 +27,7 @@
             <view class="w160">方法工具:</view>
             <view class="text-color-3">{{ item.method }}</view>
           </view>
-              <view class="d-flex text-color-6">
+          <view class="d-flex text-color-6">
             <view class="w160">保养级别:</view>
             <view class="text-color-3">{{ item.checkLevel }}</view>
           </view>
@@ -37,7 +39,7 @@
             <view class="w160">内容:</view>
             <view class="text-color-3">{{ item.remark }}</view>
           </view>
-             <view class="d-flex text-color-6">
+          <view class="d-flex text-color-6">
             <view class="w160">填报信息:</view>
             <view class="text-color-3 bold">{{ item.value }}</view>
           </view>

+ 11 - 6
pages/maintain/finish.vue

@@ -15,7 +15,7 @@
       </u-form>
       <view class="py3 border-bottom">
         <view class="f-size-30 text-color-3 w200">检查项目</view>
-        <view class="f-size-28 text-color-3 border py2" v-for="(item,index) in requirementList" :key="index">
+        <view class="f-size-28 text-color-3 border py2" v-for="(item, index) in requirementList" :key="index">
           <view class="d-flex text-color-6">
             <view class="w180">保养周期:</view>
             <view class="text-color-3">{{ item.period }}</view>
@@ -32,7 +32,7 @@
             <view class="w160">方法工具:</view>
             <view class="text-color-3">{{ item.method }}</view>
           </view>
-              <view class="d-flex text-color-6">
+          <view class="d-flex text-color-6">
             <view class="w160">保养级别:</view>
             <view class="text-color-3">{{ item.checkLevel }}</view>
           </view>
@@ -91,13 +91,13 @@ export default {
         res.data.requirementList.map((item, index) => {
           return {
             ...item,
-            value:null,
+            value: null,
             options:
               item.type == '1'
                 ? item.scope.split('-').map(item => ({
-                    label: item,
-                    value: item
-                  }))
+                  label: item,
+                  value: item
+                }))
                 : []
           }
         })
@@ -130,6 +130,8 @@ export default {
           this.form.conTask = JSON.stringify(
             this.requirementList
           )
+          // 提交实际完成时间,保证已完成任务展示完成时间
+          this.form.actualEndTime = this.$BaseTool.Date.formatter(new Date(), this.$BaseTool.Date.PICKER_NORM_DATETIME_PATTERN)
 
           this.$Http.finishJob(this.form).then(res => {
             this.$refs.uToast.show({
@@ -164,6 +166,7 @@ export default {
     color: #fff;
   }
 }
+
 .select {
   width: 100%;
   height: 40px;
@@ -172,9 +175,11 @@ export default {
   display: flex;
   align-items: center;
 }
+
 .w160 {
   width: 160rpx;
 }
+
 .border {
   border: 1rpx solid #0082ff;
   border-radius: 10rpx;

+ 15 - 13
pages/maintain/maintain.vue

@@ -3,7 +3,8 @@
     <common-tabs :list="list" :current="current" @change="change" />
     <view class="p-top8">
       <template v-if="listData.length > 0">
-        <view class="mx3 my2 p3 bg-color-white box p-relative" v-for="(item, index) in listData" :key="item.id" @click="handleDetail(item.id)" @longpress="showMask(item.id,$event)">
+        <view class="mx3 my2 p3 bg-color-white box p-relative" v-for="(item, index) in listData" :key="item.id"
+          @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>
@@ -11,25 +12,25 @@
           </view>
           <view class="mt-2 d-flex j-between">
             <view class="text-color-3 f-size-32 f-weight-bold">{{
-                          item.requirementList?   item.requirementList.map(item => item.stdName).join('、'):''
-                        }}</view>
+              item.requirementList ? item.requirementList.map(i => i.stdName).filter(name => name).join('、') : ''
+            }}</view>
           </view>
           <view class="f-size-26 text-color-6 f-weight-4 mt-2">{{
-                        item.startTime
-                    }} ({{ item.period + periodMap[item.periodType] }}) : {{ item.partName==null?'无':item.partName}}</view>
+            item.startTime
+          }} ({{ item.period + periodMap[item.periodType] }}) : {{ item.partName == null ? '无' : item.partName }}</view>
           <view class="d-flex j-end edit-box">
-            <view class="text-color-3 f-size-32 edit" v-if="(item.status === 1||
-                                item.status === 4) && !startFlag">
+            <view class="text-color-3 f-size-32 edit" v-if="(item.status === 1 ||
+              item.status === 4) && !startFlag">
               <view @click.stop="handleExecute(item)">开始</view>
             </view>
-            <view class="text-color-3 f-size-32 edit" v-if="(item.status === 2||
-                                item.status === 2||
-                                item.status === 4) && !startFlag">
+            <view class="text-color-3 f-size-32 edit" v-if="(item.status === 2 ||
+              item.status === 2 ||
+              item.status === 4) && !startFlag">
               <view @click.stop="handleFinish(item)">执行</view>
             </view>
-            <view class="text-color-3 f-size-32 edit" v-if="item.status === 2||
-                                item.status === 2 ||
-                                item.status === 4">
+            <view class="text-color-3 f-size-32 edit" v-if="item.status === 2 ||
+              item.status === 2 ||
+              item.status === 4">
               <view @click.stop="submit(item)">完成</view>
             </view>
           </view>
@@ -335,6 +336,7 @@ page {
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
 }
+
 .container {
   padding-bottom: 100rpx;
 

+ 90 - 5
pages/middle/middle.vue

@@ -88,6 +88,30 @@
                         </u-radio>
                     </u-radio-group>
                 </u-form-item>
+                <u-form-item label="工单类别" required prop="category" :label-width="150">
+                    <u-input v-model="category" disabled @click="categoryState = true" placeholder="请选择工单类别"
+                        type="select" />
+                    <u-select v-model="categoryState" :list="categoryMap" @confirm="categorySubmit"></u-select>
+                </u-form-item>
+                <u-form-item label="紧急程度" required prop="level" :label-width="150">
+                    <u-input v-model="form.level" disabled @click="levelState = true" placeholder="请选择紧急程度"
+                        type="select" />
+                    <u-select v-model="levelState" :list="levelList" @confirm="levelSubmit"></u-select>
+                </u-form-item>
+                <u-form-item label="故障类型" prop="repairErrorTypeId" :label-width="150">
+                    <u-input v-model="form.badType" disabled @click="errorTypeState = true" placeholder="请选择故障类型"
+                        type="select" />
+                    <u-select v-model="errorTypeState" :list="errorTypeList" @confirm="errorTypeSubmit"></u-select>
+                </u-form-item>
+                <u-form-item label="要求日期" prop="limitDate" :label-width="150">
+                    <u-input v-model="form.limitDate" disabled @click="limitDateShow = true" placeholder="请选择要求日期"
+                        type="select" />
+                    <u-picker mode="time" v-model="limitDateShow" :params="dateParams"
+                        @confirm="limitDateSubmit"></u-picker>
+                </u-form-item>
+                <u-form-item label="要求时间" prop="limitHours" :label-width="150">
+                    <u-input v-model="form.limitHours" type="number" placeholder="请输入要求时间(小时)" />
+                </u-form-item>
                 <u-form-item label="报修人" prop="actualUser" required :label-width="150">
                     <u-input v-model="form.actualUser" :cursor-spacing="cursorSpacing" />
                 </u-form-item>
@@ -130,7 +154,9 @@ export default {
                 sbId: '',
                 needStop: 0,
                 levelValue: '',
-                source: ''
+                source: '',
+                limitDate: '',
+                limitHours: ''
             },
             badState: false,
             badList: [],
@@ -142,6 +168,15 @@ export default {
             repairList: [],
             levelState: false,
             levelList: [],
+            categoryState: false, // 工单类别
+            errorTypeState: false, // 故障类型
+            errorTypeList: [],
+            limitDateShow: false, // 要求日期
+            dateParams: {
+                year: true,
+                month: true,
+                day: true
+            },
             imagesList: [],
             action: this.$BaseTool.UserUtil.getUploadUrl(),
             // action: 'http://39.103.133.141:8000/mock/7/upms/files/upload',
@@ -318,12 +353,39 @@ export default {
         //     this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS
         // );
         console.log(22)
+        // 同步 PC 端报修提交字段:工单类别、紧急程度、故障类型字典
+        const categoryMap = this.$DictCache.getLabelByValueMapByType(
+            this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY
+        )
+        for (const key in categoryMap) {
+            this.categoryMap.push({
+                label: categoryMap[key],
+                value: key
+            })
+        }
+        const levelMap = this.$DictCache.getLabelByValueMapByType(
+            this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL
+        )
+        for (const key in levelMap) {
+            this.levelList.push({
+                label: levelMap[key],
+                value: key
+            })
+        }
+        // 紧急程度默认一级,与 PC 端默认值保持一致
+        if (levelMap && levelMap['1']) {
+            this.form.level = levelMap['1']
+            this.form.levelValue = '1'
+        }
         this.$Http
             .getDictType({
-                type: this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY
+                type: 'REPAIR_ERROR_TYPE'
             })
             .then(res => {
-                this.categoryMap = res.data
+                this.errorTypeList = (res.data || []).map(item => ({
+                    label: item.label,
+                    value: item.value
+                }))
             })
         this.$Http
             .getSbPositionTree().then(res => {
@@ -370,6 +432,20 @@ export default {
             this.category = data[0].label
             this.form.category = data[0].value
         },
+        // 工单类别
+        categorySubmit(data) {
+            this.category = data[0].label
+            this.form.category = data[0].value
+        },
+        // 故障类型
+        errorTypeSubmit(data) {
+            this.form.badType = data[0].label
+            this.form.repairErrorTypeId = data[0].value
+        },
+        // 要求日期
+        limitDateSubmit(e) {
+            this.form.limitDate = `${e.year}-${e.month}-${e.day}`
+        },
         getType() {
             this.$Http
                 .fetchErrorTypeTree({
@@ -411,6 +487,11 @@ export default {
                 sbName: this.form.sbName,
                 sbCph: this.form.sbCph,
                 actualUser: this.form.actualUser,
+                category: this.form.category ? Number(this.form.category) : null,
+                level: this.form.levelValue ? Number(this.form.levelValue) : null,
+                repairErrorTypeId: this.form.repairErrorTypeId || null,
+                limitDate: this.form.limitDate || null,
+                limitHours: this.form.limitHours || null,
                 applicationFileList: this.imagesList
             }
             console.log(params)
@@ -449,8 +530,11 @@ export default {
                 sbId: '',
                 needStop: 0,
                 levelValue: '',
-                source: ''
+                source: '',
+                limitDate: '',
+                limitHours: ''
             }
+            this.category = ''
             this.imagesList = []
             this.fileList = []
         },
@@ -468,8 +552,9 @@ export default {
                     id: data.value
                 })
                 .then(res => {
-                    this.form.sbNo = res.data.no
+                    this.form.bianhao = res.data.no
                     this.form.sbName = res.data.name
+                    this.form.sbCph = res.data.cph
                 })
 
             this.form.running = data.label

+ 88 - 4
pages/repair-add/repair-add.vue

@@ -89,6 +89,30 @@
                         </u-radio>
                     </u-radio-group>
                 </u-form-item>
+                <u-form-item label="工单类别" required prop="category" :label-width="150">
+                    <u-input v-model="category" disabled @click="categoryState = true" placeholder="请选择工单类别"
+                        type="select" />
+                    <u-select v-model="categoryState" :list="categoryMap" @confirm="categorySubmit"></u-select>
+                </u-form-item>
+                <u-form-item label="紧急程度" required prop="level" :label-width="150">
+                    <u-input v-model="form.level" disabled @click="levelState = true" placeholder="请选择紧急程度"
+                        type="select" />
+                    <u-select v-model="levelState" :list="levelList" @confirm="levelSubmit"></u-select>
+                </u-form-item>
+                <u-form-item label="故障类型" prop="repairErrorTypeId" :label-width="150">
+                    <u-input v-model="form.badType" disabled @click="errorTypeState = true" placeholder="请选择故障类型"
+                        type="select" />
+                    <u-select v-model="errorTypeState" :list="errorTypeList" @confirm="errorTypeSubmit"></u-select>
+                </u-form-item>
+                <u-form-item label="要求日期" prop="limitDate" :label-width="150">
+                    <u-input v-model="form.limitDate" disabled @click="limitDateShow = true" placeholder="请选择要求日期"
+                        type="select" />
+                    <u-picker mode="time" v-model="limitDateShow" :params="dateParams"
+                        @confirm="limitDateSubmit"></u-picker>
+                </u-form-item>
+                <u-form-item label="要求时间" prop="limitHours" :label-width="150">
+                    <u-input v-model="form.limitHours" type="number" placeholder="请输入要求时间(小时)" />
+                </u-form-item>
                 <u-form-item label="报修人" prop="actualUser" required :label-width="150">
                     <u-input v-model="form.actualUser" :cursor-spacing="cursorSpacing" />
                 </u-form-item>
@@ -132,7 +156,9 @@ export default {
                 sbId: '',
                 needStop: 0,
                 levelValue: '',
-                source: ''
+                source: '',
+                limitDate: '',
+                limitHours: ''
             },
             category: '',
             badState: false,
@@ -145,6 +171,15 @@ export default {
             repairList: [],
             levelState: false,
             levelList: [],
+            categoryState: false, // 工单类别
+            errorTypeState: false, // 故障类型
+            errorTypeList: [],
+            limitDateShow: false, // 要求日期
+            dateParams: {
+                year: true,
+                month: true,
+                day: true
+            },
             imagesList: [],
             action: this.$BaseTool.UserUtil.getUploadUrlIgnores(),
             // action: 'http://39.103.133.141:8000/mock/7/upms/files/upload',
@@ -298,12 +333,39 @@ export default {
         //     this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS
         // );
         console.log(22)
+        // 同步 PC 端报修提交字段:工单类别、紧急程度、故障类型字典
+        const categoryMap = this.$DictCache.getLabelByValueMapByType(
+            this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY
+        )
+        for (const key in categoryMap) {
+            this.categoryMap.push({
+                label: categoryMap[key],
+                value: key
+            })
+        }
+        const levelMap = this.$DictCache.getLabelByValueMapByType(
+            this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_LEVEL
+        )
+        for (const key in levelMap) {
+            this.levelList.push({
+                label: levelMap[key],
+                value: key
+            })
+        }
+        // 紧急程度默认一级,与 PC 端默认值保持一致
+        if (levelMap && levelMap['1']) {
+            this.form.level = levelMap['1']
+            this.form.levelValue = '1'
+        }
         this.$Http
             .getDictType({
-                type: this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_CATEGORY
+                type: 'REPAIR_ERROR_TYPE'
             })
             .then(res => {
-                this.categoryMap = res.data
+                this.errorTypeList = (res.data || []).map(item => ({
+                    label: item.label,
+                    value: item.value
+                }))
             })
         this.$Http
             .getSbPositionTree().then(res => {
@@ -350,6 +412,20 @@ export default {
             this.category = data[0].label
             this.form.category = data[0].value
         },
+        // 工单类别
+        categorySubmit(data) {
+            this.category = data[0].label
+            this.form.category = data[0].value
+        },
+        // 故障类型
+        errorTypeSubmit(data) {
+            this.form.badType = data[0].label
+            this.form.repairErrorTypeId = data[0].value
+        },
+        // 要求日期
+        limitDateSubmit(e) {
+            this.form.limitDate = `${e.year}-${e.month}-${e.day}`
+        },
         getType() {
             /* this.$Http
                       .fetchErrorTypeTree({
@@ -385,6 +461,11 @@ export default {
                 sbId: this.form.sbId,
                 sbName: this.form.sbName,
                 sbCph: this.form.sbCph,
+                category: this.form.category ? Number(this.form.category) : null,
+                level: this.form.levelValue ? Number(this.form.levelValue) : null,
+                repairErrorTypeId: this.form.repairErrorTypeId || null,
+                limitDate: this.form.limitDate || null,
+                limitHours: this.form.limitHours || null,
                 applicationFileList: this.imagesList
             }
             // this.form.photo = a.join(',');
@@ -427,8 +508,11 @@ export default {
                 sbId: '',
                 needStop: 0,
                 levelValue: '',
-                source: ''
+                source: '',
+                limitDate: '',
+                limitHours: ''
             }
+            this.category = ''
             this.imagesList = []
             this.fileList = []
         },

+ 29 - 39
pages/repair-detail/reject.vue

@@ -1,10 +1,7 @@
 <template>
     <view class="mx3" style="padding-bottom: 100rpx">
         <view class="main-color-bg" style="height: 100rpx; margin: 0 -30rpx"></view>
-        <view
-            class="p3 bg-color-white"
-            style="margin-top: -50rpx; border-radius: 20rpx"
-        >
+        <view class="p3 bg-color-white" style="margin-top: -50rpx; border-radius: 20rpx">
             <u-form :model="form" ref="uForm" :label-width="180">
                 <u-form-item label="拒单理由" required prop="refuseRemark">
                     <u-input type="textarea" v-model="form.refuseRemark" />
@@ -12,12 +9,7 @@
             </u-form>
 
             <view class="p-fixed d-flex j-around a-center footer">
-                <view
-                    class="main-color-bg text-color-white common"
-                    :loading="confirmLoading"
-                    @tap="submit"
-                >提交</view
-                >
+                <view class="main-color-bg text-color-white common" :loading="confirmLoading" @tap="submit">提交</view>
             </view>
         </view>
         <u-toast ref="uToast" />
@@ -48,28 +40,26 @@ export default {
         this.$refs.uForm.setRules(this.rules);
     },
     onLoad(options) {
-            this.form = {
-                ...this.form,
-                ...options
-            }
+        // 只取拒单接口需要的字段,避免 URL 上的多余参数混入请求体导致接口报错
+        this.form.id = options.id
     },
     methods: {
         // 提交
         submit() {
             this.$refs.uForm.validate(valid => {
                 if (valid) {
-                        this.$Http.rejectRepair(this.form)
-                            .then((res) => {
-                                this.confirmLoading = false
-                                	this.$refs.uToast.show({
-					title: '提交成功!',
-					type: 'success',
-					back : true
-				})
-                            }).catch(() => {
-                                this.confirmLoading = false
+                    this.$Http.rejectRepair(this.form)
+                        .then((res) => {
+                            this.confirmLoading = false
+                            this.$refs.uToast.show({
+                                title: '提交成功!',
+                                type: 'success',
+                                back: true
                             })
-                   
+                        }).catch(() => {
+                            this.confirmLoading = false
+                        })
+
                 } else {
                     console.log('验证失败');
                 }
@@ -81,23 +71,23 @@ export default {
 
 <style lang="less">
 page {
-  background-color: #f4f4f4;
+    background-color: #f4f4f4;
 }
 
 .footer {
-  bottom: 0;
-  left: 0;
-  right: 0;
-  background-color: #fff;
-  z-index: 10000;
-  border-top: 1rpx solid #f4f4f4;
-  height: 100rpx;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background-color: #fff;
+    z-index: 10000;
+    border-top: 1rpx solid #f4f4f4;
+    height: 100rpx;
 
-  .common {
-    padding: 15rpx 200rpx;
-    border-radius: 30rpx;
-    background-color: #0082ff;
-    color: #fff;
-  }
+    .common {
+        padding: 15rpx 200rpx;
+        border-radius: 30rpx;
+        background-color: #0082ff;
+        color: #fff;
+    }
 }
 </style>

+ 56 - 50
pages/repair-detail/repair-detail.vue

@@ -4,16 +4,15 @@
     <view class="d-flex px3 py2">
       <view class="top d-flex a-center bg-color-white flex1 one-ellipsis">
         <view class="img" style="cursor:pointer">
-          <image :src="
-                            imgSrc
-                                ? imgSrc
-                                : $BaseTool.UserUtil.getFileUrl(sbInfo.qrCode)
-                        " mode="widthFix"></image>
+          <image :src="imgSrc
+              ? imgSrc
+              : $BaseTool.UserUtil.getFileUrl(sbInfo.qrCode)
+            " mode="widthFix"></image>
         </view>
         <view class="pl-3">
           <view class="f-size-36 text-color-3 one-ellipsis">{{
-                        sbInfo.name
-                    }}</view>
+            sbInfo.name
+          }}</view>
           <view class="d-flex f-size-28 f-weight-6 f-wrap" style="margin: 20rpx 0">
           </view>
           <view class="d-flex">
@@ -38,8 +37,9 @@
         <view class="d-flex py3 border-bottom">
           <view class="f-size-26 text-color-9 w200">报修图片</view>
           <view class="f-size-26 text-color-3 d-flex ">
-            <block v-for="(item,index) in imagesList" :key="index">
-              <u-image width="100" class="mr-2" :src="item" @click="handlePre(index)" mode="widthFix"><u-loading slot="loading"></u-loading></u-image>
+            <block v-for="(item, index) in imagesList" :key="index">
+              <u-image width="100" class="mr-2" :src="item" @click="handlePre(index)" mode="widthFix"><u-loading
+                  slot="loading"></u-loading></u-image>
             </block>
           </view>
         </view>
@@ -47,7 +47,7 @@
     </view>
 
     <view class="divider"></view>
-    <view class="mt-3 px3" v-show="infoData.status>=2">
+    <view class="mt-3 px3" v-show="infoData.status >= 2">
       <view class="f-size-30 f-weight-bold py2 border-bottom">维修信息</view>
       <view class="mx3 my2 p3 bg-color-white" style="border-radius: 16rpx; border: 1px solid #eee">
         <equipment-line title="故障类别" :content="infoData.repairErrorTypeName" />
@@ -55,16 +55,19 @@
         <equipment-line title="维修结束" :content="infoData.repairEndTime" />
         <equipment-line title="维修耗时" :content="infoData.repairMinutes" />
         <equipment-line title="维修人员1" :content="infoData.repairUserName" />
-        <equipment-line v-if="infoData.secondRepairUser" title="维修人员2" :content="getUserName(infoData.secondRepairUser)" />
-        <equipment-line v-if="infoData.threeRepairUser" title="维修人员3" :content="getUserName(infoData.threeRepairUser)" />
+        <equipment-line v-if="infoData.secondRepairUser" title="维修人员2"
+          :content="getUserName(infoData.secondRepairUser)" />
+        <equipment-line v-if="infoData.threeRepairUser" title="维修人员3"
+          :content="getUserName(infoData.threeRepairUser)" />
         <equipment-line v-if="infoData.fourRepairUser" title="维修人员4" :content="getUserName(infoData.fourRepairUser)" />
         <equipment-line title="维修描述" :content="infoData.repairContent" />
         <equipment-line title="备注" :content="infoData.repairRemark" />
         <view class="d-flex py3 border-bottom">
           <view class="f-size-26 text-color-9 w200">维修图片</view>
           <view class="f-size-26 text-color-3 d-flex ">
-            <block v-for="(item,index) in repairImagesList" :key="index">
-              <u-image width="100" class="mr-2" :src="item" @click="handlePreRepair(index)" mode="widthFix"><u-loading slot="loading"></u-loading></u-image>
+            <block v-for="(item, index) in repairImagesList" :key="index">
+              <u-image width="100" class="mr-2" :src="item" @click="handlePreRepair(index)" mode="widthFix"><u-loading
+                  slot="loading"></u-loading></u-image>
             </block>
           </view>
         </view>
@@ -72,7 +75,8 @@
     </view>
     <view class="divider"></view>
     <view class="mt-3 px3">
-      <view v-for="(item,index) in dispatchList" :key="index" class="mx3 my2 p3 bg-color-white" style="border-radius: 16rpx">
+      <view v-for="(item, index) in dispatchList" :key="index" class="mx3 my2 p3 bg-color-white"
+        style="border-radius: 16rpx">
         <view>
           <equipment-line title="转派人" :content="item.username" />
           <equipment-line title="转派时间" :content="item.time" />
@@ -92,7 +96,7 @@
           <view class="iconfont icon-baoxiu" style="color: #0f6fb9"></view>
           <view class="grid-text">拒单</view>
         </u-grid-item>
-          <u-grid-item v-show="!infoData.fourRepairUser && infoData.repairUserId" @tap="handleTransfer()">
+        <u-grid-item v-show="!infoData.fourRepairUser && infoData.repairUserId" @tap="handleTransfer()">
           <view class="iconfont icon-baoxiu" style="color: #0f6fb9"></view>
           <view class="grid-text">转派</view>
         </u-grid-item>
@@ -154,39 +158,39 @@ export default {
     this.detailId = options.detailId
 
     this.statusMap = this.$DictCache.getLabelByValueMapByType(this.$DictCache.TYPE.REPAIR_APPLICATION_FORM_STATUS)
-     this.$Http
-            .queryUserDept({
-                deptCode: this.$DictCache.VALUE.SYS_DEPT_CODE.SYS_DEPT_CODE_XIAN_CHANG_WEI_XIU_ZU,
-                userStatus: 1
-            })
-            .then((res) => {
-                console.log(res.data);
-                const temp = []
-                res.data.forEach((item, index) => {
-                    temp.push({
-                        label: item.realName,
-                        value: item.userId
-                    })
-                })
-                this.zjList.push(...temp)
-            });
-             this.$Http
-            .queryUserDept({
-                deptCode: this.$DictCache.VALUE.SYS_DEPT_CODE.SYS_DEPT_CODE_CHANG_NEI_WEI_XIU_ZU,
-                userStatus: 1
-            })
-            .then((res) => {
-                console.log(res.data);
-                const temp = []
-                res.data.forEach((item, index) => {
-                    temp.push({
-                        label: item.realName,
-                        value: item.userId
-                    })
-                })
-                this.zjList.push(...temp)
+    this.$Http
+      .queryUserDept({
+        deptCode: this.$DictCache.VALUE.SYS_DEPT_CODE.SYS_DEPT_CODE_XIAN_CHANG_WEI_XIU_ZU,
+        userStatus: 1
+      })
+      .then((res) => {
+        console.log(res.data);
+        const temp = []
+        res.data.forEach((item, index) => {
+          temp.push({
+            label: item.realName,
+            value: item.userId
+          })
+        })
+        this.zjList.push(...temp)
+      });
+    this.$Http
+      .queryUserDept({
+        deptCode: this.$DictCache.VALUE.SYS_DEPT_CODE.SYS_DEPT_CODE_CHANG_NEI_WEI_XIU_ZU,
+        userStatus: 1
+      })
+      .then((res) => {
+        console.log(res.data);
+        const temp = []
+        res.data.forEach((item, index) => {
+          temp.push({
+            label: item.realName,
+            value: item.userId
+          })
+        })
+        this.zjList.push(...temp)
 
-            });
+      });
   },
   onShow() {
     this.getInfo()
@@ -237,14 +241,14 @@ export default {
       uni.previewImage({
         urls: this.imagesList,
         current: this.imagesList[index],
-        success() {}
+        success() { }
       })
     },
     handlePreRepair(index) {
       uni.previewImage({
         urls: this.repairImagesList,
         current: this.repairImagesList[index],
-        success() {}
+        success() { }
       })
     },
     // 接收
@@ -368,10 +372,12 @@ export default {
 .d-flex.mb-2 {
   align-items: center;
 }
+
 .state-r {
   padding: 8rpx 20rpx;
   border-radius: 30rpx;
 }
+
 .state-g {
   padding: 8rpx 20rpx;
   border-radius: 30rpx;

+ 87 - 104
pages/repair-detail/transfer.vue

@@ -1,35 +1,24 @@
 <template>
     <view class="mx3" style="padding-bottom: 100rpx">
         <view class="main-color-bg" style="height: 100rpx; margin: 0 -30rpx"></view>
-        <view
-            class="p3 bg-color-white"
-            style="margin-top: -50rpx; border-radius: 20rpx"
-        >
+        <view class="p3 bg-color-white" style="margin-top: -50rpx; border-radius: 20rpx">
+            <!-- 与 PC 端 TransferForm 一致:提示当前维修人及转派审批说明 -->
+            <view v-if="model.repairUserName" class="p2 mb-2"
+                style="background: #e6f7ff; border-radius: 10rpx; font-size: 26rpx; color: #0082ff">
+                当前维修人:{{ model.repairUserName }},转派后将进入转派审批中状态,审批通过后更换维修人。
+            </view>
             <u-form :model="form" ref="uForm" :label-width="180">
-                  <u-form-item label="第一维修人" >
-                    <view >{{ model.repairUserName }}</view>
-                </u-form-item>
-                <u-form-item label="第二维修人" required prop="secondRepairUser">
-                    <my-select :disabled="disabled.includes('secondRepairUser')" :list="zjList"  v-model="form.secondRepairUser" />
-                </u-form-item>
-                 <u-form-item v-show="active>0" label="第三维修人" required prop="threeRepairUser">
-                    <my-select :disabled="disabled.includes('threeRepairUser')" :list="zjList"  v-model="form.threeRepairUser" />
+                <u-form-item label="新维修负责人" required prop="repairUserId">
+                    <my-select :list="userList" v-model="form.repairUserId" />
                 </u-form-item>
-                 <u-form-item v-show="active>1" label="第四维修人" required prop="fourRepairUser">
-                    <my-select :list="zjList"  v-model="form.fourRepairUser" />
-                </u-form-item>
-                <u-form-item v-show="active<2">
-                  <u-button type="primary" @tap="active++">添加维修人</u-button>
+                <u-form-item label="转派备注" required prop="repairDispatchRemark">
+                    <u-input type="textarea" v-model="form.repairDispatchRemark" placeholder="请填写转派原因" />
                 </u-form-item>
             </u-form>
 
             <view class="p-fixed d-flex j-around a-center footer">
-                <view
-                    class="main-color-bg text-color-white common"
-                    :loading="confirmLoading"
-                    @tap="submit"
-                >提交</view
-                >
+                <view class="main-color-bg text-color-white common" :loading="confirmLoading" @tap="submit">提交转派
+                </view>
             </view>
         </view>
         <u-toast ref="uToast" />
@@ -42,94 +31,88 @@ export default {
         return {
             form: {
                 id: '',
-                secondRepairUser: '',
-                threeRepairUser: '',
-                fourRepairUser: '',
+                repairUserId: '',
+                repairDispatchRemark: ''
             },
-            disabled:[],
             rules: {
+                repairUserId: [
+                    {
+                        required: true,
+                        message: '请选择新维修负责人',
+                        trigger: ['blur', 'change']
+                    }
+                ],
+                repairDispatchRemark: [
+                    {
+                        required: true,
+                        message: '转派备注不能为空',
+                        trigger: ['blur', 'change']
+                    }
+                ]
             },
-            detailId: '',
             confirmLoading: false,
-            zjList: [],
-            active:0,
-            model:{}
+            userList: [],
+            model: {}
         };
     },
     onReady() {
         this.$refs.uForm.setRules(this.rules);
     },
     onLoad(options) {
-    this.form.id = options.id
-          this.getInfo()
+        this.form.id = options.id
+        this.getInfo()
+        this.getDeptUsers()
     },
     methods: {
         getInfo() {
-             this.$Http
-        .fetchRepairApplicationForm({
-          id:  this.form.id
-        }).then((res) => {
-            this.model = res.data
-            if(res.data.threeRepairUser){
-                this.active=2
-                this.disabled.push('secondRepairUser','threeRepairUser')
-            }else
-            if(res.data.secondRepairUser){
-                this.active=1
-                this.disabled.push('secondRepairUser')
-            }
-          this.form.secondRepairUser= res.data.secondRepairUser
-          this.form.threeRepairUser= res.data.threeRepairUser
-          this.form.fourRepairUser= res.data.fourRepairUser
-        })
-           this.$Http
-            .queryUserListByRoleCode({
-                roleCode: 'Maintenance'
-            })
-            .then((res) => {
-                console.log(res.data);
-                const temp = []
-                res.data.forEach((item, index) => {
-                    temp.push({
-                        label: item.realName,
-                        value: item.userId
-                    })
+            this.$Http
+                .fetchRepairApplicationForm({
+                    id: this.form.id
+                }).then((res) => {
+                    this.model = res.data
                 })
-                this.zjList.push(...temp)
-            });
-/*             this.$Http
-            .queryUserListByRoleCode({
-               roleCode: 'Maintenance'
-            })
-            .then((res) => {
-                console.log(res.data);
-                const temp = []
-                res.data.forEach((item, index) => {
-                    temp.push({
-                        label: item.realName,
-                        value: item.userId
-                    })
+        },
+        // 与 PC 端 TransferForm 一致:候选人为现场维修组 + 场内维修组的启用用户
+        getDeptUsers() {
+            this.$Http
+                .queryUserDept({
+                    deptCode: this.$DictCache.VALUE.SYS_DEPT_CODE.SYS_DEPT_CODE_XIAN_CHANG_WEI_XIU_ZU,
+                    userStatus: 1
+                })
+                .then((res) => {
+                    this.$Http
+                        .queryUserDept({
+                            deptCode: this.$DictCache.VALUE.SYS_DEPT_CODE.SYS_DEPT_CODE_CHANG_NEI_WEI_XIU_ZU,
+                            userStatus: 1
+                        })
+                        .then((res2) => {
+                            const list = (res.data || []).concat(res2.data || [])
+                            this.userList = list.map(item => ({
+                                label: item.realName,
+                                value: item.userId
+                            }))
+                        })
                 })
-                this.zjList.push(...temp)
-
-            }); */
         },
         // 提交
         submit() {
             this.$refs.uForm.validate(valid => {
                 if (valid) {
-                        this.$Http.transferRepair(this.form)
-                            .then((res) => {
-                                this.confirmLoading = false
-                                	this.$refs.uToast.show({
-					title: '提交成功!',
-					type: 'success',
-					back : true
-				})
-                            }).catch(() => {
-                                this.confirmLoading = false
+                    this.$Http.transferRepair({
+                        id: this.form.id,
+                        repairUserId: this.form.repairUserId,
+                        repairDispatchRemark: this.form.repairDispatchRemark
+                    })
+                        .then((res) => {
+                            this.confirmLoading = false
+                            this.$refs.uToast.show({
+                                title: '转派已提交,等待审批',
+                                type: 'success',
+                                back: true
                             })
-                   
+                        }).catch(() => {
+                            this.confirmLoading = false
+                        })
                 } else {
                     console.log('验证失败');
                 }
@@ -141,23 +124,23 @@ export default {
 
 <style lang="less">
 page {
-  background-color: #f4f4f4;
+    background-color: #f4f4f4;
 }
 
 .footer {
-  bottom: 0;
-  left: 0;
-  right: 0;
-  background-color: #fff;
-  z-index: 10000;
-  border-top: 1rpx solid #f4f4f4;
-  height: 100rpx;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background-color: #fff;
+    z-index: 10000;
+    border-top: 1rpx solid #f4f4f4;
+    height: 100rpx;
 
-  .common {
-    padding: 15rpx 200rpx;
-    border-radius: 30rpx;
-    background-color: #0082ff;
-    color: #fff;
-  }
+    .common {
+        padding: 15rpx 200rpx;
+        border-radius: 30rpx;
+        background-color: #0082ff;
+        color: #fff;
+    }
 }
 </style>

+ 5 - 3
pages/search/search.vue

@@ -1,14 +1,16 @@
 <template>
     <view>
         <view class="px3 py2 p-fixed left0 right0 bg-color-white ">
-            <u-search placeholder="请输入名称" v-model="keyword" @search="search" @custom="search">
+            <u-search placeholder="请输入名称或设备编号" v-model="keyword" @search="search" @custom="search">
             </u-search>
         </view>
         <view style="padding-top: 104rpx;">
             <template v-if="listData.length > 0">
-                <view class="py2 px3 one-ellipsis border-bottom" v-for="(item, index) in listData" :key="index"
+                <view class="py2 px3 border-bottom" v-for="(item, index) in listData" :key="index"
                     @click="handleBack(item)">
-                    {{ item.no }}——{{ item.name }}——{{ item.zbh }}
+                    <view class="one-ellipsis f-size-30 text-color-3">{{ item.name }}{{ item.model ? '(' + item.model +
+                        ')' : '' }}</view>
+                    <view class="f-size-26 text-color-6 mt-1">编号:{{ item.no || '无' }} 位置:{{ item.cph || '无' }}</view>
                 </view>
                 <view class="py3">
                     <u-loadmore :status="status" />

+ 110 - 71
pages/service-add/service-add.vue

@@ -23,13 +23,16 @@
                     <template slot="right">
                         <view>分钟</view>
                     </template>
-                </u-form-item>-->
+</u-form-item>-->
                 <!--                <u-form-item label="维修动作" prop="descripitionType">
                     <u-input v-model="form.descripitionType" disabled @click="descripitionState = true" type="select" />
                     <u-select v-model="descripitionState" :list="descripitionList" @confirm="descripitionSubmit"></u-select>
                 </u-form-item>-->
-                <u-form-item label="备注">
+                <!-- <u-form-item label="备注">
                     <u-input v-model="form.remark" type="textarea" :height="50" />
+                </u-form-item> -->
+                <u-form-item label="维修描述" required prop="repairContent" :label-width="150">
+                    <u-input v-model="form.repairContent" type="textarea" :height="50" placeholder="请输入维修描述" />
                 </u-form-item>
                 <!-- <u-form-item label="维修时间">
 					<u-input v-model="form.wxtime" disabled @click="wxtimeShow = true" />
@@ -39,36 +42,21 @@
                     <u-input v-model="category" disabled @click="categoryState = true" type="select" />
                     <u-select v-model="categoryState" :list="categoryMap" @confirm="categorySubmit"></u-select>
                 </u-form-item>
-                <u-form-item
-                    label="是否停机"
-                    required
-                    prop="halt"
-                    :label-width="150"
-                >
-                    <u-input
-                        v-model="form.halt"
-                        disabled
-                        @click="haltState = true"
-                        placeholder="请选择是否停机"
-                        type="select"
-                    />
-                    <u-select
-                        v-model="haltState"
-                        :list="haltList"
-                        @confirm="haltSubmit"
-                        :default-value="haltDefaultValue"
-                    ></u-select>
+                <u-form-item label="是否停机" required prop="halt" :label-width="150">
+                    <u-input v-model="form.halt" disabled @click="haltState = true" placeholder="请选择是否停机"
+                        type="select" />
+                    <u-select v-model="haltState" :list="haltList" @confirm="haltSubmit"
+                        :default-value="haltDefaultValue"></u-select>
+                </u-form-item>
+                <u-form-item label="完成时间" prop="repairEndTime" :label-width="150">
+                    <u-input v-model="form.repairEndTime" disabled @click="endTimeShow = true" placeholder="请选择完成时间"
+                        type="select" />
+                    <u-picker mode="time" v-model="endTimeShow" :params="dateTimeParams"
+                        @confirm="endTimeSubmit"></u-picker>
                 </u-form-item>
                 <u-form-item label="维修图片">
-                    <u-upload
-                        width="180"
-                        height="180"
-                        max-count="3"
-                        :action="action"
-                        :file-list="fileList"
-                        @on-success="uploadSuccess"
-                        @on-remove="uploadRemove"
-                        :header="header"></u-upload>
+                    <u-upload width="180" height="180" max-count="3" :action="action" :file-list="fileList"
+                        @on-success="uploadSuccess" @on-remove="uploadRemove" :header="header"></u-upload>
                 </u-form-item>
 
             </u-form>
@@ -99,9 +87,19 @@ export default {
                 repairErrorTypeId: '',
                 repairMinutes: '',
                 repairRemark: '',
-                repairContent: ''
+                repairContent: '',
+                repairEndTime: ''
             },
             wxtimeShow: false,
+            endTimeShow: false, // 完成时间
+            dateTimeParams: {
+                year: true,
+                month: true,
+                day: true,
+                hour: true,
+                minute: true,
+                second: true
+            },
             badState: false,
             categoryState: false,
             category: '',
@@ -129,6 +127,20 @@ export default {
                         message: '请选择是否停机',
                         trigger: ['blur', 'change']
                     }
+                ],
+                category: [
+                    {
+                        required: true,
+                        message: '请选择工单类别',
+                        trigger: ['blur', 'change']
+                    }
+                ],
+                repairContent: [
+                    {
+                        required: true,
+                        message: '请输入维修描述',
+                        trigger: ['blur', 'change']
+                    }
                 ]
                 /* badType: [{
                     required: true,
@@ -181,7 +193,7 @@ export default {
         this.getType()
     },
     onReady() {
-        // this.$refs.uForm.setRules(this.rules);
+        this.$refs.uForm.setRules(this.rules);
     },
     methods: {
         descripitionSubmit(data) {
@@ -197,6 +209,13 @@ export default {
         categorySubmit(data) {
             this.category = data[0].label;
             this.form.category = data[0].value;
+            // 与 PC 端 FinishForm 联动逻辑一致:计划性维修默认停机,其余默认不停机
+            const needStopValue = data[0].value == 1 ? '1' : '0';
+            this.form.needStop = needStopValue;
+            const haltItem = this.haltList.find(item => item.value == needStopValue);
+            if (haltItem) {
+                this.form.halt = haltItem.label;
+            }
         },
         badSubmit(data) {
             this.form.badType = data[0].label;
@@ -212,27 +231,47 @@ export default {
             const params = {
                 ...this.form
             }
-            params.repairFileList = this.imagesList
-            this.$Http
-                .finish(params)
-                .then((res) => {
-                    uni.redirectTo({
-                        url: '/pages/service-detail/service-detail?id=' + this.detailId
-                    })
-                })
+            // 维修图片按 PC 端 FinishForm 的文件 DTO 结构提交(type 12 为维修图片)
+            params.repairFileList = this.imagesList.map(item => ({
+                type: 12,
+                name: item.name,
+                fileName: item.fileName,
+                fileFormat: item.fileFormat,
+                url: item.url
+            }))
+            this.$refs.uForm.validate(valid => {
+                if (valid) {
+                    this.$Http
+                        .finish(params)
+                        .then((res) => {
+                            uni.redirectTo({
+                                url: '/pages/service-detail/service-detail?id=' + this.detailId
+                            })
+                        })
+                }
+            })
         },
         haltSubmit(data) {
             this.form.halt = data[0].label;
             this.form.needStop = data[0].value;
         },
+        // 完成时间
+        endTimeSubmit(e) {
+            this.form.repairEndTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
+        },
         // 删除成功
         uploadRemove(index, lists, name) {
             this.fileList = lists;
+            // 同步移除已收集的图片,避免删除后仍提交给后端
+            this.imagesList.splice(index, 1);
         },
         // 上传成功
         uploadSuccess(data, index, lists, name) {
             this.fileList = lists;
-            this.imagesList.push(data.data)
+            // 后端返回 { code, data: 文件实体 },只收集文件实体,避免把响应包装对象提交给后端
+            if (data && data.data) {
+                this.imagesList.push(data.data)
+            }
         },
 
         getType() {
@@ -275,38 +314,38 @@ export default {
 </script>
 
 <style lang="less" scoped>
-	.submit {
-		align-items: center;
-		justify-content: space-around;
+.submit {
+    align-items: center;
+    justify-content: space-around;
 
-		view {
-			width: 240rpx;
-			padding: 15rpx 0;
-			border-radius: 40rpx;
-			text-align: center;
-		}
-	}
+    view {
+        width: 240rpx;
+        padding: 15rpx 0;
+        border-radius: 40rpx;
+        text-align: center;
+    }
+}
 
-	.footer {
-		bottom: 0;
-		left: 0;
-		right: 0;
-		background-color: #fff;
-		z-index: 10000;
-		border-top: 1rpx solid #f4f4f4;
-		height: 100rpx;
+.footer {
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background-color: #fff;
+    z-index: 10000;
+    border-top: 1rpx solid #f4f4f4;
+    height: 100rpx;
 
-		.common {
-			padding: 15rpx 100rpx;
-			border-radius: 40rpx;
-			background-color: #0082ff;
-			color: #fff;
+    .common {
+        padding: 15rpx 100rpx;
+        border-radius: 40rpx;
+        background-color: #0082ff;
+        color: #fff;
 
-			&:last-child {
-				background-color: #fff;
-				color: #0082ff;
-				border: 1rpx solid #0082ff;
-			}
-		}
-	}
+        &:last-child {
+            background-color: #fff;
+            color: #0082ff;
+            border: 1rpx solid #0082ff;
+        }
+    }
+}
 </style>

+ 53 - 42
pages/service-detail/service-detail.vue

@@ -101,7 +101,8 @@
                         <template v-slot:content>
                             <view>
                                 <view class="u-order-desc">维修开始时间</view>
-                                <view class="u-order-time">{{ infoData.repairStartTime ? infoData.repairStartTime : '' }}
+                                <view class="u-order-time">{{ infoData.repairStartTime ? infoData.repairStartTime : ''
+                                    }}
                                 </view>
                             </view>
                         </template>
@@ -110,7 +111,8 @@
                         <template v-slot:content>
                             <view>
                                 <view class="u-order-desc">维修结束时间</view>
-                                <view class="u-order-time">{{ infoData.repairEndTime ? infoData.repairEndTime : '' }}</view>
+                                <view class="u-order-time">{{ infoData.repairEndTime ? infoData.repairEndTime : '' }}
+                                </view>
                             </view>
                         </template>
                     </u-time-line-item>
@@ -127,7 +129,8 @@
                         <template v-slot:content>
                             <view>
                                 <view class="u-order-desc">验收结束时间</view>
-                                <view class="u-order-time">{{ infoData.checkEndTime ? infoData.checkEndTime : '' }}</view>
+                                <view class="u-order-time">{{ infoData.checkEndTime ? infoData.checkEndTime : '' }}
+                                </view>
                             </view>
                         </template>
                     </u-time-line-item>
@@ -135,7 +138,7 @@
                 </u-time-line>
             </view>
         </view>
-        <view v-if="current == 5">
+        <!-- <view v-if="current == 5">
             <view v-for="(item, index) in dataReason" :key="index" class="mx3 my2 p3 bg-color-white"
                 style="border-radius: 16rpx" @tap="handleEditReport(item)">
                 <view>
@@ -147,18 +150,21 @@
                 </view>
 
             </view>
-        </view>
+        </view> -->
         <view class="p-fixed d-flex j-around a-center footer">
-            <view class="main-color-bg text-color-white common" @tap="handleAdd" v-show="infoData.status ===
+            <view class="common btn-primary" @tap="handleAdd" v-show="infoData.status ===
                 2 ||
                 infoData.status ===
-                5">维修</view>
-            <view class="main-color-bg text-color-white common" v-show="infoData.status === 1" @tap="handleDealEdit">接收</view>
-            <view class="main-color-bg text-color-white common" v-show="!infoData.fourRepairUser && infoData.repairUserId" @tap="handleDetail">转派</view>
-            <view class="main-color-bg text-color-white common" v-show="infoData.status === 3 ||
+                5">完成</view>
+            <view class="common btn-primary" v-show="infoData.status === 1" @tap="handleDealEdit">接收
+            </view>
+            <view class="common btn-plain" v-show="!infoData.fourRepairUser && infoData.repairUserId"
+                @tap="handleDetail">转派
+            </view>
+            <view class="common btn-primary" v-show="infoData.status === 3 ||
                 infoData.status === 5" @tap="handleExamine">提交审核</view>
-            <view class="main-color-bg text-color-white common"
-                v-show="(dataReason === null) || (dataReason.length === 0)" @tap="handleEditReport()">填写维修报告</view>
+            <!-- <view class="common btn-plain" v-show="(dataReason === null) || (dataReason.length === 0)"
+                @tap="handleEditReport()">填写维修报告</view> -->
         </view>
     </view>
 </template>
@@ -183,9 +189,9 @@ export default {
                 {
                     name: '时间轴'
                 },
-                {
-                    name: '维修报告'
-                }
+                // {
+                //     name: '维修报告'
+                // }
             ],
             current: 0,
             detailId: '',
@@ -282,14 +288,6 @@ export default {
         },
         // 提交审批验收
         handleExamine() {
-            var that = this
-            if (!this.dataReason || this.dataReason.length === 0) {
-                uni.showToast({
-                    title: '请填写维修报告',
-                    icon: 'none'
-                })
-                return
-            }
             uni.showModal({
                 title: '提示',
                 content: '确认提交审核?',
@@ -365,7 +363,7 @@ page {
 }
 
 .container {
-    padding-bottom: 100rpx;
+    padding-bottom: 160rpx;
 
     .footer {
         bottom: 0;
@@ -373,6 +371,37 @@ page {
         right: 0;
         background-color: #fff;
         z-index: 10000;
+        border-top: 1rpx solid #f4f4f4;
+        padding: 16rpx 24rpx;
+        // 兼容 iPhone 底部安全区
+        padding-bottom: calc(16rpx + constant(safe-area-inset-bottom));
+        padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
+
+        .common {
+            flex: 1;
+            margin: 0 10rpx;
+            height: 80rpx;
+            line-height: 78rpx;
+            text-align: center;
+            font-size: 28rpx;
+            border-radius: 40rpx;
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
+        }
+
+        // 主操作:实心
+        .btn-primary {
+            background-color: #0082ff;
+            color: #fff;
+        }
+
+        // 辅助操作:描边
+        .btn-plain {
+            background-color: #fff;
+            color: #0082ff;
+            border: 1rpx solid #0082ff;
+        }
     }
 
     .title {
@@ -384,23 +413,5 @@ page {
         width: 100rpx;
         height: 100rpx;
     }
-
-    .p-fixed {
-        border-top: 1rpx solid #f4f4f4;
-        height: 100rpx;
-
-        .common {
-            padding: 15rpx 100rpx;
-            border-radius: 40rpx;
-            background-color: #0082ff;
-            color: #fff;
-
-            &:last-child {
-                background-color: #fff;
-                color: #0082ff;
-                border: 1rpx solid #0082ff;
-            }
-        }
-    }
 }
 </style>

+ 48 - 65
pages/service/service.vue

@@ -3,65 +3,48 @@
         <common-tabs :list="list" :current="current" @change="change" />
         <view class="p-top8">
             <template v-if="listData.length > 0">
-                <view
-                    class="mx3 my2 p3 bg-color-white box p-relative"
-                    v-for="(item, index) in listData"
-                    :key="index"
-                    @tap="handleDetail(item)"
-                    @longpress="showMask(item.id,$event)"
-                >
+                <view class="mx3 my2 p3 bg-color-white box p-relative" v-for="(item, index) in listData" :key="index"
+                    @tap="handleDetail(item)" @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">{{ item.sbName }}</view>
                         <view class="f-size-24 state-orange">{{
                             statusMap[item.status]
-                        }}</view>
+                            }}</view>
                     </view>
                     <view class="mt-2 d-flex j-between">
                         <view class="text-color-3 f-size-32 f-weight-bold">{{
                             item.actualUser
-                        }}-{{
-                            item.sbCph
-                        }}</view>
+                            }}-{{
+                                item.sbCph
+                            }}</view>
                     </view>
                     <view class="f-size-26 text-color-6 f-weight-4 mt-2">{{
                         item.applyTime
-                    }}</view>
+                        }}</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 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>
-                        <view
-                            class="text-color-3 f-size-32 edit"
-                           v-if="!item.fourRepairUser && item.repairUserId"
-                        >
-                            <view  @click.stop="handleDispatching(item)">转派</view>
+                        <view class="text-color-3 f-size-32 edit" v-if="!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 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 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>
                     </view>
@@ -85,13 +68,13 @@ export default {
         return {
             list: [
             ],
-            current: 1,
+            current: 2,
             // 加载更多
             status: 'loadmore',
             page: 1,
             limit: 10,
             sbId: '',
-            type: 1,
+            type: 2,
             filter: -1,
             loadMore: true,
             listData: [],
@@ -204,11 +187,11 @@ export default {
             });
         },
         handleDispatching(item) {
-      
-                        uni.navigateTo({
-                            url: '/pages/repair-detail/transfer?id=' + item.id
-                        });
-             
+
+            uni.navigateTo({
+                url: '/pages/repair-detail/transfer?id=' + item.id
+            });
+
         },
         handleEdit(item) {
             uni.navigateTo({
@@ -254,9 +237,9 @@ export default {
                     filter: this.filter,
                     status: this.type,
                     dataScope: {
-            sortBy: 'asc, desc',
-            sortName: 'status, apply_time'
-          }
+                        sortBy: 'asc, desc',
+                        sortName: 'status, apply_time'
+                    }
                 })
                 .then((res) => {
                     const data = res.data.rows;
@@ -278,25 +261,25 @@ export default {
 
 <style lang="scss">
 page {
-  background-color: #f4f4f4;
+    background-color: #f4f4f4;
 }
 
 .box {
-  padding-right: 0;
-  border-radius: 20rpx;
+    padding-right: 0;
+    border-radius: 20rpx;
 }
 
 .edit-box {
-  padding: 0 30rpx;
-  margin-top: 40rpx;
+    padding: 0 30rpx;
+    margin-top: 40rpx;
 
-  .edit {
-    padding: 8rpx 40rpx;
-    border: 1px solid #ddd;
-    border-radius: 20rpx;
-    font-size: 26rpx;
-    color: #666;
-    margin-left: 30rpx;
-  }
+    .edit {
+        padding: 8rpx 40rpx;
+        border: 1px solid #ddd;
+        border-radius: 20rpx;
+        font-size: 26rpx;
+        color: #666;
+        margin-left: 30rpx;
+    }
 }
 </style>