params.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. export function getSearchParam(condition) {
  2. return {
  3. "parameters": [{
  4. "FormId": "LT_PRD_PMCWorkBench",
  5. "FieldKeys": "FID,FWorkCenterId_LT.fname,FApplicantId.fname,FSTOCKERID.fname,FBillNo,FDate,FDescription,FStockOrgId",
  6. "FilterString": [{
  7. "Left": "(",
  8. "FieldName": "FDocumentStatus",
  9. "Compare": "105",
  10. "Value": "A",
  11. "Right": "",
  12. "Logic": 1
  13. },
  14. // {//审核中
  15. // "Left": "",
  16. // "FieldName": "FDocumentStatus",
  17. // "Compare": "105",
  18. // "Value": "B",
  19. // "Right": "",
  20. // "Logic": 1
  21. // },
  22. {
  23. "Left": "",
  24. "FieldName": "FDocumentStatus",
  25. "Compare": "105",
  26. "Value": "D",
  27. "Right": ")",
  28. "Logic": 0
  29. }, {
  30. "Left": "",
  31. "FieldName": "FBillType",
  32. "Compare": "105",
  33. "Value": "d43d7e5b9def82fd11e3e60376ca0f55",
  34. "Right": "",
  35. "Logic": 0
  36. }, {
  37. "Left": "",
  38. "FieldName": "FStockOrgId.FNumber",
  39. "Compare": "67",
  40. "Value": condition.FStockOrgId,
  41. "Right": "",
  42. "Logic": 0
  43. },
  44. {
  45. "FieldName": "FBillNo",
  46. "Compare": "17",
  47. "Value": condition.billNo,
  48. "Left": "",
  49. "Right": "",
  50. "Logic": 0
  51. },
  52. {
  53. "Left": "",
  54. "FieldName": "FStockId.FName",
  55. "Compare": "17",
  56. "Value": "面料",
  57. "Right": "",
  58. "Logic": 0
  59. },
  60. {
  61. "Left": "",
  62. "FieldName": "FIsUseOrReturnFab",
  63. "Compare": "74",
  64. "Value": false,
  65. "Right": "",
  66. "Logic": 0
  67. },
  68. {
  69. "FieldName": "FDate",
  70. "Compare": "39",
  71. "Value": condition.range[0],
  72. "Left": "(",
  73. "Right": "",
  74. "Logic": "0"
  75. },
  76. {
  77. "FieldName": "FDate",
  78. "Compare": "16",
  79. "Value": condition.range[1],
  80. "Left": "",
  81. "Right": ")",
  82. "Logic": "0"
  83. }
  84. ],
  85. }]
  86. }
  87. }
  88. export function getBillDetailListParam(condition) {
  89. return {
  90. "parameters": [{
  91. "FormId": "LT_PRD_PMCWorkBench",
  92. "FieldKeys": "FID,FEntity_FEntryID,FBillNo,FStockLocId.FF102029.fname,FMaterialId.fnumber,FBOXNO_LT,FActualQty,FInventoryQty,FENCHASENUM_LT,FFabricOrderNo,FInventoryQty,FAuxPropId.FF101501.FDATAVALUE,Flot.FNumber,FEWorkCenterId_LT.fname,FEntrtyMemo,FDate,FApplicantId.fname,FSTOCKERID.fname,FStockActualQty,FWorkShopId.fname",
  93. "FilterString": [{
  94. "Left": "",
  95. "FieldName": "FID",
  96. "Compare": "338",
  97. "Value": condition.selectedFID,
  98. "Right": "",
  99. "Logic": 0
  100. }],
  101. }]
  102. }
  103. }
  104. export function getSaveParam(data, indexList) {
  105. let targetFID = data;
  106. // 使用 Array.prototype.filter 方法筛选符合条件的对象,并使用 Array.prototype.map 方法转换对象格式
  107. let FEntityObjects = indexList
  108. .filter(item => item.FID === targetFID)
  109. .map(item => ({
  110. "FEntryID": item["FEntity.FEntryID"],
  111. "FInventoryQty": item["FInventoryQty"],
  112. "FAuxPropId": {
  113. "FAUXPROPID__FF101501": {
  114. "FNumber": item["FAuxPropId.FF101501.FDATAVALUE"]
  115. }
  116. },
  117. "FStockLocId": {
  118. "FSTOCKLOCID__FF102029": {
  119. "FNumber": item["FStockLocId.FF102029.fname"]
  120. }
  121. },
  122. "FLot": {
  123. "FNumber": item["Flot.FNumber"]
  124. },
  125. "FENCHASENUM_LT": item["FENCHASENUM.LT"],
  126. "FActualQty": item["FActualQty"]
  127. }))
  128. return {
  129. "parameters": [
  130. "LT_PRD_PMCWorkBench",
  131. {
  132. "NeedUpDateFields": [
  133. "FInventoryQty", //即时库存数量
  134. "FAuxPropId", //等级
  135. "FStockLocId", //仓位
  136. "FIsScanFabric", //是否扫描
  137. "FLot", //批号
  138. "FENCHASENUM_LT", //装箱单号
  139. "FActualQty" //实发数量
  140. ],
  141. "NeedReturnFields": [
  142. "FID"
  143. ],
  144. "IsDeleteEntry": "true",
  145. "SubSystemId": "",
  146. "IsVerifyBaseDataField": "false",
  147. "IsEntryBatchFill": "true",
  148. "ValidateFlag": "true",
  149. "NumberSearch": "true",
  150. "IsAutoAdjustField": "false",
  151. "InterationFlags": "",
  152. "IgnoreInterationFlag": "",
  153. "IsControlPrecision": "false",
  154. "ValidateRepeatJson": "false",
  155. "Model": {
  156. "FID": targetFID,
  157. "FIsScanFabric": true,
  158. "FEntity": FEntityObjects
  159. }
  160. }
  161. ]
  162. }
  163. }
  164. export function getSubmitParam(data) {
  165. const params = {
  166. "parameters": [
  167. "LT_PRD_PMCWorkBench",
  168. {
  169. "CreateOrgId": 0,
  170. "Numbers": [],
  171. "Ids": data.toString(),
  172. "SelectedPostId": 0,
  173. "UseOrgId": 0,
  174. "NetworkCtrl": "",
  175. "IgnoreInterationFlag": ""
  176. }
  177. ]
  178. };
  179. console.log(params);
  180. return params;
  181. }
  182. export function getAuditParam(data) {
  183. const params = {
  184. "parameters": [
  185. "LT_PRD_PMCWorkBench",
  186. {
  187. "CreateOrgId": 0,
  188. "Numbers": [],
  189. "Ids": data.toString(),
  190. "InterationFlags": "",
  191. "UseOrgId": 0,
  192. "NetworkCtrl": "",
  193. "IsVerifyProcInst": "true",
  194. "IgnoreInterationFlag": "",
  195. "UseBatControlTimes": "false"
  196. }
  197. ]
  198. }
  199. console.log(params)
  200. return params
  201. }