更改接单 派单逻辑,添加工单台页面

This commit is contained in:
赵毅 2025-08-11 16:43:20 +08:00
parent d49514d426
commit 3580ba2185
12 changed files with 531 additions and 388 deletions

View File

@ -38,6 +38,7 @@ export const apiArr = {
commInfo: "/api/v2/wechat/mpuser-crud/community-owner/info",//我的房产信息小区列表
create: "/api/v2/wechat/community-owners/create",//创建新的业主信息
communityInfo: "/api/v2/community/get-one",//获取小区信息
getOrderList:"/api/v2/wechat/community-orders/get-all-list",//获取账单
getCommunityRoomList:"/api/v2/wechat/community-room/list", //获取房源列表

View File

@ -1,19 +1,13 @@
<template>
<div class="container">
<div class="empty" v-if="communityList.length == 0">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png"
alt=""
/>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png" alt="" />
<text>当前账户未绑定任何项目房源信息</text>
<button class="emptyBtn" @click="addCommunity">新增房产绑定</button>
<!-- <button class="emptyBtn2" @click="refresh">刷新</button> -->
</div>
<div v-else>
<div
class="searchBox"
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }"
>
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<div class="searchBox_add">
<div class="emptyCommunity" @click="addCommunity">
{{ communityVal }}
@ -23,81 +17,49 @@
<div class="swiperBox1">
<swiper @animationfinish="swipers" autoplay circular>
<swiper-item
v-for="(item, index) in bannerList"
:key="index"
@click="headerServerClick(item)"
>
<swiper-item v-for="(item, index) in bannerList" :key="index" @click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" />
</swiper-item>
</swiper>
<view class="dot">
<view
:class="['dotItem', currentIdx == index ? 'active' : '']"
v-for="(item, index) in bannerList"
:key="index"
>
<view :class="['dotItem', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList"
:key="index">
</view>
</view>
</div>
<div class="swiperBox2">
<swiper @animationfinish="swipers" autoplay circular>
<swiper-item
v-for="(item, index) in streamerList"
:key="index"
@click="headerServerClick(item)"
>
<image
:src="item.ad_picture"
mode="aspectFill"
class="swiperBox2_img"
/>
<swiper-item v-for="(item, index) in streamerList" :key="index" @click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" class="swiperBox2_img" />
</swiper-item>
</swiper>
</div>
<view class="funcList">
<u-grid :col="rowNum" :border="false">
<u-grid-item
v-for="(item, index) in functionList"
@click="jump(item.mini_program_url)"
:key="index"
>
<u-grid-item v-for="(item, index) in functionList" @click="jump(item.mini_program_url)" :key="index">
<image class="grid_Pic" :src="item.nav_icon" mode=""></image>
<text class="grid_Text">{{ item.nav_name }}</text>
</u-grid-item>
</u-grid>
</view>
<div
v-for="(item, index) in tileList"
:key="index"
:class="['ads', index == 0 ? 'ads_first' : '']"
@click="headerServerClick(item)"
>
<div v-for="(item, index) in tileList" :key="index" :class="['ads', index == 0 ? 'ads_first' : '']"
@click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" />
</div>
<div class="tabs">
<div
v-for="(item, index) in categoryList"
:key="index"
:class="['tabItem', selectedTab === index ? 'active2' : '']"
@click="selectTab(index, item)"
>
<div v-for="(item, index) in categoryList" :key="index"
:class="['tabItem', selectedTab === index ? 'active2' : '']" @click="selectTab(index, item)">
{{ item.category_name }}
</div>
</div>
<div class="newsList">
<div
class="newsItem"
v-for="item in infoList"
@click="detail(item)"
:key="item.id"
>
<div class="newsItem" v-for="item in infoList" @click="detail(item)" :key="item.id">
<div class="newsItem_left">
<div class="newsItem_left_tit">{{ item.title }}</div>
<div class="newsItem_left_sub">{{ item.author }}</div>
@ -114,19 +76,13 @@
<div class="bigAdsCon">
<div class="bigAdsCon_img">
<swiper @animationfinish="swipers" autoplay circular>
<swiper-item
v-for="(item, index) in largePopList"
:key="index"
@click="headerServerClick(item)"
>
<swiper-item v-for="(item, index) in largePopList" :key="index" @click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" />
</swiper-item>
</swiper>
</div>
<div class="close" @click="closeAds">
<image
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png"
>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png">
</image>
</div>
</div>
@ -135,13 +91,7 @@
<div class="bigAds" v-if="ads2Show">
<div class="bigAdsCon2">
<div class="bigAdsCon2_img">
<swiper
:current="currentSwiperIndex"
@change="onSwiperChange"
@animationfinish="swipers"
autoplay
circular
>
<swiper :current="currentSwiperIndex" @change="onSwiperChange" @animationfinish="swipers" autoplay circular>
<swiper-item v-for="(item, index) in popList" :key="index">
<image :src="item.ad_picture" mode="aspectFill" />
</swiper-item>
@ -214,6 +164,11 @@ export default {
};
},
async onLoad(options) {
//
},
async onShow() {
//
// if (!uni.getStorageSync("changeCommData")) {
// return;
// }
@ -246,8 +201,9 @@ export default {
return item.front_end_display != 1;
});
console.log("🚀 ~ onLoad ~ res.rows:", res.rows)
uni.setStorageSync("changeCommData",{ name: res.rows[0].name, id: res.rows[0].community_id })
if (!uni.getStorageSync("changeCommData")) {
uni.setStorageSync("changeCommData", { name: res.rows[0].name, id: res.rows[0].community_id })
}
this.communityList = res.rows;
});
const meun = menuButtonInfo();
@ -258,6 +214,7 @@ export default {
if (this.communityList.length == 0) {
this.communityVal = "添加我的房产";
} else {
console.log("🚀 ~ onLoad ~ this.communityList:", this.communityList)
this.communityVal = uni.getStorageSync("changeCommData").name;
}
this.getfunctionNum();

View File

@ -79,7 +79,7 @@ export default {
this.currentCommunity = e
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
uni.setStorageSync('currentCommunityAddr',e.addr);
NavgateTo("/packages/community/index/index")
NavgateTo("1")
},
},

