commonApi.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import request from '@/common/axiosHelper.js'
  2. /* 获取部门用户 */
  3. export function getUnitUser(projectid) {
  4. //console.warn(data);
  5. return request({
  6. url: '/common/GetUnitUser',
  7. method: 'get',
  8. params:{projectid}
  9. })
  10. }
  11. /* 获取部门信息 */
  12. export function getUnit(projectid) {
  13. return request({
  14. url: '/common/getunit',
  15. method: 'get',
  16. params:{projectid}
  17. })
  18. }
  19. /* 根据用户代码返回所属部门 */
  20. export function GetUserDepartment(usercode) {
  21. return request({
  22. url: '/common/GetUserDepartment',
  23. method: 'get',
  24. params:{usercode}
  25. })
  26. }
  27. /* 获取项目列表 */
  28. export function selectProject() {
  29. return request({
  30. url: '/common/GetProjectList',
  31. method: 'get'
  32. })
  33. }
  34. /* 显示图片或下载附件*/
  35. export function showImage(code) {
  36. return request({
  37. url: '/common/ShowImg',
  38. method: 'get',
  39. params:{code:code}
  40. })
  41. }
  42. /* 获取入库类型 */
  43. export function getMaterialTree(classCode) {
  44. return request({
  45. url: '/common/GetMaterialTree',
  46. method: 'get',
  47. params:{classCode:classCode}
  48. })
  49. }
  50. /* 获取材料合同 */
  51. export function GetContracts(projectcode,searchValue) {
  52. return request({
  53. url: '/common/GetContracts',
  54. method: 'get',
  55. params:{projectcode:projectcode,searchValue:searchValue}
  56. })
  57. }
  58. /* 获取供应商名称 */
  59. export function getSupplierNameAndType(supplierCode, supplierTypeCode) {
  60. return request({
  61. url: '/common/GetSupplierNameAndType',
  62. method: 'get',
  63. params:{supplierCode:supplierCode,supplierTypeCode:supplierTypeCode}
  64. })
  65. }
  66. /* 根据项目代码获取工程合同 */
  67. export function GetEngineeringContracts(projectcode, searchValue) {
  68. return request({
  69. url: '/common/GetEngineeringContracts',
  70. method: 'get',
  71. params:{projectcode:projectcode,searchValue:searchValue}
  72. })
  73. }