|
|
@@ -3,24 +3,27 @@
|
|
|
<view class="permissionApplyListPage">
|
|
|
<view class="top-picker-box">
|
|
|
<picker @change="typeChange" :value="typeIndex" :range="typeList" :range-key="'label'">
|
|
|
- <view class="picker-p" :class="queryParams.type?'check-picker-p':''">{{queryParams.type?typeList[typeIndex].label:'请选择'}}</view>
|
|
|
+ <view class="picker-p check-picker-p">
|
|
|
+ {{typeList[typeIndex].label}}
|
|
|
+ </view>
|
|
|
</picker>
|
|
|
</view>
|
|
|
<scroll-view scroll-y @scrolltolower="scrollGet" class="for-max-box">
|
|
|
<view class="for-box" v-for="(item,index) in dataList" :key="index">
|
|
|
- <view class="title-p">{{item.data1}}</view>
|
|
|
- <view class="text-p">{{item.data2}}</view>
|
|
|
- <view class="text-p">申请权限类型:{{item.data3}}</view>
|
|
|
- <view class="text-p">申请人:{{item.data4}}</view>
|
|
|
- <view class="text-p">申请时间:{{item.data5}}</view>
|
|
|
- <view class="text-p">审核人:{{item.data6}}</view>
|
|
|
- <view class="text-p">审核时间:{{item.data7}}</view>
|
|
|
- <view class="position-p" :class="item.data8==3?'colorB':'colorA'">{{item.data8==1?'待审批':(item.data8==2?'审批通过':(item.data8==3?'驳回':''))}}</view>
|
|
|
- <view class="button-p-1" @click="throughButton()">通过</view>
|
|
|
- <view class="button-p-2" @click="rejectionButton(1)">驳回</view>
|
|
|
+ <view class="title-p">{{item.subName}}({{item.roomNum}})</view>
|
|
|
+ <view class="text-p">{{item.deptName}} - {{item.buildName}}</view>
|
|
|
+ <view class="text-p">申请权限类型:{{item.perm}}</view>
|
|
|
+ <view class="text-p">申请人:{{item.userName}}({{item.userNum}})</view>
|
|
|
+ <view class="text-p">申请时间:{{item.submitTime}}</view>
|
|
|
+ <view class="text-p" v-if="item.status!=0&&item.approveBy">审核人:{{item.approveBy}}</view>
|
|
|
+ <view class="text-p" v-if="item.status!=0&&item.approveTime">审核时间:{{item.approveTime}}</view>
|
|
|
+ <view class="position-p" :class="item.status==2?'colorB':'colorA'">{{item.status==0?'待审批':(item.status==1?'审批通过':(item.status==2?'驳回':''))}}</view>
|
|
|
+ <view class="button-p-1" v-if="item.status==0&&hazardousWasteUserType==1" @click="throughButton(item)">通过</view>
|
|
|
+ <view class="button-p-2" v-if="item.status==0&&hazardousWasteUserType==1" @click="rejectionButton(1,item)">驳回</view>
|
|
|
</view>
|
|
|
+ <view class="get-null-box" v-if="getDataType">暂无更多数据</view>
|
|
|
</scroll-view>
|
|
|
- <view class="add-button" @click="goPage()">新申请</view>
|
|
|
+ <view v-if="hazardousWasteUserType == 0" class="add-button" @click="goPage()">新申请</view>
|
|
|
<view class="shade-max-big-box" v-if="dialogType">
|
|
|
<view class="shade-null-1" @click="rejectionButton(2)"></view>
|
|
|
<view class="shade-big-box">
|
|
|
@@ -39,28 +42,33 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- demo1,
|
|
|
- demo2
|
|
|
+ parseTime
|
|
|
+ } from '@/component/public.js'
|
|
|
+ import {
|
|
|
+ hwmsAppRegisterApprovalApplyList,
|
|
|
+ hwmsAppRegisterApprovalApply,
|
|
|
} from '@/pages_hazardousWasteRecycling/api/index.js'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ hazardousWasteUserType:uni.getStorageSync('hazardousWasteUserType'),
|
|
|
typeList:[
|
|
|
- { value: 1, label: "全部" },
|
|
|
- { value: 2, label: "待审批" },
|
|
|
- { value: 3, label: "已通过" },
|
|
|
- { value: 4, label: "驳回" },
|
|
|
+ { value: "", label: "全部" },
|
|
|
+ { value: "0", label: "待审批" },
|
|
|
+ { value: "1", label: "已通过" },
|
|
|
+ { value: "2", label: "驳回" },
|
|
|
],
|
|
|
// 查询参数
|
|
|
getDataType: false,
|
|
|
queryParams: {
|
|
|
page: 1,
|
|
|
pageSize: 10,
|
|
|
- type:1,
|
|
|
+ status:1,
|
|
|
},
|
|
|
typeIndex:0,
|
|
|
total: 0,
|
|
|
dataList: [],
|
|
|
+ dialogData:{},
|
|
|
dialogType:false,
|
|
|
dialogText:'',
|
|
|
}
|
|
|
@@ -69,41 +77,10 @@
|
|
|
|
|
|
},
|
|
|
onShow() {
|
|
|
-
|
|
|
+ this.getList();
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.$set(this,'dataList',[
|
|
|
- {
|
|
|
- data1:'植物营养实验室(A201)',
|
|
|
- data2:'资源环境学院-农科楼- A201',
|
|
|
- data3:'回收报备、称重登记',
|
|
|
- data4:'张三(2020110010)',
|
|
|
- data5:'2025-11-03 10:10:09',
|
|
|
- data6:'王二小',
|
|
|
- data7:'2025-11-04 10:10:09',
|
|
|
- data8:'1',
|
|
|
- },
|
|
|
- {
|
|
|
- data1:'植物营养实验室(A201)',
|
|
|
- data2:'资源环境学院-农科楼- A201',
|
|
|
- data3:'回收报备、称重登记',
|
|
|
- data4:'张三(2020110010)',
|
|
|
- data5:'2025-11-03 10:10:09',
|
|
|
- data6:'王二小',
|
|
|
- data7:'2025-11-04 10:10:09',
|
|
|
- data8:'2',
|
|
|
- },
|
|
|
- {
|
|
|
- data1:'植物营养实验室(A201)',
|
|
|
- data2:'资源环境学院-农科楼- A201',
|
|
|
- data3:'回收报备、称重登记',
|
|
|
- data4:'张三(2020110010)',
|
|
|
- data5:'2025-11-03 10:10:09',
|
|
|
- data6:'王二小',
|
|
|
- data7:'2025-11-04 10:10:09',
|
|
|
- data8:'3',
|
|
|
- },
|
|
|
- ]);
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
//滚动加载事件
|
|
|
@@ -122,10 +99,15 @@
|
|
|
async getList() {
|
|
|
let self = this;
|
|
|
let obj = JSON.parse(JSON.stringify(this.queryParams));
|
|
|
+ obj.type = this.hazardousWasteUserType == 1?'2':'1'
|
|
|
const {
|
|
|
data
|
|
|
- } = await laboratoryAppletSubList(obj);
|
|
|
+ } = await hwmsAppRegisterApprovalApplyList(obj);
|
|
|
if (data.code == 200) {
|
|
|
+ for(let i=0;i<data.data.records.length;i++){
|
|
|
+ data.data.records[i].approveTime = parseTime(data.data.records[i].approveTime, "{y}-{m}-{d} {h}:{i}:{s}");
|
|
|
+ data.data.records[i].submitTime = parseTime(data.data.records[i].submitTime, "{y}-{m}-{d} {h}:{i}:{s}");
|
|
|
+ }
|
|
|
if(self.queryParams.page == 1){
|
|
|
this.$set(this, 'dataList', data.data.records);
|
|
|
this.$set(this, 'total', data.data.total);
|
|
|
@@ -143,26 +125,32 @@
|
|
|
},
|
|
|
//选择器
|
|
|
typeChange(e){
|
|
|
- this.$set(this.queryParams,'type',this.typeList[e.detail.value].value);
|
|
|
+ this.$set(this.queryParams,'status',this.typeList[e.detail.value].value);
|
|
|
this.$set(this,'typeIndex',e.detail.value);
|
|
|
+ this.$set(this.queryParams, 'page', 1);
|
|
|
+ this.$set(this, 'dataList', []);
|
|
|
+ this.$set(this, 'getDataType', true);
|
|
|
+ this.getList();
|
|
|
},
|
|
|
//通过
|
|
|
- throughButton(){
|
|
|
+ throughButton(item){
|
|
|
let self = this;
|
|
|
+ this.$set(this,'dialogData',item);
|
|
|
uni.showModal({
|
|
|
content: '是否确认通过?',
|
|
|
cancelColor: "#999",
|
|
|
confirmColor: "#0183FA",
|
|
|
success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
-
|
|
|
+ self.hwmsAppRegisterApprovalApply(1);
|
|
|
} else if (res.cancel) {}
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//驳回
|
|
|
- rejectionButton(type){
|
|
|
+ rejectionButton(type,item){
|
|
|
if(type == 1){
|
|
|
+ this.$set(this,'dialogData',item);
|
|
|
this.$set(this,'dialogText','');
|
|
|
this.$set(this,'dialogType',true);
|
|
|
}else{
|
|
|
@@ -172,14 +160,50 @@
|
|
|
//弹窗按钮
|
|
|
dialogButton(type){
|
|
|
if(type == 1){
|
|
|
- this.$set(this,'dialogType',false);
|
|
|
+ this.hwmsAppRegisterApprovalApply(1);
|
|
|
}else if(type == 2){
|
|
|
+ if(!this.dialogText){
|
|
|
+ uni.showToast({
|
|
|
+ title: '请输入备注',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.hwmsAppRegisterApprovalApply(2);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async hwmsAppRegisterApprovalApply(type){
|
|
|
+ let self = this;
|
|
|
+ let obj = {
|
|
|
+ id:this.dialogData.id,
|
|
|
+ status:type,
|
|
|
+ };
|
|
|
+ if(type == 2){
|
|
|
+ obj.rejectReason = this.dialogText;
|
|
|
+ }
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await hwmsAppRegisterApprovalApply(obj)
|
|
|
+ if (data.code == 200) {
|
|
|
+ for(let i=0;i<self.dataList.length;i++){
|
|
|
+ if(self.dialogData.id == self.dataList[i].id){
|
|
|
+ self.dataList[i].status = type;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ uni.showToast({
|
|
|
+ title: '提交成功',
|
|
|
+ icon: "none",
|
|
|
+ mask: true,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
this.$set(this,'dialogType',false);
|
|
|
}
|
|
|
},
|
|
|
goPage(){
|
|
|
uni.navigateTo({
|
|
|
- url: "/pages_hazardousWasteRecycling/views/permissionApply/index",
|
|
|
+ url: "/pages_hazardousWasteRecycling/views/permissionApply/addPage",
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
@@ -191,6 +215,12 @@
|
|
|
height: 100%;
|
|
|
display flex;
|
|
|
flex-direction column;
|
|
|
+ .get-null-box {
|
|
|
+ height: 100rpx;
|
|
|
+ line-height: 100rpx;
|
|
|
+ color: #999;
|
|
|
+ text-align center;
|
|
|
+ }
|
|
|
.top-picker-box{
|
|
|
.picker-p{
|
|
|
border:1px solid #dedede;
|
|
|
@@ -319,7 +349,7 @@
|
|
|
display: flex;
|
|
|
view:nth-child(1){
|
|
|
flex:1;
|
|
|
- border-top:1px solid #0183FA;
|
|
|
+ border-top:1px solid #dedede;
|
|
|
background-color: #FFF;
|
|
|
color:#0183FA;
|
|
|
text-align: center;
|