质量系统-检验任务管理

master
zhaoxiaolin 1 year ago
parent bd8c04888a
commit c02abc4c1b

@ -51,3 +51,21 @@ export function getQcListBom(query) {
params: query
});
}
// 查询供应商管理列表
export function getQcListSupplier(query) {
return request({
url: '/quality/qcIncome/getQcListSupplier',
method: 'get',
params: query
});
}
// 查询人员列表
export function getQcListUser(query) {
return request({
url: '/quality/qcIncome/getQcListUser',
method: 'get',
params: query
});
}

@ -178,35 +178,45 @@
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入物料名称" >
<el-input v-model="form.materialName" placeholder="请输入物料名称" disabled>
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="收货数量" prop="quality">
<el-input-number v-model="form.quality" placeholder="请输入收货数量" />
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单位" prop="unit">
<el-input v-model="form.unit" placeholder="请输入单位" />
<el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-option
v-for="dict in dict.type.unit"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="供应商名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请输入供应商名称" />
<el-input v-model="form.supplierName" placeholder="请输入供应商名称" disabled>
<el-button slot="append" @click="handleSelectSupplier" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
@ -218,7 +228,7 @@
<el-form-item label="来料时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="date"
type="datetime"
value-format="yyyy-MM-dd"
placeholder="请选择来料时间">
</el-date-picker>
@ -228,7 +238,9 @@
<el-row>
<el-col :span="8">
<el-form-item label="检测人姓名" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请输入检测人姓名" />
<el-input v-model="form.checkManName" placeholder="请输入检测人姓名" disabled>
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
@ -253,15 +265,28 @@
ref="itemSelectMaterial"
@onSelected="onSelectMaterial"
></ItemSelectMaterial>
<!--供应商选择弹窗-->
<ItemSelectSupplier
ref="itemSelectSupplier"
@onSelected="onSelectSupplier"
></ItemSelectSupplier>
<!--人员选择弹窗-->
<ItemSelectUser
ref="itemSelectUser"
@onSelected="onSelectUser"
></ItemSelectUser>
</div>
</template>
<script>
import { listIncome, getIncome, delIncome, addIncome, updateIncome } from "@/api/quality/income";
import ItemSelectMaterial from "./selectMaterial.vue";
import ItemSelectSupplier from "./selectSupplier.vue";
import ItemSelectUser from "./selectUser.vue";
export default {
name: "Income",
components: { ItemSelectMaterial },
components: { ItemSelectMaterial,ItemSelectSupplier,ItemSelectUser },
dicts: ["unit"],
data() {
return {
//
@ -447,6 +472,26 @@ export default {
onSelectMaterial(obj) {
this.form.materialCode = obj.code;
this.form.materialName = obj.name;
},
/**供应商选择弹出框**/
handleSelectSupplier() {
this.$refs.itemSelectSupplier.showFlag = true;
},
//
onSelectSupplier(obj) {
this.form.supplierCode = obj.code;
this.form.supplierName = obj.name;
},
/**人员选择弹出框**/
handleSelectUser() {
this.$refs.itemSelectUser.showFlag = true;
},
//
onSelectUser(obj) {
this.form.checkManCode = obj.code;
this.form.checkManName = obj.name;
}
}
};

@ -58,7 +58,7 @@
</template>
<script>
import { listIncome, getIncome, delIncome, addIncome, updateIncome,getQcListBom } from "@/api/quality/income";
import {getQcListBom } from "@/api/quality/income";
export default {
name: "itemSelectMaterial",
data() {

@ -0,0 +1,148 @@
<template>
<el-dialog title="供应商选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<!--BOM数据-->
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
<el-form-item label="供应商编码" prop="itemCode">
<el-input
v-model="queryParams.supplierCode"
placeholder="供应商编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="供应商名称" prop="itemName">
<el-input
v-model="queryParams.supplierName"
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 type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="供应商编码" align="left" key="supplierCode" prop="supplierCode" :show-overflow-tooltip="true" />
<el-table-column label="供应商名称" align="left" key="supplierName" prop="supplierName" :show-overflow-tooltip="true" />
<el-table-column label="地址" align="left" key="address" prop="address" :show-overflow-tooltip="true" />
<el-table-column label="联系方式" align="left" key="contactPhone" prop="contactPhone" :show-overflow-tooltip="true" />
</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="submitBomForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getQcListSupplier } from "@/api/quality/income";
export default {
name: "itemSelectSupplier",
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
itemTypeOptions: undefined,
//
supplierCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
supplierCode: '',
supplierName : ''
}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getQcListSupplier(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.ids = selection.map(item => item.supplierCode);
this.idsName = selection.map(item => item.supplierName);
this.single = selection.length!==1;
this.multiple = !selection.length;
console.log("多选框",this.ids);
},
submitBomForm() {
this.selectedRows.code = this.ids;
this.selectedRows.name = this.idsName;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
}
};
</script>

@ -0,0 +1,146 @@
<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="center">
<el-form-item label="员工工号">
<el-input
v-model="queryParams.userCoe"
placeholder="员工工号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工姓名">
<el-input
v-model="queryParams.userName"
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 type="index" width="90" align="center" :index="indexMethod" label="序号"></el-table-column>
<el-table-column label="员工姓名" align="left" key="userId" prop="userId" :show-overflow-tooltip="true" />
<el-table-column label="员工工号" align="left" key="userCode" prop="userCode" :show-overflow-tooltip="true" />
<el-table-column label="员工姓名" align="left" key="userName" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="手机号" align="left" key="phonenumber" prop="phonenumber" :show-overflow-tooltip="true" />
</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="submitBomForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getQcListUser } from "@/api/quality/income";
export default {
name: "itemSelectUser",
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,
userCode: '',
userName : ''
}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getQcListUser(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.ids = selection.map(item => item.userCode);
this.idsName = selection.map(item => item.userName);
this.single = selection.length!==1;
this.multiple = !selection.length;
console.log("多选框",this.ids);
},
submitBomForm() {
this.selectedRows.code = this.ids;
this.selectedRows.name = this.idsName;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
}
};
</script>
Loading…
Cancel
Save