Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,8 @@ def init_sheets():
|
|
41 |
['6', 'investor888', '观察员'],
|
42 |
['7', 'cevcaigou888', '采购经理'],
|
43 |
['8', 'cevcaigou005', '采购'],
|
44 |
-
['9', 'cevchuna001', '出纳']
|
|
|
45 |
]
|
46 |
for user in new_users:
|
47 |
users.append_row(user)
|
@@ -147,6 +148,8 @@ def submit_order1(
|
|
147 |
prefix = 'CHEN00000'
|
148 |
elif session_state['username'] == 'cevcaigou359':
|
149 |
prefix = 'ZHUANG00000'
|
|
|
|
|
150 |
|
151 |
all_records = orders.get_all_records()
|
152 |
existing_records = [record for record in all_records if record['采购编号'].startswith(prefix)]
|
@@ -201,6 +204,8 @@ def submit_order2(
|
|
201 |
prefix = 'CHEN00000'
|
202 |
elif session_state['username'] == 'cevcaigou359':
|
203 |
prefix = 'ZHUANG00000'
|
|
|
|
|
204 |
|
205 |
|
206 |
|
|
|
41 |
['6', 'investor888', '观察员'],
|
42 |
['7', 'cevcaigou888', '采购经理'],
|
43 |
['8', 'cevcaigou005', '采购'],
|
44 |
+
['9', 'cevchuna001', '出纳'],
|
45 |
+
['10', 'cevcaigou288', '采购']# Added new user
|
46 |
]
|
47 |
for user in new_users:
|
48 |
users.append_row(user)
|
|
|
148 |
prefix = 'CHEN00000'
|
149 |
elif session_state['username'] == 'cevcaigou359':
|
150 |
prefix = 'ZHUANG00000'
|
151 |
+
elif session_state['username'] == 'cevcaigou288':
|
152 |
+
prefix = 'GU00000'
|
153 |
|
154 |
all_records = orders.get_all_records()
|
155 |
existing_records = [record for record in all_records if record['采购编号'].startswith(prefix)]
|
|
|
204 |
prefix = 'CHEN00000'
|
205 |
elif session_state['username'] == 'cevcaigou359':
|
206 |
prefix = 'ZHUANG00000'
|
207 |
+
elif session_state['username'] == 'cevcaigou288':
|
208 |
+
prefix = 'GU00000'
|
209 |
|
210 |
|
211 |
|