examine_quality_testing.vue 11 KB

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