examine_quality_testing.vue 13 KB

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