feat(stocking): 编辑备货单支持车辆附件上传与回显
明细行备注下方增加附件上传(同新建页),进入编辑时经 populateFromDetail 回显已有附件,可增可删。 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -577,6 +577,37 @@
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
<ElRow :gutter="12" class="item-row-wrap">
|
||||
<ElCol :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<ElFormItem label="附件" label-width="95px">
|
||||
<el-upload
|
||||
:action="itemUploadAction"
|
||||
:headers="uploadHeaders"
|
||||
:show-file-list="false"
|
||||
:before-upload="beforeItemAttachmentUpload"
|
||||
:on-success="(res: any) => handleItemAttachmentUpload(res, idx)"
|
||||
multiple
|
||||
accept=".jpg,.jpeg,.png,.gif,.pdf,.doc,.docx,.xls,.xlsx,.txt"
|
||||
>
|
||||
<el-button size="small" type="primary" plain>上传附件</el-button>
|
||||
</el-upload>
|
||||
<div
|
||||
v-if="item.attachment_files && item.attachment_files.length"
|
||||
style="margin-top: 4px"
|
||||
>
|
||||
<el-tag
|
||||
v-for="(f, fIdx) in item.attachment_files"
|
||||
:key="fIdx"
|
||||
closable
|
||||
@close="removeItemAttachment(idx, fIdx)"
|
||||
style="margin: 2px 4px 2px 0"
|
||||
>
|
||||
{{ f.name }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</ElFormItem>
|
||||
</ElCol>
|
||||
</ElRow>
|
||||
<ElRow :gutter="12">
|
||||
<ElCol :span="24" style="text-align: right">
|
||||
<el-tag effect="light" class="row-actions" type="success" @click="copyRow(idx)"> 复制 </el-tag>
|
||||
@@ -1208,7 +1239,13 @@
|
||||
getVehicleList,
|
||||
handleVehicleSizeChange,
|
||||
handleVehicleCurrentChange,
|
||||
chooseVehicle
|
||||
chooseVehicle,
|
||||
|
||||
// 车辆附件上传(uploadHeaders 页面已解构,复用)
|
||||
itemUploadAction,
|
||||
beforeItemAttachmentUpload,
|
||||
handleItemAttachmentUpload,
|
||||
removeItemAttachment
|
||||
} = useStockingForm(false, stocking_id as string) // isFinal = true, stocking_id
|
||||
|
||||
// 获取详情数据
|
||||
|
||||
Reference in New Issue
Block a user