优化代码

This commit is contained in:
java110 2021-08-22 15:57:41 +08:00
parent 499302a76a
commit 6a71dbd1f0
2 changed files with 16 additions and 10 deletions

View File

@ -14,6 +14,10 @@
"type": "default"
};
window.formEditor = new FormEditor.FormEditor({
container: document.querySelector('#form')
});
let _doSaveDiagram = function (_xml, svg) {
//发送get请求
let _modelId = vc.getParam('modelId');
@ -40,16 +44,18 @@
);
}
initFormJs = function (_context) {
const container = document.querySelector('#form');
FormEditor.createFormEditor({
container,
schema: _context
});
// container.onsubmit = function(){
// console.log();
// }
try {
formEditor.importSchema(_context);
} catch (err) {
console.log('importing form failed', err);
}
};
window._getSchema = function(){
const schema = formEditor.saveSchema();
console.log('exported schema', JSON.stringify(schema));
}
_initFormJs = function () {
let _flowId = vc.getParam('flowId');
// let _param = {

View File

@ -82,8 +82,8 @@
_cycle = vc.component.payFeeOrderInfo.cycles;
}
// 用未格式化的总金额减优惠金额
// let _totalFeePrice = $that.payFeeOrderInfo.totalFeePrice;
let _totalFeePrice = parseFloat(_cycle) * parseFloat($that.payFeeOrderInfo.feePrice);
let _totalFeePrice = $that.payFeeOrderInfo.totalFeePrice;
//let _totalFeePrice = parseFloat(_cycle) * parseFloat($that.payFeeOrderInfo.feePrice);
if (_totalFeePrice < 0) {
return;
}