examine_quality_testing.vue 10 KB

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