|
|
@ -38,13 +38,11 @@ |
|
|
|
</ContentWrap> |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="formRef" |
|
|
|
@success="getList" |
|
|
|
ref="basicFormRef" |
|
|
|
:rules="DeliverRecordMainRules" |
|
|
|
:formAllSchemas="DeliverRecordMain.allSchemas" |
|
|
|
:tableAllSchemas="DeliverRecordDetail.allSchemas" |
|
|
|
:tableFormRules="DeliverRecordDetailRules" |
|
|
|
:isBusiness="true" |
|
|
|
@submitForm="submitForm" |
|
|
|
/> |
|
|
|
<!-- 详情 --> |
|
|
|
<Detail |
|
|
@ -166,15 +164,25 @@ const butttondata = (row,$index) => { |
|
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
|
return [] |
|
|
|
}else{ |
|
|
|
return [defaultButtons.mainListDocumentPrintBtn(null),] // 标签打印 |
|
|
|
return [ |
|
|
|
// defaultButtons.mainListDocumentPrintBtn(null), // 标签打印 |
|
|
|
defaultButtons.mainListEditBtn(null), // 编辑 |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
if (val == 'documentPrint') { // 标签打印 |
|
|
|
handlePoint(row) |
|
|
|
if (val == 'edit') { // 编辑 |
|
|
|
openForm('update', row) |
|
|
|
} |
|
|
|
} |
|
|
|
/** 添加/修改操作 */ |
|
|
|
const basicFormRef = ref() |
|
|
|
const tableData = ref([]) |
|
|
|
const openForm = (type: string, row?: any) => { |
|
|
|
tableData.value = [] |
|
|
|
basicFormRef.value.open(type, row) |
|
|
|
} |
|
|
|
|
|
|
|
// 获取部门 用于详情 部门回显 |
|
|
@ -267,6 +275,31 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => |
|
|
|
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 () => { |
|
|
|