up3.vue 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <div id="up3">
  3. <div class="bg-color-black">
  4. <div class="d-flex pt-1 pl-2 jc-center">
  5. <span class="fs-xxxl text mx-2 fw-b">来料检验数据</span>
  6. </div>
  7. <div class="jc-center body-box">
  8. <div class="body-box d-flex">
  9. <div class="item d-flex jc-center flex-column">
  10. <div class="location">
  11. <div class="circle-hollow">
  12. <div class="info">
  13. <h2 class="pb-2">{{inQty}}</h2>
  14. <p class="fs-xxl pt-2">
  15. 已检验批次
  16. </p>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="item d-flex jc-center flex-column">
  22. <div class="circle-hollow">
  23. <div class="info">
  24. <h2 class="pb-2">{{outQty}}</h2>
  25. <p class="fs-xxl pt-2">
  26. 待检验批次
  27. </p>
  28. </div>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="d-flex pt-2 pl-2 jc-center pb-1 mb-1">
  34. <span class="fs-xxxl text mx-2 fw-b">来料不良批次</span>
  35. </div>
  36. <div class="d-flex jc-center body-box">
  37. <dv-scroll-board :config="config" ref="scroll-board" />
  38. </div>
  39. </div>
  40. </div>
  41. </template>
  42. <script>
  43. import {mapState} from "vuex";
  44. export default {
  45. computed: {
  46. //数组写法
  47. ...mapState(['user','factoryoptions','factory']),
  48. },
  49. data() {
  50. return {
  51. config: {
  52. header: ['供方编号','物料编号', '物料名称','批次数量','处理结果'],
  53. data: [],
  54. rowNum: 4, //表格行数
  55. headerHeight: 40,
  56. headerBGC: 'rgba(15,19,37,0.1)', //表头
  57. oddRowBGC: 'rgba(15,19,37,0.1)', //奇数行
  58. evenRowBGC: 'rgba(23,28,51,0.1)', //偶数行
  59. columnWidth: [130,200, 100,100,100],
  60. align: ['left','center','center','center','center'],
  61. },
  62. timing: null,
  63. }
  64. },
  65. mounted() {
  66. this.refreshdata();
  67. },
  68. beforeDestroy () {
  69. clearInterval(this.timing)
  70. },
  71. methods: {
  72. refreshdata() {
  73. this.getdata(); //获取-数据
  74. this.timing = setInterval(() => {
  75. this.getdata(); //获取--数据
  76. }, 10000);
  77. },
  78. async getdata() {
  79. this.finishQty = 0;
  80. this.unfinishQty = 0;
  81. this.inQty = 0;
  82. this.outQty = 0;
  83. //备料完成情况
  84. caller = 'KB!WHCHECKDATA';
  85. await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
  86. params: {
  87. condition: "1=1"
  88. }
  89. }).then((result) => {
  90. let dataList = JSON.parse(result.data.data);
  91. if(dataList.length>0){
  92. this.inQty = dataList[0].inqty;
  93. this.outQty = dataList[0].outqty;
  94. }
  95. }, (result) => {
  96. console.error(result)
  97. }
  98. );
  99. var caller = 'KB!WHQCRECHECK';
  100. await this.$http.get("kanban/datalist.action?caller=" + caller + "&_noc=1&page=1&pageSize=100", {
  101. params: {
  102. condition: "1=1" ,
  103. }
  104. }).then((result) => {
  105. let dataList = JSON.parse(result.data.data);
  106. let resultList = new Array();
  107. for (let index = 0; index < dataList.length; index++) {
  108. const element = dataList[index];
  109. let item = new Array();
  110. if(element.qc_result=='不合格'){
  111. item.push("<span class='colorRed fs-xl'>" + element.ve_code + "</span>");
  112. item.push("<span class='colorRed fs-xl'>" + element.pr_code + "</span>");
  113. item.push("<span class='colorRed fs-xl'>" + element.pr_detail + "</span>");
  114. item.push("<span class='colorRed fs-xl'>" + element.qc_qty + "</span>");
  115. item.push("<span class='colorRed fs-xl'>" + element.qc_result + "</span>");
  116. }
  117. else if(element.qc_result=='特采'){
  118. item.push("<span class='colorRemind fs-xl'>" + element.ve_code + "</span>");
  119. item.push("<span class='colorRemind fs-xl'>" + element.pr_code + "</span>");
  120. item.push("<span class='colorRemind fs-xl'>" + element.pr_detail + "</span>");
  121. item.push("<span class='colorRemind fs-xl'>" + element.qc_qty + "</span>");
  122. item.push("<span class='colorRemind fs-xl'>" + element.qc_result + "</span>");
  123. }else {
  124. item.push("<span class='colorGrass fs-xl'>" + element.ve_code + "</span>");
  125. item.push("<span class='colorGrass fs-xl'>" + element.pr_code + "</span>");
  126. item.push("<span class='colorGrass fs-xl'>" + element.pr_detail + "</span>");
  127. item.push("<span class='colorGrass fs-xl'>" + element.qc_qty + "</span>");
  128. item.push("<span class='colorGrass fs-xl'>" + element.qc_result + "</span>");
  129. }
  130. resultList.push(item);
  131. }
  132. this.config.data = resultList;
  133. this.config = { ...this.config };
  134. }, (result) => {
  135. console.error(result)
  136. }
  137. );
  138. }
  139. }
  140. }
  141. </script>
  142. <style lang="scss" scoped>
  143. $box-height: 475px;
  144. $box-width: 100%;
  145. #up3 {
  146. padding: 13px;
  147. height: $box-height;
  148. // font-size: 32px;
  149. width: $box-width;
  150. border-radius: 5px;
  151. .bg-color-black {
  152. height: $box-height - 25px;
  153. border-radius: 10px;
  154. padding: 5px;
  155. width: $box-width;
  156. .body-box {
  157. padding-top: 15px;
  158. }
  159. }
  160. .text {
  161. color: #c3cbde;
  162. //font-size: 15px;
  163. }
  164. .body-box {
  165. width: $box-width;
  166. ::v-deep .dv-scroll-board {
  167. height: 180px;
  168. padding-top: 0px; // 添加这行减少顶部间距
  169. .header {
  170. font-size: 20px !important;
  171. color: #c3cbde !important;
  172. }
  173. .rows {
  174. .row-item {
  175. font-size: 20px !important;
  176. color: #c3cbde !important;
  177. }
  178. }
  179. }
  180. }
  181. .item {
  182. width: 50%;
  183. align-items: center;
  184. /*.location{
  185. position: absolute;
  186. left: 20%;
  187. }*/
  188. .circle-hollow {
  189. width: 170px;
  190. height: 170px;
  191. border: 3px solid #4ecdc4; /* 边框样式 */
  192. border-radius: 50%;
  193. background-color: transparent; /* 透明背景 */
  194. display: flex;
  195. justify-content: center;
  196. align-items: center;
  197. letter-spacing:2px;
  198. flex-direction: column; /* 文字垂直排列 */
  199. box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* 阴影效果 */
  200. .info{
  201. text-align: center;
  202. width: 140px;
  203. p{
  204. border-top: 1px solid #ddd;
  205. }
  206. }
  207. }
  208. }
  209. }
  210. </style>