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

approvalApproval.vue 16 KiB

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