| | |
| | | :before-upload="handleBeforeUpload" |
| | | :on-error="handleUploadError" |
| | | :on-success="handleUploadSuccess" |
| | | :on-remove="handleRemove" |
| | | > |
| | | <el-button type="primary">上传</el-button> |
| | | <template #tip> |
| | |
| | | productList, |
| | | customerList, |
| | | addOrUpdateSalesLedger, |
| | | getSalesLedgerWithProducts, delLedger, addOrUpdateSalesLedgerProduct, delProduct |
| | | getSalesLedgerWithProducts, delLedger, addOrUpdateSalesLedgerProduct, delProduct, delLedgerFile |
| | | } from "@/api/salesManagement/salesLedger.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const tableData = ref([]) |
| | |
| | | getSalesLedgerWithProducts({id: row.id}).then(res => { |
| | | form.value = {...res} |
| | | productData.value = form.value.productData |
| | | fileList.value = form.value.salesLedgerFiles |
| | | }) |
| | | } |
| | | dialogFormVisible.value = true |
| | |
| | | proxy.$refs.fileUpload.handleRemove(file) |
| | | } |
| | | } |
| | | // 移除文件 |
| | | function handleRemove (file) { |
| | | console.log('handleRemove', file) |
| | | console.log('operationType.value', operationType.value) |
| | | if (operationType.value === 'edit') { |
| | | let ids = [] |
| | | ids.push(file.id) |
| | | delLedgerFile(ids).then(res => { |
| | | proxy.$modal.msgSuccess("删除成功") |
| | | }) |
| | | } |
| | | } |
| | | // 提交表单 |
| | | const submitForm = () => { |
| | | proxy.$refs["formRef"].validate(valid => { |