Переглянути джерело

修改连接地址 处理部分bug

yuhongqi 3 тижнів тому
батько
коміт
9aa1f67867

+ 1 - 1
.env.development

@@ -16,4 +16,4 @@ VUE_APP_VIDEO_LINE_1 = https://cos.his.cdwjyyh.com
 # 线路二地址
 VUE_APP_VIDEO_LINE_2 = https://zkzhobs.ylrztop.com
 
-VUE_APP_LIVE_WS_URL = wss://api.fhhx.runtzh.com
+VUE_APP_LIVE_WS_URL = wss://api.fhhx.runtzh.com/ws

+ 77 - 0
src/api/live/liveAfterSales.js

@@ -0,0 +1,77 @@
+import request from '@/utils/request'
+
+// 查询售后记录列表
+export function listLiveAfterSales(query) {
+  return request({
+    url: '/live/liveAfterSales/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询售后记录详细
+export function getLiveAfterSales(id) {
+  return request({
+    url: '/live/liveAfterSales/' + id,
+    method: 'get'
+  })
+}
+
+// 新增售后记录
+export function addLiveAfterSales(data) {
+  return request({
+    url: '/live/liveAfterSales',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改售后记录
+export function updateLiveAfterSales(data) {
+  return request({
+    url: '/live/liveAfterSales',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除售后记录
+export function delLiveAfterSales(id) {
+  return request({
+    url: '/live/liveAfterSales/' + id,
+    method: 'delete'
+  })
+}
+
+// 导出售后记录
+export function exportLiveAfterSales(query) {
+  return request({
+    url: '/live/liveAfterSales/export',
+    method: 'get',
+    params: query
+  })
+}
+
+export function cancel(data) {
+  return request({
+    url: '/live/liveAfterSales/cancel',
+    method: 'post',
+    data: data
+  })
+}
+
+export function refund(data) {
+  return request({
+    url: '/live/liveAfterSales/refund',
+    method: 'post',
+    data: data
+  })
+}
+
+export function audit(data) {
+  return request({
+    url: '/live/liveAfterSales/audit',
+    method: 'post',
+    data: data
+  })
+}

+ 0 - 53
src/api/live/liveAfteraSales.js

@@ -1,53 +0,0 @@
-import request from '@/utils/request'
-
-// 查询售后记录列表
-export function listLiveAfteraSales(query) {
-  return request({
-    url: '/live/liveAfteraSales/list',
-    method: 'get',
-    params: query
-  })
-}
-
-// 查询售后记录详细
-export function getLiveAfteraSales(id) {
-  return request({
-    url: '/live/liveAfteraSales/' + id,
-    method: 'get'
-  })
-}
-
-// 新增售后记录
-export function addLiveAfteraSales(data) {
-  return request({
-    url: '/live/liveAfteraSales',
-    method: 'post',
-    data: data
-  })
-}
-
-// 修改售后记录
-export function updateLiveAfteraSales(data) {
-  return request({
-    url: '/live/liveAfteraSales',
-    method: 'put',
-    data: data
-  })
-}
-
-// 删除售后记录
-export function delLiveAfteraSales(id) {
-  return request({
-    url: '/live/liveAfteraSales/' + id,
-    method: 'delete'
-  })
-}
-
-// 导出售后记录
-export function exportLiveAfteraSales(query) {
-  return request({
-    url: '/live/liveAfteraSales/export',
-    method: 'get',
-    params: query
-  })
-}

+ 398 - 0
src/views/live/components/productAfterSalesOrder.vue

@@ -0,0 +1,398 @@
+<template>
+  <div class="order-content">
+      <div class="order-status" v-if="afterSales!=null" >
+          <el-steps :active="afterSales.status==4?afterSales.status+1:afterSales.status" align-center>
+            <el-step title="待审核(24小时自动审核)"></el-step>
+            <el-step title="平台已审核等待用户发货"></el-step>
+            <el-step title="用户已发货待仓库审核"></el-step>
+            <el-step title="财务审核"></el-step>
+            <el-step title="退款成功"></el-step>
+          </el-steps>
+      </div>
+      <div v-if="afterSales!=null">
+      <el-card shadow="never"  style="margin-top: 15px">
+        <div class="operate-container">
+          <span style="margin-left: 20px" class="color-danger">售后状态:
+            <el-tag prop="status" v-for="(item, index) in salesStatusOptions"    v-if="afterSales.salesStatus==item.dictValue">{{item.dictLabel}}</el-tag>
+          </span>
+          <div class="operate-button-container"  >
+            <el-button size="mini" v-hasPermi="['store:storeAfterSales:edit']" v-show="afterSales.salesStatus==0&&afterSales.status===1"  @click="addDelivery">编辑物流</el-button>
+            <el-button size="mini"  @click="showOrder">查看订单</el-button>
+         </div>
+        </div>
+        <div style="margin: 20px 0px">
+          <span class="font-small">基本信息</span>
+        </div>
+        <el-descriptions :column="4" border  >
+            <el-descriptions-item label="订单单号"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.orderCode}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="会员"  >
+                <span v-if="user!=null">
+                  {{user.nickname}}({{user.phone}})
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="退款金额"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.refundAmount}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="申请类型"  >
+                <span v-if="afterSales!=null">
+                  <el-tag prop="serviceType" v-for="(item, index) in serviceTypeOptions"    v-if="afterSales.serviceType==item.dictValue">{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="申请原因"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.reasons}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="说明"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.explains}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="状态"  >
+                <span v-if="afterSales!=null">
+                  <el-tag   v-for="(item, index) in statusOptions"    v-if="afterSales.status==item.dictValue" >{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="售后状态"  >
+                <span v-if="afterSales!=null">
+                  <el-tag  v-for="(item, index) in salesStatusOptions"    v-if="afterSales.salesStatus==item.dictValue" >{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+        </el-descriptions>
+        <div style="margin: 20px 0px">
+          <span class="font-small">收货信息</span>
+        </div>
+        <el-descriptions   :column="4" border  >
+            <el-descriptions-item label="收货人"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.consignee}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="收货人"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.consignee}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="手机号码"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.phoneNumber}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="收货地址"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.address}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="快递公司"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.deliveryName}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="运单号"  >
+                <span v-if="afterSales!=null">
+                  {{afterSales.deliverySn}}
+                </span>
+            </el-descriptions-item>
+        </el-descriptions>
+        <div style="margin-top: 20px">
+          <span class="font-small">商品信息</span>
+        </div>
+        <el-table
+          border
+          :data="items"
+          size="small"
+          style="width: 100%;margin-top: 20px" >
+          <el-table-column label="商品图片" width="150" align="center">
+            <template slot-scope="scope">
+              <img :src="JSON.parse(scope.row.jsonInfo).image" style="height: 80px">
+            </template>
+          </el-table-column>
+          <el-table-column label="商品名称" width="300" align="center">
+            <template slot-scope="scope">
+              <p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="价格" width="240" align="center">
+            <template slot-scope="scope">
+              <p>价格:¥{{JSON.parse(scope.row.jsonInfo).price}}</p>
+
+            </template>
+          </el-table-column>
+          <el-table-column label="属性" width="240" align="center">
+            <template slot-scope="scope">
+              {{JSON.parse(scope.row.jsonInfo).sku}}
+            </template>
+          </el-table-column>
+          <el-table-column label="数量" width="180" align="center">
+            <template slot-scope="scope">
+                {{JSON.parse(scope.row.jsonInfo).num}}
+            </template>
+          </el-table-column>
+          <el-table-column label="小计"  align="center">
+            <template slot-scope="scope">
+              ¥{{JSON.parse(scope.row.jsonInfo).num*JSON.parse(scope.row.jsonInfo).price}}
+            </template>
+          </el-table-column>
+        </el-table>
+        <div style="margin-top: 20px">
+          <span class="font-small">操作信息</span>
+        </div>
+        <el-table style="margin-top: 20px;width: 100%"
+                  ref="orderHistoryTable"
+                  :data="logs" border>
+          <el-table-column label="操作时间"  width="160" align="center">
+            <template slot-scope="scope">
+              {{scope.row.changeTime}}
+            </template>
+          </el-table-column>
+          <el-table-column label="备注" align="center">
+            <template slot-scope="scope">
+              {{scope.row.changeMessage}}
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-card>
+
+    </div>
+    <el-dialog :title="audit.title" :visible.sync="audit.open" width="800px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-form-item label="退款金额" prop="refundAmount"  >
+          <el-input-number v-model="form.refundAmount"  />
+        </el-form-item>
+        <el-form-item label="退货联系人" prop="consignee"  v-if="form.serviceType==1" >
+          <el-input v-model="form.consignee" placeholder="请输入收货人" />
+        </el-form-item>
+        <el-form-item label="退货手机号" prop="phoneNumber"  v-if="form.serviceType==1">
+          <el-input v-model="form.phoneNumber" placeholder="请输入手机号" />
+        </el-form-item>
+        <el-form-item label="退货地址" prop="address" v-if="form.serviceType==1">
+          <el-input v-model="form.address" placeholder="请输入地址" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitAuditForm">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="show.title" v-if="show.open" :visible.sync="show.open" width="1000px" append-to-body>
+        <product-order  ref="productOrder" />
+    </el-dialog>
+    <el-dialog :title="add.title" :visible.sync="add.open" width="500px" append-to-body>
+
+    <div slot="footer" class="dialog-footer">
+      <el-form ref="addForm" :model="addForm" :rules="addRules" label-width="100px">
+          <el-form-item label="id" prop="id" v-if="false">
+            <el-input v-model="addForm.id" placeholder="请输入"  />
+          </el-form-item>
+          <el-form-item label="快递公司" prop="deliveryName">
+            <el-input v-model="addForm.deliveryName" placeholder="请输入"  />
+          </el-form-item>
+          <el-form-item label="运单号" prop="deliverySn">
+            <el-input v-model="addForm.deliverySn" placeholder="请输入"  />
+          </el-form-item>
+        </el-form>
+      <el-button type="primary" @click="submitForm">确 定</el-button>
+      <el-button @click="cancel1">取 消</el-button>
+    </div>
+  </el-dialog>
+  </div>
+</template>
+
+<script>
+import {getLiveAfterSales,cancel,refund,audit,updateLiveAfterSales } from "@/api/live/liveAfterSales";
+
+import productOrder from "./productOrder";
+export default {
+  components: { productOrder },
+  name: "order",
+  data() {
+    return {
+      show:{
+        open:false,
+        title:"订单详情"
+      },
+      audit:{
+          title:"审核",
+          open:false,
+      },
+      add:{
+        open:false,
+        title:"添加物流"
+      },
+      addForm:{
+        id:null,
+        deliveryName:null,
+        deliverySn:null
+      },
+      addRules:{
+        deliveryName: [
+          { required: true, message: "物流名称不能为空", trigger: "blur" }
+        ],
+        deliverySn: [
+          { required: true, message: "物流单号不能为空", trigger: "blur" }
+        ],
+      },
+      order:null,
+      user:null,
+      serviceTypeOptions:[],
+      salesStatusOptions:[],
+      statusOptions:[],
+      afterSales:null,
+      items:[],
+      logs:[],
+      form:{
+        serviceType:1,
+        refundAmount:0,
+        consignee:null,
+        phoneNumber:null,
+        address:null,
+
+      },
+      rules:{
+        status: [
+          { required: true, message: "状态不能为空", trigger: "blur" }
+        ],
+        refundAmount: [
+          { required: true, message: "退款金额不能为空", trigger: "blur" }
+        ],
+         consignee: [
+          { required: true, message: "退货联系人不能为空", trigger: "blur" }
+        ],
+        phoneNumber: [
+          { required: true, message: "退货手机号不能为空", trigger: "blur" }
+        ],
+         address: [
+          { required: true, message: "退货地址不能为空", trigger: "blur" }
+        ],
+
+      }
+
+    };
+  },
+  created() {
+    this.getDicts("store_after_sales_sales_status").then((response) => {
+        this.salesStatusOptions = response.data;
+    });
+    this.getDicts("store_after_sales_status").then((response) => {
+        this.statusOptions = response.data;
+    });
+     this.getDicts("store_after_sales_service_type").then((response) => {
+        this.serviceTypeOptions = response.data;
+    });
+  },
+  methods: {
+    submitForm() {
+      var id=this.afterSales.id;
+      this.addForm.id = id;
+      updateStoreAfterSales(this.addForm).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("编辑成功");
+                this.add.open = false;
+                this.getStoreAfterSales(id);
+              }
+            });
+    },
+    cancel1(){
+      this.add.open = false;
+    },
+    addDelivery(){
+      this.add.open = true;
+      this.addForm.deliveryName = this.afterSales.deliveryName;
+      this.addForm.deliverySn = this.afterSales.deliverySn;
+    },
+    showOrder(){
+      this.show.open=true;
+      const orderId = this.order.id ;
+      setTimeout(() => {
+        this.$refs.productOrder.getOrder(orderId);
+      }, 500);
+    },
+    handleAudit(){
+        this.audit.open=true;
+        this.form.serviceType=this.afterSales.serviceType;
+        this.form.salesId=this.afterSales.id;
+        this.form.refundAmount=this.afterSales.refundAmount;
+    },
+    submitAuditForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+           audit(this.form).then(response => {
+              if (response.code === 200) {
+                this.audit.open = false;
+                this.getStoreAfterSales(this.afterSales.id);
+                this.msgSuccess("操作成功");
+              }
+            });
+        }
+      });
+    },
+    cancel(){
+      var id=this.afterSales.id;
+      this.$confirm('是否确认取消订单?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={salesId:id}
+          return cancel(data);
+        }).then(() => {
+          this.getStoreAfterSales(id);
+          this.msgSuccess("操作成功");
+        }).catch(function() {});
+    },
+    refund(){
+      var id=this.afterSales.id;
+      this.$confirm('是否确认收货,确认后将自动退款给客户', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          var data={salesId:id}
+          console.log(data)
+          return refund(data);
+        }).then(() => {
+          this.getStoreAfterSales(id);
+          this.msgSuccess("操作成功");
+        }).catch(function() {});
+    },
+    getStoreAfterSales(id){
+        getStoreAfterSales(id).then(response => {
+            this.afterSales = response.afterSales;
+            this.logs = response.logs;
+            this.items = response.items;
+            this.user=response.user;
+            this.order=response.order;
+        });
+     }
+  }
+};
+</script>
+<style scoped>
+.order-content{
+  margin: 10px;
+}
+.detail-container {
+  width: 80%;
+  padding: 20px 20px 20px 20px;
+  margin: 20px auto;
+}
+
+.operate-container {
+  background: #F2F6FC;
+  height: 80px;
+  margin: -20px -20px 0;
+  line-height: 80px;
+}
+
+.operate-button-container {
+  float: right;
+  margin-right: 20px
+}
+
+
+</style>

