移动端
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 

507 satır
20 KiB

  1. <template>
  2. <div class="app-container">
  3. <van-nav-bar
  4. left-arrow
  5. fixed
  6. placeholder
  7. @click-left="backDone"
  8. >
  9. <template #title>
  10. <p style="font-weight: bold;">转账/还款审批</p>
  11. </template>
  12. <template #right>
  13. <van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/>
  14. </template>
  15. </van-nav-bar>
  16. <p class="main_title">基础信息</p>
  17. <div class="main_box">
  18. <van-field readonly label="申请时间" v-model="form.applyDate" input-align="right" />
  19. <van-field readonly label="资金支出类别" v-model="capitalExpenditureType" input-align="right" label-width="auto" />
  20. <van-field readonly label="支出总金额" v-model="form.expenditureAmount" input-align="right" label-width="auto"/>
  21. <van-field name="radio" label="审批模式" input-align="right" autocomplete="off" readonly>
  22. <template #input>
  23. <van-radio-group v-model="form.approvalMode" direction="horizontal">
  24. <van-radio name="1">线上审批</van-radio>
  25. <van-radio name="2">线下审批</van-radio>
  26. </van-radio-group>
  27. </template>
  28. </van-field>
  29. <van-field readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/>
  30. </div>
  31. <div class="main_box" style="margin-top: 10px;">
  32. <van-field readonly label="转账附言" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/>
  33. </div>
  34. <div class="main_box" style="margin-top: 10px;">
  35. <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/>
  36. </div>
  37. <p class="main_title">付款方信息</p>
  38. <div class="main_box">
  39. <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/>
  40. <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/>
  41. </div>
  42. <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  43. <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" />
  44. <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/>
  45. <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/>
  46. <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" />
  47. <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/>
  48. </div>
  49. <div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  50. <van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" />
  51. <van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/>
  52. <van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/>
  53. </div>
  54. <p class="main_title">收款方信息</p>
  55. <div class="main_box" style="margin-bottom: 15px;">
  56. <van-field readonly label="收款账户类型" v-if="form.bankType==1" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" />
  57. <van-field readonly label="行内转账" v-if="form.bankType==2||form.bankType==3" v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto" />
  58. </div>
  59. <div :style="{position:'relative'}">
  60. <div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" v-if="index<listLength" :key="index">
  61. <van-field readonly label="收款方" v-model="item.payee" input-align="right" />
  62. <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/>
  63. <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/>
  64. <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/>
  65. <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" />
  66. </div>
  67. <p class="main_more" v-if="chargeItme.length>1 && showbtn" @click="openItem">查看更多</p>
  68. <p class="main_more" v-if="chargeItme.length>1 && !showbtn" @click="listLength = 1,showbtn=true">收起列表</p>
  69. </div>
  70. <p class="main_title">上传附件(收据)</p>
  71. <div class="main_box" style="padding: 5px 0 0 8px;">
  72. <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  73. <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" >
  74. <template #preview-cover="file">
  75. <div class="preview-cover">
  76. <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/>
  77. <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" />
  78. <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" />
  79. <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" />
  80. <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" />
  81. </div>
  82. </template>
  83. </van-uploader>
  84. </div>
  85. <p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p>
  86. <van-cell v-for="(item,index) in fileList1" :key="index">
  87. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  88. </van-cell>
  89. <p class="main_title">上传附件(发票)</p>
  90. <div class="main_box" style="padding: 5px 0 0 8px;">
  91. <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  92. <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" >
  93. <template #preview-cover="file">
  94. <div class="preview-cover">
  95. <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/>
  96. <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" />
  97. <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" />
  98. <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" />
  99. <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" />
  100. </div>
  101. </template>
  102. </van-uploader>
  103. </div>
  104. <p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p>
  105. <van-cell v-for="(item,index) in fileList2" :key="index">
  106. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  107. </van-cell>
  108. <p class="main_title">上传附件(其他)</p>
  109. <div class="main_box" style="padding: 5px 0 0 8px;">
  110. <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  111. <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" >
  112. <template #preview-cover="file">
  113. <div class="preview-cover">
  114. <img src="../../../../assets/images/sunVillage_info/WORD.png" width="75" v-if="file.type == 'docx' || file.type == 'doc'"/>
  115. <img src="../../../../assets/images/sunVillage_info/ECEL.png" width="75" v-if="file.type == 'xlsx' || file.type == 'xls'" />
  116. <img src="../../../../assets/images/sunVillage_info/PDF.png" width="75" v-if="file.type == 'pdf'" />
  117. <img src="../../../../assets/images/sunVillage_info/PPT.png" width="75" v-if="file.type == 'ppt'" />
  118. <img src="../../../../assets/images/sunVillage_info/RAR.png" width="75" v-if="file.type == 'zip' || file.type == 'rar'" />
  119. </div>
  120. </template>
  121. </van-uploader>
  122. </div>
  123. <p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p>
  124. <van-cell v-for="(item,index) in fileList3" :key="index">
  125. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  126. </van-cell>
  127. <div class="main_box examine_box" v-if="this.$route.query.type != 'done'">
  128. <van-row type="flex" justify="space-between" align="center">
  129. <van-col span="5">审批<br/>意见</van-col>
  130. <van-col span="19">
  131. <van-radio-group v-model="pass" direction="horizontal">
  132. <van-radio name="true">同意</van-radio>
  133. <van-radio name="false">驳回</van-radio>
  134. </van-radio-group>
  135. <van-field rows="2" autosize v-model="comment" type="textarea" placeholder="请输入审批意见"/>
  136. </van-col>
  137. </van-row>
  138. </div>
  139. <div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'">
  140. <van-row>
  141. <van-col span="24" align="center">
  142. <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button>
  143. </van-col>
  144. </van-row>
  145. <div class="clear"></div>
  146. </div>
  147. </div>
  148. </template>
  149. <script>
  150. import { getTransfer , queryTransferDetail , listPayee , getProjectto , listProject ,getInfoto, approval ,listTemplate } from "@/api/onlineHome/bankAgriculture/paymentApproval";
  151. import {attachmentList, systemAttachment} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  152. import request from '@/utils/request'
  153. export default {
  154. name: "approvalApproval",
  155. data() {
  156. return {
  157. showcapital:false,
  158. showpayee:false,
  159. showlasj:false,
  160. showbankType:false,
  161. showproject:false,
  162. showFundType:false,
  163. minDate: new Date(2000, 1, 1),
  164. maxDate: new Date(2050, 12, 31),
  165. currentDate: new Date(),
  166. form:{},
  167. capitalExpenditureType:'',
  168. payee:'',
  169. bankType:'',
  170. wfydlxDictionaries:[],
  171. jglxDictionaries:[],
  172. sysDictionaries:[],
  173. capitalExpenditureTypeOptions:[],
  174. bankTypeDictionaries:[],
  175. projectList:[],
  176. projectFundTypeOptions:[],
  177. projectFundTypeDictionaries:[],
  178. projectListShow:[],
  179. chargeItme:[],
  180. chargeItmeShow:[],
  181. payeeList:[],
  182. // 查询参数
  183. queryParams: {
  184. transferType:"",
  185. orderByColumn: "id",
  186. isAsc: "desc",
  187. },
  188. capitalExpenditureOpen:false,
  189. projectForm:{
  190. projectId:null,
  191. projectName:null,
  192. projectContractor:null,
  193. projectAmount:null,
  194. projectBillNum:null,
  195. projectFundType:'1',
  196. outId:null,
  197. ynType:'1'
  198. },
  199. contractOpen:false,
  200. infoForm:{
  201. infoId:null,
  202. name:null,
  203. code:null,
  204. totalAmount:null,
  205. contractionId:null,
  206. transferId:null
  207. },
  208. approval: {
  209. taskId: null,
  210. auditbatchNo: null,
  211. type: null,
  212. id: null,
  213. comment: '',
  214. },
  215. projectFundType:'',
  216. fileList1:[],
  217. fileList2:[],
  218. fileList3:[],
  219. uploadFiles:[],
  220. // 审核意见默认值
  221. pass: "true",
  222. comment: "同意",
  223. templateList:[],
  224. listLength:1,
  225. showbtn:true,
  226. };
  227. },
  228. created() {
  229. this.getDicts("project_fund_type").then((response) => {
  230. for (var i = 0; i < response.data.length; i++) {
  231. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  232. }
  233. this.projectFundTypeDictionaries = response.data;
  234. });
  235. this.approval.type = this.$route.query.type;
  236. this.getDictionaries();
  237. this.getFileList();
  238. this.getTemplateList();
  239. },
  240. methods: {
  241. openItem(){
  242. this.listLength = this.listLength+5;
  243. if (this.listLength > this.chargeItme.length){
  244. this.listLength = this.chargeItme.length;
  245. this.showbtn = false;
  246. }
  247. },
  248. getTemplateList(){
  249. let templateQueryParams = {
  250. // 分页
  251. pageNum: 1,
  252. pageSize: 999,
  253. };
  254. listTemplate(templateQueryParams).then(response => {
  255. this.templateList = response.rows;
  256. });
  257. },
  258. tempalteFormat(id){
  259. let name = ""
  260. this.templateList.map(res => {
  261. if(res.id==id){
  262. name = res.name
  263. }
  264. })
  265. return name
  266. },
  267. backDone(){
  268. if(this.$route.query.type != 'done'){
  269. this.$router.push({name:'yinnongDoneCompletedDoneNew',query: {activeName:'1'}})
  270. }else{
  271. this.$router.push({name:'yinnongDoneCompletedDoneNew',query: {activeName:'2'}})
  272. }
  273. },
  274. goFlow(){
  275. window.location='approvalProcess?id='+this.$route.query.id+'&auditbatchNo='+this.$route.query.auditbatchNo;
  276. },
  277. getDictionaries(){
  278. getTransfer(this.$route.query.id).then((response) => {
  279. this.getDicts("capital_expenditure_type").then((res) => {
  280. for (var i = 0; i < res.data.length; i++) {
  281. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  282. }
  283. this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType);
  284. });
  285. if(response.data.capitalExpenditureType==2){
  286. this.capitalExpenditureOpen = true
  287. let param={
  288. 'outId' : response.data.id,
  289. 'ynType' : '1'
  290. }
  291. getProjectto(param).then(res => {
  292. this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType);
  293. this.projectForm = res.data
  294. })
  295. }else if(response.data.capitalExpenditureType==4) {
  296. this.contractOpen = true
  297. let param = {
  298. 'transferId': response.data.id
  299. }
  300. getInfoto(param).then(res => {
  301. this.infoForm = res.data
  302. })
  303. }else{
  304. this.showproject = false
  305. }
  306. this.form = response.data;
  307. });
  308. queryTransferDetail(this.$route.query.id).then((response) => {
  309. this.getDicts("bank_type_all").then(res => {
  310. for (var i = 0; i < res.data.length; i++) {
  311. this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  312. }
  313. for (var j = 0 ; j < response.rows.length ; j++){
  314. response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType);
  315. }
  316. this.chargeItme = response.rows;
  317. });
  318. this.getPayeeList();
  319. });
  320. },
  321. getPayeeList() {
  322. //普通转账
  323. this.queryParams.accountType = this.form.accountType
  324. this.queryParams.status = "0"
  325. listPayee(this.queryParams).then((response) => {
  326. for (var i = 0; i < response.rows.length; i++) {
  327. this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id});
  328. }
  329. });
  330. },
  331. getFileList(){
  332. let oData1= {
  333. tableId: this.$route.query.id,
  334. tableName: "t_yinnong_transfer",
  335. bizPath: "transfer",
  336. fileType: "1",
  337. orderByColumn: "fileName",
  338. isAsc: "asc",
  339. }
  340. attachmentList(oData1).then(res => {
  341. res.rows.map(r => {
  342. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  343. let subIndex = r.fileName.lastIndexOf(".");
  344. let ext = r.fileName.substring(subIndex + 1, r.fileName.length);
  345. this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName})
  346. })
  347. })
  348. let oData2= {
  349. tableId: this.$route.query.id,
  350. tableName: "t_yinnong_transfer",
  351. bizPath: "transfer",
  352. fileType: "2",
  353. orderByColumn: "fileName",
  354. isAsc: "asc",
  355. }
  356. attachmentList(oData2).then(res => {
  357. res.rows.map(r => {
  358. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  359. let subIndex = r.fileName.lastIndexOf(".");
  360. let ext = r.fileName.substring(subIndex + 1, r.fileName.length);
  361. this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName})
  362. })
  363. })
  364. let oData3= {
  365. tableId: this.$route.query.id,
  366. tableName: "t_yinnong_transfer",
  367. bizPath: "transfer",
  368. fileType: "3",
  369. orderByColumn: "fileName",
  370. isAsc: "asc",
  371. }
  372. attachmentList(oData3).then(res => {
  373. res.rows.map(r => {
  374. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  375. let subIndex = r.fileName.lastIndexOf(".");
  376. let ext = r.fileName.substring(subIndex + 1, r.fileName.length);
  377. this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName})
  378. })
  379. })
  380. },
  381. /** 提交按钮 */
  382. submitForm() {
  383. console.info( this.$route.query.auditbatchNo)
  384. const data = {
  385. taskId: this.$route.query.taskId,
  386. auditbatchNo: this.$route.query.auditbatchNo,
  387. remark: this.comment,
  388. pass: this.pass,
  389. };
  390. approval(data).then((response) => {
  391. if(response.code==200 && response.msg=="操作成功"){
  392. this.$toast.success("操作成功");
  393. setTimeout(function(){
  394. history.go(-1)
  395. },2000)
  396. } else{
  397. this.$toast.success("操作失败");
  398. }
  399. });
  400. },
  401. },
  402. watch: {
  403. pass: function (val) {
  404. this.comment = val === "true" ? "同意" : "驳回";
  405. },
  406. },
  407. }
  408. </script>
  409. <style scoped lang="scss">
  410. .app-container {
  411. padding: 2% 0;
  412. }
  413. .main_more{
  414. width: 96%;
  415. margin: 0 auto;
  416. margin-top: 10px;
  417. border-radius: 6px;
  418. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  419. overflow: hidden;
  420. background-color: #FFF;
  421. text-align: center;
  422. padding: 10PX 0;
  423. }
  424. .main_title{
  425. font-size: 0.4rem;
  426. color: #1D6FE9;
  427. margin: 0.2rem 6%;
  428. position: relative;
  429. }
  430. .main_box{
  431. width: 96%;
  432. margin: 0 auto;
  433. border-radius: 6px;
  434. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  435. overflow: hidden;
  436. background-color: #FFF;
  437. }
  438. .submitButton{
  439. width: 96%;
  440. margin: 0 auto;
  441. }
  442. .addFamily{
  443. position: absolute;
  444. top: -2px;
  445. right: 0;
  446. border-radius: 50%;
  447. }
  448. .deleteFamily{
  449. position: absolute;
  450. top: 0rem;
  451. right: 6%;
  452. z-index: 9;
  453. border-radius: 50%;
  454. }
  455. .examine_box{
  456. background-color: #1D6FE9!important;
  457. padding: 0.18rem!important;
  458. padding-left: 0!important;
  459. border-radius: 0.15rem!important;
  460. margin-top: 0.3rem!important;
  461. }
  462. .examine_box .van-col:first-child{
  463. color: #FFF!important;
  464. font-size: 0.45rem!important;
  465. text-align: center!important;
  466. }
  467. .examine_box .van-col:last-child{
  468. background-color: #FFF!important;
  469. border-radius: 0.15rem!important;
  470. overflow: hidden!important;
  471. .van-radio-group--horizontal{
  472. padding: 0.2rem 0;
  473. border-bottom: 1px solid #eee;
  474. }
  475. }
  476. /deep/.van-radio--horizontal{
  477. margin-left: 20px;
  478. margin-right: 0;
  479. }
  480. </style>