From 28ab9da809aa7c5d42e1871af5fd10c2de09ac66 Mon Sep 17 00:00:00 2001 From: 王恒 <318726284@qq.com> Date: 星期五, 26 九月 2025 14:04:57 +0800 Subject: [PATCH] '交接版本' --- policy/policyApply/policyApply.vue | 1025 ++++++++++++++++++++++++++++++-------------------------- 1 files changed, 546 insertions(+), 479 deletions(-) diff --git a/policy/policyApply/policyApply.vue b/policy/policyApply/policyApply.vue index cb692c0..45992d4 100644 --- a/policy/policyApply/policyApply.vue +++ b/policy/policyApply/policyApply.vue @@ -1,479 +1,546 @@ -<template> - <view class="page-box"> - <view class="content-box"> - <view class="form"> - <view class="form-item"> - <view class="form-label require"> - 鎵ф硶涓婚 - </view> - <input type="text" placeholder="璇疯緭鍏�" v-model.trim="form.enforceReason"/> - </view> - <view class="form-item"> - <view class="form-label require"> - 鎵ф硶瀵硅薄 - </view> - <view class="input" @click="search"> - <input type="text" style="width: 80%;" disabled placeholder="璇烽�夋嫨" :value="form.companyName"/> - <u-icon name="arrow-right"></u-icon> - <!-- <u-text text='鎼滅储' type="primary" style="width: 20%;" @click="search"></u-text> --> - </view> - </view> - <view class="form-item"> - <view class="form-label require"> - 鎵ф硶鏃堕棿 - </view> - <view class="input" @click="showTimeFun"> - <input type="text" placeholder="璇烽�夋嫨" disabled v-model.trim="form.planTimeStr"/> - <u-icon name="arrow-right"></u-icon> - </view> - </view> - <view class="form-item" @click="showType = true"> - <view class="form-label require"> - 鎵ф硶绫诲瀷 - </view> - <view class="input"> - <input type="text" placeholder="璇烽�夋嫨" v-model.trim="form.enforceTypeName" disabled/> - <u-icon name="arrow-right"></u-icon> - </view> - </view> - <view class="form-item last"> - <view class="form-label require"> - 鎵ф硶鍐呭 - </view> - <view class="back"> - <u--textarea :height="120" v-model.trim="form.enforceContent" placeholder="璇疯緭鍏�" count maxlength="500"></u--textarea> - </view> - </view> - </view> - </view> - <view class="content-box"> - <view class="form "> - <view class="form-item"> - <view class="form-label"> - 鎵ф硶浜哄憳 - </view> - <input type="text" placeholder="璇疯緭鍏�" v-model.trim="form.applyUser" disabled/> - </view> - <view class="form-item"> - <view class="form-label"> - 鎵ф硶閮ㄩ棬 - </view> - <!-- <input type="text" placeholder="璇疯緭鍏�" v-model.trim="form.applyDeptName" disabled/> --> - <view style="width: 60%;">{{form.applyDeptName}}</view> - </view> - <view class="form-item sui" style="align-items: flex-start;" @click="openPer"> - <view class="form-label "> - 闅忚浜哄憳 - </view> - <view> - <view style="color: #a2a2a2;" class="placeholder" v-if="!form.peers.length">璇烽�夋嫨</view> - <view v-else> - <view style="margin-bottom: 20rpx;" v-for="(item,index) in form.peers" :key="index"> - {{item.peerUser}}({{item.peerDeptName}}) - </view> - </view> - </view> - <!-- <u-textarea border="none" disabled style="padding: 0;" placeholder="璇烽�夋嫨" ></u-textarea> --> - </view> - <view class="form-item down-2"> - <view class="form-label"> - 鏄惁閫氱煡浼佷笟 - </view> - <u-switch v-model="form.isNoticeCompany" :activeValue="1" :inactiveValue="0"></u-switch> - </view> - - </view> - </view> - <view class="down-options"> - <view class="button record" @click="applyRecord">鐢宠璁板綍</view> - <view class="button submit" @click="submitApply">鎻愪氦鐢宠</view> - </view> - <!-- <u-form label-position="top" label-width="120px"> - <u-form-item label="鎵ф硶涓婚"> - <u-input placeholder="璇疯緭鍏�" v-model="form.enforceReason"></u-input> - </u-form-item> - <u-form-item label="鎵ф硶瀵硅薄"> - <u-input placeholder="璇疯緭鍏�" v-model="form.companyName"> - <template slot="suffix"> - <text @click="search">鎼滅储</text> - </template> - </u-input> - </u-form-item> - <u-form-item label="鎵ф硶鏃堕棿" @click="showTimeFun"> - <u-input placeholder="璇疯緭鍏�" v-model="form.applyTime" readonly></u-input> - </u-form-item> - <u-form-item label="鎵ф硶绫诲瀷" @click="showType = true"> - <u-input placeholder="璇疯緭鍏�" v-model="form.enforceTypeName" readonly></u-input> - </u-form-item> - <u-form-item label="鎵ф硶鍐呭"> - <u-input placeholder="璇疯緭鍏�" v-model="form.regionReason"></u-input> - </u-form-item> - <u-form-item label="鎵ф硶浜哄憳"> - <u-input placeholder="璇疯緭鍏�" v-model="form.applyName"></u-input> - </u-form-item> - <u-form-item label="鎵ф硶閮ㄩ棬"> - <u-input placeholder="璇疯緭鍏�" v-model="form.applyDeptName"></u-input> - </u-form-item> - <u-form-item label="闅忚浜哄憳鏁伴噺"> - <u-input placeholder="璇疯緭鍏�" v-model="form.userNum"></u-input> - </u-form-item> - <u-form-item label="鏄惁閫氱煡浼佷笟"> - <u-switch v-model="form.isNoticeCompany" :activeValue="1" :inactiveValue="0"></u-switch> - </u-form-item> - </u-form> --> -<!-- <u-button @click="submitApply">鎻愪氦鐢宠</u-button> - <u-button @click="applyRecord">鐢宠璁板綍</u-button> --> - <!-- <u-picker :show="show" @close="show = false" :immediateChange="true" @confirm="confirmSearch" @cancel="show = false" :columns="columns" keyName="companyName"> - - - </u-picker> --> - <perPicker ref="perPicker" @setCompany="setCompany" :immediateChange="true" @confirm="confirmSearch" @cancel="show = false" :columns="columns" keyName="companyName"></perPicker> - <yt-dateTimePicker - ref="myPicker" - @submit="confirmTime" - :time-init="timeInit" - :start-year="year" - :startMonth="month" - :time-hide="[true, true, true, true, false, false]" - /> - <u-picker :show="showType" @close="showType = false" @confirm="confirmType" @cancel="showType = false" :columns="columnsType" keyName="dictLabel"></u-picker> - <perPage :list="list" ref="perpage" @selectValue="selectValue"></perPage> - </view> -</template> - -<script> - import { orderAdd, companyList, enforceList } from '@/api/policy.js' - import { getInfo } from '@/api/auth.js' - import { getDicts } from '@/api/data' - import perPage from './perPage' - import perPicker from './perPicker' - import YtDateTimePicker from "uni_modules/yt-dateTimePicker/components/yt-dateTimePicker/yt-dateTimePicker.vue" - export default { - components: { - YtDateTimePicker, - perPage, - perPicker - }, - data() { - return { - currentTime: "", - form: { - applyUser: '', - applyDeptName: '', - enforceType: 1, - isNoticeCompany: 0, - // regionReason: 0, - planTimeStr: '', - peers: [], - orderStatus: 1, - enforceContent: "", - companyName: "" - }, - show: false, - columns: [], - showTime: false, - columnsType: [], - showType: false, - minDate: '', - year: '', - endYear: '', - timeInit: '', - list: [], - startTime: "", - month: '' - } - }, - onLoad() { - this.year = new Date().getFullYear() - this.month = new Date().getMonth() + 1 - this.endYear = this.year + 5 - this.minDate = new Date().valueOf() - this.timeInit = this.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM') - this.startTime =this.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM') - this.getInfo() - this.getDicts() - this.enforceList() - }, - onShow() { - - }, - methods: { - enforceList() { - enforceList().then(val => { - this.list = val.data.data - }) - }, - getDicts() { - getDicts('enforce_type').then(val =>{ - this.columnsType = [val.data.data] - }) - }, - getInfo() { - getInfo().then(val => { - const value = val.data.data - // this.form.applyName = value.nickName - this.form.applyUser = value.nickName - this.form.applyId = value.userId - this.form.applyDeptName = value.dept.deptName - this.form.applyDeptId = value.dept.deptId - this.form.applyPhone = value.phonenumber - }) - }, - timeFilter(mode, options) { - let d = new Date() - // console.log(d.getFullYear()); - if(mode === 'year'){ - return options.filter((option)=>option>= d.getFullYear()) - } - if(mode === 'month'){ - return options.filter((option)=>option>= d.getMonth()+1) - } - if (mode === 'minute') { - return options.filter((option) => option === '00' || option === '30'); - } - return options; - }, - authFile() { - if(!this.form.enforceReason || !this.form.enforceReason.replace(/\s+/g, "")){ - return '璇峰~鍐欎富棰�' - } - if(!this.form.companyName || !this.form.companyName.replace(/\s+/g, "")){ - return '璇烽�夋嫨鎵ф硶瀵硅薄' - } - // if(!this.form.companyId) { - // return '璇风偣鍑绘悳绱㈢‘璁ゆ墽娉曞璞�' - // } - if(!this.form.planTimeStr) { - return '璇峰~鍐欐墽娉曟椂闂�' - } - if(!this.form.enforceTypeName){ - return '璇烽�夋嫨鎵ф硶绫诲瀷' - } - console.log(!this.form.enforceContent.replace(/\s+/g, "")) - if(!this.form.enforceContent || !this.form.enforceContent.replace(/\s+/g, "")) { - return '璇峰~鍐欐墽娉曞唴瀹�' - } - // if(!this.form.peers.length){ - // return '璇烽�夋嫨闅忚浜哄憳' - // } - return '' - }, - submitApply(){ - const res = this.authFile() - if(res){ - uni.showToast({ - title: res, - icon: 'none' - }) - return - } - orderAdd(this.form).then(val => { - if(val.data.code == 200) { - uni.showToast({ - title: '鎻愪氦鎴愬姛', - icon: 'none' - }) - setTimeout(() => { - uni.navigateBack() - }, 500) - } - }) - }, - applyRecord() { - uni.navigateTo({ - url:`/policy/applyRecord/applyRecord` - }) - }, - search() { - // companyList({companyName: this.form.companyName}).then(val => { - // if(val.data.code == 200){ - // if(!val.data.rows.length || !val.data.rows){ - // uni.showToast({ - // title: '娌℃湁绗﹀悎鐨勬暟鎹紝璇锋鏌ヨ緭鍏ョ殑鎵ф硶瀵硅薄', - // icon: 'none', - // duration: 3000 - // }) - // } else { - - // } - - // } - // }) - - this.$refs.perPicker.open() - }, - confirmSearch(e){ - let value = e - // const value = this.columns[0].find(item => item.companyName == e.value[0].companyName) - this.form.companyName = e.companyName - this.form.companyCode = value.companyCode - this.form.companyId = value.companyId - this.form.companyPhone = value.companyPhone - this.form.companyUser = value.companyUser - this.form.companyAddress = value.companyAddress - // console.log(this.form.companyName) - }, - setCompany(e) { - this.form.companyName = e - this.form.companyCode = '' - this.form.companyId = '' - this.form.companyPhone = '' - this.form.companyUser = '' - this.form.companyAddress = '' - }, - confirmTime(e) { - this.form.planTime = e.year + '-' + e.month+ '-' + + e.day + ' ' + e.hour + ":" + "00:00" - this.form.planTimeStr = e.year + '-' + e.month+ '-' + + e.day + ' ' + e.hour + ":" + "00" - this.timeInit = this.$u.timeFormat(new Date(this.form.planTimeStr), 'yyyy-mm-dd hh:MM') - }, - showTimeFun() { - // this.showTime = true - this.$refs.myPicker.show(); - - }, - sheet(){ - - }, - confirmType(e){ - this.form.enforceType = e.value[0].dictCode - this.form.enforceTypeName = e.value[0].dictLabel - this.showType = false - }, - changeValue(e, e1) { - this.currentTime = e.value - }, - openPer() { - this.$refs.perpage.open(this.list) - }, - selectValue(value) { - value.forEach(val => { - this.form.peers.push(val) - }); - this.form.peers = this.uniqueArrJson(this.form.peers,'peerId') - }, - uniqueArrJson(arr,key) { - var newobj = {},newArr = []; - for(var i=0;i<arr.length;i++){ - var item = arr[i]; - if(!newobj[item[key]]){ - newobj[item[key]] = newArr.push(item); - } - } - return newArr; - } - } - } -</script> -<style> - page{ - background-color: #F4F4F4; - } - .sui .u-textarea{ - padding: 0 !important; - } -</style> -<style scoped lang="scss"> -.page-box{ - padding-bottom: 140rpx; - .content-box{ - margin:20rpx 32rpx; - background-color: white; - padding: 24rpx; - border-radius: 10rpx; - } - .form{ - .form-item{ - display: flex; - justify-content: flex-start; - align-items: center; - border-bottom: 2rpx solid #F1F1F1; - padding-bottom: 26rpx; - margin-bottom: 24rpx; - .form-label{ - font-size: 30rpx; - color: #4A4E60; - width: 40%; - } - .input{ - width: 60%; - display: flex; - justify-content: space-between; - align-items: center; - } - .require{ - &::after{ - content: '*'; - color: #FF7500; - } - } - - } - .down-2{ - margin-bottom: 0; - padding-bottom: 0; - border: none; - } - .last{ - margin-bottom: 0; - padding-bottom: 0; - border-bottom: none; - display: block; - .form-label{ - margin-bottom: 16rpx; - - } - .back{ - ::v-deep .u-textarea{ - background-color: #F4F4F4; - border: none; - .u-textarea__count{ - background: none !important; - } - } - } - } - - } -} -.down-options{ - background-color: white; - position: fixed; - bottom: 0; - padding-bottom: 40rpx; - width: 100%; - padding: 22rpx 30rpx 40rpx; - z-index: 800; - display: flex; - justify-content: space-between; - align-items: center; - box-sizing: border-box; - .record{ - box-sizing: border-box; - border-radius: 20rpx; - border: 2rpx solid #ABD2FF; - background: #F0F8FF; - color: #1171E0; - font-size: 32rpx; - padding: 20rpx 30rpx; - width: 30%; - text-align: center; - } - .submit{ - border-radius: 20rpx; - border: 2rpx solid #1171E0; - background-color: #1171E0; - color: white; - width: 65%; - box-sizing: border-box; - padding: 20rpx 30rpx; - text-align: center; - } -} -.sui{ - -} -::v-deep .u-checkbox-label--right > text{ - line-height: 54rpx !important; - margin-right: 15rpx; -} -</style> +<template> + <view class="page-box"> + <view class="content-box"> + <view class="form"> + <view class="form-item"> + <view class="form-label require"> + 璁″垝鍚嶇О + </view> + <input type="text" placeholder="璇疯緭鍏ヨ鍒掑悕绉�" v-model.trim="form.enforceReason" /> + </view> + <view class="form-item"> + <view class="form-label require"> + 琚鏌ュ璞� + </view> + <view class="input" @click="search"> + <input type="text" style="width: 80%;" disabled placeholder="璇烽�夋嫨琚鏌ュ璞�" :value="form.companyName" /> + <u-icon name="arrow-right"></u-icon> + </view> + </view> + <view class="form-item"> + <view class="form-label require"> + 鎵ф硶鏃堕棿 + </view> + <view class="input" @click="showTimeFun"> + <input type="text" placeholder="璇烽�夋嫨" disabled v-model.trim="form.planTimeStr" /> + <u-icon name="arrow-right"></u-icon> + </view> + </view> + <view class="form-item" @click="showType = true"> + <view class="form-label require"> + 妫�鏌ョ被鍨� + </view> + <view class="input"> + <input type="text" placeholder="璇烽�夋嫨妫�鏌ョ被鍨�" v-model.trim="form.enforceTypeName" disabled /> + <u-icon name="arrow-right"></u-icon> + </view> + </view> + <view class="form-item last"> + <view class="form-label require"> + 妫�鏌ュ唴瀹� + </view> + <view class="back"> + <u--textarea :height="120" v-model.trim="form.enforceContent" placeholder="璇疯緭鍏ユ鏌ュ唴瀹�" count + maxlength="500"></u--textarea> + </view> + </view> + </view> + </view> + <view class="content-box"> + <view class="form "> + <view class="form-item"> + <view class="form-label"> + 鎵ф硶浜哄憳 + </view> + <input type="text" placeholder="璇疯緭鍏�" v-model.trim="form.applyUser" disabled /> + </view> + <view class="form-item"> + <view class="form-label"> + 鎵ц绉戝 + </view> + <!-- <input type="text" placeholder="璇疯緭鍏�" v-model.trim="form.applyDeptName" disabled/> --> + <view class="select-content" @tap="openSelectOffice"> + <view>{{form.applyDeptNames}}</view> + <u-icon name="arrow-right"></u-icon> + </view> + </view> + <view class="form-item sui" style="align-items: flex-start;" @click="openPer"> + <view class="form-label "> + 闅忚浜哄憳 + </view> + <view> + <view style="color: #a2a2a2;" class="placeholder" v-if="!form.peers.length">璇烽�夋嫨</view> + <view v-else> + <view style="margin-bottom: 20rpx;" v-for="(item,index) in form.peers" :key="index"> + {{item.peerUser}}({{item.peerDeptName}}) + </view> + </view> + </view> + </view> + <view class="form-item"> + <view class="form-label"> + 鏄惁閫氱煡浼佷笟 + </view> + <u-switch v-model="form.isNoticeCompany" :activeValue="1" :inactiveValue="0"></u-switch> + </view> + <view class="form-item" :class="{'down-2' : !isRectify }"> + <view class="form-label"> + 鏄惁鍒涘缓鏁存敼 + </view> + <u-switch v-model="isRectify" :activeValue="1" :inactiveValue="0" @change="changeRectify"></u-switch> + </view> + <view class="form-item down-2" v-if="isRectify == 1"> + <view class="form-label require"> + 鏁存敼璁″垝 + </view> + <view class="input" @click="searchRectify"> + <input type="text" style="width: 80%;" disabled placeholder="璇烽�夋嫨鏁存敼璁″垝" :value="rectifyName" /> + <u-icon name="arrow-right"></u-icon> + </view> + </view> + </view> + </view> + <view class="down-options"> + <view class="button record" @click="applyRecord">鐢宠璁板綍</view> + <view class="button submit" @click="submitApply">鎻愪氦鐢宠</view> + </view> + <perPicker ref="perPicker" @setCompany="setCompany" :immediateChange="true" @confirm="confirmSearch" + @cancel="show = false" :columns="columns" keyName="companyName"></perPicker> + <yt-dateTimePicker ref="myPicker" @submit="confirmTime" :time-init="timeInit" :start-year="year" :startMonth="month" + :time-hide="[true, true, true, true, false, false]" /> + <u-picker :show="showType" @close="showType = false" @confirm="confirmType" @cancel="showType = false" + :columns="columnsType" keyName="dictLabel"></u-picker> + <perPage :list="list" ref="perpage" @selectValue="selectValue"></perPage> + <officePopup :officeShow.sync="officeShow" :list="officeList" @selectValue="selectOfficeRes"></officePopup> + <rectifyPicker ref="rectifyPicker" @setCompany="setCompany" :immediateChange="true" @confirm="confirmRectify" + :applyOrgId="form.applyOrgId" :companyId="form.companyId" @cancel="show = false" :columns="columns" + keyName="enforceReason"></rectifyPicker> + </view> +</template> + +<script> + import { + orderAdd, + companyList, + enforceList, + officeList, + } from '@/api/policy.js' + import { + getInfo + } from '@/api/auth.js' + import { + getDicts + } from '@/api/data' + import perPage from './perPage' + import officePopup from './officePopup' + import perPicker from './perPicker' + import rectifyPicker from './rectifyPicker' + import YtDateTimePicker from "uni_modules/yt-dateTimePicker/components/yt-dateTimePicker/yt-dateTimePicker.vue" + export default { + components: { + YtDateTimePicker, + perPage, + perPicker, + officePopup, + rectifyPicker + }, + data() { + return { + currentTime: "", + form: { + enforceReason: '', // 鎵ф硶涓婚 + companyName: "", // 鎵ф硶瀵硅薄 + planTime: '', // 鎵ф硶鏃堕棿 + planTimeStr: '', // 鎵ф硶鏃堕棿 + enforceType: '', // 妫�鏌ユ柟寮� + enforceTypeName: '', // 妫�鏌ユ柟寮忓悕绉� + enforceContent: "", // 鎵ф硶鍐呭 + applyUser: '', // 鎵ф硶浜哄憳 + applyOrgId: "", // 鍒跺畾鏈烘瀯id + applyOrgName: "", // 鍒跺畾鏈烘瀯鍚嶇О + applyDeptIds: "", // 鎵ц绉戝id + applyDeptNames: "", // 鎵ц绉戝鍚嶇О + peers: [], // 闅忚浜哄憳 + isNoticeCompany: 0, // 鏄惁閫氱煡浼佷笟 + orderStatus: 1, + joinOrderId: null, + }, + show: false, + columns: [], + showTime: false, + columnsType: [], + showType: false, + minDate: '', + year: '', + endYear: '', + timeInit: '', + list: [], + startTime: "", + month: '', + officeList: [], + officeShow: false, + isRectify: 0, // 鏄惁鍒涘缓鏁存敼 + rectifyName: '', // 鏁存敼鍏宠仈璁″垝鍚嶇О + } + }, + onLoad() { + this.year = new Date().getFullYear() + this.month = new Date().getMonth() + 1 + this.endYear = this.year + 5 + this.minDate = new Date().valueOf() + this.timeInit = this.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM') + this.startTime = this.$u.timeFormat(new Date(), 'yyyy-mm-dd hh:MM') + this.getInfo() + this.getDicts() + this.enforceList() + }, + onShow() { + + }, + methods: { + changeRectify(e) { + if (e == 0) { + this.form.joinOrderId = null + this.rectifyName = '' + } + }, + + enforceList() { + enforceList().then(val => { + this.list = val.data.data + }) + }, + getDicts() { + getDicts('enforce_type').then(val => { + this.columnsType = [val.data.data] + }) + }, + getInfo() { + getInfo().then(val => { + const value = val.data.data + // this.form.applyName = value.nickName + this.form.applyUser = value.nickName + this.form.applyId = value.userId + this.form.applyPhone = value.phonenumber + + this.form.applyOrgId = value.dept.parentId // 鍒跺畾鏈烘瀯id + this.form.applyOrgName = value.dept.parentName // 鍒跺畾鏈烘瀯鍚嶇О + this.form.applyDeptNames = value.dept.deptName // 绉戝鍚嶇О + this.form.applyDeptIds = value.dept.deptId // 绉戝id + + this.getOfficeList() + }) + }, + timeFilter(mode, options) { + let d = new Date() + // console.log(d.getFullYear()); + if (mode === 'year') { + return options.filter((option) => option >= d.getFullYear()) + } + if (mode === 'month') { + return options.filter((option) => option >= d.getMonth() + 1) + } + if (mode === 'minute') { + return options.filter((option) => option === '00' || option === '30'); + } + return options; + }, + authFile() { + if (!this.form.enforceReason || !this.form.enforceReason.replace(/\s+/g, "")) { + return '璇峰~鍐欎富棰�' + } + if (!this.form.companyName || !this.form.companyName.replace(/\s+/g, "")) { + return '璇烽�夋嫨鎵ф硶瀵硅薄' + } + if (!this.form.planTimeStr) { + return '璇峰~鍐欐墽娉曟椂闂�' + } + if (!this.form.enforceTypeName) { + return '璇烽�夋嫨妫�鏌ユ柟寮�' + } + if (!this.form.enforceContent || !this.form.enforceContent.replace(/\s+/g, "")) { + return '璇峰~鍐欐墽娉曞唴瀹�' + } + if (!this.form.applyDeptIds) { + return '璇烽�夋嫨鎵ф硶閮ㄩ棬' + } + // if(!this.form.peers.length){ + // return '璇烽�夋嫨闅忚浜哄憳' + // } + + if (this.isRectify == 1) { + if (this.form.joinOrderId == null) { + return '璇烽�夋嫨鏁存敼璁″垝' + } + } + return '' + }, + submitApply() { + const res = this.authFile() + if (res) { + uni.showToast({ + title: res, + icon: 'none' + }) + return + } + orderAdd(this.form).then(val => { + if (val.data.code == 200) { + uni.showToast({ + title: '鎻愪氦鎴愬姛', + icon: 'none' + }) + setTimeout(() => { + uni.navigateBack() + }, 500) + } + }) + }, + applyRecord() { + uni.navigateTo({ + url: `/policy/applyRecord/applyRecord` + }) + }, + search() { + this.$refs.perPicker.open() + }, + + searchRectify() { + if (!this.form.companyId) return this.$u.toast('璇峰厛閫夋嫨浼佷笟') + this.$refs.rectifyPicker.open() + }, + + confirmRectify(e) { + console.log(e) + this.form.joinOrderId = e.orderId + this.rectifyName = e.enforceReason + }, + + confirmSearch(e) { + let value = e + this.form.companyName = e.companyName + this.form.companyCode = value.companyCode + this.form.companyId = value.companyId + this.form.companyPhone = value.companyPhone + this.form.companyUser = value.companyUser + this.form.companyAddress = value.companyAddress + this.form.joinOrderId = null + this.rectifyName = '' + }, + setCompany(e) { + this.form.companyName = e + this.form.companyCode = '' + this.form.companyId = '' + this.form.companyPhone = '' + this.form.companyUser = '' + this.form.companyAddress = '' + }, + confirmTime(e) { + this.form.planTime = e.year + '-' + e.month + '-' + +e.day + ' ' + e.hour + ":" + "00:00" + this.form.planTimeStr = e.year + '-' + e.month + '-' + +e.day + ' ' + e.hour + ":" + "00" + this.timeInit = this.$u.timeFormat(new Date(this.form.planTimeStr), 'yyyy-mm-dd hh:MM') + }, + showTimeFun() { + // this.showTime = true + this.$refs.myPicker.show(); + + }, + sheet() { + + }, + confirmType(e) { + this.form.enforceType = e.value[0].dictCode + this.form.enforceTypeName = e.value[0].dictLabel + this.showType = false + }, + changeValue(e, e1) { + this.currentTime = e.value + }, + openPer() { + this.$refs.perpage.open(this.list) + }, + selectValue(value) { + value.forEach(val => { + this.form.peers.push(val) + }); + this.form.peers = this.uniqueArrJson(this.form.peers, 'peerId') + }, + uniqueArrJson(arr, key) { + var newobj = {}, + newArr = []; + for (var i = 0; i < arr.length; i++) { + var item = arr[i]; + if (!newobj[item[key]]) { + newobj[item[key]] = newArr.push(item); + } + } + return newArr; + }, + + openSelectOffice() { + this.officeShow = true + }, + + selectOfficeRes(data) { + this.form.applyDeptIds = data.deptIds + this.form.applyDeptNames = data.deptNames + }, + + async getOfficeList() { + const { + data: res + } = await officeList({ + pageNum: 1, + pageSize: 1000, + parentId: this.form.applyOrgId, + }) + this.officeList = res.data.map(obj => { + return { + deptId: obj.deptId, + deptName: `${this.form.applyOrgName}-${obj.deptName}` + } + }) + console.log(this.officeList) + }, + } + } +</script> +<style> + page { + background-color: #F4F4F4; + } + + .sui .u-textarea { + padding: 0 !important; + } +</style> +<style scoped lang="scss"> + .page-box { + padding-bottom: 140rpx; + + .content-box { + margin: 20rpx 32rpx; + background-color: white; + padding: 24rpx; + border-radius: 10rpx; + } + + .form { + .form-item { + display: flex; + justify-content: flex-start; + align-items: center; + border-bottom: 2rpx solid #F1F1F1; + padding-bottom: 26rpx; + margin-bottom: 24rpx; + + .form-label { + width: 236rpx !important; + font-size: 30rpx; + color: #4A4E60; + width: 40%; + } + + .input { + width: 60%; + display: flex; + justify-content: space-between; + align-items: center; + } + + .require { + &::after { + content: '*'; + color: #FF7500; + } + } + + } + + .down-2 { + margin-bottom: 0; + padding-bottom: 0; + border: none; + } + + .last { + margin-bottom: 0; + padding-bottom: 0; + border-bottom: none; + display: block; + + .form-label { + margin-bottom: 16rpx; + + } + + .back { + ::v-deep .u-textarea { + background-color: #F4F4F4; + border: none; + + .u-textarea__count { + background: none !important; + } + } + } + } + + } + } + + .down-options { + background-color: white; + position: fixed; + bottom: 0; + padding-bottom: 40rpx; + width: 100%; + padding: 22rpx 30rpx 40rpx; + z-index: 800; + display: flex; + justify-content: space-between; + align-items: center; + box-sizing: border-box; + + .record { + box-sizing: border-box; + border-radius: 20rpx; + border: 2rpx solid #ABD2FF; + background: #F0F8FF; + color: #1171E0; + font-size: 32rpx; + padding: 20rpx 30rpx; + width: 30%; + text-align: center; + } + + .submit { + border-radius: 20rpx; + border: 2rpx solid #1171E0; + background-color: #1171E0; + color: white; + width: 65%; + box-sizing: border-box; + padding: 20rpx 30rpx; + text-align: center; + } + } + + .sui {} + + ::v-deep .u-checkbox-label--right>text { + line-height: 54rpx !important; + margin-right: 15rpx; + } + + .select-content { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + + .select-word { + flex: 1; + } + } +</style> \ No newline at end of file -- Gitblit v1.9.1