buildJson.js 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. import { physics } from '@/api/scan/config'
  2. import http from '@/api/scan/httpUtil'
  3. /**** 修改 */
  4. //修改创建维修商
  5. //生产商修改
  6. function updateVenderManufacturer(param, success) {
  7. let url = `${physics}/venders/manufacturer/update`
  8. http.postJson(url, param, success)
  9. }
  10. //保险商修改
  11. function updateVenderInsurer(param, success) {
  12. let url = `${physics}/venders/insurance/update`
  13. http.postJson(url, param, success)
  14. }
  15. //保险商修改
  16. function updateVenderMaintainer(param, success) {
  17. let url = `${physics}/venders/maintainer/update`
  18. http.postJson(url, param, success)
  19. }
  20. //供应商修改
  21. function updateVenderSupplier(param, success) {
  22. let url = `${physics}/venders/supplier/update`
  23. http.postJson(url, param, success)
  24. }
  25. //品牌修改
  26. function updateVenderBrand(param, success) {
  27. let url = `${physics}/venders/manufacturer/brand/update`
  28. http.postJson(url, param, success)
  29. }
  30. //型号修改
  31. function updateVenderSpecification(param, success) {
  32. let url = `${physics}/venders/manufacturer/specification/update`
  33. http.postJson(url, param, success)
  34. }
  35. /** 获取 */
  36. function getList(param, success) {
  37. let url = `${physics}/venders/basic/vender/query`
  38. http.postJson(url, param, success)
  39. }
  40. function getManufacturer(param, success) {
  41. let url = `${physics}/venders/manufacturer/brand/findOne`
  42. http.postJson(url, param, success)
  43. }
  44. function getSpecification(param, success) {
  45. let url = `${physics}/venders/manufacturer/specification/findOne`
  46. http.postJson(url, param, success)
  47. }
  48. /** 创建 */
  49. //创建品牌
  50. function createBrand(param, success) {
  51. let url = `${physics}/venders/manufacturer/brand/create`
  52. http.postJson(url, param, success)
  53. }
  54. //创建生产商
  55. function createManufacturer(param, success) {
  56. let url = `${physics}/venders/manufacturer/create`
  57. http.postJson(url, param, success)
  58. }
  59. //创建供应商
  60. function createSupplier(param, success) {
  61. let url = `${physics}/venders/supplier/create`
  62. http.postJson(url, param, success)
  63. }
  64. //创建保险商
  65. function createInsurance(param, success) {
  66. let url = `${physics}/venders/insurance/create`
  67. http.postJson(url, param, success)
  68. }
  69. //创建维修商
  70. function createMaintainance(param, success) {
  71. let url = `${physics}/venders/maintainance/create`
  72. http.postJson(url, param, success)
  73. }
  74. //创建产品
  75. function createProduct(param, success) {
  76. let url = `${physics}/venders/manufacturer/product/create`
  77. http.postJson(url, param, success)
  78. }
  79. //创建型号
  80. function createSpecification(param, success) {
  81. let url = `${physics}/venders/manufacturer/specification/create`
  82. http.postJson(url, param, success)
  83. }
  84. /*** 联系人信息 */
  85. //添加修改维修商联系信息
  86. function updateMaintainance(param, success) {
  87. let url = `${physics}/venders/maintainance/link/create`
  88. http.postJson(url, param, success)
  89. }
  90. //修改创建供应商联系人
  91. function updateSupplier(param, success) {
  92. let url = `${physics}/venders/supplier/link/create`
  93. http.postJson(url, param, success)
  94. }
  95. //修改创建保险商联系人
  96. function updateInsurance(param, success) {
  97. let url = `${physics}/venders/insurance/link/create`
  98. http.postJson(url, param, success)
  99. }
  100. let arr = [{
  101. name: "生产商",
  102. infosArr: ["Manufacturer"],
  103. createFunc: createManufacturer,
  104. getList: getList,
  105. infosKey: "DPManufacturerID",
  106. update: "",
  107. updateVender: updateVenderManufacturer,
  108. options: [{
  109. key: "vender.name",
  110. label: "生产商名称",
  111. optLabel: "Manufacturer",
  112. type: "Str"
  113. }]
  114. },
  115. {
  116. name: "品牌",
  117. infosArr: ["Brand"],
  118. infosKey: "DPBrandID",
  119. createFunc: createBrand,
  120. getList: getManufacturer,
  121. update: "",
  122. options: [{
  123. key: "content.name",
  124. label: "品牌",
  125. optLabel: "Brand",
  126. type: "Str"
  127. }],
  128. updateVender: updateVenderBrand
  129. },
  130. {
  131. name: "保险商",
  132. infosArr: ["Insurer", "InsurerContactor", "InsurerPhone", "InsurerEmail", "InsurerWeb", "InsurerFax"],
  133. createFunc: createInsurance,
  134. getList: getList,
  135. infosKey: "DPInsurerID",
  136. getWebSite: "",
  137. updateVender: updateVenderInsurer,
  138. update: updateInsurance,
  139. options: [{
  140. key: "vender.name",
  141. label: "保险公司名称",
  142. optLabel: "Insurer",
  143. type: "Str"
  144. },
  145. {
  146. key: "vender.website",
  147. label: "保险公司网址",
  148. optLabel: "InsurerWeb",
  149. type: "Str"
  150. },
  151. {
  152. key: "contact.name",
  153. label: "联系人",
  154. optLabel: "InsurerContactor",
  155. type: "Str"
  156. },
  157. {
  158. key: "contact.phone",
  159. label: "联系人电话",
  160. optLabel: "InsurerPhone",
  161. type: "Num"
  162. }, {
  163. key: "contact.email",
  164. label: "联系人邮箱",
  165. optLabel: "InsurerEmail",
  166. type: "Str"
  167. }, {
  168. key: "contact.fax",
  169. label: "联系人传真",
  170. optLabel: "InsurerFax",
  171. type: "Str"
  172. }
  173. ],
  174. },
  175. {
  176. name: "维修商",
  177. infosArr: ["Maintainer", "MaintainerContactor", "MaintainerPhone", "MaintainerEmail", "MaintainerWeb", "MaintainerFax"],
  178. createFunc: createMaintainance,
  179. updateVender: updateVenderMaintainer,
  180. options: [{
  181. key: "vender.name",
  182. label: "维修商单位名称",
  183. optLabel: "Maintainer",
  184. type: "Str"
  185. },
  186. {
  187. key: "vender.website",
  188. label: "维修商网址",
  189. optLabel: "MaintainerWeb",
  190. type: "Str"
  191. }, {
  192. key: "contact.name",
  193. label: "联系人",
  194. optLabel: "MaintainerContactor",
  195. type: "Str"
  196. },
  197. {
  198. key: "contact.phone",
  199. label: "联系人电话",
  200. optLabel: "MaintainerPhone",
  201. type: "Num"
  202. }, {
  203. key: "contact.email",
  204. label: "联系人邮箱",
  205. optLabel: "MaintainerEmail",
  206. type: "Str"
  207. }, {
  208. key: "contact.fax",
  209. label: "联系人传真",
  210. optLabel: "MaintainerFax",
  211. type: "Str"
  212. }
  213. ],
  214. getList: getList,
  215. update: updateMaintainance,
  216. infosKey: "DPMaintainerID",
  217. getWebSite: "",
  218. },
  219. {
  220. name: "供应商",
  221. infosArr: ["Supplier", "SupplierContactor", "SupplierPhone", "SupplierEmail", "SupplierWeb", "SupplierFax"],
  222. createFunc: createSupplier,
  223. updateVender: updateVenderSupplier,
  224. options: [{
  225. key: "vender.name",
  226. label: "供应商单位名称",
  227. optLabel: "Supplier",
  228. type: "Str"
  229. },
  230. {
  231. key: "vender.website",
  232. label: "供应商网址",
  233. optLabel: "SupplierWeb",
  234. type: "Str"
  235. }, {
  236. key: "contact.name",
  237. label: "联系人",
  238. optLabel: "SupplierContactor",
  239. type: "Str"
  240. },
  241. {
  242. key: "contact.phone",
  243. label: "联系人电话",
  244. optLabel: "SupplierPhone",
  245. type: "Num"
  246. }, {
  247. key: "contact.email",
  248. label: "联系人邮箱",
  249. optLabel: "SupplierEmail",
  250. type: "Str"
  251. }, {
  252. key: "contact.fax",
  253. label: "联系人传真",
  254. optLabel: "SupplierFax",
  255. type: "Str"
  256. }
  257. ],
  258. getList: getList,
  259. update: updateSupplier,
  260. infosKey: "DPSupplierID",
  261. getWebSite: "",
  262. },
  263. {
  264. name: "型号",
  265. infosArr: ["specificationName"],
  266. getList: getSpecification,
  267. createFunc: createSpecification,
  268. createProduct: createProduct,
  269. update: "",
  270. options: [],
  271. updateVender: updateVenderSpecification,
  272. infosKey: "DPSpecificationID",
  273. getWebSite: ""
  274. }
  275. ]
  276. export default arr