Ver Fonte

feature/nunberinput样式修改

dy há 1 ano atrás
pai
commit
6bc0ac49af

+ 43 - 14
src/components/NumberInput/index.vue

@@ -1,15 +1,15 @@
 <template>
-  <div class="operate">
+  <!-- <div class="operate">
     <div class="describeText operateText">{{ title }}</div>
-    <div class="operateBox">
-      <div class="leftBox">
-        <svg-icon :icon-class="jiaDisabled ? 'bujian' : 'jian'" class="svgStyle" size="25"
-          @click="value = value - step" />
-      </div>
-      <el-input v-model="value" :disabled="jiaDisabled" :max="max" :min="min" class="showSum" />
-      <div class="rightBox">
-        <svg-icon :icon-class="jiaDisabled ? 'bujia' : 'jia'" class="svgStyle" size="25" @click="value = value + step" />
-      </div>
+    
+  </div> -->
+  <div class="operateBox">
+    <div class="leftBox">
+      <svg-icon :icon-class="jiaDisabled ? 'bujian' : 'jian'" class="svgStyle" size="25" @click="value = value - step" />
+    </div>
+    <el-input v-model="value" :disabled="jiaDisabled" :max="max" :min="min" class="showSum" />
+    <div class="rightBox">
+      <svg-icon :icon-class="jiaDisabled ? 'bujia' : 'jia'" class="svgStyle" size="25" @click="value = value + step" />
     </div>
   </div>
 </template>
@@ -32,10 +32,6 @@ const props = defineProps({
     type: Number,
     default: 1,
   },
-  title: {
-    type: String,
-    default: "实际值",
-  },
 });
 
 const emits = defineEmits(["update:modelValue"]);
@@ -68,12 +64,14 @@ const value = computed({
   font-weight: bold;
   font-size: $f38;
   color: black;
+  background-color: rgba(255, 255, 255, 0);
 }
 
 :deep(.el-input__wrapper) {
   border: none !important;
   outline: none;
   box-shadow: none;
+  background-color: rgba(255, 255, 255, 0);
 }
 
 .describeText {
@@ -119,4 +117,35 @@ const value = computed({
     }
   }
 }
+
+.operateBox {
+  width: 290px;
+  height: 70px;
+  border: 2px solid black;
+  border-radius: 16px;
+  display: flex;
+  justify-content: space-between;
+
+  .leftBox {
+    width: 70px;
+    height: 70px;
+    @include flex;
+  }
+
+  .showSum {
+    flex: 1;
+    @include flex;
+    border: 2px solid black;
+    border-top: 0px;
+    border-bottom: 0px;
+    font-weight: bold;
+    font-size: $f38;
+  }
+
+  .rightBox {
+    width: 70px;
+    height: 70px;
+    @include flex;
+  }
+}
 </style>

+ 1 - 1
src/layout/index.vue

@@ -5,7 +5,7 @@
       <router-view>
         <template #default="{ Component, route }">
           <transition enter-active-class="animate__animated animate__fadeIn" mode="out-in">
-            <keep-alive>
+            <keep-alive exclude="ProSteps">
               <component :is="Component" />
             </keep-alive>
           </transition>

+ 0 - 1
src/router/index.ts

@@ -39,7 +39,6 @@ export const constantRoutes: RouteRecordRaw[] = [
       },
       {
         path: "pro-steps",
-        redirect: "/pro-steps/wuliaocaiji",
         component: () => import("@/views/pro-steps/index.vue"),
         name: "ProSteps",
         meta: {

+ 1 - 1
src/views/pro-steps/components/jiluxiang.vue

@@ -42,7 +42,7 @@ const jiaDisabled = ref(false);
 }
 
 .recordBox {
-  min-width: 600px;
+  width: 600px;
   height: 210px;
   background-color: white;
   border-radius: 16px;

+ 4 - 1
src/views/pro-steps/components/wuliaocaiji.vue

@@ -45,6 +45,8 @@ const store = useProcessStore();
 const scanCode = ref("");
 const showXQ = ref(false);
 const showCJ = ref(false);
+const scanData = ref([]);
+provide("scanData", scanData);
 const enterfnc = async () => {
   // const { code, data } = await searchMaterial({
   //   operationId: store.odersData.operationId,
@@ -53,12 +55,13 @@ const enterfnc = async () => {
   //   workOrderCode: store.odersData.workOrderCode,
   // });
   const { code, data } = await searchMaterial({
-    operationId: "214",
+    operationId: "242",
     processId: "14",
     seqNo: "1202010000005",
     workOrderCode: "GD2404150002",
   });
   if (code == "200") {
+    scanData.value = data;
     showCJ.value = true;
   }
 };

+ 5 - 9
src/views/pro-steps/index.vue

@@ -45,6 +45,7 @@ import { getOpCompent } from "@/api/prosteps";
 const store = useProcessStore();
 defineOptions({ name: "ProSteps" });
 const route = useRoute();
+const router = useRouter();
 const loading = ref(false);
 //配置标签信息Data
 const stepComponents = ref([]);
@@ -126,6 +127,7 @@ const getNameClass = (index) => {
 const getOpCompentArray = async () => {
   const { data } = await getOpCompent("/129/12");
   stepComponents.value = setStepComponents(data);
+  router.replace({ name: stepComponents.value[0].name });
 };
 //设置标签是否被选中
 const setSelectIndex = (index) => {
@@ -133,20 +135,14 @@ const setSelectIndex = (index) => {
 };
 const setSelectTag = () => {
   const nowRouteName = route.name;
-  console.log(route.name);
-  defaultComponents.forEach((item, index) => {
-    console.log(item.name, "6");
+  stepComponents.value.forEach((item, index) => {
     if (item.name == nowRouteName) {
-      console.log(item.name);
       setSelectIndex(index);
     }
   });
 };
-onMounted(() => {
-  getOpCompentArray();
-  setSelectTag();
-});
-onActivated(() => {
+onMounted(async () => {
+  await getOpCompentArray();
   setSelectTag();
 });
 </script>

+ 8 - 7
src/views/pro-steps/popUpView/caijiRightPopUp.vue

@@ -9,14 +9,14 @@
       </div>
       <el-scrollbar>
         <div class="body">
-          <div class="infoBox" v-for="item in 7">
+          <div class="infoBox" v-for="(item, index) in scanData" :key="index">
             <div class="leftInfo">
-              <div class="titleText">大号螺丝</div>
-              <div class="describeText">100*200</div>
-              <div class="describeText">批次号:1223341232123124121</div>
-              <div class="describeText">计划编号:1231231231233</div>
-              <div class="describeText">订单编号:1231231231233</div>
-              <div class="describeText">入库单号:1231231231233</div>
+              <div class="titleText">{{ item.materialName }}</div>
+              <div class="describeText">{{ item.spec }}</div>
+              <div class="describeText">批次号:xxx</div>
+              <div class="describeText">计划编号:xxx</div>
+              <div class="describeText">订单编号:xxx</div>
+              <div class="describeText">入库单号:xxx</div>
             </div>
             <div class="rightInput">
               <div></div>
@@ -41,6 +41,7 @@ const props = defineProps<{
     default: false;
   };
 }>();
+const scanData = inject("scanData");
 const scanCode = ref("");
 const handleClose = () => {
   emits("update:modelValue", false);

+ 0 - 2
src/views/process/components/scanCode.vue

@@ -34,8 +34,6 @@ const getScanData = async () => {
   if (code == "200") {
     store.scanInfo = data;
     router.push({ path: "/pro-steps" });
-  } else {
-    ElMessage.warning(msg);
   }
 };
 </script>