How to use B.settle method in Appium Base Driver

Best JavaScript code snippet using appium-base-driver

SettleBillService.js

Source:SettleBillService.js Github

copy

Full Screen

1/**2 *3 */4import * as HTTP from './httpUtil';5const apiDomain = require('./ApiConst').apiSettleDomain;6/**7 *8 * @param {*} paramObj9 * @param {*} callback10 */11function settleReceivableAdd(paramObj, callback) {12 const url = `${apiDomain}/settle/receivable/add`;13 HTTP.post(url, paramObj, (success, error) => {14 callback(success, error);15 });16}17/**18 * 编辑应收账单19 * @param {*} paramObj20 * @param {*} callback21 */22function settleReceivableEdit(code, paramObj, callback) {23 const url = `${apiDomain}/settle/receivable/${code}/edit`;24 HTTP.post(url, paramObj, (success, error) => {25 callback(success, error);26 });27}28/**29 * 应收账单审核记录列表30 * @param {*} data31 * @param {*} callback32 */33function settleReceivableApproveList(data, callback) {34 const url = `${apiDomain}/settle/receivable/approve/list`;35 HTTP.get(url, data, callback);36}37/**38 * 应收账单详情39 * @param {*} code40 * @param {*} callback41 */42function settleReceivableGet(code, callback) {43 const url = `${apiDomain}/settle/receivable/${code}/get`;44 HTTP.get(url, {}, (success, error) => {45 callback(success, error);46 });47}48/**49 * 获取未选运单50 * @param {*} clientOrgName51 * @param {*} filter52 * @param {*} pagination53 * @param {*} callback54 */55function settleReceivableSelectReceivableWaybillList(params, callback) {56 const url = `${apiDomain}/settle/receivable/select_receivable_waybill/list`;57 HTTP.get(url, params, (success, error) => {58 callback(success, error);59 });60}61/**62 * 获取已选运单63 * @param {*} clientOrgName64 * @param {*} filter65 * @param {*} pagination66 * @param {*} callback67 */68function settleReceivableSelectSelectedWaybillList(params, callback) {69 const url = `${apiDomain}/settle/receivable/select_selected_waybill/list`;70 HTTP.get(url, params, callback);71}72/**73 * 将所选添加到已选运单74 * @param {*} data75 * @param {*} callback76 */77function settleReceivableSelectWaybill(data, callback) {78 const url = `${apiDomain}/settle/receivable/select_waybill`;79 HTTP.post(url, data, callback);80}81function settleReceivableSelectContractWaybillList(params, callback) {82 const url = `${apiDomain}/settle/receivable/select_contrast_waybill/list`;83 HTTP.get(url, params, callback);84}85/**86 * 将所选已选运单到未选87 * @param {*} data88 * @param {*} callback89 */90function settleReceivableWaybillRemove(params, callback) {91 const url = `${apiDomain}/settle/receivable/waybill/remove`;92 HTTP.post(url, params, callback);93}94/**95 * 将所有已选运单到未选96 * @param {Function} callback97 */98function settleReceivableClearSelectedWaybill(params, callback) {99 const url = `${apiDomain}/settle/receivable/clear_selected_waybill`;100 HTTP.post(url, params, callback);101}102/**103 * 获取客户对账列表104 * @param params105 * @param callback106 */107function settleReceivableSelectClientList(params, callback) {108 const url = `${apiDomain}/settle/receivable/select_client/list`;109 HTTP.get(url, params, (success, error) => {110 callback(success, error);111 });112}113/**114 *115 * @param {*} callback116 */117function settleReceivableWaybillColumns(callback) {118 const url = `${apiDomain}/list_render_info/settleReceivableWaybill/list`;119 HTTP.get(url, {}, (success) => {120 callback(success);121 });122}123/**124 *125 * @param {*} callback126 */127function settleReceivableWaybillSearch(callback) {128 const url = `${apiDomain}/search_render_info/settleReceivableWaybill/list`;129 HTTP.get(url, {}, (success) => {130 callback(success);131 });132}133/**134 *135 * @param {*} callback136 */137function settleReceivableSelectedWaybillColumns(callback) {138 const url = `${apiDomain}/list_render_info/settleReceivableSelWaybill/list`;139 HTTP.get(url, {}, (success) => {140 callback(success);141 });142}143/**144 *145 * @param {*} callback146 */147function settleReceivableSelectedWaybillSearch(callback) {148 const url = `${apiDomain}/search_render_info/settleReceivableSelWaybill/list`;149 HTTP.get(url, {}, (success) => {150 callback(success);151 });152}153/**154 * 应收账单统计信息155 * @param {*} clientOrgName156 * @param {*} callback157 */158function settleReceivableStatisticalBill(data, callback) {159 const url = `${apiDomain}/settle/receivable/statistical_bill`;160 HTTP.get(url, data, callback);161}162/**163 *164 * @param {*} callback165 */166function settleActualReceiptColumns(callback) {167 const url = `${apiDomain}/list_render_info/settleActualReceipt/list`;168 HTTP.get(url, {}, callback);169}170/**171 * 调整每单定额172 * @param {*} data173 * @param {*} callback174 */175function settleReceivableWaybillAdjustQuota(data, callback) {176 const url = `${apiDomain}/settle/receivable/waybill/adjust_quota`;177 HTTP.post(url, data, callback);178}179/**180 * 调整每单比例181 * @param {*} data182 * @param {*} callback183 */184function settleReceivableWaybillAdjustRatio(data, callback) {185 const url = `${apiDomain}/settle/receivable/waybill/adjust_proportion`;186 HTTP.post(url, data, callback);187}188/**189 * 调整结算方式190 * @param {*} data191 * @param {*} callback192 */193function settleReceivableWaybillAdjustSettleMethod(data, callback) {194 const url = `${apiDomain}/settle/receivable/waybill/adjust_settle_method`;195 HTTP.post(url, data, callback);196}197/**198 * 调整客户税率199 * @param {*} data200 * @param {*} callback201 */202function settleReceivableWaybillAdjustTaxRates(data, callback) {203 const url = `${apiDomain}/settle/receivable/waybill/adjust_tax_rate`;204 HTTP.post(url, data, callback);205}206/**207 * 调整运价税型208 * @param {*} data209 * @param {*} callback210 */211function settleReceivableWaybillAdjustTaxType(data, callback) {212 const url = `${apiDomain}/settle/receivable/waybill/adjust_tax_type`;213 HTTP.post(url, data, callback);214}215function settleReceivableWaybillEditDescription(params, callback) {216 const url = `${apiDomain}/settle/receivable/waybill/${params.code}/edit_description`;217 HTTP.post(url, { description: params.description, clientOrgName: params.clientOrgName, billCode: params.billCode }, callback);218}219/**220 * 删除过期临时表221 * @param {*} data222 * @param {*} callback223 */224function settleReceivableTempTableDelete(data, callback) {225 const url = `${apiDomain}/settle/receivable/temp_table/delete`;226 HTTP.post(url, data, callback);227}228/**229 * 导出收款记录230 * @param paramObj231 * @param callback232 */233function settleReceivableActualReceiptLogExportCsv(paramObj, callback) {234 const apiUrl = `${apiDomain}/export/settleActualReceipt`;235 HTTP.get(apiUrl, paramObj, (success, error) => {236 callback(success, error);237 });238}239/**240 * 下载错误数据的CSV文件241 */242function settleReceivableActualReceiptLogDownloadErrorData(paramObj, callback) {243 const apiUrl = `${apiDomain}/generator/settleActualReceipt`;244 HTTP.post(apiUrl, paramObj, (success, error) => {245 callback(success, error);246 });247}248/**249 * 下载CSV模板250 */251function settleReceivableActualReceiptLogDownloadTemplate(paramObj, callback) {252 const apiUrl = `${apiDomain}/download/template/settleActualReceipt`;253 HTTP.get(apiUrl, paramObj, (success, error) => {254 callback(success, error);255 });256}257/**258 * 获取列表渲染配置259 * @param callback260 */261function settleReceivableActualReceiptLogListColumn(callback) {262 const apiUrl = `${apiDomain}/list_render_info/settleActualReceipt/list`;263 HTTP.get(apiUrl, {}, (res, err) => {264 callback(res, err);265 });266}267/**268 * 获取检索条件渲染配置269 * @param callback270 */271function settleReceivableActualReceiptLogListSearch(callback) {272 const apiUrl = `${apiDomain}/search_render_info/settleActualReceipt/list`;273 HTTP.get(apiUrl, {}, (res, err) => {274 callback(res, err);275 });276}277/**278 * 收款记录列表279 * @param {*} data280 * @param {*} callback281 */282function settleReceivableActualReceiptLogList(data, callback) {283 const url = `${apiDomain}/settle/receivable/actual_receipt_log/list`;284 HTTP.get(url, data, callback);285}286/**287 * 删除收款记录288 * @param code289 * @param callback290 */291function settleReceivableActualReceiptLogDelete(code, callback) {292 const url = `${apiDomain}/settle/receivable/actual_receipt_log/${code}/delete`;293 HTTP.post(url, callback);294}295/**296 * 编辑收款记录297 * @param {*} code298 * @param {*} data299 * @param {*} callback300 */301function settleReceivableActualReceiptLogEdit(code, data, callback) {302 const url = `${apiDomain}/settle/receivable/actual_receipt_log/${code}/edit`;303 HTTP.post(url, data, callback);304}305/**306 * 收款记录详情307 * @param {*} code308 * @param {*} callback309 */310function settleReceivableActualReceiptLogGet(paramObj, callback) {311 const url = `${apiDomain}/settle/receivable/actual_receipt_log/${paramObj.code}/get`;312 HTTP.get(url, {}, callback);313}314/**315 * 复制结算运单到临时表316 * @param {*} billCode317 * @param {*} callback318 */319function settleReceivableTempWaybillCopy(billCode, callback) {320 const url = `${apiDomain}/settle/receivable/${billCode}/temp_waybill/copy`;321 HTTP.post(url, {}, callback);322}323/**324 * 应收账单列表325 * @param params326 * @param callback327 */328function settleReceivableList(params, callback) {329 const url = `${apiDomain}/settle/receivable/list`;330 HTTP.get(url, params, callback);331}332/**333 * 待审核应收账单提交审核334 * @param {*} code335 * @param {*} callback336 */337function settleReceivableApplyApprove(code, callback) {338 const url = `${apiDomain}/settle/receivable/${code}/apply_approve`;339 HTTP.post(url, {}, callback);340}341/**342 * 撤回提交审核应收账单343 * @param {*} code344 * @param {*} callback345 */346function settleReceivableRevokeApplyApprove(code, callback) {347 const url = `${apiDomain}/settle/receivable/${code}/revoke_apply_approve`;348 HTTP.post(url, {}, callback);349}350/**351 * 审核待审核应收帐单352 * @param {*} code353 * @param {*} params354 * @param {*} callback355 */356function settleReceivableApprove(code, params, callback) {357 const url = `${apiDomain}/settle/receivable/${code}/approve`;358 HTTP.post(url, params, callback);359}360/**361 * 审核待审核应收帐单362 * @param {*} code363 * @param {*} callback364 */365function settleReceivableRevokeApprove(code, callback) {366 const url = `${apiDomain}/settle/receivable/${code}/revoke_approve`;367 HTTP.post(url, {}, callback);368}369/**370 * 作废应收账单371 * @param {*} code372 * @param {*} callback373 */374function settleReceivableCancel(code, callback) {375 const url = `${apiDomain}/settle/receivable/${code}/cancel`;376 HTTP.post(url, {}, callback);377}378/**379 * 记录开票380 * @param {*} code381 * @param {*} callback382 */383function settleReceivableInvoice(code, callback) {384 const url = `${apiDomain}/settle/receivable/${code}/invoice`;385 HTTP.post(url, {}, callback);386}387/**388 * 记录开票389 * @param {*} code390 * @param {*} callback391 */392function settleReceivableActualReceiptLogAdd(params, callback) {393 const url = `${apiDomain}/settle/receivable/actual_receipt_log/add`;394 HTTP.post(url, params, callback);395}396/**397 * 获取应收账单列表展示列398 * @param {*} callback399 */400function settleReceivableListColumn(callback) {401 callback({402 code: 200,403 content: [404 {405 showName: '付款方名称', elementCode: 'label', extraParams: '{"field1":"payerOrgName"}', fieldConfigCode: 'payerOrgName'406 },407 {408 showName: '账单名称', elementCode: 'label', extraParams: '{"field1":"billName","detailLinkVisiable":"true"}', fieldConfigCode: 'billName'409 },410 {411 showName: '账单编号', elementCode: 'label', extraParams: '{"field1":"billNo","detailLinkVisiable":"true"}', fieldConfigCode: 'billNo'412 },413 {414 showName: '账单状态', elementCode: 'label', extraParams: '{"field1":"billStatus","optionsValue1":["none","pend","accept","reject","destroy"],"options1":["待提交审核","待审核","审核通过","审核不通过","已作废"]}', fieldConfigCode: 'billStatus'415 },416 {417 showName: '收款状态', elementCode: 'label', extraParams: '{"field1":"receivableStatus","optionsValue1":["none","part","all"],"options1":["未收款","部分收款","全部收款"]}', fieldConfigCode: 'receivableStatus'418 },419 {420 showName: '发票信息', elementCode: 'label', extraParams: '{"field1":"invoiced","optionsValue1":["true","false"],"options1":["已开票","未开票"]}', fieldConfigCode: 'invoiced'421 },422 {423 showName: '未收金额', elementCode: 'label', extraParams: '{"field1":"unreceivedAmount"}', fieldConfigCode: 'unreceivedAmount'424 },425 {426 showName: '应收金额', elementCode: 'label', extraParams: '{"field1":"receivableAmount"}', fieldConfigCode: 'receivableAmount'427 },428 {429 showName: '己收金额', elementCode: 'label', extraParams: '{"field1":"receivedAmount"}', fieldConfigCode: 'receivedAmount'430 },431 {432 showName: '创建人', elementCode: 'label', extraParams: '{"field1":"creatorUsername"}', fieldConfigCode: 'creatorUsername'433 },434 {435 showName: '创建时间', elementCode: 'label', extraParams: '{"field1":"createTime"}', fieldConfigCode: 'createTime'436 },437 {438 showName: '更新人用户名', elementCode: 'label', extraParams: '{"field1":"updateUsername"}', fieldConfigCode: 'updateUsername'439 },440 {441 showName: '更新时间', elementCode: 'label', extraParams: '{"field1":"updateTime"}', fieldConfigCode: 'updateTime'442 }443 ]444 });445}446function settleReceivableListSearch(callback) {447 callback({448 code: 200,449 content: [450 {451 showName: '付款方名称', elementCode: 'text', extraParams: '{"field1":"payerOrgName"}', fieldConfigCode: 'payerOrgName'452 },453 {454 showName: '账单状态', elementCode: 'select', extraParams: '{"field1":"billStatus","optionsValue1":["none","pend","accept","reject","destroy"],"options1":["待提交审核","待审核","审核通过","审核不通过","已作废"]}', fieldConfigCode: 'billStatus'455 },456 {457 showName: '收款状态', elementCode: 'select', extraParams: '{"field1":"receivableStatus","optionsValue1":["none","part","all"],"options1":["未收款","部分收款","全部收款"]}', fieldConfigCode: 'receivableStatus'458 },459 {460 showName: '账单名称', elementCode: 'text', extraParams: '{"field1":"billName"}', fieldConfigCode: 'billName'461 },462 {463 showName: '账单编号', elementCode: 'text', extraParams: '{"field1":"billNo"}', fieldConfigCode: 'billNo'464 },465 {466 showName: '创建时间', elementCode: 'dateRange', extraParams: '{"field1":"from_createTime","field3":"to_createTime","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}', fieldConfigCode: 'createTime'467 },468 {469 showName: '应收金额', elementCode: 'numberRange', extraParams: '{"field1":"from_receivableAmount","field3":"to_receivableAmount","default2":"到"}', fieldConfigCode: 'receivableAmount'470 },471 {472 showName: '未收金额', elementCode: 'numberRange', extraParams: '{"field1":"from_unreceivedAmount","field3":"to_unreceivedAmount","default2":"到"}', fieldConfigCode: 'unreceivedAmount'473 }474 ]475 });476}477function settleReceivableSelectClientColumn(callback) {478 callback({479 code: 200,480 content: [481 {482 showName: '客户', elementCode: 'popSelectPartner', extraParams: '{"field1":"orgName","field2":"orgCode","field3":"orgCode"}', fieldConfigCode: 'orgName'483 },484 {485 showName: '未对账车数', elementCode: 'label', extraParams: '{"field1":"upUnsettleNum"}', fieldConfigCode: 'upUnsettleNum'486 },487 {488 showName: '最近一次对账单创建时间', elementCode: 'label', extraParams: '{"field1":"upLastSettleTime"}', fieldConfigCode: 'upLastSettleTime'489 }490 ]491 });492}493function settleReceivableSelectClientSearch(callback) {494 callback({495 code: 200,496 content: [497 {498 showName: '客户名称', elementCode: 'text', extraParams: '{"field1":"orgName"}', fieldConfigCode: 'orgName'499 }500 ]501 });502}503function settlePayableAdd(params, callback) {504 const url = `${apiDomain}/settle/payable/add`;505 HTTP.post(url, params, (success, error) => {506 callback(success, error);507 });508}509function settlePayableEdit(code, params, callback) {510 const url = `${apiDomain}/settle/payable/${code}/edit`;511 HTTP.post(url, params, (success, error) => {512 callback(success, error);513 });514}515function settlePayableApproveList(params, callback) {516 const url = `${apiDomain}/settle/payable/approve/list`;517 HTTP.get(url, params, callback);518}519function settlePayableGet(code, callback) {520 const url = `${apiDomain}/settle/payable/${code}/get`;521 HTTP.get(url, {}, (success, error) => {522 callback(success, error);523 });524}525function settlePayableSelectPayableWaybillList(params, callback) {526 const url = `${apiDomain}/settle/payable/select_payable_waybill/list`;527 HTTP.get(url, params, (success, error) => {528 callback(success, error);529 });530}531function settlePayableSelectSelectedWaybillList(params, callback) {532 const url = `${apiDomain}/settle/payable/select_selected_waybill/list`;533 HTTP.get(url, params, callback);534}535function settlePayableSelectWaybill(data, callback) {536 const url = `${apiDomain}/settle/payable/select_waybill`;537 HTTP.post(url, data, callback);538}539function settlePayableSelectContractWaybillList(params, callback) {540 const url = `${apiDomain}/settle/payable/select_contrast_waybill/list`;541 HTTP.get(url, params, callback);542}543function settlePayableWaybillRemove(params, callback) {544 const url = `${apiDomain}/settle/payable/waybill/remove`;545 HTTP.post(url, params, callback);546}547function settlePayableClearSelectedWaybill(params, callback) {548 const url = `${apiDomain}/settle/payable/clear_selected_waybill`;549 HTTP.post(url, params, callback);550}551function settlePayableSelectCarrierList(params, callback) {552 const url = `${apiDomain}/settle/payable/select_carrier/list`;553 HTTP.get(url, params, (success, error) => {554 callback(success, error);555 });556}557function settlePayableWaybillColumns(callback) {558 const url = `${apiDomain}/list_render_info/settlePayableWaybill/list`;559 HTTP.get(url, {}, (success) => {560 callback(success);561 });562}563function settlePayableWaybillSearch(callback) {564 const url = `${apiDomain}/search_render_info/settlePayableWaybill/list`;565 HTTP.get(url, {}, (success) => {566 callback(success);567 });568}569function settlePayableSelectedWaybillColumns(callback) {570 const url = `${apiDomain}/list_render_info/settlePayableSelWaybill/list`;571 HTTP.get(url, {}, (success) => {572 callback(success);573 });574}575function settlePayableSelectedWaybillSearch(callback) {576 const url = `${apiDomain}/search_render_info/settlePayableSelWaybill/list`;577 HTTP.get(url, {}, (success) => {578 callback(success);579 });580}581function settlePayableStatisticalBill(params, callback) {582 const url = `${apiDomain}/settle/payable/statistical_bill`;583 HTTP.get(url, params, callback);584}585function settleActualPaymentColumns(callback) {586 const url = `${apiDomain}/list_render_info/settleActualPayment/list`;587 HTTP.get(url, {}, callback);588}589function settlePayableWaybillAdjustQuota(params, callback) {590 const url = `${apiDomain}/settle/payable/waybill/adjust_quota`;591 HTTP.post(url, params, callback);592}593function settlePayableWaybillAdjustRatio(params, callback) {594 const url = `${apiDomain}/settle/payable/waybill/adjust_proportion`;595 HTTP.post(url, params, callback);596}597function settlePayableWaybillAdjustSettleMethod(params, callback) {598 const url = `${apiDomain}/settle/payable/waybill/adjust_settle_method`;599 HTTP.post(url, params, callback);600}601function settlePayableWaybillAdjustTaxRates(params, callback) {602 const url = `${apiDomain}/settle/payable/waybill/adjust_tax_rate`;603 HTTP.post(url, params, callback);604}605function settlePayableWaybillAdjustTaxType(params, callback) {606 const url = `${apiDomain}/settle/payable/waybill/adjust_tax_type`;607 HTTP.post(url, params, callback);608}609function settlePayableWaybillEditDescription(params, callback) {610 const url = `${apiDomain}/settle/payable/waybill/${params.code}/edit_description`;611 HTTP.post(url, { description: params.description, clientOrgName: params.clientOrgName, billCode: params.billCode }, callback);612}613function settlePayableTempTableDelete(params, callback) {614 const url = `${apiDomain}/settle/payable/temp_table/delete`;615 HTTP.post(url, params, callback);616}617function settlePayableActualPaymentLogExportCsv(params, callback) {618 const apiUrl = `${apiDomain}/export/settleActualPayment`;619 HTTP.get(apiUrl, params, (success, error) => {620 callback(success, error);621 });622}623function settlePayableActualPaymentLogDownloadErrorData(params, callback) {624 const apiUrl = `${apiDomain}/generator/settleActualPayment`;625 HTTP.post(apiUrl, params, (success, error) => {626 callback(success, error);627 });628}629function settlePayableActualPaymentLogDownloadTemplate(params, callback) {630 const apiUrl = `${apiDomain}/download/template/settleActualPayment`;631 HTTP.get(apiUrl, params, (success, error) => {632 callback(success, error);633 });634}635function settlePayableActualPaymentLogListColumn(callback) {636 const apiUrl = `${apiDomain}/list_render_info/settleActualPayment/list`;637 HTTP.get(apiUrl, {}, (res, err) => {638 callback(res, err);639 });640}641function settlePayableActualPaymentLogListSearch(callback) {642 const apiUrl = `${apiDomain}/search_render_info/settleActualPayment/list`;643 HTTP.get(apiUrl, {}, (res, err) => {644 callback(res, err);645 });646}647function settlePayableActualPaymentLogList(data, callback) {648 const url = `${apiDomain}/settle/payable/actual_payment_log/list`;649 HTTP.get(url, data, callback);650}651function settlePayableActualPaymentLogDelete(code, callback) {652 const url = `${apiDomain}/settle/payable/actual_payment_log/${code}/delete`;653 HTTP.post(url, callback);654}655function settlePayableActualPaymentLogEdit(code, data, callback) {656 const url = `${apiDomain}/settle/payable/actual_payment_log/${code}/edit`;657 HTTP.post(url, data, callback);658}659function settlePayableActualPaymentLogGet(code, callback) {660 const url = `${apiDomain}/settle/payable/actual_payment_log/${code}/get`;661 HTTP.get(url, {}, callback);662}663function settlePayableTempWaybillCopy(billCode, callback) {664 const url = `${apiDomain}/settle/payable/${billCode}/temp_waybill/copy`;665 HTTP.post(url, {}, callback);666}667function settlePayableList(params, callback) {668 const url = `${apiDomain}/settle/payable/list`;669 HTTP.get(url, params, callback);670}671function settlePayableApplyApprove(code, callback) {672 const url = `${apiDomain}/settle/payable/${code}/apply_approve`;673 HTTP.post(url, {}, callback);674}675function settlePayableRevokeApplyApprove(code, callback) {676 const url = `${apiDomain}/settle/payable/${code}/revoke_apply_approve`;677 HTTP.post(url, {}, callback);678}679function settlePayableApprove(code, params, callback) {680 const url = `${apiDomain}/settle/payable/${code}/approve`;681 HTTP.post(url, params, callback);682}683function settlePayableRevokeApprove(code, callback) {684 const url = `${apiDomain}/settle/payable/${code}/revoke_approve`;685 HTTP.post(url, {}, callback);686}687function settlePayableCancel(code, callback) {688 const url = `${apiDomain}/settle/payable/${code}/cancel`;689 HTTP.post(url, {}, callback);690}691function settlePayableReceivedInvoice(code, callback) {692 const url = `${apiDomain}/settle/payable/${code}/received_invoice`;693 HTTP.post(url, {}, callback);694}695function settlePayableActualPaymentLogAdd(params, callback) {696 const url = `${apiDomain}/settle/payable/actual_payment_log/add`;697 HTTP.post(url, params, callback);698}699function settlePayableListColumn(callback) {700 callback({701 code: 200,702 content: [703 {704 showName: '收款方名称', elementCode: 'label', extraParams: '{"field1":"payeeOrgName"}', fieldConfigCode: 'payeeOrgName'705 },706 {707 showName: '账单名称', elementCode: 'label', extraParams: '{"field1":"billName","detailLinkVisiable":"true"}', fieldConfigCode: 'billName'708 },709 {710 showName: '账单编号', elementCode: 'label', extraParams: '{"field1":"billNo","detailLinkVisiable":"true"}', fieldConfigCode: 'billNo'711 },712 {713 showName: '账单状态', elementCode: 'label', extraParams: '{"field1":"billStatus","optionsValue1":["none","pend","accept","reject","destroy"],"options1":["待提交审核","待审核","审核通过","审核不通过","已作废"]}', fieldConfigCode: 'billStatus'714 },715 {716 showName: '付款状态', elementCode: 'label', extraParams: '{"field1":"payStatus","optionsValue1":["none","part","all"],"options1":["未付款","部分付款","全部付款"]}', fieldConfigCode: 'payStatus'717 },718 {719 showName: '发票信息', elementCode: 'label', extraParams: '{"field1":"receivedInvoice","optionsValue1":["true","false"],"options1":["已收票","未收票"]}', fieldConfigCode: 'receivedInvoice'720 },721 {722 showName: '未付金额', elementCode: 'label', extraParams: '{"field1":"unpaidAmount"}', fieldConfigCode: 'unpaidAmount'723 },724 {725 showName: '应付金额', elementCode: 'label', extraParams: '{"field1":"payableAmount"}', fieldConfigCode: 'payableAmount'726 },727 {728 showName: '己付金额', elementCode: 'label', extraParams: '{"field1":"paidAmount"}', fieldConfigCode: 'paidAmount'729 },730 {731 showName: '创建人', elementCode: 'label', extraParams: '{"field1":"creatorUsername"}', fieldConfigCode: 'creatorUsername'732 },733 {734 showName: '创建时间', elementCode: 'label', extraParams: '{"field1":"createTime"}', fieldConfigCode: 'createTime'735 },736 {737 showName: '更新人用户名', elementCode: 'label', extraParams: '{"field1":"updateUsername"}', fieldConfigCode: 'updateUsername'738 },739 {740 showName: '更新时间', elementCode: 'label', extraParams: '{"field1":"updateTime"}', fieldConfigCode: 'updateTime'741 }742 ]743 });744}745function settlePayableListSearch(callback) {746 callback({747 code: 200,748 content: [749 {750 showName: '收款方名称', elementCode: 'text', extraParams: '{"field1":"payeeOrgName"}', fieldConfigCode: 'payeeOrgName'751 },752 {753 showName: '账单状态', elementCode: 'select', extraParams: '{"field1":"billStatus","optionsValue1":["none","pend","accept","reject","destroy"],"options1":["待提交审核","待审核","审核通过","审核不通过","已作废"]}', fieldConfigCode: 'billStatus'754 },755 {756 showName: '付款状态', elementCode: 'select', extraParams: '{"field1":"payStatus","optionsValue1":["none","part","all"],"options1":["未付款","部分付款","全部付款"]}', fieldConfigCode: 'payStatus'757 },758 {759 showName: '账单名称', elementCode: 'text', extraParams: '{"field1":"billName"}', fieldConfigCode: 'billName'760 },761 {762 showName: '账单编号', elementCode: 'text', extraParams: '{"field1":"billNo"}', fieldConfigCode: 'billNo'763 },764 {765 showName: '创建时间', elementCode: 'dateRange', extraParams: '{"field1":"from_createTime","field3":"to_createTime","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}', fieldConfigCode: 'createTime'766 },767 {768 showName: '应付金额', elementCode: 'numberRange', extraParams: '{"field1":"from_payableAmount","field3":"to_payableAmount","default2":"到"}', fieldConfigCode: 'payableAmount'769 },770 {771 showName: '未付金额', elementCode: 'numberRange', extraParams: '{"field1":"from_unpaidAmount","field3":"to_unpaidAmount","default2":"到"}', fieldConfigCode: 'unpaidAmount'772 }773 ]774 });775}776function settlePayableSelectCarrierColumn(callback) {777 callback({778 code: 200,779 content: [780 {781 showName: '承运商', elementCode: 'popSelectPartner', extraParams: '{"field1":"orgName","field2":"orgCode","field3":"orgCode"}', fieldConfigCode: 'orgName'782 },783 {784 showName: '未对账车数', elementCode: 'label', extraParams: '{"field1":"downUnsettleNum"}', fieldConfigCode: 'downUnsettleNum'785 },786 {787 showName: '最近一次对账单创建时间', elementCode: 'label', extraParams: '{"field1":"downLastSettleTime"}', fieldConfigCode: 'downLastSettleTime'788 }789 ]790 });791}792function settlePayableSelectCarrierSearch(callback) {793 callback({794 code: 200,795 content: [796 {797 showName: '客户名称', elementCode: 'text', extraParams: '{"field1":"orgName"}', fieldConfigCode: 'orgName'798 }799 ]800 });801}802function settleOrgStatisticsRefresh(code, callback) {803 const url = `${apiDomain}/settle/org/${code}/statistics`;804 HTTP.post(url, {}, callback);805}806export {807 settleReceivableAdd,808 settleReceivableEdit,809 settleReceivableApproveList,810 settleReceivableGet,811 settleReceivableSelectReceivableWaybillList,812 settleReceivableSelectSelectedWaybillList,813 settleReceivableSelectWaybill,814 settleReceivableWaybillRemove,815 settleReceivableClearSelectedWaybill,816 settleReceivableSelectClientColumn,817 settleReceivableSelectClientSearch,818 settleReceivableSelectClientList,819 settleReceivableSelectContractWaybillList,820 settleReceivableWaybillColumns,821 settleReceivableWaybillSearch,822 settleReceivableSelectedWaybillColumns,823 settleReceivableSelectedWaybillSearch,824 settleReceivableStatisticalBill,825 settleActualReceiptColumns,826 settleReceivableWaybillAdjustQuota,827 settleReceivableWaybillAdjustRatio,828 settleReceivableWaybillAdjustSettleMethod,829 settleReceivableWaybillAdjustTaxRates,830 settleReceivableWaybillAdjustTaxType,831 settleReceivableWaybillEditDescription,832 settleReceivableTempTableDelete,833 settleReceivableActualReceiptLogExportCsv,834 settleReceivableActualReceiptLogDownloadErrorData,835 settleReceivableActualReceiptLogDownloadTemplate,836 settleReceivableActualReceiptLogListColumn,837 settleReceivableActualReceiptLogListSearch,838 settleReceivableActualReceiptLogAdd,839 settleReceivableActualReceiptLogList,840 settleReceivableActualReceiptLogDelete,841 settleReceivableActualReceiptLogEdit,842 settleReceivableActualReceiptLogGet,843 settleReceivableTempWaybillCopy,844 settleReceivableListSearch,845 settleReceivableListColumn,846 settleReceivableList,847 settleReceivableApplyApprove,848 settleReceivableRevokeApplyApprove,849 settleReceivableApprove,850 settleReceivableRevokeApprove,851 settleReceivableCancel,852 settleReceivableInvoice,853 settlePayableAdd,854 settlePayableEdit,855 settlePayableApproveList,856 settlePayableGet,857 settlePayableSelectPayableWaybillList,858 settlePayableSelectSelectedWaybillList,859 settlePayableSelectWaybill,860 settlePayableWaybillRemove,861 settlePayableClearSelectedWaybill,862 settlePayableSelectCarrierColumn,863 settlePayableSelectCarrierSearch,864 settlePayableSelectCarrierList,865 settlePayableSelectContractWaybillList,866 settlePayableWaybillColumns,867 settlePayableWaybillSearch,868 settlePayableSelectedWaybillColumns,869 settlePayableSelectedWaybillSearch,870 settlePayableStatisticalBill,871 settleActualPaymentColumns,872 settlePayableWaybillAdjustQuota,873 settlePayableWaybillAdjustRatio,874 settlePayableWaybillAdjustSettleMethod,875 settlePayableWaybillAdjustTaxRates,876 settlePayableWaybillAdjustTaxType,877 settlePayableWaybillEditDescription,878 settlePayableTempTableDelete,879 settlePayableActualPaymentLogExportCsv,880 settlePayableActualPaymentLogDownloadErrorData,881 settlePayableActualPaymentLogDownloadTemplate,882 settlePayableActualPaymentLogListColumn,883 settlePayableActualPaymentLogListSearch,884 settlePayableActualPaymentLogAdd,885 settlePayableActualPaymentLogList,886 settlePayableActualPaymentLogDelete,887 settlePayableActualPaymentLogEdit,888 settlePayableActualPaymentLogGet,889 settlePayableTempWaybillCopy,890 settlePayableListSearch,891 settlePayableListColumn,892 settlePayableList,893 settlePayableApplyApprove,894 settlePayableRevokeApplyApprove,895 settlePayableApprove,896 settlePayableRevokeApprove,897 settlePayableCancel,898 settlePayableReceivedInvoice,899 settleOrgStatisticsRefresh...

Full Screen

Full Screen

ReportService.js

Source:ReportService.js Github

copy

Full Screen

1import * as HTTP from './httpUtil';2const apiDomain = require('./ApiConst').apiReportDomain;3const Decimal = require('./decimal.min');4/**5 * 获取单车汇总字段6 */7function singleCarSummaryColumn(callback) {8 const success = { code: 200,9 content: [10 {11 showName: '车牌号',12 fieldConfigCode: 'truckNo',13 elementCode: 'label',14 extraParams: '{"field1": "truckNo", "required": "false"}'15 },16 {17 showName: '车次',18 fieldConfigCode: 'vehicleTimes',19 elementCode: 'label',20 extraParams: '{"field1": "vehicleTimes", "required": "false"}'21 },22 {23 showName: '结算重量',24 fieldConfigCode: 'settleWeight',25 elementCode: 'label',26 extraParams: '{"field1": "settleWeight", "required": "false"}'27 },28 {29 showName: '结算体积',30 fieldConfigCode: 'settleVolume',31 elementCode: 'label',32 extraParams: '{"field1": "settleVolume", "required": "false"}'33 },34 {35 showName: '结算数量',36 fieldConfigCode: 'settleNum',37 elementCode: 'label',38 extraParams: '{"field1": "settleNum", "required": "false"}'39 },40 {41 showName: '运输里程数',42 fieldConfigCode: 'transportMileage',43 elementCode: 'label',44 extraParams: '{"field1": "transportMileage", "required": "false"}'45 },46 {47 showName: '货差扣款',48 fieldConfigCode: 'settleLossDeduction',49 elementCode: 'label',50 extraParams: '{"field1": "settleLossDeduction", "required": "false"}'51 },52 {53 showName: '应收客户费用',54 fieldConfigCode: 'settleClientOrgPayee',55 elementCode: 'label',56 extraParams: '{"field1": "settleClientOrgPayee", "required": "false"}'57 },58 {59 showName: '运输成本费用',60 fieldConfigCode: 'settleTransportationCost',61 elementCode: 'label',62 extraParams: '{"field1": "settleTransportationCost", "required": "false"}'63 },64 {65 showName: '预计毛利',66 fieldConfigCode: 'settleGrossProfit',67 elementCode: 'label',68 extraParams: '{"field1": "settleGrossProfit", "required": "false"}'69 }70 ] };71 callback(success);72 return success;73}74/**75 * 获取单车汇总搜索字段76 */77function singleCarSummarySearch(callback) {78 const success = { code: 200,79 content: [80 {81 showName: '出车日期',82 fieldConfigCode: 'departDate',83 elementCode: 'dateRange',84 extraParams: '{"field1":"from_departDate","field3":"to_departDate","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}'85 },86 {87 showName: '收车日期',88 fieldConfigCode: 'returnDate',89 elementCode: 'dateRange',90 extraParams: '{"field1":"from_returnDate","field3":"to_returnDate","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}'91 },92 {93 showName: '车牌号',94 fieldConfigCode: 'truckNo',95 elementCode: 'text',96 extraParams: '{"field1": "truckNo"}'97 }98 ] };99 callback(success);100 return success;101}102/**103 * 获取单车汇总列表104 */105function singleCarSummaryList(paramObj, callback) {106 const apiUrl = `${apiDomain}/report/single_car_summary/list`;107 HTTP.get(apiUrl, paramObj, (success, error) => {108 let tempData = [],109 vehicleTimes = Decimal(0),110 settleWeight = Decimal(0),111 settleVolume = Decimal(0),112 settleNum = Decimal(0),113 transportMileage = Decimal(0),114 settleLossDeduction = Decimal(0),115 settleClientOrgPayee = Decimal(0),116 settleTransportationCost = Decimal(0),117 settleGrossProfit = Decimal(0);118 if (success.content.length) {119 tempData = success.content;120 tempData.forEach((data) => {121 vehicleTimes = vehicleTimes.plus(data.vehicleTimes || 0);122 settleWeight = settleWeight.plus(data.settleWeight || 0);123 settleVolume = settleVolume.plus(data.settleVolume || 0);124 settleNum = settleNum.plus(data.settleNum || 0);125 transportMileage = transportMileage.plus(data.transportMileage || 0);126 settleLossDeduction = settleLossDeduction.plus(data.settleLossDeduction || 0);127 settleClientOrgPayee = settleClientOrgPayee.plus(data.settleClientOrgPayee || 0);128 settleTransportationCost = settleTransportationCost.plus(data.settleTransportationCost || 0);129 settleGrossProfit = settleGrossProfit.plus(data.settleGrossProfit || 0);130 });131 }132 tempData.push({ 'truckNo': '合计',133 'vehicleTimes': vehicleTimes.toNumber(),134 'settleWeight': settleWeight.toNumber(),135 'settleVolume': settleVolume.toNumber(),136 'settleNum': settleNum.toNumber(),137 'transportMileage': transportMileage.toNumber(),138 'settleLossDeduction': settleLossDeduction.toNumber(),139 'settleClientOrgPayee': settleClientOrgPayee.toNumber(),140 'settleTransportationCost': settleTransportationCost.toNumber(),141 'settleGrossProfit': settleGrossProfit.toNumber() });142 success.content = tempData;143 callback(success, error);144 });145}146/**147 * 获取客户汇总字段148 */149function customerSummaryColumn(callback) {150 const success = { code: 200,151 content: [152 {153 showName: '托运客户',154 fieldConfigCode: 'clientOrgName',155 elementCode: 'label',156 extraParams: '{"field1": "clientOrgName", "required": "false"}'157 },158 {159 showName: '车次',160 fieldConfigCode: 'vehicleTimes',161 elementCode: 'label',162 extraParams: '{"field1": "vehicleTimes", "required": "false"}'163 },164 {165 showName: '结算重量',166 fieldConfigCode: 'settleWeight',167 elementCode: 'label',168 extraParams: '{"field1": "settleWeight", "required": "false"}'169 },170 {171 showName: '结算体积',172 fieldConfigCode: 'settleVolume',173 elementCode: 'label',174 extraParams: '{"field1": "settleVolume", "required": "false"}'175 },176 {177 showName: '结算数量',178 fieldConfigCode: 'settleNum',179 elementCode: 'label',180 extraParams: '{"field1": "settleNum", "required": "false"}'181 },182 {183 showName: '应收客户费用',184 fieldConfigCode: 'settleClientOrgPayee',185 elementCode: 'label',186 extraParams: '{"field1": "settleClientOrgPayee", "required": "false"}'187 },188 {189 showName: '货差扣款',190 fieldConfigCode: 'settleLossDeduction',191 elementCode: 'label',192 extraParams: '{"field1": "settleLossDeduction", "required": "false"}'193 },194 {195 showName: '运输成本费用',196 fieldConfigCode: 'settleTransportationCost',197 elementCode: 'label',198 extraParams: '{"field1": "settleTransportationCost", "required": "false"}'199 },200 {201 showName: '预计毛利',202 fieldConfigCode: 'settleGrossProfit',203 elementCode: 'label',204 extraParams: '{"field1": "settleGrossProfit", "required": "false"}'205 }206 ] };207 callback(success);208 return success;209}210/**211 * 获取客户汇总搜索字段212 */213function customerSummarySearch(callback) {214 const success = { code: 200,215 content: [216 {217 showName: '装货日期',218 fieldConfigCode: 'loadingDate',219 elementCode: 'dateRange',220 extraParams: '{"field1":"from_loadingDate","field3":"to_loadingDate","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}'221 },222 {223 showName: '卸货日期',224 fieldConfigCode: 'unloadingDate',225 elementCode: 'dateRange',226 extraParams: '{"field1":"from_unloadingDate","field3":"to_unloadingDate","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}'227 },228 {229 showName: '托运客户',230 fieldConfigCode: 'clientOrgName',231 elementCode: 'text',232 extraParams: '{"field1": "clientOrgName"}'233 }234 ] };235 callback(success);236 return success;237}238/**239 * 获取客户汇总列表240 */241function customerSummaryList(paramObj, callback) {242 const apiUrl = `${apiDomain}/report/customer_summary/list`;243 HTTP.get(apiUrl, paramObj, (success, error) => {244 let tempData = [],245 vehicleTimes = Decimal(0),246 settleWeight = Decimal(0),247 settleVolume = Decimal(0),248 settleNum = Decimal(0),249 settleLossDeduction = Decimal(0),250 settleClientOrgPayee = Decimal(0),251 settleTransportationCost = Decimal(0),252 settleGrossProfit = Decimal(0);253 if (success.content.length) {254 tempData = success.content;255 tempData.forEach((data) => {256 vehicleTimes = vehicleTimes.plus(data.vehicleTimes || 0);257 settleWeight = settleWeight.plus(data.settleWeight || 0);258 settleVolume = settleVolume.plus(data.settleVolume || 0);259 settleNum = settleNum.plus(data.settleNum || 0);260 settleLossDeduction = settleLossDeduction.plus(data.settleLossDeduction || 0);261 settleClientOrgPayee = settleClientOrgPayee.plus(data.settleClientOrgPayee || 0);262 settleTransportationCost = settleTransportationCost.plus(data.settleTransportationCost || 0);263 settleGrossProfit = settleGrossProfit.plus(data.settleGrossProfit || 0);264 });265 }266 tempData.push({ 'clientOrgName': '合计',267 'vehicleTimes': vehicleTimes.toNumber(),268 'settleWeight': settleWeight.toNumber(),269 'settleVolume': settleVolume.toNumber(),270 'settleNum': settleNum.toNumber(),271 'settleLossDeduction': settleLossDeduction.toNumber(),272 'settleClientOrgPayee': settleClientOrgPayee.toNumber(),273 'settleTransportationCost': settleTransportationCost.toNumber(),274 'settleGrossProfit': settleGrossProfit.toNumber() });275 success.content = tempData;276 callback(success, error);277 });278}279/**280 * 获取线路汇总字段281 */282function lineSummaryColumn(callback) {283 const success = { code: 200,284 content: [285 {286 showName: '线路名称',287 fieldConfigCode: 'lineName',288 elementCode: 'label',289 extraParams: '{"field1": "lineName", "required": "false"}'290 },291 {292 showName: '货物名称',293 fieldConfigCode: 'goodsName',294 elementCode: 'label',295 extraParams: '{"field1": "goodsName", "required": "false"}'296 },297 {298 showName: '车次',299 fieldConfigCode: 'vehicleTimes',300 elementCode: 'label',301 extraParams: '{"field1": "vehicleTimes", "required": "false"}'302 },303 {304 showName: '结算重量',305 fieldConfigCode: 'settleWeight',306 elementCode: 'label',307 extraParams: '{"field1": "settleWeight", "required": "false"}'308 },309 {310 showName: '结算体积',311 fieldConfigCode: 'settleVolume',312 elementCode: 'label',313 extraParams: '{"field1": "settleVolume", "required": "false"}'314 },315 {316 showName: '结算数量',317 fieldConfigCode: 'settleNum',318 elementCode: 'label',319 extraParams: '{"field1": "settleNum", "required": "false"}'320 },321 {322 showName: '货差扣款',323 fieldConfigCode: 'settleLossDeduction',324 elementCode: 'label',325 extraParams: '{"field1": "settleLossDeduction", "required": "false"}'326 },327 {328 showName: '应收客户费用',329 fieldConfigCode: 'settleClientOrgPayee',330 elementCode: 'label',331 extraParams: '{"field1": "settleClientOrgPayee", "required": "false"}'332 },333 {334 showName: '运输成本费用',335 fieldConfigCode: 'settleTransportationCost',336 elementCode: 'label',337 extraParams: '{"field1": "settleTransportationCost", "required": "false"}'338 },339 {340 showName: '预计毛利',341 fieldConfigCode: 'settleGrossProfit',342 elementCode: 'label',343 extraParams: '{"field1": "settleGrossProfit", "required": "false"}'344 }345 ] };346 callback(success);347 return success;348}349/**350 * 获取线路汇总搜索字段351 */352function lineSummarySearch(callback) {353 const success = { code: 200,354 content: [355 {356 showName: '装货日期',357 fieldConfigCode: 'loadingDate',358 elementCode: 'dateRange',359 extraParams: '{"field1":"from_loadingDate","field3":"to_loadingDate","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}'360 },361 {362 showName: '卸货日期',363 fieldConfigCode: 'unloadingDate',364 elementCode: 'dateRange',365 extraParams: '{"field1":"from_unloadingDate","field3":"to_unloadingDate","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}'366 },367 {368 showName: '线路名称',369 fieldConfigCode: 'lineName',370 elementCode: 'text',371 extraParams: '{"field1": "lineName"}'372 },373 {374 showName: '货物名称',375 fieldConfigCode: 'goodsName',376 elementCode: 'text',377 extraParams: '{"field1": "goodsName"}'378 }379 ] };380 callback(success);381 return success;382}383/**384 * 获取线路汇总列表385 */386function lineSummaryList(paramObj, callback) {387 const apiUrl = `${apiDomain}/report/line_summary/list`;388 HTTP.get(apiUrl, paramObj, (success, error) => {389 let tempData = [],390 vehicleTimes = Decimal(0),391 settleWeight = Decimal(0),392 settleVolume = Decimal(0),393 settleNum = Decimal(0),394 settleLossDeduction = Decimal(0),395 settleClientOrgPayee = Decimal(0),396 settleTransportationCost = Decimal(0),397 settleGrossProfit = Decimal(0);398 if (success.content.length) {399 tempData = success.content;400 tempData.forEach((data) => {401 vehicleTimes = vehicleTimes.plus(data.vehicleTimes || 0);402 settleWeight = settleWeight.plus(data.settleWeight || 0);403 settleVolume = settleVolume.plus(data.settleVolume || 0);404 settleNum = settleNum.plus(data.settleNum || 0);405 settleLossDeduction = settleLossDeduction.plus(data.settleLossDeduction || 0);406 settleClientOrgPayee = settleClientOrgPayee.plus(data.settleClientOrgPayee || 0);407 settleTransportationCost = settleTransportationCost.plus(data.settleTransportationCost || 0);408 settleGrossProfit = settleGrossProfit.plus(data.settleGrossProfit || 0);409 });410 }411 tempData.push({ 'lineName': '合计',412 'vehicleTimes': vehicleTimes.toNumber(),413 'settleWeight': settleWeight.toNumber(),414 'settleVolume': settleVolume.toNumber(),415 'settleNum': settleNum.toNumber(),416 'settleLossDeduction': settleLossDeduction.toNumber(),417 'settleClientOrgPayee': settleClientOrgPayee.toNumber(),418 'settleTransportationCost': settleTransportationCost.toNumber(),419 'settleGrossProfit': settleGrossProfit.toNumber() });420 success.content = tempData;421 callback(success, error);422 });423}424/**425 * 获取司机汇总字段426 */427function driverSummaryColumn(callback) {428 const success = { code: 200,429 content: [430 {431 showName: '司机',432 fieldConfigCode: 'driverName',433 elementCode: 'label',434 extraParams: '{"field1": "driverName", "required": "false"}'435 },436 {437 showName: '手机号',438 fieldConfigCode: 'driverPhone',439 elementCode: 'label',440 extraParams: '{"field1": "driverPhone", "required": "false"}'441 },442 {443 showName: '主驾出车次数',444 fieldConfigCode: 'driverLeaveVehicleTimes',445 elementCode: 'label',446 extraParams: '{"field1": "driverLeaveVehicleTimes", "required": "false"}'447 },448 {449 showName: '副驾出车次数',450 fieldConfigCode: 'viceDriverLeaveVehicleTimes',451 elementCode: 'label',452 extraParams: '{"field1": "viceDriverLeaveVehicleTimes", "required": "false"}'453 },454 {455 showName: '运输里程数',456 fieldConfigCode: 'transportMileage',457 elementCode: 'label',458 extraParams: '{"field1": "transportMileage", "required": "false"}'459 },460 {461 showName: '主驾费用',462 fieldConfigCode: 'driverAmount',463 elementCode: 'label',464 extraParams: '{"field1": "driverAmount", "required": "false"}'465 },466 {467 showName: '副驾费用',468 fieldConfigCode: 'viceDriverAmount',469 elementCode: 'label',470 extraParams: '{"field1": "viceDriverAmount", "required": "false"}'471 }472 ] };473 callback(success);474 return success;475}476/**477 * 获取司机汇总搜索字段478 */479function driverSummarySearch(callback) {480 const success = { code: 200,481 content: [482 {483 showName: '出车日期',484 fieldConfigCode: 'departDate',485 elementCode: 'dateRange',486 extraParams: '{"field1":"from_departDate","field3":"to_departDate","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}'487 },488 {489 showName: '收车日期',490 fieldConfigCode: 'returnDate',491 elementCode: 'dateRange',492 extraParams: '{"field1":"from_returnDate","field3":"to_returnDate","format1":"yyyy-MM-dd","format3":"yyyy-MM-dd","default2":"到"}'493 },494 {495 showName: '司机',496 fieldConfigCode: 'driverName',497 elementCode: 'text',498 extraParams: '{"field1": "driverName"}'499 }500 ] };501 callback(success);502 return success;503}504/**505 * 获取司机汇总列表506 */507function driverSummaryList(paramObj, callback) {508 const apiUrl = `${apiDomain}/report/driver_summary/list`;509 HTTP.get(apiUrl, paramObj, (success, error) => {510 let tempData = [],511 driverLeaveVehicleTimes = Decimal(0),512 viceDriverLeaveVehicleTimes = Decimal(0),513 transportMileage = Decimal(0),514 driverAmount = Decimal(0),515 viceDriverAmount = Decimal(0);516 if (success.content.length) {517 tempData = success.content;518 tempData.forEach((data) => {519 driverLeaveVehicleTimes = driverLeaveVehicleTimes.plus(data.driverLeaveVehicleTimes || 0);520 viceDriverLeaveVehicleTimes = viceDriverLeaveVehicleTimes.plus(data.viceDriverLeaveVehicleTimes || 0);521 transportMileage = transportMileage.plus(data.transportMileage || 0);522 driverAmount = driverAmount.plus(data.driverAmount || 0);523 viceDriverAmount = viceDriverAmount.plus(data.viceDriverAmount || 0);524 });525 }526 tempData.push({ 'driverName': '合计',527 'driverLeaveVehicleTimes': driverLeaveVehicleTimes.toNumber(),528 'viceDriverLeaveVehicleTimes': viceDriverLeaveVehicleTimes.toNumber(),529 'transportMileage': transportMileage.toNumber(),530 'driverAmount': driverAmount.toNumber(),531 'viceDriverAmount': viceDriverAmount.toNumber()});532 success.content = tempData;533 callback(success, error);534 });535}536/**537 * 获取云图汇总538 */539function screenSummary(paramObj, callback) {540 const apiUrl = `${apiDomain}/report/screen/summary`;541 HTTP.get(apiUrl, paramObj, (success, error) => {542 callback(success, error);543 });544}545/**546 * 获取云图线路列表547 */548function screenLineSummary(paramObj, callback) {549 const apiUrl = `${apiDomain}/report/screen/line_summary`;550 HTTP.get(apiUrl, paramObj, (success, error) => {551 callback(success, error);552 });553}554/**555 * 获取云图货物列表556 */557function screenGoodsSummary(paramObj, callback) {558 const apiUrl = `${apiDomain}/report/screen/goods_summary`;559 HTTP.get(apiUrl, paramObj, (success, error) => {560 callback(success, error);561 });562}563/**564 * 获取收发货直播565 */566function screenTransportLive(paramObj, callback) {567 const apiUrl = `${apiDomain}/report/screen/transport_live`;568 HTTP.get(apiUrl, paramObj, (success, error) => {569 callback(success, error);570 });571}572export { singleCarSummaryColumn, singleCarSummarySearch, singleCarSummaryList,573customerSummaryColumn, customerSummarySearch, customerSummaryList,574lineSummaryColumn, lineSummarySearch, lineSummaryList,575driverSummaryColumn, driverSummarySearch, driverSummaryList,...

Full Screen

Full Screen

SettleService.js

Source:SettleService.js Github

copy

Full Screen

1angular.module('pu.settle.services')2 .service("SettleService",function($window,RestApi,$uibModal,toaster) {3 this.getAllSettleFeeItem = function (appId, settleEffectDate) {4 return RestApi.one("/settle/getAllSettleFeeItem", appId).get({'settleEffectDate': settleEffectDate});5 };6 this.commitApplySettleTask = function (appId, settleType, params) {7 return RestApi.all("/settle/commitApplySettleTask").all(appId).all(settleType).post(params);8 };9 this.getApplySettleInfo = function (id) {10 return RestApi.one("/settle/getApplySettleInfo", id).get();11 };12 this.commitApproveSettleTask = function (taskId, params) {13 return RestApi.all("/settle/commitApproveSettleTask").all(taskId).post(params);14 };15 this.getApplySettleTaskList = function (settleType) {16 return RestApi.all("/settle/getApplySettleTaskList").getList({"settleType":settleType});17 };18 this.commitApplyConfirmSettleTask = function(taskId,params){19 return RestApi.all("/settle/commitApplyConfirmSettleTask").all(taskId).post(params);20 };21 this.commitRemissionConfirmSettleTask = function(taskId,params){22 return RestApi.all("/settle/commitRemissionConfirmSettleTask").all(taskId).post(params);23 };24 this.commitRemissionApprove = function(taskId,params){25 return RestApi.all("/settle/commitApproveRemissionTask").all(taskId).post(params);26 };27 this.commitConfirmSettleTask = function(taskId,params){28 return RestApi.all("/settle/commitConfirmSettleTask").all(taskId).post(params);29 }30 this.getPartSettleFeeItem = function(appId,beginPeriod,endPeriod,settleEffectDate){31 return RestApi.one("/settle/getPartSettleFeeItem", appId).get({'beginPeriod':beginPeriod,'endPeriod':endPeriod,'settleEffectDateStr': settleEffectDate});32 };33 this.genPartSettleRepayPlan = function(appId,settleCapital,settlePeriod,settleEffectDate){34 return RestApi.all("/settle/refreshRepayPlan/select").all(appId).getList({'settleCapital':settleCapital,'settlePeriod':settlePeriod,'settleEffectDateStr': settleEffectDate})35 }36 this.cancelSettleTask = function(taskId,cancelComment){37 return RestApi.all("/settle/cancelSettleTask").all(taskId).post(cancelComment);38 }39 this.addSettleApply = function (appId) {40 var modalInstance = $uibModal.open({41 animation: false,42 backdrop: 'static',43 size: 'lg',44 templateUrl: 'module_settle/tpl/dialog-settle-add.html',45 controller: function ($scope, RestApi, SettleService, ToolsService, modal, LoanQueryService) {46 $scope.appId = appId;47 $scope.applyVo = {};48 $scope.baseInfoVo = LoanQueryService.getLoanCustApplyInfo($scope.appId).$object;49 LoanQueryService.getAfterCurrentPeriodRemainPeroidList($scope.appId).then(function (response) {50 $scope.applyVo.beginPeriod = response[0];51 $scope.applyVo.endPeriod = response[response.length - 1];52 });53 $scope.dateOptions = {};54 //最小结清可选日期为当前日期55 ToolsService.getServerDateTime().then(function(response){56 $scope.dateOptions.minDate = ToolsService.convertStr82Date(response);57 })58 //最大结清可选日期为当期结账日59 LoanQueryService.getCurrentPeriodRepayPlan($scope.appId).then(function(response){60 $scope.dateOptions.maxDate = new Date(parseInt(response.closingDate)-1000*60*60*24*4);61 });62 $scope.$watch('applyVo.applyEffectDate', function (newVal, oldVal) {63 if (newVal == oldVal || newVal == undefined)64 return;65 SettleService.getAllSettleFeeItem($scope.appId, $scope.applyVo.applyEffectDate).then(function (response) {66 $scope.applyVo.feeItem = response;67 })68 });69 $scope.ok = function () {70 modal.confirm("操作提醒", "确认提交申请").then(function () {71 SettleService.commitApplySettleTask($scope.appId, 'jqlx01', $scope.applyVo).then(function () {72 modalInstance.close();73 })74 })75 };76 $scope.cancel = function () {77 modalInstance.dismiss('cancel');78 };79 }80 });81 modalInstance.result.then(function (response) {82 toaster.pop('success', '操作提醒', "提交任务成功");83 })84 }85 this.addPartSettleApply = function (appId) {86 var modalInstance = $uibModal.open({87 animation: false,88 backdrop: 'static',89 size: 'lg',90 templateUrl: 'module_settle/tpl/dialog-partsettle-add.html',91 controller: function ($scope, RestApi, SettleService, ToolsService, modal, LoanQueryService) {92 $scope.appId = appId;93 $scope.applyVo = {};94 //基本申请信息95 $scope.baseInfoVo = LoanQueryService.getLoanCustApplyInfo($scope.appId).$object;96 //可选期数97 LoanQueryService.getAfterCurrentPeriodRemainPeroidList($scope.appId).then(function (response) {98 $scope.applyVo.beginPeriod = response[0];99 $scope.applyVo.endPeriod = response[response.length - 1];100 /**生成可选截止期数 业务要求直接选择结清期数101 $scope.canSelSettlePeriod = [];102 var startIndex = $scope.applyVo.beginPeriod>=3?$scope.applyVo.beginPeriod:3;103 for(var i = startIndex ; i<=$scope.applyVo.endPeriod;i++){104 $scope.canSelSettlePeriod.push({'key':i,'name':i+"期"}) ;105 }**/106 //生成结清可选期数,以3为倍数107 $scope.canSelSettlePeriod = [];108 for(var i = 1,j=1 ;i<=parseInt($scope.applyVo.endPeriod)-parseInt($scope.applyVo.beginPeriod)+1;i=i+3,j++){109 $scope.canSelSettlePeriod.push({key:j*3,name:j*3+'期'});110 }111 });112 $scope.dateOptions = {};113 //最小结清可选日期为当前日期114 ToolsService.getServerDateTime().then(function(response){115 $scope.dateOptions.minDate = ToolsService.convertStr82Date(response);116 })117 //最大结清可选日期为当期结账日118 LoanQueryService.getCurrentPeriodRepayPlan($scope.appId).then(function(response){119 $scope.dateOptions.maxDate = new Date(parseInt(response.closingDate)-1000*60*60*24*4);120 $scope.applyVo.applyEffectDate = $scope.dateOptions.maxDate;121 });122 //监视选择日期动作123 $scope.$watchGroup(['applyVo.applyEffectDate','applyVo.settlePeriod'], function (newVal, oldVal) {124 if (newVal == oldVal || newVal == undefined)125 return;126 if($scope.applyVo.applyEffectDate == undefined || $scope.applyVo.settlePeriod == undefined)127 return;128 $scope.applyVo.endPeriod = parseInt($scope.applyVo.beginPeriod + $scope.applyVo.settlePeriod)-1;129 SettleService.getPartSettleFeeItem($scope.appId,$scope.applyVo.beginPeriod,$scope.applyVo.endPeriod, $scope.applyVo.applyEffectDate).then(function (response) {130 $scope.applyVo.feeItem = response;131 //保存总的剩余结清本金=结清本金+结清剩余本金132 $scope.totalSettleCaptial=parseFloat((response.settleCapital+response.settleAfterAmount).toFixed(2));133 if(watchSettleCapital != undefined){134 watchSettleCapital();135 }136 $scope.initWatchSettleCapital();137 })138 });139 //监视输入新的结清本金处理140 var watchSettleCapital;141 $scope.initWatchSettleCapital = function(){142 watchSettleCapital = $scope.$watch('applyVo.feeItem.settleCapital',function(newVal,oldVal){143 //更新结清后剩余本金144 $scope.applyVo.feeItem.settleAfterAmount =parseFloat(( $scope.totalSettleCaptial-$scope.applyVo.feeItem.settleCapital).toFixed(2));145 //更新结清金额合计 = 逾期本金 + 逾期利息 + 逾期罚息 + 其他费用 + 其他费用罚息 + 提前还款违约金 - 挂账金额146 $scope.applyVo.feeItem.settleTotalAmount =147 parseFloat(148 (149 $scope.applyVo.feeItem.repayCapital+150 $scope.applyVo.feeItem.repayInterest+151 $scope.applyVo.feeItem.repayOverdueAmount+152 $scope.applyVo.feeItem.otherAmount+153 $scope.applyVo.feeItem.otherOverdueAmount-154 $scope.applyVo.feeItem.stayAmount+155 $scope.applyVo.feeItem.settleCapital+156 $scope.applyVo.feeItem.lateFee157 ).toFixed(2)158 )159 })160 }161 $scope.ok = function () {162 modal.confirm("操作提醒", "确认提交申请").then(function () {163 SettleService.commitApplySettleTask($scope.appId, 'jqlx02', $scope.applyVo).then(function () {164 modalInstance.close();165 })166 })167 };168 $scope.genRepayPlan = function(){169 SettleService.genPartSettleRepayPlan($scope.appId,$scope.applyVo.feeItem.settleCapital,$scope.applyVo.endPeriod,$scope.applyVo.applyEffectDate).then(function(response){170 $scope.applyVo.repayPlanList = response;171 })172 }173 $scope.cancel = function () {174 modalInstance.dismiss('cancel');175 };176 }177 });178 modalInstance.result.then(function (response) {179 toaster.pop('success', '操作提醒', "提交任务成功");180 })181 };182 this.showSettleTaskDetail = function(item){183 var modalInstance = $uibModal.open({184 animation: false,185 backdrop:'static',186 resolve:{187 item:function(){188 return item;189 }190 },191 size:'lg',192 templateUrl :'module_settle/tpl/dialog-settle-task-detail.html',193 controller:function($scope,RestApi,SettleService,ToolsService,modal,QueryService,item,$uibModalInstance,$rootScope){194 $scope.businessKey = item.id;195 $scope.appId = item.appId;196 $scope.procDefId = item.procDefId;197 $scope.procInstId = item.procInstId;198 SettleService.getApplySettleInfo($scope.businessKey).then(function(response){199 $scope.applyVo = response;200 })201 $scope.getWorkflowProcessResultByProcInstId = function(){202 $scope.workflowProcessResultList = QueryService.getWorkflowProcessResultByProcInstId($scope.procInstId).$object;203 };204 $scope.openWorkflowDiagram = function(taskId ) {205 var processDefinitionId = $scope.procDefId;206 var processInstanceId = $scope.procInstId;207 window.open(BASE_URL + "/diagram-viewer/index.html?processDefinitionId=" + processDefinitionId + "&processInstanceId=" + processInstanceId + "&token=" + $rootScope.Authorization);208 }209 $scope.cancel = function () {210 modalInstance.dismiss('cancel');211 };212 }213 });214 }...

Full Screen

Full Screen

forced-settle.state.js

Source:forced-settle.state.js Github

copy

Full Screen

1(function() {2 'use strict';3 angular4 .module('aicheyideApp')5 .config(stateConfig);6 stateConfig.$inject = ['$stateProvider'];7 function stateConfig($stateProvider) {8 $stateProvider9 .state('forced-settle', {10 parent: 'entity',11 url: '/forced-settle?page&sort&search',12 data: {13 authorities: ['ROLE_USER'],14 pageTitle: 'ForcedSettles'15 },16 views: {17 'content@': {18 templateUrl: 'app/entities/forced-settle/forced-settles.html',19 controller: 'ForcedSettleController',20 controllerAs: 'vm'21 }22 },23 params: {24 page: {25 value: '1',26 squash: true27 },28 sort: {29 value: 'id,asc',30 squash: true31 },32 search: null33 },34 resolve: {35 pagingParams: ['$stateParams', 'PaginationUtil', function ($stateParams, PaginationUtil) {36 return {37 page: PaginationUtil.parsePage($stateParams.page),38 sort: $stateParams.sort,39 predicate: PaginationUtil.parsePredicate($stateParams.sort),40 ascending: PaginationUtil.parseAscending($stateParams.sort),41 search: $stateParams.search42 };43 }],44 }45 })46 .state('forced-settle-detail', {47 parent: 'forced-settle',48 url: '/forced-settle/{id}',49 data: {50 authorities: ['ROLE_USER'],51 pageTitle: 'ForcedSettle'52 },53 views: {54 'content@': {55 templateUrl: 'app/entities/forced-settle/forced-settle-detail.html',56 controller: 'ForcedSettleDetailController',57 controllerAs: 'vm'58 }59 },60 resolve: {61 entity: ['$stateParams', 'ForcedSettle', function($stateParams, ForcedSettle) {62 return ForcedSettle.get({id : $stateParams.id}).$promise;63 }],64 previousState: ["$state", function ($state) {65 var currentStateData = {66 name: $state.current.name || 'forced-settle',67 params: $state.params,68 url: $state.href($state.current.name, $state.params)69 };70 return currentStateData;71 }]72 }73 })74 .state('forced-settle-detail.edit', {75 parent: 'forced-settle-detail',76 url: '/detail/edit',77 data: {78 authorities: ['ROLE_USER']79 },80 onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {81 $uibModal.open({82 templateUrl: 'app/entities/forced-settle/forced-settle-dialog.html',83 controller: 'ForcedSettleDialogController',84 controllerAs: 'vm',85 backdrop: 'static',86 size: 'lg',87 resolve: {88 entity: ['ForcedSettle', function(ForcedSettle) {89 return ForcedSettle.get({id : $stateParams.id}).$promise;90 }]91 }92 }).result.then(function() {93 $state.go('^', {}, { reload: false });94 }, function() {95 $state.go('^');96 });97 }]98 })99 .state('forced-settle.new', {100 parent: 'forced-settle',101 url: '/new',102 data: {103 authorities: ['ROLE_USER']104 },105 onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {106 $uibModal.open({107 templateUrl: 'app/entities/forced-settle/forced-settle-dialog.html',108 controller: 'ForcedSettleDialogController',109 controllerAs: 'vm',110 backdrop: 'static',111 size: 'lg',112 resolve: {113 entity: function () {114 return {115 driverId: null,116 vehicleId: null,117 companyId: null,118 plateNumber: null,119 driverName: null,120 periods: null,121 sumMoney: null,122 notPeriods: null,123 notMoney: null,124 settleType: null,125 receiptNumber: null,126 receiptDate: null,127 whetherRecycle: null,128 remark: null,129 status: null,130 id: null131 };132 }133 }134 }).result.then(function() {135 $state.go('forced-settle', null, { reload: 'forced-settle' });136 }, function() {137 $state.go('forced-settle');138 });139 }]140 })141 .state('forced-settle.edit', {142 parent: 'forced-settle',143 url: '/{id}/edit',144 data: {145 authorities: ['ROLE_USER']146 },147 onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {148 $uibModal.open({149 templateUrl: 'app/entities/forced-settle/forced-settle-dialog.html',150 controller: 'ForcedSettleDialogController',151 controllerAs: 'vm',152 backdrop: 'static',153 size: 'lg',154 resolve: {155 entity: ['ForcedSettle', function(ForcedSettle) {156 return ForcedSettle.get({id : $stateParams.id}).$promise;157 }]158 }159 }).result.then(function() {160 $state.go('forced-settle', null, { reload: 'forced-settle' });161 }, function() {162 $state.go('^');163 });164 }]165 })166 .state('forced-settle.delete', {167 parent: 'forced-settle',168 url: '/{id}/delete',169 data: {170 authorities: ['ROLE_USER']171 },172 onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {173 $uibModal.open({174 templateUrl: 'app/entities/forced-settle/forced-settle-delete-dialog.html',175 controller: 'ForcedSettleDeleteController',176 controllerAs: 'vm',177 size: 'md',178 resolve: {179 entity: ['ForcedSettle', function(ForcedSettle) {180 return ForcedSettle.get({id : $stateParams.id}).$promise;181 }]182 }183 }).result.then(function() {184 $state.go('forced-settle', null, { reload: 'forced-settle' });185 }, function() {186 $state.go('^');187 });188 }]189 });190 }...

Full Screen

Full Screen

settle-apply.state.js

Source:settle-apply.state.js Github

copy

Full Screen

1(function() {2 'use strict';3 angular4 .module('aicheyideApp')5 .config(stateConfig);6 stateConfig.$inject = ['$stateProvider'];7 function stateConfig($stateProvider) {8 $stateProvider9 .state('settle-apply', {10 parent: 'entity',11 url: '/settle-apply?page&sort&search',12 data: {13 authorities: ['ROLE_USER'],14 pageTitle: 'SettleApplies'15 },16 views: {17 'content@': {18 templateUrl: 'app/entities/settle-apply/settle-applies.html',19 controller: 'SettleApplyController',20 controllerAs: 'vm'21 }22 },23 params: {24 page: {25 value: '1',26 squash: true27 },28 sort: {29 value: 'id,asc',30 squash: true31 },32 search: null33 },34 resolve: {35 pagingParams: ['$stateParams', 'PaginationUtil', function ($stateParams, PaginationUtil) {36 return {37 page: PaginationUtil.parsePage($stateParams.page),38 sort: $stateParams.sort,39 predicate: PaginationUtil.parsePredicate($stateParams.sort),40 ascending: PaginationUtil.parseAscending($stateParams.sort),41 search: $stateParams.search42 };43 }],44 }45 })46 .state('settle-apply-detail', {47 parent: 'settle-apply',48 url: '/settle-apply/{id}',49 data: {50 authorities: ['ROLE_USER'],51 pageTitle: 'SettleApply'52 },53 views: {54 'content@': {55 templateUrl: 'app/entities/settle-apply/settle-apply-detail.html',56 controller: 'SettleApplyDetailController',57 controllerAs: 'vm'58 }59 },60 resolve: {61 entity: ['$stateParams', 'SettleApply', function($stateParams, SettleApply) {62 return SettleApply.get({id : $stateParams.id}).$promise;63 }],64 previousState: ["$state", function ($state) {65 var currentStateData = {66 name: $state.current.name || 'settle-apply',67 params: $state.params,68 url: $state.href($state.current.name, $state.params)69 };70 return currentStateData;71 }]72 }73 })74 .state('settle-apply-detail.edit', {75 parent: 'settle-apply-detail',76 url: '/detail/edit',77 data: {78 authorities: ['ROLE_USER']79 },80 onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {81 $uibModal.open({82 templateUrl: 'app/entities/settle-apply/settle-apply-dialog.html',83 controller: 'SettleApplyDialogController',84 controllerAs: 'vm',85 backdrop: 'static',86 size: 'lg',87 resolve: {88 entity: ['SettleApply', function(SettleApply) {89 return SettleApply.get({id : $stateParams.id}).$promise;90 }]91 }92 }).result.then(function() {93 $state.go('^', {}, { reload: false });94 }, function() {95 $state.go('^');96 });97 }]98 })99 .state('settle-apply.new', {100 parent: 'settle-apply',101 url: '/new',102 data: {103 authorities: ['ROLE_USER']104 },105 onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {106 $uibModal.open({107 templateUrl: 'app/entities/settle-apply/settle-apply-dialog.html',108 controller: 'SettleApplyDialogController',109 controllerAs: 'vm',110 backdrop: 'static',111 size: 'lg',112 resolve: {113 entity: function () {114 return {115 driverId: null,116 vehicleId: null,117 companyId: null,118 plateNumber: null,119 driverName: null,120 settleType: null,121 receiptNumber: null,122 receiptDate: null,123 deductMarks: null,124 fine: null,125 pending: null,126 remark: null,127 status: null,128 id: null129 };130 }131 }132 }).result.then(function() {133 $state.go('settle-apply', null, { reload: 'settle-apply' });134 }, function() {135 $state.go('settle-apply');136 });137 }]138 })139 .state('settle-apply.edit', {140 parent: 'settle-apply',141 url: '/{id}/edit',142 data: {143 authorities: ['ROLE_USER']144 },145 onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {146 $uibModal.open({147 templateUrl: 'app/entities/settle-apply/settle-apply-dialog.html',148 controller: 'SettleApplyDialogController',149 controllerAs: 'vm',150 backdrop: 'static',151 size: 'lg',152 resolve: {153 entity: ['SettleApply', function(SettleApply) {154 return SettleApply.get({id : $stateParams.id}).$promise;155 }]156 }157 }).result.then(function() {158 $state.go('settle-apply', null, { reload: 'settle-apply' });159 }, function() {160 $state.go('^');161 });162 }]163 })164 .state('settle-apply.delete', {165 parent: 'settle-apply',166 url: '/{id}/delete',167 data: {168 authorities: ['ROLE_USER']169 },170 onEnter: ['$stateParams', '$state', '$uibModal', function($stateParams, $state, $uibModal) {171 $uibModal.open({172 templateUrl: 'app/entities/settle-apply/settle-apply-delete-dialog.html',173 controller: 'SettleApplyDeleteController',174 controllerAs: 'vm',175 size: 'md',176 resolve: {177 entity: ['SettleApply', function(SettleApply) {178 return SettleApply.get({id : $stateParams.id}).$promise;179 }]180 }181 }).result.then(function() {182 $state.go('settle-apply', null, { reload: 'settle-apply' });183 }, function() {184 $state.go('^');185 });186 }]187 });188 }...

Full Screen

Full Screen

SettleDetail.js

Source:SettleDetail.js Github

copy

Full Screen

1//====================结算详情===========================//2/**-----定义公共变量------**/3//AjaxURL4var mAjaxUrl = "../Settle/SettleDetail";5//结算单ID6var mSettleID = "";7/**------初始化------**/8$(function () {9 mSettleID = $("#hidSettleID").val().trim();10 //初始化商家结算申请信息11 initSettleApplyDetail(function () {12 });13});14//===================自定义函数===========================//15/**16 * 初始化商家结算申请信息17 * */18function initSettleApplyDetail(pCallBack) {19 if (mSettleID == "" || mSettleID == "0") {20 return;21 }22 //构造POST参数23 var dataPOST = {24 "Type": "3", "SettleID": mSettleID25 };26 console.log(dataPOST);27 //正式发送异步请求28 $.ajax({29 type: "POST",30 url: mAjaxUrl + "?rnd=" + Math.random(),31 data: dataPOST,32 dataType: "html",33 success: function (reTxt, status, xhr) {34 console.log("初始化商家结算申请信息=" + reTxt);35 //回调函数36 pCallBack();37 if (reTxt != "") {38 var _jsonReTxt = JSON.parse(reTxt);39 //为表单赋值40 //状态区41 if (_jsonReTxt.SettleStatus == "处理中") {42 $("#StatusTtitle").html("结算处理中");43 $("#StatusDesc").html("结算申请对账处理中,请保持联系电话畅通。");44 $(".order-status").css("background", "#FF6A00");45 }46 else if (_jsonReTxt.SettleStatus == "完成") {47 $("#StatusTtitle").html("结算完成");48 $("#StatusDesc").html("结算申请处理完成,结算转账成功,请核对是否收到结算转账金额!");49 $(".order-status").css("background", "#00BC40");50 }51 //结算转账金额52 var _SettleTransSum = parseFloat(_jsonReTxt.ApplySettleMoney) - parseFloat(_jsonReTxt.SumCommissionMoney);53 $("#SettleTransSum").html("&#165;" + formatNumberDotDigit(_SettleTransSum, 2) + "");54 $("#SettleID").html(_jsonReTxt.SettleID);55 $("#ApplySettleMoney").html("&#165;" + _jsonReTxt.ApplySettleMoney);56 $("#MallOrderSettleMoney").html("&#165;" + _jsonReTxt.MallOrderSettleMoney);57 $("#AggreOrderSettleMoney").html("&#165;" + _jsonReTxt.AggreOrderSettleMoney);58 $("#SumCommissionMoney").html("&#165;" + _jsonReTxt.SumCommissionMoney);59 $("#CountSettleOrder").html(_jsonReTxt.CountSettleOrder);60 $("#MallCountSettleOrder").html(_jsonReTxt.CountSettleMallOrder);61 $("#AggreCountSettleOrder").html(_jsonReTxt.CountSettleAggreOrder);62 $("#ApplyName").html(_jsonReTxt.ApplyName);63 $("#ApplyTel").html(_jsonReTxt.ApplyTel);64 $("#ApplyDate").html(_jsonReTxt.ApplyDate);65 //结算处理完成66 if (_jsonReTxt.SettleStatus == "完成") {67 $("#RealTransSum").html("&#165;" + _jsonReTxt.RealTransSum + "");68 $("#DisposeMan").html(_jsonReTxt.DisposeMan);69 $("#DisposeDate").html(_jsonReTxt.DisposeDate);70 var myJsValTransferVoucherImg = " <a href=\"" + _jsonReTxt.TransferVoucherImg + "\" target=\"_blank\"><img src=\"//" + _jsonReTxt.TransferVoucherImg + "\" /></a>";71 $("#TransferVoucherImg").html(myJsValTransferVoucherImg);72 }73 }74 },75 error: function (xhr, errorTxt, status) {76 console.log("异步请求错误,errorTxt=" + errorTxt + " | status=" + status);77 return;78 }79 });...

Full Screen

Full Screen

settleModal.js

Source:settleModal.js Github

copy

Full Screen

1"use strict";2// Similar to the IOU creation modal - see createIOUModal.js for comments.3angular.module('demoAppModule').controller('SettleModalCtrl', function($http, $uibModalInstance, $uibModal, apiBaseURL, id) {4 const settleModal = this;5 settleModal.id = id;6 settleModal.form = {};7 settleModal.formError = false;8 settleModal.settle = () => {9 if (invalidFormInput()) {10 settleModal.formError = true;11 } else {12 settleModal.formError = false;13 const id = settleModal.id;14 const amount = settleModal.form.amount;15 const currency = settleModal.form.currency;16 $uibModalInstance.close();17 const issueIOUEndpoint =18 apiBaseURL +19 `settle-iou?id=${id}&amount=${amount}&currency=${currency}`;20 $http.get(issueIOUEndpoint).then(21 (result) => settleModal.displayMessage(result),22 (result) => settleModal.displayMessage(result)23 );24 }25 };26 settleModal.displayMessage = (message) => {27 const settleMsgModal = $uibModal.open({28 templateUrl: 'settleMsgModal.html',29 controller: 'settleMsgModalCtrl',30 controllerAs: 'settleMsgModal',31 resolve: {32 message: () => message33 }34 });35 settleMsgModal.result.then(() => {}, () => {});36 };37 settleModal.cancel = () => $uibModalInstance.dismiss();38 function invalidFormInput() {39 return isNaN(settleModal.form.amount) || (settleModal.form.currency.length != 3);40 }41});42angular.module('demoAppModule').controller('settleMsgModalCtrl', function($uibModalInstance, message) {43 const settleMsgModal = this;44 settleMsgModal.message = message.data;...

Full Screen

Full Screen

settleInfo.js

Source:settleInfo.js Github

copy

Full Screen

1import axios from '@/libs/api.request'2export const GetList = (data) => {3 return axios.request({4 url: 'SettleInfo/settleInfo/List',5 method: 'post',6 data7 })8}9export const GetCreate = (data) => {10 return axios.request({11 url: 'SettleInfo/settleInfo/Create',12 method: 'post',13 data14 })15}16export const GetEdit = (data) => {17 return axios.request({18 url: 'SettleInfo/settleInfo/Edit',19 method: 'post',20 data21 })22}23export const GetShow = (data) => {24 return axios.request({25 url: 'SettleInfo/settleInfo/Show?guid=' + data,26 method: 'get',27 })28}29// delete department30export const deleteDepartment = (ids) => {31 return axios.request({32 url: 'SettleInfo/settleInfo/delete/' + ids,33 method: 'get'34 })35}36// batch command37export const batchCommand = (data) => {38 return axios.request({39 url: 'SettleInfo/settleInfo/batch',40 method: 'get',41 params: data42 })43}44//导入45export const GetImport = (data) => {46 return axios.request({47 url: 'SettleInfo/settleInfo/Import',48 method: 'post',49 data50 })51}52//导出53export const GetExportPass = (ids) => {54 return axios.request({55 url: 'SettleInfo/settleInfo/ExportPass?ids=' + ids,56 method: 'get'57 })...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const { B } = require('appium-base-driver');2const { BaseDriver } = require('appium-base-driver');3const { AndroidDriver } = require('appium-android-driver');4const { IOSDriver } = require('appium-ios-driver');5const driver = new AndroidDriver();6const driver2 = new IOSDriver();7const driver3 = new BaseDriver();8B.settle([driver, driver2, driver3])9 .then((result) => {10 console.log(result);11 })12 .catch((err) => {13 console.log(err);14 });15const { B } = require('appium-base-driver');16const { BaseDriver } = require('appium-base-driver');17const { AndroidDriver } = require('appium-android-driver');18const { IOSDriver } = require('appium-ios-driver');19const driver = new AndroidDriver();20const driver2 = new IOSDriver();21const driver3 = new BaseDriver();22B.settle([driver, driver2, driver3])23 .then((result) => {24 console.log(result);25 })26 .catch((err) => {27 console.log(err);28 });29const { B } = require('appium-base-driver');30const { BaseDriver } = require('appium-base-driver');31const { AndroidDriver } = require('appium-android-driver');32const { IOSDriver } = require('appium-ios-driver');33const driver = new AndroidDriver();34const driver2 = new IOSDriver();35const driver3 = new BaseDriver();36B.settle([driver, driver2, driver3])37 .then((result) => {38 console.log(result);39 })40 .catch((err) => {41 console.log(err);

Full Screen

Using AI Code Generation

copy

Full Screen

1const B = require('appium-base-driver');2const { inspect } = require('util');3const test = async () => {4 const promises = [Promise.resolve(1), Promise.resolve(2), Promise.resolve(3)];5 const results = await B.settle(promises);6 console.log(inspect(results, { depth: null }));7};8test();9[ { status: 'fulfilled', value: 1 },10 { status: 'fulfilled', value: 2 },11 { status: 'fulfilled', value: 3 } ]12Your name to display (optional):13Your name to display (optional):14const promises = [Promise.resolve(1), Promise.resolve(2), Promise.resolve(3)];15const results = await Promise.allSettled(promises);16console.log(results);17Your name to display (optional):18You can use the Promise.all() method to ...READ MORE19The Promise.all() method takes an iterable ...READ MORE20The Promise.all() method takes an iterable ...READ MORE21Promise.all() method takes an iterable of promises ...READ MORE22You can use the Promise.all() method to ...READ MORE23The Promise.all() method tak

Full Screen

Using AI Code Generation

copy

Full Screen

1import BaseDriver from 'appium-base-driver';2import B from 'appium-base-driver';3let baseDriver = new BaseDriver();4let baseDriver = new B();5B.settle(promise, ms, msg);6baseDriver.settle(promise, ms, msg);7import BaseDriver from 'appium-base-driver';8import B from 'appium-base-driver';9let baseDriver = new BaseDriver();10let baseDriver = new B();11B.resolve(promise, msg);12baseDriver.resolve(promise, msg);13import BaseDriver from 'appium-base-driver';14import B from 'appium-base-driver';15let baseDriver = new BaseDriver();16let baseDriver = new B();17B.reject(promise, msg);18baseDriver.reject(promise, msg);19import BaseDriver from 'appium-base-driver';20import B from 'appium-base-driver';21let baseDriver = new BaseDriver();22let baseDriver = new B();23B.waitForCondition(condition, waitMs, intervalMs, msg);

Full Screen

Using AI Code Generation

copy

Full Screen

1const B = require('appium-base-driver');2const { inspect } = require('util');3(async () => {4 let driver = new B();5 let res = await driver.settle();6 console.log(inspect(res));7})();8{9 value: { message: 'Settled' },10}

Full Screen

Using AI Code Generation

copy

Full Screen

1var B = require('appium-base-driver');2var driver = new B.BaseDriver();3driver.settle = function() {4 return 'settle called';5};6driver.settle().then(function() {7 console.log('settle called');8});9var B = require('appium-base-driver');10var driver = new B.BaseDriver();11driver.settle = function() {12 return 'settle called';13};14driver.settle().then(function() {15 console.log('settle called');16});17var B = require('appium-base-driver');18var driver = new B.BaseDriver();19driver.settle = function() {20 return 'settle called';21};22driver.settle().then(function() {23 console.log('settle called');24});25var B = require('appium-base-driver');26var driver = new B.BaseDriver();27driver.settle = function() {28 return 'settle called';29};30driver.settle().then(function() {31 console.log('settle called');32});33var B = require('appium-base-driver');34var driver = new B.BaseDriver();35driver.settle = function() {36 return 'settle called';37};38driver.settle().then(function() {39 console.log('settle called');40});41var B = require('appium-base-driver');42var driver = new B.BaseDriver();43driver.settle = function() {44 return 'settle called';45};46driver.settle().then(function() {47 console.log('settle called');48});49var B = require('appium-base-driver');50var driver = new B.BaseDriver();51driver.settle = function() {52 return 'settle called';53};54driver.settle().then(function() {55 console.log('settle called');56});57var B = require('appium-base-driver');58var driver = new B.BaseDriver();59driver.settle = function() {60 return 'settle called';61};62driver.settle().then(function() {63 console.log('settle called');64});

Full Screen

Using AI Code Generation

copy

Full Screen

1var B = require('appium-base-driver');2var a = new B();3var p = a.settle();4p.then(function (res) {5 console.log(res);6});7Appium version (or git revision) that exhibits the issue: 1.6.58Last Appium version that did not exhibit the issue (if applicable): NA9Node.js version (unless using Appium.app|exe): 6.9.1

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Appium Base Driver automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful