|
@ -38,13 +38,11 @@ |
|
|
</ContentWrap> |
|
|
</ContentWrap> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
<BasicForm |
|
|
<BasicForm |
|
|
ref="formRef" |
|
|
ref="basicFormRef" |
|
|
@success="getList" |
|
|
|
|
|
:rules="DeliverRecordMainRules" |
|
|
:rules="DeliverRecordMainRules" |
|
|
:formAllSchemas="DeliverRecordMain.allSchemas" |
|
|
:formAllSchemas="DeliverRecordMain.allSchemas" |
|
|
:tableAllSchemas="DeliverRecordDetail.allSchemas" |
|
|
|
|
|
:tableFormRules="DeliverRecordDetailRules" |
|
|
|
|
|
:isBusiness="true" |
|
|
:isBusiness="true" |
|
|
|
|
|
@submitForm="submitForm" |
|
|
/> |
|
|
/> |
|
|
<!-- 详情 --> |
|
|
<!-- 详情 --> |
|
|
<Detail |
|
|
<Detail |
|
@ -166,16 +164,26 @@ const butttondata = (row,$index) => { |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
return [] |
|
|
return [] |
|
|
}else{ |
|
|
}else{ |
|
|
return [defaultButtons.mainListDocumentPrintBtn(null),] // 标签打印 |
|
|
return [ |
|
|
|
|
|
// defaultButtons.mainListDocumentPrintBtn(null), // 标签打印 |
|
|
|
|
|
defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
|
|
|
] |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
if (val == 'documentPrint') { // 标签打印 |
|
|
if (val == 'edit') { // 编辑 |
|
|
handlePoint(row) |
|
|
openForm('update', row) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
/** 添加/修改操作 */ |
|
|
|
|
|
const basicFormRef = ref() |
|
|
|
|
|
const tableData = ref([]) |
|
|
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
|
|
tableData.value = [] |
|
|
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 获取部门 用于详情 部门回显 |
|
|
// 获取部门 用于详情 部门回显 |
|
|
const { wsCache } = useCache() |
|
|
const { wsCache } = useCache() |
|
@ -267,6 +275,31 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// 主子数据 提交 |
|
|
|
|
|
const submitForm = async (formType, submitData) => { |
|
|
|
|
|
let data = {...submitData} |
|
|
|
|
|
if(data.masterId){ |
|
|
|
|
|
data.id = data.masterId |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
if (formType === 'create') { |
|
|
|
|
|
await DeliverRecordMainApi.createDeliverRecordMain(data) |
|
|
|
|
|
message.success(t('common.createSuccess')) |
|
|
|
|
|
getList() |
|
|
|
|
|
} else { |
|
|
|
|
|
await DeliverRecordMainApi.updateDeliverRecordMain(data) |
|
|
|
|
|
await DeliverRecordDetailApi.updateDeliverRecordDetailAll(data) |
|
|
|
|
|
message.success(t('common.updateSuccess')) |
|
|
|
|
|
basicFormRef.value.dialogVisible = false |
|
|
|
|
|
buttonBaseClick('refresh',null) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
basicFormRef.value.formLoading = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
/** 初始化 **/ |
|
|
onMounted(async () => { |
|
|
onMounted(async () => { |
|
|