质量调整
parent
48cba41dce
commit
c9d0e531f0
@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<el-dialog title="检测项选择"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal= false
|
||||
width="1000px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
|
||||
<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-item label="检测项目名称">
|
||||
<el-input
|
||||
v-model="queryParams.ruleName"
|
||||
placeholder="检测项目名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
|
||||
<el-table-column width="50" align="center" type="selection">
|
||||
</el-table-column>
|
||||
<!-- 序号 -->
|
||||
<el-table-column label="检测项目Id" align="left" key="id" prop="id" v-if="false" />
|
||||
<el-table-column label="检测项目编号" align="left" key="orderNum" prop="orderNum" width="110"/>
|
||||
<el-table-column label="检测项目名称" align="left" key="ruleName" prop="ruleName" width="250" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规则属性" align="left" prop="propertyCode">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.qc_rule_prop"
|
||||
:value="scope.row.propertyCode"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测标准" align="left" prop="checkStandard" width="250" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="上差值" align="center" prop="upperDiff" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input type="number" size="small" v-model="scope.row.upperDiff" @change="handleEdit(scope.$index,scope.row)"
|
||||
:disabled='scope.row.propertyCode=="0"'></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下差值" align="center" prop="downDiff" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input type="number" size="small" v-model="scope.row.downDiff" @change="handleEdit(scope.$index,scope.row)"
|
||||
:disabled='scope.row.propertyCode=="0"'
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="测量单位" align="left" prop="unitCode" width="90"/>
|
||||
<el-table-column label="抽样方案" align="left" prop="samplePlan" 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="checkMode" width="90"/>
|
||||
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitProjectItems">确 定</el-button>
|
||||
<el-button @click="showFlag=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getProjectInfoList } from "@/api/quality/checkTypeProject";
|
||||
export default {
|
||||
name: "itemSelectUser",
|
||||
dicts: ["qc_rule_prop"],
|
||||
data() {
|
||||
return {
|
||||
showFlag:false,
|
||||
// 选中数组
|
||||
selectedRows: {},
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// BOM产品表格数据
|
||||
itemList: null,
|
||||
|
||||
//树名称
|
||||
bomCode: undefined,
|
||||
defaultProps: {
|
||||
id: "id",
|
||||
label: "label"
|
||||
},
|
||||
selectionRows:[],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
groupId:null,
|
||||
materialCode:null,
|
||||
typeCode:null
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
//this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
init(groupId,materialCode,typeId){
|
||||
this.queryParams.groupId = groupId;
|
||||
this.queryParams.materialCode = materialCode;
|
||||
this.queryParams.typeCode = typeId;
|
||||
|
||||
this.getList();
|
||||
},
|
||||
/** 查询表格列表*/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getProjectInfoList(this.queryParams).then(response => {
|
||||
this.itemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleBomSelectionChange(selection) {
|
||||
this.selectionRows = selection
|
||||
},
|
||||
handleEdit(index, row) {
|
||||
console.log('row:',index, row);
|
||||
},
|
||||
submitProjectItems() {
|
||||
if ( this.selectionRows==0) {
|
||||
this.$modal.msgError(`请选择数据`);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.$emit('onSelected', this.$refs.myTable.selection);
|
||||
this.showFlag = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<el-dialog title="生产订单号选择"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal= false
|
||||
width="1000px"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
|
||||
<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-item label="订单号">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
placeholder="订单号"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
|
||||
<el-table-column width="50" align="center" type="selection"/>
|
||||
<el-table-column label="订单号" align="left" prop="orderNo" width="180"/>
|
||||
<el-table-column label="工单号" align="left" prop="workorderCode" width="180"/>
|
||||
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
|
||||
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>
|
||||
<el-table-column label="排产数量" align="left" prop="quality" width="100" />
|
||||
<el-table-column label="单位" align="left" prop="unit" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="生产日期" align="left" prop="incomeTime" :show-overflow-tooltip="true" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitLLOrderForm">确 定</el-button>
|
||||
<el-button @click="showFlag=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getWorkOrder } from "@/api/quality/income";
|
||||
export default {
|
||||
name: "itemSelectWorkOrder",
|
||||
data() {
|
||||
return {
|
||||
showFlag:false,
|
||||
// 选中数组
|
||||
selectedRows: {},
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// BOM产品表格数据
|
||||
itemList: null,
|
||||
|
||||
//树名称
|
||||
bomCode: undefined,
|
||||
defaultProps: {
|
||||
id: "id",
|
||||
label: "label"
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
workorderCode: ''
|
||||
},
|
||||
selectionRow:{}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
/** 查询表格列表*/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getWorkOrder(this.queryParams).then(response => {
|
||||
this.itemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
|
||||
// 多选框选中数据
|
||||
handleBomSelectionChange(selection) {
|
||||
|
||||
if(selection.length>1){
|
||||
this.$modal.msgSuccess("只能选一个");
|
||||
}
|
||||
|
||||
this.selectionRow = selection[0]
|
||||
},
|
||||
|
||||
|
||||
submitLLOrderForm() {
|
||||
this.$emit('onSelected', this.selectionRow);
|
||||
this.showFlag = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue