add.js 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*******************************************************************************
  2. * Copyright(c) 2022 dongke All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:
  5. * 2.功能描述:开具发票
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 王英杰 2022-11-22 1.00 新建
  9. *******************************************************************************/
  10. const mixins = require('@/mixins/index.js')
  11. const util = require('@/utils/util.js')
  12. const Constants = require('@/utils/Constants.js');
  13. const api = require('@/utils/api.js');
  14. const config = require('@/config/config.js');
  15. const app = getApp()
  16. Page({
  17. mixins: [mixins],
  18. /**
  19. * 页面的初始数据
  20. */
  21. data: {
  22. cardList: ['main', 'other'],
  23. contentObj: {
  24. main: [{ //抬头类型
  25. code: 'headType',
  26. type: 'str',
  27. readonly: true,
  28. title: mixins.$t('headUpType')
  29. },
  30. { //购方名称
  31. code: 'buyerId',
  32. name: 'buyerName',
  33. title: mixins.$t("buyerName"),
  34. type: 'choose',
  35. urlKey: 'accountCategory',
  36. required: true,
  37. },
  38. { //购方税号
  39. code: 'BuyerTaxNumber',
  40. type: 'str',
  41. required: true,
  42. title: mixins.$t('BuyerTaxNumber')
  43. },
  44. { //发票类型
  45. code: 'invoiceTypeId',
  46. name: 'invoiceTypeName',
  47. title: mixins.$t("invoiceType"),
  48. type: 'choose',
  49. urlKey: 'accountCategory',
  50. required: true,
  51. },
  52. { //接收邮箱
  53. code: 'receivingEmail',
  54. type: 'str',
  55. required: true,
  56. title: mixins.$t('receivingEmail')
  57. },
  58. { //备注
  59. code: 'remarks',
  60. type: 'str',
  61. title: mixins.$t('remarks')
  62. },
  63. ],
  64. other: [ //备注
  65. {
  66. code: 'invoiceContent',
  67. type: 'textarea',
  68. title: mixins.$t('invoiceContent')
  69. },
  70. {
  71. code: 'invoicingParty',
  72. type: 'textarea',
  73. title: mixins.$t('invoicingParty')
  74. },
  75. {
  76. code: 'totalInvoiceAmount',
  77. type: 'textarea',
  78. title: mixins.$t('totalInvoiceAmount')
  79. }
  80. ],
  81. },
  82. buttonSaveList: [{
  83. code: 'preview',
  84. title: '预览',
  85. width: '120rpx',
  86. }, {
  87. code: 'submit',
  88. title: '提交',
  89. width: '120rpx',
  90. }],
  91. // 路由
  92. routeObjName: 'moneyAccount',
  93. },
  94. /**
  95. * @desc : 页面加载数据方法
  96. * @date : 2024/2/1 15:49
  97. * @author : 王英杰
  98. */
  99. loadInit() {
  100. let formData = this.data.formData ? JSON.parse(this.data.formData) : {}
  101. formData.headType = "企业单位"
  102. this.setData({
  103. formData: JSON.stringify(formData)
  104. })
  105. },
  106. })