get_request_funds.vue 8.1 KB

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