diff --git a/src/main.js b/src/main.js index 13bec0d..5afc8d9 100644 --- a/src/main.js +++ b/src/main.js @@ -21,6 +21,7 @@ import { getConfigKey } from '@/api/system/config' import { parseTime, resetForm, + clearFormValidate, addDateRange, selectDictLabel, selectDictLabels, @@ -50,6 +51,7 @@ Vue.prototype.getDicts = getDicts Vue.prototype.getConfigKey = getConfigKey Vue.prototype.parseTime = parseTime Vue.prototype.resetForm = resetForm +Vue.prototype.clearFormValidate = clearFormValidate Vue.prototype.addDateRange = addDateRange Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabels = selectDictLabels diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index a5af056..23f4b6a 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -51,11 +51,26 @@ export function parseTime(time, pattern) { // 表单重置 export function resetForm(refName) { + if (this.$refs[refName]) { + this.$refs[refName].resetFields() + } +} + +// 表单清除验证 +export function clearFormValidate(refName) { setTimeout(() => { if (this.$refs[refName]) { - this.$refs[refName].resetFields() + this.$refs[refName].clearValidate() } }, 100) + // if (this.$refs[refName]) { + // this.$refs[refName].clearValidate() + // } + // else { + // setTimeout(() => { + // this.clearFormValidate(refName) + // }, 100) + // } } // 添加日期范围 diff --git a/src/views/business/comps/common/sign.vue b/src/views/business/comps/common/sign.vue index c1ef81b..6e3a035 100644 --- a/src/views/business/comps/common/sign.vue +++ b/src/views/business/comps/common/sign.vue @@ -106,7 +106,7 @@ export default { jyksrq: selectedDate && selectedDate.length > 0 ? selectedDate[0] : '', jyjsrq: selectedDate && selectedDate.length > 0 ? selectedDate[1] : '' } - this.resetForm("signForm") + this.open = true this.isReson = isReson || false @@ -142,6 +142,7 @@ export default { }] } } + this.clearFormValidate("signForm") }, cancel() { this.open = false diff --git a/src/views/business/comps/template/dialog/EditSign.vue b/src/views/business/comps/template/dialog/EditSign.vue index a84e291..0d5b4a7 100644 --- a/src/views/business/comps/template/dialog/EditSign.vue +++ b/src/views/business/comps/template/dialog/EditSign.vue @@ -98,8 +98,8 @@ export default { qmrmm:'', } this.isChecked = false - this.resetForm("formEditSignForm") this.open = true + this.clearFormValidate("formEditSignForm") }, cancel() { this.open = false diff --git a/src/views/business/form/drug/comp/sign.vue b/src/views/business/form/drug/comp/sign.vue index e3d67c7..885ef1e 100644 --- a/src/views/business/form/drug/comp/sign.vue +++ b/src/views/business/form/drug/comp/sign.vue @@ -114,7 +114,7 @@ export default { startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'', endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:'' } - this.resetForm("signForm") + this.open = true this.isReson = isReson || false @@ -150,6 +150,7 @@ export default { }] } } + this.clearFormValidate("signForm") }, cancel() { this.open = false diff --git a/src/views/business/form/nonTrial/comp/sign.vue b/src/views/business/form/nonTrial/comp/sign.vue index e3d67c7..885ef1e 100644 --- a/src/views/business/form/nonTrial/comp/sign.vue +++ b/src/views/business/form/nonTrial/comp/sign.vue @@ -114,7 +114,7 @@ export default { startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'', endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:'' } - this.resetForm("signForm") + this.open = true this.isReson = isReson || false @@ -150,6 +150,7 @@ export default { }] } } + this.clearFormValidate("signForm") }, cancel() { this.open = false diff --git a/src/views/business/storageLocation/comps/Bj.vue b/src/views/business/storageLocation/comps/Bj.vue new file mode 100644 index 0000000..f61c902 --- /dev/null +++ b/src/views/business/storageLocation/comps/Bj.vue @@ -0,0 +1,186 @@ + + + diff --git a/src/views/business/storageLocation/comps/Xz.vue b/src/views/business/storageLocation/comps/Xz.vue new file mode 100644 index 0000000..62b07aa --- /dev/null +++ b/src/views/business/storageLocation/comps/Xz.vue @@ -0,0 +1,187 @@ + + + diff --git a/src/views/business/storageLocation/list.vue b/src/views/business/storageLocation/list.vue index 330fc80..fdc0748 100644 --- a/src/views/business/storageLocation/list.vue +++ b/src/views/business/storageLocation/list.vue @@ -11,8 +11,9 @@ - - + + @@ -56,111 +57,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
-
- -
- - + + + diff --git a/src/views/business/study/comp/sign.vue b/src/views/business/study/comp/sign.vue index 7e28456..5613c69 100644 --- a/src/views/business/study/comp/sign.vue +++ b/src/views/business/study/comp/sign.vue @@ -114,7 +114,7 @@ export default { startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'', endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:'' } - this.resetForm("signForm") + this.open = true this.isReson = isReson || false @@ -150,6 +150,8 @@ export default { }] } } + + this.clearFormValidate("signForm") }, cancel() { this.open = false