瀏覽代碼

feature/预期套页面接口联调功能实现&&生产首页流转卡号添加

dy 1 年之前
父節點
當前提交
9cf7c44c88

+ 1 - 1
.env.development

@@ -13,7 +13,7 @@ VITE_APP_UPLOAD_URL = 'http://192.168.101.4:9000'
 # 线上接口地址
 # VITE_APP_API_URL = http://vapi.youlai.tech
 # 开发接口地址
- VITE_APP_API_URL = 'http://192.168.101.30:8079'
+ VITE_APP_API_URL = 'http://192.168.101.4:8079'
 
 ``
 # 是否启用 Mock 服务

+ 35 - 0
src/api/prosteps/jiluxiang.ts

@@ -0,0 +1,35 @@
+import request from "@/utils/request";
+
+//获取当前列表
+export function getList(data: any) {
+  return request({
+    url: "/api/v1/process/op/recordItem/page",
+    method: "post",
+    data,
+  });
+}
+
+//新增记录项
+export function listAdd(data: any) {
+  return request({
+    url: "/api/v1/process/op/recordItem/add",
+    method: "post",
+    data: data,
+  });
+}
+//删除记录项
+export function listDelete(data: any) {
+  return request({
+    url: "/api/v1/process/op/recordItem/del",
+    method: "post",
+    data: data,
+  });
+}
+//更新记录项
+export function listUpdate(data: any) {
+  return request({
+    url: "/api/v1/process/op/recordItem/update",
+    method: "post",
+    data: data,
+  });
+}

文件差異過大導致無法顯示
+ 1 - 0
src/assets/icons/lingdang.svg


文件差異過大導致無法顯示
+ 1 - 0
src/assets/icons/lingdangactive.svg


+ 89 - 0
src/components/Pagination/PDFView/index.vue

@@ -0,0 +1,89 @@
+<template>
+  <el-button
+    v-if="contentType === 'button'"
+    :link="isLink"
+    :type="btnType"
+    @click="showPdf"
+  >
+    {{ btnText }}
+  </el-button>
+  <VuePdfEmbed
+    v-else
+    :page="pageNumber"
+    :source="pdfSource"
+    annotation-layer
+    text-layer
+    @click="showPdf"
+  />
+  <el-drawer
+    v-if="needToShowPdf"
+    v-model="visible"
+    :footer="false"
+    :header="false"
+    :show-close="false"
+    destroy-on-close
+    direction="rtl"
+    size="972px"
+  >
+    <VuePdfEmbed
+      :page="showPdfNumber"
+      :source="pdfSource"
+      annotation-layer
+      text-layer
+    />
+  </el-drawer>
+</template>
+
+<script lang="ts" setup>
+import VuePdfEmbed from "vue-pdf-embed";
+// essential styles
+import "vue-pdf-embed/dist/style/index.css";
+
+// optional styles
+import "vue-pdf-embed/dist/style/annotationLayer.css";
+import "vue-pdf-embed/dist/style/textLayer.css";
+
+// either URL, Base64, binary, or document proxy
+const props = defineProps({
+  pdfSource: {
+    type: String,
+    required: true,
+  },
+  pageNumber: {
+    type: Number,
+    default: 0,
+  },
+  needToShowPdf: {
+    type: Boolean,
+    default: false,
+  },
+  contentType: {
+    type: String as PropType<"button" | "pdf">,
+    default: "pdf",
+  },
+  btnText: {
+    type: String,
+    default: "预览",
+  },
+  btnType: {
+    type: String,
+    default: "primary",
+  },
+  isLink: {
+    type: Boolean,
+    default: false,
+  },
+  showPdfNumber: {
+    type: Number,
+    default: 0,
+  },
+});
+
+const visible = ref(false);
+
+const showPdf = () => {
+  visible.value = true;
+};
+</script>
+
+<style lang="scss" scoped></style>

+ 7 - 1
src/store/modules/dictionary.ts

