wangfei
2025-02-20 00192d25a3132b3f20b528ed46a8298f46b602ef
中空一线添加必填判断、更改tag标签显示
1个文件已修改
241 ■■■■■ 已修改文件
UI-Project/src/views/hollow/hollowequipment.vue 241 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI-Project/src/views/hollow/hollowequipment.vue
@@ -137,8 +137,8 @@
<!-- 中空配方添加 -->
<el-dialog v-model="add" top="3vh" width="55%" :title="$t('hellow.hollowformula')" >
    <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;">
     <el-form  size="mini" label-width="150px">
      <el-form label-width="150px" label-position="right">
     <el-form size="mini" label-width="150px">
      <!-- <el-form label-width="150px" label-position="right"> -->
        <el-row style="margin-top: 10px;">
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
@@ -208,7 +208,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.casTwob')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.casTwob')" style="width: 16vw;">
            <el-select v-model="casTwo" clearable :placeholder="$t('hellow.casTwoa')" style="width: 220px">
              <el-option :label="$t('hellow.F')" value="0"></el-option>
              <el-option :label="$t('hellow.Y')" value="1"></el-option>
@@ -221,7 +221,7 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.casThreeb')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.casThreeb')" style="width: 16vw;">
            <el-select v-model="casThree" clearable :placeholder="$t('hellow.casThreea')" style="width: 220px">
              <el-option :label="$t('hellow.F')" value="0"></el-option>
              <el-option :label="$t('hellow.Y')" value="1"></el-option>
@@ -231,7 +231,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.casFourb')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.casFourb')" style="width: 16vw;">
            <el-select v-model="casFour" clearable :placeholder="$t('hellow.casFoura')" style="width: 220px">
              <el-option :label="$t('hellow.F')" value="0"></el-option>
              <el-option :label="$t('hellow.Y')" value="1"></el-option>
@@ -251,7 +251,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.frameTwob')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.frameTwob')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.frameTwoa')" v-model="frameTwo" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -261,14 +261,14 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.frameThreeb')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.frameThreeb')" style="width: 16vw;">
                <el-input :placeholder="$t('hellow.frameThreea')" v-model="frameThree" autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.frameFourb')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.frameFourb')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.frameFoura')" v-model="frameFour" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -285,7 +285,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameHeightbTwo')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameHeightbTwo')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameHeightaTwo')" v-model="intervalFrameHeightTwo" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -295,14 +295,14 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameHeightbThree')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameHeightbThree')" style="width: 16vw;">
                <el-input :placeholder="$t('hellow.intervalFrameHeightaThree')" v-model="intervalFrameHeightThree" autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameHeightbFour')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameHeightbFour')"  style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameHeightaFour')" v-model="intervalFrameHeightFour" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -319,7 +319,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameWidthbTwo')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameWidthbTwo')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameWidthaTwo')" v-model="intervalFrameWidthTwo" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -329,14 +329,14 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameWidthbThree')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameWidthbThree')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameWidthaThree')" v-model="intervalFrameWidthThree" autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameWidthbFour')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameWidthbFour')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameWidthaFour')" v-model="intervalFrameWidthFour" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -356,7 +356,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameTypedTwo')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameTypedTwo')" style="width: 16vw;">
            <el-select v-model="intervalFrameTypeTwo" clearable  style="width: 220px" :placeholder="$t('hellow.intervalFrameTypecTwo')">
        <el-option :label="$t('hellow.intervalFrameTypeb')" value="1"></el-option>
        <el-option :label="$t('hellow.intervalFrameTypea')" value="5"></el-option>
@@ -370,7 +370,7 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameTypedThree')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameTypedThree')" style="width: 16vw;">
            <el-select v-model="intervalFrameTypeThree" clearable  style="width: 220px" :placeholder="$t('hellow.intervalFrameTypecThree')">
        <el-option :label="$t('hellow.intervalFrameTypeb')" value="1"></el-option>
        <el-option :label="$t('hellow.intervalFrameTypea')" value="5"></el-option>
