| | |
| | | <style lang="scss"> |
| | | /*每个页面公共css */ |
| | | @import '@/uni_modules/uview-ui/index.scss'; |
| | | @import "./static/iconfont/iconfont.css"; |
| | | @import "@/static/iconfont/iconfont.css"; |
| | | </style> |
| | |
| | | }); |
| | | } |
| | | |
| | | const baseUrl = 'http://192.168.3.159:9999' |
| | | |
| | | // POST请求 |
| | | function apiLogin({ |
| | | username, |
| | |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | uni.request({ |
| | | url: "/auth/oauth/token?grant_type=password&scope=server", |
| | | url: baseUrl + "/auth/oauth/token?grant_type=password&scope=server", |
| | | method: "POST", |
| | | data: { |
| | | username, |
| | |
| | | resolve(res); |
| | | }, |
| | | fail: (err) => { |
| | | console.log('错误',err); |
| | | uni.hideLoading(); |
| | | uni.showToast({ |
| | | icon: 'none', |
| | |
| | | <template> |
| | | <view class="data-selet" > |
| | | <view class="data-selet-content"> |
| | | <view class="uni-select__icon" :class="{'activeIcon':isActive}"><uni-icons type="bottom" size="20" color="#dddddd"></uni-icons></image></view> |
| | | <view class="uni-select__icon" :class="{'activeIcon':isActive}"><uni-icons type="bottom" size="20" color="#dddddd"></uni-icons></view> |
| | | <view class="content" @tap="clickHandler"> |
| | | <input :placeholder="placeholder" :disabled="true" type="text" :value="value" @input="inputChange" style="font-size: 14px;" placeholder-style="color:#cccccc"> |
| | | </view> |
| | |
| | | align-items: center; |
| | | } |
| | | .cleanIcon{ |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | </style> |
| | |
| | | <template> |
| | | <view class="popup-menu"> |
| | | <u-popup mode="right" :show="menuShow" @close="close" @open="open"> |
| | | <u-cell-group> |
| | | <u-cell |
| | | title="首页" |
| | | isLink |
| | | url="/pages/home/home" style="color:blue" |
| | | > |
| | | <image src="@/static/menuIcon/menu-home.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | <u-cell |
| | | v-if="$store.state.shenqingMenu" |
| | | v-cloak |
| | | title="我的申请" |
| | | isLink |
| | | url="/pages/my-application/my-application" |
| | | > |
| | | <image src="@/static/menuIcon/menu-application.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | <u-cell |
| | | title="我的待办" |
| | | isLink |
| | | url="/pages/my-todo/my-todo" |
| | | > |
| | | <image src="@/static/menuIcon/menu-todo.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | <u-cell |
| | | title="我的已办" |
| | | isLink |
| | | url="/pages/my-have-todo/my-have-todo" |
| | | > |
| | | <image src="@/static/menuIcon/menu-havedo.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | <u-cell |
| | | v-if="$store.state.rijihuaMenu" |
| | | v-cloak |
| | | title="日发运计划" |
| | | isLink |
| | | url="/pages/jihua/jihua" style="color:blue" |
| | | > |
| | | <image src="@/static/menuIcon/menu-shipment.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | </u-cell-group> |
| | | <u-button text="退出" type="primary" @click="menuPopupClick"></u-button> |
| | | </u-popup> |
| | | </view> |
| | | <view class="popup-menu"> |
| | | <u-popup mode="right" :show="menuShow" @close="close" @open="open"> |
| | | <u-cell-group> |
| | | <u-cell |
| | | title="首页" |
| | | isLink |
| | | url="/pages/home/home" style="color:blue" |
| | | > |
| | | <image src="@/static/menuIcon/menu-home.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | <u-cell |
| | | v-if="$store.state.shenqingMenu" |
| | | v-cloak |
| | | title="我的申请" |
| | | isLink |
| | | url="/pages/my-application/my-application" |
| | | > |
| | | <image src="@/static/menuIcon/menu-application.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | <u-cell |
| | | title="我的待办" |
| | | isLink |
| | | url="/pages/my-todo/my-todo" |
| | | > |
| | | <image src="@/static/menuIcon/menu-todo.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | <u-cell |
| | | title="我的已办" |
| | | isLink |
| | | url="/pages/my-have-todo/my-have-todo" |
| | | > |
| | | <image src="@/static/menuIcon/menu-havedo.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | <u-cell |
| | | v-if="$store.state.rijihuaMenu" |
| | | v-cloak |
| | | title="日发运计划" |
| | | isLink |
| | | url="/pages/jihua/jihua" style="color:blue" |
| | | > |
| | | <image src="@/static/menuIcon/menu-shipment.png" slot="icon" size="32" name="search"/> |
| | | </u-cell> |
| | | </u-cell-group> |
| | | <u-button text="退出" type="primary" @click="menuPopupClick"></u-button> |
| | | </u-popup> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { redirectLogin } from '@/utils/status.js'; |
| | | import {redirectLogin} from '@/utils/status.js'; |
| | | |
| | | export default { |
| | | name: 'PopupMenu', |
| | | // props:{ |
| | | // menuShow:{ |
| | | // type:Boolean, |
| | | // default:false |
| | | // } |
| | | // }, |
| | | // watch:{ |
| | | // menuShow(newV,oldV){ |
| | | // this.menuShow = newV; |
| | | // console.log('监听menu',newV); |
| | | // } |
| | | // }, |
| | | data() { |
| | | return { |
| | | menuShow:false |
| | | }; |
| | | }, |
| | | onShow() { |
| | | alert(111); |
| | | }, |
| | | methods: { |
| | | menuClick(){ |
| | | this.menuShow = !this.menuShow |
| | | this.$emit('menuShow',this.menuShow) |
| | | }, |
| | | open() { |
| | | console.log(this.$store.state,'shenqingMenu====') |
| | | }, |
| | | close() { |
| | | this.menuShow = false; |
| | | this.$emit('menuShow',this.menuShow) |
| | | }, |
| | | menuPopupClick(){ |
| | | this.menuShow = false; |
| | | uni.request({ |
| | | url:'/auth/token/logout', |
| | | method:'DELETE', |
| | | header:{ |
| | | 'TENANT-ID': 5, |
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'), |
| | | VERSION: 'zzl' |
| | | } |
| | | }).then(res=>{ |
| | | redirectLogin(); |
| | | |
| | | }).catch(err=>{ |
| | | uni.showToast({ |
| | | title:'退出失败!', |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | name: 'PopupMenu', |
| | | // props:{ |
| | | // menuShow:{ |
| | | // type:Boolean, |
| | | // default:false |
| | | // } |
| | | // }, |
| | | // watch:{ |
| | | // menuShow(newV,oldV){ |
| | | // this.menuShow = newV; |
| | | // console.log('监听menu',newV); |
| | | // } |
| | | // }, |
| | | data() { |
| | | return { |
| | | menuShow: false |
| | | }; |
| | | }, |
| | | onShow() { |
| | | alert(111); |
| | | }, |
| | | methods: { |
| | | menuClick() { |
| | | this.menuShow = !this.menuShow |
| | | this.$emit('menuShow', this.menuShow) |
| | | }, |
| | | open() { |
| | | console.log(this.$store.state, 'shenqingMenu====') |
| | | }, |
| | | close() { |
| | | this.menuShow = false; |
| | | this.$emit('menuShow', this.menuShow) |
| | | }, |
| | | menuPopupClick() { |
| | | this.menuShow = false; |
| | | uni.request({ |
| | | url: '/auth/token/logout', |
| | | method: 'DELETE', |
| | | header: { |
| | | 'TENANT-ID': 5, |
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'), |
| | | VERSION: 'zzl' |
| | | } |
| | | }).then(redirectLogin()).catch(err => { |
| | | uni.showToast({ |
| | | title: '退出失败!', |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep.popup-menu { |
| | | .u-popup{ |
| | | .u-transition{ |
| | | .u-popup__content{ |
| | | // 按钮 |
| | | .u-button{ |
| | | width:vww(222); |
| | | height:vww(40); |
| | | margin-bottom:vww(40); |
| | | } |
| | | // cell单元格 |
| | | .u-cell-group{ |
| | | |
| | | .u-cell-group__wrapper{ |
| | | .u-cell{ |
| | | width:vww(270); |
| | | height:vww(48); |
| | | .u-cell__body{ |
| | | height:vww(48); |
| | | .u-cell__body__content{ |
| | | .u-cell__left-icon-wrap{ |
| | | margin-right: vww(8); |
| | | image{ |
| | | width:vww(16); |
| | | height:vww(16); |
| | | } |
| | | } |
| | | .u-cell__title{ |
| | | .u-cell__title-text{ |
| | | font-size:vww(14); |
| | | } |
| | | } |
| | | } |
| | | .u-cell__right-icon-wrap{ |
| | | .u-icon{ |
| | | .u-icon__icon{ |
| | | width:vww(7.27); |
| | | height:vww(12); |
| | | span{ |
| | | color:#007AFF; |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | .u-popup { |
| | | .u-transition { |
| | | .u-popup__content { |
| | | // 按钮 |
| | | .u-button { |
| | | width: vww(222); |
| | | height: vww(40); |
| | | margin-bottom: vww(40); |
| | | } |
| | | |
| | | // cell单元格 |
| | | .u-cell-group { |
| | | |
| | | .u-cell-group__wrapper { |
| | | .u-cell { |
| | | width: vww(270); |
| | | height: vww(48); |
| | | |
| | | .u-cell__body { |
| | | height: vww(48); |
| | | |
| | | .u-cell__body__content { |
| | | .u-cell__left-icon-wrap { |
| | | margin-right: vww(8); |
| | | |
| | | image { |
| | | width: vww(16); |
| | | height: vww(16); |
| | | } |
| | | } |
| | | |
| | | .u-cell__title { |
| | | .u-cell__title-text { |
| | | font-size: vww(14); |
| | | } |
| | | } |
| | | } |
| | | |
| | | .u-cell__right-icon-wrap { |
| | | .u-icon { |
| | | .u-icon__icon { |
| | | width: vww(7.27); |
| | | height: vww(12); |
| | | |
| | | span { |
| | | color: #007AFF; |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <!-- 轮播图 --> |
| | | <view class="home_swipe"><u-swiper :list="list3" indicator indicatorMode="line" circular></u-swiper></view> |
| | | <!-- 我的申请 --> |
| | | <combined-title title="我的申请" detailsPath="/pages/my-application/my-application"></combined-title> |
| | | <combination-card v-for="(item, index) in shenqingData" index="index"> |
| | | <combined-title title="我的申请" detailsPath="/pages/my-application/my-application" v-if="$store.state.shenqingMenu"></combined-title> |
| | | <combination-card v-for="(item, index) in shenqingData" index="index" v-if="$store.state.shenqingMenu"> |
| | | <template v-slot:top> |
| | | <view> |
| | | <text>{{ item.title }}</text> |
| | |
| | | </view> |
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2"> |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>表单数据</view> |
| | | <view>申请详情</view> |
| | | </view> |
| | | <view @click="apply(item)" v-if="item.status == 3"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>表单数据</view> |
| | | </view> |
| | | |
| | | |
| | | </view> --> |
| | | </view> |
| | | </template> |
| | |
| | | <view class="bottom-container"> |
| | | <!-- 待办按钮 --> |
| | | <view class="bottom-content__item"> |
| | | <!-- <view @click="theFormDataClick"> |
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'"> |
| | | <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 class="bottom-container"> |
| | | <!-- 已办按钮 --> |
| | | <view class="bottom-content__item"> |
| | | <view @click="theFormDataClick(item.tableId)"> |
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'"> |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>表单数据</view> |
| | | </view> |
| | |
| | | // data |
| | | shenqingData: [], |
| | | daibanData: [], |
| | | daibanData: [], |
| | | yibanData: [], |
| | | menuShow: false, |
| | | // 申请 |
| | |
| | | console.log(e); |
| | | this.$refs.menuRef.menuClick(); |
| | | }, |
| | | onLoad(){ |
| | | console.log('加载页面'); |
| | | wx.hideShareMenu({ |
| | | menus: ['shareAppMessage', 'shareTimeline'] |
| | | }) |
| | | }, |
| | | onShow() { |
| | | if (this.menuShow == true) { |
| | | this.$refs.menuRef.menuClick(); |
| | | } |
| | | this.init(); |
| | | |
| | | }, |
| | | components: { |
| | | combinedTitle, |
| | |
| | | this.$u.toast('操作失败!!!') |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | deleteApplicationModalCancel() { |
| | | this.deleteApplicationModalShow = false; |
| | |
| | | uni.showToast({ |
| | | title:res.data, |
| | | icon:'success', |
| | | duration:2000 |
| | | duration:2000 |
| | | }); |
| | | } |
| | | // 初始化申请列表 |
| | |
| | | } |
| | | console.log(this.form); |
| | | }); |
| | | |
| | | |
| | | this.modalVisible = true; |
| | | }, |
| | | // 修改 |
| | |
| | | justify-content: center; |
| | | align-content: center; |
| | | margin-right: vww(10); |
| | | &:nth-last-child() { |
| | | &:nth-last-child(1) { |
| | | margin-right: 0; |
| | | } |
| | | view { |
| | |
| | | formData:{ |
| | | username:'fyy', |
| | | password:'123456!@#' |
| | | // username:'anjianwei', |
| | | // password:'123456' |
| | | } |
| | | }; |
| | | }, |
| | | methods:{ |
| | | loginSubmit(){ |
| | | // console.log('login'); |
| | | console.log('点击登录'); |
| | | // console.log('login'); |
| | | uni.showLoading({ |
| | | title:'登录中...' |
| | | }); |
| | |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | .loginBtn { |
| | | margin-top: vww(80); |
| | | |
| | | |
| | | button { |
| | | background-color: #007aff; |
| | | color: #ffffff; |
| | |
| | | <template> |
| | | <!-- 我的申请 --> |
| | | <view class="my-application" > |
| | | <!-- 搜索区域 --> |
| | | <view class="searchBox"> |
| | | <view class="topRow"> |
| | | <view class="search"> |
| | | <u-search |
| | | @clickIcon="searchIconClick" |
| | | :clearabled="true" |
| | | :showAction="false" |
| | | placeholder="请输入标题" |
| | | v-model="myApplication.title" |
| | | shape="square" |
| | | searchIconColor="#cccccc" |
| | | ></u-search> |
| | | </view> |
| | | <!-- 我的申请 --> |
| | | <view class="my-application"> |
| | | <!-- 搜索区域 --> |
| | | <view class="searchBox"> |
| | | <u-collapse :border="true" |
| | | @change="searchChange" |
| | | @close="searchClose" |
| | | @open="searchOpen" |
| | | > |
| | | <u-collapse-item :border="false" |
| | | title="搜索框" |
| | | name="Docs guide" |
| | | > |
| | | <view class="topRow"> |
| | | <view class="search"> |
| | | <u-search |
| | | @clickIcon="searchIconClick" |
| | | :clearabled="true" |
| | | :showAction="false" |
| | | placeholder="请输入标题" |
| | | v-model="myApplication.title" |
| | | shape="square" |
| | | searchIconColor="#cccccc" |
| | | ></u-search> |
| | | </view> |
| | | |
| | | <data-select-box ref="dataSelectBox" class="data-select-box" placeholder="请选择条件" v-model="selectText" :clearabled="true" @click="dataSelectClick"></data-select-box> |
| | | </view> |
| | | <!-- 时间选择器 --> |
| | | <view class="example-body"><uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick" /></view> |
| | | <view class="searchBtn"><u-button type="primary" text="搜索" @click="searchClick"></u-button> <u-button type="primary" :plain="true" text="清空" @click="emptyButtonClick"></u-button></view> |
| | | </view> |
| | | <data-select-box ref="dataSelectBox" class="data-select-box" placeholder="请选择条件" v-model="selectText" |
| | | :clearabled="true" @click="dataSelectClick"></data-select-box> |
| | | </view> |
| | | <!-- 时间选择器 --> |
| | | <view class="example-body"> |
| | | <uni-datetime-picker v-model="range" type="daterange" @maskClick="maskClick"/> |
| | | </view> |
| | | <view class="searchBtn"> |
| | | <u-button type="primary" text="搜索" @click="searchClick"></u-button> |
| | | <u-button type="primary" :plain="true" text="清空" @click="emptyButtonClick"></u-button> |
| | | </view> |
| | | </u-collapse-item> |
| | | </u-collapse> |
| | | </view> |
| | | |
| | | <!-- 选择器 --> |
| | | <u-picker @cancel="dataSelectCancel" @confirm="selectConfirm" :show="selectPickerShow" :columns="selectList"></u-picker> |
| | | |
| | | <!-- 我的申请卡片区域 --> |
| | | <!-- <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:150px"> --> |
| | | <combination-card v-for="(item, index) in shenqingData" index="index"> |
| | | <template v-slot:top> |
| | | <!-- <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> --> |
| | | <view> |
| | | <text>{{ item.title }}</text> |
| | | </view> |
| | | </template> |
| | | <template v-slot:center> |
| | | <view class="center-container"> |
| | | <view class="center-content__one center-margin"> |
| | | <view class=""> |
| | | <text>所属流程:{{ item.processName }}</text> |
| | | </view> |
| | | <view class=""> |
| | | <text>审批环节:{{ item.currTaskName }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__two center-margin"> |
| | | <view class=""> |
| | | 状态: |
| | | <text :style="{ color: statusColor[item.status] }">{{ status[item.status] }}</text> |
| | | </view> |
| | | <view class=""> |
| | | 结果: |
| | | <text :style="{ color: resultColor[item.result] }">{{ result[item.result] }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__three center-margin"> |
| | | <text>创建时间:{{ item.createTime }}</text> |
| | | </view> |
| | | <view class="center-content__four"> |
| | | <text>提交申请时间:{{ item.applyTime }}</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <template v-slot:bottom> |
| | | <view class="bottom-container"> |
| | | <!-- 按钮区域 --> |
| | | <view class="bottom-content__chulizhong bottom-content__item"> |
| | | <view @click="withDrawClick(item.id)" v-if="item.status == 1"> |
| | | <image src="@/static/home/cehui.png" mode=""></image> |
| | | <view>撤回</view> |
| | | </view> |
| | | <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1"> |
| | | <image src="@/static/home/jindu.png" mode=""></image> |
| | | <view>查看进度</view> |
| | | </view> |
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2"> |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>表单数据</view> |
| | | </view> |
| | | <view v-if="item.status == 3" @click="apply(item)"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>重新申请</view> |
| | | </view> |
| | | <view v-if="item.status == 3" @click="editMyApplication(item)"> |
| | | <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> |
| | | </view> |
| | | </template> |
| | | </combination-card> |
| | | <!-- </u-checkbox-group> --> |
| | | <!-- 选择器 --> |
| | | <u-picker @cancel="dataSelectCancel" @confirm="selectConfirm" :show="selectPickerShow" |
| | | :columns="selectList"></u-picker> |
| | | |
| | | <!-- 撤回模态框 --> |
| | | <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> |
| | | </view> |
| | | <!-- 我的申请卡片区域 --> |
| | | <!-- <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:150px"> --> |
| | | <combination-card v-for="(item, index) in shenqingData" index="index"> |
| | | <template v-slot:top> |
| | | <!-- <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> --> |
| | | <view> |
| | | <text>{{ item.title }}</text> |
| | | </view> |
| | | </template> |
| | | <template v-slot:center> |
| | | <view class="center-container"> |
| | | <view class="center-content__one center-margin"> |
| | | <view class=""> |
| | | <text>所属流程:{{ item.processName }}</text> |
| | | </view> |
| | | <view class=""> |
| | | <text>审批环节:{{ item.currTaskName }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__two center-margin"> |
| | | <view class=""> |
| | | 状态: |
| | | <text :style="{ color: statusColor[item.status] }">{{ status[item.status] }}</text> |
| | | </view> |
| | | <view class=""> |
| | | 结果: |
| | | <text :style="{ color: resultColor[item.result] }">{{ result[item.result] }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__three center-margin"> |
| | | <text>创建时间:{{ item.createTime }}</text> |
| | | </view> |
| | | <view class="center-content__four"> |
| | | <text>提交申请时间:{{ item.applyTime }}</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <template v-slot:bottom> |
| | | <view class="bottom-container"> |
| | | <!-- 按钮区域 --> |
| | | <view class="bottom-content__chulizhong bottom-content__item"> |
| | | <view @click="withDrawClick(item.id)" v-if="item.status == 1"> |
| | | <image src="@/static/home/cehui.png" mode=""></image> |
| | | <view>撤回</view> |
| | | </view> |
| | | <view @click="checkTheScheduleClick(item.procInstId)" v-if="item.status == 1"> |
| | | <image src="@/static/home/jindu.png" mode=""></image> |
| | | <view>查看进度</view> |
| | | </view> |
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.status == 1 || item.status == 2"> |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>申请详情</view> |
| | | </view> |
| | | <view v-if="item.status == 3" @click="apply(item)"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>重新申请</view> |
| | | </view> |
| | | <view v-if="item.status == 3" @click="editMyApplication(item)"> |
| | | <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> |
| | | </view> |
| | | </template> |
| | | </combination-card> |
| | | <!-- </u-checkbox-group> --> |
| | | |
| | | <!-- 批量删除模态框 --> |
| | | <view class="batchDeleteModal"> |
| | | <u-modal |
| | | :show="batchDeleteModalShow" |
| | | title="提示" |
| | | content="确定删除申请?" |
| | | :showCancelButton="true" |
| | | @confirm="batchDeleteModalConfirm" |
| | | @cancel="batchDeleteModalCancel" |
| | | ></u-modal> |
| | | </view> |
| | | |
| | | <view class="" style="height:50px;"> |
| | | |
| | | </view> |
| | | <!-- 撤回模态框 --> |
| | | <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> |
| | | </view> |
| | | |
| | | <!-- 底部全选 --> |
| | | <view class="bottomTabbar"> |
| | | <view class="bottomTabbar_checkBox"> |
| | | <!-- <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> |
| | | <u-checkbox labelSize="13px" label="全选" name="tatalSelect"></u-checkbox> |
| | | </u-checkbox-group> --> |
| | | </view> |
| | | <view class="bottomTabbar_button"> |
| | | <!-- <u-button :plain="true" type="primary" text="批量删除" @click="batchDeleteClick"></u-button> --> |
| | | <u-button type="primary" text="新增申请" @click="newApplicationClick"></u-button> |
| | | </view> |
| | | </view> |
| | | <!-- 批量删除模态框 --> |
| | | <view class="batchDeleteModal"> |
| | | <u-modal |
| | | :show="batchDeleteModalShow" |
| | | title="提示" |
| | | content="确定删除申请?" |
| | | :showCancelButton="true" |
| | | @confirm="batchDeleteModalConfirm" |
| | | @cancel="batchDeleteModalCancel" |
| | | ></u-modal> |
| | | </view> |
| | | |
| | | <!-- 菜单栏 --> |
| | | <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> |
| | | </view> |
| | | <!--返回顶部--> |
| | | <u-back-top :scroll-top="scrollTop"></u-back-top> |
| | | |
| | | <view class="" style="height:50px;"> |
| | | |
| | | </view> |
| | | |
| | | <!-- 底部全选 --> |
| | | <view class="bottomTabbar"> |
| | | <view class="bottomTabbar_checkBox"> |
| | | <!-- <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> |
| | | <u-checkbox labelSize="13px" label="全选" name="tatalSelect"></u-checkbox> |
| | | </u-checkbox-group> --> |
| | | </view> |
| | | <view class="bottomTabbar_button"> |
| | | <!-- <u-button :plain="true" type="primary" text="批量删除" @click="batchDeleteClick"></u-button> --> |
| | | <u-button type="primary" text="新增申请" @click="newApplicationClick"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <!-- 菜单栏 --> |
| | | <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import popupMenu from '@/components/common/popup-menu/popup-menu.vue'; |
| | | import combinationCard from '@/components/common/combination-card/combination-card.vue'; |
| | | import dataSelectBox from '@/components/common/data-select-box/data-select-box.vue'; |
| | | |
| | | export default { |
| | | name: 'MyApplication', |
| | | data() { |
| | | return { |
| | | status: ['草稿', '处理中', '已结束', '已撤回'], |
| | | statusColor: ['#dd8b8c', '#FF9900', '#007AFF', '#06BE00'], |
| | | result: ['未提交', '处理中', '通过', '驳回'], |
| | | resultColor: ['#dd8b8c', '#FF9900', '#06BE00', '#be2b2d'], |
| | | // 搜索区域 |
| | | selectText: '', |
| | | // 选择器 |
| | | selectPickerShow: false, |
| | | selectList: [['草稿', '处理中', '已结束', '已撤回'], ['未提交', '处理中', '通过', '驳回']], |
| | | activeColor: '#cccccc', |
| | | isActive: false, |
| | | // 时间选择器 |
| | | range: [], |
| | | // 撤回模态框 |
| | | withDrawShow: false, |
| | | withDrawData: { |
| | | reason: '', |
| | | id: '', // 撤回申请ID |
| | | procInstId: '' |
| | | }, |
| | | // 重新申请 |
| | | form: { |
| | | sendMessage: true, |
| | | sendSms: true, |
| | | sendEmail: true, |
| | | procDefId: '', |
| | | assignees: [], |
| | | priority: '0' |
| | | }, |
| | | assigneeList: [], |
| | | showAssign: false, |
| | | isGateway: false, |
| | | isCustom: false, |
| | | // 批量删除申请 |
| | | batchDeleteModalShow: false, |
| | | // 复选框 |
| | | checkBoxValue: [], |
| | | totalSelectValue: [], |
| | | menuShow: false, |
| | | shenqingData: [], // 容器 |
| | | // 请求参数 |
| | | myApplication: { |
| | | title: '', |
| | | status: '', |
| | | result: '', |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | startTime: '', |
| | | endTime: '', |
| | | sort: 'createTime', |
| | | order: 'desc' |
| | | }, |
| | | // 上拉加载更多 |
| | | timer: {}, |
| | | load: 0, |
| | | loadingText: '加载中...', |
| | | loadingType: 0, |
| | | contentText: { |
| | | contentDown: '上拉显示更多', |
| | | contentRefresh: '正在加载...', |
| | | contentNomore: '没有更多数据了' |
| | | } |
| | | }; |
| | | }, |
| | | onShow() { |
| | | if (this.menuShow == true) { |
| | | this.$refs.menuRef.menuClick(); |
| | | } |
| | | this.myApplication.pageNumber = 1; |
| | | this.init(); |
| | | }, |
| | | // 点击导航栏菜单后 |
| | | onNavigationBarButtonTap(e) { |
| | | // console.log(e); |
| | | this.$refs.menuRef.menuClick(); |
| | | }, |
| | | watch: { |
| | | // 时间绑定日期 |
| | | range(nVal) { |
| | | console.log('范围选:', this.range); |
| | | this.myApplication.startTime = this.range[0]; |
| | | this.myApplication.endTime = this.range[1]; |
| | | }, |
| | | // 监听输入框的内容 |
| | | selectText(nVal) { |
| | | if (nVal == '') { |
| | | this.myApplication.status = ''; |
| | | this.myApplication.result = ''; |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | combinationCard, |
| | | popupMenu, |
| | | dataSelectBox |
| | | }, |
| | | // 上拉加载更多 |
| | | onReachBottom() { |
| | | if (this.timer != null) { |
| | | clearTimeout(this.timer); |
| | | } |
| | | this.timer = setTimeout(() => { |
| | | this.getMoreNews(); |
| | | }, 1000); |
| | | }, |
| | | // 下拉加载 |
| | | onPullDownRefresh() { |
| | | console.log('refresh'); |
| | | this.myApplication.pageNumber = 1; |
| | | this.loadingType = 0; |
| | | this.shenqingData = []; |
| | | setTimeout(()=> { |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.getMoreNews(); |
| | | }, |
| | | // getProcessDataList() { |
| | | // this.$reqGet('getProcessDataList', this.myApplication).then(res => { |
| | | // if (res.code === 0) { |
| | | // console.log('申请', res); |
| | | // this.shenqingData = res.data.records; |
| | | // } |
| | | // }); |
| | | // }, |
| | | getMoreNews() { |
| | | if (this.loadingType !== 0) { |
| | | //loadingType!=0;直接返回 |
| | | return false; |
| | | } |
| | | this.loadingType = 1; |
| | | uni.showNavigationBarLoading(); //显示加载动画 |
| | | this.$reqGet('getProcessDataList', this.myApplication).then(response => { |
| | | console.log('response', response); |
| | | this.myApplication.pageNumber++; // 得到数据之后 page+1 |
| | | if (response.data.records.length < 1) { |
| | | // 没有数据 |
| | | this.loadingType = 2; |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | uni.showToast({ |
| | | title: '没有更多数据了!', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | // this.myApplication.pageNumber++; // 每触底一次 page +1 |
| | | if(this.myApplication.title||this.myApplication.status||this.myApplication.result||this.myApplication.startTime||this.myApplication.endTime){ |
| | | this.shenqingData = response.data.records |
| | | } else{ |
| | | this.shenqingData = this.shenqingData.concat(response.data.records); |
| | | } |
| | | //将数据拼接在一起 |
| | | this.loadingType = 0; // 将loadingType归0重置 |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | }); |
| | | }, |
| | | // 条件选择器 |
| | | selectConfirm(v) { |
| | | this.selectText = v.value.toString(); |
| | | this.myApplication.status = v.indexs[0]; |
| | | this.myApplication.result = v.indexs[1]; |
| | | this.selectPickerShow = false; |
| | | }, |
| | | dataSelectCancel() { |
| | | this.selectPickerShow = false; |
| | | this.$refs.dataSelectBox.isActive = false; |
| | | }, |
| | | dataSelectClick() { |
| | | this.selectPickerShow = true; |
| | | }, |
| | | // 菜单 |
| | | menushow(e) { |
| | | this.menuShow = e; |
| | | }, |
| | | // 时间选择器 |
| | | maskClick(e) { |
| | | console.log('maskClick事件:', e); |
| | | }, |
| | | searchClick() { |
| | | console.log('this.myApplication', this.myApplication); |
| | | this.myApplication.pageNumber = 1; |
| | | this.loadingType = 0; |
| | | this.getMoreNews(); |
| | | }, |
| | | emptyButtonClick(){ |
| | | this.myApplication.title = ''; |
| | | this.selectText = ''; |
| | | this.range = []; |
| | | this.init(); |
| | | }, |
| | | // 撤回模态框 |
| | | withDrawClick(id) { |
| | | this.withDrawShow = true; |
| | | this.withDrawData.id = id; |
| | | }, |
| | | withDrawConfirm() { |
| | | this.shenqingData.forEach(i => { |
| | | if (i.id == this.withDrawData.id) { |
| | | this.withDrawData.procInstId = i.procInstId; |
| | | } |
| | | }); |
| | | this.$reqPost('withDraw', this.withDrawData, 'form').then(res => { |
| | | console.log('res', res); |
| | | if (res.code == 0) { |
| | | uni.showToast({ |
| | | title: res.data, |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | this.withDrawShow = false; |
| | | // 初始化申请列表 |
| | | this.myApplication.pageNumber = 1; |
| | | this.shenqingData = []; |
| | | this.getMoreNews(); |
| | | }); |
| | | name: 'MyApplication', |
| | | data() { |
| | | return { |
| | | scrollTop: 0, |
| | | status: ['草稿', '处理中', '已结束', '已撤回'], |
| | | statusColor: ['#dd8b8c', '#FF9900', '#007AFF', '#06BE00'], |
| | | result: ['未提交', '处理中', '通过', '驳回'], |
| | | resultColor: ['#dd8b8c', '#FF9900', '#06BE00', '#be2b2d'], |
| | | // 搜索区域 |
| | | selectText: '', |
| | | // 选择器 |
| | | selectPickerShow: false, |
| | | selectList: [['草稿', '处理中', '已结束', '已撤回'], ['未提交', '处理中', '通过', '驳回']], |
| | | activeColor: '#cccccc', |
| | | isActive: false, |
| | | // 时间选择器 |
| | | range: [], |
| | | // 撤回模态框 |
| | | withDrawShow: false, |
| | | withDrawData: { |
| | | reason: '', |
| | | id: '', // 撤回申请ID |
| | | procInstId: '' |
| | | }, |
| | | // 重新申请 |
| | | form: { |
| | | sendMessage: true, |
| | | sendSms: true, |
| | | sendEmail: true, |
| | | procDefId: '', |
| | | assignees: [], |
| | | priority: '0' |
| | | }, |
| | | assigneeList: [], |
| | | showAssign: false, |
| | | isGateway: false, |
| | | isCustom: false, |
| | | // 批量删除申请 |
| | | batchDeleteModalShow: false, |
| | | // 复选框 |
| | | checkBoxValue: [], |
| | | totalSelectValue: [], |
| | | menuShow: false, |
| | | shenqingData: [], // 容器 |
| | | // 请求参数 |
| | | myApplication: { |
| | | title: '', |
| | | status: '', |
| | | result: '', |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | startTime: '', |
| | | endTime: '', |
| | | sort: 'createTime', |
| | | order: 'desc' |
| | | }, |
| | | // 上拉加载更多 |
| | | timer: {}, |
| | | load: 0, |
| | | loadingText: '加载中...', |
| | | loadingType: 0, |
| | | contentText: { |
| | | contentDown: '上拉显示更多', |
| | | contentRefresh: '正在加载...', |
| | | contentNomore: '没有更多数据了' |
| | | } |
| | | }; |
| | | }, |
| | | // 返回顶部 |
| | | onPageScroll(e) { |
| | | // console.log('页面滑动', this.scrollTop); |
| | | this.scrollTop = e.scrollTop; |
| | | }, |
| | | onShow() { |
| | | if (this.menuShow == true) { |
| | | this.$refs.menuRef.menuClick(); |
| | | } |
| | | this.init(); |
| | | }, |
| | | // 点击导航栏菜单后 |
| | | onNavigationBarButtonTap(e) { |
| | | // console.log(e); |
| | | this.$refs.menuRef.menuClick(); |
| | | }, |
| | | watch: { |
| | | // 时间绑定日期 |
| | | range(nVal) { |
| | | console.log('范围选:', this.range); |
| | | this.myApplication.startTime = this.range[0]; |
| | | this.myApplication.endTime = this.range[1]; |
| | | }, |
| | | // 监听输入框的内容 |
| | | selectText(nVal) { |
| | | if (nVal == '') { |
| | | this.myApplication.status = ''; |
| | | this.myApplication.result = ''; |
| | | } |
| | | }, |
| | | scrollTop(nVal){ |
| | | if(nVal){ |
| | | // console.log('页面滑动变化'); |
| | | } |
| | | } |
| | | }, |
| | | components: { |
| | | combinationCard, |
| | | popupMenu, |
| | | dataSelectBox |
| | | }, |
| | | // 上拉加载更多 |
| | | onReachBottom() { |
| | | if (this.timer != null) { |
| | | clearTimeout(this.timer); |
| | | } |
| | | this.timer = setTimeout(() => { |
| | | this.getMoreNews(); |
| | | }, 1000); |
| | | }, |
| | | // 下拉加载 |
| | | onPullDownRefresh() { |
| | | console.log('refresh'); |
| | | |
| | | console.log(this.withDrawId); |
| | | if (this.withDrawData.reason.length >= 2) { |
| | | console.log(this.withDrawData.reason); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '请规范输入', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | }, |
| | | withDrawCancel() { |
| | | this.withDrawShow = false; |
| | | }, |
| | | 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(); |
| | | }) |
| | | } else { |
| | | this.form.assignees = []; |
| | | this.showAssign = true; |
| | | this.error = '请进入"流程管理"为审批节点分配候选审批人员'; |
| | | } |
| | | } |
| | | } |
| | | console.log(this.form); |
| | | }); |
| | | |
| | | this.modalVisible = true; |
| | | // } |
| | | }, |
| | | // 修改申请 |
| | | editMyApplication(v){ |
| | | console.log('修改申请'); |
| | | uni.navigateTo({ |
| | | url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}` |
| | | }); |
| | | }, |
| | | // 批量删除模态框 |
| | | batchDeleteClick() { |
| | | this.batchDeleteModalShow = true; |
| | | }, |
| | | batchDeleteModalConfirm() { |
| | | this.batchDeleteModalShow = false; |
| | | }, |
| | | batchDeleteModalCancel() { |
| | | this.batchDeleteModalShow = false; |
| | | }, |
| | | // 搜索 |
| | | searchIconClick() { |
| | | console.log(1111, this.myApplication.title); |
| | | }, |
| | | setTimeout(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.myApplication.pageNumber = 1; |
| | | this.loadingType = 0; |
| | | this.shenqingData = []; |
| | | this.getMoreNews(); |
| | | }, |
| | | // getProcessDataList() { |
| | | // this.$reqGet('getProcessDataList', this.myApplication).then(res => { |
| | | // if (res.code === 0) { |
| | | // console.log('申请', res); |
| | | // this.shenqingData = res.data.records; |
| | | // } |
| | | // }); |
| | | // }, |
| | | getMoreNews() { |
| | | if (this.loadingType !== 0) { |
| | | //loadingType!=0;直接返回 |
| | | return false; |
| | | } |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | this.loadingType = 1; |
| | | uni.showNavigationBarLoading(); //显示加载动画 |
| | | this.$reqGet('getProcessDataList', this.myApplication).then(response => { |
| | | uni.hideLoading(); |
| | | console.log('response', response); |
| | | this.myApplication.pageNumber++; // 得到数据之后 page+1 |
| | | if (response.data.records.length < 1) { |
| | | // 没有数据 |
| | | this.loadingType = 2; |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | uni.showToast({ |
| | | title: '没有更多数据了!', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | // this.myApplication.pageNumber++; // 每触底一次 page +1 |
| | | if (this.myApplication.title || this.myApplication.status || this.myApplication.result || this.myApplication.startTime || this.myApplication.endTime) { |
| | | if(this.myApplication.pageNumber == 1){ |
| | | this.shenqingData = response.data.records |
| | | }else{ |
| | | this.shenqingData = this.shenqingData.concat(response.data.records); |
| | | } |
| | | } else { |
| | | if(this.myApplication.pageNumber == 1){ |
| | | this.shenqingData = []; |
| | | } |
| | | this.shenqingData = this.shenqingData.concat(response.data.records); |
| | | } |
| | | //将数据拼接在一起 |
| | | this.loadingType = 0; // 将loadingType归0重置 |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | }); |
| | | }, |
| | | // 条件选择器 |
| | | selectConfirm(v) { |
| | | this.selectText = v.value.toString(); |
| | | this.myApplication.status = v.indexs[0]; |
| | | this.myApplication.result = v.indexs[1]; |
| | | this.selectPickerShow = false; |
| | | }, |
| | | dataSelectCancel() { |
| | | this.selectPickerShow = false; |
| | | this.$refs.dataSelectBox.isActive = false; |
| | | }, |
| | | dataSelectClick() { |
| | | this.selectPickerShow = true; |
| | | }, |
| | | // 菜单 |
| | | menushow(e) { |
| | | this.menuShow = e; |
| | | }, |
| | | // 时间选择器 |
| | | maskClick(e) { |
| | | console.log('maskClick事件:', e); |
| | | }, |
| | | searchChange(e){ |
| | | console.log('e', e); |
| | | }, |
| | | searchClose(e){ |
| | | console.log('e', e); |
| | | }, |
| | | searchOpen(e){ |
| | | console.log('e', e); |
| | | }, |
| | | searchClick() { |
| | | console.log('this.myApplication', this.myApplication); |
| | | this.myApplication.pageNumber = 1; |
| | | this.loadingType = 0; |
| | | this.getMoreNews(); |
| | | }, |
| | | emptyButtonClick() { |
| | | this.loadingType == 0; |
| | | this.myApplication.pageNumber = 1; |
| | | this.myApplication.title = ''; |
| | | this.selectText = ''; |
| | | this.range = []; |
| | | this.init(); |
| | | }, |
| | | // 撤回模态框 |
| | | withDrawClick(id) { |
| | | this.withDrawShow = true; |
| | | this.withDrawData.id = id; |
| | | }, |
| | | withDrawConfirm() { |
| | | this.shenqingData.forEach(i => { |
| | | if (i.id == this.withDrawData.id) { |
| | | this.withDrawData.procInstId = i.procInstId; |
| | | } |
| | | }); |
| | | this.$reqPost('withDraw', this.withDrawData, 'form').then(res => { |
| | | console.log('res', res); |
| | | if (res.code == 0) { |
| | | uni.showToast({ |
| | | title: res.data, |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | this.withDrawShow = false; |
| | | // 初始化申请列表 |
| | | this.myApplication.pageNumber = 1; |
| | | this.shenqingData = []; |
| | | this.getMoreNews(); |
| | | }); |
| | | |
| | | checkboxChange(n) { |
| | | console.log('change', n); |
| | | }, |
| | | totalSelectChange(n) { |
| | | if (n[0] == 'tatalSelect') { |
| | | this.shenqingData.forEach(item => { |
| | | this.totalSelectValue.push(item.id); |
| | | }); |
| | | this.checkBoxValue = this.totalSelectValue; |
| | | } else { |
| | | this.checkBoxValue = []; |
| | | } |
| | | console.log('totalChange', n); |
| | | }, |
| | | // 查看进度 |
| | | checkTheScheduleClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/check-the-schedule/check-the-schedule?index=${v}` |
| | | }); |
| | | }, |
| | | // 表单数据 |
| | | theFormDataClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/the-form-data/the-form-data?index=${v}` |
| | | }); |
| | | }, |
| | | // 审批历史 |
| | | approvalHistoryClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/approval-history/approval-history?index=${v}` |
| | | }); |
| | | }, |
| | | // 新增申请 |
| | | newApplicationClick() { |
| | | uni.navigateTo({ |
| | | url: '/pages/new-application/new-application' |
| | | }); |
| | | } |
| | | } |
| | | console.log(this.withDrawId); |
| | | if (this.withDrawData.reason.length >= 2) { |
| | | console.log(this.withDrawData.reason); |
| | | } else { |
| | | uni.showToast({ |
| | | title: '请规范输入', |
| | | duration: 2000 |
| | | }); |
| | | } |
| | | }, |
| | | withDrawCancel() { |
| | | this.withDrawShow = false; |
| | | }, |
| | | 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(); |
| | | }) |
| | | } else { |
| | | this.form.assignees = []; |
| | | this.showAssign = true; |
| | | this.error = '请进入"流程管理"为审批节点分配候选审批人员'; |
| | | } |
| | | } |
| | | } |
| | | console.log(this.form); |
| | | }); |
| | | |
| | | this.modalVisible = true; |
| | | // } |
| | | }, |
| | | // 修改申请 |
| | | editMyApplication(v) { |
| | | console.log('修改申请'); |
| | | uni.navigateTo({ |
| | | url: `/pages/edit-my-application/edit-my-application?index=${v.tableId}` |
| | | }); |
| | | }, |
| | | // 批量删除模态框 |
| | | batchDeleteClick() { |
| | | this.batchDeleteModalShow = true; |
| | | }, |
| | | batchDeleteModalConfirm() { |
| | | this.batchDeleteModalShow = false; |
| | | }, |
| | | batchDeleteModalCancel() { |
| | | this.batchDeleteModalShow = false; |
| | | }, |
| | | // 搜索 |
| | | searchIconClick() { |
| | | console.log(1111, this.myApplication.title); |
| | | }, |
| | | |
| | | checkboxChange(n) { |
| | | console.log('change', n); |
| | | }, |
| | | totalSelectChange(n) { |
| | | if (n[0] == 'tatalSelect') { |
| | | this.shenqingData.forEach(item => { |
| | | this.totalSelectValue.push(item.id); |
| | | }); |
| | | this.checkBoxValue = this.totalSelectValue; |
| | | } else { |
| | | this.checkBoxValue = []; |
| | | } |
| | | console.log('totalChange', n); |
| | | }, |
| | | // 查看进度 |
| | | checkTheScheduleClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/check-the-schedule/check-the-schedule?index=${v}` |
| | | }); |
| | | }, |
| | | // 表单数据 |
| | | theFormDataClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/the-form-data/the-form-data?index=${v}` |
| | | }); |
| | | }, |
| | | // 审批历史 |
| | | approvalHistoryClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/approval-history/approval-history?index=${v}` |
| | | }); |
| | | }, |
| | | // 新增申请 |
| | | newApplicationClick() { |
| | | uni.navigateTo({ |
| | | url: '/pages/new-application/new-application' |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep.my-application { |
| | | width: 100%; |
| | | height: 100%; |
| | | .searchBox { |
| | | width: 94%; |
| | | margin: vww(16) auto; |
| | | .topRow { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | flex-wrap: nowrap; |
| | | .search { |
| | | // width: vww(160); |
| | | width: 48%; |
| | | .u-search { |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: vww(4); |
| | | .u-search__content { |
| | | height: 38px; |
| | | background-color: #ffffff !important; |
| | | .u-search__content__icon { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | .u-icon { |
| | | .u-icon__icon { |
| | | font-size: 20px !important; |
| | | } |
| | | } |
| | | } |
| | | .u-search__content__close { |
| | | width: 16px !important; |
| | | height: 16px !important; |
| | | background-color: #cccccc !important; |
| | | .u-icon { |
| | | .u-icon__icon { |
| | | font-size: 10px !important; |
| | | } |
| | | } |
| | | } |
| | | .u-search__content__input { |
| | | margin-left: vww(10); |
| | | background-color: #ffffff !important; |
| | | .uni-input-placeholder { |
| | | color: #cccccc !important; |
| | | } |
| | | .u-search__content__input--placeholder { |
| | | // color:#CCCCCC; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .data-select-box { |
| | | width: 48%; |
| | | } |
| | | // 下拉菜单 |
| | | // .data-selet { |
| | | // border: 1px solid #d1d1d1; |
| | | // border-radius: 4px; |
| | | // // width: vww(160); |
| | | // width:48%; |
| | | // height: 40px; |
| | | // display: flex; |
| | | // align-items: center; |
| | | // font-size: 13px; |
| | | // color: #cccccc; |
| | | // .uni-select__icon { |
| | | // display: flex; |
| | | // align-content: center; |
| | | // margin: 0 10px; |
| | | // image { |
| | | // width: 10px; |
| | | // height: 5.5px; |
| | | // } |
| | | // } |
| | | // .content { |
| | | // margin-left: vww(8); |
| | | // width: vww(150); |
| | | // } |
| | | // } |
| | | } |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | // 时间选择器 |
| | | .example-body { |
| | | margin-top: vww(16); |
| | | width: 100%; |
| | | } |
| | | .searchBox { |
| | | width: 94%; |
| | | margin: vww(16) auto; |
| | | |
| | | // 搜索按钮 |
| | | .searchBtn { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | .u-button { |
| | | width: vww(90); |
| | | height: vww(32); |
| | | margin: vww(16) auto 0; |
| | | } |
| | | } |
| | | } |
| | | .u-collapse{ |
| | | .u-collapse-item{ |
| | | .u-collapse-item__content{ |
| | | .topRow { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | flex-wrap: nowrap; |
| | | |
| | | // 卡片中间 |
| | | .center-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | .center-content__one { |
| | | display: flex; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__two { |
| | | display: flex; |
| | | // margin: vww(10) 0; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__three { |
| | | display: flex; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__four { |
| | | } |
| | | } |
| | | // 中间部分样式 |
| | | .center-margin { |
| | | margin-bottom: vww(16); |
| | | } |
| | | .search { |
| | | // width: vww(160); |
| | | width: 48%; |
| | | |
| | | // 卡片底部 |
| | | .bottom-container { |
| | | .bottom-content__item { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | view { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-content: center; |
| | | margin-right: vww(10); |
| | | &:nth-last-child() { |
| | | margin-right: 0; |
| | | } |
| | | view { |
| | | display: inline-block; |
| | | } |
| | | image { |
| | | width: vww(16); |
| | | height: vww(16); |
| | | margin-right: vww(4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .u-search { |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: vww(4); |
| | | |
| | | // 模态框 |
| | | .wodeshenqingMotai { |
| | | // width:100%; |
| | | // height:vww(244); |
| | | .slot-content { |
| | | .u-textarea { |
| | | width: vww(280); |
| | | height: vww(90) !important; |
| | | .uni-textarea-wrapper { |
| | | height: vww(90) !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .u-search__content { |
| | | height: vww(38); |
| | | background-color: #ffffff !important; |
| | | |
| | | // 底部 |
| | | .bottomTabbar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | width: 100%; |
| | | height: vww(48); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | background-color: #f5f5f5; |
| | | .bottomTabbar_checkBox { |
| | | margin-left: vww(16); |
| | | .u-checkbox-group { |
| | | .u-checkbox { |
| | | } |
| | | } |
| | | } |
| | | .bottomTabbar_button { |
| | | display: flex; |
| | | .u-button { |
| | | font-size: 13px; |
| | | margin-right: vww(14); |
| | | width: vww(90); |
| | | height: vww(32); |
| | | } |
| | | } |
| | | } |
| | | .u-search__content__icon { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | |
| | | .u-icon { |
| | | .u-icon__icon { |
| | | font-size: 20px !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .u-search__content__close { |
| | | width: 16px !important; |
| | | height: 16px !important; |
| | | background-color: #cccccc !important; |
| | | |
| | | .u-icon { |
| | | .u-icon__icon { |
| | | font-size: 10px !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .u-search__content__input { |
| | | margin-left: vww(10); |
| | | background-color: #ffffff !important; |
| | | |
| | | .uni-input-placeholder { |
| | | color: #cccccc !important; |
| | | } |
| | | |
| | | .u-search__content__input--placeholder { |
| | | // color:#CCCCCC; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .data-select-box { |
| | | width: 48%; |
| | | } |
| | | |
| | | // 下拉菜单 |
| | | // .data-selet { |
| | | // border: 1px solid #d1d1d1; |
| | | // border-radius: 4px; |
| | | // // width: vww(160); |
| | | // width:48%; |
| | | // height: 40px; |
| | | // display: flex; |
| | | // align-items: center; |
| | | // font-size: 13px; |
| | | // color: #cccccc; |
| | | // .uni-select__icon { |
| | | // display: flex; |
| | | // align-content: center; |
| | | // margin: 0 10px; |
| | | // image { |
| | | // width: 10px; |
| | | // height: 5.5px; |
| | | // } |
| | | // } |
| | | // .content { |
| | | // margin-left: vww(8); |
| | | // width: vww(150); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | // 时间选择器 |
| | | .example-body { |
| | | margin-top: vww(16); |
| | | width: 100%; |
| | | } |
| | | |
| | | // 搜索按钮 |
| | | .searchBtn { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .u-button { |
| | | width: vww(90); |
| | | height: vww(32); |
| | | margin: vww(16) auto 0; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | // 卡片中间 |
| | | .center-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .center-content__one { |
| | | display: flex; |
| | | |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__two { |
| | | display: flex; |
| | | // margin: vww(10) 0; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__three { |
| | | display: flex; |
| | | |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__four { |
| | | } |
| | | } |
| | | |
| | | // 中间部分样式 |
| | | .center-margin { |
| | | margin-bottom: vww(16); |
| | | } |
| | | |
| | | // 卡片底部 |
| | | .bottom-container { |
| | | .bottom-content__item { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | |
| | | view { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-content: center; |
| | | margin-right: vww(10); |
| | | |
| | | &:nth-last-child(1) { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | view { |
| | | display: inline-block; |
| | | } |
| | | |
| | | image { |
| | | width: vww(16); |
| | | height: vww(16); |
| | | margin-right: vww(4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 模态框 |
| | | .wodeshenqingMotai { |
| | | // width:100%; |
| | | // height:vww(244); |
| | | .slot-content { |
| | | .u-textarea { |
| | | width: vww(280); |
| | | height: vww(90) !important; |
| | | |
| | | .uni-textarea-wrapper { |
| | | height: vww(90) !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 底部 |
| | | .bottomTabbar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | width: 100%; |
| | | height: vww(48); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | background-color: #f5f5f5; |
| | | |
| | | .bottomTabbar_checkBox { |
| | | margin-left: vww(16); |
| | | |
| | | .u-checkbox-group { |
| | | .u-checkbox { |
| | | } |
| | | } |
| | | } |
| | | |
| | | .bottomTabbar_button { |
| | | display: flex; |
| | | |
| | | .u-button { |
| | | font-size: 13px; |
| | | margin-right: vww(14); |
| | | width: vww(90); |
| | | height: vww(32); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view class="my-have-todo"> |
| | | <!-- 搜索区域 --> |
| | | <view class="searchContainer"> |
| | | |
| | | |
| | | <view class="searchBox"> |
| | | <view class="search"> |
| | | <u-search :clearabled="true" :showAction="false" placeholder="请输入标题" v-model="haveTodoParams.title" shape="square"></u-search> |
| | | </view> |
| | | <!-- 状态选择器 --> |
| | | <!-- <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | | <text>{{ dataSeletText }}</text> |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> --> |
| | | <view class="search"> |
| | | <u-search :clearabled="true" :showAction="false" placeholder="请输入任务名称" v-model="haveTodoParams.name" shape="square"></u-search> |
| | | </view> |
| | | </view> |
| | | <view class="my-have-todo"> |
| | | <!-- 搜索区域 --> |
| | | <view class="searchContainer"> |
| | | |
| | | <!-- 时间搜索区域 --> |
| | | <view class="timeContiner"> |
| | | <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.startDate" @change="startDateChange" placeholder="开始时间" /> |
| | | <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.endDate" @change="endDateChange" placeholder="结束时间" /> |
| | | </view> |
| | | |
| | | <view class="searchButton"> |
| | | <u-button type="primary" text="搜索" @click="searchButtonClick"></u-button> |
| | | <u-button type="primary" :plain="true" text="清空" @click="emptyButtonClick"></u-button> |
| | | </view> |
| | | </view> |
| | | <!-- 我的已办卡片区域 --> |
| | | <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px"> |
| | | <combination-card v-for="(item, index) in yibanData" index="index"> |
| | | <template v-slot:top> |
| | | <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> |
| | | <view> |
| | | <text>{{ item.actBusiness.title }}</text> |
| | | </view> |
| | | </template> |
| | | <template v-slot:center> |
| | | <view class="center-container"> |
| | | <view class="center-content__one center-margin"> |
| | | <view> |
| | | <text>任务名称:{{ item.name }}</text> |
| | | </view> |
| | | <view> |
| | | <text>所属流程:{{ item.processName }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__two center-margin"> |
| | | <view> |
| | | <text>发起人:{{ item.actBusiness.createByName }}</text> |
| | | </view> |
| | | <view> |
| | | <text>审批操作:{{ item.deleteReason }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__three center-margin"> |
| | | <view class=""> |
| | | <text>审批意见:{{ item.comment }}</text> |
| | | </view> |
| | | <view class=""> |
| | | <text>耗时:{{ |
| | | item.duration >= 86400000 |
| | | ? parseInt(item.duration / 86400000 + '天' + parseInt(item.duration % 86400000) / 3600000 + '时' + parseInt(item.duration % 3600000) / 60000 + '分') |
| | | : item.duration >= 3600000 |
| | | ? parseInt(item.duration / 3600000) + '时' + parseInt(item.duration / 3600000 % 3600000) + '分' |
| | | : parseInt(item.duration / 60000) + '分' |
| | | }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__four"> |
| | | <text>创建时间:{{ item.createTime }}</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <template v-slot:bottom> |
| | | <view class="bottom-container"> |
| | | <!-- 已办按钮 --> |
| | | <view class="bottom-content__item"> |
| | | <view @click="theFormDataClick(item.tableId)"> |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>表单数据</view> |
| | | </view> |
| | | <view @click="approvalHistoryClick(item.procInstId)"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>审批历史</view> |
| | | </view> |
| | | <view @click="deleteApplicationClick(item.id)"> |
| | | <image src="@/static/home/delete.png" mode=""></image> |
| | | <view>删除</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </combination-card> |
| | | </u-checkbox-group> |
| | | <u-collapse :border="true" |
| | | @change="searchChange" |
| | | @close="searchClose" |
| | | @open="searchOpen" |
| | | > |
| | | <u-collapse-item :border="false" |
| | | title="搜索框" |
| | | name="Docs guide" |
| | | > |
| | | <view class="searchBox"> |
| | | <view class="search"> |
| | | <u-search :clearabled="true" :showAction="false" placeholder="请输入标题" v-model="haveTodoParams.title" |
| | | shape="square"></u-search> |
| | | </view> |
| | | <!-- 状态选择器 --> |
| | | <!-- <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | | <text>{{ dataSeletText }}</text> |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> --> |
| | | <view class="search"> |
| | | <u-search :clearabled="true" :showAction="false" placeholder="请输入任务名称" v-model="haveTodoParams.name" |
| | | shape="square"></u-search> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 底部全选 --> |
| | | <view class="bottomTabbar"> |
| | | <view class="bottomTabbar_checkBox"> |
| | | <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"><u-checkbox labelSize="13px" label="全选" name="tatalSelect"></u-checkbox></u-checkbox-group> |
| | | </view> |
| | | <view class="bottomTabbar_button"> |
| | | <u-button :plain="true" type="primary" text="批量删除" @click="deleteApplicationClickAll()"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 删除已办申请模态框 --> |
| | | <view class="deleteApplicationModal"> |
| | | <u-modal |
| | | :show="deleteApplicationModalShow" |
| | | title="提示" |
| | | content="确定删除选择申请?" |
| | | :showCancelButton="true" |
| | | @confirm="deleteApplicationModalConfirm" |
| | | @cancel="deleteApplicationModalCancel" |
| | | ></u-modal> |
| | | </view> |
| | | <!-- 时间搜索区域 --> |
| | | <view class="timeContiner"> |
| | | <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.startDate" |
| | | @change="startDateChange" placeholder="开始时间"/> |
| | | <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="haveTodoParams.endDate" |
| | | @change="endDateChange" placeholder="结束时间"/> |
| | | </view> |
| | | |
| | | <!-- 选择器 --> |
| | | <!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> --> |
| | | |
| | | <!-- 菜单栏 --> |
| | | <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> |
| | | </view> |
| | | <view class="searchButton"> |
| | | <u-button type="primary" text="搜索" @click="searchButtonClick"></u-button> |
| | | <u-button type="primary" :plain="true" text="清空" @click="emptyButtonClick"></u-button> |
| | | </view> |
| | | |
| | | </u-collapse-item> |
| | | </u-collapse> |
| | | </view> |
| | | <!-- 我的已办卡片区域 --> |
| | | <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px"> |
| | | <combination-card v-for="(item, index) in yibanData" index="index"> |
| | | <template v-slot:top> |
| | | <u-checkbox size="35" :key="item.id" :name="item.id"></u-checkbox> |
| | | <view> |
| | | <text>{{ item.actBusiness.title }}</text> |
| | | </view> |
| | | </template> |
| | | <template v-slot:center> |
| | | <view class="center-container"> |
| | | <view class="center-content__one center-margin"> |
| | | <view> |
| | | <text>任务名称:{{ item.name }}</text> |
| | | </view> |
| | | <view> |
| | | <text>所属流程:{{ item.processName }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__two center-margin"> |
| | | <view> |
| | | <text>发起人:{{ item.actBusiness.createByName }}</text> |
| | | </view> |
| | | <view> |
| | | <text>审批操作:{{ item.deleteReason }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__three center-margin"> |
| | | <view class=""> |
| | | <text>审批意见:{{ item.comment }}</text> |
| | | </view> |
| | | <view class=""> |
| | | <text>耗时:{{ |
| | | item.duration >= 86400000 |
| | | ? parseInt(item.duration / 86400000 + '天' + parseInt(item.duration % 86400000) / 3600000 + '时' + parseInt(item.duration % 3600000) / 60000 + '分') |
| | | : item.duration >= 3600000 |
| | | ? parseInt(item.duration / 3600000) + '时' + parseInt(item.duration / 3600000 % 3600000) + '分' |
| | | : parseInt(item.duration / 60000) + '分' |
| | | }} |
| | | </text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__four"> |
| | | <text>创建时间:{{ item.createTime }}</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <template v-slot:bottom> |
| | | <view class="bottom-container"> |
| | | <!-- 已办按钮 --> |
| | | <view class="bottom-content__item"> |
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'"> |
| | | <image src="@/static/home/biaodan.png" mode=""></image> |
| | | <view>申请详情</view> |
| | | </view> |
| | | <view @click="approvalHistoryClick(item.procInstId)"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>审批历史</view> |
| | | </view> |
| | | <view @click="deleteApplicationClick(item.id)"> |
| | | <image src="@/static/home/delete.png" mode=""></image> |
| | | <view>删除</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </combination-card> |
| | | </u-checkbox-group> |
| | | |
| | | <!-- 底部全选 --> |
| | | <view class="bottomTabbar"> |
| | | <view class="bottomTabbar_checkBox"> |
| | | <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> |
| | | <u-checkbox labelSize="13px" label="全选" name="tatalSelect"></u-checkbox> |
| | | </u-checkbox-group> |
| | | </view> |
| | | <view class="bottomTabbar_button"> |
| | | <u-button :plain="true" type="primary" text="批量删除" @click="deleteApplicationClickAll()"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 删除已办申请模态框 --> |
| | | <view class="deleteApplicationModal"> |
| | | <u-modal |
| | | :show="deleteApplicationModalShow" |
| | | title="提示" |
| | | content="确定删除选择申请?" |
| | | :showCancelButton="true" |
| | | @confirm="deleteApplicationModalConfirm" |
| | | @cancel="deleteApplicationModalCancel" |
| | | ></u-modal> |
| | | </view> |
| | | |
| | | <!-- 选择器 --> |
| | | <!-- <u-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> --> |
| | | |
| | | <!--返回顶部--> |
| | | <u-back-top :scroll-top="scrollTop"></u-back-top> |
| | | |
| | | <!-- 菜单栏 --> |
| | | <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import popupMenu from '@/components/common/popup-menu/popup-menu.vue'; |
| | | import combinationCard from '@/components/common/combination-card/combination-card.vue'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | // 条件搜索 |
| | | // searchData: '', |
| | | // dataSeletText: '请选择状态', |
| | | // 时间选择 |
| | | // createTime: '', |
| | | // endTime: '', |
| | | // 复选框 |
| | | checkBoxValue:[], |
| | | totalSelectValue:[], |
| | | // 选择器 |
| | | // statusSeletShow: false, |
| | | // statusList: [['中国', '美国', '日本']], |
| | | yibanData: [], |
| | | // 删除申请 |
| | | deleteIds:'', |
| | | deleteApplicationModalShow:false, |
| | | haveTodoParams:{ |
| | | name: '', |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | sort: 'createTime', |
| | | order: 'desc', |
| | | title: '', |
| | | startDate: '', |
| | | endDate: '' |
| | | } |
| | | }; |
| | | }, |
| | | onShow(){ |
| | | if(this.menuShow == true){ |
| | | this.$refs.menuRef.menuClick() |
| | | } |
| | | this.init(); |
| | | }, |
| | | // 点击导航栏菜单后 |
| | | onNavigationBarButtonTap(e) { |
| | | // console.log(e); |
| | | this.$refs.menuRef.menuClick() |
| | | }, |
| | | components: { |
| | | combinationCard, |
| | | popupMenu |
| | | }, |
| | | methods: { |
| | | init(){ |
| | | this.doneList(); |
| | | }, |
| | | // 已办 |
| | | doneList() { |
| | | uni.showLoading({ |
| | | title:'加载中...' |
| | | }) |
| | | this.$reqGet('doneList', this.haveTodoParams).then(res => { |
| | | uni.hideLoading(); |
| | | if (res.code === 0) { |
| | | // console.log('已办', res); |
| | | this.yibanData = res.data.content; |
| | | } |
| | | }); |
| | | }, |
| | | // 搜索 |
| | | searchButtonClick(){ |
| | | this.init(); |
| | | }, |
| | | // 清空 |
| | | emptyButtonClick(){ |
| | | this.haveTodoParams.name = ''; |
| | | this.haveTodoParams.title = ''; |
| | | this.haveTodoParams.startDate = ''; |
| | | this.haveTodoParams.endDate = ''; |
| | | this.init(); |
| | | }, |
| | | menushow(e){ |
| | | this.menuShow = e |
| | | }, |
| | | deleteApplicationClick(id){ |
| | | this.deleteIds = id; |
| | | this.deleteApplicationModalShow = true; |
| | | }, |
| | | deleteApplicationClickAll(){ |
| | | if(this.checkBoxValue.length > 0){ |
| | | this.deleteIds = this.checkBoxValue.toString(','); |
| | | this.deleteApplicationModalShow = true; |
| | | } else{ |
| | | this.$u.toast('未选中申请') |
| | | } |
| | | }, |
| | | // 删除申请模态框 |
| | | deleteApplicationModalConfirm() { |
| | | this.deleteApplicationModalShow = false; |
| | | this.$reqPost('deleteHistoric',{ids:this.deleteIds},'form').then(res=>{ |
| | | if(res.code == 0){ |
| | | this.$nextTick(()=>{ |
| | | this.$u.toast('操作成功!') |
| | | }) |
| | | this.yibanData = []; |
| | | this.init(); |
| | | } else { |
| | | this.$u.toast('操作失败!!!') |
| | | } |
| | | }) |
| | | }, |
| | | deleteApplicationModalCancel() { |
| | | this.deleteApplicationModalShow = false; |
| | | }, |
| | | // 时间选择器 |
| | | startDateChange() { |
| | | // this.queryRealTimeShippingData.startDate = ''; |
| | | // this.$nextTick(() => { |
| | | // console.log(this.queryRealTimeShippingData); |
| | | // this.realTimeShipping(); |
| | | // }); |
| | | }, |
| | | endDateChange() { |
| | | // this.queryRealTimeShippingData.endDate = ''; |
| | | // this.$nextTick(() => { |
| | | // console.log(this.queryRealTimeShippingData); |
| | | // this.realTimeShipping(); |
| | | // }); |
| | | }, |
| | | // 复选框 |
| | | checkboxChange(n){ |
| | | console.log(n); |
| | | }, |
| | | totalSelectChange(n){ |
| | | if(n[0] == 'tatalSelect'){ |
| | | this.yibanData.forEach(item=>{ |
| | | this.totalSelectValue.push(item.id) |
| | | }) |
| | | this.checkBoxValue = this.totalSelectValue |
| | | }else{ |
| | | this.checkBoxValue = [] |
| | | } |
| | | }, |
| | | // 状态 |
| | | // statusConfirm(a){ |
| | | // this.statusSeletShow = false |
| | | // console.log(a) |
| | | // }, |
| | | // 表单数据 |
| | | theFormDataClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/the-form-data/the-form-data?index=${v}` |
| | | }); |
| | | }, |
| | | // 审批历史 |
| | | approvalHistoryClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/approval-history/approval-history?index=${v}` |
| | | }); |
| | | } |
| | | } |
| | | data() { |
| | | return { |
| | | scrollTop: 0, |
| | | // 条件搜索 |
| | | // searchData: '', |
| | | // dataSeletText: '请选择状态', |
| | | // 时间选择 |
| | | // createTime: '', |
| | | // endTime: '', |
| | | // 复选框 |
| | | checkBoxValue: [], |
| | | totalSelectValue: [], |
| | | // 选择器 |
| | | // statusSeletShow: false, |
| | | // statusList: [['中国', '美国', '日本']], |
| | | yibanData: [], |
| | | // 删除申请 |
| | | deleteIds: '', |
| | | deleteApplicationModalShow: false, |
| | | haveTodoParams: { |
| | | name: '', |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | sort: 'createTime', |
| | | order: 'desc', |
| | | title: '', |
| | | startDate: '', |
| | | endDate: '' |
| | | }, |
| | | // 上拉加载更多 |
| | | timer: {}, |
| | | load: 0, |
| | | loadingText: '加载中...', |
| | | loadingType: 0, |
| | | contentText: { |
| | | contentDown: '上拉显示更多', |
| | | contentRefresh: '正在加载...', |
| | | contentNomore: '没有更多数据了' |
| | | } |
| | | }; |
| | | }, |
| | | // 上拉加载更多 |
| | | onReachBottom() { |
| | | if (this.timer != null) { |
| | | clearTimeout(this.timer); |
| | | } |
| | | this.timer = setTimeout(() => { |
| | | this.getMoreNews(); |
| | | }, 1000); |
| | | }, |
| | | // 返回顶部 |
| | | onPageScroll(e) { |
| | | this.scrollTop = e.scrollTop; |
| | | }, |
| | | // 下拉加载 |
| | | onPullDownRefresh() { |
| | | console.log('refresh'); |
| | | setTimeout(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | this.init(); |
| | | }, |
| | | onShow() { |
| | | if (this.menuShow == true) { |
| | | this.$refs.menuRef.menuClick() |
| | | } |
| | | this.init(); |
| | | }, |
| | | // 点击导航栏菜单后 |
| | | onNavigationBarButtonTap(e) { |
| | | // console.log(e); |
| | | this.$refs.menuRef.menuClick() |
| | | }, |
| | | components: { |
| | | combinationCard, |
| | | popupMenu |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.haveTodoParams.pageNumber = 1; |
| | | this.loadingType = 0; |
| | | this.yibanData = []; |
| | | // this.doneList(); |
| | | this.getMoreNews(); |
| | | }, |
| | | getMoreNews() { |
| | | if (this.loadingType !== 0) { |
| | | //loadingType!=0;直接返回 |
| | | return false; |
| | | } |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | this.loadingType = 1; |
| | | uni.showNavigationBarLoading(); //显示加载动画 |
| | | this.$reqGet('doneList', this.haveTodoParams).then(response => { |
| | | uni.hideLoading(); |
| | | this.haveTodoParams.pageNumber++; // 得到数据之后 page+1 |
| | | if (response.data.content.length < 1) { |
| | | // 没有数据 |
| | | this.loadingType = 2; |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | uni.showToast({ |
| | | title: '没有更多数据了!', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | // this.myApplication.pageNumber++; // 每触底一次 page +1 |
| | | if (this.haveTodoParams.name || this.haveTodoParams.title || this.haveTodoParams.startDate || this.haveTodoParams.endTime ) { |
| | | if(this.haveTodoParams.pageNumber == 1){ |
| | | this.yibanData = response.data.content |
| | | } else{ |
| | | this.yibanData = this.yibanData.concat(response.data.content); |
| | | } |
| | | } else { |
| | | if(this.haveTodoParams.pageNumber ==1){ |
| | | this.yibanData = []; |
| | | } |
| | | this.yibanData = this.yibanData.concat(response.data.content); |
| | | } |
| | | //将数据拼接在一起 |
| | | this.loadingType = 0; // 将loadingType归0重置 |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | }); |
| | | }, |
| | | // 已办 |
| | | // doneList() { |
| | | // uni.showLoading({ |
| | | // title:'加载中...' |
| | | // }) |
| | | // this.$reqGet('doneList', this.haveTodoParams).then(res => { |
| | | // uni.hideLoading(); |
| | | // if (res.code === 0) { |
| | | // // console.log('已办', res); |
| | | // this.yibanData = res.data.content; |
| | | // } |
| | | // }); |
| | | // }, |
| | | searchChange(e){ |
| | | console.log('e', e); |
| | | }, |
| | | searchClose(e){ |
| | | console.log('e', e); |
| | | }, |
| | | searchOpen(e){ |
| | | console.log('e', e); |
| | | }, |
| | | // 搜索 |
| | | searchButtonClick() { |
| | | this.loadingType == 0; |
| | | this.haveTodoParams.pageNumber = 1; |
| | | this.init(); |
| | | }, |
| | | // 清空 |
| | | emptyButtonClick() { |
| | | this.loadingType == 0; |
| | | this.haveTodoParams.pageNumber = 1; |
| | | this.haveTodoParams.name = ''; |
| | | this.haveTodoParams.title = ''; |
| | | this.haveTodoParams.startDate = ''; |
| | | this.haveTodoParams.endDate = ''; |
| | | this.init(); |
| | | }, |
| | | menushow(e) { |
| | | this.menuShow = e |
| | | }, |
| | | deleteApplicationClick(id) { |
| | | this.deleteIds = id; |
| | | this.deleteApplicationModalShow = true; |
| | | }, |
| | | deleteApplicationClickAll() { |
| | | if (this.checkBoxValue.length > 0) { |
| | | this.deleteIds = this.checkBoxValue.toString(','); |
| | | this.deleteApplicationModalShow = true; |
| | | } else { |
| | | this.$u.toast('未选中申请') |
| | | } |
| | | }, |
| | | // 删除申请模态框 |
| | | deleteApplicationModalConfirm() { |
| | | this.deleteApplicationModalShow = false; |
| | | this.$reqPost('deleteHistoric', {ids: this.deleteIds}, 'form').then(res => { |
| | | if (res.code == 0) { |
| | | this.$nextTick(() => { |
| | | this.$u.toast('操作成功!') |
| | | }) |
| | | this.yibanData = []; |
| | | this.init(); |
| | | } else { |
| | | this.$u.toast('操作失败!!!') |
| | | } |
| | | }) |
| | | }, |
| | | deleteApplicationModalCancel() { |
| | | this.deleteApplicationModalShow = false; |
| | | }, |
| | | // 时间选择器 |
| | | startDateChange() { |
| | | // this.queryRealTimeShippingData.startDate = ''; |
| | | // this.$nextTick(() => { |
| | | // console.log(this.queryRealTimeShippingData); |
| | | // this.realTimeShipping(); |
| | | // }); |
| | | }, |
| | | endDateChange() { |
| | | // this.queryRealTimeShippingData.endDate = ''; |
| | | // this.$nextTick(() => { |
| | | // console.log(this.queryRealTimeShippingData); |
| | | // this.realTimeShipping(); |
| | | // }); |
| | | }, |
| | | // 复选框 |
| | | checkboxChange(n) { |
| | | console.log(n); |
| | | }, |
| | | totalSelectChange(n) { |
| | | if (n[0] == 'tatalSelect') { |
| | | this.yibanData.forEach(item => { |
| | | this.totalSelectValue.push(item.id) |
| | | }) |
| | | this.checkBoxValue = this.totalSelectValue |
| | | } else { |
| | | this.checkBoxValue = [] |
| | | } |
| | | }, |
| | | // 状态 |
| | | // statusConfirm(a){ |
| | | // this.statusSeletShow = false |
| | | // console.log(a) |
| | | // }, |
| | | // 表单数据 |
| | | theFormDataClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/the-form-data/the-form-data?index=${v}` |
| | | }); |
| | | }, |
| | | // 审批历史 |
| | | approvalHistoryClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/approval-history/approval-history?index=${v}` |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep.my-have-todo { |
| | | // 搜索区域 |
| | | .searchContainer{ |
| | | |
| | | .searchButton{ |
| | | width: 91%; |
| | | margin: vww(16) auto; |
| | | display: flex; |
| | | .u-button{ |
| | | width:30%; |
| | | } |
| | | } |
| | | |
| | | .searchBox { |
| | | width: 91%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: vww(16) auto; |
| | | .search { |
| | | width: vww(160); |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: vww(4); |
| | | .u-search { |
| | | .u-search__content { |
| | | height: 40px; |
| | | background-color: #ffffff !important; |
| | | .u-search__content__icon { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | .u-search__content__input { |
| | | background-color: #ffffff !important; |
| | | .uni-input-placeholder{ |
| | | color:#CCCCCC!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 下拉菜单 |
| | | .data-selet { |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: 4px; |
| | | width: vww(160); |
| | | // width: 100%; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 13px; |
| | | color: #CCCCCC; |
| | | .uni-select__icon { |
| | | display: flex; |
| | | align-content: center; |
| | | margin: 0 10px; |
| | | image { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | } |
| | | .content { |
| | | margin-left: vww(8); |
| | | width: vww(150); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 时间搜索 |
| | | .timeContiner { |
| | | width: 91%; |
| | | margin: 0 auto vww(16); |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | .uni-date { |
| | | width: vww(160); |
| | | .uni-date-editor { |
| | | .uni-date-editor--x { |
| | | .uni-date-x { |
| | | .uni-date__x-input { |
| | | .uni-input-wrapper{ |
| | | .uni-input-placeholder{ |
| | | color:#CCCCCC; |
| | | font-size: vww(13); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .uni-date-x--border{ |
| | | border: 1px solid #d1d1d1!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 搜索区域 |
| | | .searchContainer { |
| | | width:91%; |
| | | margin:vww(16) auto; |
| | | .u-collapse { |
| | | .u-collapse-item { |
| | | .u-collapse-item__content { |
| | | |
| | | |
| | | .searchButton { |
| | | width: 100%; |
| | | margin: 0 auto; |
| | | display: flex; |
| | | |
| | | // 卡片中间 |
| | | .center-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | .center-content__one { |
| | | display: flex; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__two { |
| | | display: flex; |
| | | // margin: vww(10) 0; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__three { |
| | | display: flex; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__four { |
| | | } |
| | | } |
| | | // 中间部分样式 |
| | | .center-margin { |
| | | margin-bottom: vww(16); |
| | | } |
| | | .u-button { |
| | | width: 30%; |
| | | } |
| | | } |
| | | |
| | | // 卡片底部 |
| | | .bottom-container { |
| | | .bottom-content__item { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | view { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-content: center; |
| | | margin-right: vww(10); |
| | | &:nth-last-child() { |
| | | margin-right: 0; |
| | | } |
| | | view { |
| | | display: inline-block; |
| | | } |
| | | image { |
| | | width: vww(16); |
| | | height: vww(16); |
| | | margin-right: vww(4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 底部 |
| | | .bottomTabbar{ |
| | | position:fixed; |
| | | bottom:0; |
| | | width:100%; |
| | | height:vww(48); |
| | | display:flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | background-color:#F5F5F5; |
| | | .bottomTabbar_checkBox{ |
| | | margin-left:vww(16); |
| | | .u-checkbox-group{ |
| | | .u-checkbox{ |
| | | } |
| | | } |
| | | } |
| | | .bottomTabbar_button{ |
| | | display:flex; |
| | | .u-button{ |
| | | font-size:13px; |
| | | margin-right:vww(14); |
| | | width:vww(90); |
| | | height:vww(32); |
| | | } |
| | | } |
| | | } |
| | | .searchBox { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin:0 auto vww(16); |
| | | |
| | | .search { |
| | | width: vww(150); |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: vww(4); |
| | | |
| | | .u-search { |
| | | .u-search__content { |
| | | height: 40px; |
| | | background-color: #ffffff !important; |
| | | |
| | | .u-search__content__icon { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | |
| | | .u-search__content__close { |
| | | width: 16px !important; |
| | | height: 16px !important; |
| | | background-color: #cccccc !important; |
| | | |
| | | .u-icon { |
| | | .u-icon__icon { |
| | | font-size: 10px !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .u-search__content__input { |
| | | background-color: #ffffff !important; |
| | | |
| | | .uni-input-placeholder { |
| | | color: #CCCCCC !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 下拉菜单 |
| | | .data-selet { |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: 4px; |
| | | width: vww(150); |
| | | // width: 100%; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 13px; |
| | | color: #CCCCCC; |
| | | |
| | | .uni-select__icon { |
| | | display: flex; |
| | | align-content: center; |
| | | margin: 0 10px; |
| | | |
| | | image { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | } |
| | | |
| | | .content { |
| | | margin-left: vww(8); |
| | | width: vww(150); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 时间搜索 |
| | | .timeContiner { |
| | | width: 100%; |
| | | margin: 0 auto vww(16); |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | |
| | | .uni-date { |
| | | width: vww(150); |
| | | |
| | | .uni-date-editor { |
| | | .uni-date-editor--x { |
| | | .uni-date-x { |
| | | .uni-date__x-input { |
| | | .uni-input-wrapper { |
| | | .uni-input-placeholder { |
| | | color: #CCCCCC; |
| | | font-size: vww(13); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .uni-date-x--border { |
| | | border: 1px solid #d1d1d1 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 卡片中间 |
| | | .center-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .center-content__one { |
| | | display: flex; |
| | | |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__two { |
| | | display: flex; |
| | | // margin: vww(10) 0; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__three { |
| | | display: flex; |
| | | |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__four { |
| | | } |
| | | } |
| | | |
| | | // 中间部分样式 |
| | | .center-margin { |
| | | margin-bottom: vww(16); |
| | | } |
| | | |
| | | // 卡片底部 |
| | | .bottom-container { |
| | | .bottom-content__item { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | |
| | | view { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-content: center; |
| | | margin-right: vww(10); |
| | | |
| | | &:nth-last-child(1) { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | view { |
| | | display: inline-block; |
| | | } |
| | | |
| | | image { |
| | | width: vww(16); |
| | | height: vww(16); |
| | | margin-right: vww(4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 底部 |
| | | .bottomTabbar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | width: 100%; |
| | | height: vww(48); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | background-color: #F5F5F5; |
| | | |
| | | .bottomTabbar_checkBox { |
| | | margin-left: vww(16); |
| | | |
| | | .u-checkbox-group { |
| | | .u-checkbox { |
| | | } |
| | | } |
| | | } |
| | | |
| | | .bottomTabbar_button { |
| | | display: flex; |
| | | |
| | | .u-button { |
| | | font-size: 13px; |
| | | margin-right: vww(14); |
| | | width: vww(90); |
| | | height: vww(32); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <!-- 我的待办 --> |
| | | <view class="my-todo"> |
| | | <!-- 搜索区域 --> |
| | | <view class="searchContainer"> |
| | | <view class="searchBox"> |
| | | <view class="search"> |
| | | <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="请输入标题" v-model="todoParams.title" shape="square"></u-search> |
| | | </view> |
| | | <!-- 状态选择器 --> |
| | | <!-- <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | | <text>{{ dataSeletText }}</text> |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> --> |
| | | <view class="search"> |
| | | <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="请输入任务名称" v-model="todoParams.name" shape="square"></u-search> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 时间搜索区域 --> |
| | | <view class="timeContiner"> |
| | | <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.startDate" @change="startDateChange" placeholder="开始时间" /> |
| | | <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.endDate" @change="endDateChange" placeholder="结束时间" /> |
| | | </view> |
| | | |
| | | <view class="searchButton"> |
| | | <u-button type="primary" text="搜索" @click="searchButtonClick"></u-button> |
| | | <u-button type="primary" text="清空" :plain="true" @click="emptyButtonClick"></u-button> |
| | | </view> |
| | | </view> |
| | | <!-- 我的待办 --> |
| | | <view class="my-todo"> |
| | | <!-- 搜索区域 --> |
| | | |
| | | <!-- 我的待办卡片区域 --> |
| | | <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px"> |
| | | <combination-card v-for="(item, index) in daibanData" index="index"> |
| | | <template v-slot:top> |
| | | <u-checkbox size="35" :key="item.id" :name="item.id+item.procInstId"></u-checkbox> |
| | | <view> |
| | | <text>{{ item.actBusiness.title }}</text> |
| | | </view> |
| | | </template> |
| | | <template v-slot:center> |
| | | <view class="center-container"> |
| | | <view class="center-content__one center-margin"> |
| | | <view class=""> |
| | | <text>任务名称:{{ item.name }}</text> |
| | | </view> |
| | | <view class=""> |
| | | <text>所属流程:{{ item.processName }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__two center-margin"> |
| | | <text>发起人:{{ item.actBusiness.createByName }}</text> |
| | | </view> |
| | | <view class="searchContainer"> |
| | | <u-collapse :border="true" |
| | | @change="searchChange" |
| | | @close="searchChange" |
| | | @open="searchOpen" |
| | | > |
| | | <u-collapse-item :border="false" |
| | | title="搜索框" |
| | | name="Docs guide" |
| | | > |
| | | <view class="searchBox"> |
| | | <view class="search"> |
| | | <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="请输入标题" |
| | | v-model="todoParams.title" shape="square"></u-search> |
| | | </view> |
| | | <!-- 状态选择器 --> |
| | | <!-- <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | | <text>{{ dataSeletText }}</text> |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> --> |
| | | <view class="search"> |
| | | <u-search @clickIcon="searchIconClick" :clearabled="true" :showAction="false" placeholder="请输入任务名称" |
| | | v-model="todoParams.name" shape="square"></u-search> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="center-content__three"> |
| | | <text>创建时间:{{ item.createTime }}</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <template v-slot:bottom> |
| | | <view class="bottom-container"> |
| | | <!-- 待办按钮 --> |
| | | <view class="bottom-content__item"> |
| | | <!-- <view @click="theFormDataClick"> |
| | | <image src="@/static/home/jindu.png" mode=""></image> |
| | | <view>申请详情</view> |
| | | </view> --> |
| | | <view @click="adopClick(item)"> |
| | | <image src="@/static/home/tongguo.png" mode=""></image> |
| | | <view>通过</view> |
| | | </view> |
| | | <view @click="rejectModalShow = true"> |
| | | <image src="@/static/home/bohui.png" mode=""></image> |
| | | <view>驳回</view> |
| | | </view> |
| | | <view @click="approvalHistoryClick(item.procInstId)"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>历史</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </combination-card> |
| | | </u-checkbox-group> |
| | | <!-- 时间搜索区域 --> |
| | | <view class="timeContiner"> |
| | | <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.startDate" |
| | | @change="startDateChange" placeholder="开始时间"/> |
| | | <uni-datetime-picker class="time-picker" type="date" :clear-icon="true" v-model="todoParams.endDate" |
| | | @change="endDateChange" placeholder="结束时间"/> |
| | | </view> |
| | | |
| | | <!-- 底部全选 --> |
| | | <view class="bottomTabbar"> |
| | | <view class="bottomTabbar_checkBox"> |
| | | <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> |
| | | <u-checkbox labelSize="13px" label="全选" name="tatalSelect"></u-checkbox> |
| | | </u-checkbox-group> |
| | | </view> |
| | | <view class="bottomTabbar_button"> |
| | | <u-button :plain="true" type="primary" text="批量驳回" @click="batchRejectClick"></u-button> |
| | | <u-button type="primary" text="批量通过" @click="batchAdoptClick"></u-button> |
| | | </view> |
| | | </view> |
| | | <view class="searchButton"> |
| | | <u-button type="primary" text="搜索" @click="searchButtonClick"></u-button> |
| | | <u-button type="primary" text="清空" :plain="true" @click="emptyButtonClick"></u-button> |
| | | </view> |
| | | </u-collapse-item> |
| | | </u-collapse> |
| | | </view> |
| | | |
| | | <!-- 通过模态框 --> |
| | | <view class="adoptModal"> |
| | | <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel"> |
| | | <view class="slot-content"><view class="rejectMesaage"> |
| | | <u-icon name="info-circle-fill" color="#0307ff"></u-icon> |
| | | <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text> |
| | | </view><u--textarea v-model="adoptForm.comment" placeholder="请输入审批意见"></u--textarea></view> |
| | | </u-modal> |
| | | </view> |
| | | |
| | | <!-- 驳回模态框 --> |
| | | <view class="rejectModal"> |
| | | <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel"> |
| | | <view class="slot-content"> |
| | | <view class="rejectMesaage"> |
| | | <u-icon name="info-circle-fill" color="#0307ff"></u-icon> |
| | | <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text> |
| | | </view> |
| | | <u--textarea v-model="rejectForm.comment" placeholder="请输入审批意见"></u--textarea> |
| | | <!-- <view class="rejectBack"> |
| | | <view class="rejectBack-title"><text>驳回至</text></view> |
| | | <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | | <text>{{ dataSeletText }}</text> |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | |
| | | <!-- 批量驳回模态框 --> |
| | | <!-- <view class="rejectModal"> |
| | | <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel"> |
| | | <view class="slot-content"> |
| | | <u--textarea v-model="rejectModalContent" placeholder="请输入审批意见"></u--textarea> |
| | | <view class="rejectBack"> |
| | | <view class="rejectBack-title"><text>驳回至</text></view> |
| | | <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | | <text>{{ dataSeletText }}</text> |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-modal> |
| | | </view> --> |
| | | |
| | | <!-- 批量通过模态框 --> |
| | | <!-- <view class="adoptModal"> |
| | | <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel"> |
| | | <view class="slot-content"><u--textarea v-model="adoptModalContent" placeholder="请输入审批意见"></u--textarea></view> |
| | | </u-modal> |
| | | </view> --> |
| | | |
| | | <!-- 菜单栏 --> |
| | | <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> |
| | | </view> |
| | | <!-- 我的待办卡片区域 --> |
| | | <u-checkbox-group v-model="checkBoxValue" placement="column" @change="checkboxChange" style="margin-bottom:50px"> |
| | | <combination-card v-for="(item, index) in daibanData" index="index"> |
| | | <template v-slot:top> |
| | | <u-checkbox size="35" :key="item.id" :name="item.id+item.procInstId"></u-checkbox> |
| | | <view> |
| | | <text>{{ item.actBusiness.title }}</text> |
| | | </view> |
| | | </template> |
| | | <template v-slot:center> |
| | | <view class="center-container"> |
| | | <view class="center-content__one center-margin"> |
| | | <view class=""> |
| | | <text>任务名称:{{ item.name }}</text> |
| | | </view> |
| | | <view class=""> |
| | | <text>所属流程:{{ item.processName }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="center-content__two center-margin"> |
| | | <text>发起人:{{ item.actBusiness.createByName }}</text> |
| | | </view> |
| | | |
| | | <view class="center-content__three"> |
| | | <text>创建时间:{{ item.createTime }}</text> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <template v-slot:bottom> |
| | | <view class="bottom-container"> |
| | | <!-- 待办按钮 --> |
| | | <view class="bottom-content__item"> |
| | | <view @click="theFormDataClick(item.tableId)" v-if="item.procDefId == 'WAY_BILL:4:87504'"> |
| | | <image src="@/static/home/jindu.png" mode=""></image> |
| | | <view>申请详情</view> |
| | | </view> |
| | | <view @click="adopClick(item)"> |
| | | <image src="@/static/home/tongguo.png" mode=""></image> |
| | | <view>通过</view> |
| | | </view> |
| | | <view @click="rejectModalShow = true"> |
| | | <image src="@/static/home/bohui.png" mode=""></image> |
| | | <view>驳回</view> |
| | | </view> |
| | | <view @click="approvalHistoryClick(item.procInstId)"> |
| | | <image src="@/static/home/history.png" mode=""></image> |
| | | <view>历史</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | | </combination-card> |
| | | </u-checkbox-group> |
| | | |
| | | <!-- 底部全选 --> |
| | | <view class="bottomTabbar"> |
| | | <view class="bottomTabbar_checkBox"> |
| | | <u-checkbox-group size="35" v-model="totalSelectValue" placement="column" @change="totalSelectChange"> |
| | | <u-checkbox labelSize="13px" label="全选" name="tatalSelect"></u-checkbox> |
| | | </u-checkbox-group> |
| | | </view> |
| | | <view class="bottomTabbar_button"> |
| | | <u-button :plain="true" type="primary" text="批量驳回" @click="batchRejectClick"></u-button> |
| | | <u-button type="primary" text="批量通过" @click="batchAdoptClick"></u-button> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 通过模态框 --> |
| | | <view class="adoptModal"> |
| | | <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" |
| | | @cancel="adoptModalCancel"> |
| | | <view class="slot-content"> |
| | | <view class="rejectMesaage"> |
| | | <u-icon name="info-circle-fill" color="#0307ff"></u-icon> |
| | | <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text> |
| | | </view> |
| | | <u--textarea v-model="adoptForm.comment" placeholder="请输入审批意见"></u--textarea> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | |
| | | <!-- 驳回模态框 --> |
| | | <view class="rejectModal"> |
| | | <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" |
| | | @cancel="rejectModalCancel"> |
| | | <view class="slot-content"> |
| | | <view class="rejectMesaage"> |
| | | <u-icon name="info-circle-fill" color="#0307ff"></u-icon> |
| | | <text>{{ modalType == 0 ? '注意:将默认分配给节点设定的所有可审批用户' : '注意:所有流程将驳回至发起人' }}</text> |
| | | </view> |
| | | <u--textarea v-model="rejectForm.comment" placeholder="请输入审批意见"></u--textarea> |
| | | <!-- <view class="rejectBack"> |
| | | <view class="rejectBack-title"><text>驳回至</text></view> |
| | | <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | | <text>{{ dataSeletText }}</text> |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | </u-modal> |
| | | </view> |
| | | |
| | | <!-- 批量驳回模态框 --> |
| | | <!-- <view class="rejectModal"> |
| | | <u-modal width="684rpx" :show="rejectModalShow" title="驳回" :showCancelButton="true" @confirm="rejectModalConfirm" @cancel="rejectModalCancel"> |
| | | <view class="slot-content"> |
| | | <u--textarea v-model="rejectModalContent" placeholder="请输入审批意见"></u--textarea> |
| | | <view class="rejectBack"> |
| | | <view class="rejectBack-title"><text>驳回至</text></view> |
| | | <view class="data-selet" @click="statusSeletShow = true"> |
| | | <view class="content"> |
| | | <text>{{ dataSeletText }}</text> |
| | | </view> |
| | | <view class="uni-select__icon"><image src="@/static/icon/select.png" mode="加载失败"></image></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </u-modal> |
| | | </view> --> |
| | | |
| | | <!-- 批量通过模态框 --> |
| | | <!-- <view class="adoptModal"> |
| | | <u-modal width="684rpx" :show="adoptModalShow" title="审批通过" :showCancelButton="true" @confirm="adoptModalConfirm" @cancel="adoptModalCancel"> |
| | | <view class="slot-content"><u--textarea v-model="adoptModalContent" placeholder="请输入审批意见"></u--textarea></view> |
| | | </u-modal> |
| | | </view> --> |
| | | |
| | | <!--返回顶部--> |
| | | <u-back-top :scroll-top="scrollTop"></u-back-top> |
| | | |
| | | <!-- 菜单栏 --> |
| | | <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import popupMenu from '@/components/common/popup-menu/popup-menu.vue'; |
| | | import combinationCard from '@/components/common/combination-card/combination-card.vue'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | // 复选框 |
| | | checkBoxValue:[], |
| | | totalSelectValue:[], |
| | | // 通过模态框 |
| | | adoptModalShow: false, |
| | | adoptModalContent: '', |
| | | adoptDataBox:[], |
| | | // 通过请求 |
| | | adoptForm: { |
| | | ids: '', |
| | | comment: '' |
| | | }, |
| | | // 驳回模态框 |
| | | rejectModalShow: false, |
| | | rejectModalContent: '', |
| | | menuShow:false, |
| | | rejectDataBox:[], |
| | | // 驳回请求 |
| | | rejectForm: { |
| | | procInstIds: '', |
| | | comment: '' |
| | | }, |
| | | modalType:0, |
| | | // data |
| | | daibanData: [], |
| | | // 待办 |
| | | todoParams: { |
| | | name: '', |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | title: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | }, |
| | | // 上拉加载更多 |
| | | timer: {}, |
| | | load: 0, |
| | | loadingText: '加载中...', |
| | | loadingType: 0, |
| | | contentText: { |
| | | contentDown: '上拉显示更多', |
| | | contentRefresh: '正在加载...', |
| | | contentNomore: '没有更多数据了' |
| | | } |
| | | }; |
| | | }, |
| | | onShow(){ |
| | | if(this.menuShow == true){ |
| | | this.$refs.menuRef.menuClick() |
| | | } |
| | | this.myApplication.pageNumber = 1; |
| | | this.init(); |
| | | }, |
| | | // 点击导航栏菜单后 |
| | | onNavigationBarButtonTap(e) { |
| | | // console.log(e); |
| | | this.$refs.menuRef.menuClick() |
| | | }, |
| | | components: { |
| | | combinationCard, |
| | | popupMenu |
| | | }, |
| | | // 上拉加载更多 |
| | | onReachBottom() { |
| | | if (this.timer != null) { |
| | | clearTimeout(this.timer); |
| | | } |
| | | this.timer = setTimeout(() => { |
| | | this.getMoreNews(); |
| | | }, 1000); |
| | | }, |
| | | // 下拉加载 |
| | | onPullDownRefresh() { |
| | | console.log('refresh'); |
| | | this.todoParams.pageNumber = 1; |
| | | this.loadingType = 0; |
| | | this.daibanData = []; |
| | | setTimeout(()=> { |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init(){ |
| | | // this.todoList(); |
| | | this.getMoreNews(); |
| | | }, |
| | | // 待办列表 |
| | | // todoList(){ |
| | | // this.$reqGet('todoList', this.todoParams).then(res => { |
| | | // if (res.code === 0) { |
| | | // this.daibanData = res.data.content; |
| | | // } |
| | | // }); |
| | | // }, |
| | | getMoreNews() { |
| | | if (this.loadingType !== 0) { |
| | | //loadingType!=0;直接返回 |
| | | return false; |
| | | } |
| | | this.loadingType = 1; |
| | | uni.showNavigationBarLoading(); //显示加载动画 |
| | | this.$reqGet('todoList', this.todoParams).then(res => { |
| | | // if (res.code === 0) { |
| | | // this.daibanData = res.data.content; |
| | | // } |
| | | this.todoParams.pageNumber++; // 得到数据之后 page+1 |
| | | if (res.data.content.length < 1) { |
| | | // 没有数据 |
| | | this.loadingType = 2; |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | uni.showToast({ |
| | | title: '没有更多数据了!', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if(this.todoParams.name||this.todoParams.startTime||this.todoParams.endTime||this.todoParams.title){ |
| | | this.daibanData = res.data.content |
| | | } else{ |
| | | this.daibanData = this.daibanData.concat(res.data.content); |
| | | } |
| | | //将数据拼接在一起 |
| | | this.loadingType = 0; // 将loadingType归0重置 |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | }); |
| | | }, |
| | | // 搜索点击 |
| | | searchButtonClick(){ |
| | | this.todoParams.pageNumber = 1; |
| | | this.init(); |
| | | }, |
| | | // 清空 |
| | | emptyButtonClick(){ |
| | | this.todoParams.name = ''; |
| | | this.todoParams.title = ''; |
| | | this.todoParams.startDate = ''; |
| | | this.todoParams.endDate = ''; |
| | | this.init(); |
| | | }, |
| | | menushow(e){ |
| | | this.menuShow = e; |
| | | }, |
| | | // 时间选择器 |
| | | startDateChange() { |
| | | // this.queryRealTimeShippingData.startDate = ''; |
| | | // this.$nextTick(() => { |
| | | // console.log(this.queryRealTimeShippingData); |
| | | // this.realTimeShipping(); |
| | | // }); |
| | | }, |
| | | endDateChange() { |
| | | // this.queryRealTimeShippingData.endDate = ''; |
| | | // this.$nextTick(() => { |
| | | // console.log(this.queryRealTimeShippingData); |
| | | // this.realTimeShipping(); |
| | | // }); |
| | | }, |
| | | // 搜索 |
| | | searchIconClick() { |
| | | console.log(1111, this.searchData); |
| | | }, |
| | | |
| | | // 状态 |
| | | statusConfirm(a) { |
| | | this.statusSeletShow = false; |
| | | console.log(a); |
| | | }, |
| | | // 复选框 |
| | | checkboxChange(n){ |
| | | console.log('checkbox',n); |
| | | }, |
| | | totalSelectChange(n){ |
| | | if(n[0] == 'tatalSelect'){ |
| | | this.daibanData.forEach(item=>{ |
| | | this.totalSelectValue.push(item.id+item.procInstId) |
| | | }) |
| | | this.checkBoxValue = this.totalSelectValue |
| | | } else { |
| | | this.checkBoxValue = [] |
| | | } |
| | | console.log('totalSelect',n); |
| | | }, |
| | | // 表单数据 |
| | | theFormDataClick() { |
| | | uni.navigateTo({ |
| | | url: '/pages/the-form-data/the-form-data' |
| | | }); |
| | | }, |
| | | // 审批历史 |
| | | approvalHistoryClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/approval-history/approval-history?index=${v}` |
| | | }); |
| | | }, |
| | | // 通过 |
| | | adopClick(v){ |
| | | this.adoptModalShow = true; |
| | | this.adoptForm.ids = v.id; |
| | | this.modalType = 0; |
| | | }, |
| | | batchAdoptClick(){ |
| | | if(this.checkBoxValue.length != 0){ |
| | | this.adoptModalShow = true; |
| | | } else { |
| | | this.$u.toast('未选择申请!') |
| | | } |
| | | }, |
| | | // 通过模态框 |
| | | adoptModalConfirm() { |
| | | this.adoptModalShow = false; |
| | | this.checkBoxValue.forEach(item=>{ |
| | | this.adoptDataBox.push(item.slice(0,6)) |
| | | }) |
| | | this.adoptForm.ids = this.adoptDataBox.toString(); |
| | | this.$reqPost('passAll', this.adoptForm, 'form').then(res => { |
| | | console.log('是否还原',this.adoptForm.ids,this.rejectForm.procInstIds); |
| | | if (res.code == 0) { |
| | | this.$u.toast('操作成功!'); |
| | | } else { |
| | | this.$u.toast('添加失败!!'); |
| | | } |
| | | this.init(); |
| | | }); |
| | | }, |
| | | adoptModalCancel() { |
| | | this.adoptModalShow = false; |
| | | }, |
| | | // 驳回模态框 |
| | | rejectModalConfirm() { |
| | | this.rejectModalShow = false; |
| | | this.checkBoxValue.forEach(item=>{ |
| | | this.rejectDataBox.push(item.slice(6,12)) |
| | | }) |
| | | this.rejectForm.procInstIds = this.rejectDataBox.toString(); |
| | | this.$reqPost('backAll', this.rejectForm, 'form').then(res => { |
| | | if (res.code == 0) { |
| | | this.$u.toast('操作成功!'); |
| | | } else { |
| | | this.$u.toast('操作失败!!!'); |
| | | } |
| | | this.init(); |
| | | }); |
| | | }, |
| | | rejectModalCancel() { |
| | | this.rejectModalShow = false; |
| | | }, |
| | | rejectClick(v) { |
| | | this.modalType = 1; |
| | | this.rejectModalShow = true; |
| | | this.rejectForm.procInstIds = v.procInstId; |
| | | }, |
| | | batchRejectClick(){ |
| | | if(this.checkBoxValue.length != 0){ |
| | | this.rejectModalShow = true; |
| | | |
| | | console.log(this.rejectDataBox); |
| | | } else{ |
| | | this.$u.toast('未选中申请!') |
| | | } |
| | | |
| | | } |
| | | } |
| | | data() { |
| | | return { |
| | | scrollTop: 0, |
| | | // 复选框 |
| | | checkBoxValue: [], |
| | | totalSelectValue: [], |
| | | // 通过模态框 |
| | | adoptModalShow: false, |
| | | adoptModalContent: '', |
| | | adoptDataBox: [], |
| | | // 通过请求 |
| | | adoptForm: { |
| | | ids: '', |
| | | comment: '' |
| | | }, |
| | | // 驳回模态框 |
| | | rejectModalShow: false, |
| | | rejectModalContent: '', |
| | | menuShow: false, |
| | | rejectDataBox: [], |
| | | // 驳回请求 |
| | | rejectForm: { |
| | | procInstIds: '', |
| | | comment: '' |
| | | }, |
| | | modalType: 0, |
| | | // data |
| | | daibanData: [], |
| | | // 待办 |
| | | todoParams: { |
| | | name: '', |
| | | pageNumber: 1, |
| | | pageSize: 10, |
| | | title: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | }, |
| | | // 上拉加载更多 |
| | | timer: {}, |
| | | load: 0, |
| | | loadingText: '加载中...', |
| | | loadingType: 0, |
| | | contentText: { |
| | | contentDown: '上拉显示更多', |
| | | contentRefresh: '正在加载...', |
| | | contentNomore: '没有更多数据了' |
| | | } |
| | | }; |
| | | }, |
| | | // 返回顶部 |
| | | onPageScroll(e) { |
| | | this.scrollTop = e.scrollTop; |
| | | }, |
| | | onShow() { |
| | | if (this.menuShow == true) { |
| | | this.$refs.menuRef.menuClick() |
| | | } |
| | | this.todoParams.pageNumber = 1; |
| | | this.init(); |
| | | }, |
| | | // 点击导航栏菜单后 |
| | | onNavigationBarButtonTap(e) { |
| | | // console.log(e); |
| | | this.$refs.menuRef.menuClick() |
| | | }, |
| | | components: { |
| | | combinationCard, |
| | | popupMenu |
| | | }, |
| | | // 上拉加载更多 |
| | | onReachBottom() { |
| | | if (this.timer != null) { |
| | | clearTimeout(this.timer); |
| | | } |
| | | this.timer = setTimeout(() => { |
| | | this.getMoreNews(); |
| | | }, 1000); |
| | | }, |
| | | // 下拉加载 |
| | | onPullDownRefresh() { |
| | | console.log('refresh'); |
| | | setTimeout(() => { |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | init() { |
| | | this.todoParams.pageNumber = 1; |
| | | this.loadingType = 0; |
| | | this.daibanData = []; |
| | | // this.todoList(); |
| | | this.getMoreNews(); |
| | | }, |
| | | // 待办列表 |
| | | // todoList(){ |
| | | // this.$reqGet('todoList', this.todoParams).then(res => { |
| | | // if (res.code === 0) { |
| | | // this.daibanData = res.data.content; |
| | | // } |
| | | // }); |
| | | // }, |
| | | getMoreNews() { |
| | | if (this.loadingType != 0) { |
| | | //loadingType!=0;直接返回 |
| | | return false; |
| | | } |
| | | uni.showLoading({ |
| | | title: "加载中..." |
| | | }) |
| | | this.loadingType = 1; |
| | | uni.showNavigationBarLoading(); //显示加载动画 |
| | | this.$reqGet('todoList', this.todoParams).then(res => { |
| | | uni.hideLoading(); |
| | | // if (res.code === 0) { |
| | | // this.daibanData = res.data.content; |
| | | // } |
| | | this.todoParams.pageNumber++; // 得到数据之后 page+1 |
| | | if (res.data.content.length < 1) { |
| | | // 没有数据 |
| | | this.loadingType = 2; |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | uni.showToast({ |
| | | title: '没有更多数据了!', |
| | | icon: 'error' |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | if (this.todoParams.name != '' || this.todoParams.startDate != '' || this.todoParams.endDate != '' || this.todoParams.title != '') { |
| | | if(this.todoParams.pageNumber == 1){ |
| | | this.daibanData = res.data.content; |
| | | }else{ |
| | | this.daibanData = this.daibanData.concat(res.data.content); |
| | | } |
| | | } else { |
| | | if(this.todoParams.pageNumber == 1){ |
| | | this.daibanData = []; |
| | | } |
| | | this.daibanData = this.daibanData.concat(res.data.content); |
| | | } |
| | | //将数据拼接在一起 |
| | | this.loadingType = 0; // 将loadingType归0重置 |
| | | uni.hideNavigationBarLoading(); // 关闭加载动画 |
| | | }); |
| | | }, |
| | | // 搜索点击 |
| | | searchButtonClick() { |
| | | this.loadingType == 0; |
| | | this.todoParams.pageNumber = 1; |
| | | this.init(); |
| | | }, |
| | | // 清空 |
| | | emptyButtonClick() { |
| | | this.loadingType == 0; |
| | | this.todoParams.pageNumber = 1; |
| | | this.todoParams.name = ''; |
| | | this.todoParams.title = ''; |
| | | this.todoParams.startDate = ''; |
| | | this.todoParams.endDate = ''; |
| | | this.init(); |
| | | }, |
| | | menushow(e) { |
| | | this.menuShow = e; |
| | | }, |
| | | // 时间选择器 |
| | | startDateChange() { |
| | | // this.queryRealTimeShippingData.startDate = ''; |
| | | // this.$nextTick(() => { |
| | | // console.log(this.queryRealTimeShippingData); |
| | | // this.realTimeShipping(); |
| | | // }); |
| | | }, |
| | | endDateChange() { |
| | | // this.queryRealTimeShippingData.endDate = ''; |
| | | // this.$nextTick(() => { |
| | | // console.log(this.queryRealTimeShippingData); |
| | | // this.realTimeShipping(); |
| | | // }); |
| | | }, |
| | | searchChange(e){ |
| | | console.log('e', e); |
| | | }, |
| | | searchClose(e){ |
| | | console.log('e', e); |
| | | }, |
| | | searchOpen(e){ |
| | | console.log('e', e); |
| | | }, |
| | | // 搜索 |
| | | searchIconClick() { |
| | | console.log(1111, this.searchData); |
| | | }, |
| | | |
| | | // 状态 |
| | | statusConfirm(a) { |
| | | this.statusSeletShow = false; |
| | | console.log(a); |
| | | }, |
| | | // 复选框 |
| | | checkboxChange(n) { |
| | | console.log('checkbox', n); |
| | | }, |
| | | totalSelectChange(n) { |
| | | if (n[0] == 'tatalSelect') { |
| | | this.daibanData.forEach(item => { |
| | | this.totalSelectValue.push(item.id + item.procInstId) |
| | | }) |
| | | this.checkBoxValue = this.totalSelectValue |
| | | } else { |
| | | this.checkBoxValue = [] |
| | | } |
| | | console.log('totalSelect', n); |
| | | }, |
| | | // 表单数据 |
| | | theFormDataClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/the-form-data/the-form-data?index=${v}` |
| | | }); |
| | | }, |
| | | // 审批历史 |
| | | approvalHistoryClick(v) { |
| | | uni.navigateTo({ |
| | | url: `/pages/approval-history/approval-history?index=${v}` |
| | | }); |
| | | }, |
| | | // 通过 |
| | | adopClick(v) { |
| | | this.adoptModalShow = true; |
| | | this.adoptForm.ids = v.id; |
| | | this.modalType = 0; |
| | | }, |
| | | batchAdoptClick() { |
| | | if (this.checkBoxValue.length != 0) { |
| | | this.adoptModalShow = true; |
| | | } else { |
| | | this.$u.toast('未选择申请!') |
| | | } |
| | | }, |
| | | // 通过模态框 |
| | | adoptModalConfirm() { |
| | | this.adoptModalShow = false; |
| | | this.checkBoxValue.forEach(item => { |
| | | this.adoptDataBox.push(item.slice(0, 6)) |
| | | }) |
| | | this.adoptForm.ids = this.adoptDataBox.toString(); |
| | | this.$reqPost('passAll', this.adoptForm, 'form').then(res => { |
| | | console.log('是否还原', this.adoptForm.ids, this.rejectForm.procInstIds); |
| | | if (res.code == 0) { |
| | | this.$u.toast('操作成功!'); |
| | | } else { |
| | | this.$u.toast('添加失败!!'); |
| | | } |
| | | this.init(); |
| | | }); |
| | | }, |
| | | adoptModalCancel() { |
| | | this.adoptModalShow = false; |
| | | }, |
| | | // 驳回模态框 |
| | | rejectModalConfirm() { |
| | | this.rejectModalShow = false; |
| | | this.checkBoxValue.forEach(item => { |
| | | this.rejectDataBox.push(item.slice(6, 12)) |
| | | }) |
| | | this.rejectForm.procInstIds = this.rejectDataBox.toString(); |
| | | this.$reqPost('backAll', this.rejectForm, 'form').then(res => { |
| | | if (res.code == 0) { |
| | | this.$u.toast('操作成功!'); |
| | | } else { |
| | | this.$u.toast('操作失败!!!'); |
| | | } |
| | | this.init(); |
| | | }); |
| | | }, |
| | | rejectModalCancel() { |
| | | this.rejectModalShow = false; |
| | | }, |
| | | rejectClick(v) { |
| | | this.modalType = 1; |
| | | this.rejectModalShow = true; |
| | | this.rejectForm.procInstIds = v.procInstId; |
| | | }, |
| | | batchRejectClick() { |
| | | if (this.checkBoxValue.length != 0) { |
| | | this.rejectModalShow = true; |
| | | |
| | | console.log(this.rejectDataBox); |
| | | } else { |
| | | this.$u.toast('未选中申请!') |
| | | } |
| | | |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep.my-todo { |
| | | // 搜索区域 |
| | | .searchContainer{ |
| | | .searchButton{ |
| | | width:91%; |
| | | margin: vww(16) auto; |
| | | display:flex; |
| | | .u-button{ |
| | | width:30%; |
| | | } |
| | | } |
| | | // 条件搜索 |
| | | .searchBox { |
| | | width: 91%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: vww(16) auto; |
| | | .search { |
| | | width: vww(160); |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: vww(4); |
| | | .u-search { |
| | | .u-search__content { |
| | | height: 38px; |
| | | background-color: #ffffff !important; |
| | | .u-search__content__icon { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | .u-search__content__input { |
| | | background-color: #ffffff !important; |
| | | .uni-input-placeholder{ |
| | | color:#CCCCCC!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // 下拉菜单 |
| | | .data-selet { |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: 4px; |
| | | width: vww(160); |
| | | // width: 100%; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 13px; |
| | | color: #CCCCCC; |
| | | .uni-select__icon { |
| | | display: flex; |
| | | align-content: center; |
| | | margin: 0 10px; |
| | | image { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | } |
| | | .content { |
| | | margin-left: vww(8); |
| | | width: vww(150); |
| | | } |
| | | } |
| | | } |
| | | // 时间搜索 |
| | | .timeContiner { |
| | | width: 91%; |
| | | margin: 0 auto vww(16); |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | .uni-date { |
| | | width: vww(160); |
| | | .uni-date-editor { |
| | | .uni-date-editor--x { |
| | | .uni-date-x { |
| | | .uni-date__x-input { |
| | | .uni-input-wrapper{ |
| | | .uni-input-placeholder{ |
| | | color:#CCCCCC; |
| | | font-size: vww(13); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .uni-date-x--border{ |
| | | border: 1px solid #d1d1d1!important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 搜索区域 |
| | | .searchContainer { |
| | | width:91%; |
| | | margin:vww(16) auto; |
| | | .u-collapse { |
| | | .u-collapse-item { |
| | | .u-collapse-item__content { |
| | | .searchButton { |
| | | width: 100%; |
| | | margin: 0 auto; |
| | | display: flex; |
| | | |
| | | |
| | | |
| | | .u-button { |
| | | width: 30%; |
| | | } |
| | | } |
| | | |
| | | // 卡片中间 |
| | | .center-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | .center-content__one { |
| | | display: flex; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__two { |
| | | display: flex; |
| | | // margin: vww(10) 0; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__three { |
| | | display: flex; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | .center-content__four { |
| | | } |
| | | } |
| | | // 中间部分样式 |
| | | .center-margin { |
| | | margin-bottom: vww(16); |
| | | } |
| | | // 条件搜索 |
| | | .searchBox { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 0 auto vww(16); |
| | | |
| | | // 卡片底部 |
| | | .bottom-container { |
| | | .bottom-content__item { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | view { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-content: center; |
| | | margin-right: vww(10); |
| | | &:nth-last-child() { |
| | | margin-right: 0; |
| | | } |
| | | view { |
| | | display: inline-block; |
| | | } |
| | | image { |
| | | width: vww(16); |
| | | height: vww(16); |
| | | margin-right: vww(4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .search { |
| | | width: vww(150); |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: vww(4); |
| | | |
| | | // 底部 |
| | | .bottomTabbar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | width: 100%; |
| | | height: vww(48); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | background-color: #f5f5f5; |
| | | .bottomTabbar_checkBox { |
| | | margin-left: vww(16); |
| | | .u-checkbox-group { |
| | | .u-checkbox { |
| | | } |
| | | } |
| | | } |
| | | .bottomTabbar_button { |
| | | display: flex; |
| | | .u-button { |
| | | font-size: 13px; |
| | | margin-right: vww(14); |
| | | width: vww(90); |
| | | height: vww(32); |
| | | } |
| | | } |
| | | } |
| | | .u-search { |
| | | .u-search__content { |
| | | height: 38px; |
| | | background-color: #ffffff !important; |
| | | |
| | | // 通过模态框 |
| | | .adoptModal { |
| | | // width:100%; |
| | | // height:vww(244); |
| | | .slot-content { |
| | | .rejectMesaage { |
| | | display: flex; |
| | | padding: vww(3); |
| | | border: 1px solid #0307ff; |
| | | border-radius: vww(4); |
| | | font-size: 13px; |
| | | text { |
| | | margin-left: vww(5); |
| | | } |
| | | } |
| | | .u-textarea { |
| | | margin-top:vww(10); |
| | | width: vww(280); |
| | | height: vww(90) !important; |
| | | .uni-textarea-wrapper { |
| | | height: vww(90) !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .u-search__content__icon { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | |
| | | // 驳回模态框 |
| | | .rejectModal { |
| | | .slot-content { |
| | | display: inline-block; |
| | | .rejectMesaage { |
| | | display: flex; |
| | | padding: vww(3); |
| | | border: 1px solid #0307ff; |
| | | border-radius: vww(4); |
| | | font-size: 13px; |
| | | text { |
| | | margin-left: vww(5); |
| | | } |
| | | } |
| | | .u-textarea { |
| | | margin-top:vww(10); |
| | | width: vww(280); |
| | | height: vww(90) !important; |
| | | .uni-textarea-wrapper { |
| | | height: vww(90) !important; |
| | | } |
| | | } |
| | | |
| | | .rejectBack { |
| | | margin-top:vww(24); |
| | | .rejectBack-title { |
| | | font-size: vww(13); |
| | | } |
| | | // 下拉菜单 |
| | | .data-selet { |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: 4px; |
| | | width: vww(300); |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 13px; |
| | | color: #666; |
| | | margin-top:vww(8); |
| | | .uni-select__icon { |
| | | display: flex; |
| | | align-content: center; |
| | | margin: 0 10px; |
| | | image { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | } |
| | | .content { |
| | | margin-left: vww(8); |
| | | width: vww(280); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | .u-search__content__close { |
| | | width: 16px !important; |
| | | height: 16px !important; |
| | | background-color: #cccccc !important; |
| | | |
| | | .u-icon { |
| | | .u-icon__icon { |
| | | font-size: 10px !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .u-search__content__input { |
| | | background-color: #ffffff !important; |
| | | |
| | | .uni-input-placeholder { |
| | | color: #CCCCCC !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 下拉菜单 |
| | | .data-selet { |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: 4px; |
| | | width: vww(150); |
| | | // width: 100%; |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 13px; |
| | | color: #CCCCCC; |
| | | |
| | | .uni-select__icon { |
| | | display: flex; |
| | | align-content: center; |
| | | margin: 0 10px; |
| | | |
| | | image { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | } |
| | | |
| | | .content { |
| | | margin-left: vww(8); |
| | | width: vww(150); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 时间搜索 |
| | | .timeContiner { |
| | | width: 100%; |
| | | margin: 0 auto vww(16); |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | |
| | | .uni-date { |
| | | width: vww(150); |
| | | |
| | | .uni-date-editor { |
| | | .uni-date-editor--x { |
| | | .uni-date-x { |
| | | .uni-date__x-input { |
| | | .uni-input-wrapper { |
| | | .uni-input-placeholder { |
| | | color: #CCCCCC; |
| | | font-size: vww(13); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .uni-date-x--border { |
| | | border: 1px solid #d1d1d1 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | // 卡片中间 |
| | | .center-container { |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .center-content__one { |
| | | display: flex; |
| | | |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__two { |
| | | display: flex; |
| | | // margin: vww(10) 0; |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__three { |
| | | display: flex; |
| | | |
| | | view { |
| | | width: 50%; |
| | | } |
| | | } |
| | | |
| | | .center-content__four { |
| | | } |
| | | } |
| | | |
| | | // 中间部分样式 |
| | | .center-margin { |
| | | margin-bottom: vww(16); |
| | | } |
| | | |
| | | // 卡片底部 |
| | | .bottom-container { |
| | | .bottom-content__item { |
| | | display: flex; |
| | | justify-content: space-around; |
| | | |
| | | view { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-content: center; |
| | | margin-right: vww(10); |
| | | |
| | | &:nth-last-child(1) { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | view { |
| | | display: inline-block; |
| | | } |
| | | |
| | | image { |
| | | width: vww(16); |
| | | height: vww(16); |
| | | margin-right: vww(4); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 底部 |
| | | .bottomTabbar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | width: 100%; |
| | | height: vww(48); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | background-color: #f5f5f5; |
| | | |
| | | .bottomTabbar_checkBox { |
| | | margin-left: vww(16); |
| | | |
| | | .u-checkbox-group { |
| | | .u-checkbox { |
| | | } |
| | | } |
| | | } |
| | | |
| | | .bottomTabbar_button { |
| | | display: flex; |
| | | |
| | | .u-button { |
| | | font-size: 13px; |
| | | margin-right: vww(14); |
| | | width: vww(90); |
| | | height: vww(32); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 通过模态框 |
| | | .adoptModal { |
| | | // width:100%; |
| | | // height:vww(244); |
| | | .slot-content { |
| | | .rejectMesaage { |
| | | display: flex; |
| | | padding: vww(3); |
| | | border: 1px solid #0307ff; |
| | | border-radius: vww(4); |
| | | font-size: 13px; |
| | | |
| | | text { |
| | | margin-left: vww(5); |
| | | } |
| | | } |
| | | |
| | | .u-textarea { |
| | | margin-top: vww(10); |
| | | width: vww(280); |
| | | height: vww(90) !important; |
| | | |
| | | .uni-textarea-wrapper { |
| | | height: vww(90) !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 驳回模态框 |
| | | .rejectModal { |
| | | .slot-content { |
| | | display: inline-block; |
| | | |
| | | .rejectMesaage { |
| | | display: flex; |
| | | padding: vww(3); |
| | | border: 1px solid #0307ff; |
| | | border-radius: vww(4); |
| | | font-size: 13px; |
| | | |
| | | text { |
| | | margin-left: vww(5); |
| | | } |
| | | } |
| | | |
| | | .u-textarea { |
| | | margin-top: vww(10); |
| | | width: vww(280); |
| | | height: vww(90) !important; |
| | | |
| | | .uni-textarea-wrapper { |
| | | height: vww(90) !important; |
| | | } |
| | | } |
| | | |
| | | .rejectBack { |
| | | margin-top: vww(24); |
| | | |
| | | .rejectBack-title { |
| | | font-size: vww(13); |
| | | } |
| | | |
| | | // 下拉菜单 |
| | | .data-selet { |
| | | border: 1px solid #d1d1d1; |
| | | border-radius: 4px; |
| | | width: vww(300); |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 13px; |
| | | color: #666; |
| | | margin-top: vww(8); |
| | | |
| | | .uni-select__icon { |
| | | display: flex; |
| | | align-content: center; |
| | | margin: 0 10px; |
| | | |
| | | image { |
| | | width: 10px; |
| | | height: 5.5px; |
| | | } |
| | | } |
| | | |
| | | .content { |
| | | margin-left: vww(8); |
| | | width: vww(280); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </style> |
| | |
| | | <u-form-item label="抑尘费" labelWidth="18%" borderBottom ref="item1"><u--input v-model="addContractFormdata.cost2" border="none"></u--input></u-form-item> --> |
| | | </u--form> |
| | | |
| | | <view class="addContractConfirm"><u-button text="添加" type="primary" @click="addContractSanConfirm"></u-button></view> |
| | | <view class="addContractConfirm"><u-button :text="editApplicationIndex != null ? '添加修改':'添加'" type="primary" @click="addContractSanConfirm"></u-button></view> |
| | | </view> |
| | | |
| | | <!-- 选择煤厂 --> |
| | |
| | | <view class="balanceNo" v-if="accountDetails.balanceTotal < 0"><text style="color:red;">客户账户当前处于欠款状态</text></view> |
| | | |
| | | <view class="messageCustomerBalance" v-if="accountDetails.balanceTotal >= 0"> |
| | | <text style="color: #FFA500;;">客户账户现汇余额:{{ accountDetails.balanceTotal }},承兑余额:{{ accountDetails.balance2 == null ? 0 : customerChengdui }}</text> |
| | | <text style="color: #FFA500;;">客户账户现汇余额:{{ accountDetails.balanceTotal == null ? 0 :accountDetails.balanceTotal.toFixed(2) }},承兑余额:{{ accountDetails.balance2 == null ? 0 : customerChengdui }}</text> |
| | | </view> |
| | | <u-swipe-action> |
| | | <u-swipe-action-item @click="deleteContractCardClick" :options="options1" v-for="(item, index) in newFormData.contractOrders" :key="index"> |
| | | <view class="cardList"> |
| | | <view class="" class="cardListIcon"><u-icon name="edit-pen" color="#2979ff" size="35"></u-icon></view> |
| | | <view class="cardListIcon" @click="editApplicationClick(index)"><u-icon name="edit-pen" color="#2979ff" size="35"></u-icon></view> |
| | | <view class="cardList-container"> |
| | | <view class="cardList_item"> |
| | | 收货人: |
| | |
| | | loading: false, |
| | | // 价格请求参数 |
| | | getNewPriceData: { |
| | | compId: 133, |
| | | compName: '邢台矿', |
| | | customerAddressName: '邢台国泰发电有限责任公司', |
| | | customerAddressId: 236, |
| | | coalId: 45, |
| | | coalName: '', |
| | | trainType: 1, |
| | | fromStation: '小康庄', |
| | | toStation: '小康庄', |
| | | quant: '', |
| | | price: '', |
| | | amount: '', |
| | | priceMode: null, |
| | | filedName: '邢台矿主煤场', |
| | | filedId: 4, |
| | | type: '', |
| | | cost1: '', |
| | | cost2: '', |
| | | edit: true |
| | | // compId: 133, |
| | | // compName: '邢台矿', |
| | | // customerAddressName: '邢台国泰发电有限责任公司', |
| | | // customerAddressId: 236, |
| | | // coalId: 45, |
| | | // coalName: '', |
| | | // trainType: 1, |
| | | // fromStation: '小康庄', |
| | | // toStation: '小康庄', |
| | | // quant: '', |
| | | // price: '', |
| | | // amount: '', |
| | | // priceMode: null, |
| | | // filedName: '邢台矿主煤场', |
| | | // filedId: 4, |
| | | // type: '', |
| | | // cost1: '', |
| | | // cost2: '', |
| | | // edit: true |
| | | }, |
| | | dust: null, // 抑尘费 |
| | | trainfreight: {}, //路运运费 |
| | |
| | | { |
| | | text: '删除' |
| | | } |
| | | ] |
| | | ], |
| | | editApplicationIndex:null |
| | | }; |
| | | }, |
| | | onShow() { |
| | |
| | | // 添加合同弹出框 |
| | | addContractClose() { |
| | | this.addContractShow = false; |
| | | this.addContractFormdata = {}; |
| | | this.editApplicationIndex = null; |
| | | }, |
| | | addContractOpen() { |
| | | console.log('添加订单打开'); |
| | |
| | | }, |
| | | // 选择的煤厂 |
| | | coalFiledSelectClick(e) { |
| | | console.log('选择的煤厂',e); |
| | | this.addContractFormdata.compName = e.compName; |
| | | this.addContractFormdata.filedName = e.name; |
| | | this.addContractFormdata.compId = e.compId; |
| | |
| | | |
| | | this.selectCoalFiledData = e; |
| | | |
| | | this.coalFiledSelectShow = false; |
| | | // 获取价格参数 |
| | | this.getNewPriceData.compId = e.compId; |
| | | this.getNewPriceData.compName = e.compName; |
| | | this.getNewPriceData.filedId = e.id; |
| | | this.getNewPriceData.filedName = e.name; |
| | | |
| | | |
| | | this.coalFiledSelectShow = false; |
| | | }, |
| | | // 收货人 |
| | | addContractConsigneeClose() { |
| | |
| | | // this.currentCoal.type = 1; |
| | | // } |
| | | this.addContractFormdata.modifyId = data.modifyId; |
| | | this.addContractFormdata.id = data.id; |
| | | // this.addContractFormdata.id = data.id; |
| | | } else { |
| | | uni.$u.toast('煤种价格未设置'); |
| | | } |
| | |
| | | }, |
| | | addContractSanConfirm() { |
| | | if (this.addContractFormdata.compId && this.addContractFormdata.customerId && this.addContractFormdata.filedId) { |
| | | this.newFormData.contractOrders.push(this.addContractFormdata); |
| | | console.log('添加子订单',this.addContractFormdata); |
| | | this.$nextTick(() => { |
| | | this.addContractShow = false; |
| | | }); |
| | | if(this.editApplicationIndex != null){ |
| | | this.newFormData.contractOrders[this.editApplicationIndex] = this.addContractFormdata; |
| | | } else { |
| | | this.newFormData.contractOrders.push(this.addContractFormdata); |
| | | console.log('添加子订单',this.addContractFormdata); |
| | | } |
| | | this.addContractShow = false;// 关闭弹出框 |
| | | console.log('this.newFormData.contractOrders当前关闭后',this.newFormData.contractOrders) |
| | | } else { |
| | | uni.$u.toast('请规范输入所有信息'); |
| | | } |
| | |
| | | console.log('删除订单卡片', e); |
| | | this.newFormData.contractOrders.splice(e, 1); |
| | | }, |
| | | editApplicationClick(index){ |
| | | this.editApplicationIndex = index; |
| | | this.addContractFormdata = this.newFormData.contractOrders[index]; |
| | | this.addContractShow = true; |
| | | }, |
| | | xswaybill() { |
| | | console.log('新建发运申请', this.newFormData); |
| | | uni.showLoading({ |
| | |
| | | uni.hideLoading(); |
| | | console.log('新建发运申请', res); |
| | | if (res.code == 0) { |
| | | uni.showToast({ |
| | | title: '添加成功!', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }); |
| | | this.$nextTick(() => { |
| | | uni.navigateBack({ |
| | | // url: '/pages/my-application/my-application' |
| | | delta: 2 |
| | | }); |
| | | }); |
| | | // uni.showToast({ |
| | | // title: '添加成功!', |
| | | // icon: 'success', |
| | | // duration: 1000 |
| | | // }); |
| | | this.$u.toast('添加成功,即将返回申请页!!!') |
| | | setTimeout(() => { |
| | | uni.navigateBack({ |
| | | // url: '/pages/my-application/my-application' |
| | | delta: 2 |
| | | }); |
| | | },2000) |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | /* src: url('iconfont.woff2?t=1655880761622') format('woff2'), |
| | | url('iconfont.woff?t=1655880761622') format('woff'), |
| | | url('iconfont.ttf?t=1655880761622') format('truetype'); */ |
| | | src:url('/static/iconfont.ttf')format('truetype'); |
| | | src:url('@/static/iconfont/iconfont.ttf')format('truetype'); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | // 请求拦截 |
| | | const fetch = (url, opt ,urlParam) => { |
| | | let baseUrl = 'http://192.168.3.159:9999'; |
| | | let urls = (api[opt.url]?.url || api[url]?.url || jihua[opt.url]?.url || jihua[url]?.url); |
| | | let params = opt.params ? ('?' + Object.keys(opt.params).map(key => key + '=' + opt.params[key]).join('&')) : |
| | | ''; |
| | | opt.url = urlParam ? urls + `/${urlParam}` + params : urls + params |
| | | opt.url = urlParam ? baseUrl + urls + `/${urlParam}` + params : baseUrl + urls + params |
| | | opt.method = opt.method || "GET"; |
| | | var header = {} |
| | | if (uni.getStorageSync('access_token')) { |
| | | header = { |
| | | "TENANT-ID": 5, |
| | | Authorization: 'Bearer ' + uni.getStorageSync('access_token'), |
| | | VERSION: "zzl" |
| | | VERSION: "zzl", |
| | | Accept:'application/json, text/plain, */*' // 客户端所能接受的数据类型 |
| | | } |
| | | } |
| | | |
| | | |
| | | opt.header = { |
| | | ...opt.header, |
| | | ...header |