| | |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | label="生产批号" |
| | | prop="lotNo" |
| | | > |
| | | <el-input v-model="formState.lotNo" placeholder="请输入生产批号" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="优先级" |
| | | prop="priority" |
| | | :rules="[ |
| | | { |
| | | required: true, |
| | | message: '请选择优先级', |
| | | trigger: 'change', |
| | | }, |
| | | ]" |
| | | > |
| | | <el-select v-model="formState.priority" placeholder="请选择优先级" style="width: 100%;" clearable> |
| | | <el-option |
| | | v-for="dict in priority_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item |
| | | label="需求数量" |
| | |
| | | > |
| | | <el-input-number v-model="formState.quantity" :step="1" :min="1" style="width: 100%" /> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | |
| | | <!-- 产品选择弹窗 --> |
| | |
| | | productName: "", |
| | | productModelName: "", |
| | | unit: "", |
| | | priority: undefined, |
| | | quantity: 0, |
| | | lotNo: "", |
| | | }); |
| | | |
| | | const isShow = computed({ |
| | |
| | | |
| | | const showProductSelectDialog = ref(false); |
| | | |
| | | let { proxy } = getCurrentInstance() |
| | | let { proxy } = getCurrentInstance(); |
| | | const { priority_type } = proxy.useDict("priority_type"); |
| | | |
| | | if (priority_type.value && priority_type.value.length > 0) { |
| | | formState.value.priority = priority_type.value[2].value; |
| | | } |
| | | |
| | | const closeModal = () => { |
| | | // 重置表单数据 |
| | |
| | | routeId: undefined, |
| | | productName: "", |
| | | productModelName: "", |
| | | unit: "", |
| | | priority: priority_type.value && priority_type.value.length > 0 ? priority_type.value[2].value : undefined, |
| | | quantity: '', |
| | | lotNo: "", |
| | | }; |
| | | isShow.value = false; |
| | | }; |
| | |
| | | <!-- 生产订单 --> |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | | const { priority_type } = proxy.useDict("priority_type"); |
| | | |
| | | const router = useRouter(); |
| | | const isShowNewModal = ref(false); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "优先级", |
| | | prop: "priority", |
| | | width: '100px', |
| | | dataType: "tag", |
| | | formatData: val => proxy.selectDictLabel(priority_type.value, val), |
| | | formatType: val => { |
| | | const v = Number(val); |
| | | if (v === 0) return "danger"; // 红色 |
| | | if (v === 1) return "warning"; // 黄色 |
| | | if (v === 2) return "success"; // 绿色 |
| | | return ""; |
| | | }, |
| | | }, |
| | | { |
| | | label: "生产批号", |
| | | prop: "lotNo", |
| | | width: '120px', |
| | | }, |
| | | { |
| | | label: "生产订单号", |
| | | prop: "npsNo", |
| | | width: '120px', |
| | |
| | | // 生产工单 |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | |
| | | import { getCurrentInstance, reactive, toRefs } from "vue"; |
| | | import FilesDia from "./components/filesDia.vue"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const { priority_type } = proxy.useDict("priority_type"); |
| | | |
| | | const tableColumn = ref([ |
| | | { |
| | | label: "工单类型", |
| | | prop: "workOrderType", |
| | | width: "80", |
| | | label: "优先级", |
| | | prop: "priority", |
| | | width: '100px', |
| | | dataType: "tag", |
| | | formatData: val => proxy.selectDictLabel(priority_type.value, val), |
| | | formatType: val => { |
| | | const v = Number(val); |
| | | if (v === 0) return "danger"; // 红色 |
| | | if (v === 1) return "warning"; // 黄色 |
| | | if (v === 2) return "success"; // 绿色 |
| | | return ""; |
| | | }, |
| | | }, |
| | | // { |
| | | // label: "工单类型", |
| | | // prop: "workOrderType", |
| | | // width: "80", |
| | | // }, |
| | | { |
| | | label: "工单编号", |
| | | prop: "workOrderNo", |