diff --git a/public/formjs/editor.js b/public/formjs/editor.js index 100555c16..0de8a7838 100644 --- a/public/formjs/editor.js +++ b/public/formjs/editor.js @@ -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 = { diff --git a/public/pages/property/payFeeOrder/payFeeOrder.js b/public/pages/property/payFeeOrder/payFeeOrder.js index e64167c91..c983b2726 100755 --- a/public/pages/property/payFeeOrder/payFeeOrder.js +++ b/public/pages/property/payFeeOrder/payFeeOrder.js @@ -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; }