| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="数量:" prop="quantity"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="2" :disabled="quantityDisabled"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="30"> |
| | | <el-col :span="12"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="数量:" prop="quantity"> |
| | | <el-input-number :step="0.01" :min="0" style="width: 100%" v-model="form.quantity" placeholder="请输入" clearable :precision="2"/> |
| | | <el-form-item label="不良原因:" prop="defectiveReason"> |
| | | <el-select v-model="form.defectiveReason" placeholder="请选择" clearable style="width: 100%"> |
| | | <el-option :label="item.label" :value="item.value" v-for="(item,index) in defective_reason" :key="index" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref, reactive, toRefs, getCurrentInstance, nextTick} from "vue"; |
| | | import {ref, reactive, toRefs, computed, getCurrentInstance, nextTick} from "vue"; |
| | | import {getOptions} from "@/api/procurementManagement/procurementLedger.js"; |
| | | import {modelList, productTreeList} from "@/api/basicData/product.js"; |
| | | import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js"; |
| | |
| | | productModelId: "", |
| | | model: "", |
| | | testStandardId: "", |
| | | defectiveReason: undefined, |
| | | unit: "", |
| | | quantity: "", |
| | | checkCompany: "", |
| | |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | // 编辑时:productMainId 或 purchaseLedgerId 任一有值则数量置灰 |
| | | const quantityDisabled = computed(() => { |
| | | const v = form.value || {}; |
| | | return !!(v.productMainId != null || v.purchaseLedgerId != null); |
| | | }); |
| | | const supplierList = ref([]); |
| | | const productOptions = ref([]); |
| | | const { defective_reason } = proxy.useDict("defective_reason"); |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "指标", |