examine_quality_testing.vue 14 KB

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