Browse Source

基础信息bug修改

master
zhang_li 1 year ago
parent
commit
5731f0d1b8
  1. 10
      src/components/BasicForm/src/BasicForm.vue
  2. 3
      src/views/wms/basicDataManage/itemManage/itembasic/index.vue
  3. 6
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

10
src/components/BasicForm/src/BasicForm.vue

@ -238,6 +238,16 @@ const submitForm = async () => {
// data.masterId = props.masterParmas.masterId // data.masterId = props.masterParmas.masterId
// data.number = props.masterParmas.number // data.number = props.masterParmas.number
// } // }
console.log(props.formAllSchemas.formSchema)
var isHave = props.formAllSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if (formType.value === 'create') { if (formType.value === 'create') {
await props.apiCreate(data) await props.apiCreate(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))

3
src/views/wms/basicDataManage/itemManage/itembasic/index.vue

@ -62,11 +62,10 @@ import { Itembasic, rules } from './itembasic.data'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { ItemBasicTabsList } from '@/utils/disposition/tabsList' import { ItemBasicTabsList } from '@/utils/disposition/tabsList'
defineOptions({ name: 'Itembasic' }) defineOptions({ name: 'Itembasic' })
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: ItembasicApi.getItembasicPage // getListApi: ItembasicApi.getItembasicPage //
}) })
console.log(tableObject)
const importFormRef = ref() const importFormRef = ref()
// //
const HeadButttondata = [ const HeadButttondata = [

6
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -419,7 +419,8 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验 // 表单校验
export const rules = reactive({ export const rules = reactive({
code: [ code: [
{ required: true, message: '请输入代码', trigger: 'blur' } { required: true, message: '请输入代码', trigger: 'blur' },
{ max: 30, message: '不得超过30个字符', trigger: 'blur' },
], ],
name: [ name: [
{ required: true, message: '请输入名称', trigger: 'blur' } { required: true, message: '请输入名称', trigger: 'blur' }
@ -487,4 +488,5 @@ export const rules = reactive({
expireTime: [ expireTime: [
{ required: true, message: '请输入失效时间', trigger: 'change' } { required: true, message: '请输入失效时间', trigger: 'change' }
], ],
}) })
console.log(Itembasic)
Loading…
Cancel
Save