瀏覽代碼

订单添加售后,填写买家快递信息

YY 2 年之前
父節點
當前提交
00be443966

+ 12 - 0
src/router/module/platmanag.js

@@ -41,6 +41,18 @@ export default [
     meta: { title: '平台管理-订单管理-详细信息' },
     component: () => import('@/views/platmanag/order/detail_orderDetail.vue'),
   },
+  {
+    path: '/platmanag/order/detail_sales_order',
+    name: 'platmanag_order_detail_sale_orders',
+    meta: { title: '自营店铺-订单管理-售后' },
+    component: () => import('@/views/platmanag/order/detail_sales_order.vue'),
+  },
+  {
+    path: '/platmanag/order/detail_sales_orderDetail',
+    name: 'platmanag_order_detail_sale_orderDetail',
+    meta: { title: '自营店铺-订单管理-售后' },
+    component: () => import('@/views/platmanag/order/detail_sales_orderDetail.vue'),
+  },
   {
     path: '/platmanag/goodsRate',
     name: 'platmanag_goodsRate',

+ 12 - 0
src/router/module/selfShop.js

@@ -35,6 +35,18 @@ export default [
     meta: { title: '自营店铺-订单管理-详细信息' },
     component: () => import('@/views/selfShop/order/detail_orderDetail.vue'),
   },
+  {
+    path: '/selfShop/order/detail_sales_order',
+    name: 'selfShop_order_detail_sale_orders',
+    meta: { title: '自营店铺-订单管理-售后' },
+    component: () => import('@/views/selfShop/order/detail_sales_order.vue'),
+  },
+  {
+    path: '/selfShop/order/detail_sales_orderDetail',
+    name: 'selfShop_order_detail_sale_orderDetail',
+    meta: { title: '自营店铺-订单管理-售后' },
+    component: () => import('@/views/selfShop/order/detail_sales_orderDetail.vue'),
+  },
   {
     path: '/selfShop/sales',
     name: 'selfShop_sales',

+ 4 - 0
src/store/module/shop/afterSale.js

@@ -22,6 +22,10 @@ const actions = {
     const res = await this.$axios.$post(`${api.url}`, payload);
     return res;
   },
+  async cgfr({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.url}/cgfr`, payload);
+    return res;
+  },
   async fetch({ commit }, payload) {
     const res = await this.$axios.$get(`${api.url}/${payload}`);
     return res;

+ 8 - 0
src/store/module/trade/order.js

@@ -22,6 +22,14 @@ const actions = {
     const res = await this.$axios.$post(`${api.url}`, payload);
     return res;
   },
+  async cancel({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.url}/cancel`, payload);
+    return res;
+  },
+  async cancel({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.url}/cancel`, payload);
+    return res;
+  },
   async fetch({ commit }, payload) {
     const res = await this.$axios.$get(`${api.url}/${payload}`);
     return res;

+ 206 - 0
src/views/platmanag/order/detail_sales_order.vue

@@ -0,0 +1,206 @@
+<template>
+  <div id="form-1">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight">
+        <el-col class="top-btn">
+          <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
+        </el-col>
+        <el-col :span="8" class="one">
+          <el-col :span="24" class="add">
+            <el-col :span="2">
+              <i class="el-icon-location"></i>
+            </el-col>
+            <el-col :span="22">
+              <p>{{ address.name }},{{ address.phone }}</p>
+              <p>{{ address.province }} , {{ address.city }} , {{ address.area }} , {{ address.address }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" v-for="(item, index) in list" :key="index">
+            <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ item.shop_name }}</el-col>
+            <el-col :span="24" v-for="(goods, index) in item.goods" :key="index">
+              <el-col :span="24" class="goods">
+                <el-col :span="6"><el-image :src="goods.goods.file[0].url"></el-image></el-col>
+                <el-col :span="18">
+                  <el-col :span="12">
+                    <p>{{ goods.goods.name }}</p>
+                    <p>规格:{{ goods.name }}</p>
+                  </el-col>
+                  <el-col :span="12" class="money">
+                    <p v-if="info.type == '0'">¥{{ goods.sell_money }}</p>
+                    <p v-else-if="info.type == '1'">¥{{ goods.group_config.money }}</p>
+                    <p>X{{ goods.buy_num }}</p>
+                    <el-col>
+                      <span class="spanfour" style="color: blue" @click="toUrl(goods.goods.url)"> 查看商品来源:{{ goods.goods.source }}</span>
+                    </el-col>
+                    <el-button type="primary" @click="toSales()"> 取消订单 </el-button>
+                  </el-col>
+                </el-col>
+              </el-col>
+              <el-col :span="24">
+                <el-col :span="6">运费</el-col>
+                <el-col :span="18" class="other" v-if="!goods.freight == '0'">{{ goods.freight }}</el-col>
+                <el-col :span="18" class="other" v-else>包邮</el-col>
+              </el-col>
+              <el-col :span="24">
+                <el-col :span="6">订单备注</el-col>
+                <el-col :span="18" class="other" v-if="item.remarks">{{ item.remarks }}</el-col>
+                <el-col :span="18" class="other" v-else>暂无备注</el-col>
+              </el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24">
+            <el-col :span="6">配送方式</el-col>
+            <el-col :span="18" class="other">快递配送</el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total">
+            <el-col :span="6">商品金额</el-col>
+            <el-col :span="18" class="other">
+              <p>¥{{ total_detail.goods_total }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total">
+            <el-col :span="6">快递费</el-col>
+            <el-col :span="18" class="other">
+              <p>¥{{ total_detail.freight_total }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total">
+            <el-col :span="8">优惠后应付金额</el-col>
+            <el-col :span="16" class="other">
+              <p>¥{{ pay.pay_money }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24">
+            <el-col :span="6">下单时间</el-col>
+            <el-col :span="18" class="other">{{ info.buy_time }}</el-col>
+          </el-col>
+          <el-col :span="24">
+            <el-col :span="6">支付时间</el-col>
+            <el-col :span="18" class="other">{{ info.pay_time || '未支付' }}</el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+const moment = require('moment');
+import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('order');
+export default {
+  name: 'form-1',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      info: {},
+      address: {},
+      list: [],
+      total_detail: {},
+      typeList: [],
+      statusList: [],
+      pay: {},
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'cancel', 'update']),
+    // 查询
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+        // 地址
+        this.$set(this, `address`, res.data.address);
+        // 商品
+        this.$set(this, `list`, res.data.goods);
+        // 实付金额
+        this.$set(this, `total_detail`, res.data.total_detail);
+        this.$set(this, `pay`, res.data.pay);
+      }
+    },
+    toUrl(url) {
+      if (url) {
+        window.open(url, '_blank');
+      } else {
+        this.$message.error('该商品还未添加来源网址,无法跳转');
+      }
+    },
+    async toSales() {
+      this.$confirm('是否确认申请售后', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        let info = { order_id: this.id };
+        let res = await this.cancel(info);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `取消订单成功` });
+          this.toBack();
+        }
+      });
+    },
+    // 返回
+    toBack() {
+      window.history.go('-1');
+    },
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    margin: 10px 0 0 20%;
+    padding: 5px;
+    .add {
+      border-bottom: 2px dashed #ccc;
+      margin: 0 0 5px 0;
+      padding: 5px 0;
+    }
+    .shop {
+      padding: 4px 0;
+      font-size: 18px;
+      border-bottom: 1px solid #ccc;
+    }
+    .goods {
+      padding: 10px 0;
+      .money {
+        text-align: right;
+      }
+    }
+    .other {
+      text-align: right;
+      word-break: break-all;
+      p {
+        color: red;
+      }
+      .spanfour {
+        color: blue;
+      }
+    }
+    .el-col {
+      margin: 4px 0;
+    }
+  }
+}
+</style>

+ 416 - 0
src/views/platmanag/order/detail_sales_orderDetail.vue

@@ -0,0 +1,416 @@
+<template>
+  <div id="form-1">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight">
+        <el-col class="top-btn">
+          <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
+        </el-col>
+        <el-col :span="9" class="one">
+          <el-col :span="24" class="add">
+            <el-col :span="2">
+              <i class="el-icon-location"></i>
+            </el-col>
+            <el-col :span="22">
+              <el-col>
+                <p>{{ address.name }},{{ address.phone }}</p>
+              </el-col>
+              <el-col>
+                <p>{{ address.province }} , {{ address.city }} , {{ address.area }} , {{ address.address }}</p>
+              </el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ shop.name }}</el-col>
+          <el-col :span="24" v-for="(item, index) in list" :key="index">
+            <el-col :span="24" class="goods bode">
+              <el-col :span="6"><el-image :src="item.goods.file[0].url"></el-image></el-col>
+              <el-col :span="18">
+                <el-col :span="12">
+                  <el-col>
+                    <p>{{ item.goods.name }}</p>
+                  </el-col>
+                  <el-col>
+                    <p>规格:{{ item.name }}</p>
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="money">
+                  <el-col>
+                    <p v-if="info.type == '0'">¥{{ item.sell_money }}</p>
+                    <p v-else-if="info.type == '1'">¥{{ item.group_config.money }}</p>
+                  </el-col>
+                  <el-col>
+                    <p>X{{ item.buy_num }}</p>
+                  </el-col>
+                  <el-col>
+                    <span class="spanfour" style="color: blue" @click="toUrl(item.goods.url)"> 查看商品来源:{{ item.goods.source }}</span>
+                  </el-col>
+                  <el-col>
+                    <p>{{ item.is_afterSale == true ? '已申请售后' : '未申请售后' }}</p>
+                  </el-col>
+                  <el-col>
+                    <p>{{ item.is_rate == true ? '已评价' : '未评价' }}</p>
+                  </el-col>
+                </el-col>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="bode">
+              <el-col :span="6">运费</el-col>
+              <el-col :span="18" class="other" v-if="!item.goods.freight == '0'">{{ item.goods.freight }}</el-col>
+              <el-col :span="18" class="other" v-else>包邮</el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="bode">
+            <el-col :span="6">订单备注</el-col>
+            <el-col :span="18" class="other" v-if="info.remarks">{{ info.remarks }}</el-col>
+            <el-col :span="18" class="other" v-else>暂无备注</el-col>
+          </el-col>
+          <el-col :span="24" class="bode">
+            <el-col :span="6">配送方式</el-col>
+            <el-col :span="18" class="other">快递配送</el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total bode">
+            <el-col :span="6">快递费</el-col>
+            <el-col :span="18" class="other">
+              <p>¥{{ total_detail.freight_total }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total bode">
+            <el-col :span="8">优惠后实付金额</el-col>
+            <el-col :span="16" class="other">
+              <p>¥{{ pay.pay_money }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="bode">
+            <el-col :span="6">下单时间</el-col>
+            <el-col :span="18" class="other">{{ info.buy_time }}</el-col>
+          </el-col>
+          <el-col :span="24" class="bode">
+            <el-col :span="6">支付时间</el-col>
+            <el-col :span="18" class="other">{{ info.pay_time }}</el-col>
+          </el-col>
+          <el-col :span="24" class="bode" v-if="info.status == '3'">
+            <el-col :span="6">寄出运单号</el-col>
+            <el-col :span="18" class="other">{{ transport.shop_transport_no || '暂无单号' }}</el-col>
+          </el-col>
+          <el-col :span="24" class="bode" v-if="info.status == '3'">
+            <el-col :span="6">寄出快递类型</el-col>
+            <el-col :span="18" class="other">{{ transport.shop_transport_name || '暂无快递信息' }}</el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="9" class="one">
+          <el-button type="primary" @click="toSales('1')" v-if="this.status == '1'"> 取消订单 </el-button>
+          <el-button type="primary" @click="toSales('2')" v-if="this.status == '2'"> 拒收 </el-button>
+          <el-col v-if="this.status == '3'">
+            <el-form :model="form" :rules="rules" ref="form" label-width="180px">
+              <el-col :span="24">
+                <el-form-item label="售后商品" prop="goods">
+                  <el-select v-model="form.goods" clearable filterable placeholder="请选择售后商品" size="small" style="width: 100%" @change="goodsChange">
+                    <el-option v-for="i in list" :key="i.goods.name" :label="i.goods.name" :value="i.id"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="售后类型" prop="type">
+                  <el-select v-model="form.type" clearable filterable placeholder="请选择售后类型" size="small" style="width: 100%" @change="typeChange">
+                    <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24" v-if="this.form.type == '1' || this.form.type == '2'">
+                <el-form-item label="退款金额" prop="money">
+                  <el-input v-model="form.money" placeholder="请输入退款金额" size="small" type="Number" @input="toMoney"></el-input>
+                  <p>
+                    退款金额不得超过<span style="color: red">{{ payMoney.payTotal || '' }}</span
+                    >元
+                    <span @click="allMoney" style="color: blue; margin: 0 0 0 10px">全部退款</span>
+                  </p>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="申请理由" prop="reason">
+                  <el-select v-model="form.reason" clearable filterable placeholder="请选择申请理由" size="small" style="width: 100%">
+                    <el-option v-for="i in reasonList" :key="i.value" :label="i.label" :value="i.value"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="售后描述" prop="desc">
+                  <el-input v-model="form.desc" placeholder="请输入售后描述" size="small" type="textarea"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="附件" prop="file">
+                  <c-upload :url="url" v-model="form.file" :limit="6"></c-upload>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24" class="btn">
+                <el-button type="primary" size="mini" @click="onSubmit('form')">提交</el-button>
+                <el-button type="danger" size="mini" @click="toBack()">取消</el-button>
+              </el-col>
+            </el-form>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+const moment = require('moment');
+
+import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
+const { mapActions: orderDetail } = createNamespacedHelpers('orderDetail');
+const { mapActions } = createNamespacedHelpers('afterSale');
+const { mapActions: dictData } = createNamespacedHelpers('dictData');
+const { mapActions: sot } = createNamespacedHelpers('sot');
+
+export default {
+  name: 'form-1',
+  props: {},
+  components: { cUpload: () => import('@/components/usual/c-upload.vue') },
+  data: function () {
+    return {
+      info: {},
+      // 地址
+      address: {},
+      // 实付金额
+      total_detail: {},
+      // 商铺
+      shop: {},
+      // 运单号
+      transport: {},
+      pay: {},
+      // 商品列表
+      list: [],
+      // 物流
+      reverse: false,
+      activities: [],
+      activit: {},
+      // 订单状态
+      order_processList: [],
+      // 快递类型
+      shop_transport_typeList: [],
+      loading: false,
+      rules: {
+        goods: [{ required: true, message: '请选择商品', trigger: 'change' }],
+        type: [{ required: true, message: '请选择售后类型', trigger: 'change' }],
+        money: [{ required: true, message: '请输入金额', trigger: 'blur' }],
+      },
+      // 售后表单
+      form: {},
+      // 售后类型
+      typeList: [],
+      // 售后申请理由
+      reasonList: [],
+      // 退款金额
+      payMoney: {},
+      url: '/files/point/afterSale/upload',
+    };
+  },
+  async created() {
+    await this.searchOther();
+    await this.search();
+  },
+  methods: {
+    ...dictData({ dictQuery: 'query' }),
+    ...orderDetail({ orderFetch: 'fetch' }),
+    ...sot({ sotFetch: 'fetch' }),
+    ...mapActions(['query', 'cgfr', 'fetch', 'create', 'update']),
+    // 查询
+    async search() {
+      let res;
+      res = await this.orderFetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+        // 地址
+        this.$set(this, `address`, res.data.address);
+        this.$set(this, `shop`, res.data.shop);
+        // 商品
+        this.$set(this, `list`, res.data.goods);
+        // 应付金额
+        this.$set(this, `total_detail`, res.data.total_detail);
+        this.$set(this, `pay`, res.data.order.pay);
+      }
+    },
+    toUrl(url) {
+      if (url) {
+        window.open(url, '_blank');
+      } else {
+        this.$message.error('该商品还未添加来源网址,无法跳转');
+      }
+    },
+    handleSelect(value) {},
+    async toSales(status) {
+      if (status == '1') {
+        var info = { order_detail: this.id, type: '4' };
+      } else if (status == '2') {
+        var info = { order_detail: this.id, type: '5' };
+      }
+      this.$confirm('是否确认申请售后', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        let res = await this.create(info);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `申请售后成功` });
+          this.search();
+        }
+      });
+    },
+    // 选择商品
+    goodsChange(value) {
+      this.$set(this.form, `goods`, value);
+      this.typeChange(this.form.type || '');
+    },
+    // 选择类型
+    async typeChange(value) {
+      this.$set(this.form, `type`, value);
+      if (value != '3') {
+        let info = {
+          order_detail: this.id,
+          goods_id: this.form.goods,
+        };
+        let res = await this.cgfr(info);
+        if (this.$checkRes(res)) {
+          this.$set(this, `payMoney`, res.data);
+          this.allMoney();
+        }
+      }
+    },
+    // 全部退款
+    allMoney() {
+      this.$set(this.form, `money`, this.payMoney.payTotal);
+    },
+    // 输入金额
+    toMoney(val) {
+      if (val > this.payMoney.payTotal) {
+        this.$message.error('超过退款最大金额');
+        this.$set(this.form, `money`, '');
+      }
+    },
+    // 提交
+    async onSubmit(formName, val) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          this.$confirm('是否确认保存', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          }).then(async () => {
+            let form = this.form;
+            form.order_detail = this.id;
+
+            let res = await this.create(form);
+            if (this.$checkRes(res)) {
+              this.$message({ type: `success`, message: `申请售后成功` });
+              this.search();
+            }
+          });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 返回
+    toBack() {
+      window.history.go('-1');
+    },
+    // 查询其他信息
+    async searchOther() {
+      let res;
+      // 减免方式
+      res = await this.dictQuery({ code: 'order_process' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `order_processList`, res.data);
+      }
+      // 售后类型
+      res = await this.dictQuery({ code: 'afterSale_type' });
+      if (this.$checkRes(res)) {
+        let type = res.data.filter((i) => i.value != '4' && i.value != '5');
+        this.$set(this, `typeList`, type);
+      }
+      // 售后申请理由
+      res = await this.dictQuery({ code: 'afterSale_reason' });
+      if (this.$checkRes(res)) {
+        let type = res.data.filter((i) => i.value != '4' && i.value != '5');
+        this.$set(this, `reasonList`, res.data);
+      }
+    },
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+    status() {
+      return this.$route.query.status;
+    },
+  },
+  metaform() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    margin: 10px 0 0 5%;
+    padding: 5px;
+    .add {
+      border-bottom: 2px dashed #ccc;
+      margin: 0 0 5px 0;
+      padding: 5px 0;
+    }
+    .shop {
+      padding: 4px 0;
+      font-size: 18px;
+      border-bottom: 1px solid #ccc;
+    }
+    .goods {
+      padding: 10px 0;
+      .money {
+        text-align: right;
+      }
+    }
+    .other {
+      text-align: right;
+      word-break: break-all;
+      p {
+        color: red;
+      }
+      .spanfour {
+        color: blue;
+      }
+    }
+    .el-col {
+      margin: 3px 0;
+    }
+    .bode {
+      border-bottom: 1px solid rgb(238, 237, 237);
+    }
+    .form {
+      margin: 20px 0 0 0;
+    }
+  }
+}
+.btn {
+  text-align: center;
+}
+
+/deep/.el-timeline {
+  margin: 20px 0 0 0;
+  font-size: 16px;
+}
+/deep/.el-timeline-item__node:nth-child(1) {
+  background-color: green;
+}
+</style>

+ 8 - 1
src/views/platmanag/order/parts/card-1.vue

@@ -15,6 +15,7 @@
           :data="list"
           :total="total"
           @detail="toDetail"
+          @sales="toSales"
         >
         </data-table>
       </el-col>
@@ -36,7 +37,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '详情', method: 'detail' }],
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
       fields: [
         { label: '订单号', model: 'no' },
         { label: '下单时间', model: 'buy_time' },
@@ -80,6 +84,9 @@ export default {
     toDetail({ data }) {
       this.$router.push({ path: '/platmanag/order/detail_order', query: { id: data.id } });
     },
+    toSales({ data }) {
+      this.$router.push({ path: '/platmanag/order/detail_sales_order', query: { id: data.id } });
+    },
     // 重置
     toClose() {
       this.searchForm = {};

+ 8 - 4
src/views/platmanag/order/parts/card-2.vue

@@ -15,6 +15,7 @@
           :data="list"
           :total="total"
           @detail="toDetail"
+          @sales="toSales"
         >
         </data-table>
       </el-col>
@@ -37,7 +38,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '详情', method: 'detail' }],
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
       fields: [
         { label: '订单号', model: 'no' },
         { label: '下单时间', model: 'buy_time' },
@@ -73,13 +77,13 @@ export default {
         this.$set(this, 'total', res.total);
       }
     },
-    getTags(data) {
-      console.log(data);
-    },
     // 详情
     toDetail({ data }) {
       this.$router.push({ path: '/platmanag/order/detail_orderDetail', query: { id: data._id } });
     },
+    toSales({ data }) {
+      this.$router.push({ path: '/platmanag/order/detail_sales_orderDetail', query: { id: data._id, status: '1' } });
+    },
     toClose() {
       this.searchForm = {};
       this.search();

+ 9 - 2
src/views/platmanag/order/parts/card-3.vue

@@ -15,6 +15,7 @@
           :data="list"
           :total="total"
           @detail="toDetail"
+          @sales="toSales"
         >
         </data-table>
       </el-col>
@@ -37,7 +38,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '详情', method: 'detail' }],
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
       fields: [
         { label: '订单号', model: 'no' },
         { label: '下单时间', model: 'buy_time' },
@@ -59,7 +63,7 @@ export default {
     ...shop({ shopQuery: 'query' }),
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     // 查询
-    async search({ skip = 0,limit = this.$limit, ...info } = {}) {
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
       if (condition.buy_time) {
         condition[`buy_time@start`] = _.head(condition.buy_time);
@@ -76,6 +80,9 @@ export default {
     toDetail({ data }) {
       this.$router.push({ path: '/platmanag/order/detail_orderDetail', query: { id: data._id } });
     },
+    toSales({ data }) {
+      this.$router.push({ path: '/platmanag/order/detail_sales_orderDetail', query: { id: data._id, status: '2' } });
+    },
     toClose() {
       this.searchForm = {};
       this.search();

+ 9 - 2
src/views/platmanag/order/parts/card-4.vue

@@ -15,6 +15,7 @@
           :data="list"
           :total="total"
           @detail="toDetail"
+          @sales="toSales"
         >
         </data-table>
       </el-col>
@@ -37,7 +38,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '详情', method: 'detail' }],
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
       fields: [
         { label: '订单号', model: 'no' },
         { label: '下单时间', model: 'buy_time' },
@@ -59,7 +63,7 @@ export default {
     ...shop({ shopQuery: 'query' }),
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     // 查询
-    async search({ skip = 0,limit = this.$limit, ...info } = {}) {
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
       if (condition.buy_time) {
         condition[`buy_time@start`] = _.head(condition.buy_time);
@@ -76,6 +80,9 @@ export default {
     toDetail({ data }) {
       this.$router.push({ path: '/platmanag/order/detail_orderDetail', query: { id: data._id } });
     },
+    toSales({ data }) {
+      this.$router.push({ path: '/platmanag/order/detail_sales_orderDetail', query: { id: data._id, status: '3' } });
+    },
     toClose() {
       this.searchForm = {};
       this.search();

+ 49 - 2
src/views/platmanag/sales/detail.vue

@@ -93,7 +93,19 @@
         </el-col>
         <el-col :span="12" class="two">
           <steps-1 v-if="info.type == '1'" @exam="exam" :active="active" :form="form" :info="info"></steps-1>
-          <steps-2 v-if="info.type == '2'" @exam="exam" :active="active" :customer="customer" :activit="activit" :form="form" :info="info"></steps-2>
+          <steps-2
+            v-if="info.type == '2'"
+            @exam="exam"
+            :active="active"
+            :customer="customer"
+            :activit="activit"
+            :form="form"
+            :info="info"
+            :customerForm="customerForm"
+            :shop_transport_typeList="shop_transport_typeList"
+            @querySearch="querySearch"
+            @customerSubmit="customerSubmit"
+          ></steps-2>
           <steps-3
             v-if="info.type == '3'"
             @exam="exam"
@@ -106,6 +118,8 @@
             :customer="customer"
             :shopList="shopList"
             :transport="transport"
+            :customerForm="customerForm"
+            @customerSubmit="customerSubmit"
           ></steps-3>
           <steps-4 v-if="info.type == '4'" @exam="exam" :active="active"></steps-4>
           <steps-5 v-if="info.type == '5'" @exam="exam" :active="active"></steps-5>
@@ -159,6 +173,8 @@ export default {
       activit: {},
       active: 1,
       loading: true,
+      // 买家快递信息
+      customerForm: {},
     };
   },
   async created() {
@@ -224,6 +240,17 @@ export default {
             this.$set(this.form, `shop_transport_type`, this.transport.shop_transport_type);
             this.$set(this.form, `shop_transport_no`, this.transport.shop_transport_no);
           }
+          arr = await this.dictQuery({ code: 'transport_type', value: res.data.transport.customer_transport_type });
+          if (this.$checkRes(arr)) {
+            let type = arr.data.find((i) => i.value == res.data.transport.customer_transport_type);
+            if (type) {
+              res.data.transport.customer_transport_name = type.label;
+              this.querySearch(type.label);
+            }
+            this.$set(this, `transport`, res.data.transport);
+            this.$set(this.customerForm, `customer_transport_type`, this.transport.customer_transport_type);
+            this.$set(this.customerForm, `customer_transport_no`, this.transport.customer_transport_no);
+          }
           // 显示物流
           res = await this.getFetch(this.id);
           if (this.$checkRes(res)) {
@@ -233,9 +260,10 @@ export default {
                 this.$set(this, `customer`, customer);
                 customer[0].color = '#0bbd87';
                 if (res.data.customer.is_check == '已签收' && this.info.status == '3') this.$set(this, `active`, 3);
+                if (res.data.customer.is_check == '已签收' && this.info.status == '2') this.$set(this, `active`, 3);
               }
               if (res.data.shop) {
-                this.$set(this, `active`, 4);
+                if (res.data.status == '3') this.$set(this, `active`, 4);
                 let shopList = res.data.shop.list;
                 this.$set(this, `shopList`, shopList);
                 shopList[0].color = '#0bbd87';
@@ -283,6 +311,25 @@ export default {
         this.$set(this, 'shop_transport_typeList', res.data);
       }
     },
+    async customerSubmit(val) {
+      let info = this.info;
+      let res;
+      if (info.transport) {
+        info.transport = {
+          ...info.transport,
+          customer_transport_no: val.customer_transport_no,
+          customer_transport_type: val.customer_transport_type,
+        };
+      } else {
+        let transport = { customer_transport_no: val.customer_transport_no, customer_transport_type: val.customer_transport_type };
+        info.transport = transport;
+      }
+      if (info.id) res = await this.update(info);
+      if (this.$checkRes(res)) {
+        this.$message({ type: `success`, message: `维护信息成功` });
+        this.search();
+      }
+    },
     async onSubmit(val) {
       let info = this.info;
       let res;

+ 52 - 3
src/views/platmanag/sales/parts/steps-2.vue

@@ -14,8 +14,8 @@
             <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
               <el-form-item label="退款金额" prop="money">
                 <el-input v-model="form.money" placeholder="请输入退款金额" size="small" type="Number" @input="toMoney"></el-input>
-                <p class="p1">
-                  用于部分退款,退款金额不得超过<span>{{ info.money || '退款最大金额' }}元</span>
+                <p>
+                  用于部分退款,退款金额不得超过<span style="color: red">{{ info.money || '退款最大金额' }}元</span>
                 </p>
               </el-form-item>
               <el-form-item>
@@ -27,6 +27,26 @@
             </el-form>
           </el-col>
           <el-col v-if="active == 2 || active == 3">
+            <el-col>
+              <data-form :fields="infoFields" :rules="rules" v-model="customerForm" labelWidth="150px" @save="customerSubmit" v-if="active == 2">
+                <template #customer_transport_type>
+                  <el-select
+                    v-model="customerForm.customer_transport_type"
+                    filterable
+                    remote
+                    reserve-keyword
+                    placeholder="请选择快递类型,运单号,同时填入"
+                    :remote-method="querySearch"
+                    :loading="loading"
+                    @change="handleSelect"
+                    size="small"
+                    style="width: 100%"
+                  >
+                    <el-option v-for="item in shop_transport_typeList" :key="item.id" :label="item.label" :value="item.value"> </el-option>
+                  </el-select>
+                </template>
+              </data-form>
+            </el-col>
             <el-col :span="24" style="text-align: center; margin-top: 15px">
               <el-button type="primary" style="margin: 10px 0" @click="exam('-2')" v-if="active == 3">已退货</el-button>
             </el-col>
@@ -59,11 +79,28 @@ const _ = require('lodash');
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'steps-1',
-  props: { active: { type: Number }, customer: { type: Array }, activit: { type: Object }, form: { type: Object }, info: { type: Object } },
+  props: {
+    active: { type: Number },
+    customer: { type: Array },
+    activit: { type: Object },
+    form: { type: Object },
+    customerForm: { type: Object },
+    info: { type: Object },
+    shop_transport_typeList: { type: Array },
+  },
   components: {},
   data: function () {
     return {
+      loading: false,
       reverse: false,
+      infoFields: [
+        { label: '快递单号', model: 'customer_transport_no' },
+        { label: '快递类型', model: 'customer_transport_type', custom: true },
+      ],
+      rules: {
+        customer_transport_no: [{ required: true, message: '请输入快递单号', trigger: 'blur' }],
+        customer_transport_type: [{ required: true, message: '请选择快递类型', trigger: 'change' }],
+      },
     };
   },
   created() {},
@@ -71,6 +108,18 @@ export default {
     next(active) {
       this.$emit('next', active);
     },
+    onSubmit() {
+      this.$emit('onSubmit', this.form);
+    },
+    customerSubmit() {
+      this.$emit('customerSubmit', this.customerForm);
+    },
+    async querySearch(value) {
+      this.loading = true;
+      this.$emit('querySearch', value);
+      this.loading = false;
+    },
+    handleSelect(value) {},
     exam(status) {
       this.$emit('exam', status);
     },

+ 30 - 0
src/views/platmanag/sales/parts/steps-3.vue

@@ -17,6 +17,24 @@
             <el-button type="primary" @click="exam('!3')">拒绝</el-button>
           </el-col>
           <el-col v-if="active == 2">
+            <data-form :fields="customerFields" :rules="customerrules" v-model="customerForm" labelWidth="150px" @save="customerSubmit">
+              <template #customer_transport_type>
+                <el-select
+                  v-model="customerForm.customer_transport_type"
+                  filterable
+                  remote
+                  reserve-keyword
+                  placeholder="请选择快递类型,运单号,同时填入"
+                  :remote-method="querySearch"
+                  :loading="loading"
+                  @change="handleSelect"
+                  size="small"
+                  style="width: 100%"
+                >
+                  <el-option v-for="item in shop_transport_typeList" :key="item.id" :label="item.label" :value="item.value"> </el-option>
+                </el-select>
+              </template>
+            </data-form>
             <el-col :span="24">
               <el-timeline :reverse="reverse">
                 <el-timeline-item v-for="(activity, index) in customer" :key="index" :timestamp="activity.time" :color="activity.color">
@@ -90,6 +108,7 @@ export default {
     shopList: { type: Array },
     activit: { type: Object },
     transport: { type: Object },
+    customerForm: { type: Object },
   },
   components: {},
   data: function () {
@@ -104,6 +123,14 @@ export default {
         shop_transport_no: [{ required: true, message: '请输入快递单号', trigger: 'blur' }],
         shop_transport_type: [{ required: true, message: '请选择快递类型', trigger: 'change' }],
       },
+      customerFields: [
+        { label: '快递单号', model: 'customer_transport_no' },
+        { label: '快递类型', model: 'customer_transport_type', custom: true },
+      ],
+      customerrules: {
+        customer_transport_no: [{ required: true, message: '请输入快递单号', trigger: 'blur' }],
+        customer_transport_type: [{ required: true, message: '请选择快递类型', trigger: 'change' }],
+      },
     };
   },
   created() {},
@@ -114,6 +141,9 @@ export default {
     onSubmit() {
       this.$emit('onSubmit', this.form);
     },
+    customerSubmit() {
+      this.$emit('customerSubmit', this.customerForm);
+    },
     async querySearch(value) {
       this.loading = true;
       this.$emit('querySearch', value);

+ 206 - 0
src/views/selfShop/order/detail_sales_order.vue

@@ -0,0 +1,206 @@
+<template>
+  <div id="form-1">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight">
+        <el-col class="top-btn">
+          <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
+        </el-col>
+        <el-col :span="8" class="one">
+          <el-col :span="24" class="add">
+            <el-col :span="2">
+              <i class="el-icon-location"></i>
+            </el-col>
+            <el-col :span="22">
+              <p>{{ address.name }},{{ address.phone }}</p>
+              <p>{{ address.province }} , {{ address.city }} , {{ address.area }} , {{ address.address }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" v-for="(item, index) in list" :key="index">
+            <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ item.shop_name }}</el-col>
+            <el-col :span="24" v-for="(goods, index) in item.goods" :key="index">
+              <el-col :span="24" class="goods">
+                <el-col :span="6"><el-image :src="goods.goods.file[0].url"></el-image></el-col>
+                <el-col :span="18">
+                  <el-col :span="12">
+                    <p>{{ goods.goods.name }}</p>
+                    <p>规格:{{ goods.name }}</p>
+                  </el-col>
+                  <el-col :span="12" class="money">
+                    <p v-if="info.type == '0'">¥{{ goods.sell_money }}</p>
+                    <p v-else-if="info.type == '1'">¥{{ goods.group_config.money }}</p>
+                    <p>X{{ goods.buy_num }}</p>
+                    <el-col>
+                      <span class="spanfour" style="color: blue" @click="toUrl(goods.goods.url)"> 查看商品来源:{{ goods.goods.source }}</span>
+                    </el-col>
+                    <el-button type="primary" @click="toSales()"> 取消订单 </el-button>
+                  </el-col>
+                </el-col>
+              </el-col>
+              <el-col :span="24">
+                <el-col :span="6">运费</el-col>
+                <el-col :span="18" class="other" v-if="!goods.freight == '0'">{{ goods.freight }}</el-col>
+                <el-col :span="18" class="other" v-else>包邮</el-col>
+              </el-col>
+              <el-col :span="24">
+                <el-col :span="6">订单备注</el-col>
+                <el-col :span="18" class="other" v-if="item.remarks">{{ item.remarks }}</el-col>
+                <el-col :span="18" class="other" v-else>暂无备注</el-col>
+              </el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24">
+            <el-col :span="6">配送方式</el-col>
+            <el-col :span="18" class="other">快递配送</el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total">
+            <el-col :span="6">商品金额</el-col>
+            <el-col :span="18" class="other">
+              <p>¥{{ total_detail.goods_total }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total">
+            <el-col :span="6">快递费</el-col>
+            <el-col :span="18" class="other">
+              <p>¥{{ total_detail.freight_total }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total">
+            <el-col :span="8">优惠后应付金额</el-col>
+            <el-col :span="16" class="other">
+              <p>¥{{ pay.pay_money }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24">
+            <el-col :span="6">下单时间</el-col>
+            <el-col :span="18" class="other">{{ info.buy_time }}</el-col>
+          </el-col>
+          <el-col :span="24">
+            <el-col :span="6">支付时间</el-col>
+            <el-col :span="18" class="other">{{ info.pay_time || '未支付' }}</el-col>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+const moment = require('moment');
+import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
+const { mapActions } = createNamespacedHelpers('order');
+export default {
+  name: 'form-1',
+  props: {},
+  components: {},
+  data: function () {
+    return {
+      info: {},
+      address: {},
+      list: [],
+      total_detail: {},
+      typeList: [],
+      statusList: [],
+      pay: {},
+    };
+  },
+  async created() {
+    await this.search();
+  },
+  methods: {
+    ...mapActions(['query', 'fetch', 'create', 'cancel', 'update']),
+    // 查询
+    async search() {
+      let res = await this.fetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+        // 地址
+        this.$set(this, `address`, res.data.address);
+        // 商品
+        this.$set(this, `list`, res.data.goods);
+        // 实付金额
+        this.$set(this, `total_detail`, res.data.total_detail);
+        this.$set(this, `pay`, res.data.pay);
+      }
+    },
+    toUrl(url) {
+      if (url) {
+        window.open(url, '_blank');
+      } else {
+        this.$message.error('该商品还未添加来源网址,无法跳转');
+      }
+    },
+    async toSales() {
+      this.$confirm('是否确认申请售后', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        let info = { order_id: this.id };
+        let res = await this.cancel(info);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `取消订单成功` });
+          this.toBack();
+        }
+      });
+    },
+    // 返回
+    toBack() {
+      window.history.go('-1');
+    },
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    margin: 10px 0 0 20%;
+    padding: 5px;
+    .add {
+      border-bottom: 2px dashed #ccc;
+      margin: 0 0 5px 0;
+      padding: 5px 0;
+    }
+    .shop {
+      padding: 4px 0;
+      font-size: 18px;
+      border-bottom: 1px solid #ccc;
+    }
+    .goods {
+      padding: 10px 0;
+      .money {
+        text-align: right;
+      }
+    }
+    .other {
+      text-align: right;
+      word-break: break-all;
+      p {
+        color: red;
+      }
+      .spanfour {
+        color: blue;
+      }
+    }
+    .el-col {
+      margin: 4px 0;
+    }
+  }
+}
+</style>

+ 416 - 0
src/views/selfShop/order/detail_sales_orderDetail.vue

@@ -0,0 +1,416 @@
+<template>
+  <div id="form-1">
+    <el-row>
+      <el-col :span="24" class="main animate__animated animate__backInRight">
+        <el-col class="top-btn">
+          <el-button type="primary" size="mini" @click="toBack()">返回</el-button>
+        </el-col>
+        <el-col :span="9" class="one">
+          <el-col :span="24" class="add">
+            <el-col :span="2">
+              <i class="el-icon-location"></i>
+            </el-col>
+            <el-col :span="22">
+              <el-col>
+                <p>{{ address.name }},{{ address.phone }}</p>
+              </el-col>
+              <el-col>
+                <p>{{ address.province }} , {{ address.city }} , {{ address.area }} , {{ address.address }}</p>
+              </el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="shop"> <i class="el-icon-s-shop"></i>{{ shop.name }}</el-col>
+          <el-col :span="24" v-for="(item, index) in list" :key="index">
+            <el-col :span="24" class="goods bode">
+              <el-col :span="6"><el-image :src="item.goods.file[0].url"></el-image></el-col>
+              <el-col :span="18">
+                <el-col :span="12">
+                  <el-col>
+                    <p>{{ item.goods.name }}</p>
+                  </el-col>
+                  <el-col>
+                    <p>规格:{{ item.name }}</p>
+                  </el-col>
+                </el-col>
+                <el-col :span="12" class="money">
+                  <el-col>
+                    <p v-if="info.type == '0'">¥{{ item.sell_money }}</p>
+                    <p v-else-if="info.type == '1'">¥{{ item.group_config.money }}</p>
+                  </el-col>
+                  <el-col>
+                    <p>X{{ item.buy_num }}</p>
+                  </el-col>
+                  <el-col>
+                    <span class="spanfour" style="color: blue" @click="toUrl(item.goods.url)"> 查看商品来源:{{ item.goods.source }}</span>
+                  </el-col>
+                  <el-col>
+                    <p>{{ item.is_afterSale == true ? '已申请售后' : '未申请售后' }}</p>
+                  </el-col>
+                  <el-col>
+                    <p>{{ item.is_rate == true ? '已评价' : '未评价' }}</p>
+                  </el-col>
+                </el-col>
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="bode">
+              <el-col :span="6">运费</el-col>
+              <el-col :span="18" class="other" v-if="!item.goods.freight == '0'">{{ item.goods.freight }}</el-col>
+              <el-col :span="18" class="other" v-else>包邮</el-col>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="bode">
+            <el-col :span="6">订单备注</el-col>
+            <el-col :span="18" class="other" v-if="info.remarks">{{ info.remarks }}</el-col>
+            <el-col :span="18" class="other" v-else>暂无备注</el-col>
+          </el-col>
+          <el-col :span="24" class="bode">
+            <el-col :span="6">配送方式</el-col>
+            <el-col :span="18" class="other">快递配送</el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total bode">
+            <el-col :span="6">快递费</el-col>
+            <el-col :span="18" class="other">
+              <p>¥{{ total_detail.freight_total }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="goods_total bode">
+            <el-col :span="8">优惠后实付金额</el-col>
+            <el-col :span="16" class="other">
+              <p>¥{{ pay.pay_money }}</p>
+            </el-col>
+          </el-col>
+          <el-col :span="24" class="bode">
+            <el-col :span="6">下单时间</el-col>
+            <el-col :span="18" class="other">{{ info.buy_time }}</el-col>
+          </el-col>
+          <el-col :span="24" class="bode">
+            <el-col :span="6">支付时间</el-col>
+            <el-col :span="18" class="other">{{ info.pay_time }}</el-col>
+          </el-col>
+          <el-col :span="24" class="bode" v-if="info.status == '3'">
+            <el-col :span="6">寄出运单号</el-col>
+            <el-col :span="18" class="other">{{ transport.shop_transport_no || '暂无单号' }}</el-col>
+          </el-col>
+          <el-col :span="24" class="bode" v-if="info.status == '3'">
+            <el-col :span="6">寄出快递类型</el-col>
+            <el-col :span="18" class="other">{{ transport.shop_transport_name || '暂无快递信息' }}</el-col>
+          </el-col>
+        </el-col>
+        <el-col :span="9" class="one">
+          <el-button type="primary" @click="toSales('1')" v-if="this.status == '1'"> 取消订单 </el-button>
+          <el-button type="primary" @click="toSales('2')" v-if="this.status == '2'"> 拒收 </el-button>
+          <el-col v-if="this.status == '3'">
+            <el-form :model="form" :rules="rules" ref="form" label-width="180px">
+              <el-col :span="24">
+                <el-form-item label="售后商品" prop="goods">
+                  <el-select v-model="form.goods" clearable filterable placeholder="请选择售后商品" size="small" style="width: 100%" @change="goodsChange">
+                    <el-option v-for="i in list" :key="i.goods.name" :label="i.goods.name" :value="i.id"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="售后类型" prop="type">
+                  <el-select v-model="form.type" clearable filterable placeholder="请选择售后类型" size="small" style="width: 100%" @change="typeChange">
+                    <el-option v-for="i in typeList" :key="i.value" :label="i.label" :value="i.value"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24" v-if="this.form.type == '1' || this.form.type == '2'">
+                <el-form-item label="退款金额" prop="money">
+                  <el-input v-model="form.money" placeholder="请输入退款金额" size="small" type="Number" @input="toMoney"></el-input>
+                  <p>
+                    退款金额不得超过<span style="color: red">{{ payMoney.payTotal || '' }}</span
+                    >元
+                    <span @click="allMoney" style="color: blue; margin: 0 0 0 10px">全部退款</span>
+                  </p>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="申请理由" prop="reason">
+                  <el-select v-model="form.reason" clearable filterable placeholder="请选择申请理由" size="small" style="width: 100%">
+                    <el-option v-for="i in reasonList" :key="i.value" :label="i.label" :value="i.value"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="售后描述" prop="desc">
+                  <el-input v-model="form.desc" placeholder="请输入售后描述" size="small" type="textarea"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="附件" prop="file">
+                  <c-upload :url="url" v-model="form.file" :limit="6"></c-upload>
+                </el-form-item>
+              </el-col>
+              <el-col :span="24" class="btn">
+                <el-button type="primary" size="mini" @click="onSubmit('form')">提交</el-button>
+                <el-button type="danger" size="mini" @click="toBack()">取消</el-button>
+              </el-col>
+            </el-form>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+const _ = require('lodash');
+const moment = require('moment');
+
+import { mapState, mapGetters, createNamespacedHelpers } from 'vuex';
+const { mapActions: orderDetail } = createNamespacedHelpers('orderDetail');
+const { mapActions } = createNamespacedHelpers('afterSale');
+const { mapActions: dictData } = createNamespacedHelpers('dictData');
+const { mapActions: sot } = createNamespacedHelpers('sot');
+
+export default {
+  name: 'form-1',
+  props: {},
+  components: { cUpload: () => import('@/components/usual/c-upload.vue') },
+  data: function () {
+    return {
+      info: {},
+      // 地址
+      address: {},
+      // 实付金额
+      total_detail: {},
+      // 商铺
+      shop: {},
+      // 运单号
+      transport: {},
+      pay: {},
+      // 商品列表
+      list: [],
+      // 物流
+      reverse: false,
+      activities: [],
+      activit: {},
+      // 订单状态
+      order_processList: [],
+      // 快递类型
+      shop_transport_typeList: [],
+      loading: false,
+      rules: {
+        goods: [{ required: true, message: '请选择商品', trigger: 'change' }],
+        type: [{ required: true, message: '请选择售后类型', trigger: 'change' }],
+        money: [{ required: true, message: '请输入金额', trigger: 'blur' }],
+      },
+      // 售后表单
+      form: {},
+      // 售后类型
+      typeList: [],
+      // 售后申请理由
+      reasonList: [],
+      // 退款金额
+      payMoney: {},
+      url: '/files/point/afterSale/upload',
+    };
+  },
+  async created() {
+    await this.searchOther();
+    await this.search();
+  },
+  methods: {
+    ...dictData({ dictQuery: 'query' }),
+    ...orderDetail({ orderFetch: 'fetch' }),
+    ...sot({ sotFetch: 'fetch' }),
+    ...mapActions(['query', 'cgfr', 'fetch', 'create', 'update']),
+    // 查询
+    async search() {
+      let res;
+      res = await this.orderFetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `info`, res.data);
+        // 地址
+        this.$set(this, `address`, res.data.address);
+        this.$set(this, `shop`, res.data.shop);
+        // 商品
+        this.$set(this, `list`, res.data.goods);
+        // 应付金额
+        this.$set(this, `total_detail`, res.data.total_detail);
+        this.$set(this, `pay`, res.data.order.pay);
+      }
+    },
+    toUrl(url) {
+      if (url) {
+        window.open(url, '_blank');
+      } else {
+        this.$message.error('该商品还未添加来源网址,无法跳转');
+      }
+    },
+    handleSelect(value) {},
+    async toSales(status) {
+      if (status == '1') {
+        var info = { order_detail: this.id, type: '4' };
+      } else if (status == '2') {
+        var info = { order_detail: this.id, type: '5' };
+      }
+      this.$confirm('是否确认申请售后', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(async () => {
+        let res = await this.create(info);
+        if (this.$checkRes(res)) {
+          this.$message({ type: `success`, message: `申请售后成功` });
+          this.search();
+        }
+      });
+    },
+    // 选择商品
+    goodsChange(value) {
+      this.$set(this.form, `goods`, value);
+      this.typeChange(this.form.type || '');
+    },
+    // 选择类型
+    async typeChange(value) {
+      this.$set(this.form, `type`, value);
+      if (value != '3') {
+        let info = {
+          order_detail: this.id,
+          goods_id: this.form.goods,
+        };
+        let res = await this.cgfr(info);
+        if (this.$checkRes(res)) {
+          this.$set(this, `payMoney`, res.data);
+          this.allMoney();
+        }
+      }
+    },
+    // 全部退款
+    allMoney() {
+      this.$set(this.form, `money`, this.payMoney.payTotal);
+    },
+    // 输入金额
+    toMoney(val) {
+      if (val > this.payMoney.payTotal) {
+        this.$message.error('超过退款最大金额');
+        this.$set(this.form, `money`, '');
+      }
+    },
+    // 提交
+    async onSubmit(formName, val) {
+      this.$refs[formName].validate(async (valid) => {
+        if (valid) {
+          this.$confirm('是否确认保存', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          }).then(async () => {
+            let form = this.form;
+            form.order_detail = this.id;
+
+            let res = await this.create(form);
+            if (this.$checkRes(res)) {
+              this.$message({ type: `success`, message: `申请售后成功` });
+              this.search();
+            }
+          });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    // 返回
+    toBack() {
+      window.history.go('-1');
+    },
+    // 查询其他信息
+    async searchOther() {
+      let res;
+      // 减免方式
+      res = await this.dictQuery({ code: 'order_process' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `order_processList`, res.data);
+      }
+      // 售后类型
+      res = await this.dictQuery({ code: 'afterSale_type' });
+      if (this.$checkRes(res)) {
+        let type = res.data.filter((i) => i.value != '4' && i.value != '5');
+        this.$set(this, `typeList`, type);
+      }
+      // 售后申请理由
+      res = await this.dictQuery({ code: 'afterSale_reason' });
+      if (this.$checkRes(res)) {
+        let type = res.data.filter((i) => i.value != '4' && i.value != '5');
+        this.$set(this, `reasonList`, res.data);
+      }
+    },
+  },
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+    status() {
+      return this.$route.query.status;
+    },
+  },
+  metaform() {
+    return { title: this.$route.meta.title };
+  },
+  watch: {
+    test: {
+      deep: true,
+      immediate: true,
+      handler(val) {},
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.main {
+  .one {
+    margin: 10px 0 0 5%;
+    padding: 5px;
+    .add {
+      border-bottom: 2px dashed #ccc;
+      margin: 0 0 5px 0;
+      padding: 5px 0;
+    }
+    .shop {
+      padding: 4px 0;
+      font-size: 18px;
+      border-bottom: 1px solid #ccc;
+    }
+    .goods {
+      padding: 10px 0;
+      .money {
+        text-align: right;
+      }
+    }
+    .other {
+      text-align: right;
+      word-break: break-all;
+      p {
+        color: red;
+      }
+      .spanfour {
+        color: blue;
+      }
+    }
+    .el-col {
+      margin: 3px 0;
+    }
+    .bode {
+      border-bottom: 1px solid rgb(238, 237, 237);
+    }
+    .form {
+      margin: 20px 0 0 0;
+    }
+  }
+}
+.btn {
+  text-align: center;
+}
+
+/deep/.el-timeline {
+  margin: 20px 0 0 0;
+  font-size: 16px;
+}
+/deep/.el-timeline-item__node:nth-child(1) {
+  background-color: green;
+}
+</style>

+ 9 - 2
src/views/selfShop/order/parts/card-1.vue

@@ -15,6 +15,7 @@
           :data="list"
           :total="total"
           @detail="toDetail"
+          @sales="toSales"
         >
         </data-table>
       </el-col>
@@ -35,7 +36,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '详情', method: 'detail' }],
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
       fields: [
         { label: '订单号', model: 'no' },
         { label: '下单时间', model: 'buy_time' },
@@ -53,7 +57,7 @@ export default {
   methods: {
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     // 查询
-    async search({ skip = 0,limit = this.$limit, ...info } = {}) {
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
       if (condition.buy_time) {
         condition[`buy_time@start`] = _.head(condition.buy_time);
@@ -70,6 +74,9 @@ export default {
     toDetail({ data }) {
       this.$router.push({ path: '/selfShop/order/detail_order', query: { id: data.id } });
     },
+    toSales({ data }) {
+      this.$router.push({ path: '/selfShop/order/detail_sales_order', query: { id: data.id } });
+    },
     toClose() {
       this.searchForm = {};
       this.search();

+ 9 - 3
src/views/selfShop/order/parts/card-3.vue

@@ -15,6 +15,7 @@
           :data="list"
           :total="total"
           @detail="toDetail"
+          @sales="toSales"
         >
         </data-table>
       </el-col>
@@ -27,7 +28,6 @@ const _ = require('lodash');
 
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions } = createNamespacedHelpers('orderDetail');
-
 export default {
   name: 'card-1',
   props: { statusList: { type: Array } },
@@ -37,7 +37,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '详情', method: 'detail' }],
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
       fields: [
         { label: '订单号', model: 'no' },
         { label: '下单时间', model: 'buy_time' },
@@ -56,7 +59,7 @@ export default {
   methods: {
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
     // 查询
-    async search({ skip = 0,limit = this.$limit, ...info } = {}) {
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
       if (condition.buy_time) {
         condition[`buy_time@start`] = _.head(condition.buy_time);
@@ -73,6 +76,9 @@ export default {
     toDetail({ data }) {
       this.$router.push({ path: '/selfShop/order/detail_orderDetail', query: { id: data._id } });
     },
+    toSales({ data }) {
+      this.$router.push({ path: '/selfShop/order/detail_sales_orderDetail', query: { id: data._id, status: '2' } });
+    },
     toClose() {
       this.searchForm = {};
       this.search();

+ 9 - 2
src/views/selfShop/order/parts/card-4.vue

@@ -15,6 +15,7 @@
           :data="list"
           :total="total"
           @detail="toDetail"
+          @sales="toSales"
         >
         </data-table>
       </el-col>
@@ -37,7 +38,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '详情', method: 'detail' }],
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
       fields: [
         { label: '订单号', model: 'no' },
         { label: '下单时间', model: 'buy_time' },
@@ -57,7 +61,7 @@ export default {
     ...mapActions(['query', 'fetch', 'create', 'update', 'delete']),
 
     // 查询
-    async search({ skip = 0,limit = this.$limit, ...info } = {}) {
+    async search({ skip = 0, limit = this.$limit, ...info } = {}) {
       let condition = _.cloneDeep(this.searchForm);
       if (condition.buy_time) {
         condition[`buy_time@start`] = _.head(condition.buy_time);
@@ -74,6 +78,9 @@ export default {
     toDetail({ data }) {
       this.$router.push({ path: '/selfShop/order/detail_orderDetail', query: { id: data._id } });
     },
+    toSales({ data }) {
+      this.$router.push({ path: '/selfShop/order/detail_sales_orderDetail', query: { id: data._id, status: '3' } });
+    },
     toClose() {
       this.searchForm = {};
       this.search();

+ 8 - 1
src/views/selfShop/order/parts/parts/detail-1.vue

@@ -20,6 +20,7 @@
             :data="list"
             :total="total"
             @detail="toDetail"
+            @sales="toSales"
           >
           </data-table>
         </el-col>
@@ -44,7 +45,10 @@ export default {
       searchForm: {},
       list: [],
       total: 0,
-      opera: [{ label: '详情', method: 'detail' }],
+      opera: [
+        { label: '详情', method: 'detail' },
+        { label: '售后', method: 'sales', type: 'danger' },
+      ],
       fields: [
         { label: '订单号', model: 'no' },
         { label: '下单时间', model: 'buy_time' },
@@ -87,6 +91,9 @@ export default {
     toDetail({ data }) {
       this.$router.push({ path: '/selfShop/order/detail_orderDetail', query: { id: data._id } });
     },
+    toSales({ data }) {
+      this.$router.push({ path: '/selfShop/order/detail_sales_orderDetail', query: { id: data._id, status: '1' } });
+    },
     toClose() {
       this.searchForm = {};
       this.search();

+ 49 - 2
src/views/selfShop/sales/detail.vue

@@ -93,7 +93,19 @@
         </el-col>
         <el-col :span="12" class="two">
           <steps-1 v-if="info.type == '1'" @exam="exam" :active="active" :form="form" :info="info"></steps-1>
-          <steps-2 v-if="info.type == '2'" @exam="exam" :active="active" :customer="customer" :activit="activit" :form="form" :info="info"></steps-2>
+          <steps-2
+            v-if="info.type == '2'"
+            @exam="exam"
+            :active="active"
+            :customer="customer"
+            :activit="activit"
+            :form="form"
+            :info="info"
+            :customerForm="customerForm"
+            :shop_transport_typeList="shop_transport_typeList"
+            @querySearch="querySearch"
+            @customerSubmit="customerSubmit"
+          ></steps-2>
           <steps-3
             v-if="info.type == '3'"
             @exam="exam"
@@ -106,6 +118,8 @@
             :customer="customer"
             :shopList="shopList"
             :transport="transport"
+            :customerForm="customerForm"
+            @customerSubmit="customerSubmit"
           ></steps-3>
           <steps-4 v-if="info.type == '4'" @exam="exam" :active="active"></steps-4>
           <steps-5 v-if="info.type == '5'" @exam="exam" :active="active"></steps-5>
@@ -159,6 +173,8 @@ export default {
       activit: {},
       active: 1,
       loading: true,
+      // 买家快递信息
+      customerForm: {},
     };
   },
   async created() {
@@ -224,6 +240,17 @@ export default {
             this.$set(this.form, `shop_transport_type`, this.transport.shop_transport_type);
             this.$set(this.form, `shop_transport_no`, this.transport.shop_transport_no);
           }
+          arr = await this.dictQuery({ code: 'transport_type', value: res.data.transport.customer_transport_type });
+          if (this.$checkRes(arr)) {
+            let type = arr.data.find((i) => i.value == res.data.transport.customer_transport_type);
+            if (type) {
+              res.data.transport.customer_transport_name = type.label;
+              this.querySearch(type.label);
+            }
+            this.$set(this, `transport`, res.data.transport);
+            this.$set(this.customerForm, `customer_transport_type`, this.transport.customer_transport_type);
+            this.$set(this.customerForm, `customer_transport_no`, this.transport.customer_transport_no);
+          }
           // 显示物流
           res = await this.getFetch(this.id);
           if (this.$checkRes(res)) {
@@ -233,9 +260,10 @@ export default {
                 this.$set(this, `customer`, customer);
                 customer[0].color = '#0bbd87';
                 if (res.data.customer.is_check == '已签收' && this.info.status == '3') this.$set(this, `active`, 3);
+                if (res.data.customer.is_check == '已签收' && this.info.status == '2') this.$set(this, `active`, 3);
               }
               if (res.data.shop) {
-                this.$set(this, `active`, 4);
+                if (res.data.status == '3') this.$set(this, `active`, 4);
                 let shopList = res.data.shop.list;
                 this.$set(this, `shopList`, shopList);
                 shopList[0].color = '#0bbd87';
@@ -283,6 +311,25 @@ export default {
         this.$set(this, 'shop_transport_typeList', res.data);
       }
     },
+    async customerSubmit(val) {
+      let info = this.info;
+      let res;
+      if (info.transport) {
+        info.transport = {
+          ...info.transport,
+          customer_transport_no: val.customer_transport_no,
+          customer_transport_type: val.customer_transport_type,
+        };
+      } else {
+        let transport = { customer_transport_no: val.customer_transport_no, customer_transport_type: val.customer_transport_type };
+        info.transport = transport;
+      }
+      if (info.id) res = await this.update(info);
+      if (this.$checkRes(res)) {
+        this.$message({ type: `success`, message: `维护信息成功` });
+        this.search();
+      }
+    },
     async onSubmit(val) {
       let info = this.info;
       let res;

+ 52 - 3
src/views/selfShop/sales/parts/steps-2.vue

@@ -14,8 +14,8 @@
             <el-form :model="form" ref="form" label-width="100px" class="demo-ruleForm">
               <el-form-item label="退款金额" prop="money">
                 <el-input v-model="form.money" placeholder="请输入退款金额" size="small" type="Number" @input="toMoney"></el-input>
-                <p class="p1">
-                  用于部分退款,退款金额不得超过<span>{{ info.money || '退款最大金额' }}元</span>
+                <p>
+                  用于部分退款,退款金额不得超过<span style="color: red">{{ info.money || '退款最大金额' }}元</span>
                 </p>
               </el-form-item>
               <el-form-item>
@@ -27,6 +27,26 @@
             </el-form>
           </el-col>
           <el-col v-if="active == 2 || active == 3">
+            <el-col>
+              <data-form :fields="infoFields" :rules="rules" v-model="customerForm" labelWidth="150px" @save="customerSubmit" v-if="active == 2">
+                <template #customer_transport_type>
+                  <el-select
+                    v-model="customerForm.customer_transport_type"
+                    filterable
+                    remote
+                    reserve-keyword
+                    placeholder="请选择快递类型,运单号,同时填入"
+                    :remote-method="querySearch"
+                    :loading="loading"
+                    @change="handleSelect"
+                    size="small"
+                    style="width: 100%"
+                  >
+                    <el-option v-for="item in shop_transport_typeList" :key="item.id" :label="item.label" :value="item.value"> </el-option>
+                  </el-select>
+                </template>
+              </data-form>
+            </el-col>
             <el-col :span="24" style="text-align: center; margin-top: 15px">
               <el-button type="primary" style="margin: 10px 0" @click="exam('-2')" v-if="active == 3">已退货</el-button>
             </el-col>
@@ -59,11 +79,28 @@ const _ = require('lodash');
 import { mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'steps-1',
-  props: { active: { type: Number }, customer: { type: Array }, activit: { type: Object }, form: { type: Object }, info: { type: Object } },
+  props: {
+    active: { type: Number },
+    customer: { type: Array },
+    activit: { type: Object },
+    form: { type: Object },
+    customerForm: { type: Object },
+    info: { type: Object },
+    shop_transport_typeList: { type: Array },
+  },
   components: {},
   data: function () {
     return {
+      loading: false,
       reverse: false,
+      infoFields: [
+        { label: '快递单号', model: 'customer_transport_no' },
+        { label: '快递类型', model: 'customer_transport_type', custom: true },
+      ],
+      rules: {
+        customer_transport_no: [{ required: true, message: '请输入快递单号', trigger: 'blur' }],
+        customer_transport_type: [{ required: true, message: '请选择快递类型', trigger: 'change' }],
+      },
     };
   },
   created() {},
@@ -71,6 +108,18 @@ export default {
     next(active) {
       this.$emit('next', active);
     },
+    onSubmit() {
+      this.$emit('onSubmit', this.form);
+    },
+    customerSubmit() {
+      this.$emit('customerSubmit', this.customerForm);
+    },
+    async querySearch(value) {
+      this.loading = true;
+      this.$emit('querySearch', value);
+      this.loading = false;
+    },
+    handleSelect(value) {},
     exam(status) {
       this.$emit('exam', status);
     },

+ 30 - 0
src/views/selfShop/sales/parts/steps-3.vue

@@ -17,6 +17,24 @@
             <el-button type="primary" @click="exam('!3')">拒绝</el-button>
           </el-col>
           <el-col v-if="active == 2">
+            <data-form :fields="customerFields" :rules="customerrules" v-model="customerForm" labelWidth="150px" @save="customerSubmit">
+              <template #customer_transport_type>
+                <el-select
+                  v-model="customerForm.customer_transport_type"
+                  filterable
+                  remote
+                  reserve-keyword
+                  placeholder="请选择快递类型,运单号,同时填入"
+                  :remote-method="querySearch"
+                  :loading="loading"
+                  @change="handleSelect"
+                  size="small"
+                  style="width: 100%"
+                >
+                  <el-option v-for="item in shop_transport_typeList" :key="item.id" :label="item.label" :value="item.value"> </el-option>
+                </el-select>
+              </template>
+            </data-form>
             <el-col :span="24">
               <el-timeline :reverse="reverse">
                 <el-timeline-item v-for="(activity, index) in customer" :key="index" :timestamp="activity.time" :color="activity.color">
@@ -90,6 +108,7 @@ export default {
     shopList: { type: Array },
     activit: { type: Object },
     transport: { type: Object },
+    customerForm: { type: Object },
   },
   components: {},
   data: function () {
@@ -104,6 +123,14 @@ export default {
         shop_transport_no: [{ required: true, message: '请输入快递单号', trigger: 'blur' }],
         shop_transport_type: [{ required: true, message: '请选择快递类型', trigger: 'change' }],
       },
+      customerFields: [
+        { label: '快递单号', model: 'customer_transport_no' },
+        { label: '快递类型', model: 'customer_transport_type', custom: true },
+      ],
+      customerrules: {
+        customer_transport_no: [{ required: true, message: '请输入快递单号', trigger: 'blur' }],
+        customer_transport_type: [{ required: true, message: '请选择快递类型', trigger: 'change' }],
+      },
     };
   },
   created() {},
@@ -114,6 +141,9 @@ export default {
     onSubmit() {
       this.$emit('onSubmit', this.form);
     },
+    customerSubmit() {
+      this.$emit('customerSubmit', this.customerForm);
+    },
     async querySearch(value) {
       this.loading = true;
       this.$emit('querySearch', value);