Addtrans.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="primary" @click="save">保存</el-button>
  7. <el-button type="warning" @click="examine">审核</el-button>
  8. </div>
  9. </div>
  10. <div class="app-container">
  11. <div
  12. style="
  13. justify-content: flex-start;
  14. margin: 0px 0 12px 0;
  15. display: flex;
  16. align-items: center;
  17. "
  18. >
  19. <el-form
  20. :inline="true"
  21. :rules="rules"
  22. :model="formInline"
  23. class="demo-form-inline"
  24. >
  25. <el-form-item label="单据日期:">
  26. <el-date-picker
  27. v-model="value1"
  28. type="date"
  29. placeholder="选择日期"
  30. ></el-date-picker>
  31. </el-form-item>
  32. <el-form-item label="调出仓库:" prop="region">
  33. <el-select v-model="formInline.region" placeholder="活动区域">
  34. <el-option label="区域一" value="shanghai"></el-option>
  35. <el-option label="区域二" value="beijing"></el-option>
  36. </el-select>
  37. </el-form-item>
  38. <el-form-item label="调入仓库:" prop="region">
  39. <el-select v-model="formInline.region" placeholder="活动区域">
  40. <el-option label="区域一" value="shanghai"></el-option>
  41. <el-option label="区域二" value="beijing"></el-option>
  42. </el-select>
  43. </el-form-item>
  44. </el-form>
  45. </div>
  46. <el-table
  47. :row-style="changColor"
  48. :header-cell-style="{
  49. backgroundColor: 'rgb(245, 247, 250)',
  50. color: '#606266',
  51. }"
  52. :data="tableData"
  53. :class="signAndWeighBoxPatients"
  54. border
  55. >
  56. >
  57. <el-table-column label="单据编号" align="center">
  58. <template slot-scope="scope">
  59. <span>{{ scope.row.drug_name ? scope.row.drug_name : "" }}</span>
  60. </template>
  61. </el-table-column>
  62. <el-table-column align="center">
  63. <template slot="header" slot-scope="scope">
  64. 商品名称<span style="color:red;">*</span>
  65. </template>
  66. <template slot-scope="scope">
  67. <span>{{ scope.row.Count ? scope.row.Count : "" }}</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.outCount ? scope.row.outCount : "" }}</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-plus"
  105. size="small"
  106. type="primary"
  107. @click="toAdd(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. </template>
  121. </el-table-column>
  122. </el-table>
  123. <el-pagination
  124. @size-change="handleSizeChange"
  125. @current-change="handleCurrentChange"
  126. :page-sizes="[10, 50, 100, 200, 500, 1000]"
  127. :page-size="10"
  128. background
  129. align="right"
  130. style="margin-top: 20px"
  131. layout="total, sizes, prev, pager, next, jumper"
  132. :total="total"
  133. >
  134. </el-pagination>
  135. </div>
  136. </div>
  137. </template>
  138. <script>
  139. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  140. export default {
  141. components: {
  142. BreadCrumb,
  143. },
  144. data() {
  145. return {
  146. crumbs: [
  147. { path: false, name: "库房管理" },
  148. { path: "/stock/warehousequery", name: "新增调拨" },
  149. ],
  150. value1: "",
  151. total: 0,
  152. page: 1,
  153. limit: 10,
  154. tableData: [{}, {}],
  155. formInline: {
  156. user: "",
  157. region: "",
  158. },
  159. rules: {
  160. region: [
  161. { required: true, message: "请选择活动区域", trigger: "change" },
  162. ],
  163. },
  164. };
  165. },
  166. methods: {
  167. // 初始化数据
  168. init() {},
  169. // 反审核
  170. approval() {},
  171. // 审核
  172. examine() {},
  173. // 保存
  174. save() {},
  175. // 表单添加
  176. toAdd() {},
  177. // 删除
  178. toDelete() {},
  179. // 详情查看
  180. toDetails() {},
  181. // 表单全选
  182. handleSelectionChange() {},
  183. // 页表操作
  184. handleSizeChange(val) {
  185. this.limit = val;
  186. this.init();
  187. },
  188. handleCurrentChange(val) {
  189. this.page = val;
  190. this.init();
  191. },
  192. // 表格样式
  193. changColor({ rowIndex }) {
  194. if (rowIndex % 2 == 1) {
  195. return {
  196. backgroundColor: "#C4E1FF",
  197. color: "#303133",
  198. };
  199. } else {
  200. return {
  201. backgroundColor: "#ACD6FF",
  202. color: "#303133",
  203. };
  204. }
  205. },
  206. },
  207. };
  208. </script>
  209. <style rel="stylesheet/css" lang="scss" scoped>
  210. </style>