|
@@ -5,7 +5,7 @@
|
|
width="60%"
|
|
width="60%"
|
|
:footer="null"
|
|
:footer="null"
|
|
:destroyOnClose="true"
|
|
:destroyOnClose="true"
|
|
- @cancel="isShow=false"
|
|
|
|
|
|
+ @cancel="isShow = false"
|
|
v-model="isShow">
|
|
v-model="isShow">
|
|
<!-- 表单 -->
|
|
<!-- 表单 -->
|
|
<a-form-model ref="ruleForm" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
|
<a-form-model ref="ruleForm" :model="form" :rules="rules" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
|
|
@@ -15,15 +15,14 @@
|
|
<a-form-model-item label="车牌号" prop="vehicleNumber">
|
|
<a-form-model-item label="车牌号" prop="vehicleNumber">
|
|
<a-input v-model.trim="form.vehicleNumber" :maxLength="8" placeholder="请输入车牌号(最多8个字符)" />
|
|
<a-input v-model.trim="form.vehicleNumber" :maxLength="8" placeholder="请输入车牌号(最多8个字符)" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- <a-form-model-item label="客户姓名" prop="custName">
|
|
|
|
- <a-input v-model.trim="form.custName" :maxLength="30" placeholder="请输入客户姓名(最多30个字符)" />
|
|
|
|
- </a-form-model-item>
|
|
|
|
|
|
+ <a-form-model-item label="客户姓名" prop="custName"><a-input v-model.trim="form.custName" :maxLength="30" placeholder="请输入客户姓名(最多30个字符)" /></a-form-model-item>
|
|
<a-form-model-item label="应收金额" class="item-con">
|
|
<a-form-model-item label="应收金额" class="item-con">
|
|
- <p class="item-main"><span class="item-price" v-if="setmealData">{{ setmealData.price || 0 }}</span>元</p>
|
|
|
|
- </a-form-model-item>
|
|
|
|
- <a-form-model-item label="收款方式" class="item-con">
|
|
|
|
- <p class="item-main">现金</p>
|
|
|
|
|
|
+ <p class="item-main">
|
|
|
|
+ <span class="item-price" v-if="setmealData">{{ setmealData.price || 0 }}</span>
|
|
|
|
+ 元
|
|
|
|
+ </p>
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
|
|
+ <a-form-model-item label="收款方式" class="item-con"><p class="item-main">现金</p></a-form-model-item>
|
|
<a-form-model-item label="" class="btn-cont" :label-col="{ span: 0 }" :wrapper-col="{ span: 24 }">
|
|
<a-form-model-item label="" class="btn-cont" :label-col="{ span: 0 }" :wrapper-col="{ span: 24 }">
|
|
<a-button type="primary" id="setmealPayMoney-submit" @click="onSubmit">确认收款</a-button>
|
|
<a-button type="primary" id="setmealPayMoney-submit" @click="onSubmit">确认收款</a-button>
|
|
<a-button id="setmealPayMoney-cancel" class="setmealPayMoney-cancel" @click="cancel">取消</a-button>
|
|
<a-button id="setmealPayMoney-cancel" class="setmealPayMoney-cancel" @click="cancel">取消</a-button>
|
|
@@ -86,14 +85,8 @@ export default {
|
|
custId: null
|
|
custId: null
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
- custMobile: [
|
|
|
|
- { required: true, message: '请输入手机号', trigger: 'blur' },
|
|
|
|
- { validator: isMobileValid, trigger: 'blur' }
|
|
|
|
- ],
|
|
|
|
- vehicleNumber: [
|
|
|
|
- { required: true, message: '请输入车牌号', trigger: 'blur' },
|
|
|
|
- { validator: isLicensePlateValid, trigger: 'blur' }
|
|
|
|
- ]
|
|
|
|
|
|
+ custMobile: [{ required: true, message: '请输入手机号', trigger: 'blur' }, { validator: isMobileValid, trigger: 'blur' }],
|
|
|
|
+ vehicleNumber: [{ required: true, message: '请输入车牌号', trigger: 'blur' }, { validator: isLicensePlateValid, trigger: 'blur' }]
|
|
},
|
|
},
|
|
setmealData: null // 套餐数据
|
|
setmealData: null // 套餐数据
|
|
}
|
|
}
|
|
@@ -102,15 +95,18 @@ export default {
|
|
// 手机号输入监听
|
|
// 手机号输入监听
|
|
mobileInput () {
|
|
mobileInput () {
|
|
if (this.form.custMobile.length == 11) {
|
|
if (this.form.custMobile.length == 11) {
|
|
- if (isMobile(this.form.custMobile)) { // 校验手机号
|
|
|
|
|
|
+ if (isMobile(this.form.custMobile)) {
|
|
|
|
+ // 校验手机号
|
|
// 根据手机号去查询是否已绑定车牌
|
|
// 根据手机号去查询是否已绑定车牌
|
|
bundleFindByMobile({ mobile: this.form.custMobile }).then(res => {
|
|
bundleFindByMobile({ mobile: this.form.custMobile }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- if (res.data) { // 查到客户信息
|
|
|
|
|
|
+ if (res.data) {
|
|
|
|
+ // 查到客户信息
|
|
this.form.vehicleNumber = ''
|
|
this.form.vehicleNumber = ''
|
|
this.form.custName = res.data.name
|
|
this.form.custName = res.data.name
|
|
this.form.custId = res.data.id
|
|
this.form.custId = res.data.id
|
|
- } else { // 未查到客户信息
|
|
|
|
|
|
+ } else {
|
|
|
|
+ // 未查到客户信息
|
|
this.form.vehicleNumber = ''
|
|
this.form.vehicleNumber = ''
|
|
this.form.custName = ''
|
|
this.form.custName = ''
|
|
this.form.custId = null
|
|
this.form.custId = null
|
|
@@ -138,13 +134,15 @@ export default {
|
|
vehicleNumber: this.form.vehicleNumber,
|
|
vehicleNumber: this.form.vehicleNumber,
|
|
totalAmount: this.setmealData.price
|
|
totalAmount: this.setmealData.price
|
|
},
|
|
},
|
|
- paymentDetailList: [
|
|
|
|
- { payType: 10001 }
|
|
|
|
- ]
|
|
|
|
|
|
+ paymentDetailList: [{ payType: 10001 }]
|
|
}
|
|
}
|
|
bundleBuy(params).then(res => {
|
|
bundleBuy(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.$router.push({ path: '/SetmealSales/PurchasedSetmeal' })
|
|
|
|
|
|
+ if (this.$hasPermissions('M_bundel_buyRecord')) {
|
|
|
|
+ this.$router.push({ path: '/SetmealSales/PurchasedSetmeal' })
|
|
|
|
+ } else {
|
|
|
|
+ this.cancel()
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
@@ -191,25 +189,25 @@ export default {
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
<style lang="less">
|
|
- .setmealPayMoneyModal{
|
|
|
|
- .item-con{
|
|
|
|
- .item-main{
|
|
|
|
- margin: 0;
|
|
|
|
- .item-price{
|
|
|
|
- font-size: 24px;
|
|
|
|
- color: red;
|
|
|
|
- margin-right: 5px;
|
|
|
|
- }
|
|
|
|
|
|
+.setmealPayMoneyModal {
|
|
|
|
+ .item-con {
|
|
|
|
+ .item-main {
|
|
|
|
+ margin: 0;
|
|
|
|
+ .item-price {
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ color: red;
|
|
|
|
+ margin-right: 5px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .btn-cont{
|
|
|
|
- text-align: center;
|
|
|
|
- .setmealPayMoney-cancel{
|
|
|
|
- margin-left: 30px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .text-center{
|
|
|
|
- text-align: center;
|
|
|
|
|
|
+ }
|
|
|
|
+ .btn-cont {
|
|
|
|
+ text-align: center;
|
|
|
|
+ .setmealPayMoney-cancel {
|
|
|
|
+ margin-left: 30px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .text-center {
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|