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

417 lines
15 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 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 v-if="form.approvalMode==1" 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;">
  106. <div class="main_box" style="margin-bottom: 10px;position:relative;" v-for="(item, index) in chargeItme" :key="index" v-if="index<listLength">
  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. <p class="main_more" v-if="chargeItme.length>1 && showbtn" @click="listLength = chargeItme.length,showbtn=false">查看更多</p>
  114. <p class="main_more" v-if="chargeItme.length>1 && !showbtn" @click="listLength = 1,showbtn=true">收起列表</p>
  115. </div>
  116. <p class="main_title">上传附件</p>
  117. <div class="main_box" style="padding: 5px 0 0 0;">
  118. <van-cell value="收据" />
  119. <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader>
  120. <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader>
  121. <van-cell value="发票" />
  122. <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader>
  123. <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader>
  124. <van-cell value="其他" />
  125. <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader>
  126. <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader>
  127. </div>
  128. </div>
  129. </template>
  130. <script>
  131. import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject
  132. , addProjectto , customSubmit, getInfoto ,listTemplate} from "@/api/onlineHome/bankAgriculture/paymentApproval";
  133. import request from '@/utils/request'
  134. import {
  135. attachmentList,
  136. commonAttach,
  137. getCash,
  138. listCashdetailByCashId
  139. } from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  140. export default {
  141. name: "approvalDetail12",
  142. data() {
  143. return {
  144. showcapital:false,
  145. showpayee:false,
  146. showlasj:false,
  147. showbankType:false,
  148. showproject:false,
  149. showFundType:false,
  150. showbtn:true,
  151. listLength:1,
  152. minDate: new Date(),
  153. maxDate: new Date(2025, 10, 1),
  154. currentDate: new Date(),
  155. form:{},
  156. fileList1:[],
  157. fileList2:[],
  158. fileList3:[],
  159. capitalExpenditureType:'',
  160. payee:'',
  161. bankType:'',
  162. wfydlxDictionaries:[],
  163. jglxDictionaries:[],
  164. sysDictionaries:[],
  165. capitalExpenditureTypeOptions:[],
  166. bankTypeDictionaries:[],
  167. projectList:[],
  168. projectFundTypeOptions:[],
  169. projectFundTypeDictionaries:[],
  170. projectListShow:[],
  171. chargeItme:[],
  172. chargeItmeShow:[],
  173. payeeList:[],
  174. // 查询参数
  175. queryParams: {
  176. transferType:12,
  177. orderByColumn: "id",
  178. isAsc: "desc",
  179. },
  180. capitalExpenditureOpen:false,
  181. contractOpen:false,
  182. projectForm:{
  183. projectId:null,
  184. projectName:null,
  185. projectContractor:null,
  186. projectAmount:null,
  187. projectBillNum:null,
  188. projectFundType:'1',
  189. outId:null,
  190. ynType:'1'
  191. },
  192. infoForm:{
  193. infoId:null,
  194. name:null,
  195. code:null,
  196. totalAmount:null,
  197. contractionId:null,
  198. transferId:null
  199. },
  200. projectFundType:'',
  201. orderTypeName:'',
  202. orderTypeOptions:[],
  203. templateList:[],
  204. };
  205. },
  206. created() {
  207. this.getDicts("project_fund_type").then((response) => {
  208. for (var i = 0; i < response.data.length; i++) {
  209. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  210. }
  211. this.projectFundTypeDictionaries = response.data;
  212. });
  213. this.getDicts("order_type").then(response => {
  214. this.orderTypeOptions = response.data;
  215. });
  216. this.getDictionaries();
  217. this.getFileList();
  218. this.getTemplateList();
  219. },
  220. methods: {
  221. getTemplateList(){
  222. let templateQueryParams = {
  223. // 分页
  224. pageNum: 1,
  225. pageSize: 999,
  226. };
  227. listTemplate(templateQueryParams).then(response => {
  228. this.templateList = response.rows;
  229. });
  230. },
  231. tempalteFormat(id){
  232. let name = ""
  233. this.templateList.map(res => {
  234. if(res.id==id){
  235. name = res.name
  236. }
  237. })
  238. return name
  239. },
  240. goFlow(){
  241. window.location='approvalProcess?id='+this.$route.query.id;
  242. },
  243. getDictionaries(){
  244. getCash(this.$route.query.id).then((response) => {
  245. this.getDicts("capital_expenditure_type").then((res) => {
  246. for (var i = 0; i < res.data.length; i++) {
  247. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  248. }
  249. this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType);
  250. });
  251. if(response.data.capitalExpenditureType==2){
  252. this.capitalExpenditureOpen = true
  253. let param={
  254. 'outId' : response.data.id,
  255. 'ynType' : '2'
  256. }
  257. getProjectto(param).then(res => {
  258. this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType);
  259. this.projectForm = res.data
  260. })
  261. }else if(response.data.capitalExpenditureType==4){
  262. this.contractOpen = true
  263. let param={
  264. 'transferId' : response.data.id
  265. }
  266. getInfoto(param).then(res => {
  267. this.infoForm = res.data
  268. })
  269. }else{
  270. this.showproject = false
  271. }
  272. this.form = response.data;
  273. this.orderTypeOptions.map(res => {
  274. if(res.dictValue==this.form.orderType){
  275. this.orderTypeName = res.dictLabel
  276. }
  277. })
  278. });
  279. listCashdetailByCashId(this.$route.query.id).then((response) => {
  280. this.chargeItme = response.data;
  281. console.log(response.data)
  282. this.getPayeeList();
  283. });
  284. },
  285. addChargeItme(index){
  286. this.chargeItme.splice(index + 1, 0, {
  287. payeeId: "", //收款方ID
  288. payee: "", //收款方
  289. payeeAccount: "", //收款账户
  290. bankDeposit: "", //开户银行
  291. incomeAmount: "", //收入金额
  292. bankType: "", //所属银行
  293. });
  294. },
  295. getPayeeList() {
  296. //普通转账
  297. this.queryParams.accountType = this.form.accountType
  298. this.queryParams.status = "0"
  299. listPayee(this.queryParams).then((response) => {
  300. for (var i = 0; i < response.rows.length; i++) {
  301. this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id});
  302. }
  303. });
  304. },
  305. getFileList(){
  306. let oData1= {
  307. tableId: this.$route.query.id,
  308. tableName: "t_yinnong_transfer",
  309. bizPath: "yinnong",
  310. fileType: "1",
  311. }
  312. attachmentList(oData1).then(res => {
  313. res.rows.map(r => {
  314. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  315. this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
  316. })
  317. })
  318. let oData2= {
  319. tableId: this.$route.query.id,
  320. tableName: "t_yinnong_transfer",
  321. bizPath: "yinnong",
  322. fileType: "2",
  323. }
  324. attachmentList(oData2).then(res => {
  325. res.rows.map(r => {
  326. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  327. this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
  328. })
  329. })
  330. let oData3= {
  331. tableId: this.$route.query.id,
  332. tableName: "t_yinnong_transfer",
  333. bizPath: "yinnong",
  334. fileType: "3",
  335. }
  336. attachmentList(oData3).then(res => {
  337. res.rows.map(r => {
  338. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  339. this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
  340. })
  341. })
  342. },
  343. goBack(){
  344. window.history.go(-1)
  345. },
  346. //删除家庭成员
  347. deleteChargeItme(index){
  348. this.chargeItme.splice(index,1)
  349. },
  350. },
  351. }
  352. </script>
  353. <style scoped lang="scss">
  354. .app-container {
  355. padding: 2% 0;
  356. }
  357. .main_more{
  358. width: 96%;
  359. margin: 0 auto;
  360. margin-top: 10px;
  361. border-radius: 6px;
  362. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  363. overflow: hidden;
  364. background-color: #FFF;
  365. text-align: center;
  366. padding: 10PX 0;
  367. }
  368. .main_title{
  369. font-size: 0.4rem;
  370. color: #1D6FE9;
  371. margin: 0.2rem 6%;
  372. position: relative;
  373. }
  374. .main_box{
  375. width: 96%;
  376. margin: 0 auto;
  377. border-radius: 6px;
  378. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  379. overflow: hidden;
  380. background-color: #FFF;
  381. }
  382. .submitButton{
  383. width: 80%;
  384. margin: 0 auto;
  385. background-color: #1D6FE9;
  386. }
  387. .addFamily{
  388. position: absolute;
  389. top: -2px;
  390. right: 0;
  391. border-radius: 50%;
  392. }
  393. .deleteFamily{
  394. position: absolute;
  395. top: 0rem;
  396. right: 6%;
  397. z-index: 9;
  398. border-radius: 50%;
  399. }
  400. </style>