index.vue 6.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <div>
  6. <el-button type="warning" @click="approval">反审核</el-button>
  7. <el-button type="warning" @click="examine">审核</el-button>
  8. <el-button type="primary" @click="Add">新增</el-button>
  9. </div>
  10. </div>
  11. <div class="app-container">
  12. <div
  13. style="
  14. justify-content: flex-start;
  15. margin: 0px 0 12px 0;
  16. display: flex;
  17. align-items: center;
  18. "
  19. >
  20. <div>
  21. <el-input
  22. size="small"
  23. style="width: 200px; margin-left: 10px"
  24. class="filter-item"
  25. v-model.trim="keywords"
  26. />
  27. <el-button
  28. size="small"
  29. class="filter-item"
  30. type="primary"
  31. icon="el-icon-search"
  32. @click="search"
  33. >查看</el-button
  34. >
  35. </div>
  36. <div>
  37. 单据日期:
  38. <el-date-picker v-model="value1" type="date" placeholder="选择日期">
  39. </el-date-picker>
  40. <el-button
  41. size="small"
  42. class="filter-item"
  43. type="primary"
  44. icon="el-icon-search"
  45. @click="search"
  46. >查看</el-button
  47. >
  48. </div>
  49. </div>
  50. <el-table
  51. :header-cell-style="{
  52. backgroundColor: 'rgb(245, 247, 250)',
  53. color: '#606266',
  54. }"
  55. :data="tableData"
  56. border
  57. @selection-change="handleSelectionChange"
  58. >
  59. <el-table-column type="selection" width="55"> </el-table-column>
  60. <el-table-column label="单据编号" align="center">
  61. <template slot-scope="scope">
  62. <span>{{ scope.row.drug_name ? scope.row.drug_name : "" }}</span>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="单据日期" align="center">
  66. <template slot-scope="scope">
  67. <span>{{ scope.row.drug_spec ? scope.row.drug_spec : "" }}</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="商品名称" align="center">
  71. <template slot-scope="scope">
  72. <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
  73. </template>
  74. </el-table-column>
  75. <el-table-column label="调出仓库" align="center">
  76. <template slot-scope="scope">
  77. <span>{{ scope.row.Count ? scope.row.Count : "" }}</span>
  78. </template>
  79. </el-table-column>
  80. <el-table-column label="调入仓库" align="center">
  81. <template slot-scope="scope">
  82. <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="制单人" align="center">
  86. <template slot-scope="scope">
  87. <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="审核人" align="center">
  91. <template slot-scope="scope">
  92. <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
  93. </template>
  94. </el-table-column>
  95. <el-table-column label="审核时间" align="center">
  96. <template slot-scope="scope">
  97. <span>{{ scope.row.outCount ? scope.row.outCount : "" }}</span>
  98. </template>
  99. </el-table-column>
  100. <el-table-column label="操作" align="center" width="260px">
  101. <template slot-scope="scope">
  102. <el-tooltip class="item" content="编辑" placement="top-start">
  103. <el-button
  104. icon="el-icon-edit-outline"
  105. size="small"
  106. type="primary"
  107. @click="toEdit(scope.row)"
  108. >
  109. </el-button>
  110. </el-tooltip>
  111. <el-tooltip class="item" content="删除" placement="top-start">
  112. <el-button
  113. icon="el-icon-delete"
  114. size="small"
  115. type="danger"
  116. @click="toDelete(scope.row, scope.row.$index)"
  117. >
  118. </el-button>
  119. </el-tooltip>
  120. <el-tooltip class="item" content="详情" placement="top-start">
  121. <el-button
  122. icon="el-icon-view"
  123. size="small"
  124. type="primary"
  125. @click="toDetails(scope.row, scope.row.$index)"
  126. >
  127. </el-button>
  128. </el-tooltip>
  129. </template>
  130. </el-table-column>
  131. </el-table>
  132. <el-pagination
  133. @size-change="handleSizeChange"
  134. @current-change="handleCurrentChange"
  135. :page-sizes="[10, 50, 100, 200, 500, 1000]"
  136. :page-size="10"
  137. background
  138. align="right"
  139. style="margin-top: 20px"
  140. layout="total, sizes, prev, pager, next, jumper"
  141. :total="total"
  142. >
  143. </el-pagination>
  144. </div>
  145. </div>
  146. </template>
  147. <script>
  148. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  149. export default {
  150. components: {
  151. BreadCrumb,
  152. },
  153. data() {
  154. return {
  155. crumbs: [
  156. { path: false, name: "库房管理" },
  157. { path: "/stock/warehousequery", name: "库存调拨" },
  158. ],
  159. value1: "",
  160. total: 0,
  161. page: 1,
  162. limit: 10,
  163. tableData: [{}, {}],
  164. };
  165. },
  166. methods: {
  167. // 初始化数据
  168. init() {},
  169. // 反审核
  170. approval() {},
  171. // 审核
  172. examine() {},
  173. // 添加
  174. Add() {
  175. this.$router.push({path:"/stock/inventoryTransfer/Addtrans"})
  176. },
  177. // 删除
  178. toDelete() {},
  179. // 详情查看
  180. toDetails() {
  181. this.$router.push({path:"/stock/inventoryTransfer/transDetails"})
  182. },
  183. // 表单全选
  184. handleSelectionChange() {},
  185. // 页表操作
  186. handleSizeChange(val) {
  187. this.limit = val;
  188. this.init();
  189. },
  190. handleCurrentChange(val) {
  191. this.page = val;
  192. this.init();
  193. },
  194. // 表格样式
  195. changColor({ rowIndex }) {
  196. if (rowIndex % 2 == 1) {
  197. return {
  198. backgroundColor: "#C4E1FF",
  199. color: "#303133",
  200. };
  201. } else {
  202. return {
  203. backgroundColor: "#ACD6FF",
  204. color: "#303133",
  205. };
  206. }
  207. },
  208. },
  209. };
  210. </script>
  211. <style rel="stylesheet/css" lang="scss" scoped>
  212. </style>