|
@@ -1,17 +1,33 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
- <view class="message">
|
|
|
+ <view class="message" v-if="detailsData">
|
|
|
<view class="messageDetail">
|
|
|
- <view class="messageTitle">{{item.notice.title}}</view>
|
|
|
- <view class="messageTime">{{item.notice.releaseDate}} 发布</view>
|
|
|
+ <view class="messageTitle">{{detailsData.title}}</view>
|
|
|
+ <view class="messageTime">{{detailsData.releaseDate}} 发布</view>
|
|
|
</view>
|
|
|
- <view class="messageContent" v-if="item.notice.type!='tx'">
|
|
|
- <jyf-parser :html="item.notice.content" ref="article"></jyf-parser>
|
|
|
+ <view class="messageContent" v-if="detailsData.type!='tx'">
|
|
|
+ <jyf-parser :html="detailsData.content" ref="article"></jyf-parser>
|
|
|
+ <view class="msgFujian">
|
|
|
+ <view v-if="detailsData.imgPaths&&detailsData.imgPaths.length">
|
|
|
+ <view class="tits">图片:</view>
|
|
|
+ <view class="flex justify_between pimgs" style="flex-wrap: wrap;" @click="viewPhoto(detailsData.imgPaths)">
|
|
|
+ <u-image v-for="item in detailsData.imgPaths" :src="item" width="150" height='150'></u-image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-if="detailsData.attachList&&detailsData.attachList.length">
|
|
|
+ <view class="tits">附件(不支持查看和下载附件,请登录pc电脑端查看):</view>
|
|
|
+ <view class="flex justify_between pimgs" style="flex-wrap: wrap;">
|
|
|
+ <view style="margin: 0 0 5px;" v-for="(item,index) in detailsData.attachList" :key="index">
|
|
|
+ <text>{{ item.fileName }}</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<view class="messageContent" v-else>
|
|
|
- <text style="margin-right: 20rpx;">{{item.notice.plainContent}}</text>
|
|
|
- <u-button @click="toAction(item)" shape="circle" plain size="mini" type="primary">
|
|
|
- {{ item.notice.extInfo.bizType == 'SHELF_REPLENISH' ? '立即处理':'点击查看' }}
|
|
|
+ <text style="margin-right: 20rpx;">{{detailsData.plainContent}}</text>
|
|
|
+ <u-button @click="toAction(detailsData)" shape="circle" plain size="mini" type="primary">
|
|
|
+ {{ detailsData.extInfo.bizType == 'SHELF_REPLENISH' ? '立即处理':'点击查看' }}
|
|
|
</u-button>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -20,45 +36,61 @@
|
|
|
|
|
|
<script>
|
|
|
import jyfParser from "@/components/jyf-parser/jyf-parser"
|
|
|
+ import {noticeUserDetail} from "@/api/user.js"
|
|
|
export default{
|
|
|
components: {
|
|
|
jyfParser
|
|
|
},
|
|
|
data(){
|
|
|
return{
|
|
|
- item: {
|
|
|
- createDate: '',
|
|
|
- notice:{
|
|
|
- title: '',
|
|
|
- content: ''
|
|
|
- }
|
|
|
- }
|
|
|
+ itemId: null,
|
|
|
+ detailsData: null
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- let item = JSON.parse(options.item)
|
|
|
- this.item = Object.assign(this.item,item)
|
|
|
- // this.item.notice.extInfo = JSON.parse(this.item.notice.extInfo)
|
|
|
- console.log(item)
|
|
|
+ this.itemId = options.id
|
|
|
+ this.getDetail()
|
|
|
},
|
|
|
methods:{
|
|
|
+ viewPhoto(images){
|
|
|
+ uni.previewImage({
|
|
|
+ urls: images,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取详情
|
|
|
+ getDetail () {
|
|
|
+ noticeUserDetail({ id: this.itemId }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.detailsData = res.data
|
|
|
+ if (this.detailsData.extInfo) {
|
|
|
+ this.detailsData.extInfo = JSON.parse(this.detailsData.extInfo)
|
|
|
+ }
|
|
|
+ if(this.detailsData.imgPaths){
|
|
|
+ this.detailsData.imgPaths = this.detailsData.imgPaths.split(',')
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.detailsData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
toAction (data) {
|
|
|
// 急送订单
|
|
|
- if (data.notice.extInfo.bizType == 'TEMP_ORDER') {
|
|
|
- uni.redirectTo({ url: '/pages/sales/edit?pageType=detail&data='+JSON.stringify({ salesBillSn: data.notice.extInfo.bizSn }) })
|
|
|
+ if (data.extInfo.bizType == 'TEMP_ORDER') {
|
|
|
+ uni.redirectTo({ url: '/pages/sales/edit?pageType=detail&data='+JSON.stringify({ salesBillSn: data.extInfo.bizSn }) })
|
|
|
}
|
|
|
// 补货订单
|
|
|
- if (data.notice.extInfo.bizType == 'SHELF_REPLENISH') {
|
|
|
+ if (data.extInfo.bizType == 'SHELF_REPLENISH') {
|
|
|
uni.redirectTo({ url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM' })
|
|
|
}
|
|
|
// 货架订单
|
|
|
- if (data.notice.extInfo.bizType == 'SHELF_ORDER') {
|
|
|
- uni.redirectTo({ url: '/pages/shelfOrder/orderDetail?pageType=detail&orderBillSn='+data.notice.extInfo.bizSn })
|
|
|
+ if (data.extInfo.bizType == 'SHELF_ORDER') {
|
|
|
+ uni.redirectTo({ url: '/pages/shelfOrder/orderDetail?pageType=detail&orderBillSn='+data.extInfo.bizSn })
|
|
|
}
|
|
|
// 货架异常
|
|
|
- if (data.notice.extInfo.bizType == 'SHELF_WARN') {
|
|
|
- const shelfName = data.notice.plainContent.split('已经超过')[0]
|
|
|
- uni.redirectTo({ url: '/pages/shelfOrder/shelfOrder?bizType=SHELF_WARN&shelfSn='+data.notice.extInfo.bizSn+'&shelfName='+shelfName })
|
|
|
+ if (data.extInfo.bizType == 'SHELF_WARN') {
|
|
|
+ const shelfName = data.plainContent.split('已经超过')[0]
|
|
|
+ uni.redirectTo({ url: '/pages/shelfOrder/shelfOrder?bizType=SHELF_WARN&shelfSn='+data.extInfo.bizSn+'&shelfName='+shelfName })
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -94,6 +126,17 @@
|
|
|
word-break: break-all;
|
|
|
}
|
|
|
}
|
|
|
+ .msgFujian{
|
|
|
+ padding: 20upx 0;
|
|
|
+ .tits{
|
|
|
+ color:#999;
|
|
|
+ }
|
|
|
+ .pimgs{
|
|
|
+ > view{
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
</style>
|