<template>
|
<view class="content">
|
<view class="form">
|
<view class="form-item">
|
<view class="title">事件状态:</view>
|
<view class="right">
|
<picker :range="arrayHStatus" v-model="hform.HReadFlag" @change="HStatusChange">
|
<input name="HStatus" disabled v-model="hform.HReadFlag" placeholder="请选择事件状态" />
|
</picker>
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">开始日期:</view>
|
<view class="right">
|
<picker mode="date" :value="hform.HBeginDate" @change="HBeginDateChange">
|
<input name="HBeginDate" disabled :value="hform.HBeginDate" placeholder="请选择" />
|
</picker>
|
</view>
|
</view>
|
<view class="form-item">
|
<view class="title">结束日期:</view>
|
<view class="right">
|
<picker mode="date" :value="hform.HEndDate" @change="HEndDateChange">
|
<input name="HEndDate" disabled :value="hform.HEndDate" placeholder="请选择" />
|
</picker>
|
</view>
|
</view>
|
|
<view class="buttons">
|
<button class="btn-a" size="mini" type="default" @tap="clear">重置</button>
|
<!-- <button class="btn-b" size="mini" type="default">新增</button> -->
|
<button class="btn-c" size="mini" type="default" @tap="search">查询</button>
|
</view>
|
</view>
|
|
<view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view>
|
|
<view class="list" v-for="(item,index) in listData" :key="index">
|
<uni-card :title="item.单据状态" :extra="item.单据号" style="margin: 10px;">
|
<view class="card-detail">
|
<view class="detail" v-if="item.产品名称">
|
<text>产品名称:</text>{{item.产品名称}}
|
</view>
|
<view class="detail" v-if="item.主题">
|
<text>主题:</text>{{item.主题}}
|
</view>
|
<view class="detail" v-if="item.异常类型">
|
<text>异常类型:</text>{{item.异常类型}}
|
</view>
|
<view class="detail" v-if="item.发送部门">
|
<text>发送部门:</text>{{item.发送部门}}
|
</view>
|
<view class="detail" v-if="item.发送人">
|
<text>发送人:</text>{{item.发送人}}
|
</view>
|
<view class="detail" v-if="item.是否完成">
|
<text>是否完成:</text>{{item.是否完成}}
|
</view>
|
|
<view class="detail" v-if="item.接收部门">
|
<text>接收部门:</text>{{item.接收部门}}
|
</view>
|
<view class="detail" v-if="item.接收人">
|
<text>接收人:</text>{{item.接收人}}
|
</view>
|
<view class="detail" v-if="item.抄送人">
|
<text>抄送人:</text>{{item.抄送人}}
|
</view>
|
<view class="detail" v-if="item.指派处理人">
|
<text>指派处理人:</text>{{item.指派处理人}}
|
</view>
|
|
<view class="detail" v-if="item.制单日期">
|
<text>制单日期:</text>{{item.制单日期.substr(0,10)}}
|
</view>
|
<view class="detail" v-if="item.制单人">
|
<text>制单人:</text>{{item.制单人}}
|
</view>
|
<view class="detail" v-if="item.审核日期">
|
<text>审核日期:</text>{{item.审核日期.substr(0,10)}}
|
</view>
|
<view class="detail" v-if="item.审核人">
|
<text>审核人:</text>{{item.审核人}}
|
</view>
|
</view>
|
<view class="more">
|
<view class="part" style="border-right: 1px solid #eee;" @tap="reads(item.内容)">
|
<uni-icons type="bars" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>反馈单具体内容
|
</view>
|
<view class="part" @tap="toForm(item)">
|
<uni-icons type="pulldown" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>下推反馈处理单
|
</view>
|
</view>
|
</uni-card>
|
</view>
|
|
<view class="over" v-if="listData.length == 0">暂无数据</view>
|
<view class="over" v-if="listData.length != 0">已到底</view>
|
</view>
|
</template>
|
|
<script>
|
import { getUserInfo } from "@/utils/auth.js";
|
import getDateTime from '@/utils/getdateTime.js';
|
export default {
|
data() {
|
return {
|
userInfo:getUserInfo(),
|
serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API',
|
arrayHStatus:['全部','已反馈','已签到','已处理','已验收'],
|
arrayHStatusId:['','2','13','9','10'],
|
hform:{
|
HStatus:'',
|
HReadFlag:'全部',
|
HEndDate:getDateTime.dateTimeStr('y-m-d'),
|
HBeginDate:this.getEndDate(),
|
HSourceID:0,
|
},
|
sWhere:'',
|
listData:[],
|
}
|
},
|
onLoad() {
|
this.clear()
|
console.log(this.userInfo,uni.getStorageSync('HUserName'))
|
},
|
onPullDownRefresh: function() {
|
this.clear()
|
setTimeout(()=>{
|
uni.stopPullDownRefresh();
|
}, 1000);
|
},
|
methods: {
|
getList(){
|
console.log(this.sWhere)
|
uni.request({
|
url: this.serverUrl + '/Sc_MESTransFerWorkBill/GetSc_MESTransFerWorkBillQuery',
|
data:{
|
sWhere: this.hform,
|
user: uni.getStorageSync('HUserName')
|
},
|
success: (res) => {
|
console.log(1,res.data.data.h_p_OA_ErrMsgBackSelfQuery);
|
if(res.data.count == 1){
|
this.listData = res.data.data.h_p_OA_ErrMsgBackSelfQuery
|
}else{
|
uni.showToast({
|
title:res.data.Message,
|
icon:'none'
|
})
|
}
|
},
|
fail: (res) => {
|
console.log(res);
|
uni.hideLoading()
|
uni.showToast({
|
title:'接口请求失败',
|
icon:'none'
|
})
|
},
|
});
|
|
// uni.request({
|
// url: this.serverUrl + '/Gy_EquipFileMain/Sb_EquipFileBillResumeDate',
|
// data: { "HInterID": 2 },
|
// success: (res) => {
|
// console.log(2,res);
|
|
// }
|
// });
|
},
|
//事件状态改变
|
HStatusChange(e){
|
this.hform.HStatus = this.arrayHStatusID[e.detail.value]
|
this.hform.HReadFlag = this.arrayHStatus[e.detail.value]
|
},
|
//选择单据日期
|
HBeginDateChange(e){
|
console.log(e.detail.value)
|
this.hform.HBeginDate = e.detail.value
|
},
|
//选择单据日期
|
HEndDateChange(e){
|
console.log(e.detail.value)
|
this.hform.HEndDate = e.detail.value
|
},
|
search(){
|
// this.sWhere = ''
|
|
// console.log(this.hform)
|
// if (this.hform.HBillNo) {
|
// this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'";
|
// }
|
// if (this.hform.HEquipType) {
|
// this.sWhere += " and 设备类型 like '%" + this.hform.HEquipType + "%'";
|
// }
|
// if (this.hform.HBeginDate) {
|
// this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.HBeginDate + "'";
|
// }
|
// if (this.hform.HEndDate) {
|
// this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.HEndDate + "'";
|
// }
|
|
this.getList()
|
},
|
getEndDate(){
|
let currentDate = new Date();
|
currentDate.setMonth(currentDate.getMonth() - 1);
|
let year = currentDate.getFullYear();
|
let month = String(currentDate.getMonth() + 1).padStart(2, '0');
|
let day = String(currentDate.getDate()).padStart(2, '0');
|
return `${year}-${month}-${day}`;
|
},
|
clear(){
|
this.sWhere = ''
|
this.hform = {
|
HStatus:'',
|
HReadFlag:'全部',
|
HEndDate:getDateTime.dateTimeStr('y-m-d'),
|
HBeginDate:this.getEndDate(),
|
HSourceID:0,
|
}
|
this.getList()
|
},
|
reads(e){
|
uni.showModal({
|
content: e,
|
showCancel: false
|
});
|
},
|
toForm(item){
|
uni.navigateTo({
|
url:'./form?OperationType=2&linterid=' + item.HInterID + '&HEntryID=' + item.HEntryID + '&HSouceBillType=4502'
|
})
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.form{
|
width: 640rpx;
|
margin: 20rpx auto;
|
}
|
.form-item{
|
display: flex;
|
align-items: center;
|
font-size: 28rpx;
|
padding: 6rpx 0;
|
.title{
|
width: 180rpx;
|
text{
|
color: red;
|
font-weight: bold;
|
}
|
}
|
.right{
|
width: 450rpx;
|
border-radius: 22rpx;
|
border: 1px solid #acacac;
|
}
|
.righton{
|
width: 450rpx;
|
border-radius: 22rpx;
|
border: 1px solid #e4e4e4;
|
background-color: #e4e4e4;
|
}
|
input{
|
width: 100%;
|
padding: 8rpx 20rpx;
|
font-size: 30rpx;
|
}
|
}
|
.buttons{
|
width: 100%;
|
display: flex;
|
justify-content: center;
|
margin-top: 20rpx;
|
button{
|
border-radius: 50rpx;
|
width: 180rpx;
|
height: 66rpx;
|
line-height: 66rpx;
|
font-size: 28rpx;
|
}
|
.btn-a{
|
background-color: #acacac;
|
color: #fff;
|
}
|
.btn-b{
|
background-color: #41a863;
|
color: #fff;
|
}
|
.btn-c{
|
background-color: #3a78ff;
|
color: #fff;
|
}
|
}
|
|
.list{
|
width: 100%;
|
.card-detail{
|
width: 100%;
|
display: flex;
|
flex-wrap: wrap;
|
justify-content: space-between;
|
line-height: 120%;
|
.detail{
|
// width: 50%;
|
font-size: 26rpx;
|
margin-bottom: 12rpx;
|
color: #555;
|
margin-right: 20rpx;
|
text{
|
color: #999;
|
font-size: 26rpx;
|
}
|
}
|
}
|
.more{
|
color: #888;
|
font-size: 24rpx;
|
display: flex;
|
border-top: 1px solid #eee;
|
padding-top: 20rpx;
|
.part{
|
width: 50%;
|
text-align: center;
|
}
|
}
|
}
|
|
</style>
|