get_request_funds.vue 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <template>
  2. <view>
  3. <view class='wrap'>
  4. <view class="xinxi" v-if="detailData.expensesType == '2'" style="font-size: 28rpx; ">请款信息</view>
  5. <view class="xinxi" v-if="detailData.expensesType == '1'" style="font-size: 28rpx; ">收款信息</view>
  6. <view class="c-row">
  7. <view class="title">用途</view>
  8. <view class="con-list">
  9. <view>{{detailData.purpose}}</view>
  10. </view>
  11. </view>
  12. <view class="c-row" v-if="detailData.purpose == '库点费用'">
  13. <view class="title">仓库名称</view>
  14. <view class="con-list">
  15. <view>{{detailData.warehouseName}}</view>
  16. </view>
  17. </view>
  18. <view class="c-row" v-if="detailData.purpose == '库点费用'">
  19. <view class="title">类型</view>
  20. <view class="con-list">
  21. <view>{{detailData.wareExpenseType}}</view>
  22. </view>
  23. </view>
  24. <view class="c-row" v-if="detailData.purpose == '合同费用'">
  25. <view class="title">合同编号</view>
  26. <view class="con-list">
  27. <view>{{detailData.contractNo}}</view>
  28. </view>
  29. </view>
  30. <view class="c-row">
  31. <view class="title">费用名称</view>
  32. <view class="con-list">
  33. <view>{{detailData.expenseName}}</view>
  34. </view>
  35. </view>
  36. <view class="c-row" v-if="detailData.expensesType == '2'">
  37. <view class="title">付款方名头</view>
  38. <view class="con-list">
  39. <view>{{detailData.payerHeader}}</view>
  40. </view>
  41. </view>
  42. <view class="c-row" v-if="detailData.purpose == '经营性费用' && detailData.expensesType == '2'">
  43. <view class="title">所属名头</view>
  44. <view class="con-list">
  45. <view>{{detailData.belongName}}</view>
  46. </view>
  47. </view>
  48. <view class="c-row">
  49. <view class="title">金额(元)</view>
  50. <view class="con-list">
  51. <view>{{detailData.amountMoney}}</view>
  52. </view>
  53. <span v-if="detailData.paymentIdentifi == 1" style="color: blue;">备用金支付</span>
  54. <span v-if="detailData.noPaymentFlag == 1" style="color: blue;">无需付款</span>
  55. </view>
  56. <view class="c-row">
  57. <view class="left">备注</view>
  58. </view>
  59. <view style='position:relative;' class="wrap no-boder">
  60. <u-input class='textarea' v-model="detailData.remark" :disabled="disabled" :type="type" :border="border"
  61. placeholder="选填,不超过150字" :height="height" :auto-height="autoHeight" maxlength="150" />
  62. <view style='position:absolute;right:10px;bottom:20px;color:#AFB3BF;'>
  63. {{detailData.remark?detailData.remark.length:"0"}}/150个字
  64. </view>
  65. </view>
  66. <view class="c-row">
  67. <view class="title">附件</view>
  68. </view>
  69. <view>
  70. <view v-if='imglist2.length>0'>
  71. <view style="margin-top: 20rpx;" v-for='item in imglist2'>
  72. <view class="img_item">
  73. <view class="" style="width: 16%;">
  74. <image
  75. v-if="item.type == 'pdf'"
  76. style="width: 40px; height: 40px;" src="../../static/img/oa_office/pdf3.png"
  77. mode=""></image>
  78. <image v-else-if="item.type == 'xls'||item.type == 'xlsx'"
  79. style="width: 40px; height: 40px;" src="../../static/img/oa_office/excle3.png"
  80. mode=""></image>
  81. <image v-else-if="item.type == 'doc'||item.type == 'docx'"
  82. style="width: 40px; height: 40px;" src="../../static/img/oa_office/word3.png"
  83. mode=""></image>
  84. <image v-else style="width: 40px; height: 40px;" :src="item.appendixPath" mode="">
  85. </image>
  86. </view>
  87. <view class="" style="width: 70%;">
  88. <view class="char_css">{{item.appendixName}}</view>
  89. <view class="">{{item.appendixSize}}</view>
  90. </view>
  91. <view class="img_dowload" @click="openDocument(item)">下载</view>
  92. </view>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <view v-if="detailData.expensesType == '2'" class='wrap margin-bottom'>
  98. <view class="xinxi" style="font-size: 28rpx; ">收款账户信息</view>
  99. <view class="c-row">
  100. <view class="title">收款方</view>
  101. <view class="con-list">
  102. <view>{{detailData.payee}}</view>
  103. </view>
  104. </view>
  105. <view class="c-row">
  106. <view class="title">账户</view>
  107. <view class="con-list">
  108. <view>{{detailData.accountNumber}}</view>
  109. </view>
  110. </view>
  111. <view class="c-row">
  112. <view class="title">开户行</view>
  113. <view class="con-list">
  114. <view>{{detailData.bank}}</view>
  115. </view>
  116. </view>
  117. <view class="c-row">
  118. <view class="title">开户支行</view>
  119. <view class="con-list">
  120. <view>{{detailData.bankBranch}}</view>
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </template>
  126. <script>
  127. export default {
  128. data() {
  129. return {
  130. disabled: false,
  131. detailData: {
  132. purpose: '',
  133. remark: "",
  134. warehouseName: '',
  135. expenseName: '',
  136. amountMoney: '',
  137. contractNo: '',
  138. expensesPurpose: ''
  139. },
  140. type: 'textarea',
  141. border: true,
  142. imglist: [], //存
  143. imglist2: [], //展示
  144. height: 150,
  145. autoHeight: true,
  146. }
  147. },
  148. onLoad(options) {
  149. this.id = options.id
  150. if (this.id) {
  151. this.disabled = true
  152. } else {
  153. return
  154. }
  155. this.getList()
  156. },
  157. watch: {
  158. imglist: {
  159. handler: function() {
  160. this.$api.doRequest('get', 'appendix/query/getFileList', {
  161. appendixIds: this.imglist.toString()
  162. }).then(res => {
  163. this.imglist2 = res.data.data
  164. for (let i = 0; i < this.imglist2.length; i++) {
  165. if (this.imglist2[i].appendixName) {
  166. this.imglist2[i].type = this.imglist2[i].appendixName.split(".")[1]
  167. }
  168. }
  169. })
  170. },
  171. deep: true
  172. }
  173. },
  174. methods: {
  175. openDocument(src) {
  176. uni.downloadFile({
  177. url: src.appendixPath,
  178. success: function(res) {
  179. var filePath = res.tempFilePath;
  180. uni.openDocument({
  181. filePath: filePath,
  182. showMenu: true,
  183. success: function(res) {
  184. console.log('打开文档成功');
  185. }
  186. });
  187. }
  188. });
  189. },
  190. calculate() {
  191. const query = uni.createSelectorQuery().in(this);
  192. query.selectAll('.left')
  193. console.log(query)
  194. },
  195. //获取信息
  196. getList() {
  197. this.$api.doRequest('get', '/expenseInfo/ExpenseInfo', {
  198. id: this.id,
  199. }).then(res => {
  200. if (res.data.code == 200) {
  201. this.detailData = res.data.data
  202. this.imglist = this.detailData.addressUrl.split(',')
  203. }
  204. })
  205. },
  206. },
  207. }
  208. </script>
  209. <style lang='scss' scoped>
  210. page {
  211. background: #F5F6FA;
  212. }
  213. .delete_img {
  214. position: absolute;
  215. z-index: 9999;
  216. left: 84px;
  217. color: #ffffff;
  218. font-size: 28rpx;
  219. border: 1px;
  220. border-radius: 5rpx;
  221. width: 32rpx;
  222. height: 32rpx;
  223. background-color: #ff0000;
  224. text-align: center;
  225. }
  226. .title_b {
  227. margin: 20rpx 20rpx 0rpx 20rpx;
  228. padding: 20rpx 10rpx 20rpx 10rpx;
  229. font-size: 18px;
  230. font-weight: 550;
  231. }
  232. .xinxi {
  233. padding: 20rpx 30rpx;
  234. }
  235. .c-row {
  236. display: -webkit-box;
  237. display: -webkit-flex;
  238. display: flex;
  239. -webkit-box-align: center;
  240. -webkit-align-items: center;
  241. align-items: center;
  242. padding: 20rpx 30rpx;
  243. position: relative;
  244. }
  245. .con-list {
  246. -webkit-box-flex: 1;
  247. flex: 1;
  248. display: flex;
  249. -webkit-box-orient: vertical;
  250. -webkit-box-direction: normal;
  251. flex-direction: column;
  252. color: #303133;
  253. line-height: 20px;
  254. text-align: right;
  255. padding-right: 10px;
  256. justify-content: space-between;
  257. }
  258. .wrap {
  259. padding-bottom: 10px;
  260. font-size: 14px;
  261. background: #fff;
  262. margin: 10px;
  263. border-radius: 10px;
  264. input {
  265. font-size: 14px;
  266. }
  267. >.title {
  268. padding: 10px 16px;
  269. }
  270. }
  271. .buns_item {
  272. display: flex;
  273. padding: 80rpx 0 50rpx 0;
  274. justify-content: space-around;
  275. }
  276. .but_css {
  277. background: #22C572;
  278. width: 40%;
  279. padding: 20rpx;
  280. color: #fff;
  281. text-align: center;
  282. border-radius: 20rpx;
  283. }
  284. /deep/.u-radio-group {
  285. flex-direction: row-reverse;
  286. }
  287. .no-boder {
  288. border: 0;
  289. }
  290. .textarea {
  291. background: #F9F9FA;
  292. border: 1px solid #EEEEEE;
  293. }
  294. .submit {
  295. width: 100%;
  296. background: #2c8ac5;
  297. border-radius: 10rpx;
  298. }
  299. .bottom-btn {
  300. padding: 30rpx;
  301. background: #FFFFFF;
  302. width: 100%;
  303. position: fixed;
  304. bottom: 0rpx;
  305. display: flex;
  306. z-index: 9999;
  307. }
  308. .upload {
  309. width: 80rpx;
  310. height: 80rpx;
  311. }
  312. .char_css {
  313. font-size: 30rpx;
  314. font-weight: 600;
  315. display: -webkit-box;
  316. overflow: hidden;
  317. /*! autoprefixer: off; */
  318. -webkit-box-orient: vertical;
  319. -webkit-line-clamp: 1;
  320. -webkit-box-orient: vertical;
  321. text-overflow: ellipsis;
  322. word-break: break-all;
  323. }
  324. .img_item {
  325. display: flex;
  326. width: 100%;
  327. margin: 10px 0;
  328. padding: 0 10rpx;
  329. .img_dowload {
  330. width: 14%;
  331. color: #22C572;
  332. text-align: right;
  333. }
  334. }
  335. </style>