|
|
|
|
@ -4,9 +4,9 @@
|
|
|
|
|
<div v-show="showSearch" class="mb-[10px]">
|
|
|
|
|
<el-card shadow="hover">
|
|
|
|
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="80px">
|
|
|
|
|
<el-form-item label="计划标识" prop="planFlag">
|
|
|
|
|
<el-select v-model="queryParams.planFlag" placeholder="请选择计划标识" clearable>
|
|
|
|
|
<el-option v-for="dict in plan_flag" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
|
<el-form-item label="标准物料标识" prop="materialFlag">
|
|
|
|
|
<el-select v-model="queryParams.materialFlag" placeholder="请选择标准物料标识" clearable>
|
|
|
|
|
<el-option v-for="dict in material_flag" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="合同ID" prop="contractId">-->
|
|
|
|
|
@ -64,9 +64,9 @@
|
|
|
|
|
<el-table v-loading="loading" border :data="contractMaterialList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="合同物料ID" align="center" prop="contractMaterialId" v-if="columns[0].visible" />
|
|
|
|
|
<el-table-column label="计划标识" align="center" prop="planFlag" v-if="columns[2].visible">
|
|
|
|
|
<el-table-column label="标准物料标识" align="center" prop="materialFlag" v-if="columns[2].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="plan_flag" :value="scope.row.planFlag" />
|
|
|
|
|
<dict-tag :options="material_flag" :value="scope.row.materialFlag" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="合同ID" align="center" prop="contractId" v-if="columns[3].visible" />
|
|
|
|
|
@ -116,9 +116,9 @@
|
|
|
|
|
<!-- 添加或修改合同物料信息对话框 -->
|
|
|
|
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="contractMaterialFormRef" :model="form" :rules="rules" label-width="120px">
|
|
|
|
|
<el-form-item label="计划标识" prop="planFlag">
|
|
|
|
|
<el-radio-group v-model="form.planFlag">
|
|
|
|
|
<el-radio v-for="dict in plan_flag" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
|
|
|
|
|
<el-form-item label="标准物料标识" prop="materialFlag">
|
|
|
|
|
<el-radio-group v-model="form.materialFlag">
|
|
|
|
|
<el-radio v-for="dict in material_flag" :key="dict.value" :value="dict.value">{{ dict.label }}</el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="合同ID" prop="contractId">
|
|
|
|
|
@ -184,7 +184,7 @@ import {
|
|
|
|
|
import { ContractMaterialVO, ContractMaterialQuery, ContractMaterialForm } from '@/api/oa/erp/contractMaterial/types';
|
|
|
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
|
|
const { active_flag, plan_flag } = toRefs<any>(proxy?.useDict('active_flag', 'plan_flag'));
|
|
|
|
|
const { active_flag, material_flag } = toRefs<any>(proxy?.useDict('active_flag', 'material_flag'));
|
|
|
|
|
|
|
|
|
|
const contractMaterialList = ref<ContractMaterialVO[]>([]);
|
|
|
|
|
const buttonLoading = ref(false);
|
|
|
|
|
@ -207,7 +207,7 @@ const dialog = reactive<DialogOption>({
|
|
|
|
|
const columns = ref<FieldOption[]>([
|
|
|
|
|
{ key: 0, label: `合同物料ID`, visible: false },
|
|
|
|
|
{ key: 1, label: `租户编号`, visible: false },
|
|
|
|
|
{ key: 2, label: `计划标识`, visible: true },
|
|
|
|
|
{ key: 2, label: `标准物料标识`, visible: true },
|
|
|
|
|
{ key: 3, label: `合同ID`, visible: true },
|
|
|
|
|
{ key: 4, label: `产品名称`, visible: true },
|
|
|
|
|
{ key: 5, label: `规格描述`, visible: true },
|
|
|
|
|
@ -231,7 +231,7 @@ const columns = ref<FieldOption[]>([
|
|
|
|
|
|
|
|
|
|
const initFormData: ContractMaterialForm = {
|
|
|
|
|
contractMaterialId: undefined,
|
|
|
|
|
planFlag: undefined,
|
|
|
|
|
materialFlag: undefined,
|
|
|
|
|
contractId: undefined,
|
|
|
|
|
productName: undefined,
|
|
|
|
|
specificationDescription: undefined,
|
|
|
|
|
@ -251,7 +251,7 @@ const data = reactive<PageData<ContractMaterialForm, ContractMaterialQuery>>({
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
planFlag: undefined,
|
|
|
|
|
materialFlag: undefined,
|
|
|
|
|
contractId: undefined,
|
|
|
|
|
productName: undefined,
|
|
|
|
|
specificationDescription: undefined,
|
|
|
|
|
|