详情页面增加状态显示/许可证可进行删除
This commit is contained in:
parent
c766c0b05c
commit
0d76d6d9c5
|
|
@ -64,6 +64,7 @@ const install = (Vue, vm) => {
|
||||||
let oplCateItem = (id) => vm.$u.get(`/opm/opl_cate/${id}/`); //作业许可证类型详情
|
let oplCateItem = (id) => vm.$u.get(`/opm/opl_cate/${id}/`); //作业许可证类型详情
|
||||||
let oplCreate = (data = {}) => vm.$u.post('/opm/opl/', data); //添加新许可证
|
let oplCreate = (data = {}) => vm.$u.post('/opm/opl/', data); //添加新许可证
|
||||||
let oplUpdate = (id,data = {}) => vm.$u.put(`/opm/opl/${id}/`, data); //编辑许可证
|
let oplUpdate = (id,data = {}) => vm.$u.put(`/opm/opl/${id}/`, data); //编辑许可证
|
||||||
|
let oplDelete = (id) => vm.$u.delete(`/opm/opl/${id}/`); //删除许可证
|
||||||
let oplWorker = (data = {}) => vm.$u.get('/opm/opl_worker/', data); //作业许可证工作人员
|
let oplWorker = (data = {}) => vm.$u.get('/opm/opl_worker/', data); //作业许可证工作人员
|
||||||
let oplWorkerCreate = (data = {}) => vm.$u.post('/opm/opl_worker/', data); //作业许可证工作人员创建
|
let oplWorkerCreate = (data = {}) => vm.$u.post('/opm/opl_worker/', data); //作业许可证工作人员创建
|
||||||
let oplWorkerDelete = (id) => vm.$u.delete(`/opm/opl_worker/${id}/`); //作业许可证工作人员删除
|
let oplWorkerDelete = (id) => vm.$u.delete(`/opm/opl_worker/${id}/`); //作业许可证工作人员删除
|
||||||
|
|
@ -176,6 +177,7 @@ const install = (Vue, vm) => {
|
||||||
oplCate,
|
oplCate,
|
||||||
oplCreate,
|
oplCreate,
|
||||||
oplUpdate,
|
oplUpdate,
|
||||||
|
oplDelete,
|
||||||
oplWorker,
|
oplWorker,
|
||||||
oplWorkerCreate,
|
oplWorkerCreate,
|
||||||
oplGasList,
|
oplGasList,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,12 @@
|
||||||
<text>{{formData.name}}</text>
|
<text>{{formData.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">作业状态</view>
|
||||||
|
<view class="content">
|
||||||
|
<text>{{stateOptions[formData.state]}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="title">具体地点</view>
|
<view class="title">具体地点</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
|
@ -112,6 +118,13 @@
|
||||||
4: "已完成",
|
4: "已完成",
|
||||||
5: "已关闭",
|
5: "已关闭",
|
||||||
},
|
},
|
||||||
|
stateOptions: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "审批中",
|
||||||
|
30: "待作业",
|
||||||
|
40: "作业中",
|
||||||
|
50: "已关闭",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,15 @@
|
||||||
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
leftIcon="left" border backgroundColor="#2cade8" color="#fff" fixed statusBar shadow></uni-nav-bar>
|
||||||
<view class="oplCate-info">
|
<view class="oplCate-info">
|
||||||
<view class="oplCate-info-title">已添加许可证:</view>
|
<view class="oplCate-info-title">已添加许可证:</view>
|
||||||
<view class="uni-list-cell uni-list-cell-pd" v-for="item in oplList" :key="item.id" @click="addCate(item,'edit')">
|
<view class="uni-list-cell uni-list-cell-pd" v-for="item in oplList" :key="item.id" >
|
||||||
<view>
|
<view>
|
||||||
<view class="name">{{item.name}}</view>
|
|
||||||
<view class="name">{{item.cate_name}}</view>
|
<view class="name">{{item.cate_name}}</view>
|
||||||
<view class="name">{{item.level}}</view>
|
<view class="name">{{item.level}}</view>
|
||||||
|
<view class="name" v-if="item.ticket&&item.ticket_.state_">{{item.ticket_.state_.name }}-{{act_states[item.ticket_.act_state]}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view style="display: flex;">
|
||||||
<view class="oplEditImg"></view>
|
<view class="oplEditImg" @click="addCate(item,'edit')"></view>
|
||||||
|
<view class="oplDeleteImg" @click="addCate(item,'delete')" style="margin-left: 20upx;" v-if="item.ticket==null"></view>
|
||||||
<!-- <image class="oplEditImg" :src="require('@/static/workSpace/new_apply/update.png')" mode="widthFix"></image> -->
|
<!-- <image class="oplEditImg" :src="require('@/static/workSpace/new_apply/update.png')" mode="widthFix"></image> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -54,6 +55,14 @@
|
||||||
},
|
},
|
||||||
oplCateList: [],
|
oplCateList: [],
|
||||||
oplList: [],
|
oplList: [],
|
||||||
|
act_states: {
|
||||||
|
0: "草稿中",
|
||||||
|
1: "进行中",
|
||||||
|
2: "被退回",
|
||||||
|
3: "被撤回",
|
||||||
|
4: "已完成",
|
||||||
|
5: "已关闭",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(params) {
|
onLoad(params) {
|
||||||
|
|
@ -91,15 +100,19 @@
|
||||||
if(type==='edit'){
|
if(type==='edit'){
|
||||||
oplCate = row.cate_name;
|
oplCate = row.cate_name;
|
||||||
params = `?oplId=${row.id}&oplcateId=${row.cate_.id}&operationId=${this.operationId}&type=${type}`;
|
params = `?oplId=${row.id}&oplcateId=${row.cate_.id}&operationId=${this.operationId}&type=${type}`;
|
||||||
}else{
|
}else if(type=='add'){
|
||||||
oplCate = row.name;
|
oplCate = row.name;
|
||||||
params = `?oplcateId=${row.id}&operationId=${this.operationId}&type=${type}`;
|
params = `?oplcateId=${row.id}&operationId=${this.operationId}&type=${type}`;
|
||||||
|
}else if(type=='delete'){
|
||||||
|
this.$u.api.oplDelete(row.id).then(res => {
|
||||||
|
this.getOplLists()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
if(oplCate==='动火'){
|
if(oplCate==='动火'){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '../opls/fire' + params
|
url: '../opls/fire' + params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
select(row) {},
|
select(row) {},
|
||||||
|
|
@ -172,6 +185,12 @@
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-image: url('@/static/workSpace/new_apply/update.png');
|
background-image: url('@/static/workSpace/new_apply/update.png');
|
||||||
}
|
}
|
||||||
|
.oplDeleteImg {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40upx;
|
||||||
|
background-size: cover;
|
||||||
|
background-image: url('@/static/workSpace/new_apply/del.png');
|
||||||
|
}
|
||||||
.oplAddImg {
|
.oplAddImg {
|
||||||
width: 40rpx;
|
width: 40rpx;
|
||||||
height: 40upx;
|
height: 40upx;
|
||||||
|
|
|
||||||
|
|
@ -82,12 +82,14 @@
|
||||||
<view class="visitorsWrap">
|
<view class="visitorsWrap">
|
||||||
<view class="visitorsItem itemTitle">
|
<view class="visitorsItem itemTitle">
|
||||||
<text class="visitorCell">姓名</text>
|
<text class="visitorCell">姓名</text>
|
||||||
<text class="visitorCell">工作职责</text>
|
<text class="visitorCell">职责</text>
|
||||||
|
<text class="visitorCell">证书</text>
|
||||||
<text class="visitorCell">操作</text>
|
<text class="visitorCell">操作</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="visitorsItem" v-for="item in workerList" :key="item.id">
|
<view class="visitorsItem" v-for="item in workerList" :key="item.id">
|
||||||
<text class="visitorCell">{{item.worker_name}}</text>
|
<text class="visitorCell" @click="viewWorker(item)" style="color:blue">{{item.worker_name}}</text>
|
||||||
<text class="visitorCell">{{item.duty}}</text>
|
<text class="visitorCell">{{item.duty}}</text>
|
||||||
|
<text class="visitorCell">{{item.certificates.length}}张</text>
|
||||||
<view class="visitorCell">
|
<view class="visitorCell">
|
||||||
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.worker_.blt_===null||item.worker_.blt_===undefined">绑卡</text>
|
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.worker_.blt_===null||item.worker_.blt_===undefined">绑卡</text>
|
||||||
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
||||||
|
|
@ -235,6 +237,12 @@
|
||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
viewWorker(item) {
|
||||||
|
uni.showToast({
|
||||||
|
title: item.id,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,12 @@
|
||||||
<text>{{formData.name}}</text>
|
<text>{{formData.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">项目状态</view>
|
||||||
|
<view class="content">
|
||||||
|
<text>{{stateOptions[formData.state]}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="title">项目类型</view>
|
<view class="title">项目类型</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
|
@ -49,12 +55,12 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="wrap-view wrap-top">
|
<view class="wrap-view wrap-top">
|
||||||
<view class="item title"> <text class="blueLine"></text>资料:</view>
|
<view class="item title"> <text class="blueLine"></text>资料:</view>
|
||||||
<view class="filesWrap" v-if="certificateList.length>0">
|
<view class="filesWrap" v-if="fileList.length>0">
|
||||||
<view class="filesItem itemTitle">
|
<view class="filesItem itemTitle">
|
||||||
<text class="fileCell leftFileCell">资质内容</text>
|
<text class="fileCell leftFileCell">资质内容</text>
|
||||||
<text class="fileCell">文献资料</text>
|
<text class="fileCell">文献资料</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="filesItem" v-for="item1 in certificateList" :key="item1.id">
|
<view class="filesItem" v-for="item1 in fileList" :key="item1.id">
|
||||||
<view class="fileCell leftFileCell" style="text-align: left;">
|
<view class="fileCell leftFileCell" style="text-align: left;">
|
||||||
<text v-if="item1.file_cate_"> {{item1.file_cate_.name}}</text>
|
<text v-if="item1.file_cate_"> {{item1.file_cate_.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -71,16 +77,18 @@
|
||||||
<view v-else style="text-align: center;">暂无相关资料</view>
|
<view v-else style="text-align: center;">暂无相关资料</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrap-view wrap-top">
|
<view class="wrap-view wrap-top">
|
||||||
<view class="item title"> <text class="blueLine"></text>作业人员:</view>
|
<view class="item title"> <text class="blueLine"></text>项目人员:</view>
|
||||||
<view class="visitorsWrap">
|
<view class="visitorsWrap">
|
||||||
<view class="visitorsItem itemTitle">
|
<view class="visitorsItem itemTitle">
|
||||||
<text class="visitorCell">姓名</text>
|
<text class="visitorCell">姓名</text>
|
||||||
<text class="visitorCell">工作职责</text>
|
<text class="visitorCell">工作职责</text>
|
||||||
|
<text class="visitorCell">证书</text>
|
||||||
<text class="visitorCell">操作</text>
|
<text class="visitorCell">操作</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="visitorsItem" v-for="item in workerList" :key="item.id">
|
<view class="visitorsItem" v-for="item in workerList" :key="item.id">
|
||||||
<text class="visitorCell">{{item.remployee_.name}}</text>
|
<text class="visitorCell" style="color:blue" @click="viewMember(item)">{{item.remployee_.name}}</text>
|
||||||
<text class="visitorCell">{{item.duty}}</text>
|
<text class="visitorCell">{{item.duty}}</text>
|
||||||
|
<text class="visitorCell">{{item.rcertificates.length}}张</text>
|
||||||
<view class="visitorCell">
|
<view class="visitorCell">
|
||||||
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.remployee_.blt_===null||item.worker_.blt_===undefined">绑卡</text>
|
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.remployee_.blt_===null||item.worker_.blt_===undefined">绑卡</text>
|
||||||
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
||||||
|
|
@ -107,7 +115,7 @@
|
||||||
rparty_name:'',
|
rparty_name:'',
|
||||||
},
|
},
|
||||||
workerList:[],
|
workerList:[],
|
||||||
certificateList:[],
|
fileList:[],
|
||||||
stateOptions: {
|
stateOptions: {
|
||||||
10: "创建中",
|
10: "创建中",
|
||||||
20: "审批中",
|
20: "审批中",
|
||||||
|
|
@ -138,7 +146,7 @@
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getworkerList();//工作人员
|
this.getworkerList();//工作人员
|
||||||
this.getcertificateList();//证书
|
this.getFileList();//证书
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//获取工作operation
|
//获取工作operation
|
||||||
|
|
@ -157,11 +165,11 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//获取证书
|
//获取入厂资料
|
||||||
getcertificateList(){
|
getFileList(){
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$u.api.rpjFileList({rpj: that.rpjId, page: 0}).then(res => {
|
that.$u.api.rpjFileList({rpj: that.rpjId, page: 0}).then(res => {
|
||||||
that.certificateList =res.filter(item=>{
|
that.fileList =res.filter(item=>{
|
||||||
return item.files.length>0
|
return item.files.length>0
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
@ -202,6 +210,12 @@
|
||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
viewMember(item) {
|
||||||
|
uni.showToast({
|
||||||
|
title: item.id,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,12 @@
|
||||||
<text>{{purposeOptions[formData.purpose]}}</text>
|
<text>{{purposeOptions[formData.purpose]}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="item">
|
||||||
|
<view class="title">来访状态</view>
|
||||||
|
<view class="content">
|
||||||
|
<text>{{stateOptions[formData.state]}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="title">来访概述</view>
|
<view class="title">来访概述</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
|
|
@ -37,7 +43,7 @@
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<view class="title">接待人</view>
|
<view class="title">接待人</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<text>{{formData.receptionist}}</text>
|
<text v-if="formData.receptionist">{{formData.receptionist_.name}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item">
|
<view class="item">
|
||||||
|
|
@ -64,12 +70,14 @@
|
||||||
<view class="visitorsWrap">
|
<view class="visitorsWrap">
|
||||||
<view class="visitorsItem itemTitle">
|
<view class="visitorsItem itemTitle">
|
||||||
<text class="visitorCell">姓名</text>
|
<text class="visitorCell">姓名</text>
|
||||||
<text class="visitorCell">手机号</text>
|
<text class="visitorCell">主访</text>
|
||||||
<text class="visitorCell">操作</text>
|
<text class="visitorCell">操作</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="visitorsItem" v-for="item in visitorsList" :key="item.id">
|
<view class="visitorsItem" v-for="item in visitorsList" :key="item.id">
|
||||||
<text class="visitorCell">{{item.visitor_.name}}</text>
|
<text class="visitorCell" style="color:blue" @click="viewPeople(item)">{{item.visitor_.name}}</text>
|
||||||
<text class="visitorCell">{{item.visitor_.phone}}</text>
|
<text class="visitorCell">
|
||||||
|
<span v-if="item.is_main">是</span>
|
||||||
|
</text>
|
||||||
<view class="visitorCell">
|
<view class="visitorCell">
|
||||||
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.visitor_.blt_===null">绑卡</text>
|
<text class="bindBtn" @click="bindBtl(item,10)" v-if="item.visitor_.blt_===null">绑卡</text>
|
||||||
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
<text class="bindBtn" @click="bindBtl(item,20)" v-else>解绑</text>
|
||||||
|
|
@ -94,6 +102,14 @@
|
||||||
40: "开会",
|
40: "开会",
|
||||||
50: "拉送货"
|
50: "拉送货"
|
||||||
},
|
},
|
||||||
|
stateOptions: {
|
||||||
|
10: "创建中",
|
||||||
|
20: "审批中",
|
||||||
|
30: "待入厂",
|
||||||
|
40: "进行中",
|
||||||
|
50: "已完成",
|
||||||
|
60: "已关闭",
|
||||||
|
},
|
||||||
levelOptions: {
|
levelOptions: {
|
||||||
10: "一般",
|
10: "一般",
|
||||||
20: "重要",
|
20: "重要",
|
||||||
|
|
@ -150,7 +166,12 @@
|
||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
viewPeople(item) {
|
||||||
|
uni.showToast({
|
||||||
|
title: item.id,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue