quality_testing.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708
  1. <template>
  2. <view>
  3. <view style='background:#fff;display:flex;' class="cu-bar search">
  4. <view style='flex:6;' class="search-form round Medium">
  5. <text style='color: #ccc;text-indent:6px;' class="cuIcon-search"></text>
  6. <input type="text" maxlength="20" :focus="true" v-model="searchKeyWord" @confirm="doSearch()"
  7. @input='search' placeholder="请输入货名或标题" confirm-type="search"></input>
  8. </view>
  9. <view @click='doSearch()' class="Regular" style="width:4%;flex:1;">搜索</view>
  10. <u-icon @click='emptysearch' class="cuIcon" v-if='searchKeyWord.length>0' size="34" name="close-circle-fill" color="#D6D9E0"></u-icon>
  11. <!-- <text @click='emptysearch' v-if='searchKeyWord.length>0' class='tip_text cuIcon-roundclosefill'></text> -->
  12. </view>
  13. <view class='wrap' v-for='item in gridList'>
  14. <view class='flex justify-between'>
  15. <view v-if='item.status=="已质检"'>
  16. <view class='type type-zhi'>质</view>
  17. </view>
  18. <view v-if='item.status=="已称毛重"'>
  19. <view class='type type-mao'>毛</view>
  20. </view>
  21. <view v-if='item.status=="已称皮重"'>
  22. <view class='type type-pi'>皮</view>
  23. </view>
  24. <view>
  25. <view v-if='managementType==1' class='qualityNo'>{{item.qualityNo}}</view>
  26. <view v-if='managementType==3' class='qualityNo'>{{item.contractNo}}</view>
  27. <view class='time'>{{item.updateDate}}</view>
  28. </view>
  29. <view v-if='item.status=="已质检"' class='qualityInspector'>{{item.qualityInspector}}</view>
  30. <view v-else></view>
  31. </view>
  32. <view class="flex justify-around customerinformation">
  33. <view v-if='managementType==1'>{{item.customerName}}</view>
  34. <view>{{item.carNumber}}</view>
  35. <view>{{item.goodsName}}({{item.waterContent}}水)</view>
  36. </view>
  37. <view class='flex buttons'>
  38. <view v-if='item.status=="已质检"&&managementType==1' @click='del(item)' class='button'>删除</view>
  39. <view v-if='item.status!="已称皮重"&&managementType==1' @click='edit(item)' class='button'>编辑</view>
  40. <view v-if='item.status=="已称毛重"&&managementType==3' class='button'>质检</view>
  41. </view>
  42. </view>
  43. </view>
  44. </template>
  45. <script>
  46. import dragButton from "@/components/drag-button/drag-button.vue";
  47. import {
  48. mapState
  49. } from 'vuex';
  50. let startY = 0,
  51. moveY = 0,
  52. pageAtTop = true;
  53. export default {
  54. components: {
  55. dragButton
  56. },
  57. data() {
  58. return {
  59. inputShow: false,
  60. modalName: '',
  61. mycarStyle: '',
  62. feild: undefined,
  63. inputContent: '',
  64. coverTransform: 'translateY(0px)',
  65. coverTransition: '0s',
  66. moving: false,
  67. footprintList: [],
  68. searchKeyWord:'',
  69. isVip: false,
  70. userInfoTmp: [],
  71. inputStatus: 'none',
  72. carInfo: [],
  73. gridCol: 4,
  74. pageSize:10,
  75. currentPage:1,
  76. gridBorder: false,
  77. headUrl:"../../static/img/myimg/YongHu@3x.png",
  78. userphone:"",
  79. username:"请更改昵称",
  80. gridList: [
  81. ],
  82. gridList1: [
  83. ],
  84. managementType:'',
  85. warehouseName: '',
  86. showTran: true,
  87. companyId: 1,
  88. current: 4
  89. }
  90. },
  91. onLoad() {
  92. },
  93. // #ifndef MP
  94. onNavigationBarButtonTap(e) {
  95. const index = e.index;
  96. if (index === 0) {
  97. this.navTo('/pages/set/set');
  98. } else if (index === 1) {
  99. // #ifdef APP-PLUS
  100. const pages = getCurrentPages();
  101. const page = pages[pages.length - 1];
  102. const currentWebview = page.$getAppWebview();
  103. currentWebview.hideTitleNViewButtonRedDot({
  104. index
  105. });
  106. // #endif
  107. uni.navigateTo({
  108. url: '/pages/notice/notice'
  109. })
  110. }
  111. },
  112. // #endif
  113. computed: {
  114. ...mapState(['hasLogin', 'userInfo']),
  115. // 手机号中间4位加*
  116. starUserphone(){
  117. let reg = /^(\d{3})\d{4}(\d{4})$/;
  118. if(this.userphone){
  119. return this.userphone.replace(reg, "$1****$2");
  120. }
  121. }
  122. },
  123. onLoad(options){
  124. console.log(options)
  125. this.managementType=options.managementType
  126. },
  127. onShow() {
  128. var that = this
  129. this.$api.doRequest('get', 'qualityInspectionManagement/selectQualityInspection',{
  130. pageSize: this.pageSize,
  131. currentPage: this.currentPage,
  132. searchKeyWord: this.searchKeyWord,
  133. searchType: this.searchType,
  134. managementType:this.managementType,
  135. warehouseName: '测试库',
  136. compId:'2710b21efc1e4393930c5dc800010dc4',
  137. pcFlag:1
  138. }).then(res => {
  139. if(res.data.data){
  140. let data = res.data.data.records
  141. //采购信息
  142. if (data.length > 0) {
  143. that.gridList = that.gridList.concat(data)
  144. }else{
  145. }
  146. }
  147. console.log(that.gridList)
  148. })
  149. },
  150. methods: {
  151. edit(item){
  152. uni.navigateTo({
  153. url:'/pages/erpbusiness/edit_quality_testing?id='+item.id+'&managementType='+this.managementType
  154. })
  155. },
  156. del(item){
  157. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection',{
  158. id:item.id
  159. }).then(res => {
  160. if(res.data.code==200){
  161. this.$api.msg('删除成功')
  162. }else{
  163. this.$api.msg('系统异常,请联系管理员')
  164. }
  165. })
  166. },
  167. fankui(){
  168. uni.navigateTo({
  169. url: `/pages/user/fankui`
  170. })
  171. },
  172. zhibo() {
  173. uni.navigateTo({
  174. url: `/pageB/video/broadcast`
  175. })
  176. },
  177. look() {
  178. uni.navigateTo({
  179. url: `/pageB/video/look`
  180. })
  181. },
  182. contactUs() {
  183. const that = this
  184. uni.makePhoneCall({
  185. // 手机号
  186. phoneNumber: '18241771147',
  187. // 成功回调
  188. success: (res) => {},
  189. // 失败回调
  190. fail: (res) => {}
  191. });
  192. },
  193. loadData() {
  194. // const that = this
  195. // if(uni.getStorageSync("PageCur")){
  196. // that.PageCur = uni.getStorageSync("PageCur");
  197. // }
  198. // that.userInfoTmp = uni.getStorageSync("userInfo")
  199. // uni.showLoading({
  200. // title: '正在加载',
  201. // mask:true
  202. // })
  203. // that.$api.request('integral', 'getIndexData', failres => {
  204. // that.$api.msg(failres.errmsg)
  205. // uni.hideLoading()
  206. // }).then(res => {
  207. // let data = res.data
  208. // uni.setStorageSync("message", data.message);
  209. // uni.setStorageSync("task", data.task);
  210. // uni.setStorageSync("contract", data.contract);
  211. // uni.setStorageSync('showTran', data.showTran);
  212. // that.showTran = data.showTran
  213. // that.gridList[4].tips = data.task
  214. // that.gridList[2].tips = data.contract
  215. // that.companyId = data.companyId
  216. // uni.hideLoading()
  217. // })
  218. },
  219. confirm() {
  220. const that = this
  221. if (!that.inputContent) {
  222. that.$api.msg('输入不能为空')
  223. return
  224. }
  225. let obj = {}
  226. obj[that.feild] = that.inputContent
  227. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  228. that.userInfo.nickname = that.inputContent
  229. that.inputContent = ''
  230. that.$store.commit('login', that.userInfo)
  231. })
  232. },
  233. cancel() {
  234. this.inputShow = false
  235. this.inputStatus = 'none'
  236. this.genderShow = false
  237. },
  238. myAccount() {
  239. uni.navigateTo({
  240. url: `/pageA/pages/contract`
  241. })
  242. },
  243. /**
  244. * 统一跳转接口,拦截未登录路由
  245. * navigator标签现在默认没有转场动画,所以用view
  246. */
  247. navTo(url) {
  248. if (!this.hasLogin) {
  249. url = '/pages/public/login';
  250. }
  251. uni.navigateTo({
  252. url
  253. })
  254. },
  255. mycarClick(carNo) {
  256. this.modalName = null
  257. uni.navigateTo({
  258. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  259. })
  260. },
  261. scanCode() {
  262. uni.scanCode({
  263. success: function(res) {
  264. uni.navigateTo({
  265. url: res.result
  266. })
  267. }
  268. })
  269. },
  270. hideModal(e) {
  271. this.modalName = null
  272. },
  273. }
  274. }
  275. </script>
  276. <style lang='scss' scoped>
  277. page{
  278. background:#F5F6FA;
  279. }
  280. .container {
  281. padding-top: 85px;
  282. padding-top: 35px;
  283. background-color: #F5F6FA;
  284. position: relative;
  285. width: 100vw;
  286. height: 100vh;
  287. overflow: hidden;
  288. background: url('~@/static/img/login/bg_slices/bg@3x.png');
  289. background-size: 100% 100%;
  290. margin: 0 auto;
  291. }
  292. .cu-tag.badge {
  293. right: 26rpx;
  294. }
  295. .path {
  296. color: #007aff;
  297. display: inline-block;
  298. text-align: center;
  299. }
  300. .icon {
  301. margin-right: 10rpx;
  302. }
  303. .portrait-box {
  304. margin-top: 20rpx;
  305. }
  306. .qr-wrap {
  307. margin-top: 20upx;
  308. color: #fff;
  309. font-size: 32rpx;
  310. }
  311. @keyframes move_wave {
  312. 0% {
  313. transform: translateX(0) translateZ(0) scaleY(1)
  314. }
  315. 50% {
  316. transform: translateX(-25%) translateZ(0) scaleY(0.55)
  317. }
  318. 100% {
  319. transform: translateX(-50%) translateZ(0) scaleY(1)
  320. }
  321. }
  322. .bg {
  323. position: relative;
  324. height: 300rpx;
  325. /* background: linear-gradient(to bottom, #56ccf2, #2f80ed); */
  326. /*background: linear-gradient(to bottom, #0be9fe, #4bb0fe); */
  327. background: linear-gradient(to bottom, #d5f8ff, #56ccf2);
  328. }
  329. .bg_ware {
  330. position: absolute;
  331. left: 0;
  332. bottom: -2rpx;
  333. width: 100%;
  334. mix-blend-mode: screen;
  335. height: 224rpx;
  336. }
  337. %flex-center {
  338. display: flex;
  339. flex-direction: column;
  340. justify-content: center;
  341. align-items: center;
  342. }
  343. %section {
  344. display: flex;
  345. justify-content: space-around;
  346. align-content: center;
  347. background: #fff;
  348. border-radius: 10upx;
  349. }
  350. .grid-item-box {
  351. flex: 1;
  352. /* position: relative;
  353. */
  354. /* #ifndef APP-NVUE */
  355. display: flex;
  356. /* #endif */
  357. flex-direction: column;
  358. align-items: center;
  359. justify-content: center;
  360. padding: 15px 0;
  361. }
  362. .image {
  363. width: 80rpx;
  364. height: 80rpx;
  365. }
  366. .text {
  367. font-size: 26rpx;
  368. margin-top: 10rpx;
  369. }
  370. .user-section {
  371. height: 520upx;
  372. padding: 100upx 30upx 0;
  373. position: relative;
  374. .bg {
  375. position: absolute;
  376. left: 0;
  377. top: 0;
  378. width: 100%;
  379. height: 100%;
  380. filter: blur(1px);
  381. box-shadow: 0px 1px 8px #ccc;
  382. /* background:linear-gradient(#0eb0c9,#126bae); */
  383. /* opacity: .7; */
  384. }
  385. }
  386. .cover-container {
  387. padding: 1px 10px ;
  388. padding-bottom: 200upx;
  389. /* background-color: #F5F6FA; */
  390. /* border-radius: 20px; */
  391. margin-top: 60upx;
  392. .arc {
  393. position: absolute;
  394. left: 0;
  395. top: -34upx;
  396. width: 100%;
  397. height: 36upx;
  398. }
  399. }
  400. .tj-sction {
  401. @extend %section;
  402. .tj-item {
  403. @extend %flex-center;
  404. flex-direction: column;
  405. height: 140upx;
  406. font-size: $font-sm;
  407. color: #75787d;
  408. }
  409. .num {
  410. font-size: $font-lg;
  411. color: $font-color-dark;
  412. margin-bottom: 8upx;
  413. }
  414. }
  415. .order-section {
  416. @extend %section;
  417. padding: 28upx 0;
  418. margin-top: 20upx;
  419. .order-item {
  420. @extend %flex-center;
  421. width: 120upx;
  422. height: 120upx;
  423. border-radius: 10upx;
  424. font-size: $font-sm;
  425. color: $font-color-dark;
  426. }
  427. .yticon {
  428. font-size: 48upx;
  429. margin-bottom: 18upx;
  430. color: #fa436a;
  431. }
  432. .icon-shouhoutuikuan {
  433. font-size: 44upx;
  434. }
  435. }
  436. .history-section {
  437. padding: 30upx 0 0;
  438. margin-top: 20upx;
  439. background: #fff;
  440. border-radius: 10upx;
  441. .sec-header {
  442. display: flex;
  443. align-items: center;
  444. font-size: $font-base;
  445. color: $font-color-dark;
  446. line-height: 40upx;
  447. margin-left: 30upx;
  448. .yticon {
  449. font-size: 44upx;
  450. color: #5eba8f;
  451. margin-right: 16upx;
  452. line-height: 40upx;
  453. }
  454. }
  455. .h-list {
  456. white-space: nowrap;
  457. padding: 30upx 30upx 0;
  458. image {
  459. display: inline-block;
  460. width: 160upx;
  461. height: 160upx;
  462. margin-right: 20upx;
  463. border-radius: 10upx;
  464. }
  465. }
  466. }
  467. .search-form {
  468. background: #F5F6F9;
  469. }
  470. .line {
  471. display: inline-block;
  472. padding: 5px;
  473. position: relative;
  474. font-size: 17px;
  475. }
  476. .line.active {
  477. font-size: 19px;
  478. font-weight: 900;
  479. }
  480. .line.active:after {
  481. content: '';
  482. display: block;
  483. position: absolute;
  484. width: 36rpx;
  485. height: 6rpx;
  486. left: 50%;
  487. transform: translateX(-50%);
  488. bottom: 0;
  489. background: #22C572;
  490. /* border-bottom: 1px solid #22C572; */
  491. }
  492. .search-box {
  493. width: 100%;
  494. background-color: rgb(242, 242, 242);
  495. padding: 15upx 2.5%;
  496. display: flex;
  497. justify-content: space-between;
  498. }
  499. .search-box .mSearch-input-box {
  500. width: 100%;
  501. }
  502. .search-box .input-box {
  503. width: 85%;
  504. flex-shrink: 1;
  505. display: flex;
  506. justify-content: center;
  507. align-items: center;
  508. }
  509. .search-box .search-btn {
  510. width: 15%;
  511. margin: 0 0 0 2%;
  512. display: flex;
  513. justify-content: center;
  514. align-items: center;
  515. flex-shrink: 0;
  516. font-size: 28upx;
  517. color: #fff;
  518. background: linear-gradient(to right, #ff9801, #ff570a);
  519. border-radius: 60upx;
  520. }
  521. .search-box .input-box>input {
  522. width: 100%;
  523. height: 60upx;
  524. font-size: 32upx;
  525. border: 0;
  526. border-radius: 60upx;
  527. -webkit-appearance: none;
  528. -moz-appearance: none;
  529. appearance: none;
  530. padding: 0 3%;
  531. margin: 0;
  532. background-color: #ffffff;
  533. }
  534. .placeholder-class {
  535. color: #9e9e9e;
  536. }
  537. .search-keyword {
  538. width: 100%;
  539. background-color: rgb(242, 242, 242);
  540. }
  541. .grid {
  542. display: flex;
  543. align-items: center;
  544. flex-wrap: wrap;
  545. /* border-top: 2upx solid rgba(172,172,172,.2); */
  546. .grid-item-3 {
  547. box-sizing: border-box;
  548. width: calc(100% / 3);
  549. border-bottom: 2upx solid rgba(172, 172, 172, .2);
  550. border-right: 2upx solid rgba(172, 172, 172, .2);
  551. text-align: center;
  552. padding: 40upx 0;
  553. position: relative;
  554. /* view{
  555. font-size: $font-sm;
  556. margin-top: 16upx;
  557. color: $font-color-dark;
  558. } */
  559. .grid_icon {
  560. font-size: 48upx;
  561. margin-bottom: 18upx;
  562. color: #fa436a;
  563. }
  564. .tip_text {
  565. display: block;
  566. padding: 4upx 8upx;
  567. text-align: center;
  568. border-radius: 36upx;
  569. font-size: 24upx;
  570. background-color: #fa436a;
  571. color: rgba(255, 255, 255, 1);
  572. position: absolute;
  573. right: 6upx;
  574. top: 6upx;
  575. }
  576. }
  577. .grid-item-3:nth-child(3n + 3),
  578. .grid-item-4:nth-child(4n + 4) {
  579. border-right: none;
  580. }
  581. }
  582. .headPortrait {
  583. width: 75px;
  584. height: 75px;
  585. border-radius: 40px;
  586. border: 2px solid #ffffff;
  587. }
  588. .information {
  589. font-size: 15px;
  590. font-weight: 600;
  591. height: 36px;
  592. }
  593. .cu-list>.cu-item:after{
  594. border:none;
  595. }
  596. .sign{
  597. width: 40px;
  598. height: 40px;
  599. top: 4px;
  600. margin-right: 6px;
  601. }
  602. .indexUp{
  603. padding:0 20px;
  604. align-items: center;
  605. }
  606. .wrap{
  607. background:#fff;
  608. margin:10px;
  609. border-radius:10px;
  610. padding:10px;
  611. }
  612. .qualityNo{
  613. font-size:16px;
  614. }
  615. .type{
  616. font-size:12px;
  617. color:#fff;
  618. padding:3px 5px;
  619. border-radius:50%;
  620. line-height:16px;
  621. }
  622. .type-zhi{
  623. background:#22C572;
  624. }
  625. .type-mao{
  626. background:#3296FA;
  627. }
  628. .type-pi{
  629. background:#FD714F;
  630. }
  631. .time{
  632. font-size:12px;
  633. color:#878C9C;
  634. }
  635. .qualityInspector{
  636. font-size:14px;
  637. }
  638. .customerinformation{
  639. background:#F9F9FA;
  640. padding:7px;
  641. margin:20px 0;
  642. border-radius:10px;
  643. color:#9698A2;
  644. }
  645. .buttons{
  646. flex-direction:row-reverse;
  647. }
  648. .button{
  649. padding:13rpx 30rpx;
  650. border:1px solid #CDCDCD;
  651. border-radius:15px;
  652. margin:0 10px;
  653. }
  654. </style>