com-valet-order-goods.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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-valet-order-goods">
  45. <div class="com-valet-order-goods">
  46. <el-card class="edit-card" shadow="never">
  47. <el-form :model="valetOrderGoodsForm" size="small">
  48. <div>
  49. <el-form-item label="是否设为代购买商品" prop="status">
  50. <el-switch :active-value="1" :inactive-value="0" v-model="valetOrderGoodsForm.status"></el-switch>
  51. <p>代客下单应用没安装或基础设置关闭时则不显示,开启则显示</p>
  52. </el-form-item>
  53. </div>
  54. </el-form>
  55. </el-card>
  56. </div>
  57. </template>
  58. <script>
  59. Vue.component('com-valet-order-goods', {
  60. template: "#com-valet-order-goods",
  61. props: {
  62. goods_id: {
  63. type: Number | String,
  64. default: 0
  65. }
  66. },
  67. data() {
  68. return {
  69. loading: false,
  70. valetOrderGoodsForm: {
  71. status: 0,
  72. }
  73. }
  74. },
  75. mounted: function() {
  76. this.getData()
  77. },
  78. methods: {
  79. getData() {
  80. let _ = this
  81. request({
  82. params: {
  83. r: 'valet-order/goods/detail',
  84. goods_id: _.goods_id
  85. },
  86. method: 'get'
  87. }).then(function(e) {
  88. if (e.data.code == 0 && e.data.data) {
  89. _.valetOrderGoodsForm.status = e.data.data.status
  90. }
  91. }).catch(function(e) {
  92. });
  93. }
  94. },
  95. });
  96. </script>