index.vue 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. ref="queryForm"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <el-form-item prop="unitId">
  11. <el-select
  12. v-model="queryParams.peopleId"
  13. placeholder="请选择用车人姓名"
  14. @change="handleQuery"
  15. filterable
  16. class="input_xiala"
  17. >
  18. <el-option
  19. v-for="item in renYuans"
  20. :key="item.id"
  21. :label="item.name"
  22. :value="item.id"
  23. class="input_xiala"
  24. >
  25. </el-option>
  26. </el-select>
  27. </el-form-item>
  28. <el-form-item>
  29. <!-- <el-button
  30. type="primary"
  31. icon="el-icon-search"
  32. size="mini"
  33. @click="handleQuery"
  34. >搜索</el-button
  35. > -->
  36. <el-button size="btr" @click="resetQuery">重置</el-button>
  37. </el-form-item>
  38. </el-form>
  39. <el-row :gutter="10" class="mb8">
  40. <el-col :span="1.5">
  41. <el-button
  42. type="primary"
  43. plain
  44. icon="el-icon-plus"
  45. size="mini"
  46. @click="handleAdd"
  47. v-hasPermi="['militaryvehicleManagement:thebusApply:add']"
  48. >新增</el-button
  49. >
  50. </el-col>
  51. <el-col :span="1.5">
  52. <el-button
  53. type="success"
  54. plain
  55. icon="el-icon-edit"
  56. size="mini"
  57. :disabled="single"
  58. @click="handleUpdate"
  59. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  60. >修改</el-button
  61. >
  62. </el-col>
  63. <el-col :span="1.5">
  64. <el-button
  65. type="danger"
  66. plain
  67. icon="el-icon-delete"
  68. size="mini"
  69. :disabled="multiple"
  70. @click="handleDelete"
  71. v-hasPermi="['militaryvehicleManagement:thebusApply:remove']"
  72. >删除</el-button
  73. >
  74. </el-col>
  75. <el-col :span="1.5">
  76. <el-button
  77. class="box"
  78. type="warning"
  79. plain
  80. icon="el-icon-download"
  81. size="mini"
  82. :loading="exportLoading"
  83. @click="handleExport"
  84. v-hasPermi="['militaryvehicleManagement:thebusApply:export']"
  85. >导出</el-button
  86. >
  87. </el-col>
  88. <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
  89. </el-row>
  90. <!-- 列表选项 -->
  91. <el-table
  92. v-loading="loading"
  93. :data="thebusApplyList"
  94. @selection-change="handleSelectionChange"
  95. :header-cell-style="{ background: '#003C69', color: 'white' }"
  96. >
  97. <el-table-column type="selection" width="55" align="center" />
  98. <el-table-column label="序号" align="center" prop="id">
  99. <template scope="scope">
  100. <span>{{
  101. (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
  102. }}</span>
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="人数" align="center" prop="peopleCount" />
  106. <el-table-column
  107. label="单位"
  108. align="center"
  109. prop="unitName"
  110. width="150"
  111. />
  112. <el-table-column label="人员名称" align="center" prop="peopleName" />
  113. <el-table-column
  114. label="联系方式"
  115. align="center"
  116. prop="contact"
  117. width="130"
  118. />
  119. <el-table-column label="外出事由" align="center" prop="cause" />
  120. <el-table-column
  121. label="申请时间"
  122. align="center"
  123. prop="authStime"
  124. width="100"
  125. >
  126. <template slot-scope="scope">
  127. <span>{{ parseTime(scope.row.authStime, "{y}-{m}-{d}") }}</span>
  128. </template>
  129. </el-table-column>
  130. <el-table-column
  131. label="所在单位审批人"
  132. align="center"
  133. prop="unitPeopleName"
  134. width="120"
  135. />
  136. <el-table-column label="所在单位审批状态" align="center" width="130">
  137. <template slot-scope="scope">
  138. <el-col v-if="scope.row.unitPeopleState == 1" style="color: #ffba00"
  139. >未处理</el-col
  140. >
  141. <el-col v-if="scope.row.unitPeopleState == 2" style="color: #13ce66"
  142. >已审批</el-col
  143. >
  144. <el-col
  145. v-if="scope.row.unitPeopleState == 3"
  146. :title="scope.row.unitPeopleRemark"
  147. style="color: #00eaff"
  148. >已驳回</el-col
  149. >
  150. <el-col
  151. v-if="scope.row.unitPeopleState == 4"
  152. :title="scope.row.unitPeopleRemark"
  153. style="color: #1d96ff"
  154. >特殊审批</el-col
  155. >
  156. </template>
  157. </el-table-column>
  158. <el-table-column label="初审状态" align="center">
  159. <template slot-scope="scope">
  160. <el-col v-if="scope.row.chushenState == 1" style="color: #ffba00"
  161. >未处理</el-col
  162. >
  163. <el-col v-if="scope.row.chushenState == 2" style="color: #13ce66"
  164. >已审批</el-col
  165. >
  166. <el-col
  167. v-if="scope.row.chushenState == 3"
  168. :title="scope.row.chushenRemark"
  169. style="color: #00eaff"
  170. >已驳回</el-col
  171. >
  172. <el-col
  173. v-if="scope.row.chushenState == 4"
  174. :title="scope.row.chushenRemark"
  175. style="color: #1d96ff"
  176. >特殊审批</el-col
  177. >
  178. </template>
  179. </el-table-column>
  180. <el-table-column
  181. label="一级审批人"
  182. align="center"
  183. prop="peopleoneName"
  184. width="90"
  185. />
  186. <el-table-column label="一级审批状态" align="center" width="100">
  187. <template slot-scope="scope">
  188. <el-col v-if="scope.row.peopleoneState == 1" style="color: #ffba00"
  189. >未处理</el-col
  190. >
  191. <el-col v-if="scope.row.peopleoneState == 2" style="color: #13ce66"
  192. >已审批</el-col
  193. >
  194. <el-col
  195. v-if="scope.row.peopleoneState == 3"
  196. :title="scope.row.peopleoneRemark"
  197. style="color: #00eaff"
  198. >已驳回</el-col
  199. >
  200. <el-col
  201. v-if="scope.row.peopleoneState == 4"
  202. :title="scope.row.peopleoneRemark"
  203. style="color: #1d96ff"
  204. >特殊审批</el-col
  205. >
  206. </template>
  207. </el-table-column>
  208. <el-table-column
  209. label="二级审批人"
  210. align="center"
  211. prop="peopletwoName"
  212. width="90"
  213. />
  214. <el-table-column label="二级审批状态" align="center" width="100">
  215. <template slot-scope="scope">
  216. <el-col v-if="scope.row.peopletwoState == 1" style="color: #ffba00"
  217. >未处理</el-col
  218. >
  219. <el-col v-if="scope.row.peopletwoState == 2" style="color: #13ce66"
  220. >已审批</el-col
  221. >
  222. <el-col
  223. v-if="scope.row.peopletwoState == 3"
  224. :title="scope.row.peopletwoRemark"
  225. style="color: #00eaff"
  226. >已驳回</el-col
  227. >
  228. <el-col
  229. v-if="scope.row.peopletwoState == 4"
  230. :title="scope.row.peopletwoRemark"
  231. style="color: #1d96ff"
  232. >特殊审批</el-col
  233. >
  234. </template>
  235. </el-table-column>
  236. <el-table-column
  237. label="三级审批人"
  238. align="center"
  239. prop="peoplethreeName"
  240. width="90"
  241. />
  242. <el-table-column label="三级审批状态" align="center" width="100">
  243. <template slot-scope="scope">
  244. <el-col v-if="scope.row.peoplethreeState == 1" style="color: #ffba00"
  245. >未处理</el-col
  246. >
  247. <el-col v-if="scope.row.peoplethreeState == 2" style="color: #13ce66"
  248. >已审批</el-col
  249. >
  250. <el-col
  251. v-if="scope.row.peoplethreeState == 3"
  252. :title="scope.row.peoplethreeRemark"
  253. style="color: #00eaff"
  254. >已驳回</el-col
  255. >
  256. <el-col
  257. v-if="scope.row.peoplethreeState == 4"
  258. :title="scope.row.peoplethreeRemark"
  259. style="color: #1d96ff"
  260. >特殊审批</el-col
  261. >
  262. </template>
  263. </el-table-column>
  264. <el-table-column
  265. fixed="right"
  266. label="操作"
  267. align="center"
  268. class-name="small-padding fixed-width"
  269. width="220"
  270. class="shenpis"
  271. >
  272. <template slot-scope="scope">
  273. <div
  274. v-if="
  275. scope.row.isTeShu == '1' &&
  276. scope.row.shenpijiedian != '2' &&
  277. scope.row.yingjicaozuoren != 'oneji'
  278. "
  279. style="display: inline-block"
  280. >
  281. <!-- 1 -->
  282. <el-button
  283. size="bts"
  284. type="text"
  285. v-if="
  286. scope.row.peopleoneState == '1' &&
  287. scope.row.shenpijiedian == '3'
  288. "
  289. @click="handleTeShuShenPi(scope.row)"
  290. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  291. style="width: 100px"
  292. >特殊审批</el-button
  293. >
  294. <!-- 2 -->
  295. <el-button
  296. size="bts"
  297. type="text"
  298. v-if="
  299. scope.row.peopletwoState == '1' &&
  300. scope.row.shenpijiedian == '4'
  301. "
  302. @click="handleTeShuShenPi(scope.row)"
  303. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  304. >特殊审批</el-button
  305. >
  306. <!-- 3 -->
  307. <el-button
  308. size="bts"
  309. type="text"
  310. v-if="
  311. scope.row.peoplethreeState == '1' &&
  312. scope.row.shenpijiedian == '5'
  313. "
  314. @click="handleTeShuShenPi(scope.row)"
  315. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  316. >特殊审批</el-button
  317. >
  318. </div>
  319. <div
  320. v-if="scope.row.status == '1' && scope.row.isCaoZuo == '0'"
  321. style="display: inline-block"
  322. >
  323. <!-- 1 -->
  324. <el-button
  325. size="btc"
  326. type="text"
  327. v-if="
  328. scope.row.unitPeopleState == '1' &&
  329. scope.row.shenpijiedian == '1' &&
  330. scope.row.yingjicaozuoren == 'yingji'
  331. "
  332. @click="handleShenPi(scope.row)"
  333. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  334. >审批</el-button
  335. >
  336. <!-- 2 -->
  337. <el-button
  338. size="btc"
  339. type="text"
  340. v-if="
  341. scope.row.chushenState == '1' &&
  342. scope.row.shenpijiedian == '2' &&
  343. scope.row.chushenyuan == 'chushen'
  344. "
  345. @click="handleShenPi(scope.row)"
  346. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  347. >审批</el-button
  348. >
  349. <!-- 3 -->
  350. <el-button
  351. size="btc"
  352. type="text"
  353. v-if="
  354. scope.row.peopleoneState == '1' &&
  355. scope.row.shenpijiedian == '3' &&
  356. scope.row.yingjicaozuoren == 'oneji'
  357. "
  358. @click="handleShenPi(scope.row)"
  359. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  360. >审批</el-button
  361. >
  362. <!-- 4 -->
  363. <el-button
  364. size="btc"
  365. type="text"
  366. v-if="
  367. scope.row.peopletwoState == '1' &&
  368. scope.row.shenpijiedian == '4' &&
  369. scope.row.yingjicaozuoren == 'twoji'
  370. "
  371. @click="handleShenPi(scope.row)"
  372. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  373. >审批</el-button
  374. >
  375. <!-- 5 -->
  376. <el-button
  377. size="btc"
  378. type="text"
  379. v-if="
  380. scope.row.peoplethreeState == '1' &&
  381. scope.row.shenpijiedian == '5' &&
  382. scope.row.yingjicaozuoren == 'threeji'
  383. "
  384. @click="handleShenPi(scope.row)"
  385. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  386. >审批</el-button
  387. >
  388. </div>
  389. <el-button
  390. size="btu"
  391. type="text"
  392. @click="handleUpdate(scope.row)"
  393. v-hasPermi="['militaryvehicleManagement:thebusApply:edit']"
  394. >修改</el-button
  395. >
  396. <el-button
  397. size="btd"
  398. type="text"
  399. @click="handleDelete(scope.row)"
  400. v-hasPermi="['militaryvehicleManagement:thebusApply:remove']"
  401. >删除</el-button
  402. >
  403. </template>
  404. </el-table-column>
  405. </el-table>
  406. <pagination
  407. v-show="total > 0"
  408. :total="total"
  409. :page.sync="queryParams.pageNum"
  410. :limit.sync="queryParams.pageSize"
  411. @pagination="getList"
  412. />
  413. <!-- 添加或修改用车申请对话框 -->
  414. <el-dialog
  415. :title="title"
  416. :visible.sync="open"
  417. width="500px"
  418. append-to-body
  419. :close-on-click-modal="false"
  420. >
  421. <el-form
  422. ref="form"
  423. :model="form"
  424. :rules="rules"
  425. label-width="80px"
  426. inline
  427. >
  428. <el-form-item label="单位" prop="unitId">
  429. <treeselect
  430. v-model="form.unitId"
  431. :options="treeList"
  432. placeholder="选择单位"
  433. @select="selectPeo"
  434. />
  435. </el-form-item>
  436. <el-form-item label="人数" prop="peopleCount">
  437. <el-input v-model="form.peopleCount" placeholder="请输入人数" />
  438. </el-form-item>
  439. <el-form-item label="人员名称" prop="peopleId">
  440. <el-select
  441. v-model="form.peopleId"
  442. placeholder="请选择人员名称"
  443. filterable
  444. >
  445. <el-option
  446. v-for="(item, i) in renYuan"
  447. :key="i"
  448. :label="item.name"
  449. :value="item.id"
  450. @click.native="cheRen(item.name)"
  451. class="input_xiala"
  452. >
  453. </el-option>
  454. </el-select>
  455. </el-form-item>
  456. <el-form-item label="联系方式" prop="contact">
  457. <el-input v-model="form.contact" placeholder="请输入联系方式" />
  458. </el-form-item>
  459. <el-form-item label="出车路线" prop="route">
  460. <el-input v-model="form.route" placeholder="请输入出车路线" />
  461. </el-form-item>
  462. <el-form-item label="用车开始时间" prop="authStime">
  463. <el-date-picker
  464. clearable
  465. size="small"
  466. v-model="form.authStime"
  467. type="datetime"
  468. default-time="00:00:00"
  469. value-format="yyyy-MM-dd HH:mm:ss"
  470. placeholder="用车开始时间"
  471. >
  472. </el-date-picker>
  473. </el-form-item>
  474. <el-form-item label="用车结束时间" prop="authEtime">
  475. <el-date-picker
  476. clearable
  477. size="small"
  478. v-model="form.authEtime"
  479. type="datetime"
  480. placeholder="用车结束时间"
  481. >
  482. </el-date-picker>
  483. </el-form-item>
  484. <el-form-item label="所在单位审批" prop="unitPeopleId">
  485. <el-select
  486. v-model="form.unitPeopleId"
  487. placeholder="请选择所在单位审批人"
  488. filterable
  489. >
  490. <el-option
  491. v-for="(item, i) in userRen"
  492. :key="i"
  493. :label="item.nickName"
  494. :value="item.userId"
  495. @click.native="yinJi(item.nickName)"
  496. class="input_xiala"
  497. >
  498. </el-option>
  499. </el-select>
  500. </el-form-item>
  501. <el-form-item label="审批模板" prop="thebusThemplateId">
  502. <el-select
  503. v-model="form.thebusThemplateId"
  504. placeholder="请选择审批模板"
  505. filterable
  506. >
  507. <el-option
  508. v-for="(item, i) in shenPi"
  509. :key="i"
  510. :label="item.shenpiname"
  511. :value="item.id"
  512. @click.native="shenPiThemplate(item)"
  513. class="input_xiala"
  514. >
  515. </el-option>
  516. </el-select>
  517. </el-form-item>
  518. <el-form-item label="一级审批人" prop="people1Id">
  519. <el-input
  520. v-model="form.peopleoneName"
  521. placeholder="请输入一级审批人"
  522. class="input_xiala"
  523. readonly
  524. />
  525. </el-form-item>
  526. <el-form-item label="二级审批人" prop="people2Id">
  527. <el-input
  528. v-model="form.peopletwoName"
  529. placeholder="请输入二级审批人"
  530. class="input_xiala"
  531. readonly
  532. />
  533. </el-form-item>
  534. <el-form-item label="三级审批人" prop="people3Id">
  535. <el-input
  536. v-model="form.peoplethreeName"
  537. placeholder="请输入三级审批人"
  538. class="input_xiala"
  539. readonly
  540. />
  541. </el-form-item>
  542. <div class="jiben">外出事由</div>
  543. <el-form-item label="" prop="cause">
  544. <el-input
  545. v-model="form.cause"
  546. placeholder="请输入外出事由"
  547. type="textarea"
  548. />
  549. </el-form-item>
  550. </el-form>
  551. <div slot="footer" class="dialog-footer">
  552. <el-button type="primary" @click="submitForm">确 定</el-button>
  553. <el-button @click="cancel" size="btn">取 消</el-button>
  554. </div>
  555. </el-dialog>
  556. <!-- 审批对话框 -->
  557. <el-dialog
  558. :title="title"
  559. :visible.sync="opens"
  560. width="500px"
  561. append-to-body
  562. :close-on-click-modal="false"
  563. >
  564. <el-form
  565. ref="forms"
  566. :model="form"
  567. :rules="formRules"
  568. label-width="80px"
  569. inline
  570. >
  571. <el-form-item label="单位" prop="unitId">
  572. <treeselect
  573. v-model="form.unitId"
  574. :options="treeList"
  575. placeholder="选择单位"
  576. @select="selectPeo"
  577. />
  578. </el-form-item>
  579. <el-form-item label="人数" prop="peopleCount">
  580. <el-input v-model="form.peopleCount" placeholder="请输入人数" />
  581. </el-form-item>
  582. <el-form-item label="人员名称" prop="peopleId">
  583. <el-select
  584. v-model="form.peopleId"
  585. placeholder="请选择人员名称"
  586. filterable
  587. >
  588. <el-option
  589. v-for="(item, i) in renYuan"
  590. :key="i"
  591. :label="item.name"
  592. :value="item.id"
  593. @click.native="cheRen(item.name)"
  594. >
  595. </el-option>
  596. </el-select>
  597. </el-form-item>
  598. <el-form-item label="联系方式" prop="contact">
  599. <el-input v-model="form.contact" placeholder="请输入联系方式" />
  600. </el-form-item>
  601. <el-form-item label="出车路线" prop="route">
  602. <el-input v-model="form.route" placeholder="请输入出车路线" />
  603. </el-form-item>
  604. <el-form-item label="用车开始时间" prop="authStime">
  605. <el-date-picker
  606. clearable
  607. size="small"
  608. v-model="form.authStime"
  609. type="datetime"
  610. placeholder="用车开始时间"
  611. >
  612. </el-date-picker>
  613. </el-form-item>
  614. <el-form-item label="用车结束时间" prop="authEtime">
  615. <el-date-picker
  616. clearable
  617. size="small"
  618. v-model="form.authEtime"
  619. type="datetime"
  620. placeholder="用车结束时间"
  621. >
  622. </el-date-picker>
  623. </el-form-item>
  624. <el-form-item label="所在单位审批" prop="unitPeopleId">
  625. <el-select
  626. v-model="form.unitPeopleId"
  627. placeholder="请选择所在单位审批人"
  628. filterable
  629. >
  630. <el-option
  631. v-for="(item, i) in userRen"
  632. :key="i"
  633. :label="item.nickName"
  634. :value="item.userId"
  635. @click.native="yinJi(item.nickName)"
  636. >
  637. </el-option>
  638. </el-select>
  639. </el-form-item>
  640. <el-form-item label="审批模板" prop="thebusThemplateId">
  641. <el-select
  642. v-model="form.thebusThemplateId"
  643. placeholder="请选择审批模板"
  644. filterable
  645. >
  646. <el-option
  647. v-for="(item, i) in shenPi"
  648. :key="i"
  649. :label="item.shenpiname"
  650. :value="item.id"
  651. @click.native="shenPiThemplate(item)"
  652. >
  653. </el-option>
  654. </el-select>
  655. </el-form-item>
  656. <el-form-item label="一级审批人" prop="people1Id">
  657. <el-input
  658. v-model="form.peopleoneName"
  659. placeholder="请输入一级审批人"
  660. readonly
  661. />
  662. </el-form-item>
  663. <el-form-item label="二级审批人" prop="people2Id">
  664. <el-input
  665. v-model="form.peopletwoName"
  666. placeholder="请输入二级审批人"
  667. readonly
  668. />
  669. </el-form-item>
  670. <el-form-item label="三级审批人" prop="people3Id">
  671. <el-input
  672. v-model="form.peoplethreeName"
  673. placeholder="请输入三级审批人"
  674. readonly
  675. />
  676. </el-form-item>
  677. <div class="jiben">外出事由</div>
  678. <el-form-item label="" prop="cause">
  679. <el-input
  680. v-model="form.cause"
  681. placeholder="请输入外出事由"
  682. type="textarea"
  683. />
  684. </el-form-item>
  685. <div class="jiben">不通过原因</div>
  686. <el-form-item prop="routes">
  687. <el-input v-model="form.routes" type="textarea" />
  688. </el-form-item>
  689. </el-form>
  690. <div slot="footer" class="dialog-footer">
  691. <el-button type="primary" @click="submitFormShenPi">通过</el-button>
  692. <el-button @click="cancelShenPi" size="btn">不通过</el-button>
  693. </div>
  694. </el-dialog>
  695. <!-- 特殊审批对话框 -->
  696. <el-dialog
  697. :title="title"
  698. :visible.sync="opensTe"
  699. width="500px"
  700. append-to-body
  701. :close-on-click-modal="false"
  702. >
  703. <el-form
  704. ref="formsTe"
  705. :model="form"
  706. :rules="formRulesTe"
  707. label-width="80px"
  708. inline
  709. >
  710. <el-form-item label="单位" prop="unitId">
  711. <treeselect
  712. v-model="form.unitId"
  713. :options="treeList"
  714. placeholder="选择单位"
  715. @select="selectPeo"
  716. />
  717. </el-form-item>
  718. <el-form-item label="人数" prop="peopleCount">
  719. <el-input v-model="form.peopleCount" placeholder="请输入人数" />
  720. </el-form-item>
  721. <el-form-item label="人员名称" prop="peopleId">
  722. <el-select
  723. v-model="form.peopleId"
  724. placeholder="请选择人员名称"
  725. filterable
  726. >
  727. <el-option
  728. v-for="(item, i) in renYuan"
  729. :key="i"
  730. :label="item.name"
  731. :value="item.id"
  732. @click.native="cheRen(item.name)"
  733. >
  734. </el-option>
  735. </el-select>
  736. </el-form-item>
  737. <el-form-item label="联系方式" prop="contact">
  738. <el-input v-model="form.contact" placeholder="请输入联系方式" />
  739. </el-form-item>
  740. <el-form-item label="出车路线" prop="route">
  741. <el-input v-model="form.route" placeholder="请输入出车路线" />
  742. </el-form-item>
  743. <el-form-item label="用车开始时间" prop="authStime">
  744. <el-date-picker
  745. clearable
  746. size="small"
  747. v-model="form.authStime"
  748. type="datetime"
  749. placeholder="用车开始时间"
  750. >
  751. </el-date-picker>
  752. </el-form-item>
  753. <el-form-item label="用车结束时间" prop="authEtime">
  754. <el-date-picker
  755. clearable
  756. size="small"
  757. v-model="form.authEtime"
  758. type="datetime"
  759. placeholder="用车结束时间"
  760. >
  761. </el-date-picker>
  762. </el-form-item>
  763. <el-form-item label="所在单位审批" prop="unitPeopleId">
  764. <el-select
  765. v-model="form.unitPeopleId"
  766. placeholder="请选择所在单位审批人"
  767. filterable
  768. >
  769. <el-option
  770. v-for="(item, i) in userRen"
  771. :key="i"
  772. :label="item.nickName"
  773. :value="item.userId"
  774. @click.native="yinJi(item.nickName)"
  775. >
  776. </el-option>
  777. </el-select>
  778. </el-form-item>
  779. <el-form-item label="审批模板" prop="thebusThemplateId">
  780. <el-select
  781. v-model="form.thebusThemplateId"
  782. placeholder="请选择审批模板"
  783. filterable
  784. >
  785. <el-option
  786. v-for="(item, i) in shenPi"
  787. :key="i"
  788. :label="item.shenpiname"
  789. :value="item.id"
  790. @click.native="shenPiThemplate(item)"
  791. >
  792. </el-option>
  793. </el-select>
  794. </el-form-item>
  795. <el-form-item label="一级审批人" prop="people1Id">
  796. <el-input
  797. v-model="form.peopleoneName"
  798. placeholder="请输入一级审批人"
  799. />
  800. </el-form-item>
  801. <el-form-item label="二级审批人" prop="people2Id">
  802. <el-input
  803. v-model="form.peopletwoName"
  804. placeholder="请输入二级审批人"
  805. />
  806. </el-form-item>
  807. <el-form-item label="三级审批人" prop="people3Id">
  808. <el-input
  809. v-model="form.peoplethreeName"
  810. placeholder="请输入三级审批人"
  811. />
  812. </el-form-item>
  813. <div class="jiben">外出事由</div>
  814. <el-form-item label="" prop="cause">
  815. <el-input
  816. v-model="form.cause"
  817. placeholder="请输入外出事由"
  818. type="textarea"
  819. />
  820. </el-form-item>
  821. <div class="jiben">特殊审批原因</div>
  822. <el-form-item prop="teShuYuanYing">
  823. <el-input v-model="form.teShuYuanYing" type="textarea" />
  824. </el-form-item>
  825. <div class="jiben">不通过原因</div>
  826. <el-form-item prop="routes">
  827. <el-input v-model="form.routes" type="textarea" />
  828. </el-form-item>
  829. </el-form>
  830. <div slot="footer" class="dialog-footer">
  831. <el-button type="primary" @click="submitFormTeShenPi">通过</el-button>
  832. <el-button @click="cancelTeShenPi" size="btn">不通过</el-button>
  833. </div>
  834. </el-dialog>
  835. </div>
  836. </template>
  837. <script>
  838. import {
  839. listThebusApply,
  840. getThebusApply,
  841. delThebusApply,
  842. addThebusApply,
  843. updateThebusApply,
  844. exportThebusApply,
  845. exportThebusYin,
  846. exportThebusChu,
  847. exportThebusOne,
  848. exportThebusTwo,
  849. exportThebusThree,
  850. } from "@/api/militaryvehicleManagement/thebusApply";
  851. // 导入树形结构
  852. import Treeselect from "@riophae/vue-treeselect";
  853. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  854. import { getZhuChiRen, getDept } from "@/api/militaryvehicleManagement/thebus";
  855. import {
  856. listThebusConfig,
  857. getThebusUser,
  858. } from "@/api/militaryvehicleManagement/thebusConfig";
  859. import { getAll, getUser } from "@/api/grassrootsregistration/bdglmeeting";
  860. export default {
  861. name: "ThebusApply",
  862. components: {
  863. Treeselect,
  864. },
  865. data() {
  866. return {
  867. // 遮罩层
  868. loading: true,
  869. // 导出遮罩层
  870. exportLoading: false,
  871. // 选中数组
  872. ids: [],
  873. // 非单个禁用
  874. single: true,
  875. // 非多个禁用
  876. multiple: true,
  877. // 显示搜索条件
  878. showSearch: true,
  879. // 总条数
  880. total: 0,
  881. // 用车申请表格数据
  882. thebusApplyList: [],
  883. // 弹出层标题
  884. title: "",
  885. // 是否显示弹出层
  886. open: false,
  887. // 查询参数
  888. queryParams: {
  889. pageNum: 1,
  890. pageSize: 10,
  891. model: null,
  892. unitId: null,
  893. peopleId: null,
  894. thebusId: null,
  895. contact: null,
  896. cause: null,
  897. authStime: null,
  898. authEtime: null,
  899. thebusThemplateId: null,
  900. people1Id: null,
  901. people1State: null,
  902. people1Remark: null,
  903. people1Authtime: null,
  904. people2Id: null,
  905. people2State: null,
  906. people2Remark: null,
  907. people2Authtime: null,
  908. people3Id: null,
  909. people3State: null,
  910. people3Remark: null,
  911. people3Authtime: null,
  912. status: null,
  913. outstatus: null,
  914. adminId: null,
  915. createtime: null,
  916. updatetime: null,
  917. driver: null,
  918. driverContact: null,
  919. peopleCount: null,
  920. unitPeopleId: null,
  921. unitPeopleState: null,
  922. unitPeopleRemark: null,
  923. chushenState: null,
  924. chushenRemark: null,
  925. },
  926. // 表单参数
  927. form: {},
  928. // 表单校验
  929. rules: {},
  930. // 树形列表
  931. treeList: [],
  932. // 人员列表
  933. renYuan: [],
  934. // 获取所在单位审批人
  935. userRen: [],
  936. // 审批模板
  937. shenPi: [],
  938. // 审批是否显示弹出层
  939. opens: false,
  940. // 审批表单校验
  941. formRules: {
  942. routes: [
  943. { required: true, message: "请输入不通过原因", trigger: "blur" },
  944. ],
  945. },
  946. // 特殊审批是否显示弹出层
  947. opensTe: false,
  948. // 特殊审批表单校验·
  949. formRulesTe: {
  950. routes: [
  951. { required: true, message: "请输入不通过原因", trigger: "blur" },
  952. ],
  953. teShuYuanYing: [
  954. { required: true, message: "请输入特殊审批原因", trigger: "blur" },
  955. ],
  956. },
  957. // 用车审批状态
  958. carApprova: [],
  959. teJi: true,
  960. // 外面的人员
  961. renYuans: [],
  962. };
  963. },
  964. created() {
  965. this.getList();
  966. this.getSuo();
  967. },
  968. mounted() {},
  969. methods: {
  970. // 获取搜索所有人
  971. getSuo() {
  972. getAll().then((res) => {
  973. this.renYuans = res.rows;
  974. });
  975. },
  976. // 特殊审批通过
  977. submitFormTeShenPi() {
  978. this.$refs["formsTe"].validateField("teShuYuanYing", (valid) => {
  979. if (!valid) {
  980. if (this.form.id != null) {
  981. if (this.form.shenpijiedian == "1") {
  982. this.form.isTongguo = "0";
  983. this.form.yjtsYuanyin = this.form.teShuYuanYing;
  984. this.form.isTeShu = "1";
  985. exportThebusYin(this.form).then((response) => {
  986. this.$modal.msgSuccess("审批成功");
  987. this.opensTe = false;
  988. this.getList();
  989. });
  990. } else if (this.form.shenpijiedian == "2") {
  991. this.form.isTongguo = "0";
  992. this.form.cstsYuanyin = this.form.teShuYuanYing;
  993. this.form.isTeShu = "1";
  994. exportThebusChu(this.form).then((response) => {
  995. this.$modal.msgSuccess("审批成功");
  996. this.opensTe = false;
  997. this.getList();
  998. });
  999. } else if (this.form.shenpijiedian == "3") {
  1000. this.form.isTongguo = "0";
  1001. this.form.ojtsYuanyin = this.form.teShuYuanYing;
  1002. this.form.isTeShu = "1";
  1003. exportThebusOne(this.form).then((response) => {
  1004. this.$modal.msgSuccess("审批成功");
  1005. this.getList();
  1006. this.opensTe = false;
  1007. });
  1008. } else if (this.form.shenpijiedian == "4") {
  1009. this.form.isTongguo = "0";
  1010. this.form.tjtsYuanyin = this.form.teShuYuanYing;
  1011. this.form.isTeShu = "1";
  1012. exportThebusTwo(this.form).then((response) => {
  1013. this.$modal.msgSuccess("审批成功");
  1014. this.getList();
  1015. this.opensTe = false;
  1016. });
  1017. } else if (this.form.shenpijiedian == "5") {
  1018. this.form.isTongguo = "0";
  1019. this.form.sjtsYuanyin = this.form.teShuYuanYing;
  1020. this.form.isTeShu = "1";
  1021. exportThebusThree(this.form).then((response) => {
  1022. this.$modal.msgSuccess("审批成功");
  1023. this.getList();
  1024. this.opensTe = false;
  1025. });
  1026. }
  1027. }
  1028. }
  1029. });
  1030. },
  1031. // 特殊审批不通过
  1032. cancelTeShenPi() {
  1033. this.$refs["formsTe"].validate((valid) => {
  1034. if (valid) {
  1035. if (this.form.id != null) {
  1036. if (this.form.shenpijiedian == "1") {
  1037. this.form.isTongguo = "1";
  1038. this.form.yjtsYuanyin = this.form.teShuYuanYing;
  1039. this.form.isTeShu = "1";
  1040. exportThebusYin(this.form).then((response) => {
  1041. this.$modal.msgSuccess("审批成功");
  1042. this.opensTe = false;
  1043. this.getList();
  1044. });
  1045. } else if (this.form.shenpijiedian == "2") {
  1046. this.form.isTongguo = "1";
  1047. this.form.cstsYuanyin = this.form.teShuYuanYing;
  1048. this.form.isTeShu = "1";
  1049. exportThebusChu(this.form).then((response) => {
  1050. this.$modal.msgSuccess("审批成功");
  1051. this.opensTe = false;
  1052. this.getList();
  1053. });
  1054. } else if (this.form.shenpijiedian == "3") {
  1055. this.form.isTongguo = "1";
  1056. this.form.ojtsYuanyin = this.form.teShuYuanYing;
  1057. this.form.isTeShu = "1";
  1058. exportThebusOne(this.form).then((response) => {
  1059. this.$modal.msgSuccess("审批成功");
  1060. this.getList();
  1061. this.opensTe = false;
  1062. });
  1063. } else if (this.form.shenpijiedian == "4") {
  1064. this.form.isTongguo = "1";
  1065. this.form.tjtsYuanyin = this.form.teShuYuanYing;
  1066. this.form.isTeShu = "1";
  1067. exportThebusTwo(this.form).then((response) => {
  1068. this.$modal.msgSuccess("审批成功");
  1069. this.getList();
  1070. this.opensTe = false;
  1071. });
  1072. } else if (this.form.shenpijiedian == "5") {
  1073. this.form.isTongguo = "1";
  1074. this.form.sjtsYuanyin = this.form.teShuYuanYing;
  1075. this.form.isTeShu = "1";
  1076. exportThebusThree(this.form).then((response) => {
  1077. this.$modal.msgSuccess("审批成功");
  1078. this.getList();
  1079. this.opensTe = false;
  1080. });
  1081. }
  1082. }
  1083. }
  1084. });
  1085. },
  1086. // 特殊审批按钮
  1087. handleTeShuShenPi(row) {
  1088. this.reset();
  1089. this.getTreeList();
  1090. this.getYingJi();
  1091. this.getShenPi();
  1092. const id = row.id || this.ids;
  1093. getThebusApply(id).then((response) => {
  1094. this.form = response.data;
  1095. this.getRen(this.form.unitId);
  1096. this.opensTe = true;
  1097. this.title = "审批用车申请";
  1098. });
  1099. },
  1100. // 审批通过
  1101. submitFormShenPi() {
  1102. if (this.form.shenpijiedian == "1") {
  1103. // console.log("营级");
  1104. this.form.isTongguo = "0";
  1105. if (this.form.id != null) {
  1106. exportThebusYin(this.form).then((response) => {
  1107. this.$modal.msgSuccess("审批成功");
  1108. this.opens = false;
  1109. this.getList();
  1110. });
  1111. return;
  1112. }
  1113. } else if (this.form.shenpijiedian == "2") {
  1114. // console.log("初级");
  1115. this.form.isTongguo = "0";
  1116. exportThebusChu(this.form).then((response) => {
  1117. this.$modal.msgSuccess("审批成功");
  1118. this.opens = false;
  1119. this.getList();
  1120. });
  1121. return;
  1122. } else if (this.form.shenpijiedian == "3") {
  1123. this.form.isTongguo = "0";
  1124. // console.log("一级");
  1125. exportThebusOne(this.form).then((response) => {
  1126. this.$modal.msgSuccess("审批成功");
  1127. this.getList();
  1128. this.opens = false;
  1129. });
  1130. return;
  1131. } else if (this.form.shenpijiedian == "4") {
  1132. this.form.isTongguo = "0";
  1133. // console.log("二级");
  1134. exportThebusTwo(this.form).then((response) => {
  1135. this.$modal.msgSuccess("审批成功");
  1136. this.getList();
  1137. this.opens = false;
  1138. });
  1139. return;
  1140. } else if (this.form.shenpijiedian == "5") {
  1141. this.form.isTongguo = "0";
  1142. // console.log("三级");
  1143. exportThebusThree(this.form).then((response) => {
  1144. this.$modal.msgSuccess("审批成功");
  1145. this.getList();
  1146. this.opens = false;
  1147. });
  1148. }
  1149. },
  1150. // 审批不通过
  1151. cancelShenPi() {
  1152. this.$refs["forms"].validate((valid) => {
  1153. if (valid) {
  1154. if (this.form.shenpijiedian == "1") {
  1155. this.form.isTongguo = "1";
  1156. this.form.unitPeopleRemark = this.form.routes;
  1157. exportThebusYin(this.form).then((res) => {
  1158. this.opens = false;
  1159. this.getList();
  1160. });
  1161. return;
  1162. } else if (this.form.shenpijiedian == "2") {
  1163. this.form.isTongguo = "1";
  1164. this.form.chushenRemark = this.form.routes;
  1165. exportThebusChu(this.form).then((res) => {
  1166. this.opens = false;
  1167. this.getList();
  1168. });
  1169. return;
  1170. } else if (this.form.shenpijiedian == "3") {
  1171. this.form.isTongguo = "1";
  1172. this.form.peopleoneRemark = this.form.routes;
  1173. exportThebusOne(this.form).then((res) => {
  1174. this.opens = false;
  1175. this.getList();
  1176. });
  1177. return;
  1178. } else if (this.form.shenpijiedian == "4") {
  1179. this.form.isTongguo = "1";
  1180. this.form.peopletwoRemark = this.form.routes;
  1181. exportThebusTwo(this.form).then((res) => {
  1182. this.opens = false;
  1183. this.getList();
  1184. });
  1185. return;
  1186. } else if (this.form.shenpijiedian == "5") {
  1187. this.form.isTongguo = "1";
  1188. this.form.peoplethreeRemark = this.form.routes;
  1189. exportThebusThree(this.form).then((res) => {
  1190. this.opens = false;
  1191. this.getList();
  1192. });
  1193. }
  1194. }
  1195. });
  1196. },
  1197. // 审批按钮
  1198. handleShenPi(row) {
  1199. // console.log(row);
  1200. this.reset();
  1201. this.getTreeList();
  1202. this.getYingJi();
  1203. this.getShenPi();
  1204. const id = row.id || this.ids;
  1205. getThebusApply(id).then((response) => {
  1206. this.form = response.data;
  1207. this.getRen(this.form.unitId);
  1208. this.opens = true;
  1209. this.title = "审批用车申请";
  1210. });
  1211. },
  1212. // 选择营级人员触发
  1213. yinJi(name) {
  1214. this.form.unitPeopleName = name;
  1215. },
  1216. // 选择审批模板触发
  1217. shenPiThemplate(data) {
  1218. this.$set(this.form, "peopleoneName", data.oneshenpirenname);
  1219. this.$set(this.form, "peopletwoName", data.twoshenpirenname);
  1220. this.$set(this.form, "peoplethreeName", data.threeshenpirenname);
  1221. this.$set(this.form, "peopleoneId", data.onshenpirenid);
  1222. this.$set(this.form, "peopletwoId", data.twoshenpirenid);
  1223. this.$set(this.form, "peoplethreeId", data.threeshenpirenid);
  1224. },
  1225. // 获取审批模板列表
  1226. getShenPi() {
  1227. listThebusConfig().then((response) => {
  1228. // console.log();
  1229. this.shenPi = response.rows;
  1230. });
  1231. },
  1232. // 获取营级审批
  1233. getYingJi() {
  1234. getThebusUser().then((res) => {
  1235. this.userRen = res.rows;
  1236. });
  1237. },
  1238. // 选择人员触发
  1239. cheRen(name) {
  1240. this.form.peopleName = name;
  1241. },
  1242. // 获取人员列表
  1243. getRen(id) {
  1244. getZhuChiRen(id).then((res) => {
  1245. this.renYuan = res.data;
  1246. });
  1247. },
  1248. // 获取单位列表
  1249. getTreeList() {
  1250. getDept().then((res) => {
  1251. this.treeList = res.data;
  1252. });
  1253. },
  1254. // 选择部门单位触发
  1255. selectPeo(data) {
  1256. this.form.unitName = data.label;
  1257. this.getRen(data.id);
  1258. this.getSuozaiRen(data.id);
  1259. },
  1260. getSuozaiRen(id) {
  1261. getUser(id).then((res) => {
  1262. this.userRen = res.data;
  1263. });
  1264. },
  1265. /** 查询用车申请列表 */
  1266. getList() {
  1267. this.loading = true;
  1268. listThebusApply(this.queryParams).then((response) => {
  1269. this.thebusApplyList = response.rows;
  1270. this.total = response.total;
  1271. this.loading = false;
  1272. });
  1273. },
  1274. // 取消按钮
  1275. cancel() {
  1276. this.open = false;
  1277. this.reset();
  1278. },
  1279. // 表单重置
  1280. reset() {
  1281. this.form = {
  1282. id: null,
  1283. model: null,
  1284. unitId: null,
  1285. peopleId: null,
  1286. thebusId: null,
  1287. contact: null,
  1288. cause: null,
  1289. authStime: null,
  1290. authEtime: null,
  1291. thebusThemplateId: null,
  1292. people1Id: null,
  1293. people1State: null,
  1294. people1Remark: null,
  1295. people1Authtime: null,
  1296. people2Id: null,
  1297. people2State: null,
  1298. people2Remark: null,
  1299. people2Authtime: null,
  1300. people3Id: null,
  1301. people3State: null,
  1302. people3Remark: null,
  1303. people3Authtime: null,
  1304. status: null,
  1305. outstatus: null,
  1306. adminId: null,
  1307. createtime: null,
  1308. updatetime: null,
  1309. driver: null,
  1310. driverContact: null,
  1311. peopleCount: null,
  1312. unitPeopleId: null,
  1313. unitPeopleState: null,
  1314. unitPeopleRemark: null,
  1315. chushenState: null,
  1316. chushenRemark: null,
  1317. };
  1318. this.resetForm("form");
  1319. },
  1320. /** 搜索按钮操作 */
  1321. handleQuery() {
  1322. this.queryParams.pageNum = 1;
  1323. this.getList();
  1324. },
  1325. /** 重置按钮操作 */
  1326. resetQuery() {
  1327. this.queryParams.peopleId = null;
  1328. this.resetForm("queryForm");
  1329. this.handleQuery();
  1330. },
  1331. // 多选框选中数据
  1332. handleSelectionChange(selection) {
  1333. this.ids = selection.map((item) => item.id);
  1334. this.single = selection.length !== 1;
  1335. this.multiple = !selection.length;
  1336. },
  1337. /** 新增按钮操作 */
  1338. handleAdd() {
  1339. this.reset();
  1340. this.getYingJi();
  1341. this.getShenPi();
  1342. this.getTreeList();
  1343. this.open = true;
  1344. this.title = "添加用车申请";
  1345. var today = new Date();
  1346. var y = today.getFullYear();
  1347. var M = today.getMonth() + 1;
  1348. var d = today.getDate();
  1349. var h = today.getHours();
  1350. var m = today.getMinutes();
  1351. var s = today.getSeconds();
  1352. var w = today.getDay();
  1353. if (M < 10) {
  1354. M = "0" + M;
  1355. }
  1356. if (d < 10) {
  1357. d = "0" + d;
  1358. }
  1359. if (h < 10) {
  1360. h = "0" + h;
  1361. }
  1362. if (m < 10) {
  1363. m = "0" + m;
  1364. }
  1365. if (s < 10) {
  1366. s = "0" + s;
  1367. }
  1368. this.form.authStime = y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
  1369. this.form.authEtime = y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
  1370. },
  1371. /** 修改按钮操作 */
  1372. handleUpdate(row) {
  1373. this.reset();
  1374. this.getTreeList();
  1375. this.getYingJi();
  1376. this.getShenPi();
  1377. const id = row.id || this.ids;
  1378. getThebusApply(id).then((response) => {
  1379. this.form = response.data;
  1380. this.getRen(this.form.unitId);
  1381. this.open = true;
  1382. this.title = "修改用车申请";
  1383. });
  1384. },
  1385. /** 提交按钮 */
  1386. submitForm() {
  1387. this.$refs["form"].validate((valid) => {
  1388. if (valid) {
  1389. if (this.form.id != null) {
  1390. updateThebusApply(this.form).then((response) => {
  1391. this.$modal.msgSuccess("修改成功");
  1392. this.open = false;
  1393. this.getList();
  1394. });
  1395. } else {
  1396. addThebusApply(this.form).then((response) => {
  1397. this.$modal.msgSuccess("新增成功");
  1398. this.open = false;
  1399. this.getList();
  1400. });
  1401. }
  1402. }
  1403. });
  1404. },
  1405. /** 删除按钮操作 */
  1406. handleDelete(row) {
  1407. const ids = row.id || this.ids;
  1408. this.$modal
  1409. .confirm("是否确认删除用车申请的数据项?")
  1410. .then(function () {
  1411. return delThebusApply(ids);
  1412. })
  1413. .then(() => {
  1414. this.getList();
  1415. this.$modal.msgSuccess("删除成功");
  1416. })
  1417. .catch(() => {});
  1418. },
  1419. /** 导出按钮操作 */
  1420. handleExport() {
  1421. const queryParams = this.queryParams;
  1422. this.$modal
  1423. .confirm("是否确认导出所有用车申请数据项?")
  1424. .then(() => {
  1425. this.exportLoading = true;
  1426. return exportThebusApply(queryParams);
  1427. })
  1428. .then((response) => {
  1429. this.$download.name(response.msg);
  1430. this.exportLoading = false;
  1431. })
  1432. .catch(() => {});
  1433. },
  1434. },
  1435. };
  1436. </script>
  1437. <style scoped>
  1438. /* 对话框背景颜色 */
  1439. ::v-deep .el-dialog {
  1440. background: #004d86 !important;
  1441. width: 800px !important;
  1442. }
  1443. ::v-deep .el-textarea__inner {
  1444. width: 920px;
  1445. height: 104px;
  1446. margin: auto;
  1447. }
  1448. ::v-deep .el-dialog__header {
  1449. border-bottom: 1px solid #718a9d;
  1450. }
  1451. ::v-deep .el-dialog__title {
  1452. color: #fff;
  1453. font: 18px;
  1454. }
  1455. ::v-deep .el-dialog__headerbtn .el-dialog__close {
  1456. color: #fff;
  1457. }
  1458. ::v-deep .el-form-item__label {
  1459. font: 16px;
  1460. color: #fff;
  1461. width: 100px !important;
  1462. }
  1463. ::v-deep .el-input__inner {
  1464. /* width: 200px !important;
  1465. height: 36px; */
  1466. background: transparent;
  1467. color: #fff;
  1468. }
  1469. /* 单位框背景颜色 */
  1470. ::v-deep .vue-treeselect__control {
  1471. background: #004d86 !important;
  1472. }
  1473. /* 基本信息背景 */
  1474. .jiben {
  1475. width: 920px;
  1476. height: 32px;
  1477. background-image: url(../../../images/小标题底.png);
  1478. margin-bottom: 25px;
  1479. color: #fff;
  1480. padding-left: 16px;
  1481. line-height: 32px;
  1482. }
  1483. /*调整表单间距 */
  1484. ::v-deep .el-form-item__content {
  1485. width: 200px;
  1486. }
  1487. ::v-deep .el-input__inner {
  1488. cursor: pointer !important;
  1489. }
  1490. /* 底部确定取消按钮 */
  1491. ::v-deep .el-dialog__footer {
  1492. padding: 30px 50px;
  1493. }
  1494. ::v-deep .el-dialog__body {
  1495. margin: 10px 24px 20px 30px;
  1496. padding-top: 20px !important;
  1497. box-sizing: border-box;
  1498. /* padding: 30px 12px 30px 28px; */
  1499. }
  1500. .contents {
  1501. padding: 0px 40px !important;
  1502. }
  1503. /* 下拉菜单 */
  1504. .el-dropdown-link {
  1505. cursor: pointer;
  1506. color: #409eff;
  1507. }
  1508. .el-icon-arrow-down {
  1509. font-size: 12px;
  1510. }
  1511. /* 下拉菜单字体/背景颜色 */
  1512. .el-select-dropdown__item.hover,
  1513. .el-select-dropdown__item:hover {
  1514. background-color: #004d86;
  1515. color: #fff;
  1516. }
  1517. .el-select-dropdown__item {
  1518. color: #fff;
  1519. }
  1520. /* 时间选择 */
  1521. ::v-deep .el-input--small .el-input__inner {
  1522. width: 200px;
  1523. height: 36px;
  1524. line-height: 36px;
  1525. }
  1526. .el-date-editor.el-input {
  1527. width: 200px;
  1528. height: 36px;
  1529. line-height: 36px;
  1530. }
  1531. ::v-deep .el-date-editor.el-input .el-input__inner {
  1532. height: 36px;
  1533. line-height: 36px;
  1534. }
  1535. /* 单位框背景颜色 */
  1536. ::v-deep .vue-treeselect__control {
  1537. background: #004d86 !important;
  1538. color: #fff;
  1539. }
  1540. /* 单位下拉菜单选中字体颜色 */
  1541. ::v-deep .vue-treeselect__single-value {
  1542. color: #fff !important;
  1543. }
  1544. /* 分页按钮 */
  1545. ::v-deep .el-pagination.is-background .el-pager li {
  1546. background-color: #004d86;
  1547. color: #fff;
  1548. }
  1549. ::v-deep .el-pagination.is-background .btn-next {
  1550. background-color: #004d86;
  1551. color: #fff;
  1552. }
  1553. /* 底部确定取消按钮 */
  1554. ::v-deep .el-dialog__footer {
  1555. padding: 18px 50px;
  1556. margin-right: 28px;
  1557. }
  1558. /* 增加按钮弹框 */
  1559. ::v-deep .el-dialog {
  1560. width: 1060px !important;
  1561. }
  1562. ::v-deep .el-dialog__body {
  1563. padding: 30px 35px;
  1564. }
  1565. /* 小手样式 */
  1566. ::v-deep .el-table__cell {
  1567. cursor: pointer;
  1568. }
  1569. .el-button--mini {
  1570. width: 80px !important;
  1571. border: 1px solid transparent;
  1572. padding: 3px 8px;
  1573. font-size: 14px;
  1574. line-height: 1.5;
  1575. border-radius: 3px;
  1576. color: #fff;
  1577. background-color: #1890ff;
  1578. }
  1579. /* 调整输入框提示文字颜色 */
  1580. ::v-deep .vue-treeselect__placeholder {
  1581. color: #bdbdbd4f !important;
  1582. }
  1583. ::v-deep input::-webkit-input-placeholder {
  1584. color: #bdbdbd4f !important;
  1585. }
  1586. ::v-deep input:-moz-placeholder {
  1587. color: #bdbdbd4f !important;
  1588. }
  1589. /* 右侧上浮框 */
  1590. ::v-deep .el-table .el-table__body .el-table__row.hover-row td {
  1591. background-color: #004d86;
  1592. }
  1593. /* 文本域提示文字颜色 */
  1594. ::v-deep ::-webkit-input-placeholder {
  1595. color: #bdbdbd4f !important;
  1596. }
  1597. /* 审批按钮样式 */
  1598. ::v-deep .el-table_1_column_18 .cell {
  1599. /* display: flex !important; */
  1600. margin-top: 10px;
  1601. }
  1602. .box {
  1603. background-color: #ffba00 !important;
  1604. }
  1605. </style>