浏览代码

修复合同模板 开头甲方乙方名称位置

mengqiankang 2 月之前
父节点
当前提交
c7336ce9c3
共有 1 个文件被更改,包括 9 次插入5 次删除
  1. 9 5
      common/esigntool/main.py

+ 9 - 5
common/esigntool/main.py

@@ -84,7 +84,11 @@ def fill_in_template(name):
             {
                 "componentKey": "date",
                 "componentValue": datetime.now().strftime("%Y年%m月%d日")
-            }
+            },
+            {
+                "componentKey": "one_name",
+                "componentValue": name
+            },
         ]
     }
     json_headers = buildSignJsonHeader(config.appId, config.scert, method, api_path, body=body)
@@ -150,8 +154,8 @@ def create_by_file(file_id, file_name,  contact_phone, merchant_name):
                             "signFieldStyle": 1,
                             "signFieldPosition": {
                                 "positionPage": "7",
-                                "positionX": 114,  # 获取需要盖章的位置: https://open.esign.cn/tools/seal-position
-                                "positionY": 666
+                                "positionX": 294, # 获取需要盖章的位置: https://open.esign.cn/tools/seal-position
+                                "positionY": 668
                             }
                         }
                     }
@@ -177,8 +181,8 @@ def create_by_file(file_id, file_name,  contact_phone, merchant_name):
                             "signFieldStyle": 1,
                             "signFieldPosition": {
                                 "positionPage": "7",
-                                "positionX": 294,
-                                "positionY": 668
+                                "positionX": 114,  # 获取需要盖章的位置: https://open.esign.cn/tools/seal-position
+                                "positionY": 666
                             }
                         }
                     }