v2.8.5, 加入查看详情功能

This commit is contained in:
2026-07-29 12:57:27 +08:00
parent e08a17ffa0
commit b41779c051
3 changed files with 5 additions and 5 deletions

View File

@@ -138,7 +138,7 @@ function handleAIResult(aiResult, roomId, username, originalText, attachments) {
}
const id = uuidv4();
const paymentMethod = aiResult.payment_method || (aiResult.method === '淘宝' ? '支付宝' : (aiResult.method || '未指定'));
const paymentMethod = aiResult.payment_method || '未指定';
const invoiceType = aiResult.invoice_type || '无票';
const status = aiResult.status || '待付款';
const applicant = aiResult.applicant || username;
@@ -147,7 +147,7 @@ function handleAIResult(aiResult, roomId, username, originalText, attachments) {
id, roomId, item, quantity, unitPrice, amount, freight, paymentMethod, invoiceType, status, applicant, remarks, createdTime
);
db.prepare('INSERT INTO purchase_history (purchase_id, action, user, timestamp) VALUES (?,?,?,?)').run(id, '创建采购:' + item + ',数量' + quantity + ',金额¥' + amount + ',状态' + status, '小财', now);
replyText = '✅ 已记录采购:' + item + ',数量 ' + quantity + ',金额 ¥' + amount + ',状态 ' + status;
replyText = '✅ 已记录采购:' + item + ',数量 ' + quantity + ',金额 ¥' + amount + ',状态 ' + status + ' <a href="#" onclick="openDetail(\'' + id + '\')">查看详情</a>';
purchase = { id };
if (attachments?.length) {