|
|
|
@ -51,7 +51,7 @@
|
|
|
|
|
<!-- <el-table-column label="主键标识" align="center" prop="equalMaterialInfoId" v-if="columns[0].visible"/>
|
|
|
|
|
<el-table-column label="租户编号" align="center" prop="tenantId" v-if="columns[1].visible"/>-->
|
|
|
|
|
<el-table-column label="物料" align="center" prop="materialName" v-if="columns[0].visible"/>
|
|
|
|
|
<el-table-column label="等同物料ID" align="center" prop="equalMaterialId" v-if="columns[1].visible"/>
|
|
|
|
|
<el-table-column label="等同物料ID" align="center" prop="equalMaterialName" v-if="columns[1].visible"/>
|
|
|
|
|
<el-table-column label="激活标识" align="center" prop="activeFlag" v-if="columns[2].visible">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :options="active_flag" :value="scope.row.activeFlag"/>
|
|
|
|
@ -85,6 +85,8 @@
|
|
|
|
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
|
|
|
</el-card>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改等同物料信息对话框 -->
|
|
|
|
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="baseEqualMaterialInfoFormRef" :model="form" :rules="rules" label-width="120px">
|
|
|
|
@ -93,22 +95,19 @@
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
|
|
|
|
|
<el-form-item label="物料" prop="materialId">
|
|
|
|
|
<!-- <el-input v-model="form.materialId" placeholder="请输入物料ID" />-->
|
|
|
|
|
<!-- <el-select v-model="form.materialId" placeholder="请选择物料" clearable >
|
|
|
|
|
<el-option v-for="item in materialList"
|
|
|
|
|
:key="item.materialId"
|
|
|
|
|
:label="item.materialName"
|
|
|
|
|
:value="item.materialId"/>
|
|
|
|
|
</el-select>-->
|
|
|
|
|
<el-input v-model="form.materialName" placeholder="请点击检索物料" @click="handleMaterialAdd" readonly>
|
|
|
|
|
<el-input v-model="form.materialName" placeholder="请点击检索物料" @click="handleMaterialAdd('material')" readonly>
|
|
|
|
|
<template #append>
|
|
|
|
|
<el-icon class="el-input__icon" ><search/></el-icon>
|
|
|
|
|
<el-icon class="el-input__icon"><search/></el-icon>
|
|
|
|
|
</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="等同物料ID" prop="equalMaterialId">
|
|
|
|
|
<el-input v-model="form.equalMaterialId" placeholder="请输入等同物料ID" />
|
|
|
|
|
<el-input v-model="form.equalMaterialName" placeholder="请点击检索物料" @click="handleMaterialAdd('equalMaterial')" readonly>
|
|
|
|
|
<template #append>
|
|
|
|
|
<el-icon class="el-input__icon"><search/></el-icon>
|
|
|
|
|
</template>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="激活标识" prop="activeFlag">
|
|
|
|
|
<el-radio-group v-model="form.activeFlag">
|
|
|
|
@ -193,8 +192,8 @@ const initFormData: BaseEqualMaterialInfoForm = {
|
|
|
|
|
equalMaterialId: undefined,
|
|
|
|
|
activeFlag: '1',
|
|
|
|
|
remark: undefined,
|
|
|
|
|
|
|
|
|
|
materialName: undefined,//映射字段
|
|
|
|
|
equalMaterialName: undefined,//新增:等同物料名称
|
|
|
|
|
}
|
|
|
|
|
const data = reactive<PageData<BaseEqualMaterialInfoForm, BaseEqualMaterialInfoQuery>>({
|
|
|
|
|
form: {...initFormData},
|
|
|
|
@ -207,9 +206,8 @@ const data = reactive<PageData<BaseEqualMaterialInfoForm, BaseEqualMaterialInfoQ
|
|
|
|
|
activeFlag: undefined,
|
|
|
|
|
|
|
|
|
|
materialName: undefined,//映射字段
|
|
|
|
|
|
|
|
|
|
params: {
|
|
|
|
|
}
|
|
|
|
|
equalMaterialName: undefined,//新增:等同物料名称
|
|
|
|
|
params: {},
|
|
|
|
|
},
|
|
|
|
|
rules: {
|
|
|
|
|
}
|
|
|
|
@ -317,16 +315,24 @@ const getListsSelect = async() => {
|
|
|
|
|
/* 以下为添加物料信息对话框相关方法 */
|
|
|
|
|
let materialSelectRef = ref();//物料选择对话框绑定
|
|
|
|
|
const materialOpen = ref(false);//物料选择对话框显示
|
|
|
|
|
const selectType = ref(''); // 新增:用于标识当前选择的是哪个字段
|
|
|
|
|
|
|
|
|
|
/** 提交物料BOM信息按钮 */
|
|
|
|
|
const submitMaterialForm = () => {
|
|
|
|
|
let selectedRow = materialSelectRef.value.tableRef.store.states.currentRow.value;
|
|
|
|
|
|
|
|
|
|
form.value.materialId = selectedRow.materialId
|
|
|
|
|
form.value.materialName = selectedRow.materialName
|
|
|
|
|
materialOpen.value = false;
|
|
|
|
|
if (selectType.value === 'material') {
|
|
|
|
|
form.value.materialId = selectedRow.materialId;
|
|
|
|
|
form.value.materialName = selectedRow.materialName;
|
|
|
|
|
} else if (selectType.value === 'equalMaterial') {
|
|
|
|
|
form.value.equalMaterialId = selectedRow.materialId;
|
|
|
|
|
form.value.equalMaterialName = selectedRow.materialName;
|
|
|
|
|
}
|
|
|
|
|
materialOpen.value = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
const handleMaterialAdd = () => {
|
|
|
|
|
const handleMaterialAdd = (type: string) => {
|
|
|
|
|
selectType.value = type;
|
|
|
|
|
materialOpen.value = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|