useDepot.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. import {computed} from 'vue'
  2. import {GlobalStore} from '@/stores/index'
  3. const globalStore = GlobalStore()
  4. interface ItemType {
  5. T_name: string
  6. Id: number
  7. }
  8. export interface SaleFormType {
  9. T_type: number
  10. T_uuid: string
  11. T_receive: string
  12. T_number: string
  13. T_depot_id: any
  14. T_product: any
  15. T_date: string
  16. T_remark: string
  17. T_contract_number: string
  18. T_delivery_type: string
  19. T_signer_unit: string
  20. T_signer: string
  21. T_signer_phone: string
  22. T_signer_date: string
  23. T_courier_number: string
  24. }
  25. export interface ReceiveFormType {
  26. T_type: number
  27. T_uuid: string
  28. T_receive: string
  29. T_project: string
  30. T_number: string
  31. T_depot_id: any
  32. T_product: any
  33. T_date: string
  34. T_remark: string
  35. T_contract_number: string
  36. }
  37. export interface ReceiveApplyFormType {
  38. T_project: string
  39. T_number: string
  40. T_depot_id: any
  41. T_date: string
  42. T_product: any
  43. T_remark: string
  44. T_contract_number: string
  45. T_company_name: string
  46. T_payment_method: string
  47. T_receive: string
  48. T_receive_name: string
  49. }
  50. export interface InfoType {
  51. Id: number
  52. T_type: number
  53. T_depot_name: string
  54. T_date: string
  55. T_number: string
  56. T_remark: string
  57. T_submit: string
  58. T_signer?: string
  59. T_signer_phone?: string
  60. T_signer_date?: string
  61. T_signer_unit?: string
  62. T_submit_name: string
  63. T_receive_name: string
  64. T_warehouse_name: string
  65. T_project: string
  66. T_delivery_type: string
  67. T_courier_number?: number
  68. T_company_name: string
  69. T_payment_method: string
  70. T_state_str: string
  71. T_application_date: string
  72. T_finance_approval_opinion: string
  73. T_manager_approval_opinion: string
  74. }
  75. export interface InStorageInfoType {
  76. Id: number
  77. T_depot_name: string
  78. T_date: string
  79. T_type: number
  80. T_number: string
  81. T_remark: string
  82. T_submit: string
  83. T_submit_name: string
  84. T_project: string
  85. T_return_user_name: string
  86. T_batch_number: string
  87. }
  88. export interface InStoreageFormType {
  89. T_number: string
  90. T_depot_id: any
  91. T_type: any
  92. T_product: any
  93. T_date: string
  94. T_remark: string
  95. T_project: string
  96. T_return_user: string
  97. T_return_user_name: string
  98. T_batch_number: string
  99. }
  100. export interface InStoreageFormTypes {
  101. T_number: string
  102. T_depot_id: any
  103. T_product: any
  104. T_project: any
  105. T_date: string
  106. T_receive: string
  107. T_receive_name: string
  108. T_remark: string
  109. T_company_name: string
  110. T_payment_method: string
  111. }
  112. export interface OutStockAuditFormType {
  113. T_number: string
  114. T_audit: number
  115. T_approval_opinion: string
  116. T_approval_img: string
  117. T_type: string
  118. }
  119. export const delivery_type = [
  120. {name: '自送', id: 1},
  121. {name: '自提', id: 2},
  122. {name: '快递', id: 3}
  123. ]
  124. export const depotHooks = () => {
  125. const options = computed<ItemType[]>(() => {
  126. return globalStore.GET_depotList
  127. })
  128. const getDepotList = async () => {
  129. if (globalStore.GET_depotList.length) return
  130. globalStore.SET_Storehouse_Depot_List()
  131. }
  132. getDepotList()
  133. return {
  134. options
  135. }
  136. }