examine_quality_testing.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440
  1. <template>
  2. <view>
  3. <view class='wrap'>
  4. <view class='title'>基本信息</view>
  5. <view class="c-row b-b">
  6. <view class="title">仓库</view>
  7. <view class="con-list">
  8. {{gridList.warehouseName}}
  9. </view>
  10. </view>
  11. <view class="c-row b-b">
  12. <view class="title">编号</view>
  13. <view class="con-list">
  14. {{gridList.qualityNo}}
  15. </view>
  16. </view>
  17. <view class="c-row b-b">
  18. <view class="title">客户</view>
  19. <view class="con-list">
  20. {{gridList.customerName}}({{gridList.customerPhone}})
  21. </view>
  22. </view>
  23. <view class="c-row b-b">
  24. <view class="title">车牌号</view>
  25. <view class="con-list">
  26. {{gridList.carNumber}}
  27. </view>
  28. </view>
  29. <view class="c-row b-b">
  30. <view class="title">扣重比</view>
  31. <view class="con-list">
  32. {{gridList.buckleWeightRatio}}
  33. </view>
  34. </view>
  35. <view class="c-row b-b">
  36. <view class="title">购粮性质</view>
  37. <view class="con-list">
  38. {{gridList.natureOfGrainPurchase}}
  39. </view>
  40. </view>
  41. <view class="c-row b-b">
  42. <view class="title">仓位号</view>
  43. <view class="con-list">
  44. {{gridList.binNumber}}
  45. </view>
  46. </view>
  47. <view class="c-row b-b">
  48. <view class="title">囤位号</view>
  49. <view class="con-list">
  50. {{gridList.storageTagNo}}
  51. </view>
  52. </view>
  53. <view class="c-row b-b">
  54. <view class="title">货名</view>
  55. <view class="con-list">
  56. {{gridList.goodsName}}
  57. </view>
  58. </view>
  59. <view class="c-row b-b">
  60. <view class="title">类型</view>
  61. <view class="con-list">
  62. {{gridList.type}}
  63. </view>
  64. </view>
  65. <view class="c-row">
  66. <view class="title">净重单价(元/公斤)</view>
  67. <view class="con-list">
  68. {{gridList.tidalGrainPrice}}
  69. </view>
  70. </view>
  71. </view>
  72. <view style='margin-bottom:100px;' class='wrap'>
  73. <view class='title'>化验信息</view>
  74. <view class="c-row b-b">
  75. <view class="title">等级</view>
  76. <view class="con-list">
  77. {{gridList.grade}}
  78. </view>
  79. </view>
  80. <view class="c-row b-b">
  81. <view class="title">水分(%)</view>
  82. <view class="con-list">
  83. {{gridList.waterContent}}
  84. </view>
  85. </view>
  86. <view class="c-row b-b">
  87. <view class="title">容重(克/升)</view>
  88. <view class="con-list">
  89. {{gridList.bulkDensity}}
  90. </view>
  91. </view>
  92. <view class="c-row b-b">
  93. <view class="title">不完善粒(%)</view>
  94. <view class="con-list">
  95. {{gridList.imperfectGrain}}
  96. </view>
  97. </view>
  98. <view class="c-row b-b">
  99. <view class="title">杂质(%)</view>
  100. <view class="con-list">
  101. {{gridList.impurity}}
  102. </view>
  103. </view>
  104. <view class="c-row b-b">
  105. <view class="title">霉变粒(%)</view>
  106. <view class="con-list">
  107. {{gridList.impurity}}
  108. </view>
  109. </view>
  110. <view class="c-row b-b">
  111. <view class="title">热损伤(%)</view>
  112. <view class="con-list">
  113. {{gridList.jiaorenli}}
  114. </view>
  115. </view>
  116. <view class="c-row b-b">
  117. <view class="title">不完善粒(%)<=</view>
  118. <view class="con-list">
  119. {{gridList.imperfectGrain}}
  120. </view>
  121. </view>
  122. </view>
  123. </view>
  124. </template>
  125. <script>
  126. import dragButton from "@/components/drag-button/drag-button.vue";
  127. import {
  128. mapState
  129. } from 'vuex';
  130. let startY = 0,
  131. moveY = 0,
  132. pageAtTop = true;
  133. export default {
  134. components: {
  135. dragButton
  136. },
  137. data() {
  138. return {
  139. inputShow: false,
  140. modalName: '',
  141. mycarStyle: '',
  142. feild: undefined,
  143. id:0,
  144. show:false,
  145. selector:[],
  146. show1:false,
  147. inputContent: '',
  148. coverTransform: 'translateY(0px)',
  149. coverTransition: '0s',
  150. moving: false,
  151. footprintList: [],
  152. searchKeyWord:'',
  153. isVip: false,
  154. userInfoTmp: [],
  155. inputStatus: 'none',
  156. carInfo: [],
  157. gridCol: 4,
  158. pageSize:10,
  159. currentPage:1,
  160. gridBorder: false,
  161. headUrl:"../../static/img/myimg/YongHu@3x.png",
  162. userphone:"",
  163. username:"请更改昵称",
  164. gridList: {},
  165. managementType:'',
  166. warehouseName: '',
  167. warehouseList:[],
  168. showTran: true,
  169. companyId: 1,
  170. current: 4,
  171. gradeList:[
  172. {key:1,value:'一等品'},
  173. {key:2,value:'二等品'},
  174. {key:3,value:'三等品'},
  175. {key:4,value:'等外'},
  176. ],
  177. cangid:''
  178. }
  179. },
  180. onLoad() {
  181. },
  182. // #ifndef MP
  183. onNavigationBarButtonTap(e) {
  184. const index = e.index;
  185. if (index === 0) {
  186. this.navTo('/pages/set/set');
  187. } else if (index === 1) {
  188. // #ifdef APP-PLUS
  189. const pages = getCurrentPages();
  190. const page = pages[pages.length - 1];
  191. const currentWebview = page.$getAppWebview();
  192. currentWebview.hideTitleNViewButtonRedDot({
  193. index
  194. });
  195. // #endif
  196. uni.navigateTo({
  197. url: '/pages/notice/notice'
  198. })
  199. }
  200. },
  201. // #endif
  202. computed: {
  203. ...mapState(['hasLogin', 'userInfo']),
  204. // 手机号中间4位加*
  205. starUserphone(){
  206. let reg = /^(\d{3})\d{4}(\d{4})$/;
  207. if(this.userphone){
  208. return this.userphone.replace(reg, "$1****$2");
  209. }
  210. }
  211. },
  212. onLoad(options){
  213. console.log(options)
  214. this.id=options.id
  215. this.cangid=options.cangid
  216. },
  217. onShow() {
  218. var that = this
  219. this.$api.doRequest('get', '/qualityInspectionManagement/api/getQualityInspection',{
  220. id:this.id
  221. }).then(res => {
  222. if(res.data.data){
  223. let data = res.data.data
  224. that.gridList =data
  225. that.$api.doRequest('get', '/warehouseBaseInfo/getWarehouse',{
  226. id:this.cangid
  227. }).then(res => {
  228. that.warehouseList=res.data.data.warehousePositionInfoList
  229. })
  230. }
  231. })
  232. },
  233. methods: {
  234. gradepicker(e){
  235. console.log(e)
  236. // this.$set(this.gradeList,'grade',this.gradeList[e[0]].value)
  237. this.gridList.grade=this.gradeList[e[0]].value
  238. this.gridList.gradeKey=this.gradeList[e[0]].key
  239. },
  240. binNumberpicker(e){
  241. this.gridList.binNumber=this.warehouseList[e[0]].binNumber
  242. },
  243. del(item){
  244. this.$api.doRequest('get', '/qualityInspectionManagement/api/deleteQualityInspection',{
  245. id:item.id
  246. }).then(res => {
  247. if(res.data.code==200){
  248. this.$api.msg('删除成功')
  249. }else{
  250. this.$api.msg('系统异常,请联系管理员')
  251. }
  252. })
  253. },
  254. fankui(){
  255. uni.navigateTo({
  256. url: `/pages/user/fankui`
  257. })
  258. },
  259. zhibo() {
  260. uni.navigateTo({
  261. url: `/pageB/video/broadcast`
  262. })
  263. },
  264. look() {
  265. uni.navigateTo({
  266. url: `/pageB/video/look`
  267. })
  268. },
  269. contactUs() {
  270. const that = this
  271. uni.makePhoneCall({
  272. // 手机号
  273. phoneNumber: '18241771147',
  274. // 成功回调
  275. success: (res) => {},
  276. // 失败回调
  277. fail: (res) => {}
  278. });
  279. },
  280. loadData() {
  281. // const that = this
  282. // if(uni.getStorageSync("PageCur")){
  283. // that.PageCur = uni.getStorageSync("PageCur");
  284. // }
  285. // that.userInfoTmp = uni.getStorageSync("userInfo")
  286. // uni.showLoading({
  287. // title: '正在加载',
  288. // mask:true
  289. // })
  290. // that.$api.request('integral', 'getIndexData', failres => {
  291. // that.$api.msg(failres.errmsg)
  292. // uni.hideLoading()
  293. // }).then(res => {
  294. // let data = res.data
  295. // uni.setStorageSync("message", data.message);
  296. // uni.setStorageSync("task", data.task);
  297. // uni.setStorageSync("contract", data.contract);
  298. // uni.setStorageSync('showTran', data.showTran);
  299. // that.showTran = data.showTran
  300. // that.gridList[4].tips = data.task
  301. // that.gridList[2].tips = data.contract
  302. // that.companyId = data.companyId
  303. // uni.hideLoading()
  304. // })
  305. },
  306. confirm() {
  307. const that = this
  308. if (!that.inputContent) {
  309. that.$api.msg('输入不能为空')
  310. return
  311. }
  312. let obj = {}
  313. obj[that.feild] = that.inputContent
  314. that.$api.request('user', 'syncUserInfo', obj).then(res => {
  315. that.userInfo.nickname = that.inputContent
  316. that.inputContent = ''
  317. that.$store.commit('login', that.userInfo)
  318. })
  319. },
  320. cancel() {
  321. this.inputShow = false
  322. this.inputStatus = 'none'
  323. this.genderShow = false
  324. },
  325. myAccount() {
  326. uni.navigateTo({
  327. url: `/pageA/pages/contract`
  328. })
  329. },
  330. /**
  331. * 统一跳转接口,拦截未登录路由
  332. * navigator标签现在默认没有转场动画,所以用view
  333. */
  334. navTo(url) {
  335. if (!this.hasLogin) {
  336. url = '/pages/public/login';
  337. }
  338. uni.navigateTo({
  339. url
  340. })
  341. },
  342. mycarClick(carNo) {
  343. this.modalName = null
  344. uni.navigateTo({
  345. url: `/pageB/car/mycar_detail?carNo=${carNo}`
  346. })
  347. },
  348. scanCode() {
  349. uni.scanCode({
  350. success: function(res) {
  351. uni.navigateTo({
  352. url: res.result
  353. })
  354. }
  355. })
  356. },
  357. hideModal(e) {
  358. this.modalName = null
  359. },
  360. }
  361. }
  362. </script>
  363. <style lang='scss' scoped>
  364. page{
  365. background:#F5F6FA;
  366. }
  367. .c-row {
  368. display: -webkit-box;
  369. display: -webkit-flex;
  370. display: flex;
  371. -webkit-box-align: center;
  372. -webkit-align-items: center;
  373. align-items: center;
  374. padding: 10rpx 30rpx;
  375. position: relative;
  376. .title {
  377. /* color: #9698A2; */
  378. }
  379. .title-black {
  380. color: #333;
  381. }
  382. }
  383. .con-list {
  384. -webkit-box-flex: 1;
  385. -webkit-flex: 1;
  386. flex: 1;
  387. display: -webkit-box;
  388. display: -webkit-flex;
  389. display: flex;
  390. -webkit-box-orient: vertical;
  391. -webkit-box-direction: normal;
  392. -webkit-flex-direction: column;
  393. flex-direction: column;
  394. color: #303133;
  395. line-height: 40rpx;
  396. text-align: right;
  397. padding-right: 20rpx;
  398. }
  399. .wrap{
  400. padding-bottom:10px;
  401. font-size:14px;
  402. background:#fff;margin:10px;border-radius:10px;
  403. input{
  404. font-size:14px;
  405. }
  406. >.title{
  407. padding:10px 16px;
  408. }
  409. .b-b:after{
  410. border-bottom:1px solid #eee;
  411. }
  412. }
  413. .footer{
  414. background:#fff;
  415. position:fixed;
  416. bottom:0;
  417. width:100%;
  418. padding:20px 10px;
  419. z-index:10;
  420. .button{
  421. background:#22C572;
  422. width:90%;
  423. margin:0 auto;
  424. padding:10px;
  425. color:#fff;
  426. text-align:center;
  427. border-radius: 30px;
  428. }
  429. }
  430. </style>