day-check-result.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. <!-- 批量盘点提交结果 -->
  2. <template>
  3. <view class="container-wrap">
  4. <uni-nav-bar title="异常标签处理" :status-bar="true" background-color="#3F92F9" color="#FFF">
  5. <view slot="left">
  6. <u-icon name="account-fill" color="#FFF" size="35"></u-icon>
  7. <span style="padding: 0 5rpx;color: #FFFFFF;">{{ userInfo.name }}</span>
  8. </view>
  9. <view slot="right" @tap="$utils.back()">
  10. <span style="color: #FFFFFF;">返回</span>
  11. </view>
  12. </uni-nav-bar>
  13. <view class="container">
  14. <!-- 扫描到RFID标签时,打开质检结果 -->
  15. <view class="info" style="margin: 30rpx 0;">
  16. <view class="row flex-start">
  17. <view class="col">
  18. <view class="label">
  19. 物料类型:
  20. </view>
  21. <view class="value">
  22. {{ data.materialType }}
  23. </view>
  24. </view>
  25. <view class="col">
  26. <view class="label">
  27. 标签编码:
  28. </view>
  29. <view class="value">
  30. {{ data.materialCode }}
  31. </view>
  32. </view>
  33. </view>
  34. <view class="row flex-start">
  35. <view class="col">
  36. <view class="label">
  37. 物料名称:
  38. </view>
  39. <view class="value">
  40. {{ data.materialName }}
  41. </view>
  42. </view>
  43. </view>
  44. <view class="row flex-start">
  45. <view class="col">
  46. <view class="label">
  47. 所在仓库:
  48. </view>
  49. <view class="value">
  50. {{ data.saveHouse }}
  51. </view>
  52. </view>
  53. <view class="col">
  54. <view class="label">
  55. 放置区域:
  56. </view>
  57. <view class="value">
  58. {{ data.stockArea }}
  59. </view>
  60. </view>
  61. </view>
  62. <view class="row flex-start">
  63. <view class="col">
  64. <view class="label">
  65. 库存件数:
  66. </view>
  67. <view class="value">
  68. {{ data.tagNum }}
  69. </view>
  70. </view>
  71. <view class="col">
  72. <view class="label">
  73. 库存数量:
  74. </view>
  75. <view class="value">
  76. {{ data.quantity }}
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <view @tap="newTag" style="color: #007AFF;text-align: right;padding: 10rpx 20rpx;">新建标签</view>
  82. <view class="info bottom-list">
  83. <view class="item" v-for="(item, index) in list" :key="index" @tap="errTagHandle(item)">
  84. <view class="row">
  85. <view class="col">
  86. <view class="label">标签值:</view>
  87. <view class="value">{{ item.rfidCode }}</view>
  88. </view>
  89. <view v-if="item.isNewTagFlag"
  90. style="color: #FFFFFF;background-color: red;border-radius: 20rpx;height: 32rpx;line-height: 32rpx;padding: 0 10rpx;">
  91. new
  92. </view>
  93. </view>
  94. <view class="row">
  95. <view class="col">
  96. <view class="label">绑定数量:</view>
  97. <view class="value">{{ item.quantity }}</view>
  98. </view>
  99. </view>
  100. <view class="row">
  101. <view class="col">
  102. <view class="label">异常类型:</view>
  103. <view class="value">{{ item.statusColor === 'red' ? '不存在库' : '未扫描到' }}</view>
  104. </view>
  105. <view class="col">
  106. <view class="label">处置类型:</view>
  107. <view class="value">{{ item.tagDealTypeName }}</view>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. <view style="padding: 10rpx 0;text-align: center;">标签异常数量:{{ list.length }}</view>
  113. </view>
  114. <view class="btn">
  115. <my-fixed-button :customClick="true" @click="over" text="提交"></my-fixed-button>
  116. <!-- 标签处置(未扫描到) -->
  117. <my-dialog v-model="notScanShow" title="标签处置(未扫描到)" :showCancelButton="false" :closeOnClickOverlay="true"
  118. @cfmClick="notScanCfm" @cancelClick="notScanCancel">
  119. <view slot="content" style="width: 100%;padding: 0 20rpx;">
  120. <view class="row">
  121. <view class="col">
  122. <view class="label">标签值:</view>
  123. <view class="value">{{ currentItem.rfidCode }}</view>
  124. </view>
  125. </view>
  126. <view class="row">
  127. <view class="col">
  128. <view class="label">数量:</view>
  129. <view class="value">{{ currentItem.quantity }}</view>
  130. </view>
  131. </view>
  132. <view class="row">
  133. <view class="col" style="align-items: center;">
  134. <view class="label">处置类型:</view>
  135. <view class="value">
  136. <select-lay :value="tagDealType" placeholder="请选择处置类型" :options="notScanTypeList"
  137. @selectitem="notScanTypeSelect" :zindex="1000"></select-lay>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="row" v-if="tagDealTypeName === '补出库'">
  142. <view class="col" style="align-items: center;">
  143. <view class="label">处理人:</view>
  144. <view class="value">
  145. <select-lay :value="stockUserId" placeholder="请选择处理人" :options="stockUserList"
  146. @selectitem="userSelect" :zindex="1001"></select-lay>
  147. </view>
  148. </view>
  149. </view>
  150. <view class="row" v-if="tagDealTypeName === '标签损坏'">
  151. <view class="col" style="align-items: center;overflow: hidden;">
  152. <view class="label">更换标签:</view>
  153. <view class="value" style="flex: 1;overflow: hidden;word-break: break-all;word-wrap: break-word;">
  154. {{ rfidCode }}
  155. </view>
  156. </view>
  157. <view class="col" style="flex: 0;">
  158. <u-button throttleTime="300" @click="rfidChangeScan" type="primary" size="mini">扫描</u-button>
  159. </view>
  160. </view>
  161. </view>
  162. </my-dialog>
  163. <!-- 标签处置(不在库存) -->
  164. <my-dialog v-model="notInStockShow" title="标签处置(不在库存)" :showCancelButton="false" :closeOnClickOverlay="true"
  165. @cfmClick="notInStockCfm()">
  166. <view slot="content" style="width: 100%;padding: 0 20rpx;">
  167. <view class="row">
  168. <view class="col">
  169. <view class="label">标签值:</view>
  170. <view class="value">{{ currentItem.rfidCode }}</view>
  171. </view>
  172. </view>
  173. <view class="row">
  174. <view class="col">
  175. <view class="label">数量:</view>
  176. <view class="value">{{ currentItem.quantity }}</view>
  177. </view>
  178. </view>
  179. <view class="row">
  180. <view class="col" style="align-items: center;">
  181. <view class="label">处置类型:</view>
  182. <view class="value">
  183. <select-lay :value="tagDealType" placeholder="请选择处置类型" :options="handleTypeList"
  184. @selectitem="handleTypeSelect" :zindex="1000"></select-lay>
  185. </view>
  186. </view>
  187. </view>
  188. </view>
  189. </my-dialog>
  190. <!-- 新建标签弹窗 -->
  191. <my-dialog v-model="newTagShow" title="新建标签" :showCancelButton="false" :closeOnClickOverlay="true"
  192. @cancelClick="newTagCancel" @cfmClick="newTagCfm()">
  193. <view slot="content" style="width: 100%;padding: 0 20rpx;">
  194. <view class="row">
  195. <view class="col">
  196. <view class="label">物料类型:</view>
  197. <view class="value">{{ data.materialType }}</view>
  198. </view>
  199. <view class="col">
  200. <view class="label">物料编码:</view>
  201. <view class="value">{{ data.materialCode }}</view>
  202. </view>
  203. </view>
  204. <view class="row">
  205. <view class="col">
  206. <view class="label">物料名称:</view>
  207. <view class="value">{{ data.materialName }}</view>
  208. </view>
  209. </view>
  210. <view class="row">
  211. <view class="col">
  212. <view class="label">所在仓库:</view>
  213. <view class="value">{{ data.saveHouse }}</view>
  214. </view>
  215. </view>
  216. <view class="row">
  217. <view class="col">
  218. <view class="label">放置区域:</view>
  219. <view class="value">{{ data.stockArea }}</view>
  220. </view>
  221. </view>
  222. <view class="row">
  223. <!-- 扫描rfid -->
  224. <view class="reading">
  225. <u-image height="150rpx" mode="aspectFit" src="../../../static/images/rfid.png"></u-image>
  226. <view class="title" v-if="isReading">扫描中...</view>
  227. <view class="title" v-if="!isReading">扫描结果</view>
  228. </view>
  229. </view>
  230. <view class="row">
  231. <view class="col">
  232. <view class="label">标签值:</view>
  233. <view class="value">{{ rfidCode }}</view>
  234. </view>
  235. </view>
  236. <view class="row">
  237. <view class="col">
  238. <view class="label">关联合同:</view>
  239. <view class="value" style="display: flex;justify-content: space-between;">
  240. <p style="flex: 1;overflow: hidden;word-wrap: break-word;">{{ purchaseBillNo }}</p>
  241. <view @tap="chooseContract" style="color: #007AFF;">选择合同批次</view>
  242. </view>
  243. </view>
  244. </view>
  245. <view class="row">
  246. <view class="col">
  247. <view class="label">批次号:</view>
  248. <view class="value">{{ batchNo }}</view>
  249. </view>
  250. </view>
  251. <view class="row">
  252. <view class="col" style="align-items: center;">
  253. <view class="label">处置类型:</view>
  254. <view class="value">
  255. <select-lay :value="tagDealType" placeholder="请选择处置类型" :options="handleTypeList"
  256. @selectitem="handleTypeSelect" :zindex="1000"></select-lay>
  257. </view>
  258. </view>
  259. </view>
  260. <view class="row">
  261. <view class="col" style="align-items: center;">
  262. <view class="label">数量:</view>
  263. <view class="value">
  264. <u-input v-model="quantity" :border="true" />
  265. </view>
  266. </view>
  267. </view>
  268. </view>
  269. </my-dialog>
  270. <!-- 标签更换 -->
  271. <my-dialog v-model="changeRfidShow" title="标签更换" :showCancelButton="false" :closeOnClickOverlay="true"
  272. @cancelClick="changeRfidCancel" @cfmClick="changeRfidCfm">
  273. <view slot="content" style="width: 100%;padding: 0 20rpx;">
  274. <view class="row">
  275. <view class="col">
  276. <view class="label">物料类型:</view>
  277. <view class="value">{{ data.materialType }}</view>
  278. </view>
  279. <view class="col">
  280. <view class="label">物料编码:</view>
  281. <view class="value">{{ data.materialCode }}</view>
  282. </view>
  283. </view>
  284. <view class="row">
  285. <view class="col">
  286. <view class="label">物料名称:</view>
  287. <view class="value">{{ data.materialName }}</view>
  288. </view>
  289. </view>
  290. <view class="row">
  291. <view class="col">
  292. <view class="label">所在仓库:</view>
  293. <view class="value">{{ data.saveHouse }}</view>
  294. </view>
  295. </view>
  296. <view class="row">
  297. <view class="col">
  298. <view class="label">放置区域:</view>
  299. <view class="value">{{ data.stockArea }}</view>
  300. </view>
  301. </view>
  302. <view class="row">
  303. <!-- 扫描rfid -->
  304. <view class="reading">
  305. <u-image height="150rpx" mode="aspectFit" src="../../../static/images/rfid.png"></u-image>
  306. <view class="title" v-if="isReading">扫描中...</view>
  307. <view class="title" v-if="!isReading">扫描结果</view>
  308. </view>
  309. </view>
  310. <view class="row">
  311. <view class="col">
  312. <view class="label">原标签值:</view>
  313. <view class="value">{{ currentItem.rfidCode }}</view>
  314. </view>
  315. </view>
  316. <view class="row">
  317. <view class="col">
  318. <view class="label">原数量:</view>
  319. <view class="value">{{ currentItem.quantity }}</view>
  320. </view>
  321. </view>
  322. <view class="row">
  323. <view class="col">
  324. <view class="label">新标签值:</view>
  325. <view class="value">{{ newRfidCode }}</view>
  326. </view>
  327. </view>
  328. <view class="row">
  329. <view class="col" style="align-items: center;">
  330. <view class="label">新数量:</view>
  331. <view class="value">
  332. <u-input v-model="newQuantity" :border="true" />
  333. </view>
  334. </view>
  335. </view>
  336. </view>
  337. </my-dialog>
  338. <!-- 盘点结果弹窗 -->
  339. <my-dialog v-model="show" title="盘点结果" :showCancelButton="false" :closeOnClickOverlay="true"
  340. @cancelClick="cancel" @cfmClick="cfm">
  341. <view slot="content" style="width: 100%;padding: 0 20rpx;">
  342. <view class="row">
  343. <view class="col">
  344. <view class="label">物料类型:</view>
  345. <view class="value">{{ data.materialType }}</view>
  346. </view>
  347. <view class="col">
  348. <view class="label">物料编码:</view>
  349. <view class="value">{{ data.materialCode }}</view>
  350. </view>
  351. </view>
  352. <view class="row">
  353. <view class="col">
  354. <view class="label">物料名称:</view>
  355. <view class="value">{{ data.materialName }}</view>
  356. </view>
  357. </view>
  358. <view class="row">
  359. <view class="col">
  360. <view class="label">所在仓库:</view>
  361. <view class="value">{{ data.saveHouse }}</view>
  362. </view>
  363. </view>
  364. <view class="row">
  365. <view class="col">
  366. <view class="label">放置区域:</view>
  367. <view class="value">{{ data.stockArea }}</view>
  368. </view>
  369. </view>
  370. <view class="row border"></view>
  371. <view class="row">
  372. <view class="col">
  373. <view class="label">库存件数:</view>
  374. <view class="value">{{ data.tagNum }}</view>
  375. </view>
  376. <view class="col">
  377. <view class="label">扫描件数:</view>
  378. <view class="value">{{ scanCount }}</view>
  379. </view>
  380. </view>
  381. <view class="row">
  382. <view class="col">
  383. <view class="label" style="width: 180rpx;color: red;">异常标签数:</view>
  384. <view class="value" style="color: red;">{{ list.length }}</view>
  385. </view>
  386. </view>
  387. <view class="row border"></view>
  388. <view class="row">
  389. <view class="col" style="align-items: center;">
  390. <view class="label">实物件数:</view>
  391. <view class="value">
  392. <u-input v-model="quantity" :border="true" />
  393. </view>
  394. </view>
  395. </view>
  396. </view>
  397. </my-dialog>
  398. </view>
  399. </view>
  400. </template>
  401. <script>
  402. const uhf = uni.requireNativePlugin('js-uhf');
  403. export default {
  404. data() {
  405. return {
  406. rfidCode: '',
  407. quantity: '',
  408. newQuantity: '',
  409. newRfidCode: '',
  410. purchaseBillNo: '', // 关联合同号
  411. batchNo: '', // 关联批次号
  412. stockUserId: '',
  413. tagDealType: '',
  414. tagDealTypeName: '',
  415. timer: null,
  416. changeRfidShow: false, // 标签更换
  417. notScanShow: false, // 未扫描到
  418. notInStockShow: false, // 不在库存
  419. newTagShow: false, // 新建标签
  420. show: false,
  421. isReading: true,
  422. currentItem: {}, // 当前处理对象
  423. data: {},
  424. stockUserList: [],
  425. normalList: [],
  426. rfidItems: [],
  427. scanCount: 0,
  428. list: [],
  429. // 新建标签处置类型
  430. handleTypeList: [{
  431. label: '补入库',
  432. value: 13
  433. },
  434. {
  435. label: '盘盈',
  436. value: 11
  437. }
  438. ],
  439. // 未扫描到处理类型
  440. notScanTypeList: [
  441. {
  442. label: '补出库',
  443. value: 23
  444. },
  445. {
  446. label: '标签错误',
  447. value: 24
  448. },
  449. {
  450. label: '标签损坏',
  451. value: 10
  452. },
  453. {
  454. label: '盘亏',
  455. value: 21
  456. }
  457. ]
  458. };
  459. },
  460. methods: {
  461. /* 未扫描到确认 */
  462. notScanCfm () {
  463. if(!this.tagDealTypeName) return this.$msg.showToast('请选择处置类型')
  464. if(this.tagDealTypeName === '补出库') {
  465. if(!this.stockUserId) return this.$msg.showToast('请选择处理人')
  466. this.currentItem.stockUserId = this.stockUserId
  467. }
  468. if(this.tagDealTypeName === '标签损坏') {
  469. if(!this.rfidCode) return this.$msg.showToast('请绑定需要更换的标签')
  470. this.currentItem.newQuantity = this.quantity
  471. }
  472. this.currentItem.tagDealType = this.tagDealType
  473. this.currentItem.tagDealTypeName = this.tagDealTypeName
  474. this.currentItem.newRfidCode = this.rfidCode
  475. this.notScanCancel()
  476. },
  477. notScanCancel () {
  478. this.notScanShow = false
  479. this.currentItem = {}
  480. this.tagDealTypeName = ''
  481. this.tagDealType = ''
  482. this.rfidCode = ''
  483. this.quantity = ''
  484. this.stockUserId = ''
  485. },
  486. /* 更换标签确认 */
  487. changeRfidCfm () {
  488. if (!this.newRfidCode) return this.$msg.showToast('请绑定标签')
  489. if (!this.newQuantity) return this.$msg.showToast('请输入数量')
  490. this.rfidCode = this.newRfidCode
  491. this.quantity = this.newQuantity
  492. this.changeRfidCancel()
  493. },
  494. changeRfidCancel () {
  495. this.$pda.uhfStop()
  496. this.changeRfidShow = false
  497. this.newRfidCode = ''
  498. this.newQuantity = ''
  499. },
  500. /* 扫描更换标签 */
  501. rfidChangeScan () {
  502. this.isReading = true
  503. this.changeRfidShow = true
  504. this.rfidCode = ''
  505. this.quantity = ''
  506. this.$pda.uhfScan().then(res => {
  507. console.log(res)
  508. this.isReading = false
  509. this.newRfidCode = res[0].epc
  510. console.log(this.rfidCode)
  511. }).catch(() => {
  512. this.$msg.showToast('未识别到有效RFID标签!')
  513. this.timer = setTimeout(() => {
  514. this.changeRfidShow = false
  515. }, 1000)
  516. })
  517. },
  518. /* 标签点击处理 */
  519. errTagHandle(item) {
  520. this.currentItem = item
  521. if (item.statusColor === 'red') {
  522. this.notInStockShow = true
  523. } else {
  524. this.notScanShow = true
  525. }
  526. },
  527. /* 新建标签 */
  528. newTag() {
  529. this.newTagShow = true
  530. this.isReading = true
  531. this.$pda.uhfScan().then(res => {
  532. console.log(res)
  533. this.isReading = false
  534. this.rfidCode = res[0].epc
  535. console.log(this.rfidCode)
  536. }).catch(() => {
  537. this.$msg.showToast('未识别到有效RFID标签!')
  538. this.timer = setTimeout(() => {
  539. this.newTagShow = false
  540. }, 1000)
  541. })
  542. },
  543. /* 新建标签提交 */
  544. newTagCfm() {
  545. if (!this.rfidCode) return this.$msg.showToast('请绑定标签')
  546. if (!this.quantity) return this.$msg.showToast('请输入数量')
  547. this.$http.CreateTag({
  548. materialCode: this.data.materialCode,
  549. rfidCode: this.rfidCode,
  550. quantity: this.quantity,
  551. purchaseBillNo: this.purchaseBillNo,
  552. batchNo: this.batchNo
  553. }).then(res => {
  554. if (res.code === 0) {
  555. this.$msg.showToast(res.msg || '操作成功')
  556. this.list.push({
  557. rfidCode: this.rfidCode,
  558. quantity: this.quantity,
  559. statusColor: 'red',
  560. tagDealType: this.tagDealType,
  561. tagDealTypeName: this.tagDealTypeName,
  562. isNewTagFlag: true
  563. })
  564. this.newTagCancel()
  565. }
  566. })
  567. },
  568. /* 新建标签弹窗关闭 */
  569. newTagCancel() {
  570. this.newTagShow = false
  571. this.$pda.uhfStop()
  572. this.rfidCode = ''
  573. this.quantity = ''
  574. this.tagDealType = ''
  575. this.tagDealTypeName = ''
  576. this.purchaseBillNo = ''
  577. this.batchNo = ''
  578. },
  579. /* 选择处理人 */
  580. userSelect(index, item) {
  581. this.stockUserId = item.value;
  582. },
  583. /* 新建标签/不在库存处置 处置类型选择 */
  584. handleTypeSelect(index, item) {
  585. this.tagDealType = item.value;
  586. this.tagDealTypeName = this.handleTypeList[index].label
  587. },
  588. /* 未扫描到 处置类型选择 */
  589. notScanTypeSelect(index, item) {
  590. this.tagDealType = item.value;
  591. this.tagDealTypeName = this.notScanTypeList[index].label
  592. },
  593. /* 标签处置(不在库存)确认 */
  594. notInStockCfm () {
  595. this.currentItem.tagDealType = this.tagDealType
  596. this.currentItem.tagDealTypeName = this.tagDealTypeName
  597. this.notInStockShow = false
  598. this.tagDealType = ''
  599. this.tagDealTypeName = ''
  600. this.currentItem = {}
  601. },
  602. /* 选择合同 */
  603. chooseContract() {
  604. this.$utils.open(`/pages/store-manage/contract-list/contract-list?materialCode=${this.data.materialCode}`)
  605. },
  606. cancel() {
  607. this.quantity = ''
  608. this.show = false
  609. },
  610. over() {
  611. this.handQty = this.data.quantity
  612. this.handTagQty = this.data.tagNum
  613. this.show = true
  614. },
  615. cfm() {
  616. if (!this.quantity) {
  617. return this.$msg.showToast('请输入实物件数!')
  618. }
  619. let list = [...this.list, ...this.normalList]
  620. list.forEach(item => {
  621. item.checkTagState = item.statusColor === 'black' ? 0 : item.statusColor === 'red' ? 1 : 2
  622. })
  623. console.log({
  624. detailId: this.data.id,
  625. handTagQty: this.quantity,
  626. errorTagList: list
  627. })
  628. this.$http.SubmitCheckResult({
  629. detailId: this.data.id,
  630. handTagQty: this.quantity,
  631. errorTagList: list
  632. }).then(res => {
  633. console.log(res)
  634. if (res.code === 0) {
  635. this.$msg.showToast(res.msg || '操作成功!')
  636. this.timer = setTimeout(() => {
  637. this.$utils.back(2)
  638. }, 1000)
  639. }
  640. })
  641. },
  642. getStockUserList() {
  643. this.$http.GetUserPageList({
  644. pageIndex: 1,
  645. pageSize: 999,
  646. takeUser: true
  647. }).then(res => {
  648. if(res.code == 0) {
  649. let list = res.result.list.map(item => {
  650. return {
  651. label: item.realName,
  652. value: item.id
  653. }
  654. })
  655. this.stockUserList = list
  656. }
  657. })
  658. }
  659. },
  660. onLoad(option) {
  661. this.data = JSON.parse(option.data)
  662. this.list = JSON.parse(option.list)
  663. this.normalList = JSON.parse(option.normalList)
  664. this.rfidItems = JSON.parse(option.rfidItems)
  665. this.scanCount = option.scanCount
  666. this.getStockUserList()
  667. console.log(this.data)
  668. uni.$on('chooseContract', res => {
  669. console.log('purchaseBillNo-', this.purchaseBillNo)
  670. this.purchaseBillNo = res.purchaseBillNo
  671. this.batchNo = res.batchNo
  672. })
  673. },
  674. onUnload() {
  675. this.$pda.uhfStop()
  676. clearTimeout(this.timer)
  677. uni.$off('chooseContract')
  678. }
  679. }
  680. </script>
  681. <style lang="scss" scoped>
  682. .container-wrap {
  683. overflow: hidden;
  684. .container {
  685. padding: 0 10rpx;
  686. height: calc(100vh - var(--status-bar-height) - 44px);
  687. overflow: hidden;
  688. display: flex;
  689. flex-direction: column;
  690. padding-bottom: 80rpx;
  691. .title {
  692. margin: 20rpx 60rpx;
  693. font-size: 36rpx;
  694. font-weight: bold;
  695. text-align: center;
  696. }
  697. .reading {
  698. width: 100%;
  699. display: flex;
  700. flex-direction: column;
  701. align-items: center;
  702. justify-content: center;
  703. .title {
  704. font-size: 28rpx;
  705. }
  706. }
  707. .info {
  708. padding: 10rpx 60rpx;
  709. border-radius: 10rpx;
  710. .row {
  711. justify-content: space-between;
  712. align-items: flex-start;
  713. .col {
  714. display: flex;
  715. flex: 1;
  716. overflow: hidden;
  717. justify-content: flex-start;
  718. }
  719. .label {
  720. color: inherit;
  721. font-size: 28rpx;
  722. width: 140rpx;
  723. }
  724. .value {
  725. color: inherit;
  726. font-size: 28rpx;
  727. flex: 1;
  728. overflow: hidden;
  729. word-wrap: break-word;
  730. }
  731. }
  732. .item {
  733. padding: 20rpx;
  734. background-color: #FFFFFF;
  735. margin-bottom: 10rpx;
  736. border-radius: 10rpx;
  737. }
  738. }
  739. .bottom-list {
  740. flex: 1;
  741. overflow: auto;
  742. padding: 10rpx 20rpx;
  743. }
  744. .btn {
  745. height: 180rpx;
  746. .row {
  747. padding: 0;
  748. padding-bottom: 10rpx;
  749. width: 100%;
  750. &:last-child {
  751. padding-bottom: 0;
  752. }
  753. }
  754. }
  755. .border {
  756. border-top: 1px solid #646464;
  757. }
  758. }
  759. }
  760. </style>