| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="批号" |
| | | prop="batchNo" |
| | | :rules="[ |
| | | { |
| | | required: true, |
| | | } |
| | | ]" |
| | | > |
| | | <el-input v-model="formState.batchNo"/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="规格" |
| | | prop="productModelName" |
| | | > |
| | | <el-input v-model="formState.productModelName" disabled /> |
| | | <el-input v-model="formState.productModelName" disabled/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="单位" |
| | | prop="unit" |
| | | > |
| | | <el-input v-model="formState.unit" disabled /> |
| | | <el-input v-model="formState.unit" disabled/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="工艺路线"> |
| | |
| | | <el-option v-for="item in routeOptions" |
| | | :key="item.id" |
| | | :label="`${item.processRouteCode || ''}`" |
| | | :value="item.id" /> |
| | | :value="item.id"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="需求数量" |
| | | label="预计生产数量" |
| | | prop="quantity" |
| | | > |
| | | <el-input-number v-model="formState.quantity" :step="1" :min="1" style="width: 100%" /> |
| | | <el-input-number v-model="formState.quantity" :step="1" :min="1" style="width: 100%"/> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="预计日程(天)" |
| | | prop="expectedSchedule" |
| | | > |
| | | <el-input-number v-model="formState.expectedSchedule" :step="0.01" :min="0" style="width: 100%" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="制造班组" |
| | | prop="manufacturingTeam" |
| | | > |
| | | <el-input v-model="formState.manufacturingTeam" disabled /> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | |
| | | productName: "", |
| | | productModelName: "", |
| | | unit: "", |
| | | batchNo: "", |
| | | quantity: 0, |
| | | expectedSchedule: undefined, |
| | | manufacturingTeam: undefined, |
| | | }); |
| | | |
| | | const isShow = computed({ |
| | |
| | | |
| | | const showProductSelectDialog = ref(false); |
| | | |
| | | let { proxy } = getCurrentInstance() |
| | | let {proxy} = getCurrentInstance() |
| | | |
| | | const closeModal = () => { |
| | | // 重置表单数据 |
| | |
| | | productName: "", |
| | | productModelName: "", |
| | | quantity: '', |
| | | batchNo: "", |
| | | }; |
| | | isShow.value = false; |
| | | }; |
| | |
| | | const product = products[0]; |
| | | formState.value.productId = product.productId; |
| | | formState.value.productName = product.productName; |
| | | const productNameArr = product.productName.split('-'); |
| | | if (productNameArr.length === 3 && productNameArr[0] && productNameArr[1] !== '') { |
| | | formState.value.manufacturingTeam = productNameArr[1].charAt(0) + '类车间'; |
| | | } |
| | | |
| | | formState.value.productModelName = product.model; |
| | | formState.value.productModelId = product.id; |
| | | formState.value.unit = product.unit; |
| | | showProductSelectDialog.value = false; |
| | | fetchRouteOptions( product.id); |
| | | fetchRouteOptions(product.id); |
| | | // 触发表单验证更新 |
| | | proxy.$refs["formRef"]?.validateField('productModelId'); |
| | | } |
| | |
| | | formState.value.routeId = undefined; |
| | | routeOptions.value = [] |
| | | bindRouteLoading.value = true; |
| | | listProcessRoute({ productModelId: productModelId }).then(res => { |
| | | listProcessRoute({productModelId: productModelId}).then(res => { |
| | | routeOptions.value = res.data || []; |
| | | }).finally(() => { |
| | | bindRouteLoading.value = false; |