2 Commits 8adc0c6b5c ... 10e28e8c36

Author SHA1 Message Date
  吕海超 10e28e8c36 Merge branch 'master' of http://101.37.21.97:3000/wash/wash_admin_ui 5 months ago
  吕海超 c4cff371d5 no message 5 months ago

+ 16 - 0
src/components/payStatusPopup/index.vue

@@ -94,6 +94,16 @@
                     <div class="btn" @click="close">关闭</div>
                 </div>
             </div>
+            <!-- 支付成功打印小票 -->
+            <div v-if="type === 6">
+                <div class="icon">
+                    <i class="el-icon-success success"></i>
+                </div>
+                <div class="message">定价成功</div>
+                <div class="btn_box">
+                    <div class="btn" @click="confirm">确认</div>
+                </div>
+            </div>
         </el-dialog>
     </div>
 </template>
@@ -188,6 +198,9 @@ export default {
             }
             if (type == 5) {
                 // this.getPayResult()
+            }
+            if (type == 6) {
+
             }
             this.show = true
         },
@@ -220,6 +233,9 @@ export default {
             if (this.type == 4) {
                 _.show = false
             }
+            if (this.type == 6) {
+                _.show = false
+            }
         },
 
         confirm() {

+ 28 - 14
src/views/order/cloth/collectCloth.vue

@@ -144,14 +144,14 @@
                         </el-select>
                     </el-form-item>
 
-                     <el-form-item label="是否关联预约" prop="isAppointment">
+                     <!-- <el-form-item label="是否关联预约" prop="isAppointment">
                         <el-radio-group v-model="orderForm.isAppointment">
                             <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-form-item label="预约单号" prop="orderNo" v-if="orderForm.isAppointment == 'Y'">
                         <el-input v-model="orderForm.orderNo" placeholder="请输入预约单号" clearable required />
-                    </el-form-item>
+                    </el-form-item>  -->
                     <br />
 
                     <el-form-item label="会员余额:" prop="userAmount">
@@ -170,11 +170,11 @@
             ></el-date-picker>
           </el-form-item> -->
 
-                    <el-form-item v-if="orderForm.isAppointment == 'Y'" label="取衣方式" prop="sendClothWay">
+                    <!-- <el-form-item v-if="orderForm.isAppointment == 'Y'" label="取衣方式" prop="sendClothWay">
                         <el-select v-model="orderForm.sendClothWay" placeholder="请选择" clearable>
                             <el-option v-for="dict in dict.type.cloth_send_type" :key="dict.value" :label="dict.label" :value="dict.value" />
                         </el-select>
-                    </el-form-item>
+                    </el-form-item> -->
 
                     <el-form-item label="备注" prop="remark">
                         <el-input v-model="orderForm.remark" placeholder="请输入订单备注" clearable />
@@ -497,10 +497,15 @@
         <el-dialog title="预约订单" :visible.sync="showAdvanceOrder" width="55%">
             <el-table :data="advanceOrderList">
                 <el-table-column prop="orderNo" label="预约单号" width="180"> </el-table-column>
-                <el-table-column prop="createTime" label="预约时间" width="180"> </el-table-column>
-                <el-table-column prop="date" label="是否大件" width="180"> </el-table-column>
-                <el-table-column prop="date" label="是否拆装" width="180"> </el-table-column>
-                <el-table-column prop="date" label="件数" width="180"> </el-table-column>
+                <el-table-column prop="appointmentTime" label="预约时间" width="180"></el-table-column>
+                <el-table-column prop="isLargeItem" label="是否大件" width="180">
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.isLargeItem == 'Y'">是</span>
+                        <span v-if="scope.row.isLargeItem == 'N'">否</span>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="appointmentCount" label="件数" width="180"> </el-table-column>
+                <el-table-column prop="remark" label="备注" width="180" show-overflow-tooltip> </el-table-column>
                 <el-table-column prop="date" label="操作" width="180">
                     <template slot-scope="scope">
                         <el-button type="text" @click="changeAdanceOrder(scope.row)">选择订单</el-button>
@@ -828,10 +833,15 @@ export default {
                 //     this.intervalCheckOrderStatus(orderInfo.orderNo)
                 // }, 4000)
             } else {
-                this.$refs.payStatusPopup.open(1, orderInfo)
+                if (orderInfo.payType) {
+                    this.$refs.payStatusPopup.open(1, orderInfo)
+                } else {
+                    this.$refs.payStatusPopup.open(6, orderInfo)
+                }
                 this.orderClothItemDTOS = []
                 this.queryParams = {}
                 this.appUserInfo = null
+                this.orderForm = {}
             }
         },
 
