quality_testing.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821
  1. <template>
  2. <view>
  3. 11111
  4. </view>
  5. </template>
  6. <script>
  7. import dragButton from "@/components/drag-button/drag-button.vue";
  8. import {
  9. mapState
  10. } from 'vuex';
  11. let startY = 0,
  12. moveY = 0,
  13. pageAtTop = true;
  14. export default {
  15. components: {
  16. dragButton
  17. },
  18. data() {
  19. return {
  20. inputShow: false,
  21. modalName: '',
  22. mycarStyle: '',
  23. feild: undefined,
  24. inputContent: '',
  25. coverTransform: 'translateY(0px)',
  26. coverTransition: '0s',
  27. moving: false,
  28. footprintList: [],
  29. isVip: false,
  30. userInfoTmp: [],
  31. inputStatus: 'none',
  32. carInfo: [],
  33. gridCol: 4,
  34. pageSize:10,
  35. currentPage:1,
  36. gridBorder: false,
  37. headUrl:"../../static/img/myimg/YongHu@3x.png",
  38. userphone:"",
  39. username:"请更改昵称",
  40. gridList: [
  41. {
  42. num: 0,
  43. name: '邀请用户',
  44. // icon: 'cuIcon-apps',
  45. src:'../../static/img/erp/yaoqingyonghu@3x.png',
  46. tips: 0,
  47. url: '/pages/attestation/index',
  48. show: true
  49. },
  50. {
  51. num: 1,
  52. name: '收购质检',
  53. // icon: 'cuIcon-calendar',
  54. src:'../../static/img/erp/shougouzhijian@3x.png',
  55. tips: 0,
  56. url: '/pages/erpbusiness/quality_testing?managementType=1',
  57. show: true
  58. },
  59. {
  60. num: 2,
  61. name: '收购检斤',
  62. // icon: 'cuIcon-copy',
  63. src:'../../static/img/erp/shougoujianjin@3x.png',
  64. tips: 0,
  65. url: '/pages/task/my_task',
  66. show: true
  67. }
  68. // {
  69. // num: 5,
  70. // name: '设置',
  71. // // icon: 'cuIcon-edit',
  72. // src:'../../static/img/sign/shezhi@2x.png',
  73. // tips: 0,
  74. // url: `/pages/user/setUp`,
  75. // show: true
  76. // }
  77. ],
  78. gridList1: [
  79. {
  80. num: 0,
  81. name: '出库检斤',
  82. // icon: 'cuIcon-apps',
  83. src:'../../static/img/erp/chukujianjin@3x.png',
  84. tips: 0,
  85. url: '/pages/attestation/index?',
  86. show: true
  87. },
  88. {
  89. num: 1,
  90. name: '出库质检',
  91. // icon: 'cuIcon-calendar',
  92. src:'../../static/img/erp/chukuzhijian@3x.png',
  93. tips: 0,
  94. url: '/pages/erpbusiness/quality_testing?managementType=3',
  95. show: true
  96. }
  97. // {
  98. // num: 5,
  99. // name: '设置',
  100. // // icon: 'cuIcon-edit',
  101. // src:'../../static/img/sign/shezhi@2x.png',
  102. // tips: 0,
  103. // url: `/pages/user/setUp`,
  104. // show: true
  105. // }
  106. ],
  107. managementType:'',
  108. showTran: true,
  109. companyId: 1,
  110. current: 4
  111. }
  112. },
  113. onLoad() {
  114. },
  115. // #ifndef MP
  116. onNavigationBarButtonTap(e) {
  117. const index = e.index;
  118. if (index === 0) {
  119. this.navTo('/pages/set/set');
  120. } else if (index === 1) {
  121. // #ifdef APP-PLUS
  122. const pages = getCurrentPages();
  123. const page = pages[pages.length - 1];
  124. const currentWebview = page.$getAppWebview();
  125. currentWebview.hideTitleNViewButtonRedDot({
  126. index
  127. });
  128. // #endif
  129. uni.navigateTo({
  130. url: '/pages/notice/notice'
  131. })
  132. }
  133. },
  134. // #endif
  135. computed: {
  136. ...mapState(['hasLogin', 'userInfo']),
  137. // 手机号中间4位加*
  138. starUserphone(){
  139. let reg = /^(\d{3})\d{4}(\d{4})$/;
  140. if(this.userphone){
  141. return this.userphone.replace(reg, "$1****$2");
  142. }
  143. }
  144. },
  145. onLoad(options){
  146. console.log(options)
  147. this.managementType=options.managementType
  148. },
  149. onShow() {
  150. var that = this
  151. this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection',{
  152. pageSize: this.pageSize,
  153. currentPage: this.currentPage,
  154. searchKeyWord: this.searchKeyWord,
  155. searchType: this.searchType,
  156. managementType:this.managementType,
  157. // compId:uni.getStorageSync('pcUserInfo').compId,
  158. pcFlag:1
  159. }).then(res => {
  160. })
  161. },
  162. methods: {
  163. fankui(){
  164. uni.navigateTo({
  165. url: `/pages/user/fankui`
  166. })
  167. },
  168. zhibo() {
  169. uni.navigateTo({
  170. url: `/pageB/video/broadcast`
  171. })
  172. },
  173. look() {
  174. uni.navigateTo({
  175. url: `/pageB/video/look`
  176. })
  177. },
  178. contactUs() {
  179. const that = this
  180. uni.makePhoneCall({
  181. // 手机号
  182. phoneNumber: '18241771147',
  183. // 成功回调
  184. success: (res) => {},
  185. // 失败回调
  186. fail: (res) => {}
  187. });
  188. },
  189. loadData() {
  190. // const that = this
  191. // if(uni.getStorageSync("PageCur")){
  192. // that.PageCur = uni.getStorageSync("PageCur");
  193. // }
  194. // that.userInfoTmp = uni.getStorageSync("userInfo")
  195. // uni.showLoading({
  196. // title: '正在加载',
  197. // mask:true
  198. // })
  199. // that.$api.request('integral', 'getIndexData', failres => {
  200. // that.$api.msg(failres.errmsg)
  201. // uni.hideLoading()
  202. // }).then(res => {
  203. // let data = res.data
  204. // uni.setStorageSync("message", data.message);
  205. // uni.setStorageSync("task", data.task);
  206. // uni.setStorageSync("contract", data.contract);
  207. // uni.setStorageSync('showTran', data.showTran);
  208. // that.showTran = data.showTran
  209. // that.gridList[4].tips = data.task
  210. // that.gridList[2].tips = data.contract
  211. // that.companyId = data.companyId
  212. // uni.hideLoading()
  213. // })
  214. },
  215. gridClick(item, index) {
  216. var that = this
  217. if (item.name == "退出登录") {
  218. this.logout()
  219. return;
  220. } else if (item.name == "联系我们") {
  221. //#ifdef MP
  222. this.inputShow = true
  223. this.inputStatus = 'inline'
  224. this.feild = "nickname"
  225. this.inputContent = ''
  226. //#endif
  227. //#ifdef APP-PLUS
  228. this.contactUs()
  229. //#endif
  230. return;
  231. } else if (item.name == '我的车辆') {
  232. const that = this
  233. uni.showLoading({
  234. title: '正在加载',
  235. mask: true
  236. })
  237. that.$api.request('tran', 'getMyCarList', failres => {
  238. that.$api.msg(failres.errmsg)
  239. uni.hideLoading()
  240. }).then(res => {
  241. that.carInfo = res.data
  242. if (that.carInfo.length == 0) {
  243. that.$api.msg('暂无车辆信息')
  244. } else {
  245. var height = that.carInfo.length * 100
  246. var width = 500
  247. that.mycarStyle = "height:" + height + "rpx;width:" + width + "rpx"
  248. that.modalName = 'MycarModal'
  249. }
  250. uni.hideLoading()
  251. })
  252. return;
  253. }
  254. if (!this.hasLogin) {
  255. uni.showModal({
  256. title: '登录提示',
  257. content: '您尚未登录,是否立即登录?',
  258. showCancel: true,
  259. confirmText: '登录',
  260. success: (e) => {
  261. if (e.confirm) {
  262. uni.navigateTo({
  263. url: '/pages/public/login'
  264. })
  265. }
  266. },
  267. fail: () => {},
  268. complete: () => {}
  269. })
  270. }else {
  271. if (item.url) {
  272. uni.navigateTo({
  273. url: item.url + `?companyId=${that.companyId}`
  274. })
  275. }
  276. }
  277. },
  278. setting(){
  279. if (!this.hasLogin) {
  280. uni.showModal({
  281. title: '登录提示',
  282. content: '您尚未登录,是否立即登录?',
  283. showCancel: true,
  284. confirmText: '登录',
  285. success: (e) => {
  286. if (e.confirm) {
  287. uni.navigateTo({
  288. url: '/pages/public/login'
  289. })
  290. }
  291. },
  292. fail: () => {},
  293. complete: () => {}
  294. })
  295. }else {
  296. uni.navigateTo({
  297. url:'/pages/user/setUp'
  298. })
  299. }
  300. },
  301. toLogin() {
  302. console.log("userInfo",this.userInfo)
  303. if (!this.hasLogin || !this.userInfo || this.username == "立即登录") {
  304. uni.navigateTo({
  305. url: '/pages/public/login_account_number'
  306. })
  307. }
  308. else{
  309. uni.navigateTo({
  310. url: '/pages/user/setUp'
  311. })
  312. }
  313. // else if(!this.userInfo.nickname){
  314. // this.inputShow = true
  315. // this.inputStatus = 'inline'
  316. // this.feild = "nickname"
  317. // this.inputContent = ''
  318. // }
  319. },
  320. confirm() {
  321. const that = this
  322. if (!that.inputContent) {
  323. that.$api.msg('输入不能为空')
  324. return
  325. }
  326. let obj = {}
  327. obj[that.feild] = that.inputContent
  328. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  329. that.userInfo.nickname = that.inputContent
  330. that.inputContent = ''
  331. that.$store.commit('login', that.userInfo)
  332. })
  333. },
  334. cancel() {
  335. this.inputShow = false
  336. this.inputStatus = 'none'
  337. this.genderShow = false
  338. },
  339. myAccount() {
  340. uni.navigateTo({
  341. url: `/pageA/pages/contract`
  342. })
  343. },
  344. logout() {
  345. const that = this
  346. uni.showModal({
  347. title: '询问',
  348. content: '您确定要退出吗?',
  349. cancelText: '取消',
  350. confirmText: '确定',
  351. success: (e) => {
  352. if (e.confirm) {
  353. uni.hideTabBarRedDot({
  354. index:3
  355. })
  356. uni.clearStorageSync();
  357. that.$store.commit('logout')
  358. that.$api.logout()
  359. uni.navigateTo({
  360. url: `/pages/public/login`
  361. })
  362. }
  363. }
  364. })
  365. },
  366. /**
  367. * 统一跳转接口,拦截未登录路由
  368. * navigator标签现在默认没有转场动画,所以用view
  369. */
  370. navTo(url) {
  371. if (!this.hasLogin) {
  372. url = '/pages/public/login';
  373. }
  374. uni.navigateTo({
  375. url
  376. })
  377. },
  378. mycarClick(carNo) {
  379. this.modalName = null
  380. uni.navigateTo({
  381. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  382. })
  383. },
  384. qrClick(userInfo) {
  385. this.modalName = null
  386. uni.navigateTo({
  387. url: `/pages/user/qr`
  388. })
  389. },
  390. scanCode() {
  391. uni.scanCode({
  392. success: function(res) {
  393. uni.navigateTo({
  394. url: res.result
  395. })
  396. }
  397. })
  398. },
  399. hideModal(e) {
  400. this.modalName = null
  401. },
  402. }
  403. }
  404. </script>
  405. <style lang='scss' scoped>
  406. page{
  407. background:#F5F6FA;
  408. }
  409. .container {
  410. padding-top: 85px;
  411. padding-top: 35px;
  412. background-color: #F5F6FA;
  413. position: relative;
  414. width: 100vw;
  415. height: 100vh;
  416. overflow: hidden;
  417. background: url('~@/static/img/login/bg_slices/bg@3x.png');
  418. background-size: 100% 100%;
  419. margin: 0 auto;
  420. }
  421. .cu-tag.badge {
  422. right: 26rpx;
  423. }
  424. .path {
  425. color: #007aff;
  426. display: inline-block;
  427. text-align: center;
  428. }
  429. .icon {
  430. margin-right: 10rpx;
  431. }
  432. .portrait-box {
  433. margin-top: 20rpx;
  434. }
  435. .qr-wrap {
  436. margin-top: 20upx;
  437. color: #fff;
  438. font-size: 32rpx;
  439. }
  440. .cu-list {
  441. /* height: 483rpx;
  442. overflow-y: scroll; */
  443. background:transparent;
  444. }
  445. .cu-list.grid.no-border{
  446. padding:0;
  447. }
  448. .badge_user {
  449. color: #fff;
  450. background-color: #dc3545;
  451. display: inline-block;
  452. padding: .25em .4em;
  453. font-size: 75%;
  454. font-weight: 700;
  455. line-height: 1;
  456. text-align: center;
  457. white-space: nowrap;
  458. vertical-align: top;
  459. border-radius: 50%;
  460. transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  461. }
  462. @keyframes move_wave {
  463. 0% {
  464. transform: translateX(0) translateZ(0) scaleY(1)
  465. }
  466. 50% {
  467. transform: translateX(-25%) translateZ(0) scaleY(0.55)
  468. }
  469. 100% {
  470. transform: translateX(-50%) translateZ(0) scaleY(1)
  471. }
  472. }
  473. .bg {
  474. position: relative;
  475. height: 300rpx;
  476. /* background: linear-gradient(to bottom, #56ccf2, #2f80ed); */
  477. /*background: linear-gradient(to bottom, #0be9fe, #4bb0fe); */
  478. background: linear-gradient(to bottom, #d5f8ff, #56ccf2);
  479. }
  480. .bg_ware {
  481. position: absolute;
  482. left: 0;
  483. bottom: -2rpx;
  484. width: 100%;
  485. mix-blend-mode: screen;
  486. height: 224rpx;
  487. }
  488. %flex-center {
  489. display: flex;
  490. flex-direction: column;
  491. justify-content: center;
  492. align-items: center;
  493. }
  494. %section {
  495. display: flex;
  496. justify-content: space-around;
  497. align-content: center;
  498. background: #fff;
  499. border-radius: 10upx;
  500. }
  501. .grid-item-box {
  502. flex: 1;
  503. /* position: relative;
  504. */
  505. /* #ifndef APP-NVUE */
  506. display: flex;
  507. /* #endif */
  508. flex-direction: column;
  509. align-items: center;
  510. justify-content: center;
  511. padding: 15px 0;
  512. }
  513. .image {
  514. width: 80rpx;
  515. height: 80rpx;
  516. }
  517. .text {
  518. font-size: 26rpx;
  519. margin-top: 10rpx;
  520. }
  521. .user-section {
  522. height: 520upx;
  523. padding: 100upx 30upx 0;
  524. position: relative;
  525. .bg {
  526. position: absolute;
  527. left: 0;
  528. top: 0;
  529. width: 100%;
  530. height: 100%;
  531. filter: blur(1px);
  532. box-shadow: 0px 1px 8px #ccc;
  533. /* background:linear-gradient(#0eb0c9,#126bae); */
  534. /* opacity: .7; */
  535. }
  536. }
  537. .user-info-box {
  538. height: 180upx;
  539. /* display:flex; */
  540. /* align-items:center; */
  541. text-align: center;
  542. position: relative;
  543. z-index: 1;
  544. .portrait {
  545. width: 130upx;
  546. height: 130upx;
  547. border: 5upx solid #fff;
  548. border-radius: 50%;
  549. }
  550. .username {
  551. font-size: $font-lg + 3upx;
  552. color: #fff;
  553. margin-top: 20upx;
  554. }
  555. }
  556. .vip-card-box {
  557. display: flex;
  558. flex-direction: column;
  559. color: #f7d680;
  560. height: 240upx;
  561. background: linear-gradient(left, rgba(0, 0, 0, .7), rgba(0, 0, 0, .8));
  562. border-radius: 16upx 16upx 0 0;
  563. overflow: hidden;
  564. position: relative;
  565. padding: 20upx 24upx;
  566. .card-bg {
  567. position: absolute;
  568. top: 20upx;
  569. right: 0;
  570. width: 380upx;
  571. height: 260upx;
  572. }
  573. .b-btn {
  574. position: absolute;
  575. right: 20upx;
  576. top: 16upx;
  577. width: 132upx;
  578. height: 40upx;
  579. text-align: center;
  580. line-height: 40upx;
  581. font-size: 22upx;
  582. color: #36343c;
  583. border-radius: 20px;
  584. background: linear-gradient(left, #f9e6af, #ffd465);
  585. z-index: 1;
  586. }
  587. .tit {
  588. font-size: $font-base+2upx;
  589. color: #f7d680;
  590. margin-bottom: 28upx;
  591. .yticon {
  592. color: #f6e5a3;
  593. margin-right: 16upx;
  594. }
  595. }
  596. .e-b {
  597. font-size: $font-sm;
  598. color: #d8cba9;
  599. margin-top: 10upx;
  600. }
  601. }
  602. .cover-container {
  603. padding: 1px 10px ;
  604. padding-bottom: 200upx;
  605. /* background-color: #F5F6FA; */
  606. /* border-radius: 20px; */
  607. margin-top: 60upx;
  608. .arc {
  609. position: absolute;
  610. left: 0;
  611. top: -34upx;
  612. width: 100%;
  613. height: 36upx;
  614. }
  615. }
  616. .tj-sction {
  617. @extend %section;
  618. .tj-item {
  619. @extend %flex-center;
  620. flex-direction: column;
  621. height: 140upx;
  622. font-size: $font-sm;
  623. color: #75787d;
  624. }
  625. .num {
  626. font-size: $font-lg;
  627. color: $font-color-dark;
  628. margin-bottom: 8upx;
  629. }
  630. }
  631. .order-section {
  632. @extend %section;
  633. padding: 28upx 0;
  634. margin-top: 20upx;
  635. .order-item {
  636. @extend %flex-center;
  637. width: 120upx;
  638. height: 120upx;
  639. border-radius: 10upx;
  640. font-size: $font-sm;
  641. color: $font-color-dark;
  642. }
  643. .yticon {
  644. font-size: 48upx;
  645. margin-bottom: 18upx;
  646. color: #fa436a;
  647. }
  648. .icon-shouhoutuikuan {
  649. font-size: 44upx;
  650. }
  651. }
  652. .history-section {
  653. padding: 30upx 0 0;
  654. margin-top: 20upx;
  655. background: #fff;
  656. border-radius: 10upx;
  657. .sec-header {
  658. display: flex;
  659. align-items: center;
  660. font-size: $font-base;
  661. color: $font-color-dark;
  662. line-height: 40upx;
  663. margin-left: 30upx;
  664. .yticon {
  665. font-size: 44upx;
  666. color: #5eba8f;
  667. margin-right: 16upx;
  668. line-height: 40upx;
  669. }
  670. }
  671. .h-list {
  672. white-space: nowrap;
  673. padding: 30upx 30upx 0;
  674. image {
  675. display: inline-block;
  676. width: 160upx;
  677. height: 160upx;
  678. margin-right: 20upx;
  679. border-radius: 10upx;
  680. }
  681. }
  682. }
  683. .grid {
  684. display: flex;
  685. align-items: center;
  686. flex-wrap: wrap;
  687. /* border-top: 2upx solid rgba(172,172,172,.2); */
  688. .grid-item-3 {
  689. box-sizing: border-box;
  690. width: calc(100% / 3);
  691. border-bottom: 2upx solid rgba(172, 172, 172, .2);
  692. border-right: 2upx solid rgba(172, 172, 172, .2);
  693. text-align: center;
  694. padding: 40upx 0;
  695. position: relative;
  696. /* view{
  697. font-size: $font-sm;
  698. margin-top: 16upx;
  699. color: $font-color-dark;
  700. } */
  701. .grid_icon {
  702. font-size: 48upx;
  703. margin-bottom: 18upx;
  704. color: #fa436a;
  705. }
  706. .tip_text {
  707. display: block;
  708. padding: 4upx 8upx;
  709. text-align: center;
  710. border-radius: 36upx;
  711. font-size: 24upx;
  712. background-color: #fa436a;
  713. color: rgba(255, 255, 255, 1);
  714. position: absolute;
  715. right: 6upx;
  716. top: 6upx;
  717. }
  718. }
  719. .grid-item-3:nth-child(3n + 3),
  720. .grid-item-4:nth-child(4n + 4) {
  721. border-right: none;
  722. }
  723. }
  724. .headPortrait {
  725. width: 75px;
  726. height: 75px;
  727. border-radius: 40px;
  728. border: 2px solid #ffffff;
  729. }
  730. .personal {
  731. margin-top: 10px;
  732. margin-left: 20px;
  733. }
  734. .information {
  735. font-size: 15px;
  736. font-weight: 600;
  737. height: 36px;
  738. }
  739. .indexlow{
  740. /* margin-top: 30px; */
  741. border-radius: 10px;
  742. }
  743. .cu-list>.cu-item:after{
  744. border:none;
  745. }
  746. .sign{
  747. width: 40px;
  748. height: 40px;
  749. top: 4px;
  750. margin-right: 6px;
  751. }
  752. .indexUp{
  753. padding:0 20px;
  754. align-items: center;
  755. }
  756. .wrap{
  757. background:#fff;
  758. margin:10px;
  759. border-radius:10px;
  760. padding:10px;
  761. .title{
  762. font-size:16px;
  763. }
  764. }
  765. </style>