| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440 |
- <template>
- <view class="container">
- <view class="top_bg" @click="permission = !permission"></view>
- <view class="body">
- <!-- 每一个订单区域 -->
- <view class="body_item" v-for="item in dataList" :key="item.id">
- <!-- 工单编号 -->
- <view class="item_title">
- <img src="../../static/images/repairsImg/order.png" />
- <view class="title_info">工单编号:{{ item.order }}</view>
- </view>
- <!-- 报修时间 -->
- <view class="item_time">
- <view class="time_msg">
- 报修时间:
- <text>{{ item.time }}</text>
- </view>
- <view class="time_type">待接单</view>
- </view>
- <!-- 报修姓名 -->
- <view class="item_box">
- <view class="box_key">报修姓名:</view>
- <view class="box_value">{{ item.name }}</view>
- </view>
- <!-- 报修电话 -->
- <view class="item_box">
- <view class="box_key">报修电话:</view>
- <view class="box_value phone" @click="handleCallPhone('13820846714')">
- {{ item.phone }}
- <img src="../../static/images/repairsImg/phone.png" />
- </view>
- </view>
- <!-- 报修区域 -->
- <view class="item_box">
- <view class="box_key">报修区域:</view>
- <view class="box_value">{{ item.area }}</view>
- </view>
- <!-- 详细地址 -->
- <view class="item_box">
- <view class="box_key">详细地址:</view>
- <view class="box_value">{{ item.address }}</view>
- </view>
- <!-- 报修物品 -->
- <view class="item_box">
- <view class="box_key">报修物品:</view>
- <view class="box_value">{{ item.goods }}</view>
- </view>
- <!-- 故障描述 -->
- <view class="item_box">
- <view class="box_key">故障描述:</view>
- <view class="box_value">{{ item.description }}</view>
- </view>
- <!-- 上传图片 -->
- <view class="item_img">
- <view class="img_key">上传图片:</view>
- <img class="img_value" mode="aspectFill" :src="item.img[0]" @click="handleLookImgs(item.img)" />
- </view>
- <!-- 按钮区域 -->
- <view class="item_btn">
- <img src="../../static/images/repairsImg/close.png" @click="handleClose" />
- <view class="btn_box type" v-if="permission" @click="handleDelay">延时</view>
- <view class="btn_box type" @click="handleOrderReceiving">接单</view>
- <view class="btn_box type2" v-if="permission" @click="handleSendOrder">派单</view>
- </view>
- <!-- 关闭按钮弹窗 -->
- <uni-popup ref="popup_close" :is-mask-click="false">
- <view class="popup_close">
- <view
- :class="[{ active: activeIndex === index }, { radius: index === 0 }]"
- class="close_box"
- v-for="(ele, index) in closeList"
- :key="index"
- @click="handleChangeItem(index)"
- >
- {{ ele }}
- </view>
- <view class="close_btn">
- <view class="btn_box cancel" @click="$refs.popup_close[0].close()">取消</view>
- <view class="btn_box confirm" @click="handleCloseConfirm">确定</view>
- </view>
- </view>
- </uni-popup>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- permission: true,
- // 关闭按钮弹窗当前索引
- activeIndex: 0,
- // 关闭按钮弹窗选项数组
- closeList: ['重复报单', '不属于维修范围', '已维修完成'],
- dataList: [
- {
- id: 1,
- order: '656262219626262',
- overtime: true,
- time: '2023.07.05 09:25:26',
- type: 1,
- name: '张三',
- phone: '13659585689',
- area: '行政楼',
- address: '3楼309',
- goods: '电脑',
- description: '水龙头坏了',
- img: [
- 'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
- 'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
- 'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
- ]
- },
- {
- id: 2,
- order: '956262219626262',
- overtime: false,
- time: '2023.07.05 09:25:26',
- type: 2,
- name: '李四',
- phone: '13659585689',
- area: '行政楼',
- address: '3楼309',
- goods: '电脑',
- description: '电脑坏了',
- img: [
- 'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
- 'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
- 'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
- ],
- workerName: '老张',
- workerPhone: '13659585689'
- },
- {
- id: 3,
- order: '956262219626262',
- overtime: false,
- time: '2023.07.05 09:25:26',
- type: 3,
- name: '李四',
- phone: '13659585689',
- area: '行政楼',
- address: '3楼309',
- goods: '电脑',
- description: '电脑坏了',
- img: [
- 'https://img1.baidu.com/it/u=920310517,1559263161&fm=253&fmt=auto&app=138&f=JPEG?w=889&h=500',
- 'https://13lz.cn/d/file/2021-06-12/f54cce5a0208c756c112407ec6ca1ac0.jpg',
- 'https://inews.gtimg.com/newsapp_bt/0/12555654161/1000'
- ],
- workerName: '老张',
- workerPhone: '13659585689',
- money: 50
- }
- ]
- }
- },
- methods: {
- // 接单按钮回调
- handleOrderReceiving() {
- uni.showModal({
- content: '确定接单吗?',
- title: '提示',
- success: (res) => {
- if (res.confirm) {
- uni.showToast({
- title: '接单成功',
- icon: 'none'
- })
- }
- }
- })
- },
- // 关闭图标点击回调
- handleClose() {
- this.activeIndex = 0
- this.$refs.popup_close[0].open('center')
- },
- // 关闭弹窗确定按钮回调
- handleCloseConfirm() {
- uni.showModal({
- title: '提示',
- content: '确定关闭订单吗?',
- success: (res) => {
- if (res.confirm) {
- uni.showToast({
- title: '关单成功',
- icon: 'none'
- })
- console.log(this.closeList[this.activeIndex])
- this.$refs.popup_close[0].close()
- }
- }
- })
- },
- // 关闭按钮弹窗选中按钮时回调
- handleChangeItem(val) {
- this.activeIndex = val
- },
- // 延时按钮回调
- handleDelay() {
- uni.navigateTo({
- url: '/pagesRepairs/delay/delay'
- })
- },
- // 派单按钮回调
- handleSendOrder() {
- uni.navigateTo({
- url: '/pagesRepairs/helpPeople/helpPeople?type=2'
- })
- },
- // 点击电话号码回调
- handleCallPhone(phone) {
- console.log(phone)
- uni.makePhoneCall({
- phoneNumber: phone
- })
- },
- // 点击图片回调
- handleLookImgs(img) {
- // console.log(img)
- uni.previewImage({
- urls: img
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .container {
- width: 100vw;
- height: calc(100vh - 152rpx);
- overflow-y: auto;
- .top_bg {
- height: 165rpx;
- background-color: #6fb6b8;
- }
- .body {
- box-sizing: border-box;
- margin: auto;
- margin-top: -100rpx;
- padding: 2rpx;
- width: 690rpx;
- border-radius: 11rpx 11rpx 0 0;
- background-color: #fff;
- overflow-y: auto;
- .body_item {
- margin-bottom: 20rpx;
- border-radius: 11rpx;
- box-shadow: 0 0 8rpx #d9d9d9;
- .item_title {
- display: flex;
- align-items: center;
- padding: 0 30rpx;
- height: 87rpx;
- border-bottom: 1rpx solid #e6e6e6;
- img {
- width: 30rpx;
- height: 30rpx;
- }
- .title_info {
- margin: 0 21rpx 0 13rpx;
- font-size: 28rpx;
- }
- }
- .item_time {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 30rpx;
- height: 79rpx;
- .time_msg {
- font-size: 28rpx;
- color: #808080;
- text {
- color: #000000;
- }
- }
- .time_type {
- font-size: 32rpx;
- color: #ff5733;
- }
- }
- .item_box {
- display: flex;
- padding: 0 30rpx;
- height: 60rpx;
- font-size: 28rpx;
- .box_key {
- color: #808080;
- }
- .box_value {
- display: flex;
- img {
- margin-top: 5rpx;
- margin-left: 10rpx;
- width: 28rpx;
- height: 28rpx;
- }
- }
- .phone {
- color: #6fb6b8;
- }
- }
- .item_img {
- display: flex;
- align-items: center;
- padding: 0 30rpx;
- height: 120rpx;
- color: #808080;
- font-size: 28rpx;
- .img_key {
- }
- .img_value {
- width: 120rpx;
- height: 120rpx;
- border-radius: 14rpx;
- }
- }
- .item_btn {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- padding: 0 30rpx;
- height: 153rpx;
- img {
- margin-right: auto;
- width: 56rpx;
- height: 56rpx;
- }
- .btn_box {
- display: flex;
- justify-content: center;
- align-items: center;
- margin-left: 16rpx;
- width: 174rpx;
- height: 68rpx;
- font-size: 28rpx;
- border-radius: 11rpx;
- }
- .type {
- color: #fff;
- background-color: #6fb6b8;
- }
- .type2 {
- color: #6fb6b8;
- background-color: #fff;
- border: 1rpx solid #6fb6b8;
- }
- }
- .popup_close {
- width: 690rpx;
- border-radius: 19rpx;
- background-color: #fff;
- .close_box {
- height: 100rpx;
- line-height: 100rpx;
- text-align: center;
- font-size: 32rpx;
- border: 1rpx solid #e6e6e6;
- }
- .radius {
- border-radius: 19rpx 19rpx 0 0;
- }
- .active {
- color: #fff;
- background-color: #6fb6b8;
- }
- .close_btn {
- display: flex;
- align-items: center;
- justify-content: space-evenly;
- margin-top: 100rpx;
- height: 121rpx;
- .btn_box {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 203rpx;
- height: 72rpx;
- border-radius: 9rpx;
- font-size: 32rpx;
- }
- .cancel {
- background-color: #e5e5e5;
- color: #6fb6b8;
- }
- .confirm {
- background-color: #6fb6b8;
- color: #fff;
- }
- }
- }
- }
- }
- }
- </style>
|