移动端
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

378 rader
14 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. </div>
  29. <div class="main_box" style="margin-top: 10px;">
  30. <van-field readonly label="付款事由" v-model="form.remark" type="textarea" input-align="right" rows="3" label-width="auto"/>
  31. </div>
  32. <div class="main_box" style="margin-top: 10px;">
  33. <van-field readonly label="说明情况" v-model="form.explainSituation" type="textarea" input-align="right" rows="3" label-width="auto"/>
  34. </div>
  35. <div class="main_box" v-if="capitalExpenditureOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  36. <van-field readonly label="项目名称" v-model="projectForm.projectName" input-align="right" />
  37. <van-field readonly label="承建单位" v-model="projectForm.projectContractor" input-align="right" label-width="auto"/>
  38. <van-field readonly label="合同价款(元)" v-model="projectForm.projectAmount" input-align="right" label-width="auto"/>
  39. <van-field readonly label="工程款类型" v-model="projectFundType" input-align="right" />
  40. <van-field readonly label="工程发票号" v-model="projectForm.projectBillNum" input-align="right" label-width="auto"/>
  41. </div>
  42. <div class="main_box" v-if="contractOpen" style="margin-bottom: 10px;margin-top: 10px;position:relative;">
  43. <van-field readonly label="合同名称" v-model="infoForm.name" input-align="right" />
  44. <van-field readonly label="合同编码" v-model="infoForm.code" input-align="right" label-width="auto"/>
  45. <van-field readonly label="合同价款(元)" v-model="infoForm.totalAmount" input-align="right" label-width="auto"/>
  46. </div>
  47. <p class="main_title">出票方信息</p>
  48. <div class="main_box">
  49. <van-field readonly label="付款方" v-model="form.payer" input-align="right" label-width="auto"/>
  50. <van-field :rules="[{ required: true , message:'请输入汇票号码' }]" required label="汇票号码" v-model="form.payerAccount" placeholder="请输入汇票号码" input-align="right" label-width="auto"/>
  51. <van-field
  52. readonly
  53. label="出票金额(元)"
  54. v-model="form.expenditureAmount"
  55. placeholder=""
  56. input-align="right"
  57. label-width="auto"
  58. required
  59. :rules="[{ required: true , message:'出票金额不能为空!' }]"
  60. />
  61. <van-field
  62. readonly
  63. label="汇票类型"
  64. v-model="orderTypeName"
  65. placeholder=""
  66. input-align="right"
  67. label-width="auto"
  68. required
  69. :rules="[{ required: true , message:'汇票类型不能为空!' }]"
  70. />
  71. <van-field
  72. readonly
  73. label="汇票类型"
  74. v-model="form.orderType"
  75. placeholder=""
  76. input-align="right"
  77. label-width="auto"
  78. style="display: none"
  79. required
  80. :rules="[{ required: true , message:'汇票类型不能为空!' }]"
  81. />
  82. <van-field
  83. readonly
  84. label="开票日"
  85. v-model="form.startTime"
  86. placeholder=""
  87. input-align="right"
  88. label-width="auto"
  89. required
  90. :rules="[{ required: true , message:'开票日不能为空!' }]"
  91. />
  92. <van-field
  93. readonly
  94. label="到期日"
  95. v-model="form.endTime"
  96. placeholder=""
  97. input-align="right"
  98. label-width="auto"
  99. required
  100. :rules="[{ required: true , message:'到期日不能为空!' }]"
  101. />
  102. </div>
  103. <p class="main_title">收票方信息</p>
  104. <div :style="{position:'relative',padding: index == 0 ? '':'10px 0 0 0'}" v-for="(item, index) in chargeItme" :key="index">
  105. <div class="main_box" style="margin-bottom: 10px;position:relative;">
  106. <van-field readonly label="收款方" v-model="item.payee" input-align="right" />
  107. <van-field readonly label="联系方式" v-model="item.phone" input-align="right" label-width="auto"/>
  108. <van-field readonly label="所属单位" v-model="item.unit" input-align="right" label-width="auto"/>
  109. <van-field readonly label="负责人全称" v-model="item.leader" input-align="right" label-width="auto"/>
  110. <van-field readonly label="资金用途" v-model="item.remark" input-align="right" />
  111. </div>
  112. </div>
  113. <p class="main_title">上传附件</p>
  114. <div class="main_box" style="padding: 5px 0 0 0;">
  115. <van-cell value="收据" />
  116. <van-uploader v-model="fileList1" v-if="fileList1==null||fileList1.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader>
  117. <van-uploader v-model="fileList1" v-if="fileList1!=null&&fileList1.length>0" :deletable="false" :max-count="fileList1.length" style="margin-left:8px;"></van-uploader>
  118. <van-cell value="发票" />
  119. <van-uploader v-model="fileList2" v-if="fileList2==null||fileList2.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader>
  120. <van-uploader v-model="fileList2" v-if="fileList2!=null&&fileList2.length>0" :deletable="false" :max-count="fileList2.length" style="margin-left:8px;"></van-uploader>
  121. <van-cell value="其他" />
  122. <van-uploader v-model="fileList3" v-if="fileList3==null||fileList3.length==0" :deletable="false" disabled :upload-text="'未上传附件'" style="margin-left:8px;"></van-uploader>
  123. <van-uploader v-model="fileList3" v-if="fileList3!=null&&fileList3.length>0" :deletable="false" :max-count="fileList3.length" style="margin-left:8px;" ></van-uploader>
  124. </div>
  125. </div>
  126. </template>
  127. <script>
  128. import { getTransfer , queryTransferDetail , listPayee , updateTransfer , getProjectto , listProject , addProjectto , customSubmit, getInfoto} from "@/api/onlineHome/bankAgriculture/paymentApproval";
  129. import request from '@/utils/request'
  130. import {
  131. attachmentList,
  132. commonAttach,
  133. getCash,
  134. listCashdetailByCashId
  135. } from "../../../../api/onlineHome/bankAgriculture/paymentApproval";
  136. export default {
  137. name: "approvalDetail12",
  138. data() {
  139. return {
  140. showcapital:false,
  141. showpayee:false,
  142. showlasj:false,
  143. showbankType:false,
  144. showproject:false,
  145. showFundType:false,
  146. minDate: new Date(),
  147. maxDate: new Date(2025, 10, 1),
  148. currentDate: new Date(),
  149. form:{},
  150. fileList1:[],
  151. fileList2:[],
  152. fileList3:[],
  153. capitalExpenditureType:'',
  154. payee:'',
  155. bankType:'',
  156. wfydlxDictionaries:[],
  157. jglxDictionaries:[],
  158. sysDictionaries:[],
  159. capitalExpenditureTypeOptions:[],
  160. bankTypeDictionaries:[],
  161. projectList:[],
  162. projectFundTypeOptions:[],
  163. projectFundTypeDictionaries:[],
  164. projectListShow:[],
  165. chargeItme:[],
  166. chargeItmeShow:[],
  167. payeeList:[],
  168. // 查询参数
  169. queryParams: {
  170. transferType:12,
  171. orderByColumn: "id",
  172. isAsc: "desc",
  173. },
  174. capitalExpenditureOpen:false,
  175. contractOpen:false,
  176. projectForm:{
  177. projectId:null,
  178. projectName:null,
  179. projectContractor:null,
  180. projectAmount:null,
  181. projectBillNum:null,
  182. projectFundType:'1',
  183. outId:null,
  184. ynType:'1'
  185. },
  186. infoForm:{
  187. infoId:null,
  188. name:null,
  189. code:null,
  190. totalAmount:null,
  191. contractionId:null,
  192. transferId:null
  193. },
  194. projectFundType:'',
  195. orderTypeName:'',
  196. orderTypeOptions:[]
  197. };
  198. },
  199. created() {
  200. this.getDicts("project_fund_type").then((response) => {
  201. for (var i = 0; i < response.data.length; i++) {
  202. this.projectFundTypeOptions.push({text: response.data[i].dictLabel, value: response.data[i].dictValue});
  203. }
  204. this.projectFundTypeDictionaries = response.data;
  205. });
  206. this.getDicts("order_type").then(response => {
  207. this.orderTypeOptions = response.data;
  208. });
  209. this.getDictionaries();
  210. this.getFileList();
  211. },
  212. methods: {
  213. goFlow(){
  214. window.location='approvalProcess?id='+this.$route.query.id;
  215. },
  216. getDictionaries(){
  217. getCash(this.$route.query.id).then((response) => {
  218. this.getDicts("capital_expenditure_type").then((res) => {
  219. for (var i = 0; i < res.data.length; i++) {
  220. this.capitalExpenditureTypeOptions.push({text: res.data[i].dictLabel, value: res.data[i].dictValue});
  221. }
  222. this.capitalExpenditureType = this.selectDictLabel(res.data, response.data.capitalExpenditureType);
  223. });
  224. if(response.data.capitalExpenditureType==2){
  225. this.capitalExpenditureOpen = true
  226. let param={
  227. 'outId' : response.data.id,
  228. 'ynType' : '2'
  229. }
  230. getProjectto(param).then(res => {
  231. this.projectFundType = this.selectDictLabel(this.projectFundTypeDictionaries, res.data.projectFundType);
  232. this.projectForm = res.data
  233. })
  234. }else if(response.data.capitalExpenditureType==4){
  235. this.contractOpen = true
  236. let param={
  237. 'transferId' : response.data.id
  238. }
  239. getInfoto(param).then(res => {
  240. this.infoForm = res.data
  241. })
  242. }else{
  243. this.showproject = false
  244. }
  245. this.form = response.data;
  246. this.orderTypeOptions.map(res => {
  247. console.log(this.orderTypeOptions)
  248. if(res.dictValue==this.form.orderType){
  249. this.orderTypeName = res.dictLabel
  250. }
  251. })
  252. });
  253. console.log(this.$route.query.id)
  254. listCashdetailByCashId(this.$route.query.id).then((response) => {
  255. this.chargeItme = response.data;
  256. console.log(response.data)
  257. this.getPayeeList();
  258. });
  259. },
  260. addChargeItme(index){
  261. this.chargeItme.splice(index + 1, 0, {
  262. payeeId: "", //收款方ID
  263. payee: "", //收款方
  264. payeeAccount: "", //收款账户
  265. bankDeposit: "", //开户银行
  266. incomeAmount: "", //收入金额
  267. bankType: "", //所属银行
  268. });
  269. },
  270. getPayeeList() {
  271. //普通转账
  272. this.queryParams.accountType = this.form.accountType
  273. this.queryParams.status = "0"
  274. listPayee(this.queryParams).then((response) => {
  275. for (var i = 0; i < response.rows.length; i++) {
  276. this.payeeList.push({text: response.rows[i].payee, value: response.rows[i].id});
  277. }
  278. });
  279. },
  280. getFileList(){
  281. let oData1= {
  282. tableId: this.$route.query.id,
  283. tableName: "t_yinnong_cash",
  284. bizPath: "yinnong",
  285. fileType: "1",
  286. }
  287. attachmentList(oData1).then(res => {
  288. res.rows.map(r => {
  289. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  290. this.fileList1.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
  291. })
  292. })
  293. let oData2= {
  294. tableId: this.$route.query.id,
  295. tableName: "t_yinnong_cash",
  296. bizPath: "yinnong",
  297. fileType: "2",
  298. }
  299. attachmentList(oData2).then(res => {
  300. res.rows.map(r => {
  301. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  302. this.fileList2.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
  303. })
  304. })
  305. let oData3= {
  306. tableId: this.$route.query.id,
  307. tableName: "t_yinnong_cash",
  308. bizPath: "yinnong",
  309. fileType: "3",
  310. }
  311. attachmentList(oData3).then(res => {
  312. res.rows.map(r => {
  313. let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
  314. this.fileList3.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
  315. })
  316. })
  317. },
  318. goBack(){
  319. window.history.go(-1)
  320. },
  321. //删除家庭成员
  322. deleteChargeItme(index){
  323. this.chargeItme.splice(index,1)
  324. },
  325. },
  326. }
  327. </script>
  328. <style scoped lang="scss">
  329. .app-container {
  330. padding: 2% 0;
  331. }
  332. .main_title{
  333. font-size: 0.4rem;
  334. color: #1D6FE9;
  335. margin: 0.2rem 6%;
  336. position: relative;
  337. }
  338. .main_box{
  339. width: 96%;
  340. margin: 0 auto;
  341. border-radius: 6px;
  342. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  343. overflow: hidden;
  344. background-color: #FFF;
  345. }
  346. .submitButton{
  347. width: 80%;
  348. margin: 0 auto;
  349. background-color: #1D6FE9;
  350. }
  351. .addFamily{
  352. position: absolute;
  353. top: -2px;
  354. right: 0;
  355. border-radius: 50%;
  356. }
  357. .deleteFamily{
  358. position: absolute;
  359. top: 0rem;
  360. right: 6%;
  361. z-index: 9;
  362. border-radius: 50%;
  363. }
  364. </style>