Browse Source

Merge remote-tracking branch 'origin/master' into master

master
fangdawei 10 months ago
parent
commit
a26642e753
  1. 20
      src/views/wms/basicDataManage/supplierManage/supplier/index.vue
  2. 3
      src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts

20
src/views/wms/basicDataManage/supplierManage/supplier/index.vue

@ -141,6 +141,25 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
if(type == "update"){
Supplier.allSchemas.formSchema.forEach((item) => {
if (item.field == 'code') {
item.componentProps.disabled = true
}
if (item.field == 'shortName') {
item.componentProps.disabled = true
}
})
}else {
Supplier.allSchemas.formSchema.forEach((item) => {
if (item.field == 'code') {
item.componentProps.disabled = false
}
if (item.field == 'shortName') {
item.componentProps.disabled = false
}
})
}
basicFormRef.value.open(type, row)
}
const formsSuccess = async (formType, data) => {
@ -159,6 +178,7 @@ const formsSuccess = async (formType, data) => {
await SupplierApi.createSupplier(data)
message.success(t('common.createSuccess'))
} else {
await SupplierApi.updateSupplier(data)
message.success(t('common.updateSuccess'))
}

3
src/views/wms/basicDataManage/supplierManage/supplier/supplier.data.ts

@ -150,7 +150,8 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
activeValue: 'TRUE',
disabled: true
}
},
table: {

Loading…
Cancel
Save