@@ -380,7 +380,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameTypedFour')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameTypedFour')" style="width: 16vw;">
            <el-select v-model="intervalFrameTypeFour" clearable  style="width: 220px" :placeholder="$t('hellow.intervalFrameTypecFour')">
        <el-option :label="$t('hellow.intervalFrameTypeb')" value="1"></el-option>
        <el-option :label="$t('hellow.intervalFrameTypea')" value="5"></el-option>
@@ -399,7 +399,7 @@
              </el-form-item></div></div>
          </el-col>
        </el-row>
        </el-form>
        <!-- </el-form> -->
            </el-form>
          </div>
    <template #footer>
@@ -485,7 +485,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.casTwob')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.casTwob')" style="width: 16vw;">
            <el-select v-model="casTwo" clearable :placeholder="$t('hellow.casTwoa')" style="width: 220px">
              <el-option :label="$t('hellow.F')" value="0"></el-option>
              <el-option :label="$t('hellow.Y')" value="1"></el-option>
@@ -498,7 +498,7 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.casThreeb')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.casThreeb')" style="width: 16vw;">
            <el-select v-model="casThree" clearable :placeholder="$t('hellow.casThreea')" style="width: 220px">
              <el-option :label="$t('hellow.F')" value="0"></el-option>
              <el-option :label="$t('hellow.Y')" value="1"></el-option>
@@ -508,7 +508,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.casFourb')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.casFourb')" style="width: 16vw;">
            <el-select v-model="casFour" clearable :placeholder="$t('hellow.casFoura')" style="width: 220px">
              <el-option :label="$t('hellow.F')" value="0"></el-option>
              <el-option :label="$t('hellow.Y')" value="1"></el-option>
@@ -528,7 +528,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.frameTwob')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.frameTwob')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.frameTwoa')" v-model="frameTwo" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -538,14 +538,14 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.frameThreeb')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.frameThreeb')" style="width: 16vw;">
                <el-input :placeholder="$t('hellow.frameThreea')" v-model="frameThree" autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.frameFourb')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.frameFourb')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.frameFoura')" v-model="frameFour" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -562,7 +562,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameHeightbTwo')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameHeightbTwo')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameHeightaTwo')" v-model="intervalFrameHeightTwo" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -572,14 +572,14 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameHeightbThree')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameHeightbThree')" style="width: 16vw;">
                <el-input :placeholder="$t('hellow.intervalFrameHeightaThree')" v-model="intervalFrameHeightThree" autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameHeightbFour')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameHeightbFour')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameHeightaFour')" v-model="intervalFrameHeightFour" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -596,7 +596,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameWidthbTwo')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameWidthbTwo')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameWidthaTwo')" v-model="intervalFrameWidthTwo" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -606,14 +606,14 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameWidthbThree')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameWidthbThree')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameWidthaThree')" v-model="intervalFrameWidthThree" autocomplete="off" />
              </el-form-item></div></div>
          </el-col>
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameWidthbFour')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameWidthbFour')" style="width: 16vw;">
            <el-input :placeholder="$t('hellow.intervalFrameWidthaFour')" v-model="intervalFrameWidthFour" autocomplete="off" />
              </el-form-item>
            </div></div>
@@ -633,7 +633,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameTypedTwo')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameTypedTwo')" style="width: 16vw;">
            <el-select v-model="intervalFrameTypeTwo" clearable  style="width: 220px" :placeholder="$t('hellow.intervalFrameTypecTwo')">
        <el-option :label="$t('hellow.intervalFrameTypeb')" value="1"></el-option>
        <el-option :label="$t('hellow.intervalFrameTypea')" value="5"></el-option>
@@ -647,7 +647,7 @@
          <el-col :span="6">
              <div id="dt" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameTypedThree')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameTypedThree')" style="width: 16vw;">
            <el-select v-model="intervalFrameTypeThree" clearable  style="width: 220px" :placeholder="$t('hellow.intervalFrameTypecThree')">
        <el-option :label="$t('hellow.intervalFrameTypeb')" value="1"></el-option>
        <el-option :label="$t('hellow.intervalFrameTypea')" value="5"></el-option>
