diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index b228ae8..f5dd835 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -29,6 +29,7 @@
"sureCancel": "Are you sure to cancel?",
"sureDelete":"Are you sure to delete?",
"Yes": "Yes",
+ "No": "No",
"Success": "Success",
"Failed": "Failed",
diff --git a/public/locales/en/products.json b/public/locales/en/products.json
index 384e1f5..50bda51 100644
--- a/public/locales/en/products.json
+++ b/public/locales/en/products.json
@@ -98,6 +98,7 @@
"CopyFormMsg": {
"Source": "Source ",
"target": "Target ",
+ "withQuote": "Whether to copy the quotation",
"requiredVendor": "Please pick a target vendor",
"requiredTypes": "Please select product types",
"requiredDept": "Please pick a owner department"
diff --git a/public/locales/zh/common.json b/public/locales/zh/common.json
index dd6e73e..5c120b0 100644
--- a/public/locales/zh/common.json
+++ b/public/locales/zh/common.json
@@ -29,6 +29,7 @@
"sureCancel": "确定取消?",
"sureDelete":"确定删除?",
"Yes": "是",
+ "No": "否",
"Success": "成功",
"Failed": "失败",
diff --git a/public/locales/zh/products.json b/public/locales/zh/products.json
index c8b56a4..2c5ae72 100644
--- a/public/locales/zh/products.json
+++ b/public/locales/zh/products.json
@@ -98,6 +98,7 @@
"CopyFormMsg": {
"Source": "源",
"target": "目标",
+ "withQuote": "是否复制报价",
"requiredVendor": "请选择目标供应商",
"requiredTypes": "请选择产品类型",
"requiredDept": "请选择所属小组"
diff --git a/src/views/products/Detail/CopyProducts.jsx b/src/views/products/Detail/CopyProducts.jsx
index 14ba6be..af2ed57 100644
--- a/src/views/products/Detail/CopyProducts.jsx
+++ b/src/views/products/Detail/CopyProducts.jsx
@@ -1,5 +1,5 @@
import { useState, useEffect } from 'react';
-import { App, Form, Modal, DatePicker, Divider } from 'antd';
+import { App, Form, Modal, DatePicker, Divider, Switch } from 'antd';
import { isEmpty, objectMapper } from '@/utils/commons';
import { useTranslation } from 'react-i18next';
@@ -29,7 +29,7 @@ export const CopyProductsForm = ({ action, initialValues, onFormInstanceReady, s
const onValuesChange = (changeValues, allValues) => {};
return (
-
}
-
+
{action === '#' &&
@@ -47,11 +47,15 @@ export const CopyProductsForm = ({ action, initialValues, onFormInstanceReady, s
}
-
+
-
- current <= dayjs([source.sourceYear, 12, 31])} />
+
+
+ {/* disabledDate={(current) => current <= dayjs([source.sourceYear, 12, 31])} */}
+
+
+
);
@@ -69,7 +73,7 @@ const formValuesMapper = (values) => {
'products_types': {
key: 'products_types',
transform: (value) => {
- return Array.isArray(value) ? value.map((ele) => ele.key).join(',') : value ? value.value : '';
+ return Array.isArray(value) ? value.map((ele) => ele.key).join(',') : value ? value.value : '-1';
},
},
'dept': {
@@ -78,6 +82,7 @@ const formValuesMapper = (values) => {
return Array.isArray(value) ? value.map((ele) => ele.key).join(',') : value ? value.value : '';
},
},
+ 'with_quote': { key: 'with_quote', transform: (value) => (value ? 1 : 0) },
};
let dest = {};
const { agency, year, ...omittedValue } = values;
diff --git a/src/views/products/Manage.jsx b/src/views/products/Manage.jsx
index 71d4466..4b2f2b6 100644
--- a/src/views/products/Manage.jsx
+++ b/src/views/products/Manage.jsx
@@ -10,6 +10,8 @@ import { useProductsTypes, useProductsAuditStatesMapVal } from '@/hooks/useProdu
import useFormStore from '@/stores/Form';
import { objectMapper } from '@/utils/commons';
import CopyProductsFormModal from './Detail/CopyProducts';
+import useAuthStore from '@/stores/Auth';
+import RequireAuth from '@/components/RequireAuth';
dayjs.extend(arraySupport);
@@ -63,11 +65,15 @@ function Index() {
{ title: t('products:Vendor'), key: 'vendor', dataIndex: 'travel_agency_name' },
{ title: t('products:CreatedBy'), key: 'poster_by', dataIndex: 'poster_name' },
{ title: t('products:CreateDate'), key: 'poster_date', dataIndex: 'poster_date' },
- { title: t('products:AuState'), key: 'audit_state', dataIndex: 'audit_state',
+ {
+ title: t('products:AuState'),
+ key: 'audit_state',
+ dataIndex: 'audit_state',
render: (_, r) => {
const stateCls = ` text-${stateMapVal[`${r.audit_state_id}`]?.color} `;
return {stateMapVal[`${r.audit_state_id}`]?.label};
- }, },
+ },
+ },
{ title: t('products:AuditedBy'), key: 'audited_by', dataIndex: 'audited_by_name' },
{ title: t('products:AuditDate'), key: 'audit_date', dataIndex: 'audit_date' },
{
@@ -76,9 +82,15 @@ function Index() {
render: (_, r) => (
{t('Edit')}
- {t('Audit')}
-
-
+ {r.audit_state_id >= 0 ? (
+ {t('Audit')}
+ ) : (
+ {t('Audit')}
+ )}
+
+ {/* */}
),
},
@@ -109,6 +121,7 @@ function Index() {
{/* 复制弹窗 */}