examine_quality_testing.vue 12 KB

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