Bläddra i källkod

管理后台-退款、座位模板

panyong 3 år sedan
förälder
incheckning
4af093eead

+ 1 - 5
htmldev/manage/README.md

@@ -207,10 +207,6 @@ yarn build
 ```
 
 ### todo list
-- [ ] 订单详情,退款:加金额输入框
-- [ ] 订单详情页 - 退款 - 商品列表固定顶部栏
-- [ ] 座位模板 增加类型:固定座、临时桌,固定座对外开放预订,临时桌子不开放预定
 - [ ] 商品管理 增加选项:是否支持存酒
 - [ ] 商品附加管理:附加名称切换时,值清空(顺便检查下商品添加页)
-- [ ] 存酒管理:商品名称改成支持模糊搜索
-- [ ] 新增app下载页:H5
+- [ ] 存酒管理:商品名称改成支持模糊搜索

+ 31 - 3
htmldev/manage/src/views/business/oms/detail/index.vue

@@ -117,17 +117,29 @@
         :model="form"
         class="mt-10">
         <el-form-item label="退款类型:">
-          <el-select v-model="form.refund_type" @change="handleChange">
+          <el-select
+            v-model="form.refund_type"
+            @change="handleChange"
+            style="width: 60%;">
             <el-option label="部分退款" :value="1"></el-option>
             <el-option label="整单退款" :value="0"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="退款金额:">
+          <el-input
+            v-model="form.refund_price"
+            @input="form.refund_price=form.refund_price.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')"
+            placeholder="请输入退款金额"
+            clearable
+            style="width: 60%;"></el-input>
+        </el-form-item>
         <el-form-item label="退款商品选择:" v-show="form.refund_type === 1">
           <el-table
             ref="multipleTable"
             :data="order.products"
             tooltip-effect="dark"
             style="width: 100%"
+            height="300"
             @selection-change="handleSelectionChange">
             <el-table-column type="selection" width="55"></el-table-column>
             <el-table-column label="商品名称" prop="product_name"></el-table-column>
@@ -138,6 +150,13 @@
             <el-table-column label="退款金额(元)" prop="product_refund_price"></el-table-column>
           </el-table>
         </el-form-item>
+        <el-form-item label="退款备注:">
+          <el-input
+            type="textarea"
+            v-model="form.refund_remark"
+            placeholder="请输入退款备注"
+            rows="6" style="width: 60%;"></el-input>
+        </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button @click="refundDialogVisible = false">取 消</el-button>
@@ -147,6 +166,8 @@
   </div>
 </template>
 <script>
+import { yuan2Fen } from '@/utils'
+
 export default {
   name: 'orderDetail',
   data () {
@@ -157,7 +178,9 @@ export default {
       refundDialogVisible: false,
       form: {
         refund_type: 0,
-        product_ids: []
+        refund_price: '',
+        product_ids: [],
+        refund_remark: ''
       },
       booLock: false
     }
@@ -184,10 +207,15 @@ export default {
     // 退款
     async funRefund () {
       this.booLock = true
+      let product_ids = this.order.products.map(item => item.id)
+      if (this.form.refund_type) {
+        product_ids = this.form.product_ids.map(item => item.id)
+      }
       const { code } = await this.$fetch('/v1/user/order/refund', {
         id: this.$route.query.id,
         ...this.form,
-        product_ids: this.form.product_ids.map(item => item.id)
+        product_ids,
+        refund_price: yuan2Fen(this.form.refund_price)
       })
       this.booLock = false
       if (code === 200) {

+ 9 - 0
htmldev/manage/src/views/business/place/list/details.vue

@@ -25,6 +25,14 @@
                     v-model="form.place_desc">
           </el-input>
         </el-form-item>
+
+        <el-form-item label="座位类型:" required>
+          <el-select v-model="form.place_type">
+            <el-option label="临时" :value="1"></el-option>
+            <el-option label="正常" :value="0"></el-option>
+          </el-select>
+        </el-form-item>
+
         <el-form-item prop="place_user_max"
                       :rules="formRules.InterNum"
                       label="单桌人数:">
@@ -104,6 +112,7 @@ export default {
       form: {
         place_name: '', // 座位名称
         place_desc: '', // 座位描述
+        place_type: 0,
         place_user_max: '', // 最多到店人数
         place_price: '', // 座位价格(单位为分)
         place_latest_time: '', // 最晚到店时间

+ 5 - 0
htmldev/manage/src/views/business/place/list/index.vue

@@ -28,6 +28,11 @@
       <el-table-column label="ID" prop="id"></el-table-column>
       <el-table-column label="座位名称" prop="place_name" width="240"></el-table-column>
       <el-table-column label="座位说明" prop="place_desc"></el-table-column>
+      <el-table-column label="座位类型">
+        <template slot-scope="scope">
+          <p>{{ ['正常', '临时'][scope.row.place_type] }}</p>
+        </template>
+      </el-table-column>
       <el-table-column label="座位数量" prop="place_num"></el-table-column>
       <el-table-column label="单桌人数" prop="place_user_max"></el-table-column>
       <el-table-column label="单价(元)">