com-reservation-service-goods.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. ?>
  3. <style>
  4. .flexcenter {
  5. display: flex;
  6. justify-content: center;
  7. }
  8. .el-checkbox-list {
  9. margin: 0 0 20px;
  10. display: block;
  11. }
  12. .el-card-style {
  13. max-height: 400px;
  14. overflow-y: auto;
  15. /* margin-right: 20px; */
  16. }
  17. .span-none-style {
  18. display: none;
  19. }
  20. .div-header-style {
  21. font-size: 14px;
  22. margin-left: 6px;
  23. margin-bottom: 20px;
  24. }
  25. input.el-input__inner {
  26. height: 32px;
  27. line-height: 32px;
  28. font-size: 13px;
  29. }
  30. .el-table .warning-row {
  31. background: oldlace;
  32. }
  33. .el-table .success-row {
  34. background: #f0f9eb;
  35. }
  36. .el-table-column--selection .cell {
  37. padding-left: 10px;
  38. }
  39. .zsan-padding-style {
  40. padding: 10px 0;
  41. margin: 0;
  42. }
  43. </style>
  44. <template id="com-reservation-service-goods">
  45. <div class="com-reservation-service-goods">
  46. <el-card class="edit-card" shadow="never">
  47. <el-form :model="reservationServiceGoodsForm" size="small">
  48. <div>
  49. <el-form-item label="启用设置" prop="status">
  50. <el-switch :active-value="1" :inactive-value="0" v-model="reservationServiceGoodsForm.status"></el-switch>
  51. </el-form-item>
  52. <el-form-item label="可进行" prop="status">
  53. <el-checkbox :true-label="1" :false-label="0" v-model="reservationServiceGoodsForm.to">上门</el-checkbox>
  54. <el-checkbox :true-label="1" :false-label="0" v-model="reservationServiceGoodsForm.from">到店</el-checkbox>
  55. </el-form-item>
  56. </div>
  57. </el-form>
  58. </el-card>
  59. </div>
  60. </template>
  61. <script>
  62. Vue.component('com-reservation-service-goods', {
  63. template: "#com-reservation-service-goods",
  64. props: {
  65. goods_id: {
  66. type: Number | String,
  67. default: 0
  68. }
  69. },
  70. data() {
  71. return {
  72. loading: false,
  73. reservationServiceGoodsForm: {
  74. status: 0,
  75. to: 0,
  76. from: 0
  77. }
  78. }
  79. },
  80. mounted: function() {
  81. this.getData()
  82. },
  83. methods: {
  84. getData() {
  85. let _ = this
  86. request({
  87. params: {
  88. r: 'reservation-service/goods/detail',
  89. goods_id: _.goods_id
  90. },
  91. method: 'get'
  92. }).then(function(e) {
  93. if (e.data.code == 0 && e.data.data) {
  94. _.reservationServiceGoodsForm.status = e.data.data.status
  95. _.reservationServiceGoodsForm.to = e.data.data.to
  96. _.reservationServiceGoodsForm.from = e.data.data.from
  97. }
  98. }).catch(function(e) {
  99. });
  100. }
  101. },
  102. });
  103. </script>