wuliaocaiji.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. <template>
  2. <div class="scanCode">
  3. <ScanCodeInput v-model="scanCode" @enterfnc="enterfnc" />
  4. </div>
  5. <div class="showCodeBody" v-if="opCompentDataList.length < 1">
  6. <div class="codeBox">
  7. <img src="@/assets/icons/shaoma.svg" style="width: 134px; height: 134px" />
  8. <div class="codeText">扫码物料码添加物料</div>
  9. </div>
  10. </div>
  11. <div class="materialInfoBody" v-else>
  12. <div :class="item.needNum - item.realNum == 0 ? 'infoMsg infoMsgImg' : 'infoMsg'
  13. " v-for="item in opCompentDataList" @click="toXQPop(item)">
  14. <div class="leftMsg">
  15. <div class="nameMsg">{{ item.itemName }}</div>
  16. <div class="describe">{{ item.itemModel }}</div>
  17. <div class="describe">需求:{{ item.needNum }}</div>
  18. </div>
  19. <div class="rightMsg" v-if="item.needNum - item.realNum != 0">
  20. <div class="sum">{{ item.needNum - item.realNum }}</div>
  21. <div class="describe">还需采集</div>
  22. </div>
  23. <svg-icon icon-class="jiaobiao" size="25" class="svgStyle" />
  24. </div>
  25. </div>
  26. <xiangqingPopUp v-model="showXQ" />
  27. <caijiRightPopUp v-model="showCJ" />
  28. </template>
  29. <script lang="ts" setup>
  30. import ScanCodeInput from "@/components/ScanCodeInput/index.vue";
  31. import caijiRightPopUp from "../popUpView/caijiRightPopUp.vue";
  32. import xiangqingPopUp from "../popUpView/xiangqingPopUp.vue";
  33. import {
  34. recordList,
  35. searchMaterial,
  36. itemInfoList,
  37. } from "@/api/prosteps/wuliaocaiji";
  38. import { useProcessStore } from "@/store";
  39. defineOptions({
  40. name: "Wuliaocaiji",
  41. });
  42. const store = useProcessStore();
  43. const scanCode = ref("");
  44. const showXQ = ref(false);
  45. const showCJ = ref(false);
  46. const enterfnc = async () => {
  47. // const { code, data } = await searchMaterial({
  48. // operationId: store.odersData.operationId,
  49. // processId: "",
  50. // seqNo: scanCode.value,
  51. // workOrderCode: store.odersData.workOrderCode,
  52. // });
  53. const { code, data } = await searchMaterial({
  54. operationId: "214",
  55. processId: "14",
  56. seqNo: "1202010000005",
  57. workOrderCode: "GD2404150002",
  58. });
  59. if (code == "200") {
  60. showCJ.value = true;
  61. }
  62. };
  63. const opCompentDataList = ref([]);
  64. const toXQPop = async (item: any) => {
  65. showXQ.value = true;
  66. };
  67. //获取tag列表数据
  68. const getOpCompentData = async () => {
  69. // const { data } = await recordList({
  70. // operationId: store.odersData.operationId,
  71. // workOrderCode: store.odersData.workOrderCode,
  72. // pageNo: 1,
  73. // pageSize: 9999,
  74. // });
  75. const { data } = await recordList({
  76. operationId: "241",
  77. workOrderCode: "GD2404100005",
  78. pageNo: 1,
  79. pageSize: 9999,
  80. });
  81. opCompentDataList.value = data;
  82. };
  83. const input = ref("");
  84. onMounted(() => {
  85. getOpCompentData();
  86. });
  87. </script>
  88. <style lang="scss" scoped>
  89. .scanCode {
  90. width: 40%;
  91. margin-top: $p5;
  92. }
  93. .materialInfoBody {
  94. width: calc((100vw / 6 * 5) - 50px);
  95. margin-top: $p10;
  96. display: grid;
  97. gap: 20px;
  98. grid-template-columns: 1fr 1fr;
  99. .infoMsgImg {
  100. background-image: url("@/assets/images/caijiwancheng.png");
  101. background-position: right top;
  102. background-repeat: no-repeat;
  103. }
  104. .infoMsg {
  105. min-width: 600px;
  106. height: 190px;
  107. background-color: white;
  108. border-radius: 16px;
  109. display: flex;
  110. padding: $p20;
  111. justify-content: space-between;
  112. align-items: center;
  113. position: relative;
  114. .svgStyle {
  115. position: absolute;
  116. bottom: 0;
  117. right: 0;
  118. }
  119. .describe {
  120. font-size: $f20;
  121. color: $font-default-60;
  122. line-height: 30px;
  123. }
  124. .leftMsg {
  125. .nameMsg {
  126. font-size: $f24;
  127. font-weight: $Medium;
  128. }
  129. }
  130. .rightMsg {
  131. .sum {
  132. font-size: $f38;
  133. font-weight: bold;
  134. line-height: 38px;
  135. text-align: right;
  136. }
  137. }
  138. }
  139. }
  140. .showCodeBody {
  141. width: calc((100vw / 6 * 5) - 50px);
  142. height: calc((100vh - 240px));
  143. @include flex;
  144. .codeBox {
  145. width: 180px;
  146. display: flex;
  147. flex-direction: column;
  148. img {
  149. margin: 0 auto;
  150. }
  151. .codeText {
  152. text-align: center;
  153. font-size: $f20;
  154. color: #00000030;
  155. }
  156. }
  157. }
  158. </style>