Merge remote-tracking branch 'origin/master'
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 1.5 MiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 6.7 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 897 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 873 B |
After Width: | Height: | Size: 888 B |
After Width: | Height: | Size: 880 B |
After Width: | Height: | Size: 897 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 568 B |
After Width: | Height: | Size: 224 B |
@ -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>
|
@ -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>
|
@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-table
|
||||
:data="itemList"
|
||||
border
|
||||
>
|
||||
<!-- 序号 -->
|
||||
<el-table-column
|
||||
type="index"
|
||||
width="90"
|
||||
align="center"
|
||||
:index="indexMethod"
|
||||
label="序号"
|
||||
fixed
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备编码"
|
||||
align="center"
|
||||
prop="equipmentCode"
|
||||
fixed
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
align="center"
|
||||
prop="equipmentName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备状态"
|
||||
align="center"
|
||||
prop="equipmentStatus"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.equipment_status"
|
||||
:value="scope.row.equipmentStatus"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAuxiliaryEquipmentList } from "@/api/wms/equipment";
|
||||
import { Message } from "element-ui";
|
||||
|
||||
export default {
|
||||
name: "MdItemSingle",
|
||||
dicts: ["equipment_status"],
|
||||
data() {
|
||||
return {
|
||||
showFlag: false,
|
||||
// 选中数组
|
||||
selectedItemId: undefined,
|
||||
selectedRows: undefined,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
equipmentCode: this.equipmentCode,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
props: {
|
||||
equipmentCode: undefined,
|
||||
optType: undefined,
|
||||
workStatus: undefined,
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.showFlag = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
itemId: null,
|
||||
itemCode: this.processId,
|
||||
itemType: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
// 生成表头序号
|
||||
indexMethod(index) {
|
||||
return index + 1;
|
||||
},
|
||||
|
||||
/** 查询设备编码列表*/
|
||||
getList() {
|
||||
getAuxiliaryEquipmentList(this.queryParams).then((response) => {
|
||||
this.itemList = response.rows;
|
||||
this.total = response.total;
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="人员选择"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal="false"
|
||||
width="800px"
|
||||
center
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<!--人员数据-->
|
||||
<el-col :span="24">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="人员编码" prop="itemCode">
|
||||
<el-input
|
||||
v-model="queryParams.itemCode"
|
||||
placeholder="请输入人员编码"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员名称" prop="itemName">
|
||||
<el-input
|
||||
v-model="queryParams.itemName"
|
||||
placeholder="请输入人员名称"
|
||||
clearable
|
||||
style="width: 150px"
|
||||
@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="handleSelectionChange"
|
||||
ref="multipleTable"
|
||||
>
|
||||
<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="center"
|
||||
key="itemCode"
|
||||
prop="userName"
|
||||
v-if="columns[0].visible"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="人员名称"
|
||||
align="left"
|
||||
key="itemName"
|
||||
prop="nickName"
|
||||
v-if="columns[1].visible"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="人员联系方式"
|
||||
align="left"
|
||||
prop="phonenumber"
|
||||
v-if="columns[2].visible"
|
||||
: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="submitForm" :disabled="multiple"
|
||||
>确 定</el-button
|
||||
>
|
||||
<el-button @click="cancel">返 回</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPersonList } from "@/api/wms/equipment";
|
||||
import { Message } from "element-ui";
|
||||
|
||||
export default {
|
||||
name: "MdItemSingle",
|
||||
data() {
|
||||
return {
|
||||
treeData1: [],
|
||||
showFlag: false,
|
||||
// 选中数组
|
||||
selectedItemId: undefined,
|
||||
selectedRows: undefined,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 人员表格数据
|
||||
itemList: null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
itemName: null,
|
||||
itemCodeGet: "",
|
||||
itemCode: null,
|
||||
nickName: null,
|
||||
userName: null,
|
||||
},
|
||||
// 列信息
|
||||
columns: [
|
||||
{ key: 0, label: `人员编码`, visible: true },
|
||||
{ key: 1, label: `人员名称`, visible: true },
|
||||
{ key: 1, label: `联系方式`, visible: true },
|
||||
],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.showFlag = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
itemId: null,
|
||||
itemCode: this.processId,
|
||||
itemType: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
handleSelectionChange(val) {
|
||||
this.itemList = val;
|
||||
},
|
||||
|
||||
// 生成表头序号
|
||||
indexMethod(index) {
|
||||
return index + 1;
|
||||
},
|
||||
|
||||
/** 查询设备编码列表*/
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.userName = this.queryParams.itemCode;
|
||||
this.queryParams.nickName = this.queryParams.itemName;
|
||||
getPersonList(this.queryParams).then((response) => {
|
||||
this.itemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams.equipmentTypeCode = null;
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.userId);
|
||||
this.userCodes = selection.map((item) => item.userName);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
|
||||
submitForm() {
|
||||
if (this.$refs.multipleTable.selection.length > 1) {
|
||||
Message.warning("只能选择一个人员,请勿选择多个!");
|
||||
} else {
|
||||
this.$emit("onSelected", this.$refs.multipleTable.selection);
|
||||
this.showFlag = false;
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,98 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="备品备件绑定"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal="false"
|
||||
width="1100px"
|
||||
center
|
||||
>
|
||||
<el-transfer
|
||||
filterable
|
||||
filter-placeholder="请输入班组人员名称"
|
||||
v-model="rightList"
|
||||
:titles="['未绑定备件列表', '已绑定备件列表']"
|
||||
:button-texts="['取消绑定', '绑定备件']"
|
||||
:data="leftList"
|
||||
>
|
||||
</el-transfer>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSparePartsList,bindSpareParts } from "@/api/wms/equipment";
|
||||
import { Message } from "element-ui";
|
||||
|
||||
export default {
|
||||
name: "MdItemSingle",
|
||||
data() {
|
||||
return {
|
||||
showFlag: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
leftList: [],
|
||||
rightList: [],
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 查询备品备件列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getSparePartsList(this.queryParams).then((response) => {
|
||||
for (let i in response.rows) {
|
||||
// 将返回的列表赋值于穿梭框左边列表
|
||||
this.leftList.push({
|
||||
key: response.rows[i].materialCode,
|
||||
label: response.rows[i].materialDesc,
|
||||
});
|
||||
}
|
||||
for (let i in response.selected) {
|
||||
this.rightList.push(response.selected[i].key);
|
||||
this.form.rightData = this.rightList;
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.rightData = this.rightList;
|
||||
bindSpareParts(this.form).then((response) => {
|
||||
this.showFlag = false;
|
||||
this.$modal.msgSuccess("绑定成功");
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.el-transfer-panel {
|
||||
width: 350px;
|
||||
}
|
||||
.query {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-right: 4px;
|
||||
}
|
||||
</style>
|