Commit 98690088 by chenwq

领取方式字段

1 parent bb1f8304
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</div> </div>
</div> </div>
</div> </div>
<div slot="receiveDetails" class="edit-tips m-t-8">客户需要输入该{{ editForm.receiveWay == '0' ? '手机号' : '车架号后6位' }}才能成功领取</div> <div slot="receiveDetails" class="edit-tips m-t-8">客户需要输入该{{ editForm.receiveWay == '1' ? '手机号' : '车架号后6位' }}才能成功领取</div>
<el-button slot="selectStaffBtn" class="el-icon-plus" @click="handleSelectStaff">选择员工</el-button> <el-button slot="selectStaffBtn" class="el-icon-plus" @click="handleSelectStaff">选择员工</el-button>
<div slot="staffListBlock" class="sale-select" :style="{ 'margin-left': labelWidth }" v-show="editForm.staffList && editForm.staffList.length != 0"> <div slot="staffListBlock" class="sale-select" :style="{ 'margin-left': labelWidth }" v-show="editForm.staffList && editForm.staffList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper"> <div :key="key" class="el-input-tag input-tag-wrapper">
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
editForm: { editForm: {
name: '', name: '',
remarkName: '', remarkName: '',
receiveWay: '0', receiveWay: '1',
receiveDetails: '', receiveDetails: '',
staffList: [], staffList: [],
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务 // 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
if (!value) { if (!value) {
return callback() return callback()
} }
if (this.editForm.receiveWay == '0') { if (this.editForm.receiveWay == '1') {
let phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/ let phoneReg = /^(13[0-9]|15[0-9]|16[0-9]|17[0-9]|18[0-9]|19[0-9]|14[0-9])[0-9]{8}$/
return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的手机号')) return phoneReg.test(value) ? callback() : callback(new Error('请输入正确的手机号'))
} else { } else {
...@@ -198,11 +198,11 @@ export default { ...@@ -198,11 +198,11 @@ export default {
optionLabel: 'confName', optionLabel: 'confName',
optionList: [ optionList: [
{ {
confId: '0', confId: '1',
confName: '指定手机号' confName: '指定手机号'
}, },
{ {
confId: '1', confId: '2',
confName: '指定车架号后6位' confName: '指定车架号后6位'
} }
], ],
...@@ -278,6 +278,7 @@ export default { ...@@ -278,6 +278,7 @@ export default {
this.editForm.receiveWay = this.editForm.receiveWay + '' this.editForm.receiveWay = this.editForm.receiveWay + ''
this.recoveryCoupon() this.recoveryCoupon()
this.recoveryTotalPrice() this.recoveryTotalPrice()
this.hasStaffBlock()
this.$nextTick(() => { this.$nextTick(() => {
this.editStatus = false this.editStatus = false
}) })
...@@ -298,8 +299,8 @@ export default { ...@@ -298,8 +299,8 @@ export default {
receiveWayChange(val) { receiveWayChange(val) {
var receiveDetailsIdx = this.editFormData.findIndex(item => item.name == 'receiveDetails') var receiveDetailsIdx = this.editFormData.findIndex(item => item.name == 'receiveDetails')
this.editFormData[receiveDetailsIdx].placeholder = val == '0' ? '请输入领取手机号' : '请输入领取车架号后6位' this.editFormData[receiveDetailsIdx].placeholder = val == '1' ? '请输入领取手机号' : '请输入领取车架号后6位'
this.editFormData[receiveDetailsIdx].maxlength = val == '0' ? 11 : 6 this.editFormData[receiveDetailsIdx].maxlength = val == '1' ? 11 : 6
}, },
// 计算预估成本 // 计算预估成本
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
</div> </div>
</div> </div>
<div slot="receiveDetails">{{ editForm.receiveWay == '0' ? '指定手机号' : '指定车架号后6位' }}:{{ editForm.receiveDetails }}</div> <div slot="receiveDetails">{{ editForm.receiveWay == '1' ? '指定手机号' : '指定车架号后6位' }}:{{ editForm.receiveDetails }}</div>
<div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0"> <div slot="staffListBlock" class="sale-select" v-show="editForm.staffList && editForm.staffList.length != 0">
<div :key="key" class="el-input-tag input-tag-wrapper-detail"> <div :key="key" class="el-input-tag input-tag-wrapper-detail">
<el-tag effect="plain" type="info" v-for="(tag, idx) in editForm.staffList" :key="idx" :disable-transitions="false" @close="handleStaffRemove(tag, idx)"> <el-tag effect="plain" type="info" v-for="(tag, idx) in editForm.staffList" :key="idx" :disable-transitions="false" @close="handleStaffRemove(tag, idx)">
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</div> </div>
<div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }"> <div class="footer" :style="{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button type="default" @click="handleCancel">返回</el-button> <el-button type="default" @click="handleCancel">返回</el-button>
<el-button type="primary" @click="handleEdit">编辑</el-button> <el-button v-show="editForm.receivedFlag == 1" type="primary" @click="handleEdit">编辑</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -61,8 +61,9 @@ export default { ...@@ -61,8 +61,9 @@ export default {
editForm: { editForm: {
name: '', name: '',
remarkName: '', remarkName: '',
receiveWay: '0', receiveWay: '1',
receiveDetails: '', receiveDetails: '',
receivedFlag: 2,
staffList: [], staffList: [],
// 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务 // 优惠券类型(discountType) 1:满减券,2:折扣券,3:代金券,4:兑换券,5:购车代金券,6:商品折扣券,7:会员服务
// 优惠券状态(status):1:未生效,2:生效中,3:已失效 // 优惠券状态(status):1:未生效,2:生效中,3:已失效
...@@ -178,8 +179,8 @@ export default { ...@@ -178,8 +179,8 @@ export default {
receiveWayChange(val) { receiveWayChange(val) {
var receiveDetailsIdx = this.editFormData.findIndex(item => item.name == 'receiveDetails') var receiveDetailsIdx = this.editFormData.findIndex(item => item.name == 'receiveDetails')
this.editFormData[receiveDetailsIdx].placeholder = val == '0' ? '请输入领取手机号' : '请输入领取车架号后6位' this.editFormData[receiveDetailsIdx].placeholder = val == '1' ? '请输入领取手机号' : '请输入领取车架号后6位'
this.editFormData[receiveDetailsIdx].maxlength = val == '0' ? 11 : 6 this.editFormData[receiveDetailsIdx].maxlength = val == '1' ? 11 : 6
}, },
// 计算预估成本 // 计算预估成本
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!