examine_quality_testing.vue 14 KB

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