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

approvalApproval11.vue 16 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  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" label-width="auto"/>
  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 { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval";
  114. import request from '@/utils/request'
  115. import {
  116. approval,
  117. attachmentList,
  118. commonAttach,
  119. getCash,
  120. listCashdetailByCashId
  121. } from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  122. export default {
  123. name: "approvalDetail11",
  124. data() {
  125. return {
  126. showcapital:false,
  127. showpayee:false,
  128. showlasj:false,
  129. showbankType:false,
  130. showproject:false,
  131. showFundType:false,
  132. minDate: new Date(),
  133. maxDate: new Date(2025, 10, 1),
  134. currentDate: new Date(),
  135. form:{},
  136. fileList1:[],
  137. fileList2:[],
  138. fileList3:[],
  139. capitalExpenditureType:'',
  140. payee:'',
  141. bankType:'',
  142. wfydlxDictionaries:[],
  143. jglxDictionaries:[],
  144. sysDictionaries:[],
  145. capitalExpenditureTypeOptions:[],
  146. bankTypeDictionaries:[],
  147. projectList:[],
  148. projectFundTypeOptions:[],
  149. projectFundTypeDictionaries:[],
  150. projectListShow:[],
  151. chargeItme:[],
  152. chargeItmeShow:[],
  153. payeeList:[],
  154. // 查询参数
  155. queryParams: {
  156. transferType:"",
  157. orderByColumn: "id",
  158. isAsc: "desc",
  159. },
  160. capitalExpenditureOpen:false,
  161. contractOpen:false,
  162. projectForm:{
  163. projectId:null,
  164. projectName:null,
  165. projectContractor:null,
  166. projectAmount:null,
  167. projectBillNum:null,
  168. projectFundType:'1',
  169. outId:null,
  170. ynType:'1'
  171. },
  172. infoForm:{
  173. infoId:null,
  174. name:null,
  175. code:null,
  176. totalAmount:null,
  177. contractionId:null,
  178. transferId:null
  179. },
  180. projectFundType:'',
  181. // 审核意见默认值
  182. pass: "true",
  183. comment: "同意",
  184. templateList:[],
  185. };
  186. },
  187. created() {
  188. let queryParams={
  189. pageNum: 1,
  190. pageSize: 100,
  191. }
  192. listProject(queryParams).then(response => {
  193. this.projectList = response.rows;
  194. for (var i = 0; i < response.rows.length; i++) {
  195. this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id});
  196. }
  197. });
  198. this.getDicts("project_fund_type").then((response) => {
  199. for (var i = 0; i < response.data.length; i++) {
  200. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  201. }
  202. this.projectFundTypeDictionaries = response.data;
  203. });
  204. this.getDictionaries();
  205. this.getFileList();
  206. this.getTemplateList();
  207. },
  208. methods: {
  209. getTemplateList(){
  210. let templateQueryParams = {
  211. // 分页
  212. pageNum: 1,
  213. pageSize: 999,
  214. };
  215. listTemplate(templateQueryParams).then(response => {
  216. this.templateList = response.rows;
  217. });
  218. },
  219. tempalteFormat(id){
  220. let name = ""
  221. this.templateList.map(res => {
  222. if(res.id==id){
  223. name = res.name
  224. }
  225. })
  226. return name
  227. },
  228. goFlow(){
  229. window.location='approvalProcess2?id='+this.$route.query.id;
  230. },
  231. getDictionaries(){
  232. getCash(this.$route.query.id).then((response) => {
  233. this.getDicts("capital_expenditure_type").then((res) => {
  234. for (var i = 0; i < res.data.length; i++) {
  235. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  236. }
  237. this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType);
  238. });
  239. if(response.data.capitalExpenditureType==2){
  240. this.capitalExpenditureOpen = true
  241. let param={
  242. 'outId' : response.data.id,
  243. 'ynType' : '2'
  244. }
  245. getProjectto(param).then(res => {
  246. this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType);
  247. this.projectForm = res.data
  248. })
  249. }else if(response.data.capitalExpenditureType==4){
  250. this.contractOpen = true
  251. let param={
  252. 'transferId' : response.data.id
  253. }
  254. getInfoto(param).then(res => {
  255. this.infoForm = res.data
  256. })
  257. }else{
  258. this.showproject = false
  259. }
  260. this.form = response.data;
  261. });
  262. listCashdetailByCashId(this.$route.query.id).then((response) => {
  263. this.chargeItme = response.data;
  264. this.getPayeeList();
  265. });
  266. },
  267. addChargeItme(index){
  268. this.chargeItme.splice(index + 1, 0, {
  269. payeeId: "", //收款方ID
  270. payee: "", //收款方
  271. payeeAccount: "", //收款账户
  272. bankDeposit: "", //开户银行
  273. incomeAmount: "", //收入金额
  274. bankType: "", //所属银行
  275. });
  276. },
  277. getPayeeList() {
  278. //普通转账
  279. this.queryParams.accountType = this.form.accountType
  280. this.queryParams.status = "0"
  281. listPayee(this.queryParams).then((response) => {
  282. for (var i = 0; i < response.rows.length; i++) {
  283. this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id});
  284. }
  285. });
  286. },
  287. beforeRead(file) {
  288. this.uploadFiles.push(file.file);
  289. },
  290. deleteFile(file){
  291. this.uploadFiles.map((response,index) => {
  292. if(file.file == response){
  293. this.uploadFiles.splice(index,1)
  294. }
  295. })
  296. },
  297. getFileList(){
  298. let oData1= {
  299. tableId: this.$route.query.id,
  300. tableName: "t_yinnong_cash",
  301. bizPath: "yinnong",
  302. fileType: "1",
  303. }
  304. attachmentList(oData1).then(res => {
  305. res.rows.map(r => {
  306. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  307. this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  308. })
  309. })
  310. let oData2= {
  311. tableId: this.$route.query.id,
  312. tableName: "t_yinnong_cash",
  313. bizPath: "yinnong",
  314. fileType: "2",
  315. }
  316. attachmentList(oData2).then(res => {
  317. res.rows.map(r => {
  318. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  319. this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  320. })
  321. })
  322. let oData3= {
  323. tableId: this.$route.query.id,
  324. tableName: "t_yinnong_cash",
  325. bizPath: "yinnong",
  326. fileType: "3",
  327. }
  328. attachmentList(oData3).then(res => {
  329. res.rows.map(r => {
  330. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  331. this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  332. })
  333. })
  334. },
  335. goBack(){
  336. window.history.go(-1)
  337. },
  338. //删除家庭成员
  339. deleteChargeItme(index){
  340. this.chargeItme.splice(index,1)
  341. },
  342. /** 提交按钮 */
  343. submitForm() {
  344. const data = {
  345. taskId: this.$route.query.taskId,
  346. instanceId: this.form.instanceId,
  347. variables: JSON.stringify({
  348. comment: this.comment,
  349. pass: this.pass,
  350. }),
  351. };
  352. console.log(data);
  353. approval(data).then((response) => {
  354. if(response.code==200 && response.msg=="操作成功"){
  355. this.$toast.success("操作成功");
  356. setTimeout(function(){
  357. history.go(-1)
  358. },2000)
  359. } else{
  360. this.$toast.success("操作失败");
  361. }
  362. });
  363. },
  364. },watch: {
  365. pass: function (val) {
  366. this.comment = val === "true" ? "同意" : "驳回";
  367. },
  368. },
  369. }
  370. </script>
  371. <style scoped lang="scss">
  372. .app-container {
  373. padding: 2% 0;
  374. }
  375. .main_title{
  376. font-size: 0.4rem;
  377. color: #1D6FE9;
  378. margin: 0.2rem 6%;
  379. position: relative;
  380. }
  381. .main_box{
  382. width: 96%;
  383. margin: 0 auto;
  384. border-radius: 6px;
  385. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  386. overflow: hidden;
  387. background-color: #FFF;
  388. }
  389. .submitButton{
  390. width: 96%;
  391. margin: 0 auto;
  392. }
  393. .addFamily{
  394. position: absolute;
  395. top: -2px;
  396. right: 0;
  397. border-radius: 50%;
  398. }
  399. .deleteFamily{
  400. position: absolute;
  401. top: 0rem;
  402. right: 6%;
  403. z-index: 9;
  404. border-radius: 50%;
  405. }
  406. .examine_box{
  407. background-color: #1D6FE9!important;
  408. padding: 0.18rem!important;
  409. padding-left: 0!important;
  410. border-radius: 0.15rem!important;
  411. margin-top: 0.3rem!important;
  412. }
  413. .examine_box .van-col:first-child{
  414. color: #FFF!important;
  415. font-size: 0.45rem!important;
  416. text-align: center!important;
  417. }
  418. .examine_box .van-col:last-child{
  419. background-color: #FFF!important;
  420. border-radius: 0.15rem!important;
  421. overflow: hidden!important;
  422. .van-radio-group--horizontal{
  423. padding: 0.2rem 0;
  424. border-bottom: 1px solid #eee;
  425. }
  426. }
  427. /deep/.van-radio--horizontal{
  428. margin-left: 20px;
  429. margin-right: 0;
  430. }
  431. </style>