Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

drugStockInOrderDetail.vue 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb
  5. v-if="this.$route.query.type == 1"
  6. :crumbs="crumbs"
  7. ></bread-crumb>
  8. <bread-crumb
  9. v-if="this.$route.query.type == 2"
  10. :crumbs="crumbs2"
  11. ></bread-crumb>
  12. </div>
  13. <div class="app-container">
  14. <div class="filter-container">
  15. <span style="font-size: 18px;color: #606266">入库单详情</span>
  16. <el-row style="float:right;">
  17. <span style="color: #606266"
  18. >入库单号: {{ WarehouseInfo.warehouse.warehousing_order }}</span
  19. >
  20. </el-row>
  21. </div>
  22. <div class="cell clearfix">
  23. <span style="width: 300px;color: #606266"
  24. >单据日期:
  25. {{
  26. WarehouseInfo.warehouse.warehousing_time | parseTime("{y}-{m}-{d}")
  27. }}</span
  28. >
  29. <span style="width: 300px;color: #606266"
  30. >厂商:
  31. {{ WarehouseInfo.warehouse.manufacturers? WarehouseInfo.warehouse.manufacturers.manufacturer_name:'' }}</span
  32. >
  33. <span style="width: 300px;color: #606266"
  34. >经销商: {{ WarehouseInfo.warehouse.dealers?WarehouseInfo.warehouse.dealers.dealer_name:''}}</span
  35. >
  36. </div>
  37. <div class="cell clearfix" style="margin-top: 10px">
  38. <el-button size="small" icon="el-icon-edit" @click="editRecord"
  39. >编辑</el-button
  40. >
  41. <el-button size="small" icon="el-icon-delete" @click="deleteRecord"
  42. >删除</el-button
  43. >
  44. </div>
  45. <el-row :gutter="12" style="margin-top: 10px">
  46. <el-table
  47. :data="WarehouseInfo.warehouseInfoDate"
  48. :class="signAndWeighBoxPatients"
  49. style="width: 100%"
  50. border
  51. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  52. >
  53. <el-table-column min-width="35" align="center">
  54. <template slot="header" slot-scope="scope">
  55. <span>药品名称</span>
  56. </template>
  57. <template slot-scope="scope">
  58. <span v-if="scope.row.drug_id != 0">{{
  59. scope.row.drug.drug_name
  60. }}</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column min-width="35" align="center">
  64. <template slot="header" slot-scope="scope">
  65. <span>规格名称</span>
  66. </template>
  67. <template slot-scope="scope">
  68. <span v-if="scope.row.drug_id != 0">{{
  69. scope.row.drug?scope.row.drug.drug_spec:''
  70. }}</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column min-width="23" align="center">
  74. <template slot="header" slot-scope="scope">
  75. <span>单价</span>
  76. </template>
  77. <template slot-scope="scope">
  78. <span>{{ scope.row.price }}</span>
  79. </template>
  80. </el-table-column>
  81. <el-table-column min-width="23" align="center">
  82. <template slot="header" slot-scope="scope">
  83. <span>入库数量</span>
  84. </template>
  85. <template slot-scope="scope">
  86. <span>{{ scope.row.warehousing_count }}</span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="总价" min-width="20" align="center">
  90. <template slot-scope="scope">
  91. {{ calculate(scope.row.price * scope.row.warehousing_count) }}
  92. </template>
  93. </el-table-column>
  94. <el-table-column align="center" min-width="25">
  95. <template slot="header" slot-scope="scope">
  96. <span>批号</span>
  97. </template>
  98. <template slot-scope="scope">
  99. <span>{{ scope.row.number }}</span>
  100. </template>
  101. </el-table-column>
  102. <el-table-column label="生产日期" min-width="40" align="center">
  103. <template v-if="scope.row.product_date != 0" slot-scope="scope">
  104. {{ scope.row.product_date | parseTime("{y}-{m}-{d}") }}
  105. </template>
  106. </el-table-column>
  107. <el-table-column label="有效日期" min-width="40" align="center">
  108. <template v-if="scope.row.expiry_date != 0" slot-scope="scope">
  109. {{ scope.row.expiry_date | parseTime("{y}-{m}-{d}") }}
  110. </template>
  111. </el-table-column>
  112. <el-table-column label="备注" min-width="20" align="center">
  113. <template slot-scope="scope">
  114. <el-popover placement="top-start" width="250" trigger="hover">
  115. <div>{{ scope.row.remark }}</div>
  116. <span slot="reference" v-if="scope.row.remark.length > 20">{{
  117. scope.row.remark.substr(0, 20) + "..."
  118. }}</span>
  119. <span slot="reference" v-else>{{ scope.row.remark }}</span>
  120. </el-popover>
  121. </template>
  122. </el-table-column>
  123. </el-table>
  124. </el-row>
  125. </div>
  126. </div>
  127. </template>
  128. <script>
  129. import { uParseTime } from "@/utils/tools";
  130. import {
  131. GetAllConfig,
  132. getDrugWarehouseInfoList,
  133. deleteDrugWarehouseInfo
  134. } from "@/api/drug/drug_stock";
  135. import BreadCrumb from "../../components/bread-crumb";
  136. export default {
  137. name: "stockInOrderDetail",
  138. components: { BreadCrumb },
  139. created() {
  140. const order_id = this.$route.query.id;
  141. this.GetOrderDetail(order_id);
  142. },
  143. data() {
  144. return {
  145. crumbs: [
  146. { path: false, name: "库存管理" },
  147. { path: false, name: "耗材入库单" },
  148. { path: false, name: "入库单详情" }
  149. ],
  150. crumbs2: [
  151. { path: false, name: "库存管理" },
  152. { path: false, name: "其他入库单" },
  153. { path: false, name: "入库单详情" }
  154. ],
  155. isEdit: 0,
  156. checked: false,
  157. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  158. goodType: [],
  159. goodInfo: [],
  160. manufacturer: [],
  161. dealer: [],
  162. Warehouse: {
  163. loading: false,
  164. warehouseDate: [],
  165. tableCurrentIndex: ""
  166. },
  167. WarehouseInfo: {
  168. loading: false,
  169. warehouseInfoDate: [],
  170. warehouse: {}
  171. }
  172. };
  173. },
  174. methods: {
  175. calculate: function(val) {
  176. if (val == 0) {
  177. return "";
  178. }
  179. return Math.round(parseFloat(val) * 100) / 100;
  180. },
  181. GetOrderDetail: function(order_id) {
  182. const params = {
  183. id: order_id
  184. };
  185. getDrugWarehouseInfoList(params).then(response => {
  186. if (response.data.state == 0) {
  187. this.$message.error(response.data.msg);
  188. return false;
  189. } else {
  190. for (let i = 0; i < response.data.data.info.length; i++) {
  191. this.WarehouseInfo.warehouseInfoDate.push(
  192. response.data.data.info[i]
  193. );
  194. }
  195. this.WarehouseInfo.warehouse = response.data.data.warehousing;
  196. }
  197. });
  198. },
  199. deleteRecord: function() {
  200. const ids = [];
  201. ids.push(this.WarehouseInfo.warehouse.id);
  202. const idStr = ids.join(",");
  203. const params = {
  204. ids: idStr
  205. };
  206. this.$confirm("确认删除入库单记录?", "删除入库单记录", {
  207. confirmButtonText: "确定",
  208. cancelButtonText: "取消",
  209. type: "warning"
  210. })
  211. .then(() => {
  212. deleteDrugWarehouseInfo(params).then(response => {
  213. if (response.data.state == 0) {
  214. this.$message.error(response.data.msg);
  215. return false;
  216. } else {
  217. this.$notify({
  218. title: "成功",
  219. message: "删除成功",
  220. type: "success",
  221. duration: 2000
  222. });
  223. this.$router.back(-1);
  224. }
  225. });
  226. })
  227. .catch(() => {});
  228. },
  229. editRecord: function() {
  230. this.$emit("edit-record");
  231. }
  232. }
  233. };
  234. </script>
  235. <style rel="stylesheet/css" lang="scss" scoped>
  236. .information {
  237. border: 1px #dcdfe6 solid;
  238. padding: 30px 20px 30px 20px;
  239. .border {
  240. border-bottom: 1px #dcdfe6 solid;
  241. margin: 0px 0 20px 0;
  242. }
  243. }
  244. .edit_separater {
  245. border-top: 1px solid rgb(233, 233, 233);
  246. margin-top: 15px;
  247. margin-bottom: 15px;
  248. }
  249. </style>
  250. <style>
  251. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  252. font-size: 12px;
  253. }
  254. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  255. background: #6fb5fa;
  256. }
  257. .count {
  258. color: #bd2c00;
  259. }
  260. </style>