We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.7
因带子表oneline表单不是很灵活,就生成代码改了下试试: // 1. js加强生成不了 2. 子表数据从后台提取后赋值不对,默认直接取的list,应该用list的records属性 xxxxTable.dataSource = [...xxxxDataList.records]; 3. 默认值填值(如从后台取订单号)未实现。
''' /** * 默认填充订单编号 */ async function fillOrderNum() { const orderNumData = await queryShopOrderNum(); formData.orderCode = orderNumData; }
/** * @param event 当订单明细行的实际拿货价和数量变化时计算当前行总价,以及总订单的总价和总数量 */ function rowValueChange(event) { if (event.columnIndex == 4 || event.columnIndex == 5) { // 4和5列为实际价和数量,相乘得到该行的总价 let row = event.row; if (row.factPrice != '' && row.orderNum != '') { row.totalPrice = row.factPrice * row.orderNum; reCaculateTotalPriceAndTotalAmount(); } } } /** * 当删除一行记录时,应该更新订单总金额和数量 */ function removedDet() { reCaculateTotalPriceAndTotalAmount(); } /** * 重新计算整个订单的总数量和总价 */ function reCaculateTotalPriceAndTotalAmount() { // 循环计算订单的总价和总数量 let detTable = bcOrderDetTableRef.value.getXTable().getTableData(); let totalPrice = 0, totalAmount = 0; for (let detRow of detTable.tableData) { totalPrice += detRow.totalPrice; totalAmount += detRow.orderNum; } formData.totalPrice = totalPrice; formData.totalAmount = totalAmount; }
'''
The text was updated successfully, but these errors were encountered:
暂时收录到 #1312
Sorry, something went wrong.
No branches or pull requests
版本号:
3.7
问题描述:
因带子表oneline表单不是很灵活,就生成代码改了下试试:
// 1. js加强生成不了
2. 子表数据从后台提取后赋值不对,默认直接取的list,应该用list的records属性
xxxxTable.dataSource = [...xxxxDataList.records];
3. 默认值填值(如从后台取订单号)未实现。
'''
/**
* 默认填充订单编号
*/
async function fillOrderNum() {
const orderNumData = await queryShopOrderNum();
formData.orderCode = orderNumData;
}
'''
错误截图:
友情提示:
The text was updated successfully, but these errors were encountered: