移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

501 lines
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||form.bankType==4" 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. }
  338. attachmentList(oData1).then(res => {
  339. res.rows.map(r => {
  340. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  341. let subIndex = r.fileName.lastIndexOf(".");
  342. let ext = r.fileName.substring(subIndex + 1, r.fileName.length);
  343. this.fileList1.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName})
  344. })
  345. })
  346. let oData2= {
  347. tableId: this.$route.query.id,
  348. tableName: "t_yinnong_transfer",
  349. bizPath: "transfer",
  350. fileType: "2",
  351. }
  352. attachmentList(oData2).then(res => {
  353. res.rows.map(r => {
  354. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  355. let subIndex = r.fileName.lastIndexOf(".");
  356. let ext = r.fileName.substring(subIndex + 1, r.fileName.length);
  357. this.fileList2.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName})
  358. })
  359. })
  360. let oData3= {
  361. tableId: this.$route.query.id,
  362. tableName: "t_yinnong_transfer",
  363. bizPath: "transfer",
  364. fileType: "3",
  365. }
  366. attachmentList(oData3).then(res => {
  367. res.rows.map(r => {
  368. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  369. let subIndex = r.fileName.lastIndexOf(".");
  370. let ext = r.fileName.substring(subIndex + 1, r.fileName.length);
  371. this.fileList3.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id,"type":ext,"fileName":r.fileName})
  372. })
  373. })
  374. },
  375. /** 提交按钮 */
  376. submitForm() {
  377. console.info( this.$route.query.auditbatchNo)
  378. const data = {
  379. taskId: this.$route.query.taskId,
  380. auditbatchNo: this.$route.query.auditbatchNo,
  381. remark: this.comment,
  382. pass: this.pass,
  383. };
  384. approval(data).then((response) => {
  385. if(response.code==200 && response.msg=="操作成功"){
  386. this.$toast.success("操作成功");
  387. setTimeout(function(){
  388. history.go(-1)
  389. },2000)
  390. } else{
  391. this.$toast.success("操作失败");
  392. }
  393. });
  394. },
  395. },
  396. watch: {
  397. pass: function (val) {
  398. this.comment = val === "true" ? "同意" : "驳回";
  399. },
  400. },
  401. }
  402. </script>
  403. <style scoped lang="scss">
  404. .app-container {
  405. padding: 2% 0;
  406. }
  407. .main_more{
  408. width: 96%;
  409. margin: 0 auto;
  410. margin-top: 10px;
  411. border-radius: 6px;
  412. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  413. overflow: hidden;
  414. background-color: #FFF;
  415. text-align: center;
  416. padding: 10PX 0;
  417. }
  418. .main_title{
  419. font-size: 0.4rem;
  420. color: #1D6FE9;
  421. margin: 0.2rem 6%;
  422. position: relative;
  423. }
  424. .main_box{
  425. width: 96%;
  426. margin: 0 auto;
  427. border-radius: 6px;
  428. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  429. overflow: hidden;
  430. background-color: #FFF;
  431. }
  432. .submitButton{
  433. width: 96%;
  434. margin: 0 auto;
  435. }
  436. .addFamily{
  437. position: absolute;
  438. top: -2px;
  439. right: 0;
  440. border-radius: 50%;
  441. }
  442. .deleteFamily{
  443. position: absolute;
  444. top: 0rem;
  445. right: 6%;
  446. z-index: 9;
  447. border-radius: 50%;
  448. }
  449. .examine_box{
  450. background-color: #1D6FE9!important;
  451. padding: 0.18rem!important;
  452. padding-left: 0!important;
  453. border-radius: 0.15rem!important;
  454. margin-top: 0.3rem!important;
  455. }
  456. .examine_box .van-col:first-child{
  457. color: #FFF!important;
  458. font-size: 0.45rem!important;
  459. text-align: center!important;
  460. }
  461. .examine_box .van-col:last-child{
  462. background-color: #FFF!important;
  463. border-radius: 0.15rem!important;
  464. overflow: hidden!important;
  465. .van-radio-group--horizontal{
  466. padding: 0.2rem 0;
  467. border-bottom: 1px solid #eee;
  468. }
  469. }
  470. /deep/.van-radio--horizontal{
  471. margin-left: 20px;
  472. margin-right: 0;
  473. }
  474. </style>