diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index e2b0e59a5..64bb9c8b3 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -23,6 +23,14 @@ export function formatDate(date: Date | number, format?: string): string { return dayjs(date).format(format) } +/** + * 获取当前的日期+时间 + */ +export function addDay(date: Date | number,addDay:number) { + return dayjs(date).add(addDay,'day') +} + + /** * 获取当前的日期+时间 */ diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue b/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue index 50ce4c375..d0531a644 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/supplieDeliveryStrategy/AddForm.vue @@ -237,7 +237,7 @@ - + @@ -314,8 +314,8 @@ const rules = ref({ name: [{ required: true, message: '请输入名字', trigger: 'blur' },{ max: 50, message: '不得超过50个字符', trigger: 'blur' }], description: [{ required: true, message: '请输入描述', trigger: 'blur' },{ max: 50, message: '不得超过50个字符', trigger: 'blur' }], priority: [{ required: true, message: '请输入优先级', trigger: 'blur' }], - PhoneNumber: [{ max: 11, message: '不得超过11个字符', trigger: 'blur' }, - {message: '请输入联系电话', trigger: 'blur' ,validator:validateHanset}] + 'configuration.PhoneNumber': [{ max: 11, message: '不得超过11个字符', trigger: 'blur' }, + {message: '请输入正确格式的电话', trigger: 'blur' ,validator:validateHanset}] }) // 所有的范围类型 diff --git a/src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts b/src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts index cea87d094..e08c9a14d 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts +++ b/src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts @@ -300,6 +300,7 @@ export const SupplierRules = reactive({ { max: 50, message: '不得超过50个字符', trigger: 'blur' } ], email: [ + { required: true, message: '请输入邮箱', trigger: 'blur' }, { max: 128, message: '不得超过128个字符', trigger: 'blur' }, { validator:validateEmail, message: '请输入正确的邮箱格式', trigger: 'blur'} ], diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 218742190..e046b3943 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -116,7 +116,8 @@ import { import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' -import { formatDate } from '@/utils/formatTime' +import { formatDate,addDay } from '@/utils/formatTime' +import * as itemBasicApi from '@/api/wms/itembasic' // 供应商发货申请 defineOptions({ name: 'SupplierdeliverRequestMain' }) @@ -148,6 +149,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => row['poLine'] = val[0]['poLine'] row['orderQty'] = val[0]['orderQty'] row['uom'] = val[0]['uom'] + itemBasicApi.getItembasicPage({ + code: val[0]['itemCode'] + }).then((res) => { + let cf = addDay(row['produceDate'],res.list[0].validityDays); + row['expireDate'] = cf; + }).catch((err) => { + console.log(err) + }) } } else { const setV = {}