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

stockInOrderDetail.vue 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  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">入库单号: {{ WarehouseInfo.warehouse.warehousing_order }}</span>
  18. </el-row>
  19. </div>
  20. <div class="cell clearfix">
  21. <span style="width: 300px;color: #606266"
  22. >单据日期:
  23. {{
  24. WarehouseInfo.warehouse.warehousing_time | parseTime("{y}-{m}-{d}")
  25. }}</span
  26. >
  27. <span style="width: 300px;color: #606266"
  28. >厂商:
  29. {{ getManufactuerName(WarehouseInfo.warehouse.manufacturer) }}</span
  30. >
  31. <span style="width: 300px;color: #606266"
  32. >经销商: {{ getDealerName(WarehouseInfo.warehouse.dealer) }}</span
  33. >
  34. </div>
  35. <div style="display:flex;justify-content: space-between;align-items: center;margin: 12px 0;">
  36. <div>
  37. <el-button size="small" icon="el-icon-edit" @click="editRecord"
  38. >编辑</el-button
  39. >
  40. <el-button size="small" icon="el-icon-delete" @click="deleteRecord"
  41. >删除</el-button
  42. >
  43. </div>
  44. <el-button size="small" type="primary" @click="printOrder">打印</el-button>
  45. </div>
  46. <el-row :gutter="12" style="margin-top: 10px">
  47. <el-table
  48. :data="WarehouseInfo.warehouseInfoDate"
  49. :class="signAndWeighBoxPatients"
  50. style="width: 100%"
  51. border
  52. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  53. >
  54. <el-table-column min-width="35" align="center">
  55. <template slot="header" slot-scope="scope">
  56. <span>耗材类型</span>
  57. </template>
  58. <template slot-scope="scope">
  59. <span v-if="scope.row.good_type_id != 0">{{
  60. getTypeName(scope.row.good_type_id)
  61. }}</span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column>
  65. <template slot="header" slot-scope="scope">
  66. <span>耗材名称</span>
  67. </template>
  68. <template slot-scope="scope">
  69. <span v-if="scope.row.good_id != 0">{{
  70. getTypeNameOne(scope.row.good_id)
  71. }}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column min-width="35" align="center">
  75. <template slot="header" slot-scope="scope">
  76. <span>规格型号</span>
  77. </template>
  78. <template slot-scope="scope">
  79. <span v-if="scope.row.good_id != 0">{{
  80. getSpecificationName(scope.row.good_id)
  81. }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column min-width="23" align="center">
  85. <template slot="header" slot-scope="scope">
  86. <span>进货价</span>
  87. </template>
  88. <template slot-scope="scope">
  89. <span>{{ scope.row.price }}</span>
  90. </template>
  91. </el-table-column>
  92. <el-table-column min-width="23" align="center">
  93. <template slot="header" slot-scope="scope">
  94. <span>入库数量</span>
  95. </template>
  96. <template slot-scope="scope">
  97. <span>{{ scope.row.warehousing_count }}</span>
  98. </template>
  99. </el-table-column>
  100. <el-table-column label="总价" min-width="20" align="center">
  101. <template slot-scope="scope">
  102. {{ calculate(scope.row.price * scope.row.warehousing_count) }}
  103. </template>
  104. </el-table-column>
  105. <el-table-column align="center" min-width="25">
  106. <template slot="header" slot-scope="scope">
  107. <span>批号</span>
  108. </template>
  109. <template slot-scope="scope">
  110. <span>{{ scope.row.number }}</span>
  111. </template>
  112. </el-table-column>
  113. <el-table-column label="生产日期" min-width="40" align="center">
  114. <template v-if="scope.row.product_date != 0" slot-scope="scope">
  115. {{ scope.row.product_date | parseTime("{y}-{m}-{d}") }}
  116. </template>
  117. </el-table-column>
  118. <el-table-column label="有效日期" min-width="40" align="center">
  119. <template v-if="scope.row.expiry_date != 0" slot-scope="scope">
  120. {{ scope.row.expiry_date | parseTime("{y}-{m}-{d}") }}
  121. </template>
  122. </el-table-column>
  123. <el-table-column label="备注" min-width="20" align="center">
  124. <template slot-scope="scope">
  125. <el-popover placement="top-start" width="250" trigger="hover">
  126. <div>{{ scope.row.remark }}</div>
  127. <span slot="reference" v-if="scope.row.remark.length > 20">{{
  128. scope.row.remark.substr(0, 20) + "..."
  129. }}</span>
  130. <span slot="reference" v-else>{{ scope.row.remark }}</span>
  131. </el-popover>
  132. </template>
  133. </el-table-column>
  134. </el-table>
  135. </el-row>
  136. </div>
  137. </div>
  138. </template>
  139. <script>
  140. import { uParseTime } from "@/utils/tools";
  141. import {
  142. GetAllConfig,
  143. getWarehouseInfoList,
  144. deleteWarehouseInfo
  145. } from "@/api/stock";
  146. import BreadCrumb from "../components/bread-crumb";
  147. export default {
  148. name: "stockInOrderDetail",
  149. components: { BreadCrumb },
  150. created() {
  151. const order_id = this.$route.query.id;
  152. this.GetConfigInfo();
  153. this.GetOrderDetail(order_id);
  154. },
  155. data() {
  156. return {
  157. crumbs: [
  158. { path: false, name: "库存管理" },
  159. { path: false, name: "耗材入库单" },
  160. { path: false, name: "入库单详情" }
  161. ],
  162. crumbs2: [
  163. { path: false, name: "库存管理" },
  164. { path: false, name: "其他入库单" },
  165. { path: false, name: "入库单详情" }
  166. ],
  167. isEdit: 0,
  168. checked: false,
  169. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  170. goodType: [],
  171. goodInfo: [],
  172. manufacturer: [],
  173. dealer: [],
  174. Warehouse: {
  175. loading: false,
  176. warehouseDate: [],
  177. tableCurrentIndex: ""
  178. },
  179. WarehouseInfo: {
  180. loading: false,
  181. warehouseInfoDate: [],
  182. warehouse: {}
  183. }
  184. };
  185. },
  186. methods: {
  187. getSpecificationName: function(id) {
  188. let name = "";
  189. for (let i = 0; i < this.goodInfo.length; i++) {
  190. if (this.goodInfo[i].id == id) {
  191. name = this.goodInfo[i].specification_name;
  192. }
  193. }
  194. return name;
  195. },
  196. getTypeName: function(id) {
  197. let name = "";
  198. for (let i = 0; i < this.goodType.length; i++) {
  199. if (this.goodType[i].id == id) {
  200. name = this.goodType[i].type_name;
  201. }
  202. }
  203. return name;
  204. },
  205. getTypeNameOne:function(id){
  206. let name = "";
  207. for (let i = 0; i < this.goodInfo.length; i++) {
  208. if (this.goodInfo[i].id == id) {
  209. name = this.goodInfo[i].good_name;
  210. }
  211. }
  212. return name;
  213. },
  214. GetConfigInfo: function() {
  215. GetAllConfig().then(response => {
  216. if (response.data.state == 0) {
  217. this.$message.error(response.data.msg);
  218. return false;
  219. } else {
  220. this.manufacturer = response.data.data.manufacturer;
  221. this.dealer = response.data.data.dealer;
  222. this.goodInfo = response.data.data.goodInfo;
  223. this.goodType = response.data.data.goodType;
  224. }
  225. });
  226. },
  227. getManufactuerName: function(manufacturer_id) {
  228. for (let i = 0; i < this.manufacturer.length; i++) {
  229. if (this.manufacturer[i].id == manufacturer_id) {
  230. return this.manufacturer[i].manufacturer_name;
  231. }
  232. }
  233. },
  234. getDealerName: function(dealer_id) {
  235. for (let i = 0; i < this.dealer.length; i++) {
  236. if (this.dealer[i].id == dealer_id) {
  237. return this.dealer[i].dealer_name;
  238. }
  239. }
  240. },
  241. calculate: function(val) {
  242. if (val == 0) {
  243. return "";
  244. }
  245. return Math.round(parseFloat(val) * 100) / 100;
  246. },
  247. GetOrderDetail: function(order_id) {
  248. const params = {
  249. id: order_id
  250. };
  251. getWarehouseInfoList(params).then(response => {
  252. if (response.data.state == 0) {
  253. this.$message.error(response.data.msg);
  254. return false;
  255. } else {
  256. for (let i = 0; i < response.data.data.info.length; i++) {
  257. this.WarehouseInfo.warehouseInfoDate.push(
  258. response.data.data.info[i]
  259. );
  260. }
  261. this.WarehouseInfo.warehouse = response.data.data.warehousing;
  262. }
  263. });
  264. },
  265. deleteRecord: function() {
  266. const ids = [];
  267. ids.push(this.WarehouseInfo.warehouse.id);
  268. const idStr = ids.join(",");
  269. const params = {
  270. ids: idStr
  271. };
  272. this.$confirm("确认删除入库单记录?", "删除入库单记录", {
  273. confirmButtonText: "确定",
  274. cancelButtonText: "取消",
  275. type: "warning"
  276. })
  277. .then(() => {
  278. deleteWarehouseInfo(params).then(response => {
  279. if (response.data.state == 0) {
  280. this.$message.error(response.data.msg);
  281. return false;
  282. } else {
  283. this.$notify({
  284. title: "成功",
  285. message: "删除成功",
  286. type: "success",
  287. duration: 2000
  288. });
  289. this.$router.back(-1);
  290. }
  291. });
  292. })
  293. .catch(() => {});
  294. },
  295. editRecord: function() {
  296. this.$emit("edit-record");
  297. },
  298. printOrder(){
  299. this.$router.push({
  300. name: "stockInDetailPrint",
  301. query: { id: this.$route.query.id }
  302. });
  303. }
  304. }
  305. };
  306. </script>
  307. <style rel="stylesheet/css" lang="scss" scoped>
  308. .information {
  309. border: 1px #dcdfe6 solid;
  310. padding: 30px 20px 30px 20px;
  311. .border {
  312. border-bottom: 1px #dcdfe6 solid;
  313. margin: 0px 0 20px 0;
  314. }
  315. }
  316. .edit_separater {
  317. border-top: 1px solid rgb(233, 233, 233);
  318. margin-top: 15px;
  319. margin-bottom: 15px;
  320. }
  321. </style>
  322. <style>
  323. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  324. font-size: 12px;
  325. }
  326. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  327. background: #6fb5fa;
  328. }
  329. .count {
  330. color: #bd2c00;
  331. }
  332. </style>