@@ -3,7 +3,13 @@ import { defineStore } from "pinia";
 import { getUserDicts, getUserList } from "@/api/auth";
 
 export const useDictionaryStore = defineStore("dictionaryStore", () => {
-  const types = ["defect_mana", "stage", "process_state", "outsource_state"];
+  const types = [
+    "defect_mana",
+    "stage",
+    "process_state",
+    "outsource_state",
+    "work_order_seq_state",
+  ];
   const dicts = ref<{ [key: string]: any[] }>({});
 
   // 所有的用户列表

+ 19 - 2
src/styles/index.scss

@@ -69,9 +69,26 @@
   width: calc((100vw / 6 * 5) - 50px);
   height: calc(100vh - 204px);
 }
+//search框样式
+.searchInput{
+  height: 50px;
+  border-radius: 76px;
+  overflow: hidden;
+  border: 1px solid #00000025;
+  font-size: $f24;
+  color: #00000080;
+  .el-input {
+    --el-input-focus-border: none;
+    --el-input-hover-border: none;
+  }
 
-
-//flex布局居中
+  .el-input__wrapper {
+    box-shadow: none;
+    box-sizing: border-box;
+  }
+  
+ 
+}
 
 //字体样式
 .titleText {

+ 22 - 17
src/views/prepare-complete-suit/components/first.vue

@@ -1,9 +1,11 @@
 <template>
   <el-row :gutter="20">
     <el-col :span="5" class="elColClasss">
+      <el-input class="searchInput" style="margin-bottom: 10px" v-model="seachInput" placeholder="搜索计划编号">
+        <template #prefix> </template></el-input>
       <el-scrollbar>
-        <Order v-for="(item, index) in orderData" :key="index" :hoverStatus="index == selectOrderIndex ? true : false"
-          :item="item" @click="setOrderIndex(index)" />
+        <Order v-for="(item, index) in seachOrderData" :key="index"
+          :hoverStatus="index == selectOrderIndex ? true : false" :item="item" @click="setOrderIndex(index)" />
         <Empty v-if="orderData.length == 0" />
       </el-scrollbar>
     </el-col>
@@ -26,7 +28,6 @@
                     ? 'sumOk'
                     : 'sumFail'
                   ">{{ scope.row.totalMaterial - scope.row.completeNum }}</span>
-                
               </template>
             </el-table-column>
 
@@ -52,9 +53,9 @@
   <div class="scanBox">
     <el-button type="primary" :disabled="disabled" @click="openPop('扫描料箱')" plain>扫描料箱</el-button>
   </div>
-  <ScanCode v-model="modelValue" :title="scanCodeTitle" @scancodefnc="scanCodeFnc" :operationId="operationId"
-    :workOrderCode="workOrderCode" @gettable="getTableData" />
-  <ShowInfo v-model="infoModelValue" :operationId="operationId" :workOrderCode="workOrderCode"
+  <ScanCode v-model="modelValue" :title="scanCodeTitle" :operationId="operationId" :workOrderCode="workOrderCode"
+    @gettable="getTableData" />
+  <ShowInfo :key="showInfoKey" v-model="infoModelValue" :operationId="operationId" :workOrderCode="workOrderCode"
     @reset-options-data="getTableData" />
 </template>
 
@@ -72,9 +73,11 @@ import {
 const orderData = ref([]);
 const opsArray = ref([]);
 const tableData = ref([]);
+const seachInput = ref("");
 const scanCode = ref("");
 const modelValue = ref(false);
 const infoModelValue = ref(false);
+const showInfoKey = ref(true);
 const scanCodeTitle = ref("");
 const total = ref(0);
 const page = ref(1);
@@ -96,17 +99,12 @@ const showInfoPop = async (row: any) => {
   await getMaterialData(row.materialCode);
   infoModelValue.value = true;
 };
-//扫描料箱
-const scanCodeFnc = async () => { };
-const isInclude = () => {
-  let res = false;
-  tableData.value.forEach((item) => {
-    if (item.materialCode == scanCode.value) {
-      res = true;
-    }
-  });
-  return res;
-};
+const seachOrderData = computed(() => {
+  if (seachInput.value == "") return orderData.value;
+  else {
+    return orderData.value.filter((item) => item.orderCode == seachInput.value);
+  }
+});
 const getPagination = (obj: any) => {
   page.value = obj.page;
   limit.value = obj.limit;
@@ -170,6 +168,9 @@ onMounted(async () => {
   await getOrderData();
   setOrderIndex(0);
 });
+watch(infoModelValue, () => {
+  showInfoKey.value = !showInfoKey.value;
+});
 </script>
 
 <style lang="scss" scoped>
@@ -191,6 +192,10 @@ onMounted(async () => {
   cursor: pointer;
 }
 
+.opera:active {
+  color: rgb(255, 145, 0);
+}
+
 .scanBox {
   width: calc(100vw - 942px);
   height: 80px;

+ 0 - 1
src/views/prepare-complete-suit/index.vue

@@ -27,7 +27,6 @@ import Second from "./components/second.vue";
 import Third from "./components/third.vue";
 import ShowInfo from "./popUpView/showInfo.vue";
 const activeName = ref("first");
-
 const handleClick = (tab: TabsPaneContext, event: Event) => {
   console.log(tab, event);
 };

+ 37 - 3
src/views/prepare-complete-suit/popUpView/bangding.vue

@@ -3,11 +3,34 @@
     <div class="container">
       <div class="headerTittle">{{ title }}</div>
       <el-scrollbar style="padding: 0 20px">
-        <div class="infoBox" v-for="item in selectedItem">{{ item.name }}</div>
+        <div class="infoBox" v-if="title == '绑定确认'" v-for="(item, index) in selectedItem" :key="index">
+          <div>
+            料箱名称:
+            <div>{{ item.name }}</div>
+          </div>
+
+          <div>
+            料箱编号:
+            <div>{{ item.code }}</div>
+          </div>
+        </div>
+        <div class="infoBox" v-if="title == '确认出库'">
+          <div>
+            料箱名称:
+            <div>{{ selectedIndexItem.name }}</div>
+          </div>
+
+          <div>
+            料箱编号:
+            <div>{{ selectedIndexItem.code }}</div>
+          </div>
+        </div>
       </el-scrollbar>
       <div class="bottomBtn">
         <el-button class="leftBtn" @click="handleClose">取消</el-button>
-        <el-button class="rightBtn" @click="emits('submit')" type="primary">绑定</el-button>
+        <el-button class="rightBtn" @click="emits('submit')" type="primary">{{
+          title == "绑定确认" ? "绑定" : "出库"
+        }}</el-button>
       </div>
     </div>
   </div>
@@ -16,19 +39,27 @@
 <script lang="ts" setup>
 const props = defineProps({
   modelValue: {
-    type: Number,
+    type: Boolean,
     default: 0,
   },
   title: {
     type: String,
     default: "",
   },
+  outboundIndex: {
+    type: Number,
+  },
 });
 const emits = defineEmits(["update:modelValue"]);
 const materialData = inject("materialData");
+//显示绑定
 const selectedItem = computed(() =>
   materialData.value.filter((item) => item.selected == true)
 );
+//显示出库
+const selectedIndexItem = computed(
+  () => materialData.value[props.outboundIndex]
+);
 const handleClose = () => emits("update:modelValue", false);
 </script>
 
@@ -47,6 +78,9 @@ const handleClose = () => emits("update:modelValue", false);
   background-color: white;
   border-radius: 16px;
   margin-bottom: $p10;
+  padding: 20px;
+  display: flex;
+  justify-content: space-evenly;
 }
 
 .bottomBtn {

+ 2 - 3
src/views/prepare-complete-suit/popUpView/bindingScan.vue

@@ -12,7 +12,7 @@
           </div>
           <div class="scanBox">
             <div class="titleText">请扫物料码:</div>
-            <ScanCodeInput v-model="scanCode" @enterfnc="enterfnc" />
+            <ScanCodeInput v-model="scanCode" @keyup.enter="enterfnc" />
           </div>
           <el-table class="infoTable" :data="scanItemArray" border>
             <el-table-column prop="materialName" label="物料名称" width="120" />
@@ -81,8 +81,7 @@ import { useCommonStore } from "@/store";
 const store = useCommonStore();
 const props = defineProps({
   modelValue: {
-    type: Number,
-    default: 0,
+    type: Boolean,
   },
   workOrderCode: {
     type: String,

+ 2 - 1
src/views/prepare-complete-suit/popUpView/scanCode.vue

@@ -3,7 +3,7 @@
     <div class="container" @click.stop>
       <div class="headerTittle">{{ title }}</div>
       <div class="describeText">请扫料箱编码</div>
-      <ScanCodeInput v-model="scanCode" />
+      <ScanCodeInput v-model="scanCode" @keyup.enter="handleSubmit" />
       <div class="bottomBtn">
         <el-button class="leftBtn" @click="handleClose">关闭</el-button>
         <el-button class="rightBtn" @click="handleSubmit" type="primary">确定</el-button>
@@ -38,6 +38,7 @@ const scanCode = ref("");
 const showBinding = ref(false);
 const emits = defineEmits(["update:modelValue", "scancodefnc", "gettable"]);
 const handleClose = () => {
+  scanCode.value = "";
   emits("update:modelValue", false);
   emits("gettable");
 };

+ 50 - 18
src/views/prepare-complete-suit/popUpView/showInfo.vue

@@ -43,12 +43,18 @@
                   <div>所需总数:{{ selectRowData.totalMaterial }}</div>
                   <div>
                     还需数量:{{
-                      selectRowData.totalMaterial - selectRowData.completeNum
+                      selectRowData.totalMaterial -
+                      selectRowData.completeNum +
+                      topSum
                     }}
                   </div>
                 </div>
-                <div class="selectInfoItem" @click="closeTopItem(item.selectedIndex)" v-for="item in setTopItem">
-                  {{ item.name }}
+                <div class="selectInfoItem" v-if="selectedType == 'yes'" @click="closeTopItem(item.selectedIndex)"
+                  v-for="item in setTopItem">
+                  <div>料箱名称:</div>
+                  <div>{{ item.name }}</div>
+                  <div>料箱编号:</div>
+                  <div>{{ item.code }}</div>
                 </div>
               </div>
             </el-scrollbar>
@@ -59,7 +65,9 @@
                   ? 'item bound'
                   : item.selected == true
                     ? 'item active'
-                    : 'item'
+                    : item.isEnable == 2
+                      ? 'item noBound'
+                      : 'item'
                 " v-if="itemShowStatus(item)" @click="setSelectIndex(index)">
                 <div>料箱名称:</div>
                 <div>{{ item.name }}</div>
@@ -85,7 +93,8 @@
         </el-col>
       </el-row>
     </div>
-    <Bangding v-model="showStatus" :title="bindingTitle" @submit="submitData" />
+    <Bangding v-model="showStatus" :title="bindingTitle" @submit="submitData" :submitType="submitType"
+      :outboundIndex="outboundIndex" />
   </div>
 </template>
 
@@ -110,8 +119,10 @@ const disabled = ref(false);
 const materialData = inject("materialData");
 const selectRowData = inject("selectRowData");
 const showStatus = ref(false);
-const outboundIndex = ref();
+const outboundIndex = ref(null);
 const bindingTitle = ref("");
+//1-出库 2-绑定
+const submitType = ref(null);
 const bingdingStatus = ref(false);
 const outboundStatus = ref(false);
 const selectIndex = ref(0);
@@ -123,7 +134,7 @@ const itemShowStatus = (item: any) => {
       return false;
     }
   } else {
-    if (item.isEnable == 0) {
+    if (item.isEnable == 0 || item.isEnable == 2) {
       return true;
     } else {
       return false;
@@ -148,6 +159,7 @@ const selectIndexInfoData = computed(() => {
 const setSelectIndex = (index: number) => {
   selectIndex.value = index;
   if (selectedType.value == "yes") {
+    //在符合的条件下
     if (bingdingStatus.value) {
       if (materialData.value[selectIndex.value].selected == true) {
         materialData.value[selectIndex.value].selected = false;
@@ -157,15 +169,11 @@ const setSelectIndex = (index: number) => {
       materialData.value[selectIndex.value].selectedIndex = index;
     }
   } else {
-    if (bingdingStatus.value) {
-      if (materialData.value[selectIndex.value].selected == true) {
-        materialData.value[selectIndex.value].selected = false;
-      } else {
-        materialData.value[selectIndex.value].selected = true;
-      }
-      materialData.value[selectIndex.value].selectedIndex = index;
-    }
-    if (outboundStatus.value) {
+    //在不符合的条件下
+    if (
+      outboundStatus.value &&
+      materialData.value[selectIndex.value].isEnable != 2
+    ) {
       outboundIndex.value = selectIndex.value;
     }
   }
@@ -173,9 +181,18 @@ const setSelectIndex = (index: number) => {
 const closeTopItem = (index: number) => {
   materialData.value[index].selected = false;
 };
+//展示已选择的待绑定的盒子数组
 const setTopItem = computed(() => {
   return materialData.value.filter((item) => item.selected == true);
 });
+const topSum = computed(() => {
+  let sum = 0;
+  const array = materialData.value.filter((item) => item.selected == true);
+  for (let i = 0; i++; i < array.length) {
+    sum = array[i].xxxsum;
+  }
+  return sum;
+});
 const close = () => {
   emits("update:modelValue", false);
   reset();
@@ -199,6 +216,8 @@ const submit = () => {
 };
 const reset = () => {
   selectedType.value = "yes";
+  materialData.value = [];
+  outboundIndex.value = null;
 };
 //提交函数(包含绑定、出库)
 const submitData = async () => {
@@ -222,10 +241,17 @@ const submitData = async () => {
   } else {
     //出库
     const { data, code } = await outBox({
-      vehicleNo: codes,
+      vehicleNo: materialData.value[outboundIndex.value].code,
       taskId: 0,
-      houseNo: "",
+      houseNo: materialData.value[outboundIndex.value].houseNo,
     });
+    if (code == "200") {
+      ElMessage.success("出库成功!");
+      //页面数据删除
+
+      materialData.value.splice(outboundIndex.value, 1);
+      outboundIndex.value = null;
+    }
   }
 };
 </script>
@@ -240,6 +266,11 @@ const submitData = async () => {
   color: white;
 }
 
+.noBound {
+  background-color: grey !important;
+  color: white;
+}
+
 .leftView {
   width: calc(100vw);
 
@@ -300,6 +331,7 @@ const submitData = async () => {
           background-image: url("@/assets/images/caijiwancheng.png");
           background-position: right top;
           background-repeat: no-repeat;
+          padding: 20px;
         }
       }
     }

+ 1 - 1
src/views/pro-operation/station-up-material/index.vue

@@ -3,7 +3,7 @@
     <ScanCodeInput
       v-model="currentCode"
       style="width: 400px; margin-left: 20px"
-      @enterfnc="enter"
+      @keyup.enter="enter"
     />
     <div class="bar-container">
       <el-scrollbar>

+ 170 - 34
src/views/pro-steps/components/jiluxiang.vue

@@ -8,27 +8,46 @@
               <div class="valueBox">
                 <div class="describeText value">{{ index + 1 }}.记录项:</div>
                 <div class="inputText">
-                  <el-input v-model="item.label" style="width: 240px" placeholder="请输入" />
+                  <el-input :disabled="item.addStatus == false && item.updateStatus == false
+                    " v-model="item.label" style="width: 240px" placeholder="请输入" />
                 </div>
               </div>
               <div class="valueBox">
                 <div class="describeText value">内容:</div>
                 <div class="inputText">
-                  <el-input v-model="item.inputValue" type="textarea" placeholder="请输入" />
+                  <el-input :disabled="item.addStatus == false && item.updateStatus == false
+                    " v-model="item.inputValue" type="textarea" placeholder="请输入" maxlength="1000" />
                 </div>
               </div>
             </div>
             <div class="operate">
               <div class="iconBox">
-                <div class="operateText">增加</div>
-                <div class="operateText">删除</div>
-                <div class="operateText">编辑</div>
-                <div class="operateText">完成</div>
-                <div class="operateText">取消</div>
+                <div class="operateText" v-if="item.addStatus == false &&
+                  index == listData.length - 1 &&
+                  item.updateStatus == false
+                  " @click="addFnc">
+                  增加
+                </div>
+                <div v-if="item.addStatus == false && item.updateStatus == false" class="operateText"
+                  @click="deleteFnc(item.id, index)">
+                  删除
+                </div>
+                <div v-if="item.addStatus == false && item.updateStatus == false" class="operateText"
+                  @click="updateFnc(item)">
+                  编辑
+                </div>
+                <div v-if="item.addStatus == true || item.updateStatus == true" class="operateText"
+                  @click="isOkFnc(item, index)">
+                  完成
+                </div>
+                <div v-if="item.addStatus == true || item.updateStatus == true" class="operateText"
+                  @click="cancelFnc(index, item)">
+                  取消
+                </div>
               </div>
             </div>
           </div>
-          <div @click="add" class="operateBox" v-if="listData.length < 1" style="
+          <div @click="addFnc" class="operateBox" v-if="listData.length < 1" style="
               height: 80px;
               display: flex;
               align-items: center;
@@ -43,34 +62,64 @@
     </template>
 
     <!-- 展示 -->
-    <div class="body" v-if="submitStatus == false">
+    <div class="recordBody" v-if="submitStatus == false">
       <div class="left" v-if="listData.length > 0">
         <el-scrollbar>
-          <div class="infoBox" v-for="item in listData"></div>
+          <div @click="showSelectIndex = index" :class="index == showSelectIndex ? 'infoBox active' : 'infoBox'"
+            v-for="(item, index) in listData">
+            <div>
+              <div class="titleText">记录项名:</div>
+              <div class="describeText">{{ item.label }}</div>
+            </div>
+            <div>
+              <div class="titleText">记录内容:</div>
+              <div class="describeText textarea">
+                {{ item.inputValue }}
+              </div>
+            </div>
+          </div>
         </el-scrollbar>
       </div>
       <div class="right" v-if="listData.length > 0">
         <el-scrollbar>
-          <div class="describeText"></div>
+          <div class="titleText" style="text-align: center">
+            {{ listData[showSelectIndex].label }}
+          </div>
+          <div class="describeText" style="padding: 0 20px">
+            {{ listData[showSelectIndex].inputValue }}
+          </div>
         </el-scrollbar>
       </div>
-      <Empty v-if="listData.length == 0" />
+      <div style="
+          height: 100%;
+          width: 100%;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+        " v-if="listData.length == 0">
+        <Empty />
+      </div>
     </div>
     <div class="btns">
-      <el-button @click="setSubmitStatus" type="primary" plain>{{
-        submitStatus ? "提 交" : "编 辑"
+      <el-button @click="btn" type="primary" plain>{{
+        submitStatus ? "返回 " : "编 辑"
       }}</el-button>
-      <el-button type="primary" v-if="submitStatus == true" @click="submitStatus = false" plain>取 消</el-button>
     </div>
   </div>
 </template>
 
 <script lang="ts" setup>
-import { listAdd, getList } from "@/api/prosteps/jiluxiang";
+import {
+  listAdd,
+  getList,
+  listDelete,
+  listUpdate,
+} from "@/api/prosteps/jiluxiang";
 import { useProcessStore } from "@/store";
 defineOptions({
   name: "Jiluxiang",
 });
+const showSelectIndex = ref(0);
 const submitStatus = ref(false);
 const store = useProcessStore();
 const jianDisabled = ref(true);
@@ -81,35 +130,94 @@ const getListData = async () => {
   const { data } = await getList({
     pageNo: 1,
     pageSize: 9999,
+    processId: Number(store.scanInfo.id),
+    operationRecordItemId: Number(store.odersData.operationId),
   });
   listData.value = data.records;
+  listData.value.forEach((item) => {
+    item.addStatus = false;
+    item.updateStatus = false;
+  });
 };
 const item = {
   inputValue: "",
   label: "",
+  updateInputValue: "",
+  updateLabel: "",
   processId: Number(store.scanInfo.id),
   operationRecordItemId: Number(store.odersData.operationId),
+  addStatus: true,
+  updateStatus: false,
 };
-const add = () => {
-  listData.value.push({ ...item, sort: listData.value.length + 1 });
+const btn = () => {
+  if (submitStatus.value == true) {
+    if (
+      listData.value[listData.value.length - 1].addStatus == true ||
+      listData.value[listData.value.length - 1].updateStatus == true
+    ) {
+      ElMessage.warning("请确认各项记录编辑完成!");
+      return;
+    } else {
+      submitStatus.value = !submitStatus.value;
+    }
+  } else {
+    submitStatus.value = !submitStatus.value;
+  }
 };
-const addAsync = async () => {
-  const { data } = await listAdd({
-    inputValue: Number(store.scanInfo.id),
-    label: Number(store.scanInfo.id),
-    processId: Number(store.scanInfo.id),
-    sortNum: 0,
-    operationRecordItemId: Number(store.odersData.operationId),
+const addFnc = (index) => {
+  listData.value.push({
+    ...item,
+    sort: listData.value == 0 ? 1 : listData.value.length,
   });
 };
-const setSubmitStatus = () => {
-  if (submitStatus.value == false) {
-    submitStatus.value = true;
-    return;
+const deleteFnc = async (id, index) => {
+  const { data, code } = await listDelete({
+    id,
+  });
+  if (code == "200") {
+    ElMessage.success("操作成功!");
+    listData.value.splice(index, 1);
+  }
+};
+const updateFnc = (item) => {
+  item.updateStatus = true;
+  item.updateInputValue = item.inputValue;
+  item.updateLabel = item.label;
+};
+const isOkFnc = async (item, index) => {
+  if (item.addStatus == true) {
+    const { data, code } = await listAdd(item);
+    if (code == "200") {
+      ElMessage.success("操作成功!");
+      item.addStatus = false;
+      item.id = data.id;
+    }
   } else {
-    //提交保存
+    const { data, code } = await listUpdate({
+      ...item,
+      inputValue: item.inputValue,
+      label: item.label,
+      processId: Number(store.scanInfo.id),
+      operationRecordItemId: Number(store.odersData.operationId),
+    });
+    if (code == "200") {
+      ElMessage.success("更新成功!");
+      item.updateInputValue = "";
+      item.updateLabel = "";
+      item.updateStatus = false;
+    }
   }
 };
+const cancelFnc = (index, item) => {
+  if (item.addStatus == true) {
+    listData.value.splice(index, 1);
+  } else {
+    item.inputValue = item.updateInputValue;
+    item.label = item.updateLabel;
+    item.updateStatus = false;
+  }
+};
+
 onMounted(() => {
   getListData();
 });
@@ -124,6 +232,10 @@ onMounted(() => {
   position: relative;
 }
 
+.active {
+  border: 1px solid #0000ff50;
+}
+
 .btns {
   width: 100%;
   height: 70px;
@@ -147,23 +259,34 @@ onMounted(() => {
   height: calc(100% - 80px);
 }
 
-.body {
+.recordBody {
   width: 100%;
   height: calc(100% - 80px);
-  @include flex;
+  display: flex;
 
   .left {
     width: 50%;
+    height: calc(100%);
 
     .infoBox {
       display: inline-block;
-      width: 130px;
-      height: 130px;
+      box-sizing: border-box;
+      width: 280px;
+      height: 180px;
       background-color: white;
       border-radius: 16px;
       margin: 10px;
       margin-top: 0px;
       box-sizing: border-box;
+      padding: 20px;
+
+      .textarea {
+        display: -webkit-box;
+        -webkit-box-orient: vertical;
+        -webkit-line-clamp: 2;
+        overflow: hidden;
+        text-overflow: ellipsis;
+      }
     }
   }
 
@@ -171,6 +294,7 @@ onMounted(() => {
     width: 50%;
     background-color: white;
     border-radius: 16px;
+    height: calc(100%);
   }
 }
 
@@ -215,6 +339,18 @@ onMounted(() => {
     .iconBox {
       display: flex;
       flex-direction: column;
+
+      .operateText {
+        padding: 0 5px;
+        cursor: pointer;
+      }
+
+      .operateText:hover {
+        background-color: var(--el-color-primary);
+        color: white;
+        border-radius: 16px;
+        padding: 0 5px;
+      }
     }
   }
 }

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

@@ -1,6 +1,6 @@
 <template>
   <div class="scanCode">
-    <ScanCodeInput v-model="scanCode" @enterfnc="enterfnc" />
+    <ScanCodeInput v-model="scanCode" @keyup.enter="enterfnc" />
   </div>
   <div class="showCodeBody" v-if="opCompentDataList.length < 1">
     <div class="codeBox">

+ 7 - 16
src/views/process/components/operate.vue

@@ -7,22 +7,13 @@
         <span class="btnText">叫料</span>
       </el-button>
     </div>
-
-    <div class="operateBox" style="margin-top: 20px">
-      <span class="operateText">物料流转</span>
-      <svg-icon icon-class="liuzhuan" size="30" />
-    </div>
-    <div class="operateBox">
-      <span class="operateText">生产履历</span>
-      <svg-icon icon-class="shengchanlvli" size="30" />
-      <div v-for="(item, index) in operationObjs" :key="index" class="operateBox" @click="handleClick(item)">
-        <span class="operateText">{{ item.text }}</span>
-        <svg-icon v-if="item.icon" :icon-class="item.icon" size="30" />
-        <span v-else>{{ item.num }}</span>
-      </div>
-      <OperatePop v-model="callStatus" @opeatecall="opeateCall" />
-      <CallMaterialsPop v-model="callBoxStatus" />
+    <div v-for="(item, index) in operationObjs" :key="index" class="operateBox" @click="handleClick(item)">
+      <span class="operateText">{{ item.text }}</span>
+      <svg-icon v-if="item.icon" :icon-class="item.icon" size="30" />
+      <span v-else>{{ item.num }}</span>
     </div>
+    <OperatePop v-model="callStatus" @opeatecall="opeateCall" />
+    <CallMaterialsPop v-model="callBoxStatus" />
   </div>
 </template>
 
@@ -78,7 +69,7 @@ const call = () => {
   .btnBox {
     width: 100%;
     height: 80px;
-    margin-top: $p20;
+    margin: $p20 0;
 
     .btn {
       width: 100%;

+ 1 - 4
src/views/process/components/scanCode.vue

@@ -4,7 +4,7 @@
     <img class="imgIcon" src="@/assets/icons/shaoma.svg" @click="toProSteps" />
   </div>
   <div class="body">
-    <ScanCodeInput v-model="inputValue" @setinputvalue="setInputValue" @enterfnc="toProSteps" />
+    <ScanCodeInput v-model="inputValue" @keyup.enter="toProSteps" />
   </div>
 </template>
 
@@ -19,9 +19,6 @@ const toProSteps = () => {
   store.odersData.qrCode = inputValue.value;
   getScanData();
 };
-const setInputValue = (value: any) => {
-  inputValue.value = value;
-};
 const getScanData = async () => {
   const { code, data, msg } = await getScan({
     operationId: Number(store.odersData.operationId),

+ 1 - 1
src/views/process/components/transferNum.vue

@@ -11,7 +11,7 @@
         </el-tooltip>
 
         <div class="status">
-          {{ dictS.getLableByValue("outsource_state", item.state) }}
+          {{ dictS.getLableByValue("work_order_seq_state", item.state) }}
         </div>
       </div>
     </el-scrollbar>

+ 40 - 0
src/views/process/popUpView/callMaterialsPop.vue

@@ -0,0 +1,40 @@
+<template>
+  <div class="midPopUp" v-if="modelValue">
+    <div class="container">
+    </div>
+  </div>
+</template>
+
+<script lang="ts" setup>
+
+const porps = defineProps({
+  modelValue: {
+    type: Boolean,
+    default: false,
+  },
+});
+const emits = defineEmits(["update:modelValue"]);
+</script>
+
+<style lang="scss" scoped>
+.titleText {
+  text-align: center;
+}
+
+.container {
+  height: 50vh;
+  width: 40vw;
+  background-color: #ffffff60;
+  display: flex;
+  justify-content: space-between;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  padding: 24px;
+}
+
+.active {
+  background-image: url("@/assets/images/caijiwancheng.png");
+  background-position: right top;
+  background-repeat: no-repeat;
+}
+</style>

+ 81 - 0
src/views/process/popUpView/operatePop.vue

@@ -0,0 +1,81 @@
+<template>
+  <div class="midPopUp" @click="emits('update:modelValue', false)" v-if="modelValue">
+    <div class="container" @click.stop>
+      <div class="operatorBox">
+        <div>
+          <div class="titleText">流程叫料</div>
+          <div class="describeText">(向上一流程工序呼叫流程物料)</div>
+        </div>
+      </div>
+
+      <div class="operatorBox" @click="opeateCall">
+        <div>
+          <div class="titleText">工序叫料</div>
+          <div class="describeText">(向本工序呼叫涉及物料)</div>
+        </div>
+      </div>
+    </div>
+    
+  </div>
+</template>
+
+<script lang="ts" setup>
+
+const porps = defineProps({
+  modelValue: {
+    type: Boolean,
+    default: false,
+  },
+});
+const emits = defineEmits(["update:modelValue",'opeatecall']);
+const callBoxStatus = ref(false);
+const opeateCall = () => {
+  emits("opeatecall");
+  emits("update:modelValue", false);
+};
+</script>
+
+<style lang="scss" scoped>
+.titleText {
+  text-align: center;
+}
+
+.container {
+  height: 50vh;
+  width: 40vw;
+  background-color: #ffffff60;
+  display: flex;
+  justify-content: space-between;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  padding: 24px;
+
+  .operatorBox {
+    width: 50%;
+    height: 100%;
+    background-color: #ffffff95;
+    margin: 0 20px;
+    border-radius: 16px;
+    @include flex;
+    cursor: pointer;
+  }
+
+  .operatorBox:hover {
+    background-color: #0a59f7;
+
+    .titleText {
+      color: white;
+    }
+
+    .describeText {
+      color: white;
+    }
+  }
+}
+
+.active {
+  background-image: url("@/assets/images/caijiwancheng.png");
+  background-position: right top;
+  background-repeat: no-repeat;
+}
+</style>

+ 1 - 1
src/views/repair/main/components/scanCode.vue

@@ -5,7 +5,7 @@
     <img class="imgIcon" src="@/assets/icons/shaoma.svg" @click="toProSteps" />
   </div>
   <div class="body">
-    <ScanCodeInput v-model="inputValue" @setinputvalue="setInputValue" @enterfnc="toProSteps" />
+    <ScanCodeInput v-model="inputValue" @keyup.enter="setInputValue" @enterfnc="toProSteps" />
   </div>
 </template>