hz-zhhq-app/pages/epidemic/epidemic-supplies-detail.vue

404 lines
9.8 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="hzIndex">
<hzHeader title="物资申请详情"></hzHeader>
<view class="hzContent" style="padding-top: 200upx;">
<view class="details">
<view class="detail_msg">
<view class="info-item">
<text class="label">申请时间 </text>
<text class="infoSpan">{{formatDate(item.GMT_CREATED,'dateTime')}}</text>
</view>
<view class="info-item">
<text class="label">   </text>
<text class="infoSpan">{{item.USER_NAME}}</text>
</view>
<view @click="callPhone(item.PHONE)" class="info-item">
<text class="label">联系方式 </text>
<text class="infoSpan" >{{ item.PHONE }}</text>
</view>
<view class="info-item">
<text class="label">   </text>
<text class="infoSpan">{{ item.ORG_NAME }}</text>
</view>
<view class="info-item">
<text class="label">   </text>
<text class="infoSpan">{{ item.REASON }}</text>
</view>
</view>
<view class="detail_msg" v-for="(detail, index) in item.DETAIL_LIST" :key="index">
<view class="info-item">
<text class="label">   </text>
<text class="infoSpan">{{detail.MATERIAL_NAME}}</text>
</view>
<view class="info-item">
<text class="label">   </text>
<text class="infoSpan">{{detail.SPECS}}</text>
</view>
<view class="info-item">
<text class="label">   </text>
<text class="infoSpan" >{{ detail.NUM }}</text>
</view>
<view class="info-item" v-if="detail.REMARKS">
<text class="label">   </text>
<text class="infoSpan">{{ detail.REMARKS }}</text>
</view>
</view>
</view>
<view >
<view class="details">
<YSteps lineNum='0' color='#fff' backgroundColor='#4db4ea' :infoList='process'></YSteps>
</view>
</view>
<view class="occupied" style="height: 180upx;"></view>
<view v-if="queryType==1 && examineButton && item.EXAMINE_STATE!=2" style="position: fixed;bottom:0upx;height: 50upx;width: 100%;z-index: 9999;"><!-- uni-popup ref="butPopup" type="bottom" -->
<view>
<view class="footer-btn footer-btn-two batchBtn" >
<view style="background: #f2f2f2;color: #00C277;" class="btn btn-col btn1" @click="circulation()">拒绝</view>
<view class="btn btn-col1 btn2" @click="submit(1)">通过</view>
</view>
</view>
</view>
<!-- <view class="footer-btn" v-if="queryType==1 && item.report_status==0||item.report_status==1" @click="circulation()">
<view class="btn">回复</view>
</view> -->
<uni-popup ref="popup" type="center" style="">
<view style="background: white;width: 80%;height: 540upx;width: 600upx;position: relative;border-radius: 10upx;padding: 14upx;">
<view style="color: #333;font-size: 30upx;font-weight: bold;padding: 10upx 0px;">
<text>审核内容:</text>
</view>
<view style="width: 100%;border: 1px solid #E5E5E5;margin-top: 20upx;padding: 20upx;height: 300upx;color: #666;border-radius: 10upx;">
<textarea style="width: 100%;height: 100%;" v-model="replyContent" placeholder="请输入审核内容"/>
</view>
<view class="footer-btn footer-btn-two" style="position: absolute;margin-bottom: 20upx;">
<view class="btn btn-col" style="width:40%;margin-left:7%;margin-right: 6%;border-radius: 10upx;" @click="closeCirculation()">取消</view>
<view class="btn btn-col1" style="width:40%;border-radius: 10upx" @click="submit(2)">确定</view>
</view>
</view>
</uni-popup>
</view>
</view>
</template>
<script>
import {
materialDetail,materialExam
} from '@/common/api.js';
import {
callbackRequest,
callbackRequestNoLoading ,
getStorage,
alertTip,
formatDate,
sureAlterTip,
convertImgToBase64,
vbPicture,
callPhone,wxSdk,
formatImgUrl
} from '@/common/util.js';
import UniPopup from "@/components/uni-popup/uni-popup.vue"
import YSteps from '@/components/Y-Steps/Y-Steps.vue'
export default {
components: {
UniPopup,
YSteps
},
data() {
return {
callPhone:callPhone,
vbPicture:vbPicture,
formatImgUrl:formatImgUrl,
userInfo:getStorage('userInfo'),
formatDate:formatDate,
item: {},
id:0,
queryType:0,
replyContent:'',
userId: getStorage('userInfo').id,
imgs:[],
showAlert:false,
userTypes:[],
houseType:[],
examineBatch:'',
examineButton:false,
process: [],
submitFlag:true
}
},
onLoad(option) {
this.item = JSON.parse(option.item);
this.id = this.item.UUID;
this.queryType = option.queryType||0;
this.examineBatch = option.examineBatch;
console.log(this.examineBatch,'this.examineBatch');
this.getDetail();
},
methods: {
getDetail(){
let _this = this;
let params = {
method: materialDetail,
data: {
userId: getStorage('userInfo').userId,
uuid:_this.id,
}
};
callbackRequest(params).then(res => {
res = res.data;
if (res.returnCode == 1) {
_this.item = res.returnData;
_this.process=[];
if(_this.process.length==0){
let pObj0 = {
date: '经办人',
info: _this.item.USER_NAME+' 发起申请',
time: formatDate(_this.item.GMT_CREATED,'dateTime')
}
_this.process.push(pObj0);
}
let examList = _this.item.EXAM_LIST||[];
let examListBatch = '';
for(let i=0;i<examList.length;i++){
// if(_this.examineBatch.indexOf(examList[i].EXAMINE_BATCH)!=-1){
// _this.examineButton = false;
// }
examListBatch+=examList[i].EXAMINE_BATCH+",";
let pObj = {
date: examList[i].DESCRIPTION,
info: examList[i].USER_NAME+" "+(examList[i].EXAMINE_STATE==1?"同意":"拒绝 "+(examList[i].EXAMINE_OPINION||'')),
time: formatDate(examList[i].EXAMINE_TIME,'dateTime')
}
_this.process.push(pObj);
}
let examBatchs = _this.examineBatch.split(",");
_this.examineButton = false;
for(let i=0;i<examBatchs.length;i++){
let obj = examBatchs[i];
if(examListBatch.indexOf(obj)==-1){
_this.examineButton = true;
}
}
} else {
alertTip(res.returnMsg);
}
this.submitFlag=true;
});
},
circulation(){
this.$refs.popup.open();
//this.closeButPopup();
},
closeCirculation(){
this.$refs.popup.close()
},
submit(examineState){
if(this.submitFlag){
this.submitFlag = false;
let params = {
"method": materialExam,
"data":{
materialId: this.item.UUID,
userId:getStorage('userInfo').id,
userName:getStorage('userInfo').userName,
examineState:examineState+'',
examineOpinion:this.replyContent,
examineBatch:this.item.EXAMINE_BATCH
}
};
callbackRequest(params).then(res => {
res = res.data;
if (res.returnCode == 1) {
alertTip(res.returnMsg);
this.closeCirculation();
this.getDetail();
} else {
alertTip(res.returnMsg);
this.submitFlag=true;
}
})
}
//examineState 1通过2不通过
}
}
}
</script>
<style lang="scss">
@import '@/static/css/common.scss';
.batchBtn{
position: absolute;
display: flex;
justify-content: space-between;
padding: 10upx 40upx;
.btn1{
background: #C1EFEA;
color: #09AFA5;
width: 40%;
border-radius: 50upx;
}
.btn2{
background: linear-gradient( 90deg, #50CBA1 0%, #06AEA6 100%), #C1EFEA;
color: #fff;
width: 40%;
border-radius: 50upx;
}
}
.img-box {
overflow: hidden;
padding-top: 20rpx;
padding-bottom: 10rpx;
.img-item {
float: left;
width: 200upx;
height: 200upx;
border: 1px solid #ddd;
margin: 0 22rpx 20upx 0upx;
position: relative;
box-sizing: border-box;
.img {
display: block;
width: 100%;
height: 100%;
}
.remove-btn {
position: absolute;
top: -18upx;
right: -18upx;
width: 44upx;
height: 44upx;
z-index: 2;
}
}
.upload-btn {
.img {
width: 60upx;
height: 60upx;
margin: 70upx auto 0;
}
}
}
// .container {
// min-height:100vh;
// background: #f8f8f8;
// font-size: 28upx;
.details{
// height: 550upx;
background: white;
margin: 15upx;
border-radius: 15upx;
.detail_header {
border-bottom: #f8f8f8 5upx solid;
height: 90upx;
line-height: 90upx;
margin: 15upx;
border-radius: 10upx;
.blueSign {
height: 28upx;
width: 5upx;
background: #00c277;
display: inline-block;
margin-left: 20upx;
}
.font-tilte {
font-weight:bold;
margin-left: 20upx;
}
}
.detail_msg {
margin-bottom: 20upx;
background: white;
border-radius: 10upx;
font-size: 24upx;
padding-left: 10upx;
.info-item{
border-bottom:1px solid #f8f8f8;
padding:20upx 10upx;
line-height: 50upx;
.label{
display:inline-block;
width:150upx;
font-size:28upx;
color:#333;
font-weight:bold;
}
}
.status {
.infoSpan{
color: #00c277;
}
.infoSpan2{
color: red;
}
}
.img-box {
// background: #fff;
image{
width: 200upx;
height: 200upx;
margin:20upx 20upx 0 0;
}
}
}
}
// }
.common-shade{
position:fixed;
top:0;
left:0;
width:100%;
height:100vh;
background: rgba(0,0,0,0.7);
z-index:9999;
}
.box {
display: flex;
display: -webkit-flex;
}
.box-row-reverse {
flex-direction: row;
}
/*上下排列*/
.box-column {
flex-direction: column;
}
/*上下排列*/
.box-left {
justify-content: flex-start;
}
/*居右*/
.box-right {
justify-content: flex-end;
}
/*居左*/
.box-center {
justify-content: center;
}
/*居中*/
.box-between {
justify-content: space-between;
}
/*两端对齐*/
.box-align-center {
align-items: center;
}
.box-wrap {
flex-wrap: wrap;
}
</style>