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

approvalApproval12.vue 18 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  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 name="radio" label="审批模式" input-align="right" autocomplete="off" readonly>
  21. <template #input>
  22. <van-radio-group v-model="form.approvalMode" direction="horizontal">
  23. <van-radio name="1">线上审批</van-radio>
  24. <van-radio name="2">线下审批</van-radio>
  25. </van-radio-group>
  26. </template>
  27. </van-field>
  28. <van-field readonly label="审批流程" :value="tempalteFormat(form.approvalTemplateId)" input-align="right" label-width="auto"/>
  29. </div>
  30. <div class="main_box" style="margin-top: 10px;">
  31. <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/>
  32. </div>
  33. <div class="main_box" style="margin-top: 10px;">
  34. <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/>
  35. </div>
  36. <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  37. <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" />
  38. <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/>
  39. <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/>
  40. <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" />
  41. <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/>
  42. </div>
  43. <div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  44. <van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" />
  45. <van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/>
  46. <van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/>
  47. </div>
  48. <p class="main_title">出票方信息</p>
  49. <div class="main_box">
  50. <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/>
  51. <van-field :rules="[{ required: true , message:'请输入汇票号码' }]" required label="汇票号码" v-model="form.payerAccount" placeholder="请输入汇票号码" input-align="right" label-width="auto"/>
  52. <van-field
  53. readonly
  54. label="出票金额(元)"
  55. v-model="form.expenditureAmount"
  56. placeholder=""
  57. input-align="right"
  58. label-width="auto"
  59. required
  60. :rules="[{ required: true , message:'出票金额不能为空!' }]"
  61. />
  62. <van-field
  63. readonly
  64. label="汇票类型"
  65. v-model="orderTypeName"
  66. placeholder=""
  67. input-align="right"
  68. label-width="auto"
  69. required
  70. :rules="[{ required: true , message:'汇票类型不能为空!' }]"
  71. />
  72. <van-field
  73. readonly
  74. label="汇票类型"
  75. v-model="form.orderType"
  76. placeholder=""
  77. input-align="right"
  78. label-width="auto"
  79. style="display: none"
  80. required
  81. :rules="[{ required: true , message:'汇票类型不能为空!' }]"
  82. />
  83. <van-field
  84. readonly
  85. label="开票日"
  86. v-model="form.startTime"
  87. placeholder=""
  88. input-align="right"
  89. label-width="auto"
  90. required
  91. :rules="[{ required: true , message:'开票日不能为空!' }]"
  92. />
  93. <van-field
  94. readonly
  95. label="到期日"
  96. v-model="form.endTime"
  97. placeholder=""
  98. input-align="right"
  99. label-width="auto"
  100. required
  101. :rules="[{ required: true , message:'到期日不能为空!' }]"
  102. />
  103. </div>
  104. <p class="main_title">收票方信息</p>
  105. <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index">
  106. <div class="main_box" style="margin-bottom: 10px;position:relative;">
  107. <van-field readonly label="收款方" v-model="item.payee" input-align="right" />
  108. <van-field readonly label="联系方式" v-model="item.phone" input-align="right" label-width="auto"/>
  109. <van-field readonly label="所属单位" v-model="item.unit" input-align="right" label-width="auto"/>
  110. <van-field readonly label="负责人全称" v-model="item.leader" input-align="right" label-width="auto"/>
  111. <van-field readonly label="资金用途" v-model="item.remark" input-align="right" />
  112. </div>
  113. </div>
  114. <p class="main_title">上传附件(收据)</p>
  115. <div class="main_box" style="padding: 5px 0 0 8px;">
  116. <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  117. <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" ></van-uploader>
  118. </div>
  119. <p style="margin-top:20px;padding: 0 10px">附件下载(收据){{fileList1&&fileList1.length==0?':暂无可下载文件':''}}</p>
  120. <van-cell v-for="(item,index) in fileList1" :key="index">
  121. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  122. </van-cell>
  123. <p class="main_title">上传附件(发票)</p>
  124. <div class="main_box" style="padding: 5px 0 0 8px;">
  125. <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  126. <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" ></van-uploader>
  127. </div>
  128. <p style="margin-top:20px;padding: 0 10px">附件下载(发票){{fileList2&&fileList2.length==0?':暂无可下载文件':''}}</p>
  129. <van-cell v-for="(item,index) in fileList2" :key="index">
  130. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  131. </van-cell>
  132. <p class="main_title">上传附件(其他)</p>
  133. <div class="main_box" style="padding: 5px 0 0 8px;">
  134. <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  135. <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" ></van-uploader>
  136. </div>
  137. <p style="margin-top:20px;padding: 0 10px">附件下载(其他){{fileList3&&fileList3.length==0?':暂无可下载文件':''}}</p>
  138. <van-cell v-for="(item,index) in fileList3" :key="index">
  139. <a :href="item.url" target="_blank">{{index+1}}.{{item.fileName}}</a>
  140. </van-cell>
  141. <div class="main_box examine_box" v-if="this.$route.query.type != 'done'">
  142. <van-row type="flex" justify="space-between" align="center">
  143. <van-col span="5">审批<br/>意见</van-col>
  144. <van-col span="19">
  145. <van-radio-group v-model="pass" direction="horizontal">
  146. <van-radio name="true">同意</van-radio>
  147. <van-radio name="false">驳回</van-radio>
  148. </van-radio-group>
  149. <van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/>
  150. </van-col>
  151. </van-row>
  152. </div>
  153. <div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'">
  154. <van-row>
  155. <van-col span="24" align="center">
  156. <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button>
  157. </van-col>
  158. </van-row>
  159. <div class="clear"></div>
  160. </div>
  161. </div>
  162. </template>
  163. <script>
  164. import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit ,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval";
  165. import request from '@/utils/request'
  166. import {
  167. approval,
  168. attachmentList,
  169. commonAttach,
  170. getCash,
  171. listCashdetailByCashId
  172. } from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  173. export default {
  174. name: "approvalDetail12",
  175. data() {
  176. return {
  177. showcapital:false,
  178. showpayee:false,
  179. showlasj:false,
  180. showbankType:false,
  181. showproject:false,
  182. showFundType:false,
  183. minDate: new Date(),
  184. maxDate: new Date(2025, 10, 1),
  185. currentDate: new Date(),
  186. form:{},
  187. fileList1:[],
  188. fileList2:[],
  189. fileList3:[],
  190. capitalExpenditureType:'',
  191. payee:'',
  192. bankType:'',
  193. wfydlxDictionaries:[],
  194. jglxDictionaries:[],
  195. sysDictionaries:[],
  196. capitalExpenditureTypeOptions:[],
  197. bankTypeDictionaries:[],
  198. projectList:[],
  199. projectFundTypeOptions:[],
  200. projectFundTypeDictionaries:[],
  201. projectListShow:[],
  202. chargeItme:[],
  203. chargeItmeShow:[],
  204. payeeList:[],
  205. // 查询参数
  206. queryParams: {
  207. transferType:"",
  208. orderByColumn: "id",
  209. isAsc: "desc",
  210. },
  211. capitalExpenditureOpen:false,
  212. contractOpen:false,
  213. projectForm:{
  214. projectId:null,
  215. projectName:null,
  216. projectContractor:null,
  217. projectAmount:null,
  218. projectBillNum:null,
  219. projectFundType:'1',
  220. outId:null,
  221. ynType:'1'
  222. },
  223. infoForm:{
  224. infoId:null,
  225. name:null,
  226. code:null,
  227. totalAmount:null,
  228. contractionId:null,
  229. transferId:null
  230. },
  231. projectFundType:'',
  232. orderTypeName:'',
  233. orderTypeOptions:[],
  234. // 审核意见默认值
  235. pass: "true",
  236. comment: "同意",
  237. templateList:[],
  238. };
  239. },
  240. created() {
  241. let queryParams={
  242. pageNum: 1,
  243. pageSize: 100,
  244. }
  245. listProject(queryParams).then(response => {
  246. console.log(response)
  247. this.projectList = response.rows;
  248. for (var i = 0; i < response.rows.length; i++) {
  249. this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id});
  250. }
  251. });
  252. this.getDicts("project_fund_type").then((response) => {
  253. for (var i = 0; i < response.data.length; i++) {
  254. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  255. }
  256. this.projectFundTypeDictionaries = response.data;
  257. });
  258. this.getDicts("order_type").then(response => {
  259. this.orderTypeOptions = response.data;
  260. });
  261. this.getDictionaries();
  262. this.getFileList();
  263. this.getTemplateList();
  264. },
  265. methods: {
  266. getTemplateList(){
  267. let templateQueryParams = {
  268. // 分页
  269. pageNum: 1,
  270. pageSize: 999,
  271. };
  272. listTemplate(templateQueryParams).then(response => {
  273. this.templateList = response.rows;
  274. });
  275. },
  276. tempalteFormat(id){
  277. let name = ""
  278. this.templateList.map(res => {
  279. if(res.id==id){
  280. name = res.name
  281. }
  282. })
  283. return name
  284. },
  285. goFlow(){
  286. window.location='approvalProcess2?id='+this.$route.query.id;
  287. },
  288. getDictionaries(){
  289. getCash(this.$route.query.id).then((response) => {
  290. this.getDicts("capital_expenditure_type").then((res) => {
  291. for (var i = 0; i < res.data.length; i++) {
  292. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  293. }
  294. this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType);
  295. });
  296. if(response.data.capitalExpenditureType==2){
  297. this.capitalExpenditureOpen = true
  298. let param={
  299. 'outId' : response.data.id,
  300. 'ynType' : '2'
  301. }
  302. getProjectto(param).then(res => {
  303. this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType);
  304. this.projectForm = res.data
  305. })
  306. }else if(response.data.capitalExpenditureType==4){
  307. this.contractOpen = true
  308. let param={
  309. 'transferId' : response.data.id
  310. }
  311. getInfoto(param).then(res => {
  312. this.infoForm = res.data
  313. })
  314. }else{
  315. this.showproject = false
  316. }
  317. this.form = response.data;
  318. this.orderTypeOptions.map(res => {
  319. if(res.dictValue==this.form.orderType){
  320. this.orderTypeName = res.dictLabel
  321. }
  322. })
  323. });
  324. listCashdetailByCashId(this.$route.query.id).then((response) => {
  325. this.chargeItme = response.data;
  326. console.log(response.data)
  327. this.getPayeeList();
  328. });
  329. },
  330. addChargeItme(index){
  331. this.chargeItme.splice(index + 1, 0, {
  332. payeeId: "", //收款方ID
  333. payee: "", //收款方
  334. payeeAccount: "", //收款账户
  335. bankDeposit: "", //开户银行
  336. incomeAmount: "", //收入金额
  337. bankType: "", //所属银行
  338. });
  339. },
  340. getPayeeList() {
  341. //普通转账
  342. this.queryParams.accountType = this.form.accountType
  343. this.queryParams.status = "0"
  344. listPayee(this.queryParams).then((response) => {
  345. for (var i = 0; i < response.rows.length; i++) {
  346. this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id});
  347. }
  348. });
  349. },
  350. beforeRead(file) {
  351. this.uploadFiles.push(file.file);
  352. },
  353. deleteFile(file){
  354. this.uploadFiles.map((response,index) => {
  355. if(file.file == response){
  356. this.uploadFiles.splice(index,1)
  357. }
  358. })
  359. },
  360. getFileList(){
  361. let oData1= {
  362. tableId: this.$route.query.id,
  363. tableName: "t_yinnong_cash",
  364. bizPath: "yinnong",
  365. fileType: "1",
  366. }
  367. attachmentList(oData1).then(res => {
  368. res.rows.map(r => {
  369. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  370. this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  371. })
  372. })
  373. let oData2= {
  374. tableId: this.$route.query.id,
  375. tableName: "t_yinnong_cash",
  376. bizPath: "yinnong",
  377. fileType: "2",
  378. }
  379. attachmentList(oData2).then(res => {
  380. res.rows.map(r => {
  381. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  382. this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  383. })
  384. })
  385. let oData3= {
  386. tableId: this.$route.query.id,
  387. tableName: "t_yinnong_cash",
  388. bizPath: "yinnong",
  389. fileType: "3",
  390. }
  391. attachmentList(oData3).then(res => {
  392. res.rows.map(r => {
  393. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  394. this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  395. })
  396. })
  397. },
  398. goBack(){
  399. window.history.go(-1)
  400. },
  401. //删除家庭成员
  402. deleteChargeItme(index){
  403. this.chargeItme.splice(index,1)
  404. },
  405. /** 提交按钮 */
  406. submitForm() {
  407. const data = {
  408. taskId: this.$route.query.taskId,
  409. instanceId: this.form.instanceId,
  410. variables: JSON.stringify({
  411. comment: this.comment,
  412. pass: this.pass,
  413. }),
  414. };
  415. console.log(data);
  416. approval(data).then((response) => {
  417. if(response.code==200 && response.msg=="操作成功"){
  418. this.$toast.success("操作成功");
  419. setTimeout(function(){
  420. history.go(-1)
  421. },2000)
  422. } else{
  423. this.$toast.success("操作失败");
  424. }
  425. });
  426. },
  427. },watch: {
  428. pass: function (val) {
  429. this.comment = val === "true" ? "同意" : "驳回";
  430. },
  431. },
  432. }
  433. </script>
  434. <style scoped lang="scss">
  435. .app-container {
  436. padding: 2% 0;
  437. }
  438. .main_title{
  439. font-size: 0.4rem;
  440. color: #1D6FE9;
  441. margin: 0.2rem 6%;
  442. position: relative;
  443. }
  444. .main_box{
  445. width: 96%;
  446. margin: 0 auto;
  447. border-radius: 6px;
  448. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  449. overflow: hidden;
  450. background-color: #FFF;
  451. }
  452. .submitButton{
  453. width: 96%;
  454. margin: 0 auto;
  455. }
  456. .addFamily{
  457. position: absolute;
  458. top: -2px;
  459. right: 0;
  460. border-radius: 50%;
  461. }
  462. .deleteFamily{
  463. position: absolute;
  464. top: 0rem;
  465. right: 6%;
  466. z-index: 9;
  467. border-radius: 50%;
  468. }
  469. .examine_box{
  470. background-color: #1D6FE9!important;
  471. padding: 0.18rem!important;
  472. padding-left: 0!important;
  473. border-radius: 0.15rem!important;
  474. margin-top: 0.3rem!important;
  475. }
  476. .examine_box .van-col:first-child{
  477. color: #FFF!important;
  478. font-size: 0.45rem!important;
  479. text-align: center!important;
  480. }
  481. .examine_box .van-col:last-child{
  482. background-color: #FFF!important;
  483. border-radius: 0.15rem!important;
  484. overflow: hidden!important;
  485. .van-radio-group--horizontal{
  486. padding: 0.2rem 0;
  487. border-bottom: 1px solid #eee;
  488. }
  489. }
  490. /deep/.van-radio--horizontal{
  491. margin-left: 20px;
  492. margin-right: 0;
  493. }
  494. </style>