gongchunyi
8 小时以前 4dee4cb5b31a7f1dcd2c7b3d72f74b78d2fe3f29
fix: 质检是否入库
已修改1个文件
24 ■■■■■ 文件已修改
src/views/qualityManagement/processInspection/components/formDia.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/qualityManagement/processInspection/components/formDia.vue
@@ -156,6 +156,20 @@
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30"
                v-if="operationType === 'edit'">
          <el-col :span="12">
            <el-form-item label="是否入库:"
                          prop="isStockIn">
              <el-switch v-model="form.isStockIn"
                         :active-value="1"
                         :inactive-value="0"
                         active-text="是"
                         inactive-text="否" />
              <span class="stock-in-tip">选择“是”将生成入库记录和库存,选择“否”只保存质检记录</span>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="检测单位:"
@@ -272,6 +286,7 @@
      checkCompany: "",
      isSampling: 0,
      samplingQuantity: "",
      isStockIn: 0,
    },
    rules: {
      checkTime: [{ required: true, message: "请输入", trigger: "blur" }],
@@ -393,6 +408,7 @@
      checkCompany: "",
      isSampling: 0,
      samplingQuantity: "",
      isStockIn: 0,
    };
    testStandardOptions.value = [];
    tableData.value = [];
@@ -403,6 +419,8 @@
      const savedTestStandardId = row.testStandardId;
      const { passRate, ...rowWithoutPassRate } = row;
      form.value = { ...rowWithoutPassRate, testStandardId: "" };
      // 编辑时"是否入库"默认否,仅修改质检记录
      form.value.isStockIn = 0;
      currentProductId.value = row.productId || 0;
      // 关键:编辑时加载规格型号下拉选项,才能反显 productModelId
      if (currentProductId.value) {
@@ -676,4 +694,10 @@
.sampling-radio-group {
  height: 32px;
}
.stock-in-tip {
  margin-left: 12px;
  font-size: 12px;
  color: #909399;
}
</style>