examine_quality_testing.vue 10 KB

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