examine_quality_testing.vue 16 KB

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