sale-client 3.6.310 → 3.6.311
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dev-server.js +108 -108
- package/build/versionCheck.js +29 -29
- package/package.json +120 -120
- package/src/components/FilesManage/AddHostMeterUserList.vue +185 -185
- package/src/components/FilesManage/AddSubMeterUserList.vue +185 -185
- package/src/components/FilesManage/FileAddressList.vue +141 -141
- package/src/components/FilesManage/FileMergeInfo.vue +68 -68
- package/src/components/FilesManage/FileUserAddress.vue +776 -776
- package/src/components/FilesManage/FileUserAddressChange.vue +65 -65
- package/src/components/FilesManage/FileUserFiles.vue +1073 -1073
- package/src/components/FilesManage/FileUserMerge.vue +203 -203
- package/src/components/FilesManage/HostMeterAdd.vue +219 -219
- package/src/components/FilesManage/HostMeterList.vue +323 -323
- package/src/components/FilesManage/HostMeterUserList.vue +270 -270
- package/src/components/FilesManage/MeterinfoTest.vue +1207 -1207
- package/src/components/FilesManage/TemplateManage.vue +167 -167
- package/src/components/FilesManage/TotalSplit/SplitList.vue +154 -154
- package/src/components/FilesManage/TotalSplit/TotalSplitList.vue +83 -83
- package/src/components/FilesManage/UserAddressCollection.vue +694 -694
- package/src/components/FilesManage/UserAddressInFile.vue +646 -646
- package/src/components/FilesManage/UserDeviceInfoTest.vue +410 -410
- package/src/components/FilesManage/UserEssentialInfoTest.vue +602 -602
- package/src/components/FilesManage/UserGeneralInfoTest.vue +800 -800
- package/src/components/FilesManage/UserPaperInfoTest.vue +63 -63
- package/src/components/FilesManageNew/FileAddressList.vue +138 -138
- package/src/components/FilesManageNew/FileMergeInfo.vue +68 -68
- package/src/components/FilesManageNew/FileUserAddress.vue +484 -484
- package/src/components/FilesManageNew/FileUserAddressChange.vue +65 -65
- package/src/components/FilesManageNew/FileUserFiles.vue +749 -749
- package/src/components/FilesManageNew/FileUserMerge.vue +202 -202
- package/src/components/FilesManageNew/MeterinfoTest.vue +831 -831
- package/src/components/FilesManageNew/TotalSplit/SplitList.vue +154 -154
- package/src/components/FilesManageNew/TotalSplit/TotalSplitList.vue +83 -83
- package/src/components/FilesManageNew/UserGeneralInfoTest.vue +692 -692
- package/src/components/MaterialsManage/MaterialsBase.vue +163 -163
- package/src/components/MaterialsManage/MaterialsList.vue +186 -186
- package/src/components/SellGasCharge/ChargeCancel/CardMeterChargeCancel.vue +395 -395
- package/src/components/SellGasCharge/MeterCharge/CustomInvoice.vue +282 -282
- package/src/components/SellGasCharge/MeterChargeforUser/ChargeUserCenter.vue +183 -183
- package/src/components/SellGasCharge/MeterChargeforUser/ChargeUserManager.vue +112 -112
- package/src/components/SellGasCharge/MeterChargeforUser/ChargeUserlist.vue +82 -82
- package/src/components/SellGasCharge/MeterTrace/MeterList.vue +142 -142
- package/src/components/SellGasCharge/MeterTrace/MeterTrace.vue +222 -222
- package/src/components/UserFiles/AdjustableBox/AddBox.vue +343 -343
- package/src/components/UserFiles/AdjustableBox/BOXUserList.vue +54 -54
- package/src/components/UserFiles/AdjustableBox/BoxList.vue +186 -186
- package/src/components/UserFiles/AreaList.vue +84 -84
- package/src/components/UserFiles/Meterinfo.vue +428 -428
- package/src/components/UserFiles/NewAreaInfo.vue +556 -556
- package/src/components/UserFiles/UserFiles.vue +459 -459
- package/src/components/UserFiles/UserGeneralInfo.vue +378 -378
- package/src/components/UserFiles/UserPriceChangeHistory.vue +66 -66
- package/src/components/UserFiles/UserPriceChangeManage.vue +662 -662
- package/src/components/UserFiles/XieKaUser/AddUser.vue +208 -208
- package/src/components/UserFiles/XieKaUser/UsersList.vue +269 -269
- package/src/components/UserFiles/XieKaUser/XieKaManager.vue +148 -148
- package/src/components/UserFiles/admissibility.vue +46 -46
- package/src/components/UserFiles/batchUpdateInputtor.vue +347 -347
- package/src/components/WechatManage/Knowledge.vue +439 -439
- package/src/components/WechatManage/KnowledgeAdd.vue +326 -326
- package/src/components/WechatManage/KnowledgeModify.vue +325 -325
- package/src/components/WechatManage/KnowledgeRecord.vue +64 -64
- package/src/components/WechatManage/OrderCenter/Step.vue +153 -153
- package/src/components/WechatManage/OrderCenter/orderList.vue +258 -258
- package/src/components/WechatManage/OutLets.vue +461 -461
- package/src/components/WechatManage/OutLetsRecord.vue +65 -65
- package/src/components/WechatManage/Stopgas.vue +240 -240
- package/src/components/WechatManage/UserNoticeList.vue +745 -745
- package/src/components/WechatManage/UserNoticeRecord.vue +106 -106
- package/src/components/archives/ArchivesAdd.vue +190 -190
- package/src/components/archives/ArchivesList.vue +219 -219
- package/src/components/archives/UserfilesList.vue +351 -351
- package/src/components/baichuan/ChangeTable.vue +284 -284
- package/src/components/baichuan/newTableInfo.vue +202 -202
- package/src/components/charge/ChargeList.vue +948 -948
- package/src/components/charge/ChargeManage.vue +316 -316
- package/src/components/charge/ChargeManageOther.vue +204 -204
- package/src/components/charge/ChargeManageSell.vue +202 -202
- package/src/components/charge/ChargeModal.vue +101 -101
- package/src/components/charge/ChargeOper.vue +285 -285
- package/src/components/charge/ChargeOtherOper.vue +195 -195
- package/src/components/charge/HandList.vue +121 -121
- package/src/components/charge/NfcCardReplacement.vue +88 -88
- package/src/components/charge/business/CardChangeFill.vue +627 -627
- package/src/components/charge/business/CardMeterCenter.vue +980 -980
- package/src/components/charge/business/ChangeMeterAddGas.vue +559 -559
- package/src/components/charge/business/DigitalCharge.vue +440 -440
- package/src/components/charge/business/FilesComplete.vue +254 -254
- package/src/components/charge/business/IOT/IotChangeFill.vue +488 -488
- package/src/components/charge/business/IOTMeterCenter.vue +871 -871
- package/src/components/charge/business/IotOpen.vue +78 -78
- package/src/components/charge/business/NoCardMeterCenter.vue +498 -498
- package/src/components/charge/business/OtherCharge.vue +341 -341
- package/src/components/charge/business/OtherChargeByPay.vue +477 -477
- package/src/components/charge/business/OtherChargeNew.vue +614 -614
- package/src/components/charge/business/PriceChangeCompensation/IotCompensation.vue +307 -307
- package/src/components/charge/business/PriceChangeCompensation/JbCompensation.vue +343 -343
- package/src/components/charge/business/PriceChangeCompensation/SurplusRecordDetail.vue +72 -72
- package/src/components/charge/business/RepairCharge.vue +347 -347
- package/src/components/charge/business/ReturnMoneyExamine.vue +274 -274
- package/src/components/charge/business/ShowCardSellGas.vue +931 -931
- package/src/components/charge/business/ShowCardSellGasJB.vue +202 -202
- package/src/components/charge/business/ShowCardSellGasWeb.vue +203 -203
- package/src/components/charge/business/ShowCiTiaoCard.vue +169 -169
- package/src/components/charge/business/depositCharge/DepositCharge.vue +461 -461
- package/src/components/charge/business/machine/MachineChangeFill.vue +81 -81
- package/src/components/charge/business/machine/MachineCharge.vue +173 -173
- package/src/components/charge/business/machine/MachineMeterCenter.vue +691 -691
- package/src/components/charge/business/machine/MachineMeterPartCenter.vue +389 -389
- package/src/components/charge/business/machine/MachinePartCharge.vue +143 -143
- package/src/components/charge/business/machine/OweList.vue +157 -157
- package/src/components/charge/business/refund/DropTableRefund.vue +229 -229
- package/src/components/charge/business/refund/IOTRefund.vue +267 -267
- package/src/components/charge/business/refund/machineRefund.vue +223 -223
- package/src/components/charge/business/refund_copy/IOTRefund.vue +237 -237
- package/src/components/charge/business/refund_copy/machineRefund.vue +193 -193
- package/src/components/charge/bzjcancel.vue +309 -309
- package/src/components/charge/detailinfo/DevicesDetail.vue +69 -69
- package/src/components/charge/detailinfo/OldmeterDetail.vue +88 -88
- package/src/components/charge/detailinfo/OtherChargeRecord.vue +81 -81
- package/src/components/charge/detailinfo/UserfilesDetail.vue +79 -79
- package/src/components/charge/detailinfo/UserinfoDetail.vue +66 -66
- package/src/components/charge/detailinfo/price/MixpriceDetail.vue +48 -48
- package/src/components/charge/detailinfo/price/StairpriceDetail.vue +129 -129
- package/src/components/charge/gasloss/gasLossDetail.vue +262 -262
- package/src/components/charge/gasloss/gasLossForm.vue +90 -90
- package/src/components/charge/gasloss/gasLossOperate.vue +383 -383
- package/src/components/charge/gasloss/gasLossRecords.vue +294 -294
- package/src/components/charge/gasmove.vue +249 -249
- package/src/components/chargeBatch/BatchCharge.vue +374 -374
- package/src/components/chargeBatch/BatchChargeDetail.vue +72 -72
- package/src/components/chargeBatch/CardList.vue +518 -518
- package/src/components/chargeBatch/ChargeBatchList.vue +460 -460
- package/src/components/chargeBatch/ChargeGroupList.vue +337 -337
- package/src/components/chargeBatch/ChargeManageBatch.vue +214 -214
- package/src/components/chargeBatch/ChargeManageGroup.vue +216 -216
- package/src/components/chargeBatch/OweRecordQuery.vue +126 -126
- package/src/components/chargeBatch/RecordCancel.vue +346 -346
- package/src/components/chargeBatch/ReissueBillBatch.vue +97 -97
- package/src/components/chargeBatch/groupFeeDeduction.vue +118 -118
- package/src/components/chargeBatch/groupRefund.vue +181 -181
- package/src/components/chargeNew/BookBill.vue +121 -121
- package/src/components/chargeNew/ChargeList.vue +934 -934
- package/src/components/chargeNew/ChargeManageNew.vue +232 -232
- package/src/components/chargeNew/ChargeOper.vue +234 -234
- package/src/components/chargeNew/MeterReset.vue +81 -81
- package/src/components/chargeNew/SendBook.vue +107 -107
- package/src/components/chargeNew/thirdSurplus.vue +356 -356
- package/src/components/common/limit/LimitHistory.vue +299 -299
- package/src/components/common/limit/LimitList.vue +634 -634
- package/src/components/common/searchuploadfile/uploadFileSearch.vue +138 -138
- package/src/components/common/searchuploadfile/uploadFilesHistory.vue +187 -187
- package/src/components/common/userinfo_detail/SplitPrice.vue +354 -354
- package/src/components/common/userinfo_detail/TableUsageChart.vue +81 -81
- package/src/components/common/userinfo_detail/UserBaseInfo.vue +379 -379
- package/src/components/common/userinfo_detail/UserBaseInfoNew.vue +672 -672
- package/src/components/common/userinfo_detail/UserInfoDetailManage.vue +143 -143
- package/src/components/common/userinfo_detail/UserInfoDetailManageNew.vue +218 -218
- package/src/components/common/userinfo_detail/contractSig.vue +51 -51
- package/src/components/common/userinfo_detail/contractSigningBrain.vue +109 -109
- package/src/components/common/userinfo_detail/ic_detail/AutomaticPurse.vue +299 -299
- package/src/components/common/userinfo_detail/ic_detail/CardHandRecord.vue +268 -268
- package/src/components/common/userinfo_detail/ic_detail/ChangeMeterQueryUser.vue +240 -240
- package/src/components/common/userinfo_detail/ic_detail/ChangeRecord.vue +235 -235
- package/src/components/common/userinfo_detail/ic_detail/ChargeQueryUser.vue +530 -530
- package/src/components/common/userinfo_detail/ic_detail/ChargeRecordQuery.vue +102 -102
- package/src/components/common/userinfo_detail/ic_detail/DeveiceRecord.vue +251 -251
- package/src/components/common/userinfo_detail/ic_detail/FillCardQueryUser.vue +210 -210
- package/src/components/common/userinfo_detail/ic_detail/FillGasQueryUser.vue +229 -229
- package/src/components/common/userinfo_detail/ic_detail/HandQueryUser.vue +387 -387
- package/src/components/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +261 -261
- package/src/components/common/userinfo_detail/ic_detail/MeterParam.vue +152 -152
- package/src/components/common/userinfo_detail/ic_detail/OtherChargeQueryUser.vue +251 -251
- package/src/components/common/userinfo_detail/ic_detail/OtherChargeQueryUserDetail.vue +81 -81
- package/src/components/common/userinfo_detail/ic_detail/PriceAdjustmentQueryUser.vue +313 -313
- package/src/components/common/userinfo_detail/ic_detail/PriceChangeQueryUser.vue +194 -194
- package/src/components/common/userinfo_detail/ic_detail/RecordQueryUser.vue +252 -252
- package/src/components/common/userinfo_detail/ic_detail/Repurchase.vue +132 -132
- package/src/components/common/userinfo_detail/ic_detail/TransferQueryUser.vue +223 -223
- package/src/components/common/userinfo_detail/ic_detail/UserDeviceQuery.vue +252 -252
- package/src/components/common/userinfo_detail/ic_detail/WebAutomaticPurse.vue +298 -298
- package/src/components/common/userinfo_detail/ic_detail/WebChargeQueryUser.vue +378 -378
- package/src/components/common/userinfo_detail/ic_detail/WebHandQueryUser.vue +368 -368
- package/src/components/common/userinfo_detail/ic_detail/contractSigningList.vue +117 -117
- package/src/components/common/userinfo_detail/iot_detail/QueryHistoryInstruct.vue +304 -304
- package/src/components/common/userinfo_detail/iot_detail/QueryInstruct.vue +342 -342
- package/src/components/common/userinfo_detail/iot_detail/WatchCollection.vue +115 -115
- package/src/components/common/userinfo_detail/iot_detail/WatchDealWarning.vue +236 -236
- package/src/components/cooker/WareRecord.vue +85 -85
- package/src/components/matchmakingManagement/PlatformAddEdit.vue +145 -145
- package/src/components/matchmakingManagement/PlatformList.vue +150 -150
- package/src/components/meterBook/MeterList.vue +187 -187
- package/src/components/meterBook/MeterMsg.vue +194 -194
- package/src/components/meterBook/addMeterBook.vue +153 -153
- package/src/components/meterBook/addUserToBook.vue +155 -155
- package/src/components/newBill/CardList.vue +536 -536
- package/src/components/newBill/CardMeterCenter.vue +902 -902
- package/src/components/newBill/IOTMeterCenter.vue +797 -797
- package/src/components/newBill/NoCardMeterCenter.vue +466 -466
- package/src/components/newBill/PrintBill.vue +146 -146
- package/src/components/newBill/ReissueBill.vue +329 -329
- package/src/components/newpriceadjustment/NewPriceAdjustment.vue +906 -906
- package/src/components/newpriceadjustment/NewPriceAdjustmentSell.vue +596 -596
- package/src/components/newpriceadjustment/NewPriceAdjustmentWebmeter.vue +600 -600
- package/src/components/priceadjustment/adjustPrice.vue +121 -121
- package/src/components/priceadjustment/adjustUser.vue +247 -247
- package/src/components/revenue/Common/EticketModal.vue +95 -95
- package/src/components/revenue/Common/EticketPrint.vue +230 -230
- package/src/components/revenue/Common/EticketPrintAsync.vue +196 -196
- package/src/components/revenue/Common/LimitGas.vue +231 -231
- package/src/components/revenue/Common/MeterMessage.vue +184 -184
- package/src/components/revenue/Common/Movemeter.vue +467 -467
- package/src/components/revenue/Common/PaymentCode.vue +159 -159
- package/src/components/revenue/Common/PrintBill.vue +134 -134
- package/src/components/revenue/Common/ReissueBill.vue +294 -294
- package/src/components/revenue/Common/ValidateBill.vue +56 -56
- package/src/components/revenue/Common/batchDisable.vue +503 -503
- package/src/components/revenue/Common/uploadFiles.vue +503 -503
- package/src/components/revenue/Common/userFlowSheet.vue +154 -154
- package/src/components/revenue/HandManager/CardHand.vue +873 -873
- package/src/components/revenue/HandManager/EstimateCardManager.vue +1184 -1184
- package/src/components/revenue/HandManager/EstimateManager.vue +1769 -1769
- package/src/components/revenue/HandManager/HandManager.vue +1831 -1831
- package/src/components/revenue/HandManager/HandManagerCard.vue +1163 -1163
- package/src/components/revenue/HandManager/MbpeopleList.vue +498 -498
- package/src/components/revenue/HandManager/MeterBookAdd.vue +396 -396
- package/src/components/revenue/HandManager/MeterBookList.vue +488 -488
- package/src/components/revenue/HandManager/MeterBookUser.vue +724 -724
- package/src/components/revenue/HandManager/OverdueSetList.vue +295 -295
- package/src/components/revenue/HandManager/OverdueSetUser.vue +93 -93
- package/src/components/revenue/HandManager/PriceAdjustment.vue +377 -377
- package/src/components/revenue/HandManager/PriceAdjustmentCard.vue +377 -377
- package/src/components/revenue/HandManager/PriceAdjustmentSelling.vue +377 -377
- package/src/components/revenue/HandManager/PriceAdjustmentWebmeter.vue +430 -430
- package/src/components/revenue/HandManager/RemainAdjustment.vue +282 -282
- package/src/components/revenue/HandManager/VolumeAdjustment/VolumeAdjustmentManage.vue +406 -406
- package/src/components/revenue/HandManager/meterbookEntry.vue +90 -90
- package/src/components/revenue/HandManager/openEticket/HandUserManage.vue +154 -154
- package/src/components/revenue/HandManager/openEticket/HasOpenHand.vue +149 -149
- package/src/components/revenue/HandManager/openEticket/HasOpenReceipt.vue +137 -137
- package/src/components/revenue/HandManager/openEticket/UnOpenHand.vue +167 -167
- package/src/components/revenue/HandManager/openEticket/UnOpenReceipt.vue +221 -221
- package/src/components/revenue/HandManager/qtxCardHand/GassaleHand.vue +228 -228
- package/src/components/revenue/HandManager/qtxCardHand/TrqtmHand.vue +292 -292
- package/src/components/revenue/IssuanceManagement/batchCardIssuance.vue +339 -339
- package/src/components/revenue/analysis/FarawayQuery.vue +392 -392
- package/src/components/revenue/analysis/outStockQuery.vue +288 -288
- package/src/components/revenue/bank/BankForm.vue +156 -156
- package/src/components/revenue/bank/BankList.vue +143 -143
- package/src/components/revenue/bank/bankOffer.vue +199 -199
- package/src/components/revenue/bank/bankReturn.vue +217 -217
- package/src/components/revenue/base/GasWaterSearch.vue +195 -195
- package/src/components/revenue/base/PurchaseWater.vue +237 -237
- package/src/components/revenue/base/UserList.vue +480 -480
- package/src/components/revenue/base/leftview/CheckGas.vue +55 -55
- package/src/components/revenue/base/leftview/MeterUse.vue +140 -140
- package/src/components/revenue/base/leftview/MixPriceInfo.vue +60 -60
- package/src/components/revenue/base/leftview/RecordStoryinfo.vue +131 -131
- package/src/components/revenue/base/leftview/SafeCheck.vue +339 -339
- package/src/components/revenue/base/leftview/ServiceRepair.vue +128 -128
- package/src/components/revenue/base/leftview/Stairinfo.vue +156 -156
- package/src/components/revenue/base/leftview/UserFees.vue +57 -57
- package/src/components/revenue/base/leftview/Userinfo.vue +279 -279
- package/src/components/revenue/base/leftview/billMessage.vue +125 -125
- package/src/components/revenue/base/rightview/CardList.vue +558 -558
- package/src/components/revenue/base/rightview/InstallCardList.vue +298 -298
- package/src/components/revenue/base/rightview/RecordCancel.vue +338 -338
- package/src/components/revenue/base/rightview/canceldetail/AutoaccountsCancelDetail.vue +82 -82
- package/src/components/revenue/base/rightview/canceldetail/CardmetercenterCancelDetail.vue +64 -64
- package/src/components/revenue/base/rightview/canceldetail/ChangeMeterCancelDetail.vue +76 -76
- package/src/components/revenue/base/rightview/canceldetail/IOTMeterCenterCancelDetail.vue +62 -62
- package/src/components/revenue/base/rightview/canceldetail/MachinemetercenterCancelDetail.vue +86 -86
- package/src/components/revenue/base/rightview/canceldetail/OtherchargeCancelDetail.vue +62 -62
- package/src/components/revenue/base/rightview/canceldetail/ReplacecardmanageCancelDetail.vue +59 -59
- package/src/components/revenue/base/rightview/canceldetail/TransfermanageCancelDetail.vue +63 -63
- package/src/components/revenue/base/rightview/carddetail/AddUserDetail.vue +62 -62
- package/src/components/revenue/base/rightview/carddetail/AdvanceDeliveryDetail.vue +50 -50
- package/src/components/revenue/base/rightview/carddetail/AutoAccountsDetail.vue +77 -77
- package/src/components/revenue/base/rightview/carddetail/BankDKDetail.vue +77 -77
- package/src/components/revenue/base/rightview/carddetail/BankPay.vue +79 -79
- package/src/components/revenue/base/rightview/carddetail/BlacklistDetail.vue +63 -63
- package/src/components/revenue/base/rightview/carddetail/BuildFeeDetail.vue +77 -77
- package/src/components/revenue/base/rightview/carddetail/CancellationDetail.vue +58 -58
- package/src/components/revenue/base/rightview/carddetail/CardMeterCenterDetail.vue +72 -72
- package/src/components/revenue/base/rightview/carddetail/CardOverUserDetail.vue +64 -64
- package/src/components/revenue/base/rightview/carddetail/ChangeFeeDetail.vue +116 -116
- package/src/components/revenue/base/rightview/carddetail/ChangeFlowmeterDetail.vue +119 -119
- package/src/components/revenue/base/rightview/carddetail/ChangeMeterDetail.vue +80 -80
- package/src/components/revenue/base/rightview/carddetail/DisableManageDetail.vue +60 -60
- package/src/components/revenue/base/rightview/carddetail/EnableManageDetail.vue +53 -53
- package/src/components/revenue/base/rightview/carddetail/FeeDeductionDetail.vue +70 -70
- package/src/components/revenue/base/rightview/carddetail/GarbageDetail.vue +59 -59
- package/src/components/revenue/base/rightview/carddetail/GasLossDetail.vue +52 -52
- package/src/components/revenue/base/rightview/carddetail/GasPriceChangeDetail.vue +58 -58
- package/src/components/revenue/base/rightview/carddetail/IOTMeterCenterDetail.vue +62 -62
- package/src/components/revenue/base/rightview/carddetail/InputtorChangeDetail.vue +59 -59
- package/src/components/revenue/base/rightview/carddetail/MachineMeterCenterDetail.vue +72 -72
- package/src/components/revenue/base/rightview/carddetail/OffGasAddGasDetail.vue +68 -68
- package/src/components/revenue/base/rightview/carddetail/OpenMeterDetail.vue +48 -48
- package/src/components/revenue/base/rightview/carddetail/OtherChargeDetail.vue +67 -67
- package/src/components/revenue/base/rightview/carddetail/OverUserChangeDetail.vue +61 -61
- package/src/components/revenue/base/rightview/carddetail/PriceAdjustmentDetail.vue +76 -76
- package/src/components/revenue/base/rightview/carddetail/ReduceFeeDetail.vue +77 -77
- package/src/components/revenue/base/rightview/carddetail/RefundDetail.vue +62 -62
- package/src/components/revenue/base/rightview/carddetail/ReissueBill.vue +111 -111
- package/src/components/revenue/base/rightview/carddetail/RepairFeeDeduction.vue +70 -70
- package/src/components/revenue/base/rightview/carddetail/ReplaceCardManageDetail.vue +51 -51
- package/src/components/revenue/base/rightview/carddetail/ReturnMoney.vue +52 -52
- package/src/components/revenue/base/rightview/carddetail/SalecardgasDetail.vue +62 -62
- package/src/components/revenue/base/rightview/carddetail/StopApplyDetail.vue +70 -70
- package/src/components/revenue/base/rightview/carddetail/TransferManageDetail.vue +61 -61
- package/src/components/revenue/base/rightview/carddetail/UserChangeDetail.vue +79 -79
- package/src/components/revenue/base/rightview/carddetail/WeChatPay.vue +79 -79
- package/src/components/revenue/base/rightview/carddetail/WithGas.vue +70 -70
- package/src/components/revenue/base/rightview/carddetail/machineCardDetail.vue +48 -48
- package/src/components/revenue/base/rightview/carddetail/movegasDetail.vue +66 -66
- package/src/components/revenue/base/rightview/carddetail/movemeterdetail.vue +74 -74
- package/src/components/revenue/base/rightview/reissuebill/OtherBill.vue +197 -197
- package/src/components/revenue/base/rightview/valueaddinfo.vue +325 -325
- package/src/components/revenue/batchDeduction/batchDeduction.vue +47 -47
- package/src/components/revenue/batchDeduction/batchDeductionList.vue +238 -238
- package/src/components/revenue/batchDeduction/batchDeductionOper.vue +119 -119
- package/src/components/revenue/batchPreloads/batchPreloads.vue +41 -41
- package/src/components/revenue/batchPreloads/batchPreloadsCharge.vue +117 -117
- package/src/components/revenue/batchPreloads/batchPreloadsList.vue +234 -234
- package/src/components/revenue/cancelHandplan/IotHandplanCanel.vue +88 -88
- package/src/components/revenue/cardHandManage/cardDown.vue +1112 -1112
- package/src/components/revenue/cardHandManage/cardHandAudit.vue +483 -483
- package/src/components/revenue/cardHandManage/cardsHand.vue +891 -891
- package/src/components/revenue/changeInsurance/InsuranceAdd.vue +411 -411
- package/src/components/revenue/changeInsurance/InsuranceChargesDetails.vue +405 -405
- package/src/components/revenue/changeInsurance/InsuranceList.vue +264 -264
- package/src/components/revenue/changeInsurance/InsuranceRecord.vue +129 -129
- package/src/components/revenue/changeInsurance/UserInsurance.vue +77 -77
- package/src/components/revenue/comprehen/Bill/CustQueryEticket.vue +271 -271
- package/src/components/revenue/comprehen/Bill/CustomInvoice.vue +327 -327
- package/src/components/revenue/comprehen/Bill/Eticket/EticketOpenCard.vue +331 -331
- package/src/components/revenue/comprehen/Bill/Eticket/EticketOpenJBPage.vue +311 -311
- package/src/components/revenue/comprehen/Bill/Eticket/EticketOpenPage.vue +329 -329
- package/src/components/revenue/comprehen/Bill/Eticket/EticketRecordList.vue +269 -269
- package/src/components/revenue/comprehen/Bill/EticketManage.vue +198 -198
- package/src/components/revenue/comprehen/Bill/EticketRecordList.vue +354 -354
- package/src/components/revenue/comprehen/Bill/EticketV4/CustQueryEticket.vue +333 -333
- package/src/components/revenue/comprehen/Bill/EticketV4/EticketManage.vue +67 -67
- package/src/components/revenue/comprehen/Bill/EticketV4/EticketOpenCard.vue +348 -348
- package/src/components/revenue/comprehen/Bill/EticketV4/EticketOpenJBPage.vue +349 -349
- package/src/components/revenue/comprehen/Bill/EticketV4/EticketOpenPage.vue +340 -340
- package/src/components/revenue/comprehen/Bill/EticketV4/EticketRecordList.vue +400 -400
- package/src/components/revenue/comprehen/Bill/asyncEticket/CustQueryEticketAsync.vue +308 -308
- package/src/components/revenue/comprehen/Bill/paper/AddBill.vue +186 -186
- package/src/components/revenue/comprehen/Bill/paper/BillChangeDetail.vue +57 -57
- package/src/components/revenue/comprehen/Bill/paper/BillDetail.vue +289 -289
- package/src/components/revenue/comprehen/Bill/paper/BillList.vue +238 -238
- package/src/components/revenue/comprehen/Bill/paperbill/DistributionDetail.vue +186 -186
- package/src/components/revenue/comprehen/Bill/paperbill/DistributionGather.vue +139 -139
- package/src/components/revenue/comprehen/CardManage/CardAllotEdit.vue +171 -171
- package/src/components/revenue/comprehen/CardManage/CardAllotList.vue +110 -110
- package/src/components/revenue/comprehen/CardManage/CardDetailEdit.vue +130 -130
- package/src/components/revenue/comprehen/CardManage/CardDetailList.vue +110 -110
- package/src/components/revenue/comprehen/ComprehenOperation/BankPayment/BankPayment.vue +300 -300
- package/src/components/revenue/comprehen/ComprehenOperation/BankPayment/BankPaymentConstrast.vue +301 -301
- package/src/components/revenue/comprehen/ComprehenOperation/BatchChange/BatchCancellation.vue +245 -245
- package/src/components/revenue/comprehen/ComprehenOperation/BatchChange/ChangeMeterReader.vue +93 -93
- package/src/components/revenue/comprehen/ComprehenOperation/ChangeAccount/TransferManage.vue +533 -533
- package/src/components/revenue/comprehen/ComprehenOperation/ChangeAccount/TransferRecords.vue +236 -236
- package/src/components/revenue/comprehen/ComprehenOperation/ChangeAccount/Transferlist.vue +209 -209
- package/src/components/revenue/comprehen/ComprehenOperation/ChangeMeter/ChangeNewMeter.vue +562 -562
- package/src/components/revenue/comprehen/ComprehenOperation/ChangeMeter/IOTMeter.vue +133 -133
- package/src/components/revenue/comprehen/ComprehenOperation/ChangeMeter/MachineMeter.vue +114 -114
- package/src/components/revenue/comprehen/ComprehenOperation/FeeDeduction/feeDeduction.vue +201 -201
- package/src/components/revenue/comprehen/ComprehenOperation/FeeDeduction/feeMachine.vue +169 -169
- package/src/components/revenue/comprehen/ComprehenOperation/GiftFee/icTable.vue +255 -255
- package/src/components/revenue/comprehen/ComprehenOperation/GiftFee/iotTable.vue +162 -162
- package/src/components/revenue/comprehen/ComprehenOperation/MeterDisable/DisableManage.vue +95 -95
- package/src/components/revenue/comprehen/ComprehenOperation/MeterEnable/EnableManage.vue +186 -186
- package/src/components/revenue/comprehen/ComprehenOperation/OffGasAddGas/OffGasAddGas.vue +335 -335
- package/src/components/revenue/comprehen/ComprehenOperation/OrderDetails/OrderDetails.vue +412 -412
- package/src/components/revenue/comprehen/ComprehenOperation/OtherGas/OtherGas.vue +508 -508
- package/src/components/revenue/comprehen/ComprehenOperation/OverCharge/OverUseCharge.vue +438 -438
- package/src/components/revenue/comprehen/ComprehenOperation/PriceJustment/priceJustment.vue +124 -124
- package/src/components/revenue/comprehen/ComprehenOperation/RefundManage/RefundManage.vue +254 -254
- package/src/components/revenue/comprehen/ComprehenOperation/ReplaceCard/MachineCardBill.vue +92 -92
- package/src/components/revenue/comprehen/ComprehenOperation/ReplaceCard/ReplaceCardManage.vue +415 -415
- package/src/components/revenue/comprehen/ComprehenOperation/SellRecordChange/SellRecord.vue +83 -83
- package/src/components/revenue/comprehen/ComprehenOperation/SellRecordChange/UserinfoList.vue +74 -74
- package/src/components/revenue/comprehen/ComprehenOperation/newchangemeter/ChangeMeter.vue +1149 -1149
- package/src/components/revenue/comprehen/ComprehenOperation/newchangemeter/ResetMeter.vue +1101 -1101
- package/src/components/revenue/comprehen/ComprehenOperation/removeTable.vue +235 -235
- package/src/components/revenue/comprehen/ComprehenOperation/removeTableCancel.vue +136 -136
- package/src/components/revenue/comprehen/ComprehenOperation/resetShowCardgas/ResetShowCardGas.vue +163 -163
- package/src/components/revenue/comprehen/ComprehenOperation/wallheating/WallheatingInfoAdd.vue +174 -174
- package/src/components/revenue/comprehen/Exemption/GasFeeReduction.vue +250 -250
- package/src/components/revenue/comprehen/Maintenance/T+MoneyDocking/moneyDocking.vue +202 -202
- package/src/components/revenue/comprehen/Maintenance/T+MoneyDocking/moneyDockingTow.vue +169 -169
- package/src/components/revenue/comprehen/Maintenance/bill/billListMaintain.vue +160 -160
- package/src/components/revenue/comprehen/Maintenance/bill/billOperate.vue +266 -266
- package/src/components/revenue/comprehen/Maintenance/bill/billRecordMaintain.vue +119 -119
- package/src/components/revenue/comprehen/Maintenance/changeMeter/changemeterListMaintain.vue +374 -374
- package/src/components/revenue/comprehen/Maintenance/changeMeter/changemeterOperate.vue +283 -283
- package/src/components/revenue/comprehen/Maintenance/changeMeter/maintenanceChangeMeterRecords.vue +148 -148
- package/src/components/revenue/comprehen/Maintenance/fillgas/fillgasRecordMaintain.vue +148 -148
- package/src/components/revenue/comprehen/Maintenance/fillgas/fillgasRecordMaintainList.vue +337 -337
- package/src/components/revenue/comprehen/Maintenance/fillgas/fillgasSpecific.vue +297 -297
- package/src/components/revenue/comprehen/Maintenance/group/MeterOperatemaingroup.vue +394 -394
- package/src/components/revenue/comprehen/Maintenance/group/StockListmaingroup.vue +477 -477
- package/src/components/revenue/comprehen/Maintenance/group/maintenancegroup.vue +149 -149
- package/src/components/revenue/comprehen/Maintenance/hand/handListMaintain.vue +640 -640
- package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
- package/src/components/revenue/comprehen/Maintenance/hand/maintenanceHandmeterRecords.vue +148 -148
- package/src/components/revenue/comprehen/Maintenance/otherRecords/OtherMaintenanceLists.vue +233 -233
- package/src/components/revenue/comprehen/Maintenance/otherRecords/Otherrecordmaintenance.vue +173 -173
- package/src/components/revenue/comprehen/Maintenance/otherRecords/specificInformation.vue +416 -416
- package/src/components/revenue/comprehen/Maintenance/pictureManage/pictureListMaintain.vue +377 -377
- package/src/components/revenue/comprehen/Maintenance/revenue/MeterOperatemain.vue +397 -397
- package/src/components/revenue/comprehen/Maintenance/revenue/StockListmain.vue +529 -529
- package/src/components/revenue/comprehen/Maintenance/revenue/maintenance.vue +150 -150
- package/src/components/revenue/comprehen/Message/AllUser.vue +608 -608
- package/src/components/revenue/comprehen/Message/AllUserNew.vue +617 -617
- package/src/components/revenue/comprehen/Message/ArrearsList.vue +397 -397
- package/src/components/revenue/comprehen/Message/MessageList.vue +635 -635
- package/src/components/revenue/comprehen/Message/TemplateMessage.vue +92 -92
- package/src/components/revenue/comprehen/Message/UserDefinedMessage.vue +90 -90
- package/src/components/revenue/comprehen/Message/UserDefinedMessageNew.vue +114 -114
- package/src/components/revenue/comprehen/PreferentialPolicies/PrivilegeEdit.vue +257 -257
- package/src/components/revenue/comprehen/PreferentialPolicies/PrivilegeList.vue +135 -135
- package/src/components/revenue/comprehen/ResourceRecord/ResourceRecordQuery.vue +186 -186
- package/src/components/revenue/comprehen/SpecialUser/BasicLiving/BasicLiving.vue +277 -277
- package/src/components/revenue/comprehen/SpecialUser/BasicLiving/BasicLivingList.vue +280 -280
- package/src/components/revenue/comprehen/SpecialUser/BasicLiving/UpdateBasicLiving.vue +59 -59
- package/src/components/revenue/comprehen/SpecialUser/BasicLiving/stopBasicLiving.vue +171 -171
- package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackList.vue +290 -290
- package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackListDetail.vue +71 -71
- package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackListList.vue +275 -275
- package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackListRecord.vue +62 -62
- package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackModal.vue +211 -211
- package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackRecordQuery.vue +211 -211
- package/src/components/revenue/comprehen/StairPrice/GasPrice.vue +521 -521
- package/src/components/revenue/comprehen/StairPrice/GasPriceList.vue +319 -319
- package/src/components/revenue/comprehen/StairPrice/GasPriceUser.vue +485 -485
- package/src/components/revenue/comprehen/StairPrice/PriceChangeDetail.vue +76 -76
- package/src/components/revenue/comprehen/StairPrice/PriceChangeHistory.vue +71 -71
- package/src/components/revenue/comprehen/StairPrice/PriceRecord.vue +138 -138
- package/src/components/revenue/comprehen/StairPrice/UpdateInfo.vue +68 -68
- package/src/components/revenue/comprehen/ToolCard/CardTypeDetail.vue +191 -191
- package/src/components/revenue/comprehen/TotalSplit/AllUserFiles.vue +120 -120
- package/src/components/revenue/comprehen/TotalSplit/SplitList.vue +264 -264
- package/src/components/revenue/comprehen/TotalSplit/TotalSplitList.vue +126 -126
- package/src/components/revenue/comprehen/TotalSplit/TotalSplitManage.vue +46 -46
- package/src/components/revenue/comprehen/alipay/alipayConstrast.vue +291 -291
- package/src/components/revenue/comprehen/alipay/alipayDetail.vue +395 -395
- package/src/components/revenue/comprehen/batch/batchEditFiles.vue +237 -237
- package/src/components/revenue/comprehen/batch/batchEditHistory.vue +93 -93
- package/src/components/revenue/comprehen/batch/batchEditManage.vue +131 -131
- package/src/components/revenue/comprehen/batch/batchUserList.vue +327 -327
- package/src/components/revenue/comprehen/closeaccount/Closeaccount.vue +190 -190
- package/src/components/revenue/comprehen/closeaccount/battchcancelaudit.vue +419 -419
- package/src/components/revenue/comprehen/common/ImportExcel.vue +133 -133
- package/src/components/revenue/comprehen/device/deviceEdit.vue +106 -106
- package/src/components/revenue/comprehen/device/deviceList.vue +146 -146
- package/src/components/revenue/comprehen/gasbrand/AddGasBrand.vue +512 -512
- package/src/components/revenue/comprehen/gasbrand/AddGasMeterInitParam.vue +153 -153
- package/src/components/revenue/comprehen/gasbrand/AddGasModel.vue +122 -122
- package/src/components/revenue/comprehen/gasbrand/AddGasModelInfo.vue +128 -128
- package/src/components/revenue/comprehen/gasbrand/AddJsonParameter.vue +163 -163
- package/src/components/revenue/comprehen/gasbrand/AddUseringOrg.vue +177 -177
- package/src/components/revenue/comprehen/gasbrand/GasBrandList.vue +241 -241
- package/src/components/revenue/comprehen/gasbrand/GasBrandUser.vue +185 -185
- package/src/components/revenue/comprehen/gasbrand/GasModelInfo.vue +93 -93
- package/src/components/revenue/comprehen/gasbrand/Parames.vue +293 -293
- package/src/components/revenue/comprehen/gasbrand/ViewOrg.vue +43 -43
- package/src/components/revenue/comprehen/handAudit/MeterReadAudit.vue +392 -392
- package/src/components/revenue/comprehen/insurance/insuranceGuanL.vue +337 -337
- package/src/components/revenue/comprehen/ovdue/Overduetax.vue +624 -624
- package/src/components/revenue/comprehen/posQuery/PosQueryList.vue +430 -430
- package/src/components/revenue/comprehen/replacement/replaceMentList.vue +412 -412
- package/src/components/revenue/comprehen/replacement/replacementHandInfoRecord.vue +155 -155
- package/src/components/revenue/comprehen/replacement/replacementSingleInfoOperation.vue +296 -296
- package/src/components/revenue/comprehen/wechatpay/WeChatPayContrast.vue +327 -327
- package/src/components/revenue/comprehen/wechatpay/WeChatPayDetail.vue +448 -448
- package/src/components/revenue/comprehen/wechatpay/WeChatPayPos.vue +177 -177
- package/src/components/revenue/comprehen/wechatpay/wechatValidateManage.vue +303 -303
- package/src/components/revenue/concentrator/ncAddressList.vue +141 -141
- package/src/components/revenue/concentrator/ncArchivesAdd.vue +646 -646
- package/src/components/revenue/concentrator/ncArchivesList.vue +199 -199
- package/src/components/revenue/concentrator/ncUserfilesList.vue +391 -391
- package/src/components/revenue/concentrator/ncUserfilesList2.vue +478 -478
- package/src/components/revenue/dispatch/dispatchDown.vue +402 -402
- package/src/components/revenue/dispatch/dispatchList.vue +430 -430
- package/src/components/revenue/dispatch/showList.vue +83 -83
- package/src/components/revenue/invoiceuse/CompanyTitleInput.vue +98 -98
- package/src/components/revenue/invoiceuse/InvoiceChargeList.vue +301 -301
- package/src/components/revenue/invoiceuse/InvoiceEntry.vue +78 -78
- package/src/components/revenue/invoiceuse/InvoiceGoodsInfoEntry.vue +140 -140
- package/src/components/revenue/invoiceuse/InvoiceGoodsInput.vue +90 -90
- package/src/components/revenue/invoiceuse/InvoiceInfoEntry.vue +142 -142
- package/src/components/revenue/invoiceuse/InvoiceInformationInput.vue +110 -110
- package/src/components/revenue/invoiceuse/InvoiceUse.vue +269 -269
- package/src/components/revenue/machineHandManage/ArrearsQuery.vue +919 -919
- package/src/components/revenue/machineHandManage/HandplanQuery.vue +1350 -1350
- package/src/components/revenue/machineHandManage/machineDown.vue +1148 -1148
- package/src/components/revenue/machineHandManage/machineHand.vue +2071 -2071
- package/src/components/revenue/machineHandManage/machineHandAudit.vue +773 -773
- package/src/components/revenue/machineHandManage/machineUploaded.vue +316 -316
- package/src/components/revenue/priceAdjustment/CardPriceAdjustment.vue +169 -169
- package/src/components/revenue/priceAdjustment/cardMange/cardSellingDifference.vue +331 -331
- package/src/components/revenue/printing/PrintingFileUserFiles.vue +867 -867
- package/src/components/revenue/regionalgas/regionalList.vue +232 -232
- package/src/components/revenue/regionalgas/regionalListRecord.vue +72 -72
- package/src/components/revenue/regionalgas/regionaladd.vue +267 -267
- package/src/components/revenue/stopairmanage/stopairList.vue +201 -201
- package/src/components/revenue/stopairmanage/stopairListRecord.vue +82 -82
- package/src/components/revenue/stopairmanage/stopairadd.vue +228 -228
- package/src/components/revenue/third/rizhao/transferAudit.vue +205 -205
- package/src/components/revenue/third/rizhao/transferAuditDisposeBasics.vue +220 -220
- package/src/components/revenue/third/transferAudit.vue +205 -205
- package/src/components/revenue/third/transferAuditDisposeBasics.vue +213 -213
- package/src/components/revenue/todoList/CompileList.vue +93 -93
- package/src/components/revenue/todoList/TodoList.vue +129 -129
- package/src/components/service/BluetoothSell.js +76 -76
- package/src/components/service/PCSell.js +77 -77
- package/src/components/service/Save.js +77 -77
- package/src/components/valueaddserver/valueaddservershow.vue +253 -253
- package/src/components/webMeter/MeterManage/WebMeterBatchOperate.vue +200 -200
- package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +818 -818
- package/src/components/webMeter/NewWebMeterHandPlan.vue +716 -716
- package/src/components/webMeter/WebBalanceQuery.vue +532 -532
- package/src/components/webMeter/WebmeterFlowmeter.vue +1064 -1064
- package/src/components/webMeter/approvalHandleList.vue +548 -548
- package/src/components/webMeter/common/MeterMsg.vue +596 -596
- package/src/components/webMeter/common/NewWatchMsg.vue +586 -586
- package/src/components/webMeter/common/QueryInstruct.vue +244 -244
- package/src/components/webMeter/common/SignParameter.vue +278 -278
- package/src/components/webMeter/common/WatchCollection.vue +96 -96
- package/src/components/webMeter/common/WatchCost.vue +101 -101
- package/src/components/webMeter/common/WatchDealWarning.vue +231 -231
- package/src/components/webMeter/common/WatchRecharge.vue +159 -159
- package/src/components/webMeter/common/WebMeterInfoManage.vue +124 -124
- package/src/components/webMeter/common/batteryEcharts.vue +159 -159
- package/src/components/webMeter/common/signalEcharts.vue +155 -155
- package/src/components/webMeter/dataCollection/NewWebMeterHandPlan.vue +810 -810
- package/src/components/webMeter/iotBalanceAnalyse.vue +374 -374
- package/src/components/webMeter/meterinfo/NewMeterList.vue +706 -706
- package/src/components/webMeter/paramSave/ParamHistory.vue +115 -115
- package/src/components/webMeter/paramSave/ParamSet.vue +668 -668
- package/src/components/webMeter/paramSave/ParamSetForm.vue +344 -344
- package/src/components/webMeter/paramSaveNew/ParamExceptions.vue +56 -56
- package/src/components/webMeter/paramSaveNew/ParamHistory.vue +164 -164
- package/src/components/webMeter/paramSaveNew/ParamSet.vue +596 -596
- package/src/components/webMeter/paramSaveNew/ParamSetDefault.vue +221 -221
- package/src/components/webMeter/paramSaveNew/ParamSetDefaultList.vue +68 -68
- package/src/components/webMeter/paramSaveNew/ParamSetForm.vue +507 -507
- package/src/components/webMeter/webInfo/EditWebMeterInfo.vue +278 -278
- package/src/components/webMeter/webInfo/MeterHistory.vue +74 -74
- package/src/components/webMeter/webInfo/UseWebMeter.vue +185 -185
- package/src/components/webMeter/webInfo/WebMeterInfo.vue +80 -80
- package/src/components/webMeter/webInfo/WebMeterList.vue +430 -430
- package/src/components/webMeter/webInfo/qinhua/EditWebMeterInfo.vue +247 -247
- package/src/components/webMeter/webInfo/qinhua/MeterHistory.vue +74 -74
- package/src/components/webMeter/webInfo/qinhua/WebMeterInfo.vue +79 -79
- package/src/components/webMeter/webInfo/qinhua/WebMeterList.vue +357 -357
- package/src/components/weinan/YuShou.vue +116 -116
- package/src/components/weinan/tree/Hhhh.vue +194 -194
- package/src/components/weinan/tree/ShowMessage.vue +136 -136
- package/src/components/zhoukou/DeveloperInfo.vue +327 -327
- package/src/components/zhoukou/LogRecordList.vue +188 -188
- package/src/filiale/alashan/UserBaseInfoNew.vue +481 -481
- package/src/filiale/ancheng/NewMeterList.vue +607 -607
- package/src/filiale/bayan/CardMeterCenter.vue +956 -956
- package/src/filiale/bayan/CardService.js +2237 -2237
- package/src/filiale/bayan/ChargeManage.vue +316 -316
- package/src/filiale/bayan/ChargeOper.vue +312 -312
- package/src/filiale/bayan/IOTMeterCenter.vue +873 -873
- package/src/filiale/bayan/MachineMeterCenter.vue +665 -665
- package/src/filiale/bayan/NoCardMeterCenter.vue +501 -501
- package/src/filiale/bayan/OtherChargeNew.vue +643 -643
- package/src/filiale/bayan/ReplaceCardManage.vue +419 -419
- package/src/filiale/bayan/ShowCardSellGas.vue +935 -935
- package/src/filiale/bayan/UnWriteCardCenter.vue +112 -112
- package/src/filiale/bayan/Userinfo.vue +280 -280
- package/src/filiale/bayan/sale.js +30 -30
- package/src/filiale/dexin/TransferManage.vue +534 -534
- package/src/filiale/dexin/sale.js +7 -7
- package/src/filiale/dongguan/components/common/userinfo_detail/UserBaseInfoNew.vue +504 -504
- package/src/filiale/dongguan/components/common/userinfo_detail/WebMeterBatchOperationValve.vue +789 -789
- package/src/filiale/ganquan/components/UserFiles/UserPaperInfoTest.vue +81 -81
- package/src/filiale/gehua/UserBaseInfoNew.vue +469 -469
- package/src/filiale/gehua/machineHandManage/HandplanQuery.vue +1259 -1259
- package/src/filiale/guangxi/WebMeterBatchOperationValve.vue +788 -788
- package/src/filiale/haile/UserBaseInfoNew.vue +463 -463
- package/src/filiale/haile/machineHand.vue +2135 -2135
- package/src/filiale/haile/unHandplanQuery.vue +760 -760
- package/src/filiale/jingyang/ChangeMeter.vue +1171 -1171
- package/src/filiale/jingyang/EticketPrint.vue +228 -228
- package/src/filiale/jingyang/EticketV4/CustQueryEticket.vue +417 -417
- package/src/filiale/jingyang/EticketV4/EticketManage.vue +67 -67
- package/src/filiale/jingyang/EticketV4/EticketOpenCard.vue +411 -411
- package/src/filiale/jingyang/EticketV4/EticketOpenPage.vue +431 -431
- package/src/filiale/jingyang/EticketV4/EticketRecordList.vue +448 -448
- package/src/filiale/jingyang/GovernmentSell.vue +361 -361
- package/src/filiale/jingyang/charge/IOTMeterCenter.vue +872 -872
- package/src/filiale/jingyang/sale.js +26 -26
- package/src/filiale/kelai/FeeDeduction/deductionManage.vue +25 -25
- package/src/filiale/kelai/FeeDeduction/feeDeduction.vue +211 -211
- package/src/filiale/kelai/FeeDeduction/feeMachine.vue +169 -169
- package/src/filiale/kelai/meterinfodetail.vue +255 -255
- package/src/filiale/kelai/sale.js +52 -52
- package/src/filiale/liaoyuan/CardList.vue +559 -559
- package/src/filiale/liaoyuan/FileManage/MeterinfoTest.vue +581 -581
- package/src/filiale/liaoyuan/UserBaseInfoNew.vue +472 -472
- package/src/filiale/liaoyuan/sale.js +57 -57
- package/src/filiale/lixianV3/MachineMeterCenter.vue +691 -691
- package/src/filiale/lixianV3/OweDetailList.vue +79 -79
- package/src/filiale/lixianV3/OweList.vue +157 -157
- package/src/filiale/lixianV3/sale.js +21 -21
- package/src/filiale/macheng/FilesManageNew/UserEssentialInfoTest.vue +373 -373
- package/src/filiale/macheng/HandManager.vue +1597 -1597
- package/src/filiale/macheng/UserBaseInfoNew.vue +353 -353
- package/src/filiale/macheng/UserEssentialInfoTest.vue +368 -368
- package/src/filiale/meihekou/ChargeList.vue +807 -807
- package/src/filiale/meihekou/FileUserFiles.vue +986 -986
- package/src/filiale/meihekou/HandManager.vue +1789 -1789
- package/src/filiale/meihekou/MbpeopleList.vue +573 -573
- package/src/filiale/meihekou/MeterBookAdd.vue +410 -410
- package/src/filiale/meihekou/MeterinfoTest.vue +635 -635
- package/src/filiale/meihekou/UserBaseInfoNew.vue +488 -488
- package/src/filiale/meihekou/meterinfodetail.vue +240 -240
- package/src/filiale/meihekou/sale.js +52 -52
- package/src/filiale/ningjin/HandplanQuery.vue +1194 -1194
- package/src/filiale/qianneng/ArrearsList.vue +417 -417
- package/src/filiale/qianneng/components/common/userinfo_detail/UserBaseInfoNew.vue +470 -470
- package/src/filiale/qianneng/revenue/common/ic_detail/HandQueryUser.vue +419 -419
- package/src/filiale/qianneng/sale.js +103 -103
- package/src/filiale/qingtongxia/UserBaseInfoNew.vue +603 -603
- package/src/filiale/qingtongxia/sale.js +17 -17
- package/src/filiale/rizhao/ChargeList.vue +1062 -1062
- package/src/filiale/rizhao/IOTMeterCenter.vue +795 -795
- package/src/filiale/rizhao/UserBaseInfoNew.vue +452 -452
- package/src/filiale/rizhao/otherinfo.vue +92 -92
- package/src/filiale/rongchuang/CardMeterCenter.vue +918 -918
- package/src/filiale/rongchuang/DepositCharge.vue +373 -373
- package/src/filiale/rongchuang/EticketPrint.vue +503 -503
- package/src/filiale/rongchuang/EticketRecordList.vue +265 -265
- package/src/filiale/rongchuang/GasPriceList.vue +359 -359
- package/src/filiale/rongchuang/IOTMeterCenter.vue +809 -809
- package/src/filiale/rongchuang/LimitGas.vue +233 -233
- package/src/filiale/rongchuang/MeterinfoTest.vue +752 -752
- package/src/filiale/rongchuang/NoCardMeterCenter.vue +469 -469
- package/src/filiale/rongchuang/OtherChargeNew.vue +445 -445
- package/src/filiale/rongchuang/OtherGas.vue +329 -329
- package/src/filiale/rongchuang/OverUseCharge.vue +435 -435
- package/src/filiale/rongchuang/PrintBill.vue +113 -113
- package/src/filiale/rongchuang/ReissueBill.vue +294 -294
- package/src/filiale/rongchuang/ReplaceCardManage.vue +412 -412
- package/src/filiale/rongchuang/ShowCardSellGas.vue +852 -852
- package/src/filiale/rongchuang/Userinfo.vue +176 -176
- package/src/filiale/rongchuang/bill/CustQueryEticket.vue +439 -439
- package/src/filiale/rongchuang/bill/EticketOpenCard.vue +264 -264
- package/src/filiale/rongchuang/bill/EticketOpenJBPage.vue +261 -261
- package/src/filiale/rongchuang/bill/EticketOpenPage.vue +249 -249
- package/src/filiale/rongchuang/bill/EticketRecordList.vue +277 -277
- package/src/filiale/rongchuang/handListMaintain.vue +641 -641
- package/src/filiale/rongchuang/handOperate.vue +454 -454
- package/src/filiale/rongchuang/sale.js +50 -50
- package/src/filiale/shangluo/ChangeMeter.vue +1184 -1184
- package/src/filiale/shangluo/sale.js +19 -19
- package/src/filiale/shanxian/components/webMeter/WebMeterBatchOperationValve.vue +792 -792
- package/src/filiale/shanxian/components/webMeter/meterinfo/NewMeterList.vue +602 -602
- package/src/filiale/shaoguan/HandplanQuery.vue +1329 -1329
- package/src/filiale/shaoguan/base/UserBaseInfoNew.vue +474 -474
- package/src/filiale/shexian/ChargeList.vue +1026 -1026
- package/src/filiale/shexian/UserBaseInfoNew.vue +469 -469
- package/src/filiale/shexian/revenue/newchangemeter/ChangeMeter.vue +1168 -1168
- package/src/filiale/shiquan/GasPriceList.vue +342 -342
- package/src/filiale/shiquan/sale.js +31 -31
- package/src/filiale/taizhoukesi/ChangeMeterQueryUser.vue +244 -244
- package/src/filiale/taizhoukesi/UserInfoDetailManageNew.vue +214 -214
- package/src/filiale/taizhoukesi/sale.js +6 -6
- package/src/filiale/tongchuan/EticketManage.vue +60 -60
- package/src/filiale/tongchuan/Maintenance/revenue/MeterOperatemain.vue +319 -319
- package/src/filiale/tongchuan/UserBaseInfoNew.vue +378 -378
- package/src/filiale/tongchuan/bill/CustQueryEticketQueryV4.vue +337 -337
- package/src/filiale/tongchuan/bill/EticketOpenCard.vue +323 -323
- package/src/filiale/tongchuan/bill/EticketOpenIotSalePage.vue +333 -333
- package/src/filiale/tongchuan/bill/EticketOpenJBPage.vue +386 -386
- package/src/filiale/tongchuan/bill/EticketOpenPage.vue +347 -347
- package/src/filiale/tongchuan/bill/EticketPrint.vue +483 -483
- package/src/filiale/tongchuan/bill/EticketRecordList.vue +278 -278
- package/src/filiale/tongchuan/paperaudit.vue +310 -310
- package/src/filiale/tongchuan/sale.js +154 -154
- package/src/filiale/wenxi/DisableManage.vue +150 -150
- package/src/filiale/wenxi/cardsHand.vue +974 -974
- package/src/filiale/wenxi/plugging/UserPlugging.vue +100 -100
- package/src/filiale/xinkang/UserBaseInfoNew.vue +446 -446
- package/src/filiale/xinkang/WebMeterBatchOperationValve.vue +789 -789
- package/src/filiale/yangchun/CardList.vue +559 -559
- package/src/filiale/yangchun/CardMeterCenter.vue +992 -965
- package/src/filiale/yangchun/ChangeMeter.vue +1191 -1191
- package/src/filiale/yangchun/EticketModal.vue +95 -95
- package/src/filiale/yangchun/EticketV4/CustQueryEticket.vue +334 -334
- package/src/filiale/yangchun/EticketV4/EticketManage.vue +64 -64
- package/src/filiale/yangchun/EticketV4/EticketOpenCard.vue +349 -349
- package/src/filiale/yangchun/EticketV4/EticketOpenJBPage.vue +350 -350
- package/src/filiale/yangchun/EticketV4/EticketOpenPage.vue +341 -341
- package/src/filiale/yangchun/FilesManage/UserEssentialInfoTest.vue +643 -643
- package/src/filiale/yangchun/FilesManage/UserGeneralInfoTest.vue +810 -810
- package/src/filiale/yangchun/FilesManage/UserPaperInfoTest.vue +63 -63
- package/src/filiale/yangchun/OtherChargeDetail.vue +97 -97
- package/src/filiale/yangchun/OtherChargeNew.vue +702 -702
- package/src/filiale/yangchun/plugins/LogicService.js +496 -496
- package/src/filiale/yangchun/sale.js +65 -65
- package/src/filiale/yuansheng/UserBaseInfoNew.vue +447 -447
- package/src/filiale/yuncheng/ChargeManage.vue +316 -316
- package/src/filiale/yuncheng/ChargeOper.vue +286 -286
- package/src/filiale/yuncheng/HandplanQuery.vue +1377 -1377
- package/src/filiale/yuncheng/Mulitinfo.vue +75 -75
- package/src/filiale/yuncheng/deviceinfodetail.vue +144 -144
- package/src/filiale/yuncheng/machineDown.vue +1151 -1151
- package/src/filiale/yuncheng/machineHandAudit.vue +893 -893
- package/src/filiale/yuncheng/sale.js +52 -52
- package/src/filiale/zhongsheng/charge/UserBaseInfoNew.vue +451 -451
- package/src/filiale/zhongyi/HandplanQuery.vue +1198 -1198
- package/src/filiale/zhongyi/common/MeterMessage.vue +184 -184
- package/src/filiale/zhongyi/machineHand.vue +2212 -2212
- package/src/filiale/zhongyi/sale.js +40 -40
- package/src/main.js +33 -33
- package/src/plugins/BillService.js +63 -63
- package/src/plugins/CancelService.js +298 -298
- package/src/plugins/CardManageService.js +21 -21
- package/src/plugins/CardService.js +2119 -2119
- package/src/plugins/ChangeMeterService.js +760 -760
- package/src/plugins/CommonService.js +302 -302
- package/src/plugins/FileManageService.js +460 -460
- package/src/plugins/FileService.js +270 -270
- package/src/plugins/GetLoginInfoService.js +495 -495
- package/src/plugins/GetSaleParams.js +217 -217
- package/src/plugins/HandService.js +35 -35
- package/src/plugins/InvoiceService.js +80 -80
- package/src/plugins/LoadParams.js +117 -117
- package/src/plugins/LogicService.js +491 -491
- package/src/plugins/MachineChargeService.js +120 -120
- package/src/plugins/OffGasAddGasService.js +176 -176
- package/src/plugins/PrintService.js +134 -134
- package/src/plugins/SelectService.js +44 -44
- package/src/plugins/jsign.js +168 -168
- package/src/project/State.js +17 -17
- package/src/sale.js +1212 -1212
- package/src/sign.html +399 -399
- package/src/stores/MagLoadParams.js +61 -61
|
@@ -1,2237 +1,2237 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import co from 'co'
|
|
3
|
-
|
|
4
|
-
let CardService = {
|
|
5
|
-
install (Vue, options) {
|
|
6
|
-
// 给vue增添对话框显示方法
|
|
7
|
-
Vue.CardService = Vue.prototype.$CardService = CardService
|
|
8
|
-
},
|
|
9
|
-
// 判断是否插卡
|
|
10
|
-
hasCard () {
|
|
11
|
-
let has = hasCardGen()
|
|
12
|
-
return co(has)
|
|
13
|
-
},
|
|
14
|
-
// 读卡
|
|
15
|
-
readCard () {
|
|
16
|
-
let read = readCard()
|
|
17
|
-
return co(read)
|
|
18
|
-
},
|
|
19
|
-
// 指令写卡
|
|
20
|
-
// 目前支持 承德海力物联网表
|
|
21
|
-
instructWriteCard (row) {
|
|
22
|
-
let read = instructWriteCardGen(row)
|
|
23
|
-
return co(read)
|
|
24
|
-
},
|
|
25
|
-
// 开户发卡
|
|
26
|
-
initCard (model, row, allot) {
|
|
27
|
-
// let init = initCardGen(model, row, allot ? this.getallotdata(allot, row, '发卡售气') : null)
|
|
28
|
-
// return co(init)
|
|
29
|
-
|
|
30
|
-
let f_serial_number = ''
|
|
31
|
-
let f_price = ''
|
|
32
|
-
let inputprice = '0'
|
|
33
|
-
if (model.f_serial_number) {
|
|
34
|
-
f_serial_number = model.f_serial_number
|
|
35
|
-
}
|
|
36
|
-
if (model.f_price && (model.f_price - 0) > 0) {
|
|
37
|
-
f_price = model.f_price
|
|
38
|
-
inputprice = '1'
|
|
39
|
-
}
|
|
40
|
-
let f_privilege_gas = 0
|
|
41
|
-
if (model.f_privilege_gas) {
|
|
42
|
-
f_privilege_gas = model.f_privilege_gas
|
|
43
|
-
}
|
|
44
|
-
let param = {
|
|
45
|
-
f_alias: row.f_alias,
|
|
46
|
-
garbage_number: model.garbage_number,
|
|
47
|
-
garbage_money: model.garbage_money,
|
|
48
|
-
f_serial_id: model.f_serial_id,
|
|
49
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
50
|
-
f_serial_number: f_serial_number,
|
|
51
|
-
f_user_id: row.f_user_id,
|
|
52
|
-
f_price: f_price,
|
|
53
|
-
inputprice: inputprice,
|
|
54
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
55
|
-
f_pregas: model.f_pregas,
|
|
56
|
-
f_preamount: model.f_preamount,
|
|
57
|
-
f_balance: row.f_balance,
|
|
58
|
-
f_meter_type: row.f_meter_type,
|
|
59
|
-
f_calculation: row.f_calculation,
|
|
60
|
-
f_collection_type: row.f_collection_type,
|
|
61
|
-
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
62
|
-
f_write_money: model.xiekamoney,
|
|
63
|
-
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
64
|
-
f_write_totalfee: (row.f_write_totalfee - 0) + (model.xiekamoney - 0),
|
|
65
|
-
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
66
|
-
f_open_fee: model.f_open_fee,
|
|
67
|
-
f_collection: model.f_collection,
|
|
68
|
-
f_payment: model.f_payment.toString(),
|
|
69
|
-
payments: model.payments,
|
|
70
|
-
f_print: model.f_print.toString(),
|
|
71
|
-
f_voucher_number: model.f_voucher_number,
|
|
72
|
-
userinfo_version: row.userinfo_version,
|
|
73
|
-
version: row.version,
|
|
74
|
-
// 优惠金额
|
|
75
|
-
f_privilege_money: model.f_privilege_money,
|
|
76
|
-
f_privilege_gas: f_privilege_gas,
|
|
77
|
-
f_after_discount: model.f_after_discount,
|
|
78
|
-
|
|
79
|
-
f_operator: Vue.$login.f.name,
|
|
80
|
-
f_operatorid: Vue.$login.f.id,
|
|
81
|
-
f_orgid: Vue.$login.f.orgid,
|
|
82
|
-
f_orgname: Vue.$login.f.orgs,
|
|
83
|
-
f_depid: Vue.$login.f.depids,
|
|
84
|
-
f_depname: Vue.$login.f.deps,
|
|
85
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
86
|
-
f_zones: Vue.$login.f.zones,
|
|
87
|
-
f_comments: model.f_comments
|
|
88
|
-
}
|
|
89
|
-
console.log('发卡售气前参数', row)
|
|
90
|
-
return sendCardSaleGasGen(param, row)
|
|
91
|
-
},
|
|
92
|
-
resetinitCard (model, row) {
|
|
93
|
-
let f_serial_number = ''
|
|
94
|
-
let f_price = ''
|
|
95
|
-
let inputprice = '0'
|
|
96
|
-
if (model.f_serial_number) {
|
|
97
|
-
f_serial_number = model.f_serial_number
|
|
98
|
-
}
|
|
99
|
-
if (model.f_price && (model.f_price - 0) > 0) {
|
|
100
|
-
f_price = model.f_price
|
|
101
|
-
inputprice = '1'
|
|
102
|
-
}
|
|
103
|
-
let f_privilege_gas = 0
|
|
104
|
-
if (model.f_privilege_gas) {
|
|
105
|
-
f_privilege_gas = model.f_privilege_gas
|
|
106
|
-
}
|
|
107
|
-
let param = {
|
|
108
|
-
f_serial_id: model.f_serial_id,
|
|
109
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
110
|
-
f_user_name: row.f_user_name,
|
|
111
|
-
f_serial_number: f_serial_number,
|
|
112
|
-
f_user_id: row.f_user_id,
|
|
113
|
-
f_price: f_price,
|
|
114
|
-
inputprice: inputprice,
|
|
115
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
116
|
-
f_pregas: model.f_pregas,
|
|
117
|
-
f_preamount: model.f_preamount,
|
|
118
|
-
f_balance: row.f_balance,
|
|
119
|
-
f_meter_type: row.f_meter_type,
|
|
120
|
-
f_calculation: row.f_calculation,
|
|
121
|
-
f_collection_type: row.f_collection_type,
|
|
122
|
-
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
123
|
-
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
124
|
-
f_write_totalfee: (row.f_write_totalfee - 0) + (model.f_preamount - 0),
|
|
125
|
-
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
126
|
-
f_open_fee: model.f_open_fee,
|
|
127
|
-
f_collection: model.f_collection,
|
|
128
|
-
// f_print: model.f_print.toString(),
|
|
129
|
-
f_user_type: row.f_user_type,
|
|
130
|
-
f_gasproperties: row.f_gasproperties,
|
|
131
|
-
f_address: row.f_address,
|
|
132
|
-
f_meter_brand: row.f_meter_brand,
|
|
133
|
-
f_voucher_number: model.f_voucher_number,
|
|
134
|
-
userinfo_version: row.userinfo_version,
|
|
135
|
-
version: row.version,
|
|
136
|
-
|
|
137
|
-
f_operator: Vue.$login.f.name,
|
|
138
|
-
f_operatorid: Vue.$login.f.id,
|
|
139
|
-
f_orgid: Vue.$login.f.orgid,
|
|
140
|
-
f_orgname: Vue.$login.f.orgs,
|
|
141
|
-
f_depid: Vue.$login.f.depids,
|
|
142
|
-
f_depname: Vue.$login.f.deps,
|
|
143
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
144
|
-
f_zones: Vue.$login.f.zones,
|
|
145
|
-
f_comments: model.f_comments
|
|
146
|
-
}
|
|
147
|
-
console.log('重发卡售气前参数', row)
|
|
148
|
-
return resetsendCardSaleGasGen(param, row)
|
|
149
|
-
},
|
|
150
|
-
// 补气开户发卡
|
|
151
|
-
remanentinitCard (model, row, allot) {
|
|
152
|
-
let param = {
|
|
153
|
-
f_share_times: row.f_share_times,
|
|
154
|
-
f_hascard: row.f_hascard,
|
|
155
|
-
f_open_way: row.f_open_type,
|
|
156
|
-
f_serial_id: model.f_serial_id,
|
|
157
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
158
|
-
f_user_id: row.f_user_id,
|
|
159
|
-
// 补气量
|
|
160
|
-
f_fill_gas: model.f_fill_gas,
|
|
161
|
-
f_fill_money: model.f_fill_money,
|
|
162
|
-
f_remanent_gas: row.f_remanent_gas === 0 ? model.f_fill_gas : row.f_remanent_gas,
|
|
163
|
-
f_remanent_price: row.f_remanent_price,
|
|
164
|
-
f_remanent_money: row.f_remanent_money === 0 ? model.f_fill_money : row.f_remanent_money,
|
|
165
|
-
f_remanent_type: row.f_remanent_type,
|
|
166
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
167
|
-
f_user_name: row.f_user_name,
|
|
168
|
-
f_user_type: row.f_user_type,
|
|
169
|
-
f_gasproperties: row.f_gasproperties,
|
|
170
|
-
f_address: row.f_address,
|
|
171
|
-
f_meter_brand: row.f_meter_brand,
|
|
172
|
-
f_meter_type: row.f_meter_type,
|
|
173
|
-
f_collection_type: row.f_collection_type,
|
|
174
|
-
// 购气量
|
|
175
|
-
f_pregas: (model.f_pregas - 0) === 0 ? model.f_fill_gas : (model.f_pregas - 0),
|
|
176
|
-
f_preamount: (model.f_preamount - 0) === 0 ? model.f_fill_money : (model.f_preamount - 0),
|
|
177
|
-
f_totalcost: model.f_totalcost - 0,
|
|
178
|
-
f_balance: row.f_balance,
|
|
179
|
-
f_open_fee: model.f_open_fee,
|
|
180
|
-
f_collection: model.f_collection,
|
|
181
|
-
f_payment: model.f_payment.toString(),
|
|
182
|
-
payments: model.payments,
|
|
183
|
-
f_print: model.f_print.toString(),
|
|
184
|
-
f_voucher_number: model.f_voucher_number,
|
|
185
|
-
userinfo_version: row.userinfo_version,
|
|
186
|
-
version: row.version,
|
|
187
|
-
f_operator: Vue.$login.f.name,
|
|
188
|
-
f_operatorid: Vue.$login.f.id,
|
|
189
|
-
f_orgid: Vue.$login.f.orgid,
|
|
190
|
-
f_orgname: Vue.$login.f.orgs,
|
|
191
|
-
f_depid: Vue.$login.f.depids,
|
|
192
|
-
f_depname: Vue.$login.f.deps,
|
|
193
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
194
|
-
f_zones: Vue.$login.f.zones,
|
|
195
|
-
f_comments: model.f_comments
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (row.f_remanent_type === 1) {
|
|
199
|
-
param.f_total_gas = (row.f_total_gas - 0) + (model.f_pregas - 0)
|
|
200
|
-
param.f_total_fee = (row.f_total_fee - 0) + (model.f_preamount - 0)
|
|
201
|
-
} else {
|
|
202
|
-
if ((model.f_pregas - 0) > (model.f_fill_gas - 0)) {
|
|
203
|
-
param.f_total_gas = (row.f_total_gas - 0) + ((model.f_pregas - 0) - (model.f_fill_gas - 0))
|
|
204
|
-
param.f_total_fee = (row.f_total_fee - 0) + (model.f_preamount - 0)
|
|
205
|
-
} else {
|
|
206
|
-
param.f_total_gas = (row.f_total_gas - 0)
|
|
207
|
-
param.f_total_fee = (row.f_total_fee - 0)
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
param.f_write_totalgas = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
211
|
-
param.f_write_totalfee = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
212
|
-
return sendCardSaleGasGenremanent(param, row)
|
|
213
|
-
},
|
|
214
|
-
|
|
215
|
-
offlineWrite (row) {
|
|
216
|
-
return offlineWriteGen(row)
|
|
217
|
-
},
|
|
218
|
-
// 余量补差
|
|
219
|
-
margin (model, row) {
|
|
220
|
-
let f_serial_number = ''
|
|
221
|
-
let f_price = ''
|
|
222
|
-
let inputprice = '0'
|
|
223
|
-
let f_privilege_gas = 0
|
|
224
|
-
if (model.f_serial_number) {
|
|
225
|
-
f_serial_number = model.f_serial_number
|
|
226
|
-
}
|
|
227
|
-
if (model.f_price && (model.f_price - 0) > 0) {
|
|
228
|
-
f_price = model.f_price
|
|
229
|
-
inputprice = '1'
|
|
230
|
-
}
|
|
231
|
-
if (model.f_privilege_gas) {
|
|
232
|
-
f_privilege_gas = model.f_privilege_gas
|
|
233
|
-
}
|
|
234
|
-
let param = {
|
|
235
|
-
garbage_number: model.garbage_number,
|
|
236
|
-
garbage_money: model.garbage_money,
|
|
237
|
-
f_serial_id: model.f_serial_id,
|
|
238
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
239
|
-
f_serial_number: f_serial_number,
|
|
240
|
-
f_write_money: model.xiekamoney,
|
|
241
|
-
f_price: f_price,
|
|
242
|
-
inputprice: inputprice,
|
|
243
|
-
// 补气量
|
|
244
|
-
f_remanent_gas: row.f_remanent_gas,
|
|
245
|
-
f_remanent_price: row.f_remanent_price,
|
|
246
|
-
f_user_id: row.f_user_id,
|
|
247
|
-
f_calculation: row.f_calculation,
|
|
248
|
-
f_collection_type: row.f_collection_type,
|
|
249
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
250
|
-
f_pregas: model.f_pregas,
|
|
251
|
-
f_totalcost: model.f_totalcost,
|
|
252
|
-
f_balance: row.f_balance,
|
|
253
|
-
f_meter_type: row.f_meter_type,
|
|
254
|
-
f_preamount: model.f_preamount,
|
|
255
|
-
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
256
|
-
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
257
|
-
f_write_totalfee: (row.f_write_totalfee - 0) + (model.xiekamoney - 0),
|
|
258
|
-
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
259
|
-
f_collection: model.f_collection,
|
|
260
|
-
// 优惠金额
|
|
261
|
-
f_privilege_money: model.f_privilege_money,
|
|
262
|
-
f_privilege_gas: f_privilege_gas,
|
|
263
|
-
f_after_discount: model.f_after_discount,
|
|
264
|
-
f_payment: model.f_payment.toString(),
|
|
265
|
-
payments: model.payments,
|
|
266
|
-
f_print: model.f_print.toString(),
|
|
267
|
-
f_voucher_number: model.f_voucher_number,
|
|
268
|
-
userinfo_version: row.userinfo_version,
|
|
269
|
-
version: row.version,
|
|
270
|
-
isGasValue: model.f_pregas ? 0 : 1,
|
|
271
|
-
f_meter_base: row.f_meter_base,
|
|
272
|
-
f_operator: Vue.$login.f.name,
|
|
273
|
-
f_operatorid: Vue.$login.f.id,
|
|
274
|
-
f_orgid: Vue.$login.f.orgid,
|
|
275
|
-
f_orgname: Vue.$login.f.orgs,
|
|
276
|
-
f_depid: Vue.$login.f.depids,
|
|
277
|
-
f_depname: Vue.$login.f.deps,
|
|
278
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
279
|
-
f_zones: Vue.$login.f.zones,
|
|
280
|
-
f_comments: model.f_comments,
|
|
281
|
-
f_sys_balance: model.f_sys_balance
|
|
282
|
-
}
|
|
283
|
-
return marginGen(param, row)
|
|
284
|
-
},
|
|
285
|
-
// 卡表收费
|
|
286
|
-
sellgas (model, row) {
|
|
287
|
-
let f_serial_number = ''
|
|
288
|
-
let f_price = ''
|
|
289
|
-
let inputprice = '0'
|
|
290
|
-
let f_privilege_gas = 0
|
|
291
|
-
if (model.f_serial_number) {
|
|
292
|
-
f_serial_number = model.f_serial_number
|
|
293
|
-
}
|
|
294
|
-
if (model.f_price && (model.f_price - 0) > 0) {
|
|
295
|
-
f_price = model.f_price
|
|
296
|
-
inputprice = '1'
|
|
297
|
-
}
|
|
298
|
-
if (model.f_privilege_gas) {
|
|
299
|
-
f_privilege_gas = model.f_privilege_gas
|
|
300
|
-
}
|
|
301
|
-
let param = {
|
|
302
|
-
f_alias: row.f_alias,
|
|
303
|
-
garbage_number: model.garbage_number,
|
|
304
|
-
garbage_money: model.garbage_money,
|
|
305
|
-
f_serial_id: model.f_serial_id,
|
|
306
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
307
|
-
f_serial_number: f_serial_number,
|
|
308
|
-
f_write_money: model.xiekamoney,
|
|
309
|
-
f_price: f_price,
|
|
310
|
-
inputprice: inputprice,
|
|
311
|
-
// 补气量
|
|
312
|
-
f_remanent_gas: row.f_remanent_gas,
|
|
313
|
-
f_remanent_price: row.f_remanent_price,
|
|
314
|
-
f_user_id: row.f_user_id,
|
|
315
|
-
f_calculation: row.f_calculation,
|
|
316
|
-
f_collection_type: row.f_collection_type,
|
|
317
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
318
|
-
f_pregas: model.f_pregas,
|
|
319
|
-
f_totalcost: model.f_totalcost,
|
|
320
|
-
f_balance: row.f_balance,
|
|
321
|
-
f_meter_type: row.f_meter_type,
|
|
322
|
-
f_preamount: model.f_preamount,
|
|
323
|
-
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
324
|
-
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
325
|
-
f_write_totalfee: (row.f_write_totalfee - 0) + (model.xiekamoney - 0),
|
|
326
|
-
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
327
|
-
f_collection: model.f_collection,
|
|
328
|
-
// 优惠金额
|
|
329
|
-
f_privilege_money: model.f_privilege_money,
|
|
330
|
-
f_privilege_gas: f_privilege_gas,
|
|
331
|
-
f_after_discount: model.f_after_discount,
|
|
332
|
-
f_payment: model.f_payment.toString(),
|
|
333
|
-
payments: model.payments,
|
|
334
|
-
f_print: model.f_print.toString(),
|
|
335
|
-
f_voucher_number: model.f_voucher_number,
|
|
336
|
-
userinfo_version: row.userinfo_version,
|
|
337
|
-
version: row.version,
|
|
338
|
-
f_meter_base: row.f_meter_base,
|
|
339
|
-
f_operator: Vue.$login.f.name,
|
|
340
|
-
f_operatorid: Vue.$login.f.id,
|
|
341
|
-
f_orgid: Vue.$login.f.orgid,
|
|
342
|
-
f_orgname: Vue.$login.f.orgs,
|
|
343
|
-
f_depid: Vue.$login.f.depids,
|
|
344
|
-
f_depname: Vue.$login.f.deps,
|
|
345
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
346
|
-
f_zones: Vue.$login.f.zones,
|
|
347
|
-
f_comments: model.f_comments,
|
|
348
|
-
f_sys_balance: model.f_sys_balance
|
|
349
|
-
}
|
|
350
|
-
return sellgasGen(param, row)
|
|
351
|
-
},
|
|
352
|
-
|
|
353
|
-
// 补气卡表收费
|
|
354
|
-
remanentsellgas (model, row) {
|
|
355
|
-
let param = {
|
|
356
|
-
f_user_name: row.f_user_name,
|
|
357
|
-
f_user_type: row.f_user_type,
|
|
358
|
-
f_gasproperties: row.f_gasproperties,
|
|
359
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
360
|
-
f_address: row.f_address,
|
|
361
|
-
f_meter_brand: row.f_meter_brand,
|
|
362
|
-
f_meter_type: row.f_meter_type,
|
|
363
|
-
f_meternumber: row.f_meternumber,
|
|
364
|
-
f_collection_type: row.f_collection_type,
|
|
365
|
-
f_card_id: row.f_card_id,
|
|
366
|
-
f_write_money: model.xiekamoney,
|
|
367
|
-
// 补气信息
|
|
368
|
-
f_fill_gas: model.f_fill_gas,
|
|
369
|
-
f_fill_money: model.f_fill_money,
|
|
370
|
-
|
|
371
|
-
f_remanent_gas: row.f_remanent_gas,
|
|
372
|
-
f_remanent_price: row.f_remanent_price,
|
|
373
|
-
f_remanent_type: row.f_remanent_type,
|
|
374
|
-
f_user_id: row.f_user_id,
|
|
375
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
376
|
-
f_pregas: model.f_pregas,
|
|
377
|
-
f_balance: row.f_balance,
|
|
378
|
-
f_preamount: model.f_preamount,
|
|
379
|
-
f_totalcost: model.f_totalcost,
|
|
380
|
-
f_collection: model.f_collection,
|
|
381
|
-
f_payment: model.f_payment.toString(),
|
|
382
|
-
payments: model.payments,
|
|
383
|
-
f_print: model.f_print.toString(),
|
|
384
|
-
f_voucher_number: model.f_voucher_number,
|
|
385
|
-
userinfo_version: row.userinfo_version,
|
|
386
|
-
version: row.version,
|
|
387
|
-
f_operator: Vue.$login.f.name,
|
|
388
|
-
f_operatorid: Vue.$login.f.id,
|
|
389
|
-
f_orgid: Vue.$login.f.orgid,
|
|
390
|
-
f_orgname: Vue.$login.f.orgs,
|
|
391
|
-
f_depid: Vue.$login.f.depids,
|
|
392
|
-
f_depname: Vue.$login.f.deps,
|
|
393
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
394
|
-
f_zones: Vue.$login.f.zones,
|
|
395
|
-
f_comments: model.f_comments
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
// 0:代表清零补气, 累购量不加 1:代表换表补气 累购量加
|
|
399
|
-
if (row.f_remanent_type === 1) {
|
|
400
|
-
param.f_total_gas = (row.f_total_gas - 0) + (model.f_pregas - 0)
|
|
401
|
-
param.f_total_fee = (row.f_total_fee - 0) + (model.f_preamount - 0)
|
|
402
|
-
} else {
|
|
403
|
-
if (model.f_pregas > row.f_remanent_gas) {
|
|
404
|
-
param.f_total_gas = (row.f_total_gas - 0) + (model.f_pregas - row.f_remanent_gas)
|
|
405
|
-
param.f_total_fee = (row.f_total_fee - 0) + (model.f_preamount - 0)
|
|
406
|
-
} else {
|
|
407
|
-
param.f_total_gas = (row.f_total_gas - 0)
|
|
408
|
-
param.f_total_fee = (row.f_total_fee - 0)
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
param.f_write_totalgas = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
412
|
-
param.f_write_totalfee = (row.f_write_totalfee - 0) + (model.xiekamoney - 0)
|
|
413
|
-
return sellgasRemanentGen(param, row)
|
|
414
|
-
},
|
|
415
|
-
// 数码表收费
|
|
416
|
-
DigtialSellGas (model, row) {
|
|
417
|
-
let f_serial_number = ''
|
|
418
|
-
if (model.f_serial_number) {
|
|
419
|
-
f_serial_number = model.f_serial_number
|
|
420
|
-
}
|
|
421
|
-
let param = {
|
|
422
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
423
|
-
f_serial_number: f_serial_number,
|
|
424
|
-
f_user_id: row.f_user_id,
|
|
425
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
426
|
-
f_pregas: model.f_pregas,
|
|
427
|
-
f_write_money: model.f_write_money,
|
|
428
|
-
f_balance: row.f_balance,
|
|
429
|
-
f_preamount: model.f_preamount,
|
|
430
|
-
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
431
|
-
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
432
|
-
f_write_totalfee: (row.f_write_totalfee - 0) + (model.f_write_money - 0),
|
|
433
|
-
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
434
|
-
f_collection: model.f_collection,
|
|
435
|
-
f_payment: model.f_payment.toString(),
|
|
436
|
-
payments: model.payments,
|
|
437
|
-
f_print: model.f_print.toString(),
|
|
438
|
-
f_voucher_number: model.f_voucher_number,
|
|
439
|
-
userinfo_version: row.userinfo_version,
|
|
440
|
-
version: row.version,
|
|
441
|
-
f_operator: Vue.$login.f.name,
|
|
442
|
-
f_operatorid: Vue.$login.f.id,
|
|
443
|
-
f_orgid: Vue.$login.f.orgid,
|
|
444
|
-
f_orgname: Vue.$login.f.orgs,
|
|
445
|
-
f_depid: Vue.$login.f.depids,
|
|
446
|
-
f_depname: Vue.$login.f.deps,
|
|
447
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
448
|
-
f_zones: Vue.$login.f.zones
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
return DigtialSellGasGen(param, row)
|
|
453
|
-
},
|
|
454
|
-
// 无卡收费
|
|
455
|
-
noCardSellGas (model, row) {
|
|
456
|
-
let f_serial_number = ''
|
|
457
|
-
if (model.f_serial_number) {
|
|
458
|
-
f_serial_number = model.f_serial_number
|
|
459
|
-
}
|
|
460
|
-
let f_write_card = ''
|
|
461
|
-
if (model.f_write_card) {
|
|
462
|
-
f_write_card = model.f_write_card
|
|
463
|
-
}
|
|
464
|
-
let param = {
|
|
465
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
466
|
-
f_serial_number: f_serial_number,
|
|
467
|
-
f_user_id: row.f_user_id,
|
|
468
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
469
|
-
f_pregas: model.f_pregas,
|
|
470
|
-
f_write_money: model.f_write_money,
|
|
471
|
-
f_balance: row.f_balance,
|
|
472
|
-
f_preamount: model.f_preamount,
|
|
473
|
-
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
474
|
-
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
475
|
-
f_write_totalfee: (row.f_write_totalfee - 0) + (model.f_write_money - 0),
|
|
476
|
-
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
477
|
-
f_collection: model.f_collection,
|
|
478
|
-
f_payment: model.f_payment.toString(),
|
|
479
|
-
payments: model.payments,
|
|
480
|
-
f_print: model.f_print.toString(),
|
|
481
|
-
f_voucher_number: model.f_voucher_number,
|
|
482
|
-
userinfo_version: row.userinfo_version,
|
|
483
|
-
version: row.version,
|
|
484
|
-
f_write_card: f_write_card === '不写卡' ? '不写卡' : '未写卡',
|
|
485
|
-
f_operator: Vue.$login.f.name,
|
|
486
|
-
f_operatorid: Vue.$login.f.id,
|
|
487
|
-
f_orgid: Vue.$login.f.orgid,
|
|
488
|
-
f_orgname: Vue.$login.f.orgs,
|
|
489
|
-
f_depid: Vue.$login.f.depids,
|
|
490
|
-
f_depname: Vue.$login.f.deps,
|
|
491
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
492
|
-
f_zones: Vue.$login.f.zones
|
|
493
|
-
|
|
494
|
-
}
|
|
495
|
-
if (row.f_alias === 'ShuMa') {
|
|
496
|
-
param.f_write_card = '已写卡'
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
return noCardSellGasGen(param, row)
|
|
500
|
-
},
|
|
501
|
-
|
|
502
|
-
// 补卡写卡
|
|
503
|
-
replaceCard (model, row, allot) {
|
|
504
|
-
// 磁条卡走了 replaceCiTiaoCard 不走这里
|
|
505
|
-
// if (row.f_meter_type.indexOf('卡表') === -1 && row.f_meter_type.indexOf('物联网表') === -1) {
|
|
506
|
-
// model.f_type = '补磁条卡'
|
|
507
|
-
// let replace = replaceCiTiaoCardGen(model, row)
|
|
508
|
-
// return co(replace)
|
|
509
|
-
// }
|
|
510
|
-
let replace = replaceCardGen(model, row, allot ? this.getallotdata(allot, row, '补卡') : null)
|
|
511
|
-
return co(replace)
|
|
512
|
-
},
|
|
513
|
-
// 磁条卡补卡写卡
|
|
514
|
-
replaceCiTiaoCard (model, row, allot) {
|
|
515
|
-
let replace = replaceCiTiaoCardGen(model, row)
|
|
516
|
-
return co(replace)
|
|
517
|
-
},
|
|
518
|
-
// 机表写卡
|
|
519
|
-
replaceCardJB (model, row) {
|
|
520
|
-
let replace = replaceCardGenJB(model, row)
|
|
521
|
-
return co(replace)
|
|
522
|
-
},
|
|
523
|
-
// 物联网写卡
|
|
524
|
-
replaceCardWeb (model, row) {
|
|
525
|
-
let replace = replaceCardGenWeb(model, row)
|
|
526
|
-
return co(replace)
|
|
527
|
-
},
|
|
528
|
-
replacecXq (model, row) {
|
|
529
|
-
let replace = replaceXq(model, row)
|
|
530
|
-
return co(replace)
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
// 判断是否有卡插入
|
|
535
|
-
let hasCardGen = async function () {
|
|
536
|
-
return await Vue.resetpost('http://127.0.0.1:8003/HasCard', {}, {resolveMsg: null, rejectMsg: null})
|
|
537
|
-
}
|
|
538
|
-
// 读卡
|
|
539
|
-
let readCard = async function () {
|
|
540
|
-
return await Vue.resetpost('http://127.0.0.1:8003/ReadCard', {data: {}}, {resolveMsg: null, rejectMsg: null})
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
let replaceCiTiaoCardGen = async function (model, row) {
|
|
544
|
-
// 1.存库 2.写卡
|
|
545
|
-
let result = null
|
|
546
|
-
let getCardNumber = {data: {cardNumber: null}}
|
|
547
|
-
try {
|
|
548
|
-
const OperatorInfo = {
|
|
549
|
-
f_operator: Vue.$login.f.name,
|
|
550
|
-
f_operatorid: Vue.$login.f.id,
|
|
551
|
-
f_orgid: Vue.$login.f.orgid,
|
|
552
|
-
f_orgname: Vue.$login.f.orgs,
|
|
553
|
-
f_depid: Vue.$login.f.depids,
|
|
554
|
-
f_depname: Vue.$login.f.deps
|
|
555
|
-
}
|
|
556
|
-
// 获取卡号
|
|
557
|
-
// if (!row.f_card_id) {
|
|
558
|
-
// getCardNumber = await Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {
|
|
559
|
-
// resolveMsg: null,
|
|
560
|
-
// rejectMsg: '发卡售气获取卡号失败!!'
|
|
561
|
-
// })
|
|
562
|
-
// console.log('获取卡号、、', getCardNumber)
|
|
563
|
-
// } else {
|
|
564
|
-
// getCardNumber.data.cardNumber = row.f_card_id
|
|
565
|
-
// console.log('档案自带卡号、、', getCardNumber)
|
|
566
|
-
// }
|
|
567
|
-
if (row.f_userinfo_code) {
|
|
568
|
-
getCardNumber.data.cardNumber = row.f_card_id
|
|
569
|
-
}
|
|
570
|
-
result = await Vue.resetpost('rs/logic/sendCiTiaoCardRemanentGas', {
|
|
571
|
-
data: {
|
|
572
|
-
model,
|
|
573
|
-
getCardNumber,
|
|
574
|
-
row,
|
|
575
|
-
OperatorInfo
|
|
576
|
-
}
|
|
577
|
-
}, {resolveMsg: null, rejectMsg: '发卡售气存库失败'})
|
|
578
|
-
// 存库
|
|
579
|
-
console.log('换表发卡存库返回', result)
|
|
580
|
-
// 写卡
|
|
581
|
-
Vue.showAlert('请刷卡', 'warning', 50000)
|
|
582
|
-
// 组织写卡数据
|
|
583
|
-
let params = {
|
|
584
|
-
kh: result.data.cardnumber
|
|
585
|
-
}
|
|
586
|
-
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteCard_HEC', params, {
|
|
587
|
-
resolveMsg: null,
|
|
588
|
-
rejectMsg: '开户卡服务错误'
|
|
589
|
-
})
|
|
590
|
-
Vue.closeAlert()
|
|
591
|
-
if (!result || cardRes.data.Err || cardRes.data.Exception) {
|
|
592
|
-
// 写卡异常
|
|
593
|
-
await Vue.resetpost('rs/logic/sendCiTiaoCardRemanentGas', {
|
|
594
|
-
data: {
|
|
595
|
-
model,
|
|
596
|
-
getCardNumber,
|
|
597
|
-
row,
|
|
598
|
-
Chongzheng: true,
|
|
599
|
-
fill_id: result.data.id
|
|
600
|
-
}
|
|
601
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
602
|
-
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
603
|
-
} else {
|
|
604
|
-
// 写卡成功
|
|
605
|
-
Vue.showAlert('写卡成功', 'success', 2000)
|
|
606
|
-
return result
|
|
607
|
-
}
|
|
608
|
-
} catch (error) {
|
|
609
|
-
console.log('换表发卡出错。。', error)
|
|
610
|
-
if (result) {
|
|
611
|
-
// 出错进行回滚
|
|
612
|
-
row.f_user_id = row.f_user_id + ''
|
|
613
|
-
if (result) {
|
|
614
|
-
await Vue.resetpost('rs/logic/sendCiTiaoCardRemanentGas', {
|
|
615
|
-
data: {
|
|
616
|
-
model,
|
|
617
|
-
getCardNumber,
|
|
618
|
-
row,
|
|
619
|
-
Chongzheng: true,
|
|
620
|
-
fill_id: result.data.id
|
|
621
|
-
}
|
|
622
|
-
}, {resolveMsg: null, rejectMsg: null})
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
if (error.data) {
|
|
626
|
-
throw new Error(error.data)
|
|
627
|
-
} else {
|
|
628
|
-
throw error
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
let sendCardSaleGasGenremanent = async function (model, row) {
|
|
634
|
-
// 1.存库 2.写卡
|
|
635
|
-
let result = null
|
|
636
|
-
try {
|
|
637
|
-
let cardState = await hasCardGen()
|
|
638
|
-
console.log('判卡函数返回:', cardState)
|
|
639
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
640
|
-
// 获取卡号
|
|
641
|
-
let getCardNumber = {data: {cardNumber: null}}
|
|
642
|
-
if (!row.f_card_id) {
|
|
643
|
-
getCardNumber = await Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {resolveMsg: null, rejectMsg: '发卡售气获取卡号失败!!'})
|
|
644
|
-
console.log('获取卡号、、', getCardNumber)
|
|
645
|
-
} else {
|
|
646
|
-
getCardNumber.data.cardNumber = row.f_card_id
|
|
647
|
-
console.log('档案自带卡号、、', getCardNumber)
|
|
648
|
-
}
|
|
649
|
-
if (row.f_alias && row.f_alias.includes('SmartCard_TP')) {
|
|
650
|
-
model.cardNumber = row.f_meternumber
|
|
651
|
-
} else if (getCardNumber.data.cardNumber) {
|
|
652
|
-
model.cardNumber = getCardNumber.data.cardNumber + ''
|
|
653
|
-
} else {
|
|
654
|
-
throw new Error('获取卡号失败!请核实参数管理中的卡号重新换表发卡售气。')
|
|
655
|
-
}
|
|
656
|
-
result = await Vue.resetpost('rs/logic/sendCardRemanentGas', {data: model}, {resolveMsg: null, rejectMsg: '发卡售气存库失败'})
|
|
657
|
-
// 存库
|
|
658
|
-
console.log('换表发卡存库返回', result)
|
|
659
|
-
// 写卡
|
|
660
|
-
let cardParams = await getParamGen(result.data.cardnumber, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
661
|
-
|
|
662
|
-
// 组织写卡数据
|
|
663
|
-
let params = {
|
|
664
|
-
factory: row.f_alias,
|
|
665
|
-
kmm: '0', // 2019-12-22 查旭说的。给一个0 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
666
|
-
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
667
|
-
kh: result.data.cardnumber, // 卡号
|
|
668
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
669
|
-
ql: model.f_pregas, // 预购气量
|
|
670
|
-
csql: '0', // 上次购气量,新开户为0
|
|
671
|
-
ccsql: '0', // 上上次购气量,新开户为0
|
|
672
|
-
cs: '1', // 求购气次数,先开户为1
|
|
673
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
674
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_preamount - 0), // 累计购气金额
|
|
675
|
-
bkcs: '0', // 新开户卡,为0
|
|
676
|
-
ljyql: '0', // 累积用气量,有些表要累加原来用气量,新开户卡,为0
|
|
677
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
678
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
679
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
680
|
-
cssqrq: '0', // 上次售气日期,格式为YYYYMMDD
|
|
681
|
-
meterid: row.f_meternumber, // 表号
|
|
682
|
-
money: model.f_preamount, // 购气金额
|
|
683
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
684
|
-
klx: row.f_coding
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
688
|
-
|
|
689
|
-
// 判断是否是累购表
|
|
690
|
-
if (row.f_support_purchase === '是') {
|
|
691
|
-
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
692
|
-
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
693
|
-
params.totalmoney = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
694
|
-
}
|
|
695
|
-
console.log('换表发卡写卡参数', params)
|
|
696
|
-
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
697
|
-
resolveMsg: null,
|
|
698
|
-
rejectMsg: '开户卡服务错误'
|
|
699
|
-
}, 80000)
|
|
700
|
-
if (!cardParams || ((model.f_pregas > model.f_remanent_gas) && !result) || cardRes.data.Err || cardRes.data.Exception) {
|
|
701
|
-
// 写卡异常
|
|
702
|
-
// 数据回滚操作
|
|
703
|
-
// 由于数据太长,将f_user_id 更改为字符串
|
|
704
|
-
row.f_userfiles_id = row.f_userfiles_id + ''
|
|
705
|
-
|
|
706
|
-
await Vue.resetpost('rs/logic/remanentRollback', {data: {fillgasid: result.data.fillgasid, sellid: result.data.sellid, row: row}}, {
|
|
707
|
-
resolveMsg: null,
|
|
708
|
-
rejectMsg: '开户失败'
|
|
709
|
-
})
|
|
710
|
-
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
711
|
-
} else {
|
|
712
|
-
// 写卡成功
|
|
713
|
-
// 更新卡密码
|
|
714
|
-
row.version = result.data.version - 1,
|
|
715
|
-
await Vue.CommonService.updatePassword(row, cardRes)
|
|
716
|
-
Vue.showAlert('补气购气成功', 'success', 2000)
|
|
717
|
-
return result
|
|
718
|
-
}
|
|
719
|
-
} else {
|
|
720
|
-
throw new Error(`请检查卡是否插好!!`)
|
|
721
|
-
}
|
|
722
|
-
} catch (error) {
|
|
723
|
-
console.log('换表发卡出错。。', error)
|
|
724
|
-
|
|
725
|
-
if (result) {
|
|
726
|
-
// 出错进行回滚
|
|
727
|
-
row.f_user_id = row.f_user_id + ''
|
|
728
|
-
if (result) {
|
|
729
|
-
await Vue.resetpost('rs/logic/remanentRollback', {data: {fillgasid: result.data.fillgasid, sellid: result.data.sellid, row: row}}, {
|
|
730
|
-
resolveMsg: null,
|
|
731
|
-
rejectMsg: '写卡失败,数据回滚失败,请联系技术人员处理!!'
|
|
732
|
-
})
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
if (error.data) {
|
|
737
|
-
throw new Error(error.data)
|
|
738
|
-
} else {
|
|
739
|
-
throw error
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
let resetsendCardSaleGasGen = async function (model, row) {
|
|
744
|
-
// 1.存库 2.写卡
|
|
745
|
-
let result = null
|
|
746
|
-
try {
|
|
747
|
-
let cardState = await hasCardGen()
|
|
748
|
-
console.log('判卡函数返回:', cardState)
|
|
749
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
750
|
-
// 获取卡号
|
|
751
|
-
let getCardNumber = await Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {resolveMsg: null, rejectMsg: '重发卡售气获取卡号失败!!'})
|
|
752
|
-
console.log('获取卡号、、', getCardNumber)
|
|
753
|
-
if (getCardNumber.data.cardNumber) {
|
|
754
|
-
// 当卡的别名是泰鹏普通卡的时候卡号和表号一致
|
|
755
|
-
console.log('开始验证是不是泰鹏普通卡')
|
|
756
|
-
if (row.f_alias && row.f_alias.includes('SmartCard_TP')) {
|
|
757
|
-
model.cardNumber = row.f_meternumber
|
|
758
|
-
} else {
|
|
759
|
-
model.cardNumber = getCardNumber.data.cardNumber + ''
|
|
760
|
-
model.f_card_id = getCardNumber.data.cardNumber + ''
|
|
761
|
-
}
|
|
762
|
-
} else {
|
|
763
|
-
throw new Error('获取卡号失败!请核实参数管理中的卡号重新发卡售气。')
|
|
764
|
-
}
|
|
765
|
-
// 存库
|
|
766
|
-
result = await Vue.resetpost('rs/logic/sale_resetsendCardSaleGas_logic', {data: model}, {resolveMsg: null, rejectMsg: '重发卡售气存库失败'})
|
|
767
|
-
console.log('重发卡售气存库返回', result)
|
|
768
|
-
// 写卡
|
|
769
|
-
let cardParams = await getParamGen(result.data.cardnumber, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
770
|
-
|
|
771
|
-
// 组织写卡数据
|
|
772
|
-
let params = {
|
|
773
|
-
factory: row.f_alias,
|
|
774
|
-
kmm: '0', // 2019-12-22 查旭说的。给一个0 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
775
|
-
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
776
|
-
kh: result.data.cardnumber, // 卡号
|
|
777
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
778
|
-
ql: model.f_pregas, // 预购气量
|
|
779
|
-
csql: '0', // 上次购气量,新开户为0
|
|
780
|
-
ccsql: '0', // 上上次购气量,新开户为0
|
|
781
|
-
cs: '1', // 求购气次数,先开户为1
|
|
782
|
-
// ljgql: model.f_pregas, // 当前累计购气量
|
|
783
|
-
bkcs: '0', // 新开户卡,为0
|
|
784
|
-
ljyql: '0', // 累积用气量,有些表要累加原来用气量,新开户卡,为0
|
|
785
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
786
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
787
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
788
|
-
cssqrq: '0', // 上次售气日期,格式为YYYYMMDD
|
|
789
|
-
meterid: row.f_meternumber, // 表号
|
|
790
|
-
money: model.f_preamount, // 购气金额
|
|
791
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
792
|
-
klx: row.f_coding,
|
|
793
|
-
ljgql: (row.f_total_gas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
794
|
-
ljgqje: (row.f_total_fee - 0) + (model.f_preamount - 0) // 累计购气金额
|
|
795
|
-
}
|
|
796
|
-
// 判断是否是累购表
|
|
797
|
-
if (row.f_support_purchase === '是') {
|
|
798
|
-
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
799
|
-
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
800
|
-
}
|
|
801
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
802
|
-
console.log('重发卡售气写卡参数', params)
|
|
803
|
-
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
804
|
-
resolveMsg: null,
|
|
805
|
-
rejectMsg: '重开户卡服务错误'
|
|
806
|
-
}, 80000)
|
|
807
|
-
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
808
|
-
// 写卡异常
|
|
809
|
-
// 数据回滚操作
|
|
810
|
-
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
811
|
-
} else {
|
|
812
|
-
// 写卡成功
|
|
813
|
-
// 更新卡密码
|
|
814
|
-
await Vue.CommonService.updatePassword(row, cardRes)
|
|
815
|
-
Vue.showAlert('初始化卡成功', 'success', 2000)
|
|
816
|
-
return result
|
|
817
|
-
}
|
|
818
|
-
} else {
|
|
819
|
-
throw new Error(`请检查卡是否插好!!`)
|
|
820
|
-
}
|
|
821
|
-
} catch (error) {
|
|
822
|
-
if (result) {
|
|
823
|
-
// 出错进行回滚
|
|
824
|
-
row.f_userfiles_id = row.f_userfiles_id + ''
|
|
825
|
-
if (result) {
|
|
826
|
-
await Vue.resetpost('rs/logic/salecardrollback', {data: {id: result.data.id, row: row}}, {
|
|
827
|
-
resolveMsg: null,
|
|
828
|
-
rejectMsg: '写卡失败,数据回滚失败,请联系技术人员处理!!'
|
|
829
|
-
})
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
if (error.data) {
|
|
833
|
-
throw new Error(error.data)
|
|
834
|
-
} else {
|
|
835
|
-
throw error
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
let sendCardSaleGasGen = async function (model, row) {
|
|
841
|
-
// 1.存库 2.写卡
|
|
842
|
-
let result = null
|
|
843
|
-
let initdata = {
|
|
844
|
-
state: null
|
|
845
|
-
}
|
|
846
|
-
let cardState = {
|
|
847
|
-
data: JSON.stringify(initdata)
|
|
848
|
-
}
|
|
849
|
-
try {
|
|
850
|
-
console.log('巴彦发卡售气' + row.f_alias)
|
|
851
|
-
if (row.f_alias !== 'ShuMa') {
|
|
852
|
-
cardState = await hasCardGen()
|
|
853
|
-
}
|
|
854
|
-
console.log('判卡函数返回:', cardState)
|
|
855
|
-
if (JSON.parse(cardState.data).state === 1 || row.f_alias === 'ShuMa') {
|
|
856
|
-
// 获取卡号
|
|
857
|
-
let getCardNumber = {data: {cardNumber: null}}
|
|
858
|
-
if (!row.f_card_id) {
|
|
859
|
-
getCardNumber = await Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {resolveMsg: null, rejectMsg: '发卡售气获取卡号失败!!'})
|
|
860
|
-
console.log('获取卡号、、', getCardNumber)
|
|
861
|
-
} else {
|
|
862
|
-
getCardNumber.data.cardNumber = row.f_card_id
|
|
863
|
-
console.log('档案自带卡号、、', getCardNumber)
|
|
864
|
-
}
|
|
865
|
-
if (getCardNumber.data.cardNumber) {
|
|
866
|
-
// 当卡的别名是泰鹏普通卡的时候卡号和表号一致
|
|
867
|
-
console.log('开始验证是不是泰鹏普通卡')
|
|
868
|
-
if (row.f_alias && (row.f_alias.includes('SmartCard_TP') || row.f_alias.includes('LiHengSystem'))) {
|
|
869
|
-
model.cardNumber = row.f_meternumber
|
|
870
|
-
} else if (row.f_alias && row.f_alias.includes('LaiDeRF')) {
|
|
871
|
-
model.cardNumber = row.f_card_id
|
|
872
|
-
} else {
|
|
873
|
-
model.cardNumber = getCardNumber.data.cardNumber + ''
|
|
874
|
-
}
|
|
875
|
-
} else {
|
|
876
|
-
throw new Error('获取卡号失败!请核实参数管理中的卡号重新发卡售气。')
|
|
877
|
-
}
|
|
878
|
-
// 存库
|
|
879
|
-
result = await Vue.resetpost('rs/logic/sale_sendCardSaleGas_logic', {data: model}, {resolveMsg: null, rejectMsg: '发卡售气存库失败'})
|
|
880
|
-
console.log('发卡售气存库返回', result)
|
|
881
|
-
// 写卡
|
|
882
|
-
let cardParams = await getParamGen(result.data.cardnumber, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
883
|
-
|
|
884
|
-
// 组织写卡数据
|
|
885
|
-
let params = {
|
|
886
|
-
factory: row.f_alias,
|
|
887
|
-
kmm: '0', // 2019-12-22 查旭说的。给一个0 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
888
|
-
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
889
|
-
kh: result.data.cardnumber, // 卡号
|
|
890
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
891
|
-
ql: model.f_pregas, // 预购气量
|
|
892
|
-
csql: '0', // 上次购气量,新开户为0
|
|
893
|
-
ccsql: '0', // 上上次购气量,新开户为0
|
|
894
|
-
cs: '1', // 求购气次数,先开户为1
|
|
895
|
-
// ljgql: model.f_pregas, // 当前累计购气量
|
|
896
|
-
bkcs: '0', // 新开户卡,为0
|
|
897
|
-
ljyql: '0', // 累积用气量,有些表要累加原来用气量,新开户卡,为0
|
|
898
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
899
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
900
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
901
|
-
cssqrq: '0', // 上次售气日期,格式为YYYYMMDD
|
|
902
|
-
meterid: row.f_meternumber, // 表号
|
|
903
|
-
money: model.f_write_money, // 购气金额
|
|
904
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
905
|
-
klx: row.f_coding,
|
|
906
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
907
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0) // 累计购气金额
|
|
908
|
-
}
|
|
909
|
-
// 天源表发卡售气时,cs默认给0
|
|
910
|
-
if (row.f_alias && row.f_alias.includes('TianYuan')) {
|
|
911
|
-
console.log('天源表发卡售气时,写卡次数给:', params.cs)
|
|
912
|
-
params.cs = '0'
|
|
913
|
-
}
|
|
914
|
-
// 判断是否是累购表
|
|
915
|
-
if (row.f_support_purchase === '是') {
|
|
916
|
-
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
917
|
-
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
918
|
-
}
|
|
919
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
920
|
-
console.log('发卡售气写卡参数', params)
|
|
921
|
-
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
922
|
-
resolveMsg: null,
|
|
923
|
-
rejectMsg: '开户卡服务错误'
|
|
924
|
-
}, 80000)
|
|
925
|
-
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
926
|
-
// 写卡异常
|
|
927
|
-
// 数据回滚操作
|
|
928
|
-
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
929
|
-
} else {
|
|
930
|
-
// 写卡成功
|
|
931
|
-
// 更新卡密码
|
|
932
|
-
if (row.f_alias === 'ShuMa') {
|
|
933
|
-
// 回写收费记录
|
|
934
|
-
cardState = await Vue.CommonService.updateReocrdPassword(result, cardRes, 'sellgas')
|
|
935
|
-
} else {
|
|
936
|
-
await Vue.CommonService.updatePassword(row, cardRes)
|
|
937
|
-
}
|
|
938
|
-
Vue.showAlert('发卡售气成功', 'success', 2000)
|
|
939
|
-
return result
|
|
940
|
-
}
|
|
941
|
-
} else {
|
|
942
|
-
throw new Error(`请检查卡是否插好!!`)
|
|
943
|
-
}
|
|
944
|
-
} catch (error) {
|
|
945
|
-
if (result) {
|
|
946
|
-
// 出错进行回滚
|
|
947
|
-
row.f_userfiles_id = row.f_userfiles_id + ''
|
|
948
|
-
if (result) {
|
|
949
|
-
await Vue.resetpost('rs/logic/salecardrollback', {data: {id: result.data.id, row: row}}, {
|
|
950
|
-
resolveMsg: null,
|
|
951
|
-
rejectMsg: '写卡失败,数据回滚失败,请联系技术人员处理!!'
|
|
952
|
-
})
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
if (error.data) {
|
|
956
|
-
throw new Error(error.data)
|
|
957
|
-
} else {
|
|
958
|
-
throw error
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
let replaceCardGen2 = function * (model, row, allot) {
|
|
964
|
-
let result = yield co(reissueCardGen(model, row))
|
|
965
|
-
let data = {
|
|
966
|
-
userfiles: {},
|
|
967
|
-
record: {
|
|
968
|
-
id: result.data.id,
|
|
969
|
-
f_state: '有效'
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
return yield Vue.resetpost('rs/logic/updatemark', {data: data}, {resolveMsg: '补卡成功', rejectMsg: '补卡修改状态失败'})
|
|
973
|
-
}
|
|
974
|
-
// 物联网表发卡管理
|
|
975
|
-
let replaceCardGenWeb = function * (model, row) {
|
|
976
|
-
let result = null
|
|
977
|
-
let allotback
|
|
978
|
-
try {
|
|
979
|
-
// 判断是否有卡
|
|
980
|
-
let cardState = yield co(hasCardGen())
|
|
981
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
982
|
-
let cardId = ''
|
|
983
|
-
if (row.f_card_id && row.f_card_id !== 'null') {
|
|
984
|
-
cardId = row.f_card_id
|
|
985
|
-
} else {
|
|
986
|
-
let getCardNumber = yield co(getCardNumberGen(row.f_gasbrand_id))
|
|
987
|
-
console.log('获取卡号、、', getCardNumber)
|
|
988
|
-
cardId = getCardNumber.data.cardNumber
|
|
989
|
-
}
|
|
990
|
-
if (row.f_tag) {
|
|
991
|
-
// 截取用户编号后四位
|
|
992
|
-
cardId = row.f_tag + row.f_card_id
|
|
993
|
-
}
|
|
994
|
-
model.f_card_id = cardId
|
|
995
|
-
// 存库
|
|
996
|
-
result = yield co(reissueCardGenJB(model, row))
|
|
997
|
-
// 获取气价和售气情况参数
|
|
998
|
-
let cardParams = yield co(getParamGen(cardId, row.f_alias, row.f_user_id, row.f_userfiles_id))
|
|
999
|
-
// 写卡
|
|
1000
|
-
let params = {
|
|
1001
|
-
factory: row.f_alias,
|
|
1002
|
-
kh: cardId, // 卡号
|
|
1003
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1004
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1005
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1006
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1007
|
-
ljgql: (row.f_total_gas - 0), // 当前累计购气量
|
|
1008
|
-
ljgqje: (row.f_total_fee - 0), // 累计购气金额
|
|
1009
|
-
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1010
|
-
bkcs: row.f_fillcard_times + 1, // 补卡次数,从补卡表里通过表编号获得
|
|
1011
|
-
cs: row.f_times, // 求购气次数,先开户为1
|
|
1012
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号
|
|
1013
|
-
meterid: row.f_meternumber, // 表号
|
|
1014
|
-
meternumber: row.f_meternumber,
|
|
1015
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1016
|
-
money: 0, // 购气金额
|
|
1017
|
-
klx: row.f_coding
|
|
1018
|
-
}
|
|
1019
|
-
// 判断是否是累购表
|
|
1020
|
-
if (row.f_support_purchase === '是') {
|
|
1021
|
-
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
1022
|
-
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
1023
|
-
}
|
|
1024
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1025
|
-
console.log('补卡是写的次数。。。。', params)
|
|
1026
|
-
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
1027
|
-
resolveMsg: null,
|
|
1028
|
-
rejectMsg: '补卡卡服务错误'
|
|
1029
|
-
}))
|
|
1030
|
-
// 卡服务写卡异常,业务逻辑回滚
|
|
1031
|
-
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1032
|
-
Vue.$showAlert('物联网表补卡失败!!', 'danger', 0)
|
|
1033
|
-
let rollbackParam = {
|
|
1034
|
-
id: result.data.id,
|
|
1035
|
-
f_card_id: row.f_card_id,
|
|
1036
|
-
f_whether_hairpin: row.f_whether_hairpin,
|
|
1037
|
-
f_user_id: row.f_user_id
|
|
1038
|
-
}
|
|
1039
|
-
if (row.f_tag) {
|
|
1040
|
-
rollbackParam.f_tag = row.f_tag
|
|
1041
|
-
}
|
|
1042
|
-
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1043
|
-
resolveMsg: null,
|
|
1044
|
-
rejectMsg: null
|
|
1045
|
-
})
|
|
1046
|
-
} else {
|
|
1047
|
-
// 如果成功修改标识(更新状态为有效)
|
|
1048
|
-
// 没有更新过表档案,这里版本号减一
|
|
1049
|
-
row.version = (row.version - 0) - 1
|
|
1050
|
-
yield co(Vue.CommonService.updatePassword(row, cardRes))
|
|
1051
|
-
let data = {
|
|
1052
|
-
userfiles: {
|
|
1053
|
-
f_card_id: row.f_card_id,
|
|
1054
|
-
f_whether_hairpin: '已发'
|
|
1055
|
-
},
|
|
1056
|
-
record: {
|
|
1057
|
-
id: result.data.id,
|
|
1058
|
-
f_state: '有效'
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
return yield Vue.resetpost('rs/logic/updatemark', {data: data}, {resolveMsg: '物联网表补卡成功', rejectMsg: '补卡修改状态失败'})
|
|
1062
|
-
}
|
|
1063
|
-
} else {
|
|
1064
|
-
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1065
|
-
}
|
|
1066
|
-
} catch (error) {
|
|
1067
|
-
let msg = ''
|
|
1068
|
-
if (error.status === 612) {
|
|
1069
|
-
msg = '请检查读卡器时候连接,或者卡服务是否启动!!'
|
|
1070
|
-
} else {
|
|
1071
|
-
msg = '补卡失败!!'
|
|
1072
|
-
|
|
1073
|
-
let rollbackParam = {
|
|
1074
|
-
id: result.data.id,
|
|
1075
|
-
f_card_id: null,
|
|
1076
|
-
f_whether_hairpin: row.f_whether_hairpin,
|
|
1077
|
-
f_user_id: row.f_user_id
|
|
1078
|
-
}
|
|
1079
|
-
if (row.f_tag) {
|
|
1080
|
-
rollbackParam.f_tag = row.f_tag
|
|
1081
|
-
}
|
|
1082
|
-
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1083
|
-
resolveMsg: null,
|
|
1084
|
-
rejectMsg: '物联网表补卡失败!!'
|
|
1085
|
-
})
|
|
1086
|
-
}
|
|
1087
|
-
Vue.showAlert(msg, 'danger', 0)
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
// 机表补卡管理
|
|
1091
|
-
let replaceCardGenJB = function * (model, row) {
|
|
1092
|
-
let result = null
|
|
1093
|
-
let allotback
|
|
1094
|
-
try {
|
|
1095
|
-
// 判断是否有卡
|
|
1096
|
-
let cardState = yield co(hasCardGen())
|
|
1097
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
1098
|
-
let cardId = row.f_card_id
|
|
1099
|
-
if (row.f_tag) {
|
|
1100
|
-
// 截取用户编号后四位
|
|
1101
|
-
cardId = row.f_tag + row.f_card_id
|
|
1102
|
-
}
|
|
1103
|
-
model.f_card_id = cardId
|
|
1104
|
-
// 存库
|
|
1105
|
-
result = yield co(reissueCardGenJB(model, row))
|
|
1106
|
-
// 获取气价和售气情况参数
|
|
1107
|
-
let cardParams = yield co(getParamGen(cardId, row.f_alias, row.f_user_id, row.f_userfiles_id))
|
|
1108
|
-
// 写卡
|
|
1109
|
-
let params = {
|
|
1110
|
-
factory: row.f_alias,
|
|
1111
|
-
kh: cardId, // 卡号
|
|
1112
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1113
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1114
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1115
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1116
|
-
ljgql: (row.f_total_gas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1117
|
-
ljgqje: (row.f_total_fee - 0) + (model.f_preamount - 0), // 累计购气金额
|
|
1118
|
-
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1119
|
-
bkcs: row.f_fillcard_times + 1, // 补卡次数,从补卡表里通过表编号获得
|
|
1120
|
-
cs: row.f_times, // 求购气次数,先开户为1
|
|
1121
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号
|
|
1122
|
-
meterid: row.f_meternumber, // 表号
|
|
1123
|
-
meternumber: row.f_meternumber,
|
|
1124
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1125
|
-
money: 0, // 购气金额
|
|
1126
|
-
klx: row.f_coding
|
|
1127
|
-
}
|
|
1128
|
-
// 判断是否是累购表
|
|
1129
|
-
if (row.f_support_purchase === '是') {
|
|
1130
|
-
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
1131
|
-
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
1132
|
-
}
|
|
1133
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1134
|
-
console.log('补卡是写的次数。。。。', params)
|
|
1135
|
-
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
1136
|
-
resolveMsg: null,
|
|
1137
|
-
rejectMsg: '补卡卡服务错误'
|
|
1138
|
-
}, 80000))
|
|
1139
|
-
// 卡服务写卡异常,业务逻辑回滚
|
|
1140
|
-
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1141
|
-
Vue.$showAlert('机表补卡失败!!', 'danger', 0)
|
|
1142
|
-
let rollbackParam = {
|
|
1143
|
-
id: result.data.id,
|
|
1144
|
-
f_card_id: row.f_card_id,
|
|
1145
|
-
f_whether_hairpin: row.f_whether_hairpin,
|
|
1146
|
-
f_user_id: row.f_user_id
|
|
1147
|
-
}
|
|
1148
|
-
if (row.f_tag) {
|
|
1149
|
-
rollbackParam.f_tag = row.f_tag
|
|
1150
|
-
}
|
|
1151
|
-
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1152
|
-
resolveMsg: null,
|
|
1153
|
-
rejectMsg: null
|
|
1154
|
-
})
|
|
1155
|
-
} else {
|
|
1156
|
-
// 如果成功修改标识(更新状态为有效)
|
|
1157
|
-
// 没有更新过表档案,这里版本号减一
|
|
1158
|
-
row.version = (row.version - 0) - 1
|
|
1159
|
-
yield co(Vue.CommonService.updatePassword(row, cardRes))
|
|
1160
|
-
let data = {
|
|
1161
|
-
userfiles: {
|
|
1162
|
-
f_card_id: row.f_card_id,
|
|
1163
|
-
f_whether_hairpin: '已发'
|
|
1164
|
-
},
|
|
1165
|
-
record: {
|
|
1166
|
-
id: result.data.id,
|
|
1167
|
-
f_state: '有效'
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
return yield Vue.resetpost('rs/logic/updatemark', {data: data}, {resolveMsg: '机表补卡成功', rejectMsg: '补卡修改状态失败'})
|
|
1171
|
-
}
|
|
1172
|
-
} else {
|
|
1173
|
-
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1174
|
-
}
|
|
1175
|
-
} catch (error) {
|
|
1176
|
-
let msg = ''
|
|
1177
|
-
if (error.status === 612) {
|
|
1178
|
-
msg = '请检查读卡器时候连接,或者卡服务是否启动!!'
|
|
1179
|
-
} else {
|
|
1180
|
-
msg = '补卡失败!!'
|
|
1181
|
-
|
|
1182
|
-
let rollbackParam = {
|
|
1183
|
-
id: result.data.id,
|
|
1184
|
-
f_card_id: null,
|
|
1185
|
-
f_whether_hairpin: row.f_whether_hairpin,
|
|
1186
|
-
f_user_id: row.f_user_id
|
|
1187
|
-
}
|
|
1188
|
-
if (row.f_tag) {
|
|
1189
|
-
rollbackParam.f_tag = row.f_tag
|
|
1190
|
-
}
|
|
1191
|
-
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1192
|
-
resolveMsg: null,
|
|
1193
|
-
rejectMsg: '机表补卡失败!!'
|
|
1194
|
-
})
|
|
1195
|
-
}
|
|
1196
|
-
Vue.showAlert(msg, 'danger', 0)
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
// 擦虚气
|
|
1200
|
-
let replaceXq = function * (model, row) {
|
|
1201
|
-
let result = null
|
|
1202
|
-
let cardState = yield co(hasCardGen())
|
|
1203
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
1204
|
-
let params = {
|
|
1205
|
-
factory: row.f_alias,
|
|
1206
|
-
kh: row.f_card_id, // 卡号
|
|
1207
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1208
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1209
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1210
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1211
|
-
ljgql: (row.f_total_gas - 0), // 当前累计购气量
|
|
1212
|
-
ljgqje: (row.f_total_fee - 0), // 累计购气金额
|
|
1213
|
-
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1214
|
-
bkcs: row.f_fillcard_times + 1, // 补卡次数,从补卡表里通过表编号获得
|
|
1215
|
-
cs: row.f_times, // 求购气次数,先开户为1
|
|
1216
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号
|
|
1217
|
-
meterid: row.f_meternumber, // 表号
|
|
1218
|
-
meternumber: row.f_meternumber,
|
|
1219
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1220
|
-
money: 0, // 购气金额
|
|
1221
|
-
klx: row.f_coding
|
|
1222
|
-
}
|
|
1223
|
-
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
1224
|
-
resolveMsg: null,
|
|
1225
|
-
rejectMsg: '擦虚气服务错误'
|
|
1226
|
-
}, 80000))
|
|
1227
|
-
if (cardRes.data.Err || cardRes.data.Exception) {
|
|
1228
|
-
return {status: 1}
|
|
1229
|
-
} else {
|
|
1230
|
-
return {status: 0}
|
|
1231
|
-
}
|
|
1232
|
-
} else {
|
|
1233
|
-
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
// 补卡管理
|
|
1238
|
-
let replaceCardGen = function * (model, row, allot) {
|
|
1239
|
-
let result = null
|
|
1240
|
-
let initdata = {
|
|
1241
|
-
state: 1
|
|
1242
|
-
}
|
|
1243
|
-
let cardState = {
|
|
1244
|
-
data: JSON.stringify(initdata)
|
|
1245
|
-
}
|
|
1246
|
-
let allotback
|
|
1247
|
-
try {
|
|
1248
|
-
// 判断是否有卡
|
|
1249
|
-
if (row.f_alias !== 'ShuMa') {
|
|
1250
|
-
cardState = yield co(hasCardGen())
|
|
1251
|
-
}
|
|
1252
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
1253
|
-
let cardId = row.f_card_id
|
|
1254
|
-
// 如果当前是物联网表,表未发卡,进行补需要获取卡号
|
|
1255
|
-
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是' && (row.f_card_id == null || row.f_card_id === '')) {
|
|
1256
|
-
let getCardNumber = yield Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {resolveMsg: null, rejectMsg: '发卡售气获取卡号失败!!'})
|
|
1257
|
-
console.log('获取卡号、、', getCardNumber)
|
|
1258
|
-
if (getCardNumber.data.cardNumber) {
|
|
1259
|
-
cardId = getCardNumber.data.cardNumber
|
|
1260
|
-
} else {
|
|
1261
|
-
throw new Error('获取卡号失败!请核实参数管理中的卡号重新发卡售气。')
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
if (row.f_tag) {
|
|
1265
|
-
// 截取用户编号后四位
|
|
1266
|
-
cardId = row.f_tag + row.f_card_id
|
|
1267
|
-
}
|
|
1268
|
-
model.f_card_id = cardId
|
|
1269
|
-
// 存库
|
|
1270
|
-
result = yield co(reissueCardGen(model, row))
|
|
1271
|
-
if (allot) {
|
|
1272
|
-
allotback = yield Vue.resetpost('rs/logic/saveAllotData', {data: allot}, {
|
|
1273
|
-
resolveMsg: null,
|
|
1274
|
-
rejectMsg: '更新发卡信息失败'
|
|
1275
|
-
})
|
|
1276
|
-
}
|
|
1277
|
-
// 获取气价和售气情况参数
|
|
1278
|
-
let cardParams = yield co(getParamGen(cardId, row.f_alias, row.f_user_id, row.f_userfiles_id))
|
|
1279
|
-
console.log('补卡是写的次数111。。。。', row, model)
|
|
1280
|
-
// 写卡
|
|
1281
|
-
let params = {
|
|
1282
|
-
factory: row.f_alias,
|
|
1283
|
-
kh: cardId, // 卡号
|
|
1284
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1285
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1286
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1287
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1288
|
-
ljgql: (row.f_total_gas - 0), // 当前累计购气量
|
|
1289
|
-
ljgqje: (row.f_total_fee - 0), // 累计购气金额
|
|
1290
|
-
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1291
|
-
bkcs: row.f_fillcard_times + 1, // 补卡次数,从补卡表里通过表编号获得
|
|
1292
|
-
cs: row.f_times, // 求购气次数,先开户为1
|
|
1293
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号
|
|
1294
|
-
meterid: row.f_meternumber, // 表号
|
|
1295
|
-
meternumber: row.f_meternumber,
|
|
1296
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1297
|
-
money: 0, // 购气金额
|
|
1298
|
-
klx: row.f_coding
|
|
1299
|
-
}
|
|
1300
|
-
// 判断是否是累购表
|
|
1301
|
-
if (row.f_support_purchase === '是') {
|
|
1302
|
-
params.ljgql = (row.f_write_totalgas - 0)
|
|
1303
|
-
params.ljgqje = (row.f_write_totalfee - 0)
|
|
1304
|
-
}
|
|
1305
|
-
// 判断是否接表,如果未接表(次数减一)已过表(次数为档案里面的次数) 针对不补气的
|
|
1306
|
-
if (model.f_ispick_table) {
|
|
1307
|
-
params.cs = (model.f_ispick_table === '未过表' ? row.f_times - 1 : row.f_times)
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1311
|
-
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1312
|
-
// params.klx = yield co(getmodelbrandGen(row))
|
|
1313
|
-
// params.klx = params.klx.data[0].f_coding
|
|
1314
|
-
// }
|
|
1315
|
-
console.log('补卡是写的次数。。。。', params)
|
|
1316
|
-
|
|
1317
|
-
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
1318
|
-
resolveMsg: null,
|
|
1319
|
-
rejectMsg: '补卡卡服务错误'
|
|
1320
|
-
}, 80000))
|
|
1321
|
-
// 卡服务写卡异常,业务逻辑回滚
|
|
1322
|
-
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1323
|
-
Vue.$showAlert('补卡失败!!', 'danger', 0)
|
|
1324
|
-
let rollbackParam = {
|
|
1325
|
-
id: result.data.id,
|
|
1326
|
-
f_card_id: row.f_card_id,
|
|
1327
|
-
f_user_id: row.f_user_id
|
|
1328
|
-
}
|
|
1329
|
-
if (row.f_tag) {
|
|
1330
|
-
rollbackParam.f_tag = row.f_tag
|
|
1331
|
-
}
|
|
1332
|
-
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1333
|
-
resolveMsg: null,
|
|
1334
|
-
rejectMsg: null
|
|
1335
|
-
})
|
|
1336
|
-
// 更新卡状态为作废
|
|
1337
|
-
if (allot) {
|
|
1338
|
-
yield Vue.resetpost('rs/logic/allotDataRollback', {data: allotback.data}, {resolveMsg: null, rejectMsg: null})
|
|
1339
|
-
}
|
|
1340
|
-
} else {
|
|
1341
|
-
// 如果成功修改标识(更新状态为有效)
|
|
1342
|
-
// 没有更新过表档案,这里版本号减一
|
|
1343
|
-
row.version = (row.version - 0) - 1
|
|
1344
|
-
if (row.f_alias !== 'ShuMa') {
|
|
1345
|
-
yield co(Vue.CommonService.updatePassword(row, cardRes))
|
|
1346
|
-
} else {
|
|
1347
|
-
yield co(Vue.CommonService.updateReocrdPassword(result, cardRes, 'fillcard'))
|
|
1348
|
-
}
|
|
1349
|
-
let data = {
|
|
1350
|
-
userfiles: {},
|
|
1351
|
-
record: {
|
|
1352
|
-
id: result.data.id,
|
|
1353
|
-
f_state: '有效'
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1356
|
-
return yield Vue.resetpost('rs/logic/updatemark', {data: data}, {resolveMsg: '补卡成功', rejectMsg: '补卡修改状态失败'})
|
|
1357
|
-
}
|
|
1358
|
-
} else {
|
|
1359
|
-
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1360
|
-
}
|
|
1361
|
-
} catch (error) {
|
|
1362
|
-
console.log(error)
|
|
1363
|
-
let msg = ''
|
|
1364
|
-
if (error.status === 612) {
|
|
1365
|
-
msg = '请检查读卡器时候连接,或者卡服务是否启动!!'
|
|
1366
|
-
} else {
|
|
1367
|
-
msg = '补卡失败!!'
|
|
1368
|
-
|
|
1369
|
-
let rollbackParam = {
|
|
1370
|
-
id: result.data.id,
|
|
1371
|
-
f_card_id: row.f_card_id,
|
|
1372
|
-
f_user_id: row.f_user_id
|
|
1373
|
-
}
|
|
1374
|
-
if (row.f_tag) {
|
|
1375
|
-
rollbackParam.f_tag = row.f_tag
|
|
1376
|
-
}
|
|
1377
|
-
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1378
|
-
resolveMsg: null,
|
|
1379
|
-
rejectMsg: '补卡失败!!'
|
|
1380
|
-
})
|
|
1381
|
-
}
|
|
1382
|
-
// 更新卡状态为作废
|
|
1383
|
-
if (allot) {
|
|
1384
|
-
yield Vue.resetpost('rs/logic/allotDataRollback', {data: allotback.data}, {resolveMsg: null, rejectMsg: null})
|
|
1385
|
-
}
|
|
1386
|
-
Vue.showAlert(msg, 'danger', 0)
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
let offlineWriteGen2 = async function (row) {
|
|
1391
|
-
let update = {
|
|
1392
|
-
id: row.unWriteSell[0].id,
|
|
1393
|
-
f_write_operator: Vue.$login.f.name,
|
|
1394
|
-
f_write_date: Vue.$login.toStandardTimeString()
|
|
1395
|
-
}
|
|
1396
|
-
await Vue.resetpost('rs/logic/offlineWrite', update, {resolveMsg: null, rejectMsg: '写卡成功,更新数据失败'})
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
let offlineWriteGen = async function (row) {
|
|
1400
|
-
console.log('线下写卡', row)
|
|
1401
|
-
try {
|
|
1402
|
-
// 写卡前调用(该为特殊业务逻辑根据需要写到project工程) (有些第三方缴费柜台写卡,用户缴费之后,如果在规定时间内不写卡,就会进行退款。所以写卡前调用第三方锁定订单。写卡成功或失败调用对应的接口告知第三方)
|
|
1403
|
-
|
|
1404
|
-
let beforeParam = {
|
|
1405
|
-
id: row.unWriteSell[0].id,
|
|
1406
|
-
f_operatorid: Vue.$login.f.id,
|
|
1407
|
-
f_depid: Vue.$login.f.depids
|
|
1408
|
-
}
|
|
1409
|
-
await Vue.resetpost('rs/logic/sale_write_before', {data: beforeParam}, {resolveMsg: null, rejectMsg: '线下写卡前调用第三方失败!!'})
|
|
1410
|
-
let initdata = {
|
|
1411
|
-
state: 1
|
|
1412
|
-
}
|
|
1413
|
-
let cardState = {
|
|
1414
|
-
data: JSON.stringify(initdata)
|
|
1415
|
-
}
|
|
1416
|
-
console.log('巴彦发卡售气' + row.f_alias)
|
|
1417
|
-
if (row.f_alias !== 'ShuMa') {
|
|
1418
|
-
cardState = await hasCardGen()
|
|
1419
|
-
}
|
|
1420
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
1421
|
-
// 获取
|
|
1422
|
-
let result = await Vue.resetpost('rs/logic/sale_getLastOper', {data: {f_userfiles_id: row.f_userfiles_id}}, {resolveMsg: null, rejectMsg: '获取最后一次操作失败'})
|
|
1423
|
-
console.log('获取最后一次的操作。。', result)
|
|
1424
|
-
// 先把收费记录状态改成 已写卡在进行操作
|
|
1425
|
-
// 写卡成功 更新收费记录
|
|
1426
|
-
let update = {
|
|
1427
|
-
id: row.unWriteSell[0].id,
|
|
1428
|
-
f_write_comments: !row.f_write_comments ? '' : row.f_write_comments,
|
|
1429
|
-
f_write_operator: Vue.$login.f.name,
|
|
1430
|
-
f_write_date: Vue.$login.toStandardTimeString()
|
|
1431
|
-
}
|
|
1432
|
-
await Vue.resetpost('rs/logic/offlineWrite', update, {resolveMsg: null, rejectMsg: '写卡成功,更新数据失败'})
|
|
1433
|
-
let cardid = row.f_card_id
|
|
1434
|
-
if (row.f_tag) {
|
|
1435
|
-
// 截取用户编号后四位
|
|
1436
|
-
cardid = row.f_tag + row.f_card_id
|
|
1437
|
-
}
|
|
1438
|
-
// 执行写卡操作
|
|
1439
|
-
let cardParams = await getParamGen(row.f_card_id, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1440
|
-
let param = {
|
|
1441
|
-
factory: row.f_alias,
|
|
1442
|
-
kh: cardid,
|
|
1443
|
-
cs: row.unWriteSell[0].f_times,
|
|
1444
|
-
yhh: row.cardInfo.Yhh ? row.cardInfo.Yhh : row.f_meterid,
|
|
1445
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0,
|
|
1446
|
-
meternumber: row.f_meternumber ? row.f_meternumber : 0,
|
|
1447
|
-
kmm: row.f_card_password,
|
|
1448
|
-
ljgql: (row.f_write_totalgas - 0), // 当前累计购气量
|
|
1449
|
-
ljgqje: (row.f_write_totalfee - 0), // 累计购气金额
|
|
1450
|
-
bjql: row.f_police_gas,
|
|
1451
|
-
czsx: row.f_topup_ceil,
|
|
1452
|
-
tzed: row.f_overdr_lines,
|
|
1453
|
-
bkcs: row.f_fillcard_times,
|
|
1454
|
-
dqdm: row.f_area_code,
|
|
1455
|
-
klx: row.f_coding,
|
|
1456
|
-
ql: row.unWriteSell[0].f_pregas,
|
|
1457
|
-
money: row.unWriteSell[0].f_write_money
|
|
1458
|
-
}
|
|
1459
|
-
param = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), param)
|
|
1460
|
-
let cardRes
|
|
1461
|
-
if (result.data.last_oper == null) result.data.last_oper = ''
|
|
1462
|
-
if (row.states === '补卡' || result.data.last_oper === '补卡') {
|
|
1463
|
-
param.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
|
|
1464
|
-
param.cs = row.cardInfo.Times + 1
|
|
1465
|
-
param.bkcs = param.bkcs + 1
|
|
1466
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
|
|
1467
|
-
} else if (row.states === '换表') {
|
|
1468
|
-
param.kzt = '0'
|
|
1469
|
-
param.bkcs = param.bkcs + 1
|
|
1470
|
-
param.cs = 1
|
|
1471
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
|
|
1472
|
-
} else {
|
|
1473
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
|
|
1474
|
-
}
|
|
1475
|
-
if (!cardParams || cardRes.data.Err || cardRes.data.Exception) {
|
|
1476
|
-
let sql = `update t_sellinggas set
|
|
1477
|
-
f_write_card = '写卡失败'
|
|
1478
|
-
where id = '${row.unWriteSell[0].id}'`
|
|
1479
|
-
let data = {
|
|
1480
|
-
sql: sql
|
|
1481
|
-
}
|
|
1482
|
-
await Vue.resetpost('rs/logic/runSQL', data)
|
|
1483
|
-
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
1484
|
-
} else {
|
|
1485
|
-
if (row.f_alias === 'ShuMa') {
|
|
1486
|
-
cardState = await Vue.CommonService.updateReocrdPassword(row.unWriteSell[0], cardRes, 'sellgas')
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
} else {
|
|
1490
|
-
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1491
|
-
}
|
|
1492
|
-
} catch (error) {
|
|
1493
|
-
// 考虑到这里报错可能是因为 写卡请求超时报的错,但是请求已经发到卡服务,可能已经写上卡,所以先不做处理
|
|
1494
|
-
// let sql = `update t_sellinggas set
|
|
1495
|
-
// f_write_card = '未写卡',
|
|
1496
|
-
// where id = '${row.unWriteSell[0].id}'`
|
|
1497
|
-
// let data = {
|
|
1498
|
-
// sql: sql
|
|
1499
|
-
// }
|
|
1500
|
-
// await this.$resetpost('rs/logic/runSQL', data)
|
|
1501
|
-
throw error
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
let DigtialSellGasGen = async function (model, row) {
|
|
1506
|
-
try {
|
|
1507
|
-
let result = await Vue.resetpost('rs/logic/sale_digtialCharge_logic', {data: model}, {resolveMsg: '收费成功', rejectMsg: '卡表收费存库失败'})
|
|
1508
|
-
return result.data.id
|
|
1509
|
-
} catch (error) {
|
|
1510
|
-
if (error.data) {
|
|
1511
|
-
throw new Error(error.data)
|
|
1512
|
-
} else {
|
|
1513
|
-
throw error
|
|
1514
|
-
}
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
let noCardSellGasGen = async function (model, row) {
|
|
1518
|
-
let result = null
|
|
1519
|
-
let params = {}
|
|
1520
|
-
console.log(model, row)
|
|
1521
|
-
try {
|
|
1522
|
-
result = await Vue.resetpost('rs/logic/sale_cardCharge_logic', {data: model}, {resolveMsg: '收费成功', rejectMsg: '卡表收费存库失败'})
|
|
1523
|
-
let cardid = row.f_card_id
|
|
1524
|
-
if (row.f_alias === 'ShuMa') {
|
|
1525
|
-
// 获取气价和售气情况参数
|
|
1526
|
-
let cardParams = await getParamGen(cardid, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1527
|
-
console.log('写卡次数和获取的写卡参数...', cardParams)
|
|
1528
|
-
// 写卡
|
|
1529
|
-
params = {
|
|
1530
|
-
factory: row.f_alias, // 气表厂家
|
|
1531
|
-
kh: cardid, // 卡号
|
|
1532
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
1533
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1534
|
-
bjql: row.f_police_gas,
|
|
1535
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1536
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1537
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1538
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1539
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1540
|
-
ql: model.f_pregas, // 预购气量
|
|
1541
|
-
cs: row.f_times + 1, // 求购气次数,先开户为1
|
|
1542
|
-
money: model.f_write_money, // 购气金额
|
|
1543
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1544
|
-
klx: row.f_coding,
|
|
1545
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
|
|
1546
|
-
}
|
|
1547
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1548
|
-
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {
|
|
1549
|
-
resolveMsg: null,
|
|
1550
|
-
rejectMsg: '卡服务错误'
|
|
1551
|
-
}, 80000)
|
|
1552
|
-
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1553
|
-
// 写卡异常
|
|
1554
|
-
// 数据回滚操作
|
|
1555
|
-
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
1556
|
-
} else {
|
|
1557
|
-
// 写卡成功
|
|
1558
|
-
|
|
1559
|
-
if (row.f_alias === 'ShuMa') {
|
|
1560
|
-
// 回写收费记录
|
|
1561
|
-
await Vue.CommonService.updateReocrdPassword(result, cardRes, 'sellgas')
|
|
1562
|
-
}
|
|
1563
|
-
Vue.showAlert('售气成功', 'success', 2000)
|
|
1564
|
-
return result
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
return result.data.id
|
|
1568
|
-
} catch (error) {
|
|
1569
|
-
if (result) {
|
|
1570
|
-
// 出错进行回滚
|
|
1571
|
-
row.f_userfiles_id = row.f_userfiles_id + ''
|
|
1572
|
-
if (result) {
|
|
1573
|
-
let data = {
|
|
1574
|
-
cardparam: JSON.stringify(params),
|
|
1575
|
-
cardpost: 'WriteGasCard',
|
|
1576
|
-
id: result.data.id,
|
|
1577
|
-
userinfo: {
|
|
1578
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
1579
|
-
version: row.userinfo_version + 1,
|
|
1580
|
-
f_balance: row.f_balance,
|
|
1581
|
-
userfiles: {
|
|
1582
|
-
f_user_id: model.f_user_id,
|
|
1583
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
1584
|
-
f_total_gas: row.f_total_gas,
|
|
1585
|
-
f_write_totalgas: row.f_write_totalgas,
|
|
1586
|
-
f_write_totalfee: row.f_write_totalfee,
|
|
1587
|
-
f_total_fee: row.f_total_fee,
|
|
1588
|
-
f_card_id: row.f_card_id,
|
|
1589
|
-
f_times: row.cardInfo.Times,
|
|
1590
|
-
version: row.version + 1
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
await Vue.resetpost('rs/logic/cardChargeRollback', {data: data}, {
|
|
1595
|
-
resolveMsg: null,
|
|
1596
|
-
rejectMsg: '写卡失败,数据回滚失败,请联系技术人员处理!!'
|
|
1597
|
-
})
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
if (error.data) {
|
|
1601
|
-
throw new Error(error.data)
|
|
1602
|
-
} else {
|
|
1603
|
-
throw error
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
|
|
1608
|
-
// 补气卡表收费
|
|
1609
|
-
let sellgasRemanentGen = async function (model, row) {
|
|
1610
|
-
let result = null
|
|
1611
|
-
try {
|
|
1612
|
-
let cardState = await hasCardGen()
|
|
1613
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
1614
|
-
// 将卡上次数写入数据库
|
|
1615
|
-
model.f_times = row.cardInfo.Times + 1
|
|
1616
|
-
// 将回写表号或者用户号
|
|
1617
|
-
model.f_meterid = row.cardInfo.Yhh ? row.cardInfo.Yhh : row.f_meterid
|
|
1618
|
-
|
|
1619
|
-
let cardid = row.f_card_id
|
|
1620
|
-
if (row.f_tag) {
|
|
1621
|
-
// 截取用户编号后四位
|
|
1622
|
-
cardid = model.f_card_id = row.f_tag + row.f_card_id
|
|
1623
|
-
}
|
|
1624
|
-
result = await Vue.resetpost('rs/logic/sellgasRemanentGas', {data: model}, {resolveMsg: null, rejectMsg: '卡表收费存库失败'})
|
|
1625
|
-
// 获取气价和售气情况参数
|
|
1626
|
-
let cardParams = await getParamGen(cardid, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1627
|
-
console.log('写卡次数和获取的写卡参数...', row.cardInfo.Times, cardParams)
|
|
1628
|
-
// 写卡
|
|
1629
|
-
let params = {
|
|
1630
|
-
factory: row.f_alias, // 气表厂家
|
|
1631
|
-
kh: cardid, // 卡号
|
|
1632
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
1633
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1634
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1635
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1636
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1637
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1638
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1639
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1640
|
-
ql: model.f_pregas, // 预购气量
|
|
1641
|
-
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1642
|
-
money: model.f_write_money, // 购气金额
|
|
1643
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
1644
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1645
|
-
klx: row.f_coding
|
|
1646
|
-
}
|
|
1647
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1648
|
-
console.log('购气最后操作。。', result)
|
|
1649
|
-
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'})
|
|
1650
|
-
console.log('卡表收费返回写卡参数值', cardRes)
|
|
1651
|
-
// 卡服务写卡异常,业务逻辑回滚
|
|
1652
|
-
if (!cardParams || ((model.f_pregas > model.f_remanent_gas) && !result) || cardRes.data.Err || cardRes.data.Exception) {
|
|
1653
|
-
let data = {
|
|
1654
|
-
id: result.data.id,
|
|
1655
|
-
userinfo: {
|
|
1656
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
1657
|
-
version: row.userinfo_version + 1,
|
|
1658
|
-
f_balance: row.f_balance,
|
|
1659
|
-
userfiles: {
|
|
1660
|
-
f_user_id: model.f_user_id,
|
|
1661
|
-
f_userfiles_id: model.f_userfiles_id,
|
|
1662
|
-
f_card_id: row.f_card_id,
|
|
1663
|
-
f_total_gas: row.f_total_gas,
|
|
1664
|
-
f_write_totalgas: row.f_write_totalgas,
|
|
1665
|
-
f_write_totalfee: row.f_write_totalfee,
|
|
1666
|
-
f_total_fee: row.f_total_fee,
|
|
1667
|
-
f_times: row.cardInfo.Times,
|
|
1668
|
-
version: row.version + 1
|
|
1669
|
-
}
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
if (row.f_tag) {
|
|
1673
|
-
data.userinfo.userfiles.f_tag = row.f_tag
|
|
1674
|
-
}
|
|
1675
|
-
await Vue.resetpost('rs/logic/sellgasremanentRollback', {data: data}, {resolveMsg: null, rejectMsg: '卡表收费回滚出错!!'})
|
|
1676
|
-
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
1677
|
-
} else {
|
|
1678
|
-
// 更新卡密码
|
|
1679
|
-
await Vue.CommonService.updatePassword(row, cardRes)
|
|
1680
|
-
Vue.showAlert('换表补气成功', 'success', 2000)
|
|
1681
|
-
return result
|
|
1682
|
-
}
|
|
1683
|
-
} else {
|
|
1684
|
-
throw new Error(`请检查卡是否插好!!`)
|
|
1685
|
-
}
|
|
1686
|
-
} catch (error) {
|
|
1687
|
-
if (result) {
|
|
1688
|
-
let data = {
|
|
1689
|
-
sellid: result.data.sellid,
|
|
1690
|
-
fillgasid: result.data.fillgasid,
|
|
1691
|
-
userinfo: {
|
|
1692
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
1693
|
-
version: row.userinfo_version + 1,
|
|
1694
|
-
f_balance: row.f_balance,
|
|
1695
|
-
userfiles: {
|
|
1696
|
-
f_user_id: model.f_user_id,
|
|
1697
|
-
f_total_gas: row.f_total_gas,
|
|
1698
|
-
f_write_totalgas: row.f_write_totalgas,
|
|
1699
|
-
f_write_totalfee: row.f_write_totalfee,
|
|
1700
|
-
f_total_fee: row.f_total_fee,
|
|
1701
|
-
f_card_id: row.f_card_id,
|
|
1702
|
-
f_times: row.cardInfo.Times,
|
|
1703
|
-
version: row.version + 1
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
if (row.f_tag) {
|
|
1708
|
-
data.userinfo.userfiles.f_tag = row.f_tag
|
|
1709
|
-
}
|
|
1710
|
-
await Vue.resetpost('rs/logic/sellgasremanentRollback', {data: data}, {resolveMsg: '卡表收费失败', rejectMsg: '卡表收费失败'})
|
|
1711
|
-
}
|
|
1712
|
-
throw error
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
// 余量补差
|
|
1716
|
-
let marginGen = async function (model, row) {
|
|
1717
|
-
let result = null
|
|
1718
|
-
let cardparam
|
|
1719
|
-
let cardpost
|
|
1720
|
-
try {
|
|
1721
|
-
let cardState = await hasCardGen()
|
|
1722
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
1723
|
-
// 将卡上次数写入数据库
|
|
1724
|
-
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
1725
|
-
model.f_times = row.f_times + 1
|
|
1726
|
-
} else {
|
|
1727
|
-
model.f_times = row.cardInfo.Times + 1
|
|
1728
|
-
}
|
|
1729
|
-
// 将回写表号或者用户号
|
|
1730
|
-
model.f_meterid = row.cardInfo.Yhh ? row.cardInfo.Yhh : row.f_meterid
|
|
1731
|
-
|
|
1732
|
-
let cardid = row.f_card_id
|
|
1733
|
-
if (row.f_tag) {
|
|
1734
|
-
// 截取用户编号后四位
|
|
1735
|
-
cardid = model.f_card_id = row.f_tag + row.f_card_id
|
|
1736
|
-
}
|
|
1737
|
-
// 存库
|
|
1738
|
-
result = await Vue.resetpost('rs/logic/marginCharge', {data: model}, {resolveMsg: null, rejectMsg: '卡表收费存库失败'})
|
|
1739
|
-
// 获取气价和售气情况参数
|
|
1740
|
-
let cardParams = await getParamGen(cardid, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1741
|
-
console.log('写卡次数和获取的写卡参数...', row.cardInfo.Times, cardParams)
|
|
1742
|
-
// 写卡
|
|
1743
|
-
let params = {
|
|
1744
|
-
factory: row.f_alias, // 气表厂家
|
|
1745
|
-
kh: cardid, // 卡号
|
|
1746
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
1747
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1748
|
-
bjql: row.f_police_gas,
|
|
1749
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1750
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1751
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1752
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1753
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1754
|
-
ql: model.f_pregas, // 预购气量
|
|
1755
|
-
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1756
|
-
money: model.f_write_money, // 购气金额
|
|
1757
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1758
|
-
klx: row.f_coding,
|
|
1759
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
|
|
1760
|
-
}
|
|
1761
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1762
|
-
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1763
|
-
// params.klx = yield co(getmodelbrandGen(row))
|
|
1764
|
-
// params.klx = params.klx.data[0].f_coding
|
|
1765
|
-
// }
|
|
1766
|
-
|
|
1767
|
-
let params2 = {
|
|
1768
|
-
factory: row.f_alias,
|
|
1769
|
-
kh: cardid, // 卡号
|
|
1770
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1771
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1772
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1773
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1774
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1775
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1776
|
-
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1777
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1778
|
-
ql: model.f_pregas, // 预购气量
|
|
1779
|
-
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1780
|
-
sxrq: model.f_startdate, // 生效日期,价格管理中取
|
|
1781
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
1782
|
-
// meternumber: row.f_meternumber ? row.f_meternumber : 0, // 海力金额表号
|
|
1783
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1784
|
-
money: model.f_write_money, // 购气金额
|
|
1785
|
-
klx: row.f_coding
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
params2 = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params2)
|
|
1789
|
-
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1790
|
-
// params2.klx = yield co(getmodelbrandGen(row))
|
|
1791
|
-
// params2.klx = params2.klx.data[0].f_coding
|
|
1792
|
-
// }
|
|
1793
|
-
|
|
1794
|
-
let params3 = {
|
|
1795
|
-
factory: row.f_alias,
|
|
1796
|
-
kh: cardid, // 卡号
|
|
1797
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1798
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1799
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1800
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1801
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1802
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1803
|
-
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1804
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1805
|
-
ql: model.f_pregas, // 预购气量
|
|
1806
|
-
cs: 1, // 求购气次数,先开户为1
|
|
1807
|
-
sxrq: model.f_startdate, // 生效日期,价格管理中取
|
|
1808
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
1809
|
-
// meternumber: row.f_meternumber ? row.f_meternumber : 0, // 海力金额表号
|
|
1810
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1811
|
-
money: model.f_write_money, // 购气金额
|
|
1812
|
-
klx: row.f_coding
|
|
1813
|
-
}
|
|
1814
|
-
params3 = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params3)
|
|
1815
|
-
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1816
|
-
// params3.klx = yield co(getmodelbrandGen(row))
|
|
1817
|
-
// params3.klx = params3.klx.data[0].f_coding
|
|
1818
|
-
// }
|
|
1819
|
-
console.log('购气最后操作。。', result)
|
|
1820
|
-
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
1821
|
-
params.cs = row.f_times + 1
|
|
1822
|
-
params2.cs = row.f_times + 1
|
|
1823
|
-
}
|
|
1824
|
-
let cardRes
|
|
1825
|
-
if (result.data.last_oper === '补卡') {
|
|
1826
|
-
// 此次验证开户之后未过表补卡验证问题
|
|
1827
|
-
params2.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
|
|
1828
|
-
cardparam = JSON.stringify(params2)
|
|
1829
|
-
cardpost = 'WriteNewCard'
|
|
1830
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params2, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
1831
|
-
} else if (result.data.last_oper === '换表') {
|
|
1832
|
-
console.log('我走的是写新卡换表')
|
|
1833
|
-
cardparam = JSON.stringify(params3)
|
|
1834
|
-
cardpost = 'WriteNewCard'
|
|
1835
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params3, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
1836
|
-
} else if (result.data.last_oper === '换表补气') {
|
|
1837
|
-
// 累购金额需要将上次购气金额加上
|
|
1838
|
-
console.log('我走的是正常的收费', params)
|
|
1839
|
-
cardparam = JSON.stringify(params)
|
|
1840
|
-
cardpost = 'WriteGasCard'
|
|
1841
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
1842
|
-
} else {
|
|
1843
|
-
console.log('我走的是正常的收费', params)
|
|
1844
|
-
cardparam = JSON.stringify(params)
|
|
1845
|
-
cardpost = 'WriteGasCard'
|
|
1846
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
1847
|
-
}
|
|
1848
|
-
console.log('卡表收费返回写卡参数值', cardRes)
|
|
1849
|
-
// 卡服务写卡异常,业务逻辑回滚
|
|
1850
|
-
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1851
|
-
if (result) {
|
|
1852
|
-
let data = {
|
|
1853
|
-
cardparam: cardparam,
|
|
1854
|
-
cardpost: cardpost,
|
|
1855
|
-
id: result.data.id,
|
|
1856
|
-
userinfo: {
|
|
1857
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
1858
|
-
version: row.userinfo_version + 1,
|
|
1859
|
-
f_balance: row.f_balance,
|
|
1860
|
-
userfiles: {
|
|
1861
|
-
f_user_id: model.f_user_id,
|
|
1862
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
1863
|
-
f_total_gas: row.f_total_gas,
|
|
1864
|
-
f_write_totalgas: row.f_write_totalgas,
|
|
1865
|
-
f_write_totalfee: row.f_write_totalfee,
|
|
1866
|
-
f_total_fee: row.f_total_fee,
|
|
1867
|
-
f_card_id: row.f_card_id,
|
|
1868
|
-
f_times: row.cardInfo.Times,
|
|
1869
|
-
version: row.version + 1
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
}
|
|
1873
|
-
if (row.f_tag) {
|
|
1874
|
-
data.userinfo.userfiles.f_tag = row.f_tag
|
|
1875
|
-
}
|
|
1876
|
-
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
1877
|
-
data.userinfo.userfiles.f_times = row.f_times
|
|
1878
|
-
}
|
|
1879
|
-
await Vue.resetpost('rs/logic/cardChargeRollback', {data: data}, {resolveMsg: '卡表收费失败', rejectMsg: '卡表收费失败'})
|
|
1880
|
-
}
|
|
1881
|
-
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
1882
|
-
} else {
|
|
1883
|
-
// 调用读卡进行校验
|
|
1884
|
-
let readCardInfo = await Vue.resetpost('http://127.0.0.1:8003/ReadCard', {kmm: row.f_card_password}, {resolveMsg: null, rejectMsg: '读卡失败!!'})
|
|
1885
|
-
if (readCardInfo.data && Vue.$login.r.includes('读卡2')) {
|
|
1886
|
-
console.log('读卡验证', readCardInfo.data, row)
|
|
1887
|
-
if (row.f_collection_type === '按金额') {
|
|
1888
|
-
if (readCardInfo.data.Money !== model.f_preamount || readCardInfo.data.Factory !== row.f_alias || readCardInfo.data.CardID !== row.f_card_id) {
|
|
1889
|
-
Vue.showAlert('读卡参数和缴费参数不一致,请核实!!', 'warning', 2000)
|
|
1890
|
-
return result.data.id
|
|
1891
|
-
}
|
|
1892
|
-
} else {
|
|
1893
|
-
if (readCardInfo.data.Gas !== Number((model.f_pregas - 0).toFixed(2)) || readCardInfo.data.Factory !== row.f_alias || readCardInfo.data.CardID !== row.f_card_id) {
|
|
1894
|
-
Vue.showAlert('读卡参数和缴费参数不一致,请核实!!', 'warning', 2000)
|
|
1895
|
-
return result.data.id
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
1899
|
-
// 更新卡密码
|
|
1900
|
-
await Vue.CommonService.updatePassword(row, cardRes)
|
|
1901
|
-
Vue.showAlert('售气成功', 'success', 2000)
|
|
1902
|
-
return result.data.id
|
|
1903
|
-
}
|
|
1904
|
-
} else {
|
|
1905
|
-
throw new Error(`请检查卡是否插好!!`)
|
|
1906
|
-
}
|
|
1907
|
-
} catch (error) {
|
|
1908
|
-
throw error
|
|
1909
|
-
}
|
|
1910
|
-
}
|
|
1911
|
-
// 卡表收费
|
|
1912
|
-
let sellgasGen = async function (model, row) {
|
|
1913
|
-
let result = null
|
|
1914
|
-
let cardparam
|
|
1915
|
-
let cardpost
|
|
1916
|
-
try {
|
|
1917
|
-
let cardState = await hasCardGen()
|
|
1918
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
1919
|
-
// 将卡上次数写入数据库
|
|
1920
|
-
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
1921
|
-
model.f_times = row.f_times + 1
|
|
1922
|
-
} else {
|
|
1923
|
-
model.f_times = row.cardInfo.Times + 1
|
|
1924
|
-
}
|
|
1925
|
-
// 将回写表号或者用户号
|
|
1926
|
-
model.f_meterid = row.cardInfo.Yhh ? row.cardInfo.Yhh : row.f_meterid
|
|
1927
|
-
|
|
1928
|
-
let cardid = row.f_card_id
|
|
1929
|
-
if (row.f_tag) {
|
|
1930
|
-
// 截取用户编号后四位
|
|
1931
|
-
cardid = model.f_card_id = row.f_tag + row.f_card_id
|
|
1932
|
-
}
|
|
1933
|
-
// 存库
|
|
1934
|
-
result = await Vue.resetpost('rs/logic/sale_cardCharge_logic', {data: model}, {resolveMsg: null, rejectMsg: '卡表收费存库失败'})
|
|
1935
|
-
// 获取气价和售气情况参数
|
|
1936
|
-
let cardParams = await getParamGen(cardid, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1937
|
-
console.log('写卡次数和获取的写卡参数...', row.cardInfo.Times, cardParams)
|
|
1938
|
-
// 写卡
|
|
1939
|
-
let params = {
|
|
1940
|
-
factory: row.f_alias, // 气表厂家
|
|
1941
|
-
kh: cardid, // 卡号
|
|
1942
|
-
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
1943
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1944
|
-
bjql: row.f_police_gas,
|
|
1945
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1946
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1947
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1948
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1949
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1950
|
-
ql: model.f_pregas, // 预购气量
|
|
1951
|
-
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1952
|
-
money: model.f_write_money, // 购气金额
|
|
1953
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1954
|
-
klx: row.f_coding,
|
|
1955
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
|
|
1956
|
-
}
|
|
1957
|
-
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1958
|
-
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1959
|
-
// params.klx = yield co(getmodelbrandGen(row))
|
|
1960
|
-
// params.klx = params.klx.data[0].f_coding
|
|
1961
|
-
// }
|
|
1962
|
-
|
|
1963
|
-
let params2 = {
|
|
1964
|
-
factory: row.f_alias,
|
|
1965
|
-
kh: cardid, // 卡号
|
|
1966
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1967
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1968
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1969
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1970
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1971
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1972
|
-
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1973
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1974
|
-
ql: model.f_pregas, // 预购气量
|
|
1975
|
-
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1976
|
-
sxrq: model.f_startdate, // 生效日期,价格管理中取
|
|
1977
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
1978
|
-
// meternumber: row.f_meternumber ? row.f_meternumber : 0, // 海力金额表号
|
|
1979
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1980
|
-
money: model.f_write_money, // 购气金额
|
|
1981
|
-
klx: row.f_coding
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1984
|
-
params2 = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params2)
|
|
1985
|
-
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1986
|
-
// params2.klx = yield co(getmodelbrandGen(row))
|
|
1987
|
-
// params2.klx = params2.klx.data[0].f_coding
|
|
1988
|
-
// }
|
|
1989
|
-
|
|
1990
|
-
let params3 = {
|
|
1991
|
-
factory: row.f_alias,
|
|
1992
|
-
kh: cardid, // 卡号
|
|
1993
|
-
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1994
|
-
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1995
|
-
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1996
|
-
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1997
|
-
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1998
|
-
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1999
|
-
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
2000
|
-
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
2001
|
-
ql: model.f_pregas, // 预购气量
|
|
2002
|
-
cs: 1, // 求购气次数,先开户为1
|
|
2003
|
-
sxrq: model.f_startdate, // 生效日期,价格管理中取
|
|
2004
|
-
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
2005
|
-
// meternumber: row.f_meternumber ? row.f_meternumber : 0, // 海力金额表号
|
|
2006
|
-
dqdm: row.f_area_code, // 精益工业地区代码
|
|
2007
|
-
money: model.f_write_money, // 购气金额
|
|
2008
|
-
klx: row.f_coding
|
|
2009
|
-
}
|
|
2010
|
-
params3 = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params3)
|
|
2011
|
-
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
2012
|
-
// params3.klx = yield co(getmodelbrandGen(row))
|
|
2013
|
-
// params3.klx = params3.klx.data[0].f_coding
|
|
2014
|
-
// }
|
|
2015
|
-
console.log('购气最后操作。。', result)
|
|
2016
|
-
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
2017
|
-
params.cs = row.f_times + 1
|
|
2018
|
-
params2.cs = row.f_times + 1
|
|
2019
|
-
}
|
|
2020
|
-
let cardRes
|
|
2021
|
-
if (result.data.last_oper === '补卡') {
|
|
2022
|
-
// 此次验证开户之后未过表补卡验证问题
|
|
2023
|
-
params2.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
|
|
2024
|
-
cardparam = JSON.stringify(params2)
|
|
2025
|
-
cardpost = 'WriteNewCard'
|
|
2026
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params2, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
2027
|
-
} else if (result.data.last_oper === '换表') {
|
|
2028
|
-
console.log('我走的是写新卡换表')
|
|
2029
|
-
cardparam = JSON.stringify(params3)
|
|
2030
|
-
cardpost = 'WriteNewCard'
|
|
2031
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params3, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
2032
|
-
} else if (result.data.last_oper === '换表补气') {
|
|
2033
|
-
// 累购金额需要将上次购气金额加上
|
|
2034
|
-
console.log('我走的是正常的收费', params)
|
|
2035
|
-
cardparam = JSON.stringify(params)
|
|
2036
|
-
cardpost = 'WriteGasCard'
|
|
2037
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
2038
|
-
} else {
|
|
2039
|
-
console.log('我走的是正常的收费', params)
|
|
2040
|
-
cardparam = JSON.stringify(params)
|
|
2041
|
-
cardpost = 'WriteGasCard'
|
|
2042
|
-
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
2043
|
-
}
|
|
2044
|
-
console.log('卡表收费返回写卡参数值', cardRes)
|
|
2045
|
-
// 卡服务写卡异常,业务逻辑回滚
|
|
2046
|
-
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
2047
|
-
if (result) {
|
|
2048
|
-
let data = {
|
|
2049
|
-
cardparam: cardparam,
|
|
2050
|
-
cardpost: cardpost,
|
|
2051
|
-
id: result.data.id,
|
|
2052
|
-
userinfo: {
|
|
2053
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
2054
|
-
version: row.userinfo_version + 1,
|
|
2055
|
-
f_balance: row.f_balance,
|
|
2056
|
-
userfiles: {
|
|
2057
|
-
f_user_id: model.f_user_id,
|
|
2058
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
2059
|
-
f_total_gas: row.f_total_gas,
|
|
2060
|
-
f_write_totalgas: row.f_write_totalgas,
|
|
2061
|
-
f_write_totalfee: row.f_write_totalfee,
|
|
2062
|
-
f_total_fee: row.f_total_fee,
|
|
2063
|
-
f_card_id: row.f_card_id,
|
|
2064
|
-
f_times: row.cardInfo.Times,
|
|
2065
|
-
version: row.version + 1
|
|
2066
|
-
}
|
|
2067
|
-
}
|
|
2068
|
-
}
|
|
2069
|
-
if (row.f_tag) {
|
|
2070
|
-
data.userinfo.userfiles.f_tag = row.f_tag
|
|
2071
|
-
}
|
|
2072
|
-
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
2073
|
-
data.userinfo.userfiles.f_times = row.f_times
|
|
2074
|
-
}
|
|
2075
|
-
await Vue.resetpost('rs/logic/cardChargeRollback', {data: data}, {resolveMsg: '卡表收费失败', rejectMsg: '卡表收费失败'})
|
|
2076
|
-
}
|
|
2077
|
-
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
2078
|
-
} else {
|
|
2079
|
-
// 调用读卡进行校验
|
|
2080
|
-
let readCardInfo = await Vue.resetpost('http://127.0.0.1:8003/ReadCard', {kmm: row.f_card_password}, {resolveMsg: null, rejectMsg: '读卡失败!!'})
|
|
2081
|
-
if (readCardInfo.data && Vue.$login.r.includes('读卡2')) {
|
|
2082
|
-
console.log('读卡验证', readCardInfo.data, row)
|
|
2083
|
-
if (row.f_collection_type === '按金额') {
|
|
2084
|
-
if (readCardInfo.data.Money !== model.f_preamount || readCardInfo.data.Factory !== row.f_alias || readCardInfo.data.CardID !== row.f_card_id) {
|
|
2085
|
-
Vue.showAlert('读卡参数和缴费参数不一致,请核实!!', 'warning', 2000)
|
|
2086
|
-
return result.data.id
|
|
2087
|
-
}
|
|
2088
|
-
} else {
|
|
2089
|
-
if (readCardInfo.data.Gas !== Number((model.f_pregas - 0).toFixed(2)) || readCardInfo.data.Factory !== row.f_alias || readCardInfo.data.CardID !== row.f_card_id) {
|
|
2090
|
-
Vue.showAlert('读卡参数和缴费参数不一致,请核实!!', 'warning', 2000)
|
|
2091
|
-
return result.data.id
|
|
2092
|
-
}
|
|
2093
|
-
}
|
|
2094
|
-
}
|
|
2095
|
-
// 更新卡密码
|
|
2096
|
-
await Vue.CommonService.updatePassword(row, cardRes)
|
|
2097
|
-
Vue.showAlert('售气成功', 'success', 2000)
|
|
2098
|
-
return result.data.id
|
|
2099
|
-
}
|
|
2100
|
-
} else {
|
|
2101
|
-
throw new Error(`请检查卡是否插好!!`)
|
|
2102
|
-
}
|
|
2103
|
-
} catch (error) {
|
|
2104
|
-
throw error
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2107
|
-
let reissueCardGenJB = function * (model, row) {
|
|
2108
|
-
if (model.f_cardfees === '') {
|
|
2109
|
-
model.f_cardfees = 0
|
|
2110
|
-
}
|
|
2111
|
-
let data = {
|
|
2112
|
-
f_user_id: row.f_user_id,
|
|
2113
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
2114
|
-
f_user_type: row.f_user_type,
|
|
2115
|
-
f_gasproperties: row.f_gasproperties,
|
|
2116
|
-
f_address: row.f_address,
|
|
2117
|
-
f_meter_brand: row.f_meter_brand,
|
|
2118
|
-
f_type: model.f_type,
|
|
2119
|
-
f_card_id: model.f_card_id,
|
|
2120
|
-
f_ispick_table: model.f_ispick_table,
|
|
2121
|
-
f_cardfees: model.f_cardfees,
|
|
2122
|
-
f_payment: model.f_payment[0],
|
|
2123
|
-
f_bill_style: model.f_print[0],
|
|
2124
|
-
f_comments: model.f_comments,
|
|
2125
|
-
record_userinfo: row.f_userinfo_id,
|
|
2126
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
2127
|
-
f_user_name: row.f_user_name,
|
|
2128
|
-
f_operat_type: '补卡',
|
|
2129
|
-
f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行${row.f_type}操作`,
|
|
2130
|
-
f_state: '有效',
|
|
2131
|
-
f_operator: Vue.$login.f.name,
|
|
2132
|
-
f_operatorid: Vue.$login.f.id,
|
|
2133
|
-
f_orgid: Vue.$login.f.orgid,
|
|
2134
|
-
f_orgname: Vue.$login.f.orgs,
|
|
2135
|
-
f_depid: Vue.$login.f.depids,
|
|
2136
|
-
f_depname: Vue.$login.f.deps,
|
|
2137
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
2138
|
-
f_zones: Vue.$login.f.zones,
|
|
2139
|
-
f_business_tracking_number: model.f_business_tracking_number
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
return Vue.resetpost('rs/logic/sale_fillCard', data, {resolveMsg: null, rejectMsg: '补卡存库失败'})
|
|
2143
|
-
}
|
|
2144
|
-
let reissueCardGen = function * (model, row) {
|
|
2145
|
-
if (model.f_cardfees === '') {
|
|
2146
|
-
model.f_cardfees = 0
|
|
2147
|
-
}
|
|
2148
|
-
if (!model.f_fill_type) {
|
|
2149
|
-
model.f_fill_type = ['']
|
|
2150
|
-
}
|
|
2151
|
-
let data = {
|
|
2152
|
-
f_serial_id: model.f_serial_id,
|
|
2153
|
-
f_user_id: row.f_user_id,
|
|
2154
|
-
f_userfiles_id: row.f_userfiles_id,
|
|
2155
|
-
f_user_type: row.f_user_type,
|
|
2156
|
-
f_gasproperties: row.f_gasproperties,
|
|
2157
|
-
f_address: row.f_address,
|
|
2158
|
-
f_meter_brand: row.f_meter_brand,
|
|
2159
|
-
f_type: model.f_type,
|
|
2160
|
-
f_card_id: model.f_card_id,
|
|
2161
|
-
f_ispick_table: model.f_ispick_table,
|
|
2162
|
-
f_cardfees: model.f_cardfees,
|
|
2163
|
-
f_payment: model.f_payment[0],
|
|
2164
|
-
f_bill_style: model.f_print[0],
|
|
2165
|
-
f_fill_type: model.f_fill_type[0],
|
|
2166
|
-
f_comments: model.f_comments,
|
|
2167
|
-
record_userinfo: row.f_userinfo_id,
|
|
2168
|
-
f_userinfo_id: row.f_userinfo_id,
|
|
2169
|
-
f_user_name: row.f_user_name,
|
|
2170
|
-
f_operat_type: '补卡',
|
|
2171
|
-
f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行补卡操作`,
|
|
2172
|
-
f_state: '有效',
|
|
2173
|
-
f_operator: Vue.$login.f.name,
|
|
2174
|
-
f_operatorid: Vue.$login.f.id,
|
|
2175
|
-
f_orgid: Vue.$login.f.orgid,
|
|
2176
|
-
f_orgname: Vue.$login.f.orgs,
|
|
2177
|
-
f_depid: Vue.$login.f.depids,
|
|
2178
|
-
f_depname: Vue.$login.f.deps,
|
|
2179
|
-
f_zoneid: Vue.$login.f.zoneid,
|
|
2180
|
-
f_zones: Vue.$login.f.zones,
|
|
2181
|
-
f_business_tracking_number: model.f_business_tracking_number
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
return Vue.resetpost('rs/logic/sale_fillCard', data, {resolveMsg: null, rejectMsg: '补卡存库失败'})
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
let getParamGen = async function (cardid, alias, f_user_id, f_userfiles_id) {
|
|
2188
|
-
let data = {
|
|
2189
|
-
f_card_id: cardid + '',
|
|
2190
|
-
f_alias: alias,
|
|
2191
|
-
f_user_id: f_user_id,
|
|
2192
|
-
f_userfiles_id: f_userfiles_id
|
|
2193
|
-
}
|
|
2194
|
-
return Vue.resetpost('rs/logic/stairCard', {data: data}, {resolveMsg: null, rejectMsg: '获取写卡参数失败'})
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
|
-
let getCardNumberGen = async function (brand_id) {
|
|
2198
|
-
return Vue.resetpost('rs/logic/getCardNumber', {data: {id: brand_id}}, {resolveMsg: null, rejectMsg: '发卡售气获取卡号失败!!'})
|
|
2199
|
-
}
|
|
2200
|
-
|
|
2201
|
-
// 指令写卡
|
|
2202
|
-
// 目前支持 承德海力物联网表
|
|
2203
|
-
let instructWriteCardGen = function * (row) {
|
|
2204
|
-
try {
|
|
2205
|
-
// 判断是否有卡
|
|
2206
|
-
let cardState = yield co(hasCardGen())
|
|
2207
|
-
if (JSON.parse(cardState.data).state === 1) {
|
|
2208
|
-
// 写卡
|
|
2209
|
-
let params = {
|
|
2210
|
-
kh: row.f_meternumber,
|
|
2211
|
-
meterid: row.f_meternumber,
|
|
2212
|
-
factory: row.f_alias
|
|
2213
|
-
}
|
|
2214
|
-
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
2215
|
-
resolveMsg: null,
|
|
2216
|
-
rejectMsg: '补卡卡服务错误'
|
|
2217
|
-
}))
|
|
2218
|
-
// 卡服务写卡异常,业务逻辑回滚
|
|
2219
|
-
if (cardRes.data.Err || cardRes.data.Exception) {
|
|
2220
|
-
Vue.$showAlert('指令写卡失败!!', 'danger', 0)
|
|
2221
|
-
} else {
|
|
2222
|
-
return cardRes
|
|
2223
|
-
}
|
|
2224
|
-
} else {
|
|
2225
|
-
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
2226
|
-
return 0
|
|
2227
|
-
}
|
|
2228
|
-
} catch (error) {
|
|
2229
|
-
let msg = ''
|
|
2230
|
-
if (error.status === 612) {
|
|
2231
|
-
msg = '请检查读卡器时候连接,或者卡服务是否启动!!'
|
|
2232
|
-
}
|
|
2233
|
-
Vue.showAlert(msg, 'danger', 0)
|
|
2234
|
-
return 0
|
|
2235
|
-
}
|
|
2236
|
-
}
|
|
2237
|
-
export default CardService
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import co from 'co'
|
|
3
|
+
|
|
4
|
+
let CardService = {
|
|
5
|
+
install (Vue, options) {
|
|
6
|
+
// 给vue增添对话框显示方法
|
|
7
|
+
Vue.CardService = Vue.prototype.$CardService = CardService
|
|
8
|
+
},
|
|
9
|
+
// 判断是否插卡
|
|
10
|
+
hasCard () {
|
|
11
|
+
let has = hasCardGen()
|
|
12
|
+
return co(has)
|
|
13
|
+
},
|
|
14
|
+
// 读卡
|
|
15
|
+
readCard () {
|
|
16
|
+
let read = readCard()
|
|
17
|
+
return co(read)
|
|
18
|
+
},
|
|
19
|
+
// 指令写卡
|
|
20
|
+
// 目前支持 承德海力物联网表
|
|
21
|
+
instructWriteCard (row) {
|
|
22
|
+
let read = instructWriteCardGen(row)
|
|
23
|
+
return co(read)
|
|
24
|
+
},
|
|
25
|
+
// 开户发卡
|
|
26
|
+
initCard (model, row, allot) {
|
|
27
|
+
// let init = initCardGen(model, row, allot ? this.getallotdata(allot, row, '发卡售气') : null)
|
|
28
|
+
// return co(init)
|
|
29
|
+
|
|
30
|
+
let f_serial_number = ''
|
|
31
|
+
let f_price = ''
|
|
32
|
+
let inputprice = '0'
|
|
33
|
+
if (model.f_serial_number) {
|
|
34
|
+
f_serial_number = model.f_serial_number
|
|
35
|
+
}
|
|
36
|
+
if (model.f_price && (model.f_price - 0) > 0) {
|
|
37
|
+
f_price = model.f_price
|
|
38
|
+
inputprice = '1'
|
|
39
|
+
}
|
|
40
|
+
let f_privilege_gas = 0
|
|
41
|
+
if (model.f_privilege_gas) {
|
|
42
|
+
f_privilege_gas = model.f_privilege_gas
|
|
43
|
+
}
|
|
44
|
+
let param = {
|
|
45
|
+
f_alias: row.f_alias,
|
|
46
|
+
garbage_number: model.garbage_number,
|
|
47
|
+
garbage_money: model.garbage_money,
|
|
48
|
+
f_serial_id: model.f_serial_id,
|
|
49
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
50
|
+
f_serial_number: f_serial_number,
|
|
51
|
+
f_user_id: row.f_user_id,
|
|
52
|
+
f_price: f_price,
|
|
53
|
+
inputprice: inputprice,
|
|
54
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
55
|
+
f_pregas: model.f_pregas,
|
|
56
|
+
f_preamount: model.f_preamount,
|
|
57
|
+
f_balance: row.f_balance,
|
|
58
|
+
f_meter_type: row.f_meter_type,
|
|
59
|
+
f_calculation: row.f_calculation,
|
|
60
|
+
f_collection_type: row.f_collection_type,
|
|
61
|
+
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
62
|
+
f_write_money: model.xiekamoney,
|
|
63
|
+
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
64
|
+
f_write_totalfee: (row.f_write_totalfee - 0) + (model.xiekamoney - 0),
|
|
65
|
+
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
66
|
+
f_open_fee: model.f_open_fee,
|
|
67
|
+
f_collection: model.f_collection,
|
|
68
|
+
f_payment: model.f_payment.toString(),
|
|
69
|
+
payments: model.payments,
|
|
70
|
+
f_print: model.f_print.toString(),
|
|
71
|
+
f_voucher_number: model.f_voucher_number,
|
|
72
|
+
userinfo_version: row.userinfo_version,
|
|
73
|
+
version: row.version,
|
|
74
|
+
// 优惠金额
|
|
75
|
+
f_privilege_money: model.f_privilege_money,
|
|
76
|
+
f_privilege_gas: f_privilege_gas,
|
|
77
|
+
f_after_discount: model.f_after_discount,
|
|
78
|
+
|
|
79
|
+
f_operator: Vue.$login.f.name,
|
|
80
|
+
f_operatorid: Vue.$login.f.id,
|
|
81
|
+
f_orgid: Vue.$login.f.orgid,
|
|
82
|
+
f_orgname: Vue.$login.f.orgs,
|
|
83
|
+
f_depid: Vue.$login.f.depids,
|
|
84
|
+
f_depname: Vue.$login.f.deps,
|
|
85
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
86
|
+
f_zones: Vue.$login.f.zones,
|
|
87
|
+
f_comments: model.f_comments
|
|
88
|
+
}
|
|
89
|
+
console.log('发卡售气前参数', row)
|
|
90
|
+
return sendCardSaleGasGen(param, row)
|
|
91
|
+
},
|
|
92
|
+
resetinitCard (model, row) {
|
|
93
|
+
let f_serial_number = ''
|
|
94
|
+
let f_price = ''
|
|
95
|
+
let inputprice = '0'
|
|
96
|
+
if (model.f_serial_number) {
|
|
97
|
+
f_serial_number = model.f_serial_number
|
|
98
|
+
}
|
|
99
|
+
if (model.f_price && (model.f_price - 0) > 0) {
|
|
100
|
+
f_price = model.f_price
|
|
101
|
+
inputprice = '1'
|
|
102
|
+
}
|
|
103
|
+
let f_privilege_gas = 0
|
|
104
|
+
if (model.f_privilege_gas) {
|
|
105
|
+
f_privilege_gas = model.f_privilege_gas
|
|
106
|
+
}
|
|
107
|
+
let param = {
|
|
108
|
+
f_serial_id: model.f_serial_id,
|
|
109
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
110
|
+
f_user_name: row.f_user_name,
|
|
111
|
+
f_serial_number: f_serial_number,
|
|
112
|
+
f_user_id: row.f_user_id,
|
|
113
|
+
f_price: f_price,
|
|
114
|
+
inputprice: inputprice,
|
|
115
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
116
|
+
f_pregas: model.f_pregas,
|
|
117
|
+
f_preamount: model.f_preamount,
|
|
118
|
+
f_balance: row.f_balance,
|
|
119
|
+
f_meter_type: row.f_meter_type,
|
|
120
|
+
f_calculation: row.f_calculation,
|
|
121
|
+
f_collection_type: row.f_collection_type,
|
|
122
|
+
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
123
|
+
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
124
|
+
f_write_totalfee: (row.f_write_totalfee - 0) + (model.f_preamount - 0),
|
|
125
|
+
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
126
|
+
f_open_fee: model.f_open_fee,
|
|
127
|
+
f_collection: model.f_collection,
|
|
128
|
+
// f_print: model.f_print.toString(),
|
|
129
|
+
f_user_type: row.f_user_type,
|
|
130
|
+
f_gasproperties: row.f_gasproperties,
|
|
131
|
+
f_address: row.f_address,
|
|
132
|
+
f_meter_brand: row.f_meter_brand,
|
|
133
|
+
f_voucher_number: model.f_voucher_number,
|
|
134
|
+
userinfo_version: row.userinfo_version,
|
|
135
|
+
version: row.version,
|
|
136
|
+
|
|
137
|
+
f_operator: Vue.$login.f.name,
|
|
138
|
+
f_operatorid: Vue.$login.f.id,
|
|
139
|
+
f_orgid: Vue.$login.f.orgid,
|
|
140
|
+
f_orgname: Vue.$login.f.orgs,
|
|
141
|
+
f_depid: Vue.$login.f.depids,
|
|
142
|
+
f_depname: Vue.$login.f.deps,
|
|
143
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
144
|
+
f_zones: Vue.$login.f.zones,
|
|
145
|
+
f_comments: model.f_comments
|
|
146
|
+
}
|
|
147
|
+
console.log('重发卡售气前参数', row)
|
|
148
|
+
return resetsendCardSaleGasGen(param, row)
|
|
149
|
+
},
|
|
150
|
+
// 补气开户发卡
|
|
151
|
+
remanentinitCard (model, row, allot) {
|
|
152
|
+
let param = {
|
|
153
|
+
f_share_times: row.f_share_times,
|
|
154
|
+
f_hascard: row.f_hascard,
|
|
155
|
+
f_open_way: row.f_open_type,
|
|
156
|
+
f_serial_id: model.f_serial_id,
|
|
157
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
158
|
+
f_user_id: row.f_user_id,
|
|
159
|
+
// 补气量
|
|
160
|
+
f_fill_gas: model.f_fill_gas,
|
|
161
|
+
f_fill_money: model.f_fill_money,
|
|
162
|
+
f_remanent_gas: row.f_remanent_gas === 0 ? model.f_fill_gas : row.f_remanent_gas,
|
|
163
|
+
f_remanent_price: row.f_remanent_price,
|
|
164
|
+
f_remanent_money: row.f_remanent_money === 0 ? model.f_fill_money : row.f_remanent_money,
|
|
165
|
+
f_remanent_type: row.f_remanent_type,
|
|
166
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
167
|
+
f_user_name: row.f_user_name,
|
|
168
|
+
f_user_type: row.f_user_type,
|
|
169
|
+
f_gasproperties: row.f_gasproperties,
|
|
170
|
+
f_address: row.f_address,
|
|
171
|
+
f_meter_brand: row.f_meter_brand,
|
|
172
|
+
f_meter_type: row.f_meter_type,
|
|
173
|
+
f_collection_type: row.f_collection_type,
|
|
174
|
+
// 购气量
|
|
175
|
+
f_pregas: (model.f_pregas - 0) === 0 ? model.f_fill_gas : (model.f_pregas - 0),
|
|
176
|
+
f_preamount: (model.f_preamount - 0) === 0 ? model.f_fill_money : (model.f_preamount - 0),
|
|
177
|
+
f_totalcost: model.f_totalcost - 0,
|
|
178
|
+
f_balance: row.f_balance,
|
|
179
|
+
f_open_fee: model.f_open_fee,
|
|
180
|
+
f_collection: model.f_collection,
|
|
181
|
+
f_payment: model.f_payment.toString(),
|
|
182
|
+
payments: model.payments,
|
|
183
|
+
f_print: model.f_print.toString(),
|
|
184
|
+
f_voucher_number: model.f_voucher_number,
|
|
185
|
+
userinfo_version: row.userinfo_version,
|
|
186
|
+
version: row.version,
|
|
187
|
+
f_operator: Vue.$login.f.name,
|
|
188
|
+
f_operatorid: Vue.$login.f.id,
|
|
189
|
+
f_orgid: Vue.$login.f.orgid,
|
|
190
|
+
f_orgname: Vue.$login.f.orgs,
|
|
191
|
+
f_depid: Vue.$login.f.depids,
|
|
192
|
+
f_depname: Vue.$login.f.deps,
|
|
193
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
194
|
+
f_zones: Vue.$login.f.zones,
|
|
195
|
+
f_comments: model.f_comments
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (row.f_remanent_type === 1) {
|
|
199
|
+
param.f_total_gas = (row.f_total_gas - 0) + (model.f_pregas - 0)
|
|
200
|
+
param.f_total_fee = (row.f_total_fee - 0) + (model.f_preamount - 0)
|
|
201
|
+
} else {
|
|
202
|
+
if ((model.f_pregas - 0) > (model.f_fill_gas - 0)) {
|
|
203
|
+
param.f_total_gas = (row.f_total_gas - 0) + ((model.f_pregas - 0) - (model.f_fill_gas - 0))
|
|
204
|
+
param.f_total_fee = (row.f_total_fee - 0) + (model.f_preamount - 0)
|
|
205
|
+
} else {
|
|
206
|
+
param.f_total_gas = (row.f_total_gas - 0)
|
|
207
|
+
param.f_total_fee = (row.f_total_fee - 0)
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
param.f_write_totalgas = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
211
|
+
param.f_write_totalfee = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
212
|
+
return sendCardSaleGasGenremanent(param, row)
|
|
213
|
+
},
|
|
214
|
+
|
|
215
|
+
offlineWrite (row) {
|
|
216
|
+
return offlineWriteGen(row)
|
|
217
|
+
},
|
|
218
|
+
// 余量补差
|
|
219
|
+
margin (model, row) {
|
|
220
|
+
let f_serial_number = ''
|
|
221
|
+
let f_price = ''
|
|
222
|
+
let inputprice = '0'
|
|
223
|
+
let f_privilege_gas = 0
|
|
224
|
+
if (model.f_serial_number) {
|
|
225
|
+
f_serial_number = model.f_serial_number
|
|
226
|
+
}
|
|
227
|
+
if (model.f_price && (model.f_price - 0) > 0) {
|
|
228
|
+
f_price = model.f_price
|
|
229
|
+
inputprice = '1'
|
|
230
|
+
}
|
|
231
|
+
if (model.f_privilege_gas) {
|
|
232
|
+
f_privilege_gas = model.f_privilege_gas
|
|
233
|
+
}
|
|
234
|
+
let param = {
|
|
235
|
+
garbage_number: model.garbage_number,
|
|
236
|
+
garbage_money: model.garbage_money,
|
|
237
|
+
f_serial_id: model.f_serial_id,
|
|
238
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
239
|
+
f_serial_number: f_serial_number,
|
|
240
|
+
f_write_money: model.xiekamoney,
|
|
241
|
+
f_price: f_price,
|
|
242
|
+
inputprice: inputprice,
|
|
243
|
+
// 补气量
|
|
244
|
+
f_remanent_gas: row.f_remanent_gas,
|
|
245
|
+
f_remanent_price: row.f_remanent_price,
|
|
246
|
+
f_user_id: row.f_user_id,
|
|
247
|
+
f_calculation: row.f_calculation,
|
|
248
|
+
f_collection_type: row.f_collection_type,
|
|
249
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
250
|
+
f_pregas: model.f_pregas,
|
|
251
|
+
f_totalcost: model.f_totalcost,
|
|
252
|
+
f_balance: row.f_balance,
|
|
253
|
+
f_meter_type: row.f_meter_type,
|
|
254
|
+
f_preamount: model.f_preamount,
|
|
255
|
+
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
256
|
+
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
257
|
+
f_write_totalfee: (row.f_write_totalfee - 0) + (model.xiekamoney - 0),
|
|
258
|
+
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
259
|
+
f_collection: model.f_collection,
|
|
260
|
+
// 优惠金额
|
|
261
|
+
f_privilege_money: model.f_privilege_money,
|
|
262
|
+
f_privilege_gas: f_privilege_gas,
|
|
263
|
+
f_after_discount: model.f_after_discount,
|
|
264
|
+
f_payment: model.f_payment.toString(),
|
|
265
|
+
payments: model.payments,
|
|
266
|
+
f_print: model.f_print.toString(),
|
|
267
|
+
f_voucher_number: model.f_voucher_number,
|
|
268
|
+
userinfo_version: row.userinfo_version,
|
|
269
|
+
version: row.version,
|
|
270
|
+
isGasValue: model.f_pregas ? 0 : 1,
|
|
271
|
+
f_meter_base: row.f_meter_base,
|
|
272
|
+
f_operator: Vue.$login.f.name,
|
|
273
|
+
f_operatorid: Vue.$login.f.id,
|
|
274
|
+
f_orgid: Vue.$login.f.orgid,
|
|
275
|
+
f_orgname: Vue.$login.f.orgs,
|
|
276
|
+
f_depid: Vue.$login.f.depids,
|
|
277
|
+
f_depname: Vue.$login.f.deps,
|
|
278
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
279
|
+
f_zones: Vue.$login.f.zones,
|
|
280
|
+
f_comments: model.f_comments,
|
|
281
|
+
f_sys_balance: model.f_sys_balance
|
|
282
|
+
}
|
|
283
|
+
return marginGen(param, row)
|
|
284
|
+
},
|
|
285
|
+
// 卡表收费
|
|
286
|
+
sellgas (model, row) {
|
|
287
|
+
let f_serial_number = ''
|
|
288
|
+
let f_price = ''
|
|
289
|
+
let inputprice = '0'
|
|
290
|
+
let f_privilege_gas = 0
|
|
291
|
+
if (model.f_serial_number) {
|
|
292
|
+
f_serial_number = model.f_serial_number
|
|
293
|
+
}
|
|
294
|
+
if (model.f_price && (model.f_price - 0) > 0) {
|
|
295
|
+
f_price = model.f_price
|
|
296
|
+
inputprice = '1'
|
|
297
|
+
}
|
|
298
|
+
if (model.f_privilege_gas) {
|
|
299
|
+
f_privilege_gas = model.f_privilege_gas
|
|
300
|
+
}
|
|
301
|
+
let param = {
|
|
302
|
+
f_alias: row.f_alias,
|
|
303
|
+
garbage_number: model.garbage_number,
|
|
304
|
+
garbage_money: model.garbage_money,
|
|
305
|
+
f_serial_id: model.f_serial_id,
|
|
306
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
307
|
+
f_serial_number: f_serial_number,
|
|
308
|
+
f_write_money: model.xiekamoney,
|
|
309
|
+
f_price: f_price,
|
|
310
|
+
inputprice: inputprice,
|
|
311
|
+
// 补气量
|
|
312
|
+
f_remanent_gas: row.f_remanent_gas,
|
|
313
|
+
f_remanent_price: row.f_remanent_price,
|
|
314
|
+
f_user_id: row.f_user_id,
|
|
315
|
+
f_calculation: row.f_calculation,
|
|
316
|
+
f_collection_type: row.f_collection_type,
|
|
317
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
318
|
+
f_pregas: model.f_pregas,
|
|
319
|
+
f_totalcost: model.f_totalcost,
|
|
320
|
+
f_balance: row.f_balance,
|
|
321
|
+
f_meter_type: row.f_meter_type,
|
|
322
|
+
f_preamount: model.f_preamount,
|
|
323
|
+
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
324
|
+
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
325
|
+
f_write_totalfee: (row.f_write_totalfee - 0) + (model.xiekamoney - 0),
|
|
326
|
+
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
327
|
+
f_collection: model.f_collection,
|
|
328
|
+
// 优惠金额
|
|
329
|
+
f_privilege_money: model.f_privilege_money,
|
|
330
|
+
f_privilege_gas: f_privilege_gas,
|
|
331
|
+
f_after_discount: model.f_after_discount,
|
|
332
|
+
f_payment: model.f_payment.toString(),
|
|
333
|
+
payments: model.payments,
|
|
334
|
+
f_print: model.f_print.toString(),
|
|
335
|
+
f_voucher_number: model.f_voucher_number,
|
|
336
|
+
userinfo_version: row.userinfo_version,
|
|
337
|
+
version: row.version,
|
|
338
|
+
f_meter_base: row.f_meter_base,
|
|
339
|
+
f_operator: Vue.$login.f.name,
|
|
340
|
+
f_operatorid: Vue.$login.f.id,
|
|
341
|
+
f_orgid: Vue.$login.f.orgid,
|
|
342
|
+
f_orgname: Vue.$login.f.orgs,
|
|
343
|
+
f_depid: Vue.$login.f.depids,
|
|
344
|
+
f_depname: Vue.$login.f.deps,
|
|
345
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
346
|
+
f_zones: Vue.$login.f.zones,
|
|
347
|
+
f_comments: model.f_comments,
|
|
348
|
+
f_sys_balance: model.f_sys_balance
|
|
349
|
+
}
|
|
350
|
+
return sellgasGen(param, row)
|
|
351
|
+
},
|
|
352
|
+
|
|
353
|
+
// 补气卡表收费
|
|
354
|
+
remanentsellgas (model, row) {
|
|
355
|
+
let param = {
|
|
356
|
+
f_user_name: row.f_user_name,
|
|
357
|
+
f_user_type: row.f_user_type,
|
|
358
|
+
f_gasproperties: row.f_gasproperties,
|
|
359
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
360
|
+
f_address: row.f_address,
|
|
361
|
+
f_meter_brand: row.f_meter_brand,
|
|
362
|
+
f_meter_type: row.f_meter_type,
|
|
363
|
+
f_meternumber: row.f_meternumber,
|
|
364
|
+
f_collection_type: row.f_collection_type,
|
|
365
|
+
f_card_id: row.f_card_id,
|
|
366
|
+
f_write_money: model.xiekamoney,
|
|
367
|
+
// 补气信息
|
|
368
|
+
f_fill_gas: model.f_fill_gas,
|
|
369
|
+
f_fill_money: model.f_fill_money,
|
|
370
|
+
|
|
371
|
+
f_remanent_gas: row.f_remanent_gas,
|
|
372
|
+
f_remanent_price: row.f_remanent_price,
|
|
373
|
+
f_remanent_type: row.f_remanent_type,
|
|
374
|
+
f_user_id: row.f_user_id,
|
|
375
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
376
|
+
f_pregas: model.f_pregas,
|
|
377
|
+
f_balance: row.f_balance,
|
|
378
|
+
f_preamount: model.f_preamount,
|
|
379
|
+
f_totalcost: model.f_totalcost,
|
|
380
|
+
f_collection: model.f_collection,
|
|
381
|
+
f_payment: model.f_payment.toString(),
|
|
382
|
+
payments: model.payments,
|
|
383
|
+
f_print: model.f_print.toString(),
|
|
384
|
+
f_voucher_number: model.f_voucher_number,
|
|
385
|
+
userinfo_version: row.userinfo_version,
|
|
386
|
+
version: row.version,
|
|
387
|
+
f_operator: Vue.$login.f.name,
|
|
388
|
+
f_operatorid: Vue.$login.f.id,
|
|
389
|
+
f_orgid: Vue.$login.f.orgid,
|
|
390
|
+
f_orgname: Vue.$login.f.orgs,
|
|
391
|
+
f_depid: Vue.$login.f.depids,
|
|
392
|
+
f_depname: Vue.$login.f.deps,
|
|
393
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
394
|
+
f_zones: Vue.$login.f.zones,
|
|
395
|
+
f_comments: model.f_comments
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
// 0:代表清零补气, 累购量不加 1:代表换表补气 累购量加
|
|
399
|
+
if (row.f_remanent_type === 1) {
|
|
400
|
+
param.f_total_gas = (row.f_total_gas - 0) + (model.f_pregas - 0)
|
|
401
|
+
param.f_total_fee = (row.f_total_fee - 0) + (model.f_preamount - 0)
|
|
402
|
+
} else {
|
|
403
|
+
if (model.f_pregas > row.f_remanent_gas) {
|
|
404
|
+
param.f_total_gas = (row.f_total_gas - 0) + (model.f_pregas - row.f_remanent_gas)
|
|
405
|
+
param.f_total_fee = (row.f_total_fee - 0) + (model.f_preamount - 0)
|
|
406
|
+
} else {
|
|
407
|
+
param.f_total_gas = (row.f_total_gas - 0)
|
|
408
|
+
param.f_total_fee = (row.f_total_fee - 0)
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
param.f_write_totalgas = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
412
|
+
param.f_write_totalfee = (row.f_write_totalfee - 0) + (model.xiekamoney - 0)
|
|
413
|
+
return sellgasRemanentGen(param, row)
|
|
414
|
+
},
|
|
415
|
+
// 数码表收费
|
|
416
|
+
DigtialSellGas (model, row) {
|
|
417
|
+
let f_serial_number = ''
|
|
418
|
+
if (model.f_serial_number) {
|
|
419
|
+
f_serial_number = model.f_serial_number
|
|
420
|
+
}
|
|
421
|
+
let param = {
|
|
422
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
423
|
+
f_serial_number: f_serial_number,
|
|
424
|
+
f_user_id: row.f_user_id,
|
|
425
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
426
|
+
f_pregas: model.f_pregas,
|
|
427
|
+
f_write_money: model.f_write_money,
|
|
428
|
+
f_balance: row.f_balance,
|
|
429
|
+
f_preamount: model.f_preamount,
|
|
430
|
+
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
431
|
+
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
432
|
+
f_write_totalfee: (row.f_write_totalfee - 0) + (model.f_write_money - 0),
|
|
433
|
+
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
434
|
+
f_collection: model.f_collection,
|
|
435
|
+
f_payment: model.f_payment.toString(),
|
|
436
|
+
payments: model.payments,
|
|
437
|
+
f_print: model.f_print.toString(),
|
|
438
|
+
f_voucher_number: model.f_voucher_number,
|
|
439
|
+
userinfo_version: row.userinfo_version,
|
|
440
|
+
version: row.version,
|
|
441
|
+
f_operator: Vue.$login.f.name,
|
|
442
|
+
f_operatorid: Vue.$login.f.id,
|
|
443
|
+
f_orgid: Vue.$login.f.orgid,
|
|
444
|
+
f_orgname: Vue.$login.f.orgs,
|
|
445
|
+
f_depid: Vue.$login.f.depids,
|
|
446
|
+
f_depname: Vue.$login.f.deps,
|
|
447
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
448
|
+
f_zones: Vue.$login.f.zones
|
|
449
|
+
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
return DigtialSellGasGen(param, row)
|
|
453
|
+
},
|
|
454
|
+
// 无卡收费
|
|
455
|
+
noCardSellGas (model, row) {
|
|
456
|
+
let f_serial_number = ''
|
|
457
|
+
if (model.f_serial_number) {
|
|
458
|
+
f_serial_number = model.f_serial_number
|
|
459
|
+
}
|
|
460
|
+
let f_write_card = ''
|
|
461
|
+
if (model.f_write_card) {
|
|
462
|
+
f_write_card = model.f_write_card
|
|
463
|
+
}
|
|
464
|
+
let param = {
|
|
465
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
466
|
+
f_serial_number: f_serial_number,
|
|
467
|
+
f_user_id: row.f_user_id,
|
|
468
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
469
|
+
f_pregas: model.f_pregas,
|
|
470
|
+
f_write_money: model.f_write_money,
|
|
471
|
+
f_balance: row.f_balance,
|
|
472
|
+
f_preamount: model.f_preamount,
|
|
473
|
+
f_total_gas: (row.f_total_gas - 0) + (model.f_pregas - 0),
|
|
474
|
+
f_write_totalgas: (row.f_write_totalgas - 0) + (model.f_pregas - 0),
|
|
475
|
+
f_write_totalfee: (row.f_write_totalfee - 0) + (model.f_write_money - 0),
|
|
476
|
+
f_total_fee: (row.f_total_fee - 0) + (model.f_preamount - 0),
|
|
477
|
+
f_collection: model.f_collection,
|
|
478
|
+
f_payment: model.f_payment.toString(),
|
|
479
|
+
payments: model.payments,
|
|
480
|
+
f_print: model.f_print.toString(),
|
|
481
|
+
f_voucher_number: model.f_voucher_number,
|
|
482
|
+
userinfo_version: row.userinfo_version,
|
|
483
|
+
version: row.version,
|
|
484
|
+
f_write_card: f_write_card === '不写卡' ? '不写卡' : '未写卡',
|
|
485
|
+
f_operator: Vue.$login.f.name,
|
|
486
|
+
f_operatorid: Vue.$login.f.id,
|
|
487
|
+
f_orgid: Vue.$login.f.orgid,
|
|
488
|
+
f_orgname: Vue.$login.f.orgs,
|
|
489
|
+
f_depid: Vue.$login.f.depids,
|
|
490
|
+
f_depname: Vue.$login.f.deps,
|
|
491
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
492
|
+
f_zones: Vue.$login.f.zones
|
|
493
|
+
|
|
494
|
+
}
|
|
495
|
+
if (row.f_alias === 'ShuMa') {
|
|
496
|
+
param.f_write_card = '已写卡'
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
return noCardSellGasGen(param, row)
|
|
500
|
+
},
|
|
501
|
+
|
|
502
|
+
// 补卡写卡
|
|
503
|
+
replaceCard (model, row, allot) {
|
|
504
|
+
// 磁条卡走了 replaceCiTiaoCard 不走这里
|
|
505
|
+
// if (row.f_meter_type.indexOf('卡表') === -1 && row.f_meter_type.indexOf('物联网表') === -1) {
|
|
506
|
+
// model.f_type = '补磁条卡'
|
|
507
|
+
// let replace = replaceCiTiaoCardGen(model, row)
|
|
508
|
+
// return co(replace)
|
|
509
|
+
// }
|
|
510
|
+
let replace = replaceCardGen(model, row, allot ? this.getallotdata(allot, row, '补卡') : null)
|
|
511
|
+
return co(replace)
|
|
512
|
+
},
|
|
513
|
+
// 磁条卡补卡写卡
|
|
514
|
+
replaceCiTiaoCard (model, row, allot) {
|
|
515
|
+
let replace = replaceCiTiaoCardGen(model, row)
|
|
516
|
+
return co(replace)
|
|
517
|
+
},
|
|
518
|
+
// 机表写卡
|
|
519
|
+
replaceCardJB (model, row) {
|
|
520
|
+
let replace = replaceCardGenJB(model, row)
|
|
521
|
+
return co(replace)
|
|
522
|
+
},
|
|
523
|
+
// 物联网写卡
|
|
524
|
+
replaceCardWeb (model, row) {
|
|
525
|
+
let replace = replaceCardGenWeb(model, row)
|
|
526
|
+
return co(replace)
|
|
527
|
+
},
|
|
528
|
+
replacecXq (model, row) {
|
|
529
|
+
let replace = replaceXq(model, row)
|
|
530
|
+
return co(replace)
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// 判断是否有卡插入
|
|
535
|
+
let hasCardGen = async function () {
|
|
536
|
+
return await Vue.resetpost('http://127.0.0.1:8003/HasCard', {}, {resolveMsg: null, rejectMsg: null})
|
|
537
|
+
}
|
|
538
|
+
// 读卡
|
|
539
|
+
let readCard = async function () {
|
|
540
|
+
return await Vue.resetpost('http://127.0.0.1:8003/ReadCard', {data: {}}, {resolveMsg: null, rejectMsg: null})
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
let replaceCiTiaoCardGen = async function (model, row) {
|
|
544
|
+
// 1.存库 2.写卡
|
|
545
|
+
let result = null
|
|
546
|
+
let getCardNumber = {data: {cardNumber: null}}
|
|
547
|
+
try {
|
|
548
|
+
const OperatorInfo = {
|
|
549
|
+
f_operator: Vue.$login.f.name,
|
|
550
|
+
f_operatorid: Vue.$login.f.id,
|
|
551
|
+
f_orgid: Vue.$login.f.orgid,
|
|
552
|
+
f_orgname: Vue.$login.f.orgs,
|
|
553
|
+
f_depid: Vue.$login.f.depids,
|
|
554
|
+
f_depname: Vue.$login.f.deps
|
|
555
|
+
}
|
|
556
|
+
// 获取卡号
|
|
557
|
+
// if (!row.f_card_id) {
|
|
558
|
+
// getCardNumber = await Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {
|
|
559
|
+
// resolveMsg: null,
|
|
560
|
+
// rejectMsg: '发卡售气获取卡号失败!!'
|
|
561
|
+
// })
|
|
562
|
+
// console.log('获取卡号、、', getCardNumber)
|
|
563
|
+
// } else {
|
|
564
|
+
// getCardNumber.data.cardNumber = row.f_card_id
|
|
565
|
+
// console.log('档案自带卡号、、', getCardNumber)
|
|
566
|
+
// }
|
|
567
|
+
if (row.f_userinfo_code) {
|
|
568
|
+
getCardNumber.data.cardNumber = row.f_card_id
|
|
569
|
+
}
|
|
570
|
+
result = await Vue.resetpost('rs/logic/sendCiTiaoCardRemanentGas', {
|
|
571
|
+
data: {
|
|
572
|
+
model,
|
|
573
|
+
getCardNumber,
|
|
574
|
+
row,
|
|
575
|
+
OperatorInfo
|
|
576
|
+
}
|
|
577
|
+
}, {resolveMsg: null, rejectMsg: '发卡售气存库失败'})
|
|
578
|
+
// 存库
|
|
579
|
+
console.log('换表发卡存库返回', result)
|
|
580
|
+
// 写卡
|
|
581
|
+
Vue.showAlert('请刷卡', 'warning', 50000)
|
|
582
|
+
// 组织写卡数据
|
|
583
|
+
let params = {
|
|
584
|
+
kh: result.data.cardnumber
|
|
585
|
+
}
|
|
586
|
+
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteCard_HEC', params, {
|
|
587
|
+
resolveMsg: null,
|
|
588
|
+
rejectMsg: '开户卡服务错误'
|
|
589
|
+
})
|
|
590
|
+
Vue.closeAlert()
|
|
591
|
+
if (!result || cardRes.data.Err || cardRes.data.Exception) {
|
|
592
|
+
// 写卡异常
|
|
593
|
+
await Vue.resetpost('rs/logic/sendCiTiaoCardRemanentGas', {
|
|
594
|
+
data: {
|
|
595
|
+
model,
|
|
596
|
+
getCardNumber,
|
|
597
|
+
row,
|
|
598
|
+
Chongzheng: true,
|
|
599
|
+
fill_id: result.data.id
|
|
600
|
+
}
|
|
601
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
602
|
+
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
603
|
+
} else {
|
|
604
|
+
// 写卡成功
|
|
605
|
+
Vue.showAlert('写卡成功', 'success', 2000)
|
|
606
|
+
return result
|
|
607
|
+
}
|
|
608
|
+
} catch (error) {
|
|
609
|
+
console.log('换表发卡出错。。', error)
|
|
610
|
+
if (result) {
|
|
611
|
+
// 出错进行回滚
|
|
612
|
+
row.f_user_id = row.f_user_id + ''
|
|
613
|
+
if (result) {
|
|
614
|
+
await Vue.resetpost('rs/logic/sendCiTiaoCardRemanentGas', {
|
|
615
|
+
data: {
|
|
616
|
+
model,
|
|
617
|
+
getCardNumber,
|
|
618
|
+
row,
|
|
619
|
+
Chongzheng: true,
|
|
620
|
+
fill_id: result.data.id
|
|
621
|
+
}
|
|
622
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
if (error.data) {
|
|
626
|
+
throw new Error(error.data)
|
|
627
|
+
} else {
|
|
628
|
+
throw error
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
let sendCardSaleGasGenremanent = async function (model, row) {
|
|
634
|
+
// 1.存库 2.写卡
|
|
635
|
+
let result = null
|
|
636
|
+
try {
|
|
637
|
+
let cardState = await hasCardGen()
|
|
638
|
+
console.log('判卡函数返回:', cardState)
|
|
639
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
640
|
+
// 获取卡号
|
|
641
|
+
let getCardNumber = {data: {cardNumber: null}}
|
|
642
|
+
if (!row.f_card_id) {
|
|
643
|
+
getCardNumber = await Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {resolveMsg: null, rejectMsg: '发卡售气获取卡号失败!!'})
|
|
644
|
+
console.log('获取卡号、、', getCardNumber)
|
|
645
|
+
} else {
|
|
646
|
+
getCardNumber.data.cardNumber = row.f_card_id
|
|
647
|
+
console.log('档案自带卡号、、', getCardNumber)
|
|
648
|
+
}
|
|
649
|
+
if (row.f_alias && row.f_alias.includes('SmartCard_TP')) {
|
|
650
|
+
model.cardNumber = row.f_meternumber
|
|
651
|
+
} else if (getCardNumber.data.cardNumber) {
|
|
652
|
+
model.cardNumber = getCardNumber.data.cardNumber + ''
|
|
653
|
+
} else {
|
|
654
|
+
throw new Error('获取卡号失败!请核实参数管理中的卡号重新换表发卡售气。')
|
|
655
|
+
}
|
|
656
|
+
result = await Vue.resetpost('rs/logic/sendCardRemanentGas', {data: model}, {resolveMsg: null, rejectMsg: '发卡售气存库失败'})
|
|
657
|
+
// 存库
|
|
658
|
+
console.log('换表发卡存库返回', result)
|
|
659
|
+
// 写卡
|
|
660
|
+
let cardParams = await getParamGen(result.data.cardnumber, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
661
|
+
|
|
662
|
+
// 组织写卡数据
|
|
663
|
+
let params = {
|
|
664
|
+
factory: row.f_alias,
|
|
665
|
+
kmm: '0', // 2019-12-22 查旭说的。给一个0 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
666
|
+
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
667
|
+
kh: result.data.cardnumber, // 卡号
|
|
668
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
669
|
+
ql: model.f_pregas, // 预购气量
|
|
670
|
+
csql: '0', // 上次购气量,新开户为0
|
|
671
|
+
ccsql: '0', // 上上次购气量,新开户为0
|
|
672
|
+
cs: '1', // 求购气次数,先开户为1
|
|
673
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
674
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_preamount - 0), // 累计购气金额
|
|
675
|
+
bkcs: '0', // 新开户卡,为0
|
|
676
|
+
ljyql: '0', // 累积用气量,有些表要累加原来用气量,新开户卡,为0
|
|
677
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
678
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
679
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
680
|
+
cssqrq: '0', // 上次售气日期,格式为YYYYMMDD
|
|
681
|
+
meterid: row.f_meternumber, // 表号
|
|
682
|
+
money: model.f_preamount, // 购气金额
|
|
683
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
684
|
+
klx: row.f_coding
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
688
|
+
|
|
689
|
+
// 判断是否是累购表
|
|
690
|
+
if (row.f_support_purchase === '是') {
|
|
691
|
+
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
692
|
+
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
693
|
+
params.totalmoney = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
694
|
+
}
|
|
695
|
+
console.log('换表发卡写卡参数', params)
|
|
696
|
+
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
697
|
+
resolveMsg: null,
|
|
698
|
+
rejectMsg: '开户卡服务错误'
|
|
699
|
+
}, 80000)
|
|
700
|
+
if (!cardParams || ((model.f_pregas > model.f_remanent_gas) && !result) || cardRes.data.Err || cardRes.data.Exception) {
|
|
701
|
+
// 写卡异常
|
|
702
|
+
// 数据回滚操作
|
|
703
|
+
// 由于数据太长,将f_user_id 更改为字符串
|
|
704
|
+
row.f_userfiles_id = row.f_userfiles_id + ''
|
|
705
|
+
|
|
706
|
+
await Vue.resetpost('rs/logic/remanentRollback', {data: {fillgasid: result.data.fillgasid, sellid: result.data.sellid, row: row}}, {
|
|
707
|
+
resolveMsg: null,
|
|
708
|
+
rejectMsg: '开户失败'
|
|
709
|
+
})
|
|
710
|
+
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
711
|
+
} else {
|
|
712
|
+
// 写卡成功
|
|
713
|
+
// 更新卡密码
|
|
714
|
+
row.version = result.data.version - 1,
|
|
715
|
+
await Vue.CommonService.updatePassword(row, cardRes)
|
|
716
|
+
Vue.showAlert('补气购气成功', 'success', 2000)
|
|
717
|
+
return result
|
|
718
|
+
}
|
|
719
|
+
} else {
|
|
720
|
+
throw new Error(`请检查卡是否插好!!`)
|
|
721
|
+
}
|
|
722
|
+
} catch (error) {
|
|
723
|
+
console.log('换表发卡出错。。', error)
|
|
724
|
+
|
|
725
|
+
if (result) {
|
|
726
|
+
// 出错进行回滚
|
|
727
|
+
row.f_user_id = row.f_user_id + ''
|
|
728
|
+
if (result) {
|
|
729
|
+
await Vue.resetpost('rs/logic/remanentRollback', {data: {fillgasid: result.data.fillgasid, sellid: result.data.sellid, row: row}}, {
|
|
730
|
+
resolveMsg: null,
|
|
731
|
+
rejectMsg: '写卡失败,数据回滚失败,请联系技术人员处理!!'
|
|
732
|
+
})
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
if (error.data) {
|
|
737
|
+
throw new Error(error.data)
|
|
738
|
+
} else {
|
|
739
|
+
throw error
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
let resetsendCardSaleGasGen = async function (model, row) {
|
|
744
|
+
// 1.存库 2.写卡
|
|
745
|
+
let result = null
|
|
746
|
+
try {
|
|
747
|
+
let cardState = await hasCardGen()
|
|
748
|
+
console.log('判卡函数返回:', cardState)
|
|
749
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
750
|
+
// 获取卡号
|
|
751
|
+
let getCardNumber = await Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {resolveMsg: null, rejectMsg: '重发卡售气获取卡号失败!!'})
|
|
752
|
+
console.log('获取卡号、、', getCardNumber)
|
|
753
|
+
if (getCardNumber.data.cardNumber) {
|
|
754
|
+
// 当卡的别名是泰鹏普通卡的时候卡号和表号一致
|
|
755
|
+
console.log('开始验证是不是泰鹏普通卡')
|
|
756
|
+
if (row.f_alias && row.f_alias.includes('SmartCard_TP')) {
|
|
757
|
+
model.cardNumber = row.f_meternumber
|
|
758
|
+
} else {
|
|
759
|
+
model.cardNumber = getCardNumber.data.cardNumber + ''
|
|
760
|
+
model.f_card_id = getCardNumber.data.cardNumber + ''
|
|
761
|
+
}
|
|
762
|
+
} else {
|
|
763
|
+
throw new Error('获取卡号失败!请核实参数管理中的卡号重新发卡售气。')
|
|
764
|
+
}
|
|
765
|
+
// 存库
|
|
766
|
+
result = await Vue.resetpost('rs/logic/sale_resetsendCardSaleGas_logic', {data: model}, {resolveMsg: null, rejectMsg: '重发卡售气存库失败'})
|
|
767
|
+
console.log('重发卡售气存库返回', result)
|
|
768
|
+
// 写卡
|
|
769
|
+
let cardParams = await getParamGen(result.data.cardnumber, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
770
|
+
|
|
771
|
+
// 组织写卡数据
|
|
772
|
+
let params = {
|
|
773
|
+
factory: row.f_alias,
|
|
774
|
+
kmm: '0', // 2019-12-22 查旭说的。给一个0 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
775
|
+
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
776
|
+
kh: result.data.cardnumber, // 卡号
|
|
777
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
778
|
+
ql: model.f_pregas, // 预购气量
|
|
779
|
+
csql: '0', // 上次购气量,新开户为0
|
|
780
|
+
ccsql: '0', // 上上次购气量,新开户为0
|
|
781
|
+
cs: '1', // 求购气次数,先开户为1
|
|
782
|
+
// ljgql: model.f_pregas, // 当前累计购气量
|
|
783
|
+
bkcs: '0', // 新开户卡,为0
|
|
784
|
+
ljyql: '0', // 累积用气量,有些表要累加原来用气量,新开户卡,为0
|
|
785
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
786
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
787
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
788
|
+
cssqrq: '0', // 上次售气日期,格式为YYYYMMDD
|
|
789
|
+
meterid: row.f_meternumber, // 表号
|
|
790
|
+
money: model.f_preamount, // 购气金额
|
|
791
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
792
|
+
klx: row.f_coding,
|
|
793
|
+
ljgql: (row.f_total_gas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
794
|
+
ljgqje: (row.f_total_fee - 0) + (model.f_preamount - 0) // 累计购气金额
|
|
795
|
+
}
|
|
796
|
+
// 判断是否是累购表
|
|
797
|
+
if (row.f_support_purchase === '是') {
|
|
798
|
+
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
799
|
+
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
800
|
+
}
|
|
801
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
802
|
+
console.log('重发卡售气写卡参数', params)
|
|
803
|
+
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
804
|
+
resolveMsg: null,
|
|
805
|
+
rejectMsg: '重开户卡服务错误'
|
|
806
|
+
}, 80000)
|
|
807
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
808
|
+
// 写卡异常
|
|
809
|
+
// 数据回滚操作
|
|
810
|
+
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
811
|
+
} else {
|
|
812
|
+
// 写卡成功
|
|
813
|
+
// 更新卡密码
|
|
814
|
+
await Vue.CommonService.updatePassword(row, cardRes)
|
|
815
|
+
Vue.showAlert('初始化卡成功', 'success', 2000)
|
|
816
|
+
return result
|
|
817
|
+
}
|
|
818
|
+
} else {
|
|
819
|
+
throw new Error(`请检查卡是否插好!!`)
|
|
820
|
+
}
|
|
821
|
+
} catch (error) {
|
|
822
|
+
if (result) {
|
|
823
|
+
// 出错进行回滚
|
|
824
|
+
row.f_userfiles_id = row.f_userfiles_id + ''
|
|
825
|
+
if (result) {
|
|
826
|
+
await Vue.resetpost('rs/logic/salecardrollback', {data: {id: result.data.id, row: row}}, {
|
|
827
|
+
resolveMsg: null,
|
|
828
|
+
rejectMsg: '写卡失败,数据回滚失败,请联系技术人员处理!!'
|
|
829
|
+
})
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
if (error.data) {
|
|
833
|
+
throw new Error(error.data)
|
|
834
|
+
} else {
|
|
835
|
+
throw error
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
let sendCardSaleGasGen = async function (model, row) {
|
|
841
|
+
// 1.存库 2.写卡
|
|
842
|
+
let result = null
|
|
843
|
+
let initdata = {
|
|
844
|
+
state: null
|
|
845
|
+
}
|
|
846
|
+
let cardState = {
|
|
847
|
+
data: JSON.stringify(initdata)
|
|
848
|
+
}
|
|
849
|
+
try {
|
|
850
|
+
console.log('巴彦发卡售气' + row.f_alias)
|
|
851
|
+
if (row.f_alias !== 'ShuMa') {
|
|
852
|
+
cardState = await hasCardGen()
|
|
853
|
+
}
|
|
854
|
+
console.log('判卡函数返回:', cardState)
|
|
855
|
+
if (JSON.parse(cardState.data).state === 1 || row.f_alias === 'ShuMa') {
|
|
856
|
+
// 获取卡号
|
|
857
|
+
let getCardNumber = {data: {cardNumber: null}}
|
|
858
|
+
if (!row.f_card_id) {
|
|
859
|
+
getCardNumber = await Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {resolveMsg: null, rejectMsg: '发卡售气获取卡号失败!!'})
|
|
860
|
+
console.log('获取卡号、、', getCardNumber)
|
|
861
|
+
} else {
|
|
862
|
+
getCardNumber.data.cardNumber = row.f_card_id
|
|
863
|
+
console.log('档案自带卡号、、', getCardNumber)
|
|
864
|
+
}
|
|
865
|
+
if (getCardNumber.data.cardNumber) {
|
|
866
|
+
// 当卡的别名是泰鹏普通卡的时候卡号和表号一致
|
|
867
|
+
console.log('开始验证是不是泰鹏普通卡')
|
|
868
|
+
if (row.f_alias && (row.f_alias.includes('SmartCard_TP') || row.f_alias.includes('LiHengSystem'))) {
|
|
869
|
+
model.cardNumber = row.f_meternumber
|
|
870
|
+
} else if (row.f_alias && row.f_alias.includes('LaiDeRF')) {
|
|
871
|
+
model.cardNumber = row.f_card_id
|
|
872
|
+
} else {
|
|
873
|
+
model.cardNumber = getCardNumber.data.cardNumber + ''
|
|
874
|
+
}
|
|
875
|
+
} else {
|
|
876
|
+
throw new Error('获取卡号失败!请核实参数管理中的卡号重新发卡售气。')
|
|
877
|
+
}
|
|
878
|
+
// 存库
|
|
879
|
+
result = await Vue.resetpost('rs/logic/sale_sendCardSaleGas_logic', {data: model}, {resolveMsg: null, rejectMsg: '发卡售气存库失败'})
|
|
880
|
+
console.log('发卡售气存库返回', result)
|
|
881
|
+
// 写卡
|
|
882
|
+
let cardParams = await getParamGen(result.data.cardnumber, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
883
|
+
|
|
884
|
+
// 组织写卡数据
|
|
885
|
+
let params = {
|
|
886
|
+
factory: row.f_alias,
|
|
887
|
+
kmm: '0', // 2019-12-22 查旭说的。给一个0 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
888
|
+
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
889
|
+
kh: result.data.cardnumber, // 卡号
|
|
890
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
891
|
+
ql: model.f_pregas, // 预购气量
|
|
892
|
+
csql: '0', // 上次购气量,新开户为0
|
|
893
|
+
ccsql: '0', // 上上次购气量,新开户为0
|
|
894
|
+
cs: '1', // 求购气次数,先开户为1
|
|
895
|
+
// ljgql: model.f_pregas, // 当前累计购气量
|
|
896
|
+
bkcs: '0', // 新开户卡,为0
|
|
897
|
+
ljyql: '0', // 累积用气量,有些表要累加原来用气量,新开户卡,为0
|
|
898
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
899
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
900
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
901
|
+
cssqrq: '0', // 上次售气日期,格式为YYYYMMDD
|
|
902
|
+
meterid: row.f_meternumber, // 表号
|
|
903
|
+
money: model.f_write_money, // 购气金额
|
|
904
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
905
|
+
klx: row.f_coding,
|
|
906
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
907
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0) // 累计购气金额
|
|
908
|
+
}
|
|
909
|
+
// 天源表发卡售气时,cs默认给0
|
|
910
|
+
if (row.f_alias && row.f_alias.includes('TianYuan')) {
|
|
911
|
+
console.log('天源表发卡售气时,写卡次数给:', params.cs)
|
|
912
|
+
params.cs = '0'
|
|
913
|
+
}
|
|
914
|
+
// 判断是否是累购表
|
|
915
|
+
if (row.f_support_purchase === '是') {
|
|
916
|
+
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
917
|
+
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
918
|
+
}
|
|
919
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
920
|
+
console.log('发卡售气写卡参数', params)
|
|
921
|
+
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
922
|
+
resolveMsg: null,
|
|
923
|
+
rejectMsg: '开户卡服务错误'
|
|
924
|
+
}, 80000)
|
|
925
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
926
|
+
// 写卡异常
|
|
927
|
+
// 数据回滚操作
|
|
928
|
+
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
929
|
+
} else {
|
|
930
|
+
// 写卡成功
|
|
931
|
+
// 更新卡密码
|
|
932
|
+
if (row.f_alias === 'ShuMa') {
|
|
933
|
+
// 回写收费记录
|
|
934
|
+
cardState = await Vue.CommonService.updateReocrdPassword(result, cardRes, 'sellgas')
|
|
935
|
+
} else {
|
|
936
|
+
await Vue.CommonService.updatePassword(row, cardRes)
|
|
937
|
+
}
|
|
938
|
+
Vue.showAlert('发卡售气成功', 'success', 2000)
|
|
939
|
+
return result
|
|
940
|
+
}
|
|
941
|
+
} else {
|
|
942
|
+
throw new Error(`请检查卡是否插好!!`)
|
|
943
|
+
}
|
|
944
|
+
} catch (error) {
|
|
945
|
+
if (result) {
|
|
946
|
+
// 出错进行回滚
|
|
947
|
+
row.f_userfiles_id = row.f_userfiles_id + ''
|
|
948
|
+
if (result) {
|
|
949
|
+
await Vue.resetpost('rs/logic/salecardrollback', {data: {id: result.data.id, row: row}}, {
|
|
950
|
+
resolveMsg: null,
|
|
951
|
+
rejectMsg: '写卡失败,数据回滚失败,请联系技术人员处理!!'
|
|
952
|
+
})
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
if (error.data) {
|
|
956
|
+
throw new Error(error.data)
|
|
957
|
+
} else {
|
|
958
|
+
throw error
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
let replaceCardGen2 = function * (model, row, allot) {
|
|
964
|
+
let result = yield co(reissueCardGen(model, row))
|
|
965
|
+
let data = {
|
|
966
|
+
userfiles: {},
|
|
967
|
+
record: {
|
|
968
|
+
id: result.data.id,
|
|
969
|
+
f_state: '有效'
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return yield Vue.resetpost('rs/logic/updatemark', {data: data}, {resolveMsg: '补卡成功', rejectMsg: '补卡修改状态失败'})
|
|
973
|
+
}
|
|
974
|
+
// 物联网表发卡管理
|
|
975
|
+
let replaceCardGenWeb = function * (model, row) {
|
|
976
|
+
let result = null
|
|
977
|
+
let allotback
|
|
978
|
+
try {
|
|
979
|
+
// 判断是否有卡
|
|
980
|
+
let cardState = yield co(hasCardGen())
|
|
981
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
982
|
+
let cardId = ''
|
|
983
|
+
if (row.f_card_id && row.f_card_id !== 'null') {
|
|
984
|
+
cardId = row.f_card_id
|
|
985
|
+
} else {
|
|
986
|
+
let getCardNumber = yield co(getCardNumberGen(row.f_gasbrand_id))
|
|
987
|
+
console.log('获取卡号、、', getCardNumber)
|
|
988
|
+
cardId = getCardNumber.data.cardNumber
|
|
989
|
+
}
|
|
990
|
+
if (row.f_tag) {
|
|
991
|
+
// 截取用户编号后四位
|
|
992
|
+
cardId = row.f_tag + row.f_card_id
|
|
993
|
+
}
|
|
994
|
+
model.f_card_id = cardId
|
|
995
|
+
// 存库
|
|
996
|
+
result = yield co(reissueCardGenJB(model, row))
|
|
997
|
+
// 获取气价和售气情况参数
|
|
998
|
+
let cardParams = yield co(getParamGen(cardId, row.f_alias, row.f_user_id, row.f_userfiles_id))
|
|
999
|
+
// 写卡
|
|
1000
|
+
let params = {
|
|
1001
|
+
factory: row.f_alias,
|
|
1002
|
+
kh: cardId, // 卡号
|
|
1003
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1004
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1005
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1006
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1007
|
+
ljgql: (row.f_total_gas - 0), // 当前累计购气量
|
|
1008
|
+
ljgqje: (row.f_total_fee - 0), // 累计购气金额
|
|
1009
|
+
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1010
|
+
bkcs: row.f_fillcard_times + 1, // 补卡次数,从补卡表里通过表编号获得
|
|
1011
|
+
cs: row.f_times, // 求购气次数,先开户为1
|
|
1012
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号
|
|
1013
|
+
meterid: row.f_meternumber, // 表号
|
|
1014
|
+
meternumber: row.f_meternumber,
|
|
1015
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1016
|
+
money: 0, // 购气金额
|
|
1017
|
+
klx: row.f_coding
|
|
1018
|
+
}
|
|
1019
|
+
// 判断是否是累购表
|
|
1020
|
+
if (row.f_support_purchase === '是') {
|
|
1021
|
+
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
1022
|
+
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
1023
|
+
}
|
|
1024
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1025
|
+
console.log('补卡是写的次数。。。。', params)
|
|
1026
|
+
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
1027
|
+
resolveMsg: null,
|
|
1028
|
+
rejectMsg: '补卡卡服务错误'
|
|
1029
|
+
}))
|
|
1030
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
1031
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1032
|
+
Vue.$showAlert('物联网表补卡失败!!', 'danger', 0)
|
|
1033
|
+
let rollbackParam = {
|
|
1034
|
+
id: result.data.id,
|
|
1035
|
+
f_card_id: row.f_card_id,
|
|
1036
|
+
f_whether_hairpin: row.f_whether_hairpin,
|
|
1037
|
+
f_user_id: row.f_user_id
|
|
1038
|
+
}
|
|
1039
|
+
if (row.f_tag) {
|
|
1040
|
+
rollbackParam.f_tag = row.f_tag
|
|
1041
|
+
}
|
|
1042
|
+
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1043
|
+
resolveMsg: null,
|
|
1044
|
+
rejectMsg: null
|
|
1045
|
+
})
|
|
1046
|
+
} else {
|
|
1047
|
+
// 如果成功修改标识(更新状态为有效)
|
|
1048
|
+
// 没有更新过表档案,这里版本号减一
|
|
1049
|
+
row.version = (row.version - 0) - 1
|
|
1050
|
+
yield co(Vue.CommonService.updatePassword(row, cardRes))
|
|
1051
|
+
let data = {
|
|
1052
|
+
userfiles: {
|
|
1053
|
+
f_card_id: row.f_card_id,
|
|
1054
|
+
f_whether_hairpin: '已发'
|
|
1055
|
+
},
|
|
1056
|
+
record: {
|
|
1057
|
+
id: result.data.id,
|
|
1058
|
+
f_state: '有效'
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
return yield Vue.resetpost('rs/logic/updatemark', {data: data}, {resolveMsg: '物联网表补卡成功', rejectMsg: '补卡修改状态失败'})
|
|
1062
|
+
}
|
|
1063
|
+
} else {
|
|
1064
|
+
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1065
|
+
}
|
|
1066
|
+
} catch (error) {
|
|
1067
|
+
let msg = ''
|
|
1068
|
+
if (error.status === 612) {
|
|
1069
|
+
msg = '请检查读卡器时候连接,或者卡服务是否启动!!'
|
|
1070
|
+
} else {
|
|
1071
|
+
msg = '补卡失败!!'
|
|
1072
|
+
|
|
1073
|
+
let rollbackParam = {
|
|
1074
|
+
id: result.data.id,
|
|
1075
|
+
f_card_id: null,
|
|
1076
|
+
f_whether_hairpin: row.f_whether_hairpin,
|
|
1077
|
+
f_user_id: row.f_user_id
|
|
1078
|
+
}
|
|
1079
|
+
if (row.f_tag) {
|
|
1080
|
+
rollbackParam.f_tag = row.f_tag
|
|
1081
|
+
}
|
|
1082
|
+
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1083
|
+
resolveMsg: null,
|
|
1084
|
+
rejectMsg: '物联网表补卡失败!!'
|
|
1085
|
+
})
|
|
1086
|
+
}
|
|
1087
|
+
Vue.showAlert(msg, 'danger', 0)
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
// 机表补卡管理
|
|
1091
|
+
let replaceCardGenJB = function * (model, row) {
|
|
1092
|
+
let result = null
|
|
1093
|
+
let allotback
|
|
1094
|
+
try {
|
|
1095
|
+
// 判断是否有卡
|
|
1096
|
+
let cardState = yield co(hasCardGen())
|
|
1097
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
1098
|
+
let cardId = row.f_card_id
|
|
1099
|
+
if (row.f_tag) {
|
|
1100
|
+
// 截取用户编号后四位
|
|
1101
|
+
cardId = row.f_tag + row.f_card_id
|
|
1102
|
+
}
|
|
1103
|
+
model.f_card_id = cardId
|
|
1104
|
+
// 存库
|
|
1105
|
+
result = yield co(reissueCardGenJB(model, row))
|
|
1106
|
+
// 获取气价和售气情况参数
|
|
1107
|
+
let cardParams = yield co(getParamGen(cardId, row.f_alias, row.f_user_id, row.f_userfiles_id))
|
|
1108
|
+
// 写卡
|
|
1109
|
+
let params = {
|
|
1110
|
+
factory: row.f_alias,
|
|
1111
|
+
kh: cardId, // 卡号
|
|
1112
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1113
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1114
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1115
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1116
|
+
ljgql: (row.f_total_gas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1117
|
+
ljgqje: (row.f_total_fee - 0) + (model.f_preamount - 0), // 累计购气金额
|
|
1118
|
+
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1119
|
+
bkcs: row.f_fillcard_times + 1, // 补卡次数,从补卡表里通过表编号获得
|
|
1120
|
+
cs: row.f_times, // 求购气次数,先开户为1
|
|
1121
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号
|
|
1122
|
+
meterid: row.f_meternumber, // 表号
|
|
1123
|
+
meternumber: row.f_meternumber,
|
|
1124
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1125
|
+
money: 0, // 购气金额
|
|
1126
|
+
klx: row.f_coding
|
|
1127
|
+
}
|
|
1128
|
+
// 判断是否是累购表
|
|
1129
|
+
if (row.f_support_purchase === '是') {
|
|
1130
|
+
params.ljgql = (row.f_write_totalgas - 0) + (model.f_pregas - 0)
|
|
1131
|
+
params.ljgqje = (row.f_write_totalfee - 0) + (model.f_preamount - 0)
|
|
1132
|
+
}
|
|
1133
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1134
|
+
console.log('补卡是写的次数。。。。', params)
|
|
1135
|
+
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
1136
|
+
resolveMsg: null,
|
|
1137
|
+
rejectMsg: '补卡卡服务错误'
|
|
1138
|
+
}, 80000))
|
|
1139
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
1140
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1141
|
+
Vue.$showAlert('机表补卡失败!!', 'danger', 0)
|
|
1142
|
+
let rollbackParam = {
|
|
1143
|
+
id: result.data.id,
|
|
1144
|
+
f_card_id: row.f_card_id,
|
|
1145
|
+
f_whether_hairpin: row.f_whether_hairpin,
|
|
1146
|
+
f_user_id: row.f_user_id
|
|
1147
|
+
}
|
|
1148
|
+
if (row.f_tag) {
|
|
1149
|
+
rollbackParam.f_tag = row.f_tag
|
|
1150
|
+
}
|
|
1151
|
+
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1152
|
+
resolveMsg: null,
|
|
1153
|
+
rejectMsg: null
|
|
1154
|
+
})
|
|
1155
|
+
} else {
|
|
1156
|
+
// 如果成功修改标识(更新状态为有效)
|
|
1157
|
+
// 没有更新过表档案,这里版本号减一
|
|
1158
|
+
row.version = (row.version - 0) - 1
|
|
1159
|
+
yield co(Vue.CommonService.updatePassword(row, cardRes))
|
|
1160
|
+
let data = {
|
|
1161
|
+
userfiles: {
|
|
1162
|
+
f_card_id: row.f_card_id,
|
|
1163
|
+
f_whether_hairpin: '已发'
|
|
1164
|
+
},
|
|
1165
|
+
record: {
|
|
1166
|
+
id: result.data.id,
|
|
1167
|
+
f_state: '有效'
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
return yield Vue.resetpost('rs/logic/updatemark', {data: data}, {resolveMsg: '机表补卡成功', rejectMsg: '补卡修改状态失败'})
|
|
1171
|
+
}
|
|
1172
|
+
} else {
|
|
1173
|
+
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1174
|
+
}
|
|
1175
|
+
} catch (error) {
|
|
1176
|
+
let msg = ''
|
|
1177
|
+
if (error.status === 612) {
|
|
1178
|
+
msg = '请检查读卡器时候连接,或者卡服务是否启动!!'
|
|
1179
|
+
} else {
|
|
1180
|
+
msg = '补卡失败!!'
|
|
1181
|
+
|
|
1182
|
+
let rollbackParam = {
|
|
1183
|
+
id: result.data.id,
|
|
1184
|
+
f_card_id: null,
|
|
1185
|
+
f_whether_hairpin: row.f_whether_hairpin,
|
|
1186
|
+
f_user_id: row.f_user_id
|
|
1187
|
+
}
|
|
1188
|
+
if (row.f_tag) {
|
|
1189
|
+
rollbackParam.f_tag = row.f_tag
|
|
1190
|
+
}
|
|
1191
|
+
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1192
|
+
resolveMsg: null,
|
|
1193
|
+
rejectMsg: '机表补卡失败!!'
|
|
1194
|
+
})
|
|
1195
|
+
}
|
|
1196
|
+
Vue.showAlert(msg, 'danger', 0)
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
// 擦虚气
|
|
1200
|
+
let replaceXq = function * (model, row) {
|
|
1201
|
+
let result = null
|
|
1202
|
+
let cardState = yield co(hasCardGen())
|
|
1203
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
1204
|
+
let params = {
|
|
1205
|
+
factory: row.f_alias,
|
|
1206
|
+
kh: row.f_card_id, // 卡号
|
|
1207
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1208
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1209
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1210
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1211
|
+
ljgql: (row.f_total_gas - 0), // 当前累计购气量
|
|
1212
|
+
ljgqje: (row.f_total_fee - 0), // 累计购气金额
|
|
1213
|
+
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1214
|
+
bkcs: row.f_fillcard_times + 1, // 补卡次数,从补卡表里通过表编号获得
|
|
1215
|
+
cs: row.f_times, // 求购气次数,先开户为1
|
|
1216
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号
|
|
1217
|
+
meterid: row.f_meternumber, // 表号
|
|
1218
|
+
meternumber: row.f_meternumber,
|
|
1219
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1220
|
+
money: 0, // 购气金额
|
|
1221
|
+
klx: row.f_coding
|
|
1222
|
+
}
|
|
1223
|
+
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
1224
|
+
resolveMsg: null,
|
|
1225
|
+
rejectMsg: '擦虚气服务错误'
|
|
1226
|
+
}, 80000))
|
|
1227
|
+
if (cardRes.data.Err || cardRes.data.Exception) {
|
|
1228
|
+
return {status: 1}
|
|
1229
|
+
} else {
|
|
1230
|
+
return {status: 0}
|
|
1231
|
+
}
|
|
1232
|
+
} else {
|
|
1233
|
+
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
// 补卡管理
|
|
1238
|
+
let replaceCardGen = function * (model, row, allot) {
|
|
1239
|
+
let result = null
|
|
1240
|
+
let initdata = {
|
|
1241
|
+
state: 1
|
|
1242
|
+
}
|
|
1243
|
+
let cardState = {
|
|
1244
|
+
data: JSON.stringify(initdata)
|
|
1245
|
+
}
|
|
1246
|
+
let allotback
|
|
1247
|
+
try {
|
|
1248
|
+
// 判断是否有卡
|
|
1249
|
+
if (row.f_alias !== 'ShuMa') {
|
|
1250
|
+
cardState = yield co(hasCardGen())
|
|
1251
|
+
}
|
|
1252
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
1253
|
+
let cardId = row.f_card_id
|
|
1254
|
+
// 如果当前是物联网表,表未发卡,进行补需要获取卡号
|
|
1255
|
+
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是' && (row.f_card_id == null || row.f_card_id === '')) {
|
|
1256
|
+
let getCardNumber = yield Vue.resetpost('rs/logic/getCardNumber', {data: {id: row.brand_id}}, {resolveMsg: null, rejectMsg: '发卡售气获取卡号失败!!'})
|
|
1257
|
+
console.log('获取卡号、、', getCardNumber)
|
|
1258
|
+
if (getCardNumber.data.cardNumber) {
|
|
1259
|
+
cardId = getCardNumber.data.cardNumber
|
|
1260
|
+
} else {
|
|
1261
|
+
throw new Error('获取卡号失败!请核实参数管理中的卡号重新发卡售气。')
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
if (row.f_tag) {
|
|
1265
|
+
// 截取用户编号后四位
|
|
1266
|
+
cardId = row.f_tag + row.f_card_id
|
|
1267
|
+
}
|
|
1268
|
+
model.f_card_id = cardId
|
|
1269
|
+
// 存库
|
|
1270
|
+
result = yield co(reissueCardGen(model, row))
|
|
1271
|
+
if (allot) {
|
|
1272
|
+
allotback = yield Vue.resetpost('rs/logic/saveAllotData', {data: allot}, {
|
|
1273
|
+
resolveMsg: null,
|
|
1274
|
+
rejectMsg: '更新发卡信息失败'
|
|
1275
|
+
})
|
|
1276
|
+
}
|
|
1277
|
+
// 获取气价和售气情况参数
|
|
1278
|
+
let cardParams = yield co(getParamGen(cardId, row.f_alias, row.f_user_id, row.f_userfiles_id))
|
|
1279
|
+
console.log('补卡是写的次数111。。。。', row, model)
|
|
1280
|
+
// 写卡
|
|
1281
|
+
let params = {
|
|
1282
|
+
factory: row.f_alias,
|
|
1283
|
+
kh: cardId, // 卡号
|
|
1284
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1285
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1286
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1287
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1288
|
+
ljgql: (row.f_total_gas - 0), // 当前累计购气量
|
|
1289
|
+
ljgqje: (row.f_total_fee - 0), // 累计购气金额
|
|
1290
|
+
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1291
|
+
bkcs: row.f_fillcard_times + 1, // 补卡次数,从补卡表里通过表编号获得
|
|
1292
|
+
cs: row.f_times, // 求购气次数,先开户为1
|
|
1293
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号
|
|
1294
|
+
meterid: row.f_meternumber, // 表号
|
|
1295
|
+
meternumber: row.f_meternumber,
|
|
1296
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1297
|
+
money: 0, // 购气金额
|
|
1298
|
+
klx: row.f_coding
|
|
1299
|
+
}
|
|
1300
|
+
// 判断是否是累购表
|
|
1301
|
+
if (row.f_support_purchase === '是') {
|
|
1302
|
+
params.ljgql = (row.f_write_totalgas - 0)
|
|
1303
|
+
params.ljgqje = (row.f_write_totalfee - 0)
|
|
1304
|
+
}
|
|
1305
|
+
// 判断是否接表,如果未接表(次数减一)已过表(次数为档案里面的次数) 针对不补气的
|
|
1306
|
+
if (model.f_ispick_table) {
|
|
1307
|
+
params.cs = (model.f_ispick_table === '未过表' ? row.f_times - 1 : row.f_times)
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1311
|
+
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1312
|
+
// params.klx = yield co(getmodelbrandGen(row))
|
|
1313
|
+
// params.klx = params.klx.data[0].f_coding
|
|
1314
|
+
// }
|
|
1315
|
+
console.log('补卡是写的次数。。。。', params)
|
|
1316
|
+
|
|
1317
|
+
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
1318
|
+
resolveMsg: null,
|
|
1319
|
+
rejectMsg: '补卡卡服务错误'
|
|
1320
|
+
}, 80000))
|
|
1321
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
1322
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1323
|
+
Vue.$showAlert('补卡失败!!', 'danger', 0)
|
|
1324
|
+
let rollbackParam = {
|
|
1325
|
+
id: result.data.id,
|
|
1326
|
+
f_card_id: row.f_card_id,
|
|
1327
|
+
f_user_id: row.f_user_id
|
|
1328
|
+
}
|
|
1329
|
+
if (row.f_tag) {
|
|
1330
|
+
rollbackParam.f_tag = row.f_tag
|
|
1331
|
+
}
|
|
1332
|
+
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1333
|
+
resolveMsg: null,
|
|
1334
|
+
rejectMsg: null
|
|
1335
|
+
})
|
|
1336
|
+
// 更新卡状态为作废
|
|
1337
|
+
if (allot) {
|
|
1338
|
+
yield Vue.resetpost('rs/logic/allotDataRollback', {data: allotback.data}, {resolveMsg: null, rejectMsg: null})
|
|
1339
|
+
}
|
|
1340
|
+
} else {
|
|
1341
|
+
// 如果成功修改标识(更新状态为有效)
|
|
1342
|
+
// 没有更新过表档案,这里版本号减一
|
|
1343
|
+
row.version = (row.version - 0) - 1
|
|
1344
|
+
if (row.f_alias !== 'ShuMa') {
|
|
1345
|
+
yield co(Vue.CommonService.updatePassword(row, cardRes))
|
|
1346
|
+
} else {
|
|
1347
|
+
yield co(Vue.CommonService.updateReocrdPassword(result, cardRes, 'fillcard'))
|
|
1348
|
+
}
|
|
1349
|
+
let data = {
|
|
1350
|
+
userfiles: {},
|
|
1351
|
+
record: {
|
|
1352
|
+
id: result.data.id,
|
|
1353
|
+
f_state: '有效'
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
return yield Vue.resetpost('rs/logic/updatemark', {data: data}, {resolveMsg: '补卡成功', rejectMsg: '补卡修改状态失败'})
|
|
1357
|
+
}
|
|
1358
|
+
} else {
|
|
1359
|
+
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1360
|
+
}
|
|
1361
|
+
} catch (error) {
|
|
1362
|
+
console.log(error)
|
|
1363
|
+
let msg = ''
|
|
1364
|
+
if (error.status === 612) {
|
|
1365
|
+
msg = '请检查读卡器时候连接,或者卡服务是否启动!!'
|
|
1366
|
+
} else {
|
|
1367
|
+
msg = '补卡失败!!'
|
|
1368
|
+
|
|
1369
|
+
let rollbackParam = {
|
|
1370
|
+
id: result.data.id,
|
|
1371
|
+
f_card_id: row.f_card_id,
|
|
1372
|
+
f_user_id: row.f_user_id
|
|
1373
|
+
}
|
|
1374
|
+
if (row.f_tag) {
|
|
1375
|
+
rollbackParam.f_tag = row.f_tag
|
|
1376
|
+
}
|
|
1377
|
+
yield Vue.resetpost('rs/logic/repairCardRoolBack', {data: rollbackParam}, {
|
|
1378
|
+
resolveMsg: null,
|
|
1379
|
+
rejectMsg: '补卡失败!!'
|
|
1380
|
+
})
|
|
1381
|
+
}
|
|
1382
|
+
// 更新卡状态为作废
|
|
1383
|
+
if (allot) {
|
|
1384
|
+
yield Vue.resetpost('rs/logic/allotDataRollback', {data: allotback.data}, {resolveMsg: null, rejectMsg: null})
|
|
1385
|
+
}
|
|
1386
|
+
Vue.showAlert(msg, 'danger', 0)
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
let offlineWriteGen2 = async function (row) {
|
|
1391
|
+
let update = {
|
|
1392
|
+
id: row.unWriteSell[0].id,
|
|
1393
|
+
f_write_operator: Vue.$login.f.name,
|
|
1394
|
+
f_write_date: Vue.$login.toStandardTimeString()
|
|
1395
|
+
}
|
|
1396
|
+
await Vue.resetpost('rs/logic/offlineWrite', update, {resolveMsg: null, rejectMsg: '写卡成功,更新数据失败'})
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
let offlineWriteGen = async function (row) {
|
|
1400
|
+
console.log('线下写卡', row)
|
|
1401
|
+
try {
|
|
1402
|
+
// 写卡前调用(该为特殊业务逻辑根据需要写到project工程) (有些第三方缴费柜台写卡,用户缴费之后,如果在规定时间内不写卡,就会进行退款。所以写卡前调用第三方锁定订单。写卡成功或失败调用对应的接口告知第三方)
|
|
1403
|
+
|
|
1404
|
+
let beforeParam = {
|
|
1405
|
+
id: row.unWriteSell[0].id,
|
|
1406
|
+
f_operatorid: Vue.$login.f.id,
|
|
1407
|
+
f_depid: Vue.$login.f.depids
|
|
1408
|
+
}
|
|
1409
|
+
await Vue.resetpost('rs/logic/sale_write_before', {data: beforeParam}, {resolveMsg: null, rejectMsg: '线下写卡前调用第三方失败!!'})
|
|
1410
|
+
let initdata = {
|
|
1411
|
+
state: 1
|
|
1412
|
+
}
|
|
1413
|
+
let cardState = {
|
|
1414
|
+
data: JSON.stringify(initdata)
|
|
1415
|
+
}
|
|
1416
|
+
console.log('巴彦发卡售气' + row.f_alias)
|
|
1417
|
+
if (row.f_alias !== 'ShuMa') {
|
|
1418
|
+
cardState = await hasCardGen()
|
|
1419
|
+
}
|
|
1420
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
1421
|
+
// 获取
|
|
1422
|
+
let result = await Vue.resetpost('rs/logic/sale_getLastOper', {data: {f_userfiles_id: row.f_userfiles_id}}, {resolveMsg: null, rejectMsg: '获取最后一次操作失败'})
|
|
1423
|
+
console.log('获取最后一次的操作。。', result)
|
|
1424
|
+
// 先把收费记录状态改成 已写卡在进行操作
|
|
1425
|
+
// 写卡成功 更新收费记录
|
|
1426
|
+
let update = {
|
|
1427
|
+
id: row.unWriteSell[0].id,
|
|
1428
|
+
f_write_comments: !row.f_write_comments ? '' : row.f_write_comments,
|
|
1429
|
+
f_write_operator: Vue.$login.f.name,
|
|
1430
|
+
f_write_date: Vue.$login.toStandardTimeString()
|
|
1431
|
+
}
|
|
1432
|
+
await Vue.resetpost('rs/logic/offlineWrite', update, {resolveMsg: null, rejectMsg: '写卡成功,更新数据失败'})
|
|
1433
|
+
let cardid = row.f_card_id
|
|
1434
|
+
if (row.f_tag) {
|
|
1435
|
+
// 截取用户编号后四位
|
|
1436
|
+
cardid = row.f_tag + row.f_card_id
|
|
1437
|
+
}
|
|
1438
|
+
// 执行写卡操作
|
|
1439
|
+
let cardParams = await getParamGen(row.f_card_id, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1440
|
+
let param = {
|
|
1441
|
+
factory: row.f_alias,
|
|
1442
|
+
kh: cardid,
|
|
1443
|
+
cs: row.unWriteSell[0].f_times,
|
|
1444
|
+
yhh: row.cardInfo.Yhh ? row.cardInfo.Yhh : row.f_meterid,
|
|
1445
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0,
|
|
1446
|
+
meternumber: row.f_meternumber ? row.f_meternumber : 0,
|
|
1447
|
+
kmm: row.f_card_password,
|
|
1448
|
+
ljgql: (row.f_write_totalgas - 0), // 当前累计购气量
|
|
1449
|
+
ljgqje: (row.f_write_totalfee - 0), // 累计购气金额
|
|
1450
|
+
bjql: row.f_police_gas,
|
|
1451
|
+
czsx: row.f_topup_ceil,
|
|
1452
|
+
tzed: row.f_overdr_lines,
|
|
1453
|
+
bkcs: row.f_fillcard_times,
|
|
1454
|
+
dqdm: row.f_area_code,
|
|
1455
|
+
klx: row.f_coding,
|
|
1456
|
+
ql: row.unWriteSell[0].f_pregas,
|
|
1457
|
+
money: row.unWriteSell[0].f_write_money
|
|
1458
|
+
}
|
|
1459
|
+
param = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), param)
|
|
1460
|
+
let cardRes
|
|
1461
|
+
if (result.data.last_oper == null) result.data.last_oper = ''
|
|
1462
|
+
if (row.states === '补卡' || result.data.last_oper === '补卡') {
|
|
1463
|
+
param.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
|
|
1464
|
+
param.cs = row.cardInfo.Times + 1
|
|
1465
|
+
param.bkcs = param.bkcs + 1
|
|
1466
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
|
|
1467
|
+
} else if (row.states === '换表') {
|
|
1468
|
+
param.kzt = '0'
|
|
1469
|
+
param.bkcs = param.bkcs + 1
|
|
1470
|
+
param.cs = 1
|
|
1471
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
|
|
1472
|
+
} else {
|
|
1473
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', param, {resolveMsg: null, rejectMsg: '写卡失败'}, 80000)
|
|
1474
|
+
}
|
|
1475
|
+
if (!cardParams || cardRes.data.Err || cardRes.data.Exception) {
|
|
1476
|
+
let sql = `update t_sellinggas set
|
|
1477
|
+
f_write_card = '写卡失败'
|
|
1478
|
+
where id = '${row.unWriteSell[0].id}'`
|
|
1479
|
+
let data = {
|
|
1480
|
+
sql: sql
|
|
1481
|
+
}
|
|
1482
|
+
await Vue.resetpost('rs/logic/runSQL', data)
|
|
1483
|
+
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
1484
|
+
} else {
|
|
1485
|
+
if (row.f_alias === 'ShuMa') {
|
|
1486
|
+
cardState = await Vue.CommonService.updateReocrdPassword(row.unWriteSell[0], cardRes, 'sellgas')
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
} else {
|
|
1490
|
+
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
1491
|
+
}
|
|
1492
|
+
} catch (error) {
|
|
1493
|
+
// 考虑到这里报错可能是因为 写卡请求超时报的错,但是请求已经发到卡服务,可能已经写上卡,所以先不做处理
|
|
1494
|
+
// let sql = `update t_sellinggas set
|
|
1495
|
+
// f_write_card = '未写卡',
|
|
1496
|
+
// where id = '${row.unWriteSell[0].id}'`
|
|
1497
|
+
// let data = {
|
|
1498
|
+
// sql: sql
|
|
1499
|
+
// }
|
|
1500
|
+
// await this.$resetpost('rs/logic/runSQL', data)
|
|
1501
|
+
throw error
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
let DigtialSellGasGen = async function (model, row) {
|
|
1506
|
+
try {
|
|
1507
|
+
let result = await Vue.resetpost('rs/logic/sale_digtialCharge_logic', {data: model}, {resolveMsg: '收费成功', rejectMsg: '卡表收费存库失败'})
|
|
1508
|
+
return result.data.id
|
|
1509
|
+
} catch (error) {
|
|
1510
|
+
if (error.data) {
|
|
1511
|
+
throw new Error(error.data)
|
|
1512
|
+
} else {
|
|
1513
|
+
throw error
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
let noCardSellGasGen = async function (model, row) {
|
|
1518
|
+
let result = null
|
|
1519
|
+
let params = {}
|
|
1520
|
+
console.log(model, row)
|
|
1521
|
+
try {
|
|
1522
|
+
result = await Vue.resetpost('rs/logic/sale_cardCharge_logic', {data: model}, {resolveMsg: '收费成功', rejectMsg: '卡表收费存库失败'})
|
|
1523
|
+
let cardid = row.f_card_id
|
|
1524
|
+
if (row.f_alias === 'ShuMa') {
|
|
1525
|
+
// 获取气价和售气情况参数
|
|
1526
|
+
let cardParams = await getParamGen(cardid, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1527
|
+
console.log('写卡次数和获取的写卡参数...', cardParams)
|
|
1528
|
+
// 写卡
|
|
1529
|
+
params = {
|
|
1530
|
+
factory: row.f_alias, // 气表厂家
|
|
1531
|
+
kh: cardid, // 卡号
|
|
1532
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
1533
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1534
|
+
bjql: row.f_police_gas,
|
|
1535
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1536
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1537
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1538
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1539
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1540
|
+
ql: model.f_pregas, // 预购气量
|
|
1541
|
+
cs: row.f_times + 1, // 求购气次数,先开户为1
|
|
1542
|
+
money: model.f_write_money, // 购气金额
|
|
1543
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1544
|
+
klx: row.f_coding,
|
|
1545
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
|
|
1546
|
+
}
|
|
1547
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1548
|
+
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {
|
|
1549
|
+
resolveMsg: null,
|
|
1550
|
+
rejectMsg: '卡服务错误'
|
|
1551
|
+
}, 80000)
|
|
1552
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1553
|
+
// 写卡异常
|
|
1554
|
+
// 数据回滚操作
|
|
1555
|
+
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
1556
|
+
} else {
|
|
1557
|
+
// 写卡成功
|
|
1558
|
+
|
|
1559
|
+
if (row.f_alias === 'ShuMa') {
|
|
1560
|
+
// 回写收费记录
|
|
1561
|
+
await Vue.CommonService.updateReocrdPassword(result, cardRes, 'sellgas')
|
|
1562
|
+
}
|
|
1563
|
+
Vue.showAlert('售气成功', 'success', 2000)
|
|
1564
|
+
return result
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
return result.data.id
|
|
1568
|
+
} catch (error) {
|
|
1569
|
+
if (result) {
|
|
1570
|
+
// 出错进行回滚
|
|
1571
|
+
row.f_userfiles_id = row.f_userfiles_id + ''
|
|
1572
|
+
if (result) {
|
|
1573
|
+
let data = {
|
|
1574
|
+
cardparam: JSON.stringify(params),
|
|
1575
|
+
cardpost: 'WriteGasCard',
|
|
1576
|
+
id: result.data.id,
|
|
1577
|
+
userinfo: {
|
|
1578
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
1579
|
+
version: row.userinfo_version + 1,
|
|
1580
|
+
f_balance: row.f_balance,
|
|
1581
|
+
userfiles: {
|
|
1582
|
+
f_user_id: model.f_user_id,
|
|
1583
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
1584
|
+
f_total_gas: row.f_total_gas,
|
|
1585
|
+
f_write_totalgas: row.f_write_totalgas,
|
|
1586
|
+
f_write_totalfee: row.f_write_totalfee,
|
|
1587
|
+
f_total_fee: row.f_total_fee,
|
|
1588
|
+
f_card_id: row.f_card_id,
|
|
1589
|
+
f_times: row.cardInfo.Times,
|
|
1590
|
+
version: row.version + 1
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
await Vue.resetpost('rs/logic/cardChargeRollback', {data: data}, {
|
|
1595
|
+
resolveMsg: null,
|
|
1596
|
+
rejectMsg: '写卡失败,数据回滚失败,请联系技术人员处理!!'
|
|
1597
|
+
})
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
if (error.data) {
|
|
1601
|
+
throw new Error(error.data)
|
|
1602
|
+
} else {
|
|
1603
|
+
throw error
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
// 补气卡表收费
|
|
1609
|
+
let sellgasRemanentGen = async function (model, row) {
|
|
1610
|
+
let result = null
|
|
1611
|
+
try {
|
|
1612
|
+
let cardState = await hasCardGen()
|
|
1613
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
1614
|
+
// 将卡上次数写入数据库
|
|
1615
|
+
model.f_times = row.cardInfo.Times + 1
|
|
1616
|
+
// 将回写表号或者用户号
|
|
1617
|
+
model.f_meterid = row.cardInfo.Yhh ? row.cardInfo.Yhh : row.f_meterid
|
|
1618
|
+
|
|
1619
|
+
let cardid = row.f_card_id
|
|
1620
|
+
if (row.f_tag) {
|
|
1621
|
+
// 截取用户编号后四位
|
|
1622
|
+
cardid = model.f_card_id = row.f_tag + row.f_card_id
|
|
1623
|
+
}
|
|
1624
|
+
result = await Vue.resetpost('rs/logic/sellgasRemanentGas', {data: model}, {resolveMsg: null, rejectMsg: '卡表收费存库失败'})
|
|
1625
|
+
// 获取气价和售气情况参数
|
|
1626
|
+
let cardParams = await getParamGen(cardid, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1627
|
+
console.log('写卡次数和获取的写卡参数...', row.cardInfo.Times, cardParams)
|
|
1628
|
+
// 写卡
|
|
1629
|
+
let params = {
|
|
1630
|
+
factory: row.f_alias, // 气表厂家
|
|
1631
|
+
kh: cardid, // 卡号
|
|
1632
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
1633
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1634
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1635
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1636
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1637
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1638
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1639
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1640
|
+
ql: model.f_pregas, // 预购气量
|
|
1641
|
+
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1642
|
+
money: model.f_write_money, // 购气金额
|
|
1643
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
1644
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1645
|
+
klx: row.f_coding
|
|
1646
|
+
}
|
|
1647
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1648
|
+
console.log('购气最后操作。。', result)
|
|
1649
|
+
let cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'})
|
|
1650
|
+
console.log('卡表收费返回写卡参数值', cardRes)
|
|
1651
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
1652
|
+
if (!cardParams || ((model.f_pregas > model.f_remanent_gas) && !result) || cardRes.data.Err || cardRes.data.Exception) {
|
|
1653
|
+
let data = {
|
|
1654
|
+
id: result.data.id,
|
|
1655
|
+
userinfo: {
|
|
1656
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
1657
|
+
version: row.userinfo_version + 1,
|
|
1658
|
+
f_balance: row.f_balance,
|
|
1659
|
+
userfiles: {
|
|
1660
|
+
f_user_id: model.f_user_id,
|
|
1661
|
+
f_userfiles_id: model.f_userfiles_id,
|
|
1662
|
+
f_card_id: row.f_card_id,
|
|
1663
|
+
f_total_gas: row.f_total_gas,
|
|
1664
|
+
f_write_totalgas: row.f_write_totalgas,
|
|
1665
|
+
f_write_totalfee: row.f_write_totalfee,
|
|
1666
|
+
f_total_fee: row.f_total_fee,
|
|
1667
|
+
f_times: row.cardInfo.Times,
|
|
1668
|
+
version: row.version + 1
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
if (row.f_tag) {
|
|
1673
|
+
data.userinfo.userfiles.f_tag = row.f_tag
|
|
1674
|
+
}
|
|
1675
|
+
await Vue.resetpost('rs/logic/sellgasremanentRollback', {data: data}, {resolveMsg: null, rejectMsg: '卡表收费回滚出错!!'})
|
|
1676
|
+
throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
|
|
1677
|
+
} else {
|
|
1678
|
+
// 更新卡密码
|
|
1679
|
+
await Vue.CommonService.updatePassword(row, cardRes)
|
|
1680
|
+
Vue.showAlert('换表补气成功', 'success', 2000)
|
|
1681
|
+
return result
|
|
1682
|
+
}
|
|
1683
|
+
} else {
|
|
1684
|
+
throw new Error(`请检查卡是否插好!!`)
|
|
1685
|
+
}
|
|
1686
|
+
} catch (error) {
|
|
1687
|
+
if (result) {
|
|
1688
|
+
let data = {
|
|
1689
|
+
sellid: result.data.sellid,
|
|
1690
|
+
fillgasid: result.data.fillgasid,
|
|
1691
|
+
userinfo: {
|
|
1692
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
1693
|
+
version: row.userinfo_version + 1,
|
|
1694
|
+
f_balance: row.f_balance,
|
|
1695
|
+
userfiles: {
|
|
1696
|
+
f_user_id: model.f_user_id,
|
|
1697
|
+
f_total_gas: row.f_total_gas,
|
|
1698
|
+
f_write_totalgas: row.f_write_totalgas,
|
|
1699
|
+
f_write_totalfee: row.f_write_totalfee,
|
|
1700
|
+
f_total_fee: row.f_total_fee,
|
|
1701
|
+
f_card_id: row.f_card_id,
|
|
1702
|
+
f_times: row.cardInfo.Times,
|
|
1703
|
+
version: row.version + 1
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
if (row.f_tag) {
|
|
1708
|
+
data.userinfo.userfiles.f_tag = row.f_tag
|
|
1709
|
+
}
|
|
1710
|
+
await Vue.resetpost('rs/logic/sellgasremanentRollback', {data: data}, {resolveMsg: '卡表收费失败', rejectMsg: '卡表收费失败'})
|
|
1711
|
+
}
|
|
1712
|
+
throw error
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
// 余量补差
|
|
1716
|
+
let marginGen = async function (model, row) {
|
|
1717
|
+
let result = null
|
|
1718
|
+
let cardparam
|
|
1719
|
+
let cardpost
|
|
1720
|
+
try {
|
|
1721
|
+
let cardState = await hasCardGen()
|
|
1722
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
1723
|
+
// 将卡上次数写入数据库
|
|
1724
|
+
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
1725
|
+
model.f_times = row.f_times + 1
|
|
1726
|
+
} else {
|
|
1727
|
+
model.f_times = row.cardInfo.Times + 1
|
|
1728
|
+
}
|
|
1729
|
+
// 将回写表号或者用户号
|
|
1730
|
+
model.f_meterid = row.cardInfo.Yhh ? row.cardInfo.Yhh : row.f_meterid
|
|
1731
|
+
|
|
1732
|
+
let cardid = row.f_card_id
|
|
1733
|
+
if (row.f_tag) {
|
|
1734
|
+
// 截取用户编号后四位
|
|
1735
|
+
cardid = model.f_card_id = row.f_tag + row.f_card_id
|
|
1736
|
+
}
|
|
1737
|
+
// 存库
|
|
1738
|
+
result = await Vue.resetpost('rs/logic/marginCharge', {data: model}, {resolveMsg: null, rejectMsg: '卡表收费存库失败'})
|
|
1739
|
+
// 获取气价和售气情况参数
|
|
1740
|
+
let cardParams = await getParamGen(cardid, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1741
|
+
console.log('写卡次数和获取的写卡参数...', row.cardInfo.Times, cardParams)
|
|
1742
|
+
// 写卡
|
|
1743
|
+
let params = {
|
|
1744
|
+
factory: row.f_alias, // 气表厂家
|
|
1745
|
+
kh: cardid, // 卡号
|
|
1746
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
1747
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1748
|
+
bjql: row.f_police_gas,
|
|
1749
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1750
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1751
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1752
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1753
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1754
|
+
ql: model.f_pregas, // 预购气量
|
|
1755
|
+
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1756
|
+
money: model.f_write_money, // 购气金额
|
|
1757
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1758
|
+
klx: row.f_coding,
|
|
1759
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
|
|
1760
|
+
}
|
|
1761
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1762
|
+
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1763
|
+
// params.klx = yield co(getmodelbrandGen(row))
|
|
1764
|
+
// params.klx = params.klx.data[0].f_coding
|
|
1765
|
+
// }
|
|
1766
|
+
|
|
1767
|
+
let params2 = {
|
|
1768
|
+
factory: row.f_alias,
|
|
1769
|
+
kh: cardid, // 卡号
|
|
1770
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1771
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1772
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1773
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1774
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1775
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1776
|
+
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1777
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1778
|
+
ql: model.f_pregas, // 预购气量
|
|
1779
|
+
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1780
|
+
sxrq: model.f_startdate, // 生效日期,价格管理中取
|
|
1781
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
1782
|
+
// meternumber: row.f_meternumber ? row.f_meternumber : 0, // 海力金额表号
|
|
1783
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1784
|
+
money: model.f_write_money, // 购气金额
|
|
1785
|
+
klx: row.f_coding
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
params2 = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params2)
|
|
1789
|
+
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1790
|
+
// params2.klx = yield co(getmodelbrandGen(row))
|
|
1791
|
+
// params2.klx = params2.klx.data[0].f_coding
|
|
1792
|
+
// }
|
|
1793
|
+
|
|
1794
|
+
let params3 = {
|
|
1795
|
+
factory: row.f_alias,
|
|
1796
|
+
kh: cardid, // 卡号
|
|
1797
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1798
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1799
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1800
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1801
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1802
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1803
|
+
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1804
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1805
|
+
ql: model.f_pregas, // 预购气量
|
|
1806
|
+
cs: 1, // 求购气次数,先开户为1
|
|
1807
|
+
sxrq: model.f_startdate, // 生效日期,价格管理中取
|
|
1808
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
1809
|
+
// meternumber: row.f_meternumber ? row.f_meternumber : 0, // 海力金额表号
|
|
1810
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1811
|
+
money: model.f_write_money, // 购气金额
|
|
1812
|
+
klx: row.f_coding
|
|
1813
|
+
}
|
|
1814
|
+
params3 = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params3)
|
|
1815
|
+
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1816
|
+
// params3.klx = yield co(getmodelbrandGen(row))
|
|
1817
|
+
// params3.klx = params3.klx.data[0].f_coding
|
|
1818
|
+
// }
|
|
1819
|
+
console.log('购气最后操作。。', result)
|
|
1820
|
+
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
1821
|
+
params.cs = row.f_times + 1
|
|
1822
|
+
params2.cs = row.f_times + 1
|
|
1823
|
+
}
|
|
1824
|
+
let cardRes
|
|
1825
|
+
if (result.data.last_oper === '补卡') {
|
|
1826
|
+
// 此次验证开户之后未过表补卡验证问题
|
|
1827
|
+
params2.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
|
|
1828
|
+
cardparam = JSON.stringify(params2)
|
|
1829
|
+
cardpost = 'WriteNewCard'
|
|
1830
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params2, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
1831
|
+
} else if (result.data.last_oper === '换表') {
|
|
1832
|
+
console.log('我走的是写新卡换表')
|
|
1833
|
+
cardparam = JSON.stringify(params3)
|
|
1834
|
+
cardpost = 'WriteNewCard'
|
|
1835
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params3, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
1836
|
+
} else if (result.data.last_oper === '换表补气') {
|
|
1837
|
+
// 累购金额需要将上次购气金额加上
|
|
1838
|
+
console.log('我走的是正常的收费', params)
|
|
1839
|
+
cardparam = JSON.stringify(params)
|
|
1840
|
+
cardpost = 'WriteGasCard'
|
|
1841
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
1842
|
+
} else {
|
|
1843
|
+
console.log('我走的是正常的收费', params)
|
|
1844
|
+
cardparam = JSON.stringify(params)
|
|
1845
|
+
cardpost = 'WriteGasCard'
|
|
1846
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
1847
|
+
}
|
|
1848
|
+
console.log('卡表收费返回写卡参数值', cardRes)
|
|
1849
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
1850
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
1851
|
+
if (result) {
|
|
1852
|
+
let data = {
|
|
1853
|
+
cardparam: cardparam,
|
|
1854
|
+
cardpost: cardpost,
|
|
1855
|
+
id: result.data.id,
|
|
1856
|
+
userinfo: {
|
|
1857
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
1858
|
+
version: row.userinfo_version + 1,
|
|
1859
|
+
f_balance: row.f_balance,
|
|
1860
|
+
userfiles: {
|
|
1861
|
+
f_user_id: model.f_user_id,
|
|
1862
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
1863
|
+
f_total_gas: row.f_total_gas,
|
|
1864
|
+
f_write_totalgas: row.f_write_totalgas,
|
|
1865
|
+
f_write_totalfee: row.f_write_totalfee,
|
|
1866
|
+
f_total_fee: row.f_total_fee,
|
|
1867
|
+
f_card_id: row.f_card_id,
|
|
1868
|
+
f_times: row.cardInfo.Times,
|
|
1869
|
+
version: row.version + 1
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
if (row.f_tag) {
|
|
1874
|
+
data.userinfo.userfiles.f_tag = row.f_tag
|
|
1875
|
+
}
|
|
1876
|
+
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
1877
|
+
data.userinfo.userfiles.f_times = row.f_times
|
|
1878
|
+
}
|
|
1879
|
+
await Vue.resetpost('rs/logic/cardChargeRollback', {data: data}, {resolveMsg: '卡表收费失败', rejectMsg: '卡表收费失败'})
|
|
1880
|
+
}
|
|
1881
|
+
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
1882
|
+
} else {
|
|
1883
|
+
// 调用读卡进行校验
|
|
1884
|
+
let readCardInfo = await Vue.resetpost('http://127.0.0.1:8003/ReadCard', {kmm: row.f_card_password}, {resolveMsg: null, rejectMsg: '读卡失败!!'})
|
|
1885
|
+
if (readCardInfo.data && Vue.$login.r.includes('读卡2')) {
|
|
1886
|
+
console.log('读卡验证', readCardInfo.data, row)
|
|
1887
|
+
if (row.f_collection_type === '按金额') {
|
|
1888
|
+
if (readCardInfo.data.Money !== model.f_preamount || readCardInfo.data.Factory !== row.f_alias || readCardInfo.data.CardID !== row.f_card_id) {
|
|
1889
|
+
Vue.showAlert('读卡参数和缴费参数不一致,请核实!!', 'warning', 2000)
|
|
1890
|
+
return result.data.id
|
|
1891
|
+
}
|
|
1892
|
+
} else {
|
|
1893
|
+
if (readCardInfo.data.Gas !== Number((model.f_pregas - 0).toFixed(2)) || readCardInfo.data.Factory !== row.f_alias || readCardInfo.data.CardID !== row.f_card_id) {
|
|
1894
|
+
Vue.showAlert('读卡参数和缴费参数不一致,请核实!!', 'warning', 2000)
|
|
1895
|
+
return result.data.id
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
// 更新卡密码
|
|
1900
|
+
await Vue.CommonService.updatePassword(row, cardRes)
|
|
1901
|
+
Vue.showAlert('售气成功', 'success', 2000)
|
|
1902
|
+
return result.data.id
|
|
1903
|
+
}
|
|
1904
|
+
} else {
|
|
1905
|
+
throw new Error(`请检查卡是否插好!!`)
|
|
1906
|
+
}
|
|
1907
|
+
} catch (error) {
|
|
1908
|
+
throw error
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
// 卡表收费
|
|
1912
|
+
let sellgasGen = async function (model, row) {
|
|
1913
|
+
let result = null
|
|
1914
|
+
let cardparam
|
|
1915
|
+
let cardpost
|
|
1916
|
+
try {
|
|
1917
|
+
let cardState = await hasCardGen()
|
|
1918
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
1919
|
+
// 将卡上次数写入数据库
|
|
1920
|
+
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
1921
|
+
model.f_times = row.f_times + 1
|
|
1922
|
+
} else {
|
|
1923
|
+
model.f_times = row.cardInfo.Times + 1
|
|
1924
|
+
}
|
|
1925
|
+
// 将回写表号或者用户号
|
|
1926
|
+
model.f_meterid = row.cardInfo.Yhh ? row.cardInfo.Yhh : row.f_meterid
|
|
1927
|
+
|
|
1928
|
+
let cardid = row.f_card_id
|
|
1929
|
+
if (row.f_tag) {
|
|
1930
|
+
// 截取用户编号后四位
|
|
1931
|
+
cardid = model.f_card_id = row.f_tag + row.f_card_id
|
|
1932
|
+
}
|
|
1933
|
+
// 存库
|
|
1934
|
+
result = await Vue.resetpost('rs/logic/sale_cardCharge_logic', {data: model}, {resolveMsg: null, rejectMsg: '卡表收费存库失败'})
|
|
1935
|
+
// 获取气价和售气情况参数
|
|
1936
|
+
let cardParams = await getParamGen(cardid, row.f_alias, row.f_user_id, row.f_userfiles_id)
|
|
1937
|
+
console.log('写卡次数和获取的写卡参数...', row.cardInfo.Times, cardParams)
|
|
1938
|
+
// 写卡
|
|
1939
|
+
let params = {
|
|
1940
|
+
factory: row.f_alias, // 气表厂家
|
|
1941
|
+
kh: cardid, // 卡号
|
|
1942
|
+
yhh: row.f_meterid ? row.f_meterid : 0, // 用户号,档案中自己输
|
|
1943
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1944
|
+
bjql: row.f_police_gas,
|
|
1945
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1946
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1947
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1948
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1949
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1950
|
+
ql: model.f_pregas, // 预购气量
|
|
1951
|
+
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1952
|
+
money: model.f_write_money, // 购气金额
|
|
1953
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1954
|
+
klx: row.f_coding,
|
|
1955
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
|
|
1956
|
+
}
|
|
1957
|
+
params = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params)
|
|
1958
|
+
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1959
|
+
// params.klx = yield co(getmodelbrandGen(row))
|
|
1960
|
+
// params.klx = params.klx.data[0].f_coding
|
|
1961
|
+
// }
|
|
1962
|
+
|
|
1963
|
+
let params2 = {
|
|
1964
|
+
factory: row.f_alias,
|
|
1965
|
+
kh: cardid, // 卡号
|
|
1966
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1967
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1968
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1969
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1970
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1971
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1972
|
+
kzt: '1', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
1973
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
1974
|
+
ql: model.f_pregas, // 预购气量
|
|
1975
|
+
cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
|
|
1976
|
+
sxrq: model.f_startdate, // 生效日期,价格管理中取
|
|
1977
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
1978
|
+
// meternumber: row.f_meternumber ? row.f_meternumber : 0, // 海力金额表号
|
|
1979
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
1980
|
+
money: model.f_write_money, // 购气金额
|
|
1981
|
+
klx: row.f_coding
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
params2 = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params2)
|
|
1985
|
+
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
1986
|
+
// params2.klx = yield co(getmodelbrandGen(row))
|
|
1987
|
+
// params2.klx = params2.klx.data[0].f_coding
|
|
1988
|
+
// }
|
|
1989
|
+
|
|
1990
|
+
let params3 = {
|
|
1991
|
+
factory: row.f_alias,
|
|
1992
|
+
kh: cardid, // 卡号
|
|
1993
|
+
kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
|
|
1994
|
+
bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
|
|
1995
|
+
czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
|
|
1996
|
+
tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
|
|
1997
|
+
ljgql: (row.f_write_totalgas - 0) + (model.f_pregas - 0), // 当前累计购气量
|
|
1998
|
+
ljgqje: (row.f_write_totalfee - 0) + (model.f_write_money - 0), // 累计购气金额
|
|
1999
|
+
kzt: '0', // 卡状态,0开户卡,1用户卡(0新开户,1补卡)
|
|
2000
|
+
bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
|
|
2001
|
+
ql: model.f_pregas, // 预购气量
|
|
2002
|
+
cs: 1, // 求购气次数,先开户为1
|
|
2003
|
+
sxrq: model.f_startdate, // 生效日期,价格管理中取
|
|
2004
|
+
meterid: row.f_meternumber ? row.f_meternumber : 0, // 表号
|
|
2005
|
+
// meternumber: row.f_meternumber ? row.f_meternumber : 0, // 海力金额表号
|
|
2006
|
+
dqdm: row.f_area_code, // 精益工业地区代码
|
|
2007
|
+
money: model.f_write_money, // 购气金额
|
|
2008
|
+
klx: row.f_coding
|
|
2009
|
+
}
|
|
2010
|
+
params3 = Object.assign({}, Vue.CommonService.writeCardParams(cardParams), params3)
|
|
2011
|
+
// if (row.f_alias === 'HaiLiJE' || row.f_alias === 'HaiLiQL' || row.f_alias === 'CangNanTY') {
|
|
2012
|
+
// params3.klx = yield co(getmodelbrandGen(row))
|
|
2013
|
+
// params3.klx = params3.klx.data[0].f_coding
|
|
2014
|
+
// }
|
|
2015
|
+
console.log('购气最后操作。。', result)
|
|
2016
|
+
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
2017
|
+
params.cs = row.f_times + 1
|
|
2018
|
+
params2.cs = row.f_times + 1
|
|
2019
|
+
}
|
|
2020
|
+
let cardRes
|
|
2021
|
+
if (result.data.last_oper === '补卡') {
|
|
2022
|
+
// 此次验证开户之后未过表补卡验证问题
|
|
2023
|
+
params2.kzt = result.data.ispick === '未过表' && result.data.lastsell_oper === '发卡售气' ? '0' : '1'
|
|
2024
|
+
cardparam = JSON.stringify(params2)
|
|
2025
|
+
cardpost = 'WriteNewCard'
|
|
2026
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params2, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
2027
|
+
} else if (result.data.last_oper === '换表') {
|
|
2028
|
+
console.log('我走的是写新卡换表')
|
|
2029
|
+
cardparam = JSON.stringify(params3)
|
|
2030
|
+
cardpost = 'WriteNewCard'
|
|
2031
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params3, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
2032
|
+
} else if (result.data.last_oper === '换表补气') {
|
|
2033
|
+
// 累购金额需要将上次购气金额加上
|
|
2034
|
+
console.log('我走的是正常的收费', params)
|
|
2035
|
+
cardparam = JSON.stringify(params)
|
|
2036
|
+
cardpost = 'WriteGasCard'
|
|
2037
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
2038
|
+
} else {
|
|
2039
|
+
console.log('我走的是正常的收费', params)
|
|
2040
|
+
cardparam = JSON.stringify(params)
|
|
2041
|
+
cardpost = 'WriteGasCard'
|
|
2042
|
+
cardRes = await Vue.resetpost('http://127.0.0.1:8003/WriteGasCard', params, {resolveMsg: null, rejectMsg: '卡表收费失败'}, 80000)
|
|
2043
|
+
}
|
|
2044
|
+
console.log('卡表收费返回写卡参数值', cardRes)
|
|
2045
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
2046
|
+
if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
|
|
2047
|
+
if (result) {
|
|
2048
|
+
let data = {
|
|
2049
|
+
cardparam: cardparam,
|
|
2050
|
+
cardpost: cardpost,
|
|
2051
|
+
id: result.data.id,
|
|
2052
|
+
userinfo: {
|
|
2053
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
2054
|
+
version: row.userinfo_version + 1,
|
|
2055
|
+
f_balance: row.f_balance,
|
|
2056
|
+
userfiles: {
|
|
2057
|
+
f_user_id: model.f_user_id,
|
|
2058
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
2059
|
+
f_total_gas: row.f_total_gas,
|
|
2060
|
+
f_write_totalgas: row.f_write_totalgas,
|
|
2061
|
+
f_write_totalfee: row.f_write_totalfee,
|
|
2062
|
+
f_total_fee: row.f_total_fee,
|
|
2063
|
+
f_card_id: row.f_card_id,
|
|
2064
|
+
f_times: row.cardInfo.Times,
|
|
2065
|
+
version: row.version + 1
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
if (row.f_tag) {
|
|
2070
|
+
data.userinfo.userfiles.f_tag = row.f_tag
|
|
2071
|
+
}
|
|
2072
|
+
if (!(row.f_hascard == null) && !(row.f_share_times == null) && row.f_meter_type === '物联网表' && row.f_hascard === '是' && row.f_share_times === '是') {
|
|
2073
|
+
data.userinfo.userfiles.f_times = row.f_times
|
|
2074
|
+
}
|
|
2075
|
+
await Vue.resetpost('rs/logic/cardChargeRollback', {data: data}, {resolveMsg: '卡表收费失败', rejectMsg: '卡表收费失败'})
|
|
2076
|
+
}
|
|
2077
|
+
throw `卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`
|
|
2078
|
+
} else {
|
|
2079
|
+
// 调用读卡进行校验
|
|
2080
|
+
let readCardInfo = await Vue.resetpost('http://127.0.0.1:8003/ReadCard', {kmm: row.f_card_password}, {resolveMsg: null, rejectMsg: '读卡失败!!'})
|
|
2081
|
+
if (readCardInfo.data && Vue.$login.r.includes('读卡2')) {
|
|
2082
|
+
console.log('读卡验证', readCardInfo.data, row)
|
|
2083
|
+
if (row.f_collection_type === '按金额') {
|
|
2084
|
+
if (readCardInfo.data.Money !== model.f_preamount || readCardInfo.data.Factory !== row.f_alias || readCardInfo.data.CardID !== row.f_card_id) {
|
|
2085
|
+
Vue.showAlert('读卡参数和缴费参数不一致,请核实!!', 'warning', 2000)
|
|
2086
|
+
return result.data.id
|
|
2087
|
+
}
|
|
2088
|
+
} else {
|
|
2089
|
+
if (readCardInfo.data.Gas !== Number((model.f_pregas - 0).toFixed(2)) || readCardInfo.data.Factory !== row.f_alias || readCardInfo.data.CardID !== row.f_card_id) {
|
|
2090
|
+
Vue.showAlert('读卡参数和缴费参数不一致,请核实!!', 'warning', 2000)
|
|
2091
|
+
return result.data.id
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
// 更新卡密码
|
|
2096
|
+
await Vue.CommonService.updatePassword(row, cardRes)
|
|
2097
|
+
Vue.showAlert('售气成功', 'success', 2000)
|
|
2098
|
+
return result.data.id
|
|
2099
|
+
}
|
|
2100
|
+
} else {
|
|
2101
|
+
throw new Error(`请检查卡是否插好!!`)
|
|
2102
|
+
}
|
|
2103
|
+
} catch (error) {
|
|
2104
|
+
throw error
|
|
2105
|
+
}
|
|
2106
|
+
}
|
|
2107
|
+
let reissueCardGenJB = function * (model, row) {
|
|
2108
|
+
if (model.f_cardfees === '') {
|
|
2109
|
+
model.f_cardfees = 0
|
|
2110
|
+
}
|
|
2111
|
+
let data = {
|
|
2112
|
+
f_user_id: row.f_user_id,
|
|
2113
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
2114
|
+
f_user_type: row.f_user_type,
|
|
2115
|
+
f_gasproperties: row.f_gasproperties,
|
|
2116
|
+
f_address: row.f_address,
|
|
2117
|
+
f_meter_brand: row.f_meter_brand,
|
|
2118
|
+
f_type: model.f_type,
|
|
2119
|
+
f_card_id: model.f_card_id,
|
|
2120
|
+
f_ispick_table: model.f_ispick_table,
|
|
2121
|
+
f_cardfees: model.f_cardfees,
|
|
2122
|
+
f_payment: model.f_payment[0],
|
|
2123
|
+
f_bill_style: model.f_print[0],
|
|
2124
|
+
f_comments: model.f_comments,
|
|
2125
|
+
record_userinfo: row.f_userinfo_id,
|
|
2126
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
2127
|
+
f_user_name: row.f_user_name,
|
|
2128
|
+
f_operat_type: '补卡',
|
|
2129
|
+
f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行${row.f_type}操作`,
|
|
2130
|
+
f_state: '有效',
|
|
2131
|
+
f_operator: Vue.$login.f.name,
|
|
2132
|
+
f_operatorid: Vue.$login.f.id,
|
|
2133
|
+
f_orgid: Vue.$login.f.orgid,
|
|
2134
|
+
f_orgname: Vue.$login.f.orgs,
|
|
2135
|
+
f_depid: Vue.$login.f.depids,
|
|
2136
|
+
f_depname: Vue.$login.f.deps,
|
|
2137
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
2138
|
+
f_zones: Vue.$login.f.zones,
|
|
2139
|
+
f_business_tracking_number: model.f_business_tracking_number
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
return Vue.resetpost('rs/logic/sale_fillCard', data, {resolveMsg: null, rejectMsg: '补卡存库失败'})
|
|
2143
|
+
}
|
|
2144
|
+
let reissueCardGen = function * (model, row) {
|
|
2145
|
+
if (model.f_cardfees === '') {
|
|
2146
|
+
model.f_cardfees = 0
|
|
2147
|
+
}
|
|
2148
|
+
if (!model.f_fill_type) {
|
|
2149
|
+
model.f_fill_type = ['']
|
|
2150
|
+
}
|
|
2151
|
+
let data = {
|
|
2152
|
+
f_serial_id: model.f_serial_id,
|
|
2153
|
+
f_user_id: row.f_user_id,
|
|
2154
|
+
f_userfiles_id: row.f_userfiles_id,
|
|
2155
|
+
f_user_type: row.f_user_type,
|
|
2156
|
+
f_gasproperties: row.f_gasproperties,
|
|
2157
|
+
f_address: row.f_address,
|
|
2158
|
+
f_meter_brand: row.f_meter_brand,
|
|
2159
|
+
f_type: model.f_type,
|
|
2160
|
+
f_card_id: model.f_card_id,
|
|
2161
|
+
f_ispick_table: model.f_ispick_table,
|
|
2162
|
+
f_cardfees: model.f_cardfees,
|
|
2163
|
+
f_payment: model.f_payment[0],
|
|
2164
|
+
f_bill_style: model.f_print[0],
|
|
2165
|
+
f_fill_type: model.f_fill_type[0],
|
|
2166
|
+
f_comments: model.f_comments,
|
|
2167
|
+
record_userinfo: row.f_userinfo_id,
|
|
2168
|
+
f_userinfo_id: row.f_userinfo_id,
|
|
2169
|
+
f_user_name: row.f_user_name,
|
|
2170
|
+
f_operat_type: '补卡',
|
|
2171
|
+
f_describe: `${Vue.$login.f.name}对客户${row.f_user_name}进行补卡操作`,
|
|
2172
|
+
f_state: '有效',
|
|
2173
|
+
f_operator: Vue.$login.f.name,
|
|
2174
|
+
f_operatorid: Vue.$login.f.id,
|
|
2175
|
+
f_orgid: Vue.$login.f.orgid,
|
|
2176
|
+
f_orgname: Vue.$login.f.orgs,
|
|
2177
|
+
f_depid: Vue.$login.f.depids,
|
|
2178
|
+
f_depname: Vue.$login.f.deps,
|
|
2179
|
+
f_zoneid: Vue.$login.f.zoneid,
|
|
2180
|
+
f_zones: Vue.$login.f.zones,
|
|
2181
|
+
f_business_tracking_number: model.f_business_tracking_number
|
|
2182
|
+
}
|
|
2183
|
+
|
|
2184
|
+
return Vue.resetpost('rs/logic/sale_fillCard', data, {resolveMsg: null, rejectMsg: '补卡存库失败'})
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
let getParamGen = async function (cardid, alias, f_user_id, f_userfiles_id) {
|
|
2188
|
+
let data = {
|
|
2189
|
+
f_card_id: cardid + '',
|
|
2190
|
+
f_alias: alias,
|
|
2191
|
+
f_user_id: f_user_id,
|
|
2192
|
+
f_userfiles_id: f_userfiles_id
|
|
2193
|
+
}
|
|
2194
|
+
return Vue.resetpost('rs/logic/stairCard', {data: data}, {resolveMsg: null, rejectMsg: '获取写卡参数失败'})
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
let getCardNumberGen = async function (brand_id) {
|
|
2198
|
+
return Vue.resetpost('rs/logic/getCardNumber', {data: {id: brand_id}}, {resolveMsg: null, rejectMsg: '发卡售气获取卡号失败!!'})
|
|
2199
|
+
}
|
|
2200
|
+
|
|
2201
|
+
// 指令写卡
|
|
2202
|
+
// 目前支持 承德海力物联网表
|
|
2203
|
+
let instructWriteCardGen = function * (row) {
|
|
2204
|
+
try {
|
|
2205
|
+
// 判断是否有卡
|
|
2206
|
+
let cardState = yield co(hasCardGen())
|
|
2207
|
+
if (JSON.parse(cardState.data).state === 1) {
|
|
2208
|
+
// 写卡
|
|
2209
|
+
let params = {
|
|
2210
|
+
kh: row.f_meternumber,
|
|
2211
|
+
meterid: row.f_meternumber,
|
|
2212
|
+
factory: row.f_alias
|
|
2213
|
+
}
|
|
2214
|
+
let cardRes = yield co(Vue.resetpost('http://127.0.0.1:8003/WriteNewCard', params, {
|
|
2215
|
+
resolveMsg: null,
|
|
2216
|
+
rejectMsg: '补卡卡服务错误'
|
|
2217
|
+
}))
|
|
2218
|
+
// 卡服务写卡异常,业务逻辑回滚
|
|
2219
|
+
if (cardRes.data.Err || cardRes.data.Exception) {
|
|
2220
|
+
Vue.$showAlert('指令写卡失败!!', 'danger', 0)
|
|
2221
|
+
} else {
|
|
2222
|
+
return cardRes
|
|
2223
|
+
}
|
|
2224
|
+
} else {
|
|
2225
|
+
Vue.showAlert('请检查卡是否插好!!', 'danger', 3000)
|
|
2226
|
+
return 0
|
|
2227
|
+
}
|
|
2228
|
+
} catch (error) {
|
|
2229
|
+
let msg = ''
|
|
2230
|
+
if (error.status === 612) {
|
|
2231
|
+
msg = '请检查读卡器时候连接,或者卡服务是否启动!!'
|
|
2232
|
+
}
|
|
2233
|
+
Vue.showAlert(msg, 'danger', 0)
|
|
2234
|
+
return 0
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
export default CardService
|