xuhaifeng 7 月之前
父節點
當前提交
02f4b92bd0

+ 80 - 83
src/api/order/clothItem.js

@@ -1,134 +1,131 @@
 import request from '@/utils/request'
 
-
-export function outFactory(data){
-  return request({
-    url: '/mapi/order/clothItem/outFactory',
-    method: 'post',
-    data: data
-  })
+export function outFactory(data) {
+    return request({
+        url: '/mapi/order/clothItem/outFactory',
+        method: 'post',
+        data: data
+    })
 }
 
-
-export function findOutFactoryPageByFlowStatus(data){
-  return request({
-    url: '/mapi/order/clothItem/findOutFactoryPageByFlowStatus',
-    method: 'post',
-    data: data
-  })
+export function findOutFactoryPageByFlowStatus(data) {
+    return request({
+        url: '/mapi/order/clothItem/findOutFactoryPageByFlowStatus',
+        method: 'post',
+        data: data
+    })
 }
 
 export function setClothProblem(query) {
-  return request({
-    url: '/mapi/order/clothItem/setClothProblem',
-    method: 'post',
-    params: query
-  })
+    return request({
+        url: '/mapi/order/clothItem/setClothProblem',
+        method: 'post',
+        params: query
+    })
 }
 
 export function checkCloth(query) {
-  return request({
-    url: '/mapi/order/clothItem/checkCloth',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/mapi/order/clothItem/checkCloth',
+        method: 'get',
+        params: query
+    })
 }
 
 export function rewashCloth(query) {
-  return request({
-    url: '/mapi/order/clothItem/rewashCloth',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/mapi/order/clothItem/rewashCloth',
+        method: 'get',
+        params: query
+    })
 }
 
 export function inFactory(query) {
-  return request({
-    url: '/mapi/order/clothItem/inFactory',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/mapi/order/clothItem/inFactory',
+        method: 'get',
+        params: query
+    })
 }
 
 export function deleteInFactory(query) {
-  return request({
-    url: '/mapi/order/clothItem/deleteInFactory',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/mapi/order/clothItem/deleteInFactory',
+        method: 'get',
+        params: query
+    })
 }
 
 // 查询洗衣订单衣服明细列表
 export function listOrderClothItem(query) {
-  return request({
-    url: '/mapi/order/clothItem/list',
-    method: 'post',
-    data: query
-  })
+    return request({
+        url: '/mapi/order/clothItem/list',
+        method: 'get',
+        data: query
+    })
 }
 
 // 查询洗衣订单衣服明细详细
 export function getClothItem(id) {
-  return request({
-    url: '/mapi/order/clothItem/' + id,
-    method: 'get'
-  })
+    return request({
+        url: '/mapi/order/clothItem/' + id,
+        method: 'get'
+    })
 }
 
 // 新增洗衣订单衣服明细
 export function addClothItem(data) {
-  return request({
-    url: '/mapi/order/clothItem',
-    method: 'post',
-    data: data
-  })
+    return request({
+        url: '/mapi/order/clothItem',
+        method: 'post',
+        data: data
+    })
 }
 
 // 修改洗衣订单衣服明细
 export function updateClothItem(data) {
-  return request({
-    url: '/mapi/order/ClothItem',
-    method: 'put',
-    data: data
-  })
+    return request({
+        url: '/mapi/order/ClothItem',
+        method: 'put',
+        data: data
+    })
 }
 
 // 删除洗衣订单衣服明细
 export function delClothItem(id) {
-  return request({
-    url: '/mapi/order/ClothItem/' + id,
-    method: 'delete'
-  })
+    return request({
+        url: '/mapi/order/ClothItem/' + id,
+        method: 'delete'
+    })
 }
 
-
 // 修改洗衣订单衣服明细状态
-export function updateClothItemStatus(id,status) {
-  const data = {
-    id,
-    status
-  }
-  return request({
-    url: '/mapi/order/ClothItem/updateStatus',
-    method: 'post',
-    data: data
-  })
+export function updateClothItemStatus(id, status) {
+    const data = {
+        id,
+        status
+    }
+    return request({
+        url: '/mapi/order/ClothItem/updateStatus',
+        method: 'post',
+        data: data
+    })
 }
 
 // 查询洗衣订单-待上挂衣服列表
 export function getOrderClothItemListByUpHanger(query) {
-  return request({
-    url: '/mapi/order/clothItem/getOrderClothItemListByUpHanger',
-    method: 'get',
-    params: query
-  })
+    return request({
+        url: '/mapi/order/clothItem/getOrderClothItemListByUpHanger',
+        method: 'get',
+        params: query
+    })
 }
 
 // 重洗衣服
 export function reFlowCloth(orderClothItemId) {
-  return request({
-    url: '/mapi/order/clothItem/reFlowCloth',
-    method: 'get',
-    params: { orderClothItemId:orderClothItemId }
-  })
+    return request({
+        url: '/mapi/order/clothItem/reFlowCloth',
+        method: 'get',
+        params: { orderClothItemId: orderClothItemId }
+    })
 }

+ 23 - 22
src/views/activity/couponInfo/index.vue

@@ -135,18 +135,18 @@
                             <el-input-number v-model="form.maxBuyNum" placeholder="请输入最大可购买数量" :precision="0" :min="1" :max="999999" />
                         </el-form-item>
                     </el-col>
-                    <el-col :span="8">
-                        <el-form-item label="单次最多使用券数" prop="maxUseCount">
-                            <el-input-number v-model="form.maxUseCount" placeholder="请输入单次订单最多使用券数" :precision="0" :min="1" :max="999999" />
-                        </el-form-item>
-                    </el-col>
-                    <el-col :span="8">
-                        <el-form-item label="可多张使用" prop="canMultiUse">
-                            <el-radio-group v-model="form.canMultiUse">
-                                <el-radio-button v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio-button>
-                            </el-radio-group>
-                        </el-form-item>
-                    </el-col>
+                    <!--                    <el-col :span="8">-->
+                    <!--                        <el-form-item label="单次最多使用券数" prop="maxUseCount">-->
+                    <!--                            <el-input-number v-model="form.maxUseCount" placeholder="请输入单次订单最多使用券数" :precision="0" :min="1" :max="999999" />-->
+                    <!--                        </el-form-item>-->
+                    <!--                    </el-col>-->
+                    <!--                    <el-col :span="8">-->
+                    <!--                        <el-form-item label="可多张使用" prop="canMultiUse">-->
+                    <!--                            <el-radio-group v-model="form.canMultiUse">-->
+                    <!--                                <el-radio-button v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio-button>-->
+                    <!--                            </el-radio-group>-->
+                    <!--                        </el-form-item>-->
+                    <!--                    </el-col>-->
                     <el-col :span="8">
                         <el-form-item label="适用门店" prop="storeScope">
                             <el-radio-group v-model="form.storeScope">
@@ -183,14 +183,15 @@
                     <!--                            </el-radio-group>-->
                     <!--                        </el-form-item>-->
                     <!--                    </el-col>-->
-                    <el-col :span="16">
-                        <el-form-item label="仅限新用户参与" prop="canOnlyNewUser">
-                            <el-radio-group v-model="form.canOnlyNewUser">
-                                <el-radio-button v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio-button>
-                            </el-radio-group>
-                            <span style="color: #999999"> (新用户是指注册时间一周之内,且没有消费记录的用户) </span>
-                        </el-form-item>
-                    </el-col>
+
+                    <!--                    <el-col :span="16">-->
+                    <!--                        <el-form-item label="仅限新用户参与" prop="canOnlyNewUser">-->
+                    <!--                            <el-radio-group v-model="form.canOnlyNewUser">-->
+                    <!--                                <el-radio-button v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio-button>-->
+                    <!--                            </el-radio-group>-->
+                    <!--                            <span style="color: #999999"> (新用户是指注册时间一周之内,且没有消费记录的用户) </span>-->
+                    <!--                        </el-form-item>-->
+                    <!--                    </el-col>-->
                     <el-col :span="8">
                         <el-form-item label="状态" prop="status">
                             <el-radio-group v-model="form.status">
@@ -292,8 +293,8 @@ export default {
                 duringDate: [],
                 activityType: '1',
                 status: '0',
-                canMultiUse: null,
-                maxUseCount: null,
+                canMultiUse: 'N',
+                maxUseCount: 1,
                 isShowAppBuyPage: null,
                 isShowWxBuyPage: null,
                 isShowWxBuyPageFromQrcode: null,

+ 9 - 4
src/views/coupon/item/index.vue

@@ -32,9 +32,9 @@
             <el-col :span="1.5">
                 <el-button type="primary" plain icon="el-icon-plus" @click="handleAdd" v-hasPermi="['app:couponItem:add']">手动发送优惠券</el-button>
             </el-col>
-            <el-col :span="1.5">
-                <el-button type="warning" plain icon="el-icon-download" @click="handleExport" v-hasPermi="['app:couponItem:export']">导出</el-button>
-            </el-col>
+            <!--            <el-col :span="1.5">-->
+            <!--                <el-button type="warning" plain icon="el-icon-download" @click="handleExport" v-hasPermi="['app:couponItem:export']">导出</el-button>-->
+            <!--            </el-col>-->
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
 
@@ -88,7 +88,12 @@
                     <span v-else>--</span>
                 </template>
             </el-table-column>
-            <el-table-column label="核销订单编码" align="center" prop="deductOrderNo" width="150" />
+            <el-table-column label="核销订单编码" align="center" prop="deductOrderNo" width="150">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.deductOrderNo">{{ scope.row.deductOrderNo }}</span>
+                    <span v-else>--</span>
+                </template>
+            </el-table-column>
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150" v-if="isUsed != 'Y'">
                 <template slot-scope="scope">
                     <el-button type="text" icon="el-icon-edit" v-if="scope.row.isUsed == 'N'" @click="handleUpdate(scope.row)" v-hasPermi="['app:couponItem:edit']">修改有效期</el-button>

+ 31 - 46
src/views/coupon/item/storeSendCoupon.vue

@@ -6,8 +6,8 @@
                     <el-option v-for="dict in dict.type.coupon_type" :key="dict.value" :label="dict.label" :value="dict.value" />
                 </el-select>
             </el-form-item>
-            <el-form-item prop="activityName">
-                <el-input v-model="queryParams.activityName" placeholder="请输入活动名称" clearable @keyup.enter.native="handleQuery" />
+            <el-form-item prop="title">
+                <el-input v-model="queryParams.title" placeholder="请输入优惠券名称" clearable @keyup.enter.native="handleQuery" />
             </el-form-item>
             <el-form-item>
                 <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
@@ -29,53 +29,44 @@
             <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
 
-        <el-table v-loading="loading" fit highlight-current-row border stripe :data="couponItemList">
-            <!--      <el-table-column type="selection" width="55" align="center" fixed="left"/>-->
-            <!--      <el-table-column label="编号" align="center" prop="id" fixed="left"/>-->
-            <!--      <el-table-column label="订单编码" align="center" prop="orderNo" />-->
-            <el-table-column label="活动名称" align="center" prop="activityTitle" :show-overflow-tooltip="true" />
-            <el-table-column label="活动有效期" align="center" prop="startDate" width="220">
-                <template slot-scope="scope"> {{ scope.row.activityStartDate }}至{{ scope.row.activityEndDate }} </template>
-            </el-table-column>
-            <el-table-column label="优惠券名称" align="center" prop="couponTypeTitle" :show-overflow-tooltip="true" />
-            <el-table-column label="优惠券类型" align="center" prop="discountWay" width="120" :show-overflow-tooltip="true">
+        <Page uri="/mapi/activity/couponInfo/listByStore" :request-params="queryParams" ref="pagination">
+            <el-table-column label="编号" align="center" prop="id" width="80" />
+            <el-table-column label="名称" align="center" prop="title" />
+            <el-table-column label="优惠券类型" align="center" prop="discountWay" width="120">
                 <template slot-scope="scope">
                     <dict-tag :options="dict.type.coupon_type" :value="scope.row.discountWay" />
                 </template>
             </el-table-column>
-            <el-table-column label="优惠券有效期" align="center" width="220">
-                <template slot-scope="scope"> {{ scope.row.couponStartDate }} 至 {{ scope.row.couponEndDate }} </template>
+            <el-table-column label="券值" align="center" prop="deductAmount" width="150">
+                <template slot-scope="scope">
+                    <span v-if="scope.row.discountWay == 0">满{{ scope.row.minAmount }}元减{{ scope.row.deductAmount }}元</span>
+                    <span v-if="scope.row.discountWay == 1">满{{ scope.row.minAmount }}件减{{ scope.row.deductAmount }}件</span>
+                    <span v-if="scope.row.discountWay == 2">折扣比例:{{ scope.row.discountRate }}%</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="有效期" align="center" prop="startDate" width="210">
+                <template slot-scope="scope"> {{ scope.row.startDate }} ~ {{ scope.row.endDate }} </template>
             </el-table-column>
-            <!--      <el-table-column label="活动ID" align="center" prop="activityInfoId" />-->
-            <!--      <el-table-column label="发放门店/工厂" align="center" prop="orgName" width="120" :show-overflow-tooltip="true" />-->
-            <!--      <el-table-column label="客户姓名" align="center" prop="appUserName" width="100" />-->
-            <!--      <el-table-column label="客户手机号" align="center" prop="appUserPhone" width="120" />-->
-            <!--      <el-table-column label="是否核销" align="center" prop="isUsed" width="80">-->
-            <!--        <template slot-scope="scope">-->
-            <!--          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUsed"/>-->
-            <!--        </template>-->
-            <!--      </el-table-column>-->
-            <!--      <el-table-column label="核销门店/工厂" align="center" prop="usedOrgName"  width="120" :show-overflow-tooltip="true"/>-->
-            <!--      <el-table-column label="核销时间" align="center" prop="usedTime" width="180">-->
-            <!--      </el-table-column>-->
-            <!--      <el-table-column label="有效期开始时间" align="center" prop="startDate" width="180">-->
-            <!--      </el-table-column>-->
-            <!--      <el-table-column label="有效期结束时间" align="center" prop="endDate" width="180">-->
-            <!--      </el-table-column>-->
-            <el-table-column label="是否单件抵扣券" align="center" prop="isUnique" width="180">
+            <el-table-column label="适用范围" align="center" prop="useScope" width="180">
                 <template slot-scope="scope">
-                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isUnique" />
+                    <span v-if="scope.row.useScope == 1">全部衣服</span>
+                    <span v-if="scope.row.useScope == 2">指定衣服</span>
                 </template>
             </el-table-column>
-            <el-table-column label="抵用金额(元)" align="center" prop="deductAmount" width="120" />
+            <el-table-column label="优惠券库存" align="center" prop="couponStock" width="120" />
+            <el-table-column label="备注" align="center" prop="remark">
+                <template slot-scope="scope">
+                    <span>{{ scope.row.remark ? scope.row.remark : '--' }}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="创建人" align="center" prop="createBy" />
+            <el-table-column label="创建时间" align="center" prop="createTime" />
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150" v-if="isUsed != 'Y'">
                 <template slot-scope="scope">
                     <el-button type="text" icon="el-icon-plus" @click="handleAdd(scope.row)" v-hasPermi="['app:couponItem:add']">发放优惠券</el-button>
                 </template>
             </el-table-column>
-        </el-table>
-
-        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+        </Page>
 
         <!-- 发送优惠券对话框 -->
         <el-dialog :title="sendCouponTitle" :visible.sync="sendCouponOpen" size="30%" append-to-body>
@@ -135,8 +126,6 @@ export default {
             sendCouponOpen: false,
             // 查询参数
             queryParams: {
-                pageNum: 1,
-                pageSize: 10,
                 orgIndex: null,
                 dateRange: []
             },
@@ -183,11 +172,8 @@ export default {
         },
         /** 查询优惠券列表 */
         getList() {
-            this.loading = true
-            listByStore(this.queryParams).then((response) => {
-                this.couponItemList = response.data.records
-                this.total = response.data.total
-                this.loading = false
+            this.$nextTick(() => {
+                this.$refs.pagination.handleSearch(true)
             })
         },
         // 取消按钮
@@ -225,8 +211,7 @@ export default {
         /** 发送优惠券按钮操作 */
         handleAdd(row) {
             this.reset()
-            this.sendCouponForm.couponTypeId = row.couponTypeId
-            this.sendCouponForm.activityId = row.activityInfoId
+            this.sendCouponForm.couponTypeId = row.id
             this.sendCouponOpen = true
             this.sendCouponTitle = '发送优惠券'
         },
@@ -237,7 +222,7 @@ export default {
                     this.sendCouponForm.sourceType = this.userInfoVO.userType
                     this.sendCouponForm.orgId = this.userInfoVO.storeId
                     sendCoupon(this.sendCouponForm).then((response) => {
-                        this.$modal.msgSuccess('提交成功')
+                        this.$modal.msgSuccess('发放成功')
                         this.sendCouponOpen = false
                         this.getList()
                     })

+ 10 - 1
src/views/coupon/type/index.vue

@@ -47,7 +47,7 @@
                 <template slot-scope="scope">
                     <span v-if="scope.row.discountWay == 0">满{{ scope.row.minAmount }}元减{{ scope.row.deductAmount }}元</span>
                     <span v-if="scope.row.discountWay == 1">满{{ scope.row.minAmount }}件减{{ scope.row.deductAmount }}件</span>
-                    <span v-if="scope.row.discountWay == 2">{{ scope.row.discountRate }}折</span>
+                    <span v-if="scope.row.discountWay == 2">折扣比例:{{ scope.row.discountRate }}%</span>
                 </template>
             </el-table-column>
             <el-table-column label="有效期" align="center" prop="startDate" width="210">
@@ -73,11 +73,15 @@
                     <span v-if="scope.row.useScope == 2">指定衣服</span>
                 </template>
             </el-table-column>
+            <el-table-column label="优惠券库存" align="center" prop="couponStock" width="120" />
+            <el-table-column label="已发放数量" align="center" prop="couponSendNum" width="120" />
+            <el-table-column label="已使用数量" align="center" prop="couponUseNum" width="120" />
             <el-table-column label="三方品牌" align="center" prop="couponTypeThirdPartyId" width="120">
                 <template slot-scope="scope">
                     <div v-for="third in thirdPartyList" :key="third.id">
                         <span v-if="scope.row.couponTypeThirdPartyId == third.id">{{ third.name }}</span>
                     </div>
+                    <span v-if="!scope.row.couponTypeThirdPartyId">--</span>
                 </template>
             </el-table-column>
             <el-table-column label="状态" align="center" prop="status" width="120">
@@ -153,6 +157,11 @@
                             </el-form-item>
                         </template>
                     </el-col>
+                    <el-col :span="24">
+                        <el-form-item label="库存" prop="couponStock" label-width="100px">
+                            <el-input-number v-model="form.couponStock" placeholder="请输入最大折扣金额" :step="1" :min="0" />
+                        </el-form-item>
+                    </el-col>
                     <el-col :span="24">
                         <el-form-item label="三方品牌" prop="couponTypeThirdPartyId" label-width="100px">
                             <el-select v-model="form.couponTypeThirdPartyId" placeholder="请选择三方品牌" clearable style="width: 300px">

+ 782 - 822
src/views/order/cloth/component/cashCloth.vue

@@ -1,875 +1,835 @@
 <template>
-  <div v-loading="dialogLoading" :element-loading-text="loadingText">
-    <el-form :model="orderForm" :inline="true" ref="confirmPayForm" >
-      <el-card>
-        <el-descriptions title="核对信息" border :column="3" label-style="width:120px">
-          <el-descriptions-item label="总件数">{{orderClothItemDTOS.length}}</el-descriptions-item>
-          <el-descriptions-item label="总价格(元)">{{calculateTotalPrice() + calculateDeliveryPrice()}}</el-descriptions-item>
-          <el-descriptions-item label="卡余额(元)" v-if="appUserInfo">{{appUserInfo.rechargeBalance + appUserInfo.giveBalance}}</el-descriptions-item>
-          <el-descriptions-item label="卡余额(元)" v-else>0</el-descriptions-item>
-          <el-descriptions-item label="衣服价格(元)">{{calculateTotalPrice()}}</el-descriptions-item>
-          <el-descriptions-item label="优惠金额(元)">{{calculateTotalDiscountAmount()}}</el-descriptions-item>
-          <el-descriptions-item label="现金余额(元)">{{appUserInfo?appUserInfo.rechargeBalance:'0'}}</el-descriptions-item>
-          <el-descriptions-item label="配送费(元)">
-            {{calculateDeliveryPrice()}}
-          </el-descriptions-item>
-          <el-descriptions-item label="还需支付(元)">{{ (parseInt(calculateTotalPrice() * 100) + parseInt(calculateDeliveryPrice() * 100) - parseInt(calculateTotalDiscountAmount() * 100))/100}}</el-descriptions-item>
-          <el-descriptions-item label="赠送余额">{{appUserInfo?appUserInfo.giveBalance:'0'}}</el-descriptions-item>
-        </el-descriptions>
-      </el-card>
+    <div v-loading="dialogLoading" :element-loading-text="loadingText">
+        <el-form :model="orderForm" :inline="true" ref="confirmPayForm">
+            <el-card>
+                <el-descriptions title="核对信息" border :column="3" label-style="width:120px">
+                    <el-descriptions-item label="总件数">{{ orderClothItemDTOS.length }}</el-descriptions-item>
+                    <el-descriptions-item label="总价格(元)">{{ calculateTotalPrice() + calculateDeliveryPrice() }}</el-descriptions-item>
+                    <el-descriptions-item label="卡余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance }}</el-descriptions-item>
+                    <el-descriptions-item label="卡余额(元)" v-else>0</el-descriptions-item>
+                    <el-descriptions-item label="衣服价格(元)">{{ calculateTotalPrice() }}</el-descriptions-item>
+                    <el-descriptions-item label="优惠金额(元)">{{ calculateTotalDiscountAmount() }}</el-descriptions-item>
+                    <el-descriptions-item label="现金余额(元)">{{ appUserInfo ? appUserInfo.rechargeBalance : '0' }}</el-descriptions-item>
+                    <el-descriptions-item label="配送费(元)">
+                        {{ calculateDeliveryPrice() }}
+                    </el-descriptions-item>
+                    <el-descriptions-item label="还需支付(元)">{{ (parseInt(calculateTotalPrice() * 100) + parseInt(calculateDeliveryPrice() * 100) - parseInt(calculateTotalDiscountAmount() * 100)) / 100 }}</el-descriptions-item>
+                    <el-descriptions-item label="赠送余额">{{ appUserInfo ? appUserInfo.giveBalance : '0' }}</el-descriptions-item>
+                </el-descriptions>
+            </el-card>
 
-      <el-card style="margin-top: 10px">
-        <div slot="header" class="clearfix">
-          <span>优惠信息</span>
-        </div>
-        <el-tabs v-model="confirmCouponTabIndex" type="card" @tab-click="onCouponTabChange">
+            <el-card style="margin-top: 10px">
+                <div slot="header" class="clearfix">
+                    <span>优惠信息</span>
+                </div>
+                <el-tabs v-model="confirmCouponTabIndex" type="card" @tab-click="onCouponTabChange">
+                    <el-tab-pane label="优惠券" name="0">
+                        <el-form-item label="优惠券" prop="fullCoupon">
+                            <el-input ref="couponRef" v-model="orderForm.fullCoupon" placeholder="请输入优惠券兑换码" clearable />
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button type="primary">核销</el-button>
+                            <el-button type="primary" @click="onSelectCoupon">列表选券</el-button>
+                        </el-form-item>
 
-          <el-tab-pane label="优惠券" name="0">
-            <el-form-item label="优惠券" prop="fullCoupon">
-              <el-input ref="couponRef" v-model="orderForm.fullCoupon" placeholder="请输入优惠券兑换码" clearable/>
-            </el-form-item>
-            <el-form-item>
-              <el-button type="primary">核销</el-button>
-              <el-button type="primary" @click="onSelectCoupon">列表选券</el-button>
-            </el-form-item>
+                        <el-tabs v-model="confirmDeductTabIndex" type="card" @tab-click="onCouponTabChange">
+                            <el-tab-pane label="优惠券使用明细" name="0">
+                                <el-table :data="selectCoupons">
+                                    <el-table-column label="优惠券" align="center" prop="couponTypeTitle" />
+                                    <el-table-column label="优惠券类型" align="center" prop="discountWay">
+                                        <template slot-scope="scope">
+                                            <span v-if="scope.row.discountWay == '0'">抵扣券</span>
+                                            <span v-if="scope.row.discountWay == '1'">满减券</span>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="优惠内容" align="center">
+                                        <template slot-scope="scope">
+                                            <span v-if="scope.row.discountWay == '0'">抵扣{{ scope.row.deductAmount }}元</span>
+                                            <span v-if="scope.row.discountWay == '1'">满{{ parseInt(scope.row.minAmount) }}件减{{ scope.row.deductAmount }}件</span>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="是否单件" align="center" prop="isUnique">
+                                        <template slot-scope="scope">
+                                            <span v-if="scope.row.isUnique == 'Y'">单件</span>
+                                            <span v-if="scope.row.isUnique == 'N'">非单件</span>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="优惠衣服" align="center" prop="selectClothInfo" :width="350">
+                                        <template slot-scope="scope">
+                                            <template v-for="(item, index) in scope.row.orderCouponClothDTOS">
+                                                <br v-if="index != 0" />
+                                                <span>{{ '#' + (item.clothIndex + 1) + ' ' + item.clothName + '  优惠' + item.deductAmount + '元' }}</span>
+                                            </template>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
+                                        <template slot-scope="scope">
+                                            <el-button type="text" @click="changeCouponDiscountCloth(scope.$index)" v-if="scope.$index == selectCoupons.length - 1 && scope.row.discountWay == '0'">修改优惠方式</el-button>
+                                            <el-button type="text" style="color: #ff4949" @click="removeSelectCoupon(scope.$index)" v-if="scope.$index == selectCoupons.length - 1">删除</el-button>
+                                        </template>
+                                    </el-table-column>
+                                </el-table>
+                            </el-tab-pane>
+                            <el-tab-pane label="衣服抵扣明细" name="1">
+                                <el-table :data="orderClothItemDTOS">
+                                    <el-table-column label="序号" type="index" align="center" fixed="left" width="80"> </el-table-column>
+                                    <el-table-column label="衣物名称" align="center" prop="name" width="250">
+                                        <template slot-scope="scope">
+                                            <span>{{ calculateClothName(scope.$index) }}</span>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="颜色" align="center" width="120">
+                                        <template slot-scope="scope">
+                                            <span>
+                                                <template v-for="(color, index) in scope.row.orderClothColorDTOS">
+                                                    {{ index == 0 ? color.clothColorName : ',' + color.clothColorName }}
+                                                </template>
+                                            </span>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="衣服品牌" align="center" prop="name" width="120">
+                                        <template slot-scope="scope">
+                                            <span>{{ scope.row.clothBrandName }}</span>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="瑕疵" align="center">
+                                        <template slot-scope="scope">
+                                            <span>
+                                                <template v-for="(color, index) in scope.row.orderClothFlawDTOS">
+                                                    {{ index == 0 ? color.clothFlawName : ',' + color.clothFlawName }}
+                                                </template>
+                                            </span>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="洗涤方式" align="center" width="80">
+                                        <template slot-scope="scope">
+                                            <span>{{ scope.row.clothWashModeName }}</span>
+                                        </template>
+                                    </el-table-column>
+                                    <el-table-column label="价格(元)" align="center" prop="totalPrice" width="100" />
+                                    <el-table-column label="优惠金额(元)" align="center" prop="deductAmount" width="130" />
+                                    <el-table-column label="还需支付(元)" align="center" width="130">
+                                        <template slot-scope="scope">
+                                            <span>{{ scope.row.totalPrice - scope.row.deductAmount }}</span>
+                                        </template>
+                                    </el-table-column>
+                                </el-table>
+                            </el-tab-pane>
+                        </el-tabs>
+                    </el-tab-pane>
+                    <el-tab-pane label="折扣" name="1">
+                        <el-form-item label="折扣" prop="discountCouponId">
+                            <el-select v-model="orderForm.discountCouponId" placeholder="请选择" clearable @change="onDiscountCouponSelect">
+                                <template v-for="item in discountCouponVOS">
+                                    <el-option :key="item.id" :label="item.couponTypeTitle + '(' + item.deductAmount * 10 + '折)'" :value="item.id"> </el-option>
+                                </template>
+                            </el-select>
+                        </el-form-item>
+                        <el-table :data="getDiscountClothList()">
+                            <el-table-column label="序号" type="index" align="center" fixed="left" width="80"> </el-table-column>
+                            <el-table-column label="衣物名称" align="center" prop="name" width="250">
+                                <template slot-scope="scope">
+                                    <span>{{ calculateClothName(scope.$index) }}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="颜色" align="center" width="120">
+                                <template slot-scope="scope">
+                                    <span>
+                                        <template v-for="(color, index) in scope.row.orderClothColorDTOS">
+                                            {{ index == 0 ? color.clothColorName : ',' + color.clothColorName }}
+                                        </template>
+                                    </span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="衣服品牌" align="center" prop="name" width="120">
+                                <template slot-scope="scope">
+                                    <span>{{ scope.row.clothBrandName }}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="瑕疵" align="center">
+                                <template slot-scope="scope">
+                                    <span>
+                                        <template v-for="(color, index) in scope.row.orderClothFlawDTOS">
+                                            {{ index == 0 ? color.clothFlawName : ',' + color.clothFlawName }}
+                                        </template>
+                                    </span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="洗涤方式" align="center" width="80">
+                                <template slot-scope="scope">
+                                    <span>{{ scope.row.clothWashModeName }}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column label="原价(元)" align="center" prop="totalPrice" width="100" />
+                            <el-table-column label="抵扣金额(元)" align="center" prop="deductAmount" width="130" />
+                            <el-table-column label="折扣金额(元)" align="center" width="130">
+                                <template slot-scope="scope">
+                                    <span>{{ parseInt((scope.row.totalPrice - scope.row.deductAmount) * 100 * parseInt(100 - orderForm.discountCoupon.deductAmount * 100)) / 10000 }}</span>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                    </el-tab-pane>
+                    <el-tab-pane label="现金券" name="2">
+                        <el-form-item label="现金券" prop="cashDeductAmount">
+                            <el-input-number
+                                style="text-align: left"
+                                v-model="orderForm.cashDeductAmount"
+                                placeholder="请输入现金券金额"
+                                :precision="2"
+                                clearable
+                                :controls="false"
+                                :max="(parseInt(calculateTotalPrice() * 100) + parseInt(calculateDeliveryPrice() * 100) - parseInt(calculateTotalDiscountAmountWithoutCashAmount() * 100)) / 100"
+                            />
+                        </el-form-item>
+                        <el-form-item label="是否特殊" prop="isSpecial">
+                            <el-checkbox v-model="orderForm.isSpecial"></el-checkbox>
+                        </el-form-item>
+                    </el-tab-pane>
+                </el-tabs>
+            </el-card>
 
-            <el-tabs v-model="confirmDeductTabIndex" type="card" @tab-click="onCouponTabChange">
-              <el-tab-pane label="优惠券使用明细" name="0">
-                <el-table :data="selectCoupons">
-                  <el-table-column label="优惠券" align="center" prop="couponTypeTitle"/>
-                  <el-table-column label="优惠券类型" align="center" prop="discountWay">
+            <el-card style="margin-top: 10px">
+                <div slot="header" class="clearfix">
+                    <span
+                        >收款方式 还需支付<span style="color: #ff4949">{{ (parseInt(calculateTotalPrice() * 100) + parseInt(calculateDeliveryPrice() * 100) - parseInt(calculateTotalDiscountAmount() * 100)) / 100 }}</span
+                        >元</span
+                    >
+                </div>
+                <el-form-item label="支付方式" prop="payType">
+                    <el-radio-group v-model="orderForm.payType">
+                        <el-radio-button label="3" name="3">余额</el-radio-button>
+                        <el-radio-button label="2" name="2">现金</el-radio-button>
+                        <el-radio-button label="0" name="0">微信</el-radio-button>
+                        <el-radio-button label="1" name="1">支付宝</el-radio-button>
+                    </el-radio-group>
+                </el-form-item>
+                <br />
+
+                <el-form-item label="付款码" prop="authCode" v-if="orderForm.payType == '0' || orderForm.payType == '1'">
+                    <el-input v-model="orderForm.authCode" clearable placeholder="请选择付款码" />
+                </el-form-item>
+
+                <el-descriptions border :column="3" labelStyle="width: 140px" v-if="orderForm.payType == '3'">
+                    <el-descriptions-item label="用户" v-if="appUserInfo">{{ appUserInfo.realName }}</el-descriptions-item>
+                    <el-descriptions-item label="当前余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance }}</el-descriptions-item>
+                    <el-descriptions-item label="支付后余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance - calculateTotalPrice() }}</el-descriptions-item>
+                </el-descriptions>
+
+                <div style="margin-top: 20px">
+                    <el-button type="primary" @click="submitForm" style="margin-right: 5%">确 定</el-button>
+                </div>
+            </el-card>
+        </el-form>
+
+        <el-dialog title="选择优惠券" :visible.sync="setCouponOpen" append-to-body width="55%">
+            <!--      :before-close="handleClose"-->
+
+            <el-table :data="deductCouponVOS" style="width: 100%">
+                <el-table-column label="优惠券" align="center" prop="couponTypeTitle" />
+                <el-table-column label="优惠券类型" align="center" prop="discountType">
                     <template slot-scope="scope">
-                      <span v-if="scope.row.discountWay == '0'">抵扣券</span>
-                      <span v-if="scope.row.discountWay == '1'">满减券</span>
+                        <span v-if="scope.row.discountWay == '0'">抵扣券</span>
+                        <span v-if="scope.row.discountWay == '1'">满减券</span>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="优惠内容" align="center">
+                </el-table-column>
+                <el-table-column label="优惠内容" align="center">
                     <template slot-scope="scope">
-                      <span v-if="scope.row.discountWay == '0'">抵扣{{scope.row.deductAmount}}元</span>
-                      <span v-if="scope.row.discountWay == '1'">满{{parseInt(scope.row.minAmount)}}件减{{scope.row.deductAmount}}件</span>
+                        <span v-if="scope.row.discountWay == '0'">抵扣{{ scope.row.deductAmount }}元</span>
+                        <span v-if="scope.row.discountWay == '1'">满{{ parseInt(scope.row.minAmount) }}件减{{ scope.row.deductAmount }}件</span>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="是否单件" align="center" prop="isUnique">
+                </el-table-column>
+                <!--        <el-table-column label="是否单件" align="center" prop="isUnique">-->
+                <!--          <template slot-scope="scope">-->
+                <!--            <span v-if="scope.row.isUnique == 'Y'">单件</span>-->
+                <!--            <span v-if="scope.row.isUnique == 'N'">非单件</span>-->
+                <!--          </template>-->
+                <!--        </el-table-column>-->
+                <el-table-column label="适用衣服" align="center">
                     <template slot-scope="scope">
-                      <span v-if="scope.row.isUnique == 'Y'">单件</span>
-                      <span v-if="scope.row.isUnique == 'N'">非单件</span>
+                        <template v-for="(item, index) in scope.row.appCouponTypeApplyClothVOS" v-key="id">
+                            <span>{{ index > 0 ? '、' : '' }}{{ item.clothItemName }}</span>
+                        </template>
+                        <span v-if="!scope.row.appCouponTypeApplyClothVOS">全部衣服</span>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="优惠衣服" align="center" prop="selectClothInfo" :width="350">
+                </el-table-column>
+                <el-table-column label="操作" align="center">
                     <template slot-scope="scope">
-                      <template v-for="(item,index) in scope.row.orderCouponClothDTOS">
-                        <br v-if="index != 0"/>
-                        <span>{{'#' + (item.clothIndex + 1) + ' ' + item.clothName + '  优惠' + item.deductAmount + '元'}}</span>
-                      </template>
+                        <el-button type="text" @click="onSelectCouponItem(scope.$index)">选择</el-button>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
+                </el-table-column>
+            </el-table>
+        </el-dialog>
+
+        <el-dialog :title="changeDiscountCouponTitle" :visible.sync="changeDiscountCouponOpen" width="70%" append-to-body>
+            <span v-if="changeDiscountCouponOpen"> 共可抵扣{{ selectCoupons[changeDiscountCouponIndex].deductAmount }}元,已抵扣{{ calculateCouponDiscountInfo() }}元,剩余可抵扣{{ selectCoupons[changeDiscountCouponIndex].deductAmount - calculateCouponDiscountInfo() }}元 </span>
+            <br />
+            <span>可选择衣物</span>
+            <br />
+            <el-table :data="changeDiscountCouponCanSelectCloths">
+                <el-table-column label="序号" align="center" fixed="left" width="80">
                     <template slot-scope="scope">
-                      <el-button
-                         
-                        type="text"
-                        @click="changeCouponDiscountCloth(scope.$index)"
-                        v-if="scope.$index == selectCoupons.length - 1 && scope.row.discountWay == '0'"
-                      >修改优惠方式</el-button>
-                      <el-button
-                         
-                        type="text"
-                        style="color: #ff4949"
-                        @click="removeSelectCoupon(scope.$index)"
-                        v-if="scope.$index == selectCoupons.length - 1"
-                      >删除</el-button>
+                        <span>#{{ scope.row.index + 1 }}</span>
                     </template>
-                  </el-table-column>
-                </el-table>
-              </el-tab-pane>
-              <el-tab-pane label="衣服抵扣明细" name="1">
-                <el-table :data="orderClothItemDTOS">
-                  <el-table-column
-                    label="序号"
-                    type="index"
-                    align="center"
-                    fixed="left"
-                    width="80">
-                  </el-table-column>
-                  <el-table-column label="衣物名称" align="center" prop="name" width="250">
+                </el-table-column>
+                <el-table-column label="衣物名称" align="center" prop="name" width="250">
                     <template slot-scope="scope">
-                      <span>{{calculateClothName(scope.$index)}}</span>
+                        <span>{{ calculateClothNameByInfo(scope.row) }}</span>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="颜色" align="center" width="120">
+                </el-table-column>
+                <el-table-column label="颜色" align="center" width="120">
                     <template slot-scope="scope">
-                      <span>
-                        <template v-for="(color,index) in scope.row.orderClothColorDTOS">
-                          {{index == 0?color.clothColorName:(',' + color.clothColorName)}}
-                        </template>
-                      </span>
+                        <span>
+                            <template v-for="(color, index) in scope.row.orderClothColorDTOS">
+                                {{ index == 0 ? color.clothColorName : ',' + color.clothColorName }}
+                            </template>
+                        </span>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="衣服品牌" align="center" prop="name" width="120">
+                </el-table-column>
+                <el-table-column label="衣服品牌" align="center" prop="name" width="120">
                     <template slot-scope="scope">
-                      <span>{{scope.row.clothBrandName}}</span>
+                        <span>{{ scope.row.clothBrandName }}</span>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="瑕疵" align="center" >
+                </el-table-column>
+                <el-table-column label="瑕疵" align="center">
                     <template slot-scope="scope">
-                      <span>
-                        <template v-for="(color,index) in scope.row.orderClothFlawDTOS">
-                        {{index == 0?color.clothFlawName:(',' + color.clothFlawName)}}
-                      </template>
-                      </span>
+                        <span>
+                            <template v-for="(color, index) in scope.row.orderClothFlawDTOS">
+                                {{ index == 0 ? color.clothFlawName : ',' + color.clothFlawName }}
+                            </template>
+                        </span>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="洗涤方式" align="center" width="80">
+                </el-table-column>
+                <el-table-column label="洗涤方式" align="center" width="80">
                     <template slot-scope="scope">
-                      <span>{{scope.row.clothWashModeName}}</span>
+                        <span>{{ scope.row.clothWashModeName }}</span>
                     </template>
-                  </el-table-column>
-                  <el-table-column label="价格(元)" align="center" prop="totalPrice" width="100"/>
-                  <el-table-column label="优惠金额(元)" align="center" prop="deductAmount" width="130"/>
-                  <el-table-column label="还需支付(元)" align="center" width="130">
+                </el-table-column>
+                <el-table-column label="价格(元)" align="center" prop="totalPrice" width="100" />
+                <el-table-column label="优惠金额(元)" align="center" prop="deductAmount" width="130" />
+                <el-table-column label="还需支付(元)" align="center" width="130">
                     <template slot-scope="scope">
-                      <span>{{scope.row.totalPrice - scope.row.deductAmount}}</span>
+                        <span>{{ scope.row.totalPrice - scope.row.deductAmount }}</span>
                     </template>
-                  </el-table-column>
-                </el-table>
-              </el-tab-pane>
-            </el-tabs>
-          </el-tab-pane>
-          <el-tab-pane label="折扣" name="1">
-            <el-form-item label="折扣" prop="discountCouponId">
-              <el-select v-model="orderForm.discountCouponId" placeholder="请选择" clearable @change="onDiscountCouponSelect">
-                <template v-for="(item) in discountCouponVOS">
-                  <el-option
-                    :key="item.id"
-                    :label="item.couponTypeTitle + '(' + (item.deductAmount * 10) + '折)'"
-                    :value="item.id">
-                  </el-option>
-                </template>
-              </el-select>
-            </el-form-item>
-            <el-table :data="getDiscountClothList()">
-              <el-table-column
-                label="序号"
-                type="index"
-                align="center"
-                fixed="left"
-                width="80">
-              </el-table-column>
-              <el-table-column label="衣物名称" align="center" prop="name" width="250">
-                <template slot-scope="scope">
-                  <span>{{calculateClothName(scope.$index)}}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="颜色" align="center" width="120">
-                <template slot-scope="scope">
-                      <span>
-                        <template v-for="(color,index) in scope.row.orderClothColorDTOS">
-                          {{index == 0?color.clothColorName:(',' + color.clothColorName)}}
-                        </template>
-                      </span>
-                </template>
-              </el-table-column>
-              <el-table-column label="衣服品牌" align="center" prop="name" width="120">
-                <template slot-scope="scope">
-                  <span>{{scope.row.clothBrandName}}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="瑕疵" align="center" >
-                <template slot-scope="scope">
-                      <span>
-                        <template v-for="(color,index) in scope.row.orderClothFlawDTOS">
-                        {{index == 0?color.clothFlawName:(',' + color.clothFlawName)}}
-                      </template>
-                      </span>
-                </template>
-              </el-table-column>
-              <el-table-column label="洗涤方式" align="center" width="80">
-                <template slot-scope="scope">
-                  <span>{{scope.row.clothWashModeName}}</span>
-                </template>
-              </el-table-column>
-              <el-table-column label="原价(元)" align="center" prop="totalPrice" width="100"/>
-              <el-table-column label="抵扣金额(元)" align="center" prop="deductAmount" width="130"/>
-              <el-table-column label="折扣金额(元)" align="center" width="130">
-                <template slot-scope="scope">
-                  <span>{{parseInt((scope.row.totalPrice - scope.row.deductAmount)*100*parseInt(100 - orderForm.discountCoupon.deductAmount * 100))/10000}}</span>
-                </template>
-              </el-table-column>
-            </el-table>
-
-          </el-tab-pane>
-          <el-tab-pane label="现金券" name="2">
-            <el-form-item label="现金券" prop="cashDeductAmount">
-              <el-input-number style="text-align: left" v-model="orderForm.cashDeductAmount" placeholder="请输入现金券金额" :precision="2" clearable :controls="false" :max="(parseInt(calculateTotalPrice()*100) + parseInt(calculateDeliveryPrice()*100) - parseInt(calculateTotalDiscountAmountWithoutCashAmount()*100))/100"/>
-            </el-form-item>
-            <el-form-item label="是否特殊" prop="isSpecial">
-              <el-checkbox v-model="orderForm.isSpecial"></el-checkbox>
-            </el-form-item>
-          </el-tab-pane>
-        </el-tabs>
-
-
-      </el-card>
-
-      <el-card style="margin-top: 10px">
-        <div slot="header" class="clearfix">
-          <span>收款方式 还需支付<span style="color: #ff4949">{{(parseInt(calculateTotalPrice() * 100) + parseInt(calculateDeliveryPrice() * 100) - parseInt(calculateTotalDiscountAmount() * 100))/100}}</span>元</span>
-        </div>
-        <el-form-item label="支付方式" prop="payType">
-          <el-radio-group v-model="orderForm.payType">
-            <el-radio-button label="3" name="3">余额</el-radio-button>
-            <el-radio-button label="2" name="2">现金</el-radio-button>
-            <el-radio-button label="0" name="0">微信</el-radio-button>
-            <el-radio-button label="1" name="1">支付宝</el-radio-button>
-          </el-radio-group>
-        </el-form-item>
-        <br/>
-
-        <el-form-item label="付款码" prop="authCode" v-if="orderForm.payType == '0' || orderForm.payType == '1'">
-          <el-input v-model="orderForm.authCode" clearable placeholder="请选择付款码"/>
-        </el-form-item>
+                </el-table-column>
 
-        <el-descriptions border :column="3" labelStyle="width: 140px" v-if="orderForm.payType == '3'">
-          <el-descriptions-item label="用户" v-if="appUserInfo">{{appUserInfo.realName}}</el-descriptions-item>
-          <el-descriptions-item label="当前余额(元)" v-if="appUserInfo">{{appUserInfo.rechargeBalance + appUserInfo.giveBalance}}</el-descriptions-item>
-          <el-descriptions-item label="支付后余额(元)" v-if="appUserInfo">{{appUserInfo.rechargeBalance + appUserInfo.giveBalance - calculateTotalPrice()}}</el-descriptions-item>
-        </el-descriptions>
-        
-      <div style="margin-top: 20px;">
-        <el-button type="primary" @click="submitForm" style="margin-right: 5%">确 定</el-button>
-      </div>
-      </el-card>
-    </el-form>
-
-    <el-dialog
-      title="选择优惠券"
-      :visible.sync="setCouponOpen"
-      append-to-body
-      width="55%">
-      <!--      :before-close="handleClose"-->
-
-      <el-table :data="deductCouponVOS" style="width: 100%">
-        <el-table-column label="优惠券" align="center" prop="couponTypeTitle"/>
-        <el-table-column label="优惠券类型" align="center" prop="discountType">
-          <template slot-scope="scope">
-            <span v-if="scope.row.discountWay == '0'">抵扣券</span>
-            <span v-if="scope.row.discountWay == '1'">满减券</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="优惠内容" align="center">
-          <template slot-scope="scope">
-            <span v-if="scope.row.discountWay == '0'">抵扣{{scope.row.deductAmount}}元</span>
-            <span v-if="scope.row.discountWay == '1'">满{{parseInt(scope.row.minAmount)}}件减{{scope.row.deductAmount}}件</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="是否单件" align="center" prop="isUnique">
-          <template slot-scope="scope">
-            <span v-if="scope.row.isUnique == 'Y'">单件</span>
-            <span v-if="scope.row.isUnique == 'N'">非单件</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="适用衣服" align="center">
-          <template slot-scope="scope">
-            <template v-for="(item,index) in scope.row.appCouponTypeApplyClothVOS" v-key="id" >
-              <span>{{index > 0?'、':''}}{{item.clothItemName}}</span>
-            </template>
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" align="center" >
-          <template slot-scope="scope">
-            <el-button
-               
-              type="text"
-              @click="onSelectCouponItem(scope.$index)"
-            >选择</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </el-dialog>
-
-    <el-dialog
-      :title="changeDiscountCouponTitle"
-      :visible.sync="changeDiscountCouponOpen"
-      width="70%"
-      
-      append-to-body>
-      <span v-if="changeDiscountCouponOpen">
-        共可抵扣{{selectCoupons[changeDiscountCouponIndex].deductAmount}}元,已抵扣{{calculateCouponDiscountInfo()}}元,剩余可抵扣{{selectCoupons[changeDiscountCouponIndex].deductAmount - calculateCouponDiscountInfo()}}元
-      </span>
-      <br/>
-      <span>可选择衣物</span>
-      <br/>
-      <el-table :data="changeDiscountCouponCanSelectCloths">
-        <el-table-column
-          label="序号"
-          align="center"
-          fixed="left"
-          width="80">
-          <template slot-scope="scope">
-            <span>#{{scope.row.index + 1}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="衣物名称" align="center" prop="name" width="250">
-          <template slot-scope="scope">
-            <span>{{calculateClothNameByInfo(scope.row)}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="颜色" align="center" width="120">
-          <template slot-scope="scope">
-                      <span>
-                        <template v-for="(color,index) in scope.row.orderClothColorDTOS">
-                          {{index == 0?color.clothColorName:(',' + color.clothColorName)}}
-                        </template>
-                      </span>
-          </template>
-        </el-table-column>
-        <el-table-column label="衣服品牌" align="center" prop="name" width="120">
-          <template slot-scope="scope">
-            <span>{{scope.row.clothBrandName}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="瑕疵" align="center" >
-          <template slot-scope="scope">
-                      <span>
-                        <template v-for="(color,index) in scope.row.orderClothFlawDTOS">
-                        {{index == 0?color.clothFlawName:(',' + color.clothFlawName)}}
-                      </template>
-                      </span>
-          </template>
-        </el-table-column>
-        <el-table-column label="洗涤方式" align="center" width="80">
-          <template slot-scope="scope">
-            <span>{{scope.row.clothWashModeName}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="价格(元)" align="center" prop="totalPrice" width="100"/>
-        <el-table-column label="优惠金额(元)" align="center" prop="deductAmount" width="130"/>
-        <el-table-column label="还需支付(元)" align="center" width="130">
-          <template slot-scope="scope">
-            <span>{{scope.row.totalPrice - scope.row.deductAmount}}</span>
-          </template>
-        </el-table-column>
-
-        <el-table-column label="操作" align="center" >
-          <template slot-scope="scope">
-            <el-button
-               
-              type="text"
-              style="color: #ff4949"
-              @click="addCouponRelateCloth(scope.$index)"
-            >添加</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <br/>
-      <span>已选择衣物</span>
-      <br/>
-      <el-table :data="changeDiscountCouponSelectCloths" style="width: 100%" >
-        <el-table-column label="序号" align="center" width="80">
-          <template slot-scope="scope">
-            <span>#{{scope.row.clothIndex + 1}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="衣服名称" align="center" prop="clothName" width="250"/>
-        <el-table-column label="颜色" align="center" width="120">
-          <template slot-scope="scope">
-                      <span>
-                        <template v-for="(color,index) in scope.row.cloth.orderClothColorDTOS">
-                          {{index == 0?color.clothColorName:(',' + color.clothColorName)}}
-                        </template>
-                      </span>
-          </template>
-        </el-table-column>
-        <el-table-column label="衣服品牌" align="center" prop="name" width="120">
-          <template slot-scope="scope">
-            <span>{{scope.row.cloth.clothBrandName}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="瑕疵" align="center" >
-          <template slot-scope="scope">
-                      <span>
-                        <template v-for="(color,index) in scope.row.cloth.orderClothFlawDTOS">
-                        {{index == 0?color.clothFlawName:(',' + color.clothFlawName)}}
-                      </template>
-                      </span>
-          </template>
-        </el-table-column>
-        <el-table-column label="洗涤方式" align="center" width="80">
-          <template slot-scope="scope">
-            <span>{{scope.row.cloth.clothWashModeName}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="原价(元)" align="center" prop="totalPrice" width="100">
-          <template slot-scope="scope">
-            <span>{{scope.row.cloth.totalPrice}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="已优惠金额(元)" align="center" prop="deductAmount" width="130">
-          <template slot-scope="scope">
-            <span>{{scope.row.cloth.deductAmount}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="还需支付(元)" align="center" width="130">
-          <template slot-scope="scope">
-            <span>{{scope.row.cloth.totalPrice - scope.row.cloth.deductAmount}}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="本次优惠金额(元)" align="center" prop="deductAmount" width="180">
-        </el-table-column>
-        <el-table-column label="操作" align="center" fixed="right">
-          <template slot-scope="scope">
-            <el-button
-               
-              type="text"
-              style="color: #ff4949"
-              @click="removeCouponRelateCloth(scope.$index)"
-            >删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
+                <el-table-column label="操作" align="center">
+                    <template slot-scope="scope">
+                        <el-button type="text" style="color: #ff4949" @click="addCouponRelateCloth(scope.$index)">添加</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br />
+            <span>已选择衣物</span>
+            <br />
+            <el-table :data="changeDiscountCouponSelectCloths" style="width: 100%">
+                <el-table-column label="序号" align="center" width="80">
+                    <template slot-scope="scope">
+                        <span>#{{ scope.row.clothIndex + 1 }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="衣服名称" align="center" prop="clothName" width="250" />
+                <el-table-column label="颜色" align="center" width="120">
+                    <template slot-scope="scope">
+                        <span>
+                            <template v-for="(color, index) in scope.row.cloth.orderClothColorDTOS">
+                                {{ index == 0 ? color.clothColorName : ',' + color.clothColorName }}
+                            </template>
+                        </span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="衣服品牌" align="center" prop="name" width="120">
+                    <template slot-scope="scope">
+                        <span>{{ scope.row.cloth.clothBrandName }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="瑕疵" align="center">
+                    <template slot-scope="scope">
+                        <span>
+                            <template v-for="(color, index) in scope.row.cloth.orderClothFlawDTOS">
+                                {{ index == 0 ? color.clothFlawName : ',' + color.clothFlawName }}
+                            </template>
+                        </span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="洗涤方式" align="center" width="80">
+                    <template slot-scope="scope">
+                        <span>{{ scope.row.cloth.clothWashModeName }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="原价(元)" align="center" prop="totalPrice" width="100">
+                    <template slot-scope="scope">
+                        <span>{{ scope.row.cloth.totalPrice }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="已优惠金额(元)" align="center" prop="deductAmount" width="130">
+                    <template slot-scope="scope">
+                        <span>{{ scope.row.cloth.deductAmount }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="还需支付(元)" align="center" width="130">
+                    <template slot-scope="scope">
+                        <span>{{ scope.row.cloth.totalPrice - scope.row.cloth.deductAmount }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column label="本次优惠金额(元)" align="center" prop="deductAmount" width="180"> </el-table-column>
+                <el-table-column label="操作" align="center" fixed="right">
+                    <template slot-scope="scope">
+                        <el-button type="text" style="color: #ff4949" @click="removeCouponRelateCloth(scope.$index)">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
 
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="changeDiscountCouponOpen = false">取 消</el-button>
-        <el-button type="primary" @click="submitChangeCouponRelateCloth">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="changeDiscountCouponOpen = false">取 消</el-button>
+                <el-button type="primary" @click="submitChangeCouponRelateCloth">确 定</el-button>
+            </span>
+        </el-dialog>
+    </div>
 </template>
 
 <script>
-import {collectCloth} from "../../../../api/order/cloth";
+import { collectCloth } from '../../../../api/order/cloth'
 
 export default {
-  name: "cashCloth",
-  props: {
-    appUserInfo: {
-      type: Object
-    },
-    orderForm: {
-      type: Object
-    },
-    orderClothItemDTOS:{
-      type: Array,
-      default:[]
-    },
-    clothSpeeds:{
-      type: Array,
-      default:[]
-    },
-    deductCouponVOS:{
-      type:Array,
-      default:[]
-    },
-    discountCouponVOS:{//可选择的折扣券
-      type:Array,
-      default:[]
-    }
-  },
-  data(){
-    return {
-      dialogLoading:false,
-      setCouponOpen:false,//是否选择优惠券
-
-      loadingText:'',
-      confirmCouponTabIndex:'0',
-      confirmDeductTabIndex:'0',
-      selectCoupons:[],
-      changeDiscountCouponIndex:-1,
-      changeDiscountCouponOpen:false,
-      changeDiscountCouponTitle:'',
-      changeDiscountCouponSelectCloths:[],
-      changeDiscountCouponCanSelectCloths:[],
-    }
-  },
-  mounted() {
-    if(process.env.ENV != 'production'){
-      window.cashClothDialog = this
-    }
-  },
-  methods:{
-  
-    calculateTotalPrice(){
-      var price = 0;
-      for (let i = 0; i < this.orderClothItemDTOS.length; i++) {
-        price += this.calculateClothSpecialPrice(i) + this.orderClothItemDTOS[i].defaultPrice
-      }
-      return price
-    },
-    calculateClothSpecialPrice(index){
-      var specialPrice = 0
-      if(this.orderClothItemDTOS[index].orderClothCraftDTOS && this.orderClothItemDTOS[index].orderClothCraftDTOS.length > 0){
-        for (let i = 0; i < this.orderClothItemDTOS[index].orderClothCraftDTOS.length; i++) {
-          specialPrice += this.orderClothItemDTOS[index].orderClothCraftDTOS[i].price
+    name: 'cashCloth',
+    props: {
+        appUserInfo: {
+            type: Object
+        },
+        orderForm: {
+            type: Object
+        },
+        orderClothItemDTOS: {
+            type: Array,
+            default: []
+        },
+        clothSpeeds: {
+            type: Array,
+            default: []
+        },
+        deductCouponVOS: {
+            type: Array,
+            default: []
+        },
+        discountCouponVOS: {
+            //可选择的折扣券
+            type: Array,
+            default: []
         }
-      }
-
-      if(this.orderClothItemDTOS[index].isHedging == 'Y'){
-        specialPrice += this.orderClothItemDTOS[index].hedgingPrice * 0.01
-      }
-      for (let i = 0; i < this.clothSpeeds.length; i++) {
-        if(this.orderClothItemDTOS[index].clothSpeedId == this.clothSpeeds[i].id){
-          specialPrice += this.orderClothItemDTOS[index].defaultPrice * (this.clothSpeeds[i].multiple - 1)
-          break
-        }
-      }
-      return specialPrice
-    },
-    calculateDeliveryPrice(){
-      if(this.calculateTotalPrice() >= 100){
-        return 0
-      }
-      var delivery = 0
-      if(this.orderForm.takeClothWay && this.orderForm.takeClothWay == '1'){
-        delivery += 10
-      }
-      if(this.orderForm.sendClothWay && this.orderForm.sendClothWay == '1'){
-        delivery += 10
-      }
-      return delivery
-    },
-    //计算当前所有优惠金额
-    calculateTotalDiscountAmount(){
-      var totalDiscountAmount = this.orderForm.cashDeductAmount?this.orderForm.cashDeductAmount:0
-      this.orderClothItemDTOS.forEach(cloth => {
-        totalDiscountAmount = (parseInt(totalDiscountAmount * 100) + parseInt(cloth.deductAmount * 100))/100
-      })
-      //折扣优惠券
-      if(this.orderForm.discountCoupon){
-        var discountCoupon = this.orderForm.discountCoupon
-        this.orderClothItemDTOS.forEach(cloth => {
-          if(discountCoupon.appCouponTypeApplyClothVOS.find(item => item.clothItemId == cloth.id)){
-            totalDiscountAmount = (parseInt(totalDiscountAmount*100) + (parseInt(cloth.totalPrice*100) - parseInt(cloth.deductAmount*100))*(100-parseInt(discountCoupon.deductAmount*100))/100)/100
-          }
-        })
-      }
-      return totalDiscountAmount
-    },
-    //计算出去现金券其余的优惠金额
-    calculateTotalDiscountAmountWithoutCashAmount(){
-      var totalDiscountAmount = 0
-      this.orderClothItemDTOS.forEach(cloth => {
-        totalDiscountAmount = (parseInt(totalDiscountAmount * 100) + parseInt(cloth.deductAmount * 100))/100
-      })
-      //折扣优惠券
-      if(this.orderForm.discountCoupon){
-        var discountCoupon = this.orderForm.discountCoupon
-        this.orderClothItemDTOS.forEach(cloth => {
-          if(discountCoupon.appCouponTypeApplyClothVOS.find(item => item.clothItemId == cloth.id)){
-            totalDiscountAmount = (parseInt(totalDiscountAmount*100) + (parseInt(cloth.totalPrice*100) - parseInt(cloth.deductAmount*100))*(100-parseInt(discountCoupon.deductAmount*100))/100)/100
-          }
-        })
-      }
-      return totalDiscountAmount
-
-    },
-    /**
-     * 计算当前优惠券抵扣明细
-     */
-    calculateCouponDiscountInfo(){
-      var deductAmount = 0
-      this.changeDiscountCouponSelectCloths.forEach(item => {
-        deductAmount += item.deductAmount
-      })
-      return deductAmount
     },
+    data() {
+        return {
+            dialogLoading: false,
+            setCouponOpen: false, //是否选择优惠券
 
-    onCouponTabChange(tab,event){
-      console.log('tab.index:' + tab.index)
-      // if(tab.index == '1'){
-      //   this.$refs['couponRef'].focus()
-      // }
-    },
-    onSelectCoupon(){
-      if(this.deductCouponVOS.length == 0){
-        this.$message.error('没有可选择的优惠券')
-        return
-      }
-      this.setCouponOpen = true
-    },
-    changeCouponDiscountCloth(index){
-      this.changeDiscountCouponSelectCloths = this.selectCoupons[index].orderCouponClothDTOS.concat()
-      for (let i = 0; i < this.changeDiscountCouponSelectCloths.length; i++) {
-        var item = this.changeDiscountCouponSelectCloths[i]
-        item.cloth = JSON.parse(JSON.stringify(this.orderClothItemDTOS[item.clothIndex]))
-      }
-      this.changeDiscountCouponIndex = index
-      this.changeDiscountCouponCanSelectCloths = []
-      this.orderClothItemDTOS.forEach(item => {
-        //如果这件衣服已经被被抵扣完成,则不需要选择
-        if((item.totalPrice - item.deductAmount) <= 0){
-          return
-        }
-        //添加优惠券支持的衣服
-        if(!this.selectCoupons[index].appCouponTypeApplyClothVOS.find(i => i.clothItemId == item.id)){
-          return;
-        }
-        //如果这个优惠券已经被选择过,则跳过
-        if(this.selectCoupons[index].orderCouponClothDTOS.find(i => i.clothIndex == item.index)){
-          return;
+            loadingText: '',
+            confirmCouponTabIndex: '0',
+            confirmDeductTabIndex: '0',
+            selectCoupons: [],
+            changeDiscountCouponIndex: -1,
+            changeDiscountCouponOpen: false,
+            changeDiscountCouponTitle: '',
+            changeDiscountCouponSelectCloths: [],
+            changeDiscountCouponCanSelectCloths: []
         }
-        this.changeDiscountCouponCanSelectCloths.push(item)
-      })
-      this.changeDiscountCouponTitle = '修改『' + this.selectCoupons[index].couponTypeTitle + '』可抵扣衣物'
-      this.changeDiscountCouponOpen = true
     },
-    onDiscountCouponSelect(e){
-      this.orderForm.discountCoupon = this.discountCouponVOS.find(item => item.id == e)
-    },
-    getDiscountClothList(){
-      var cloths = []
-      if(!this.orderForm.discountCoupon){
-        return cloths
-      }
-      this.orderClothItemDTOS.forEach(cloth => {
-        if(this.orderForm.discountCoupon.appCouponTypeApplyClothVOS.find(item => item.clothItemId == cloth.id)){
-          cloths.push(cloth)
-        }
-      })
-      return cloths
-    },
-    calculateClothName(index){
-      var clothName = this.orderClothItemDTOS[index].name
-      this.orderClothItemDTOS[index].orderClothTypeDTOS.forEach(item => {
-        if(item.clothTypeCode == '0'){
-          clothName += ' - 加厚'
-        }
-        if(item.clothTypeCode == '0'){
-          clothName += ' - 羊绒'
-        }
-        if(item.clothTypeCode == '0'){
-          clothName += ' - 真丝'
-        }
-        if(item.clothTypeCode == '0'){
-          clothName += ' - 儿童'
-        }
-      })
-      return clothName
-    },
-    calculateClothNameByInfo(cloth){
-      var clothName = cloth.name
-      cloth.orderClothTypeDTOS.forEach(item => {
-        if(item.clothTypeCode == '0'){
-          clothName += ' - 加厚'
-        }
-        if(item.clothTypeCode == '0'){
-          clothName += ' - 羊绒'
-        }
-        if(item.clothTypeCode == '0'){
-          clothName += ' - 真丝'
-        }
-        if(item.clothTypeCode == '0'){
-          clothName += ' - 儿童'
+    mounted() {
+        if (process.env.ENV != 'production') {
+            window.cashClothDialog = this
         }
-      })
-      return clothName
     },
-    onSelectCouponItem(index){
-      var coupon = this.deductCouponVOS[index]
-      coupon.orderCouponClothDTOS = []
+    methods: {
+        calculateTotalPrice() {
+            var price = 0
+            for (let i = 0; i < this.orderClothItemDTOS.length; i++) {
+                price += this.calculateClothSpecialPrice(i) + this.orderClothItemDTOS[i].defaultPrice
+            }
+            return price
+        },
+        calculateClothSpecialPrice(index) {
+            var specialPrice = 0
+            if (this.orderClothItemDTOS[index].orderClothCraftDTOS && this.orderClothItemDTOS[index].orderClothCraftDTOS.length > 0) {
+                for (let i = 0; i < this.orderClothItemDTOS[index].orderClothCraftDTOS.length; i++) {
+                    specialPrice += this.orderClothItemDTOS[index].orderClothCraftDTOS[i].price
+                }
+            }
 
+            if (this.orderClothItemDTOS[index].isHedging == 'Y') {
+                specialPrice += this.orderClothItemDTOS[index].hedgingPrice * 0.01
+            }
+            for (let i = 0; i < this.clothSpeeds.length; i++) {
+                if (this.orderClothItemDTOS[index].clothSpeedId == this.clothSpeeds[i].id) {
+                    specialPrice += this.orderClothItemDTOS[index].defaultPrice * (this.clothSpeeds[i].multiple - 1)
+                    break
+                }
+            }
+            return specialPrice
+        },
+        calculateDeliveryPrice() {
+            if (this.calculateTotalPrice() >= 100) {
+                return 0
+            }
+            var delivery = 0
+            if (this.orderForm.takeClothWay && this.orderForm.takeClothWay == '1') {
+                delivery += 10
+            }
+            if (this.orderForm.sendClothWay && this.orderForm.sendClothWay == '1') {
+                delivery += 10
+            }
+            return delivery
+        },
+        //计算当前所有优惠金额
+        calculateTotalDiscountAmount() {
+            var totalDiscountAmount = this.orderForm.cashDeductAmount ? this.orderForm.cashDeductAmount : 0
+            this.orderClothItemDTOS.forEach((cloth) => {
+                totalDiscountAmount = (parseInt(totalDiscountAmount * 100) + parseInt(cloth.deductAmount * 100)) / 100
+            })
+            //折扣优惠券
+            if (this.orderForm.discountCoupon) {
+                var discountCoupon = this.orderForm.discountCoupon
+                this.orderClothItemDTOS.forEach((cloth) => {
+                    if (discountCoupon.appCouponTypeApplyClothVOS.find((item) => item.clothItemId == cloth.id)) {
+                        totalDiscountAmount = (parseInt(totalDiscountAmount * 100) + ((parseInt(cloth.totalPrice * 100) - parseInt(cloth.deductAmount * 100)) * (100 - parseInt(discountCoupon.deductAmount * 100))) / 100) / 100
+                    }
+                })
+            }
+            return totalDiscountAmount
+        },
+        //计算出去现金券其余的优惠金额
+        calculateTotalDiscountAmountWithoutCashAmount() {
+            var totalDiscountAmount = 0
+            this.orderClothItemDTOS.forEach((cloth) => {
+                totalDiscountAmount = (parseInt(totalDiscountAmount * 100) + parseInt(cloth.deductAmount * 100)) / 100
+            })
+            //折扣优惠券
+            if (this.orderForm.discountCoupon) {
+                var discountCoupon = this.orderForm.discountCoupon
+                this.orderClothItemDTOS.forEach((cloth) => {
+                    if (discountCoupon.appCouponTypeApplyClothVOS.find((item) => item.clothItemId == cloth.id)) {
+                        totalDiscountAmount = (parseInt(totalDiscountAmount * 100) + ((parseInt(cloth.totalPrice * 100) - parseInt(cloth.deductAmount * 100)) * (100 - parseInt(discountCoupon.deductAmount * 100))) / 100) / 100
+                    }
+                })
+            }
+            return totalDiscountAmount
+        },
+        /**
+         * 计算当前优惠券抵扣明细
+         */
+        calculateCouponDiscountInfo() {
+            var deductAmount = 0
+            this.changeDiscountCouponSelectCloths.forEach((item) => {
+                deductAmount += item.deductAmount
+            })
+            return deductAmount
+        },
 
-      //找出优惠券适配优惠的衣服
-      var applyCloths = []
-      coupon.appCouponTypeApplyClothVOS.forEach(item => {
-        for (let i = 0; i < this.orderClothItemDTOS.length; i++) {
-          var cloth = this.orderClothItemDTOS[i]
-          if(cloth.id != item.clothItemId || (cloth.totalPrice - cloth.deductAmount) <= 0){
-            continue
-          }
-          applyCloths.push(cloth)
-        }
-      })
-      //排序,按照订单剩余需要支付的金额降序
-      applyCloths.sort((a,b) => {
-        return (b.totalPrice - b.deductAmount) - (a.totalPrice - a.deductAmount)
-      })
-      console.log('applyCloths:' + JSON.stringify(applyCloths))
-      if(coupon.discountWay == '0'){//抵扣
-        if(coupon.isUnique == 'Y') {//单件,只减一件
-          var cloth = applyCloths[0]
-          //抵扣所有衣服里金额最大的
-          if((cloth.totalPrice - cloth.deductAmount) >= coupon.deductAmount){
-            coupon.orderCouponClothDTOS.push({clothIndex:cloth.index,id:cloth.id,deductAmount:coupon.deductAmount,clothName:this.calculateClothNameByInfo(cloth)})
-            cloth.deductAmount += coupon.deductAmount
-          }else{
-            coupon.orderCouponClothDTOS.push({clothIndex:cloth.index,id:cloth.id,deductAmount:(cloth.totalPrice - cloth.deductAmount),clothName:this.calculateClothNameByInfo(cloth)})
-            cloth.deductAmount = cloth.totalPrice
-          }
-        }else{//非单件,可减多件
-          var deductAmount = coupon.deductAmount
-          for (let i = 0; i < applyCloths.length; i++) {
-            //如果优惠券可抵扣金额用完
-            if(deductAmount <= 0){
-              break
+        onCouponTabChange(tab, event) {
+            console.log('tab.index:' + tab.index)
+            // if(tab.index == '1'){
+            //   this.$refs['couponRef'].focus()
+            // }
+        },
+        onSelectCoupon() {
+            if (this.deductCouponVOS.length == 0) {
+                this.$message.error('没有可选择的优惠券')
+                return
+            }
+            this.setCouponOpen = true
+        },
+        changeCouponDiscountCloth(index) {
+            this.changeDiscountCouponSelectCloths = this.selectCoupons[index].orderCouponClothDTOS.concat()
+            for (let i = 0; i < this.changeDiscountCouponSelectCloths.length; i++) {
+                var item = this.changeDiscountCouponSelectCloths[i]
+                item.cloth = JSON.parse(JSON.stringify(this.orderClothItemDTOS[item.clothIndex]))
             }
-            var cloth = applyCloths[i]
-            if((cloth.totalPrice - cloth.deductAmount) >= deductAmount){
-              coupon.orderCouponClothDTOS.push({clothIndex:cloth.index,id:cloth.id,deductAmount:deductAmount,clothName:this.calculateClothNameByInfo(cloth)})
-              cloth.deductAmount += deductAmount
-              deductAmount = 0
-            }else{
-              coupon.orderCouponClothDTOS.push({clothIndex:cloth.index,id:cloth.id,deductAmount:(cloth.totalPrice - cloth.deductAmount),clothName:this.calculateClothNameByInfo(cloth)})
-              cloth.deductAmount = cloth.totalPrice
-              deductAmount -= (cloth.totalPrice - cloth.deductAmount)
+            this.changeDiscountCouponIndex = index
+            this.changeDiscountCouponCanSelectCloths = []
+            this.orderClothItemDTOS.forEach((item) => {
+                //如果这件衣服已经被被抵扣完成,则不需要选择
+                if (item.totalPrice - item.deductAmount <= 0) {
+                    return
+                }
+                //添加优惠券支持的衣服
+                if (!this.selectCoupons[index].appCouponTypeApplyClothVOS.find((i) => i.clothItemId == item.id)) {
+                    return
+                }
+                //如果这个优惠券已经被选择过,则跳过
+                if (this.selectCoupons[index].orderCouponClothDTOS.find((i) => i.clothIndex == item.index)) {
+                    return
+                }
+                this.changeDiscountCouponCanSelectCloths.push(item)
+            })
+            this.changeDiscountCouponTitle = '修改『' + this.selectCoupons[index].couponTypeTitle + '』可抵扣衣物'
+            this.changeDiscountCouponOpen = true
+        },
+        onDiscountCouponSelect(e) {
+            this.orderForm.discountCoupon = this.discountCouponVOS.find((item) => item.id == e)
+        },
+        getDiscountClothList() {
+            var cloths = []
+            if (!this.orderForm.discountCoupon) {
+                return cloths
             }
+            this.orderClothItemDTOS.forEach((cloth) => {
+                if (this.orderForm.discountCoupon.appCouponTypeApplyClothVOS.find((item) => item.clothItemId == cloth.id)) {
+                    cloths.push(cloth)
+                }
+            })
+            return cloths
+        },
+        calculateClothName(index) {
+            var clothName = this.orderClothItemDTOS[index].name
+            this.orderClothItemDTOS[index].orderClothTypeDTOS.forEach((item) => {
+                if (item.clothTypeCode == '0') {
+                    clothName += ' - 加厚'
+                }
+                if (item.clothTypeCode == '0') {
+                    clothName += ' - 羊绒'
+                }
+                if (item.clothTypeCode == '0') {
+                    clothName += ' - 真丝'
+                }
+                if (item.clothTypeCode == '0') {
+                    clothName += ' - 儿童'
+                }
+            })
+            return clothName
+        },
+        calculateClothNameByInfo(cloth) {
+            var clothName = cloth.name
+            cloth.orderClothTypeDTOS.forEach((item) => {
+                if (item.clothTypeCode == '0') {
+                    clothName += ' - 加厚'
+                }
+                if (item.clothTypeCode == '0') {
+                    clothName += ' - 羊绒'
+                }
+                if (item.clothTypeCode == '0') {
+                    clothName += ' - 真丝'
+                }
+                if (item.clothTypeCode == '0') {
+                    clothName += ' - 儿童'
+                }
+            })
+            return clothName
+        },
+        onSelectCouponItem(index) {
+            var coupon = this.deductCouponVOS[index]
+            coupon.orderCouponClothDTOS = []
 
-          }
-        }
-      }else if(coupon.discountWay == '1'){//满减
-        if(applyCloths.length < parseInt(coupon.minAmount)){//未满足满减条件
-          this.$message.error('未满足满减条件')
-          return
-        }
-        if(coupon.isUnique == 'Y'){//单件,只减一件
-          var cloth = applyCloths[applyCloths.length - 1]
-          coupon.orderCouponClothDTOS.push({clothIndex:cloth.index,id:cloth.id,deductAmount:(cloth.totalPrice - cloth.deductAmount),clothName:this.calculateClothNameByInfo(cloth)})
-          cloth.deductAmount = cloth.totalPrice
-        }else{//非单件,可减多件
-          var count = parseInt(applyCloths.length/parseInt(coupon.minAmount))*parseInt(coupon.deductAmount)
-          for (let i = 0; i < count; i++) {
-            var cloth = applyCloths[applyCloths.length - 1 - i]
-            coupon.orderCouponClothDTOS.push({clothIndex:cloth.index,id:cloth.id,deductAmount:(cloth.totalPrice - cloth.deductAmount),clothName:this.calculateClothNameByInfo(cloth)})
-            cloth.deductAmount = cloth.totalPrice
-          }
-        }
-      }
-      this.deductCouponVOS.splice(index,1)
-      this.selectCoupons.push(coupon)
-      console.log(this.selectCoupons)
-      this.setCouponOpen = false
-      this.orderClothItemDTOS = this.orderClothItemDTOS.concat()
-    },
-    //去除已选择的优惠券
-    removeSelectCoupon(index){
-      var coupon = this.selectCoupons[index]
-      //将优惠券放回未选择的数组中
-      if(coupon.discountWay == '2'){
-        this.discountCouponVOS.push(coupon)
-      }else{
-        this.deductCouponVOS.push(coupon)
-      }
-      this.selectCoupons.splice(index,1)
+            //找出优惠券适配优惠的衣服
+            var applyCloths = []
+            coupon.appCouponTypeApplyClothVOS.forEach((item) => {
+                for (let i = 0; i < this.orderClothItemDTOS.length; i++) {
+                    var cloth = this.orderClothItemDTOS[i]
+                    if (cloth.id != item.clothItemId || cloth.totalPrice - cloth.deductAmount <= 0) {
+                        continue
+                    }
+                    applyCloths.push(cloth)
+                }
+            })
+            //排序,按照订单剩余需要支付的金额降序
+            applyCloths.sort((a, b) => {
+                return b.totalPrice - b.deductAmount - (a.totalPrice - a.deductAmount)
+            })
+            console.log('applyCloths:' + JSON.stringify(applyCloths))
+            if (coupon.discountWay == '0') {
+                //抵扣
+                if (coupon.isUnique == 'Y') {
+                    //单件,只减一件
+                    var cloth = applyCloths[0]
+                    //抵扣所有衣服里金额最大的
+                    if (cloth.totalPrice - cloth.deductAmount >= coupon.deductAmount) {
+                        coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: coupon.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
+                        cloth.deductAmount += coupon.deductAmount
+                    } else {
+                        coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: cloth.totalPrice - cloth.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
+                        cloth.deductAmount = cloth.totalPrice
+                    }
+                } else {
+                    //非单件,可减多件
+                    var deductAmount = coupon.deductAmount
+                    for (let i = 0; i < applyCloths.length; i++) {
+                        //如果优惠券可抵扣金额用完
+                        if (deductAmount <= 0) {
+                            break
+                        }
+                        var cloth = applyCloths[i]
+                        if (cloth.totalPrice - cloth.deductAmount >= deductAmount) {
+                            coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
+                            cloth.deductAmount += deductAmount
+                            deductAmount = 0
+                        } else {
+                            coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: cloth.totalPrice - cloth.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
+                            cloth.deductAmount = cloth.totalPrice
+                            deductAmount -= cloth.totalPrice - cloth.deductAmount
+                        }
+                    }
+                }
+            } else if (coupon.discountWay == '1') {
+                //满减
+                if (applyCloths.length < parseInt(coupon.minAmount)) {
+                    //未满足满减条件
+                    this.$message.error('未满足满减条件')
+                    return
+                }
+                if (coupon.isUnique == 'Y') {
+                    //单件,只减一件
+                    var cloth = applyCloths[applyCloths.length - 1]
+                    coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: cloth.totalPrice - cloth.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
+                    cloth.deductAmount = cloth.totalPrice
+                } else {
+                    //非单件,可减多件
+                    var count = parseInt(applyCloths.length / parseInt(coupon.minAmount)) * parseInt(coupon.deductAmount)
+                    for (let i = 0; i < count; i++) {
+                        var cloth = applyCloths[applyCloths.length - 1 - i]
+                        coupon.orderCouponClothDTOS.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: cloth.totalPrice - cloth.deductAmount, clothName: this.calculateClothNameByInfo(cloth) })
+                        cloth.deductAmount = cloth.totalPrice
+                    }
+                }
+            }
+            this.deductCouponVOS.splice(index, 1)
+            this.selectCoupons.push(coupon)
+            console.log(this.selectCoupons)
+            this.setCouponOpen = false
+            this.orderClothItemDTOS = this.orderClothItemDTOS.concat()
+        },
+        //去除已选择的优惠券
+        removeSelectCoupon(index) {
+            var coupon = this.selectCoupons[index]
+            //将优惠券放回未选择的数组中
+            if (coupon.discountWay == '2') {
+                this.discountCouponVOS.push(coupon)
+            } else {
+                this.deductCouponVOS.push(coupon)
+            }
+            this.selectCoupons.splice(index, 1)
 
-      //重置这条优惠券给衣服的优惠信息
-      var orderCouponClothDTOS = coupon.orderCouponClothDTOS
-      coupon.orderCouponClothDTOS = []
-      orderCouponClothDTOS.forEach(selectItem => {
-        this.calculateClothDiscountAmount(selectItem.clothIndex)
-      })
-    },
-    /** 提交按钮 */
-    async submitForm() {
-      this.$refs["confirmPayForm"].validate(valid => {
-        if (valid) {
-          var params = {...this.orderForm}
-          params.appUserId = this.appUserInfo.id
-          params.orderClothItemDTOS = this.orderClothItemDTOS.concat()
-          params.orderClothItemDTOS.forEach(item => {
-            item.clothItemName = item.name
-          })
-          var orderCouponDTOS = this.selectCoupons.concat()
-          if(this.orderForm.discountCouponId){
-            var coupon = this.discountCouponVOS.find(item => item.id=this.orderForm.discountCouponId)
-            var orderCouponClothDTOS = []
-            this.getDiscountClothList().forEach(item => {
-              var orderCouponClothDTO = {id:item.id,clothIndex:item.index,deductAmount:(parseInt((item.totalPrice - item.deductAmount)*100*parseInt(100 - coupon.deductAmount * 100))/10000)}
-              orderCouponClothDTOS.push(orderCouponClothDTO)
+            //重置这条优惠券给衣服的优惠信息
+            var orderCouponClothDTOS = coupon.orderCouponClothDTOS
+            coupon.orderCouponClothDTOS = []
+            orderCouponClothDTOS.forEach((selectItem) => {
+                this.calculateClothDiscountAmount(selectItem.clothIndex)
             })
-            orderCouponDTOS.push({id:coupon.id,...{orderCouponClothDTOS:orderCouponClothDTOS}})
-          }
-          params.orderCouponDTOS = orderCouponDTOS
-          params.isSpecial = params.isSpecial?'Y':'N'
-          params.payTimeType = '0'
-          const loading = this.$loading({
-            lock: true,
-            text: 'Loading',
-            spinner: 'el-icon-loading',
-            background: 'rgba(0, 0, 0, 0.7)'
-          });
-          collectCloth(params).then(res => {
-            this.$message('提交成功')
-            loading.close();
-            this.$emit('onPaySuccess', res.data)
-          }).catch(e => {
-            loading.close()
-            this.$message.error(e.data.msg)
-          })
-        }
-      });
-    },
-    removeCouponRelateCloth(index){
-      var cloth = this.changeDiscountCouponSelectCloths[index].cloth
-      cloth.deductAmount = cloth.deductAmount - this.changeDiscountCouponSelectCloths[index].deductAmount
-      this.changeDiscountCouponCanSelectCloths.push(cloth)
-      this.changeDiscountCouponSelectCloths.splice(index,1)
-    },
-    //选择优惠券关联的衣服
-    addCouponRelateCloth(index){
-      var hasDeductAmount = this.calculateCouponDiscountInfo()
-      if(this.selectCoupons[this.changeDiscountCouponIndex].deductAmount - hasDeductAmount <= 0){
-        this.$message.error('抵扣金额已用完,无法抵扣其他衣物')
-        return
-      }
-      if(this.selectCoupons[this.changeDiscountCouponIndex].isUnique == 'Y' && this.changeDiscountCouponSelectCloths.length > 0){
-        this.$message.error('该优惠券为单件抵扣,无法抵扣第二件衣物')
-      }
-      var coupon = this.selectCoupons[this.changeDiscountCouponIndex]
-      var cloth = this.changeDiscountCouponCanSelectCloths[index]
+        },
+        /** 提交按钮 */
+        async submitForm() {
+            this.$refs['confirmPayForm'].validate((valid) => {
+                if (valid) {
+                    var params = { ...this.orderForm }
+                    params.appUserId = this.appUserInfo.id
+                    params.orderClothItemDTOS = this.orderClothItemDTOS.concat()
+                    params.orderClothItemDTOS.forEach((item) => {
+                        item.clothItemName = item.name
+                    })
+                    var orderCouponDTOS = this.selectCoupons.concat()
+                    if (this.orderForm.discountCouponId) {
+                        var coupon = this.discountCouponVOS.find((item) => (item.id = this.orderForm.discountCouponId))
+                        var orderCouponClothDTOS = []
+                        this.getDiscountClothList().forEach((item) => {
+                            var orderCouponClothDTO = { id: item.id, clothIndex: item.index, deductAmount: parseInt((item.totalPrice - item.deductAmount) * 100 * parseInt(100 - coupon.deductAmount * 100)) / 10000 }
+                            orderCouponClothDTOS.push(orderCouponClothDTO)
+                        })
+                        orderCouponDTOS.push({ id: coupon.id, ...{ orderCouponClothDTOS: orderCouponClothDTOS } })
+                    }
+                    params.orderCouponDTOS = orderCouponDTOS
+                    params.isSpecial = params.isSpecial ? 'Y' : 'N'
+                    params.payTimeType = '0'
+                    const loading = this.$loading({
+                        lock: true,
+                        text: 'Loading',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(0, 0, 0, 0.7)'
+                    })
+                    collectCloth(params)
+                        .then((res) => {
+                            this.$message('提交成功')
+                            loading.close()
+                            this.$emit('onPaySuccess', res.data)
+                        })
+                        .catch((e) => {
+                            loading.close()
+                            this.$message.error(e.data.msg)
+                        })
+                }
+            })
+        },
+        removeCouponRelateCloth(index) {
+            var cloth = this.changeDiscountCouponSelectCloths[index].cloth
+            cloth.deductAmount = cloth.deductAmount - this.changeDiscountCouponSelectCloths[index].deductAmount
+            this.changeDiscountCouponCanSelectCloths.push(cloth)
+            this.changeDiscountCouponSelectCloths.splice(index, 1)
+        },
+        //选择优惠券关联的衣服
+        addCouponRelateCloth(index) {
+            var hasDeductAmount = this.calculateCouponDiscountInfo()
+            if (this.selectCoupons[this.changeDiscountCouponIndex].deductAmount - hasDeductAmount <= 0) {
+                this.$message.error('抵扣金额已用完,无法抵扣其他衣物')
+                return
+            }
+            if (this.selectCoupons[this.changeDiscountCouponIndex].isUnique == 'Y' && this.changeDiscountCouponSelectCloths.length > 0) {
+                this.$message.error('该优惠券为单件抵扣,无法抵扣第二件衣物')
+            }
+            var coupon = this.selectCoupons[this.changeDiscountCouponIndex]
+            var cloth = this.changeDiscountCouponCanSelectCloths[index]
 
-      if(coupon.isUnique == 'Y') {//单件,只减一件
-        //抵扣所有衣服里金额最大的
-        if((cloth.totalPrice - cloth.deductAmount) >= coupon.deductAmount){
-          this.changeDiscountCouponSelectCloths.push({clothIndex:cloth.index,id:cloth.id,deductAmount:coupon.deductAmount,clothName:this.calculateClothNameByInfo(cloth),cloth:cloth})
-          cloth.deductAmount += coupon.deductAmount
-        }else{
-          this.changeDiscountCouponSelectCloths.push({clothIndex:cloth.index,id:cloth.id,deductAmount:(cloth.totalPrice - cloth.deductAmount),clothName:this.calculateClothNameByInfo(cloth),cloth:cloth})
-          cloth.deductAmount = cloth.totalPrice
-        }
-      }else{//非单件,可减多件
-        var deductAmount = this.selectCoupons[this.changeDiscountCouponIndex].deductAmount - hasDeductAmount
-        if((cloth.totalPrice - cloth.deductAmount) >= deductAmount){
-          this.changeDiscountCouponSelectCloths.push({clothIndex:cloth.index,id:cloth.id,deductAmount:deductAmount,clothName:this.calculateClothNameByInfo(cloth),cloth:cloth})
-          cloth.deductAmount += deductAmount
-        }else{
-          this.changeDiscountCouponSelectCloths.push({clothIndex:cloth.index,id:cloth.id,deductAmount:(cloth.totalPrice - cloth.deductAmount),clothName:this.calculateClothNameByInfo(cloth),cloth:cloth})
-          cloth.deductAmount = cloth.totalPrice
-        }
-      }
+            if (coupon.isUnique == 'Y') {
+                //单件,只减一件
+                //抵扣所有衣服里金额最大的
+                if (cloth.totalPrice - cloth.deductAmount >= coupon.deductAmount) {
+                    this.changeDiscountCouponSelectCloths.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: coupon.deductAmount, clothName: this.calculateClothNameByInfo(cloth), cloth: cloth })
+                    cloth.deductAmount += coupon.deductAmount
+                } else {
+                    this.changeDiscountCouponSelectCloths.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: cloth.totalPrice - cloth.deductAmount, clothName: this.calculateClothNameByInfo(cloth), cloth: cloth })
+                    cloth.deductAmount = cloth.totalPrice
+                }
+            } else {
+                //非单件,可减多件
+                var deductAmount = this.selectCoupons[this.changeDiscountCouponIndex].deductAmount - hasDeductAmount
+                if (cloth.totalPrice - cloth.deductAmount >= deductAmount) {
+                    this.changeDiscountCouponSelectCloths.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: deductAmount, clothName: this.calculateClothNameByInfo(cloth), cloth: cloth })
+                    cloth.deductAmount += deductAmount
+                } else {
+                    this.changeDiscountCouponSelectCloths.push({ clothIndex: cloth.index, id: cloth.id, deductAmount: cloth.totalPrice - cloth.deductAmount, clothName: this.calculateClothNameByInfo(cloth), cloth: cloth })
+                    cloth.deductAmount = cloth.totalPrice
+                }
+            }
 
-      this.changeDiscountCouponCanSelectCloths.splice(index,1)
-    },
-    submitChangeCouponRelateCloth(){
-      this.selectCoupons[this.changeDiscountCouponIndex].orderCouponClothDTOS = this.changeDiscountCouponSelectCloths
-      this.changeDiscountCouponCanSelectCloths.forEach(item => {
-        this.calculateClothDiscountAmount(item.index)
-      })
-      this.changeDiscountCouponSelectCloths.forEach(item => {
-        this.calculateClothDiscountAmount(item.clothIndex)
-      })
-      this.selectCoupons = this.selectCoupons.concat()
-      this.orderClothItemDTOS = this.orderClothItemDTOS.concat()
-      this.changeDiscountCouponOpen = false
-    },
-    //计算某一件衣服的优惠金额,并配置到orderClothItemDTOS中
-    calculateClothDiscountAmount(index){
-      var cloth = this.orderClothItemDTOS[index]
-      cloth.deductAmount = 0
-      this.selectCoupons.forEach(i => {
-        var selectCloth = i.orderCouponClothDTOS.find(item => item.clothIndex == cloth.index)
-        if(selectCloth){
-          cloth.deductAmount = cloth.deductAmount + selectCloth.deductAmount
+            this.changeDiscountCouponCanSelectCloths.splice(index, 1)
+        },
+        submitChangeCouponRelateCloth() {
+            this.selectCoupons[this.changeDiscountCouponIndex].orderCouponClothDTOS = this.changeDiscountCouponSelectCloths
+            this.changeDiscountCouponCanSelectCloths.forEach((item) => {
+                this.calculateClothDiscountAmount(item.index)
+            })
+            this.changeDiscountCouponSelectCloths.forEach((item) => {
+                this.calculateClothDiscountAmount(item.clothIndex)
+            })
+            this.selectCoupons = this.selectCoupons.concat()
+            this.orderClothItemDTOS = this.orderClothItemDTOS.concat()
+            this.changeDiscountCouponOpen = false
+        },
+        //计算某一件衣服的优惠金额,并配置到orderClothItemDTOS中
+        calculateClothDiscountAmount(index) {
+            var cloth = this.orderClothItemDTOS[index]
+            cloth.deductAmount = 0
+            this.selectCoupons.forEach((i) => {
+                var selectCloth = i.orderCouponClothDTOS.find((item) => item.clothIndex == cloth.index)
+                if (selectCloth) {
+                    cloth.deductAmount = cloth.deductAmount + selectCloth.deductAmount
+                }
+            })
+        },
+        checkClose(done) {
+            this.$confirm('是否关闭表单,关闭后数据将丢失?')
+                .then(function () {
+                    done()
+                })
+                .then(() => {})
+                .catch(() => {})
         }
-      })
-    },
-    checkClose(done) {
-      this.$confirm('是否关闭表单,关闭后数据将丢失?').then(function() {
-        done()
-      }).then(() => {}).catch(() => {});
-    },
-  }
+    }
 }
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 2 - 2
src/views/order/cloth/sendCloth.vue

@@ -123,7 +123,7 @@
                     </el-descriptions>
                 </el-col>
                 <el-col :span="24" style="margin-top: 10px">
-                    <el-table :data="orderClothDetails" @selection-change="handleSelectionChange">
+                    <el-table :data="orderClothDetails" fit highlight-current-row border stripe @selection-change="handleSelectionChange">
                         <el-table-column
                             type="selection"
                             width="55"
@@ -327,7 +327,7 @@ export default {
             this.ids = []
             this.orderDetail = scope.row
             listOrderClothItem({ pageSize: 99999, pageNum: 1, orderNo: scope.row.orderNo }).then((res) => {
-                this.orderClothDetails = res.data.records
+                this.orderClothDetails = res.rows
                 this.title = '订单详情'
                 this.open = true
             })