Commit bc67f334 by liuzhanxin

fix

parent e2c31c11
// var url = "http://47.94.204.226";
// var url = "http://10.2.24.104:9301"
// var url = "http://10.2.24.104"
// var url = "http://10.2.113.181:9301"
var url = "http://10.2.112.16:9301"
var url = "http://10.2.113.39:9301"
// var url = "http://demo.jiuqi.com.cn:7947/cupl/app/api"
// http://10.2.24.110/cupl/app/h5
// var url = "http://jwcsys.cupl.edu.cn/api"
var token = "";
var addressSelectionTemp = [];
var user = {};
......
......@@ -15,7 +15,6 @@
<view class="item" v-for="(item, index) in dates" :key="index">
<view class="day" @click="selectOne(item, $event)" :class="{ choose: choose == handleDate(item.year,item.month+1,item.date), nolm: !item.lm }">{{ item.date }}</view>
<view class="sign" v-if="isSigned(item.year, item.month + 1, item.date)"></view>
<view class="today-text" v-if="isToday(item.year, item.month, item.date)"></view>
</view>
</view>
</view>
......
......@@ -166,7 +166,7 @@
{
"path": "pages/Appointment/detail",
"style": {
"navigationBarTitleText": "开放设置详情",
"navigationBarTitleText": "实验室详情",
"app-plus":{
"bounce":"none",
"titleNView" : {
......@@ -183,17 +183,18 @@
{
"path": "pages/Appointment/list",
"style": {
"navigationBarTitleText": "开放设置",
"navigationBarTitleText": "开放共享",
"app-plus":{
"bounce":"none",
"titleNView" : {
"buttons" : [
{
"text" : "筛选",
"fontSize" : "14"
"bounce":"none"
}
]
}
},
{
"path": "pages/Appointment/write-confirm",
"style": {
"navigationBarTitleText": "信息确认",
"app-plus":{
"bounce":"none"
}
}
},
......@@ -252,6 +253,51 @@
}
},
{
"path": "pages/Approval/Detail/waste-recovery-detail",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/Detail/person-train-detail",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/Detail/equipment-repair-detail",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/Detail/year-purchase",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/Detail/equipment-purchase",
"style": {
"navigationBarTitleText": "审批详情",
"app-plus":{
"bounce":"none"
}
}
},
{
"path": "pages/Approval/item-info",
"style": {
"navigationBarTitleText": "详情",
......
......@@ -16,8 +16,8 @@
</view>
</view>
</view>
<view v-if="currentCalendarData.length>0" v-for="(item,index) in currentCalendarData" :key="index" class="scroll-view-item" hover-class="hover" @click="setSelect(item)">
<view class="itemContainer">
<view v-if="currentCalendarData.length>0" v-for="(item,index) in currentCalendarData" :key="index" class="scroll-view-item" >
<view class="itemContainer" hover-class="hover" @click="setSelect(item)">
<view class="ori">
<image src="/static/lab-share/preDate.png" class="manIcon" />
<view style="display: flex;flex-direction: column;">
......@@ -87,6 +87,14 @@
that.getByDay(detailData.id,curDate);
})
uni.$on('refreshCalendar', function(data) {
that.refresh()
})
},
onUnload(){
uni.$off('calendarData')
uni.$off('writeConfirmData')
},
upper: function(e) {
// console.log(e)
......@@ -180,7 +188,27 @@
return (new Date(new_date2.getTime() - 1000)).getTime(); //获取当月最后一天日期
},
onNavigationBarButtonTap() {
this.showConfirm()
var timetableUuids = [];
this.currentCalendarData.map((opt)=>{
if(opt.checked){
timetableUuids.push(opt.calendarId);
}
})
if(timetableUuids.length == 0){
this.$refs.popup.open({
type:'err',
content:'请选择预约选项',
timeout:1000,
isClick:false
});
return
}
uni.navigateTo({
url:"./write-confirm",
})
setTimeout(()=>{
uni.$emit("writeConfirmData", [this.settingData,this.currentCalendarData]);
},500)
},
submit(){
var timetableUuids = [];
......@@ -231,14 +259,19 @@
})
},
onDateClick(date){
this.curSelectedDate = date;
this.getByDay(this.settingData.id,date);
},
onMonthChange(date){
this.getByMonth(this.settingData.id,date);
},
refresh(){
this.getByDay(this.settingData.id,this.curSelectedDate);
},
setSelect(item){
// console.log(item)
this.currentCalendarData.map((opt)=>{
if(opt.id == item.id){
if(opt.endTime == item.endTime){
opt.checked = !opt.checked;
}
return opt
......
......@@ -67,10 +67,11 @@
value: ""
}
]
data[0].value = detailData.labInfo.name
data[1].value = detailData.projects.length>0?detailData.projects[0].name:""
data[0].value = detailData.labName
data[1].value = JSON.parse(detailData.projects).length>0?JSON.parse(detailData.projects)[0].name:""
var periodTitle = "";
detailData.openPeriod.map((opt)=>{
var period = JSON.parse(detailData.openPeriod);
period.map((opt)=>{
that.openperiodarrayEnum.map((period)=>{
if(opt.code == period.name){
if(periodTitle == ""){
......@@ -83,7 +84,14 @@
})
data[2].value = periodTitle;
data[3].value = detailData.startTime+"~"+detailData.endTime
data[4].value = detailData.teacher?detailData.teacher:"暂无"
var teacherName = "暂无";
if(detailData.teacher){
var teachers = JSON.parse(detailData.teacher);
teachers.map((opt)=>{
teacherName = opt.name
})
}
data[4].value = teacherName;
data[5].value = detailData.maxUserCount
that.dataList = data;
that.$forceUpdate();
......@@ -93,7 +101,9 @@
uni.navigateTo({
url: "./calendar"
})
setTimeout(()=>{
uni.$emit("calendarData", [this.settingData])
},500)
},
onUnload() {
uni.$off('settingData')
......
......@@ -103,7 +103,8 @@
use: false, // 是否启用上拉加载; 默认true
},
showProject:false,
showDrawer:false
showDrawer:false,
pageIndex:0,
}
},
methods: {
......@@ -111,7 +112,7 @@
var that = this;
uni.$on('refreshTaskList', function(data) {
})
this.loadData();
this.loadData("lab");
},
onUnload() {
uni.$off('refreshTaskList', function(data) {})
......@@ -134,23 +135,64 @@
}
},
/*获取列表*/
loadData() {
loadData(type) {
var conditions = []
if(type == "lab"){
conditions = [
{
name: 'projects',
relation: 3,//等于
values:["[]"],
},{
name: 'discard',
relation: 4,//不等于
values:[true],
}
]
}else{
conditions = [
{
name: 'projects',
relation: 4,//等于
values:["[]"],
},{
name: 'discard',
relation: 4,//不等于
values:[true],
}
]
}
var body = {
"queryDefinitionMetaName": "com.beecode.tspp.openlab.query.TsppOpenLaboratorySettingsEntity",
"queryFields": ["id", "labUuid","created", "semester", "schoolYear", "labName", "projects", "equipment", "location", "teacher", "openPeriod", "startDate", "endDate", "userScope", "maxUserCount", "yearName", "termName"],
"orders": [{
"name": "created",
"asc": false
}],
"conditions": conditions,
"pageIndex": this.pageIndex,
"pageSize": 20,
"useScene": true,
"sceneId":"",
"usePaging": true
}
uni.request({
url: this.GLOBALUTIL.url + '/openlab/v2/settings?page=0&size=1000',
method: 'GET',
url: this.GLOBALUTIL.url + '/query/functionQuery',
method: 'POST',
header: this.GLOBALUTIL.commonHeader,
body: null,
data: JSON.stringify(body),
success: (res) => {
console.log(JSON.stringify(res))
var data = res.data.data;
var data = JSON.parse(res.data.rowDatas);
console.log(data);
data.map((setting)=>{
setting.labName = setting.labInfo.name;
setting.startTime = setting.startDate.split(" ")[0];
setting.endTime = setting.endDate.split(" ")[0];
var projects = setting.projects;
var projectName = ""
if(projects.length>0){
projects.map((opt)=>{
if(projects&&projects.length>0){
var tmp = JSON.parse(projects)
tmp.map((opt)=>{
projectName = projectName+opt.name+" "
})
}
......@@ -158,7 +200,8 @@
var teacher = setting.teacher;
var teacherName = ""
if(teacher&&teacher.length>0){
teacher.map((opt)=>{
var tmp = JSON.parse(teacher)
tmp.map((opt)=>{
teacherName = teacherName+opt.name+" "
})
}
......@@ -166,7 +209,8 @@
var location = setting.location;
var locationName = ""
if(location&&location.length>0){
location.map((opt)=>{
var tmp = JSON.parse(location)
tmp.map((opt)=>{
locationName = locationName+opt.name+" "
})
}
......@@ -177,17 +221,65 @@
}
})
},
/*获取列表*/
// loadData(type) {
// uni.request({
// url: this.GLOBALUTIL.url + '/openlab/v2/settings?page=0&size=50',
// method: 'GET',
// header: this.GLOBALUTIL.commonHeader,
// body: null,
// success: (res) => {
// console.log(JSON.stringify(res))
// var data = res.data.data;
// data.map((setting)=>{
// setting.labName = setting.labInfo.name;
// setting.startTime = setting.startDate.split(" ")[0];
// setting.endTime = setting.endDate.split(" ")[0];
// var projects = setting.projects;
// var projectName = ""
// if(projects.length>0){
// projects.map((opt)=>{
// projectName = projectName+opt.name+" "
// })
// }
// setting.projectName = projectName == ""?"暂无":projectName
// var teacher = setting.teacher;
// var teacherName = ""
// if(teacher&&teacher.length>0){
// teacher.map((opt)=>{
// teacherName = teacherName+opt.name+" "
// })
// }
// setting.teacherName = teacherName == ""?"暂无":teacherName
// var location = setting.location;
// var locationName = ""
// if(location&&location.length>0){
// location.map((opt)=>{
// locationName = locationName+opt.name+" "
// })
// }
// setting.locationName = locationName == ""?"暂无":locationName
// return setting
// })
// this.dataList = data;
// }
// })
// },
showProjectList(){
this.showProject = true
this.loadData("project");
},
showLabList(){
this.showProject = false
this.loadData('lab');
},
goDetail(data) {
uni.navigateTo({
url: "./detail?settingId=" + data.id
})
setTimeout(()=>{
uni.$emit("settingData", [data])
},500)
}
},
components: {
......
<template>
<view class="content">
<view class="ori">
<text class="title" style="margin-top: 40rpx;">实验室:</text>
<text class="contenttext" style="margin-top: 40rpx;">{{labInfo.labName}}</text>
</view>
<view style="display: flex;flex-direction: column;">
<text class="title" style="margin-top: 40rpx;">预约时间:</text>
<text v-for=" index in calendarInfo" :key= "index.endTime" class="contenttextTime" style="margin-top: 40rpx;">{{index.startTime}}~{{index.endTime}}</text>
</view>
<view class="ori">
<text class="title" style="margin-top: 40rpx;">预约人:</text>
<text class="contenttext" style="margin-top: 40rpx;">{{GLOBALUTIL.user.name}}</text>
</view>
<view class="ori">
<text class="title" style="margin-top: 80rpx;">备注</text>
</view>
<view style="width: 100%;margin-top: 40rpx;">
<textarea class="detail" :value="description" @blur="changeTextValue" />
</view>
<button hover-class="submithover" @click="showModal" class="submit-button">
<text class="submittext" >提交</text>
</button>
<FormAlert v-if="submitShow" name="检查对象" placeholder="确定提交所填的数据?" @confirm="onSubmitClick" @cancel="cancel"></FormAlert>
<PopUp ref="popup" :isdistance="true"></PopUp>
</view>
</template>
<script>
import PopUp from "@/components/popup/popup.vue"
import FormAlert from "@/components/form-alert/h-form-alert.vue"
export default {
data() {
return {
submitShow:false,
description:"",
labInfo:{},
courseInfo:[]
}
},
onLoad(option) {
var that = this;
uni.$on('writeConfirmData',function(data){
console.log(data[1])
that.labInfo = data[0];
that.calendarInfo = data[1]
})
},
onUnload(){
uni.$off('writeConfirmData')
},
methods: {
onSubmitClick(){
var timetableUuids = [];
this.calendarInfo.map((opt)=>{
if(opt.checked){
timetableUuids.push(opt.calendarId);
}
})
var body = {
"openLab": this.labInfo.labUuid,
"openProject": this.labInfo.projects,
"note": this.description,
"timetableUuids": timetableUuids,
"todo": ""
}
uni.request({
url: this.GLOBALUTIL.url + '/openlab/v2/orders/user',
method: 'POST',
header: this.GLOBALUTIL.commonHeader,
data: JSON.stringify(body),
success: (res) => {
if(res.data.code == 200){
this.$refs.popup.open({
type:'success',
content:'预约成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack({
})
},1000)
setTimeout(()=>{
uni.$emit("refreshCalendar")
},1500)
}else{
var errmessage = res.data.message;
this.$refs.popup.open({
type:'err',
content:errmessage,
timeout:1000,
isClick:false
});
}
}
})
},
changeTextValue:function(e){
this.description = e.detail.value;
},
cancel:function(){
this.submitShow = false;
},
showModal:function(){
this.submitShow = true;
},
},
components: {
PopUp,
FormAlert
},
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
background-color: #FFFFFF
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 32rpx;
color: #666666;
}
.contenttext {
font-size: 30rpx;
color: #333333;
margin-left:30rpx;
}
.contenttextTime{
font-size: 28rpx;
color: #333333;
margin-left:30rpx;
}
.loginbtn {
width:180rpx;
height:200rpx;
}
.login-hover {
width:200rpx;
height:200rpx;
background-color:#00CE47;
}
.testview {
width:209rpx;
height:200rpx;
background-color:linear-gradient(red, yellow, blue);
}
.location-container{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
width:100%;
}
.arrow-right{
width:40rpx;
height:40rpx;
}
.camera-button {
display:flex;
flex-direction: row;
align-items: center;
justify-content: center;
width:200rpx;
height: 200rpx;
padding:0 ;
}
.camera {
width:50rpx;
height:50rpx;
}
.submit-button {
display: flex;
width:600rpx;
height:60rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
margin-top: 180rpx;
}
.submittext {
font-size: 14px;
color: #FFFFFF;
font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.submithover{
opacity: 0.7;
}
.detail {
width:100%;
height:300rpx;
border: 1rpx solid #e8e8e8;
}
.status_bar {
height: var(--status-bar-height);
width: 100%;
}
.location{
font-size: 34rpx;
color: #000000;
}
.tip {
width: 30rpx;
height:30rpx
}
.hover {
opacity: 0.7;
}
.ori{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
width:100%
}
</style>
<template>
<view style="width: 100%;height: 100%; display: flex;flex-direction: column;">
<view class="ori" style="width: 100%;height:200upx;border-radius: 5px;padding:0">
<view style="width: 100%;height: 100%; display: flex;flex-direction: column;background-color: #F5F5F5;">
<view class="ori" style="width: 100%;height:160upx;border-radius: 5px;padding:0">
<view class="topContainer">
<view class="ori" style="margin-top: 5upx;">
<text class="approvalTitle">{{"危化品采购"}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<text class="type">{{"仓库名称"}}</text>
<text class="type">{{"160元"}}</text>
<text class="approvalTitle">{{approvalData.title}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<view class="ori">
<view style="width: 20rpx;margin-right:20rpx;">
<image mode="scaleToFill" class="icon" src="/static/lab-share/teacher.png" />
</view>
<text class="type">{{"申请人"}}</text>
<text class="type">{{approvalData.creatorName}}</text>
</view>
<text class="type" style="margin-left:20upx">{{"申请时间"}}</text>
<text class="type" style="margin-left:20upx">{{approvalData.createTimeFormated}}</text>
</view>
</view>
</view>
<MescrollBody class="containter" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
@up="upCallback">
<view class="news-li" v-for="news in dataList" :key="news.id" hover-class="hover" @click="goDetail(news)">
<view class="news-li" v-for="news in detailList" :key="news.id" hover-class="hover" @click="goDetail(news)">
<view class="ori" style="height:200upx;border-radius: 5px;">
<view class="line">
......@@ -32,7 +28,7 @@
</view>
<view style="height:160upx;justify-content: space-between;display: flex;flex-direction: column;">
<view>
<text class="labTitle">{{"这是一个危险源品名"}}</text>
<text class="labTitle">{{news.tradeName}}</text>
</view>
<view>
<text class="type">{{"危险源类别"}}</text>
......@@ -40,28 +36,55 @@
<view class="ori">
<view class="oriItem">
<text class="type">{{"单价:"}}</text>
<text class="type" style="margin-left:20upx">{{"20"}}</text>
<text class="type" style="margin-left:20upx">{{news.unitPrice}}</text>
</view>
<view class="oriItem">
<text class="type">{{"数量:"}}</text>
<text class="type" style="margin-left:20upx">{{"10"}}</text>
<text class="type" style="margin-left:20upx">{{news.num}}</text>
</view>
<view class="oriItem">
<text class="type">{{"总价:"}}</text>
<text class="type" style="margin-left:20upx">{{"200"}}</text>
<text class="type" style="margin-left:20upx">{{news.total}}</text>
</view>
</view>
</view>
</view>
</view>
</MescrollBody>
<Popup ref="mod" type="center" >
<view class="uni-tip">
<view class="suggestion">
<textarea @input="onTextChange" :value="des" placeholder="请输入审批意见" auto-height />
</view>
<view style="display: flex;justify-content: center;align-items: center;align-self: flex-end;width: 100%;">
<view hover-class="submithover" @click="disagree" class="clear-button">
<view><text class="cleartext">驳回</text></view>
</view>
<view hover-class="submithover" @click="agree" class="submit-button">
<view><text class="submittext">同意</text></view>
</view>
</view>
</view>
</Popup>
<Popup ref="suggesstion" type="center" >
<view class="uni-tip">
<text>请输入审批意见</text>
</view>
</Popup>
<Info ref="info" :isdistance="true"></Info>
<view style="width:100%;display: flex;align-items: center;justify-content: center;position: absolute; bottom:0;">
<view hover-class="submithover" @click="showModal" class="approval-button">
<text class="submittext" >审批</text>
</view>
</view>
</view>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import Popup from "@/components/uni-popup/popup.vue"
import Info from "@/components/popup/popup.vue"
export default {
mixins: [MescrollMixin],
data() {
......@@ -69,23 +92,26 @@
downOption: {
auto: false //是否在初始化后,自动执行downCallback; 默认true
},
dataList: [1,2,3],
upOption: {
use: false, // 是否启用上拉加载; 默认true
},
showProject:false,
showDrawer:false
showDrawer:false,
approvalId:"",
approvalData:{},
detailList:[],
des:""
}
},
methods: {
onLoad() {
onLoad(option) {
var that = this;
uni.$on('refreshTaskList', function(data) {
})
if(option){
this.approvalId = option.approvalId;
this.loadData();
},
onUnload() {
uni.$off('refreshTaskList', function(data) {})
}
},
/*下拉刷新的回调 */
downCallback() {
......@@ -95,19 +121,200 @@
upCallback(page) {
},
onTextChange(e){
this.des = e.detail.value
},
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/bill/com.beecode.sedu.consumable.bill.PurchaseBill/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
console.log(res.data)
var data = res.data.content;
data.createTimeFormated = this.GLOBALUTIL.moment(data.createTime).format("YYYY-MM-DD HH:mm:ss")
this.approvalData = data;
}
})
uni.request({
url: this.GLOBALUTIL.url + '/consumable/purchase/'+this.approvalId+'/detail',
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.data;
this.detailList = data.map((opt)=>{
opt.total = opt.num * opt.unitPrice
return opt
});
}
})
},
goDetail(data) {
var detailData = [
{
title: "品名",
value: ""
},
{
title: "别名",
value: ""
},
{
title: "试剂容量",
value: ""
},
{
title: "容量单位",
value: ""
},
{
title: "规格",
value: ""
},
{
title: "数量",
value: ""
},
{
title: "生产厂家",
value: ""
},
]
detailData[0].value = data.tradeName;
detailData[1].value = data.consumableInfo.alias
detailData[2].value = data.capacity
detailData[3].value = data.unit
detailData[4].value = data.specification
detailData[5].value = data.num
detailData[6].value = data.manufacturer?data.manufacturer.name:"无"
uni.navigateTo({
url: "./detail?settingId=" + data.id
url: "../item-info"
})
setTimeout(()=>{
uni.$emit("approvalItemData", [detailData])
},300)
// this.$nextTick(function(){
// uni.$emit("approvalItemData", [data])
// })
},
showModal(){
this.$refs['mod'].open()
},
agree(){
if(this.des == ""){
this.des = "同意"
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.PurchaseBill&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "1",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
uni.$emit("approvalItemData", [data])
}
})
},
disagree(){
if(this.des == ""){
this.$refs.info.open({
type:'err',
content:'请输入审批意见',
timeout:1000,
isClick:false
});
return ;
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.PurchaseBill&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
// console.log(res)
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "99",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
}
},
components: {
MescrollBody,
Popup,
Info
},
}
</script>
......@@ -313,7 +520,7 @@
padding-left:30upx;
padding-right:30upx;
flex:1;
height:160upx;
height:120upx;
justify-content: space-between;
display: flex;
flex-direction: column;
......@@ -324,4 +531,67 @@
align-items: center;
margin-right: 30upx;
}
.uni-tip {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
width: 650upx;
background-color: #fff;
}
.uni-tip-title {
margin-bottom: 10px;
text-align: center;
font-weight: bold;
font-size: 16px;
color: #333;
}
.uni-tip-content {
/* padding: 15px;
*/
font-size: 14px;
color: #666;
}
.uni-tip-group-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
margin-top: 20px;
}
.uni-tip-button {
flex: 1;
text-align: center;
font-size: 14px;
color: #3b4144;
}
.approval-button{
display: flex;
width:600rpx;
height:80rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
margin-left: 0;
margin-right: 0;
margin-bottom: 40rpx;
}
.suggestion{
margin-top: 20upx;
height:280upx;
width:100% ;
padding:10upx;
}
.submittext{
color: #ffffff;
font-size: 30upx;
font-family: 'PingFangSC-Regular';
}
</style>
......@@ -19,14 +19,14 @@
<MescrollBody class="containter" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
@up="upCallback">
<view class="news-li" v-for="news in detailList" :key="news.id" hover-class="hover" @click="goDetail(news)">
<view class="ori" style="height:200upx;border-radius: 5px;">
<view class="ori" style="height:230upx;border-radius: 5px;">
<view class="line">
</view>
<view class="dotContainer">
<image mode="scaleToFill" class="dot" src="/static/lab-share/cover.jpg" />
</view>
<view style="height:160upx;justify-content: space-between;display: flex;flex-direction: column;">
<view style="height:200upx;justify-content: space-between;display: flex;flex-direction: column;">
<view>
<text class="labTitle">{{news.tradeName}}</text>
</view>
......@@ -35,17 +35,10 @@
</view>
<view class="ori">
<view class="oriItem">
<text class="type">{{"单价:"}}</text>
<text class="type" style="margin-left:20upx">{{news.unitPrice}}</text>
</view>
<view class="oriItem">
<text class="type">{{"数量:"}}</text>
<text class="type">{{"领用数量:"}}</text>
<text class="type" style="margin-left:20upx">{{news.num}}</text>
</view>
<view class="oriItem">
<text class="type">{{"总价:"}}</text>
<text class="type" style="margin-left:20upx">{{news.total}}</text>
</view>
</view>
</view>
</view>
......@@ -127,25 +120,23 @@
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/bill/com.beecode.sedu.consumable.bill.PurchaseBill/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
url: this.GLOBALUTIL.url + '/bill/com.beecode.sedu.consumable.bill.RequisitionBill/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
console.log(res.data)
var data = res.data.content;
data.createTimeFormated = this.GLOBALUTIL.moment(data.createTime).format("YYYY-MM-DD HH:mm:ss")
this.approvalData = data;
}
})
uni.request({
url: this.GLOBALUTIL.url + '/consumable/purchase/'+this.approvalId+'/detail',
url: this.GLOBALUTIL.url + '/consumable/requisition/'+this.approvalId+'/detail',
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.data;
this.detailList = data.map((opt)=>{
opt.total = opt.num * opt.unitPrice
return opt
});
this.detailList = data
}
})
},
......@@ -172,22 +163,27 @@
value: ""
},
{
title: "数量",
title: "领用数量",
value: ""
},
{
title: "生产厂家",
title: "原存放房间",
value: ""
},
{
title: "使用房间",
value: ""
}
]
console.log(data)
detailData[0].value = data.tradeName;
detailData[1].value = data.consumableInfo.alias
detailData[2].value = data.capacity
detailData[3].value = data.unit
detailData[4].value = data.specification
detailData[1].value = data.consumablesStock.consumablesEntity.consumableInfoEntity.alias
detailData[2].value = data.consumablesStock.consumablesEntity.capacity
detailData[3].value = data.consumablesStock.consumablesEntity.unit
detailData[4].value = data.consumablesStock.consumablesEntity.specification
detailData[5].value = data.num
detailData[6].value = data.manufacturer?data.manufacturer.name:"无"
detailData[6].value = data.consumablesStock.consumablesEntity.storeroomViewEntity.addresses[0].roomName
detailData[7].value = data.room.name
uni.navigateTo({
url: "../item-info"
})
......@@ -207,7 +203,7 @@
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.PurchaseBill&bizDataId='+this.approvalId,
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.RequisitionBill&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
......@@ -263,7 +259,7 @@
return ;
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.PurchaseBill&bizDataId='+this.approvalId,
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.RequisitionBill&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
......@@ -503,8 +499,8 @@
margin-top:15upx;
}
.dotContainer{
height:180upx;
width:80upx;
height:210upx;
width:120upx;
display: flex;
justify-content: center;
align-items: flex-start;
......
<template>
<view style="width: 100%;height: 100%; display: flex;flex-direction: column;background-color: #F5F5F5;">
<view class="ori" style="width: 100%;height:180upx;border-radius: 5px;padding:0">
<view class="topContainer">
<view class="ori" style="width: 100%;justify-content: space-between;">
<text class="approvalTitle">{{"采购申请单"}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<view class="ori">
<view style="width: 20rpx;margin-right:20rpx;">
<image mode="scaleToFill" class="icon" src="/static/lab-share/teacher.png" />
</view>
<text class="type">{{approvalData.creatorName}}</text>
</view>
<text class="type" style="margin-left:20upx">{{approvalData.college.title}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<text class="type">申请时间: {{approvalData.applicationDateFormated}}</text>
<text class="type" style="margin-left:20upx">{{approvalData.total}}</text>
</view>
</view>
</view>
<MescrollBody class="containter" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
@up="upCallback">
<view class="news-li" v-for="news in detailList" :key="news.id" hover-class="hover" @click="goDetail(news)">
<view class="ori" style="height:200upx;border-radius: 5px;">
<view class="line">
</view>
<view class="dotContainer">
<image mode="scaleToFill" class="dot" src="/static/lab-share/cover.jpg" />
</view>
<view style="height:160upx;justify-content: space-between;display: flex;flex-direction: column;">
<view>
<text class="labTitle">{{news.title}}</text>
</view>
<view>
<text class="type">{{news.specification}}</text>
</view>
<view class="ori">
<view class="oriItem">
<text class="type">{{"单价:"}}</text>
<text class="type" style="margin-left:20upx">{{news.unitPrice}}</text>
</view>
<view class="oriItem">
<text class="type">{{"数量:"}}</text>
<text class="type" style="margin-left:20upx">{{news.num}}</text>
</view>
</view>
</view>
</view>
</view>
</MescrollBody>
<Popup ref="mod" type="center" >
<view class="uni-tip">
<view class="suggestion">
<textarea @input="onTextChange" :value="des" placeholder="请输入审批意见" auto-height />
</view>
<view style="display: flex;justify-content: center;align-items: center;align-self: flex-end;width: 100%;">
<view hover-class="submithover" @click="disagree" class="clear-button">
<view><text class="cleartext">驳回</text></view>
</view>
<view hover-class="submithover" @click="agree" class="submit-button">
<view><text class="submittext">同意</text></view>
</view>
</view>
</view>
</Popup>
<Popup ref="suggesstion" type="center" >
<view class="uni-tip">
<text>请输入审批意见</text>
</view>
</Popup>
<Info ref="info" :isdistance="true"></Info>
<view style="width:100%;display: flex;align-items: center;justify-content: center;position: absolute; bottom:0;">
<view hover-class="submithover" @click="showModal" class="approval-button">
<text class="submittext" >审批</text>
</view>
</view>
</view>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import Popup from "@/components/uni-popup/popup.vue"
import Info from "@/components/popup/popup.vue"
export default {
mixins: [MescrollMixin],
data() {
return {
downOption: {
auto: false //是否在初始化后,自动执行downCallback; 默认true
},
upOption: {
use: false, // 是否启用上拉加载; 默认true
},
showProject:false,
showDrawer:false,
approvalId:"",
approvalData:{},
detailList:[],
des:""
}
},
methods: {
onLoad(option) {
var that = this;
if(option){
this.approvalId = option.approvalId;
this.loadData();
}
},
/*下拉刷新的回调 */
downCallback() {
this.mescroll.endSuccess();
},
/*上拉加载的回调 */
upCallback(page) {
},
onTextChange(e){
this.des = e.detail.value
},
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/bill/com.beecode.tspp.manage.bill.EquipmentPurchaseBillDefine/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
// console.log(res.data)
var data = res.data.content;
data.applicationDateFormated = this.GLOBALUTIL.moment(data.applicationDate).format("YYYY-MM-DD")
this.approvalData = data;
this.detailList = data.equipmentPurchaseDetails
}
})
// uni.request({
// url: this.GLOBALUTIL.url + '/consumable/purchase/'+this.approvalId+'/detail',
// method: 'GET',
// header: this.GLOBALUTIL.commonHeader,
// success: (res) => {
// var data = res.data.data;
// this.detailList = data.map((opt)=>{
// opt.total = opt.num * opt.unitPrice
// return opt
// });
// }
// })
},
goDetail(data) {
return;
var detailData = [
{
title: "品名",
value: ""
},
{
title: "别名",
value: ""
},
{
title: "试剂容量",
value: ""
},
{
title: "容量单位",
value: ""
},
{
title: "规格",
value: ""
},
{
title: "数量",
value: ""
},
{
title: "生产厂家",
value: ""
},
]
detailData[0].value = data.tradeName;
detailData[1].value = data.consumableInfo.alias
detailData[2].value = data.capacity
detailData[3].value = data.unit
detailData[4].value = data.specification
detailData[5].value = data.num
detailData[6].value = data.manufacturer?data.manufacturer.name:"无"
uni.navigateTo({
url: "../item-info"
})
setTimeout(()=>{
uni.$emit("approvalItemData", [detailData])
},300)
// this.$nextTick(function(){
// uni.$emit("approvalItemData", [data])
// })
},
showModal(){
this.$refs['mod'].open()
},
agree(){
if(this.des == ""){
this.des = "同意"
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.tspp.manage.bill.EquipmentPurchaseBillDefine&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "1",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
},
disagree(){
if(this.des == ""){
this.$refs.info.open({
type:'err',
content:'请输入审批意见',
timeout:1000,
isClick:false
});
return ;
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.tspp.manage.bill.EquipmentPurchaseBillDefine&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
// console.log(res)
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "99",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
}
},
components: {
MescrollBody,
Popup,
Info
},
}
</script>
<style>
/*展示上拉加载的数据列表*/
.news-li {
font-size: 32upx;
padding-right: 20upx;
padding-left: 20upx;
width: calc(100%-40upx);
display: flex;
flex-direction: column;
background-color: #f5f5f5;
margin-top:30rpx;
}
.news-li .new-content {
font-size: 28upx;
margin-top: 10upx;
margin-left: 20upx;
color: #666;
}
.icon {
width: 25rpx;
height: 25rpx;
margin-right: 20rpx;
}
.top-container {
display: flex;
flex-direction: row;
align-items: center;
}
.status {
width: 170rpx;
height: 35rpx;
background-color: rgba(242, 115, 115, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-finish {
width: 170rpx;
height: 35rpx;
background-color: rgba(47, 190, 178, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-text {
color: #F27373;
font-size: 11px;
}
.status-finish-text {
color: #2FBEB2;
font-size: 11px;
}
.hover {
opacity: 0.7;
}
.title {
font-size: 17px;
font-weight: 300;
}
.des {
font-weight: 200;
font-size: 14px;
color: #676767
}
.detail {
font-size: 14px;
}
.type {
font-size: 14px;
}
.containter {
display: flex;
width: 100%;
background-color: #F5F5F5;
}
.labTitle{
}
.approvalTitle{
font-size: 32upx;
}
.ori{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.oritest{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.filterButton{
width:50%;
height:80upx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.selectLine {
width: 30upx;
height:1upx;
border-bottom: 1px solid #00CE47;
justify-self: flex-end;
}
.hover{
opacity: 0.7;
}
.titleContainer{
height: 90%;
display: flex;
justify-content: center;
align-items: center;
}
.d-container {
width: 600upx;
height:100%
}
.item {
width: auto;
margin-top: 20upx;
margin-left: 20upx;
margin-right: 40upx;
padding-bottom: 10upx;
}
.selcontent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20px;
}
.tip {
width: 30upx;
height: 30upx
}
.datacontent {
width: 100%;
font-size: 16px;
color: #4F4F4F;
}
.submit-button {
width:50%;
height:50px;
display: flex;
background-color: #409C9C;
justify-content: center;
align-items: center;
}
.clear-button {
display: flex;
width:50%;
height:50px;
background-color: #F8FAFA;
border-color: 1px solid #DDDEE1;
justify-content: center;
align-items: center;
}
.dot{
width:40upx;
height:40upx;
margin-top:15upx;
}
.dotContainer{
height:180upx;
width:80upx;
display: flex;
justify-content: center;
align-items: flex-start;
}
.line{
width:2px;
height:200upx;
background-color: #75A8FF;
}
.topContainer{
width: 100%;
padding-left:30upx;
padding-right:30upx;
flex:1;
height:150upx;
justify-content: space-between;
display: flex;
flex-direction: column;
}
.oriItem{
display: flex;
flex-direction: row;
align-items: center;
margin-right: 30upx;
}
.uni-tip {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
width: 650upx;
background-color: #fff;
}
.uni-tip-title {
margin-bottom: 10px;
text-align: center;
font-weight: bold;
font-size: 16px;
color: #333;
}
.uni-tip-content {
/* padding: 15px;
*/
font-size: 14px;
color: #666;
}
.uni-tip-group-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
margin-top: 20px;
}
.uni-tip-button {
flex: 1;
text-align: center;
font-size: 14px;
color: #3b4144;
}
.approval-button{
display: flex;
width:600rpx;
height:80rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
margin-left: 0;
margin-right: 0;
margin-bottom: 40rpx;
}
.suggestion{
margin-top: 20upx;
height:280upx;
width:100% ;
padding:10upx;
}
.submittext{
color: #ffffff;
font-size: 30upx;
font-family: 'PingFangSC-Regular';
}
</style>
<template>
<view style="width: 100%;height: 100%; display: flex;flex-direction: column;background-color: #F5F5F5;">
<view class="ori" style="width: 100%;height:160upx;border-radius: 5px;padding:0">
<view class="topContainer">
<view class="ori" style="width: 100%;margin-top:5upx;justify-content: space-between;">
<view class="ori">
<text class="approvalTitle">{{"设备报修申请"}}</text>
</view>
<text class="type" style="margin-left:20upx">{{approvalData.maintenanceBudget}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<view class="ori">
<view style="width: 20rpx;margin-right:20rpx;">
<image mode="scaleToFill" class="icon" src="/static/lab-share/teacher.png" />
</view>
<text class="type">{{approvalData.creatorName}}</text>
</view>
<text class="type" style="margin-left:20upx">{{approvalData.createTimeFormated}}</text>
</view>
</view>
</view>
<view class="top-container">
<view class="detailtext" v-for="info in detailList" :key="info.title" >
<text class="titletext">{{info.title}}</text><text class="contenttext">{{info.value}}</text>
</view>
</view>
<Popup ref="mod" type="center" >
<view class="uni-tip">
<view class="suggestion">
<textarea @input="onTextChange" :value="des" placeholder="请输入审批意见" auto-height />
</view>
<view style="display: flex;justify-content: center;align-items: center;align-self: flex-end;width: 100%;">
<view hover-class="submithover" @click="disagree" class="clear-button">
<view><text class="cleartext">驳回</text></view>
</view>
<view hover-class="submithover" @click="agree" class="submit-button">
<view><text class="submittext">同意</text></view>
</view>
</view>
</view>
</Popup>
<Popup ref="suggesstion" type="center" >
<view class="uni-tip">
<text>请输入审批意见</text>
</view>
</Popup>
<Info ref="info" :isdistance="true"></Info>
<view style="width:100%;display: flex;align-items: center;justify-content: center;position: absolute; bottom:0;">
<view hover-class="submithover" @click="showModal" class="approval-button">
<text class="submittext" >审批</text>
</view>
</view>
</view>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import Popup from "@/components/uni-popup/popup.vue"
import Info from "@/components/popup/popup.vue"
export default {
mixins: [MescrollMixin],
data() {
return {
downOption: {
auto: false //是否在初始化后,自动执行downCallback; 默认true
},
upOption: {
use: false, // 是否启用上拉加载; 默认true
},
showProject:false,
showDrawer:false,
approvalId:"",
approvalData:{},
detailList:[],
des:""
}
},
methods: {
onLoad(option) {
var that = this;
if(option){
this.approvalId = option.approvalId;
this.loadData();
}
},
/*下拉刷新的回调 */
downCallback() {
this.mescroll.endSuccess();
},
/*上拉加载的回调 */
upCallback(page) {
},
onTextChange(e){
this.des = e.detail.value
},
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/bill/com.beecode.tspp.manage.bill.EquipmentRepairEntityBillDefine/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
console.log(res.data)
var data = res.data.content;
data.createTimeFormated = this.GLOBALUTIL.moment(data.createTime).format("YYYY-MM-DD HH:mm:ss")
this.approvalData = data;
var detailList = [
{
title: "设备名称",
value: ""
},
{
title: "维修原因",
value: ""
},
{
title: "维修单位",
value: ""
},
{
title: "预估费用",
value: ""
},
{
title: "所属学院",
value: ""
},
]
detailList[0].value = data.creatorName
detailList[1].value = data.reason
detailList[2].value = data.maintenanceUnit
detailList[3].value = data.maintenanceBudget
detailList[4].value = data.college.title
this.detailList = detailList
}
})
},
showModal(){
this.$refs['mod'].open()
},
agree(){
if(this.des == ""){
this.des = "同意"
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.tspp.manage.bill.EquipmentRepairEntityBillDefine&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "1",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
},
disagree(){
if(this.des == ""){
this.$refs.info.open({
type:'err',
content:'请输入审批意见',
timeout:1000,
isClick:false
});
return ;
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.tspp.manage.bill.EquipmentRepairEntityBillDefine&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
// console.log(res)
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "99",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
}
},
components: {
MescrollBody,
Popup,
Info
},
}
</script>
<style>
/*展示上拉加载的数据列表*/
.news-li {
font-size: 32upx;
padding-right: 20upx;
padding-left: 20upx;
width: calc(100%-40upx);
display: flex;
flex-direction: column;
background-color: #f5f5f5;
margin-top:30rpx;
}
.news-li .new-content {
font-size: 28upx;
margin-top: 10upx;
margin-left: 20upx;
color: #666;
}
.icon {
width: 25rpx;
height: 25rpx;
margin-right: 20rpx;
}
.status {
width: 170rpx;
height: 35rpx;
background-color: rgba(242, 115, 115, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-finish {
width: 170rpx;
height: 35rpx;
background-color: rgba(47, 190, 178, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-text {
color: #F27373;
font-size: 11px;
}
.status-finish-text {
color: #2FBEB2;
font-size: 11px;
}
.hover {
opacity: 0.7;
}
.title {
font-size: 17px;
font-weight: 300;
}
.des {
font-weight: 200;
font-size: 14px;
color: #676767
}
.detail {
font-size: 14px;
}
.type {
font-size: 14px;
}
.containter {
display: flex;
width: 100%;
background-color: #F5F5F5;
}
.labTitle{
}
.approvalTitle{
font-size: 32upx;
}
.ori{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.oritest{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.filterButton{
width:50%;
height:80upx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.selectLine {
width: 30upx;
height:1upx;
border-bottom: 1px solid #00CE47;
justify-self: flex-end;
}
.hover{
opacity: 0.7;
}
.titleContainer{
height: 90%;
display: flex;
justify-content: center;
align-items: center;
}
.d-container {
width: 600upx;
height:100%
}
.item {
width: auto;
margin-top: 20upx;
margin-left: 20upx;
margin-right: 40upx;
padding-bottom: 10upx;
}
.selcontent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20px;
}
.tip {
width: 30upx;
height: 30upx
}
.datacontent {
width: 100%;
font-size: 16px;
color: #4F4F4F;
}
.submit-button {
width:50%;
height:50px;
display: flex;
background-color: #409C9C;
justify-content: center;
align-items: center;
}
.clear-button {
display: flex;
width:50%;
height:50px;
background-color: #F8FAFA;
border-color: 1px solid #DDDEE1;
justify-content: center;
align-items: center;
}
.dot{
width:40upx;
height:40upx;
margin-top:15upx;
}
.dotContainer{
height:210upx;
width:100upx;
display: flex;
justify-content: center;
align-items: flex-start;
}
.line{
width:2px;
height:200upx;
background-color: #75A8FF;
}
.topContainer{
width: 100%;
padding-left:30upx;
padding-right:30upx;
flex:1;
height:120upx;
justify-content: space-between;
display: flex;
flex-direction: column;
}
.oriItem{
display: flex;
flex-direction: row;
align-items: center;
margin-right: 30upx;
}
.uni-tip {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
width: 650upx;
background-color: #fff;
}
.uni-tip-title {
margin-bottom: 10px;
text-align: center;
font-weight: bold;
font-size: 16px;
color: #333;
}
.uni-tip-content {
/* padding: 15px;
*/
font-size: 14px;
color: #666;
}
.uni-tip-group-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
margin-top: 20px;
}
.uni-tip-button {
flex: 1;
text-align: center;
font-size: 14px;
color: #3b4144;
}
.approval-button{
display: flex;
width:600rpx;
height:80rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
margin-left: 0;
margin-right: 0;
margin-bottom: 40rpx;
}
.suggestion{
margin-top: 20upx;
height:280upx;
width:100% ;
padding:10upx;
}
.submittext{
color: #ffffff;
font-size: 30upx;
font-family: 'PingFangSC-Regular';
}
.top-container {
display: flex;
flex-direction: column;
width: 100%;
margin-top: 50rpx;
background-color: #FFFFFF;
}
.titletext {
color: '#101317';
font-family: 'PingFangSC-Regular';
font-weight: '400';
margin-left: 10px;
font-size: 28rpx;
}
.contenttext {
font-size: 28rpx;
color: #333333;
font-family: 'PingFangSC-Regular';
font-weight: '400';
flex: 2;
display: flex;
align-items: flex-end;
justify-content: flex-end;
margin-right: 10px;
padding-left: 20px;
}
.detailtext {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width:100%;
height:90upx;
border-bottom: 1px solid #D0D0D0;
}
</style>
<template>
<view style="width: 100%;height: 100%; display: flex;flex-direction: column;background-color: #F5F5F5;">
<view class="ori" style="width: 100%;height:160upx;border-radius: 5px;padding:0">
<view class="topContainer">
<view class="ori" style="margin-top: 5upx;">
<text class="approvalTitle">{{approvalData.trainingTitle}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<view class="ori">
<view style="width: 20rpx;margin-right:20rpx;">
<image mode="scaleToFill" class="icon" src="/static/lab-share/teacher.png" />
</view>
<text class="type">{{approvalData.creatorName}}</text>
</view>
<text class="type" style="margin-left:20upx">{{approvalData.createTimeFormated}}</text>
</view>
</view>
</view>
<view class="top-container">
<view class="detailtext" v-for="info in detailList" :key="info.title" >
<text class="titletext">{{info.title}}</text><text class="contenttext">{{info.value}}</text>
</view>
</view>
<Popup ref="mod" type="center" >
<view class="uni-tip">
<view class="suggestion">
<textarea @input="onTextChange" :value="des" placeholder="请输入审批意见" auto-height />
</view>
<view style="display: flex;justify-content: center;align-items: center;align-self: flex-end;width: 100%;">
<view hover-class="submithover" @click="disagree" class="clear-button">
<view><text class="cleartext">驳回</text></view>
</view>
<view hover-class="submithover" @click="agree" class="submit-button">
<view><text class="submittext">同意</text></view>
</view>
</view>
</view>
</Popup>
<Popup ref="suggesstion" type="center" >
<view class="uni-tip">
<text>请输入审批意见</text>
</view>
</Popup>
<Info ref="info" :isdistance="true"></Info>
<view style="width:100%;display: flex;align-items: center;justify-content: center;position: absolute; bottom:0;">
<view hover-class="submithover" @click="showModal" class="approval-button">
<text class="submittext" >审批</text>
</view>
</view>
</view>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import Popup from "@/components/uni-popup/popup.vue"
import Info from "@/components/popup/popup.vue"
export default {
mixins: [MescrollMixin],
data() {
return {
downOption: {
auto: false //是否在初始化后,自动执行downCallback; 默认true
},
upOption: {
use: false, // 是否启用上拉加载; 默认true
},
showProject:false,
showDrawer:false,
approvalId:"",
approvalData:{},
detailList:[],
des:""
}
},
methods: {
onLoad(option) {
var that = this;
if(option){
this.approvalId = option.approvalId;
this.loadData();
}
},
/*下拉刷新的回调 */
downCallback() {
this.mescroll.endSuccess();
},
/*上拉加载的回调 */
upCallback(page) {
},
onTextChange(e){
this.des = e.detail.value
},
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/bill/com.beecode.tspp.manage.bill.LabPersonnelTrainingBillDefine/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
console.log(res.data)
var data = res.data.content;
data.createTimeFormated = this.GLOBALUTIL.moment(data.createTime).format("YYYY-MM-DD HH:mm:ss")
this.approvalData = data;
var detailList = [
{
title: "申请人",
value: ""
},
{
title: "所属学院",
value: ""
},
{
title: "培训名称",
value: ""
},
{
title: "培训单位",
value: ""
},
{
title: "预估费用",
value: ""
},
{
title: "申请理由",
value: ""
},
]
detailList[0].value = data.proposer.name
detailList[1].value = data.college.title
detailList[2].value = data.trainingTitle
detailList[3].value = data.trainingUnit
detailList[4].value = data.budget
detailList[5].value = data.reason
this.detailList = detailList
}
})
},
showModal(){
this.$refs['mod'].open()
},
agree(){
if(this.des == ""){
this.des = "同意"
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.tspp.manage.bill.LabPersonnelTrainingBillDefine&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "1",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
},
disagree(){
if(this.des == ""){
this.$refs.info.open({
type:'err',
content:'请输入审批意见',
timeout:1000,
isClick:false
});
return ;
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.tspp.manage.bill.LabPersonnelTrainingBillDefine&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
// console.log(res)
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "99",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
}
},
components: {
MescrollBody,
Popup,
Info
},
}
</script>
<style>
/*展示上拉加载的数据列表*/
.news-li {
font-size: 32upx;
padding-right: 20upx;
padding-left: 20upx;
width: calc(100%-40upx);
display: flex;
flex-direction: column;
background-color: #f5f5f5;
margin-top:30rpx;
}
.news-li .new-content {
font-size: 28upx;
margin-top: 10upx;
margin-left: 20upx;
color: #666;
}
.icon {
width: 25rpx;
height: 25rpx;
margin-right: 20rpx;
}
.status {
width: 170rpx;
height: 35rpx;
background-color: rgba(242, 115, 115, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-finish {
width: 170rpx;
height: 35rpx;
background-color: rgba(47, 190, 178, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-text {
color: #F27373;
font-size: 11px;
}
.status-finish-text {
color: #2FBEB2;
font-size: 11px;
}
.hover {
opacity: 0.7;
}
.title {
font-size: 17px;
font-weight: 300;
}
.des {
font-weight: 200;
font-size: 14px;
color: #676767
}
.detail {
font-size: 14px;
}
.type {
font-size: 14px;
}
.containter {
display: flex;
width: 100%;
background-color: #F5F5F5;
}
.labTitle{
}
.approvalTitle{
font-size: 32upx;
}
.ori{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.oritest{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.filterButton{
width:50%;
height:80upx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.selectLine {
width: 30upx;
height:1upx;
border-bottom: 1px solid #00CE47;
justify-self: flex-end;
}
.hover{
opacity: 0.7;
}
.titleContainer{
height: 90%;
display: flex;
justify-content: center;
align-items: center;
}
.d-container {
width: 600upx;
height:100%
}
.item {
width: auto;
margin-top: 20upx;
margin-left: 20upx;
margin-right: 40upx;
padding-bottom: 10upx;
}
.selcontent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20px;
}
.tip {
width: 30upx;
height: 30upx
}
.datacontent {
width: 100%;
font-size: 16px;
color: #4F4F4F;
}
.submit-button {
width:50%;
height:50px;
display: flex;
background-color: #409C9C;
justify-content: center;
align-items: center;
}
.clear-button {
display: flex;
width:50%;
height:50px;
background-color: #F8FAFA;
border-color: 1px solid #DDDEE1;
justify-content: center;
align-items: center;
}
.dot{
width:40upx;
height:40upx;
margin-top:15upx;
}
.dotContainer{
height:210upx;
width:100upx;
display: flex;
justify-content: center;
align-items: flex-start;
}
.line{
width:2px;
height:200upx;
background-color: #75A8FF;
}
.topContainer{
width: 100%;
padding-left:30upx;
padding-right:30upx;
flex:1;
height:120upx;
justify-content: space-between;
display: flex;
flex-direction: column;
}
.oriItem{
display: flex;
flex-direction: row;
align-items: center;
margin-right: 30upx;
}
.uni-tip {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
width: 650upx;
background-color: #fff;
}
.uni-tip-title {
margin-bottom: 10px;
text-align: center;
font-weight: bold;
font-size: 16px;
color: #333;
}
.uni-tip-content {
/* padding: 15px;
*/
font-size: 14px;
color: #666;
}
.uni-tip-group-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
margin-top: 20px;
}
.uni-tip-button {
flex: 1;
text-align: center;
font-size: 14px;
color: #3b4144;
}
.approval-button{
display: flex;
width:600rpx;
height:80rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
margin-left: 0;
margin-right: 0;
margin-bottom: 40rpx;
}
.suggestion{
margin-top: 20upx;
height:280upx;
width:100% ;
padding:10upx;
}
.submittext{
color: #ffffff;
font-size: 30upx;
font-family: 'PingFangSC-Regular';
}
.top-container {
display: flex;
flex-direction: column;
width: 100%;
margin-top: 50rpx;
background-color: #FFFFFF;
}
.titletext {
color: '#101317';
font-family: 'PingFangSC-Regular';
font-weight: '400';
margin-left: 10px;
font-size: 28rpx;
}
.contenttext {
font-size: 28rpx;
color: #333333;
font-family: 'PingFangSC-Regular';
font-weight: '400';
flex: 2;
display: flex;
align-items: flex-end;
justify-content: flex-end;
margin-right: 10px;
padding-left: 20px;
}
.detailtext {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width:100%;
height:90upx;
border-bottom: 1px solid #D0D0D0;
}
</style>
<template>
<view style="width: 100%;height: 100%; display: flex;flex-direction: column;background-color: #F5F5F5;">
<view class="ori" style="width: 100%;height:160upx;border-radius: 5px;padding:0">
<view class="topContainer">
<view class="ori" style="margin-top: 5upx;">
<text class="approvalTitle">{{approvalData.title}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<view class="ori">
<view style="width: 20rpx;margin-right:20rpx;">
<image mode="scaleToFill" class="icon" src="/static/lab-share/teacher.png" />
</view>
<text class="type">{{approvalData.creatorName}}</text>
</view>
<text class="type" style="margin-left:20upx">{{approvalData.createTimeFormated}}</text>
</view>
</view>
</view>
<view class="top-container">
<view class="detailtext" v-for="info in detailList" :key="info.title" >
<text class="titletext">{{info.title}}</text><text class="contenttext">{{info.value}}</text>
</view>
</view>
<Popup ref="mod" type="center" >
<view class="uni-tip">
<view class="suggestion">
<textarea @input="onTextChange" :value="des" placeholder="请输入审批意见" auto-height />
</view>
<view style="display: flex;justify-content: center;align-items: center;align-self: flex-end;width: 100%;">
<view hover-class="submithover" @click="disagree" class="clear-button">
<view><text class="cleartext">驳回</text></view>
</view>
<view hover-class="submithover" @click="agree" class="submit-button">
<view><text class="submittext">同意</text></view>
</view>
</view>
</view>
</Popup>
<Popup ref="suggesstion" type="center" >
<view class="uni-tip">
<text>请输入审批意见</text>
</view>
</Popup>
<Info ref="info" :isdistance="true"></Info>
<view style="width:100%;display: flex;align-items: center;justify-content: center;position: absolute; bottom:0;">
<view hover-class="submithover" @click="showModal" class="approval-button">
<text class="submittext" >审批</text>
</view>
</view>
</view>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import Popup from "@/components/uni-popup/popup.vue"
import Info from "@/components/popup/popup.vue"
export default {
mixins: [MescrollMixin],
data() {
return {
downOption: {
auto: false //是否在初始化后,自动执行downCallback; 默认true
},
upOption: {
use: false, // 是否启用上拉加载; 默认true
},
showProject:false,
showDrawer:false,
approvalId:"",
approvalData:{},
detailList:[],
des:""
}
},
methods: {
onLoad(option) {
var that = this;
if(option){
this.approvalId = option.approvalId;
this.loadData();
}
},
/*下拉刷新的回调 */
downCallback() {
this.mescroll.endSuccess();
},
/*上拉加载的回调 */
upCallback(page) {
},
onTextChange(e){
this.des = e.detail.value
},
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/bill/com.beecode.sedu.consumable.bill.WasteRecoveryBill/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
console.log(res.data)
var data = res.data.content;
data.createTimeFormated = this.GLOBALUTIL.moment(data.createTime).format("YYYY-MM-DD HH:mm:ss")
this.approvalData = data;
var detailList = [
{
title: "废液类型",
value: ""
},
{
title: "处置规格",
value: ""
},
{
title: "备注",
value: ""
},
]
detailList[0].value = data.type.name
detailList[1].value = data.specification.name
detailList[2].value = data.memo
this.detailList = detailList
}
})
},
showModal(){
this.$refs['mod'].open()
},
agree(){
if(this.des == ""){
this.des = "同意"
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.WasteRecoveryBill&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "1",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
},
disagree(){
if(this.des == ""){
this.$refs.info.open({
type:'err',
content:'请输入审批意见',
timeout:1000,
isClick:false
});
return ;
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.sedu.consumable.bill.WasteRecoveryBill&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
// console.log(res)
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "99",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
}
},
components: {
MescrollBody,
Popup,
Info
},
}
</script>
<style>
/*展示上拉加载的数据列表*/
.news-li {
font-size: 32upx;
padding-right: 20upx;
padding-left: 20upx;
width: calc(100%-40upx);
display: flex;
flex-direction: column;
background-color: #f5f5f5;
margin-top:30rpx;
}
.news-li .new-content {
font-size: 28upx;
margin-top: 10upx;
margin-left: 20upx;
color: #666;
}
.icon {
width: 25rpx;
height: 25rpx;
margin-right: 20rpx;
}
.status {
width: 170rpx;
height: 35rpx;
background-color: rgba(242, 115, 115, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-finish {
width: 170rpx;
height: 35rpx;
background-color: rgba(47, 190, 178, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-text {
color: #F27373;
font-size: 11px;
}
.status-finish-text {
color: #2FBEB2;
font-size: 11px;
}
.hover {
opacity: 0.7;
}
.title {
font-size: 17px;
font-weight: 300;
}
.des {
font-weight: 200;
font-size: 14px;
color: #676767
}
.detail {
font-size: 14px;
}
.type {
font-size: 14px;
}
.containter {
display: flex;
width: 100%;
background-color: #F5F5F5;
}
.labTitle{
}
.approvalTitle{
font-size: 32upx;
}
.ori{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.oritest{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.filterButton{
width:50%;
height:80upx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.selectLine {
width: 30upx;
height:1upx;
border-bottom: 1px solid #00CE47;
justify-self: flex-end;
}
.hover{
opacity: 0.7;
}
.titleContainer{
height: 90%;
display: flex;
justify-content: center;
align-items: center;
}
.d-container {
width: 600upx;
height:100%
}
.item {
width: auto;
margin-top: 20upx;
margin-left: 20upx;
margin-right: 40upx;
padding-bottom: 10upx;
}
.selcontent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20px;
}
.tip {
width: 30upx;
height: 30upx
}
.datacontent {
width: 100%;
font-size: 16px;
color: #4F4F4F;
}
.submit-button {
width:50%;
height:50px;
display: flex;
background-color: #409C9C;
justify-content: center;
align-items: center;
}
.clear-button {
display: flex;
width:50%;
height:50px;
background-color: #F8FAFA;
border-color: 1px solid #DDDEE1;
justify-content: center;
align-items: center;
}
.dot{
width:40upx;
height:40upx;
margin-top:15upx;
}
.dotContainer{
height:210upx;
width:100upx;
display: flex;
justify-content: center;
align-items: flex-start;
}
.line{
width:2px;
height:200upx;
background-color: #75A8FF;
}
.topContainer{
width: 100%;
padding-left:30upx;
padding-right:30upx;
flex:1;
height:120upx;
justify-content: space-between;
display: flex;
flex-direction: column;
}
.oriItem{
display: flex;
flex-direction: row;
align-items: center;
margin-right: 30upx;
}
.uni-tip {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
width: 650upx;
background-color: #fff;
}
.uni-tip-title {
margin-bottom: 10px;
text-align: center;
font-weight: bold;
font-size: 16px;
color: #333;
}
.uni-tip-content {
/* padding: 15px;
*/
font-size: 14px;
color: #666;
}
.uni-tip-group-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
margin-top: 20px;
}
.uni-tip-button {
flex: 1;
text-align: center;
font-size: 14px;
color: #3b4144;
}
.approval-button{
display: flex;
width:600rpx;
height:80rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
margin-left: 0;
margin-right: 0;
margin-bottom: 40rpx;
}
.suggestion{
margin-top: 20upx;
height:280upx;
width:100% ;
padding:10upx;
}
.submittext{
color: #ffffff;
font-size: 30upx;
font-family: 'PingFangSC-Regular';
}
.top-container {
display: flex;
flex-direction: column;
width: 100%;
margin-top: 50rpx;
background-color: #FFFFFF;
}
.titletext {
color: '#101317';
font-family: 'PingFangSC-Regular';
font-weight: '400';
margin-left: 10px;
font-size: 28rpx;
}
.contenttext {
font-size: 28rpx;
color: #333333;
font-family: 'PingFangSC-Regular';
font-weight: '400';
flex: 2;
display: flex;
align-items: flex-end;
justify-content: flex-end;
margin-right: 10px;
padding-left: 20px;
}
.detailtext {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width:100%;
height:90upx;
border-bottom: 1px solid #D0D0D0;
}
</style>
<template>
<view style="width: 100%;height: 100%; display: flex;flex-direction: column;background-color: #F5F5F5;">
<view class="ori" style="width: 100%;height:180upx;border-radius: 5px;padding:0">
<view class="topContainer">
<view class="ori" style="width: 100%;justify-content: space-between;">
<text class="approvalTitle">{{"采购申请单"}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<view class="ori">
<view style="width: 20rpx;margin-right:20rpx;">
<image mode="scaleToFill" class="icon" src="/static/lab-share/teacher.png" />
</view>
<text class="type">{{approvalData.creatorName}}</text>
</view>
<text class="type" style="margin-left:20upx">{{approvalData.college.title}}</text>
</view>
<view class="ori" style="width: 100%;justify-content: space-between;">
<text class="type">申请时间: {{approvalData.applicationDateFormated}}</text>
<text class="type" style="margin-left:20upx">{{approvalData.total}}</text>
</view>
</view>
</view>
<MescrollBody class="containter" ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
@up="upCallback">
<view class="news-li" v-for="news in detailList" :key="news.id" hover-class="hover" @click="goDetail(news)">
<view class="ori" style="height:200upx;border-radius: 5px;">
<view class="line">
</view>
<view class="dotContainer">
<image mode="scaleToFill" class="dot" src="/static/lab-share/cover.jpg" />
</view>
<view style="height:160upx;justify-content: space-between;display: flex;flex-direction: column;">
<view>
<text class="labTitle">{{news.title}}</text>
</view>
<view>
<text class="type">{{news.specification}}</text>
</view>
<view class="ori">
<view class="oriItem">
<text class="type">{{"单价:"}}</text>
<text class="type" style="margin-left:20upx">{{news.unitPrice}}</text>
</view>
<view class="oriItem">
<text class="type">{{"数量:"}}</text>
<text class="type" style="margin-left:20upx">{{news.num}}</text>
</view>
</view>
</view>
</view>
</view>
</MescrollBody>
<Popup ref="mod" type="center" >
<view class="uni-tip">
<view class="suggestion">
<textarea @input="onTextChange" :value="des" placeholder="请输入审批意见" auto-height />
</view>
<view style="display: flex;justify-content: center;align-items: center;align-self: flex-end;width: 100%;">
<view hover-class="submithover" @click="disagree" class="clear-button">
<view><text class="cleartext">驳回</text></view>
</view>
<view hover-class="submithover" @click="agree" class="submit-button">
<view><text class="submittext">同意</text></view>
</view>
</view>
</view>
</Popup>
<Popup ref="suggesstion" type="center" >
<view class="uni-tip">
<text>请输入审批意见</text>
</view>
</Popup>
<Info ref="info" :isdistance="true"></Info>
<view style="width:100%;display: flex;align-items: center;justify-content: center;position: absolute; bottom:0;">
<view hover-class="submithover" @click="showModal" class="approval-button">
<text class="submittext" >审批</text>
</view>
</view>
</view>
</template>
<script>
import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
import Popup from "@/components/uni-popup/popup.vue"
import Info from "@/components/popup/popup.vue"
export default {
mixins: [MescrollMixin],
data() {
return {
downOption: {
auto: false //是否在初始化后,自动执行downCallback; 默认true
},
upOption: {
use: false, // 是否启用上拉加载; 默认true
},
showProject:false,
showDrawer:false,
approvalId:"",
approvalData:{},
detailList:[],
des:""
}
},
methods: {
onLoad(option) {
var that = this;
if(option){
this.approvalId = option.approvalId;
this.loadData();
}
},
/*下拉刷新的回调 */
downCallback() {
this.mescroll.endSuccess();
},
/*上拉加载的回调 */
upCallback(page) {
},
onTextChange(e){
this.des = e.detail.value
},
/*获取列表*/
loadData() {
uni.request({
url: this.GLOBALUTIL.url + '/bill/com.beecode.tspp.manage.bill.EquipmentYearPurchaseBillDefine/'+this.approvalId+'?withSubs=true&dataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
// console.log(res.data)
var data = res.data.content;
data.applicationDateFormated = this.GLOBALUTIL.moment(data.applicationDate).format("YYYY-MM-DD")
this.approvalData = data;
this.detailList = data.equipmentYearPurchaseDetails
}
})
// uni.request({
// url: this.GLOBALUTIL.url + '/consumable/purchase/'+this.approvalId+'/detail',
// method: 'GET',
// header: this.GLOBALUTIL.commonHeader,
// success: (res) => {
// var data = res.data.data;
// this.detailList = data.map((opt)=>{
// opt.total = opt.num * opt.unitPrice
// return opt
// });
// }
// })
},
goDetail(data) {
return;
var detailData = [
{
title: "品名",
value: ""
},
{
title: "别名",
value: ""
},
{
title: "试剂容量",
value: ""
},
{
title: "容量单位",
value: ""
},
{
title: "规格",
value: ""
},
{
title: "数量",
value: ""
},
{
title: "生产厂家",
value: ""
},
]
detailData[0].value = data.tradeName;
detailData[1].value = data.consumableInfo.alias
detailData[2].value = data.capacity
detailData[3].value = data.unit
detailData[4].value = data.specification
detailData[5].value = data.num
detailData[6].value = data.manufacturer?data.manufacturer.name:"无"
uni.navigateTo({
url: "../item-info"
})
setTimeout(()=>{
uni.$emit("approvalItemData", [detailData])
},300)
// this.$nextTick(function(){
// uni.$emit("approvalItemData", [data])
// })
},
showModal(){
this.$refs['mod'].open()
},
agree(){
if(this.des == ""){
this.des = "同意"
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.tspp.manage.bill.EquipmentYearPurchaseBillDefine&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "1",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
},
disagree(){
if(this.des == ""){
this.$refs.info.open({
type:'err',
content:'请输入审批意见',
timeout:1000,
isClick:false
});
return ;
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/flowChartInfos?bizTypeName=com.beecode.tspp.manage.bill.EquipmentYearPurchaseBillDefine&bizDataId='+this.approvalId,
method: 'GET',
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
var data = res.data.nodes;
var taskId = ""
// console.log(res)
data.map((opt)=>{
var tasks = opt.tasks;
tasks.map((task)=>{
if(task.canApprove){
taskId = task.taskId
}
})
})
var body = {
"taskId":taskId,
"approvalAction": "99",
"suggestions": this.des
}
uni.request({
url: this.GLOBALUTIL.url + '/workflow/completedApprovalTasks',
method: 'POST',
data:JSON.stringify(body),
header: this.GLOBALUTIL.commonHeader,
success: (res) => {
if(res.data.status == 200){
this.$refs.info.open({
type:'success',
content:'审批成功',
timeout:1000,
isClick:false
});
setTimeout(()=>{
uni.navigateBack()
setTimeout(()=>{
uni.$emit("refreshApprovalList")
},200)
},1000)
}
}
})
}
})
}
},
components: {
MescrollBody,
Popup,
Info
},
}
</script>
<style>
/*展示上拉加载的数据列表*/
.news-li {
font-size: 32upx;
padding-right: 20upx;
padding-left: 20upx;
width: calc(100%-40upx);
display: flex;
flex-direction: column;
background-color: #f5f5f5;
margin-top:30rpx;
}
.news-li .new-content {
font-size: 28upx;
margin-top: 10upx;
margin-left: 20upx;
color: #666;
}
.icon {
width: 25rpx;
height: 25rpx;
margin-right: 20rpx;
}
.top-container {
display: flex;
flex-direction: row;
align-items: center;
}
.status {
width: 170rpx;
height: 35rpx;
background-color: rgba(242, 115, 115, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-finish {
width: 170rpx;
height: 35rpx;
background-color: rgba(47, 190, 178, 0.10);
border-radius: 50rpx;
display: flex;
justify-content: center;
align-items: center;
margin-left: 35rpx;
}
.status-text {
color: #F27373;
font-size: 11px;
}
.status-finish-text {
color: #2FBEB2;
font-size: 11px;
}
.hover {
opacity: 0.7;
}
.title {
font-size: 17px;
font-weight: 300;
}
.des {
font-weight: 200;
font-size: 14px;
color: #676767
}
.detail {
font-size: 14px;
}
.type {
font-size: 14px;
}
.containter {
display: flex;
width: 100%;
background-color: #F5F5F5;
}
.labTitle{
}
.approvalTitle{
font-size: 32upx;
}
.ori{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.oritest{
display: flex;
flex-direction: row;
align-items: center;
background-color: #FFFFFF;
}
.filterButton{
width:50%;
height:80upx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.selectLine {
width: 30upx;
height:1upx;
border-bottom: 1px solid #00CE47;
justify-self: flex-end;
}
.hover{
opacity: 0.7;
}
.titleContainer{
height: 90%;
display: flex;
justify-content: center;
align-items: center;
}
.d-container {
width: 600upx;
height:100%
}
.item {
width: auto;
margin-top: 20upx;
margin-left: 20upx;
margin-right: 40upx;
padding-bottom: 10upx;
}
.selcontent {
display: flex;
flex-direction: row;
align-items: center;
margin-top: 20px;
}
.tip {
width: 30upx;
height: 30upx
}
.datacontent {
width: 100%;
font-size: 16px;
color: #4F4F4F;
}
.submit-button {
width:50%;
height:50px;
display: flex;
background-color: #409C9C;
justify-content: center;
align-items: center;
}
.clear-button {
display: flex;
width:50%;
height:50px;
background-color: #F8FAFA;
border-color: 1px solid #DDDEE1;
justify-content: center;
align-items: center;
}
.dot{
width:40upx;
height:40upx;
margin-top:15upx;
}
.dotContainer{
height:180upx;
width:80upx;
display: flex;
justify-content: center;
align-items: flex-start;
}
.line{
width:2px;
height:200upx;
background-color: #75A8FF;
}
.topContainer{
width: 100%;
padding-left:30upx;
padding-right:30upx;
flex:1;
height:150upx;
justify-content: space-between;
display: flex;
flex-direction: column;
}
.oriItem{
display: flex;
flex-direction: row;
align-items: center;
margin-right: 30upx;
}
.uni-tip {
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
width: 650upx;
background-color: #fff;
}
.uni-tip-title {
margin-bottom: 10px;
text-align: center;
font-weight: bold;
font-size: 16px;
color: #333;
}
.uni-tip-content {
/* padding: 15px;
*/
font-size: 14px;
color: #666;
}
.uni-tip-group-button {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
margin-top: 20px;
}
.uni-tip-button {
flex: 1;
text-align: center;
font-size: 14px;
color: #3b4144;
}
.approval-button{
display: flex;
width:600rpx;
height:80rpx;
align-items: center;
justify-content: center;
background: linear-gradient(-45deg, rgba(87, 225, 181, 1) 0%, rgba(0, 63, 255, 1) 100%);
border-radius: 15rpx;
margin-left: 0;
margin-right: 0;
margin-bottom: 40rpx;
}
.suggestion{
margin-top: 20upx;
height:280upx;
width:100% ;
padding:10upx;
}
.submittext{
color: #ffffff;
font-size: 30upx;
font-family: 'PingFangSC-Regular';
}
</style>
......@@ -112,13 +112,44 @@
})
},
goDetail(data) {
// uni.navigateTo({
// url: "./Detail/danger-purchase-detail?settingId=" + data.id
// })
console.log(data)
if(data.bizTypeTitle_v == "领用单"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/danger-use-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "采购单"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/danger-purchase-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "废液回收"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/waste-recovery-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "实验室人员培训申请"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/person-train-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "设备报修申请"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/equipment-repair-detail?approvalId=" + parameters.bizDataId
})
}else if(data.bizTypeTitle_v == "设备采购申请"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/equipment-purchase?approvalId=" + parameters.bizDataId
})
}
else if(data.bizTypeTitle_v == "年度设备采购申请"){
var parameters = JSON.parse(data.parameters);
uni.navigateTo({
url: "./Detail/year-purchase?approvalId=" + parameters.bizDataId
})
}
}
},
components: {
......
......@@ -77,6 +77,8 @@
// opt.checkitems = [];
})
that.dataList = content;
console.log(that.dataList)
that.$forceUpdate()
})
this.loadData();
},
......@@ -162,7 +164,7 @@
user.name = encodeURI(this.GLOBALUTIL.user.username);
var body = this.checkResult
uni.request({
url: this.GLOBALUTIL.url + '/safety/v1/check-result',
url: this.GLOBALUTIL.url + '/safety/v1/check-result/v2',
method: 'POST',
data: JSON.stringify(body),
header:this.GLOBALUTIL.commonHeader,
......
......@@ -82,7 +82,10 @@
uni.navigateTo({
url: "security-checkitem"
})
console.log(itemData)
setTimeout(()=>{
uni.$emit("sendCheckItem", [objectData, itemData, this.taskId]);
},300)
},
showObjectPicker() {
this.itemList = this.objectarr;
......
......@@ -52,6 +52,7 @@
password:"sysadmin",
positionTop: 0,
isDevtools: false,
isDevelop:false
}
},
// computed: mapState(['forcedLogin']),
......@@ -60,6 +61,41 @@
const sysInfo = uni.getSystemInfoSync();
console.log(sysInfo.windowWidth)
this.GLOBALUTIL.sysInfo = sysInfo
//网页端获取code
// #ifdef H5
var searchData = window.location.search
if(searchData){
var searchStr = searchData.substring(1,searchData.length);
var codeStr = searchStr.split("&")[0]
var statusStr = searchStr.split("&")[1]
var code = codeStr.split("=")[1]
var status = statusStr.split("=")[1]
uni.request({
url: this.GLOBALUTIL.url+'/app-auth/accesstoken',
method: 'GET',
header: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
success: (res) => {
console.log(res)
uni.request({
url: this.GLOBALUTIL.url+'/app-auth/getUserInfo/' + code,
method: 'GET',
header: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
success: (res) => {
console.log(res)
}
})
}
})
console.log(code)
console.log(status)
}
// #endif
},
initPosition() {
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment