baseData.ts 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. import { MockRequest } from '@delon/mock';
  2. // 项目执行
  3. const projectImplementationList = ["67", "37", "43", "26", "27", "17", null, "13", null, "12", "35", "34", "0", "64", "66", "30", "56", "41", "42"
  4. , "60", "63", null, "38", null, "32", null, "33", null, "65", "31", "56", "40", "42", "60", "40", "42", "56", "57", "55", "58", "26", "1", "2", "7", "9", "45", "36",
  5. "53", "54", "10", "46", "47", "62", "8", "59", "26", "48", "69", "51", "52", "20", "68", "49", "50", "5", "21", "61", "39", "24", "25", "29", "22", "23", "11",
  6. "28", "44", "6", "3", "4", "11", "39", "26", "18", "44", "15", "14", "16", "19", "5"];
  7. // 工时
  8. const workingHourList = [12, 7, 28, 10, 10, 12, 4, 12, 4, 36, 12, 20, 8, 32, 16, 16, 44, 42, 28, 8, 8, 16, 16, 8, 320, 16, 16, 4, 16, 24, 24, 24, 24, 10, 24, 14, 7, 8, 8, 24,
  9. null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
  10. // 预计成本
  11. const estimatedCost = [2064, 1204, 4816, 1720, 1720, 2064, 688, 2064, 688, 6192, 2064, 3440, 1376, 5504, 2752, 2752, 7568, 7224, 4816, 1376, 1376, 2752, 2752,
  12. 1376, 55040, 2752, 2752, 688, 2752, 4128, 4128, 4128, 4128, 1720, 4128, 2408, 1204, 1376, 1376, 4128, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
  13. // 备注
  14. const memoList = ["假设是共建中心,中心对接;(非共建中心额外增加工时和差旅)", "假设议程2h,会议3h,纪要2h", "伦理计划沟通,timeline沟通,2小时/周,14周;", null, "假设TC会议4h, 会前准备4h, 会后总结2h;如需出差,需另外结算;",
  15. "假设PMP 起草4h,审阅修订6h,定稿2h", "假设PD审阅PMP 4h", "假设MP 起草6h,审阅修订4h,定稿2h", "假设PD审阅MP 4h",
  16. "ICF-12h,SD-20h,AD-4h", "假设伦理材料 12h", "EC binder 准备8h;递交12h", null, "遗传资料准备,审阅,签章搜集", "合同起草和审阅12h,沟通和签署12h。",
  17. "供应商(CRC和招募)选择8h,合同起草,审阅签署8h;", "TMF创建2h, 和更新,3h/周,预估14周", "与申办方沟通/会议/周报:伦理阶段,每周3h,14周;", "CRO内部沟通/会议/周期:伦理阶段,每周2h,预估14周;",
  18. "DM相关文件-4h, SAP-2h, 验证和分析方案-2h;", "启动会PPT准备和审阅6h,培训2h;", "启动会培训", "会前准备,物资等4h,启动会4h,报告4h;差旅8h;", "会前审阅4h,报告审阅4h;", "本项目合同约定空腹、餐后各5次常规监查,每次32h;",
  19. "报告审阅+定稿,4小时/次;", "假设onsite 8h,报告4h;差旅8h;", "报告审阅+定稿,4小时/次;", "假设20h/次,8h onsite,8h 差旅,4小时报告+定稿;预估2次;", "假设1供应商(CRC);每周2h,预估10周;如有其它外部供应商,需增加工时;",
  20. "TMF文档更新,2h/周,预估10周;", "与申办方沟通/会议/周报:临床数据阶段,每周4h,预估9周;", "CRO内部沟通/会议/周报:临床数据阶段,每周4h,预估9周;", "DMR-2h; SAR-2h; Bio-R-2h; CSR-4h;",
  21. "与申办方沟通/会议/周报:主攻结题阶段,每周4h,预估7周;", "CRO内部沟通/会议/周报:主攻结题阶段,每周2h,预估7周;", "TMF更新并转交申办方,1h/周,预估7周;", null, "打印邮寄", "各方盖章邮寄12h/周;"];
  22. function setBaseData(): any[] {
  23. const list: any[] = [];
  24. for (let i = 0; i < 89;) {
  25. list.push({
  26. index: i++,
  27. contractorId: "1", // 公司
  28. departId: "0", // 部门
  29. projectPhaseId: "9",// 项目阶段
  30. phaseId: "2", // 阶段
  31. projectImplementationId: projectImplementationList[i - 1],// 项目执行
  32. roleId: "3", // 角色
  33. hour: workingHourList[i - 1], // 工时
  34. unitCost: 172, // 单位人工成本
  35. estimatedCost: estimatedCost[i - 1], // 预计成本
  36. memo: memoList[i - 1], // 注释
  37. sort: i,
  38. })
  39. }
  40. // CSR 0
  41. // 锁库 1
  42. // 准备 2
  43. list.forEach((element, i) => {
  44. if (i > 18) {
  45. element.projectPhaseId = "3"
  46. element.phaseId = "1"
  47. }
  48. if (i > 32) {
  49. element.projectPhaseId = "8"
  50. element.phaseId = "0"
  51. }
  52. if (i > 36) {
  53. element.projectPhaseId = "7"
  54. }
  55. if (i > 39) {
  56. element.departId = "2"
  57. element.phaseId = "2"
  58. element.roleId = null
  59. element.projectPhaseId = "5"
  60. }
  61. if (i > 42) {
  62. element.phaseId = "1"
  63. }
  64. if (i > 54) {
  65. element.projectPhaseId = "6"
  66. }
  67. if (i > 60) {
  68. element.phaseId = "0"
  69. }
  70. if (i > 66) {
  71. element.departId = "1"
  72. element.phaseId = "2"
  73. element.projectPhaseId = "2"
  74. }
  75. if (i > 74) {
  76. element.projectPhaseId = "0"
  77. element.phaseId = "0"
  78. }
  79. if (i > 79) {
  80. element.projectPhaseId = "1"
  81. }
  82. if (i === 0 || i === 1) {
  83. element.projectPhaseId = "4"
  84. }
  85. if (i === 55) {
  86. element.phaseId = "2"
  87. }
  88. if (i === 6 || i === 8) {
  89. element.roleId = "2"
  90. }
  91. if (i === 16 || i === 30 || i === 36 || i === 38) {
  92. element.roleId = "1"
  93. }
  94. if (i === 21 || i === 22 || i === 24 || i === 26) {
  95. element.roleId = "0"
  96. }
  97. })
  98. return list;
  99. }
  100. /**
  101. * @description: 过手费成本
  102. * @param {type}
  103. * @author: 段亚鑫
  104. */
  105. const costOverchargeList = ["0", "1", "2", "3", "4", "5", "6"]; // 过手费成本
  106. const company = ["2", null, "2", null, null, "1", "2"];// 公司
  107. const contractPartyName = ["上海方达生物技术有限公司", null, "上海方达生物技术有限公司", null, null, "方达医药技术(上海)有限公司", "上海方达生物技术有限公司"];// 公司name
  108. const hospitalList = ['新郑市人民医院', null, '康贝瑞', null, null, null, '保险'];// 临床中心
  109. const startDate = ['2019-06-04', null, '2019-08-01', null, null, '2019-01-01'];// 计划开始日期
  110. const endDate = [null, null, '2020-08-01', null, null, '2020-12-31']; // 计划结束日期
  111. const numberOfSubjects = [null, null, 52];
  112. const unitCostList = [null, null, 3200];
  113. const moneyList = [5000, null, 166400, null, null, 26400, 15600];
  114. const taxRate = ["6", null, "3", null, null, "0", "6"];
  115. const costExcludesTaxes = [4716.98, null, 161553.40, null, null, 26400.00, 14716.98];
  116. function setDisposalCost(): any[] {
  117. const dataList: any[] = [];
  118. for (let i = 0; i < 7;) {
  119. i.toString();
  120. dataList.push({
  121. costOverchargeId: costOverchargeList[i++],
  122. contractPartyId: company[i - 1], // 内存溢出
  123. contractPartyName: contractPartyName[i - 1],
  124. clinicalCenter: hospitalList[i - 1],
  125. startDate: startDate[i - 1],
  126. endDate: endDate[i - 1],
  127. numberOfSubjects: numberOfSubjects[i - 1],
  128. unitCost: unitCostList[i - 1],
  129. money: moneyList[i - 1],
  130. tax: taxRate[i - 1],
  131. costNotTax: costExcludesTaxes[i - 1],
  132. index: i
  133. })
  134. }
  135. return dataList;
  136. }
  137. /**
  138. * @description: 差旅费用
  139. * @param {type}
  140. * @author: 段亚鑫
  141. */
  142. const travelExpense = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"];
  143. const wordsFee = ["1000", "100", "200", "2000", "1000", "1000", "1000", "1000", "0", "1000", "1000", "200", "200", "200"];
  144. const traveExpectedNumber = [1, 6, 2, 2, 8, 2, 1, 1, 0, 4, 1, 0, 2, 0];
  145. const traveFees = [1000, 600, 400, 4000, 8000, 2000, 1000, 1000, 0, 4000, 1000, 0, 400, 0];
  146. function setTravelExpense() {
  147. const data = [];
  148. for (let i = 0; i < 14;) {
  149. data.push({
  150. costType: "01",
  151. index: i++,
  152. costId: travelExpense[i - 1],
  153. singleCost: wordsFee[i - 1],
  154. estimateFrequency: traveExpectedNumber[i - 1],
  155. total: traveFees[i - 1]
  156. })
  157. }
  158. return data;
  159. }
  160. /**
  161. * @description: 文件打印和运输费用
  162. * @param {type}
  163. * @author: 段亚鑫
  164. */
  165. // 伦理打印费 0 修改删除
  166. // 其他文件 1
  167. const filePrintCostList = ["0", "1"];
  168. const singleCostList = ["300", "200"];
  169. const fileFees = [600, 400];
  170. function setFilePrintCost() {
  171. const data = [];
  172. for (let i = 0; i < 2;) {
  173. data.push({
  174. costType: "02",
  175. index: i++,
  176. costId: filePrintCostList[i - 1],
  177. singleCost: singleCostList[i - 1],
  178. estimateFrequency: 2,
  179. total: fileFees[i - 1]
  180. })
  181. }
  182. return data;
  183. }
  184. /**
  185. * @description: 固定费用
  186. * @param {type}
  187. * @author: 段亚鑫
  188. */
  189. const onceFees = ["100", "500"];
  190. const fixed_FrequencyList = ["10", "2"];
  191. const fixedFees = [1000, 1000];
  192. function setOtherFixedFees() {
  193. const data = [];
  194. for (let i = 0; i < 2;) {
  195. data.push({
  196. costType: "03",
  197. index: i++,
  198. costId: filePrintCostList[i - 1],
  199. singleCost: onceFees[i - 1],
  200. estimateFrequency: fixed_FrequencyList[i - 1],
  201. total: fixedFees[i - 1]
  202. })
  203. }
  204. return data;
  205. }
  206. export const data = {
  207. '/baseData/list': () => setBaseData(),
  208. '/baseData/disposCost': () => setDisposalCost(),
  209. '/baseData/travelExpense': () => setTravelExpense(),
  210. "/baseData/filePrintCost": () => setFilePrintCost(),
  211. "/baseData/otherFixedFees": () => setOtherFixedFees()
  212. };