supplier.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. <template>
  2. <view class="content">
  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="合同名称/编号、承兑人名称或出票..."
  7. placeholder-style="color:#BBBCBE" />
  8. </view>
  9. <view class="screen" @click="show = true">
  10. <text>筛选</text>
  11. <view style="padding-left: 10rpx;">
  12. <u-icon name="arrow-down" color="#1F242A" size="14" bold="true"></u-icon>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="cardlist">
  17. <view class="lable" v-for="(item,index) in listall" style="width: 100%;" @click.stop="moveDetail(item.id)">
  18. <view class="radiobox" v-if="editall">
  19. <radio :value="index" :checked="false" color="#D8AB5A" @click="checkBox(item.id)" />
  20. </view>
  21. <view class="card">
  22. <view class="passreview" v-if="item.status==1">
  23. <image src="../../static/img/Cercomplete.png" mode="aspectFill"></image>
  24. </view>
  25. <view class="passreview" v-if="item.status==0">
  26. <image src="../../static/img/toreviewe.png" mode="aspectFill"></image>
  27. </view>
  28. <view class="passreview" v-if="item.status==3">
  29. <image src="../../static/img/fail.png" mode="aspectFill"></image>
  30. </view>
  31. <view class="passreview" v-if="item.status==4">
  32. <image src="../../static/img/disabled.png" mode="aspectFill"></image>
  33. </view>
  34. <view class="cicle" v-if="item.status==1"></view>
  35. <view class="cicle" v-if="item.status==0" style="background-color: #D05C39;"></view>
  36. <view class="cicle" v-if="item.status==3" style="background-color: #1F242A;"></view>
  37. <view class="cicle" v-if="item.status==4" style="background-color: #BEBDBB;"></view>
  38. <view class="innerbox">
  39. <text class="cardtitle">{{item.name}}</text>
  40. </view>
  41. <view class="contractmsg flex5">
  42. <text style="color: #68625B;">法人名称:{{item.legalPerson}}</text>
  43. <view style="padding-top: 10rpx;color: #BEBDBB;" class="flex2">
  44. <text>联系人:{{item.contacts}}</text>
  45. <text>电话:{{item.contactsMobile}}</text>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="nomore" v-if="listall.length==0">
  52. <text>暂无数据</text>
  53. </view>
  54. <view class="totalmanage ">
  55. <text style="color:#68625B;font-size: 28rpx;">合计:{{total}}份</text>
  56. <view class=" maboxtitls" @click="editall=true">
  57. <view class="managebox">
  58. <image src="/static/img/manage.png" mode="aspectFit"></image>
  59. </view>
  60. <text style="padding-left: 15rpx;">管理</text>
  61. </view>
  62. </view>
  63. <view class="safebt"></view>
  64. <u-popup :show="show" @close="close" @open="open">
  65. <view class="popscreen" style="height: 440rpx;">
  66. <view class="checklist" v-for="(item,index) in ctrstatus" :key="index">
  67. <view class="alllistbtn">
  68. <text class="btntitle" style="">{{item.title}}</text>
  69. <view class="yunbtn">
  70. <view class="btnchoose" v-for="(i,k) in item.list" :key="k" @click="choose(item.title,k)"
  71. :class="[contract_status == k?'active':'btnchoose']">
  72. <text>{{i.name}}</text>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="aszs flex6">
  78. <view class="againbtn"><text>重置</text></view>
  79. <view class="againbtn" style="color: #D8AB5A;border: 1rpx solid #D8AB5A;"><text>确认</text></view>
  80. </view>
  81. </view>
  82. </u-popup>
  83. <u-datetime-picker :show="dateshow" v-model="value1" mode="year-month" @confirm="chooseDate"
  84. @cancel="closeDate"></u-datetime-picker>
  85. <!-- 底部删除 -->
  86. <u-popup :show="editall&&state==1" @close="closeEidt" @open="openEidt" :overlay="false">
  87. <view class="editbox">
  88. <view class="chooseall flex6">
  89. <view class="leftchoose ">
  90. <radio :checked="quan" @click="makeSureAll" color="#D8AB5A"></radio>
  91. <text>全选</text>
  92. </view>
  93. <view class="surebtn" @click="selectDown">
  94. 完成
  95. </view>
  96. </view>
  97. <view class="choosebtn">
  98. <view class="delbtn flex1">删除</view>
  99. <view class="restorebtn flex1">复原</view>
  100. </view>
  101. </view>
  102. </u-popup>
  103. <u-popup :show="editall&&state==0" @close="closeEidt" @open="openEidt" :overlay="false">
  104. <view class="editbox">
  105. <view class="chooseall flex6">
  106. <view class="leftchoose ">
  107. <radio :checked="quan" @click="makeSureAll" color="#D8AB5A"></radio>
  108. <text>全选</text>
  109. </view>
  110. <view class="anniu">
  111. <text class="usa">删除</text>
  112. <text class="usa">复原</text>
  113. <text @click="selectDown" class="usa">完成</text>
  114. </view>
  115. </view>
  116. <view class="choosebtn">
  117. <view class="delbtn flex1">审核失败</view>
  118. <view class="restorebtn flex1">审核成功</view>
  119. </view>
  120. </view>
  121. </u-popup>
  122. <tabar checked="supplier"></tabar>
  123. </view>
  124. </template>
  125. <script>
  126. import tabar from "@/componet/tabbar/tabbar.vue"
  127. export default {
  128. components: {
  129. tabar
  130. },
  131. data() {
  132. return {
  133. editall: false,
  134. quan: false,
  135. keywords: '',
  136. show: false,
  137. dateshow: false,
  138. creatTime: "请选择",
  139. endTime: "请选择",
  140. value1: '',
  141. intime: 1,
  142. total:'',
  143. contract_status: '',
  144. draft_status: '',
  145. time_status: '',
  146. listall: [],
  147. state: 0,
  148. ctrstatus: [{
  149. title: "供应商状态",
  150. list: [{
  151. name: "全部",
  152. },
  153. {
  154. name: "待审核",
  155. },
  156. {
  157. name: "已禁用",
  158. },
  159. {
  160. name: "认证完成",
  161. },
  162. {
  163. name: "认证失败",
  164. },
  165. ]
  166. }],
  167. listall: [],
  168. }
  169. },
  170. onLoad() {
  171. this.state = this.$store.state.admin
  172. this.init()
  173. },
  174. methods: {
  175. init() {
  176. uni.showLoading()
  177. uni.$u.http.post('/api/Supplier/search', {
  178. pageIndex: 1,
  179. pageSize: 10,
  180. // startTime:'',
  181. // endTime:'',
  182. // name:'',
  183. // contractStatus:'',
  184. // contractNo:''
  185. }, {
  186. custom: {
  187. auth: true
  188. }
  189. }).then((res) => {
  190. uni.hideLoading()
  191. this.listall = res.result
  192. this.total=res.total
  193. this.listall.forEach(item => {
  194. item.checked = false
  195. })
  196. }).catch((err) => {
  197. uni.hideLoading()
  198. console.log(err)
  199. })
  200. },
  201. closeEidt() {
  202. this.editall = false
  203. },
  204. openEidt() {
  205. this.editall = true
  206. },
  207. selectDown() {
  208. this.editall = false
  209. this.quan=false
  210. let list = this.listall
  211. list.forEach(item => {
  212. item.checked = false
  213. })
  214. },
  215. close() {
  216. this.show = false
  217. },
  218. open(){
  219. },
  220. choose(title, k) {
  221. if (title == "供应商状态") {
  222. this.contract_status = k
  223. }
  224. },
  225. checkBox(id) {
  226. let list = this.listall
  227. list.forEach(item => {
  228. if (item.id == id) {
  229. item.checked = !item.checked
  230. }
  231. })
  232. this.listall = JSON.parse(JSON.stringify(list))
  233. },
  234. selectDown() {
  235. this.editall=false
  236. this.quan=false
  237. let list = this.listall
  238. list.forEach(item => {
  239. item.checked = false
  240. })
  241. },
  242. allSelect() {
  243. let list = this.listall
  244. if(this.quan){
  245. list.forEach(item => {
  246. item.checked =true
  247. })
  248. }else{
  249. list.forEach(item => {
  250. item.checked =false
  251. })
  252. }
  253. this.listall = JSON.parse(JSON.stringify(list))
  254. console.log(this.listall)
  255. },
  256. makeSureAll() {
  257. this.quan = !this.quan
  258. this.allSelect()
  259. },
  260. chooseDate(e) {
  261. this.dateshow = false
  262. const timeFormat = uni.$u.timeFormat
  263. if (this.intime == 1) {
  264. this.creatTime = timeFormat(e.value, 'yyyy-mm')
  265. } else {
  266. this.endTime = timeFormat(e.value, 'yyyy-mm')
  267. }
  268. },
  269. moveDetail(id) {
  270. uni.navigateTo({
  271. url: '/pages/alldeatil/supplierdetail?id=' + id
  272. })
  273. },
  274. addContract() {
  275. uni.navigateTo({
  276. url: '/pages/alldeatil/upcontract'
  277. })
  278. },
  279. openDatePicker(e) {
  280. console.log(e)
  281. if (e == 1) {
  282. this.intime = 1
  283. } else {
  284. this.intime = 2
  285. }
  286. this.dateshow = true
  287. },
  288. closeDate() {
  289. this.dateshow = false
  290. },
  291. open() {
  292. // console.log('open');
  293. },
  294. close() {
  295. this.show = false
  296. // console.log('close');
  297. },
  298. choose(title, k) {
  299. if (title == "合同状态") {
  300. this.contract_status = k
  301. } else if (title == "汇票状态") {
  302. this.draft_status = k
  303. } else if (title == "上传日期") {
  304. this.time_status = k
  305. }
  306. }
  307. }
  308. }
  309. </script>
  310. <style lang="scss">
  311. page {
  312. background-color: #F6F6F6 !important;
  313. }
  314. .headbgbox {
  315. background-color: #fff;
  316. padding: 23rpx 31rpx;
  317. box-sizing: border-box;
  318. position: fixed;
  319. top: 0;
  320. z-index: 999;
  321. width: 100%;
  322. .screen {
  323. display: flex;
  324. justify-content: center;
  325. align-items: center;
  326. padding-left: 30rpx;
  327. }
  328. }
  329. .searchbox {
  330. padding-left: 30rpx;
  331. box-sizing: border-box;
  332. background-color: #ECECEC;
  333. border-radius: 38rpx;
  334. // width: 688rpx;
  335. flex: 1;
  336. height: 75rpx;
  337. margin: 0 auto;
  338. display: flex;
  339. align-items: center;
  340. // justify-content: center;
  341. // margin-top: -10rpx;
  342. }
  343. .cardlist {
  344. display: flex;
  345. justify-content: center;
  346. flex-direction: column;
  347. // align-items: center;
  348. margin: 0 auto;
  349. margin-top: 120rpx;
  350. flex: 1;
  351. }
  352. .card {
  353. margin: 0 auto;
  354. overflow: hidden;
  355. // margin-top: 20rpx;
  356. margin: 0 30rpx;
  357. flex: 1;
  358. width: 100%;
  359. // height: 264rpx;
  360. border-radius: 20rpx;
  361. background-color: #fff;
  362. position: relative;
  363. box-shadow: 0px 8rpx 20rpx 1rpx rgba(31, 36, 42, 0.08);
  364. .passreview {
  365. position: absolute;
  366. right: 30rpx;
  367. top: 30rpx;
  368. width: 141rpx;
  369. height: 123.5rpx;
  370. image {
  371. width: 100%;
  372. height: 100%;
  373. }
  374. }
  375. .cicle {
  376. position: absolute;
  377. width: 40rpx;
  378. height: 20rpx;
  379. background-color: #D8AB5A;
  380. border-radius: 20rpx;
  381. top: 60rpx;
  382. left: -20rpx;
  383. }
  384. .innerbox {
  385. padding: 49rpx 0rpx;
  386. padding-bottom: 30rpx;
  387. margin: 0 30rpx;
  388. display: flex;
  389. align-items: center;
  390. border-bottom: 1rpx solid #E8E8E8;
  391. .listicon {
  392. width: 32rpx;
  393. height: 36rpx;
  394. image {
  395. width: 100%;
  396. height: 100%;
  397. }
  398. }
  399. }
  400. .cardtitle {
  401. font-size: 32rpx;
  402. font-weight: 600;
  403. padding-left: 10rpx;
  404. }
  405. .timebox {
  406. background-color: #FFF8E5;
  407. width: 100%;
  408. padding: 0 30rpx;
  409. box-sizing: border-box;
  410. color: #D8AB5A;
  411. font-size: 28rpx;
  412. height: 60rpx;
  413. line-height: 60rpx;
  414. }
  415. .contractmsg {
  416. padding: 30rpx;
  417. box-sizing: border-box;
  418. color: #68625B;
  419. font-size: 26rpx;
  420. }
  421. }
  422. .totalmanage {
  423. margin-top: 90rpx;
  424. margin-bottom: 100rpx;
  425. // position: fixed;
  426. bottom: 0;
  427. display: flex;
  428. justify-content: space-between;
  429. align-items: center;
  430. width: 100%;
  431. padding: 0 30rpx;
  432. box-sizing: border-box;
  433. .managebox {
  434. width: 23.8rpx;
  435. height: 29.7rpx;
  436. image {
  437. width: 100%;
  438. height: 100%;
  439. }
  440. }
  441. .maboxtitls {
  442. width: 160rpx;
  443. height: 60rpx;
  444. display: flex;
  445. align-items: center;
  446. justify-content: center;
  447. border-radius: 30rpx;
  448. background-color: #D9D9D9;
  449. // line-height: 60rpx;
  450. font-size: 28rpx;
  451. box-sizing: border-box;
  452. // align-items: center;
  453. }
  454. }
  455. .popscreen {
  456. padding-top: 47rpx;
  457. height: 1000rpx;
  458. overflow: auto;
  459. .checklist {
  460. .alllistbtn {
  461. .btntitle {
  462. padding: 0 30rpx;
  463. display: block;
  464. margin: 48rpx 0 30rpx;
  465. font-size: 32rpx;
  466. font-weight: 600;
  467. margin-top: 20rpx;
  468. }
  469. .yunbtn {
  470. display: flex;
  471. flex-direction: row;
  472. flex-wrap: wrap;
  473. margin-left: 30rpx;
  474. }
  475. .btnchoose {
  476. margin-bottom: 30rpx;
  477. margin-right: 41rpx;
  478. width: 200rpx;
  479. height: 68rpx;
  480. background-color: #F6F6F6;
  481. border-radius: 34rpx;
  482. font-size: 26rpx;
  483. color: #68625B;
  484. text-align: center;
  485. line-height: 68rpx;
  486. }
  487. .active {
  488. margin-bottom: 30rpx;
  489. margin-right: 41rpx;
  490. width: 200rpx;
  491. height: 68rpx;
  492. background-color: #FFF8E5;
  493. border-radius: 34rpx;
  494. font-size: 26rpx;
  495. color: #D8AB5A;
  496. border: 1rpx solid #D8AB5A;
  497. text-align: center;
  498. line-height: 68rpx;
  499. box-sizing: border-box;
  500. }
  501. }
  502. }
  503. .custom {
  504. margin: 50rpx 30rpx;
  505. margin-top: 20rpx;
  506. display: flex;
  507. align-items: center;
  508. .custombox {
  509. margin-left: 50rpx;
  510. flex: 1;
  511. .creatdata {
  512. color: #68625B;
  513. font-size: 28rpx;
  514. width: 100%;
  515. margin-bottom: 10rpx;
  516. padding: 20rpx 0;
  517. border-bottom: 1rpx solid #E8E8E8;
  518. }
  519. .chodatain {
  520. color: #BEBDBB;
  521. }
  522. }
  523. }
  524. .aszs {
  525. padding: 20rpx 0;
  526. border-top: 1rpx solid #E8E8E8;
  527. margin: 0 30rpx;
  528. margin-bottom: 20rpx;
  529. font-size: 28rpx;
  530. .againbtn {
  531. width: 335rpx;
  532. height: 88rpx;
  533. line-height: 88rpx;
  534. text-align: center;
  535. border-radius: 45rpx;
  536. border: 1rpx solid #E8E8E8;
  537. }
  538. }
  539. }
  540. </style>