index.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. <template>
  2. <div class="payment-application">
  3. <div class="processCode">流程编号:</div>
  4. <div class="paymentRowBox">
  5. <div>标题:</div>
  6. <input v-model="formData.title" readonly class="paymentInput" type="text">
  7. </div>
  8. <div class="paymentRowBox">
  9. <div>创建人:</div>
  10. <input v-model="userinfo.truename" readonly class="paymentInput" type="text">
  11. </div>
  12. <div class="paymentRowBox">
  13. <div>创建部门:</div>
  14. <input v-model="userinfo.deptName" readonly class="paymentInput" type="text">
  15. </div>
  16. <div class="paymentRowBox">
  17. <div>是否为无合同付款:</div>
  18. <input v-model="formData.isNoContractStr" readonly class="paymentInput" type="text">
  19. </div>
  20. <div class="paymentRowBox">
  21. <div>付款单位:</div>
  22. <input v-model="formData.payerName" readonly class="paymentInput" type="text">
  23. </div>
  24. <div class="paymentRowBox">
  25. <div>收款单位:</div>
  26. <input v-model="formData.payeeName" readonly class="paymentInput" type="text">
  27. </div>
  28. <div class="paymentRowBox">
  29. <div>资金用途:</div>
  30. <input v-model="formData.moneyPurpose" readonly class="paymentInput" type="text">
  31. </div>
  32. <div class="paymentRowBox">
  33. <div>合同总价:</div>
  34. <input v-model="formData.contractPrice" readonly class="paymentInput" type="text">
  35. </div>
  36. <div class="paymentRowBox">
  37. <div>付款说明:</div>
  38. <el-input
  39. v-model="formData.payRemark"
  40. type="textarea"
  41. autosize
  42. rows="5"
  43. placeholder="请输入内容"
  44. readonly
  45. />
  46. </div>
  47. <div class="paymentRowBox">
  48. <div>申请金额(小写)</div>
  49. <input v-model="formData.applyPayMoney" readonly class="paymentInput" type="text">
  50. </div>
  51. <div class="paymentRowBox">
  52. <div>申请金额(大写)</div>
  53. <input v-model="formData.applyPayMoneyUppercase" readonly class="paymentInput" type="text">
  54. </div>
  55. <div class="paymentRowBox">
  56. <div>相关附件</div>
  57. <van-uploader v-model="formData.fileUrlList" :deletable="false" :show-upload="false" @click-preview="clickPre3">
  58. <!-- <img src="../../assets/image/upload.png">-->
  59. </van-uploader>
  60. </div>
  61. <van-collapse v-model="activeNames">
  62. <van-collapse-item name="1">
  63. <template #title>
  64. <div style="display: flex;align-items: center;color: rgba(51, 51, 51, 1);font-weight: 600;font-size: 3.6vw">
  65. <div class="blueBg" />流程历史
  66. </div>
  67. </template>
  68. <div style="background: #FAFAFA" class="container">
  69. <div v-for="(item, index) in dtList" :key="index" class="itemBox">
  70. <div class="itemLeft">
  71. <!-- <div class="radius"></div>-->
  72. <img :src="item.auditResult=='-1'?radiusOn:radiusOff" class="radius">
  73. <div class="itemTitBox">
  74. <div style="display: flex;margin: 1vw 0">
  75. <div style="color: rgba(51, 51, 51, 1)">{{ item.nodeName }}{{ item.auditResultString?':':'' }}</div>
  76. <div :style="{'color':item.auditResultString==='同意'?'#5ABF68':item.auditResultString==='处理中'?'#E08E42':'red'}">{{ item.auditResultString }}</div>
  77. </div>
  78. <div v-show="item.auditContent" style="padding: 2vw;background: #F2F2F2;margin: 1vw 0;border-radius: 1vw">{{ item.auditContent }}</div>
  79. <div style="display: flex;justify-content: space-between;width: 100%;margin: 1vw 0">
  80. <div>{{ item.auditUserName }}</div>
  81. <div>{{ item.createdAt?item.createdAt:'' }}</div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </van-collapse-item>
  88. </van-collapse>
  89. <div style="display: flex;align-items: center;color: rgba(51, 51, 51, 1);font-weight: 600;font-size: 3.6vw">
  90. <div class="blueBg" />处理
  91. </div>
  92. <div class="paymentRowBox">
  93. <div class="handleTit">处理结果</div>
  94. <van-radio-group v-model="confirmForm.confirmResult" direction="horizontal" checked-color="rgba(41, 64, 150, 1)" icon-size="4vw">
  95. <van-radio name="1">通过,转下一步</van-radio>
  96. <van-radio name="2">退回发起人</van-radio>
  97. </van-radio-group>
  98. </div>
  99. <div class="paymentRowBox">
  100. <div class="handleTit">处理意见</div>
  101. <el-input
  102. v-model="confirmForm.confirmContent"
  103. type="textarea"
  104. autosize
  105. rows="5"
  106. placeholder="请输入处理意见"
  107. maxlength="2000"
  108. show-word-limit
  109. />
  110. </div>
  111. <div class="paymentRowBox">
  112. <div class="handleTit">抄送</div>
  113. <userSelectForH5
  114. :default-select="confirmList"
  115. :multiple="true"
  116. class="cclist,statistic_base"
  117. :append-to-body="true"
  118. :modal-append-to-body="true"
  119. custom-class="tagdialog"
  120. @selectValue="parentMethod"
  121. />
  122. </div>
  123. <div class="paymentRowBox" style="margin-top: 0">
  124. <div class="handleTit">处理人 &nbsp;&nbsp;&nbsp;&nbsp;<span>{{ username }}</span></div>
  125. </div>
  126. <div class="paymentBtnBox">
  127. <el-button class="closeBtn" @click="cancel">关闭</el-button>
  128. <el-button class="submitBtn" :loading="loadingFlag" @click="handelConfirm">
  129. 提交
  130. </el-button>
  131. </div>
  132. </div>
  133. </template>
  134. <script>
  135. import userSelectForH5 from '@/views/components/userSelectForH5.vue'
  136. import Base from '@/views/base/base'
  137. import BaseData from '@/views/base/baseData'
  138. export default {
  139. name: 'Index',
  140. components: { userSelectForH5 },
  141. mixins: [Base, BaseData],
  142. data() {
  143. return {
  144. dc_key: ['ANSWER_NEED'],
  145. confirmList: [],
  146. activeNames: ['1'],
  147. userinfo: {},
  148. radio: '1',
  149. fileList: [{ url: 'https://img01.yzcdn.cn/vant/leaf.jpg' }],
  150. dtList: [
  151. {
  152. auditContent:
  153. null,
  154. auditResult:
  155. null,
  156. auditResultString:
  157. null,
  158. auditUser:
  159. '996375895163797504',
  160. auditUserName:
  161. '宣胜伟',
  162. createdAt:
  163. 1736321293000,
  164. id:
  165. 'aFdtLdth02lLfk26nMZ',
  166. nodeName:
  167. '申请人发起'
  168. },
  169. {
  170. auditContent:
  171. '',
  172. auditResult:
  173. '1',
  174. auditResultString:
  175. '同意',
  176. auditUser:
  177. '927859716221042688',
  178. auditUserName:
  179. '崔伟',
  180. createdAt:
  181. 1735647785000,
  182. id:
  183. 'IrFA28epluWZB3agf6x',
  184. nodeName:
  185. '直接上级审核'
  186. },
  187. {
  188. auditContent:
  189. '测试一下啊',
  190. auditResult:
  191. '-1',
  192. auditResultString:
  193. '退回上一节点',
  194. auditUser:
  195. '927859716221042688',
  196. auditUserName:
  197. '章敏',
  198. createdAt:
  199. 1735647785000,
  200. id:
  201. 'IrFA28epluWZB3agf6x',
  202. nodeName:
  203. '分管领导审核'
  204. }
  205. ],
  206. radiusOn: require('@/assets/image/radiusOn.png'),
  207. radiusOff: require('@/assets/image/radiusOff.png'),
  208. confirmForm: {
  209. confirmContent: '',
  210. confirmResult: '1'
  211. },
  212. formData: {
  213. proId: '',
  214. totalAddTime: 0,
  215. applyReasons: '',
  216. position: '',
  217. applyAddWorkTime: [
  218. {
  219. useTime: 0
  220. }
  221. ]
  222. },
  223. username: '',
  224. loadingFlag: false
  225. }
  226. },
  227. mounted() {
  228. this.initDict(this.dc_key).then((res) => {
  229. this.setVisible(this.$route.query)
  230. })
  231. this.username = this.$common.currUser().username
  232. const dayjs = require('dayjs')
  233. this.dtList.forEach(item => {
  234. if (item.createdAt) {
  235. item.createdAt = dayjs(item.createdAt).format('YYYY-MM-DD HH:mm:ss')
  236. }
  237. })
  238. },
  239. methods: {
  240. parentMethod(val) {
  241. if (val.length > 0) {
  242. this.confirmForm.ccList = val.join(',')
  243. }
  244. },
  245. clickPre3(file) {
  246. if (this.matchType(file.url) !== 'image') {
  247. window.location.href = file.url
  248. }
  249. },
  250. matchType(fileName) {
  251. // 后缀获取
  252. var suffix = ''
  253. // 获取类型结果
  254. var result = ''
  255. try {
  256. var flieArr = fileName.split('.')
  257. suffix = flieArr[flieArr.length - 1]
  258. } catch (err) {
  259. suffix = ''
  260. }
  261. // fileName无后缀返回 false
  262. if (!suffix) {
  263. result = false
  264. return result
  265. }
  266. // 图片格式
  267. var imglist = ['png', 'jpg', 'jpeg', 'bmp', 'gif']
  268. // 进行图片匹配
  269. result = imglist.some(function(item) {
  270. return item == suffix
  271. })
  272. if (result) {
  273. result = 'image'
  274. return result
  275. }
  276. // 匹配txt
  277. var txtlist = ['txt']
  278. result = txtlist.some(function(item) {
  279. return item == suffix
  280. })
  281. if (result) {
  282. result = 'txt'
  283. return result
  284. }
  285. // 匹配 excel
  286. var excelist = ['xls', 'xlsx']
  287. result = excelist.some(function(item) {
  288. return item == suffix
  289. })
  290. if (result) {
  291. result = 'excel'
  292. return result
  293. }
  294. // 匹配 word
  295. var wordlist = ['doc', 'docx']
  296. result = wordlist.some(function(item) {
  297. return item == suffix
  298. })
  299. if (result) {
  300. result = 'word'
  301. return result
  302. }
  303. // 匹配 pdf
  304. var pdflist = ['pdf']
  305. result = pdflist.some(function(item) {
  306. return item == suffix
  307. })
  308. if (result) {
  309. result = 'pdf'
  310. return result
  311. }
  312. // 匹配 ppt
  313. var pptlist = ['ppt']
  314. result = pptlist.some(function(item) {
  315. return item == suffix
  316. })
  317. if (result) {
  318. result = 'ppt'
  319. return result
  320. }
  321. // 匹配 视频
  322. var videolist = ['mp4', 'm2v', 'mkv']
  323. result = videolist.some(function(item) {
  324. return item == suffix
  325. })
  326. if (result) {
  327. result = 'video'
  328. return result
  329. }
  330. // 匹配 音频
  331. var radiolist = ['mp3', 'wav', 'wmv']
  332. result = radiolist.some(function(item) {
  333. return item == suffix
  334. })
  335. if (result) {
  336. result = 'radio'
  337. return result
  338. }
  339. // 其他 文件类型
  340. result = 'other'
  341. return result
  342. },
  343. async getUserInfo(applyUser) {
  344. const { data: userinfo } = await this.baseRequest1('ApplyPaymentSettleController', 'getUserInfoByUserId', { userId: applyUser })
  345. this.userinfo = userinfo
  346. console.log(this.userinfo)
  347. },
  348. async setVisible(row) {
  349. this.activeName = 'first'
  350. this.row = row
  351. this.getUserInfo(row.applyUser)
  352. this.confirmForm.flowMainPushId = row.flowMainPushId
  353. const { data } = await this.baseRequest1('ApplyPaymentSettleController', 'getInfoByFlowMainPushId', { flowMainPushId: row.flowMainPushId })
  354. const { data: flowHistroy } = await this.baseRequest1('FlowMainController', 'getFlowHistroyByFlowMainId', { flowMainId: row.id })
  355. const noAndbackstatus = await this.baseRequest1('FlowMainController', 'getOutgoingFlowsByFlowMainPushId', { flowMainPushId: row.flowMainPushId })
  356. for (let i = 0; i < noAndbackstatus.data.length; i++) {
  357. if (noAndbackstatus.data[i].conditionExpression == '${agree==\'no\'}') this.argeeNoStatus = true
  358. if (noAndbackstatus.data[i].conditionExpression == '${agree==\'back\'}') this.argeeBackStatus = true
  359. }
  360. this.dtList = flowHistroy
  361. this.formData = data
  362. if (this.formData.isNoContract || this.formData.isNoContract == 0) {
  363. this.formData.isNoContract = String(this.formData.isNoContract)
  364. this.formData.isNoContractStr = this.dc_map.ANSWER_NEED[this.formData.isNoContract]
  365. }
  366. if (data.fileDataIds) {
  367. const { data: fileTaoTaoList } = await this.baseRequest1('FileZtController', 'findFileInfoByIds/' + data.fileDataIds, '')
  368. console.log(fileTaoTaoList.data)
  369. this.formData.fileUrlList = fileTaoTaoList.data.map((e) => {
  370. return {
  371. url: this.$constant.BASE_URI + '/FileController/download/' + e.id,
  372. name: e.fileName,
  373. data: e.id,
  374. uid: new Date().getTime()
  375. }
  376. })
  377. console.log(this.formData.fileUrlList)
  378. } else {
  379. this.formData.fileUrlList = []
  380. }
  381. if (!this.confirmForm.confirmResult) {
  382. this.confirmForm.confirmResult = '1'
  383. }
  384. },
  385. async handelConfirm() {
  386. // console.log(this.confirmForm)
  387. this.loadingFlag = true
  388. const { data } = await this.baseRequest1('ApplyPaymentSettleController', 'AddConfirmResult', { ...this.confirmForm })
  389. if (data.code == 200) {
  390. this.$message.success('处理成功')
  391. this.cancel()
  392. }
  393. },
  394. cancel() {
  395. window.close()
  396. },
  397. baseRequest1(prefix, opUrl, postData) {
  398. return this.$channel.globleRequest(prefix, opUrl, postData, 'project task')
  399. }
  400. }
  401. }
  402. </script>
  403. <style lang="scss">
  404. .loading {
  405. width: 15px;
  406. height: 15px;
  407. border: 4px solid rgba(0, 123, 255, 0.5);
  408. border-top-color: #00bfff;
  409. border-radius: 50%;
  410. animation: spin 1s ease-in-out infinite;
  411. -webkit-animation: spin 1s ease-in-out infinite;
  412. }
  413. /* 定义旋转动画 */
  414. @keyframes spin {
  415. to {
  416. transform: rotate(360deg);
  417. }
  418. }
  419. .payment-application{
  420. padding: 2vw 3vw 10vw 3vw;
  421. display: flex;
  422. flex-direction: column;
  423. .processCode{
  424. color: rgba(119, 119, 119, 1);
  425. font-size: 3.4vw;
  426. }
  427. .paymentRowBox{
  428. font-size: 3.5vw;
  429. color: rgba(51, 51, 51, 1);
  430. margin-top: 2vw;
  431. .paymentInput{
  432. color: rgba(68, 68, 68, 1);
  433. padding: 2.2vw 2vw;
  434. width: 100% !important;
  435. margin: 1vw 0;
  436. border:1px solid rgba(230, 230, 230, 1);
  437. }
  438. .el-textarea__inner{
  439. padding: 2.2vw 2vw;
  440. margin: 1vw 0;
  441. }
  442. .handleTit{
  443. font-size: 3.4vw;
  444. color: rgba(51, 51, 51, 1);
  445. margin-bottom: 1.5vw;
  446. margin-top: 4.5vw;
  447. }
  448. }
  449. .paymentBtnBox{
  450. display: flex;
  451. justify-content: space-evenly;
  452. font-size: 3.4vw;
  453. margin-top: 8vw;
  454. .closeBtn{
  455. width: 29.4vw;
  456. height: 8vw;
  457. background: rgba(87,106,201,0.15);
  458. border-radius: 1vw;
  459. border: 1px solid rgba(42,57,128,0.75);
  460. color: #2A3980;
  461. }
  462. .submitBtn{
  463. width: 29.4vw;
  464. height: 8vw;
  465. background: #2A3980;
  466. border-radius: 1vw;
  467. color: #FFFFFF;
  468. }
  469. }
  470. .itemBox {
  471. display: flex;
  472. justify-content: space-between;
  473. padding: 2vw 1vw 1vw 1vw;
  474. position: relative;
  475. z-index: 1;
  476. .itemLeft {
  477. display: flex;
  478. align-items: center;
  479. width: 100%;
  480. margin: 0.5vw 2vw;
  481. .itemTitBox {
  482. //height: 2.3vw;
  483. width: 100%;
  484. display: flex;
  485. flex-direction: column;
  486. justify-content: space-between;
  487. }
  488. .timeBox {
  489. display: flex;
  490. color: #999999;
  491. font-size: 16px;
  492. }
  493. .radius{
  494. width: 5vw;
  495. height: 5vw;
  496. margin-right: 3vw;
  497. }
  498. }
  499. .itemRight {
  500. display: flex;
  501. height: 2.8vw;
  502. flex-direction: column;
  503. justify-content: space-between;
  504. flex-direction: column;
  505. .tagBox {
  506. text-align: right;
  507. // margin: 0.5vw 0;
  508. }
  509. }
  510. }
  511. .blueBg{
  512. width: 0.6vw;
  513. height: 4vw;
  514. background: rgba(76, 92, 168, 1);
  515. margin-right: 1vw;
  516. }
  517. .van-cell{
  518. padding: 5vw 0 1vw 0;
  519. }
  520. .van-collapse-item__content{
  521. padding: 1vw 0;
  522. }
  523. }
  524. </style>