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