移动端
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 13 KiB

3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
2 年之前
3 年之前
2 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  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.paymentState" 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. </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. <p class="main_title">付款方信息</p>
  37. <div class="main_box">
  38. <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/>
  39. <van-field readonly label="付款方账户" v-model="form.payerAccount" input-align="right" label-width="auto"/>
  40. </div>
  41. <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  42. <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" />
  43. <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/>
  44. <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/>
  45. <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" />
  46. <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/>
  47. </div>
  48. <p class="main_title">列表信息</p>
  49. <div class="main_box" style="margin-bottom: 15px;">
  50. <van-field readonly label="收款账户类型" v-model="form.accountType == 1 ? '公户':'私户'" input-align="right" label-width="auto" />
  51. <van-field readonly label="行内转账" v-if="form.bankType==2||form.bankType==4" v-model="form.isPeers == 'Y' ? '是':'否'" input-align="right" label-width="auto" />
  52. </div>
  53. <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index">
  54. <div class="main_box" style="margin-bottom: 10px;position:relative;">
  55. <van-field readonly label="收款方" v-model="item.payee" input-align="right" />
  56. <van-field readonly label="收款账户" v-model="item.payeeAccount" input-align="right" label-width="auto"/>
  57. <van-field readonly label="开户银行" v-model="item.bankDeposit" input-align="right" label-width="auto"/>
  58. <van-field readonly label="收入金额" v-model="item.incomeAmount" input-align="right" label-width="auto"/>
  59. <van-field readonly label="所属银行" v-model="item.bankTypeText" input-align="right" />
  60. </div>
  61. </div>
  62. <p class="main_title">上传附件</p>
  63. <div class="main_box" style="padding: 5px 0 0 8px;">
  64. <van-uploader v-model="fileList" v-if="fileList==null||fileList.length==0" :deletable="false" disabled :upload-text="'未上传附件'"></van-uploader>
  65. <van-uploader v-model="fileList" v-if="fileList!=null&&fileList.length>0" :deletable="false" :max-count="fileList.length" ></van-uploader>
  66. </div>
  67. <p style="margin-top:20px;padding: 0 10px">附件下载{{fileList&&fileList.length==0?':暂无可下载文件':''}}</p>
  68. <van-cell v-for="(item,index) in fileList" :key="index">
  69. <a :href="item.url">{{index+1}}.{{item.fileName}}</a>
  70. </van-cell>
  71. <div class="main_box examine_box" v-if="this.$route.query.type != 'done'">
  72. <van-row type="flex" justify="space-between" align="center">
  73. <van-col span="5">审批<br/>意见</van-col>
  74. <van-col span="19">
  75. <van-radio-group v-model="pass" direction="horizontal">
  76. <van-radio name="true">同意</van-radio>
  77. <van-radio name="false">驳回</van-radio>
  78. </van-radio-group>
  79. <van-field rows="2" autosize v-model="comment" type="textarea" placeholder="同意申请宅基地"/>
  80. </van-col>
  81. </van-row>
  82. </div>
  83. <div style="margin: 16px 2%;" v-if="this.$route.query.type != 'done'">
  84. <van-row>
  85. <van-col span="24" align="center">
  86. <van-button type="info" native-type="submit" @click="submitForm" class="submitButton">提交</van-button>
  87. </van-col>
  88. </van-row>
  89. <div class="clear"></div>
  90. </div>
  91. </div>
  92. </template>
  93. <script>
  94. import { getTransfer , queryTransferDetail , listPayee , getProjectto , listProject , approval } from "@/api/onlineHome/bankAgriculture/paymentApproval";
  95. import {attachmentList, systemAttachment} from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  96. import request from '@/utils/request'
  97. export default {
  98. name: "approvalApproval",
  99. data() {
  100. return {
  101. showcapital:false,
  102. showpayee:false,
  103. showlasj:false,
  104. showbankType:false,
  105. showproject:false,
  106. showFundType:false,
  107. minDate: new Date(2000, 1, 1),
  108. maxDate: new Date(2050, 12, 31),
  109. currentDate: new Date(),
  110. form:{},
  111. capitalExpenditureType:'',
  112. payee:'',
  113. bankType:'',
  114. wfydlxDictionaries:[],
  115. jglxDictionaries:[],
  116. sysDictionaries:[],
  117. capitalExpenditureTypeOptions:[],
  118. bankTypeDictionaries:[],
  119. projectList:[],
  120. projectFundTypeOptions:[],
  121. projectFundTypeDictionaries:[],
  122. projectListShow:[],
  123. chargeItme:[],
  124. chargeItmeShow:[],
  125. payeeList:[],
  126. // 查询参数
  127. queryParams: {
  128. transferType:"",
  129. orderByColumn: "id",
  130. isAsc: "desc",
  131. },
  132. capitalExpenditureOpen:false,
  133. projectForm:{
  134. projectId:null,
  135. projectName:null,
  136. projectContractor:null,
  137. projectAmount:null,
  138. projectBillNum:null,
  139. projectFundType:'1',
  140. outId:null,
  141. ynType:'1'
  142. },
  143. projectFundType:'',
  144. fileList:[],
  145. uploadFiles:[],
  146. // 审核意见默认值
  147. pass: "true",
  148. comment: "同意",
  149. };
  150. },
  151. created() {
  152. let queryParams={
  153. pageNum: 1,
  154. pageSize: 100,
  155. }
  156. listProject(queryParams).then(response => {
  157. console.log(response)
  158. this.projectList = response.rows;
  159. for (var i = 0; i < response.rows.length; i++) {
  160. this.projectListShow.push({text: response.rows[i].projectName, value: response.rows[i].id});
  161. }
  162. });
  163. this.getDicts("project_fund_type").then((response) => {
  164. for (var i = 0; i < response.data.length; i++) {
  165. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  166. }
  167. this.projectFundTypeDictionaries = response.data;
  168. });
  169. this.getDictionaries();
  170. this.getFileList();
  171. },
  172. methods: {
  173. backDone(){
  174. if(this.$route.query.type != 'done'){
  175. this.$router.push({name:'onlineHomeDone',query: {activeName:'1'}})
  176. }else{
  177. this.$router.push({name:'onlineHomeDone',query: {activeName:'2'}})
  178. }
  179. },
  180. goFlow(){
  181. window.location='approvalProcess?id='+this.$route.query.id;
  182. },
  183. getDictionaries(){
  184. getTransfer(this.$route.query.id).then((response) => {
  185. this.getDicts("capital_expenditure_type").then((res) => {
  186. for (var i = 0; i < res.data.length; i++) {
  187. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  188. }
  189. this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType);
  190. });
  191. if(response.data.capitalExpenditureType==2){
  192. this.capitalExpenditureOpen = true
  193. let param={
  194. 'outId' : response.data.id,
  195. 'ynType' : '1'
  196. }
  197. getProjectto(param).then(res => {
  198. this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType);
  199. this.projectForm = res.data
  200. })
  201. }else{
  202. this.showproject = false
  203. }
  204. this.form = response.data;
  205. });
  206. queryTransferDetail(this.$route.query.id).then((response) => {
  207. this.getDicts("bank_type").then(res => {
  208. for (var i = 0; i < res.data.length; i++) {
  209. this.bankTypeDictionaries.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  210. }
  211. for (var j = 0 ; j < response.rows.length ; j++){
  212. response.rows[j].bankTypeText = this.selectDictLabel(res.data, response.rows[j].bankType);
  213. }
  214. this.chargeItme = response.rows;
  215. });
  216. this.getPayeeList();
  217. });
  218. },
  219. getPayeeList() {
  220. //普通转账
  221. this.queryParams.accountType = this.form.accountType
  222. this.queryParams.status = "0"
  223. listPayee(this.queryParams).then((response) => {
  224. for (var i = 0; i < response.rows.length; i++) {
  225. this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id});
  226. }
  227. });
  228. },
  229. beforeRead(file) {
  230. this.uploadFiles.push(file.file);
  231. },
  232. deleteFile(file){
  233. console.log(file)
  234. this.uploadFiles.map((response,index) => {
  235. if(file.file == response){
  236. this.uploadFiles.splice(index,1)
  237. }
  238. })
  239. if(file.id){
  240. systemAttachment(file.id).then((res) => {
  241. });
  242. }
  243. },
  244. getFileList(){
  245. let oData= {
  246. tableId: this.$route.query.id,
  247. tableName: "t_yinnong_transfer",
  248. bizPath: "upload",
  249. fileType: "0",
  250. }
  251. attachmentList(oData).then(res => {
  252. console.log(res)
  253. console.log(location.protocol+"//"+location.host+request.defaults.baseURL)
  254. res.rows.map(r => {
  255. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  256. this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id,"fileName":r.fileName})
  257. console.log(r)
  258. })
  259. })
  260. },
  261. /** 提交按钮 */
  262. submitForm() {
  263. const data = {
  264. taskId: this.$route.query.taskId,
  265. instanceId: this.form.instanceId,
  266. variables: JSON.stringify({
  267. comment: this.comment,
  268. pass: this.pass,
  269. }),
  270. };
  271. console.log(data);
  272. approval(data).then((response) => {
  273. if(response.code==200 && response.msg=="操作成功"){
  274. this.$toast.success("操作成功");
  275. setTimeout(function(){
  276. history.go(-1)
  277. },2000)
  278. } else{
  279. this.$toast.success("操作失败");
  280. }
  281. });
  282. },
  283. },watch: {
  284. pass: function (val) {
  285. this.comment = val === "true" ? "同意" : "驳回";
  286. },
  287. },
  288. }
  289. </script>
  290. <style scoped lang="scss">
  291. .app-container {
  292. padding: 2% 0;
  293. }
  294. .main_title{
  295. font-size: 0.4rem;
  296. color: #1D6FE9;
  297. margin: 0.2rem 6%;
  298. position: relative;
  299. }
  300. .main_box{
  301. width: 96%;
  302. margin: 0 auto;
  303. border-radius: 6px;
  304. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  305. overflow: hidden;
  306. background-color: #FFF;
  307. }
  308. .submitButton{
  309. width: 96%;
  310. margin: 0 auto;
  311. }
  312. .addFamily{
  313. position: absolute;
  314. top: -2px;
  315. right: 0;
  316. border-radius: 50%;
  317. }
  318. .deleteFamily{
  319. position: absolute;
  320. top: 0rem;
  321. right: 6%;
  322. z-index: 9;
  323. border-radius: 50%;
  324. }
  325. .examine_box{
  326. background-color: #1D6FE9!important;
  327. padding: 0.18rem!important;
  328. padding-left: 0!important;
  329. border-radius: 0.15rem!important;
  330. margin-top: 0.3rem!important;
  331. }
  332. .examine_box .van-col:first-child{
  333. color: #FFF!important;
  334. font-size: 0.45rem!important;
  335. text-align: center!important;
  336. }
  337. .examine_box .van-col:last-child{
  338. background-color: #FFF!important;
  339. border-radius: 0.15rem!important;
  340. overflow: hidden!important;
  341. .van-radio-group--horizontal{
  342. padding: 0.2rem 0;
  343. border-bottom: 1px solid #eee;
  344. }
  345. }
  346. /deep/.van-radio--horizontal{
  347. margin-left: 20px;
  348. margin-right: 0;
  349. }
  350. </style>