View File

@ -122,6 +122,8 @@ export default {
uni.removeStorageSync('is_shop');
uni.removeStorageSync('shopId');
uni.removeStorageSync('order_dispatch_permission');
uni.removeStorageSync('work_order_permission');
const button = uni.createSelectorQuery().select('#hiddenLoginBtn');
button.boundingClientRect().exec();
@ -230,6 +232,7 @@ export default {
if (item) {
const { community_worker } = res;
uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false);
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
uni.setStorageSync('phone', res.account);
uni.hideLoading();
uni.showToast({

View File

@ -1,230 +1,203 @@
<template>
<div class="container">
<div
class="searchBox"
:style="{ height: localHeight + 'px', paddingTop: top + 'px' }"
>
<div class="searchBox_add">
<div class="searchBox_left">
<u-icon
bold
color="#000"
size="40"
name="arrow-left"
@click="headerBackClick"
></u-icon>
</div>
<div class="searchBox_mid">工单详情</div>
<div class="searchBox_right"></div>
</div>
</div>
<view class="container">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add">
<view class="searchBox_left">
<u-icon bold color="#000" size="40" name="arrow-left" @click="headerBackClick"></u-icon>
</view>
<view class="searchBox_mid">工单详情</view>
<view class="searchBox_right"></view>
</view>
</view>
<div class="repairMsg">
<div :class="['orderItemTit', statusType[info.status].style]">
<div class="orderItemTit_left">工单编号{{ info.order_code }}</div>
<div class="orderItemTit_right">{{ statusType[info.status].desc }}</div>
</div>
<view class="repairMsg">
<view :class="['orderItemTit', statusType[info.status].style]">
<view class="orderItemTit_left">工单编号{{ info.order_code }}</view>
<view class="orderItemTit_right">{{ statusType[info.status].desc }}</view>
</view>
<div class="row">
<div class="row_label">小区房源名称</div>
<div class="row_con">{{ info.room.name }}</div>
</div>
<view class="row">
<view class="row_label">小区房源名称</view>
<view class="row_con">{{ info.room.name }}</view>
</view>
<div class="row">
<div class="row_label">报修类型</div>
<div class="row_con">{{ info.ac.category_name }}</div>
</div>
<view class="row">
<view class="row_label">报修类型</view>
<view class="row_con">{{ info.ac.category_name }}</view>
</view>
<div class="row">
<div class="row_label">问题描述</div>
<div class="row_con">{{ info.problem_description }}</div>
</div>
<view class="row">
<view class="row_label">问题描述</view>
<view class="row_con">{{ info.problem_description }}</view>
</view>
<div class="row">
<div class="row_label">联系人</div>
<div class="row_con">{{ info.contact_name }}</div>
</div>
<view class="row">
<view class="row_label">联系人</view>
<view class="row_con">{{ info.contact_name }}</view>
</view>
<div class="row">
<div class="row_label">联系电话</div>
<div class="row_con">{{ info.contact_phone }}</div>
</div>
<view class="row">
<view class="row_label">联系电话</view>
<view class="row_con">{{ info.contact_phone }}</view>
</view>
<div class="row">
<div class="row_label">上门时间</div>
<div class="row_con">{{ info.service_time }}</div>
</div>
</div>
<view class="row">
<view class="row_label">上门时间</view>
<view class="row_con">{{ info.service_time }}</view>
</view>
</view>
<div class="repairMsg">
<div class="row">
<div class="row_label df">图片</div>
<div class="row_con">
<view class="repairMsg">
<view class="row">
<view class="row_label df">图片</view>
<view class="row_con">
<view v-if="info.imagesList && info.imagesList.length == 0">暂无图片</view>
<image
v-else
v-for="(item, index) in info.imagesList"
:key="index"
:src="item"
mode=""
@click="handlerPreviewImageClick(item)"
>
<image v-else v-for="(item, index) in info.imagesList" :key="index" :src="item" mode=""
@click="handlerPreviewImageClick(item)">
</image>
</div>
</div>
</view>
</view>
<div class="row">
<div class="row_label df">视频</div>
<div class="row_con">
<view class="row">
<view class="row_label df">视频</view>
<view class="row_con">
<view v-if="info.videosList && info.videosList.length == 0">暂无视频</view>
<div v-else v-for="(item, index) in info.videosList" :key="index" class="videoBOX">
<video id="myVideo" :src="item" playsinline webkit-playsinline></video>
</div>
</div>
</div>
<view v-else v-for="(item, index) in info.videosList" :key="index" class="videoBOX">
<video id="myVideo" :src="item" playsinline webkit-playsinline></video>
</view>
</view>
</view>
<div class="row" v-if="info.assign_time">
<div class="row_label">指派时间</div>
<div class="row_con noneBor">{{ info.assign_time }}</div>
</div>
</div>
<view class="row" v-if="info.assign_time">
<view class="row_label">指派时间</view>
<view class="row_con noneBor">{{ info.assign_time }}</view>
</view>
</view>
<!-- 维修状态非带指派 -->
<div class="repairMsg" v-if="info.status !== 1">
<div class="row">
<div class="row_label">维修师傅</div>
<div class="row_con">{{ info.repairman_worker.name }}</div>
</div>
<view class="repairMsg" v-if="info.status !== 1">
<view class="row">
<view class="row_label">维修师傅</view>
<view class="row_con">{{ info.repairman_worker.name }}</view>
</view>
<div class="row">
<div class="row_label">师傅手机号</div>
<div class="row_con">{{ info.repairman_worker.mobile }}</div>
</div>
<view class="row">
<view class="row_label">师傅手机号</view>
<view class="row_con">{{ info.repairman_worker.mobile }}</view>
</view>
<div class="row">
<div class="row_label">师傅工号</div>
<div class="row_con noneBor">{{ info.repairman_worker.emp_no }}</div>
</div>
</div>
<view class="row">
<view class="row_label">师傅工号</view>
<view class="row_con noneBor">{{ info.repairman_worker.emp_no }}</view>
</view>
</view>
<!-- 工单状态非带指派或者进行中 -->
<div class="repairMsg" v-if="info.status !== 1 && info.status !== 2">
<div class="row">
<div class="row_label df">维修图片</div>
<div class="row_con">
<view class="repairMsg" v-if="info.status !== 1 && info.status !== 2">
<view class="row">
<view class="row_label df">维修图片</view>
<view class="row_con">
<view v-if="info.repairImagesList && info.repairImagesList.length == 0">暂无图片</view>
<image
v-for="(item, index) in info.repairImagesList"
:key="index"
:src="item"
mode=""
@click="headerRepairImagesClick(item)"
/>
</div>
</div>
<image v-for="(item, index) in info.repairImagesList" :key="index" :src="item" mode=""
@click="headerRepairImagesClick(item)" />
</view>
</view>
<div class="row">
<div class="row_label df">维修视频</div>
<div class="row_con">
<view v-if="info.repairVideosList && info.repairVideosList.length == 0">暂无视频</view>
<div v-else v-for="(item, index) in info.repairVideosList" :key="index" class="videoBOX">
<video id="myVideo" :src="item" playsinline webkit-playsinline></video>
</div>
</div>
</div>
<view class="row">
<view class="row_label df">维修视频</view>
<view class="row_con">
<view v-if="info.repairVideosList && info.repairVideosList.length == 0">暂无视频</view>
<view v-else v-for="(item, index) in info.repairVideosList" :key="index" class="videoBOX">
<video id="myVideo" :src="item" playsinline webkit-playsinline></video>
</view>
</view>
</view>
<div class="row">
<div class="row_label">维修描述</div>
<div class="row_con noneBor">{{ info.repair_description || '暂无描述' }}</div>
</div>
</div>
<div class="repairMsg" v-if="type === 'edit'">
<div class="repairMedia">
<div class="edit_row df">
<div class="row_label">维修图片</div>
<div class="row_con2">
<view class="row">
<view class="row_label">维修描述</view>
<view class="row_con noneBor">{{ info.repair_description || '暂无描述' }}</view>
</view>
</view>
<view class="repairMsg" v-if="type === 'edit'">
<view class="repairMedia">
<view class="edit_row df">
<view class="row_label">维修图片</view>
<view class="row_con2">
<u-upload :fileList="imgList" name="imgList" @afterRead="afterReadImg" @delete="deletePic" multiple
:maxCount="10">
<div class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png" mode="widthFix"></image>
<view class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_imageImg.png"
mode="widthFix"></image>
上传图片
</div>
</view>
</u-upload>
</div>
</div>
</view>
</view>
<div class="edit_row df">
<div class="row_label">上传视频</div>
<div class="row_con2">
<u-upload v-if="!videoList.url" :fileList="videoList" @afterRead="afterReadVideo" @delete="deleteVideo" name="videoList"
:maxCount="1" accept="video">
<div class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_videoImg.png" mode="widthFix"></image>
<view class="edit_row df">
<view class="row_label">上传视频</view>
<view class="row_con2">
<u-upload v-if="!videoList.url" :fileList="videoList" @afterRead="afterReadVideo" @delete="deleteVideo"
name="videoList" :maxCount="1" accept="video">
<view class="imgCon">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_videoImg.png"
mode="widthFix"></image>
上传视频
</div>
</view>
</u-upload>
<div v-if="videoList.url" class="videoBOX">
<view v-if="videoList.url" class="videoBOX">
<video id="myVideo" :src="videoList.url" playsinline webkit-playsinline></video>
<div class="mask" @click="playFullScreenVideo">
<!-- <div class="mask_con">
<view class="mask" @click="playFullScreenVideo">
<!-- <view class="mask_con">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_play.png" mode="widthFix"></image>
</div> -->
<div class="mask_cancel" @click="cancels">删除</div>
</div>
</div>
</div>
</div>
</div>
</view> -->
<view class="mask_cancel" @click="cancels">删除</view>
</view>
</view>
</view>
</view>
</view>
<div class="edit_row">
<div class="row_label">维修描述</div>
<textarea placeholder="请输入维修描述" :value="repairRemarks" data-name="repairRemarks" @input="handlerInputClick" auto-height />
</div>
</div>
<div
class="white_container"
v-if="info.status == 2 && type === 'edit'"
@click="headerChangeStateClick"
>
<div style="display: flex; justify-content: space-between">
<div style="display: flex">
<div class="white_label">工单状态</div>
<div class="whit_desc">
<view class="edit_row">
<view class="row_label">维修描述</view>
<textarea placeholder="请输入维修描述" :value="repairRemarks" data-name="repairRemarks" @input="handlerInputClick"
auto-height />
</view>
</view>
<view class="white_container" v-if="info.status == 2 && type === 'edit'" @click="headerChangeStateClick">
<view style="display: flex; justify-content: space-between">
<view style="display: flex">
<view class="white_label">工单状态</view>
<view class="whit_desc">
{{ orderState.desc }}
</div>
</div>
</view>
</view>
<u-icon name="arrow-up" v-if="!orderSelect" />
<u-icon name="arrow-down" v-if="orderSelect" />
</div>
</view>
<view class="statePupop" v-if="orderSelect">
<view
class="statePopop_label"
v-for="(item, index) in orderStateList"
:key="index"
@click.stop="headerSelectClick(item)"
>{{ item.desc }}</view>
<view class="statePopop_label" v-for="(item, index) in orderStateList" :key="index"
@click.stop="headerSelectClick(item)">{{ item.desc }}</view>
</view>
</div>
</view>
<div class="btn_view" v-if="info.status == 1 && order_dispatch_permission">
<view class="btn" @click="headerTakeClick">接单</view>
<view class="btn_view" v-if="info.status == 1 && order_dispatch_permission">
<view class="btn" @click="headerSelectMasterClick">派单</view>
</div>
<!-- 待派单状态 无派单权限按钮 -->
<div class="btn" v-else-if="info.status == 1" @click="headerTakeClick">接单</div>
<!-- 进行中状态编辑维修信息 -->
<div class="btn" v-if="info.status == 2" @click="headerEditClick">
{{ type === "edit" ? "确定" : "编辑" }}
</div>
</view>
<u-popup
:show="show"
@close="close"
round="50rpx"
style="height: 50%; overflow: hidden"
>
<view class="btn_view" v-if="info.status == 1 && work_order_permission && allow_grab_order">
<view class="btn" @click="headerTakeClick">接单</view>
</view>
<!-- 待派单状态 无派单权限按钮 -->
<view class="btn" v-else-if="info.status == 1" @click="headerTakeClick">接单</view>
<!-- 进行中状态编辑维修信息 -->
<view class="btn" v-if="info.status == 2" @click="headerEditClick">
{{ type === "edit" ? "确定" : "编辑" }}
</view>
<u-popup :show="show" @close="close" round="50rpx" style="height: 50%; overflow: hidden">
<view class="master_popup">
<view class="master_popup_title">
<view></view>
@ -238,20 +211,21 @@
<view class="master_popup_tabel_left">
<view class="master_popup_label">
<view class="label">师傅名称</view>
<view>{{item.name}}</view>
<view>{{ item.name }}</view>
</view>
<view class="master_popup_label">
<view class="label">师傅手机号</view>
<view>{{ item.mobile }}</view>
</view>
</view>
<radio :value="item.worker_id" @click="headerRadioClick" :data-name="item.worker_id" :checked="checked === item.worker_id" />
<radio :value="item.worker_id" @click="headerRadioClick" :data-name="item.worker_id"
:checked="checked === item.worker_id" />
</view>
</view>
</view>
</view>
</u-popup>
</div>
</view>
</template>
<script>
@ -312,10 +286,13 @@ export default {
},
show: false,
communityMasterList: [],
order_dispatch_permission: false,
order_dispatch_permission: false,
work_order_permission: false,
allow_grab_order: false,
repairRemarks: '', //
imgList: [],
videoList: {},
videoList: {},
};
},
@ -352,45 +329,45 @@ export default {
},
//
async afterReadImg(e){
const { file} = e;
console.log(e);
async afterReadImg(e) {
const { file } = e;
console.log(e);
file.forEach(item => {
upload(item.url, res => {
console.log(res.data.path);
this.imgList.push({
url: picUrl + res.data.path,
picUrl: res.data.path,
picUrl: res.data.path,
})
})
})
uni.hideLoading();
uni.hideLoading();
uni.showToast({
title: '上传成功',
icon: 'success'
});
},
deletePic(e) {
this.imgList.splice(e.index, 1);
},
afterReadVideo(e){
uploadVideo(e.file.url, res => {
this.videoList = {
url: picUrl + res.data.url,
videos: res.data.url
}
})
},
deleteVideo() {
this.videoList = {};
},
title: '上传成功',
icon: 'success'
});
},
deletePic(e) {
this.imgList.splice(e.index, 1);
},
afterReadVideo(e) {
uploadVideo(e.file.url, res => {
this.videoList = {
url: picUrl + res.data.url,
videos: res.data.url
}
})
},
deleteVideo() {
this.videoList = {};
},
playFullScreenVideo() {
this.videoContext = this.videoContext || wx.createVideoContext('myVideo')
this.videoContext.requestFullScreen() //
},
cancels(e) {
this.videoList = {};
},
this.videoContext = this.videoContext || wx.createVideoContext('myVideo')
this.videoContext.requestFullScreen() //
},
cancels(e) {
this.videoList = {};
},
//
async headerEditClick() {
@ -411,8 +388,8 @@ export default {
});
setTimeout(() => {
uni.navigateBack({
delta: 1
})
delta: 1
})
}, 2000)
} else {
@ -421,9 +398,9 @@ export default {
},
// input
handlerInputClick(e) {
const { name} = e.currentTarget.dataset;
this[name] = e.detail.value
},
const { name } = e.currentTarget.dataset;
this[name] = e.detail.value
},
//
headerChangeStateClick() {
@ -436,51 +413,51 @@ export default {
this.orderSelect = false;
},
//
async headerConfirmClick() {
if (!this.checked) {
uni.showToast({
title: '请选择维修师傅',
icon: 'none'
})
return;
}
console.log('this.chec', this.checked);
const res = await request(apiArr.workOrderCrudDispatch, 'POST', {
worker_id: this.checked,
id: this.info.id,
})
uni.showToast({
title: '派单成功',
icon: 'success',
mask: true
})
setTimeout(() => {
uni.navigateBack({
delta: 1
})
}, 2000)
},
async headerConfirmClick() {
if (!this.checked) {
uni.showToast({
title: '请选择维修师傅',
icon: 'none'
})
return;
}
console.log('this.chec', this.checked);
const res = await request(apiArr.workOrderCrudDispatch, 'POST', {
worker_id: this.checked,
id: this.info.id,
})
uni.showToast({
title: '派单成功',
icon: 'success',
mask: true
})
setTimeout(() => {
uni.navigateBack({
delta: 1
})
}, 2000)
},
//
handlerPreviewImageClick(item) {
uni.previewImage({
urls: this.info.imagesList,
current: item,
});
},
uni.previewImage({
urls: this.info.imagesList,
current: item,
});
},
headerRepairImagesClick(item) {
uni.previewImage({
urls: this.info.repairImagesList,
current: item,
});
uni.previewImage({
urls: this.info.repairImagesList,
current: item,
});
},
//
headerRadioClick(e) {
console.log('e', e);
const { name } = e.currentTarget.dataset;
this.checked = name;
},
headerRadioClick(e) {
console.log('e', e);
const { name } = e.currentTarget.dataset;
this.checked = name;
},
close() {
this.show = false;
},
@ -502,15 +479,20 @@ export default {
onLoad(options) {
console.log("1111", options);
const order_dispatch_permission = uni.getStorageSync('order_dispatch_permission');
const order_dispatch_permission = uni.getStorageSync('order_dispatch_permission');
this.order_dispatch_permission = order_dispatch_permission;
const work_order_permission = uni.getStorageSync('work_order_permission');
this.work_order_permission = work_order_permission;
const allow_grab_order = uni.getStorageSync('allow_grab_order');
this.allow_grab_order = allow_grab_order;
const meun = menuButtonInfo();
this.top = meun.top;
this.localHeight = meun.height;
this.init(options.id);
},
onShow() {},
onShow() { },
};
</script>

