update_company.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // 更新企业信息
  2. import { ToastShow } from "../components/toast/toast";
  3. import { RetrieveData } from "../data/storage";
  4. import { RequestNetwork } from "../data/encryption";
  5. export const UpdateCompany = async() => {
  6. let company = JSON.parse(await RetrieveData('company'));
  7. const account = await RetrieveData('account');
  8. let token = await RetrieveData('token');
  9. if (token) {
  10. const url = '/sys/entInfo/updateBriefInfo';
  11. let response = await RequestNetwork(
  12. url,
  13. token,
  14. {
  15. entTaxId: company.entTaxId,
  16. entName: '',
  17. entType: '',
  18. entShortName: '',
  19. provinceCity: '',
  20. entAddress: '',
  21. availableTaxes: '',
  22. entContactPerson: '',
  23. entPhone: '',
  24. bankName: '',
  25. bankAccountNumber: '',
  26. payees: '',
  27. reviewers: '',
  28. drawers: '',
  29. defaultTaxCode: '',
  30. defaultItemName: '',
  31. defaultInvoiceDevice: '',
  32. doConfirm: '',
  33. mobile: account,
  34. reqChannel: 3,
  35. },
  36. false,
  37. 1,
  38. );
  39. if (response) {
  40. if (response.code === 0) {
  41. this.props.navigation.navigate('buyer_qrcode', {
  42. recordId: response.data.recordId,
  43. });
  44. }
  45. } else {
  46. ToastShow(3, response.msg);
  47. }
  48. }
  49. }