Test #1
@@ -133,14 +133,6 @@ node tests/verify-prototype-modules.cjs
|
||||
|
||||
精确页面 ID 清单以 `prototype-src/manifest.json` 为准,避免在本文件重复 169 个 ID 后产生双份维护。
|
||||
|
||||
### 四期原型边界
|
||||
|
||||
- 四期已确认范围与页面级索引先读 `../../四期/README.md`;本原型中的完整菜单不自动等于四期开发范围。
|
||||
- 四期命中 `03-overseas-warehouse.html` 时只进入尾程订单、入库单、换标单、托盘、箱号、产品和库存相关页面;明确跳过 `overseas-outbound`、`fba-outbound-order`、`fba-outbound-order-detail`、`fba-return-outbound`。
|
||||
- `04-overseas-delivery.html` 的海外派送和库存离仓履约不属于四期;不得因尾程订单已纳入就把该模块一并纳入。
|
||||
- 四期海外业务读取 `07-overseas-business.html` 的海外采购、本土卡车和本土散板页面;通用资料只按任务读取 `gen-partner-warehouse`、`gen-overseas-quote`、`gen-exchange-rate`、`vehicle`、`vehicle-detail`,车队报价明确涉及时再读 `delivery-fleet-quote`。
|
||||
- 柜子确认国内出仓后的现有 `CarrierScheduleQuery` 和船节点定时查询整体归四期,当前没有独立原型页面;界面任务按 `../../四期/README.md` 从订舱、船期或货柜详情定位,不得借用 `04-overseas-delivery.html` 作为实现入口。
|
||||
|
||||
## 共享文件快速索引
|
||||
|
||||
| 文件 | 内容 | 何时读取 |
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
每条 `arapData` 记录增加 `amount` 字段。金额为必填数字,不得小于 0,最多保留两位小数。当前原型未定义每条费用的币种,本次不新增币种字段,也不擅自添加人民币或美元符号。
|
||||
|
||||
新增和编辑共用弹框增加“金额 *”输入框:
|
||||
新增和编辑共用弹框在“费用类型”之后增加“金额 *”输入框:
|
||||
|
||||
- 新增时为空,由用户填写。
|
||||
- 编辑时回填当前记录金额。
|
||||
@@ -31,8 +31,9 @@
|
||||
## 展示范围
|
||||
|
||||
- 列表在“费用类型”之后增加“金额”列。
|
||||
- 详情页“单据信息”增加“金额”。
|
||||
- 审核弹框摘要增加“金额”,使审核人能够在通过或驳回前核对。
|
||||
- 详情页“单据信息”在“费用类型”之后增加“金额”。
|
||||
- 审核弹框摘要在“费用类型”之后增加“金额”,使审核人能够在通过或驳回前核对。
|
||||
- 所有新增、编辑和展示位置均保持“费用类型 -> 金额”的字段顺序。
|
||||
- 空态表格的 `colspan` 与新增列数保持一致。
|
||||
|
||||
## 审核状态
|
||||
|
||||
@@ -16348,48 +16348,6 @@ function saveCustomerDeduction(){
|
||||
if(currentCustomerAccountId===id&&document.getElementById('page-customer-account-detail').classList.contains('active'))renderCustomerAccountDetail();
|
||||
showToast('扣款成功,账户余额已更新','success');
|
||||
}
|
||||
function validateCustomerDeduction(account,amount){
|
||||
if(!account||account.status!=='正常')return '当前账户状态不允许扣款';
|
||||
if(!Number.isFinite(amount)||amount<=0)return '请输入大于0的扣款金额';
|
||||
var available=Number((account.balance-account.frozen).toFixed(2));
|
||||
if(amount>available)return '扣款金额不能超过可用余额';
|
||||
return '';
|
||||
}
|
||||
function applyCustomerDeduction(account,transactions,values){
|
||||
account.balance=Number((account.balance-values.amount).toFixed(2));
|
||||
account.lastChange=values.time;
|
||||
var transaction={no:values.no,time:values.time,type:values.type,order:values.order||'',income:0,expense:values.amount,balance:account.balance,operator:'当前用户',remark:values.remark||'手动扣款'};
|
||||
transactions.unshift(transaction);
|
||||
return transaction;
|
||||
}
|
||||
function showCustomerDeduction(id){
|
||||
var d=customerAccountData.find(function(x){return x.id===id;});
|
||||
if(!d)return;
|
||||
if(d.status!=='正常'){showToast('当前账户状态不允许扣款','error');return;}
|
||||
document.getElementById('ca-deduction-id').value=id;
|
||||
document.getElementById('ca-deduction-customer').value=d.name;
|
||||
document.getElementById('ca-deduction-current').value=caMoney(d.balance);
|
||||
document.getElementById('ca-deduction-available').value=caMoney(d.balance-d.frozen);
|
||||
document.getElementById('ca-deduction-amount').value='';
|
||||
document.getElementById('ca-deduction-type').value='贴牌';
|
||||
document.getElementById('ca-deduction-date').value=caToday();
|
||||
document.getElementById('ca-deduction-order').value='';
|
||||
document.getElementById('ca-deduction-remark').value='';
|
||||
showModal('modal-customer-deduction');
|
||||
}
|
||||
function saveCustomerDeduction(){
|
||||
var id=document.getElementById('ca-deduction-id').value,d=customerAccountData.find(function(x){return x.id===id;}),amount=parseFloat(document.getElementById('ca-deduction-amount').value),type=document.getElementById('ca-deduction-type').value,date=document.getElementById('ca-deduction-date').value,order=document.getElementById('ca-deduction-order').value.trim(),remark=document.getElementById('ca-deduction-remark').value.trim();
|
||||
var error=validateCustomerDeduction(d,amount);
|
||||
if(error){showToast(error,'error');return;}
|
||||
if(!date){showToast('请选择扣款日期','error');return;}
|
||||
var time=date+' '+new Date().toTimeString().slice(0,5),seq=String(Date.now()).slice(-8);
|
||||
if(!customerAccountTransactions[id])customerAccountTransactions[id]=[];
|
||||
applyCustomerDeduction(d,customerAccountTransactions[id],{amount:amount,type:type,time:time,no:'AC'+date.replace(/-/g,'')+seq,order:order,remark:remark});
|
||||
hideModal('modal-customer-deduction');
|
||||
renderCustomerAccounts();
|
||||
if(currentCustomerAccountId===id&&document.getElementById('page-customer-account-detail').classList.contains('active'))renderCustomerAccountDetail();
|
||||
showToast('扣款成功,账户余额已更新','success');
|
||||
}
|
||||
|
||||
function renderCashflow(){renderTable('tbody-cashflow',cashflowData,['no','type','party','amt','cur','balance','date','remark'],(d,c)=>{
|
||||
if(c==='type')return `<span class="tag ${d.type==='收款'?'tag-green':'tag-red'}">${d.type}</span>`;
|
||||
@@ -18548,12 +18506,6 @@ function ctClearance(no){
|
||||
if(!d){showToast('未找到该货柜','warning');return;}
|
||||
showToast('货柜 '+no+' 已发起清关处理','success');
|
||||
}
|
||||
function ctSetFleetRegion(no,val){
|
||||
var d=ctListData.find(function(x){return x.no===no;});
|
||||
if(!d){return;}
|
||||
d.fleetRegion=val;
|
||||
showToast('货柜 '+no+' 车队区域已设为:'+(val||'未选择'),'success');
|
||||
}
|
||||
function ctSetFleet(no,val){
|
||||
var d=ctListData.find(function(x){return x.no===no;});
|
||||
if(!d){return;}
|
||||
|
||||
Vendored
-48
@@ -4252,48 +4252,6 @@ function saveCustomerDeduction(){
|
||||
if(currentCustomerAccountId===id&&document.getElementById('page-customer-account-detail').classList.contains('active'))renderCustomerAccountDetail();
|
||||
showToast('扣款成功,账户余额已更新','success');
|
||||
}
|
||||
function validateCustomerDeduction(account,amount){
|
||||
if(!account||account.status!=='正常')return '当前账户状态不允许扣款';
|
||||
if(!Number.isFinite(amount)||amount<=0)return '请输入大于0的扣款金额';
|
||||
var available=Number((account.balance-account.frozen).toFixed(2));
|
||||
if(amount>available)return '扣款金额不能超过可用余额';
|
||||
return '';
|
||||
}
|
||||
function applyCustomerDeduction(account,transactions,values){
|
||||
account.balance=Number((account.balance-values.amount).toFixed(2));
|
||||
account.lastChange=values.time;
|
||||
var transaction={no:values.no,time:values.time,type:values.type,order:values.order||'',income:0,expense:values.amount,balance:account.balance,operator:'当前用户',remark:values.remark||'手动扣款'};
|
||||
transactions.unshift(transaction);
|
||||
return transaction;
|
||||
}
|
||||
function showCustomerDeduction(id){
|
||||
var d=customerAccountData.find(function(x){return x.id===id;});
|
||||
if(!d)return;
|
||||
if(d.status!=='正常'){showToast('当前账户状态不允许扣款','error');return;}
|
||||
document.getElementById('ca-deduction-id').value=id;
|
||||
document.getElementById('ca-deduction-customer').value=d.name;
|
||||
document.getElementById('ca-deduction-current').value=caMoney(d.balance);
|
||||
document.getElementById('ca-deduction-available').value=caMoney(d.balance-d.frozen);
|
||||
document.getElementById('ca-deduction-amount').value='';
|
||||
document.getElementById('ca-deduction-type').value='贴牌';
|
||||
document.getElementById('ca-deduction-date').value=caToday();
|
||||
document.getElementById('ca-deduction-order').value='';
|
||||
document.getElementById('ca-deduction-remark').value='';
|
||||
showModal('modal-customer-deduction');
|
||||
}
|
||||
function saveCustomerDeduction(){
|
||||
var id=document.getElementById('ca-deduction-id').value,d=customerAccountData.find(function(x){return x.id===id;}),amount=parseFloat(document.getElementById('ca-deduction-amount').value),type=document.getElementById('ca-deduction-type').value,date=document.getElementById('ca-deduction-date').value,order=document.getElementById('ca-deduction-order').value.trim(),remark=document.getElementById('ca-deduction-remark').value.trim();
|
||||
var error=validateCustomerDeduction(d,amount);
|
||||
if(error){showToast(error,'error');return;}
|
||||
if(!date){showToast('请选择扣款日期','error');return;}
|
||||
var time=date+' '+new Date().toTimeString().slice(0,5),seq=String(Date.now()).slice(-8);
|
||||
if(!customerAccountTransactions[id])customerAccountTransactions[id]=[];
|
||||
applyCustomerDeduction(d,customerAccountTransactions[id],{amount:amount,type:type,time:time,no:'AC'+date.replace(/-/g,'')+seq,order:order,remark:remark});
|
||||
hideModal('modal-customer-deduction');
|
||||
renderCustomerAccounts();
|
||||
if(currentCustomerAccountId===id&&document.getElementById('page-customer-account-detail').classList.contains('active'))renderCustomerAccountDetail();
|
||||
showToast('扣款成功,账户余额已更新','success');
|
||||
}
|
||||
|
||||
function renderCashflow(){renderTable('tbody-cashflow',cashflowData,['no','type','party','amt','cur','balance','date','remark'],(d,c)=>{
|
||||
if(c==='type')return `<span class="tag ${d.type==='收款'?'tag-green':'tag-red'}">${d.type}</span>`;
|
||||
@@ -6452,12 +6410,6 @@ function ctClearance(no){
|
||||
if(!d){showToast('未找到该货柜','warning');return;}
|
||||
showToast('货柜 '+no+' 已发起清关处理','success');
|
||||
}
|
||||
function ctSetFleetRegion(no,val){
|
||||
var d=ctListData.find(function(x){return x.no===no;});
|
||||
if(!d){return;}
|
||||
d.fleetRegion=val;
|
||||
showToast('货柜 '+no+' 车队区域已设为:'+(val||'未选择'),'success');
|
||||
}
|
||||
function ctSetFleet(no,val){
|
||||
var d=ctListData.find(function(x){return x.no===no;});
|
||||
if(!d){return;}
|
||||
|
||||
Reference in New Issue
Block a user