移动端
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.
 
 

427 rivejä
16 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',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index">
  60. <div class="main_box" style="margin-bottom: 10px;position:relative;">
  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. </div>
  68. <p class="main_title">上传附件(收据)</p>
  69. <div class="main_box" style="padding: 5px 0 0 8px;">
  70. <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  71. <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader>
  72. </div>
  73. <p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p>
  74. <van-cell v-for="(item,index) in fileList1" :key="index">
  75. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  76. </van-cell>
  77. <p class="main_title">上传附件(发票)</p>
  78. <div class="main_box" style="padding: 5px 0 0 8px;">
  79. <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  80. <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader>
  81. </div>
  82. <p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p>
  83. <van-cell v-for="(item,index) in fileList2" :key="index">
  84. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  85. </van-cell>
  86. <p class="main_title">上传附件(其他)</p>
  87. <div class="main_box" style="padding: 5px 0 0 8px;">
  88. <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  89. <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader>
  90. </div>
  91. <p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p>
  92. <van-cell v-for="(item,index) in fileList3" :key="index">
  93. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  94. </van-cell>
  95. <div class="main_box examine_box" v-if="this.$route.query.type != 'done'">
  96. <van-row type="flex" justify="space-between" align="center">
  97. <van-col span="5">审批<br/>意见</van-col>
  98. <van-col span="19">
  99. <van-radio-group v-model="pass" direction="horizontal">
  100. <van-radio name="true">同意</van-radio>
  101. <van-radio name="false">驳回</van-radio>
  102. </van-radio-group>
  103. <van-field rows="2" autosize v-model="comment" type="textarea" placeholder="请输入审批意见"/>
  104. </van-col>
  105. </van-row>
  106. </div>
  107. <div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'">
  108. <van-row>
  109. <van-col span="24" align="center">
  110. <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button>
  111. </van-col>
  112. </van-row>
  113. <div class="clear"></div>
  114. </div>
  115. </div>
  116. </template>
  117. <script>
  118. import { getTransfer , queryTransferDetail , listPayee , getProjectto , listProject , approval ,listTemplate } from "@/api/onlineHome/bankAgriculture/paymentApproval";
  119. import {attachmentList, systemAttachment} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  120. import request from '@/utils/request'
  121. export default {
  122. name: "approvalApproval",
  123. data() {
  124. return {
  125. showcapital:false,
  126. showpayee:false,
  127. showlasj:false,
  128. showbankType:false,
  129. showproject:false,
  130. showFundType:false,
  131. minDate: new Date(2000, 1, 1),
  132. maxDate: new Date(2050, 12, 31),
  133. currentDate: new Date(),
  134. form:{},
  135. capitalExpenditureType:'',
  136. payee:'',
  137. bankType:'',
  138. wfydlxDictionaries:[],
  139. jglxDictionaries:[],
  140. sysDictionaries:[],
  141. capitalExpenditureTypeOptions:[],
  142. bankTypeDictionaries:[],
  143. projectList:[],
  144. projectFundTypeOptions:[],
  145. projectFundTypeDictionaries:[],
  146. projectListShow:[],
  147. chargeItme:[],
  148. chargeItmeShow:[],
  149. payeeList:[],
  150. // 查询参数
  151. queryParams: {
  152. transferType:"",
  153. orderByColumn: "id",
  154. isAsc: "desc",
  155. },
  156. capitalExpenditureOpen:false,
  157. projectForm:{
  158. projectId:null,
  159. projectName:null,
  160. projectContractor:null,
  161. projectAmount:null,
  162. projectBillNum:null,
  163. projectFundType:'1',
  164. outId:null,
  165. ynType:'1'
  166. },
  167. contractOpen:false,
  168. infoForm:{
  169. infoId:null,
  170. name:null,
  171. code:null,
  172. totalAmount:null,
  173. contractionId:null,
  174. transferId:null
  175. },
  176. projectFundType:'',
  177. fileList1:[],
  178. fileList2:[],
  179. fileList3:[],
  180. uploadFiles:[],
  181. // 审核意见默认值
  182. pass: "true",
  183. comment: "同意",
  184. templateList:[],
  185. };
  186. },
  187. created() {
  188. this.getDicts("project_fund_type").then((response) => {
  189. for (var i = 0; i < response.data.length; i++) {
  190. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  191. }
  192. this.projectFundTypeDictionaries = response.data;
  193. });
  194. this.getDictionaries();
  195. this.getFileList();
  196. this.getTemplateList();
  197. },
  198. methods: {
  199. getTemplateList(){
  200. let templateQueryParams = {
  201. // 分页
  202. pageNum: 1,
  203. pageSize: 999,
  204. };
  205. listTemplate(templateQueryParams).then(response => {
  206. this.templateList = response.rows;
  207. });
  208. },
  209. tempalteFormat(id){
  210. let name = ""
  211. this.templateList.map(res => {
  212. if(res.id==id){
  213. name = res.name
  214. }
  215. })
  216. return name
  217. },
  218. backDone(){
  219. if(this.$route.query.type != 'done'){
  220. this.$router.push({name:'yinnongDone',query: {activeName:'1'}})
  221. }else{
  222. this.$router.push({name:'yinnongDone',query: {activeName:'2'}})
  223. }
  224. },
  225. goFlow(){
  226. window.location='approvalProcess?id='+this.$route.query.id;
  227. },
  228. getDictionaries(){
  229. getTransfer(this.$route.query.id).then((response) => {
  230. this.getDicts("capital_expenditure_type").then((res) => {
  231. for (var i = 0; i < res.data.length; i++) {
  232. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  233. }
  234. this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType);
  235. });
  236. if(response.data.capitalExpenditureType==2){
  237. this.capitalExpenditureOpen = true
  238. let param={
  239. 'outId' : response.data.id,
  240. 'ynType' : '1'
  241. }
  242. getProjectto(param).then(res => {
  243. this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType);
  244. this.projectForm = res.data
  245. })
  246. }else if(response.data.capitalExpenditureType==4) {
  247. this.contractOpen = true
  248. let param = {
  249. 'transferId': response.data.id
  250. }
  251. getInfoto(param).then(res => {
  252. this.infoForm = res.data
  253. })
  254. }else{
  255. this.showproject = false
  256. }
  257. this.form = response.data;
  258. });
  259. queryTransferDetail(this.$route.query.id).then((response) => {
  260. this.getDicts("bank_type_all").then(res => {
  261. for (var i = 0; i < res.data.length; i++) {
  262. this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  263. }
  264. for (var j = 0 ; j < response.rows.length ; j++){
  265. response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType);
  266. }
  267. this.chargeItme = response.rows;
  268. });
  269. this.getPayeeList();
  270. });
  271. },
  272. getPayeeList() {
  273. //普通转账
  274. this.queryParams.accountType = this.form.accountType
  275. this.queryParams.status = "0"
  276. listPayee(this.queryParams).then((response) => {
  277. for (var i = 0; i < response.rows.length; i++) {
  278. this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id});
  279. }
  280. });
  281. },
  282. getFileList(){
  283. let oData1= {
  284. tableId: this.$route.query.id,
  285. tableName: "t_yinnong_transfer",
  286. bizPath: "transfer",
  287. fileType: "1",
  288. }
  289. attachmentList(oData1).then(res => {
  290. res.rows.map(r => {
  291. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  292. this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  293. })
  294. })
  295. let oData2= {
  296. tableId: this.$route.query.id,
  297. tableName: "t_yinnong_transfer",
  298. bizPath: "transfer",
  299. fileType: "2",
  300. }
  301. attachmentList(oData2).then(res => {
  302. res.rows.map(r => {
  303. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  304. this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  305. })
  306. })
  307. let oData3= {
  308. tableId: this.$route.query.id,
  309. tableName: "t_yinnong_transfer",
  310. bizPath: "transfer",
  311. fileType: "3",
  312. }
  313. attachmentList(oData3).then(res => {
  314. res.rows.map(r => {
  315. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  316. this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  317. })
  318. })
  319. },
  320. /** 提交按钮 */
  321. submitForm() {
  322. const data = {
  323. taskId: this.$route.query.taskId,
  324. instanceId: this.form.instanceId,
  325. variables: JSON.stringify({
  326. comment: this.comment,
  327. pass: this.pass,
  328. }),
  329. };
  330. approval(data).then((response) => {
  331. if(response.code==200 && response.msg=="操作成功"){
  332. this.$toast.success("操作成功");
  333. setTimeout(function(){
  334. history.go(-1)
  335. },2000)
  336. } else{
  337. this.$toast.success("操作失败");
  338. }
  339. });
  340. },
  341. },watch: {
  342. pass: function (val) {
  343. this.comment = val === "true" ? "同意" : "驳回";
  344. },
  345. },
  346. }
  347. </script>
  348. <style scoped lang="scss">
  349. .app-container {
  350. padding: 2% 0;
  351. }
  352. .main_title{
  353. font-size: 0.4rem;
  354. color: #1D6FE9;
  355. margin: 0.2rem 6%;
  356. position: relative;
  357. }
  358. .main_box{
  359. width: 96%;
  360. margin: 0 auto;
  361. border-radius: 6px;
  362. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  363. overflow: hidden;
  364. background-color: #FFF;
  365. }
  366. .submitButton{
  367. width: 96%;
  368. margin: 0 auto;
  369. }
  370. .addFamily{
  371. position: absolute;
  372. top: -2px;
  373. right: 0;
  374. border-radius: 50%;
  375. }
  376. .deleteFamily{
  377. position: absolute;
  378. top: 0rem;
  379. right: 6%;
  380. z-index: 9;
  381. border-radius: 50%;
  382. }
  383. .examine_box{
  384. background-color: #1D6FE9!important;
  385. padding: 0.18rem!important;
  386. padding-left: 0!important;
  387. border-radius: 0.15rem!important;
  388. margin-top: 0.3rem!important;
  389. }
  390. .examine_box .van-col:first-child{
  391. color: #FFF!important;
  392. font-size: 0.45rem!important;
  393. text-align: center!important;
  394. }
  395. .examine_box .van-col:last-child{
  396. background-color: #FFF!important;
  397. border-radius: 0.15rem!important;
  398. overflow: hidden!important;
  399. .van-radio-group--horizontal{
  400. padding: 0.2rem 0;
  401. border-bottom: 1px solid #eee;
  402. }
  403. }
  404. /deep/.van-radio--horizontal{
  405. margin-left: 20px;
  406. margin-right: 0;
  407. }
  408. </style>