@@ -839,6 +849,7 @@ export default {
             this.orderClothItemDTOS = []
             this.queryParams = {}
             this.appUserInfo = null
+            this.orderForm = {}
         },
         intervalCheckOrderStatus(orderno) {
             getOrderStatusByOrderNo({ orderNo: orderno }).then((response) => {
@@ -1092,7 +1103,6 @@ export default {
         },
 
         getAdvanceOrder(id) {
-            this.showAdvanceOrder = true
             request({
                 url: '/mapi/order/cloth/list',
                 method: 'get',
@@ -1112,6 +1122,9 @@ export default {
                     //     this.data = data.rows
                     // }
                     this.advanceOrderList = data.rows
+                    if (this.advanceOrderList.length) {
+                        this.showAdvanceOrder = true
+                    }
                 } else {
                     this.$message.error(data.msg)
                 }
@@ -1122,6 +1135,7 @@ export default {
             // orderForm.isAppointment orderForm.orderNo
             this.orderForm.isAppointment = 'Y'
             this.orderForm.orderNo = e.orderNo
+            this.showAdvanceOrder = false
         },
 
         clearAppointment() {
@@ -1436,10 +1450,10 @@ export default {
 
                 return
             }
-            if (this.orderForm.isAppointment == 'Y' && !this.isEmpty(this.orderForm.orderNo) && !this.orderForm.sendClothWay) {
-              this.$message.error('请先选取衣方式')
-              return
-            }
+            // if (this.orderForm.isAppointment == 'Y' && !this.isEmpty(this.orderForm.orderNo) && !this.orderForm.sendClothWay) {
+            //   this.$message.error('请先选取衣方式')
+            //   return
+            // }
 
             if (this.orderForm.isAppointment == 'Y') {
                 var res = await getInfoByOrderNo({ orderNo: this.orderForm.orderNo, appUserId: this.appUserInfo.id })

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

@@ -16,6 +16,9 @@
                     <el-descriptions-item label="还需支付(元)">{{ Math.round((calculateTotalPrice() + calculateDeliveryPrice() - calculateTotalDiscountAmount()) * 100) / 100 }}</el-descriptions-item>
                     <el-descriptions-item label="赠送余额">{{ appUserInfo ? appUserInfo.giveBalance : '0' }}</el-descriptions-item>
                 </el-descriptions>
+                <div style="margin-top: 20px"  v-if="orderForm.isAppointment === 'Y'">
+                    <el-button type="primary" @click="submitForm(3)" style="margin-right: 10px" >确认定价</el-button>
+                </div>
             </el-card>
 
             <el-card style="margin-top: 10px" v-if="orderForm.isAppointment === 'N'">
@@ -207,7 +210,7 @@
             </el-card>
 
             <el-card style="margin-top: 10px" v-if="orderForm.isAppointment === 'N'">
-                <div slot="header" class="clearfix" v-if="orderForm.isAppointment === 'N'">
+                <div slot="header" class="clearfix">
                     <span>收款方式</span>
                     <template v-if="calculateTotalDiscountAmountByCoupon()">
                         <span style="margin-left: 10px">优惠券优惠</span>
@@ -215,9 +218,9 @@
                         <span>元</span>
                     </template>
 
-                    <template v-if="calculateTotalDiscountByActivity(activity, 'A6')">
+                    <template v-if="calculateTotalDiscountByActivity(activity)">
                         <span style="margin-left: 10px">平台折扣活动优惠</span>
-                        <span style="color: #ff4949">{{ calculateTotalDiscountByActivity(activity, 'A7') }}</span>
+                        <span style="color: #ff4949">{{ calculateTotalDiscountByActivity(activity) }}</span>
                         <span>元</span>
                     </template>
 
@@ -231,7 +234,7 @@
                     <span style="color: #ff4949">{{ (parseInt(calculateTotalPrice() * 100) + parseInt(calculateDeliveryPrice() * 100) - parseInt(calculateTotalDiscountAmount() * 100)) / 100 }}</span>
                     <span>元</span>
                 </div>
-                <el-form-item label="支付方式" prop="payType" v-if="orderForm.isAppointment === 'N'">
+                <el-form-item label="支付方式" prop="payType">
                     <el-radio-group v-model="orderForm.payType" @change="changePayType">
                         <el-radio-button label="3" name="3">余额</el-radio-button>
                         <el-radio-button label="2" name="2">现金</el-radio-button>
@@ -251,13 +254,10 @@
                     <el-descriptions-item label="支付后余额(元)" v-if="appUserInfo">{{ appUserInfo.rechargeBalance + appUserInfo.giveBalance - calculateTotalPrice() }}</el-descriptions-item>
                 </el-descriptions>
 
-                <div style="margin-top: 20px"  v-if="orderForm.isAppointment === 'N'">
+                <div style="margin-top: 20px">
                     <el-button type="primary" @click="submitForm(0)" style="margin-right: 10px">立即支付</el-button>
                     <el-button type="primary" @click="submitForm(1)" style="margin-right: 5%">取衣支付</el-button>
                 </div>
-                <div style="margin-top: 20px"  v-if="orderForm.isAppointment === 'Y'">
-                    <el-button type="primary" @click="submitForm(3)" style="margin-right: 10px" >确认定价</el-button>
-                </div>
             </el-card>
         </el-form>
 
@@ -547,7 +547,7 @@ export default {
                 totalDiscountAmount = totalDiscountAmount + cloth.deductAmount
             })
             if (this.activity.id) {
-                totalDiscountAmount = totalDiscountAmount + this.calculateTotalDiscountByActivity(this.activity, 'A1')
+                totalDiscountAmount = totalDiscountAmount + this.calculateTotalDiscountByActivity(this.activity)
             }
             return Math.round(totalDiscountAmount * 100) / 100
         },
@@ -795,20 +795,20 @@ export default {
                 }
             }
             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 {
-                //             //非单件,可减多件
+                        //抵扣
+                        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 < coupon.applyCloths.length; i++) {
                     //如果优惠券可抵扣金额用完
@@ -827,7 +827,7 @@ export default {
                     }
                 }
             }
-            // }
+            }
             // else
             if (coupon.discountWay == '1') {
                 //满减
@@ -906,9 +906,9 @@ export default {
                     if (payTimeType == 1) {
                         params.payType = 0
                     }
-                    if (this.calculateTotalDiscountByActivity(this.activity, 'A3')) {
+                    if (this.calculateTotalDiscountByActivity(this.activity)) {
                         params.activityId = this.activity.id
-                        params.activityDiscountAmount = this.calculateTotalDiscountByActivity(this.activity, 'A4')
+                        params.activityDiscountAmount = this.calculateTotalDiscountByActivity(this.activity)
                     }
                   params.sendClothWay = this.orderForm.sendClothWay
                     console.log(params)

+ 1 - 1
src/views/order/cloth/orderList.vue

@@ -142,7 +142,7 @@
                         <el-table-column label="衣物条码" align="center" prop="washCode" width="180" fixed="left" />
                         <el-table-column label="衣服名称" align="center" prop="clothItemName" width="200">
                             <template slot-scope="scope">
-                                <span> {{ calculateClothName(scope.row) }} </span>
+                                <span> {{ calculateClothName(scope.row) }}</span>
                             </template>
                         </el-table-column>