Browse Source

✨ feat(contract): 优化合同续期功能

- 移除合同续期表单中的合同ID手动输入字段
- 修改合同续期表的contract_id字段类型为无符号整数,优化数据存储
yourname 8 months ago
parent
commit
e352acf6a4

+ 1 - 9
src/client/admin/pages/Contracts.tsx

@@ -292,15 +292,7 @@ const Contracts: React.FC = () => {
         width={800}
       >
         <Form form={form} layout="vertical">
-          {!editingKey && (
-            <Form.Item
-              name="id"
-              label="合同ID"
-              rules={[{ required: true, message: '请输入合同ID' }]}
-            >
-              <Input placeholder="请输入合同ID" />
-            </Form.Item>
-          )}
+          
           
           <div className="grid grid-cols-2 gap-4">
             <Form.Item

+ 1 - 1
src/server/modules/contracts/hetong-renew.entity.ts

@@ -7,7 +7,7 @@ export class HetongRenew {
   @PrimaryColumn({ name: 'id', type: 'varchar', length: 50 })
   id!: string;
 
-  @Column({ name: 'contract_id', type: 'varchar', length: 50 })
+  @Column({ name: 'contract_id', type: 'int', unsigned: true })
   @ForeignKey(() => Hetong)
   contractId!: string;