移动端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

423 行
16 KiB

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