From 2d43a1df3f5ba42710e6d21c27d1e13bdb8dfd56 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期一, 24 三月 2025 09:23:08 +0800 Subject: [PATCH] - --- src/pages/reimbursement/examine.vue | 206 +++++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 166 insertions(+), 40 deletions(-) diff --git a/src/pages/reimbursement/examine.vue b/src/pages/reimbursement/examine.vue index ffcfdd6..fd2e094 100644 --- a/src/pages/reimbursement/examine.vue +++ b/src/pages/reimbursement/examine.vue @@ -4,52 +4,125 @@ <up-sticky bgColor="#fff"> <view class="coreshop-ff content c-p-10"> <up-search placeholder="璇风偣鍑婚�夋嫨鏃ユ湡" @clear='clear' @click='clickTime' disabled @custom='init' - v-model="workTime" search-icon="calendar" @search='init'></up-search> + v-model="workTime" search-icon="calendar" @search='init' :show-action="false"></up-search> </view> - <!-- <view class="coreshop-ff content c-p-10"> - <up-search placeholder="璇疯緭鍏ュ伐浜哄悕瀛�" v-model="workerUserName" @custom='init' @clear='init' - @search='init'></up-search> --> - <!-- <up-search placeholder="璇风偣鍑婚�夋嫨鎵撳崱鏃ユ湡" @click='clickIcon' @clear='PostMyComDakaListPage' disabled + <view class="coreshop-ff content c-p-10 chuany-flex chuany-justify-between" + v-if="role !== 'zhuGuan'&&approvalStatus=='unApproval'"> + <view class="chuany-width75"> + <up-search placeholder="璇疯緭鍏ュ伐浜哄悕瀛�" v-model="workerUserName" @custom='init' @clear='init' + @search='init'></up-search> + </view> + + <!-- <up-search placeholder="璇风偣鍑婚�夋嫨鎵撳崱鏃ユ湡" @click='clickIcon' @clear='PostMyComDakaListPage' disabled v-model="wordDate" search-icon="calendar" @search='PostMyComDakaListPage' @custom='PostMyComDakaListPage'></up-search> --> - <!-- </view> --> + <up-text align="center" type='success' text='鎵瑰噯' size='14' @click="arrange('Yes')"></up-text> + <up-text align="center" type="error" text='涓嶆壒鍑�' size='14' @click="arrange('No')"></up-text> + </view> + <view class="coreshop-ff content c-p-10 chuany-flex chuany-justify-between" v-else> + <up-search placeholder="璇疯緭鍏ュ伐浜哄悕瀛�" v-model="workerUserName" @custom='init' @clear='init' + @search='init'></up-search> + + <!-- <up-search placeholder="璇风偣鍑婚�夋嫨鎵撳崱鏃ユ湡" @click='clickIcon' @clear='PostMyComDakaListPage' disabled + v-model="wordDate" search-icon="calendar" @search='PostMyComDakaListPage' + @custom='PostMyComDakaListPage'></up-search> --> + + </view> <!-- <up-subsection :list="list" :current="current4" activeColor="#f9ae3d" @change="sectionChange"></up-subsection> --> <up-subsection :list="list" current='1' activeColor="#f9ae3d" @change="sectionChange"></up-subsection> </up-sticky> <view class="full-page-content c-p-b-100"> <view class="c-p-l-20 c-p-r-20" v-if="listO.orderList&&listO.orderList.length>0"> - <view class="listrecord c-p-t-20" v-for="(item,index) in listO.orderList" :key="item.id" + <u-checkbox-group v-model="checkboxValue1" placement="column" @change="checkboxChange" + v-if='role !== "zhuGuan"&&approvalStatus=="unApproval"'> + <view class="listrecord c-p-t-20" v-for="(item,index) in listO.orderList" :key="item.keyid" + @click="pageToDetail(item)"> + <view class="coreshop-ff chuany-bradius20 chuany-flex"> + <view class="c-p-14"> + <u-checkbox :name="item.keyid" v-if='role !== "zhuGuan"'> + </u-checkbox> + </view> + <view class="chuany-width100"> + <view class="c-p-t-20 c-p-b-20 c-p-r-20 chuany-font28"> + <view class="chuany-flex chuany-justify-between"> + <text class="chuany-width6">{{index+1}}</text> + <view class="chuany-width30"> + {{item.planPeople}} + </view> + <view class="chuany-width50"> + {{item.depart.name}} + </view> + <view class="chuany-width24"> + <up-text align="right" size='14' + :type="item.approvalStatus=='unApproval'?'primary':item.approvalStatus=='Yes'?'success':'warning'" + :text="item.approvalStatus=='unApproval'?'鏈鎵�':item.approvalStatus=='Yes'?'鎵瑰噯':'涓嶆壒鍑�'"> + </up-text> + </view> + </view> + <view class="text-69 chuany-flex chuany-justify-between"> + <!-- <view class="c-p-t-8 chuany-width24"> + 璐圭敤鎶ラ攢 + </view> --> + <text class="chuany-width6" style="color: white;">{{index+1}}</text> + <view class="c-p-t-8 chuany-width30"> + {{$util.formatDate(item.planStartTime)}} + </view> + <view class="c-p-t-6 chuany-width50"> + <up-text color="#696969" :lines="1" :text="item.planContent"></up-text> + </view> + <view class="c-p-t-8 chuany-width24 chuany-text-right"> + {{item.planMoney}} 鍏� + </view> + </view> + + <!-- <view class="c-p-t-8"> + <up-text :lines="1" :text="item.planContent"></up-text> + </view> --> + </view> + </view> + </view> + </view> + </u-checkbox-group> + <view v-else class="listrecord c-p-t-20" v-for="(item,index) in listO.orderList" :key="item.keyid" @click="pageToDetail(item)"> - <view class="coreshop-ff chuany-bradius20"> - <view class="c-p-20 chuany-font28"> - <view class="chuany-flex chuany-justify-between"> - <view class="chuany-font32 chuany-width24"> - {{item.planPeople}} + <view class="coreshop-ff chuany-bradius20 chuany-flex chuany-align-center"> + <view class=" c-p-l-10"> + + </view> + <view class="chuany-width100"> + <view class="c-p-t-20 c-p-b-20 c-p-r-20 chuany-font28"> + <view class="chuany-flex chuany-justify-between"> + <text class="chuany-width6">{{index+1}}</text> + <view class="chuany-width26"> + {{item.planPeople}} + </view> + <view class="chuany-width50"> + {{item.depart.name}} + </view> + <view class="chuany-width24"> + <up-text align="right" size='14' + :type="item.approvalStatus=='unApproval'?'primary':item.approvalStatus=='Yes'?'success':'warning'" + :text="item.approvalStatus=='unApproval'?'鏈鎵�':item.approvalStatus=='Yes'?'鎵瑰噯':'涓嶆壒鍑�'"> + </up-text> + </view> </view> - <view class="chuany-width50"> - {{item.depart.name}} + <view class="text-69 chuany-flex chuany-justify-between"> + <!-- <view class="c-p-t-8 chuany-width24"> + 璐圭敤鎶ラ攢 + </view> --> + <text class="chuany-width6" style="color: white;">{{index+1}}</text> + <view class="c-p-t-8 chuany-width26"> + {{$util.formatDate(item.planStartTime)}} + </view> + <view class="c-p-t-6 chuany-width50"> + <up-text color="#696969" :lines="1" :text="item.planContent"></up-text> + </view> + <view class="c-p-t-8 chuany-width24 chuany-text-right"> + {{item.planMoney}} 鍏� + </view> </view> - <view class="chuany-width24"> - <u-text align="right" size='14' - :type="item.approvalStatus=='unApproval'?'primary':item.approvalStatus=='Yes'?'success':'warning'" - :text="item.approvalStatus=='unApproval'?'鏈壒澶�':item.approvalStatus=='Yes'?'鎵瑰噯':'涓嶆壒鍑�'"> - </u-text> - </view> - </view> - <view class="text-69 chuany-flex chuany-justify-between"> - <view class="c-p-t-8 chuany-width24"> - 璐圭敤鎶ラ攢 - </view> - <view class="c-p-t-8 chuany-width50"> - {{$util.formatDate(item.planStartTime)}} - </view> - <view class="c-p-t-8 chuany-width24 chuany-text-right"> - {{item.planMoney}} 鍏� - </view> - </view> - <view class="c-p-t-8"> - 鎽樿锛歿{item.planContent}} + </view> </view> </view> @@ -94,7 +167,7 @@ pageIndex: 1, pageSize: 20, }) - const list = ['鍏ㄩ儴', '鏈壒澶�', '涓嶆壒鍑�', '鎵瑰噯'] + const list = ['鍏ㄩ儴', '鏈鎵�', '涓嶆壒鍑�', '鎵瑰噯'] let workTime = ref('') let datePickerShow = ref(false) let loadStatus = ref('loadmore') @@ -103,6 +176,8 @@ let listO = reactive({ orderList: [] }) + let checkboxValue1 = ref(null) + let idValue = ref(null) let role = ref() let approvalStatus = ref('unApproval') let heji = ref(0) @@ -201,6 +276,9 @@ if (state.planStartTimeEnd) { data.planStartTimeEnd = state.planStartTimeEnd } + if (workerUserName.value) { + data.staffName = workerUserName.value + } loadStatus.value = 'loading'; let getList = null if (role.value == 'zhuGuan') { @@ -233,11 +311,10 @@ }) } const pageToDetail = (item) => { - if (item.approvalStatus == 'unApproval') { - uni.navigateTo({ - url: `/pages/reimbursement/approve?role=${role.value}&detailId=${item.keyid}` - }); - } + uni.navigateTo({ + url: `/pages/reimbursement/approve?role=${role.value}&detailId=${item.keyid}` + }); + // if (state.planStartTimeStart) { // data.planStartTimeStart = state.planStartTimeStart // } @@ -247,6 +324,55 @@ // $db.set('detailItem',JSON.stringify(item)) } + const arrange = (val) => { + if (!idValue.value || idValue.value.length < 1) { + $util.showToast({ + title: '鑷冲皯閫夋嫨涓�椤癸紒' + }) + return + } + uni.showModal({ + title: val == 'Yes' ? '纭鎵瑰噯鎵�閫夊唴瀹癸紵' : '纭涓嶆壒鍑嗘墍閫夊唴瀹癸紵', + content: '', + editable: true, + placeholderText: '璇疯緭鍏ュ鎵规剰瑙�', + success: function(res) { + if (res.confirm) { + console.log('纭', res) + //鎵ц + // start() + let obj = { + oA_WorkPlanIds: idValue.value, + approvalStatus: val, + approvalContent: res.content + } + $api.BatchShenPi(obj).then(resp => { + if (resp.code == 1) { + $util.showToast({ + title: val == 'Yes' ? '鎵瑰噯鎴愬姛锛�' : "涓嶆壒鍑嗘垚鍔燂紒", + icon: "success" + }) + idValue.value = [] + checkboxValue1.value = [] + init() + } else { + $util.showToast({ + title: resp.error + }) + } + }) + } else if (res.cancel) { + console.log('鍙栨秷'); + } + } + }); + // uni.navigateTo({ + // url: '/pages/delivery/driver/arrangedetail' + // }); + } + const checkboxChange = (val) => { + idValue.value = val + } </script> <style> -- Gitblit v1.9.1