material.js 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075
  1. /**
  2. * 材料服务
  3. * 冯海夫
  4. * 20201008
  5. */
  6. var ServiceMaterial={
  7. // 待入库材料
  8. getWatingInList:function(){
  9. return getService.methodGet("/fbsPuArrivalvouch/fbsPuArrivalvouch/getWatingInList");
  10. // const materialList = [];
  11. // materialList.push({
  12. // vendorName:"A公司",
  13. // materialCode:"10001",
  14. // materialName:"物料A",
  15. // specs:"3*4",
  16. // arriveSum:"10",
  17. // arriveDate:"09月18日",
  18. // memo:""
  19. // });
  20. // materialList.push({
  21. // vendorName:"B公司",
  22. // materialCode:"10002",
  23. // materialName:"物料B",
  24. // specs:"3*4",
  25. // arriveSum:"20",
  26. // arriveDate:"09月18日",
  27. // memo:""
  28. // });
  29. // materialList.push({
  30. // vendorName:"C公司",
  31. // materialCode:"10003",
  32. // materialName:"物料C",
  33. // specs:"3*4",
  34. // arriveSum:"30",
  35. // arriveDate:"09月18日",
  36. // memo:""
  37. // });
  38. // materialList.push({
  39. // vendorName:"D公司",
  40. // materialCode:"10004",
  41. // materialName:"物料D",
  42. // specs:"3*4",
  43. // arriveSum:"40",
  44. // arriveDate:"09月18日",
  45. // memo:""
  46. // });
  47. // materialList.push({
  48. // vendorName:"E公司",
  49. // materialCode:"10005",
  50. // materialName:"物料E",
  51. // specs:"3*4",
  52. // arriveSum:"50",
  53. // arriveDate:"09月18日",
  54. // memo:""
  55. // });
  56. // materialList.push({
  57. // vendorName:"F公司",
  58. // materialCode:"10006",
  59. // materialName:"物料F",
  60. // specs:"3*4",
  61. // arriveSum:"60",
  62. // arriveDate:"09月18日",
  63. // memo:""
  64. // });
  65. // var i = 1;
  66. // $.each(materialList, function(index,item){
  67. // item.index = i++;
  68. // })
  69. // return materialList;
  70. },
  71. // 已入库数量
  72. getInSum:function(){
  73. return getService.methodPost("/fbsPuArrivalvouch/fbsPuArrivalvouch/getInSum");
  74. // return 8;
  75. },
  76. // 待检材料
  77. getWatingCheckList:function(){
  78. return getService.methodGet("/fbsPuArrivalvouch/fbsPuArrivalvouch/getWatingCheckList");
  79. // const materialList = [];
  80. // materialList.push({
  81. // vendorName:"A公司",
  82. // materialCode:"10001",
  83. // materialName:"物料A",
  84. // specs:"3*4",
  85. // arriveSum:"10",
  86. // arriveDate:"09月18日"
  87. // });
  88. // materialList.push({
  89. // vendorName:"B公司",
  90. // materialCode:"10002",
  91. // materialName:"物料B",
  92. // specs:"3*4",
  93. // arriveSum:"20",
  94. // arriveDate:"09月18日"
  95. // });
  96. // materialList.push({
  97. // vendorName:"C公司",
  98. // materialCode:"10003",
  99. // materialName:"物料C",
  100. // specs:"3*4",
  101. // arriveSum:"30",
  102. // arriveDate:"09月18日"
  103. // });
  104. // materialList.push({
  105. // vendorName:"D公司",
  106. // materialCode:"10004",
  107. // materialName:"物料D",
  108. // specs:"3*4",
  109. // arriveSum:"40",
  110. // arriveDate:"09月18日"
  111. // });
  112. // materialList.push({
  113. // vendorName:"E公司",
  114. // materialCode:"10005",
  115. // materialName:"物料E",
  116. // specs:"3*4",
  117. // arriveSum:"50",
  118. // arriveDate:"09月18日"
  119. // });
  120. // materialList.push({
  121. // vendorName:"F公司",
  122. // materialCode:"10006",
  123. // materialName:"物料F",
  124. // specs:"3*4",
  125. // arriveSum:"60",
  126. // arriveDate:"09月18日"
  127. // });
  128. // return materialList;
  129. },
  130. // 已检数量
  131. getCheckSum:function(){
  132. return getService.methodPost("/fbsPuArrivalvouch/fbsPuArrivalvouch/getCheckSum");
  133. // return 10;
  134. },
  135. // 安全库存
  136. getStockList:function(){
  137. return getService.methodGet("/fbsInventory/fbsInventory/getStockList");
  138. // const materialList = [];
  139. // materialList.push({
  140. // materialCode:"10001",
  141. // materialName:"物料A",
  142. // specs:"3*4",
  143. // realStockSum:"10",
  144. // safeStockSum:"20"
  145. // });
  146. // materialList.push({
  147. // materialCode:"10002",
  148. // materialName:"物料B",
  149. // specs:"3*4",
  150. // realStockSum:"100",
  151. // safeStockSum:"80"
  152. // });
  153. // materialList.push({
  154. // materialCode:"10001",
  155. // materialName:"物料A",
  156. // specs:"3*4",
  157. // realStockSum:"10",
  158. // safeStockSum:"20"
  159. // });
  160. // materialList.push({
  161. // materialCode:"10002",
  162. // materialName:"物料B",
  163. // specs:"3*4",
  164. // realStockSum:"100",
  165. // safeStockSum:"80"
  166. // });materialList.push({
  167. // materialCode:"10001",
  168. // materialName:"物料A",
  169. // specs:"3*4",
  170. // realStockSum:"10",
  171. // safeStockSum:"20"
  172. // });
  173. // materialList.push({
  174. // materialCode:"10002",
  175. // materialName:"物料B",
  176. // specs:"3*4",
  177. // realStockSum:"100",
  178. // safeStockSum:"80"
  179. // });materialList.push({
  180. // materialCode:"10001",
  181. // materialName:"物料A",
  182. // specs:"3*4",
  183. // realStockSum:"10",
  184. // safeStockSum:"20"
  185. // });
  186. // materialList.push({
  187. // materialCode:"10002",
  188. // materialName:"物料B",
  189. // specs:"3*4",
  190. // realStockSum:"100",
  191. // safeStockSum:"80"
  192. // });materialList.push({
  193. // materialCode:"10001",
  194. // materialName:"物料A",
  195. // specs:"3*4",
  196. // realStockSum:"10",
  197. // safeStockSum:"20"
  198. // });
  199. // materialList.push({
  200. // materialCode:"10002",
  201. // materialName:"物料B",
  202. // specs:"3*4",
  203. // realStockSum:"100",
  204. // safeStockSum:"80"
  205. // });materialList.push({
  206. // materialCode:"10001",
  207. // materialName:"物料A",
  208. // specs:"3*4",
  209. // realStockSum:"10",
  210. // safeStockSum:"20"
  211. // });
  212. // materialList.push({
  213. // materialCode:"10002",
  214. // materialName:"物料B",
  215. // specs:"3*4",
  216. // realStockSum:"100",
  217. // safeStockSum:"80"
  218. // });materialList.push({
  219. // materialCode:"10001",
  220. // materialName:"物料A",
  221. // specs:"3*4",
  222. // realStockSum:"10",
  223. // safeStockSum:"20"
  224. // });
  225. // materialList.push({
  226. // materialCode:"10002",
  227. // materialName:"物料B",
  228. // specs:"3*4",
  229. // realStockSum:"100",
  230. // safeStockSum:"80"
  231. // });
  232. // materialList.push({
  233. // materialCode:"10001",
  234. // materialName:"物料A",
  235. // specs:"3*4",
  236. // realStockSum:"10",
  237. // safeStockSum:"20"
  238. // });
  239. // return materialList;
  240. },
  241. // 工单备料
  242. getListByOrderSheet:function(){
  243. // const materialList = [];
  244. // materialList.push({
  245. // orderSheetCode:"G10001",
  246. // materialCode:"10001",
  247. // materialName:"物料A",
  248. // specs:"3*4",
  249. // needSum:"20",
  250. // stockSum:"20"
  251. // });
  252. // materialList.push({
  253. // orderSheetCode:"G10001",
  254. // materialCode:"10002",
  255. // materialName:"物料B",
  256. // specs:"3*4",
  257. // needSum:"10",
  258. // stockSum:"30"
  259. // });
  260. // materialList.push({
  261. // orderSheetCode:"G10002",
  262. // materialCode:"10003",
  263. // materialName:"物料C",
  264. // specs:"3*4",
  265. // needSum:"40",
  266. // stockSum:"20"
  267. // });
  268. // materialList.push({
  269. // orderSheetCode:"G10003",
  270. // materialCode:"10004",
  271. // materialName:"物料D",
  272. // specs:"3*4",
  273. // needSum:"30",
  274. // stockSum:"30"
  275. // });
  276. // materialList.push({
  277. // orderSheetCode:"G10004",
  278. // materialCode:"10005",
  279. // materialName:"物料E",
  280. // specs:"3*4",
  281. // needSum:"20",
  282. // stockSum:"20"
  283. // });
  284. // materialList.push({
  285. // orderSheetCode:"G10001",
  286. // materialCode:"10001",
  287. // materialName:"物料A",
  288. // specs:"3*4",
  289. // needSum:"20",
  290. // stockSum:"20"
  291. // });
  292. // materialList.push({
  293. // orderSheetCode:"G10004",
  294. // materialCode:"10005",
  295. // materialName:"物料E",
  296. // specs:"3*4",
  297. // needSum:"20",
  298. // stockSum:"20"
  299. // });
  300. var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getListByOrderSheet?type=1");
  301. materialList.forEach(element => {
  302. element.orderSheetCode=element.mocode
  303. element.materialCode=element.cinvcode
  304. element.materialName=""//element.cinvname
  305. element.specs=""//element.cinvstd
  306. element.needSum=element.qtys
  307. element.stockSum=element.issQty
  308. });
  309. return materialList;
  310. },
  311. // 工单缺料
  312. getListByOrderSheetNotEnough:function(){
  313. // const materialList = [];
  314. // materialList.push({
  315. // orderSheetCode:"G10001",
  316. // materialCode:"10001",
  317. // materialName:"物料A",
  318. // specs:"3*4",
  319. // needSum:"30",
  320. // stockSum:"20"
  321. // });
  322. // materialList.push({
  323. // orderSheetCode:"G10001",
  324. // materialCode:"10002",
  325. // materialName:"物料B",
  326. // specs:"3*4",
  327. // needSum:"55",
  328. // stockSum:"30"
  329. // });
  330. // materialList.push({
  331. // orderSheetCode:"G10002",
  332. // materialCode:"10003",
  333. // materialName:"物料C",
  334. // specs:"3*4",
  335. // needSum:"40",
  336. // stockSum:"20"
  337. // });
  338. // materialList.push({
  339. // orderSheetCode:"G10003",
  340. // materialCode:"10004",
  341. // materialName:"物料D",
  342. // specs:"3*4",
  343. // needSum:"40",
  344. // stockSum:"30"
  345. // });
  346. // materialList.push({
  347. // orderSheetCode:"G10004",
  348. // materialCode:"10005",
  349. // materialName:"物料E",
  350. // specs:"3*4",
  351. // needSum:"25",
  352. // stockSum:"20"
  353. // });
  354. var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getListByOrderSheet?type=2");
  355. materialList.forEach(element => {
  356. element.orderSheetCode=element.mocode
  357. element.materialCode=element.cinvcode
  358. element.materialName=""//element.cinvname
  359. element.specs=""//element.cinvstd
  360. element.needSum=element.qtys
  361. element.stockSum=element.shortageQuantity
  362. });
  363. return materialList;
  364. },
  365. // 工单齐套
  366. getListByOrderSheetEnough:function(){
  367. // const materialList = [];
  368. // materialList.push({
  369. // orderSheetCode:"G10001",
  370. // materialCode:"10001",
  371. // materialName:"物料A",
  372. // specs:"3*4",
  373. // needSum:"10",
  374. // stockSum:"20"
  375. // });
  376. // materialList.push({
  377. // orderSheetCode:"G10001",
  378. // materialCode:"10002",
  379. // materialName:"物料B",
  380. // specs:"3*4",
  381. // needSum:"15",
  382. // stockSum:"30"
  383. // });
  384. // materialList.push({
  385. // orderSheetCode:"G10002",
  386. // materialCode:"10003",
  387. // materialName:"物料C",
  388. // specs:"3*4",
  389. // needSum:"20",
  390. // stockSum:"20"
  391. // });
  392. // materialList.push({
  393. // orderSheetCode:"G10003",
  394. // materialCode:"10004",
  395. // materialName:"物料D",
  396. // specs:"3*4",
  397. // needSum:"30",
  398. // stockSum:"30"
  399. // });
  400. // materialList.push({
  401. // orderSheetCode:"G10003",
  402. // materialCode:"10004",
  403. // materialName:"物料D",
  404. // specs:"3*4",
  405. // needSum:"30",
  406. // stockSum:"30"
  407. // });
  408. // materialList.push({
  409. // orderSheetCode:"G10003",
  410. // materialCode:"10004",
  411. // materialName:"物料D",
  412. // specs:"3*4",
  413. // needSum:"30",
  414. // stockSum:"30"
  415. // });
  416. // materialList.push({
  417. // orderSheetCode:"G10003",
  418. // materialCode:"10004",
  419. // materialName:"物料D",
  420. // specs:"3*4",
  421. // needSum:"30",
  422. // stockSum:"30"
  423. // });
  424. // materialList.push({
  425. // orderSheetCode:"G10003",
  426. // materialCode:"10004",
  427. // materialName:"物料D",
  428. // specs:"3*4",
  429. // needSum:"30",
  430. // stockSum:"30"
  431. // });
  432. // materialList.push({
  433. // orderSheetCode:"G10003",
  434. // materialCode:"10004",
  435. // materialName:"物料D",
  436. // specs:"3*4",
  437. // needSum:"30",
  438. // stockSum:"30"
  439. // });
  440. // materialList.push({
  441. // orderSheetCode:"G10004",
  442. // materialCode:"10005",
  443. // materialName:"物料E",
  444. // specs:"3*4",
  445. // needSum:"15",
  446. // stockSum:"20"
  447. // });
  448. var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getListByOrderSheet?type=1");
  449. materialList.forEach(element => {
  450. element.orderSheetCode=element.mocode
  451. element.materialCode=element.cinvcode
  452. element.materialName=""//element.cinvname
  453. element.specs=""//element.cinvstd
  454. element.needSum=element.qtys
  455. element.stockSum=element.issQty
  456. });
  457. return materialList;
  458. },
  459. // 领料申请通知
  460. getApplyList:function(){
  461. // const materialList = [];
  462. // materialList.push({
  463. // orderSheetCode:"G10001",
  464. // materialCode:"10001",
  465. // materialName:"物料A",
  466. // specs:"3*4",
  467. // applyPerson:"张三",
  468. // applysum:"20"
  469. // });
  470. // materialList.push({
  471. // orderSheetCode:"G10001",
  472. // materialCode:"10002",
  473. // materialName:"物料B",
  474. // specs:"3*4",
  475. // applyPerson:"张三",
  476. // applysum:"20"
  477. // });
  478. // materialList.push({
  479. // orderSheetCode:"G10002",
  480. // materialCode:"10003",
  481. // materialName:"物料C",
  482. // specs:"3*4",
  483. // applyPerson:"张三",
  484. // applysum:"20"
  485. // });
  486. // materialList.push({
  487. // orderSheetCode:"G10003",
  488. // materialCode:"10004",
  489. // materialName:"物料D",
  490. // specs:"3*4",
  491. // applyPerson:"张三",
  492. // applysum:"20"
  493. // });
  494. // materialList.push({
  495. // orderSheetCode:"G10004",
  496. // materialCode:"10005",
  497. // materialName:"物料E",
  498. // specs:"3*4",
  499. // applyPerson:"张三",
  500. // applysum:"20"
  501. // });
  502. var materialList=MethodGetService.methodGet("/fbsMomOrder/fbsMomOrderdetail/getApplyList?type=2");
  503. materialList.forEach(element => {
  504. element.orderSheetCode=element.mocode
  505. element.materialCode=element.cinvcode
  506. element.materialName=""//element.cinvname
  507. element.specs=""//element.cinvstd
  508. element.applyPerson=""
  509. element.applysum=element.unfinishedQuantity
  510. });
  511. return materialList;
  512. },
  513. // 领料申请完成数量
  514. getApplyCompleteSum:function(){
  515. return 10;
  516. },
  517. // 未来几天内到货计划
  518. getWillArriveList:function(days){
  519. return getService.methodGet("/fbsPuArrivalvouch/fbsArrivalVouchs/getWillArriveList");
  520. // const materialList = [];
  521. // materialList.push({
  522. // vendorName:"A公司",
  523. // materialCode:"10001",
  524. // materialName:"物料A",
  525. // specs:"3*4",
  526. // arriveSum:"10",
  527. // arriveDate:"09月18日",
  528. // memo:""
  529. // });
  530. // materialList.push({
  531. // vendorName:"B公司",
  532. // materialCode:"10002",
  533. // materialName:"物料B",
  534. // specs:"3*4",
  535. // arriveSum:"20",
  536. // arriveDate:"09月18日",
  537. // memo:""
  538. // });
  539. // materialList.push({
  540. // vendorName:"C公司",
  541. // materialCode:"10003",
  542. // materialName:"物料C",
  543. // specs:"3*4",
  544. // arriveSum:"30",
  545. // arriveDate:"09月18日",
  546. // memo:""
  547. // });
  548. // materialList.push({
  549. // vendorName:"D公司",
  550. // materialCode:"10004",
  551. // materialName:"物料D",
  552. // specs:"3*4",
  553. // arriveSum:"40",
  554. // arriveDate:"09月18日",
  555. // memo:""
  556. // });
  557. // materialList.push({
  558. // vendorName:"E公司",
  559. // materialCode:"10005",
  560. // materialName:"物料E",
  561. // specs:"3*4",
  562. // arriveSum:"50",
  563. // arriveDate:"09月18日",
  564. // memo:""
  565. // });
  566. // materialList.push({
  567. // vendorName:"F公司",
  568. // materialCode:"10006",
  569. // materialName:"物料F",
  570. // specs:"3*4",
  571. // arriveSum:"60",
  572. // arriveDate:"09月18日",
  573. // memo:""
  574. // });
  575. // var i = 1;
  576. // $.each(materialList, function(index,item){
  577. // item.index = i++;
  578. // })
  579. // return materialList;
  580. },
  581. // 当天到货批数
  582. getTodayArriveSum:function(){
  583. // return 100;
  584. return MethodGetService.methodGet("/fbsPuArrivalvouch/fbsPuArrivalvouch/getTodayArriveSum");
  585. },
  586. // 未来几天到货批数
  587. getWillArriveSum:function(days){
  588. // return 300;
  589. return MethodGetService.methodGet("/fbsPuArrivalvouch/fbsPuArrivalvouch/getWillArriveSum");
  590. },
  591. // 当月到货批数
  592. getThisMonthArriveSum:function(){
  593. // return 7882;
  594. return MethodGetService.methodGet("/fbsPuArrivalvouch/fbsPuArrivalvouch/getThisMonthArriveSum");
  595. },
  596. // 未入库总批数
  597. getNotInSum:function(){
  598. // return 90;
  599. return MethodGetService.methodGet("/fbsPuArrivalvouch/fbsPuArrivalvouch/getNotInSum");
  600. },
  601. // 近6个月质量目标合格率比较(品质管理看板)
  602. getLastSixMonthQualityTargetCompare: function () {
  603. return getService.methodGet("/fbsPuArrivalvouch/fbsArrivalVouchs/getLastSixMonthQualityTargetCompare");
  604. // const list = [];
  605. // list.push({
  606. // month: "04",
  607. // target: 98,
  608. // real: 33
  609. // });
  610. // list.push({
  611. // month: "05",
  612. // target: 98,
  613. // real: 96
  614. // });
  615. // list.push({
  616. // month: "06",
  617. // target: 98,
  618. // real: 95
  619. // });
  620. // list.push({
  621. // month: "07",
  622. // target: 98,
  623. // real: 99
  624. // });
  625. // list.push({
  626. // month: "08",
  627. // target: 98,
  628. // real: 100
  629. // });
  630. // list.push({
  631. // month: "09",
  632. // target: 98,
  633. // real: 98
  634. // });
  635. // $.each(list, function (index, item) {
  636. // item.label = item.month;
  637. // item.label1 = "质量目标";
  638. // item.sum1 = item.target;
  639. // item.label2 = "合格率";
  640. // item.sum2 = item.real;
  641. // });
  642. // return list;
  643. },
  644. // 当月供应商合格率
  645. getPassRateByVendor: function () {
  646. // return {
  647. // "供应商A":98,
  648. // "供应商B":95,
  649. // "供应商C":94,
  650. // "供应商D":93,
  651. // "供应商E":99,
  652. // "供应商F":97
  653. // }
  654. return MethodGetService.methodGet("/fbsPuArrivalvouch/fbsPuArrivalvouch/getPassRateByVendor");
  655. },
  656. // 当月检验合格率
  657. getCheckRateByBatchno: function () {
  658. // return {
  659. // "07001":98,
  660. // "07002":95,
  661. // "07003":94,
  662. // "07004":93,
  663. // "07005":99,
  664. // "07006":97
  665. // }
  666. return MethodGetService.methodGet("/fbsPuArrivalvouch/fbsPuArrivalvouch/getCheckRateByBatchno");
  667. },
  668. // 未来几天内到货计划
  669. getQualityUnpassList:function(days){
  670. const materialList = [];
  671. materialList.push({
  672. vendorName:"A公司",
  673. materialCode:"10001",
  674. materialName:"物料A",
  675. specs:"3*4",
  676. arriveSum:"100",
  677. checkSum:"10",
  678. unpassSum:"1",
  679. checkDate:"09月18日",
  680. images:[
  681. "/images/quality/11.png",
  682. "/images/quality/12.png"
  683. ]
  684. });
  685. materialList.push({
  686. vendorName:"B公司",
  687. materialCode:"10002",
  688. materialName:"物料B",
  689. specs:"3*4",
  690. arriveSum:"200",
  691. checkSum:"10",
  692. unpassSum:"1",
  693. checkDate:"09月18日",
  694. images:[
  695. "/images/quality/13.png",
  696. "/images/quality/21.png"
  697. ]
  698. });
  699. materialList.push({
  700. vendorName:"C公司",
  701. materialCode:"10003",
  702. materialName:"物料C",
  703. specs:"3*4",
  704. arriveSum:"300",
  705. checkSum:"10",
  706. unpassSum:"1",
  707. checkDate:"09月18日",
  708. images:[
  709. "/images/quality/22.png",
  710. "/images/quality/23.png"
  711. ]
  712. });
  713. materialList.push({
  714. vendorName:"D公司",
  715. materialCode:"10004",
  716. materialName:"物料D",
  717. specs:"3*4",
  718. arriveSum:"400",
  719. checkSum:"10",
  720. unpassSum:"1",
  721. checkDate:"09月18日",
  722. images:[
  723. "/images/quality/11.png",
  724. "/images/quality/12.png",
  725. "/images/quality/13.png"
  726. ]
  727. });
  728. materialList.push({
  729. vendorName:"E公司",
  730. materialCode:"10005",
  731. materialName:"物料E",
  732. specs:"3*4",
  733. arriveSum:"500",
  734. checkSum:"10",
  735. unpassSum:"1",
  736. checkDate:"09月18日",
  737. images:[
  738. "/images/quality/21.png",
  739. "/images/quality/22.png",
  740. "/images/quality/23.png"
  741. ]
  742. });
  743. materialList.push({
  744. vendorName:"F公司",
  745. materialCode:"10006",
  746. materialName:"物料F",
  747. specs:"3*4",
  748. arriveSum:"600",
  749. checkSum:"10",
  750. unpassSum:"1",
  751. checkDate:"09月18日",
  752. images:[
  753. "/images/quality/11.png",
  754. "/images/quality/12.png",
  755. "/images/quality/13.png",
  756. "/images/quality/21.png"
  757. ]
  758. });
  759. materialList.push({
  760. vendorName:"A公司",
  761. materialCode:"10001",
  762. materialName:"物料A",
  763. specs:"3*4",
  764. arriveSum:"100",
  765. checkSum:"10",
  766. unpassSum:"1",
  767. checkDate:"09月18日",
  768. images:[
  769. "/images/quality/12.png",
  770. "/images/quality/13.png",
  771. "/images/quality/21.png",
  772. "/images/quality/22.png"
  773. ]
  774. });
  775. materialList.push({
  776. vendorName:"B公司",
  777. materialCode:"10002",
  778. materialName:"物料B",
  779. specs:"3*4",
  780. arriveSum:"200",
  781. checkSum:"10",
  782. unpassSum:"1",
  783. checkDate:"09月18日",
  784. images:[
  785. "/images/quality/21.png",
  786. "/images/quality/22.png",
  787. "/images/quality/13.png",
  788. "/images/quality/23.png"
  789. ]
  790. });
  791. materialList.push({
  792. vendorName:"C公司",
  793. materialCode:"10003",
  794. materialName:"物料C",
  795. specs:"3*4",
  796. arriveSum:"300",
  797. checkSum:"10",
  798. unpassSum:"1",
  799. checkDate:"09月18日",
  800. images:[
  801. "/images/quality/22.png",
  802. "/images/quality/13.png",
  803. "/images/quality/23.png"
  804. ]
  805. });
  806. materialList.push({
  807. vendorName:"D公司",
  808. materialCode:"10004",
  809. materialName:"物料D",
  810. specs:"3*4",
  811. arriveSum:"400",
  812. checkSum:"10",
  813. unpassSum:"1",
  814. checkDate:"09月18日",
  815. images:[
  816. "/images/quality/21.png",
  817. "/images/quality/22.png",
  818. "/images/quality/13.png",
  819. "/images/quality/23.png",
  820. "/images/quality/11.png",
  821. "/images/quality/12.png"
  822. ]
  823. });
  824. materialList.push({
  825. vendorName:"E公司",
  826. materialCode:"10005",
  827. materialName:"物料E",
  828. specs:"3*4",
  829. arriveSum:"500",
  830. checkSum:"10",
  831. unpassSum:"1",
  832. checkDate:"09月18日",
  833. images:[
  834. "/images/quality/23.png",
  835. "/images/quality/21.png",
  836. "/images/quality/11.png",
  837. "/images/quality/22.png",
  838. "/images/quality/13.png",
  839. "/images/quality/12.png"
  840. ]
  841. });
  842. materialList.push({
  843. vendorName:"F公司",
  844. materialCode:"10006",
  845. materialName:"物料F",
  846. specs:"3*4",
  847. arriveSum:"600",
  848. checkSum:"10",
  849. unpassSum:"1",
  850. checkDate:"09月18日",
  851. images:[
  852. "/images/quality/13.png",
  853. "/images/quality/12.png",
  854. "/images/quality/23.png",
  855. "/images/quality/22.png",
  856. "/images/quality/11.png",
  857. "/images/quality/21.png"
  858. ]
  859. });
  860. materialList.push({
  861. vendorName:"B公司",
  862. materialCode:"10002",
  863. materialName:"物料B",
  864. specs:"3*4",
  865. arriveSum:"200",
  866. checkSum:"10",
  867. unpassSum:"1",
  868. checkDate:"09月18日",
  869. images:[
  870. "/images/quality/13.png",
  871. "/images/quality/21.png"
  872. ]
  873. });
  874. materialList.push({
  875. vendorName:"C公司",
  876. materialCode:"10003",
  877. materialName:"物料C",
  878. specs:"3*4",
  879. arriveSum:"300",
  880. checkSum:"10",
  881. unpassSum:"1",
  882. checkDate:"09月18日",
  883. images:[
  884. "/images/quality/22.png",
  885. "/images/quality/23.png"
  886. ]
  887. });
  888. materialList.push({
  889. vendorName:"D公司",
  890. materialCode:"10004",
  891. materialName:"物料D",
  892. specs:"3*4",
  893. arriveSum:"400",
  894. checkSum:"10",
  895. unpassSum:"1",
  896. checkDate:"09月18日",
  897. images:[
  898. "/images/quality/11.png",
  899. "/images/quality/12.png",
  900. "/images/quality/13.png"
  901. ]
  902. });
  903. materialList.push({
  904. vendorName:"E公司",
  905. materialCode:"10005",
  906. materialName:"物料E",
  907. specs:"3*4",
  908. arriveSum:"500",
  909. checkSum:"10",
  910. unpassSum:"1",
  911. checkDate:"09月18日",
  912. images:[
  913. "/images/quality/21.png",
  914. "/images/quality/22.png",
  915. "/images/quality/23.png"
  916. ]
  917. });
  918. materialList.push({
  919. vendorName:"F公司",
  920. materialCode:"10006",
  921. materialName:"物料F",
  922. specs:"3*4",
  923. arriveSum:"600",
  924. checkSum:"10",
  925. unpassSum:"1",
  926. checkDate:"09月18日",
  927. images:[
  928. "/images/quality/11.png",
  929. "/images/quality/12.png",
  930. "/images/quality/13.png",
  931. "/images/quality/21.png"
  932. ]
  933. });
  934. materialList.push({
  935. vendorName:"A公司",
  936. materialCode:"10001",
  937. materialName:"物料A",
  938. specs:"3*4",
  939. arriveSum:"100",
  940. checkSum:"10",
  941. unpassSum:"1",
  942. checkDate:"09月18日",
  943. images:[
  944. "/images/quality/12.png",
  945. "/images/quality/13.png",
  946. "/images/quality/21.png",
  947. "/images/quality/22.png"
  948. ]
  949. });
  950. materialList.push({
  951. vendorName:"B公司",
  952. materialCode:"10002",
  953. materialName:"物料B",
  954. specs:"3*4",
  955. arriveSum:"200",
  956. checkSum:"10",
  957. unpassSum:"1",
  958. checkDate:"09月18日",
  959. images:[
  960. "/images/quality/21.png",
  961. "/images/quality/22.png",
  962. "/images/quality/13.png",
  963. "/images/quality/23.png"
  964. ]
  965. });
  966. materialList.push({
  967. vendorName:"C公司",
  968. materialCode:"10003",
  969. materialName:"物料C",
  970. specs:"3*4",
  971. arriveSum:"300",
  972. checkSum:"10",
  973. unpassSum:"1",
  974. checkDate:"09月18日",
  975. images:[
  976. "/images/quality/22.png",
  977. "/images/quality/13.png",
  978. "/images/quality/23.png"
  979. ]
  980. });
  981. materialList.push({
  982. vendorName:"D公司",
  983. materialCode:"10004",
  984. materialName:"物料D",
  985. specs:"3*4",
  986. arriveSum:"400",
  987. checkSum:"10",
  988. unpassSum:"1",
  989. checkDate:"09月18日",
  990. images:[
  991. "/images/quality/21.png",
  992. "/images/quality/22.png",
  993. "/images/quality/13.png",
  994. "/images/quality/23.png",
  995. "/images/quality/11.png",
  996. "/images/quality/12.png"
  997. ]
  998. });
  999. materialList.push({
  1000. vendorName:"E公司",
  1001. materialCode:"10005",
  1002. materialName:"物料E",
  1003. specs:"3*4",
  1004. arriveSum:"500",
  1005. checkSum:"10",
  1006. unpassSum:"1",
  1007. checkDate:"09月18日",
  1008. images:[
  1009. "/images/quality/23.png",
  1010. "/images/quality/21.png",
  1011. "/images/quality/11.png",
  1012. "/images/quality/22.png",
  1013. "/images/quality/13.png",
  1014. "/images/quality/12.png"
  1015. ]
  1016. });
  1017. materialList.push({
  1018. vendorName:"F公司",
  1019. materialCode:"10006",
  1020. materialName:"物料F",
  1021. specs:"3*4",
  1022. arriveSum:"600",
  1023. checkSum:"10",
  1024. unpassSum:"1",
  1025. checkDate:"09月18日",
  1026. images:[
  1027. "/images/quality/13.png",
  1028. "/images/quality/12.png",
  1029. "/images/quality/23.png",
  1030. "/images/quality/22.png",
  1031. "/images/quality/11.png",
  1032. "/images/quality/21.png"
  1033. ]
  1034. });
  1035. var i = 1;
  1036. $.each(materialList, function(index,item){
  1037. item.index = i++;
  1038. item.passRate = ((item.checkSum-item.unpassSum)/item.checkSum*100).toFixed(0)+"%";
  1039. })
  1040. return materialList;
  1041. },
  1042. }