index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. <template>
  2. <view class="query-wrap">
  3. <view class="inner-item">
  4. <view class="text-title">
  5. <view class="title-circ"> </view>
  6. <span class="title-text">基本信息</span>
  7. </view>
  8. <view class="inventory-item">
  9. <view class="shuo-item-name">
  10. <view class="shuo-label"> 单据编号: </view>
  11. <view class="shuo-unit">
  12. {{ acceptDetaData.id }}
  13. </view>
  14. </view>
  15. </view>
  16. <view class="inventory-item">
  17. <view class="shuo-item">
  18. <view class="shuo-label"> 采购品种: </view>
  19. <view class="shuo-cont">
  20. {{ acceptDetaData.detlCnt || "" }}
  21. </view>
  22. </view>
  23. <view class="shuo-item">
  24. <view class="shuo-label"> 采购总数: </view>
  25. <view class="shuo-cont">
  26. {{ acceptDetaData.purcCntSum || "" }}
  27. </view>
  28. </view>
  29. </view>
  30. <view class="inventory-item">
  31. <view class="shuo-item">
  32. <view class="shuo-label"> 采购总额: </view>
  33. <view class="shuo-cont">
  34. {{ acceptDetaData.purcAmt || "" }}
  35. </view>
  36. </view>
  37. </view>
  38. <view class="inventory-item">
  39. <view class="shuo-item-name">
  40. <view class="shuo-label"> 来源机构: </view>
  41. <view class="shuo-cont">
  42. {{ acceptDetaData.orgName }}
  43. </view>
  44. </view>
  45. </view>
  46. <view class="inventory-item">
  47. <view class="shuo-item-name">
  48. <view class="shuo-label"> 采购时间: </view>
  49. <view class="shuo-cont">
  50. {{ acceptDetaData.docmkDate }}
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="empty-cont" v-if="listData.length == '0'"> 暂无明细数据 </view>
  56. <view class="inner-item" v-for="(item, idex) in listData" :key="idex">
  57. <view class="item-stats">
  58. <span v-if="item.stas == 'A'">未受理</span>
  59. <span v-if="item.stas == 'B'">已受理</span>
  60. <span v-if="item.stas == 'R'">被驳回</span>
  61. <span v-if="item.stas == 'DB'">部分出库</span>
  62. <span v-if="item.stas == 'DC'">已出库</span>
  63. <span v-if="item.stas == 'DQ'">部分验收</span>
  64. <span v-if="item.stas == 'DR'">已验收</span>
  65. <span v-if="item.stas == 'Y'">已入库</span>
  66. </view>
  67. <view class="text-title" v-if="idex == '0'">
  68. <view class="title-circ"> </view>
  69. <span class="title-text">药品清单</span>
  70. </view>
  71. <view class="inventory-item" style="margin-top: 40rpx">
  72. <view class="shuo-item-name">
  73. <view class="shuo-label-podnme"> 药品名称: </view>
  74. <view class="shuo-unit">
  75. <span>{{ item.drugName }}</span>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="inventory-item">
  80. <view class="shuo-item-name">
  81. <view class="shuo-label-podnme"> 药品编码: </view>
  82. <view class="shuo-cont">
  83. <span>{{ item.drugListId }}</span>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="inventory-item">
  88. <view class="shuo-item-name">
  89. <view class="shuo-label-podnme"> 医保编码: </view>
  90. <view class="shuo-cont">
  91. <span>{{ item.natDrugNo }}</span>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="inventory-item">
  96. <view class="shuo-item-name">
  97. <view class="shuo-label"> 药品规格: </view>
  98. <view class="shuo-cont">
  99. {{
  100. "【" +
  101. item.specName +
  102. "*" +
  103. item.convrat +
  104. item.pac +
  105. "/" +
  106. item.pacUnt +
  107. "】"
  108. }}
  109. </view>
  110. </view>
  111. </view>
  112. <view class="inventory-item">
  113. <view class="shuo-item">
  114. <view class="shuo-label"> 采购数量: </view>
  115. <view class="shuo-cont">
  116. {{ item.purcCnt || "" }}
  117. </view>
  118. </view>
  119. <view class="shuo-item">
  120. <view class="shuo-label"> 采购金额: </view>
  121. <view class="shuo-cont">
  122. {{ item.purcAmt }}
  123. </view>
  124. </view>
  125. </view>
  126. <view class="inventory-item">
  127. <view class="shuo-item">
  128. <view class="shuo-label"> 药品剂型: </view>
  129. <view class="shuo-cont">
  130. {{ item.dosformName }}
  131. </view>
  132. </view>
  133. <view class="shuo-item">
  134. <view class="shuo-label"> 单价: </view>
  135. <view class="shuo-cont">
  136. {{ item.purcPric || "" }}
  137. </view>
  138. </view>
  139. </view>
  140. <view class="inventory-item">
  141. <view class="shuo-item-name">
  142. <view class="shuo-label-podnme"> 批准文号: </view>
  143. <view class="shuo-cont">
  144. <span>{{ item.aprvNo || "" }}</span>
  145. </view>
  146. </view>
  147. </view>
  148. <view class="inventory-item">
  149. <view class="shuo-item-name">
  150. <view class="shuo-label-podnme"> 生产企业: </view>
  151. <view class="shuo-cont">
  152. <span>{{ item.prodentpName }}</span>
  153. </view>
  154. </view>
  155. </view>
  156. <view class="inventory-item">
  157. <view class="shuo-item-name">
  158. <view class="shuo-label-podnme"> 配送企业: </view>
  159. <view class="shuo-cont">
  160. <span>{{ item.splerName }}</span>
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. <view class="botm-btn" v-if="acceptDetaData.stas === '0'">
  166. <button class="btn-confirm" @click="handleConfirm">确认</button>
  167. <button class="btn-reject" @click="showRejectPopup">退回</button>
  168. </view>
  169. <uni-popup ref="rejectPopup" type="center">
  170. <transition name="fade">
  171. <view v-if="showPopup" class="reject-popup">
  172. <view class="popup-title">请输入退回原因</view>
  173. <textarea
  174. v-model="rejectReason"
  175. class="popup-textarea"
  176. placeholder="请输入退回原因"
  177. />
  178. <view class="popup-btns">
  179. <button class="btn-cancel" @click="closeRejectPopup">取消</button>
  180. <button class="btn-reject-mini" @click="confirmReject">退回</button>
  181. </view>
  182. </view>
  183. </transition>
  184. </uni-popup>
  185. </view>
  186. </template>
  187. <script>
  188. import moment from "moment";
  189. export default {
  190. data() {
  191. return {
  192. listData: [],
  193. acceptDetaData: {},
  194. subMitData: {},
  195. rejectReason: "",
  196. showPopup: false,
  197. };
  198. },
  199. onShow() {
  200. let that = this;
  201. uni.getStorage({
  202. key: "planApprovalDetail",
  203. success: function (res) {
  204. that.acceptDetaData = res.data;
  205. that.getDetail(res.data.id);
  206. },
  207. });
  208. },
  209. methods: {
  210. async getDetail(id) {
  211. await this.$http("drugHospital.getApprDetlList", { id }, "加载中").then((res) => {
  212. if (res && res.data) {
  213. this.listData = res.data || [];
  214. }
  215. });
  216. },
  217. handleConfirm() {
  218. uni.showModal({
  219. title: "提示",
  220. content: "确定要确认吗?",
  221. success: (res) => {
  222. if (res.confirm) {
  223. const params = {
  224. apprStas: "Y",
  225. apprType: "plan",
  226. planApprDetls: this.listData.map((item) => ({
  227. detlId: item.detlId,
  228. drugListId: item.drugListId,
  229. orgId: item.orgId,
  230. planId: item.planId,
  231. splerId: item.splerId,
  232. splerIdCurr: item.splerIdCurr,
  233. })),
  234. reason: "",
  235. };
  236. this.$http("drugHospital.apprPurcPlan", params, "处理中").then(() => {
  237. uni.showToast({ title: "确认成功", icon: "success" });
  238. uni.navigateBack();
  239. });
  240. }
  241. },
  242. });
  243. },
  244. showRejectPopup() {
  245. this.rejectReason = "";
  246. this.showPopup = true;
  247. this.$refs.rejectPopup.open();
  248. },
  249. closeRejectPopup() {
  250. this.showPopup = false;
  251. this.$refs.rejectPopup.close();
  252. },
  253. confirmReject() {
  254. if (!this.rejectReason) {
  255. uni.showToast({ title: "请填写退回原因", icon: "none" });
  256. return;
  257. }
  258. uni.showModal({
  259. title: "提示",
  260. content: "确定要退回吗?",
  261. success: (res) => {
  262. if (res.confirm) {
  263. this.handleReject();
  264. }
  265. },
  266. });
  267. },
  268. handleReject() {
  269. const params = {
  270. apprStas: "R",
  271. apprType: "plan",
  272. planApprDetls: this.listData.map((item) => ({
  273. detlId: item.detlId,
  274. drugListId: item.drugListId,
  275. orgId: item.orgId,
  276. planId: item.planId,
  277. splerId: item.splerId,
  278. splerIdCurr: item.splerIdCurr,
  279. })),
  280. reason: this.rejectReason,
  281. };
  282. this.$http("drugHospital.apprPurcPlan", params, "处理中").then(() => {
  283. uni.showToast({ title: "退回成功", icon: "success" });
  284. this.closeRejectPopup();
  285. uni.navigateBack();
  286. });
  287. },
  288. },
  289. };
  290. </script>
  291. <style lang="scss" scoped>
  292. .query-wrap {
  293. width: 100%;
  294. height: 100%;
  295. padding: 20rpx;
  296. box-sizing: border-box;
  297. background-color: #f1f1f1;
  298. overflow-y: scroll;
  299. overflow-x: hidden;
  300. position: relative;
  301. padding-bottom: 200rpx;
  302. .botm-btn {
  303. width: 100%;
  304. height: 120rpx;
  305. background-color: #fff;
  306. position: fixed;
  307. left: 0;
  308. bottom: 0;
  309. padding-top: 40rpx;
  310. display: flex;
  311. align-items: center;
  312. justify-content: space-around;
  313. }
  314. .btn-confirm {
  315. width: 200rpx;
  316. height: 80rpx;
  317. background: #5ab7a5;
  318. color: #fff;
  319. font-size: 32rpx;
  320. border: none;
  321. border-radius: 8rpx;
  322. font-weight: bold;
  323. margin-right: 20rpx;
  324. }
  325. .btn-reject {
  326. width: 200rpx;
  327. height: 80rpx;
  328. background: #e74c3c;
  329. color: #fff;
  330. font-size: 32rpx;
  331. border: none;
  332. border-radius: 8rpx;
  333. font-weight: bold;
  334. }
  335. .time-view {
  336. height: 350rpx;
  337. background-color: #fff;
  338. padding: 50rpx 50rpx 0 50rpx;
  339. box-sizing: border-box;
  340. .btn-view {
  341. width: 100%;
  342. height: 100rpx;
  343. margin-top: 100rpx;
  344. display: flex;
  345. justify-content: space-around;
  346. }
  347. }
  348. }
  349. .title-text {
  350. font-size: 32rpx;
  351. color: #5ab7a5;
  352. font-weight: bold;
  353. }
  354. .item-stats {
  355. margin-top: 80rpx;
  356. }
  357. uni-page-body {
  358. width: 100%;
  359. height: 100%;
  360. }
  361. .reject-popup {
  362. padding: 40rpx;
  363. width: 500rpx;
  364. background: #fff;
  365. border-radius: 12rpx;
  366. box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08);
  367. display: flex;
  368. flex-direction: column;
  369. align-items: stretch;
  370. }
  371. .popup-title {
  372. font-size: 32rpx;
  373. margin-bottom: 20rpx;
  374. color: #333;
  375. font-weight: bold;
  376. text-align: left;
  377. }
  378. .popup-textarea {
  379. width: 100%;
  380. height: 120rpx;
  381. border: 1rpx solid #eee;
  382. padding: 10rpx;
  383. font-size: 28rpx;
  384. border-radius: 8rpx;
  385. resize: none;
  386. margin-bottom: 20rpx;
  387. }
  388. .popup-btns {
  389. display: flex;
  390. justify-content: flex-end;
  391. gap: 20rpx;
  392. }
  393. .btn-cancel {
  394. width: 120rpx;
  395. height: 60rpx;
  396. background: #eee;
  397. color: #333;
  398. font-size: 28rpx;
  399. border: none;
  400. border-radius: 8rpx;
  401. }
  402. .btn-reject-mini {
  403. width: 140rpx;
  404. height: 60rpx;
  405. background: #e74c3c;
  406. color: #fff;
  407. font-size: 28rpx;
  408. border: none;
  409. border-radius: 8rpx;
  410. font-weight: bold;
  411. }
  412. .fade-enter-active,
  413. .fade-leave-active {
  414. transition: all 0.3s;
  415. }
  416. .fade-enter,
  417. .fade-leave-to {
  418. opacity: 0;
  419. transform: scale(0.95);
  420. }
  421. </style>