@@ -657,7 +657,7 @@
          <el-col :span="9">
            <div id="dta" style="font-size: 15px;">
        <div>
          <el-form-item :label="$t('hellow.intervalFrameTypedFour')" :required="true" style="width: 16vw;">
          <el-form-item :label="$t('hellow.intervalFrameTypedFour')" style="width: 16vw;">
            <el-select v-model="intervalFrameTypeFour" clearable  style="width: 220px" :placeholder="$t('hellow.intervalFrameTypecFour')">
        <el-option :label="$t('hellow.intervalFrameTypeb')" value="1"></el-option>
        <el-option :label="$t('hellow.intervalFrameTypea')" value="5"></el-option>
@@ -904,42 +904,34 @@
                :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
        <el-table-column prop="formulaName" fixed align="center" :label="$t('hellow.formulaNamep')" min-width="120"/>
        <el-table-column prop="filmRemove" align="center" :label="$t('Mounting.removalmethodp')"/>
        <el-table-column prop="casOne" align="center" :label="$t('hellow.casOne')">
          <template #default="scope">
          <el-tag
            :type="scope.row.casOne == 1 ? 'success' : 'danger'"
          >
          {{ scope.row.casOne == 1 ? $t('hellow.Y') : $t('hellow.F') }}
          </el-tag>
        </template>
        </el-table-column>
        <el-table-column prop="casTwo" align="center" :label="$t('hellow.casTwo')">
          <template #default="scope">
          <el-tag
            :type="scope.row.casTwo == 1 ? 'success' : 'danger'"
          >
          {{ scope.row.casTwo == 1 ? $t('hellow.Y') : $t('hellow.F') }}
          </el-tag>
        </template>
        </el-table-column>
        <el-table-column prop="casThree" align="center" :label="$t('hellow.casThree')">
          <template #default="scope">
          <el-tag
            :type="scope.row.casThree == 1 ? 'success' : 'danger'"
          >
          {{ scope.row.casThree == 1 ? $t('hellow.Y') : $t('hellow.F') }}
          </el-tag>
        </template>
        </el-table-column>
        <el-table-column prop="casFour" align="center" :label="$t('hellow.casFour')">
          <template #default="scope">
          <el-tag
            :type="scope.row.casFour == 1 ? 'success' : 'danger'"
          >
          {{ scope.row.casFour == 1 ? $t('hellow.Y') : $t('hellow.F') }}
          </el-tag>
        </template>
        </el-table-column>
        <el-table-column prop="casOne" align="center" :label="$t('hellow.casOne')" min-width="110">
      <template #default="scope">
        <el-tag :type="getcasOnea(scope.row.casOne)">
          {{ getStatuscasOnea(scope.row.casOne) }}
        </el-tag>
      </template>
    </el-table-column>
    <el-table-column prop="casTwo" align="center" :label="$t('hellow.casTwo')" min-width="110">
      <template #default="scope">
        <el-tag :type="getcasOneb(scope.row.casTwo)">
          {{ getStatuscasOneb(scope.row.casTwo) }}
        </el-tag>
      </template>
    </el-table-column>
    <el-table-column prop="casThree" align="center" :label="$t('hellow.casThree')" min-width="110">
      <template #default="scope">
        <el-tag :type="getcasOnec(scope.row.casThree)">
          {{ getStatuscasOnec(scope.row.casThree) }}
        </el-tag>
      </template>
    </el-table-column>
    <el-table-column prop="casFour" align="center" :label="$t('hellow.casFour')" min-width="110">
      <template #default="scope">
        <el-tag :type="getcasOned(scope.row.casFour)">
          {{ getStatuscasOned(scope.row.casFour) }}
        </el-tag>
      </template>
    </el-table-column>
        <el-table-column prop="frameOne" align="center" :label="$t('hellow.frameOne')"/>
        <el-table-column prop="frameTwo" align="center" :label="$t('hellow.frameTwo')"/>
        <el-table-column prop="frameThree" align="center" :label="$t('hellow.frameThree')"/>
