物料组新增导入优化

yangwl
shaoyong 7 months ago
parent e8252a155c
commit 59e95d5f39

@ -50,3 +50,11 @@ export function delMaterialGroup(id) {
method: 'delete' method: 'delete'
}); });
} }
export function getOriginalGroupList(query) {
return request({
url: '/quality/materialGroup/getOriginalGroupList',
method: 'get',
params: query
});
}

@ -58,6 +58,9 @@
<el-form-item label="物料组名称" prop="groupName"> <el-form-item label="物料组名称" prop="groupName">
<el-input v-model="form.groupName" placeholder="请输入物料组名称" /> <el-input v-model="form.groupName" placeholder="请输入物料组名称" />
</el-form-item> </el-form-item>
<el-form-item label="物料组编码" prop="groupCode">
<el-input v-model="form.groupCode" placeholder="请输入物料组编码" disabled/>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -75,6 +78,7 @@
<script> <script>
import { import {
getGroupList,
addMaterialGroup, addMaterialGroup,
delMaterialGroup, delMaterialGroup,
updateMaterialGroup, updateMaterialGroup,

@ -8,8 +8,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24" :xs="24"> <el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left"> <el-form :model="queryParams" ref="queryProjectForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="检测项目名称"> <el-form-item label="检测项目名称" prop="ruleName">
<el-input <el-input
v-model="queryParams.ruleName" v-model="queryParams.ruleName"
placeholder="检测项目名称" placeholder="检测项目名称"
@ -19,11 +19,11 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="检测方案名称"> <el-form-item label="检测方案名称" prop="projectType">
<el-select v-model="queryParams.projectType" filterable clearable placeholder="请选择检测方案"> <el-select v-model="queryParams.projectType" filterable clearable placeholder="请选择检测方案">
<el-option <el-option
v-for="item in projectTypeOptions" v-for="(item,index) in projectTypeOptions"
:key="item.projectTypeCode" :key="index"
:label="item.projectTypeName" :label="item.projectTypeName"
:value="item.projectTypeCode"> :value="item.projectTypeCode">
</el-option> </el-option>
@ -66,7 +66,7 @@
</el-table-column> </el-table-column>
<el-table-column label="测量单位" align="left" prop="unitCode" width="90"/> <el-table-column label="测量单位" align="left" prop="unitCode" width="90"/>
<el-table-column label="抽样方案" align="left" prop="samplePlan" width="100" :show-overflow-tooltip="true"/> <el-table-column label="抽样方案" align="left" prop="samplePlan" width="100" :show-overflow-tooltip="true"/>
<el-table-column label="合格判定" align="left" prop="judge"/ width="100"> <el-table-column label="合格判定" align="left" prop="judge" width="100" />
<el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/> <el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/>
<el-table-column label="检验方式" align="left" prop="checkMode" width="90" :show-overflow-tooltip="true"/> <el-table-column label="检验方式" align="left" prop="checkMode" width="90" :show-overflow-tooltip="true"/>
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/> <el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
@ -107,7 +107,8 @@ export default {
total: 0, total: 0,
// BOM // BOM
itemList: null, itemList: null,
ruleName: null,
projectType:null,
// //
bomCode: undefined, bomCode: undefined,
defaultProps: { defaultProps: {
@ -164,7 +165,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryProjectForm");
this.handleQuery(); this.handleQuery();
}, },
@ -183,6 +184,8 @@ export default {
this.$emit('onSelected', this.$refs.myTable.selection); this.$emit('onSelected', this.$refs.myTable.selection);
this.showFlag = false; this.showFlag = false;
this.ruleName = '';
this.projectType = '';
}, },
} }
}; };

@ -10,8 +10,8 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="检验规则属性" prop="propertyCode"> <el-form-item label="检验规则属性" prop="propertyCode">
<el-select <el-select
v-model="queryParams.propertyCode" v-model="queryParams.propertyCode"
placeholder="请选择检验规则属性" placeholder="请选择检验规则属性"
clearable > clearable >
<el-option <el-option
@ -139,7 +139,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -243,8 +243,8 @@
<el-input type='textarea' v-model="form.judge" placeholder="合格判定" /> <el-input type='textarea' v-model="form.judge" placeholder="合格判定" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
@ -281,7 +281,7 @@
<el-button @click="upload.open = false"> </el-button> <el-button @click="upload.open = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -340,7 +340,7 @@ export default {
// //
updateSupport: 0, updateSupport: 0,
// //
headers: { headers: {
Authorization: "Bearer " + getToken(), Authorization: "Bearer " + getToken(),
poolName: localStorage.getItem('USER_POOL_NAME_CURRENT'), poolName: localStorage.getItem('USER_POOL_NAME_CURRENT'),
}, },
@ -483,7 +483,7 @@ export default {
/** 下载模板操作 */ /** 下载模板操作 */
importTemplate() { importTemplate() {
this.download('quality/project/importTemplate', { this.download('quality/project/importTemplate', {
}, `user_template_${new Date().getTime()}.xlsx`) }, `check_project_template_${new Date().getTime()}.xlsx`)
}, },
// //
handleFileUploadProgress(event, file, fileList) { handleFileUploadProgress(event, file, fileList) {

Loading…
Cancel
Save