View File

@ -0,0 +1,108 @@
.container {
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: #ffffff;
}
.searchBox {
display: flex;
align-items: center;
/* position: absolute; */
left: 0;
z-index: 2;
}
.searchBox_add {
margin: 10rpx 20rpx;
}
.emptyCommunity {
font-size: 28rpx;
color: #222222;
width: auto;
height: 44rpx;
padding: 5rpx 15rpx;
border-radius: 100rpx 100rpx 100rpx 100rpx;
display: flex;
align-items: center;
justify-content: center;
}
/* 背景图片区域 */
.bg-image-container {
position: relative;
width: 100%;
height: 500rpx;
overflow: hidden;
}
.bg-image {
width: 100%;
height: 100%;
}
.search-box {
position: absolute;
bottom: 50rpx;
left: 50%;
transform: translateX(-50%);
width: 80%;
height: 70rpx;
background-color: rgba(255, 255, 255, 0.9);
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
}
.search-placeholder {
font-size: 26rpx;
color: #999999;
}
/* 工单台区域 */
.work-order-section {
display: grid;
grid-template-columns: repeat(3, 1fr);
/* 创建3列等宽的网格 */
}
.work-order-card {
width: 246rpx;
height: 200rpx;
background-color: #ffffff;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border: 1rpx solid #f7f7f7;
}
.work-order-icon {
width: 100rpx;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 10rpx;
}
.work-order-icon .iconfont {
color: #ffffff;
margin: 0;
}
.work-order-text {
font-size: 26rpx;
color: #333333;
font-weight: bold;
}
/* 适配不同屏幕尺寸 */
@media screen and (min-width: 768px) {
.container {
max-width: 768px;
margin: 0 auto;
}
}

