drawer.vue 8.5 KB

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