index.vue 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <template>
  2. <view class="query-wrap">
  3. <view class="inner-item">
  4. <view class="inventory-item">
  5. <view class="shuo-item-name its">
  6. <view class="shuo-label-podnme">
  7. {{formData.prodName||"" }}
  8. </view>
  9. <view class="shuo-unit">
  10. <span>{{ formData.unt }} ({{ formData.pacCnt
  11. }}{{formData.prcUnt}}/{{ formData.unt }})</span>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="inventory-item">
  16. <view class="shuo-item-name">
  17. <view class="shuo-label">
  18. 规格:
  19. </view>
  20. <view class="shuo-cont">
  21. {{formData.spec}}
  22. </view>
  23. </view>
  24. </view>
  25. <view class="inventory-item">
  26. <view class="shuo-item-name">
  27. <view class="shuo-label">
  28. 型号:
  29. </view>
  30. <view class="shuo-cont">
  31. {{formData.mol}}
  32. </view>
  33. </view>
  34. </view>
  35. <view class="inventory-item">
  36. <view class="shuo-item-name">
  37. <view class="shuo-label">
  38. UDI码:
  39. </view>
  40. <view class="shuo-cont">
  41. {{formData.udi}}
  42. </view>
  43. </view>
  44. </view>
  45. <view class="inventory-item">
  46. <view class="shuo-item-name">
  47. <view class="shuo-label">
  48. 生产批次:
  49. </view>
  50. <view class="shuo-cont">
  51. {{formData.lotNum}}
  52. </view>
  53. </view>
  54. </view>
  55. <view class="inventory-item">
  56. <view class="shuo-item-name">
  57. <view class="shuo-label">
  58. 生产日期:
  59. </view>
  60. <view class="shuo-cont">
  61. {{formData.manuDate}}
  62. </view>
  63. </view>
  64. </view>
  65. <view class="inventory-item">
  66. <view class="shuo-item-name">
  67. <view class="shuo-label">
  68. 有效期至:
  69. </view>
  70. <view class="shuo-cont">
  71. {{formData.prodExpy}}
  72. </view>
  73. </view>
  74. </view>
  75. <view class="inventory-item">
  76. <view class="shuo-item-name">
  77. <view class="shuo-label">
  78. 注册证号:
  79. </view>
  80. <view class="shuo-cont">
  81. {{formData.regcertno}}
  82. </view>
  83. </view>
  84. </view>
  85. <view class="inventory-item">
  86. <view class="shuo-item-name">
  87. <view class="shuo-label">
  88. 耗材类别:
  89. </view>
  90. <view class="shuo-label-blue">
  91. <span v-if="formData.mcsType == '0'"> 普通耗材 </span>
  92. <span v-if="formData.mcsType == '1'"> 高值耗材 </span>
  93. <span v-if="formData.mcsType == '2'"> 试剂 </span>
  94. <span v-if="formData.mcsType == '3'"> 总务耗材 </span>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="inventory-item">
  99. <view class="shuo-item-name">
  100. <view class="shuo-label">
  101. 生产来源:
  102. </view>
  103. <view class="shuo-label-blue">
  104. <span v-if="formData.prodSouc == '1'" type="success"> 国产 </span>
  105. <span v-if="formData.prodSouc == '2'" type="danger"> 进口 </span>
  106. </view>
  107. </view>
  108. </view>
  109. <view class="inventory-item">
  110. <view class="shuo-item-name">
  111. <view class="shuo-label">
  112. 生产企业:
  113. </view>
  114. <view class="shuo-cont">
  115. {{formData.prodEntp}}
  116. </view>
  117. </view>
  118. </view>
  119. <view class="inventory-item">
  120. <view class="shuo-item-name">
  121. <view class="shuo-label">
  122. 是否集采:
  123. </view>
  124. <view class="shuo-cont">
  125. <span v-if="formData.isFas == '1'" type="success"> 是 </span>
  126. <span v-if="formData.isFas == '0'" type="danger"> 否 </span>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="inventory-item">
  131. <view class="shuo-item-name">
  132. <view class="shuo-label">
  133. 集采批次:
  134. </view>
  135. <view class="shuo-cont">
  136. {{formData.fasBtch}}
  137. </view>
  138. </view>
  139. </view>
  140. <view class="inventory-item">
  141. <view class="shuo-item-name">
  142. <view class="shuo-label">
  143. 管理方式:
  144. </view>
  145. <view class="shuo-cont">
  146. {{formData.mol}}
  147. </view>
  148. </view>
  149. </view>
  150. <!-- <view class="inventory-item">
  151. <view class="shuo-item-name">
  152. <view class="shuo-label">
  153. 一物一码:
  154. </view>
  155. <view class="shuo-cont">
  156. {{ listData.isBarc == "0" ? "否" : " 是" }}
  157. </view>
  158. </view>
  159. </view> -->
  160. </view>
  161. <uni-popup ref="popup">
  162. <uni-popup-dialog type="warn" :before-close="true" cancelText="取消" confirmText="确定" content="你确定删除当前记录吗?"
  163. @confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
  164. </uni-popup>
  165. <view class="botm-btn" v-if="type=='outbond'">
  166. <button type="default" plain="true" style="width:240rpx;line-height: 70rpx;background: #01A992;color:#fff"
  167. @click.stop="subMitData()">确定</button>
  168. </view>
  169. </view>
  170. </template>
  171. <script>
  172. import {
  173. mapState,
  174. mapMutations,
  175. mapActions
  176. } from 'vuex';
  177. import moment from "moment";
  178. const paging = {
  179. current: 1,
  180. size: 10000
  181. };
  182. export default {
  183. data() {
  184. return {
  185. value: "",
  186. listData: [],
  187. formData: {},
  188. type: "",
  189. delIndex: 0
  190. }
  191. },
  192. computed: {
  193. ...mapState(['refusaData', 'udiData'])
  194. },
  195. onShow() {
  196. let that = this;
  197. this.$forceUpdate();
  198. uni.getStorage({
  199. key: 'followdetview',
  200. success: function(res) {
  201. //soucStroomId
  202. that.formData = res.data;
  203. }
  204. });
  205. },
  206. mounted() {
  207. if (this.type != 'outbond') {
  208. this.getData();
  209. }
  210. },
  211. methods: {
  212. getData() {
  213. this.$http('delivery.getPickData', {
  214. prodCode: this.formData.prodCode,
  215. size: 1000,
  216. stooutId: this.formData.stooutId
  217. }, '加载中', true).then((res) => {
  218. if (res.success == true) {
  219. this.listData = res.data.records;
  220. }
  221. })
  222. },
  223. //确定删除
  224. clickItem(idx) {
  225. this.delIndex = idx;
  226. this.$refs.popup.open();
  227. },
  228. dialogClose() {
  229. this.$refs.popup.close();
  230. },
  231. //拣货查询
  232. input(e) {
  233. if (!e) return;
  234. this.$http('outbound.outbQueryData', {
  235. prodCode: this.formData.prodCode,
  236. soucStroomId: this.formData.soucStroomId,
  237. stooutId: this.formData.stooutId,
  238. sn: e
  239. }, '加载中', true).then((res) => {
  240. if (res.success == true) {
  241. res.data.records.length > 0 &&
  242. res.data.records.forEach((item) => {
  243. item["stooutId"] = this.formData.stooutId;
  244. item["sn"] = item.id;
  245. });
  246. let filterData = this.listData.filter((item) => {
  247. return item.id == res.data.records[0].id;
  248. });
  249. if (filterData.length <= 0) {
  250. this.listData = [...this.listData, ...res.data.records]
  251. } else {
  252. uni.showToast({
  253. title: '重复数据',
  254. icon: 'none',
  255. duration: 1000,
  256. });
  257. }
  258. }
  259. })
  260. },
  261. // 确定删除当前记录
  262. dialogConfirm() {
  263. let delData = [...this.listData];
  264. delData.splice(this.delIndex, 1);
  265. this.listData = delData;
  266. this.$refs.popup.close();
  267. },
  268. //拣货确认
  269. subMitData() {
  270. this.$http('outbound.confrimPickIng', this.listData, '加载中', true).then((res) => {
  271. if (res.success == true) {
  272. uni.showToast({
  273. title: '拣货成功',
  274. icon: 'none',
  275. duration: 1000,
  276. });
  277. uni.redirectTo({
  278. url: '/pages/outbounddetail/index'
  279. });
  280. }
  281. })
  282. }
  283. },
  284. watch: {
  285. }
  286. }
  287. </script>
  288. <style lang="scss" scoped>
  289. .query-wrap {
  290. width: 100%;
  291. height: 100%;
  292. padding: 20rpx;
  293. box-sizing: border-box;
  294. background-color: #F1F1F1;
  295. overflow-y: scroll;
  296. overflow-x: hidden;
  297. position: relative;
  298. padding-bottom: 200rpx;
  299. .botm-btn {
  300. width: 100%;
  301. height: 120rpx;
  302. background-color: #fff;
  303. position: fixed;
  304. left: 0;
  305. bottom: 0;
  306. padding-top: 40rpx;
  307. }
  308. }
  309. uni-page-body {
  310. width: 100%;
  311. height: 100%;
  312. }
  313. </style>