| | |
| | | <FormDialog v-model="importUpload.open" |
| | | :title="importUpload.title" |
| | | :width="'600px'" |
| | | @close="importUpload.open = false" |
| | | :loading="importUpload.isUploading" |
| | | @close="onClose" |
| | | @confirm="submitImportFile" |
| | | @cancel="importUpload.open = false"> |
| | | @cancel="onClose"> |
| | | <el-upload ref="importUploadRef" |
| | | :limit="1" |
| | | accept=".xlsx,.xls" |
| | |
| | | :on-error="importUpload.onError" |
| | | :on-progress="importUpload.onProgress" |
| | | :on-change="importUpload.onChange" |
| | | :on-exceed="importUpload.onExceed" |
| | | :auto-upload="false" |
| | | drag> |
| | | <i class="el-icon-upload"></i> |
| | |
| | | onChange: (file, fileList) => { |
| | | console.log("文件状态改变", file, fileList); |
| | | }, |
| | | onExceed: (files, fileList) => { |
| | | if (importUploadRef.value) { |
| | | importUploadRef.value.clearFiles(); |
| | | const file = files[0]; |
| | | importUploadRef.value.handleStart(file); |
| | | } |
| | | }, |
| | | onProgress: (event, file, fileList) => { |
| | | console.log("上传中...", event.percent); |
| | | }, |
| | |
| | | const downloadTemplate = () => { |
| | | proxy.download("/sales/ledger/exportTemplate", {}, "销售台账导入模板.xlsx"); |
| | | }; |
| | | const onClose = () => { |
| | | importUpload.open = false; |
| | | if (importUploadRef.value) { |
| | | importUploadRef.value.clearFiles(); |
| | | } |
| | | }; |
| | | |
| | | // 提交导入文件 |
| | | const submitImportFile = () => { |
| | |
| | | const isTrue = true; |
| | | selectedRows.value.forEach(row => { |
| | | if (row.deliveryStatus != 1 && row.deliveryStatus != 3) { |
| | | proxy.$modal.msgWarning("仅未发货或审批失败的台账可以合并发货"); |
| | | proxy.$modal.msgWarning("仅未发货或审批失败的台账可以发货"); |
| | | isTrue = false; |
| | | return; |
| | | } |