| | |
| | | <view class="home">
|
| | | <!-- 轮播图 -->
|
| | | <view class="home_swipe"><u-swiper :list="list3" indicator indicatorMode="line" circular></u-swiper></view>
|
| | |
|
| | | <!-- 图表 -->
|
| | | <combined-title title="煤仓库存明细"></combined-title>
|
| | | <view class="charts-box">
|
| | | <qiun-data-charts type="pie" :opts="opts" :chartData="chartData" v-if="uchartsData.length > 0" />
|
| | | <u-empty
|
| | | mode="data"
|
| | | icon="http://cdn.uviewui.com/uview/empty/data.png"
|
| | | v-if="uchartsData.length == 0" |
| | | >
|
| | | </u-empty>
|
| | | <u-empty mode="data" iconSize="200" textSize="25" width="350" height="350" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="uchartsData.length == 0"></u-empty>
|
| | | </view>
|
| | | <!-- 我的申请 -->
|
| | | <combined-title title="我的申请" detailsPath="/pages/my-application/my-application" v-if="shenqingMenu"></combined-title>
|
| | |
| | | <view class="bottom-container">
|
| | | <!-- 按钮区域 -->
|
| | | <view class="bottom-content__chulizhong bottom-content__item">
|
| | | <view @click="withDrawClick(item.id)" v-if="item.status == 1">
|
| | | <view @click="withDrawClick(item.procInstId)" v-if="item.status == 1">
|
| | | <image src="@/static/home/cehui.png" mode=""></image>
|
| | | <view>撤回</view>
|
| | | </view>
|
| | |
| | | <image src="@/static/home/jindu.png" mode=""></image>
|
| | | <view>查看进度</view>
|
| | | </view>
|
| | | <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2) && (item.procDefId == 'WAY_BILL:4:87504')">
|
| | | <view @click="theFormDataClick(item.tableId)" v-if="(item.status == 1 || item.status == 2 || item.status == 3) && item.processName == '发运通知单'">
|
| | | <image src="@/static/home/biaodan.png" mode=""></image>
|
| | | <view>表单数据</view>
|
| | | <view>申请详情</view>
|
| | | </view>
|
| | | <view @click="apply(item)" v-if="item.status == 3">
|
| | | <!-- <view @click="apply(item)" v-if="item.status == 3">
|
| | | <image src="@/static/home/history.png" mode=""></image>
|
| | | <view>重新申请</view>
|
| | | </view>
|
| | | <view @click="editMyApplication(item)" v-if="item.status == 3 && item.procDefId == 'WAY_BILL:4:87504'">
|
| | | </view> -->
|
| | | <view @click="editMyApplication(item)" v-if="item.status == 1 && item.processName == '发运通知单'">
|
| | | <image src="@/static/home/history.png" mode=""></image>
|
| | | <view>编辑</view>
|
| | | </view>
|
| | | <view @click="approvalHistoryClick(item.procInstId)" v-if="item.status == 2 || item.status == 3">
|
| | | <image src="@/static/home/history.png" mode=""></image>
|
| | | <view>审批历史</view>
|
| | | </view>
|
| | | <view @click="deleteWithDrawApplication(item.tableId)" v-if="item.status == 3">
|
| | | <image src="@/static/home/delete.png" mode=""></image>
|
| | | <view>删除</view>
|
| | | </view>
|
| | | </view>
|
| | | <!-- 已结束小组按钮 -->
|
| | |
| | | <view class="bottom-container">
|
| | | <!-- 待办按钮 -->
|
| | | <view class="bottom-content__item">
|
| | | <!-- <view @click="theFormDataClick">
|
| | | <view @click="theFormDataClick(item.tableId)">
|
| | | <image src="@/static/home/jindu.png" mode=""></image>
|
| | | <view>申请详情</view>
|
| | | </view> -->
|
| | | </view>
|
| | | <view @click="adopClick(item)">
|
| | | <image src="@/static/home/tongguo.png" mode=""></image>
|
| | | <view>通过</view>
|
| | |
| | | </view>
|
| | | <view class="center-content__two center-margin">
|
| | | <view>
|
| | | <text>发起人:{{ item.actBusiness.createByName }}</text>
|
| | | <text>发起人:{{ item.actBusiness.createByName || '' }}</text>
|
| | | </view>
|
| | | <view>
|
| | | <text>审批操作:{{ item.deleteReason }}</text>
|
| | |
| | | </view>
|
| | | <view class="center-content__three center-margin">
|
| | | <view class="">
|
| | | <text>审批意见:{{ item.comment || '' }}</text>
|
| | | <text>审批意见:{{ item.comment=='undefined'?'未填写':item.comment || '未填写' }}</text>
|
| | | </view>
|
| | | <view class="">
|
| | | <text>
|
| | |
| | | <view class="bottom-container">
|
| | | <!-- 已办按钮 -->
|
| | | <view class="bottom-content__item">
|
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'">
|
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.processName == '发运通知单'">
|
| | | <image src="@/static/home/biaodan.png" mode=""></image>
|
| | | <view>表单数据</view>
|
| | | </view>
|
| | |
| | |
|
| | | <!-- 日计划 -->
|
| | | <combined-title title="日发运计划" detailsPath="/pages/jihua/jihua" v-if="rijihuaMenu"></combined-title>
|
| | | <view class="card-group">
|
| | | <view class="card-group bottomChild" >
|
| | | <combination-card class="card" :showTop="false" v-for="(item, index) in fyData.slice(0, 2)" :key="item.id" v-if="rijihuaMenu">
|
| | | <template v-slot:top></template>
|
| | | <template v-slot:center>
|
| | |
| | |
|
| | | <!-- 撤回模态框 -->
|
| | | <view class="wodeshenqingMotai">
|
| | | <u-modal width="684rpx" :show="withDrawShow" title="撤回原因" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel">
|
| | | <view class="slot-content"><u--textarea v-model="withDrawData.reason" placeholder="请输入撤回原因"></u--textarea></view>
|
| | | <u-modal width="684rpx" :show="withDrawShow" title="提示" :showCancelButton="true" @confirm="withDrawConfirm" @cancel="withDrawCancel">
|
| | | <view class="slot-content">
|
| | | <!-- <u--textarea v-model="withDrawData.reason" placeholder="请输入撤回原因"></u--textarea> -->
|
| | | <text>确认撤回该申请吗?</text>
|
| | | </view>
|
| | | </u-modal>
|
| | | </view>
|
| | |
|
| | |
| | |
|
| | | <!-- 菜单栏 -->
|
| | | <!-- <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> -->
|
| | | <u-gap height="15" bgColor="#eeeeee"></u-gap>
|
| | | <view class="utils">
|
| | | <view class="utils-container">
|
| | | <view class="utils-container-body" @click="redirectLogin">
|
| | | <view class="top"><u-icon name="backspace" color="#FF4233" size="70"></u-icon></view>
|
| | | <view class="bottom-text"><text>退出</text></view>
|
| | | </view>
|
| | | <!-- <view class="utils-container-body" @click="huanBang">
|
| | | <view class="top"><u-icon name="lock-open" color="#1987FF" size="70"></u-icon></view>
|
| | | <view class="bottom-text"><text>换绑</text></view>
|
| | | </view> -->
|
| | | </view>
|
| | | </view>
|
| | | <u-gap height="60" bgColor="#eeeeee"></u-gap>
|
| | | </view>
|
| | | </template>
|
| | |
|
| | |
| | | // import popupMenu from '@/components/common/popup-menu/popup-menu.vue';
|
| | | import combinedTitle from '@/components/common/combined-title/combined-title.vue';
|
| | | import combinationCard from '@/components/common/combination-card/combination-card.vue';
|
| | | import { setAccessToken } from '@/utils/status.js';
|
| | | import { setAccessToken, redirectLogin } from '@/utils/status.js';
|
| | |
|
| | | export default {
|
| | | name: 'home',
|
| | |
| | | withDrawShow: false,
|
| | | fyData: [],
|
| | | withDrawData: {
|
| | | reason: '',
|
| | | id: '', // 撤回申请ID
|
| | | // reason: '',
|
| | | // id: '', // 撤回申请ID
|
| | | procInstId: ''
|
| | | },
|
| | | withDrawContent: '',
|
| | |
| | | // },
|
| | | // 点击导航栏菜单后
|
| | | onNavigationBarButtonTap(e) {
|
| | | console.log('退出导航栏按钮事件',e);
|
| | | console.log('退出导航栏按钮事件', e);
|
| | | // this.$refs.menuRef.menuClick();
|
| | | },
|
| | | // 监听左上角的回退事件
|
| | | onUnload(event){ //多层级跳转之后,监听左上角返回事件,直接退回到index
|
| | | console.log('监听左上角',event);
|
| | | uni.request({
|
| | | url: `${BaseUrl}/auth/token/logout`,
|
| | | method: 'DELETE',
|
| | | header: {
|
| | | 'TENANT-ID': 5,
|
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
|
| | | VERSION: 'zzl'
|
| | | }
|
| | | }).then(res=>{
|
| | | console.log('缓存清理成功');
|
| | | }).catch(err => {
|
| | | uni.showToast({
|
| | | title: '缓存清理失败!',
|
| | | })
|
| | | })
|
| | | onUnload(event) {
|
| | | //多层级跳转之后,监听左上角返回事件,直接退回到index
|
| | | console.log('监听左上角', event);
|
| | | uni
|
| | | .request({
|
| | | url: `${BaseUrl}/auth/token/logout`,
|
| | | method: 'DELETE',
|
| | | header: {
|
| | | 'TENANT-ID': 5,
|
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
|
| | | VERSION: 'zzl'
|
| | | }
|
| | | })
|
| | | .then(res => {
|
| | | console.log('缓存清理成功');
|
| | | })
|
| | | .catch(err => {
|
| | | uni.showToast({
|
| | | title: '缓存清理失败!'
|
| | | });
|
| | | });
|
| | | },
|
| | | onShow() {
|
| | | // 菜单注释(app待用)
|
| | |
| | | });
|
| | | },
|
| | | getServerData() {
|
| | | console.log('加载图表',this.uchartsData);
|
| | | console.log('加载图表', this.uchartsData);
|
| | | //模拟从服务器获取数据时的延时
|
| | | setTimeout(() => {
|
| | | //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
| | |
| | | this.menuShow = e;
|
| | | },
|
| | | // 撤回模态框
|
| | | withDrawClick(id) {
|
| | | withDrawClick(procInstId) {
|
| | | this.withDrawShow = true;
|
| | | this.withDrawData.id = id;
|
| | | this.withDrawData.procInstId = procInstId;
|
| | | },
|
| | | withDrawConfirm() {
|
| | | this.shenqingData.forEach(i => {
|
| | | if (i.id == this.withDrawData.id) {
|
| | | this.withDrawData.procInstId = i.procInstId;
|
| | | }
|
| | | });
|
| | | if (this.withDrawData.reason.length >= 2) {
|
| | | this.$reqPost('withDraw', this.withDrawData, 'form').then(res => {
|
| | | this.$reqPost('cancel', this.withDrawData).then(res => {
|
| | | this.withDrawShow = false;
|
| | | if (res.code == 0) {
|
| | | uni.showToast({
|
| | |
| | | duration: 2000
|
| | | });
|
| | | }
|
| | | // 刷新列表
|
| | | this.getProcessDataList();
|
| | | this.todoList();
|
| | | this.doneList();
|
| | | });
|
| | | } else {
|
| | | uni.showToast({
|
| | | title: '请规范输入',
|
| | | duration: 2000
|
| | | });
|
| | | }
|
| | | },
|
| | | withDrawCancel() {
|
| | | this.withDrawShow = false;
|
| | | },
|
| | | // 通过
|
| | | adopClick(v) {
|
| | |
| | | adoptModalConfirm() {
|
| | | this.adoptModalShow = false;
|
| | | this.adoptForm.comment = this.adoptModalContent;
|
| | |
|
| | | this.$reqPost('passAll', this.adoptForm, 'form').then(res => {
|
| | | this.$reqPost('passAll', this.adoptForm).then(res => {
|
| | | if (res.code == 0) {
|
| | | this.$u.toast('操作成功!');
|
| | | } else {
|
| | | this.$u.toast('添加失败!!');
|
| | | this.$u.toast('通过失败!!');
|
| | | }
|
| | | this.todoList(); // 我的待办
|
| | | this.doneList(); |
| | | });
|
| | | },
|
| | | adoptModalCancel() {
|
| | |
| | | rejectModalConfirm() {
|
| | | this.rejectModalShow = false;
|
| | |
|
| | | this.$reqPost('backAll', this.rejectForm, 'form').then(res => {
|
| | | this.$reqPost('backAll', this.rejectForm).then(res => {
|
| | | if (res.code == 0) {
|
| | | this.$u.toast('操作成功!');
|
| | | } else {
|
| | | this.$u.toast('操作失败!!!');
|
| | | }
|
| | | this.todoList(); // 我的待办
|
| | | this.doneList(); |
| | | });
|
| | | },
|
| | | rejectModalCancel() {
|
| | | this.rejectModalShow = false;
|
| | | },
|
| | | withDrawCancel() {
|
| | | this.withDrawShow = false;
|
| | | // 删除申请
|
| | | deleteApplicationClick(id) {
|
| | | this.deleteApplicationModalShow = true;
|
| | | this.procInstId = id;
|
| | | console.log(id);
|
| | | },
|
| | | // 删除申请模态框
|
| | | deleteApplicationModalConfirm() {
|
| | |
| | | url: `/pages/the-form-data/the-form-data?index=${v}`
|
| | | });
|
| | | },
|
| | | // 重新申请
|
| | | apply(v) {
|
| | | if (!v.procDefId || v.procDefId == 'null') {
|
| | | this.$u.toast('流程定义为空');
|
| | | return;
|
| | | }
|
| | | this.form.id = v.id;
|
| | | this.form.procDefId = v.procDefId;
|
| | | this.form.title = v.title;
|
| | | // 加载审批人
|
| | | // this.userLoading = true;
|
| | | uni.showLoading({
|
| | | title: '审批人加载中'
|
| | | });
|
| | | // getFirstNode(v.procDefId).then((res) => {
|
| | | this.$reqGet('getFirstNode', {}, v.procDefId).then(res => {
|
| | | // this.userLoading = false;
|
| | | console.log('审批人', res);
|
| | | uni.hideLoading();
|
| | | if (res.data) {
|
| | | this.error = '';
|
| | | if (res.data.type == 3 || res.data.type == 4) {
|
| | | this.isGateway = true;
|
| | | this.form.firstGateway = true;
|
| | | this.showAssign = false;
|
| | | this.isCustom = false;
|
| | | return;
|
| | | // 删除撤回申请
|
| | | deleteWithDrawApplication(id){
|
| | | uni
|
| | | .request({
|
| | | url: `${BaseUrl}/yunxiao/xswaybill/${id}`,
|
| | | method: 'DELETE',
|
| | | header: {
|
| | | 'TENANT-ID': 5,
|
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'),
|
| | | VERSION: 'zzl'
|
| | | }
|
| | | if (res.data.type == 5) {
|
| | | this.isCustom = true;
|
| | | this.isGateway = false;
|
| | | this.form.firstGateway = false;
|
| | | this.showAssign = false;
|
| | | return;
|
| | | }
|
| | | if (res.data.type == 1) {
|
| | | this.showAssign = true;
|
| | | this.isGateway = false;
|
| | | this.form.firstGateway = false;
|
| | | this.isCustom = false;
|
| | | if (res.data.users && res.data.users.length > 0) {
|
| | | this.assigneeList = res.data.users;
|
| | | // 默认勾选
|
| | | let ids = [];
|
| | | res.data.users.forEach(e => {
|
| | | ids.push(e.userId);
|
| | | });
|
| | | this.form.assignees = ids;
|
| | | this.showAssign = true;
|
| | | // 获取表单内容,重新创建申请
|
| | | this.$reqPost('apply', this.form, 'form').then(res => {
|
| | | console.log('重新提交申请', res);
|
| | | if (res.code == 0) {
|
| | | uni.showToast({
|
| | | title: res.data,
|
| | | icon: 'success',
|
| | | duration: 2000
|
| | | });
|
| | | }
|
| | | // 初始化申请列表
|
| | | // this.myApplication.pageNumber = 1;
|
| | | // this.shenqingData = [];
|
| | | // this.getMoreNews();
|
| | | this.getProcessDataList();
|
| | | });
|
| | | } else {
|
| | | this.form.assignees = [];
|
| | | this.showAssign = true;
|
| | | this.error = '请进入"流程管理"为审批节点分配候选审批人员';
|
| | | }
|
| | | }
|
| | | }
|
| | | console.log(this.form);
|
| | | });
|
| | |
|
| | | this.modalVisible = true;
|
| | | })
|
| | | .then(res => {
|
| | | uni.showToast({
|
| | | title:'删除成功',
|
| | | icon:'none'
|
| | | })
|
| | | |
| | | // 刷新列表
|
| | | this.getProcessDataList();
|
| | | |
| | | })
|
| | | .catch(err => {
|
| | | uni.showToast({
|
| | | title:'删除出错',
|
| | | icon:'none'
|
| | | })
|
| | | });
|
| | | },
|
| | | // 重新申请
|
| | | // apply(v) {
|
| | | // if (!v.procDefId || v.procDefId == 'null') {
|
| | | // this.$u.toast('流程定义为空');
|
| | | // return;
|
| | | // }
|
| | | // this.form.id = v.id;
|
| | | // this.form.procDefId = v.procDefId;
|
| | | // this.form.title = v.title;
|
| | | // // 加载审批人
|
| | | // // this.userLoading = true;
|
| | | // uni.showLoading({
|
| | | // title: '审批人加载中'
|
| | | // });
|
| | | // // getFirstNode(v.procDefId).then((res) => {
|
| | | // this.$reqGet('getFirstNode', {}, v.procDefId).then(res => {
|
| | | // // this.userLoading = false;
|
| | | // console.log('审批人', res);
|
| | | // uni.hideLoading();
|
| | | // if (res.data) {
|
| | | // this.error = '';
|
| | | // if (res.data.type == 3 || res.data.type == 4) {
|
| | | // this.isGateway = true;
|
| | | // this.form.firstGateway = true;
|
| | | // this.showAssign = false;
|
| | | // this.isCustom = false;
|
| | | // return;
|
| | | // }
|
| | | // if (res.data.type == 5) {
|
| | | // this.isCustom = true;
|
| | | // this.isGateway = false;
|
| | | // this.form.firstGateway = false;
|
| | | // this.showAssign = false;
|
| | | // return;
|
| | | // }
|
| | | // if (res.data.type == 1) {
|
| | | // this.showAssign = true;
|
| | | // this.isGateway = false;
|
| | | // this.form.firstGateway = false;
|
| | | // this.isCustom = false;
|
| | | // if (res.data.users && res.data.users.length > 0) {
|
| | | // this.assigneeList = res.data.users;
|
| | | // // 默认勾选
|
| | | // let ids = [];
|
| | | // res.data.users.forEach(e => {
|
| | | // ids.push(e.userId);
|
| | | // });
|
| | | // this.form.assignees = ids;
|
| | | // this.showAssign = true;
|
| | | // // 获取表单内容,重新创建申请
|
| | | // this.$reqPost('apply', this.form, 'form').then(res => {
|
| | | // console.log('重新提交申请', res);
|
| | | // if (res.code == 0) {
|
| | | // uni.showToast({
|
| | | // title: res.data,
|
| | | // icon: 'success',
|
| | | // duration: 2000
|
| | | // });
|
| | | // }
|
| | | // // 初始化申请列表
|
| | | // // this.myApplication.pageNumber = 1;
|
| | | // // this.shenqingData = [];
|
| | | // // this.getMoreNews();
|
| | | // this.getProcessDataList();
|
| | | // });
|
| | | // } else {
|
| | | // this.form.assignees = [];
|
| | | // this.showAssign = true;
|
| | | // this.error = '请进入"流程管理"为审批节点分配候选审批人员';
|
| | | // }
|
| | | // }
|
| | | // }
|
| | | // console.log(this.form);
|
| | | // });
|
| | |
|
| | | // this.modalVisible = true;
|
| | | // },
|
| | | // 修改
|
| | | editMyApplication(v) {
|
| | | console.log('修改申请');
|
| | |
| | | url: `/pages/approval-history/approval-history?index=${v}`
|
| | | });
|
| | | },
|
| | | // 删除申请
|
| | | deleteApplicationClick(id) {
|
| | | this.deleteApplicationModalShow = true;
|
| | | this.procInstId = id;
|
| | | console.log(id);
|
| | | |
| | | redirectLogin() {
|
| | | redirectLogin();
|
| | | },
|
| | | huanBang() {
|
| | | uni.navigateTo({
|
| | | url: '/pages/register/register'
|
| | | });
|
| | | }
|
| | | }
|
| | | };
|
| | |
| | | width: 100%;
|
| | | display: flex;
|
| | | flex-direction: column;
|
| | | padding-bottom: vww(20);
|
| | |
|
| | | // 横向菜单栏
|
| | | .utils {
|
| | | .utils-container {
|
| | | display: flex;
|
| | | // justify-content: space-between;
|
| | | justify-content: center;
|
| | | width: 66%;
|
| | | margin: 0 auto;
|
| | | .utils-container-body {
|
| | | display: flex;
|
| | | align-items: center;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | .home_swipe {
|
| | | width: 100%;
|
| | |
| | | width: 91%;
|
| | | height: vww(330);
|
| | | margin: 0 auto;
|
| | | .u-empty{
|
| | | height:100%;
|
| | | .u-empty {
|
| | | height: 100%;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | .bottomChild{
|
| | | margin-bottom: vww(20);
|
| | | }
|
| | |
|
| | | // 卡片中间
|
| | |
| | | // width:100%;
|
| | | // height:vww(244);
|
| | | .slot-content {
|
| | | width:vww(330);
|
| | | width: vww(330);
|
| | | .rejectMesaage {
|
| | | display: flex;
|
| | | padding: vww(3);
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | </style>
|
| | | </style> |