View File

@ -0,0 +1,79 @@
<template>
<view class="container">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add">
<view class="emptyCommunity" @click="addCommunity">
{{ communityVal }}
</view>
</view>
</view>
<!-- 背景图片区域 -->
<view class="bg-image-container">
<image class="bg-image" src="http://localhost:8080/test.png" mode="aspectFill"></image>
<view class="search-box">
<text class="search-placeholder">输入工单号进入工单</text>
</view>
</view>
<view class="work-order-section">
<view v-for="(item, index) in 9" :key="index">
<view class="work-order-card" v-if="index == 0 && showWorkOrderSection"
@click="navigateToWorkOrderDashboard">
<image class="work-order-icon" src="http://localhost:8080/workOrder.png" mode="aspectFill" />
<text class="work-order-text">工单台</text>
</view>
<view class="work-order-card" v-else></view>
</view>
</view>
</view>
</template>
<script>
import {
request,
picUrl,
uniqueByField,
menuButtonInfo,
NavgateTo,
} from "../../../utils";
import { apiArr } from "../../../api/community";
export default {
data() {
return {
communityVal: "添加我的房产",
showWorkOrderSection: false
}
},
onLoad() {
const workOrderPermission = uni.getStorageSync('work_order_permission');
const orderDispatchPermission = uni.getStorageSync('order_dispatch_permission');
this.showWorkOrderSection = !(workOrderPermission === false && orderDispatchPermission === false);
},
async onShow(){
this.communityVal = uni.getStorageSync('changeCommData').name;
const params = {
community_id: uni.getStorageSync('changeCommData').id,
}
const res = await request(apiArr.communityInfo, "POST", params);
uni.setStorageSync('allow_grab_order', res.allow_grab_order == 1 ? true : false);
},
methods: {
addCommunity() {
NavgateTo("/packages/community/myCommunity/index");
},
//
navigateToWorkOrderDashboard() {
uni.navigateTo({
url: '/packages/workOrderDashboard/index/index'
});
}
}
}
</script>
<style scoped>
/* 引入外部CSS文件 */
@import url("./index.css");
</style>

View File

@ -1,85 +1,85 @@
<template>
<view class="box">
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<div class="searchBox_add">
<div class="searchBox_left">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add">
<view class="searchBox_left">
<u-icon bold color="#000" size="40" name="arrow-left" @click="headerBackClick"></u-icon>
</div>
<div class="searchBox_mid">工作台</div>
<div class="searchBox_right"></div>
</div>
</div>
</view>
<view class="searchBox_mid">工单台</view>
<view class="searchBox_right"></view>
</view>
</view>
<div class="tabList">
<div
<view class="tabList">
<view
:class="active == 1 ? 'tab active' : 'tab'"
@click="headerTabsClick(1)"
>
待指派 <span>({{awaitingNumb}})</span>
</div>
<div
</view>
<view
:class="active == 2 ? 'tab active' : 'tab'"
@click="headerTabsClick(2)"
>
进行中 <span>({{ underwayNum }})</span>
</div>
<div
</view>
<view
:class="active == 4 ? 'tab active' : 'tab'"
@click="headerTabsClick(4)"
>
已作废 <span>({{ discardNum }})</span>
</div>
<div
</view>
<view
:class="active == 3 ? 'tab active' : 'tab'"
@click="headerTabsClick(3)"
>
已完成 <span>({{ doneNum }})</span>
</div>
</div>
</view>
</view>
<div class="orderList" v-for="(item, index) in list" :key="index">
<div class="orderItem" @click="handlerDetailClick(item.id)">
<div :class="['orderItemTit', statusType[item.status].style]">
<div class="orderItemTit_left">工单编号{{ item.order_code }}</div>
<div class="orderItemTit_right">{{ item.create_time }}</div>
</div>
<div class="orderItem_row">
<div class="df">
<div class="orderItem_row_label">小区房源名称</div>
<div class="orderItem_row_con">{{ item.room.name }}</div>
</div>
<view class="orderList" v-for="(item, index) in list" :key="index">
<view class="orderItem" @click="handlerDetailClick(item.id)">
<view :class="['orderItemTit', statusType[item.status].style]">
<view class="orderItemTit_left">工单编号{{ item.order_code }}</view>
<view class="orderItemTit_right">{{ item.create_time }}</view>
</view>
<view class="orderItem_row">
<view class="df">
<view class="orderItem_row_label">小区房源名称</view>
<view class="orderItem_row_con">{{ item.room.name }}</view>
</view>
<div :class="['orderItem_row_state', statusType[item.status].color]">
<view :class="['orderItem_row_state', statusType[item.status].color]">
{{ statusType[item.status].desc }}
</div>
</div>
</view>
</view>
<div class="orderItem_row">
<div class="orderItem_row_label">报修类型</div>
<div class="orderItem_row_con">{{ item.ac.category_name }}</div>
</div>
<view class="orderItem_row">
<view class="orderItem_row_label">报修类型</view>
<view class="orderItem_row_con">{{ item.ac.category_name }}</view>
</view>
<div class="orderItem_row">
<div class="orderItem_row_label">问题描述</div>
<div class="orderItem_row_con">{{ item.problem_description }}</div>
</div>
<view class="orderItem_row">
<view class="orderItem_row_label">问题描述</view>
<view class="orderItem_row_con">{{ item.problem_description }}</view>
</view>
<div class="orderItem_row">
<div class="orderItem_row_label">上门时间</div>
<div class="orderItem_row_con">{{ item.service_time }}</div>
</div>
<view class="orderItem_row">
<view class="orderItem_row_label">上门时间</view>
<view class="orderItem_row_con">{{ item.service_time }}</view>
</view>
<div class="orderItem_row">
<div class="orderItem_row_label">联系人</div>
<div class="orderItem_row_con">{{ item.contact_name }}</div>
</div>
<view class="orderItem_row">
<view class="orderItem_row_label">联系人</view>
<view class="orderItem_row_con">{{ item.contact_name }}</view>
</view>
<div class="orderItem_row">
<div class="orderItem_row_label">联系人手机号</div>
<div class="orderItem_row_con">{{ item.contact_phone }}</div>
</div>
</div>
</div>
<view class="orderItem_row">
<view class="orderItem_row_label">联系人手机号</view>
<view class="orderItem_row_con">{{ item.contact_phone }}</view>
</view>
</view>
</view>
</view>
</template>

View File

@ -95,6 +95,13 @@
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "guide/index",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#fff"
}
}
]
},

View File

@ -367,7 +367,7 @@ export default {
goToWuye() {
uni.navigateTo({
url: '/packages/workOrderDashboard/index/index'
url: '/packages/workOrderDashboard/guide/index'
})
},

View File

@ -147,6 +147,8 @@ export default {
uni.removeStorageSync('is_shop');
uni.removeStorageSync('shopId');
uni.removeStorageSync('order_dispatch_permission');
uni.removeStorageSync('work_order_permission');
uni.removeStorageSync('nickName');
uni.removeStorageSync('changeCommData');
console.error('用户拒绝授权:', event.detail.errMsg);
@ -159,6 +161,7 @@ export default {
}, { silent: false }).then(res => {
const { community_worker } = res;
uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false);
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
uni.setStorageSync('nickName', res.nick_name);
console.log(res)
})

View File

@ -232,6 +232,8 @@
uni.removeStorageSync('is_shop');
uni.removeStorageSync('shopId');
uni.removeStorageSync('order_dispatch_permission');
uni.removeStorageSync('work_order_permission');
const button = uni.createSelectorQuery().select('#hiddenLoginBtn');
button.boundingClientRect().exec();
@ -372,6 +374,7 @@
if (item) {
const { community_worker } = res;
uni.setStorageSync('order_dispatch_permission', community_worker && community_worker[0].order_dispatch_permission == 1 || false);
uni.setStorageSync('work_order_permission', community_worker && community_worker[0].work_order_permission == 1 || false);
uni.setStorageSync('phone', res.account);
uni.hideLoading();
uni.showToast({