<template>
  <div
    style="
      display: flex;
      align-items: center;
      width: 100%;
      height: 70vh;
      justify-content: center;
    "
  >
    <el-form ref="formRef" :model="queryData" label-width="100px">
      <el-form-item label="流转卡号">
        <div v-text="formData.seqNo"></div>
      </el-form-item>
      <el-form-item label="绑定编号">
        <el-input v-model="formData.nameplateNo" style="width: 250px" />
      </el-form-item>
      <el-form-item>
        <el-button class="sureBtn" type="primary" @click="saveSeqInfoF"
          >保 存
        </el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import { useProcessStore } from "@/store/modules/processView";
import { querySeqInfo, saveSeqInfo } from "@/api/process/index";

const formData = ref({});

const saveSeqInfoF = async () => {
  const { data, code } = await saveSeqInfo({
    ...formData.value,
  });
  if (code == "200") {
    ElMessage.success("操作成功！");
    toBack();
  }
};
const querySeqInfoF = async () => {
  const { data, code } = await querySeqInfo(
    processStore.odersData.workOrderCode,
    processStore.scanInfo.seqNo
  );
  formData.value = data;
};
const processStore = useProcessStore();
const toBack = () => {};
onMounted(() => {
  querySeqInfoF();
});
onUnmounted(() => {});
</script>

<style lang="scss" scoped>
.body {
  width: 100vw;
  height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;

  .checkBody {
    width: 30vw;
    align-items: center;
    justify-content: center;
  }
}
</style>