+ 978 - 0
src/views/live/components/productOrder.vue

@@ -0,0 +1,978 @@
+<template>
+  <div class="order-content">
+      <div class="order-status" v-if="order!=null" >
+          <el-steps  :active="order.status==3?order.status+1:order.status" align-center>
+            <el-step title="待支付"></el-step>
+            <el-step title="待发货"></el-step>
+            <el-step title="待收货"></el-step>
+            <el-step title="交易完成"></el-step>
+          </el-steps>
+      </div>
+      <div>
+
+      <el-card shadow="never" style="margin-top: 15px">
+      <div class="operate-container"  v-if="order!=null">
+        <span  style="margin-left: 20px" class="color-danger">订单状态:
+           <el-tag prop="status" v-for="(item, index) in statusOptions"    v-if="order.status==item.dictValue">{{item.dictLabel}}</el-tag>
+        </span>
+
+        <div class="operate-button-container" >
+          <el-button size="mini" @click="handleCertificates()"  v-hasPermi="['store:storeOrder:uploadCredentials']" >上传凭证</el-button>
+          <el-button size="mini" @click="handleEditAddress()" v-if="order.status==0||order.status==1"  v-hasPermi="['store:storeOrder:editAddress']" >修改收货地址</el-button>
+          <el-button size="mini" @click="handleBindCustomer()"  v-hasPermi="['store:storeOrder:bindCustomer']" >关联客户</el-button>
+          <el-button size="mini" @click="editOrder()"  v-hasPermi="['store:storeOrder:edit']" >修改订单</el-button>
+          <!-- <el-button size="mini" @click="handleEditUser()"  v-hasPermi="['users:user:edit']" >修改会员修改</el-button> -->
+          <el-button size="mini" v-if="order.customerId!=null&&order.customerId>0"  @click="handleCustomer()"    >查看客户详情</el-button>
+        </div>
+<!--        <div class="operate-button-container"  v-hasPermi="['store:storeOrder:express']"  >-->
+<!--          <el-button size="mini" @click="showExpress()" >查看物流</el-button>-->
+<!--        </div>-->
+      </div>
+      <div style="margin: 20px 0px"  v-if="order!=null">
+        <span class="font-small">
+          基本信息
+        </span>
+      </div>
+      <el-descriptions :column="4" border  >
+            <el-descriptions-item label="订单编号"  >
+                <span v-if="order!=null">
+                  {{order.orderCode}}
+                </span>
+                <el-tag  v-for="(item, index) in createTypeOptions"    v-if="order!=null&&order.orderCreateType==item.dictValue">{{item.dictLabel}}
+                </el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="会员"  >
+                <span v-if="user!=null">
+                  {{user.nickname}}({{user.phone}})
+                </span>
+            </el-descriptions-item>
+            <!-- <el-descriptions-item label="进线时间"  >
+                <span v-if="user!=null">
+                  {{user.registerDate}}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="推线编码"  >
+                <span v-if="user!=null">
+                  {{user.registerCode}}
+                </span>
+            </el-descriptions-item> -->
+
+            <el-descriptions-item label="收货人"  >
+                <span v-if="order!=null ">
+                  {{order.realName }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="手机号码"  >
+                <span v-if="order!=null ">
+                  {{order.userPhone }}
+                </span>
+                <el-button type="text" size="mini" @click="callNumber(0,0,orderId)"  v-hasPermi="['store:storeOrder:callNumber']">拨号</el-button>
+                <el-button type="text" size="mini" @click="handleSms(order.userPhone)" v-hasPermi="['store:storeOrder:sendSms']">短信</el-button>
+                <el-button icon="el-icon-search" size="mini" @click="handlePhone()" style="margin-left: 20px;" circle v-hasPermi="['store:storeOrder:queryPhone']"></el-button>
+            </el-descriptions-item>
+            <el-descriptions-item label="收货地址"  >
+              <el-popover
+                v-if="order!=null"
+                placement="top-start"
+                title="收货地址"
+                width="300"
+                trigger="hover"
+                :content="order.userAddress">
+                <span slot="reference">{{order.userAddress}}</span>
+                <el-button icon="el-icon-search" size="mini" @click="handleAddress()" style="margin-left: 20px;" circle v-hasPermi="['store:storeOrder:queryAddress']"></el-button>
+              </el-popover>
+            </el-descriptions-item>
+            <el-descriptions-item label="支付方式"  >
+                <span v-if="order!=null ">
+                  <el-tag prop="orderType" v-for="(item, index) in payTypeOptions"    v-if="order.payType==item.dictValue">{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="订单类型"  >
+                <span v-if="order!=null ">
+                  <el-tag prop="orderType" v-for="(item, index) in orderTypeOptions"    v-if="order.orderType==item.dictValue">{{item.dictLabel}}</el-tag>
+                </span>
+            </el-descriptions-item>
+<!--            <el-descriptions-item label="物流公司编号"  >-->
+<!--                <span v-if="order!=null ">-->
+<!--                  {{order.deliverySn }}-->
+<!--                </span>-->
+<!--            </el-descriptions-item>-->
+<!--            <el-descriptions-item label="物流公司名称"  >-->
+<!--                <span v-if="order!=null ">-->
+<!--                  {{order.deliveryName }}-->
+<!--                </span>-->
+<!--            </el-descriptions-item>-->
+<!--            <el-descriptions-item label="快递单号"  >-->
+<!--                <span v-if="order!=null ">-->
+<!--                  {{order.deliveryId }}-->
+<!--                </span>-->
+<!--            </el-descriptions-item>-->
+            <el-descriptions-item label="档期归属"  >
+              <el-tag prop="scheduleId" v-for="(item, index) in scheduleOptions"    v-if="order!=null&&order.scheduleId==item.id">{{item.name}}
+              </el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item label="用户备注"  >
+                <span v-if="order!=null ">
+                  {{order.mark }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="平台备注"  >
+                <span v-if="order!=null ">
+                  {{order.remark }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item label="跟随阶段"  v-if="company.companyId == 174">
+              <span v-if="order!=null ">
+                <el-tag prop="orderVisit" v-for="(item, index) in customerUserStatusOptions"    v-if="order.orderVisit==item.dictValue">{{item.dictLabel}}</el-tag>
+              </span>
+            </el-descriptions-item>
+            <el-descriptions-item v-if="customerInfo!=null " label="客户编码"  >
+                <span >
+                  {{customerInfo.customerCode }}
+                </span>
+            </el-descriptions-item>
+            <el-descriptions-item v-if="customerInfo!=null " label="进线时间"  >
+                <span >
+                  {{customerInfo.registerDate }}
+                </span>
+            </el-descriptions-item>
+
+      </el-descriptions>
+
+        <div style="margin-top: 20px">
+          <span class="font-small">物流信息</span>
+        </div>
+        <el-table
+          border
+          v-if="deliverList!=null"
+          :data="deliverList"
+          size="small"
+          style="width: 100%;margin-top: 20px" >
+          <el-table-column label="物流公司编码" width="150" align="center">
+            <template slot-scope="scope">
+              <p>{{scope.row.deliverSn}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="物流公司名称" width="300" align="center">
+            <template slot-scope="scope">
+              <p>{{scope.row.deliverName}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="物流单号" width="300" align="center">
+            <template slot-scope="scope">
+              <p>{{scope.row.deliverId}}</p>
+            </template>
+          </el-table-column>
+          <el-table-column label="物流状态" width="300" align="center">
+            <template slot-scope="scope">
+              <span>
+              <el-tag v-for="(item, index) in deliveryStatusOptions"    v-if="scope.row!=null&&scope.row.status==item.dictValue">
+              {{item.dictLabel}}
+              </el-tag>
+              </span>
+            </template>
+          </el-table-column>
+          <el-table-column label="发货时间" width="240" align="center">
+            <template slot-scope="scope">
+              {{scope.row.deliverSendTime}}
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="240" align="center">
+            <template slot-scope="scope">
+              <el-link  type="primary" @click="showExpress(scope)" v-hasPermi="['store:storeOrder:express']">查看物流跟踪</el-link>
+            </template>
+          </el-table-column>
+        </el-table>
+      <div style="margin: 20px 0px"  v-if="order!=null">
+        <span class="font-small">
+          凭证信息
+        </span>
+      </div>
+      <el-image
+          v-if="this.certificates != null"
+          :src="certificates"
+          :preview-src-list="[certificates]"
+          :style="{ width: '100px', height: '100px' }"
+          @click.native="showImageDialog"
+        ></el-image>
+        <el-dialog :visible.sync="dialogVisibleImage" width="10%">
+          <img :src="certificates" style="width: 100%" alt="">
+        </el-dialog>
+
+      <div style="margin-top: 20px">
+        <span class="font-small">商品信息</span>
+      </div>
+      <el-table
+        border
+        v-if="items!=null"
+        :data="items"
+        size="small"
+        style="width: 100%;margin-top: 20px" >
+        <el-table-column label="商品图片" width="150" align="center">
+          <template slot-scope="scope">
+            <img :src="JSON.parse(scope.row.jsonInfo).image" style="height: 80px">
+          </template>
+        </el-table-column>
+        <el-table-column label="商品名称" width="300" align="center">
+          <template slot-scope="scope">
+            <p>{{JSON.parse(scope.row.jsonInfo).productName}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="单价" width="240" align="center">
+          <template slot-scope="scope">
+            <p>¥{{JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}</p>
+          </template>
+        </el-table-column>
+        <el-table-column label="规格" width="240" align="center">
+          <template slot-scope="scope">
+            {{JSON.parse(scope.row.jsonInfo).sku}}
+          </template>
+        </el-table-column>
+        <el-table-column label="数量" width="180" align="center">
+          <template slot-scope="scope">
+            {{scope.row.num}}
+          </template>
+        </el-table-column>
+        <el-table-column label="小计"  align="center">
+          <template slot-scope="scope" >
+            ¥{{scope.row.num*JSON.parse(scope.row.jsonInfo).price.toFixed(2)}}
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="float: right;margin: 20px" v-if="order!=null">
+        合计:<span class="color-danger">¥{{order.totalPrice.toFixed(2)}}</span>
+      </div>
+
+      <div style="margin: 60px 0px 20px 0px">
+        <span class="font-small">费用信息</span>
+      </div>
+      <el-descriptions   :column="4" border  >
+          <el-descriptions-item label="商品合计"  >
+              <span v-if="order!=null">
+                ¥{{order.totalPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="应付金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="运费"  >
+              <span v-if="order!=null">
+                ¥{{order.payPostage.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="优惠券"  >
+              <span v-if="order!=null">
+                ¥{{order.couponPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="积分抵扣"  >
+              <span v-if="order!=null">
+                ¥{{order.deductionPrice.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="实付金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payMoney.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+          <el-descriptions-item label="代收金额"  >
+              <span v-if="order!=null">
+                ¥{{order.payDelivery.toFixed(2)}}
+              </span>
+          </el-descriptions-item>
+      </el-descriptions>
+
+      <div style="margin-top: 20px">
+        <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
+        <span class="font-small">支付信息</span>
+      </div>
+      <el-table
+        border
+        :data="payments"
+        size="small"
+        style="width: 100%;margin-top: 20px" >
+          <el-table-column label="支付单号" align="center" prop="payCode" width="120px" />
+          <el-table-column label="支付金额" align="center" prop="payMoney" />
+          <el-table-column label="类型" align="center" prop="payTypeCode" />
+          <el-table-column label="交易单号" align="center" prop="bankTransactionId" />
+          <el-table-column label="银行单号" align="center" prop="bankSerialNo" />
+          <el-table-column label="创建时间" align="center" prop="createTime" />
+          <el-table-column label="支付时间" align="center" prop="payTime" />
+      </el-table>
+
+      <div style="margin-top: 20px">
+        <span class="font-small">操作信息</span>
+      </div>
+      <el-table style="margin-top: 20px;width: 100%"
+                ref="orderHistoryTable"
+                :data="logs" border>
+        <el-table-column label="操作时间"  width="160" align="center">
+          <template slot-scope="scope">
+            {{scope.row.changeTime}}
+          </template>
+        </el-table-column>
+        <el-table-column label="备注" align="center">
+          <template slot-scope="scope">
+            {{scope.row.changeMessage}}
+          </template>
+        </el-table-column>
+      </el-table>
+      </el-card>
+    </div>
+    <el-dialog :title="edit.title" :visible.sync="edit.open" width="600px" append-to-body>
+      <el-form ref="editForm" :model="editForm" :rules="editRules" label-width="100px">
+        <el-form-item label="订单类型" prop="orderType"  >
+            <el-select style="width: 200px" v-model="editForm.orderType" placeholder="请选择订单类型" clearable size="small" >
+              <el-option
+                      v-for="item in orderTypeOptions"
+                      :key="item.dictValue"
+                      :label="item.dictLabel"
+                      :value="item.dictValue"
+                    />
+            </el-select>
+        </el-form-item>
+        <el-form-item label="档期归属" prop="scheduleId"  >
+            <el-select filterable style="width: 200px" v-model="editForm.scheduleId" placeholder="请选择档期" clearable size="small" >
+              <el-option
+                      v-for="item in scheduleOptions"
+                      :key="item.id"
+                      :label="item.name"
+                      :value="item.id"
+                    />
+            </el-select>
+        </el-form-item>
+        <el-form-item label="跟随阶段" prop="orderVisit" v-if="company.companyId == 174" >
+          <el-select filterable style="width: 200px" v-model="editForm.orderVisit" placeholder="请选择跟随阶段" clearable size="small" >
+            <el-option
+                v-for="item in customerUserStatusOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备注" prop="mark"  >
+          <el-input v-model="editForm.mark" placeholder="请输入备注" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditForm">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="editUser.title" :visible.sync="editUser.open" width="600px" append-to-body>
+      <el-form ref="editUserForm" :model="editUserForm" :rules="editUserRules" label-width="100px">
+         <el-form-item label="进线时间" prop="registerDate">
+          <el-date-picker clearable size="small"
+            v-model="editUserForm.registerDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择进线时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="推线编码" prop="registerCode">
+          <el-input v-model="editUserForm.registerCode" placeholder="请输入推线编码" />
+        </el-form-item>
+          <el-form-item label="渠道来源" prop="source">
+          <el-input v-model="editUserForm.source" placeholder="请输入渠道来源" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditUserForm">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="editAddress.title" :visible.sync="editAddress.open" width="600px" append-to-body>
+      <el-form ref="editAddressForm" :model="editAddressForm" :rules="editAddressRules" label-width="100px">
+        <el-form-item label="收件人" prop="realName">
+          <el-input v-model="editAddressForm.realName" placeholder="请输入收件人" />
+        </el-form-item>
+          <el-form-item label="联系电话" prop="source">
+          <el-input v-model="editAddressForm.userPhone" placeholder="请输入联系电话" />
+        </el-form-item>
+        <el-form-item label="收货地址" prop="district">
+          <el-row :gutter="20">
+          <el-col :span="6">
+             <el-select @change="provinceChange" v-model="editAddressForm.provinceId" placeholder="请选择">
+                <el-option
+                  v-for="item in province"
+                  :key="item.cityId"
+                  :label="item.name"
+                  :value="item.cityId">
+                </el-option>
+              </el-select>
+          </el-col>
+          <el-col :span="6">
+            <el-select @change="cityChange" v-model="editAddressForm.cityId" placeholder="请选择">
+                <el-option
+                  v-for="item in city"
+                  :key="item.cityId"
+                  :label="item.name"
+                  :value="item.cityId">
+                </el-option>
+              </el-select>
+          </el-col>
+          <el-col :span="6">
+             <el-select @change="districtChange" v-model="editAddressForm.districtId" placeholder="请选择">
+                <el-option
+                  v-for="item in district"
+                  :key="item.cityId"
+                  :label="item.name"
+                  :value="item.cityId">
+                </el-option>
+              </el-select>
+          </el-col>
+        </el-row>
+        </el-form-item>
+        <el-form-item label="详细地址" prop="detail">
+          <el-input v-model="editAddressForm.detail" placeholder="请输入收货人详细地址" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitEditAddressForm">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="600px" append-to-body>
+      <el-table style="margin-top: 20px;width: 100%"
+                ref="orderHistoryTable"
+                :data="traces" border>
+        <el-table-column label="操作时间"  width="160" align="center">
+          <template slot-scope="scope">
+            {{scope.row.AcceptTime}}
+          </template>
+        </el-table-column>
+         <el-table-column label="位置" align="center">
+          <template slot-scope="scope">
+            {{scope.row.Location}}
+          </template>
+        </el-table-column>
+        <el-table-column label="描述" align="center">
+          <template slot-scope="scope">
+            {{scope.row.AcceptStation}}
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-dialog>
+    <el-dialog :title="bindCustomerDialog.title" :visible.sync="bindCustomerDialog.open" width="800px" append-to-body>
+      <el-form ref="bindCustomerForm" :model="bindCustomerForm" :rules="bindCustomerRules" label-width="100px">
+        <el-form-item label="客户查询">
+          <el-row :gutter="10" class="mb8">
+            <el-col :span="1.5">
+              <el-input v-model="bindCustomerForm.mobile"   placeholder="请输入客户手机号"/>
+            </el-col>
+            <el-col :span="1.5">
+              <el-button type="primary" @click="searchCustomer">查看</el-button>
+            </el-col>
+          </el-row>
+
+        </el-form-item>
+        <el-form-item label="客户选择"  prop="customerIds">
+          <el-table   @selection-change="handleSelectionChange"
+                :data="customers" border>
+            <el-table-column type="selection" width="55" align="center" />
+            <el-table-column label="ID" align="center" prop="customerId" />
+            <el-table-column label="客户编号"  width="160" align="center">
+              <template slot-scope="scope">
+                {{scope.row.customerCode}}
+              </template>
+            </el-table-column>
+            <el-table-column label="客户名称"  width="160" align="center">
+              <template slot-scope="scope">
+                {{scope.row.customerName}}
+              </template>
+            </el-table-column>
+            <el-table-column label="客户手机号"  width="160" align="center">
+              <template slot-scope="scope">
+                {{scope.row.mobile}}
+              </template>
+            </el-table-column>
+          </el-table>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitBindCustomerForm">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="certificateDialig.title" :visible.sync="certificateDialig.open" append-to-body>
+      <el-form ref="certificateForm" :model="certificateForm" :rules="certificateRules" label-width="100px">
+        <el-form-item label="凭证" prop="certificates">
+          <ImageUpload v-model="photoArr" type="image" :num="10" :width="150" :height="150" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="handleConfirm">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+      :append-to-body="true"
+      size="75%"
+      :title="customer.title" :visible.sync="customer.open"
+      >
+        <customer-details  ref="customerDetails" />
+    </el-drawer>
+    <el-dialog :title="addSms.title" :visible.sync="addSms.open" width="800px" append-to-body>
+        <add-sms ref="sms" @close="closeSms()"></add-sms>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {updateUser,getUser } from "@/api/users/user";
+import { getTcmScheduleList } from "@/api/company/tcmScheduleReport";
+import {getCustomerListBySearch } from "@/api/crm/customer";
+import ImageUpload from '@/components/ImageUpload'
+import Material from '@/components/Material'
+import {
+  bindCustomer,
+  getExpress,
+  listStoreOrder,
+  getStoreOrder,
+  delStoreOrder,
+  addStoreOrder,
+  updateStoreOrder,
+  exportStoreOrder,
+  uploadCredentials,
+  getStoreOrderAddress,
+  getUserPhone,
+  getByOrderId, getExpressByDeliverId
+} from "@/api/store/storeOrder";
+import {getAllList} from "@/api/store/city";
+import customerDetails from '../../crm/components/customerDetails.vue';
+import addSms from '../../crm/components/addSms.vue';
+export default {
+  name: "order",
+  components: {customerDetails,
+    ImageUpload,Material ,addSms},
+  data() {
+    return {
+      deliveryStatusOptions:[],
+      deliverList: [],
+      customerUserStatusOptions:[],
+      scheduleOptions:[],
+      dialogVisibleImage: false,
+      customerInfo:null,
+      customer:{
+        title:"客户详情",
+        open:false,
+      },
+      photoArr:null,
+      certificateDialig:{
+        title:"上传凭证",
+        open:false,
+      },
+      certificateForm:{
+        orderCode:null,
+        certificates:null,
+      },
+      addSms:{
+        open:false,
+        title:"发短信"
+      },
+      certificateRules:{
+        certificates:[
+          { required: true, message: "凭证不能为空", trigger: "change" }
+        ]
+      },
+      customers:[],
+      bindCustomerDialog:{
+        title:"关联客户",
+        open:false,
+      },
+      bindCustomerForm:{
+        mobile:null,
+        customerIds:null,
+      },
+      bindCustomerRules:{
+        customerIds: [
+            { required: true, message: "客户不能为空", trigger: "change" }
+        ],
+
+      },
+      orderId:null,
+      expressDialog:{
+        title:"物流信息",
+        open:false,
+      },
+      citys:[],
+      province:[],
+      city:[],
+      district:[],
+      editAddress:{
+        title:"修改收货地址",
+        open:false,
+      },
+      editAddressForm:{
+        districtId:null,
+
+      },
+      editAddressRules:{
+
+      },
+      editUser:{
+        title:"修改会员信息",
+        open:false,
+      },
+      editUserForm:{
+        registerDate:null,
+        registerCode:"",
+        source:"",
+      },
+      editUserRules:{
+
+      },
+      edit:{
+        title:"",
+        open:false,
+      },
+      editForm:{
+        orderType:null,
+        scheduleId:null,
+        orderVisit:null,
+        mark:"",
+      },
+      editRules:{
+
+      },
+      createTypeOptions:[],
+      orderTypeOptions:[],
+      payTypeOptions:[],
+      statusOptions:[],
+      certificates:null,
+      order:null,
+      user:{},
+      logs:[],
+      items:[],
+      express:[],
+      traces:[],
+      payments:[],
+    };
+  },
+  created() {
+    this.getDicts("store_order_delivery_status").then((response) => {
+      this.deliveryStatusOptions = response.data;
+    });
+
+    this.getDicts("crm_customer_user_status").then((response) => {
+            this.customerUserStatusOptions = response.data;
+        });
+    this.getDicts("store_order_type").then((response) => {
+      this.orderTypeOptions = response.data;
+    });
+    this.getDicts("store_order_status").then((response) => {
+      this.statusOptions = response.data;
+    });
+    this.getDicts("store_pay_type").then((response) => {
+      this.payTypeOptions = response.data;
+    });
+    this.getDicts("store_order_create_type").then((response) => {
+      this.createTypeOptions = response.data;
+    });
+    getTcmScheduleList().then(response => {
+      this.scheduleOptions = response.data;
+    });
+  },
+  computed: {
+    company(){
+      return this.$store.state.user.user;
+    }
+  },
+  methods: {
+    getExpressList(){
+      getByOrderId(this.orderId).then(res=>{
+        this.deliverList = res.data;
+      })
+    },
+    closeSms(){
+      this.addSms.open=false;
+    },
+    handleSms(mobile){
+        this.addSms.open=true;
+        var that=this;
+        setTimeout(() => {
+            that.$refs.sms.getOrderId(this.orderId,mobile,2);
+        }, 500);
+
+    },
+    handlePhone(){
+      const id = this.order.id;
+        getUserPhone(id).then(response =>{
+          this.order.userPhone = response.userPhone;
+        })
+      },
+    handleAddress(){
+      const id = this.order.id;
+      getStoreOrderAddress(id).then(response =>{
+          this.order.userAddress = response.address;
+      })
+    },
+    showImageDialog() {
+      this.dialogVisible = true;
+    },
+    handleCustomer(){
+      var that=this;
+      this.customer.open = true;
+      setTimeout(() => {
+          that.$refs.customerDetails.getDetails(this.order.customerId);
+      }, 200);
+    },
+    handleSelectionChange(selection) {
+      this.bindCustomerForm.customerIds = selection.map(item => item.customerId)
+    },
+    searchCustomer(){
+      if(this.bindCustomerForm.mobile==null||this.bindCustomerForm.mobile==""){
+        this.msgError("请输入手机号");
+        return;
+      }
+      var data={mobile:this.bindCustomerForm.mobile};
+      getCustomerListBySearch(data).then(response => {
+          this.customers=response.data;
+      });
+    },
+    handleBindCustomer() {
+      this.customers=[];
+      this.bindCustomerDialog.open = true;
+      this.bindCustomerForm.mobile=null;
+      this.bindCustomerForm.orderId=this.orderId;
+      this.bindCustomerForm.customerIds=null;
+    },
+    /** 提交按钮 */
+    submitBindCustomerForm() {
+      this.$refs["bindCustomerForm"].validate(valid => {
+        if (valid) {
+          bindCustomer(this.bindCustomerForm).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.bindCustomerDialog.open = false;
+              }
+            });
+        }
+      });
+    },
+    handleCertificates(){
+      this.certificateDialig.open = true;
+      this.photoArr = null;
+    },
+    handleConfirm(){
+      this.certificateForm.id = this.orderId;
+      this.certificateForm.orderCode = this.order.orderCode;
+      this.certificateForm.certificates = this.photoArr;
+      uploadCredentials(this.certificateForm).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("上传成功");
+                this.certificateDialig.open = false;
+                this.getOrder(this.order.id);
+              }
+            });
+    },
+    showExpress(scope){
+      this.expressDialog.open=true;
+      getExpressByDeliverId({
+        orderId: this.orderId,
+        deliverId: scope.row.deliverId,
+        deliverSn: scope.row.deliverSn
+      }).then(response => {
+        this.express = response.data;
+        if(this.express!=null&&this.express.Traces!=null){
+          this.traces=this.express.Traces
+        }
+      })
+
+    },
+    districtChange(val){
+      var item=this.citys.find((item)=>{
+        return item.cityId==val&&item.level==2;
+      })
+      this.editAddressForm.district=item.name;
+
+    },
+    cityChange(val){
+      this.district=this.citys.filter(item => item.parentId===val )
+      this.editAddressForm.districtId=null;
+      var item=this.citys.find((item)=>{
+        return item.cityId==val&&item.level==1;
+      })
+      console.log(item)
+      this.editAddressForm.city=item.name;
+
+
+    },
+    provinceChange(val){
+      this.city=this.citys.filter(item => item.parentId===val )
+      this.district=[];
+      this.editAddressForm.cityId=null;
+      this.editAddressForm.districtId=null;
+      var item=this.citys.find((item)=>{
+        return item.cityId==val&&item.level==0;
+      })
+      this.editAddressForm.province=item.name;
+    },
+    getCityList(){
+        getAllList().then(res => {
+          this.citys=res.data;
+          this.province=res.data.filter(item => item.level===0 )
+        })
+    },
+    handleEditAddress() {
+        this.getCityList();
+        this.editAddressForm.id=this.order.id;
+        this.editAddressForm.realName=this.order.realName;
+        this.editAddressForm.userPhone=this.order.userPhone;
+        var address=this.order.userAddress.split(' ')
+        var province=this.citys.find((item)=>{
+          return item.name==address[0]&&item.level==0;
+        })
+        if(province!=null){
+          this.editAddressForm.provinceId=province.cityId;
+          this.city=this.citys.filter(item => item.parentId===province.cityId&&item.level==1 )
+        }
+        var city=this.citys.find((item)=>{
+          return item.name==address[1]&&item.level==1;
+        })
+
+        if(city!=null){
+          this.editAddressForm.cityId=city.cityId;
+          this.district=this.citys.filter(item => item.parentId===city.cityId&&item.level==2 )
+        }
+        var district=this.citys.find((item)=>{
+          return item.name==address[2]&&item.level==2;
+        })
+        if(district!=null){
+          this.editAddressForm.districtId=district.cityId;
+        }
+
+        this.editAddress.open = true;
+    },
+    /** 提交按钮 */
+    submitEditAddressForm() {
+      this.$refs["editAddressForm"].validate(valid => {
+        if (valid) {
+           this.editAddressForm.userAddress=this.editAddressForm.province+" "+this.editAddressForm.city+" "+this.editAddressForm.district+" "+this.editAddressForm.detail;
+            updateStoreOrder(this.editAddressForm).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.editAddress.open = false;
+                this.getOrder(this.order.id);
+              }
+            });
+        }
+      });
+    },
+    handleEditUser() {
+      const userId = this.order.userId
+      getUser(userId).then(response => {
+        this.editUserForm.userId=response.data.userId;
+        this.editUserForm.registerDate=response.data.registerDate;
+        this.editUserForm.registerCode=response.data.registerCode;
+        this.editUserForm.source=response.data.source;
+        this.editUser.open = true;
+      });
+    },
+    /** 提交按钮 */
+    submitEditUserForm() {
+      this.$refs["editUserForm"].validate(valid => {
+        if (valid) {
+            updateUser(this.editUserForm).then(response => {
+              if (response.code === 200) {
+                this.msgSuccess("修改成功");
+                this.editUser.open = false;
+                this.getOrder(this.order.id);
+              }
+            });
+        }
+      });
+    },
+    submitEditForm(){
+        this.$refs["editForm"].validate(valid => {
+        if (valid) {
+          updateStoreOrder(this.editForm).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("操作成功");
+              this.edit.open = false;
+              this.getOrder(this.order.id);
+            }
+          });
+
+        }
+      });
+    },
+    editOrder(){
+        this.edit.open=true;
+        this.editForm.mark=this.order.mark
+        this.editForm.id=this.order.id;
+        if(this.order.orderType!=null){
+          this.editForm.orderType=this.order.orderType.toString();
+        }
+        this.editForm.scheduleId=this.order.scheduleId;
+        this.editForm.orderVisit = this.order.orderVisit;
+
+    },
+    getOrder(orderId){
+        this.orderId=orderId;
+        this.certificates = null;
+        getStoreOrder(orderId).then(response => {
+            this.order = response.order;
+            if(response.order.certificates != null){
+              this.certificates = response.order.certificates;
+            }
+            this.user = response.user;
+            this.logs = response.logs;
+            this.items = response.items;
+            this.payments=response.payments;
+            this.customerInfo=response.customer;
+        });
+
+      this.getExpressList();
+     }
+  }
+};
+</script>
+<style scoped>
+.order-content{
+  margin: 10px;
+}
+.detail-container {
+  width: 80%;
+  padding: 20px 20px 20px 20px;
+  margin: 20px auto;
+}
+
+.operate-container {
+  background: #F2F6FC;
+  height: 60px;
+  margin: -20px -20px 0;
+  line-height: 60px;
+}
+
+.operate-button-container {
+  float: right;
+  margin-right: 20px
+}
+
+.table-layout {
+  margin-top: 20px;
+  border-left: 1px solid #DCDFE6;
+  border-top: 1px solid #DCDFE6;
+}
+
+.table-cell {
+  height: 60px;
+  line-height: 40px;
+  border-right: 1px solid #DCDFE6;
+  border-bottom: 1px solid #DCDFE6;
+  padding: 10px;
+  font-size: 14px;
+  color: #606266;
+  text-align: center;
+  overflow: hidden;
+}
+
+.table-cell-title {
+  border-right: 1px solid #DCDFE6;
+  border-bottom: 1px solid #DCDFE6;
+  padding: 10px;
+  background: #F2F6FC;
+  text-align: center;
+  font-size: 14px;
+  color: #303133;
+}
+</style>

+ 6 - 1
src/views/live/live/index.vue

@@ -90,7 +90,12 @@
           <el-tag v-if="scope.row.status == 4">直播回放中</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="主播ID" align="center" prop="talentId" />
+      <el-table-column label="公司名称" align="center" prop="companyName" >
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.companyName">{{ scope.row.companyName }}</el-tag>
+          <el-tag v-else>总台</el-tag>
+        </template>
+      </el-table-column>
       <el-table-column label="直播类型" align="center" prop="liveType">
         <template slot-scope="scope">
           <el-tag type="danger" v-if="scope.row.liveType == 1">直播</el-tag>

+ 26 - 13
src/views/live/liveAfteraSales/index.vue

@@ -130,7 +130,7 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table border v-loading="loading" :data="liveAfteraSalesList" @selection-change="handleSelectionChange">
+    <el-table border v-loading="loading" :data="liveAfterSalesList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="ID" align="center" prop="id" />
       <el-table-column label="所属公司" align="center" prop="companyName" />
@@ -193,20 +193,26 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
+    <el-drawer
+      size="75%"
+      :title="title" :visible.sync="open"
+    >
+      <product-after-sales-order  ref="afterSalesOrder" />
+    </el-drawer>
   </div>
 </template>
 
 <script>
-import { listLiveAfteraSales, getLiveAfteraSales, delLiveAfteraSales, addLiveAfteraSales, updateLiveAfteraSales, exportLiveAfteraSales } from "@/api/live/liveAfteraSales";
+import { listLiveAfterSales, getLiveAfterSales, delLiveAfterSales, addLiveAfterSales, updateLiveAfterSales, exportLiveAfterSales } from "@/api/live/liveAfterSales";
 import {getCompanyList} from "@/api/company/company";
 import Treeselect from "@riophae/vue-treeselect";
 import {treeselect} from "@/api/company/companyDept";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import productAfterSalesOrder from "../components/productAfterSalesOrder";
 
 export default {
-  name: "LiveAfteraSales",
-  components: {Treeselect},
+  name: "LiveAfterSales",
+  components: {productAfterSalesOrder, Treeselect},
   data() {
     return {
       dateRange:[],
@@ -225,7 +231,7 @@ export default {
       // 总条数
       total: 0,
       // 售后记录表格数据
-      liveAfteraSalesList: [],
+      liveAfterSalesList: [],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -291,11 +297,18 @@ export default {
     this.getList();
   },
   methods: {
+    handleShow(row){
+      this.title="售后订单"
+      this.open=true;
+      setTimeout(() => {
+        this.$refs.afterSalesOrder.getStoreAfterSales(row.id);
+      }, 200);
+    },
     /** 查询售后记录列表 */
     getList() {
       this.loading = true;
-      listLiveAfteraSales(this.queryParams).then(response => {
-        this.liveAfteraSalesList = response.rows;
+      listLiveAfterSales(this.queryParams).then(response => {
+        this.liveAfterSalesList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
@@ -361,7 +374,7 @@ export default {
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids
-      getLiveAfteraSales(id).then(response => {
+      getLiveAfterSales(id).then(response => {
         this.form = response.data;
         this.open = true;
         this.title = "修改售后记录";
@@ -372,13 +385,13 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
-            updateLiveAfteraSales(this.form).then(response => {
+            updateLiveAfterSales(this.form).then(response => {
               this.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addLiveAfteraSales(this.form).then(response => {
+            addLiveAfterSales(this.form).then(response => {
               this.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -395,7 +408,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          return delLiveAfteraSales(ids);
+          return delLiveAfterSales(ids);
         }).then(() => {
           this.getList();
           this.msgSuccess("删除成功");
@@ -410,7 +423,7 @@ export default {
           type: "warning"
         }).then(() => {
           this.exportLoading = true;
-          return exportLiveAfteraSales(queryParams);
+          return exportLiveAfterSales(queryParams);
         }).then(response => {
           this.download(response.msg);
           this.exportLoading = false;

+ 3 - 0
src/views/live/liveConfig/index.vue

@@ -108,6 +108,7 @@ import LiveRedConf from './liveRedConf.vue'
 import LiveLotteryConf from './liveLotteryConf.vue'
 import LiveReplay from './liveReplay.vue'
 import Preview from './preview.vue'
+import LiveCoupon from './liveCoupon.vue'
 import { listLive, getLive, delLive, addLive, updateLive, exportLive,selectCompanyTalent,handleShelfOrUn,handleDeleteSelected } from "@/api/live/live";
 
 
@@ -122,6 +123,7 @@ export default {
     Goods,
     IdCard,
     Task,
+    LiveCoupon,
     Preview
   },
   data() {
@@ -135,6 +137,7 @@ export default {
         { name: '直播预告', label: '直播预告', index: 'preview'},
         { name: '红包配置', label: '红包配置', index: 'liveRedConf'},
         { name: '抽奖配置', label: '抽奖配置', index: 'liveLotteryConf'},
+        // { name: '优惠券配置', label: '优惠券配置', index: 'liveCoupon'},
         // { name: '答题', label: '答题', index: 'answer'},
         { name: '直播商品', label: '直播商品', index: 'goods'},
         { name: '回放设置', label: '回放设置', index: 'liveReplay'},

+ 592 - 0
src/views/live/liveConfig/liveCoupon.vue

@@ -0,0 +1,592 @@
+<template>
+  <div class="el-container-md">
+
+    <div class="selection-toolbar">
+      <el-checkbox :indeterminate="isIndeterminate" v-model="allChecked" @change="toggleSelectAll">
+        {{ multipleSelection.length > 0 ? `已选 ${multipleSelection.length} 条` : '选中本页' }}
+      </el-checkbox>
+      <el-button  plain size="mini" @click="handleShelf">上架</el-button>
+      <el-button  plain size="mini" @click="handleUnshelf">下架</el-button>
+      <el-button  plain size="mini" @click="handleDeleteSelected">删除</el-button>
+      <el-button  plain type="mini" icon="el-icon-plus" @click="handleAddLiveGoods">添加商品</el-button>
+    </div>
+    <el-table
+      ref="goodTable"
+      :data="goodsLiveList"
+      style="width: 100%"
+      v-loading="loading"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55"></el-table-column>
+      <!-- 题干列:显示试题的主要内容 -->
+      <el-table-column
+        prop="goodsId"
+        label="商品id"
+        show-overflow-tooltip
+      ></el-table-column>
+
+      <el-table-column
+        label="商品图片"
+      >
+        <template slot-scope="scope">
+          <img
+            :src="scope.row.imgUrl"
+            style="display: block; max-width: 100%; width: 100px; height: 100px"
+          />
+        </template>
+
+      </el-table-column>
+
+      <el-table-column
+        prop="productName"
+        label="商品名称"
+      ></el-table-column>
+
+      <el-table-column
+        prop="price"
+        label="价格"
+      ></el-table-column>
+
+      <el-table-column
+        prop="stock"
+        label="库存"
+      ></el-table-column>
+
+      <el-table-column
+        prop="sales"
+        label="销量"
+      ></el-table-column>
+
+      <el-table-column
+        prop="isShow"
+        label="显示状态"
+      >
+        <template slot-scope="scope">
+            <el-switch
+              v-model="scope.row.isShow"
+              @click.native.capture.prevent="handleSwitchClick(scope.row)"
+              active-color="#13ce66"
+              inactive-color="#ff4949">
+            </el-switch>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        prop="status"
+        label="上下架"
+      >
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.status == 1">上架</el-tag>
+          <el-tag type="info" v-if="scope.row.status == 0">下架</el-tag>
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        prop="status"
+        label="店铺上下架"
+      >
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.fsStatus == 1">上架</el-tag>
+          <el-tag type="info" v-if="scope.row.fsStatus == 0">下架</el-tag>
+        </template>
+      </el-table-column>
+
+      <!-- 操作列:包含编辑和删除按钮 -->
+      <el-table-column
+        label="操作"
+        width="180"
+        fixed="right"
+      >
+        <template slot-scope="scope">
+          <el-button
+            type="text"
+            size="small"
+            style="color: #0066FF;"
+            @click="handleGoodStock(scope.row)"
+          >调整库存</el-button>
+          <el-button
+            type="text"
+            size="small"
+            style="color: #0066FF;"
+            @click="handleGoodSale(scope.row)"
+          >调整销量</el-button>
+          <el-button
+            type="text"
+            size="small"
+            style="color: #F56C6C;"
+            @click="handleGoodDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 分页组件:用于分页展示试题列表 -->
+    <pagination
+      v-show="goodsLiveTotal > 0"
+      :total="goodsLiveTotal"
+      :page.sync="goodsParams.pageNum"
+      :limit.sync="goodsParams.pageSize"
+      @pagination="getLiveGoodsList"
+      style="margin-top: 20px;"
+    />
+
+    <!-- 添加商品弹窗 -->
+    <el-dialog
+      title="添加商品"
+      :visible.sync="goodsDialogVisible"
+      width="800px"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <div class="dialog-content">
+        <div style="text-align: right; margin-bottom: 20px;">
+          <el-input
+            v-model="searchTitle"
+            placeholder="请输入产品名称"
+            style="width: 300px;"
+            @input="handleGoodsSearch"
+          ></el-input>
+        </div>
+
+        <el-table
+          :data="goodsList"
+          style="width: 100%"
+          v-loading="goodsLoading"
+          @selection-change="handleGoodsChange"
+          @row-click="handleGoodsRowClick"
+          row-key="id"
+        >
+          <el-table-column
+            type="selection"
+            width="55"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="productName"
+            label="产品"
+            class-name="clickable-column"
+          ></el-table-column>
+          <el-table-column
+            prop="price"
+            label="价格"
+            class-name="clickable-column"
+          ></el-table-column>
+          <el-table-column
+            prop="stock"
+            label="库存"
+            class-name="clickable-column"
+          ></el-table-column>
+        </el-table>
+
+        <pagination
+          v-show="goodsTotal > 0"
+          :total="goodsTotal"
+          :page.sync="queryGoodParams.pageNum"
+          :limit.sync="queryGoodParams.pageSize"
+          @pagination="getStoreProductLists"
+          style="margin-top: 20px;"
+        />
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <div style="display: flex; justify-content: space-between; align-items: center;">
+          <span class="selected-count">当前已选择 <span style="color: #00BFFF; font-style: italic;">{{ selectedGoods.length }}</span> 商品</span>
+          <div>
+            <el-button @click="goodsDialogVisible = false">取 消</el-button>
+            <el-button type="primary" @click="confirmAddGoods">确 定</el-button>
+          </div>
+        </div>
+      </div>
+    </el-dialog>
+
+    <el-dialog
+      title="调整库存"
+      :visible.sync="stockDialogVisible"
+      width="400px"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <el-form :model="stockForm" ref="stockForm" :rules="stockRules">
+        <el-form-item label="调整后库存" prop="newStock">
+          <el-input-number
+            v-model="stockForm.stock"
+            :min="0"
+            :max="999999"
+            controls-position="right"
+            style="width: 100%;"
+          ></el-input-number>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="stockDialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="confirmStockChange">确 定</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog
+      title="调整销量"
+      :visible.sync="salesDialogVisible"
+      width="400px"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <el-form :model="salesForm" ref="salesForm" :rules="salesRules">
+        <el-form-item label="调整后销量" prop="newSales">
+          <el-input-number
+            v-model="salesForm.sales"
+            :min="0"
+            :max="999999"
+            controls-position="right"
+            style="width: 100%;"
+          ></el-input-number>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="salesDialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="confirmSalesChange">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  addLiveGoods,
+  delLiveGoods,
+  listLiveGoods,
+  listStoreProduct,
+  handleShelfOrUn,
+  handleDeleteSelected,
+  handleIsShowChange,
+  updateGoodsStock,
+  updateLiveGoods
+} from "@/api/live/liveGoods";
+
+export default {
+  data() {
+    return {
+      liveId: '',
+      loading: true,
+      searchTitle: '',
+      queryGoodParams: {
+        pageNum: 1,
+        pageSize: 10,
+        productName: null,
+        liveId: null,
+        storeId: null
+      },
+      goodsLiveList: [],
+      goodsLiveTotal: 0,
+      goodsParams: {
+        pageNum: 1,
+        pageSize: 10,
+        liveId: null
+      },
+      goodsList: [],
+      goodsTotal: 0,
+      selectedGoods: [],
+      goodsLoading: false,
+      goodsDialogVisible: false,
+      multipleSelection: [],
+      allChecked: false,
+      isIndeterminate: false,
+      socket: null,
+      stockDialogVisible: false,
+      salesDialogVisible: false,
+      stockForm: {
+        goodsId: '',
+        stock: 0,
+        productId: 0,
+      },
+      salesForm: {
+        goodsId: '',
+        sales: 0,
+        productId: 0,
+      },
+      stockRules: {
+        stock: [
+        { required: true, message: '请输入库存数量', trigger: 'blur' },
+        { type: 'number', min: 0, message: '库存数量不能小于0', trigger: 'blur' }
+      ]
+      },
+      salesRules: {
+        sales: [
+          { required: true, message: '请输入销量数量', trigger: 'blur' },
+          { type: 'number', min: 0, message: '库存数量不能小于0', trigger: 'blur' }
+        ]
+      }
+    };
+  },
+  watch: {
+     '$route.query': {
+      handler(newQuery) {
+        if (this.$route.params.liveId) {
+          this.liveId = this.$route.params.liveId;
+        }else {
+          this.liveId = this.$route.query.liveId;
+        }
+        this.goodsParams.liveId = this.liveId
+        if(this.liveId == null) {
+          return;
+        }
+        this.getLiveGoodsList();
+        this.socket = this.$store.state.liveWs[this.liveId]
+      },
+      // 初始化时立即执行一次
+      immediate: true
+    }
+  },
+  created() {
+    // if (this.$route.params.liveId) {
+    //   this.liveId = this.$route.params.liveId;
+    // }else {
+    //   this.liveId = this.$route.query.liveId;
+    // }
+    // this.goodsParams.liveId = this.liveId
+    // this.getLiveGoodsList();
+    // this.socket = this.$store.state.liveWs[this.liveId]
+  },
+  methods: {
+    handleRouteChange(to, from) {
+      // 处理路由变化逻辑
+      console.log('路由变化:', from.path, '->', to.path);
+    },
+    handleSwitchClick(row) {
+      // 1. 获取「即将切换到的目标状态」(当前状态取反)
+      const targetStatus = !row.isShow
+      const goodsList = [row.goodsId];
+      handleIsShowChange({"goodsIds":goodsList,"isShow":targetStatus,"liveId":this.liveId}).then(res=>{
+        if(res.code == 200){
+          row.isShow = res.isShow
+          if (res.msg == "目前仅支持单一物品展示") {
+            this.$message.error(res.msg)
+          }
+          if (this.socket == null) {
+            this.$message.error("请从直播间开启展示状态!");
+          } else {
+            const msg = {
+              cmd: 'goods',
+              data: {"liveId":this.liveId,"goodsId":goodsList[0],"status":targetStatus ? 1 : 0}
+            }
+            this.socket.send(JSON.stringify(msg));
+          }
+        }
+      })
+    },
+    handleShelf(){
+      this.handleShelfOrUn(1)
+    },
+    handleUnshelf(){
+      this.handleShelfOrUn(0)
+    },
+    handleShelfOrUn(type){
+      if (this.multipleSelection.length > 0) {
+        const goodsList = this.getSelectedList();
+        handleShelfOrUn({"goodsIds":goodsList,"status":type}).then(res=>{
+          this.dealResult(res)
+        })
+      } else {
+        this.$message.info("请选择下架商品!")
+      }
+    },
+    handleDeleteSelected(){
+      if (this.multipleSelection.length > 0) {
+        const goodsList = this.getSelectedList();
+        handleDeleteSelected({"goodsIds":goodsList}).then(res=>{
+          this.dealResult(res)
+        })
+      } else {
+        this.$message.info("请选择被删除的商品!")
+      }
+    },
+    dealResult(res){
+      if (res.code == 200) {
+        this.getLiveGoodsList();
+        this.$refs.goodTable.clearSelection();
+      } else {
+        this.$message.error(res.msg);
+      }
+    },
+    getSelectedList(){
+      var goodsList = []
+      this.multipleSelection.forEach(item => {
+        goodsList.push(item.goodsId);
+      })
+      return goodsList;
+    },
+    // 全选或取消全选
+    toggleSelectAll(val) {
+      this.checked = val; // 更新 checkbox 的状态
+      if (val) {
+        // 如果 checkbox 被选中,则全选
+        this.toggleSelection(this.goodsLiveList);
+      } else {
+        // 如果 checkbox 被取消选中,则取消全选
+        this.toggleSelection();
+      }
+    },
+    toggleSelection(rows) {
+      if (rows && !this.isIndeterminate) {
+        rows.forEach(row => {
+          this.$refs.goodTable.toggleRowSelection(row);
+        });
+      } else {
+        this.$refs.goodTable.clearSelection();
+      }
+    },
+    // 多选框选中数据
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+      // 根据选择项的数量更新 checkbox 的状态
+      this.allChecked = val.length === this.goodsLiveList.length;
+      this.isIndeterminate = val.length > 0 && val.length < this.goodsLiveList.length;
+    },
+
+    getLiveGoodsList() {
+      this.loading = true
+      listLiveGoods(this.goodsParams).then(response => {
+        this.goodsLiveList = response.rows
+        this.goodsLiveTotal = response.total
+        this.loading = false
+      })
+    },
+    handleAddLiveGoods(){
+      this.goodsDialogVisible = true;
+      this.getStoreProductLists()
+    },
+    handleGoodsSearch(){
+      this.queryGoodParams.pageNum = 1
+      this.queryGoodParams.productName = this.searchTitle
+      this.getStoreProductLists()
+    },
+    handleGoodsChange(goods) {
+      this.selectedGoods = goods
+    },
+    confirmAddGoods(){
+      if (this.selectedGoods.length === 0) {
+        this.$message({
+          message: '请选择要添加的商品',
+          type: 'warning'
+        })
+        return
+      }
+      addLiveGoods({
+        liveId: this.liveId,
+        productsId: this.selectedGoods.map(item => item.productId).join(',')
+      }).then(response => {
+        if (response.code !== 200) {
+          this.$message({
+            message: response.msg,
+            type: 'warning'
+          });
+          return;
+        }
+        this.goodsDialogVisible = false;
+        this.getLiveGoodsList()
+      })
+    },
+    handleGoodDelete(row){
+      delLiveGoods(row.goodsId).then(response => {
+        this.getLiveGoodsList()
+      })
+    },
+    handleGoodStock(row){
+      this.stockForm.goodsId = row.goodsId;
+      this.stockForm.stock = row.stock;
+      this.stockForm.productId = row.productId;
+      this.stockDialogVisible = true;
+    },
+    handleGoodSale(row){
+      this.salesForm.goodsId = row.goodsId;
+      this.salesForm.sales = row.sales;
+      this.salesForm.productId = row.productId;
+      this.salesDialogVisible = true;
+    },
+    // 添加确认修改库存方法
+    confirmStockChange() {
+      this.$refs.stockForm.validate((valid) => {
+        if (valid) {
+          updateGoodsStock({
+            goodsId: this.stockForm.goodsId,
+            stock: this.stockForm.stock,
+            productId: this.stockForm.productId
+          }).then(response => {
+            if (response.code === 200) {
+              this.$message.success('库存修改成功');
+              this.stockDialogVisible = false;
+              this.getLiveGoodsList(); // 重新获取列表数据
+            } else {
+              this.$message.error(response.msg || '库存修改失败');
+            }
+          });
+        }
+      });
+    },
+    // 添加确认修改库存方法
+    confirmSalesChange() {
+      this.$refs.salesForm.validate((valid) => {
+        if (valid) {
+          updateLiveGoods({
+            goodsId: this.salesForm.goodsId,
+            sales: this.salesForm.sales,
+            productId: this.salesForm.productId
+          }).then(response => {
+            if (response.code === 200) {
+              this.$message.success('销量修改成功');
+              this.salesDialogVisible = false;
+              this.getLiveGoodsList(); // 重新获取列表数据
+            } else {
+              this.$message.error(response.msg || '销量修改失败');
+            }
+          });
+        }
+      });
+    },
+    /** 处理行点击事件 */
+    handleGoodsRowClick(row, column) {
+      // 如果点击的是复选框列,不进行处理
+      if (column.type === 'selection') {
+        return
+      }
+
+      // 获取表格实例
+      const table = this.$refs.goodsTable[0]
+      if (!table) {
+        return
+      }
+
+      // 判断当前行是否已经被选中
+      const isSelected = this.selectedGoods.some(item => item.id === row.id)
+
+      // 切换选中状态
+      table.toggleRowSelection(row, !isSelected)
+    },
+    getStoreProductLists() {
+      this.queryGoodParams.liveId = this.liveId
+      listStoreProduct(this.queryGoodParams).then(response => {
+        this.goodsList = response.rows
+        this.goodsTotal = response.total
+        this.loading = false
+      })
+    }
+
+  }
+};
+</script>
+
+<style scoped>
+.selection-toolbar {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+  padding-left: 10px;
+}
+
+.selection-toolbar .el-checkbox {
+  margin-right: 10px;
+}
+
+/* 调整 checkbox 内部输入框的对齐 */
+.selection-toolbar .el-checkbox .el-checkbox__inner {
+  top: 8px; /* 根据实际需求调整 */
+}
+</style>

+ 2 - 1
src/views/live/liveConfig/liveLotteryConf.vue

@@ -181,7 +181,7 @@
           <el-input v-model="form.liveId" placeholder="请输入直播间ID"
                     :disabled="canLiveId"/>
         </el-form-item>
-        <el-form-item label="参与方式" prop="require">
+        <el-form-item label="参与方式" prop="require" >
           <el-select v-model="form.require" placeholder="请输入参与抽奖方式">
             <el-option v-for="(item,index) in requireOptions" :key="item.dictValue+index" :label="item.dictLabel" :value="item.dictValue" />
           </el-select>
@@ -685,6 +685,7 @@ export default {
       }
       getLiveLotteryConf(lotteryId).then(response => {
         this.form = response.data;
+        this.form.require = this.form.require + ""
         this.open = true;
         this.title = "修改直播抽奖配置";
       });

+ 11 - 1
src/views/live/liveConfig/preview.vue

@@ -149,10 +149,10 @@ export default {
       addLiveVideo(doParam).then(response => {
         if (response.code == 200) {
           this.$message.success("上传成功");
-          this.getLiveVideo()
         } else {
           this.$message.warning(response.msg);
         }
+        this.getLiveVideo()
         this.$refs.form.resetFields();
       })
     },
@@ -165,6 +165,7 @@ export default {
       console.log(this.videoUrl)
     },
     getLiveVideo() {
+      this.videoList = [];
       getLiveVideoByLiveIdAndType(this.liveId).then(res => {
         let dataEntity =
           {
@@ -246,6 +247,15 @@ export default {
     },
     // 上传视频处理
     handleUploadVideo() {
+      this.form = {
+        uploadType: 1,
+        isTranscode:0,
+        transcodeFileKey:null,
+        videoUrl: null,
+      };
+      setTimeout(() => {
+        this.$refs.videoUpload.reset();
+      }, 100);
       // 模拟上传视频逻辑,实际需调用上传组件或接口
       this.open = true;
     },

+ 3 - 3
src/views/live/liveOrder/liveOrderDetails.vue

@@ -59,9 +59,9 @@
 <!--            <el-button size="mini" @click="followMsg()" >随访记录</el-button>-->
 <!--          </div>-->
 
-<!--          <div class="operate-button-container" v-if="item.status>1">-->
-<!--            <el-button size="mini" @click="refund()" v-hasPermi="['his:liveOrder:afterSales']">申请退款</el-button>-->
-<!--          </div>-->
+          <div class="operate-button-container" v-if="item.status>1">
+            <el-button size="mini" @click="refund()" v-hasPermi="['his:liveOrder:afterSales']">申请退款</el-button>
+          </div>
 <!--          <div class="operate-button-container" v-if="item.status== -2" >-->
 <!--            <el-button size="mini" @click="returnCost()"  v-hasPermi="['his:liveOrder:returnCost']" >成本退还</el-button>-->
 <!--          </div>-->