-
4src/manifest.json
-
39src/pages.json
-
5src/pages/index/index.vue
-
13src/pages/menu/forth.vue
-
BINsrc/static/images/tab/ta_1.png
-
BINsrc/static/images/tab/ta_2.png
-
BINsrc/static/images/tab/ta_3.png
-
BINsrc/static/images/tab/ta_4.png
-
BINsrc/static/images/tab/tab_1.png
-
BINsrc/static/images/tab/tab_2.png
-
BINsrc/static/images/tab/tab_3.png
-
BINsrc/static/images/tab/tab_4.png
-
2src/subpackage/menu/components/mine/line_tab.vue
-
30src/subpackage/message/components/detail/answer_item.vue
-
27src/subpackage/message/components/detail/image_flow.vue
-
26src/subpackage/message/components/detail/info.vue
-
2src/subpackage/message/components/edit/upload_img.vue
-
1src/subpackage/message/components/fixed_button.vue
-
12src/subpackage/message/components/message_item.vue
-
5src/subpackage/message/js/api.js
-
138src/subpackage/message/pages/complaint/detail.vue
-
18src/subpackage/message/pages/complaint/list.vue
-
171src/subpackage/message/pages/work_order/detail.vue
-
105src/subpackage/message/pages/work_order/list.vue
-
BINsrc/subpackage/message/static/images/arrow_b2.png
-
BINsrc/subpackage/message/static/images/message.png
-
8src/utils/util.js
After Width: 56 | Height: 56 | Size: 558 B |
After Width: 56 | Height: 56 | Size: 795 B |
After Width: 56 | Height: 56 | Size: 726 B |
After Width: 56 | Height: 56 | Size: 553 B |
After Width: 56 | Height: 56 | Size: 653 B |
After Width: 56 | Height: 56 | Size: 986 B |
After Width: 56 | Height: 56 | Size: 939 B |
After Width: 56 | Height: 56 | Size: 668 B |
@ -0,0 +1,171 @@ |
|||||
|
<template> |
||||
|
<view class="complaint-detail"> |
||||
|
<view class="top-status">当前状态:{{ orderInfo.status || '-' }}</view> |
||||
|
<view class="heigh-space" style="height: 24upx;"></view> |
||||
|
<detail-info |
||||
|
:title="orderInfo.title || '-'" |
||||
|
:type="orderInfo.type || '-'" |
||||
|
:content="orderInfo.content || '-'" |
||||
|
></detail-info> |
||||
|
<block v-if="imgArr.length"> |
||||
|
<view class="heigh-space" style="height: 24upx;"></view> |
||||
|
<image-flow :imgs="imgArr"></image-flow> |
||||
|
</block> |
||||
|
<view class="heigh-space" style="height: 24upx;"></view> |
||||
|
<button class="right-btn" @click="replyBtn">回复</button> |
||||
|
<block v-for="(e, i) in commentArr" :key="i"> |
||||
|
<view class="heigh-space" style="height: 24upx;"></view> |
||||
|
<answer-item |
||||
|
:name="e.user_name || ''" |
||||
|
:time="e.reply_time || ''" |
||||
|
:content="e.content || ''" |
||||
|
:active-bg="e.is_creator" |
||||
|
></answer-item> |
||||
|
</block> |
||||
|
|
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import detailInfo from "../../components/detail/info.vue"; |
||||
|
import imageFlow from "../../components/detail/image_flow.vue"; |
||||
|
import answerItem from "../../components/detail/answer_item.vue"; |
||||
|
import { routeTo, debounce, showLoad, hideLoad, showModal, showNone } from "@/utils/util.js"; |
||||
|
import { MESSAGE_API } from "../../js/api.js"; |
||||
|
import server from "../../js/server.js"; |
||||
|
export default { |
||||
|
components: { |
||||
|
detailInfo, imageFlow, answerItem |
||||
|
}, |
||||
|
computed: { |
||||
|
imgArr(){ |
||||
|
let { orderInfo } = this; |
||||
|
let _showimgs = orderInfo?.showimgs ?? []; |
||||
|
return _showimgs; |
||||
|
}, |
||||
|
commentArr(){ |
||||
|
let { orderInfo } = this; |
||||
|
let _comment = orderInfo?.comment ?? []; |
||||
|
return _comment; |
||||
|
} |
||||
|
}, |
||||
|
data(){ |
||||
|
return { |
||||
|
orderInfo: {} |
||||
|
} |
||||
|
}, |
||||
|
onLoad(options){ |
||||
|
this.workorderInfo({ |
||||
|
brand_id: options?.brand_id ?? '', |
||||
|
id: options?.id ?? '' |
||||
|
}) |
||||
|
}, |
||||
|
methods: { |
||||
|
replyBtn(){ |
||||
|
let { orderInfo } = this; |
||||
|
showModal({ |
||||
|
title: '回复', |
||||
|
showCancel: true, |
||||
|
editable: true, |
||||
|
placeholderText: '请输入回复内容', |
||||
|
success: mRes=>{ |
||||
|
console.log('replyBtn mRes --->', mRes); |
||||
|
if(mRes?.confirm && mRes?.content)this.workorderReply({ |
||||
|
brand_id: orderInfo?.brand_id ?? '', |
||||
|
id: orderInfo?.id ?? '', |
||||
|
reply_text: mRes?.content ?? '' |
||||
|
}) |
||||
|
.then(res =>{ |
||||
|
if(res === 'success'){ |
||||
|
setTimeout(_=>{ |
||||
|
this.workorderInfo({ |
||||
|
brand_id: orderInfo?.brand_id ?? '', |
||||
|
id: orderInfo?.id ?? '' |
||||
|
}) |
||||
|
}, 1000); |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
workorderInfo({ brand_id, id }){ |
||||
|
showLoad(); |
||||
|
return server.post({ |
||||
|
url: MESSAGE_API.workorderInfo, |
||||
|
data: { brand_id: +brand_id, id: +id }, |
||||
|
isDefaultGet: false, |
||||
|
}) |
||||
|
.then(res => { |
||||
|
hideLoad(); |
||||
|
let _data = res?.data || {}; |
||||
|
if(_data.code === 0){ |
||||
|
let _info = _data?.data ?? {}; |
||||
|
return this.orderInfo = _info; |
||||
|
}else{ |
||||
|
return Promise.reject(_data); |
||||
|
} |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
hideLoad(); |
||||
|
showModal({ |
||||
|
title: '提示', |
||||
|
content: err.message || '加载失败!' |
||||
|
}) |
||||
|
console.warn('subpackage message pages work_order detail workorderInfo err --->', err); |
||||
|
// return Promise.reject(err); |
||||
|
}) |
||||
|
}, |
||||
|
workorderReply({ brand_id, id, reply_text }){ |
||||
|
showLoad(); |
||||
|
return server.post({ |
||||
|
url: MESSAGE_API.workorderReply, |
||||
|
data: { brand_id: +brand_id, id: +id, reply_text }, |
||||
|
isDefaultGet: false, |
||||
|
}) |
||||
|
.then(res => { |
||||
|
hideLoad(); |
||||
|
let _data = res?.data || {}; |
||||
|
if(_data.code === 0){ |
||||
|
showNone(_data?.message ?? '回复成功!'); |
||||
|
return 'success' |
||||
|
}else{ |
||||
|
return Promise.reject(_data); |
||||
|
} |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
hideLoad(); |
||||
|
showModal({ |
||||
|
title: '提示', |
||||
|
content: err.message || '操作失败!' |
||||
|
}) |
||||
|
console.warn('subpackage message pages work_order detail workorderReply err --->', err); |
||||
|
// return Promise.reject(err); |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.complaint-detail{ |
||||
|
padding: 24upx; |
||||
|
@include isPd(24upx); |
||||
|
} |
||||
|
.top-status{ |
||||
|
padding: 0 24upx; |
||||
|
text-align: center; |
||||
|
border-radius: 10upx; |
||||
|
background: #fff; |
||||
|
@include tHide; |
||||
|
@include flcw(28upx, 84upx, #1A1A1A); |
||||
|
} |
||||
|
.right-btn{ |
||||
|
margin-left: auto; |
||||
|
margin-right: 0upx; |
||||
|
width: 192upx; |
||||
|
text-align: center; |
||||
|
border-radius: 10upx; |
||||
|
background: $mColor; |
||||
|
@include flcw(32upx, 88upx, #FFFFFF); |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,105 @@ |
|||||
|
<template> |
||||
|
<view class="complaint-list"> |
||||
|
<view class="cl-ls"> |
||||
|
<block v-for="(e, i) in listData" :key="i"> |
||||
|
<message-item |
||||
|
:title="e.title" |
||||
|
:status="e.status" |
||||
|
:content="e.content" |
||||
|
@click:item="itemClick(e)" |
||||
|
></message-item> |
||||
|
<view style="height: 24rpx;"></view> |
||||
|
</block> |
||||
|
</view> |
||||
|
<fixed-button @click="clickBtn"></fixed-button> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import fixedButton from "../../components/fixed_button.vue"; |
||||
|
import messageItem from "../../components/message_item.vue"; |
||||
|
import { routeTo, debounce, showLoad, hideLoad, showModal, showNone } from "@/utils/util.js"; |
||||
|
import { MESSAGE_API } from "../../js/api.js"; |
||||
|
import server from "../../js/server.js"; |
||||
|
export default { |
||||
|
components: { |
||||
|
fixedButton, |
||||
|
messageItem, |
||||
|
}, |
||||
|
data(){ |
||||
|
return { |
||||
|
brand_id: '', |
||||
|
listData: [], |
||||
|
page: 1 |
||||
|
} |
||||
|
}, |
||||
|
onLoad(options){ |
||||
|
let _bid = options?.brand_id ?? ''; |
||||
|
this.brand_id = _bid; |
||||
|
this.workorderList({ brand_id: _bid }); |
||||
|
}, |
||||
|
async onPullDownRefresh(){ |
||||
|
let { brand_id } = this; |
||||
|
this.listData = []; |
||||
|
this.page = 1; |
||||
|
await this.workorderList({ brand_id }); |
||||
|
uni.stopPullDownRefresh(); |
||||
|
}, |
||||
|
onReachBottom(){ |
||||
|
let { page, brand_id } = this; |
||||
|
this.workorderList({ page: page + 1, brand_id }); |
||||
|
}, |
||||
|
methods: { |
||||
|
itemClick(e){ |
||||
|
let { brand_id } = this; |
||||
|
let _qryStr = `brand_id=${brand_id ?? ''}&id=${e?.id ?? ''}`; |
||||
|
routeTo(`/subpackage/message/pages/work_order/detail?${_qryStr}`, 'nT'); |
||||
|
}, |
||||
|
clickBtn(){ |
||||
|
let { brand_id } = this; |
||||
|
routeTo(`/subpackage/message/pages/work_order/edit?brand_id=${brand_id ?? ''}`, 'nT'); |
||||
|
}, |
||||
|
workorderList({ brand_id, page = 1, page_size = 20}){ |
||||
|
showLoad(); |
||||
|
return server.post({ |
||||
|
url: MESSAGE_API.workorderList, |
||||
|
data: { brand_id: +brand_id, page, page_size }, |
||||
|
isDefaultGet: false, |
||||
|
}) |
||||
|
.then(res => { |
||||
|
hideLoad(); |
||||
|
let _data = res?.data || {}; |
||||
|
if(_data.code === 0){ |
||||
|
let _ls = _data?.data ?? []; |
||||
|
if(page === 1)return this.listData = _ls; |
||||
|
if(!_ls.length)return showNone('没有更多!'); |
||||
|
this.page = page; |
||||
|
this.listData = [ ...this.listData, ..._ls ]; |
||||
|
return _ls; |
||||
|
}else{ |
||||
|
return Promise.reject(_data); |
||||
|
} |
||||
|
}) |
||||
|
.catch(err => { |
||||
|
hideLoad(); |
||||
|
showModal({ |
||||
|
title: '提示', |
||||
|
content: err.message || '加载失败!' |
||||
|
}) |
||||
|
console.warn('subpackage message pages work_order list workorderList err --->', err); |
||||
|
// return Promise.reject(err); |
||||
|
}) |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss"> |
||||
|
.complaint-list{ |
||||
|
@include isPd(132upx); |
||||
|
.cl-ls{ |
||||
|
padding: 28upx 24upx 0; |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</style> |
After Width: 15 | Height: 15 | Size: 226 B |
After Width: 54 | Height: 54 | Size: 959 B |