index.js 971 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. data: {
  4. types: [{
  5. value: '经销商订单',
  6. name: '经销商订单',
  7. }, {
  8. value: '医院订单',
  9. name: '医院订单',
  10. }],
  11. actionShow: false,
  12. },
  13. lifetimes: {
  14. attached: function () {
  15. getApp().globalData.Language.getLanguagePackage(this)
  16. }
  17. },
  18. methods: {
  19. /* 挑选新增订单类型 */
  20. onSelect() {
  21. this.setData({
  22. actionShow: true
  23. })
  24. },
  25. /* 选择订单类型 */
  26. selectType({
  27. detail
  28. }) {
  29. wx.navigateTo({
  30. url: '/prsx/orderForm/add/add?type=' + detail.value,
  31. })
  32. this.onCancel();
  33. },
  34. /* 取消选择订单类型 */
  35. onCancel() {
  36. this.setData({
  37. actionShow: false
  38. })
  39. },
  40. }
  41. })