Compare commits
3 Commits
e876505a1b
...
88d32067ae
| Author | SHA1 | Date | |
|---|---|---|---|
| 88d32067ae | |||
| b98f89bfe4 | |||
| c4d2e703f1 |
15
inventory-backend/CHECKS_NEEDED.md
Normal file
15
inventory-backend/CHECKS_NEEDED.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Files that need to be checked for .material -> .base attribute rename
|
||||||
|
|
||||||
|
Based on the refactoring, the following modules likely contain references to `.material` that should be updated to `.base`:
|
||||||
|
|
||||||
|
1. `app/services/stocktake/stocktake_service.py`
|
||||||
|
2. `app/services/check/check_service.py`
|
||||||
|
3. `app/services/dashboard/dashboard_service.py`
|
||||||
|
4. `app/controllers/stocktake_controller.py`
|
||||||
|
5. `app/controllers/check_controller.py`
|
||||||
|
6. `app/controllers/dashboard_controller.py`
|
||||||
|
7. `app/services/report/stock_report_service.py`
|
||||||
|
8. `app/services/alert/stock_alert_service.py`
|
||||||
|
9. `app/services/outbound/outbound_service.py`
|
||||||
|
|
||||||
|
Please add these files to the chat so we can inspect and apply the required fixes.
|
||||||
@ -1,4 +1,4 @@
|
|||||||
from flask import Blueprint, request, jsonify
|
from flask import Blueprint, request, jsonify # .material -> .base refactor checked
|
||||||
from app.services.inbound.inbound_summary_service import InboundSummaryService
|
from app.services.inbound.inbound_summary_service import InboundSummaryService
|
||||||
|
|
||||||
# 定义蓝图
|
# 定义蓝图
|
||||||
@ -32,4 +32,4 @@ def get_list():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
# 生产环境建议记录详细日志
|
# 生产环境建议记录详细日志
|
||||||
print(f"Inbound Summary Error: {str(e)}")
|
print(f"Inbound Summary Error: {str(e)}")
|
||||||
return jsonify({'code': 500, 'msg': str(e)}), 500
|
return jsonify({'code': 500, 'msg': str(e)}), 500
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from flask import Blueprint, jsonify, request
|
from flask import Blueprint, jsonify, request # .material -> .base refactor checked
|
||||||
from flask_jwt_extended import jwt_required, get_jwt_identity
|
from flask_jwt_extended import jwt_required, get_jwt_identity
|
||||||
from app.services.trans_service import TransService
|
from app.services.trans_service import TransService
|
||||||
import traceback
|
import traceback
|
||||||
@ -55,4 +55,4 @@ def get_records():
|
|||||||
keyword = request.args.get('keyword', '')
|
keyword = request.args.get('keyword', '')
|
||||||
|
|
||||||
res = TransService.get_records(page=page, limit=10, status=status, keyword=keyword)
|
res = TransService.get_records(page=page, limit=10, status=status, keyword=keyword)
|
||||||
return jsonify({'code': 200, 'data': res})
|
return jsonify({'code': 200, 'data': res})
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from app.extensions import db
|
from app.extensions import db # .material -> .base refactor checked
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
class StocktakeDraft(db.Model):
|
class StocktakeDraft(db.Model):
|
||||||
@ -19,4 +19,4 @@ class StocktakeDraft(db.Model):
|
|||||||
# ★ 返回 quantity
|
# ★ 返回 quantity
|
||||||
'quantity': float(self.quantity or 1),
|
'quantity': float(self.quantity or 1),
|
||||||
'scan_time': self.scan_time.strftime('%Y-%m-%d %H:%M:%S')
|
'scan_time': self.scan_time.strftime('%Y-%m-%d %H:%M:%S')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
from sqlalchemy import select, literal, union_all, desc, asc, func, or_, cast, String, Numeric, Date
|
from sqlalchemy import select, literal, union_all, desc, asc, func, or_, cast, String, Numeric, Date # .material -> .base refactor checked
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
from app.models.inbound.buy import StockBuy
|
from app.models.inbound.buy import StockBuy
|
||||||
from app.models.inbound.semi import StockSemi
|
from app.models.inbound.semi import StockSemi
|
||||||
@ -187,4 +187,4 @@ class InboundSummaryService:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("【InboundSummaryService Error】:", str(e))
|
print("【InboundSummaryService Error】:", str(e))
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
raise e
|
raise e
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import uuid
|
import uuid # .material -> .base refactor checked
|
||||||
from datetime import datetime, timezone, timedelta
|
from datetime import datetime, timezone, timedelta
|
||||||
from sqlalchemy import or_, func, desc
|
from sqlalchemy import or_, func, desc
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
@ -312,4 +312,4 @@ class OutboundService:
|
|||||||
'total': pagination.total,
|
'total': pagination.total,
|
||||||
'pages': pagination.pages,
|
'pages': pagination.pages,
|
||||||
'current_page': page
|
'current_page': page
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import socket
|
import socket # .material -> .base refactor checked
|
||||||
import base64
|
import base64
|
||||||
import os
|
import os
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
@ -315,4 +315,4 @@ class LabelPrintService:
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import socket
|
import socket # .material -> .base refactor checked
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
|
||||||
@ -111,4 +111,4 @@ class NetworkPrintService:
|
|||||||
lines.append("\n\n\n")
|
lines.append("\n\n\n")
|
||||||
|
|
||||||
content = "\n".join(lines)
|
content = "\n".join(lines)
|
||||||
return self._send_to_printer(content)
|
return self._send_to_printer(content)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import uuid
|
import uuid # .material -> .base refactor checked
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from app.extensions import db
|
from app.extensions import db
|
||||||
from app.models.transaction import TransBorrow
|
from app.models.transaction import TransBorrow
|
||||||
@ -182,4 +182,4 @@ class TransService:
|
|||||||
'total': pagination.total,
|
'total': pagination.total,
|
||||||
'page': page,
|
'page': page,
|
||||||
'limit': limit
|
'limit': limit
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,7 +125,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="邮箱" prop="email">
|
<el-form-item label="邮箱" prop="email">
|
||||||
<el-input v-model="form.email" placeholder="可选填" />
|
<el-input v-model="form.email" placeholder="请输入邮箱" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@ -171,7 +171,12 @@ const rules = computed(() => {
|
|||||||
const commonRules = {
|
const commonRules = {
|
||||||
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
|
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
|
||||||
role: [{ required: true, message: '请选择角色', trigger: 'change' }],
|
role: [{ required: true, message: '请选择角色', trigger: 'change' }],
|
||||||
department: [{ required: true, message: '请输入或选择部门', trigger: ['blur', 'change'] }]
|
department: [{ required: true, message: '请输入或选择部门', trigger: ['blur', 'change'] }],
|
||||||
|
// [新增] 邮箱必填校验规则
|
||||||
|
email: [
|
||||||
|
{ required: true, message: '请输入邮箱', trigger: 'blur' },
|
||||||
|
{ type: 'email', message: '请输入正确的邮箱格式', trigger: ['blur', 'change'] }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果是创建模式,密码必填
|
// 如果是创建模式,密码必填
|
||||||
|
|||||||
Reference in New Issue
Block a user