purchaseOrder.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. var businessType = require('../../../../public/business-type.js')
  2. var key = require('../../../../constant/key.js')
  3. class PurchaseOrder {
  4. constructor() {
  5. this.city = ''
  6. this.cityName = ''
  7. this.accountType = 1//户籍信息
  8. this.customerData = {
  9. 'user_name': '',
  10. 'id_card': '',
  11. 'nation': '',
  12. 'gender': '',
  13. 'phone': '',
  14. 'sbuId': ''
  15. }//参保人(购买人)信息
  16. this.imageDict = {
  17. 'first': '',
  18. 'second': ''
  19. }//身份证照图片
  20. this.beginTime = ''//开始时间
  21. this.timeInterval = 1//时间间隔
  22. this.endTime = ''//结束时间
  23. this.isNewCustomer = true
  24. this.purchaseType = businessType.PurchaseType.socialInsurance//业务逻辑
  25. this.pack = false//是否打包购买
  26. this.SSCard = 0//是否购买社保卡
  27. this.socialInsurance = 0//社保金额
  28. this.accumulationFund = ''//公积金金额
  29. this.wageBase = 0//工资基数
  30. this.id = 0//社保数据id
  31. this.payFor = ''//支付业务类型
  32. this.isSupplementaryPay = false//是否补缴
  33. this.isFirstBuyShebao = false//是否本城市首次买社保
  34. this.isFirstBuyFund = false//是否本城市首次买公积金
  35. this.purchaseFundWay = businessType.PurchaseFundWay.sum//公积金缴费方式
  36. this.isNeedSalary = false//是否需要流水
  37. this.salary = 0;//流水
  38. this.isInOffice = false;//是否在职
  39. }
  40. copy() {
  41. var newOrder = new PurchaseOrder()
  42. for (var key in this) {
  43. newOrder[key] = this[key]
  44. }
  45. return newOrder
  46. }
  47. setCity() {
  48. var l
  49. try {
  50. if (this.isSupplementaryPay) {
  51. l = wx.getStorageSync(key.StorageKey.lastCity_s)
  52. } else {
  53. l = wx.getStorageSync(key.StorageKey.lastCity_n)
  54. }
  55. } catch (e) {
  56. }
  57. if (l) {
  58. this.city = l.id
  59. this.cityName = l.name
  60. } else {
  61. this.city = '1001'
  62. this.cityName = '广州'
  63. }
  64. }
  65. }
  66. export default PurchaseOrder