shenqing.vue 53 KB

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