examine_quality_testing.vue 15 KB

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