material.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  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. return materialList;
  301. },
  302. // 工单缺料
  303. getListByOrderSheetNotEnough:function(){
  304. const materialList = [];
  305. materialList.push({
  306. orderSheetCode:"G10001",
  307. materialCode:"10001",
  308. materialName:"物料A",
  309. specs:"3*4",
  310. needSum:"30",
  311. stockSum:"20"
  312. });
  313. materialList.push({
  314. orderSheetCode:"G10001",
  315. materialCode:"10002",
  316. materialName:"物料B",
  317. specs:"3*4",
  318. needSum:"55",
  319. stockSum:"30"
  320. });
  321. materialList.push({
  322. orderSheetCode:"G10002",
  323. materialCode:"10003",
  324. materialName:"物料C",
  325. specs:"3*4",
  326. needSum:"40",
  327. stockSum:"20"
  328. });
  329. materialList.push({
  330. orderSheetCode:"G10003",
  331. materialCode:"10004",
  332. materialName:"物料D",
  333. specs:"3*4",
  334. needSum:"40",
  335. stockSum:"30"
  336. });
  337. materialList.push({
  338. orderSheetCode:"G10004",
  339. materialCode:"10005",
  340. materialName:"物料E",
  341. specs:"3*4",
  342. needSum:"25",
  343. stockSum:"20"
  344. });
  345. return materialList;
  346. },
  347. // 工单齐套
  348. getListByOrderSheetEnough:function(){
  349. const materialList = [];
  350. materialList.push({
  351. orderSheetCode:"G10001",
  352. materialCode:"10001",
  353. materialName:"物料A",
  354. specs:"3*4",
  355. needSum:"10",
  356. stockSum:"20"
  357. });
  358. materialList.push({
  359. orderSheetCode:"G10001",
  360. materialCode:"10002",
  361. materialName:"物料B",
  362. specs:"3*4",
  363. needSum:"15",
  364. stockSum:"30"
  365. });
  366. materialList.push({
  367. orderSheetCode:"G10002",
  368. materialCode:"10003",
  369. materialName:"物料C",
  370. specs:"3*4",
  371. needSum:"20",
  372. stockSum:"20"
  373. });
  374. materialList.push({
  375. orderSheetCode:"G10003",
  376. materialCode:"10004",
  377. materialName:"物料D",
  378. specs:"3*4",
  379. needSum:"30",
  380. stockSum:"30"
  381. });
  382. materialList.push({
  383. orderSheetCode:"G10003",
  384. materialCode:"10004",
  385. materialName:"物料D",
  386. specs:"3*4",
  387. needSum:"30",
  388. stockSum:"30"
  389. });
  390. materialList.push({
  391. orderSheetCode:"G10003",
  392. materialCode:"10004",
  393. materialName:"物料D",
  394. specs:"3*4",
  395. needSum:"30",
  396. stockSum:"30"
  397. });
  398. materialList.push({
  399. orderSheetCode:"G10003",
  400. materialCode:"10004",
  401. materialName:"物料D",
  402. specs:"3*4",
  403. needSum:"30",
  404. stockSum:"30"
  405. });
  406. materialList.push({
  407. orderSheetCode:"G10003",
  408. materialCode:"10004",
  409. materialName:"物料D",
  410. specs:"3*4",
  411. needSum:"30",
  412. stockSum:"30"
  413. });
  414. materialList.push({
  415. orderSheetCode:"G10003",
  416. materialCode:"10004",
  417. materialName:"物料D",
  418. specs:"3*4",
  419. needSum:"30",
  420. stockSum:"30"
  421. });
  422. materialList.push({
  423. orderSheetCode:"G10004",
  424. materialCode:"10005",
  425. materialName:"物料E",
  426. specs:"3*4",
  427. needSum:"15",
  428. stockSum:"20"
  429. });
  430. return materialList;
  431. },
  432. // 领料申请通知
  433. getApplyList:function(){
  434. const materialList = [];
  435. materialList.push({
  436. orderSheetCode:"G10001",
  437. materialCode:"10001",
  438. materialName:"物料A",
  439. specs:"3*4",
  440. applyPerson:"张三",
  441. applysum:"20"
  442. });
  443. materialList.push({
  444. orderSheetCode:"G10001",
  445. materialCode:"10002",
  446. materialName:"物料B",
  447. specs:"3*4",
  448. applyPerson:"张三",
  449. applysum:"20"
  450. });
  451. materialList.push({
  452. orderSheetCode:"G10002",
  453. materialCode:"10003",
  454. materialName:"物料C",
  455. specs:"3*4",
  456. applyPerson:"张三",
  457. applysum:"20"
  458. });
  459. materialList.push({
  460. orderSheetCode:"G10003",
  461. materialCode:"10004",
  462. materialName:"物料D",
  463. specs:"3*4",
  464. applyPerson:"张三",
  465. applysum:"20"
  466. });
  467. materialList.push({
  468. orderSheetCode:"G10004",
  469. materialCode:"10005",
  470. materialName:"物料E",
  471. specs:"3*4",
  472. applyPerson:"张三",
  473. applysum:"20"
  474. });
  475. return materialList;
  476. },
  477. // 领料申请完成数量
  478. getApplyCompleteSum:function(){
  479. return 10;
  480. },
  481. // 未来几天内到货计划
  482. getWillArriveList:function(days){
  483. // return getService.methodGet("/fbsPuArrivalvouch/fbsArrivalVouchs/getWillArriveList");
  484. const materialList = [];
  485. materialList.push({
  486. vendorName:"A公司",
  487. materialCode:"10001",
  488. materialName:"物料A",
  489. specs:"3*4",
  490. arriveSum:"10",
  491. arriveDate:"09月18日",
  492. memo:""
  493. });
  494. materialList.push({
  495. vendorName:"B公司",
  496. materialCode:"10002",
  497. materialName:"物料B",
  498. specs:"3*4",
  499. arriveSum:"20",
  500. arriveDate:"09月18日",
  501. memo:""
  502. });
  503. materialList.push({
  504. vendorName:"C公司",
  505. materialCode:"10003",
  506. materialName:"物料C",
  507. specs:"3*4",
  508. arriveSum:"30",
  509. arriveDate:"09月18日",
  510. memo:""
  511. });
  512. materialList.push({
  513. vendorName:"D公司",
  514. materialCode:"10004",
  515. materialName:"物料D",
  516. specs:"3*4",
  517. arriveSum:"40",
  518. arriveDate:"09月18日",
  519. memo:""
  520. });
  521. materialList.push({
  522. vendorName:"E公司",
  523. materialCode:"10005",
  524. materialName:"物料E",
  525. specs:"3*4",
  526. arriveSum:"50",
  527. arriveDate:"09月18日",
  528. memo:""
  529. });
  530. materialList.push({
  531. vendorName:"F公司",
  532. materialCode:"10006",
  533. materialName:"物料F",
  534. specs:"3*4",
  535. arriveSum:"60",
  536. arriveDate:"09月18日",
  537. memo:""
  538. });
  539. var i = 1;
  540. $.each(materialList, function(index,item){
  541. item.index = i++;
  542. })
  543. return materialList;
  544. },
  545. // 当天到货批数
  546. getTodayArriveSum:function(){
  547. return 100;
  548. },
  549. // 未来几天到货批数
  550. getWillArriveSum:function(days){
  551. return 300;
  552. },
  553. // 当月到货批数
  554. getThisMonthArriveSum:function(){
  555. return 7882;
  556. },
  557. // 未入库总批数
  558. getNotInSum:function(){
  559. return 90;
  560. },
  561. // 近6个月质量目标合格率比较
  562. getLastSixMonthQualityTargetCompare: function () {
  563. const list = [];
  564. list.push({
  565. month: "04",
  566. target: 98,
  567. real: 97
  568. });
  569. list.push({
  570. month: "05",
  571. target: 98,
  572. real: 96
  573. });
  574. list.push({
  575. month: "06",
  576. target: 98,
  577. real: 95
  578. });
  579. list.push({
  580. month: "07",
  581. target: 98,
  582. real: 99
  583. });
  584. list.push({
  585. month: "08",
  586. target: 98,
  587. real: 100
  588. });
  589. list.push({
  590. month: "09",
  591. target: 98,
  592. real: 98
  593. });
  594. $.each(list, function (index, item) {
  595. item.label = item.month;
  596. item.label1 = "质量目标";
  597. item.sum1 = item.target;
  598. item.label2 = "合格率";
  599. item.sum2 = item.real;
  600. });
  601. return list;
  602. },
  603. // 当月供应商合格率
  604. getPassRateByVendor: function () {
  605. return {
  606. "供应商A":98,
  607. "供应商B":95,
  608. "供应商C":94,
  609. "供应商D":93,
  610. "供应商E":99,
  611. "供应商F":97
  612. }
  613. },
  614. // 当月检验合格率
  615. getCheckRateByBatchno: function () {
  616. return {
  617. "07001":98,
  618. "07002":95,
  619. "07003":94,
  620. "07004":93,
  621. "07005":99,
  622. "07006":97
  623. }
  624. },
  625. // 未来几天内到货计划
  626. getQualityUnpassList:function(days){
  627. const materialList = [];
  628. materialList.push({
  629. vendorName:"A公司",
  630. materialCode:"10001",
  631. materialName:"物料A",
  632. specs:"3*4",
  633. arriveSum:"100",
  634. checkSum:"10",
  635. unpassSum:"1",
  636. checkDate:"09月18日",
  637. images:[
  638. "/images/quality/11.png",
  639. "/images/quality/12.png"
  640. ]
  641. });
  642. materialList.push({
  643. vendorName:"B公司",
  644. materialCode:"10002",
  645. materialName:"物料B",
  646. specs:"3*4",
  647. arriveSum:"200",
  648. checkSum:"10",
  649. unpassSum:"1",
  650. checkDate:"09月18日",
  651. images:[
  652. "/images/quality/13.png",
  653. "/images/quality/21.png"
  654. ]
  655. });
  656. materialList.push({
  657. vendorName:"C公司",
  658. materialCode:"10003",
  659. materialName:"物料C",
  660. specs:"3*4",
  661. arriveSum:"300",
  662. checkSum:"10",
  663. unpassSum:"1",
  664. checkDate:"09月18日",
  665. images:[
  666. "/images/quality/22.png",
  667. "/images/quality/23.png"
  668. ]
  669. });
  670. materialList.push({
  671. vendorName:"D公司",
  672. materialCode:"10004",
  673. materialName:"物料D",
  674. specs:"3*4",
  675. arriveSum:"400",
  676. checkSum:"10",
  677. unpassSum:"1",
  678. checkDate:"09月18日",
  679. images:[
  680. "/images/quality/11.png",
  681. "/images/quality/12.png",
  682. "/images/quality/13.png"
  683. ]
  684. });
  685. materialList.push({
  686. vendorName:"E公司",
  687. materialCode:"10005",
  688. materialName:"物料E",
  689. specs:"3*4",
  690. arriveSum:"500",
  691. checkSum:"10",
  692. unpassSum:"1",
  693. checkDate:"09月18日",
  694. images:[
  695. "/images/quality/21.png",
  696. "/images/quality/22.png",
  697. "/images/quality/23.png"
  698. ]
  699. });
  700. materialList.push({
  701. vendorName:"F公司",
  702. materialCode:"10006",
  703. materialName:"物料F",
  704. specs:"3*4",
  705. arriveSum:"600",
  706. checkSum:"10",
  707. unpassSum:"1",
  708. checkDate:"09月18日",
  709. images:[
  710. "/images/quality/11.png",
  711. "/images/quality/12.png",
  712. "/images/quality/13.png",
  713. "/images/quality/21.png"
  714. ]
  715. });
  716. materialList.push({
  717. vendorName:"A公司",
  718. materialCode:"10001",
  719. materialName:"物料A",
  720. specs:"3*4",
  721. arriveSum:"100",
  722. checkSum:"10",
  723. unpassSum:"1",
  724. checkDate:"09月18日",
  725. images:[
  726. "/images/quality/12.png",
  727. "/images/quality/13.png",
  728. "/images/quality/21.png",
  729. "/images/quality/22.png"
  730. ]
  731. });
  732. materialList.push({
  733. vendorName:"B公司",
  734. materialCode:"10002",
  735. materialName:"物料B",
  736. specs:"3*4",
  737. arriveSum:"200",
  738. checkSum:"10",
  739. unpassSum:"1",
  740. checkDate:"09月18日",
  741. images:[
  742. "/images/quality/21.png",
  743. "/images/quality/22.png",
  744. "/images/quality/13.png",
  745. "/images/quality/23.png"
  746. ]
  747. });
  748. materialList.push({
  749. vendorName:"C公司",
  750. materialCode:"10003",
  751. materialName:"物料C",
  752. specs:"3*4",
  753. arriveSum:"300",
  754. checkSum:"10",
  755. unpassSum:"1",
  756. checkDate:"09月18日",
  757. images:[
  758. "/images/quality/22.png",
  759. "/images/quality/13.png",
  760. "/images/quality/23.png"
  761. ]
  762. });
  763. materialList.push({
  764. vendorName:"D公司",
  765. materialCode:"10004",
  766. materialName:"物料D",
  767. specs:"3*4",
  768. arriveSum:"400",
  769. checkSum:"10",
  770. unpassSum:"1",
  771. checkDate:"09月18日",
  772. images:[
  773. "/images/quality/21.png",
  774. "/images/quality/22.png",
  775. "/images/quality/13.png",
  776. "/images/quality/23.png",
  777. "/images/quality/11.png",
  778. "/images/quality/12.png"
  779. ]
  780. });
  781. materialList.push({
  782. vendorName:"E公司",
  783. materialCode:"10005",
  784. materialName:"物料E",
  785. specs:"3*4",
  786. arriveSum:"500",
  787. checkSum:"10",
  788. unpassSum:"1",
  789. checkDate:"09月18日",
  790. images:[
  791. "/images/quality/23.png",
  792. "/images/quality/21.png",
  793. "/images/quality/11.png",
  794. "/images/quality/22.png",
  795. "/images/quality/13.png",
  796. "/images/quality/12.png"
  797. ]
  798. });
  799. materialList.push({
  800. vendorName:"F公司",
  801. materialCode:"10006",
  802. materialName:"物料F",
  803. specs:"3*4",
  804. arriveSum:"600",
  805. checkSum:"10",
  806. unpassSum:"1",
  807. checkDate:"09月18日",
  808. images:[
  809. "/images/quality/13.png",
  810. "/images/quality/12.png",
  811. "/images/quality/23.png",
  812. "/images/quality/22.png",
  813. "/images/quality/11.png",
  814. "/images/quality/21.png"
  815. ]
  816. });
  817. var i = 1;
  818. $.each(materialList, function(index,item){
  819. if (i == 1){
  820. item.bg = "selectrow";
  821. }else{
  822. item.bg = "";
  823. }
  824. item.index = i++;
  825. item.passRate = ((item.checkSum-item.unpassSum)/item.checkSum*100).toFixed(0)+"%";
  826. })
  827. return materialList;
  828. },
  829. }