| | |
| | | <el-table-column |
| | | fixed="right" |
| | | label="操作" |
| | | min-width="150" |
| | | min-width="200" |
| | | align="center" |
| | | > |
| | | <template #default="scope"> |
| | |
| | | type="primary" |
| | | size="small" |
| | | @click="openForm('edit', scope.row)" |
| | | :disabled="scope.row.recorderName !== userStore.nickName" |
| | | >编辑</el-button |
| | | :disabled="scope.row.recorderName !== userStore.nickName" |
| | | > |
| | | 编辑 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="primary" |
| | | size="small" |
| | | @click="openAttachmentDialog(scope.row)" |
| | | > |
| | | 附件 |
| | | </el-button> |
| | | <el-button |
| | | link |
| | | type="success" |
| | | size="small" |
| | | @click="showQRCode(scope.row)" |
| | | >生成二维码</el-button |
| | | > |
| | | |
| | | 生成二维码 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <FileList ref="fileListRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } from "@/api/procurementManagement/procurementLedger.js"; |
| | | import useFormData from "@/hooks/useFormData.js"; |
| | | import QRCode from "qrcode"; |
| | | import FileList from "@/views/salesManagement/salesLedger/fileList.vue"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const tableData = ref([]); |
| | | const productData = ref([]); |
| | |
| | | }); |
| | | const total = ref(0); |
| | | const fileList = ref([]); |
| | | const fileListRef = ref(null); |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { modelList, productTreeList } from "@/api/basicData/product.js"; |
| | | import dayjs from "dayjs"; |
| | |
| | | }); |
| | | } |
| | | }; |
| | | |
| | | // 打开附件列表对话框 |
| | | const openAttachmentDialog = (row) => { |
| | | if (!row?.id) { |
| | | proxy.$modal.msgWarning("无法获取该行数据的ID"); |
| | | return; |
| | | } |
| | | getPurchaseById({ id: row.id, type: 2 }).then((res) => { |
| | | const files = res.salesLedgerFiles || []; |
| | | if (!files.length) { |
| | | proxy.$modal.msgWarning("暂无附件"); |
| | | return; |
| | | } |
| | | if (fileListRef.value && typeof fileListRef.value.open === "function") { |
| | | fileListRef.value.open(files); |
| | | } |
| | | }); |
| | | }; |
| | | // 关闭产品弹框 |
| | | const closeProductDia = () => { |
| | | proxy.resetForm("productFormRef"); |