From 49e3612d8f4f0dbd3ce261b17f20ad59da59db55 Mon Sep 17 00:00:00 2001 From: 付延余 <f-yanyu@outlook.com> Date: 星期四, 22 十二月 2022 14:18:58 +0800 Subject: [PATCH] 日发运计划接口同步后台更新。数字键盘动作更新。主页、申请页列表功能按钮更新(撤回,编辑,删除)。完善页面细节 --- pages/my-todo/my-todo.vue | 1496 ++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 824 insertions(+), 672 deletions(-) diff --git a/pages/my-todo/my-todo.vue b/pages/my-todo/my-todo.vue index eb4bd8d..c58cdf1 100644 --- a/pages/my-todo/my-todo.vue +++ b/pages/my-todo/my-todo.vue @@ -1,705 +1,857 @@ <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 class="my-todo"> + <!-- 鎼滅储鍖哄煙 --> + + <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="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> + </u-collapse-item> + </u-collapse> + </view> + + + <!-- 鎴戠殑寰呭姙鍗$墖鍖哄煙 --> + <view class="cardCheckGroup"> + <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> + <view class="daibanTop"> + <u-checkbox size="30" iconSize="18" :key="item.id" :name="item.id+item.procInstId"></u-checkbox> + <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.processName == '鍙戣繍閫氱煡鍗�'"> + <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="rejectClick(item)"> + <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> - <!-- 鎴戠殑寰呭姙鍗$墖鍖哄煙 --> - <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="bottomTabbar"> + <view class="bottomTabbar_checkBox"> + <u-checkbox-group size="35" iconSize="18" 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="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="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="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="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="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"> + <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="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> + <!-- 鎵归噺閫氳繃妯℃�佹 --> + <!-- <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> --> + + <!--杩斿洖椤堕儴--> + <view class="back-top-container"> + <u-back-top :scroll-top="scrollTop"></u-back-top> + </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 { callWithErrorHandling } from "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: '姝e湪鍔犺浇...', - 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; // 灏唋oadingType褰�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) + 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: '姝e湪鍔犺浇...', + 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; // 灏唋oadingType褰�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) { + console.log('閫氳繃',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; + if(this.checkBoxValue.length >= 1){ + this.checkBoxValue.forEach(item => { + this.adoptDataBox.push(item.slice(0, 6)) }) - this.checkBoxValue = this.totalSelectValue - } else { - this.checkBoxValue = [] + this.adoptForm.ids = this.adoptDataBox.toString(); } - 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; - }, + this.$reqPost('passAll', this.adoptForm).then(res => { + console.log('鏄惁杩樺師', this.adoptForm.ids, this.rejectForm.procInstIds); + if (res.code == 0) { + this.$u.toast('鎿嶄綔鎴愬姛!'); + } else { + this.$u.toast('娣诲姞澶辫触!!'); + } + // 鍒濆鍖� + this.checkBoxValue = [] + this.adoptForm.ids = ''; + this.adoptForm.comment = ''; + this.init(); + }); + }, + adoptModalCancel() { + this.adoptModalShow = false; + }, + // 椹冲洖鐐瑰嚮 rejectClick(v) { - this.modalType = 1; - this.rejectModalShow = true; - this.rejectForm.procInstIds = v.procInstId; + 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('鏈�変腑鐢宠锛�') + // 椹冲洖妯℃�佹 + rejectModalConfirm() { + this.rejectModalShow = false; + if(this.checkBoxValue.length >= 1){ + this.checkBoxValue.forEach(item => { + this.rejectDataBox.push(item.slice(6, 12)) + }) + this.rejectForm.procInstIds = this.rejectDataBox.toString(); } - - } - } + this.$reqPost('backAll', this.rejectForm).then(res => { + if (res.code == 0) { + this.$u.toast('鎿嶄綔鎴愬姛锛�'); + } else { + this.$u.toast('鎿嶄綔澶辫触锛侊紒锛�'); + } + // 鍒濆鍖� + this.rejectForm.procInstIds = ''; + this.rejectForm.comment = ''; + this.checkBoxValue = [] + this.init(); + }); + }, + rejectModalCancel() { + this.rejectModalShow = false; + }, + + 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:94%; + 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(158); + 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__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(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(160); + } + } + } + + // 鏃堕棿鎼滅储 + .timeContiner { + width: 100%; + 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; + } + } + } + } + } + } + } + + + } + + // 鍗$墖澶撮儴 + .cardCheckGroup{ + margin-bottom: vww(48); + } + .daibanTop{ + .u-checkbox{ + display:inline-block; } } - // 搴曢儴 - .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); - } - } - } + // 鍗$墖涓棿 + .center-container { + display: flex; + flex-direction: column; - // 閫氳繃妯℃�佹 - .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; - } - } - } - } + .center-content__one { + display: flex; - // 椹冲洖妯℃�佹 - .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); - } - } - } - } - } - - + 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); + } + } + } + } + + // 杩斿洖椤堕儴 + .back-top-container{ + .u-transition{ + position:fixed; + bottom:vww(80)!important; + right:vww(20)!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); + } + } + } + + // 閫氳繃妯℃�佹 + .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; + + .u-textarea__field { + 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; + + .u-textarea__field { + 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> -- Gitblit v1.9.1