123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683 |
- <template>
- <view style="background-color: #fff;" v-if="content != null">
- <view style="height: 100%;overflow: auto;">
- <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm" :rules="rules"
- :labelStyle="{fontSize:'32rpx'}" labelWidth="130">
- <view v-if="fkFlow == '006'">
- <u-form-item label="出差处室:" borderBottom prop="outWorkDept">
- <u--input v-model="content.outWorkDept" border="none" readonly></u--input>
- </u-form-item>
- <u-form-item label="出差人:" borderBottom prop="userName">
- <u--input v-model="content.userName" border="none" readonly></u--input>
- </u-form-item>
- <u-form-item label="目的地:" borderBottom prop="destination">
- <view>
- <view>
- <u-radio-group v-model="content.provinceType" @change="groupChange">
- <u-radio :customStyle="{marginRight: '40rpx'}" key="0" label="省内" name="0">
- </u-radio>
- <u-radio key="1" label="省外" name="1"> </u-radio>
- </u-radio-group>
- </view>
- <view style="margin-top: 20rpx;">
- <u--input v-model="content.destination" border="none" placeholder="请填写目的地"></u--input>
- </view>
- </view>
- </u-form-item>
- <u-form-item label="起止日期:" borderBottom prop="startTime" @click="show = true">
- <view :style="{color:content.startTime==null?'rgb(192, 196, 204)':''}">
- {{content.startTime == null?'请选择起止日期':content.startTime+' 至 '+content.endTime}}
- </view>
- </u-form-item>
- <u-form-item label="出差事由:" borderBottom prop="reason">
- <u--textarea v-model="content.reason" placeholder="请填写出差事由" border="none"
- height="100"></u--textarea>
- </u-form-item>
- <u-form-item label="接收人:" borderBottom prop="toEmpsName" @click="peoShow = true">
- <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
- {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
- </view>
- </u-form-item>
- </view>
- <view v-if="fkFlow == '007'">
- <u-form-item label="申请人:" borderBottom prop="userName">
- <u--input v-model="content.userName" border="none" readonly></u--input>
- </u-form-item>
- <u-form-item label="邀请单位:" borderBottom prop="inviteUnit">
- <u--input v-model="content.inviteUnit" border="none" placeholder="请填写邀请单位"></u--input>
- </u-form-item>
- <u-form-item label="培训名称:" borderBottom prop="trainName">
- <u--input v-model="content.trainName" border="none" placeholder="请填写培训名称"></u--input>
- </u-form-item>
- <u-form-item label="目的地:" borderBottom prop="destination">
- <u--input v-model="content.destination" border="none" placeholder="请填写目的地"></u--input>
- </u-form-item>
- <u-form-item label="起止日期:" borderBottom prop="startTime" @click="show = true">
- <view :style="{color:content.startTime==null?'rgb(192, 196, 204)':''}">
- {{content.startTime == null?'请选择起止日期':content.startTime+' 至 '+content.endTime}}
- </view>
- </u-form-item>
- <u-form-item label="授课题目:" borderBottom prop="teacherTitle">
- <u--input v-model="content.teacherTitle" border="none" placeholder="请填写授课题目"></u--input>
- </u-form-item>
- <u-form-item label="参加人数:" borderBottom prop="numberOfParticipants">
- <u--input v-model="content.numberOfParticipants" border="none" placeholder="请填写参加人数"></u--input>
- </u-form-item>
- </view>
- <view v-if="fkFlow == '009'">
- <u-form-item label="姓名:" borderBottom ref="item1">
- <u--input v-model="content.name" border="none" readonly></u--input>
- </u-form-item>
- <u-form-item label="请(休)假类别:" borderBottom prop="leaveTpye">
- <uni-data-select v-model="content.leaveTpye" :clear="false" placeholder="请选择请假类别"
- :localdata="statusList"></uni-data-select>
- </u-form-item>
- <u-form-item label="起止日期:" borderBottom prop="leaveStartTime" @click="show = true">
- <view :style="{color:content.leaveStartTime==null?'rgb(192, 196, 204)':''}">
- {{content.leaveStartTime == null?'请选择起止日期':content.leaveStartTime+' 至 '+content.leaveEndTime}}
- </view>
- </u-form-item>
- <u-form-item label="请(休)假天数:" borderBottom ref="item1">
- <u--input v-model="content.leaveNumber" border="none" readonly
- placeholder="请填写请(休)假天数"></u--input>
- </u-form-item>
- <u-form-item label="请(休)假事由:" borderBottom prop="leaveReason">
- <u--textarea v-model="content.leaveReason" placeholder="请填写请(休)假事由" border="none"
- height="100"></u--textarea>
- </u-form-item>
- <u-form-item label="接收人:" borderBottom prop="toEmpsName" v-if="fzr == true" @click="peoShow = true">
- <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
- {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
- </view>
- </u-form-item>
- </view>
- <view v-if="fkFlow == '015'">
- <u-form-item label="申请人:" borderBottom ref="item1">
- <u--input v-model="content.createBy" border="none" readonly></u--input>
- </u-form-item>
- <u-form-item label="联系电话:" borderBottom prop="phone" ref="item1">
- <u--input v-model="content.phone" placeholder="请输入联系电话" border="none"></u--input>
- </u-form-item>
- <u-form-item label="用车日期:" borderBottom prop="startUseTime" @click="show = true">
- <view :style="{color:content.startUseTime==null?'rgb(192, 196, 204)':''}">
- {{content.startUseTime == null?'请选择起止日期':content.startUseTime+' 至 '+content.endUseTime}}
- </view>
- </u-form-item>
- <u-form-item label="用车天数:" borderBottom ref="item1">
- <u--input v-model="content.dayNum" border="none" readonly placeholder="请填写用车天数"></u--input>
- </u-form-item>
- <u-form-item label="乘车人数:" borderBottom prop="carNum" ref="item1">
- <u--input v-model="content.carNum" border="none" type="number" placeholder="请填写乘车人数"></u--input>
- </u-form-item>
- <u-form-item label="目的地:" borderBottom prop="addres" ref="item1">
- <u--textarea v-model="content.addres" placeholder="请填写目的地" border="none"
- height="100"></u--textarea>
- </u-form-item>
- <u-form-item label="用途:" borderBottom prop="useMessage">
- <u--textarea v-model="content.useMessage" placeholder="请填写用途" border="none"
- height="100"></u--textarea>
- </u-form-item>
- <u-form-item label="接收人:" borderBottom prop="toEmpsName" v-if="fzr == true" @click="peoShow = true">
- <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
- {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
- </view>
- </u-form-item>
- </view>
- <view v-if="fkFlow == '020'">
- <u-form-item label="申请人:" borderBottom ref="item1">
- <u--input v-model="content.createBy" border="none" readonly></u--input>
- </u-form-item>
- <u-form-item label="所在处室:" borderBottom prop="outWorkDept" ref="item1">
- <u--input v-model="content.outWorkDept" placeholder="请输入所在处室" border="none"></u--input>
- </u-form-item>
- <!-- <u-form-item label="值班日期:" borderBottom prop="srcDate" @click="typeChange('zhiban')">
- <view>
- {{content.srcDate}}
- </view>
- </u-form-item> -->
- <u-form-item label="调班日期:" prop="targetDate" @click="typeChange('tiaoban')" borderBottom
- ref="item1">
- <view>
- {{content.targetDate}}
- </view>
- </u-form-item>
- <u-form-item label="调班人:" @click='changePeople1' borderBottom prop="user" ref="item1">
- <view class="">
- {{content.user}}
- </view>
- </u-form-item>
- <u-form-item label="替换人:" @click='changePeople2' borderBottom prop="nickNameTh" ref="item1">
- <view class="">
- {{content.nickNameTh}}
- </view>
- </u-form-item>
- <u-form-item label="接收人:" borderBottom prop="toEmpsName" v-if="Jld == false"
- @click="peoShow1 = true">
- <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
- {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
- </view>
- </u-form-item>
- </view>
- <view v-if="fkFlow == '017'">
- <u-form-item label="用章人:" borderBottom ref="item1">
- <u--input v-model="content.createBy" border="none" readonly></u--input>
- </u-form-item>
- <u-form-item label="用章处室:" borderBottom prop="useDept" ref="item1">
- <u--input v-model="content.useDept" placeholder="请输入用章处室" border="none"></u--input>
- </u-form-item>
- <u-form-item label="用章日期:" borderBottom prop="useTime" @click="typeChange('yongzhang')">
- <view>
- {{content.useTime}}
- </view>
- </u-form-item>
- <u-form-item label="印章类别:" borderBottom prop="signetType">
- <uni-data-select v-model="content.signetType" :clear="false" placeholder="请选择印章类别"
- :localdata="yongzhangList"></uni-data-select>
- </u-form-item>
- <u-form-item label="文件名称:" borderBottom prop="usingReason" ref="item1">
- <u--textarea type="textarea" v-model="content.usingReason" placeholder="请输入文件名称"
- border="none"></u--textarea>
- </u-form-item>
- <u-form-item label="主送单位:" borderBottom prop="activeSend" ref="item1">
- <u--textarea type="textarea" v-model="content.activeSend" placeholder="请输入主送单位"
- border="none"></u--textarea>
- </u-form-item>
- <u-form-item label="上传附件:" borderBottom prop="" ref="">
- <view class="example-body">
- <u-button style="width:380rpx" type="primary" @click="uploadPic()">上传</u-button>
- <!-- 展示 -->
- <div style="display: inline;">
- <view style="margin-bottom: 30rpx;display: flex;margin-top: 4rpx;"
- v-for="v in rowThis.ywFileList" :key="v.fileId">
- <u-icon style="margin-top: 4rpx;color: #2979FF;" name="attach"></u-icon><u--text
- :lines="1" size="14" color="#2979FF" decoration="underline" :text="v.name"
- @click="downLoad(v.url)">{{v.name}}</u--text><u-icon @click="delFile(v)"
- style="margin-top: 0rpx;" name="close"></u-icon>
- </view>
- </div>
- </view>
- <u-action-sheet @select="selectClick" :actions="list" :closeOnClickOverlay="true"
- :closeOnClickAction="true" title="请选择" :show="showUpload"></u-action-sheet>
- <!-- <view v-else
- style="border-radius: 8rpx;background-color: #f3f3f3;margin-top: 40rpx;padding: 20rpx 40rpx;">
- <view style="margin-bottom: 30rpx;" v-for="v in item.ywFileList" :key="v.fileId">
- <u--text :lines="1" size="15" color="#2979FF" decoration="underline" :text="v.name"
- @click="downLoad(v.url)">{{v.name}}</u--text>
- </view>
- </view> -->
- </u-form-item>
- <u-form-item label="盖章份数:" borderBottom prop="signetCopies" ref="item1">
- <u--input type="textarea" v-model="content.signetCopies" placeholder="请输入盖章份数"
- border="none"></u--input>
- </u-form-item>
- <u-form-item label="接收人:" borderBottom prop="toEmpsName" @click="peoShow = true">
- <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
- {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
- </view>
- </u-form-item>
- </view>
- <view v-if="fkFlow == '018'">
- <u-form-item label="用章人:" borderBottom ref="item1">
- <u--input v-model="content.createBy" border="none" readonly></u--input>
- </u-form-item>
- <u-form-item label="用章处室:" borderBottom prop="useDept" ref="item1">
- <u--input v-model="content.useDept" placeholder="请输入用章处室" border="none"></u--input>
- </u-form-item>
- <u-form-item label="用章日期:" borderBottom prop="useTime" @click="typeChange('yongzhang')">
- <view>
- {{content.useTime}}
- </view>
- </u-form-item>
- <u-form-item label="合同名称:" borderBottom prop="usingReason" ref="item1">
- <u--textarea type="textarea" v-model="content.usingReason" placeholder="请输入合同名称"
- border="none"></u--textarea>
- </u-form-item>
- <u-form-item label="主送单位:" borderBottom prop="activeSend" ref="item1">
- <u--textarea type="textarea" v-model="content.activeSend" placeholder="请输入主送单位"
- border="none"></u--textarea>
- </u-form-item>
- <u-form-item label="盖章份数:" borderBottom prop="signetCopies" ref="item1">
- <u--input type="textarea" v-model="content.signetCopies" placeholder="请输入盖章份数"
- border="none"></u--input>
- </u-form-item>
- <u-form-item label="接收人:" borderBottom prop="toEmpsName" @click="peoShow = true">
- <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
- {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
- </view>
- </u-form-item>
- </view>
- <view v-if="fkFlow == '016'">
- <u-form-item label="督办事项:" borderBottom prop="title">
- <u--input placeholder='请输入督办事项' v-model="content.title" border="none"></u--input>
- </u-form-item>
- <!-- <u-form-item label="处室及负责人:" borderBottom prop="departmentHead">
- <u--input v-model="content.departmentHead" border="none" readonly></u--input>
- </u-form-item> -->
- <!-- <u-form-item label="信息类别:" borderBottom prop="infoType">
- <u--textarea type="textarea" v-model="content.infoType" placeholder="请输入信息类别"
- border="none"></u--textarea>
- </u-form-item> -->
- <u-form-item label="督办来源:" borderBottom prop="infoSource">
- <uni-data-select @change="infoSourceChange" v-model="content.infoSource" :clear="false"
- placeholder="请选择督办来源" :localdata="InfoList"></uni-data-select>
- </u-form-item>
- <u-form-item label="督办内容:" borderBottom prop="infoSourceContent">
- <u--textarea type="textarea" v-model="content.infoSourceContent"
- :placeholder="infoSourceContent" border="none"></u--textarea>
- </u-form-item>
- <u-form-item label="完成时限:" @click="typeChange('shixian')" borderBottom prop="doneTime">
- <view>
- {{content.doneTime}}
- </view>
- <!-- <u--input v-model="content.doneTime" border="none" readonly></u--input> -->
- </u-form-item>
- <!-- <u-form-item label="完成时限内容:" borderBottom prop="doneContent">
- <u--textarea type="textarea" v-model="content.doneContent" placeholder="**月**日
- ****要求/文件要求/部门确定" border="none"></u--textarea>
- </u-form-item> -->
- <!-- <u-form-item label="议定事项:" borderBottom prop="itemPostil">
- <u--textarea type="textarea" v-model="content.itemPostil" placeholder="请输入议定事项"
- border="none"></u--textarea>
- </u-form-item> -->
- <u-form-item label="责任处室:" borderBottom prop="prersonLiable">
- <u--textarea disabled style="width: 190rpx;" type="textarea" v-model="content.prersonLiable"
- placeholder="请选择责任处室" border="none"></u--textarea>
- <u-button size="small" type="primary" text="选择" @click="handelSelect"
- style="margin-top: 40rpx;width: 50rpx;margin-right: 10rpx;"></u-button>
- </u-form-item>
- </view>
- <view style="padding: 0 20rpx;">
- <u-button type="primary" v-if="fkFlow=='016'" text="保存" @click="keep"
- style="margin-top: 40rpx;"></u-button>
- <u-button type="primary" v-else text="提交" @click="submit" style="margin-top: 40rpx;"></u-button>
- </view>
- </u--form>
- </view>
- <u-calendar :show="show" mode="range" allowSameDay @confirm="confirm" @close="show = false"></u-calendar>
- <u-calendar placeholder="请选择日期" :show="show1" mode="single" allowSameDay @confirm="confirmOne"
- @close="show1 = false"></u-calendar>
- <u-modal :show="peoShow" title="选择接收人" showCancelButton @cancel="cancel" @confirm="queren">
- <view style="width: 100%;height: 40vh;overflow: auto;" v-if="peoShow == true">
- <u-radio-group v-model="value" @change="radioChange" iconPlacement="right">
- <u-collapse accordion style="width: 100%;">
- <u-collapse-item :title="v.Name" :name="v.No" :key="v.No" v-for="v in deptList"
- style="width: 100%;">
- <view style="font-size: 32rpx; padding: 20rpx 0; border-bottom: 1px solid #eaeaea;"
- v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
- <u-radio :label="i.Name" :name="i"></u-radio>
- </view>
- </u-collapse-item>
- </u-collapse>
- </u-radio-group>
- </view>
- </u-modal>
- <u-modal :show="peoShow1" title="请选择带班领导" showCancelButton @cancel="cancel1" @confirm="queren1">
- <view style="width: 100%;height: 40vh;overflow: auto;" v-if="peoShow1 == true">
- <u-radio-group v-model="value1" @change="radioChange1" iconPlacement="right">
- <u-collapse accordion style="width: 100%;">
- <u-collapse-item :title="v.Name" :name="v.No" :key="v.No" v-for="v in deptList"
- style="width: 100%;">
- <view style="font-size: 32rpx; padding: 20rpx 0; border-bottom: 1px solid #eaeaea;"
- v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
- <u-radio :label="i.Name" :name="i"></u-radio>
- </view>
- </u-collapse-item>
- </u-collapse>
- </u-radio-group>
- </view>
- </u-modal>
- <!-- <u-modal :show="peoShow1" title="请选择带班领导" showCancelButton @cancel="cancel1" @confirm="queren1">
- <view style="width: 100%;height: 40vh;overflow: auto;" v-if="peoShow1 == true">
- <u-radio-group v-model="value1" @change="radioChange1" iconPlacement="right">
- <u-collapse accordion style="width: 100%;">
- <u-collapse-item :title="v.Name" :name="v.No" :key="v.No" v-for="v in deptList"
- style="width: 100%;">
- <view style="font-size: 32rpx; padding: 20rpx 0; border-bottom: 1px solid #eaeaea;"
- v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
- <u-radio :label="i.Name" :name="i.NO" :checked="value1.includes(i.NO)"></u-radio>
- </view>
- </u-collapse-item>
- </u-collapse>
- </u-radio-group>
- </view>
- </u-modal> -->
- </view>
- </template>
- <script>
- import {
- handleTree
- } from '../../utils/wjw'
- // import uButton from "../../uni_modules/uview-ui/components/u-button/u-button.vue"
- export default {
- data() {
- return {
- list: [{
- name: '拍照上传'
- }, {
- name: '从相册上传'
- }],
- showUpload: false,
- uploadUrl: 'http://61.240.156.161:28188/prod-api' + "/system/file/fileupload",
- rowThis: {
- ywFileList: []
- },
- peoShow1: false,
- YorN: "1",
- InfoList: [],
- db_template: [],
- infoSourceContent: null,
- typeDate: null,
- yongzhangList: [],
- workid: null,
- flowNo: null,
- id: null,
- content: {},
- statusList: [],
- //上个页面传过来的参数
- parameter: null,
- fkFlow: null, // 006 中层出差 007 外出授课备案 009请假 015用车
- show: false, //日历
- show1: false, //日历
- fzr: false, //判断是否是负责人
- Jld: false,
- peoShow: false,
- deptList: [], //部门列表
- userList: [], //人员列表
- value: null,
- value1: [],
- rules: {},
- rules1: {
- destination: {
- type: 'string',
- required: true,
- message: '请填写目的地',
- trigger: ['blur', 'change']
- },
- startTime: {
- type: 'string',
- required: true,
- message: '请选择起止日期',
- trigger: ['blur', 'change']
- },
- reason: {
- type: 'string',
- required: true,
- message: '请填写出差事由',
- trigger: ['blur', 'change']
- },
- toEmpsName: {
- type: 'string',
- required: true,
- message: '请选择接收人',
- trigger: ['blur', 'change']
- },
- },
- rules2: {
- inviteUnit: {
- type: 'string',
- required: true,
- message: '请填写邀请单位',
- trigger: ['blur', 'change']
- },
- trainName: {
- type: 'string',
- required: true,
- message: '请填写培训名称',
- trigger: ['blur', 'change']
- },
- destination: {
- type: 'string',
- required: true,
- message: '请填写目的地',
- trigger: ['blur', 'change']
- },
- startTime: {
- type: 'string',
- required: true,
- message: '请选择起止时间',
- trigger: ['blur', 'change']
- },
- teacherTitle: {
- type: 'string',
- required: true,
- message: '请填写授课题目',
- trigger: ['blur', 'change']
- },
- numberOfParticipants: {
- type: 'number',
- required: true,
- message: '请填写参加人数',
- trigger: ['blur', 'change']
- },
- },
- rules3: {
- leaveTpye: {
- type: 'string',
- required: true,
- message: '请填写请假类别',
- trigger: ['blur', 'change']
- },
- leaveStartTime: {
- type: 'string',
- required: true,
- message: '请选择起止时间',
- trigger: ['blur', 'change']
- },
- leaveReason: {
- type: 'string',
- required: true,
- message: '请填写请假事由',
- trigger: ['blur', 'change']
- },
- toEmpsName: {
- type: 'string',
- required: true,
- message: '请选择接收人',
- trigger: ['blur', 'change']
- },
- user: {
- type: 'string',
- required: true,
- message: '请选择调班人',
- trigger: ['blur', 'change']
- },
- },
- rules4: {
- phone: [{
- required: true,
- message: '请输入手机号',
- trigger: ['change', 'blur'],
- },
- {
- // 自定义验证函数,见上说明
- validator: (rule, value, callback) => {
- // 上面有说,返回true表示校验通过,返回false表示不通过
- // uni.$u.test.mobile()就是返回true或者false的
- return uni.$u.test.mobile(value);
- },
- message: '手机号码不正确',
- // 触发器可以同时用blur和change
- trigger: ['change', 'blur'],
- }
- ],
- addres: {
- type: 'string',
- required: true,
- message: '请填写目的地',
- trigger: ['blur', 'change']
- },
- startUseTime: {
- type: 'string',
- required: true,
- message: '请选择起止时间',
- trigger: ['blur', 'change']
- },
- useMessage: {
- type: 'string',
- required: true,
- message: '请填写用途',
- trigger: ['blur', 'change']
- },
- carNum: {
- type: 'number',
- required: true,
- message: '请填写乘车人数',
- trigger: ['blur', 'change']
- },
- toEmpsName: {
- type: 'string',
- required: true,
- message: '请选择接收人',
- trigger: ['blur', 'change']
- },
- },
- rules5: {
- srcDate: {
- type: 'string',
- required: true,
- message: '请选择值班日期',
- trigger: ['blur', 'change']
- },
- targetDate: {
- type: 'string',
- required: true,
- message: '请选择调班日期',
- trigger: ['blur', 'change']
- },
- toEmpsName: {
- type: 'string',
- required: true,
- message: '请选择接收人',
- trigger: ['blur', 'change']
- },
- user: {
- type: 'string',
- required: true,
- message: '请选择调班人',
- trigger: ['blur', 'change']
- },
- nickNameTh: {
- type: 'string',
- required: true,
- message: '请选择替换人',
- trigger: ['blur', 'change']
- }
- },
- rules6: {
- useTime: {
- type: 'string',
- required: true,
- message: '请选择用章日期',
- trigger: ['blur', 'change']
- },
- signetType: {
- type: 'string',
- required: true,
- message: '请选择印章类别',
- trigger: ['blur', 'change']
- },
- usingReason: [{
- required: true,
- trigger: "blur",
- message: "请输入文件名称"
- }, ],
- activeSend: [{
- required: true,
- trigger: "blur",
- message: "请输入主送单位"
- }, ],
- signetCopies: [{
- required: true,
- trigger: "blur",
- message: "请输入盖章份数"
- }, ],
- toEmpsName: {
- type: 'string',
- required: true,
- message: '请选择接收人',
- trigger: ['blur', 'change']
- },
- },
- rules7: {
- usingReason: [{
- required: true,
- trigger: "blur",
- message: "请输入合同名称"
- }, ],
- activeSend: [{
- required: true,
- trigger: "blur",
- message: "请输入主送单位"
- }, ],
- signetCopies: [{
- required: true,
- trigger: "blur",
- message: "请输入盖章份数"
- }, ],
- useTime: [{
- required: true,
- message: "请选择用章日期",
- trigger: "change",
- }, ],
- signetType: [{
- required: true,
- message: "请选择印章类型",
- trigger: "change",
- }, ],
- toEmpsName: {
- type: 'string',
- required: true,
- message: '请选择接收人',
- trigger: ['blur', 'change']
- },
- },
- rules8: {
- title: [{
- required: true,
- message: "请输入督办事项",
- trigger: "blur",
- }, ],
- infoType: [{
- required: true,
- message: "请输入信息类别",
- trigger: "blur",
- }, ],
- departmentHead: [{
- required: true,
- message: "请输入处室及负责人",
- trigger: "blur",
- }, ],
- infoSource: [{
- required: true,
- message: "请选择督办来源",
- trigger: "change",
- }, ],
- doneTime: [{
- required: true,
- message: "请选择完成时限",
- trigger: "change",
- }, ],
- infoSourceContent: [{
- required: true,
- message: "请输入督办内容",
- trigger: "blur",
- }, ],
- doneContent: [{
- required: true,
- message: "请输入完成时限内容",
- trigger: "blur",
- }, ],
- itemPostil: [{
- required: true,
- message: "请输入议定事项",
- trigger: "blur",
- }, ],
- prersonLiable: [{
- required: true,
- message: "请选择责任处室",
- trigger: "blur",
- }, ],
- }
- }
- },
- onLoad(options) {
- this.content.ywSupervisionStartUserList = null
- this.content.prersonLiable = null
- getApp().globalData.zerenList = null
- getApp().globalData.ywListZR = null
- let that = this
- let roles = uni.getStorageSync('userInfo').roles
- if (options.fkFlow == '006' || options.fkFlow == '016' || options.fkFlow == '020' || options.fkFlow == '017') {
- this.getPeoList(options.fkFlow)
- }
- for (let i in roles) {
- if (roles[i].roleKey == 'chushifzr' && options.fkFlow == '009' || roles[i].roleKey == 'chushifzr' &&
- options.fkFlow == '015' || roles[i].roleKey == 'chushifzr' && options.fkFlow == '020' || roles[i]
- .roleKey == 'chushifzr' && options.fkFlow == '017') {
- this.fzr = true
- this.getPeoList(options.fkFlow)
- break
- }
- if (roles[i].roleKey == 'jld') {
- this.Jld = true
- }
- }
- that.parameter = options
- that.fkFlow = options.fkFlow
- that.type = options.type
- that.workid = options.workid
- that.flowNo = options.flowNo
- uni.setNavigationBarTitle({
- title: options.title
- })
- if (options.fkFlow == '009') {
- this.getDicts()
- }
- if (options.fkFlow == '017' || options.fkFlow == '018') {
- this.getDictsYongzhang()
- }
- if (options.fkFlow == '016') {
- this.getDictsInfo()
- }
- this.getContent(options.fkFlow)
- this.getRules(options.fkFlow)
- },
- onShow() {
- uni.$once('query', (query) => {
- if (query.a == 'one') {
- this.content.adjustUserId = getApp().globalData.adjustUserId
- this.content.user = getApp().globalData.user
- console.log('this.content.adjustUserId', this.content.adjustUserId)
- // this.content.userList = getApp().globalData.peoList
- // this.$forceUpdate()
- } else if (query.a == 'two') {
- // let arrPeo = this.content.prersonLiable.split(",");
- // let arr = getApp().globalData.zerenList.split(',')
- // arr = arr.concat(this.content.prersonLiable)
- this.content.prersonLiable = getApp().globalData.zerenList
- // this.content.prersonLiable = arr.join(" , ");
- this.content.ywSupervisionStartUserList = getApp().globalData.ywListZR
- console.log('content', this.content)
- // else {
- // this.content.prersonLiable = getApp().globalData.zerenList
- // }
- } else if (query.a == 'three') {
- this.content.replaceUserId = getApp().globalData.thList
- this.content.nickNameTh = getApp().globalData.tihuanList
- console.log('this.content.replaceUserId', this.content.replaceUserId)
- console.log('this.content.nickNameTh', this.content.nickNameTh)
- // this.content.userList=getApp().globalData.peoList2.join(",")
- // this.$forceUpdate()
- }
- })
- },
- methods: {
- uploadPic() {
- if (this.rowThis.ywFileList.length == 0) {
- this.showUpload = true
- } else {
- uni.showToast({
- title: '最多上传一张',
- icon: 'none'
- })
- return
- }
- },
- downLoad(path) {
- console.log('’', path)
- uni.downloadFile({
- url: path,
- success: (res) => {
- var filePath = res.tempFilePath;
- uni.openDocument({
- filePath: filePath,
- showMenu: true,
- success: function(res) {
- console.log('打开文档成功');
- }
- });
- }
- })
- },
- delFile(itemFile) {
- console.log('itemFILE', itemFile)
- this.rowThis.ywFileList.splice(itemFile, 1)
- },
- selectClick(index) {
- console.log(index)
- let that = this
- if (index.name == '拍照上传') {
- uni.chooseImage({
- count: 1, // 默认9,设置图片的数量
- sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
- success: function(res) {
- // 返回选定照片的本地文件路径列表 tempFilePaths
- console.log(res.tempFilePaths);
- const pathUrl = res.tempFilePaths[0]
- uni.uploadFile({
- url: 'http://61.240.156.161:28188/prod-api' +
- "/system/file/fileupload",
- filePath: pathUrl,
- name: 'file',
- header: {
- Authorization: 'Bearer ' + uni.getStorageSync('token')
- },
- success: (response) => {
- console.log('1111111111111111')
- console.log('96+', response.data)
- console.log(that.rowThis)
- let dataFile = JSON.parse(response.data)
- that.rowThis.ywFileList.push(dataFile.data)
- // if (this.rowThis.ywFileList.length != 0) {
- // for (let i = 0; i < this.rowThis.ywFileList.length; i++) {
- // if (this.rowThis.ywFileList[i].response != undefined) {
- // this.dataSubmit.ywFileList.push(
- // this.rowThis.ywFileList[i].response.data
- // );
- // } else {
- // this.dataSubmit.ywFileList.push(this.rowThis
- // .ywFileList[i]);
- // }
- // }
- // }
- // this.dataSubmit.ywFileList.push()
- },
- fail: (response) => {
- console.log('fail', response)
- }
- })
- }
- });
- } else if (index.name == '从相册上传') {
- console.log('586', this.rowThis)
- uni.chooseImage({
- count: 1, // 默认9,设置图片的数量
- sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album'], // 可以指定来源是相册还是相机,默认二者都有
- success: function(res) {
- // 返回选定照片的本地文件路径列表 tempFilePaths
- console.log(res);
- const pathUrl = res.tempFilePaths[0]
- uni.uploadFile({
- url: 'http://61.240.156.161:28188/prod-api' +
- "/system/file/fileupload",
- filePath: pathUrl,
- name: 'file',
- header: {
- Authorization: 'Bearer ' + uni.getStorageSync('token')
- },
- success: (response) => {
- console.log('1111111111111111')
- console.log('96+', response.data)
- console.log(that.rowThis)
- let dataFile = JSON.parse(response.data)
- that.rowThis.ywFileList.push(dataFile.data)
- console.log('that.rowThis.ywFileList', that.rowThis.ywFileList)
- },
- fail: (response) => {
- console.log('fail', response)
- }
- })
- }
- });
- }
- this.showUpload = false
- },
- keep() {
- this.$refs.uForm.validate().then(res => {
- uni.showLoading({
- title: "请稍等...",
- mask: true
- })
- uni.$u.http.post("/offcial/supervision", this.content).then(res => {
- uni.showToast({
- title: "保存成功",
- icon: "none",
- mask: true,
- duration: 3000
- })
- uni.hideLoading()
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- getApp().globalData.ywListZR = []
- getApp().globalData.zerenList = []
- uni.navigateBack()
- }, 2000)
- }).catch((err) => {
- uni.showToast({
- title: err.msg,
- icon: "none",
- mask: true,
- duration: 3000
- })
- uni.hideLoading()
- })
- })
- },
- changePeople2() {
- console.log(11111111111111)
- uni.navigateTo({
- url: `/pages/tihuanren/tihuanren`
- })
- },
- handelSelect() {
- uni.navigateTo({
- url: `/pages/zerenchushi/zerenchushi`
- })
- },
- queren1() {
- // let arr = this.content.params.toEmps.split(',')
- // console.log('arr', arr)
- // if (arr.length < 2) {
- // uni.showToast({
- // title: "请选择两位带班领导",
- // icon: "none",
- // mask: true,
- // duration: 1000
- // })
- // } else {
- this.peoShow1 = false
- // }
- },
- checkboxChange(newValues) {
- // let selectedCount = newValues.filter(value => value).length;
- // if (selectedCount > 2) {
- // // 如果选中项超过两个,取消最早选中的复选框
- // let earliestSelectedIndex = newValues.findIndex(value => value);
- // newValues[earliestSelectedIndex] = false;
- // uni.showToast({
- // title: "只能选择两位带班领导",
- // icon: "none",
- // mask: true,
- // duration: 1000
- // })
- // }
- this.value1 = newValues;
- this.content.params.toEmps = newValues.join(',')
- let arr = []
- this.userList.forEach(res => {
- newValues.forEach(res1 => {
- console.log(res.NO, res1)
- if (res.NO == res1) {
- arr.push(res.Name)
- }
- })
- })
- this.content.toEmpsName = arr.join(',')
- },
- infoSourceChange(val) {
- console.log("db_template", this.db_template);
- console.log('val', val);
- this.infoSourceContent = this.db_template[val - 1].text;
- },
- changePeople1() {
- if (this.content.targetDate == null || this.content.targetDate == undefined || this.content.targetDate ==
- '') {
- uni.showToast({
- title: "请先选择调班日期",
- icon: "none"
- })
- } else {
- uni.navigateTo({
- url: "/pages/tiaobanPeople/tiaobanPeople?dataChange=" + this.content.targetDate
- })
- }
- },
- typeChange(e) {
- this.show1 = true
- this.typeDate = e
- },
- // 查询请假类型
- getDicts() {
- uni.$u.http.get('/system/dict/data/type/leave_type').then(res => {
- this.statusList = res.data.map((item, index) => {
- let obj = {
- value: item.dictValue,
- id: item.dictValue,
- text: item.dictLabel
- }
- return obj
- })
- })
- },
- // 印章类型
- getDictsYongzhang() {
- uni.$u.http.get('/system/dict/data/type/signet_type').then(res => {
- this.yongzhangList = res.data.map((item, index) => {
- let obj = {
- value: item.dictValue,
- id: item.dictValue,
- text: item.dictLabel
- }
- return obj
- })
- })
- },
- // 信息来源
- getDictsInfo() {
- uni.$u.http.get('/system/dict/data/type/info_source').then(res => {
- this.InfoList = res.data.map((item, index) => {
- let obj = {
- value: item.dictValue,
- id: item.dictValue,
- text: item.dictLabel
- }
- return obj
- })
- })
- uni.$u.http.get('/system/dict/data/type/db_template').then(res => {
- this.db_template = res.data.map((item, index) => {
- let obj = {
- value: item.dictValue,
- id: item.dictValue,
- text: item.dictLabel
- }
- return obj
- })
- })
- },
- //提交待办
- submit() {
- console.log("this.content", this.content);
- this.$refs.uForm.validate().then(res => {
- uni.showLoading({
- title: "请稍等...",
- mask: true
- })
- switch (this.fkFlow) {
- case '006':
- uni.$u.http.post("/system/work/startOutWork", this.content).then(res => {
- if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
- uni.showToast({
- title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
- .data.VarAcceptersName,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else if (res.data.VarAcceptersName == "结束") {
- uni.showToast({
- title: res.data.Message,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else {
- uni.showToast({
- title: res.data.Message.replace(/[@]/g, ""),
- icon: "none",
- mask: true,
- duration: 3000
- })
- }
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 2000)
- }).catch(res => {
- uni.hideLoading()
- uni.showToast({
- title: "请稍后重试",
- icon: "none"
- })
- })
- break
- case '007':
- uni.$u.http.post("/system/registration/startTeacherOut", this.content).then(res => {
- if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
- uni.showToast({
- title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
- .data.VarAcceptersName,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else if (res.data.VarAcceptersName == "结束") {
- uni.showToast({
- title: res.data.Message,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else {
- uni.showToast({
- title: res.data.Message.replace(/[@]/g, ""),
- icon: "none",
- mask: true,
- duration: 3000
- })
- }
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 2000)
- }).catch(res => {
- uni.hideLoading()
- uni.showToast({
- title: "请稍后重试",
- icon: "none"
- })
- })
- break
- case '009':
- uni.$u.http.post("/oa/leave/startLeave", this.content).then(res => {
- if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
- uni.showToast({
- title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
- .data.VarAcceptersName,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else if (res.data.VarAcceptersName == "结束") {
- uni.showToast({
- title: res.data.Message,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else {
- uni.showToast({
- title: res.data.Message.replace(/[@]/g, ""),
- icon: "none",
- mask: true,
- duration: 3000
- })
- }
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 2000)
- }).catch(res => {
- uni.hideLoading()
- uni.showToast({
- title: "请稍后重试",
- icon: "none"
- })
- })
- break
- case '015':
- uni.$u.http.post("/offcial/car/startApplyCar", this.content).then(res => {
- if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
- uni.showToast({
- title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
- .data.VarAcceptersName,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else if (res.data.VarAcceptersName == "结束") {
- uni.showToast({
- title: res.data.Message,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else {
- uni.showToast({
- title: res.data.Message.replace(/[@]/g, ""),
- icon: "none",
- mask: true,
- duration: 3000
- })
- }
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 2000)
- }).catch(res => {
- uni.hideLoading()
- uni.showToast({
- title: res.msg,
- icon: "none"
- })
- })
- break
- case '020':
- uni.$u.http.post("duty/dutyAdjust/startDutyAdjust", this.content).then(res => {
- if (res.data.VarToNodeID == 2004) {
- uni.$u.http.post('duty/dutyAdjust/updateYwDutyAdjustAudit', {
- workId: res.data.workid,
- status: this.YorN,
- msg: "无",
- }, {
- header: {
- // 'content-Type: 'multipart/form-data'
- 'content-Type': 'application/x-www-form-urlencoded'
- }
- }
- )
- if (this.YorN == 1) {
- uni.$u.http.post('/duty/dutyAdjust/execAdjustDuty', {
- workId: res.data.workid
- }, {
- header: {
- // 'content-Type: 'multipart/form-data'
- 'content-Type': 'application/x-www-form-urlencoded'
- }
- })
- }
- }
- if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
- uni.showToast({
- title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
- .data.VarAcceptersName,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else if (res.data.VarAcceptersName == "结束") {
- uni.showToast({
- title: res.data.Message,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else {
- uni.showToast({
- title: res.data.Message.replace(/[@]/g, ""),
- icon: "none",
- mask: true,
- duration: 3000
- })
- }
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 3000)
- }).catch(res => {
- console.log('res', res)
- uni.hideLoading()
- uni.showToast({
- title: res.msg,
- icon: "none"
- })
- })
- break
- case '017':
- this.content.fileId = this.rowThis.ywFileList[0].fileId
- uni.$u.http.post("/offcial/seal/startUsingSeal", this.content).then(res => {
- if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
- uni.showToast({
- title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
- .data.VarAcceptersName,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else if (res.data.VarAcceptersName == "结束") {
- uni.showToast({
- title: res.data.Message,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else {
- uni.showToast({
- title: res.data.Message.replace(/[@]/g, ""),
- icon: "none",
- mask: true,
- duration: 3000
- })
- }
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 3000)
- }).catch(res => {
- console.log('res', res)
- uni.hideLoading()
- uni.showToast({
- title: res.msg,
- icon: "none"
- })
- })
- break
- case '018':
- uni.$u.http.post("/offcial/seal/startUsingHtSeal", this.content).then(res => {
- if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
- uni.showToast({
- title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
- .data.VarAcceptersName,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else if (res.data.VarAcceptersName == "结束") {
- uni.showToast({
- title: res.data.Message,
- icon: "none",
- mask: true,
- duration: 3000
- })
- } else {
- uni.showToast({
- title: res.data.Message.replace(/[@]/g, ""),
- icon: "none",
- mask: true,
- duration: 3000
- })
- }
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 3000)
- }).catch(res => {
- console.log('res', res)
- uni.hideLoading()
- uni.showToast({
- title: res.msg,
- icon: "none"
- })
- })
- break
- case '016':
- uni.$u.http.post("/offcial/supervision", this.content).then(res => {
- uni.showToast({
- title: "保存成功",
- icon: "none",
- mask: true,
- duration: 3000
- })
- uni.$emit('query', {
- a: 'back'
- })
- setTimeout(() => {
- uni.navigateBack()
- }, 2000)
- }).catch(res => {
- uni.hideLoading()
- uni.showToast({
- title: "请稍后重试",
- icon: "none"
- })
- })
- break
- }
- }).catch(errors => {
- console.log(errors)
- })
- },
- //日历选择
- confirm(e) {
- switch (this.fkFlow) {
- case '006':
- this.content.startTime = e[0]
- this.content.endTime = e[e.length - 1]
- this.$refs.uForm.validateField("startTime")
- break
- case '007':
- this.content.startTime = e[0]
- this.content.endTime = e[e.length - 1]
- this.$refs.uForm.validateField("startTime")
- break
- case '009':
- this.content.leaveStartTime = e[0]
- this.content.leaveEndTime = e[e.length - 1]
- console.log(this.content.leaveStartTime, this.content.leaveEndTime)
- uni.$u.http.post(
- `/oa/attendance/getDays?startDate=${this.content.leaveStartTime}&endDate=${this.content.leaveEndTime}`
- ).then(res => {
- this.content.leaveNumber = res.data
- })
- // if (e[0] == e[e.length - 1]) {
- // this.content.leaveNumber = 1
- // } else {
- // this.content.leaveNumber = e.length
- // }
- this.$refs.uForm.validateField("leaveStartTime")
- break
- case '015':
- this.content.startUseTime = e[0]
- this.content.endUseTime = e[e.length - 1]
- if (e[0] == e[e.length - 1]) {
- this.content.dayNum = 1
- } else {
- this.content.dayNum = e.length
- }
- this.$refs.uForm.validateField("startUseTime")
- break
- }
- this.show = false
- },
- confirmOne(e) {
- console.log('e', e)
- console.log(this.typeDate)
- switch (this.fkFlow) {
- case '020':
- if (this.typeDate == 'zhiban') {
- this.content.srcDate = e[0]
- } else if (this.typeDate == 'tiaoban') {
- this.content.targetDate = e[0]
- }
- break
- case '017':
- if (this.typeDate == 'yongzhang') {
- console.log('11')
- this.content.useTime = e[0]
- }
- break
- case '018':
- if (this.typeDate == 'yongzhang') {
- console.log('11')
- this.content.useTime = e[0]
- }
- break
- case '016':
- if (this.typeDate == 'shixian') {
- console.log('11')
- this.content.doneTime = e[0]
- }
- break
- }
- this.show1 = false
- },
- groupChange(e) {
- this.content.provinceType = e
- },
- radioChange(e) {
- console.log(e)
- this.content.params.toEmps = e.NO
- this.content.toEmpsName = e.Name
- },
- radioChange1(e) {
- console.log('65846', e)
- this.content.params.toEmps = e.NO
- this.content.toEmpsName = e.Name
- },
- cancel() {
- this.peoShow = false
- this.content.params.toEmps = null
- this.content.toEmpsName = null
- this.value = null
- },
- cancel1() {
- this.peoShow1 = false
- this.content.params.toEmps = null
- this.content.toEmpsName = null
- this.value1 = null
- },
- queren() {
- this.peoShow = false
- },
- getContent(v) {
- switch (v) {
- case '006':
- this.content = {
- outWorkDept: uni.getStorageSync('userInfo').dept.deptName,
- userName: uni.getStorageSync('userInfo').nickName,
- destination: null,
- provinceType: '0',
- startTime: null,
- endTime: null,
- reason: null,
- toEmpsName: null,
- params: {
- toEmps: null
- }
- }
- break
- case '007':
- this.content = {
- userName: uni.getStorageSync('userInfo').nickName,
- leaveTpye: null,
- trainName: null,
- destination: null,
- startTime: null,
- endTime: null,
- teacherTitle: null,
- numberOfParticipants: null
- }
- break
- case '009':
- this.content = {
- name: uni.getStorageSync('userInfo').nickName,
- deptId: uni.getStorageSync('userInfo').dept.deptId,
- inviteUnit: null,
- leaveStartTime: null,
- leaveEndTime: null,
- leaveNumber: null,
- leaveReason: null,
- params: {}
- }
- if (this.fzr == true) {
- this.content.params.toEmps = null
- this.content.toEmpsName = null
- }
- break
- case '015':
- this.content = {
- startUseTime: null,
- phone: null,
- endUseTime: null,
- dayNum: null,
- addres: null,
- useMessage: null,
- carNum: null,
- createBy: uni.getStorageSync('userInfo').nickName,
- params: {}
- }
- if (this.fzr == true) {
- this.content.params.toEmps = null
- this.content.toEmpsName = null
- }
- break
- case '020':
- this.content = {
- outWorkDept: uni.getStorageSync('userInfo').dept.deptName,
- srcDate: null,
- phone: null,
- dayNum: null,
- addres: null,
- nickNameTh: null,
- targetDate: null,
- carNum: null,
- userId: uni.getStorageSync('userInfo').userId,
- deptId: uni.getStorageSync('userInfo').deptId,
- createBy: uni.getStorageSync('userInfo').nickName,
- params: {},
- adjustUserId: null,
- user: null
- }
- if (this.Jld == false) {
- console.log('1111111111111111111111')
- this.content.params.toEmps = null
- this.content.toEmpsName = null
- }
- break
- case '017':
- this.content = {
- useDept: uni.getStorageSync('userInfo').dept.deptName,
- useTime: null,
- phone: null,
- dayNum: null,
- addres: null,
- carNum: null,
- userId: uni.getStorageSync('userInfo').userId,
- deptId: uni.getStorageSync('userInfo').deptId,
- createBy: uni.getStorageSync('userInfo').nickName,
- params: {},
- adjustUserId: null,
- user: null
- }
- if (this.fzr == true) {
- this.content.params.toEmps = null
- this.content.toEmpsName = null
- }
- break
- case '018':
- this.content = {
- useDept: uni.getStorageSync('userInfo').dept.deptName,
- useTime: null,
- phone: null,
- dayNum: null,
- addres: null,
- carNum: null,
- userId: uni.getStorageSync('userInfo').userId,
- deptId: uni.getStorageSync('userInfo').deptId,
- createBy: uni.getStorageSync('userInfo').nickName,
- params: {},
- adjustUserId: null,
- user: null
- }
- if (this.fzr == true) {
- this.content.params.toEmps = null
- this.content.toEmpsName = null
- }
- break
- case '016':
- this.content = {
- title: null,
- departmentHead: uni.getStorageSync('userInfo').nickName + '-' + uni.getStorageSync(
- 'userInfo').dept.deptName,
- userId: uni.getStorageSync('userInfo').userId,
- deptId: uni.getStorageSync('userInfo').deptId,
- params: {},
- adjustUserId: null,
- prersonLiable: null
- }
- break
- }
- },
- getRules(v) {
- switch (v) {
- case '006':
- this.rules = this.rules1
- break
- case '007':
- this.rules = this.rules2
- break
- case '009':
- this.rules = this.rules3
- break
- case '015':
- this.rules = this.rules4
- break
- case '020':
- this.rules = this.rules5
- break
- case '017':
- this.rules = this.rules6
- break
- case '018':
- this.rules = this.rules7
- break
- case '016':
- this.rules = this.rules8
- break
- }
- },
- //获取接收人信息
- getPeoList(v) {
- uni.$u.http.get(`/jflow/restful/GenerNextStepNodeEmpsNoWorkId?flowNo=${v}&toNodeID=1703`).then(res => {
- this.deptList = res.Depts
- this.userList = res.Emps
- console.log(this.deptList)
- console.log(this.userList)
- })
- }
- },
- onReady() {
- //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
- // if()
- this.$refs.uForm.setRules(this.rules)
- },
- }
- </script>
- <style lang="scss" scoped>
- .content {
- font-size: 32rpx;
- }
- .tab {
- width: 48%;
- height: 100%;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .active {
- color: #2979ff
- }
- </style>
|