|
@@ -40,6 +40,8 @@
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="地址" :span="2">{{ appUserInfo.defaultAddress ? appUserInfo.defaultAddress.address + ' ' + appUserInfo.defaultAddress.addressDetail : '' }}</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
+ <!-- -->
|
|
|
+ <el-button type="text" @click="showAdvanceOrder = true">选择预约订单</el-button>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
|
<el-col :span="18" :xs="24">
|
|
@@ -54,46 +56,47 @@
|
|
|
<el-table-column label="序号" type="index" align="center" fixed="left" width="80"> </el-table-column>
|
|
|
<el-table-column label="衣物名称" align="center" prop="name">
|
|
|
<template slot-scope="scope">
|
|
|
- <span @click="updateClothItem(scope.$index, 0)">{{ calculateClothName(scope.$index) }}</span>
|
|
|
+ <el-button type="text" @click="updateClothItem(scope.$index, 0)">{{ calculateClothName(scope.$index) }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="颜色" align="center" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <span @click="updateClothItem(scope.$index, 2)">
|
|
|
+ <el-button type="text" @click="updateClothItem(scope.$index, 2)">
|
|
|
<template v-for="(color, index) in scope.row.orderClothColorDTOS">
|
|
|
{{ index == 0 ? color.clothColorName : ',' + color.clothColorName }}
|
|
|
</template>
|
|
|
- </span>
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="衣服品牌" align="center" prop="name" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <span @click="updateClothItem(scope.$index, 3)">{{ scope.row.clothBrandName }}</span>
|
|
|
+ <el-button type="text" @click="updateClothItem(scope.$index, 3)">{{ scope.row.clothBrandName }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="瑕疵" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span @click="updateClothItem(scope.$index, 4)">
|
|
|
+ <el-button type="text" @click="updateClothItem(scope.$index, 4)">
|
|
|
<template v-for="(color, index) in scope.row.orderClothFlawDTOS">
|
|
|
{{ index == 0 ? color.clothFlawName : ',' + color.clothFlawName }}
|
|
|
</template>
|
|
|
- </span>
|
|
|
+ </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="洗涤方式" align="center" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- <span @click="changeClothWashMode(scope.$index)" style="color: #409eff">{{ scope.row.clothWashModeName }}</span>
|
|
|
+ <el-button type="text" @click="changeClothWashMode(scope.$index)" style="color: #409eff">{{ scope.row.clothWashModeName }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="特殊处理(元)" align="center" prop="clothWashDayNum" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <span style="color: #ff4949" @click="changeClothSpecialPriceEvent(scope.$index)">{{ calculateClothSpecialPrice(scope.$index) }}</span>
|
|
|
+ <el-button type="text" style="color: #ff4949" @click="changeClothSpecialPriceEvent(scope.$index)">¥{{ calculateClothSpecialPrice(scope.$index) }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="单价(元)" align="center" prop="defaultPrice" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <span style="color: #ff4949" v-if="scope.row.isChangePrice == 'Y'" @click="changeClothDefaultPriceEvent(scope.$index)">{{ scope.row.defaultPrice }}</span>
|
|
|
- <span v-else>{{ scope.row.defaultPrice }}</span>
|
|
|
+ <!-- style="color: #ff4949" -->
|
|
|
+ <el-button type="text" v-if="scope.row.isChangePrice == 'Y'" @click="changeClothDefaultPriceEvent(scope.$index)">¥{{ scope.row.defaultPrice }}</el-button>
|
|
|
+ <span v-else>¥{{ scope.row.defaultPrice }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200">
|
|
@@ -138,19 +141,18 @@
|
|
|
</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-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">
|
|
|
- <span v-if="appUserInfo">{{ Math.round((appUserInfo.rechargeBalance + appUserInfo.giveBalance) * 100) / 100 }}</span>
|
|
|
+ <span v-if="appUserInfo">{{ Math.round((appUserInfo.rechargeBalance + appUserInfo.giveBalance) * 100) / 100 }}</span>
|
|
|
<span v-else>0</span>
|
|
|
</el-form-item>
|
|
|
|
|
@@ -165,16 +167,11 @@
|
|
|
></el-date-picker>
|
|
|
</el-form-item> -->
|
|
|
|
|
|
- <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 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 label="备注" prop="remark">
|
|
|
<el-input v-model="orderForm.remark" placeholder="请输入订单备注" clearable />
|
|
@@ -207,7 +204,7 @@
|
|
|
</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-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>
|
|
@@ -219,7 +216,7 @@
|
|
|
</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-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>
|
|
@@ -238,7 +235,7 @@
|
|
|
</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-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>
|
|
@@ -257,8 +254,8 @@
|
|
|
</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>
|
|
|
+ <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>
|
|
@@ -271,8 +268,8 @@
|
|
|
<el-col :span="24" v-if="addClothActiveTab == 4">
|
|
|
<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>
|
|
|
+ <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>
|
|
@@ -281,8 +278,8 @@
|
|
|
</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>
|
|
|
+ <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>
|
|
@@ -298,8 +295,8 @@
|
|
|
<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>
|
|
|
+ <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>
|
|
@@ -322,7 +319,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div slot="footer" class="dialog-footer" v-if="addClothActiveTab == 2 || addClothActiveTab == 4 || addClothActiveTab == 5">
|
|
@@ -330,12 +327,12 @@
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog title="衣服附件" :visible.sync="addClothAdjunctOpen" width="50%">
|
|
|
+ <el-dialog title="衣服附件" :visible.sync="addClothAdjunctOpen" width="60%">
|
|
|
<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>
|
|
|
+ <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>
|
|
@@ -435,7 +432,7 @@
|
|
|
<template v-for="(item, index) in clothSpecialForm.clothSpeeds">
|
|
|
<el-form-item v-if="item.isDefault != 'Y' && selectClothItemIndex > -1">
|
|
|
<el-checkbox v-model="item.isSelect" @change="changeClothSpeedSelect(index)" style="width: 100px" :disabled="clothSpecialForm.isHedging && index == 1">
|
|
|
- <span v-if="item.isSelect">{{ item.name + '(¥' + orderClothItemDTOS[selectClothItemIndex].defaultPrice * (item.multiple - 1) + ')' }}</span>
|
|
|
+ <span v-if="item.isSelect && orderClothItemDTOS[selectClothItemIndex]">{{ item.name + '(¥' + orderClothItemDTOS[selectClothItemIndex].defaultPrice * (item.multiple - 1) + ')' }}</span>
|
|
|
<span v-else>{{ item.name }}</span>
|
|
|
</el-checkbox>
|
|
|
<span>{{ item.price }}</span>
|
|
@@ -494,6 +491,20 @@
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<pay-status-popup ref="payStatusPopup" @paySuccess="handelPaySuccess"></pay-status-popup>
|
|
|
+ <el-dialog title="预约订单" :visible.sync="showAdvanceOrder" width="55%">
|
|
|
+ <el-table :data="advanceOrderList">
|
|
|
+ <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="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">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text" @click="changeAdanceOrder(scope.row)">选择订单</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -524,6 +535,7 @@ import { collectCloth, getInfoByOrderNo, clothOrderPay } from '../../../api/orde
|
|
|
import { allBrand } from '../../../api/cloth/brand'
|
|
|
import { getCouponItemlistByAppUserId, getDiscountByStoreId } from '../../../api/coupon/item'
|
|
|
import { add, multi, minute, sub } from '../../../utils/math'
|
|
|
+import request from '@/utils/request'
|
|
|
|
|
|
export default {
|
|
|
name: 'CollectCloth',
|
|
@@ -632,7 +644,9 @@ export default {
|
|
|
videoType: true,
|
|
|
photoType: false,
|
|
|
|
|
|
- collectClothDetail: null
|
|
|
+ collectClothDetail: null,
|
|
|
+ showAdvanceOrder: false,
|
|
|
+ advanceOrderList: []
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -935,7 +949,7 @@ export default {
|
|
|
this.$forceUpdate()
|
|
|
} else {
|
|
|
allClothColor().then((res) => {
|
|
|
- this.defaultList.color = '';
|
|
|
+ this.defaultList.color = ''
|
|
|
this.defaultList.clothColors = res.data
|
|
|
this.clothColors = res.data
|
|
|
this.form.clothItemId = this.clothItems[index].id
|
|
@@ -976,7 +990,7 @@ export default {
|
|
|
this.clothFlawTypes = res.data
|
|
|
|
|
|
allClothFlaw().then((res1) => {
|
|
|
- this.defaultList.flaw = '';
|
|
|
+ this.defaultList.flaw = ''
|
|
|
this.defaultList.clothFlaws = res1.data
|
|
|
this.clothFlaws = res1.data
|
|
|
this.addClothActiveTab = 4
|
|
@@ -1011,7 +1025,7 @@ export default {
|
|
|
id: '0',
|
|
|
name: '无'
|
|
|
})
|
|
|
- this.defaultList.brand = '';
|
|
|
+ this.defaultList.brand = ''
|
|
|
this.defaultList.clothBrands = res.data
|
|
|
this.clothBrands = res.data
|
|
|
this.addClothActiveTab = 3
|
|
@@ -1040,7 +1054,7 @@ export default {
|
|
|
// console.log(this.orderClothItemDTOS)
|
|
|
// this.open = false
|
|
|
allClothAdjunct().then((res) => {
|
|
|
- this.defaultList.clothAdjuncts = res.data;
|
|
|
+ this.defaultList.clothAdjuncts = res.data
|
|
|
this.defaultList.adjunct = ''
|
|
|
this.clothAdjuncts = res.data
|
|
|
this.addClothActiveTab = 5
|
|
@@ -1068,13 +1082,46 @@ export default {
|
|
|
if (valid) {
|
|
|
findUserByPhoneNumber(this.queryParams).then((res) => {
|
|
|
this.appUserInfo = res.data
|
|
|
+ // this.getAdvanceOrder(res.data.id)
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ getAdvanceOrder(id) {
|
|
|
+ this.showAdvanceOrder = true
|
|
|
+ request({
|
|
|
+ url: '/mapi/order/cloth/list',
|
|
|
+ method: 'get',
|
|
|
+ params: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ user: id
|
|
|
+ }
|
|
|
+ }).then((data) => {
|
|
|
+ if (data && data.code === 200) {
|
|
|
+ console.log('预约订单', data)
|
|
|
+ // this.pagination.total = data.total
|
|
|
+ // if (this.renderFun) {
|
|
|
+ // this.renderFun(data.rows, data)
|
|
|
+ // } else {
|
|
|
+ // this.data = data.rows
|
|
|
+ // }
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ changeAdanceOrder(e) {
|
|
|
+ // orderForm.isAppointment orderForm.orderNo
|
|
|
+ this.orderForm.isAppointment = 'Y'
|
|
|
+ this.orderForm.orderForm.orderNo = e.orderNo
|
|
|
+ },
|
|
|
+
|
|
|
handleAddClothFlaw(index) {
|
|
|
allClothAdjunct().then((res) => {
|
|
|
- this.defaultList.clothAdjuncts = res.data;
|
|
|
+ this.defaultList.clothAdjuncts = res.data
|
|
|
this.defaultList.adjunct = ''
|
|
|
this.clothAdjuncts = res.data
|
|
|
this.addClothAdjunctOpen = true
|
|
@@ -1165,7 +1212,7 @@ export default {
|
|
|
this.clothFlawTypes = res.data
|
|
|
|
|
|
allClothFlaw().then((res1) => {
|
|
|
- this.defaultList.flaw = '';
|
|
|
+ this.defaultList.flaw = ''
|
|
|
this.defaultList.clothFlaws = res1.data
|
|
|
this.clothFlaws = res1.data
|
|
|
this.selectClothItemIndex = index
|
|
@@ -1379,10 +1426,10 @@ export default {
|
|
|
|
|
|
return
|
|
|
}
|
|
|
- if (!this.orderForm.sendClothWay) {
|
|
|
- this.$message.error('请先选取衣方式')
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (!this.orderForm.sendClothWay) {
|
|
|
+ // this.$message.error('请先选取衣方式')
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
if (this.orderForm.isAppointment == 'Y') {
|
|
|
var res = await getInfoByOrderNo({ orderNo: this.orderForm.orderNo, appUserId: this.appUserInfo.id })
|