@@ -1065,7 +1057,7 @@
const dialogFormVisibled = ref(false)
const dialogFormVisiblee = ref(false)
const add = ref(false)
const adda = ref(false)
const adda = ref(false)
const currentPage2 = ref(1)
const currentRow = reactive({});
const formattedProcessType = ref([]);
@@ -1093,11 +1085,9 @@
const currentPageKey = computed(() => `93${currentPage.value - 1}`);
const handlePageChange1 = (newPage) => {
  currentPage.value = newPage;
  console.log(currentPage.value);
};
const handlePageChange2 = (newPage) => {
  currentPage2.value = newPage;
  console.log(currentPage2.value);
  fetchFlowBind(currentRow.projectNumber, currentRow.layer, currentPage2.value);
};
const handleMessage = (data) => {
@@ -1224,6 +1214,87 @@
  mulan.value = true;
  fetchmulan();
};
function getcasOnea(casOne) {
  switch (casOne) {
    case "1":
      return 'success';
    case "0":
      return 'warning';
    default:
      return 'info';
  }
}
function getStatuscasOnea(casOne) {
  switch (casOne) {
    case "1":
      return t('hellow.Y');
    case "0":
      return t('hellow.F');
    default:
      return '';
  }
}
function getcasOneb(casOne) {
  switch (casOne) {
    case "1":
      return 'success';
    case "0":
      return 'warning';
    default:
      return 'info';
  }
}
function getStatuscasOneb(casOne) {
  switch (casOne) {
    case "1":
      return t('hellow.Y');
    case "0":
      return t('hellow.F');
    default:
      return '';
  }
}
function getcasOnec(casOne) {
  switch (casOne) {
    case "1":
      return 'success';
    case "0":
      return 'warning';
    default:
      return 'info';
  }
}
function getStatuscasOnec(casOne) {
  switch (casOne) {
    case "1":
      return t('hellow.Y');
    case "0":
      return t('hellow.F');
    default:
      return '';
  }
}
function getcasOned(casOne) {
  switch (casOne) {
    case "1":
      return 'success';
    case "0":
      return 'warning';
    default:
      return 'info';
  }
}
function getStatuscasOned(casOne) {
  switch (casOne) {
    case "1":
      return t('hellow.Y');
    case "0":
      return t('hellow.F');
    default:
      return '';
  }
}
function getStatusTypea(intervalFrameTypeOne) {  
  switch (intervalFrameTypeOne) {  
    case "1":
@@ -1372,8 +1443,6 @@
    if (response.code == 200) {
      ElMessage.success(response.message);
      tableDatax.value = response.data;
      console.log(response.data);
      titleformulaName.value = response.data.map(item => ({ formulaId: item.id, formulaName: item.formulaName }));
    } else {
      ElMessage.error('Failed to fetch data');
@@ -1391,9 +1460,31 @@
    formulaNameid.value = { id: null };
  }
};
// 验证函数
function validateForm() {
  const errors = [];
  if (!formulaName.value) errors.push('必填!');
  if (filmRemove.value === null) errors.push('必填!');
  if (!bottomRemove.value) errors.push('必填!');
  if (!topRemove.value) errors.push('必填!');
  if (!leftRemove.value) errors.push('必填!');
  if (!rightRemove.value) errors.push('必填!');
  if (casOne.value === null) errors.push('必填!');
  if (!frameOne.value) errors.push('必填!');
  if (!intervalFrameHeightOne.value) errors.push('必填!');
  if (!intervalFrameWidthOne.value) errors.push('必填!');
  if (intervalFrameTypeOne.value === null) errors.push('必填!');
  if (!sealInsert.value) errors.push('必填!');
  if (errors.length > 0) {
    ElMessage.error(errors.join(''));
    return false;
  }
  return true;
}
// 中空配方添加
const handleConfirm = async () => {
  try {
    if (!validateForm()) return;
    const response = await request.post('/hollowGlass/hollowFormulaDetails/saveFormulaDetails',{
      formulaName: formulaName.value,
      filmRemove: filmRemove.value,
@@ -1425,7 +1516,7 @@
    });
    if (response.code == 200) {
      ElMessage.success(response.message);
      tableDatax.value = response.data;
      // tableDatax.value = response.data;
      fetchmulan()
      add.value = false
      formulaName.value = '';