|
@@ -21,6 +21,8 @@
|
|
<a-form-model-item label="服务名称" class="item-con"><p class="item-main">{{ serverData.itemName }}</p></a-form-model-item>
|
|
<a-form-model-item label="服务名称" class="item-con"><p class="item-main">{{ serverData.itemName }}</p></a-form-model-item>
|
|
<!-- 到期时间 -->
|
|
<!-- 到期时间 -->
|
|
<a-form-model-item label="到期时间" class="item-con"><p class="item-main">{{ serverData.expiryDate }}</p></a-form-model-item>
|
|
<a-form-model-item label="到期时间" class="item-con"><p class="item-main">{{ serverData.expiryDate }}</p></a-form-model-item>
|
|
|
|
+ <!-- 剩余次数 -->
|
|
|
|
+ <a-form-model-item label="剩余次数" class="item-con"><p class="item-main">{{ serverData.remainTimes }}次</p></a-form-model-item>
|
|
<!-- 过期次数 -->
|
|
<!-- 过期次数 -->
|
|
<a-form-model-item label="过期次数" class="item-con"><p class="item-main">{{ serverData.expiryTimes }}次</p></a-form-model-item>
|
|
<a-form-model-item label="过期次数" class="item-con"><p class="item-main">{{ serverData.expiryTimes }}次</p></a-form-model-item>
|
|
<!-- 新的到期时间 -->
|
|
<!-- 新的到期时间 -->
|
|
@@ -33,21 +35,15 @@
|
|
:disabled-date="disabledDate"
|
|
:disabled-date="disabledDate"
|
|
style="width: 80%;" />
|
|
style="width: 80%;" />
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
- <!-- 是否返还已过期服务 -->
|
|
|
|
- <a-form-model-item label="是否返还已过期服务" prop="returnFalg">
|
|
|
|
- <a-radio-group id="delay-returnFalg" v-model="form.returnFalg">
|
|
|
|
- <a-radio :value="1">是</a-radio>
|
|
|
|
- <a-radio :value="0">否</a-radio>
|
|
|
|
- </a-radio-group>
|
|
|
|
- </a-form-model-item>
|
|
|
|
<!-- 返还次数 -->
|
|
<!-- 返还次数 -->
|
|
- <a-form-model-item v-if="form.returnFalg==1" label="返还次数" prop="returnTimes">
|
|
|
|
|
|
+ <a-form-model-item label="返还次数" prop="returnTimes">
|
|
<a-input-number
|
|
<a-input-number
|
|
id="delay-returnTimes"
|
|
id="delay-returnTimes"
|
|
v-model="form.returnTimes"
|
|
v-model="form.returnTimes"
|
|
:precision="0"
|
|
:precision="0"
|
|
:min="0"
|
|
:min="0"
|
|
:max="serverData.expiryTimes"
|
|
:max="serverData.expiryTimes"
|
|
|
|
+ :disabled="serverData.expiryTimes==0"
|
|
placeholder="请输入返还次数"
|
|
placeholder="请输入返还次数"
|
|
style="width: 80%;margin-right: 10px;" />次
|
|
style="width: 80%;margin-right: 10px;" />次
|
|
</a-form-model-item>
|
|
</a-form-model-item>
|
|
@@ -83,13 +79,10 @@ export default {
|
|
isShow: this.openModal, // 弹框是否展示
|
|
isShow: this.openModal, // 弹框是否展示
|
|
form: {
|
|
form: {
|
|
expiryDate: null, // 新的到期时间
|
|
expiryDate: null, // 新的到期时间
|
|
- returnFalg: 1, // 是否返还已过期服务
|
|
|
|
returnTimes: null // 返还次数
|
|
returnTimes: null // 返还次数
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
- expiryDate: [{ required: true, message: '请选择新的到期时间', trigger: 'change' }],
|
|
|
|
- returnFalg: [{ required: true, message: '请选择是否返还已过期服务', trigger: 'change' }],
|
|
|
|
- returnTimes: [{ required: true, message: '请输入返还次数', trigger: 'blur' }]
|
|
|
|
|
|
+ expiryDate: [{ required: true, message: '请选择新的到期时间', trigger: 'change' }]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -106,7 +99,6 @@ export default {
|
|
// 重置表单
|
|
// 重置表单
|
|
resetForm () {
|
|
resetForm () {
|
|
this.form.returnTimes = null
|
|
this.form.returnTimes = null
|
|
- this.form.returnFalg = 1
|
|
|
|
this.form.expiryDate = null
|
|
this.form.expiryDate = null
|
|
},
|
|
},
|
|
// 提交
|
|
// 提交
|
|
@@ -115,9 +107,8 @@ export default {
|
|
if (valid) {
|
|
if (valid) {
|
|
const params = {
|
|
const params = {
|
|
id: this.serverData.id,
|
|
id: this.serverData.id,
|
|
- returnTimes: this.form.returnTimes,
|
|
|
|
- returnFalg: this.form.returnFalg,
|
|
|
|
- expiryDate: this.form.expiryDate
|
|
|
|
|
|
+ returnTimes: this.form.returnTimes || 0,
|
|
|
|
+ expiryDate: moment(this.form.expiryDate).format('YYYY-MM-DD')
|
|
}
|
|
}
|
|
customerBundleItemDelay(params).then(res => {
|
|
customerBundleItemDelay(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -145,7 +136,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
serverData (val) {
|
|
serverData (val) {
|
|
- console.log(val)
|
|
|
|
|
|
+ if (val) {
|
|
|
|
+ this.form.expiryDate = moment(val.expiryDate)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|