fix: 修改新增预售的内容
This commit is contained in:
parent
7a9f8ca0d4
commit
5ab6d86bd9
|
@ -22,6 +22,7 @@
|
||||||
@change="getOrderTime"
|
@change="getOrderTime"
|
||||||
format="yyyy-MM-dd HH:mm"
|
format="yyyy-MM-dd HH:mm"
|
||||||
data-format="yyyy-MM-dd HH:mm"
|
data-format="yyyy-MM-dd HH:mm"
|
||||||
|
popper-class="show-time-hint"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="orderTime"
|
v-model="orderTime"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
data-format="yyyy-MM-dd HH:mm"
|
data-format="yyyy-MM-dd HH:mm"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
v-model="arrears"
|
v-model="arrears"
|
||||||
|
popper-class="show-time-hint"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
|
@ -63,6 +65,7 @@
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
@change="deliveryTime"
|
@change="deliveryTime"
|
||||||
v-model="delivery"
|
v-model="delivery"
|
||||||
|
popper-class="show-time-hint"
|
||||||
type="datetimerange"
|
type="datetimerange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
|
@ -70,7 +73,9 @@
|
||||||
:picker-options="pickerOptions3"
|
:picker-options="pickerOptions3"
|
||||||
>
|
>
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<div style="color: red;">顾客支付定金时、可对此区间的日期进行预约,卖家须在顾客已选预约日进行发货</div>
|
<div style="color: red;">
|
||||||
|
顾客支付定金时、可对此区间的日期进行预约,卖家须在顾客已选预约日进行发货
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="定金可退:" prop="isRefundEarnestMoney">
|
<el-form-item label="定金可退:" prop="isRefundEarnestMoney">
|
||||||
<el-radio v-model="ruleForm.isRefundEarnestMoney" :label="1"
|
<el-radio v-model="ruleForm.isRefundEarnestMoney" :label="1"
|
||||||
|
@ -154,7 +159,8 @@
|
||||||
v-if="scope.row.isAdvanceSell"
|
v-if="scope.row.isAdvanceSell"
|
||||||
@change="
|
@change="
|
||||||
scope.row.balancePayment =
|
scope.row.balancePayment =
|
||||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
Number(scope.row.presalePrice) &&
|
||||||
|
Number(scope.row.earnestMoney)
|
||||||
? parseFloat(
|
? parseFloat(
|
||||||
String(
|
String(
|
||||||
scope.row.presalePrice -
|
scope.row.presalePrice -
|
||||||
|
@ -165,7 +171,6 @@
|
||||||
"
|
"
|
||||||
v-model="scope.row.presalePrice"
|
v-model="scope.row.presalePrice"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="scope.row.marketPrice"
|
|
||||||
label="请输入销售价"
|
label="请输入销售价"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
|
@ -178,7 +183,8 @@
|
||||||
<el-input-number
|
<el-input-number
|
||||||
@change="
|
@change="
|
||||||
scope.row.balancePayment =
|
scope.row.balancePayment =
|
||||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
Number(scope.row.presalePrice) &&
|
||||||
|
Number(scope.row.earnestMoney)
|
||||||
? parseFloat(
|
? parseFloat(
|
||||||
String(
|
String(
|
||||||
scope.row.presalePrice -
|
scope.row.presalePrice -
|
||||||
|
@ -198,7 +204,8 @@
|
||||||
<el-table-column align="center" label="尾款" width="200">
|
<el-table-column align="center" label="尾款" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.isAdvanceSell">{{
|
<span v-if="scope.row.isAdvanceSell">{{
|
||||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
Number(scope.row.presalePrice) &&
|
||||||
|
Number(scope.row.earnestMoney)
|
||||||
? parseFloat(
|
? parseFloat(
|
||||||
String(
|
String(
|
||||||
scope.row.presalePrice - scope.row.earnestMoney
|
scope.row.presalePrice - scope.row.earnestMoney
|
||||||
|
@ -290,7 +297,8 @@
|
||||||
v-if="scope.row.isAdvanceSell"
|
v-if="scope.row.isAdvanceSell"
|
||||||
@change="
|
@change="
|
||||||
scope.row.balancePayment =
|
scope.row.balancePayment =
|
||||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
Number(scope.row.presalePrice) &&
|
||||||
|
Number(scope.row.earnestMoney)
|
||||||
? parseFloat(
|
? parseFloat(
|
||||||
String(
|
String(
|
||||||
scope.row.presalePrice -
|
scope.row.presalePrice -
|
||||||
|
@ -314,7 +322,8 @@
|
||||||
<el-input-number
|
<el-input-number
|
||||||
@change="
|
@change="
|
||||||
scope.row.balancePayment =
|
scope.row.balancePayment =
|
||||||
Number(scope.row.presalePrice) && Number(scope.row.earnestMoney)
|
Number(scope.row.presalePrice) &&
|
||||||
|
Number(scope.row.earnestMoney)
|
||||||
? parseFloat(
|
? parseFloat(
|
||||||
String(
|
String(
|
||||||
scope.row.presalePrice -
|
scope.row.presalePrice -
|
||||||
|
@ -410,7 +419,12 @@ export default {
|
||||||
},
|
},
|
||||||
pickerOptions: {
|
pickerOptions: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
return time.getTime() <= dayjs().subtract(1, 'day').valueOf()
|
return (
|
||||||
|
time.getTime() <=
|
||||||
|
dayjs()
|
||||||
|
.subtract(1, 'day')
|
||||||
|
.valueOf()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
orderTime: [], //订单支付时间
|
orderTime: [], //订单支付时间
|
||||||
|
@ -422,7 +436,12 @@ export default {
|
||||||
console.log(that.ruleForm.startTime)
|
console.log(that.ruleForm.startTime)
|
||||||
date = new Date(that.ruleForm.startTime).getTime()
|
date = new Date(that.ruleForm.startTime).getTime()
|
||||||
}
|
}
|
||||||
return time.getTime() <= dayjs(date).subtract(1, 'day').valueOf()
|
return (
|
||||||
|
time.getTime() <=
|
||||||
|
dayjs(date)
|
||||||
|
.subtract(1, 'day')
|
||||||
|
.valueOf()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
pickerOptions3: {
|
pickerOptions3: {
|
||||||
|
@ -643,12 +662,24 @@ export default {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log(valid)
|
console.log(valid)
|
||||||
if (dayjs(this.ruleForm.startTime).isAfter(dayjs(this.ruleForm.balancePaymentStartTime))) {
|
if (
|
||||||
this.$message.error('付尾款开始时间必须大于等于定金开始时间')
|
dayjs(this.ruleForm.startTime).isAfter(
|
||||||
|
dayjs(this.ruleForm.balancePaymentStartTime)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
this.$message.error(
|
||||||
|
'付尾款开始时间必须大于等于定金开始时间'
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (dayjs(this.ruleForm.endTime).isAfter(dayjs(this.ruleForm.balancePaymentEndTime))) {
|
if (
|
||||||
this.$message.error('付尾款结束时间必须大于等于定金结束时间')
|
dayjs(this.ruleForm.endTime).isAfter(
|
||||||
|
dayjs(this.ruleForm.balancePaymentEndTime)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
this.$message.error(
|
||||||
|
'付尾款结束时间必须大于等于定金结束时间'
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
@ -712,12 +743,24 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (dayjs(this.ruleForm.startTime).isAfter(dayjs(this.ruleForm.balancePaymentStartTime))) {
|
if (
|
||||||
this.$message.error('付尾款开始时间必须大于等于定金开始时间')
|
dayjs(this.ruleForm.startTime).isAfter(
|
||||||
|
dayjs(this.ruleForm.balancePaymentStartTime)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
this.$message.error(
|
||||||
|
'付尾款开始时间必须大于等于定金开始时间'
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (dayjs(this.ruleForm.endTime).isAfter(dayjs(this.ruleForm.balancePaymentEndTime))) {
|
if (
|
||||||
this.$message.error('付尾款结束时间必须大于等于定金结束时间')
|
dayjs(this.ruleForm.endTime).isAfter(
|
||||||
|
dayjs(this.ruleForm.balancePaymentEndTime)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
this.$message.error(
|
||||||
|
'付尾款结束时间必须大于等于定金结束时间'
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(valid)
|
console.log(valid)
|
||||||
|
@ -778,4 +821,40 @@ export default {
|
||||||
asyncComputed: {}
|
asyncComputed: {}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss">
|
||||||
|
.show-time-hint {
|
||||||
|
.el-time-spinner {
|
||||||
|
position: relative;
|
||||||
|
&::before {
|
||||||
|
content: '小时';
|
||||||
|
display: block;
|
||||||
|
color: black;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
text-align: center;
|
||||||
|
width: 50%;
|
||||||
|
height: 40px;
|
||||||
|
line-height:40px;
|
||||||
|
font-size: 14px;
|
||||||
|
background: white;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
&::after {
|
||||||
|
content: '分钟';
|
||||||
|
display: block;
|
||||||
|
color: black;
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
top: 0;
|
||||||
|
height: 40px;
|
||||||
|
line-height:40px;
|
||||||
|
right: 0;
|
||||||
|
width: 50%;
|
||||||
|
font-size: 14px;
|
||||||
|
background: white;
|
||||||
|
z-index: 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue