shenqing.vue 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526
  1. <template>
  2. <view style="background-color: #fff;" v-if="content != null">
  3. <view style="height: 100%;overflow: auto;">
  4. <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm" :rules="rules"
  5. :labelStyle="{fontSize:'32rpx'}" labelWidth="130">
  6. <view v-if="fkFlow == '006'">
  7. <u-form-item label="出差处室:" borderBottom prop="outWorkDept">
  8. <u--input v-model="content.outWorkDept" border="none" readonly></u--input>
  9. </u-form-item>
  10. <u-form-item label="出差人:" borderBottom prop="userName">
  11. <u--input v-model="content.userName" border="none" readonly></u--input>
  12. </u-form-item>
  13. <u-form-item label="目的地:" borderBottom prop="destination">
  14. <view>
  15. <view>
  16. <u-radio-group v-model="content.provinceType" @change="groupChange">
  17. <u-radio :customStyle="{marginRight: '40rpx'}" key="0" label="省内" name="0">
  18. </u-radio>
  19. <u-radio key="1" label="省外" name="1"> </u-radio>
  20. </u-radio-group>
  21. </view>
  22. <view style="margin-top: 20rpx;">
  23. <u--input v-model="content.destination" border="none" placeholder="请填写目的地"></u--input>
  24. </view>
  25. </view>
  26. </u-form-item>
  27. <u-form-item label="起止日期:" borderBottom prop="startTime" @click="show = true">
  28. <view :style="{color:content.startTime==null?'rgb(192, 196, 204)':''}">
  29. {{content.startTime == null?'请选择起止日期':content.startTime+' 至 '+content.endTime}}
  30. </view>
  31. </u-form-item>
  32. <u-form-item label="出差事由:" borderBottom prop="reason">
  33. <u--textarea v-model="content.reason" placeholder="请填写出差事由" border="none"
  34. height="100"></u--textarea>
  35. </u-form-item>
  36. <u-form-item label="接收人:" borderBottom prop="toEmpsName" @click="peoShow = true">
  37. <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
  38. {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
  39. </view>
  40. </u-form-item>
  41. </view>
  42. <view v-if="fkFlow == '007'">
  43. <u-form-item label="申请人:" borderBottom prop="userName">
  44. <u--input v-model="content.userName" border="none" readonly></u--input>
  45. </u-form-item>
  46. <u-form-item label="邀请单位:" borderBottom prop="inviteUnit">
  47. <u--input v-model="content.inviteUnit" border="none" placeholder="请填写邀请单位"></u--input>
  48. </u-form-item>
  49. <u-form-item label="培训名称:" borderBottom prop="trainName">
  50. <u--input v-model="content.trainName" border="none" placeholder="请填写培训名称"></u--input>
  51. </u-form-item>
  52. <u-form-item label="目的地:" borderBottom prop="destination">
  53. <u--input v-model="content.destination" border="none" placeholder="请填写目的地"></u--input>
  54. </u-form-item>
  55. <u-form-item label="起止日期:" borderBottom prop="startTime" @click="show = true">
  56. <view :style="{color:content.startTime==null?'rgb(192, 196, 204)':''}">
  57. {{content.startTime == null?'请选择起止日期':content.startTime+' 至 '+content.endTime}}
  58. </view>
  59. </u-form-item>
  60. <u-form-item label="授课题目:" borderBottom prop="teacherTitle">
  61. <u--input v-model="content.teacherTitle" border="none" placeholder="请填写授课题目"></u--input>
  62. </u-form-item>
  63. <u-form-item label="参加人数:" borderBottom prop="numberOfParticipants">
  64. <u--input v-model="content.numberOfParticipants" border="none" placeholder="请填写参加人数"></u--input>
  65. </u-form-item>
  66. </view>
  67. <view v-if="fkFlow == '021'">
  68. <u-form-item label="姓名:" borderBottom ref="item1">
  69. <u--input v-model="content.name" border="none" readonly></u--input>
  70. </u-form-item>
  71. <u-form-item label="请(休)假类别:" borderBottom prop="leaveTpye">
  72. <uni-data-select v-model="content.leaveTpye" :clear="false" placeholder="请选择请假类别"
  73. :localdata="statusList"></uni-data-select>
  74. </u-form-item>
  75. <u-form-item label="起止日期:" borderBottom prop="leaveStartTime" @click="show = true">
  76. <view :style="{color:content.leaveStartTime==null?'rgb(192, 196, 204)':''}">
  77. {{content.leaveStartTime == null?'请选择起止日期':content.leaveStartTime+' 至 '+content.leaveEndTime}}
  78. </view>
  79. </u-form-item>
  80. <u-form-item label="请(休)假天数:" borderBottom ref="item1">
  81. <u--input v-model="content.leaveNumber" border="none" readonly
  82. placeholder="请填写请(休)假天数"></u--input>
  83. </u-form-item>
  84. <u-form-item label="请(休)假事由:" borderBottom prop="leaveReason">
  85. <u--textarea v-model="content.leaveReason" placeholder="请填写请(休)假事由" border="none"
  86. height="100"></u--textarea>
  87. </u-form-item>
  88. <u-form-item label="接收人:" borderBottom prop="toEmpsName" v-if="fzr == true" @click="peoShow = true">
  89. <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
  90. {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
  91. </view>
  92. </u-form-item>
  93. </view>
  94. <view v-if="fkFlow == '015'">
  95. <u-form-item label="申请人:" borderBottom ref="item1">
  96. <u--input v-model="content.createBy" border="none" readonly></u--input>
  97. </u-form-item>
  98. <u-form-item label="联系电话:" borderBottom prop="phone" ref="item1">
  99. <u--input v-model="content.phone" placeholder="请输入联系电话" border="none"></u--input>
  100. </u-form-item>
  101. <u-form-item label="用车日期:" borderBottom prop="startUseTime" @click="show = true">
  102. <view :style="{color:content.startUseTime==null?'rgb(192, 196, 204)':''}">
  103. {{content.startUseTime == null?'请选择起止日期':content.startUseTime+' 至 '+content.endUseTime}}
  104. </view>
  105. </u-form-item>
  106. <u-form-item label="用车天数:" borderBottom ref="item1">
  107. <u--input v-model="content.dayNum" border="none" readonly placeholder="请填写用车天数"></u--input>
  108. </u-form-item>
  109. <u-form-item label="乘车人数:" borderBottom prop="carNum" ref="item1">
  110. <u--input v-model="content.carNum" border="none" type="number" placeholder="请填写乘车人数"></u--input>
  111. </u-form-item>
  112. <u-form-item label="目的地:" borderBottom prop="addres" ref="item1">
  113. <u--textarea v-model="content.addres" placeholder="请填写目的地" border="none"
  114. height="100"></u--textarea>
  115. </u-form-item>
  116. <u-form-item label="用途:" borderBottom prop="useMessage">
  117. <u--textarea v-model="content.useMessage" placeholder="请填写用途" border="none"
  118. height="100"></u--textarea>
  119. </u-form-item>
  120. <u-form-item label="接收人:" borderBottom prop="toEmpsName" v-if="fzr == true" @click="peoShow = true">
  121. <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
  122. {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
  123. </view>
  124. </u-form-item>
  125. </view>
  126. <view v-if="fkFlow == '020'">
  127. <u-form-item label="申请人:" borderBottom ref="item1">
  128. <u--input v-model="content.createBy" border="none" readonly></u--input>
  129. </u-form-item>
  130. <u-form-item label="所在处室:" borderBottom prop="outWorkDept" ref="item1">
  131. <u--input v-model="content.outWorkDept" placeholder="请输入所在处室" border="none"></u--input>
  132. </u-form-item>
  133. <!-- <u-form-item label="值班日期:" borderBottom prop="srcDate" @click="typeChange('zhiban')">
  134. <view>
  135. {{content.srcDate}}
  136. </view>
  137. </u-form-item> -->
  138. <u-form-item label="调班日期:" prop="targetDate" @click="typeChange('tiaoban')" borderBottom
  139. ref="item1">
  140. <view>
  141. {{content.targetDate}}
  142. </view>
  143. </u-form-item>
  144. <u-form-item label="调班人:" @click='changePeople1' borderBottom prop="user" ref="item1">
  145. <view class="">
  146. {{content.user}}
  147. </view>
  148. </u-form-item>
  149. <u-form-item label="替换人:" @click='changePeople2' borderBottom prop="nickNameTh" ref="item1">
  150. <view class="">
  151. {{content.nickNameTh}}
  152. </view>
  153. </u-form-item>
  154. <u-form-item label="接收人:" borderBottom prop="toEmpsName" v-if="Jld == false"
  155. @click="peoShow1 = true">
  156. <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
  157. {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
  158. </view>
  159. </u-form-item>
  160. </view>
  161. <view v-if="fkFlow == '017'">
  162. <u-form-item label="用章人:" borderBottom ref="item1">
  163. <u--input v-model="content.createBy" border="none" readonly></u--input>
  164. </u-form-item>
  165. <u-form-item label="用章处室:" borderBottom prop="useDept" ref="item1">
  166. <u--input v-model="content.useDept" placeholder="请输入用章处室" border="none"></u--input>
  167. </u-form-item>
  168. <u-form-item label="用章日期:" borderBottom prop="useTime" @click="typeChange('yongzhang')">
  169. <view>
  170. {{content.useTime}}
  171. </view>
  172. </u-form-item>
  173. <u-form-item label="印章类别:" borderBottom prop="signetType">
  174. <uni-data-select v-model="content.signetType" :clear="false" placeholder="请选择印章类别"
  175. :localdata="yongzhangList"></uni-data-select>
  176. </u-form-item>
  177. <u-form-item label="用章事由:" borderBottom prop="usingReason" ref="item1">
  178. <u--textarea type="textarea" v-model="content.usingReason" placeholder="请输入用章事由"
  179. border="none"></u--textarea>
  180. </u-form-item>
  181. <u-form-item label="主送单位:" borderBottom prop="activeSend" ref="item1">
  182. <u--textarea type="textarea" v-model="content.activeSend" placeholder="请输入主送单位"
  183. border="none"></u--textarea>
  184. </u-form-item>
  185. <u-form-item label="盖章份数:" borderBottom prop="signetCopies" ref="item1">
  186. <u--input type="textarea" v-model="content.signetCopies" placeholder="请输入盖章份数"
  187. border="none"></u--input>
  188. </u-form-item>
  189. <u-form-item label="接收人:" borderBottom prop="toEmpsName" v-if="fzr == true" @click="peoShow = true">
  190. <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
  191. {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
  192. </view>
  193. </u-form-item>
  194. </view>
  195. <view v-if="fkFlow == '018'">
  196. <u-form-item label="用章人:" borderBottom ref="item1">
  197. <u--input v-model="content.createBy" border="none" readonly></u--input>
  198. </u-form-item>
  199. <u-form-item label="用章处室:" borderBottom prop="useDept" ref="item1">
  200. <u--input v-model="content.useDept" placeholder="请输入用章处室" border="none"></u--input>
  201. </u-form-item>
  202. <u-form-item label="用章日期:" borderBottom prop="useTime" @click="typeChange('yongzhang')">
  203. <view>
  204. {{content.useTime}}
  205. </view>
  206. </u-form-item>
  207. <u-form-item label="合同名称:" borderBottom prop="usingReason" ref="item1">
  208. <u--textarea type="textarea" v-model="content.usingReason" placeholder="请输入合同名称"
  209. border="none"></u--textarea>
  210. </u-form-item>
  211. <u-form-item label="主送单位:" borderBottom prop="activeSend" ref="item1">
  212. <u--textarea type="textarea" v-model="content.activeSend" placeholder="请输入主送单位"
  213. border="none"></u--textarea>
  214. </u-form-item>
  215. <u-form-item label="盖章份数:" borderBottom prop="signetCopies" ref="item1">
  216. <u--input type="textarea" v-model="content.signetCopies" placeholder="请输入盖章份数"
  217. border="none"></u--input>
  218. </u-form-item>
  219. <u-form-item label="接收人:" borderBottom prop="toEmpsName" v-if="fzr == true" @click="peoShow = true">
  220. <view :style="{color:content.toEmpsName==null?'rgb(192, 196, 204)':''}">
  221. {{content.params.toEmps == null?'请选择接收人':content.toEmpsName}}
  222. </view>
  223. </u-form-item>
  224. </view>
  225. <view v-if="fkFlow == '016'">
  226. <u-form-item label="督办事项:" borderBottom prop="title">
  227. <u--input placeholder='请输入督办事项' v-model="content.title" border="none"></u--input>
  228. </u-form-item>
  229. <!-- <u-form-item label="处室及负责人:" borderBottom prop="departmentHead">
  230. <u--input v-model="content.departmentHead" border="none" readonly></u--input>
  231. </u-form-item> -->
  232. <!-- <u-form-item label="信息类别:" borderBottom prop="infoType">
  233. <u--textarea type="textarea" v-model="content.infoType" placeholder="请输入信息类别"
  234. border="none"></u--textarea>
  235. </u-form-item> -->
  236. <u-form-item label="督办来源:" borderBottom prop="infoSource">
  237. <uni-data-select @change="infoSourceChange" v-model="content.infoSource" :clear="false"
  238. placeholder="请选择督办来源" :localdata="InfoList"></uni-data-select>
  239. </u-form-item>
  240. <u-form-item label="督办内容:" borderBottom prop="infoSourceContent">
  241. <u--textarea type="textarea" v-model="content.infoSourceContent"
  242. :placeholder="infoSourceContent" border="none"></u--textarea>
  243. </u-form-item>
  244. <u-form-item label="完成时限:" @click="typeChange('shixian')" borderBottom prop="doneTime">
  245. <view>
  246. {{content.doneTime}}
  247. </view>
  248. <!-- <u--input v-model="content.doneTime" border="none" readonly></u--input> -->
  249. </u-form-item>
  250. <!-- <u-form-item label="完成时限内容:" borderBottom prop="doneContent">
  251. <u--textarea type="textarea" v-model="content.doneContent" placeholder="**月**日
  252. ****要求/文件要求/部门确定" border="none"></u--textarea>
  253. </u-form-item> -->
  254. <!-- <u-form-item label="议定事项:" borderBottom prop="itemPostil">
  255. <u--textarea type="textarea" v-model="content.itemPostil" placeholder="请输入议定事项"
  256. border="none"></u--textarea>
  257. </u-form-item> -->
  258. <u-form-item label="责任处室:" borderBottom prop="prersonLiable">
  259. <u--textarea disabled style="width: 190rpx;" type="textarea" v-model="content.prersonLiable"
  260. placeholder="请选择责任处室" border="none"></u--textarea>
  261. <u-button size="small" type="primary" text="选择" @click="handelSelect"
  262. style="margin-top: 40rpx;width: 50rpx;margin-right: 10rpx;"></u-button>
  263. </u-form-item>
  264. </view>
  265. <view style="padding: 0 20rpx;">
  266. <u-button type="primary" v-if="fkFlow=='016'" text="保存" @click="keep"
  267. style="margin-top: 40rpx;"></u-button>
  268. <u-button type="primary" v-else text="提交" @click="submit" style="margin-top: 40rpx;"></u-button>
  269. </view>
  270. </u--form>
  271. </view>
  272. <u-calendar :show="show" mode="range" allowSameDay @confirm="confirm" @close="show = false"></u-calendar>
  273. <u-calendar placeholder="请选择日期" :show="show1" mode="single" allowSameDay @confirm="confirmOne"
  274. @close="show1 = false"></u-calendar>
  275. <u-modal :show="peoShow" title="选择接收人" showCancelButton @cancel="cancel" @confirm="queren">
  276. <view style="width: 100%;height: 40vh;overflow: auto;" v-if="peoShow == true">
  277. <u-radio-group v-model="value" @change="radioChange" iconPlacement="right">
  278. <u-collapse accordion style="width: 100%;">
  279. <u-collapse-item :title="v.Name" :name="v.No" :key="v.No" v-for="v in deptList"
  280. style="width: 100%;">
  281. <view style="font-size: 32rpx; padding: 20rpx 0; border-bottom: 1px solid #eaeaea;"
  282. v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
  283. <u-radio :label="i.Name" :name="i"></u-radio>
  284. </view>
  285. </u-collapse-item>
  286. </u-collapse>
  287. </u-radio-group>
  288. </view>
  289. </u-modal>
  290. <u-modal :show="peoShow1" title="请选择带班领导" showCancelButton @cancel="cancel1" @confirm="queren1">
  291. <view style="width: 100%;height: 40vh;overflow: auto;" v-if="peoShow1 == true">
  292. <u-radio-group v-model="value1" @change="radioChange1" iconPlacement="right">
  293. <u-collapse accordion style="width: 100%;">
  294. <u-collapse-item :title="v.Name" :name="v.No" :key="v.No" v-for="v in deptList"
  295. style="width: 100%;">
  296. <view style="font-size: 32rpx; padding: 20rpx 0; border-bottom: 1px solid #eaeaea;"
  297. v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
  298. <u-radio :label="i.Name" :name="i"></u-radio>
  299. </view>
  300. </u-collapse-item>
  301. </u-collapse>
  302. </u-radio-group>
  303. </view>
  304. </u-modal>
  305. <!-- <u-modal :show="peoShow1" title="请选择带班领导" showCancelButton @cancel="cancel1" @confirm="queren1">
  306. <view style="width: 100%;height: 40vh;overflow: auto;" v-if="peoShow1 == true">
  307. <u-radio-group v-model="value1" @change="radioChange1" iconPlacement="right">
  308. <u-collapse accordion style="width: 100%;">
  309. <u-collapse-item :title="v.Name" :name="v.No" :key="v.No" v-for="v in deptList"
  310. style="width: 100%;">
  311. <view style="font-size: 32rpx; padding: 20rpx 0; border-bottom: 1px solid #eaeaea;"
  312. v-for=" i in userList" :key="i.NO" v-if="i.FK_Dept == v.No">
  313. <u-radio :label="i.Name" :name="i.NO" :checked="value1.includes(i.NO)"></u-radio>
  314. </view>
  315. </u-collapse-item>
  316. </u-collapse>
  317. </u-radio-group>
  318. </view>
  319. </u-modal> -->
  320. </view>
  321. </template>
  322. <script>
  323. import {
  324. handleTree
  325. } from '../../utils/wjw'
  326. // import uButton from "../../uni_modules/uview-ui/components/u-button/u-button.vue"
  327. export default {
  328. data() {
  329. return {
  330. peoShow1: false,
  331. YorN: "1",
  332. InfoList: [],
  333. db_template: [],
  334. infoSourceContent: null,
  335. typeDate: null,
  336. yongzhangList: [],
  337. workid: null,
  338. flowNo: null,
  339. id: null,
  340. content: {},
  341. statusList: [],
  342. //上个页面传过来的参数
  343. parameter: null,
  344. fkFlow: null, // 006 中层出差 007 外出授课备案 021请假 015用车
  345. show: false, //日历
  346. show1: false, //日历
  347. fzr: false, //判断是否是负责人
  348. Jld: false,
  349. peoShow: false,
  350. deptList: [], //部门列表
  351. userList: [], //人员列表
  352. value: null,
  353. value1: [],
  354. rules: {},
  355. rules1: {
  356. destination: {
  357. type: 'string',
  358. required: true,
  359. message: '请填写目的地',
  360. trigger: ['blur', 'change']
  361. },
  362. startTime: {
  363. type: 'string',
  364. required: true,
  365. message: '请选择起止日期',
  366. trigger: ['blur', 'change']
  367. },
  368. reason: {
  369. type: 'string',
  370. required: true,
  371. message: '请填写出差事由',
  372. trigger: ['blur', 'change']
  373. },
  374. toEmpsName: {
  375. type: 'string',
  376. required: true,
  377. message: '请选择接收人',
  378. trigger: ['blur', 'change']
  379. },
  380. },
  381. rules2: {
  382. inviteUnit: {
  383. type: 'string',
  384. required: true,
  385. message: '请填写邀请单位',
  386. trigger: ['blur', 'change']
  387. },
  388. trainName: {
  389. type: 'string',
  390. required: true,
  391. message: '请填写培训名称',
  392. trigger: ['blur', 'change']
  393. },
  394. destination: {
  395. type: 'string',
  396. required: true,
  397. message: '请填写目的地',
  398. trigger: ['blur', 'change']
  399. },
  400. startTime: {
  401. type: 'string',
  402. required: true,
  403. message: '请选择起止时间',
  404. trigger: ['blur', 'change']
  405. },
  406. teacherTitle: {
  407. type: 'string',
  408. required: true,
  409. message: '请填写授课题目',
  410. trigger: ['blur', 'change']
  411. },
  412. numberOfParticipants: {
  413. type: 'number',
  414. required: true,
  415. message: '请填写参加人数',
  416. trigger: ['blur', 'change']
  417. },
  418. },
  419. rules3: {
  420. leaveTpye: {
  421. type: 'string',
  422. required: true,
  423. message: '请填写请假类别',
  424. trigger: ['blur', 'change']
  425. },
  426. leaveStartTime: {
  427. type: 'string',
  428. required: true,
  429. message: '请选择起止时间',
  430. trigger: ['blur', 'change']
  431. },
  432. leaveReason: {
  433. type: 'string',
  434. required: true,
  435. message: '请填写请假事由',
  436. trigger: ['blur', 'change']
  437. },
  438. toEmpsName: {
  439. type: 'string',
  440. required: true,
  441. message: '请选择接收人',
  442. trigger: ['blur', 'change']
  443. },
  444. user: {
  445. type: 'string',
  446. required: true,
  447. message: '请选择调班人',
  448. trigger: ['blur', 'change']
  449. },
  450. },
  451. rules4: {
  452. phone: [{
  453. required: true,
  454. message: '请输入手机号',
  455. trigger: ['change', 'blur'],
  456. },
  457. {
  458. // 自定义验证函数,见上说明
  459. validator: (rule, value, callback) => {
  460. // 上面有说,返回true表示校验通过,返回false表示不通过
  461. // uni.$u.test.mobile()就是返回true或者false的
  462. return uni.$u.test.mobile(value);
  463. },
  464. message: '手机号码不正确',
  465. // 触发器可以同时用blur和change
  466. trigger: ['change', 'blur'],
  467. }
  468. ],
  469. addres: {
  470. type: 'string',
  471. required: true,
  472. message: '请填写目的地',
  473. trigger: ['blur', 'change']
  474. },
  475. startUseTime: {
  476. type: 'string',
  477. required: true,
  478. message: '请选择起止时间',
  479. trigger: ['blur', 'change']
  480. },
  481. useMessage: {
  482. type: 'string',
  483. required: true,
  484. message: '请填写用途',
  485. trigger: ['blur', 'change']
  486. },
  487. carNum: {
  488. type: 'number',
  489. required: true,
  490. message: '请填写乘车人数',
  491. trigger: ['blur', 'change']
  492. },
  493. toEmpsName: {
  494. type: 'string',
  495. required: true,
  496. message: '请选择接收人',
  497. trigger: ['blur', 'change']
  498. },
  499. },
  500. rules5: {
  501. srcDate: {
  502. type: 'string',
  503. required: true,
  504. message: '请选择值班日期',
  505. trigger: ['blur', 'change']
  506. },
  507. targetDate: {
  508. type: 'string',
  509. required: true,
  510. message: '请选择调班日期',
  511. trigger: ['blur', 'change']
  512. },
  513. toEmpsName: {
  514. type: 'string',
  515. required: true,
  516. message: '请选择接收人',
  517. trigger: ['blur', 'change']
  518. },
  519. user: {
  520. type: 'string',
  521. required: true,
  522. message: '请选择调班人',
  523. trigger: ['blur', 'change']
  524. },
  525. nickNameTh: {
  526. type: 'string',
  527. required: true,
  528. message: '请选择替换人',
  529. trigger: ['blur', 'change']
  530. }
  531. },
  532. rules6: {
  533. useTime: {
  534. type: 'string',
  535. required: true,
  536. message: '请选择用章日期',
  537. trigger: ['blur', 'change']
  538. },
  539. signetType: {
  540. type: 'string',
  541. required: true,
  542. message: '请选择印章类别',
  543. trigger: ['blur', 'change']
  544. },
  545. usingReason: [{
  546. required: true,
  547. trigger: "blur",
  548. message: "请输入用章事由"
  549. }, ],
  550. activeSend: [{
  551. required: true,
  552. trigger: "blur",
  553. message: "请输入主送单位"
  554. }, ],
  555. signetCopies: [{
  556. required: true,
  557. trigger: "blur",
  558. message: "请输入盖章份数"
  559. }, ],
  560. toEmpsName: {
  561. type: 'string',
  562. required: true,
  563. message: '请选择接收人',
  564. trigger: ['blur', 'change']
  565. },
  566. },
  567. rules7: {
  568. usingReason: [{
  569. required: true,
  570. trigger: "blur",
  571. message: "请输入合同名称"
  572. }, ],
  573. activeSend: [{
  574. required: true,
  575. trigger: "blur",
  576. message: "请输入主送单位"
  577. }, ],
  578. signetCopies: [{
  579. required: true,
  580. trigger: "blur",
  581. message: "请输入盖章份数"
  582. }, ],
  583. useTime: [{
  584. required: true,
  585. message: "请选择用章日期",
  586. trigger: "change",
  587. }, ],
  588. signetType: [{
  589. required: true,
  590. message: "请选择印章类型",
  591. trigger: "change",
  592. }, ],
  593. toEmpsName: {
  594. type: 'string',
  595. required: true,
  596. message: '请选择接收人',
  597. trigger: ['blur', 'change']
  598. },
  599. },
  600. rules8: {
  601. title: [{
  602. required: true,
  603. message: "请输入督办事项",
  604. trigger: "blur",
  605. }, ],
  606. infoType: [{
  607. required: true,
  608. message: "请输入信息类别",
  609. trigger: "blur",
  610. }, ],
  611. departmentHead: [{
  612. required: true,
  613. message: "请输入处室及负责人",
  614. trigger: "blur",
  615. }, ],
  616. infoSource: [{
  617. required: true,
  618. message: "请选择督办来源",
  619. trigger: "change",
  620. }, ],
  621. doneTime: [{
  622. required: true,
  623. message: "请选择完成时限",
  624. trigger: "change",
  625. }, ],
  626. infoSourceContent: [{
  627. required: true,
  628. message: "请输入督办内容",
  629. trigger: "blur",
  630. }, ],
  631. doneContent: [{
  632. required: true,
  633. message: "请输入完成时限内容",
  634. trigger: "blur",
  635. }, ],
  636. itemPostil: [{
  637. required: true,
  638. message: "请输入议定事项",
  639. trigger: "blur",
  640. }, ],
  641. prersonLiable: [{
  642. required: true,
  643. message: "请选择责任处室",
  644. trigger: "blur",
  645. }, ],
  646. }
  647. }
  648. },
  649. onLoad(options) {
  650. this.content.ywSupervisionStartUserList = null
  651. this.content.prersonLiable = null
  652. getApp().globalData.zerenList = null
  653. getApp().globalData.ywListZR = null
  654. let that = this
  655. let roles = uni.getStorageSync('userInfo').roles
  656. if (options.fkFlow == '006' || options.fkFlow == '016' || options.fkFlow == '020') {
  657. this.getPeoList(options.fkFlow)
  658. }
  659. for (let i in roles) {
  660. if (roles[i].roleKey == 'chushifzr' && options.fkFlow == '021' || roles[i].roleKey == 'chushifzr' &&
  661. options.fkFlow == '015' || roles[i].roleKey == 'chushifzr' && options.fkFlow == '020' || roles[i]
  662. .roleKey == 'chushifzr' && options.fkFlow == '017') {
  663. this.fzr = true
  664. this.getPeoList(options.fkFlow)
  665. break
  666. }
  667. if (roles[i].roleKey == 'jld') {
  668. this.Jld = true
  669. }
  670. }
  671. that.parameter = options
  672. that.fkFlow = options.fkFlow
  673. that.type = options.type
  674. that.workid = options.workid
  675. that.flowNo = options.flowNo
  676. uni.setNavigationBarTitle({
  677. title: options.title
  678. })
  679. if (options.fkFlow == '021') {
  680. this.getDicts()
  681. }
  682. if (options.fkFlow == '017' || options.fkFlow == '018') {
  683. this.getDictsYongzhang()
  684. }
  685. if (options.fkFlow == '016') {
  686. this.getDictsInfo()
  687. }
  688. this.getContent(options.fkFlow)
  689. this.getRules(options.fkFlow)
  690. },
  691. onShow() {
  692. uni.$once('query', (query) => {
  693. if (query.a == 'one') {
  694. this.content.adjustUserId = getApp().globalData.adjustUserId
  695. this.content.user = getApp().globalData.user
  696. console.log('this.content.adjustUserId', this.content.adjustUserId)
  697. // this.content.userList = getApp().globalData.peoList
  698. // this.$forceUpdate()
  699. } else if (query.a == 'two') {
  700. // let arrPeo = this.content.prersonLiable.split(",");
  701. // let arr = getApp().globalData.zerenList.split(',')
  702. // arr = arr.concat(this.content.prersonLiable)
  703. this.content.prersonLiable = getApp().globalData.zerenList
  704. // this.content.prersonLiable = arr.join(" , ");
  705. this.content.ywSupervisionStartUserList = getApp().globalData.ywListZR
  706. console.log('content', this.content)
  707. // else {
  708. // this.content.prersonLiable = getApp().globalData.zerenList
  709. // }
  710. } else if (query.a == 'three') {
  711. this.content.replaceUserId = getApp().globalData.thList
  712. this.content.nickNameTh = getApp().globalData.tihuanList
  713. console.log('this.content.replaceUserId', this.content.replaceUserId)
  714. console.log('this.content.nickNameTh', this.content.nickNameTh)
  715. // this.content.userList=getApp().globalData.peoList2.join(",")
  716. // this.$forceUpdate()
  717. }
  718. })
  719. },
  720. methods: {
  721. keep() {
  722. this.$refs.uForm.validate().then(res => {
  723. uni.showLoading({
  724. title: "请稍等...",
  725. mask: true
  726. })
  727. uni.$u.http.post("/offcial/supervision", this.content).then(res => {
  728. uni.showToast({
  729. title: "保存成功",
  730. icon: "none",
  731. mask: true,
  732. duration: 3000
  733. })
  734. uni.hideLoading()
  735. uni.$emit('query', {
  736. a: 'back'
  737. })
  738. setTimeout(() => {
  739. getApp().globalData.ywListZR = []
  740. getApp().globalData.zerenList = []
  741. uni.navigateBack()
  742. }, 2000)
  743. }).catch((err) => {
  744. uni.showToast({
  745. title: err.msg,
  746. icon: "none",
  747. mask: true,
  748. duration: 3000
  749. })
  750. uni.hideLoading()
  751. })
  752. })
  753. },
  754. changePeople2() {
  755. console.log(333)
  756. uni.navigateTo({
  757. url: `/pages/tihuanren/tihuanren`
  758. })
  759. },
  760. handelSelect() {
  761. uni.navigateTo({
  762. url: `/pages/zerenchushi/zerenchushi`
  763. })
  764. },
  765. queren1() {
  766. // let arr = this.content.params.toEmps.split(',')
  767. // console.log('arr', arr)
  768. // if (arr.length < 2) {
  769. // uni.showToast({
  770. // title: "请选择两位带班领导",
  771. // icon: "none",
  772. // mask: true,
  773. // duration: 1000
  774. // })
  775. // } else {
  776. this.peoShow1 = false
  777. // }
  778. },
  779. checkboxChange(newValues) {
  780. // let selectedCount = newValues.filter(value => value).length;
  781. // if (selectedCount > 2) {
  782. // // 如果选中项超过两个,取消最早选中的复选框
  783. // let earliestSelectedIndex = newValues.findIndex(value => value);
  784. // newValues[earliestSelectedIndex] = false;
  785. // uni.showToast({
  786. // title: "只能选择两位带班领导",
  787. // icon: "none",
  788. // mask: true,
  789. // duration: 1000
  790. // })
  791. // }
  792. this.value1 = newValues;
  793. this.content.params.toEmps = newValues.join(',')
  794. let arr = []
  795. this.userList.forEach(res => {
  796. newValues.forEach(res1 => {
  797. console.log(res.NO, res1)
  798. if (res.NO == res1) {
  799. arr.push(res.Name)
  800. }
  801. })
  802. })
  803. this.content.toEmpsName = arr.join(',')
  804. },
  805. infoSourceChange(val) {
  806. console.log("db_template", this.db_template);
  807. console.log('val', val);
  808. this.infoSourceContent = this.db_template[val - 1].text;
  809. },
  810. changePeople1() {
  811. if (this.content.targetDate == null || this.content.targetDate == undefined || this.content.targetDate ==
  812. '') {
  813. uni.showToast({
  814. title: "请先选择调班日期",
  815. icon: "none"
  816. })
  817. } else {
  818. uni.navigateTo({
  819. url: "/pages/tiaobanPeople/tiaobanPeople?dataChange=" + this.content.targetDate
  820. })
  821. }
  822. },
  823. typeChange(e) {
  824. this.show1 = true
  825. this.typeDate = e
  826. },
  827. // 查询请假类型
  828. getDicts() {
  829. uni.$u.http.get('/system/dict/data/type/leave_type').then(res => {
  830. this.statusList = res.data.map((item, index) => {
  831. let obj = {
  832. value: item.dictValue,
  833. id: item.dictValue,
  834. text: item.dictLabel
  835. }
  836. return obj
  837. })
  838. })
  839. },
  840. // 印章类型
  841. getDictsYongzhang() {
  842. uni.$u.http.get('/system/dict/data/type/signet_type').then(res => {
  843. this.yongzhangList = res.data.map((item, index) => {
  844. let obj = {
  845. value: item.dictValue,
  846. id: item.dictValue,
  847. text: item.dictLabel
  848. }
  849. return obj
  850. })
  851. })
  852. },
  853. // 信息来源
  854. getDictsInfo() {
  855. uni.$u.http.get('/system/dict/data/type/info_source').then(res => {
  856. this.InfoList = res.data.map((item, index) => {
  857. let obj = {
  858. value: item.dictValue,
  859. id: item.dictValue,
  860. text: item.dictLabel
  861. }
  862. return obj
  863. })
  864. })
  865. uni.$u.http.get('/system/dict/data/type/db_template').then(res => {
  866. this.db_template = res.data.map((item, index) => {
  867. let obj = {
  868. value: item.dictValue,
  869. id: item.dictValue,
  870. text: item.dictLabel
  871. }
  872. return obj
  873. })
  874. })
  875. },
  876. //提交待办
  877. submit() {
  878. console.log("this.content", this.content);
  879. this.$refs.uForm.validate().then(res => {
  880. uni.showLoading({
  881. title: "请稍等...",
  882. mask: true
  883. })
  884. switch (this.fkFlow) {
  885. case '006':
  886. uni.$u.http.post("/system/work/startOutWork", this.content).then(res => {
  887. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  888. uni.showToast({
  889. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  890. .data.VarAcceptersName,
  891. icon: "none",
  892. mask: true,
  893. duration: 3000
  894. })
  895. } else if (res.data.VarAcceptersName == "结束") {
  896. uni.showToast({
  897. title: res.data.Message,
  898. icon: "none",
  899. mask: true,
  900. duration: 3000
  901. })
  902. } else {
  903. uni.showToast({
  904. title: res.data.Message.replace(/[@]/g, ""),
  905. icon: "none",
  906. mask: true,
  907. duration: 3000
  908. })
  909. }
  910. uni.$emit('query', {
  911. a: 'back'
  912. })
  913. setTimeout(() => {
  914. uni.navigateBack()
  915. }, 2000)
  916. }).catch(res => {
  917. uni.hideLoading()
  918. uni.showToast({
  919. title: res.msg,
  920. icon: "none"
  921. })
  922. })
  923. break
  924. case '007':
  925. uni.$u.http.post("/system/registration/startTeacherOut", this.content).then(res => {
  926. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  927. uni.showToast({
  928. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  929. .data.VarAcceptersName,
  930. icon: "none",
  931. mask: true,
  932. duration: 3000
  933. })
  934. } else if (res.data.VarAcceptersName == "结束") {
  935. uni.showToast({
  936. title: res.data.Message,
  937. icon: "none",
  938. mask: true,
  939. duration: 3000
  940. })
  941. } else {
  942. uni.showToast({
  943. title: res.data.Message.replace(/[@]/g, ""),
  944. icon: "none",
  945. mask: true,
  946. duration: 3000
  947. })
  948. }
  949. uni.$emit('query', {
  950. a: 'back'
  951. })
  952. setTimeout(() => {
  953. uni.navigateBack()
  954. }, 2000)
  955. }).catch(res => {
  956. uni.hideLoading()
  957. uni.showToast({
  958. title: "请稍后重试",
  959. icon: "none"
  960. })
  961. })
  962. break
  963. case '021':
  964. uni.$u.http.post("/dzoa/leave/startLeave", this.content).then(res => {
  965. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  966. uni.showToast({
  967. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  968. .data.VarAcceptersName,
  969. icon: "none",
  970. mask: true,
  971. duration: 3000
  972. })
  973. } else if (res.data.VarAcceptersName == "结束") {
  974. uni.showToast({
  975. title: res.data.Message,
  976. icon: "none",
  977. mask: true,
  978. duration: 3000
  979. })
  980. } else {
  981. uni.showToast({
  982. title: res.data.Message.replace(/[@]/g, ""),
  983. icon: "none",
  984. mask: true,
  985. duration: 3000
  986. })
  987. }
  988. uni.$emit('query', {
  989. a: 'back'
  990. })
  991. setTimeout(() => {
  992. uni.navigateBack()
  993. }, 2000)
  994. }).catch(res => {
  995. console.log('’,', res)
  996. uni.hideLoading()
  997. uni.showToast({
  998. title: res.msg,
  999. icon: "none"
  1000. })
  1001. })
  1002. break
  1003. case '015':
  1004. uni.$u.http.post("/offcial/car/startApplyCar", this.content).then(res => {
  1005. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  1006. uni.showToast({
  1007. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  1008. .data.VarAcceptersName,
  1009. icon: "none",
  1010. mask: true,
  1011. duration: 3000
  1012. })
  1013. } else if (res.data.VarAcceptersName == "结束") {
  1014. uni.showToast({
  1015. title: res.data.Message,
  1016. icon: "none",
  1017. mask: true,
  1018. duration: 3000
  1019. })
  1020. } else {
  1021. uni.showToast({
  1022. title: res.data.Message.replace(/[@]/g, ""),
  1023. icon: "none",
  1024. mask: true,
  1025. duration: 3000
  1026. })
  1027. }
  1028. uni.$emit('query', {
  1029. a: 'back'
  1030. })
  1031. setTimeout(() => {
  1032. uni.navigateBack()
  1033. }, 2000)
  1034. }).catch(res => {
  1035. uni.hideLoading()
  1036. uni.showToast({
  1037. title: res.msg,
  1038. icon: "none"
  1039. })
  1040. })
  1041. break
  1042. case '020':
  1043. uni.$u.http.post("duty/dutyAdjust/startDutyAdjust", this.content).then(res => {
  1044. if (res.data.VarToNodeID == 2004) {
  1045. uni.$u.http.post('duty/dutyAdjust/updateYwDutyAdjustAudit', {
  1046. workId: res.data.workid,
  1047. status: this.YorN,
  1048. msg: "无",
  1049. }, {
  1050. header: {
  1051. // 'content-Type: 'multipart/form-data'
  1052. 'content-Type': 'application/x-www-form-urlencoded'
  1053. }
  1054. }
  1055. )
  1056. if (this.YorN == 1) {
  1057. uni.$u.http.post('/duty/dutyAdjust/execAdjustDuty', {
  1058. workId: res.data.workid
  1059. }, {
  1060. header: {
  1061. // 'content-Type: 'multipart/form-data'
  1062. 'content-Type': 'application/x-www-form-urlencoded'
  1063. }
  1064. })
  1065. }
  1066. }
  1067. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  1068. uni.showToast({
  1069. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  1070. .data.VarAcceptersName,
  1071. icon: "none",
  1072. mask: true,
  1073. duration: 3000
  1074. })
  1075. } else if (res.data.VarAcceptersName == "结束") {
  1076. uni.showToast({
  1077. title: res.data.Message,
  1078. icon: "none",
  1079. mask: true,
  1080. duration: 3000
  1081. })
  1082. } else {
  1083. uni.showToast({
  1084. title: res.data.Message.replace(/[@]/g, ""),
  1085. icon: "none",
  1086. mask: true,
  1087. duration: 3000
  1088. })
  1089. }
  1090. uni.$emit('query', {
  1091. a: 'back'
  1092. })
  1093. setTimeout(() => {
  1094. uni.navigateBack()
  1095. }, 3000)
  1096. }).catch(res => {
  1097. console.log('res', res)
  1098. uni.hideLoading()
  1099. uni.showToast({
  1100. title: res.msg,
  1101. icon: "none"
  1102. })
  1103. })
  1104. break
  1105. case '017':
  1106. uni.$u.http.post("/offcial/seal/startUsingSeal", this.content).then(res => {
  1107. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  1108. uni.showToast({
  1109. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  1110. .data.VarAcceptersName,
  1111. icon: "none",
  1112. mask: true,
  1113. duration: 3000
  1114. })
  1115. } else if (res.data.VarAcceptersName == "结束") {
  1116. uni.showToast({
  1117. title: res.data.Message,
  1118. icon: "none",
  1119. mask: true,
  1120. duration: 3000
  1121. })
  1122. } else {
  1123. uni.showToast({
  1124. title: res.data.Message.replace(/[@]/g, ""),
  1125. icon: "none",
  1126. mask: true,
  1127. duration: 3000
  1128. })
  1129. }
  1130. uni.$emit('query', {
  1131. a: 'back'
  1132. })
  1133. setTimeout(() => {
  1134. uni.navigateBack()
  1135. }, 3000)
  1136. }).catch(res => {
  1137. console.log('res', res)
  1138. uni.hideLoading()
  1139. uni.showToast({
  1140. title: res.msg,
  1141. icon: "none"
  1142. })
  1143. })
  1144. break
  1145. case '018':
  1146. uni.$u.http.post("/offcial/seal/startUsingHtSeal", this.content).then(res => {
  1147. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  1148. uni.showToast({
  1149. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  1150. .data.VarAcceptersName,
  1151. icon: "none",
  1152. mask: true,
  1153. duration: 3000
  1154. })
  1155. } else if (res.data.VarAcceptersName == "结束") {
  1156. uni.showToast({
  1157. title: res.data.Message,
  1158. icon: "none",
  1159. mask: true,
  1160. duration: 3000
  1161. })
  1162. } else {
  1163. uni.showToast({
  1164. title: res.data.Message.replace(/[@]/g, ""),
  1165. icon: "none",
  1166. mask: true,
  1167. duration: 3000
  1168. })
  1169. }
  1170. uni.$emit('query', {
  1171. a: 'back'
  1172. })
  1173. setTimeout(() => {
  1174. uni.navigateBack()
  1175. }, 3000)
  1176. }).catch(res => {
  1177. console.log('res', res)
  1178. uni.hideLoading()
  1179. uni.showToast({
  1180. title: res.msg,
  1181. icon: "none"
  1182. })
  1183. })
  1184. break
  1185. case '016':
  1186. uni.$u.http.post("/offcial/supervision", this.content).then(res => {
  1187. uni.showToast({
  1188. title: "保存成功",
  1189. icon: "none",
  1190. mask: true,
  1191. duration: 3000
  1192. })
  1193. uni.$emit('query', {
  1194. a: 'back'
  1195. })
  1196. setTimeout(() => {
  1197. uni.navigateBack()
  1198. }, 2000)
  1199. }).catch(res => {
  1200. uni.hideLoading()
  1201. uni.showToast({
  1202. title: "请稍后重试",
  1203. icon: "none"
  1204. })
  1205. })
  1206. break
  1207. }
  1208. }).catch(errors => {
  1209. console.log(errors)
  1210. })
  1211. },
  1212. //日历选择
  1213. confirm(e) {
  1214. switch (this.fkFlow) {
  1215. case '006':
  1216. this.content.startTime = e[0]
  1217. this.content.endTime = e[e.length - 1]
  1218. this.$refs.uForm.validateField("startTime")
  1219. break
  1220. case '007':
  1221. this.content.startTime = e[0]
  1222. this.content.endTime = e[e.length - 1]
  1223. this.$refs.uForm.validateField("startTime")
  1224. break
  1225. case '021':
  1226. this.content.leaveStartTime = e[0]
  1227. this.content.leaveEndTime = e[e.length - 1]
  1228. console.log(this.content.leaveStartTime, this.content.leaveEndTime)
  1229. uni.$u.http.post(
  1230. `/oa/attendance/getDays?startDate=${this.content.leaveStartTime}&endDate=${this.content.leaveEndTime}`
  1231. ).then(res => {
  1232. this.content.leaveNumber = res.data
  1233. })
  1234. // if (e[0] == e[e.length - 1]) {
  1235. // this.content.leaveNumber = 1
  1236. // } else {
  1237. // this.content.leaveNumber = e.length
  1238. // }
  1239. this.$refs.uForm.validateField("leaveStartTime")
  1240. break
  1241. case '015':
  1242. this.content.startUseTime = e[0]
  1243. this.content.endUseTime = e[e.length - 1]
  1244. if (e[0] == e[e.length - 1]) {
  1245. this.content.dayNum = 1
  1246. } else {
  1247. this.content.dayNum = e.length
  1248. }
  1249. this.$refs.uForm.validateField("startUseTime")
  1250. break
  1251. }
  1252. this.show = false
  1253. },
  1254. confirmOne(e) {
  1255. console.log('e', e)
  1256. console.log(this.typeDate)
  1257. switch (this.fkFlow) {
  1258. case '020':
  1259. if (this.typeDate == 'zhiban') {
  1260. this.content.srcDate = e[0]
  1261. } else if (this.typeDate == 'tiaoban') {
  1262. this.content.targetDate = e[0]
  1263. }
  1264. break
  1265. case '017':
  1266. if (this.typeDate == 'yongzhang') {
  1267. console.log('11')
  1268. this.content.useTime = e[0]
  1269. }
  1270. break
  1271. case '018':
  1272. if (this.typeDate == 'yongzhang') {
  1273. console.log('11')
  1274. this.content.useTime = e[0]
  1275. }
  1276. break
  1277. case '016':
  1278. if (this.typeDate == 'shixian') {
  1279. console.log('11')
  1280. this.content.doneTime = e[0]
  1281. }
  1282. break
  1283. }
  1284. this.show1 = false
  1285. },
  1286. groupChange(e) {
  1287. this.content.provinceType = e
  1288. },
  1289. radioChange(e) {
  1290. console.log(e)
  1291. this.content.params.toEmps = e.NO
  1292. this.content.toEmpsName = e.Name
  1293. },
  1294. radioChange1(e) {
  1295. console.log('65846', e)
  1296. this.content.params.toEmps = e.NO
  1297. this.content.toEmpsName = e.Name
  1298. },
  1299. cancel() {
  1300. this.peoShow = false
  1301. this.content.params.toEmps = null
  1302. this.content.toEmpsName = null
  1303. this.value = null
  1304. },
  1305. cancel1() {
  1306. this.peoShow1 = false
  1307. this.content.params.toEmps = null
  1308. this.content.toEmpsName = null
  1309. this.value1 = null
  1310. },
  1311. queren() {
  1312. this.peoShow = false
  1313. },
  1314. getContent(v) {
  1315. switch (v) {
  1316. case '006':
  1317. this.content = {
  1318. outWorkDept: uni.getStorageSync('userInfo').dept.deptName,
  1319. userName: uni.getStorageSync('userInfo').nickName,
  1320. destination: null,
  1321. provinceType: '0',
  1322. startTime: null,
  1323. endTime: null,
  1324. reason: null,
  1325. toEmpsName: null,
  1326. params: {
  1327. toEmps: null
  1328. }
  1329. }
  1330. break
  1331. case '007':
  1332. this.content = {
  1333. userName: uni.getStorageSync('userInfo').nickName,
  1334. leaveTpye: null,
  1335. trainName: null,
  1336. destination: null,
  1337. startTime: null,
  1338. endTime: null,
  1339. teacherTitle: null,
  1340. numberOfParticipants: null
  1341. }
  1342. break
  1343. case '021':
  1344. this.content = {
  1345. name: uni.getStorageSync('userInfo').nickName,
  1346. deptId: uni.getStorageSync('userInfo').dept.deptId,
  1347. inviteUnit: null,
  1348. leaveStartTime: null,
  1349. leaveEndTime: null,
  1350. leaveNumber: null,
  1351. leaveReason: null,
  1352. params: {}
  1353. }
  1354. if (this.fzr == true) {
  1355. this.content.params.toEmps = null
  1356. this.content.toEmpsName = null
  1357. }
  1358. break
  1359. case '015':
  1360. this.content = {
  1361. startUseTime: null,
  1362. phone: null,
  1363. endUseTime: null,
  1364. dayNum: null,
  1365. addres: null,
  1366. useMessage: null,
  1367. carNum: null,
  1368. createBy: uni.getStorageSync('userInfo').nickName,
  1369. params: {}
  1370. }
  1371. if (this.fzr == true) {
  1372. this.content.params.toEmps = null
  1373. this.content.toEmpsName = null
  1374. }
  1375. break
  1376. case '020':
  1377. this.content = {
  1378. outWorkDept: uni.getStorageSync('userInfo').dept.deptName,
  1379. srcDate: null,
  1380. phone: null,
  1381. dayNum: null,
  1382. addres: null,
  1383. nickNameTh: null,
  1384. targetDate: null,
  1385. carNum: null,
  1386. userId: uni.getStorageSync('userInfo').userId,
  1387. deptId: uni.getStorageSync('userInfo').deptId,
  1388. createBy: uni.getStorageSync('userInfo').nickName,
  1389. params: {},
  1390. adjustUserId: null,
  1391. user: null
  1392. }
  1393. if (this.Jld == false) {
  1394. console.log('222222')
  1395. this.content.params.toEmps = null
  1396. this.content.toEmpsName = null
  1397. }
  1398. break
  1399. case '017':
  1400. this.content = {
  1401. useDept: uni.getStorageSync('userInfo').dept.deptName,
  1402. useTime: null,
  1403. phone: null,
  1404. dayNum: null,
  1405. addres: null,
  1406. carNum: null,
  1407. userId: uni.getStorageSync('userInfo').userId,
  1408. deptId: uni.getStorageSync('userInfo').deptId,
  1409. createBy: uni.getStorageSync('userInfo').nickName,
  1410. params: {},
  1411. adjustUserId: null,
  1412. user: null
  1413. }
  1414. if (this.fzr == true) {
  1415. this.content.params.toEmps = null
  1416. this.content.toEmpsName = null
  1417. }
  1418. break
  1419. case '018':
  1420. this.content = {
  1421. useDept: uni.getStorageSync('userInfo').dept.deptName,
  1422. useTime: null,
  1423. phone: null,
  1424. dayNum: null,
  1425. addres: null,
  1426. carNum: null,
  1427. userId: uni.getStorageSync('userInfo').userId,
  1428. deptId: uni.getStorageSync('userInfo').deptId,
  1429. createBy: uni.getStorageSync('userInfo').nickName,
  1430. params: {},
  1431. adjustUserId: null,
  1432. user: null
  1433. }
  1434. if (this.fzr == true) {
  1435. this.content.params.toEmps = null
  1436. this.content.toEmpsName = null
  1437. }
  1438. break
  1439. case '016':
  1440. this.content = {
  1441. title: null,
  1442. departmentHead: uni.getStorageSync('userInfo').nickName + '-' + uni.getStorageSync(
  1443. 'userInfo').dept.deptName,
  1444. userId: uni.getStorageSync('userInfo').userId,
  1445. deptId: uni.getStorageSync('userInfo').deptId,
  1446. params: {},
  1447. adjustUserId: null,
  1448. prersonLiable: null
  1449. }
  1450. break
  1451. }
  1452. },
  1453. getRules(v) {
  1454. switch (v) {
  1455. case '006':
  1456. this.rules = this.rules1
  1457. break
  1458. case '007':
  1459. this.rules = this.rules2
  1460. break
  1461. case '021':
  1462. this.rules = this.rules3
  1463. break
  1464. case '015':
  1465. this.rules = this.rules4
  1466. break
  1467. case '020':
  1468. this.rules = this.rules5
  1469. break
  1470. case '017':
  1471. this.rules = this.rules6
  1472. break
  1473. case '018':
  1474. this.rules = this.rules7
  1475. break
  1476. case '016':
  1477. this.rules = this.rules8
  1478. break
  1479. }
  1480. },
  1481. //获取接收人信息
  1482. getPeoList(v) {
  1483. uni.$u.http.get(`/jflow/restful/GenerNextStepNodeEmpsNoWorkId?flowNo=${v}&toNodeID=2003`).then(res => {
  1484. this.deptList = res.Depts
  1485. this.userList = res.Emps
  1486. console.log(this.deptList)
  1487. console.log(this.userList)
  1488. })
  1489. }
  1490. },
  1491. onReady() {
  1492. //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。
  1493. // if()
  1494. this.$refs.uForm.setRules(this.rules)
  1495. },
  1496. }
  1497. </script>
  1498. <style lang="scss" scoped>
  1499. .content {
  1500. font-size: 32rpx;
  1501. }
  1502. .tab {
  1503. width: 48%;
  1504. height: 100%;
  1505. box-sizing: border-box;
  1506. display: flex;
  1507. align-items: center;
  1508. justify-content: center;
  1509. }
  1510. .active {
  1511. color: #2979ff
  1512. }
  1513. </style>