diff --git a/src/api/finance/purchasingrequisition.ts b/src/api/finance/purchasingrequisition.ts
index 7847f71..4d75a2b 100644
--- a/src/api/finance/purchasingrequisition.ts
+++ b/src/api/finance/purchasingrequisition.ts
@@ -112,3 +112,15 @@ export function getApplyFiles(purchaseId: string | number) {
});
}
+/**
+ * 履约验收关联的合同列表(未被使用的合同)
+ * @param params 可选参数,如 id 等
+ */
+export function getContracts(params?: any) {
+ return request({
+ url: '/purchase/purchasingapply/getContracts',
+ method: 'get',
+ params
+ });
+}
+
diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue
index c5ec903..09ff0e4 100644
--- a/src/components/Upload/index.vue
+++ b/src/components/Upload/index.vue
@@ -356,23 +356,23 @@ function handleUploadSuccess(res: any, file: any) {
}
}
-// 上传结束处理
+// 上传结束处理:传出完整 fileList(含 name),便于父组件回显文件名
const uploadedSuccessfully = () => {
if (number.value > 0 && uploadList.value.length === number.value) {
fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value);
uploadList.value = [];
number.value = 0;
- emit('update:modelValue', listToString(fileList.value));
+ emit('update:modelValue', fileList.value);
emit('change', listToString(fileList.value), fileList.value);
}
};
-const handleRemove = (file: { name?: string }) => {
- if (file.name) {
- fileList.value = fileList.value.filter((f) => f.name !== file.name);
- emit('update:modelValue', listToString(fileList.value));
- emit('change', listToString(fileList.value), fileList.value);
- }
+const handleRemove = (file: { name?: string; id?: string; url?: string }) => {
+ fileList.value = fileList.value.filter(
+ (f) => !(f.id && f.id === file.id) && !(f.name && f.name === file.name)
+ );
+ emit('update:modelValue', fileList.value.length ? fileList.value : '');
+ emit('change', listToString(fileList.value), fileList.value);
};
const handlePreview = (file: any) => {
diff --git a/src/views/finance/purchasingrequisition/accept/AcceptCommonForm.vue b/src/views/finance/purchasingrequisition/accept/AcceptCommonForm.vue
index 28d15e4..d07ca83 100644
--- a/src/views/finance/purchasingrequisition/accept/AcceptCommonForm.vue
+++ b/src/views/finance/purchasingrequisition/accept/AcceptCommonForm.vue
@@ -21,7 +21,22 @@
-
+
+
+
@@ -62,13 +77,16 @@
-
+
diff --git a/src/views/finance/purchasingrequisition/index.vue b/src/views/finance/purchasingrequisition/index.vue
index 93644d4..e78a595 100644
--- a/src/views/finance/purchasingrequisition/index.vue
+++ b/src/views/finance/purchasingrequisition/index.vue
@@ -193,38 +193,21 @@
-
-
+
-
- 查看
-
-
- 编辑
-
-
- 删除
-
-
- 履约验收
-
+
+
+ 查看
+
+
handleMoreCommand(command, scope.row)"
+ />
+
@@ -241,28 +224,7 @@
-
-
-
-
-
-
-
-
+