examine_quality_testing.vue 12 KB

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