examine_quality_testing.vue 10 KB

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