get_request_funds.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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.contractNo}}</view>
  22. </view>
  23. </view>
  24. <view class="c-row">
  25. <view class="title">费用名称</view>
  26. <view class="con-list">
  27. <view>{{detailData.expenseName}}</view>
  28. </view>
  29. </view>
  30. <view class="c-row">
  31. <view class="title">金额(元)</view>
  32. <view class="con-list">
  33. <view>{{detailData.amountMoney}}</view>
  34. </view>
  35. </view>
  36. <view class="c-row">
  37. <view class="left">备注</view>
  38. </view>
  39. <view style='position:relative;' class="wrap no-boder">
  40. <u-input class='textarea' v-model="detailData.remark" :disabled="disabled" :type="type" :border="border"
  41. placeholder="选填,不超过150字" :height="height" :auto-height="autoHeight" maxlength="150" />
  42. <view style='position:absolute;right:10px;bottom:20px;color:#AFB3BF;'>
  43. {{detailData.remark?detailData.remark.length:"0"}}/150个字
  44. </view>
  45. </view>
  46. <view class="c-row">
  47. <view class="title">附件(选填)</view>
  48. </view>
  49. <view style="display: flex;flex-wrap: wrap;">
  50. <view v-for='(item,index) in imglist2' v-if="imglist2.length >0"
  51. style="position: relative;margin-left: 20rpx;">
  52. <image :src="item.appendixPath" mode="" style="width: 100px;height: 100px;"></image>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </template>
  58. <script>
  59. export default {
  60. data() {
  61. return {
  62. disabled: false,
  63. detailData: {
  64. purpose: '',
  65. remark: "",
  66. warehouseName: '',
  67. expenseName: '',
  68. amountMoney: '',
  69. contractNo: '',
  70. expensesPurpose: ''
  71. },
  72. type: 'textarea',
  73. border: true,
  74. imglist: [], //存
  75. imglist2: [], //展示
  76. height: 150,
  77. autoHeight: true,
  78. }
  79. },
  80. onLoad(options) {
  81. this.id = options.id
  82. if (this.id) {
  83. this.disabled = true
  84. } else {
  85. return
  86. }
  87. this.getList()
  88. },
  89. watch: {
  90. imglist: {
  91. handler: function() {
  92. this.$api.doRequest('get', 'appendix/query/getFileList', {
  93. appendixIds: this.imglist.toString()
  94. }).then(res => {
  95. this.imglist2 = res.data.data
  96. console.log(res)
  97. })
  98. },
  99. deep: true
  100. }
  101. },
  102. methods: {
  103. calculate() {
  104. const query = uni.createSelectorQuery().in(this);
  105. query.selectAll('.left')
  106. console.log(query)
  107. },
  108. //获取信息
  109. getList() {
  110. this.$api.doRequest('get', '/expenseInfo/getInfo', {
  111. id: this.id,
  112. }).then(res => {
  113. if (res.data.code == 200) {
  114. this.detailData = res.data.data
  115. this.imglist= this.detailData.addressUrl.split(',')
  116. }
  117. })
  118. },
  119. },
  120. }
  121. </script>
  122. <style lang='scss' scoped>
  123. page {
  124. background: #F5F6FA;
  125. }
  126. .delete_img {
  127. position: absolute;
  128. z-index: 9999;
  129. left: 84px;
  130. color: #ffffff;
  131. font-size: 28rpx;
  132. border: 1px;
  133. border-radius: 5rpx;
  134. width: 32rpx;
  135. height: 32rpx;
  136. background-color: #ff0000;
  137. text-align: center;
  138. }
  139. .title_b {
  140. margin: 20rpx 20rpx 0rpx 20rpx;
  141. padding: 20rpx 10rpx 20rpx 10rpx;
  142. font-size: 18px;
  143. font-weight: 550;
  144. }
  145. .xinxi {
  146. padding: 20rpx 30rpx;
  147. }
  148. .c-row {
  149. display: -webkit-box;
  150. display: -webkit-flex;
  151. display: flex;
  152. -webkit-box-align: center;
  153. -webkit-align-items: center;
  154. align-items: center;
  155. padding: 20rpx 30rpx;
  156. position: relative;
  157. }
  158. .con-list {
  159. -webkit-box-flex: 1;
  160. flex: 1;
  161. display: flex;
  162. -webkit-box-orient: vertical;
  163. -webkit-box-direction: normal;
  164. flex-direction: column;
  165. color: #303133;
  166. line-height: 20px;
  167. text-align: right;
  168. padding-right: 10px;
  169. justify-content: space-between;
  170. }
  171. .wrap {
  172. padding-bottom: 10px;
  173. font-size: 14px;
  174. background: #fff;
  175. margin: 10px;
  176. border-radius: 10px;
  177. input {
  178. font-size: 14px;
  179. }
  180. >.title {
  181. padding: 10px 16px;
  182. }
  183. }
  184. .buns_item {
  185. display: flex;
  186. padding: 80rpx 0 50rpx 0;
  187. justify-content: space-around;
  188. }
  189. .but_css {
  190. background: #22C572;
  191. width: 40%;
  192. padding: 20rpx;
  193. color: #fff;
  194. text-align: center;
  195. border-radius: 20rpx;
  196. }
  197. /deep/.u-radio-group {
  198. flex-direction: row-reverse;
  199. }
  200. .no-boder {
  201. border: 0;
  202. }
  203. .textarea {
  204. background: #F9F9FA;
  205. border: 1px solid #EEEEEE;
  206. }
  207. .submit {
  208. width: 100%;
  209. background: #2c8ac5;
  210. border-radius: 10rpx;
  211. }
  212. .bottom-btn {
  213. padding: 30rpx;
  214. background: #FFFFFF;
  215. width: 100%;
  216. position: fixed;
  217. bottom: 0rpx;
  218. display: flex;
  219. z-index: 9999;
  220. }
  221. </style>