Browse Source

Merge branch 'test' into 'master'

Test

See merge request quanshu/mp-ui-pc!189
zhong chunping 3 years ago
parent
commit
1848de4d5c

+ 8 - 0
src/api/business/goods.js

@@ -42,3 +42,11 @@ export function setGoodsStatus(data) {
     data
   })
 }
+export function setTableData(data) {
+  return request({
+    url: '/api/v1/mp/admin/goods/update/sortWeight',
+    method: 'post',
+    data,
+  })
+}
+

+ 9 - 0
src/api/business/order.js

@@ -128,3 +128,12 @@ export function channelOrderExport(data) {
     data
   })
 }
+
+// 经销商取消订单
+export function removeChannelOrder(data) {
+  return request({
+    url: '/api/v1/mp/admin/channel/order/order/cancel',
+    method: 'post',
+    data
+  })
+}

+ 21 - 1
src/api/business/ticket.js

@@ -28,7 +28,7 @@ export function ticketBoxDetail(data) {
   })
 }
 
-// 
+//
 export function urlschemaGeneratee(data) {
   return request({
     url: '/api/v1/mp/wx/urlschema/generate',
@@ -100,3 +100,23 @@ export function ticketBoxRemove(data) {
     data
   })
 }
+
+// 步进器修改
+export function setListData(data) {
+  return request({
+    url: '/api/v1/mp/admin/ticket/box/update/sortWeight',
+    method: 'post',
+    data
+  })
+}
+
+// 编辑盲票组
+export function setListDetail(data) {
+  return request({
+    url: '/api/v1/mp/admin/ticket/box/update',
+    method: 'post',
+    data
+  })
+}
+
+

+ 28 - 5
src/views/business/goods/add.vue

@@ -11,7 +11,6 @@
         <el-col :span="23">
           <el-form-item label="商品主图:" prop="picUrl">
             <Upload v-model="mainPicUrl" :limit="10" />
-            <br>
             <div class="tip">第一张图片将作为商品列表图片,最多上传10张,多张图片之间可随意调整位置,支持jpg、png格式,推荐750*750px;</div>
           </el-form-item>
         </el-col>
@@ -30,7 +29,7 @@
       </el-row>
       <el-row :gutter="40" style="width: 500px">
         <el-col :span="23">
-          <el-form-item label="商品分类" prop="categoryId">
+          <el-form-item label="商品分类:" prop="categoryId">
             <el-select
               v-model="addData.categoryId"
               placeholder="请选择商品分类"
@@ -43,7 +42,7 @@
       </el-row>
        <el-row :gutter="40" style="width: 500px">
         <el-col :span="23">
-          <el-form-item label="商品标签">
+          <el-form-item label="商品标签:">
             <el-select
               v-model="addData.tagIds"
               placeholder="请选择商品标签"
@@ -54,6 +53,12 @@
             </el-select>
           </el-form-item>
         </el-col>
+         <el-col :span="23">
+           <el-form-item label="商家信息:">
+             <Upload v-model="MerchantInformation" :limit="10" />
+             <div class="tip">上传商家营业执照</div>
+           </el-form-item>
+         </el-col>
       </el-row>
       <el-divider content-position="left">价格库存</el-divider>
       <el-row>
@@ -97,6 +102,12 @@
             </el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="23">
+          <el-form-item label="商品编码:" prop="goodsCode">
+            <el-input v-model="addData.goodsCode" type="text" placeholder="请输入商品编码">
+            </el-input>
+          </el-form-item>
+        </el-col>
         <el-col :span="23">
           <el-form-item label="库存:" prop="quantity">
             <el-input v-model="addData.quantity" type="number" placeholder="请输入商品库存">
@@ -188,6 +199,18 @@ export default {
       set(val) {
         this.$set(this.addData, 'picUrl', val.map(item => { return item.fileName }).toString())
       }
+    },
+    MerchantInformation:{
+      get() {
+        return this.addData.merchantInfo ? this.addData.merchantInfo.split(',').map(item => {
+          return {
+            fileName: item
+          }
+        }) : []
+      },
+      set(val) {
+        this.$set(this.addData, 'merchantInfo', val.map(item => { return item.fileName }).toString())
+      }
     }
   },
   created() {
@@ -195,11 +218,11 @@ export default {
     this.getGoodsTagItems()
     if (this.id) {
       getGoodsDetail(this.id).then(res => {
-        const { goodsId, title, picUrl, exchangeShow, multiSku, value, exchangePrice, cost, quantity, description, skuList, categoryId, tagIds } = res.data
+        const { goodsId, title, goodsCode, picUrl,merchantInfo, exchangeShow, multiSku, value, exchangePrice, cost, quantity, description, skuList, categoryId, tagIds } = res.data
         this.addData = {
           value: accDiv(value, 100),
           cost: cost == '' || cost == null ? '' : accDiv(cost, 100),
-          goodsId, title, picUrl, exchangeShow, multiSku, exchangePrice, quantity, description, skuList, categoryId, tagIds
+          goodsId, title, goodsCode, picUrl,merchantInfo, exchangeShow, multiSku, exchangePrice, quantity, description, skuList, categoryId, tagIds
         }
         if(description) {
           this.$refs.editor.setContent(description)

+ 7 - 0
src/views/business/goods/components/spec.vue

@@ -41,6 +41,7 @@
           <th rowspan="2" class="required"><span>*</span>价格(元)</th>
           <th rowspan="2" class="required"><span>*</span>兑换盲豆数量</th>
           <th rowspan="2">采购价格(元)</th>
+          <th rowspan="2">SKU编码</th>
           <th rowspan="2" class="required"><span>*</span>库存</th>
           <th rowspan="2">启用</th>
         </tr>
@@ -78,6 +79,11 @@
               <el-input v-model="sku.costY" />
             </el-form-item>
           </td>
+          <td class="pd">
+            <el-form-item :prop="`skuList.${index}.skuCode`">
+              <el-input v-model="sku.skuCode" />
+            </el-form-item>
+          </td>
           <td class="pd">
             <el-form-item :prop="`skuList.${index}.quantity`" :rules="{ required: true, message: '请输入库存', trigger: 'blur' }">
               <el-input-number v-model="sku.quantity" :min="0" @change="$event === 0 ? sku.status = false : sku.status = true" />
@@ -258,6 +264,7 @@ export default {
           picUrlArr: [],
           valueY: 0.00,
           costY: '',
+          skuCode:'',
           quantity: 0,
           status: true,
           properties

+ 40 - 15
src/views/business/goods/index.vue

@@ -78,7 +78,7 @@
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-    <el-table v-loading="loading" :data="tableData">
+    <el-table v-loading="loading" :data="tableData"  @sort-change="sortChannelId">
       <el-table-column label="商品ID" prop="goodsId" width="60" />
       <el-table-column label="商品图片" prop="picUrl" align="center">
         <template slot-scope="{row}">
@@ -93,32 +93,36 @@
         </template>
       </el-table-column>
       <el-table-column label="商品名称" prop="title" />
-      <el-table-column label="价格" prop="value">
+      <el-table-column label="价格" prop="value" sortable="custom">
         <template slot-scope="{row}">
           ¥{{$numberFormat(row.value)}}
         </template>
       </el-table-column>
-      <el-table-column label="采购价格" prop="cost">
+      <el-table-column label="采购价格" prop="cost" sortable="custom" min-width="100px">
         <template slot-scope="{row}">
           ¥{{$numberFormat(row.cost)}}
         </template>
       </el-table-column>
-      <el-table-column label="是否支持兑换" prop="exchangeShow">
+      <el-table-column label="是否支持兑换" prop="exchangeShow" min-width="100px">
         <template slot-scope="{row}">
           <span v-if="row.exchangeShow == '1'">支持</span>
           <span v-if="row.exchangeShow == '0'">不支持</span>
         </template>
       </el-table-column>
-      <el-table-column label="兑换盲豆数量" prop="exchangePrice" />
-      <el-table-column label="销量" prop="exchangedQty" />
-      <el-table-column label="库存" prop="quantity" />
+      <el-table-column label="兑换盲豆数量" prop="exchangePrice" sortable="custom" min-width="125" />
+      <el-table-column label="销量" prop="exchangedQty" sortable="custom" />
+      <el-table-column label="库存" prop="quantity" sortable="custom" />
       <el-table-column label="状态" prop="status">
         <template slot-scope="{row}">
           <el-tag :type="JSON.parse(row.status).value === 'on' ? 'success' : 'info'">{{ JSON.parse(row.status).desc }}</el-tag>
         </template>
       </el-table-column>
-      <!-- <el-table-column label="排序" prop="sort" /> -->
-      <el-table-column fixed="right" align="right" label="操作" width="140">
+      <el-table-column label="排序" prop="sortWeight"  sortable="custom" align="center" width="140px">
+        <template slot-scope="{row, $index}">
+            <el-input-number v-model="row.sortWeight" @change="handleSortChange($index,row.sortWeight)" controls-position="right" size="small"></el-input-number>
+        </template>
+      </el-table-column>
+      <el-table-column fixed="right" align="center" label="操作" width="140">
         <template slot-scope="{row}">
           <!-- <el-button v-hasPermi="['business:goods:query']" type="text">查看</el-button> -->
           <el-button v-hasPermi="['business:goods:edit']" type="text" @click="$router.push('/goods/edit?id=' + row.goodsId)">编辑</el-button>
@@ -133,7 +137,7 @@
 </template>
 <script>
 import { publicFileGetUrl } from "@/api/common"
-import { getGoodsList, delGoods, setGoodsStatus } from '@/api/business/goods'
+import { getGoodsList, delGoods, setGoodsStatus, setTableData} from '@/api/business/goods'
 import { goodsCategoryItems } from '@/api/business/category'
 import { goodsTagItems } from '@/api/business/tag'
 import { accMul } from '@/utils/util'
@@ -144,7 +148,7 @@ export default {
       IMG_URL: publicFileGetUrl,
       loading: false,
       showSearch: true,
-      queryParams: {},
+      queryParams: {pageNum: 1, pageSize: 20, orderByColumn: '', isAsc: '',},
       tableData: [],
       total: 0,
       goodsCategoryItemsList: [],
@@ -157,6 +161,26 @@ export default {
     this.getGoodsTagItems()
   },
   methods: {
+    //切换排序
+    sortChannelId(row){
+      if (row){
+        let prop =  row.prop == 'commRate' ? ('t1.'+ row.prop) : row.prop;
+        this.queryParams.orderByColumn = prop
+        this.queryParams.isAsc = row.order=='ascending'?"asc":"desc";
+        this.getList()
+      }
+    },
+
+    //步进器修改
+    handleSortChange(index,sortWeight){
+      this.tableData[index].sortWeight = sortWeight
+      let data = {
+        goodsId: this.tableData[index].goodsId,
+        sortWeight: this.tableData[index].sortWeight
+      }
+      setTableData(data)
+    },
+
     getGoodsCategoryItems(){
       goodsCategoryItems({}).then(res => {
         this.goodsCategoryItemsList = res && res.data
@@ -172,10 +196,10 @@ export default {
         return
       }
       this.loading = true
-      if (reset) {
-        this.queryParams = { pageNum: 1, pageSize: 20 }
-      }
-      getGoodsList('pageNum='+this.queryParams.pageNum + '&pageSize='+this.queryParams.pageSize+'&', {
+      // if (reset) {
+      //   this.queryParams = { pageNum: 1, pageSize: 20, orderByColumn: '', isAsc: '', }
+      // }
+      getGoodsList('pageNum='+this.queryParams.pageNum + '&pageSize='+this.queryParams.pageSize+'&orderByColumn='+ this.queryParams.orderByColumn +'&isAsc='+ this.queryParams.isAsc +'&', {
         title: this.queryParams.title,
         goodsId: this.queryParams.goodsId,
         categoryId: this.queryParams.categoryId,
@@ -190,6 +214,7 @@ export default {
         this.loading = false
         if (res.code === 0) {
           this.tableData = res.rows
+          // this.tableData.map()
           this.total = res.total
         }
       }).catch(() => {

+ 5 - 2
src/views/business/ticket/components/AwardsList.vue

@@ -12,6 +12,7 @@
               @change="handleChangeAll($event, item)"
               :min="0"
               size="small"
+              :disabled="item.isEdit"
             ></el-input-number>
           </div>
         </div>
@@ -82,7 +83,7 @@ export default {
     value: {
       type: Array,
       default: () => []
-    }
+    },
   },
   data() {
     return {
@@ -159,6 +160,8 @@ export default {
         this.awardsList[this.prizeIndex].prizeList = this.awardsList[this.prizeIndex].prizeList.concat(item);
       } else if (type == 2) {
         this.awardsList[this.prizeIndex].prizeList.push(item);
+      } else if (type == 3) {
+        this.awardsList = item
       }
       this.$emit('input', this.awardsList)
       this.$emit('close')
@@ -233,4 +236,4 @@ export default {
     padding: 10px;
   }
 }
-</style>
+</style>

+ 46 - 11
src/views/business/ticket/create.vue

@@ -6,7 +6,7 @@
       <div class="base-info-form">
         <el-form :model="form" :rules="rules" ref="form" label-width="100px">
           <el-form-item label="盲票类型" prop="type">
-            <el-radio-group v-model="form.type" size="small">
+            <el-radio-group v-model="form.type" size="small" :disabled="form.disabled">
               <el-radio label="online">线上盲票</el-radio>
               <el-radio label="offline">线下盲票</el-radio>
             </el-radio-group>
@@ -31,10 +31,10 @@
           </div>
           <el-form-item label="面值" prop="facePrice">
             <el-input
-              v-model="form.facePrice"
+              v-model="form.facePrice "
               style="width: 240px"
               size="small"
-              placeholder="请输入面值"
+              placeholder="请输入面值" :disabled="form.disabled"
             >
               <template slot="append">元</template>
             </el-input>
@@ -54,7 +54,7 @@
               v-model="form.quantity"
               style="width: 240px"
               size="small"
-              placeholder="请输入盲票总数"
+              placeholder="请输入盲票总数" :disabled="form.disabled"
             >
               <template slot="append">张</template>
             </el-input>
@@ -64,7 +64,7 @@
               v-model="form.pkgUnit"
               style="width: 240px"
               size="small"
-              placeholder="请输入每包张数"
+              placeholder="请输入每包张数" :disabled="form.disabled"
             >
               <template slot="append">张</template>
             </el-input>
@@ -98,7 +98,7 @@
           </div>
         </el-form>
       </div>
-      <div class="base-info-title">奖级设置</div>
+      <div class="base-info-title" >奖级设置</div>
       <!-- 奖级设置 -->
 
       <!-- 奖级列表 -->
@@ -118,13 +118,14 @@
     <!-- 添加券 -->
     <coupon-add :dialog-visible="couponTableVisible" @close="close" @confirmCoupon="confirmCoupon" v-if="couponTableVisible" />
     <!-- 添加盲豆 -->
-    <coin-add :dialog-visible="coinTableVisible" @close="close" @confirmCoin="confirmCoin" v-if="coinTableVisible" /> 
+    <coin-add :dialog-visible="coinTableVisible" @close="close" @confirmCoin="confirmCoin" v-if="coinTableVisible" />
   </div>
 </template>
 <script>
+import { publicFileGetUrl } from "@/api/common";
 import CustomFieldsMixin from "@/mixins/CustomFields";
-import { ticketBoxCreate } from "@/api/business/ticket";
-import { accMul } from "@/utils/util";
+import { ticketBoxCreate, setListDetail, ticketBoxDetail} from "@/api/business/ticket";
+import { accMul, accDiv } from "@/utils/util";
 import AwardsList from "./components/AwardsList"
 import GoodsAdd from "./components/GoodsAdd"
 import CouponAdd from "./components/CouponAdd"
@@ -141,6 +142,7 @@ export default {
   data() {
     return {
       loading: false,
+      id: this.$route.query.id,
       form: {
         type: "online", //盲票类型
         title: "", // 盲票名称
@@ -151,6 +153,7 @@ export default {
         pkgUnit: 200, // 张数
         pkgSalePrice: 0, // 单价
         saleCommRate: "", // 基数
+        disabled:false,
       },
       rules: {
         type: [
@@ -242,12 +245,37 @@ export default {
         }) : []
       },
       set(val) {
-        console.log('val', val)
         this.$set(this.form, 'picUrl', val.map(item => { return item.fileName }).toString())
       }
     }
   },
+  created() {
+    if (this.id) {
+      let data = {
+        boxId: this.id
+      }
+      ticketBoxDetail(data).then(res => {
+        const { awardsList, type, title, picUrl,facePrice, salePrice, quantity, pkgUnit, pkgSalePrice, saleCommRate } = res.data
+        this.form = { type: JSON.parse(type).value, disabled:true,
+          title, picUrl, facePrice:accDiv(facePrice, 100), salePrice:accDiv(salePrice, 100), quantity, pkgUnit, pkgSalePrice:accDiv(pkgSalePrice, 100), saleCommRate }
+        if(awardsList){
+          awardsList.forEach((item) => {
+              item.isEdit = true,
+              item.prizeList.forEach((ele) => {
+                (ele.picUrl = publicFileGetUrl + ele.picUrl.split(',')[0]),
+                (ele.prizeType = JSON.parse(ele.prizeType).value);
+              });
+          });
+          this.$nextTick(() => {
+            this.$refs.awards.add(3, awardsList)
+          })
+          this.awardsList = awardsList
+        }
+      })
+    }
+  },
   methods: {
+
     // 保存
     submitForm() {
       const subForm = this.$refs["form"];
@@ -323,6 +351,12 @@ export default {
             awardsList: filterArr2,
           };
 
+          if (this.id){
+            data.boxId = this.id
+          }
+
+          let request = this.id ? setListDetail : ticketBoxCreate;
+
           const loading = this.$loading({
             lock: true,
             text: "保存中",
@@ -330,7 +364,8 @@ export default {
             background: "rgba(0, 0, 0, 0.4)",
           });
 
-          ticketBoxCreate(data)
+
+          request(data)
             .then((res) => {
               loading.close();
               if (res.code == 0) {

+ 49 - 14
src/views/business/ticket/index.vue

@@ -120,7 +120,7 @@
       v-loading="loading"
       :data="list"
       @select="handleSelect"
-      class="ticket-table"
+      class="ticket-table"  @sort-change="sortChannelId"
     >
       <el-table-column
         type="selection"
@@ -128,7 +128,7 @@
         align="center"
         fixed="left"
       />
-      <el-table-column label="盲票组ID" prop="boxId" min-width="80" />
+      <el-table-column label="盲票组ID" prop="boxId" min-width="100" sortable="custom" />
       <el-table-column label="盲票图片" prop="picUrl" min-width="120">
         <template slot-scope="scope">
           <div>
@@ -141,17 +141,17 @@
         </template>
       </el-table-column>
       <el-table-column label="盲票组名称" prop="title" min-width="85" />
-      <el-table-column label="盲票组面值" prop="facePrice" min-width="85">
+      <el-table-column label="盲票组面值" prop="facePrice" min-width="85" sortable="custom" width="110px">
         <template slot-scope="scope">
           <div>¥{{ $numberFormat(scope.row.facePrice) }}</div>
         </template>
       </el-table-column>
-      <el-table-column label="盲票总数" prop="quantity" width="90">
+      <el-table-column label="盲票总数" prop="quantity" width="100px" sortable="custom">
         <template slot-scope="scope">
           <div>{{ scope.row.quantity }}张</div>
         </template>
       </el-table-column>
-      <el-table-column label="已售张数" prop="saleQty" min-width="90">
+      <el-table-column label="已售张数" prop="saleQty" min-width="100" sortable="custom">
         <template slot-scope="scope">
           <div>{{ scope.row.saleQty }}张</div>
         </template>
@@ -161,12 +161,12 @@
           {{ scope.row.type.desc }}
         </template>
       </el-table-column>
-      <el-table-column label="采购单价" prop="pkgSalePrice" min-width="90">
+      <el-table-column label="采购单价" prop="pkgSalePrice" min-width="100" sortable="custom">
         <template slot-scope="scope">
           <div>¥{{ $numberFormat(scope.row.pkgSalePrice) }}/包</div>
         </template>
       </el-table-column>
-      <el-table-column label="已采购数量" prop="salePkgQty" min-width="90">
+      <el-table-column label="已采购数量" prop="salePkgQty" min-width="110" sortable="custom">
         <template slot-scope="scope">
           <div>{{ scope.row.salePkgQty }}包</div>
         </template>
@@ -180,6 +180,12 @@
         </template>
       </el-table-column>
 
+      <el-table-column label="排序" prop="sortWeight"  sortable="custom" align="center" width="140px">
+        <template slot-scope="{row, $index}">
+          <el-input-number v-model="row.sortWeight" @change="handleSortChange($index,row.sortWeight)" controls-position="right" size="small"></el-input-number>
+        </template>
+      </el-table-column>
+
       <el-table-column
         label="操作"
         align="center"
@@ -196,6 +202,12 @@
               @click="getDetail(scope.row)"
               >查看</el-button
             >
+            <el-button
+              v-hasPermi="['business:ticket:edit']"
+              type="text"
+              @click="setDetail(scope.row)"
+            >编辑</el-button
+            >
             <el-button
               v-if="
                 scope.row.status.value === 'off' ||
@@ -248,7 +260,7 @@ import {
   exportTicket,
   exportDraw,
   ticketBoxPut,
-  ticketBoxRemove,
+  ticketBoxRemove, setListData
 } from "@/api/business/ticket";
 import { publicFileGetUrl } from "@/api/common";
 import TicketImport from "./import";
@@ -259,6 +271,7 @@ export default {
   },
   data() {
     return {
+      sortNum:0,
       loading: false,
       exportLoading: false,
       showSearch: true,
@@ -270,6 +283,8 @@ export default {
       pageParams: {
         pageNum: 1,
         pageSize: 10,
+        orderByColumn: '',
+        isAsc: 'desc',
       },
       // 总条数
       total: 0,
@@ -291,6 +306,26 @@ export default {
     this.getList();
   },
   methods: {
+    //切换排序
+    sortChannelId(row){
+      if (row){
+        let prop =  row.prop == 'channelId' || row.prop == 'commRate' ? ('t1.'+ row.prop) : row.prop;
+        this.pageParams.orderByColumn = prop
+        this.pageParams.isAsc = row.order=='ascending'?"asc":"desc";
+        this.getList()
+      }
+    },
+
+    //步进器修改
+    handleSortChange(index,sortWeight){
+      this.list[index].sortWeight = sortWeight
+      let data = {
+        boxId: this.list[index].boxId,
+        sortWeight: this.list[index].sortWeight
+      }
+      setListData(data)
+    },
+
     // 盲票组列表
     getList(reset) {
       if (this.loading) {
@@ -300,12 +335,7 @@ export default {
       if (reset) {
         this.queryParams = { pageNum: 1, pageSize: 20 };
       }
-      getTicketList(
-        "pageNum=" +
-          this.pageParams.pageNum +
-          "&pageSize=" +
-          this.pageParams.pageSize +
-          "&",
+      getTicketList( 'pageNum=' + this.pageParams.pageNum + '&pageSize=' + this.pageParams.pageSize + '&orderByColumn='+ this.pageParams.orderByColumn +'&isAsc='+ this.pageParams.isAsc +'&',
         this.queryParams
       )
         .then((res) => {
@@ -388,8 +418,13 @@ export default {
 
     // 查看详情
     getDetail(row) {
+
       this.$router.push({ name: "TicketDetail", query: { id: row.boxId } });
     },
+    // 编辑信息
+    setDetail(row) {
+      this.$router.push({ name: "TicketEdit", query: { id: row.boxId } });
+    },
 
     handleDetail() {},
 

+ 40 - 6
src/views/order/channel/index.vue

@@ -194,15 +194,18 @@
               v-hasPermi="['order:channel:query']"
               type="text"
               @click="getDetail(row)"
-              >查看详情</el-button
-            >
+            >查看详情</el-button>
+            <el-button
+              v-if="row.status.value === 1"
+              type="text"
+              @click="cancellationOrder(row)"
+            >取消订单</el-button>
             <el-button
               v-if="row.status.value === 1"
               v-hasPermi="['order:channel:ship']"
               type="text"
               @click="toGoods(row)"
-              >发货</el-button
-            >
+              >发货</el-button>
           </div>
         </template>
       </el-table-column>
@@ -227,7 +230,7 @@
   </div>
 </template>
 <script>
-import { getOrderList, companyList, boxList, channelOrderExport} from "@/api/business/order";
+import { getOrderList, companyList, boxList, channelOrderExport, removeChannelOrder} from "@/api/business/order";
 import { listAllSaleSite} from "@/api/admin/salesite";
 import { publicFileGetUrl } from "@/api/common";
 import SendGoods from "./components/SendGoods";
@@ -270,7 +273,7 @@ export default {
       // 盲票组下拉列表
       boxData: [],
       siteList:[],
-      siteCopyList:[]
+      siteCopyList:[],
     };
   },
   mounted() {
@@ -395,6 +398,34 @@ export default {
       this.getBoxList(row);
     },
 
+    //取消订单
+    cancellationOrder(row){
+      this.$confirm('确定要取消订单吗?取消后实付金额将原路返回', '取消订单', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.vloading = this.$loading({
+          lock: true,
+          text: "正在取消订单.....",
+          background: "rgba(0, 0, 0, 0.7)",
+        });
+        let data = {
+          orderId:row.orderId
+        }
+        return  removeChannelOrder(data)
+      }).then(()=>{
+        this.vloading.close();
+        this.getList()
+        this.$message({
+          type: 'success',
+          message: '取消订单成功!'
+        })
+      }).catch(() => {
+        this.vloading.close();
+      });
+    },
+
     // 关闭发货弹框
     close() {
       this.goodsShow = false;
@@ -431,4 +462,7 @@ export default {
 ::v-deep .el-tabs--border-card > .el-tabs__content {
   padding: 0;
 }
+.el-button {
+  margin-left: 0;
+}
 </style>