Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

BKGin 6 bulan lalu
induk
melakukan
f40c7b9af5

+ 5 - 2
.env.development

@@ -5,10 +5,13 @@ VUE_APP_TITLE = 一七生活管理系统(测试)
 ENV = 'development'
 
 # 一七生活管理系统/开发环境
-VUE_APP_BASE_API_HOST = 'http://localhost:9801'
-VUE_APP_BASE_API = 'http://localhost:9801'
+# VUE_APP_BASE_API_HOST = 'http://localhost:9801'
+# VUE_APP_BASE_API = 'http://localhost:9801'
 # VUE_APP_BASE_API_HOST = 'http://139.224.65.227:8091/prod-api'
 # VUE_APP_BASE_API = 'http://139.224.65.227:8091/prod-api'
+VUE_APP_BASE_API_HOST = 'http://192.168.98.9:9801'
+VUE_APP_BASE_API = 'http://192.168.98.9:9801/'
+
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 7 - 6
src/components/payStatusPopup/index.vue

@@ -153,7 +153,7 @@ export default {
     },
 
     methods: {
-        open(type, info) {
+        open(type, info, appUserInfo = null) {
             this.orderInfo = info
             this.type = type
             if (type == 1) {
@@ -176,6 +176,11 @@ export default {
                 this.payType = info.payType
                 this.authCode = info.authCode
                 this.showPaySuccessBtn = false
+                console.log(appUserInfo)
+                if (appUserInfo.id) {
+                    this.appUserInfo = appUserInfo
+                }
+                console.log('aasss', this.appUserInfo)
                 this.pay()
             }
             if (type == 4) {
@@ -280,8 +285,6 @@ export default {
         },
 
         pay() {
-            console.log('A1')
-            console.log('A1-1')
             if (this.payType == 0 && !this.authCode) {
                 this.type = 4
                 this.errorMessage = '请先扫码'
@@ -289,9 +292,7 @@ export default {
                 this.changePayType()
                 return
             }
-            console.log('A2')
-
-            if (this.payType == 3 && appUserInfo.rechargeBalance + appUserInfo.giveBalance < this.orderInfo.payAmount) {
+            if (this.payType == 3 && this.appUserInfo.rechargeBalance + this.appUserInfo.giveBalance < this.orderInfo.payAmount) {
                 this.errorMessage = '余额不足'
                 this.type = 4
                 this.authCode = ''

+ 3 - 4
src/views/activity/clothItem/index.vue

@@ -54,13 +54,13 @@
                             </el-select>
                         </el-form-item>
                     </el-col>
-                    <el-col :span="24">
+                    <!-- <el-col :span="24">
                         <el-form-item label="洗衣类型" prop="washModeIds">
                             <el-select v-model="washModeIds" filterable placeholder="洗衣类型" clearable multiple>
                                 <el-option v-for="item in washModeList" :label="item.name" :value="item.id" :key="item.name"> </el-option>
                             </el-select>
                         </el-form-item>
-                    </el-col>
+                    </el-col> -->
                     <!--                    <el-col :span="24">-->
                     <!--                        <el-form-item label="指定价格(元)" prop="price">-->
                     <!--                            <el-input-number v-model="form.price" placeholder="请输入指定价格" :precision="2" :min="0" :max="999999" />-->
@@ -119,8 +119,7 @@ export default {
             // 表单校验
             rules: {
                 clothItemId: [{ required: true, message: '衣服ID不能为空', trigger: 'change' }],
-                price: [{ required: true, message: '指定价格不能为空', trigger: 'blur' }],
-                washModeId: [{ required: true, message: '洗衣类型ID不能为空', trigger: 'change' }]
+                price: [{ required: true, message: '指定价格不能为空', trigger: 'blur' }]
             },
             activityId: null,
             clothItemList: [],

+ 5 - 5
src/views/activity/couponInfo/index.vue

@@ -18,7 +18,7 @@
         </el-row>
 
         <Page uri="/mapi/activity/couponInfo/list" :request-params="queryParams" ref="pagination">
-            <el-table-column label="号" align="center" prop="id" width="80" />
+            <el-table-column label="号" align="center" prop="id" width="80" />
             <el-table-column label="标题" align="center" prop="title" :show-overflow-tooltip="true" />
             <el-table-column label="描述" align="center" prop="description" :show-overflow-tooltip="true" />
             <el-table-column label="宣传图片" align="center" prop="imgUrl" width="100">
@@ -58,7 +58,7 @@
                     <dict-tag :options="dict.type.coupon_use_range" :value="scope.row.storeScope" />
                 </template>
             </el-table-column>
-            <el-table-column label="展示在app购买页" align="center" prop="isShowAppBuyPage" width="100">
+            <!-- <el-table-column label="展示在app购买页" align="center" prop="isShowAppBuyPage" width="100">
                 <template slot-scope="scope">
                     <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isShowAppBuyPage" />
                 </template>
@@ -72,7 +72,7 @@
                 <template slot-scope="scope">
                     <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isShowWxBuyPageFromQrcode" />
                 </template>
-            </el-table-column>
+            </el-table-column> -->
 
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
                 <template slot-scope="scope">
@@ -154,7 +154,7 @@
                             </el-radio-group>
                         </el-form-item>
                     </el-col>
-                    <el-col :span="8">
+                    <!-- <el-col :span="8">
                         <el-form-item label="展示在app购买页" prop="isShowAppBuyPage">
                             <el-radio-group v-model="form.isShowAppBuyPage">
                                 <el-radio-button v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio-button>
@@ -174,7 +174,7 @@
                                 <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> -->
 
                     <!--                    <el-col :span="8">-->
                     <!--                        <el-form-item label="优惠券来源" prop="couponFrom">-->

+ 140 - 10
src/views/order/cloth/collectCloth.vue

@@ -199,12 +199,18 @@
                         <el-step title="衣服颜色"></el-step>
                         <el-step title="衣服品牌"></el-step>
                         <el-step title="衣服瑕疵"></el-step>
+                        <el-step title="衣服附件"></el-step>
                     </el-steps>
                 </el-col>
                 <el-col>
                     <div style="height: 20px"></div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 0">
+                    <div style="margin-left: 55px"> 
+                        <el-input v-model="defaultList.type" placeholder="请输入要搜索的衣服分类" style="width: 300px;" clearable>
+                            <el-button slot="append" icon="el-icon-search" @click="searchCloth('type', 'clothTypes')"></el-button>
+                        </el-input>
+                    </div>
                     <div style="margin-left: 40px">
                         <el-tag :key="item.id" type="info" v-for="item in clothTypes" style="margin-top: 15px; margin-left: 15px" size="medium" @click="onClothTypeSelect(item.id)">
                             {{ item.name }}
@@ -212,6 +218,11 @@
                     </div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 1">
+                    <div style="margin-left: 55px; margin-bottom: 10px"> 
+                        <el-input v-model="defaultList.item" placeholder="请输入要搜索的衣服类型" style="width: 300px;" clearable>
+                            <el-button slot="append" icon="el-icon-search" @click="searchCloth('item', 'clothItems')"></el-button>
+                        </el-input>
+                    </div>
                     <div style="margin-left: 40px">
                         <div class="horizontal-view" style="margin-left: 15px">
                             <span style="font-size: 14px; line-height: 19px">衣服类型:</span>
@@ -226,6 +237,11 @@
                     </div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 2">
+                    <div style="margin-left: 55px; margin-bottom: 10px"> 
+                        <el-input v-model="defaultList.color" placeholder="请输入要搜索的衣服颜色" style="width: 300px;" clearable>
+                            <el-button slot="append" icon="el-icon-search" @click="searchCloth('color', 'clothColors')"></el-button>
+                        </el-input>
+                    </div>
                     <div style="margin-left: 40px; display: flex; flex-wrap: wrap">
                         <template v-for="(item, index) in clothColors">
                             <div class="verticle-view" :style="'text-align: center;margin-top: 15px;margin-left: 15px;border-radius: 5px;border: 1px solid ' + (item.isSelect == true ? '#1890ff' : '#FFFFFF')" @click="onClothColorSelect(index)">
@@ -241,6 +257,11 @@
                     </div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 3">
+                    <div style="margin-left: 55px;"> 
+                        <el-input v-model="defaultList.brand" placeholder="请输入要搜索的衣服品牌" style="width: 300px;" clearable>
+                            <el-button slot="append" icon="el-icon-search" @click="searchCloth('brand', 'clothBrands')"></el-button>
+                        </el-input>
+                    </div>
                     <div style="margin-left: 40px">
                         <el-tag :key="item.id" type="info" v-for="item in clothBrands" style="margin-top: 15px; margin-left: 15px" size="medium" @click="onClothBrandSelect(item.id)">
                             {{ item.name }}
@@ -248,13 +269,23 @@
                     </div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 4">
-                    <el-tabs type="border-card">
+                    <el-tabs type="border-card" @tab-click="changeClothTab">
                         <el-tab-pane label="全部">
+                            <div style="margin-left: 15px;"> 
+                                <el-input v-model="defaultList.flaw" placeholder="请输入要搜索的衣服瑕疵" style="width: 300px;" clearable>
+                                    <el-button slot="append" icon="el-icon-search" @click="searchCloth('flaw', 'clothFlaws')"></el-button>
+                                </el-input>
+                            </div>
                             <el-tag :key="item.id" :type="item.isSelect ? 'success' : 'info'" v-for="(item, index) in clothFlaws" style="margin-top: 15px; margin-left: 15px" size="medium" @click="onClothFlawSelect(index)">
                                 {{ item.name }}
                             </el-tag>
                         </el-tab-pane>
                         <el-tab-pane :label="clothFlawType.name" v-for="clothFlawType in clothFlawTypes">
+                            <div style="margin-left: 15px;"> 
+                                <el-input v-model="defaultList.flaw" placeholder="请输入要搜索的衣服瑕疵" style="width: 300px;" clearable>
+                                    <el-button slot="append" icon="el-icon-search" @click="searchCloth('flaw', 'clothFlaws')"></el-button>
+                                </el-input>
+                            </div>
                             <template v-for="(item, index) in clothFlaws">
                                 <el-tag :key="item.id" :type="item.isSelect ? 'success' : 'info'" v-if="item.flawTypeId == clothFlawType.id" style="margin-top: 15px; margin-left: 15px" size="medium" @click="onClothFlawSelect(index)">
                                     {{ item.name }}
@@ -263,8 +294,38 @@
                         </el-tab-pane>
                     </el-tabs>
                 </el-col>
+                <el-col :span="24" v-if="addClothActiveTab == 5">
+                    <el-row :gutter="20">
+                        <el-col :span="8">
+                            <div>选择附件</div>
+                            <div style="margin-left: 15px; margin-top: 10px;"> 
+                                 <el-input v-model="defaultList.adjunct" placeholder="请输入要搜索的衣服附件" style="width: 300px;" clearable>
+                                    <el-button slot="append" icon="el-icon-search" @click="searchCloth('adjunct', 'clothAdjuncts')"></el-button>
+                                </el-input>
+                            </div>
+                            <el-tag :key="item.id" type="info" v-for="item in clothAdjuncts" style="margin-top: 15px; margin-left: 15px" @click="onClothAdjunctSelect(item)">
+                                {{ item.name }}
+                            </el-tag>
+                        </el-col>
+                        <el-col :span="16">
+                            <el-table :data="addClothAdjuncts" style="width: 100%">
+                                <el-table-column label="附件" align="center" prop="adjunctName" />
+                                <el-table-column label="数量" align="center" prop="num">
+                                    <template slot-scope="scope">
+                                        <el-input-number v-model="scope.row.num" size="small" :precision="0" :min="1" :max="999"></el-input-number>
+                                    </template>
+                                </el-table-column>
+                                <el-table-column label="操作" align="center">
+                                    <template slot-scope="scope">
+                                        <el-button type="text" icon="el-icon-delete" @click="removeClothAdjunct(scope.$index)">删除</el-button>
+                                    </template>
+                                </el-table-column>
+                            </el-table>
+                        </el-col>
+                     </el-row>
+                </el-col>
             </el-row>
-            <div slot="footer" class="dialog-footer" v-if="addClothActiveTab == 2 || addClothActiveTab == 4">
+            <div slot="footer" class="dialog-footer" v-if="addClothActiveTab == 2 || addClothActiveTab == 4 || addClothActiveTab == 5">
                 <el-button type="primary" @click="addClothItemConfirm" style="margin-left: 5%">确定</el-button>
             </div>
         </el-dialog>
@@ -273,6 +334,11 @@
             <el-row :gutter="20">
                 <el-col :span="8">
                     <div>选择附件</div>
+                    <div style="margin-left: 55px"> 
+                        <el-input v-model="defaultList.adjunct" placeholder="请输入要搜索的衣服附件" style="width: 300px;" clearable>
+                            <el-button slot="append" icon="el-icon-search" @click="searchCloth('adjunct', 'clothAdjuncts')"></el-button>
+                        </el-input>
+                    </div>
                     <el-tag :key="item.id" type="info" v-for="item in clothAdjuncts" style="margin-top: 15px; margin-left: 15px" @click="onClothAdjunctSelect(item)">
                         {{ item.name }}
                     </el-tag>
@@ -472,6 +538,20 @@ export default {
             checkOrderIntervalId: null,
 
             addClothActiveTab: 0,
+            defaultList: {
+                type: '',
+                clothTypes: [],
+                item: '',
+                clothItems: [],
+                color: '',
+                clothColors: [],
+                brand: '',
+                clothBrands: [],
+                flaw: '',
+                clothFlaws: [],
+                adjunct: '',
+                clothAdjuncts: []
+            },
             clothBrands: [],
             clothTypes: [],
             clothItems: [],
@@ -572,6 +652,23 @@ export default {
         })
     },
     methods: {
+        // 添加衣物过滤数据
+        searchCloth(k1, k2) {
+            if (!this.defaultList[k1]) {
+                this[k2] = this.defaultList[k2]
+            } else {
+                this[k2] = this.defaultList[k2].filter((item) => {
+                    return item.name.indexOf(this.defaultList[k1]) > -1
+                })
+            }
+        },
+
+        // 切换衣服瑕疵分页
+        changeClothTab() {
+            this.defaultList.flaw = ''
+            this.clothFlaws = this.defaultList.clothFlaws
+        },
+
         // 上传前校检格式和大小
         handleBeforeUpload(file) {
             // 校检文件类型
@@ -672,6 +769,8 @@ export default {
         /** 新增按钮操作 */
         handleAdd() {
             allList().then((res) => {
+                this.defaultList.type = ''
+                this.defaultList.clothTypes = res.data
                 this.clothTypes = res.data
                 this.reset()
                 this.selectClothItemIndex = -1
@@ -703,7 +802,7 @@ export default {
             if (orderInfo.payTimeType == '0') {
                 //第三方支付
                 console.log('第三方支付')
-                this.$refs.payStatusPopup.open(3, orderInfo)
+                this.$refs.payStatusPopup.open(3, orderInfo, this.appUserInfo)
                 // this.checkOrderStatusNum = 0
                 // if (this.checkOrderIntervalId) {
                 //     clearInterval(this.checkOrderIntervalId)
@@ -781,12 +880,13 @@ export default {
         },
         onClothTypeSelect(id) {
             allClothItem({ clothTypeId: id }).then((res) => {
+                this.defaultList.item = ''
+                this.defaultList.clothItems = res.data
                 this.clothItems = res.data
                 this.addClothActiveTab = 1
             })
         },
         onClothItemSelect(index) {
-            console.log(this.clothItems)
             for (let i = 0; i < this.form.clothTypeKeys.length; i++) {
                 var orderClothTypeDTO = { orderClothTypeCode: this.form.clothTypeKeys[i] }
                 if (this.form.clothTypeKeys[i] == '1') {
@@ -835,6 +935,8 @@ export default {
                 this.$forceUpdate()
             } else {
                 allClothColor().then((res) => {
+                    this.defaultList.color = '';
+                    this.defaultList.clothColors = res.data
                     this.clothColors = res.data
                     this.form.clothItemId = this.clothItems[index].id
                     this.form = { ...this.form, ...this.clothItems[index] }
@@ -874,6 +976,8 @@ export default {
                     this.clothFlawTypes = res.data
 
                     allClothFlaw().then((res1) => {
+                        this.defaultList.flaw = '';
+                        this.defaultList.clothFlaws = res1.data
                         this.clothFlaws = res1.data
                         this.addClothActiveTab = 4
                     })
@@ -907,11 +1011,13 @@ export default {
                             id: '0',
                             name: '无'
                         })
+                        this.defaultList.brand = '';
+                        this.defaultList.clothBrands = res.data
                         this.clothBrands = res.data
                         this.addClothActiveTab = 3
                     })
                 }
-            } else {
+            } else if (this.addClothActiveTab == 4) {
                 //选择瑕疵
                 var clothFlawDTOS = []
                 this.clothFlaws.forEach((item) => {
@@ -930,10 +1036,24 @@ export default {
                     this.open = false
                     this.$forceUpdate()
                 } else {
-                    this.orderClothItemDTOS.push(this.form)
-                    console.log(this.orderClothItemDTOS)
-                    this.open = false
-                }
+                    // this.orderClothItemDTOS.push(this.form)
+                    // console.log(this.orderClothItemDTOS)
+                    // this.open = false
+                    allClothAdjunct().then((res) => {
+                        this.defaultList.clothAdjuncts = res.data;
+                        this.defaultList.adjunct = ''
+                        this.clothAdjuncts = res.data
+                        this.addClothActiveTab = 5
+                        let index = this.orderClothItemDTOS.length
+                        this.selectClothItemIndex = index
+                        this.addClothAdjuncts = []
+                        this.$forceUpdate()
+                    })
+                } 
+            } else if (this.addClothActiveTab == 5) {
+                this.orderClothItemDTOS.push(this.form)
+                this.addClothAdjunctSubmit()
+                this.open = false
             }
         },
         onClothFlawSelect(index) {
@@ -954,6 +1074,8 @@ export default {
         },
         handleAddClothFlaw(index) {
             allClothAdjunct().then((res) => {
+                this.defaultList.clothAdjuncts = res.data;
+                this.defaultList.adjunct = ''
                 this.clothAdjuncts = res.data
                 this.addClothAdjunctOpen = true
                 this.selectClothItemIndex = index
@@ -1000,6 +1122,8 @@ export default {
         updateClothItem(index, tabIndex) {
             if (tabIndex == 0) {
                 allList().then((res) => {
+                    this.defaultList.type = ''
+                    this.defaultList.clothTypes = res.data
                     this.clothTypes = res.data
                     this.selectClothItemIndex = index
                     this.form = { ...this.orderClothItemDTOS[index] }
@@ -1011,6 +1135,8 @@ export default {
             }
             if (tabIndex == 2) {
                 allClothColor().then((res) => {
+                    this.defaultList.color = ''
+                    this.defaultList.clothColors = res.data
                     this.clothColors = res.data
                     this.selectClothItemIndex = index
                     this.form = { ...this.orderClothItemDTOS[index] }
@@ -1022,6 +1148,8 @@ export default {
             }
             if (tabIndex == 3) {
                 allBrand().then((res) => {
+                    this.defaultList.brand = ''
+                    this.defaultList.clothBrands = res.data
                     this.clothBrands = res.data
                     this.selectClothItemIndex = index
                     this.form = { ...this.orderClothItemDTOS[index] }
@@ -1037,6 +1165,8 @@ export default {
                     this.clothFlawTypes = res.data
 
                     allClothFlaw().then((res1) => {
+                        this.defaultList.flaw = '';
+                        this.defaultList.clothFlaws = res1.data
                         this.clothFlaws = res1.data
                         this.selectClothItemIndex = index
                         this.form = { ...this.orderClothItemDTOS[index] }
@@ -1268,7 +1398,7 @@ export default {
             params.clothIds = clothIds
             this.orderForm.isSpecial = 'N'
             this.orderForm.authCode = ''
-            this.orderForm.payType = '3'
+            this.orderForm.payType = ''
             getDiscountByStoreId({ appUserId: this.appUserInfo.id }).then((res) => {
                 this.discountCouponVOS = res.data
                 params.discountWay = '0'

+ 26 - 11
src/views/order/cloth/component/cashCloth.vue

@@ -136,7 +136,9 @@
                             <el-table-column label="适用衣服" align="center">
                                 <template slot-scope="scope">
                                     <span v-if="scope.row.clothScope == 0">全部衣服 折扣{{ scope.row.discount * 100 }}%</span>
-                                    <span v-if="scope.row.clothScope == 1">指定衣服</span>
+                                    <div v-if="scope.row.clothScope == 1">
+                                        <div v-for="(item, i) in scope.row.activityClothItemVOList" :key="i">#{{ i + 1 }} {{ item.clothItemName }} 折扣{{ item.discount * 100 }}%</div>
+                                    </div>
                                 </template>
                             </el-table-column>
                             <el-table-column label="适用支付方式" align="center">
@@ -148,7 +150,7 @@
                             </el-table-column>
                             <el-table-column label="可优惠金额(元)" align="center">
                                 <template slot-scope="scope">
-                                    <span>{{ calculateTotalDiscountByActivity(scope.row) }}</span>
+                                    <span>{{ calculateTotalDiscountByActivity(scope.row, scope.row.title) }}</span>
                                 </template>
                             </el-table-column>
                             <!-- <el-table-column label="衣服品牌" align="center" prop="name" width="120"> -->
@@ -213,9 +215,9 @@
                         <span>元</span>
                     </template>
 
-                    <template v-if="calculateTotalDiscountByActivity(activity)">
+                    <template v-if="calculateTotalDiscountByActivity(activity, 'A6')">
                         <span style="margin-left: 10px">平台折扣活动优惠</span>
-                        <span style="color: #ff4949">{{ calculateTotalDiscountByActivity(activity) }}</span>
+                        <span style="color: #ff4949">{{ calculateTotalDiscountByActivity(activity, 'A7') }}</span>
                         <span>元</span>
                     </template>
 
@@ -479,7 +481,6 @@ export default {
         if (process.env.ENV != 'production') {
             window.cashClothDialog = this
         }
-        console.log('a12')
     },
     methods: {
         changePayType() {
@@ -540,7 +541,7 @@ export default {
                 totalDiscountAmount = totalDiscountAmount + cloth.deductAmount
             })
             if (this.activity.id) {
-                totalDiscountAmount = totalDiscountAmount + this.calculateTotalDiscountByActivity(this.activity)
+                totalDiscountAmount = totalDiscountAmount + this.calculateTotalDiscountByActivity(this.activity, 'A1')
             }
             return Math.round(totalDiscountAmount * 100) / 100
         },
@@ -566,9 +567,22 @@ export default {
                 let total = this.calculateTotalPrice() + this.calculateDeliveryPrice() - this.calculateTotalDiscountAmountByCoupon()
                 activityAmount = total * e.discount
             }
+            console.log('平台活动', this.orderClothItemDTOS, e.activityClothItemVOList)
+
             if (e.clothScope == 1) {
-                let total = this.calculateTotalPrice() + this.calculateDeliveryPrice() - this.calculateTotalDiscountAmountByCoupon()
-                activityAmount = total * e.discount
+                for (let i = 0; i < e.activityClothItemVOList.length; i++) {
+                    let cloth = e.activityClothItemVOList[i]
+                    for (let j = 0; j < this.orderClothItemDTOS.length; j++) {
+                       let goods = this.orderClothItemDTOS[j]
+                       console.log(goods.id, Number(cloth.clothId))
+                       if (goods.id === cloth.clothId) {
+                        activityAmount += goods.totalPrice * cloth.discount
+                       }
+                    }
+                }
+                // let total = this.calculateTotalPrice() + this.calculateDeliveryPrice() - this.calculateTotalDiscountAmountByCoupon()
+                // activityAmount = total * e.discount
+                console.log('折扣金额', activityAmount)
             }
             return Math.round(activityAmount * 100) / 100
         },
@@ -619,7 +633,7 @@ export default {
             // this.changeDiscountCouponIndex = index
             this.changeDiscountCouponCanSelectCloths = this.selectCoupons[index].applyCloths.concat()
             this.changeDiscountCouponCanSelectCloths.forEach((item) => {
-                let deductAmount1 = this.handelPrice(item.totalPrice * ( this.selectCoupons[index].discountRate / 100))
+                let deductAmount1 = this.handelPrice(item.totalPrice * (this.selectCoupons[index].discountRate / 100))
                 let deductAmount = deductAmount1 > this.selectCoupons[index].deductAmount ? this.selectCoupons[index].deductAmount : deductAmount1
                 item.deductAmount = deductAmount
                 item.isSelected = item.id == this.selectCoupons[index].orderCouponClothDTOS[0].id
@@ -716,6 +730,7 @@ export default {
                 }
                 e.activityAmount = Math.round(activityAmount * 100) / 100
             }
+            console.log(e)
             this.activity = e
         },
 
@@ -885,9 +900,9 @@ export default {
                     if (payTimeType == 1) {
                         params.payType = 0
                     }
-                    if (this.calculateTotalDiscountByActivity(this.activity)) {
+                    if (this.calculateTotalDiscountByActivity(this.activity, 'A3')) {
                         params.activityId = this.activity.id
-                        params.activityDiscountAmount = this.calculateTotalDiscountByActivity(this.activity)
+                        params.activityDiscountAmount = this.calculateTotalDiscountByActivity(this.activity, 'A4')
                     }
 
                     console.log(params)

+ 13 - 6
src/views/system/store/add_store.vue

@@ -2,11 +2,16 @@
     <div v-loading="dialogLoading" :element-loading-text="loadingText">
         <el-row :gutter="15" style="margin-bottom: 80px; width: 90%; margin-left: 5%">
             <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="100px" label-position="top">
-                <el-col :span="24">
+                <el-col :span="12">
                     <el-form-item label="门店名称" prop="name">
                         <el-input v-model="formData.name" placeholder="请输入门店名称" clearable :style="{ width: '100%' }"> </el-input>
                     </el-form-item>
                 </el-col>
+                <el-col :span="12">
+                    <el-form-item label="门店免洗额度" prop="balance">
+                        <el-input v-model="formData.balance" placeholder="请输入门店免洗额度" :disabled="isEditMode" clearable :style="{ width: '100%' }"> </el-input>
+                    </el-form-item>
+                </el-col>
                 <el-col :span="8">
                     <el-form-item label="门店编码" prop="code">
                         <el-input v-model="formData.code" :maxlength="4" @input="handleInput" :disabled="isEditMode" placeholder="请输入门店编码" clearable :style="{ width: '100%' }"> </el-input>
@@ -35,13 +40,15 @@
                         </el-select>
                     </el-form-item>
                 </el-col>
-                <el-col :span="8">
+                
+                
+                <!-- <el-col :span="8">
                     <el-form-item label-width="127px" label="是否打印小票" prop="isPrint">
                         <el-select v-model="formData.isPrint" placeholder="请选择是否打印小票" :style="{ width: '100%' }">
                             <el-option v-for="(item, index) in isPrintOptions" :key="index" :label="item.label" :value="item.value" :disabled="item.disabled"></el-option>
                         </el-select>
                     </el-form-item>
-                </el-col>
+                </el-col> 
                 <el-col :span="8">
                     <el-form-item label-width="127px" label="是否参与结算" prop="isSettlement">
                         <el-select v-model="formData.isSettlement" placeholder="请选择是否参与结算" :style="{ width: '100%' }">
@@ -67,7 +74,7 @@
                     <el-form-item label-width="127px" label="小票打印数量" prop="printNum">
                         <el-input-number v-model="formData.printNum" placeholder="请输入小票打印数量" :min="0" :step-strictly="true" :style="{ width: '100%' }"> </el-input-number>
                     </el-form-item>
-                </el-col>
+                </el-col> -->
                 <el-col :span="8">
                     <el-form-item label-width="113px" label="负责人姓名" prop="contactName">
                         <el-input v-model="formData.contactName" placeholder="请输入负责人姓名" clearable :style="{ width: '100%' }"></el-input>
@@ -109,11 +116,11 @@
                     </el-form-item>
                 </el-col>
 
-                <el-col :span="8">
+                <!-- <el-col :span="8">
                     <el-form-item label-width="106px" label="负责人QQ" prop="contactQq">
                         <el-input v-model="formData.contactQq" placeholder="请输入负责人QQ" clearable :style="{ width: '100%' }"> </el-input>
                     </el-form-item>
-                </el-col>
+                </el-col> -->
 
                 <el-col :span="8">
                     <el-form-item label="开店时间" prop="openDate">

+ 134 - 169
src/views/systemSet/store/index.vue

@@ -1,120 +1,102 @@
 <template>
   <div class="app-container">
     <el-tabs v-model="storeTab" @tab-click="onChangeStoreTab">
-      <el-tab-pane  label="基本信息" name="1"></el-tab-pane>
-      <el-tab-pane  label="结算账号" name="2"></el-tab-pane>
+      <el-tab-pane label="基本信息" name="1"></el-tab-pane>
+      <el-tab-pane label="结算账号" name="2"></el-tab-pane>
     </el-tabs>
 
     <el-row :gutter="20">
       <el-form v-loading="loading" ref="elForm" :model="form" :rules="rules" style="margin-left: 20%" :style="{width: '60%'}">
         <!-- 基本信息 -->
-      <template v-if="storeTab == '1'">
-        <template v-if="storeTab1actionPage == '1'">
-        <el-descriptions title="门店信息" :column="2" border :contentStyle="{'text-align': 'center'}">
-          <!-- 详情展示  ==============================================        -->
-            <template slot="extra" >
-              <el-button type="primary"
-                         size="medium"
-                         @click="handelActionStoreTab1"
-                         v-hasPermi="['system:store:edit']">操作</el-button>
-            </template>
-            <el-descriptions-item >
-              <template slot="label"><i class="el-icon-discount"></i>门店编号</template>
-              {{form.code}}</el-descriptions-item>
-            <el-descriptions-item :labelStyle="{width: '25%'}">
-              <template slot="label"><i class="el-icon-office-building"></i>门店名称</template>
-              {{form.name}}</el-descriptions-item>
-            <el-descriptions-item span="2" :contentStyle="{'text-align': 'left'}">
-            <template slot="label"><i class="el-icon-picture"></i>门店照片</template>
-            <el-image
-              style="width: 100px; height: 100px"
-              :src="form.companyPic"
-              fit="fill"></el-image></el-descriptions-item>
-            <el-descriptions-item >
-              <template slot="label"><i class="el-icon-connection"></i>授权日期</template>
-              {{form.openDateParse}}</el-descriptions-item>
-          <el-descriptions-item >
-            <template slot="label"><i class="el-icon-time"></i>营业时间</template>
-            {{form.businessStartTime}} - {{form.businessEndTime}}</el-descriptions-item>
-            <el-descriptions-item label="门店状态" >
-              <template slot="label"><i class="el-icon-s-flag"></i>门店状态</template>
-              <el-tag size="small"
-                      v-if="form.status==item.value"
-                      v-for="item in options"
-                      :key="item.value">
-                {{item.label}}</el-tag>
-            </el-descriptions-item>
-          <el-descriptions-item >
-            <template slot="label"><i class="el-icon-phone"></i>服务热线</template>
-            {{form.contactWorkTel}}</el-descriptions-item>
-
-          <el-descriptions-item span="1">
-            <template slot="label"><i class="el-icon-download"></i>是否打印小票</template>
-            <el-tag size="small"
-                    v-if="form.isPrint==item.value"
-                    v-for="item in options"
-                    :key="item.value">
-              {{item.label}}</el-tag>
-          </el-descriptions-item>
+        <template v-if="storeTab == '1'">
+          <template v-if="storeTab1actionPage == '1'">
+            <el-descriptions title="门店信息" :column="2" border :contentStyle="{'text-align': 'center'}">
+              <!-- 详情展示  ==============================================        -->
+              <template slot="extra">
+                <el-button type="primary" size="medium" @click="handelActionStoreTab1" v-hasPermi="['system:store:edit']">操作</el-button>
+              </template>
+              <el-descriptions-item>
+                <template slot="label"><i class="el-icon-discount"></i>门店编号</template>
+                {{form.code}}</el-descriptions-item>
+              <el-descriptions-item :labelStyle="{width: '25%'}">
+                <template slot="label"><i class="el-icon-office-building"></i>门店名称</template>
+                {{form.name}}</el-descriptions-item>
+              <el-descriptions-item span="2" :contentStyle="{'text-align': 'left'}">
+                <template slot="label"><i class="el-icon-picture"></i>门店免洗额度</template>
+                {{form.balance}}
+              </el-descriptions-item>
+              <el-descriptions-item span="2" :contentStyle="{'text-align': 'left'}">
+                <template slot="label"><i class="el-icon-picture"></i>门店照片</template>
+                <el-image style="width: 100px; height: 100px" :src="form.companyPic" fit="fill"></el-image>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"><i class="el-icon-connection"></i>授权日期</template>
+                {{form.openDateParse}}</el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"><i class="el-icon-time"></i>营业时间</template>
+                {{form.businessStartTime}} - {{form.businessEndTime}}</el-descriptions-item>
+              <el-descriptions-item label="门店状态">
+                <template slot="label"><i class="el-icon-s-flag"></i>门店状态</template>
+                <el-tag size="small" v-if="form.status==item.value" v-for="item in options" :key="item.value">
+                  {{item.label}}</el-tag>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"><i class="el-icon-phone"></i>服务热线</template>
+                {{form.contactWorkTel}}</el-descriptions-item>
 
-          <el-descriptions-item span="1">
-            <template slot="label"><i class="el-icon-download"></i>小票是否打印客户姓名</template>
-            <el-tag size="small"
-                    v-if="form.isPrintName==item.value"
-                    v-for="item in options"
-                    :key="item.value">
-              {{item.label}}</el-tag>
-          </el-descriptions-item>
+              <el-descriptions-item span="1">
+                <template slot="label"><i class="el-icon-download"></i>是否打印小票</template>
+                <el-tag size="small" v-if="form.isPrint==item.value" v-for="item in options" :key="item.value">
+                  {{item.label}}</el-tag>
+              </el-descriptions-item>
 
-
-          <el-descriptions-item span="2">
-            <template slot="label"><i class="el-icon-s-comment"></i>店铺说明</template>
-            {{form.companyDetail}}</el-descriptions-item>
-          <el-descriptions-item span="2">
-            <template slot="label"><i class="el-icon-position"></i>所在区域</template>
-            {{form.provinceName}}{{form.cityName}}{{form.areaName}}</el-descriptions-item>
-            <el-descriptions-item span="2">
-              <template slot="label"><i class="el-icon-location-information"></i>详细地址</template>
-              {{form.address}}</el-descriptions-item>
-        </el-descriptions>
-        </template>
+              <el-descriptions-item span="1">
+                <template slot="label"><i class="el-icon-download"></i>小票是否打印客户姓名</template>
+                <el-tag size="small" v-if="form.isPrintName==item.value" v-for="item in options" :key="item.value">
+                  {{item.label}}</el-tag>
+              </el-descriptions-item>
+              <el-descriptions-item span="2">
+                <template slot="label"><i class="el-icon-s-comment"></i>店铺说明</template>
+                {{form.companyDetail}}</el-descriptions-item>
+              <el-descriptions-item span="2">
+                <template slot="label"><i class="el-icon-location-information"></i>详细地址</template>
+                {{form.address}}</el-descriptions-item>
+            </el-descriptions>
+          </template>
 
           <!-- 详情编辑  ==============================================        -->
           <template v-if="storeTab1actionPage == '0'">
             <el-descriptions title="门店信息" :column="2" border>
-            <template slot="extra" >
-              <el-button type="primary" size="medium" @click="cancelForm" >取消</el-button>
-              <el-button type="primary" size="medium" @click="submitForm" >保存</el-button>
-            </template>
-            <el-descriptions-item>
-              <template slot="label"><i class="el-icon-discount"></i>门店编号</template>
-              {{form.code}}</el-descriptions-item>
-            <el-descriptions-item >
-              <template slot="label"><i class="el-icon-office-building"></i>门店名称</template>
-              {{form.name}}</el-descriptions-item>
-            <el-descriptions-item >
-              <template slot="label"><i class="el-icon-connection"></i>授权日期</template>
-              {{form.openDateParse}}</el-descriptions-item>
-            <el-descriptions-item label="门店状态" >
-              <template slot="label"><i class="el-icon-s-flag"></i>门店状态</template>
-              <el-tag size="small"
-                      v-if="form.status==item.value"
-                      v-for="item in options"
-                      :key="item.value">
-                {{item.label}}</el-tag>
-            </el-descriptions-item>
-            <el-descriptions-item >
-              <template slot="label"><i class="el-icon-position"></i>所在区域</template>
-              {{form.provinceName}}{{form.cityName}}{{form.areaName}}</el-descriptions-item>
+              <template slot="extra">
+                <el-button type="primary" size="medium" @click="cancelForm">取消</el-button>
+                <el-button type="primary" size="medium" @click="submitForm">保存</el-button>
+              </template>
+              <el-descriptions-item>
+                <template slot="label"><i class="el-icon-discount"></i>门店编号</template>
+                {{form.code}}</el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"><i class="el-icon-office-building"></i>门店名称</template>
+                {{form.name}}</el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"><i class="el-icon-connection"></i>授权日期</template>
+                {{form.openDateParse}}</el-descriptions-item>
+              <el-descriptions-item label="门店状态">
+                <template slot="label"><i class="el-icon-s-flag"></i>门店状态</template>
+                <el-tag size="small" v-if="form.status==item.value" v-for="item in options" :key="item.value">
+                  {{item.label}}</el-tag>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"><i class="el-icon-position"></i>所在区域</template>
+                {{form.provinceName}}{{form.cityName}}{{form.areaName}}</el-descriptions-item>
             </el-descriptions>
 
             <!--  可编辑部分-->
-            <div class="action1" >
+            <div class="action1">
 
               <el-col :span="24">
-              <el-form-item label="详细地址" prop="address">
-                <el-input v-model="form.address" placeholder="请输入详细地址" maxlength="200" show-word-limit />
-              </el-form-item>
+                <el-form-item label="详细地址" prop="address">
+                  <el-input v-model="form.address" placeholder="请输入详细地址" maxlength="200" show-word-limit />
+                </el-form-item>
               </el-col>
               <el-col :span="24">
                 <el-form-item label="店铺说明" prop="companyDetail">
@@ -123,18 +105,14 @@
               </el-col>
 
               <el-col :span="12">
-              <el-form-item label="服务热线" prop="contactWorkTel">
-                <el-input v-model="form.contactWorkTel" placeholder="请输入服务热线" maxlength="12" show-word-limit />
-              </el-form-item>
+                <el-form-item label="服务热线" prop="contactWorkTel">
+                  <el-input v-model="form.contactWorkTel" placeholder="请输入服务热线" maxlength="12" show-word-limit />
+                </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="是否打印小票" prop="isPrint">
                   <el-select v-model="form.isPrint" placeholder="请输入" show-word-limit>
-                    <el-option
-                      v-for="item in options"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value">
+                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                     </el-option>
                   </el-select>
                 </el-form-item>
@@ -142,31 +120,21 @@
               <el-col :span="12">
                 <el-form-item label="小票是否打印客户姓名" prop="isPrint">
                   <el-select v-model="form.isPrintName" placeholder="请输入" show-word-limit>
-                    <el-option
-                      v-for="item in options"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value">
+                    <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                     </el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="24">
-              <el-form-item label="门店照片" prop="companyPic">
-                <image-upload v-model="form.companyPic" />
-              </el-form-item>
+                <el-form-item label="门店照片" prop="companyPic">
+                  <image-upload v-model="form.companyPic" />
+                </el-form-item>
               </el-col>
               <el-col :span="24">
                 <el-form-item label="营业时间">
                   <template>
-                    <el-time-picker
-                      is-range
-                      v-model="businessTimeList"
-                      format="HH:mm" value-format="HH:mm"
-                      range-separator="至"
-                      start-placeholder="开始时间"
-                      end-placeholder="结束时间"
-                      placeholder="选择时间范围">
+                    <el-time-picker is-range v-model="businessTimeList" format="HH:mm" value-format="HH:mm" range-separator="至"
+                      start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围">
                     </el-time-picker>
                   </template>
                 </el-form-item>
@@ -174,40 +142,37 @@
             </div>
           </template>
 
-      </template>
+        </template>
 
-<!--    账号信息  -->
-      <template v-if="storeTab == '2'">
-        <el-descriptions title="账号信息" :column="1"  border>
-          <template slot="extra" v-if="storeTab2actionPage == '1'">
-            <el-button type="primary"
-                       size="medium"
-                       @click="handelActionStoreTab2"
-                       v-hasPermi="['system:store:edit']" >操作</el-button>
-          </template>
-          <template slot="extra" v-if="storeTab2actionPage == '0'">
-            <el-button type="primary" size="medium" @click="cancelForm" >取消</el-button>
-            <el-button type="primary" size="medium" @click="submitForm" >保存</el-button>
-          </template>
-          <template v-if="storeTab2actionPage == '1'">
-            <el-descriptions-item label="开户行">{{form.bankName}}</el-descriptions-item>
-            <el-descriptions-item label="姓名">{{form.bankUserName}}</el-descriptions-item>
-            <el-descriptions-item label="银行卡号">{{form.bankCardNumber}}</el-descriptions-item>
+        <!--    账号信息  -->
+        <template v-if="storeTab == '2'">
+          <el-descriptions title="账号信息" :column="1" border>
+            <template slot="extra" v-if="storeTab2actionPage == '1'">
+              <el-button type="primary" size="medium" @click="handelActionStoreTab2" v-hasPermi="['system:store:edit']">操作</el-button>
+            </template>
+            <template slot="extra" v-if="storeTab2actionPage == '0'">
+              <el-button type="primary" size="medium" @click="cancelForm">取消</el-button>
+              <el-button type="primary" size="medium" @click="submitForm">保存</el-button>
+            </template>
+            <template v-if="storeTab2actionPage == '1'">
+              <el-descriptions-item label="开户行">{{form.bankName}}</el-descriptions-item>
+              <el-descriptions-item label="姓名">{{form.bankUserName}}</el-descriptions-item>
+              <el-descriptions-item label="银行卡号">{{form.bankCardNumber}}</el-descriptions-item>
+            </template>
+          </el-descriptions>
+          <template v-if="storeTab2actionPage == '0'">
+            <el-form-item label="开户行" prop="bankName">
+              <el-input v-model="form.bankName" />
+            </el-form-item>
+            <el-form-item label="姓名" prop="bankUserName">
+              <el-input v-model="form.bankUserName" />
+            </el-form-item>
+            <el-form-item label="银行卡号" prop="bankCardNumber">
+              <el-input v-model="form.bankCardNumber" />
+            </el-form-item>
           </template>
-        </el-descriptions>
-        <template v-if="storeTab2actionPage == '0'">
-          <el-form-item label="开户行" prop="bankName">
-            <el-input v-model="form.bankName" />
-          </el-form-item>
-          <el-form-item label="姓名" prop="bankUserName">
-            <el-input v-model="form.bankUserName" />
-          </el-form-item>
-          <el-form-item label="银行卡号" prop="bankCardNumber">
-            <el-input v-model="form.bankCardNumber" />
-          </el-form-item>
         </template>
-      </template>
-     </el-form>
+      </el-form>
     </el-row>
   </div>
 </template>
@@ -220,13 +185,13 @@ import {
 import { formatDate } from '@/utils'
 export default {
   name: "storeBase",
-  dicts: ['goods_type','sys_normal_disable'],
+  dicts: ['goods_type', 'sys_normal_disable'],
   data() {
     return {
-      storeTab:'1',
-      storeTab1actionPage:'1',
-      storeTab2actionPage:'1',
-      businessTimeList:[],
+      storeTab: '1',
+      storeTab1actionPage: '1',
+      storeTab2actionPage: '1',
+      businessTimeList: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -268,13 +233,13 @@ export default {
     this.getList();
   },
   methods: {
-    handelActionStoreTab1(){
+    handelActionStoreTab1() {
       this.storeTab1actionPage = '0'
     },
-    handelActionStoreTab2(){
+    handelActionStoreTab2() {
       this.storeTab2actionPage = '0'
     },
-    onChangeStoreTab(){
+    onChangeStoreTab() {
       this.handleQuery()
     },
     /** 搜索按钮操作 */
@@ -290,7 +255,7 @@ export default {
         this.form = response.data;
         this.businessTimeList.push(response.data.businessStartTime != null && response.data.businessStartTime != '' ? response.data.businessStartTime : '');
         this.businessTimeList.push(response.data.businessEndTime != null && response.data.businessEndTime != '' ? response.data.businessEndTime : '');
-        if (this.form.openDate != null ){
+        if (this.form.openDate != null) {
           this.form.openDateParse = new Date(this.form.openDate).toLocaleDateString();
         }
         this.storeTab1actionPage = '1';
@@ -318,15 +283,15 @@ export default {
       };
       this.resetForm("form");
     },
-    cancelForm(){
+    cancelForm() {
       this.getList();
     },
     /** 提交按钮 */
     submitForm() {
-    if (this.form.id != null) {
-      updateStore(this.form).then(response => {
-        this.$modal.msgSuccess("修改成功");
-        this.getList();
+      if (this.form.id != null) {
+        updateStore(this.form).then(response => {
+          this.$modal.msgSuccess("修改成功");
+          this.getList();
         });
       }
     }
@@ -334,7 +299,7 @@ export default {
 };
 </script>
 <style>
-.action1{
-  margin-top: 20px;
+.action1 {
+    margin-top: 20px;
 }
 </style>

+ 2 - 0
src/views/workbench/workAppointmentOrder/index.vue

@@ -558,6 +558,7 @@ export default {
         /** 派单按钮操作 */
         handleUpdate(row) {
             this.reset()
+            console.log("this.form.appointmentStatus", row.appointmentStatus)
             var userInfoVO = this.getUserInfo()
             if (userInfoVO.userType == '01') {
                 this.openDeliveryPage = true
@@ -578,6 +579,7 @@ export default {
                 this.open = true
                 this.form.orderNo = row.orderNo
                 this.form.appointmentStatus = row.appointmentStatus
+                
             }
         },
         /** 提交按钮 */