acptdetail.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  1. <template>
  2. <view class="content">
  3. <view class="acountbox">
  4. <view class="inacount">
  5. <text class="acoutitle">承兑人名称</text>
  6. <input type="text" v-model="form.name" class="checkword" placeholder="请输入承兑人名称"
  7. placeholder-style="font-size:30rpx;color:#68625B" />
  8. </view>
  9. <view class="inacount">
  10. <text class="acoutitle">账号</text>
  11. <input type="text" v-model="form.bankAccount" class="checkword" placeholder="请输入账号(选填)"
  12. placeholder-style="font-size:30rpx;color:#68625B" />
  13. </view>
  14. <view class="inacount">
  15. <text class="acoutitle">服务费率 </text>
  16. <input type="text" v-model="form.serviceRate" class="checkword" placeholder="请输入服务费率"
  17. placeholder-style="font-size:30rpx;color:#68625B" />
  18. </view>
  19. <view class="inacount">
  20. <text class="acoutitle">利率</text>
  21. <input type="text" v-model="form.interest" class="checkword" placeholder="请输入利率"
  22. placeholder-style="font-size:30rpx;color:#68625B" />
  23. </view>
  24. <view class="inacount">
  25. <text class="acoutitle">开户行名称</text>
  26. <input type="text" v-model="form.bankName" class="checkword" placeholder="请输入开户行名称(选填)"
  27. placeholder-style="font-size:30rpx;color:#68625B" />
  28. </view>
  29. <view class="inacount">
  30. <text class="acoutitle">开户行行号</text>
  31. <input type="text" v-model="form.bankNo" class="checkword" placeholder="请输入开户行行号(选填)"
  32. placeholder-style="font-size:30rpx;color:#68625B" />
  33. </view>
  34. <view class="inacount">
  35. <text class="acoutitle">合同服务信息</text>
  36. <text style="margin-left: 20rpx;" class="pt" @click="addpdf(form.templateServiceContract)">获取服务合同信息</text>
  37. </view>
  38. </view>
  39. <view class="logininbtn" @click="MakeSure">
  40. <text>确认修改</text>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. let that
  46. export default {
  47. data() {
  48. return {
  49. id:'',
  50. form: {
  51. name: '',
  52. bankAccount:'',
  53. serviceRate:'',
  54. interest:'',
  55. bankName:'',
  56. templateServiceContract:''
  57. },
  58. }
  59. },
  60. onLoad(o) {
  61. that=this
  62. if(o.id){
  63. this.id=o.id
  64. }
  65. this.init()
  66. },
  67. methods: {
  68. init(){
  69. uni.showLoading()
  70. uni.$u.http.get(`/api/Acceptor/${this.id}`,{
  71. custom: {
  72. auth: true
  73. }
  74. }).then((res) => {
  75. uni.hideLoading()
  76. this.form=res
  77. }).catch((err) => {
  78. uni.hideLoading()
  79. console.log(err)
  80. })
  81. },
  82. MakeSure() {
  83. let form=this.form
  84. form.id=this.id
  85. if(that.form.name.length==0){
  86. that.$toast("请输入承兑人名称")
  87. return
  88. }
  89. if(that.form.serviceRate.length==0){
  90. that.$toast("请输入服务费率")
  91. return
  92. }
  93. if(that.form.interest.length==0){
  94. that.$toast("请输入利率")
  95. return
  96. }
  97. uni.showModal({
  98. title: '提示',
  99. content: '是否确认修改?',
  100. success: function(res) {
  101. if (res.confirm) {
  102. uni.showLoading()
  103. uni.$u.http.post('/api/Acceptor/update', form, {
  104. custom: {
  105. auth: true
  106. }
  107. }).then((res) => {
  108. uni.hideLoading()
  109. // that.$toast("修改成功,请到PC端上传最新的服务合同信息")
  110. uni.showToast({
  111. icon:'none',
  112. title: '修改成功!请到PC端上传最新的服务合同信息',
  113. duration: 2000
  114. });
  115. // that.form = res
  116. }).catch((err) => {
  117. uni.hideLoading()
  118. that.$toast(err.msg)
  119. })
  120. }
  121. }
  122. });
  123. },
  124. addpdf(msg) {
  125. uni.showModal({
  126. title: '提示',
  127. content: "是否获取服务合同信息?",
  128. success: function(res) {
  129. msg.forEach(item=>{
  130. if(res.confirm){
  131. uni.setClipboardData({
  132. data: item,
  133. success: function() {
  134. that.$toast("复制成功,请到浏览器下载")
  135. }
  136. });
  137. }else if(res.cancel){
  138. console.log('取消');
  139. }
  140. })
  141. }
  142. })
  143. },
  144. }
  145. }
  146. </script>
  147. <style lang="scss" scoped>
  148. /* uni.scss */
  149. @import 'uview-ui/theme.scss';
  150. .content {
  151. display: flex;
  152. flex-direction: column;
  153. align-items: center;
  154. justify-content: center;
  155. }
  156. .loginbg {
  157. background-image: url("https://t39.9026.com/web/uploads/thumbs/mall10000/20220629/e01b927c95ee1f05364f5e456f281388.png");
  158. height: 559rpx;
  159. width: 750rpx;
  160. background-size: 100% 100%;
  161. // display: flex;
  162. // align-items: center;
  163. // justify-content: center;
  164. }
  165. .logo {
  166. margin: 0 auto;
  167. height: 200rpx;
  168. width: 200rpx;
  169. margin-left: auto;
  170. margin-right: auto;
  171. margin-bottom: 50rpx;
  172. }
  173. .text-area {
  174. display: flex;
  175. justify-content: center;
  176. }
  177. .title {
  178. font-size: 36rpx;
  179. color: #8f8f94;
  180. }
  181. .logobox {
  182. margin: 0 auto;
  183. margin-top: 212rpx;
  184. width: 269rpx;
  185. height: 191rpx;
  186. // background-color: #F1F1F1;
  187. image {
  188. width: 100%;
  189. height: 100%;
  190. }
  191. }
  192. .checkbox {}
  193. .business {
  194. width: 305rpx;
  195. height: 90rpx;
  196. display: flex;
  197. align-items: center;
  198. justify-content: center;
  199. text-align: center;
  200. // background-color: #D8AB5A;
  201. border-raotherdius: 20rpx;
  202. color: #FFFFFF;
  203. margin-top: 57rpx;
  204. }
  205. .bnesper {
  206. background-size: 100%;
  207. background-image: url("@/static/img/loginbtn4.png");
  208. padding-top: 10rpx;
  209. color: #FFF1D8;
  210. line-height: 90rpx;
  211. }
  212. .applyper {
  213. background-image: url("@/static/img/loginbt1.png");
  214. background-size: 100%;
  215. padding-top: 10rpx;
  216. color: #FFF1D8;
  217. }
  218. .actapp {
  219. background-image: url("@/static/img/loginbtn3.png");
  220. background-size: 100%;
  221. color: #D05C39;
  222. }
  223. .actbnes {
  224. background-image: url("@/static/img/loginbt2.png");
  225. background-size: 100%;
  226. color: #D05C39;
  227. }
  228. .acountbox {
  229. .inacount {
  230. display: flex;
  231. padding: 35rpx 20rpx;
  232. box-sizing: border-box;
  233. width: 690rpx;
  234. margin-top: 40rpx;
  235. background-color: #F6F6F6;
  236. border-radius: 20rpx;
  237. font-size: 30rpx;
  238. color: #1F242A;
  239. input {
  240. width: 360rpx;
  241. }
  242. }
  243. .acoutitle {
  244. font-weight: 600;
  245. }
  246. .checkword {
  247. padding-left: 20rpx;
  248. color: #1F242A;
  249. font-size: 30rpx;
  250. }
  251. }
  252. .otherbt {
  253. width: 606rpx;
  254. display: flex;
  255. justify-content: space-between;
  256. font-size: 24rpx;
  257. padding-top: 30rpx;
  258. }
  259. .regbt {
  260. color: $uni-all-theme;
  261. }
  262. .logininbtn {
  263. margin-top: 80rpx;
  264. width:690rpx;
  265. border-radius: 20rpx;
  266. box-shadow: 0 10rpx 20rpx 1rpx rgba(179, 116, 5, 0.2);
  267. background: linear-gradient(to right, #FFE1AD,#D8AB5A);
  268. height: 100rpx;
  269. text-align: center;
  270. color: #fff;
  271. line-height: 100rpx;
  272. }
  273. </style>