From fbd20431d9947d6989f6508ae47ccaad96576d68 Mon Sep 17 00:00:00 2001 From: 819527061@qq.com <123456> Date: 星期一, 05 二月 2024 09:02:16 +0800 Subject: [PATCH] 解决审批历史页面报错问题 --- pages/my-todo/my-todo.vue | 1316 +++++++++++++++++++++++++++++++++++++--------------------- 1 files changed, 834 insertions(+), 482 deletions(-) diff --git a/pages/my-todo/my-todo.vue b/pages/my-todo/my-todo.vue index 43945ee..6f42c1c 100644 --- a/pages/my-todo/my-todo.vue +++ b/pages/my-todo/my-todo.vue @@ -1,514 +1,866 @@ <template> - <!-- 鎴戠殑寰呭姙 --> - <view class="my-todo"> - <!-- 鎼滅储鍖哄煙 --> - <view class="searchBox"> - <view class="search"> - <u-search @clickIcon="searchIconClick" :clearabled="false" :showAction="false" placeholder="璇疯緭鍏ユ爣棰�" v-model="searchData" 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="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)" v-if="item.actBusiness.actType == 'Offsetting' || item.actBusiness.actType == 'XsWaybill'"> + <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)"> + <image src="@/static/home/history.png" mode=""></image> + <view>鍘嗗彶</view> + </view> + </view> + </view> + </template> + </combination-card> + </u-checkbox-group> </view> - <!-- 鏃堕棿鎼滅储鍖哄煙 --> - <view class="timeContiner"> - <uni-datetime-picker class="time-picker" type="date" :clear-icon="false" v-model="createTime" @change="startDateChange" placeholder="寮�濮嬫椂闂�" /> - <uni-datetime-picker class="time-picker" type="date" :clear-icon="false" v-model="endTime" @change="endDateChange" placeholder="缁撴潫鏃堕棿" /> - </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> - <!-- 鎴戠殑寰呭姙鍗$墖鍖哄煙 --> - <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"></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="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="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="adoptModalShow = true"> - <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"> - <image src="@/static/home/history.png" mode=""></image> - <view>鍘嗗彶</view> - </view> - </view> - </view> - </template> - </combination-card> - </u-checkbox-group> + <!-- 椹冲洖妯℃�佹 --> + <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="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="rejectModalShow = true"></u-button> - <u-button type="primary" text="鎵归噺閫氳繃" @click="adoptModalShow = true"></u-button> - </view> - </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> + <!-- 鎵归噺閫氳繃妯℃�佹 --> + <!-- <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="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"> - <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-picker @cancel="statusSeletShow = false" @confirm="statusConfirm" :show="statusSeletShow" :columns="statusList"></u-picker> - - <!-- 鑿滃崟鏍� --> - <popup-menu @menuShow="menushow" ref="menuRef"></popup-menu> - </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 { - // 鏉′欢鎼滅储 - searchData: '', - dataSeletText: '璇烽�夋嫨鐘舵��', - // 鏃堕棿閫夋嫨 - createTime: '', - endTime: '', - // 閫夋嫨鍣� - statusSeletShow: false, - statusList: [['涓浗', '缇庡浗', '鏃ユ湰']], - // 澶嶉�夋 - checkBoxValue:[], - totalSelectValue:[], - // 閫氳繃妯℃�佹 - adoptModalShow: false, - adoptModalContent: '', - // 椹冲洖妯℃�佹 - rejectModalShow: false, - rejectModalContent: '', - menuShow:false, - // data - daibanData: [], - // 寰呭姙 - todoParams: { - pageNumber: 1, - pageSize: 10 - }, - }; - }, - 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.todoList(); - }, - // 寰呭姙鍒楄〃 - todoList(){ - this.$reqGet('todoList', this.todoParams).then(res => { - if (res.code === 0) { - this.daibanData = res.data.content; - } - }); - }, - 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) + 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); + } + console.log(this.daibanData,'this.daibanData====寰呭姙-------00000----') + //灏嗘暟鎹嫾鎺ュ湪涓�璧� + 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(item) { + if(item?.actBusiness?.actType == 'Offsetting') { //鏀舵 actType = 鈥極ffsetting鈥� + uni.navigateTo({ + url: `/pages/payment-form-data/payment-form-data?id=${item.tableId}`, + + }) + }else if(item?.actBusiness?.actType == 'XsWaybill') { + uni.navigateTo({ + url: `/pages/new-application-form-data/new-application-form-data?id=${item.tableId}` + }) + } + }, + // 瀹℃壒鍘嗗彶 + approvalHistoryClick(v) { + console.log(v,'鍘嗗彶瀹℃壒====----') + uni.navigateTo({ + url: `/pages/approval-history/approval-history?index=${v?.procInstId}` + }); + }, + // 閫氳繃 + 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); + 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; }, - // 琛ㄥ崟鏁版嵁 - theFormDataClick() { - uni.navigateTo({ - url: '/pages/the-form-data/the-form-data' - }); - }, - // 瀹℃壒鍘嗗彶 - approvalHistoryClick() { - uni.navigateTo({ - url: '/pages/approval-history/approval-history' - }); - }, - // 閫氳繃妯℃�佹 - adoptModalConfirm() { - this.adoptModalShow = false; - }, - adoptModalCancel() { - this.adoptModalShow = false; - }, - // 椹冲洖妯℃�佹 - rejectModalConfirm() { - this.rejectModalShow = false; - }, - rejectModalCancel() { - this.rejectModalShow = false; - } - } + // 椹冲洖妯℃�佹 + 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 { - // 鎼滅储鍖哄煙 - .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); - } + // 鎼滅储鍖哄煙 + .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%; + } + } + + // 鏉′欢鎼滅储 + .searchBox { + width: 100%; + display: flex; + justify-content: space-between; + margin: 0 auto vww(16); + + .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; } } - // 鏃堕棿鎼滅储 - .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; - } - } - } - } + // 鍗$墖涓棿 + .center-container { + display: flex; + flex-direction: column; - // 鍗$墖涓棿 - .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); - } + .center-content__one { + display: flex; - // 鍗$墖搴曢儴 - .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); - } - } - } - } + view { + width: 50%; + } + } - // 搴曢儴 - .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-content__two { + display: flex; + // margin: vww(10) 0; + view { + width: 50%; + } + } - // 閫氳繃妯℃�佹 - .adoptModal { - // width:100%; - // height:vww(244); - .slot-content { - .u-textarea { - width: vww(280); - height: vww(90) !important; - .uni-textarea-wrapper { - height: vww(90) !important; - } - } - } - } + .center-content__three { + display: flex; - // 椹冲洖妯℃�佹 - .rejectModal { - .slot-content { - display: inline-block; - .u-textarea { - 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__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