Commit 2ee7d7a1 by 张权

生效日期选择今日之后

1 parent 1ecc234b
...@@ -18,3 +18,13 @@ export const afterRangePickerOptions = { ...@@ -18,3 +18,13 @@ export const afterRangePickerOptions = {
return false return false
} }
} }
export const afterTodayRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate()))
if (date < yesterday) {
return true
}
return false
}
}
...@@ -111,14 +111,15 @@ ...@@ -111,14 +111,15 @@
</template> </template>
<script> <script>
import { beforeRangePickerOptions, afterRangePickerOptions } from './common' import { beforeRangePickerOptions, afterRangePickerOptions,afterTodayRangePickerOptions } from './common'
export default { export default {
name: 'glsx-combi-form', name: 'glsx-combi-form',
data() { data() {
return { return {
pickerOption: { pickerOption: {
beforeRangePickerOptions: beforeRangePickerOptions, beforeRangePickerOptions: beforeRangePickerOptions,
afterRangePickerOptions: afterRangePickerOptions afterRangePickerOptions: afterRangePickerOptions,
afterTodayRangePickerOptions
}, },
isImgVisible: false, isImgVisible: false,
dialogObj: { dialogObj: {
......
...@@ -399,7 +399,7 @@ export default { ...@@ -399,7 +399,7 @@ export default {
type: 'datePicker', type: 'datePicker',
dateType: 'date', dateType: 'date',
valueFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd',
pickerOptions: 'afterRangePickerOptions', pickerOptions: 'afterTodayRangePickerOptions',
customPickerOptions: { customPickerOptions: {
disabledDate(date) { disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate())) const yesterday = new Date(new Date().setDate(new Date().getDate()))
...@@ -515,15 +515,13 @@ export default { ...@@ -515,15 +515,13 @@ export default {
watch: { watch: {
'editForm.vehicle.invoicePrice'(newValue, oldValue) { 'editForm.vehicle.invoicePrice'(newValue, oldValue) {
this.editForm.vehicle.invoicePrice = limitPrice(newValue, oldValue, 7, 2, 0, 2000000) this.editForm.vehicle.invoicePrice = limitPrice(newValue, oldValue, 7, 2, 0, 2000000)
this.packageToPrice()
}, },
'editForm.actualSalesPrice'(newValue, oldValue) { 'editForm.actualSalesPrice'(newValue, oldValue) {
this.editForm.actualSalesPrice = limitPrice(newValue, oldValue, 7, 2) this.editForm.actualSalesPrice = limitPrice(newValue, oldValue, 7, 2)
}, },
'editFormPro.additional_price'(newValue, oldValue) { 'editFormPro.additional_price'(newValue, oldValue) {
this.editFormPro.additional_price = limitPrice(newValue, oldValue, 6, 2) this.editFormPro.additional_price = limitPrice(newValue, oldValue, 6, 2)
},
'editForm.vehicle.invoicePrice'(newValue, oldValue) {
this.packageToPrice()
} }
}, },
...@@ -750,36 +748,7 @@ export default { ...@@ -750,36 +748,7 @@ export default {
}) })
} }
} }
// if (item.attributeList[0].attributeName === 'additional_price') {
// this.editRulePro[item.attributeList[0].attributeName] = [
// {
// validator: (rule, value, callback) => {
// return +this.editForm.vehicle.invoicePrice*0.1 < + value ? callback(new Error('输入价格有误')) : callback()
// },
// trigger: 'change'
// }
// ]
// }
}) })
// const targetObj = this.editFormDataPro[0].optionList.find(item => {
// return item.packageCode === this.editForm.packageCode
// })
// if(targetObj?.editFormData && Array.isArray(targetObj.editFormData) && targetObj.editFormData[targetObj.editFormData.length-1].addHtml ==='table'){
// const tableList = targetObj.editFormData[targetObj.editFormData.length-1].tableList
// tableList.forEach(item => {
// item.forEach(sonItem => {
// if(sonItem.required===1){
// this.editRulePro[sonItem.name] = [
// {
// required: true,
// message: '请输入',
// trigger: 'change'
// }
// ]
// }
// })
// })
// }
if (recovery) { if (recovery) {
this.recoveryEditFormPro() this.recoveryEditFormPro()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!