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

cancelStockOrderDetail.vue 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb v-if="this.$route.query.type == 1" :crumbs='crumbs'></bread-crumb>
  5. <bread-crumb v-if="this.$route.query.type == 2" :crumbs='crumbs2'></bread-crumb>
  6. </div>
  7. <div class="app-container">
  8. <div class="filter-container">
  9. <span style="font-size: 20px;color: #606266">退库单详情</span>
  10. <el-row style="float:right;">
  11. <span style="color: #606266">{{CancelStockInfo.cancelStock.order_number}}</span>
  12. </el-row>
  13. </div>
  14. <div class="cell clearfix">
  15. <span style="width: 300px;color: #606266">单据日期: {{CancelStockInfo.cancelStock.return_time | parseTime('{y}-{m}-{d}')}} </span>
  16. <span style="width: 300px;color: #606266">厂商 {{getManufactuerName(CancelStockInfo.cancelStock.manufacturer)}}</span>
  17. <span style="width: 300px;color: #606266">经销商 {{getDealerName(CancelStockInfo.cancelStock.dealer)}}</span>
  18. </div>
  19. <div class="filter-container" style="margin-top: 10px">
  20. <el-button size="small" icon="el-icon-edit" @click="editRecord">编辑</el-button>
  21. <el-button size="small" icon="el-icon-delete" @click="deleteRecord">删除</el-button>
  22. </div>
  23. <el-row :gutter="12" style="margin-top: 10px">
  24. <el-table :data="CancelStockInfo.cancelStockInfoData" :class="signAndWeighBoxPatients" style="width: 100%" border
  25. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)'}"
  26. >
  27. <el-table-column min-width="35" align="center">
  28. <template slot="header" slot-scope="scope">
  29. <span>商品类型</span>
  30. </template>
  31. <template slot-scope="scope">
  32. <span v-if="scope.row.good_type_id != 0">{{getTypeName(scope.row.good_type_id)}}</span>
  33. </template>
  34. </el-table-column>
  35. <el-table-column min-width="35" align="center">
  36. <template slot="header" slot-scope="scope">
  37. <span>规格名称</span>
  38. </template>
  39. <template slot-scope="scope">
  40. <span v-if="scope.row.good_id != 0">{{getSpecificationName(scope.row.good_id)}}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column min-width="23" align="center">
  44. <template slot="header" slot-scope="scope">
  45. <span>退库数量</span>
  46. </template>
  47. <template slot-scope="scope">
  48. <span>{{scope.row.count}}</span>
  49. </template>
  50. </el-table-column>
  51. </el-table>
  52. </el-row>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. import { uParseTime } from '@/utils/tools'
  58. import { GetAllConfig, getCancelStockInfo, deleteCancelStock } from '@/api/stock'
  59. import BreadCrumb from '../components/bread-crumb'
  60. export default {
  61. name: 'cancelStockOrderDetail',
  62. components: { BreadCrumb },
  63. created() {
  64. const order_id = this.$route.query.id
  65. this.GetConfigInfo()
  66. this.GetOrderDetail(order_id)
  67. },
  68. data() {
  69. return {
  70. crumbs: [
  71. { path: false, name: '库存管理' },
  72. { path: false, name: '耗材退库单' },
  73. { path: false, name: '退库单详情' }
  74. ],
  75. crumbs2: [
  76. { path: false, name: '库存管理' },
  77. { path: false, name: '其他退库单' },
  78. { path: false, name: '退库单详情' }
  79. ],
  80. isEdit: 0,
  81. checked: false,
  82. signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
  83. goodType: [],
  84. goodInfo: [],
  85. manufacturer: [],
  86. dealer: [],
  87. CancelStockInfo: {
  88. loading: false,
  89. cancelStockInfoData: [],
  90. cancelStock: {}
  91. }
  92. }
  93. },
  94. methods: {
  95. getSpecificationName: function(id) {
  96. let name = ''
  97. for (let i = 0; i < this.goodInfo.length; i++) {
  98. if (this.goodInfo[i].id == id) {
  99. name = this.goodInfo[i].specification_name
  100. }
  101. }
  102. return name
  103. }, getTypeName: function(id) {
  104. let name = ''
  105. for (let i = 0; i < this.goodType.length; i++) {
  106. if (this.goodType[i].id == id) {
  107. name = this.goodType[i].type_name
  108. }
  109. }
  110. return name
  111. }, GetConfigInfo: function() {
  112. GetAllConfig().then(response => {
  113. if (response.data.state == 0) {
  114. this.$message.error(response.data.msg)
  115. return false
  116. } else {
  117. this.manufacturer = response.data.data.manufacturer
  118. this.dealer = response.data.data.dealer
  119. this.goodInfo = response.data.data.goodInfo
  120. this.goodType = response.data.data.goodType
  121. }
  122. })
  123. }, getManufactuerName: function(manufacturer_id) {
  124. for (let i = 0; i < this.manufacturer.length; i++) {
  125. if (this.manufacturer[i].id == manufacturer_id) {
  126. return this.manufacturer[i].manufacturer_name
  127. }
  128. }
  129. }, getDealerName: function(dealer_id) {
  130. for (let i = 0; i < this.dealer.length; i++) {
  131. if (this.dealer[i].id == dealer_id) {
  132. return this.dealer[i].dealer_name
  133. }
  134. }
  135. }, calculate: function(val) {
  136. if (val == 0) {
  137. return ''
  138. }
  139. return Math.round(parseFloat(val) * 100) / 100
  140. }, GetOrderDetail: function(order_id) {
  141. const params = {
  142. 'id': order_id
  143. }
  144. getCancelStockInfo(params).then(response => {
  145. if (response.data.state == 0) {
  146. this.$message.error(response.data.msg)
  147. return false
  148. } else {
  149. for (let i = 0; i < response.data.data.list.length; i++) {
  150. this.CancelStockInfo.cancelStockInfoData.push(response.data.data.list[i])
  151. }
  152. this.CancelStockInfo.cancelStock = response.data.data.info
  153. }
  154. })
  155. }, deleteRecord: function() {
  156. const ids = []
  157. ids.push(this.CancelStockInfo.cancelStock.id)
  158. const idStr = ids.join(',')
  159. const params = {
  160. ids: idStr
  161. }
  162. this.$confirm('确认删除退货单?', '删除退货单记录', {
  163. confirmButtonText: '确定',
  164. cancelButtonText: '取消',
  165. type: 'warning'
  166. }).then(() => {
  167. deleteCancelStock(params).then(response => {
  168. if (response.data.state == 0) {
  169. this.$message.error(response.data.msg)
  170. return false
  171. } else {
  172. this.$notify({
  173. title: '成功',
  174. message: '删除成功',
  175. type: 'success',
  176. duration: 2000
  177. })
  178. this.$router.back(-1)
  179. }
  180. })
  181. }).catch(() => {
  182. })
  183. },
  184. editRecord: function() {
  185. this.$emit('edit-record')
  186. }
  187. }
  188. }
  189. </script>
  190. <style rel="stylesheet/css" lang="scss" scoped>
  191. .information {
  192. border: 1px #dcdfe6 solid;
  193. padding: 30px 20px 30px 20px;
  194. .border {
  195. border-bottom: 1px #dcdfe6 solid;
  196. margin: 0px 0 20px 0;
  197. }
  198. }
  199. .edit_separater {
  200. border-top: 1px solid rgb(233, 233, 233);
  201. margin-top: 15px;
  202. margin-bottom: 15px;
  203. }
  204. </style>
  205. <style>
  206. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  207. font-size: 12px;
  208. }
  209. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  210. background: #6fb5fa;
  211. }
  212. .count {
  213. color: #bd2c00;
  214. }
  215. </style>