acceptor.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. <template>
  2. <view>
  3. <view class="headbgbox flex2">
  4. <view class="searchbox">
  5. <u-icon name="search" bold="true" size="25" color="rgb(246,185,78)"></u-icon>
  6. <input type="text" v-model="keywords" placeholder="请输入关键字搜索" placeholder-style="color:#BBBCBE" />
  7. </view>
  8. <view class="screen" @click="show = true">
  9. <text>筛选</text>
  10. <view style="padding-left: 10rpx;">
  11. <u-icon name="arrow-down" color="#1F242A" size="14" bold="true"></u-icon>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="acpcardlist">
  16. <view class="lable " v-for="(item,index) in listall" :key="index">
  17. <view class="radiobox" v-if="editall">
  18. <radio :value="index" :checked="item.checked" color="#D8AB5A" @click="checkBox(item.id)"/>
  19. </view>
  20. <view class="acpcard" @click="acpDetail(item.id)">
  21. <view class="allmsg">
  22. <view class="cicle" v-if="item.isDeleted==0"></view>
  23. <view class="cicle" v-if="item.isDeleted==1" style="background-colr:#D05C39"></view>
  24. <view class="acpcont">
  25. <view class="acpname">
  26. <text>{{item.name}}</text>
  27. <view class="tag" v-if="item.isDeleted==0">正常</view>
  28. <view class="tagdel" v-if="item.isDeleted==1">删除</view>
  29. </view>
  30. <view class="acpinfo ">
  31. <text class="pt">账号:{{item.bankAccount}}</text>
  32. <text class="pt">服务费率:{{item.serviceRate}}%</text>
  33. <text class="pt">利率:{{item.interest}}%</text>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="nomore" v-if="listall.length==0">
  41. <text>暂无数据</text>
  42. </view>
  43. <view class="totalmanage " v-if="listall.length>0">
  44. <text style="color:#68625B;font-size: 28rpx;">合计:{{total}}份</text>
  45. <view class=" maboxtitls" @click="editall=true">
  46. <view class="managebox" >
  47. <image src="/static/img/manage.png" mode="aspectFit"></image>
  48. </view>
  49. <text style="padding-left: 15rpx;">管理</text>
  50. </view>
  51. </view>
  52. <view class="safebt"></view>
  53. <view class="plusicon" @click="addAcceptor"></view>
  54. <u-popup :show="show" @close="close" @open="open">
  55. <view class="popscreen" style="height: 340rpx;">
  56. <view class="checklist" v-for="(item,index) in ctrstatus" :key="index">
  57. <view class="alllistbtn">
  58. <text class="btntitle" style="">{{item.title}}</text>
  59. <view class="yunbtn">
  60. <view class="btnchoose" v-for="(i,k) in item.list" :key="k" @click="choose(item.title,k)"
  61. :class="[contract_status == k?'active':'btnchoose']">
  62. <text>{{i.name}}</text>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. <view class="aszs flex6">
  68. <view class="againbtn"><text>重置</text></view>
  69. <view class="againbtn" style="color: #D8AB5A;border: 1rpx solid #D8AB5A;"><text>确认</text></view>
  70. </view>
  71. </view>
  72. </u-popup>
  73. <!-- 底部删除 -->
  74. <u-popup :show="editall" @close="closeEidt" @open="openEidt" :overlay="false">
  75. <view class="editbox">
  76. <view class="chooseall flex6">
  77. <view class="leftchoose ">
  78. <radio :checked="quan" @click="makeSureAll" color="#D8AB5A"></radio>
  79. <text>全选</text>
  80. </view>
  81. <view class="surebtn" @click="selectDown">
  82. 完成
  83. </view>
  84. </view>
  85. <view class="choosebtn">
  86. <view class="delbtn flex1">删除</view>
  87. <view class="restorebtn flex1">复原</view>
  88. </view>
  89. </view>
  90. </u-popup>
  91. <tabar checked="acceptor"></tabar>
  92. </view>
  93. </template>
  94. <script>
  95. import tabar from "@/componet/tabbar/tabbar.vue"
  96. export default {
  97. components:{
  98. tabar
  99. },
  100. data() {
  101. return {
  102. editall:false,
  103. quan:false,
  104. show:false,
  105. contract_status:0,
  106. listall:[],
  107. total:'',
  108. ctrstatus: [{
  109. title: "承兑人状态",
  110. list: [{
  111. name: "全部",
  112. },
  113. {
  114. name: "正常",
  115. },
  116. {
  117. name: "已删除",
  118. },
  119. ]
  120. }],
  121. }
  122. },
  123. onLoad() {
  124. this.init()
  125. },
  126. methods: {
  127. init() {
  128. uni.showLoading()
  129. uni.$u.http.post('/api/Acceptor/search',{
  130. pageIndex:1,
  131. pageSize:10,
  132. // startTime:'',
  133. // endTime:'',
  134. // name:'',
  135. // contractStatus:'',
  136. // contractNo:''
  137. }, {
  138. custom: {
  139. auth: true
  140. }
  141. }).then((res) => {
  142. uni.hideLoading()
  143. this.listall=res.result
  144. this.total=res.total
  145. this.listall.forEach(item=>{
  146. item.checked=false
  147. })
  148. }).catch((err) => {
  149. uni.hideLoading()
  150. console.log(err)
  151. })
  152. },
  153. close() {
  154. this.show = false
  155. },
  156. open(){
  157. },
  158. choose(title, k) {
  159. if (title == "承兑人状态") {
  160. this.contract_status = k
  161. }
  162. },
  163. selectDown(){
  164. this.editall=false
  165. this.quan=false
  166. let list=this.listall
  167. list.forEach(item=>{
  168. item.checked=false
  169. })
  170. },
  171. checkBox(id){
  172. let list=this.listall
  173. list.forEach(item=>{
  174. if(item.id==id){
  175. item.checked=!item.checked
  176. }
  177. })
  178. this.listall = JSON.parse(JSON.stringify(list))
  179. },
  180. allSelect(){
  181. let list=this.listall
  182. if(this.quan){
  183. list.forEach(item => {
  184. item.checked =true
  185. })
  186. }else{
  187. list.forEach(item => {
  188. item.checked =false
  189. })
  190. }
  191. this.listall = JSON.parse(JSON.stringify(list))
  192. console.log(this.listall)
  193. },
  194. makeSureAll(){
  195. this.quan=!this.quan
  196. this.allSelect()
  197. },
  198. closeEidt(){
  199. this.editall=false
  200. },
  201. openEidt(){
  202. this.editall=true
  203. },
  204. acpDetail(id){
  205. uni.navigateTo({
  206. url:"/pages/alldeatil/acptdetail?id="+id
  207. })
  208. },
  209. addAcceptor(){
  210. uni.navigateTo({
  211. url:'/pages/alldeatil/addnewacpt'
  212. })
  213. }
  214. }
  215. }
  216. </script>
  217. <style lang="scss">
  218. page{
  219. background-color: #F6F6F6 !important;
  220. }
  221. .headbgbox {
  222. background-color: #fff;
  223. padding: 23rpx 31rpx;
  224. box-sizing: border-box;
  225. position: fixed;
  226. top: 0;
  227. z-index: 999;
  228. width: 100%;
  229. .screen {
  230. display: flex;
  231. justify-content: center;
  232. align-items: center;
  233. padding-left: 30rpx;
  234. }
  235. }
  236. .searchbox {
  237. padding-left: 30rpx;
  238. box-sizing: border-box;
  239. background-color: #ECECEC;
  240. border-radius: 38rpx;
  241. // width: 688rpx;
  242. flex: 1;
  243. height: 75rpx;
  244. margin: 0 auto;
  245. display: flex;
  246. align-items: center;
  247. justify-content: center;
  248. }
  249. .acpcardlist{
  250. margin-top: 140rpx;
  251. .acpcard{
  252. flex: 1;
  253. // width: 690rpx;
  254. height: 333rpx;
  255. margin: 0 30rpx;
  256. // margin-top: 20rpx;
  257. background-color: #fff;
  258. border-radius: 20rpx;
  259. box-shadow: 0px 8rpx 20rpx 1rpx rgba(31, 36, 42, 0.08);
  260. .allmsg{
  261. display: flex;
  262. padding: 40rpx 30rpx;
  263. box-sizing: border-box;
  264. width: 100%;
  265. .cicle{
  266. width: 28rpx;
  267. height: 28rpx;
  268. border-radius: 50%;
  269. background-color: #D8AB5A;
  270. margin-top: 8rpx;
  271. }
  272. .acpcont{
  273. margin-left: 20rpx;
  274. width: 100%;
  275. .acpname{
  276. box-sizing: border-box;
  277. display: flex;
  278. align-items: center;
  279. padding-bottom: 30rpx;
  280. flex-grow: 1;
  281. width: 100%;
  282. // width: 572rpx;
  283. font-size: 42rpx;
  284. font-weight: 600;
  285. .tagdel{
  286. margin-left: 10rpx;
  287. width: 80rpx;
  288. height:36rpx;
  289. border-radius: 10rpx;
  290. background-color: rgb(241,206,195);
  291. font-size: 24rpx;
  292. font-weight: 400;
  293. color: rgb(213,109,77);
  294. line-height: 36rpx;
  295. text-align: center;
  296. }
  297. .tag{
  298. margin-left: 10rpx;
  299. width: 80rpx;
  300. height:36rpx;
  301. border-radius: 10rpx;
  302. background-color: rgb(232,222,203);
  303. font-size: 24rpx;
  304. font-weight: 400;
  305. color: #D8AB5A;
  306. line-height: 36rpx;
  307. text-align: center;
  308. }
  309. }
  310. }
  311. .acpinfo{
  312. border-top: 1rpx solid #E8E8E8;
  313. display: flex;
  314. flex: 1;
  315. flex-direction: column;
  316. font-size: 28rpx;
  317. color: #BEBDBB;
  318. justify-content: space-between;
  319. box-sizing: border-box;
  320. .pt{
  321. padding-top: 20rpx;
  322. }
  323. }
  324. }
  325. }
  326. }
  327. .totalmanage {
  328. margin-top: 90rpx;
  329. margin-bottom: 100rpx;
  330. // position: fixed;
  331. bottom: 0;
  332. display: flex;
  333. justify-content: space-between;
  334. align-items: center;
  335. width: 100%;
  336. padding: 0 30rpx;
  337. box-sizing: border-box;
  338. .managebox {
  339. width: 23.8rpx;
  340. height: 29.7rpx;
  341. image {
  342. width: 100%;
  343. height: 100%;
  344. }
  345. }
  346. .maboxtitls {
  347. width: 160rpx;
  348. height: 60rpx;
  349. display: flex;
  350. align-items: center;
  351. justify-content: center;
  352. border-radius: 30rpx;
  353. background-color: #D9D9D9;
  354. // line-height: 60rpx;
  355. font-size: 28rpx;
  356. box-sizing: border-box;
  357. // align-items: center;
  358. }
  359. }
  360. .plusicon{
  361. position: fixed;
  362. left: 0;
  363. right: 0;
  364. margin: 0 auto;
  365. bottom:110rpx;
  366. width: 150rpx;
  367. height: 150rpx;
  368. background: url("@/static/img/plusicon.png") no-repeat;
  369. background-size: 150rpx 150rpx;
  370. }
  371. </style>