Merge remote-tracking branch 'origin/master'

master
wws 1 year ago
commit 0ba2ef58be

@ -42,3 +42,16 @@ export function delCheckTypeProject(id) {
method: 'delete' method: 'delete'
}); });
} }
//更改状态
export function changeStatus(id,status) {
const data = {
id,
status
}
return request({
url: '/quality/checkTypeProject/changeStatus',
method: 'put',
data: data
});
}

@ -312,7 +312,7 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openCheck" :visible.sync="openCheck"
width="1100px" width="1200px"
append-to-body append-to-body
v-if="openCheck" v-if="openCheck"
> >
@ -362,16 +362,24 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null"> <el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%" :span-method="objectSpanMethod">
<el-table-column prop="itemName" label="检查项名称" width="200"> <el-table-column prop="itemTypeName" label="检查类型" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="160"> <el-table-column prop="itemName" label="检查项名称" width="160">
</el-table-column>
<el-table-column prop="itemMethod" label="方法" width="100">
</el-table-column>
<el-table-column prop="itemTools" label="工具" width="60">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="85"> <el-table-column prop="standardType" label="标准类型" width="85">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="85"> <el-table-column prop="planLoopType" label="周期" width="50">
</el-table-column>
<el-table-column prop="planLoop" label="次" width="37">
</el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.device_reach_standard" :options="dict.type.device_reach_standard"
@ -385,9 +393,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="47"> <el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column> </el-table-column>
<el-table-column prop="picturePath" label="图片"> <el-table-column prop="picturePath" label="图片" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover placement="right" width="300" trigger="hover"> <el-popover placement="right" width="300" trigger="hover">
<div class="standardUrl_body"> <div class="standardUrl_body">
@ -631,12 +639,12 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="viewCheck" :visible.sync="viewCheck"
width="1100px" width="1200px"
append-to-body append-to-body
v-if="viewCheck" v-if="viewCheck"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-tabs type="border-card" :key="new Date().getTime()"> <el-tabs type="border-card">
<el-tab-pane label="基本信息"> <el-tab-pane label="基本信息">
<el-descriptions <el-descriptions
:column="3" :column="3"
@ -697,16 +705,24 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null"> <el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%" :span-method="objectSpanMethod">
<el-table-column prop="itemName" label="检查项名称" width="200"> <el-table-column prop="itemTypeName" label="检查类型" width="100">
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="160">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="160"> <el-table-column prop="itemMethod" label="方法" width="100">
</el-table-column>
<el-table-column prop="itemTools" label="工具" width="60">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="85"> <el-table-column prop="standardType" label="标准类型" width="85">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="85"> <el-table-column prop="planLoopType" label="周期" width="50">
</el-table-column>
<el-table-column prop="planLoop" label="次" width="37">
</el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.device_reach_standard" :options="dict.type.device_reach_standard"
@ -720,9 +736,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="47"> <el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column> </el-table-column>
<el-table-column prop="picturePath" label="图片"> <el-table-column prop="picturePath" label="图片" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover placement="right" width="300" trigger="hover"> <el-popover placement="right" width="300" trigger="hover">
<div class="standardUrl_body"> <div class="standardUrl_body">
@ -853,7 +869,7 @@
<el-form-item label="设备编码" prop="equipmentCode"> <el-form-item label="设备编码" prop="equipmentCode">
<el-input <el-input
v-model="form.equipmentCode" v-model="form.equipmentCode"
placeholder="请选择辅助设备" placeholder="请选择设备编码"
style="width: 200px" style="width: 200px"
> >
<el-button <el-button
@ -978,7 +994,7 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openView" :visible.sync="openView"
width="1100px" width="1200px"
append-to-body append-to-body
v-if="openView" v-if="openView"
> >
@ -1028,16 +1044,24 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息" v-if="checkList != null"> <el-tab-pane label="检查项信息" v-if="checkList != null">
<el-table :data="checkList" border style="width: 100%"> <el-table :data="checkList" border style="width: 100%" :span-method="objectSpanMethod">
<el-table-column prop="itemName" label="检查项名称" width="200"> <el-table-column prop="itemTypeName" label="检查类型" width="100">
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="160">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="160"> <el-table-column prop="itemMethod" label="方法" width="100">
</el-table-column>
<el-table-column prop="itemTools" label="工具" width="60">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="180"> <el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column> </el-table-column>
<el-table-column prop="standardType" label="标准类型" width="85"> <el-table-column prop="standardType" label="标准类型" width="85">
</el-table-column> </el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="85"> <el-table-column prop="planLoopType" label="周期" width="50">
</el-table-column>
<el-table-column prop="planLoop" label="次" width="37">
</el-table-column>
<el-table-column prop="detailReach" label="是否达标" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.device_reach_standard" :options="dict.type.device_reach_standard"
@ -1051,9 +1075,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="47"> <el-table-column prop="detailUnit" label="单位" width="45">
</el-table-column> </el-table-column>
<el-table-column prop="picturePath" label="图片"> <el-table-column prop="picturePath" label="图片" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover placement="right" width="300" trigger="hover"> <el-popover placement="right" width="300" trigger="hover">
<div class="standardUrl_body"> <div class="standardUrl_body">
@ -1453,8 +1477,12 @@ export default {
if (item1 != null) { if (item1 != null) {
item1.standardList.forEach((item) => { item1.standardList.forEach((item) => {
var standard = {}; var standard = {};
standard.itemTypeName = item1.itemTypeName;
standard.itemName = item1.itemName; standard.itemName = item1.itemName;
standard.itemMethod = item1.itemMethod; standard.itemMethod = item1.itemMethod;
standard.itemTools = item1.itemTools;
standard.planLoop = item1.planLoop;
standard.planLoopType = item1.planLoopType;
standard.standardName = item.standardName; standard.standardName = item.standardName;
standard.detailUpLimit = item.detailUpLimit; standard.detailUpLimit = item.detailUpLimit;
standard.detailDownLimit = item.detailDownLimit; standard.detailDownLimit = item.detailDownLimit;
@ -1469,8 +1497,10 @@ export default {
standardUrlLists.push(item2.fileAddress); standardUrlLists.push(item2.fileAddress);
}); });
standard.standardUrlLists = standardUrlLists; standard.standardUrlLists = standardUrlLists;
standards.push(standard); } else {
standard.standardUrlLists = null;
} }
standards.push(standard);
}); });
} }
}); });
@ -1525,8 +1555,12 @@ export default {
if (item1 != null) { if (item1 != null) {
item1.standardList.forEach((item) => { item1.standardList.forEach((item) => {
var standard = {}; var standard = {};
standard.itemTypeName = item1.itemTypeName;
standard.itemName = item1.itemName; standard.itemName = item1.itemName;
standard.itemMethod = item1.itemMethod; standard.itemMethod = item1.itemMethod;
standard.itemTools = item1.itemTools;
standard.planLoop = item1.planLoop;
standard.planLoopType = item1.planLoopType;
standard.standardName = item.standardName; standard.standardName = item.standardName;
standard.detailUpLimit = item.detailUpLimit; standard.detailUpLimit = item.detailUpLimit;
standard.detailDownLimit = item.detailDownLimit; standard.detailDownLimit = item.detailDownLimit;
@ -1541,8 +1575,10 @@ export default {
standardUrlLists.push(item2.fileAddress); standardUrlLists.push(item2.fileAddress);
}); });
standard.standardUrlLists = standardUrlLists; standard.standardUrlLists = standardUrlLists;
standards.push(standard); } else {
standard.standardUrlLists = null;
} }
standards.push(standard);
}); });
} }
}); });
@ -1640,6 +1676,59 @@ export default {
`faultReport_${new Date().getTime()}.xlsx` `faultReport_${new Date().getTime()}.xlsx`
); );
}, },
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
//
const currentValue = row[column.property];
//
const preRow = this.checkList[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
//
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
//
let rowspan = 1;
for (let i = rowIndex + 1; i < this.checkList.length; i++) {
const nextRow = this.checkList[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
if (columnIndex === 1) {
//
const currentValue = row[column.property];
//
const preRow = this.checkList[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
//
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
//
let rowspan = 1;
for (let i = rowIndex + 1; i < this.checkList.length; i++) {
const nextRow = this.checkList[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
},
}, },
}; };
</script> </script>

@ -173,7 +173,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['device: repairOrder:add']" v-hasPermi="['device:repairOrder:add']"
>快速工单</el-button >快速工单</el-button
> >
</el-col> </el-col>
@ -185,7 +185,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['device: repairOrder:edit']" v-hasPermi="['device:repairOrder:edit']"
>修改</el-button >修改</el-button
> >
</el-col> </el-col>
@ -208,7 +208,7 @@
icon="el-icon-download" icon="el-icon-download"
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['device: repairOrder:export']" v-hasPermi="['device:repairOrder:export']"
>导出</el-button >导出</el-button
> >
</el-col> </el-col>
@ -220,7 +220,7 @@
icon="el-icon-document-add" icon="el-icon-document-add"
size="mini" size="mini"
@click="handleApply" @click="handleApply"
v-hasPermi="['device: repairOrder:apply']" v-hasPermi="['device:repairOrder:apply']"
>委外申请</el-button >委外申请</el-button
> >
</el-col> </el-col>
@ -232,7 +232,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleWrite" @click="handleWrite"
v-hasPermi="['device: repairOrder:write']" v-hasPermi="['device:repairOrder:write']"
>填写维修记录</el-button >填写维修记录</el-button
> >
</el-col> </el-col>
@ -397,7 +397,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['device: repairOrder:edit']" v-hasPermi="['device:repairOrder:edit']"
>修改</el-button >修改</el-button
> >
<el-button <el-button
@ -405,7 +405,7 @@
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['device: repairOrder:remove']" v-hasPermi="['device:repairOrder:remove']"
>删除</el-button >删除</el-button
> >
</template> </template>
@ -794,7 +794,7 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openWrite" :visible.sync="openWrite"
width="1100px" width="1200px"
append-to-body append-to-body
v-if="openWrite" v-if="openWrite"
> >
@ -883,10 +883,14 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="detailList" border :contentStyle="CS" :label-style="LS"> <el-table :data="detailList" border :contentStyle="CS" :label-style="LS" :span-method="objectSpanMethod">
<el-table-column prop="itemTypeName" label="检查类型" width="100">
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="150"> <el-table-column prop="itemName" label="检查项名称" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="150"> <el-table-column prop="itemMethod" label="方法" width="150">
</el-table-column>
<el-table-column prop="itemTools" label="工具" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="150"> <el-table-column prop="standardName" label="标准名称" width="150">
</el-table-column> </el-table-column>
@ -905,7 +909,7 @@
width="110" width="110"
> >
<template scope="scope"> <template scope="scope">
<el-radio-group v-model="scope.row.repairReach"> <el-radio-group v-model="scope.row.repairReach" v-if="scope.row.standardType != 'quantify'">
<el-radio label="1">达标</el-radio> <el-radio label="1">达标</el-radio>
<el-radio label="0">不达标</el-radio> <el-radio label="0">不达标</el-radio>
</el-radio-group> </el-radio-group>
@ -934,10 +938,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50"> <el-table-column prop="detailUnit" label="单位" width="40">
</el-table-column> </el-table-column>
</el-table-column> <el-table-column prop="picturePath" label="维修后图片" width="60">
<el-table-column prop="picturePath" label="图片">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover placement="right" width="300" trigger="hover"> <el-popover placement="right" width="300" trigger="hover">
<div class="standardUrl_body"> <div class="standardUrl_body">
@ -1124,19 +1127,19 @@ export default {
}, },
WLS: { WLS: {
"text-align": "center", "text-align": "center",
width: "200px", width: "225px",
}, },
CS: { CS: {
"text-align": "center", "text-align": "center",
}, },
LS: { LS: {
"text-align": "center", "text-align": "center",
width: "200px", width: "225px",
}, },
// //
LSP: { LSP: {
"text-align": "center", "text-align": "center",
width: "200px", width: "225px",
}, },
// //
detailList: [], detailList: [],
@ -1493,20 +1496,24 @@ export default {
this.detailList.forEach((item1) => { this.detailList.forEach((item1) => {
// //
if (item1 != null) { if (item1 != null) {
item1.standardList.forEach((item) => { item1.standardList.forEach((item) => {
var standard = {}; var standard = {};
standard.itemName = item1.itemName; standard.itemTypeName = item1.itemTypeName;
standard.itemMethod = item1.itemMethod; standard.itemName = item1.itemName;
standard.standardName = item.standardName; standard.itemMethod = item1.itemMethod;
standard.detailUpLimit = item.detailUpLimit; standard.itemTools = item1.itemTools;
standard.detailDownLimit = item.detailDownLimit; standard.planLoop = item1.planLoop;
standard.detailUnit = item.detailUnit; standard.planLoopType = item1.planLoopType;
standard.detailReach = item.detailReach; standard.standardName = item.standardName;
standard.actualValue = item.actualValue; standard.detailUpLimit = item.detailUpLimit;
// standard.detailDownLimit = item.detailDownLimit;
standard.repairValue = item.repairValue; standard.detailUnit = item.detailUnit;
standard.repairReach = item.repairReach; standard.detailReach = item.detailReach;
standard.standardType = item.standardType; standard.actualValue = item.actualValue;
//
standard.repairValue = item.repairValue;
standard.repairReach = item.repairReach;
standard.standardType = item.standardType;
// //
var standardUrlLists = []; var standardUrlLists = [];
if (item.picturePaths != null) { if (item.picturePaths != null) {
@ -1514,8 +1521,10 @@ export default {
standardUrlLists.push(item2.fileAddress); standardUrlLists.push(item2.fileAddress);
}); });
standard.standardUrlLists = standardUrlLists; standard.standardUrlLists = standardUrlLists;
standards.push(standard); } else {
standard.standardUrlLists = null;
} }
standards.push(standard);
}); });
} }
}); });
@ -1646,6 +1655,58 @@ export default {
` repairOrder_${new Date().getTime()}.xlsx` ` repairOrder_${new Date().getTime()}.xlsx`
); );
}, },
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
//
const currentValue = row[column.property];
//
const preRow = this.detailList[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
//
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
//
let rowspan = 1;
for (let i = rowIndex + 1; i < this.detailList.length; i++) {
const nextRow = this.detailList[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
if (columnIndex === 1) {
//
const currentValue = row[column.property];
//
const preRow = this.detailList[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
//
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
//
let rowspan = 1;
for (let i = rowIndex + 1; i < this.detailList.length; i++) {
const nextRow = this.detailList[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
},
}, },
}; };
</script> </script>

@ -342,13 +342,18 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openView" :visible.sync="openView"
width="1100px" width="1200px"
append-to-body append-to-body
> >
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="报修基本信息"> <el-tab-pane label="报修基本信息">
<el-descriptions :column="3" border :contentStyle="CS" :label-style="LS"> <el-descriptions
:column="3"
border
:contentStyle="CS"
:label-style="LS"
>
<el-descriptions-item label="报修单编号">{{ <el-descriptions-item label="报修单编号">{{
form.orderCode form.orderCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -390,7 +395,11 @@
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border> <el-descriptions :column="1" border>
<el-descriptions-item label="维修前故障图片" :contentStyle="CS" :label-style="LS"> <el-descriptions-item
label="维修前故障图片"
:contentStyle="CS"
:label-style="LS"
>
<el-image <el-image
v-for="(item, index) in urlBeforeLists" v-for="(item, index) in urlBeforeLists"
:key="index" :key="index"
@ -401,7 +410,12 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="维修基本信息"> <el-tab-pane label="维修基本信息">
<el-descriptions :column="2" border :contentStyle="CS" :label-style="LS"> <el-descriptions
:column="2"
border
:contentStyle="CS"
:label-style="LS"
>
<el-descriptions-item label="维修工单号">{{ <el-descriptions-item label="维修工单号">{{
form.workCode form.workCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -465,7 +479,12 @@
form.workReason form.workReason
}}</el-descriptions-item> }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="1" border :contentStyle="CS" :label-style="LS"> <el-descriptions
:column="1"
border
:contentStyle="CS"
:label-style="LS"
>
<el-descriptions-item label="维修后图片"> <el-descriptions-item label="维修后图片">
<el-image <el-image
v-for="(item, index) in urlAfterLists" v-for="(item, index) in urlAfterLists"
@ -477,10 +496,14 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
<el-table :data="detailList" border > <el-table :data="detailList" border :span-method="objectSpanMethod">
<el-table-column prop="itemTypeName" label="检查类型" width="100">
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="150"> <el-table-column prop="itemName" label="检查项名称" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="150"> <el-table-column prop="itemMethod" label="方法" width="150">
</el-table-column>
<el-table-column prop="itemTools" label="工具" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="standardName" label="标准名称" width="150"> <el-table-column prop="standardName" label="标准名称" width="150">
</el-table-column> </el-table-column>
@ -499,7 +522,10 @@
width="110" width="110"
> >
<template scope="scope"> <template scope="scope">
<el-radio-group v-model="scope.row.repairReach"> <el-radio-group
v-model="scope.row.repairReach"
v-if="scope.row.standardType != 'quantify'"
>
<el-radio label="1">达标</el-radio> <el-radio label="1">达标</el-radio>
<el-radio label="0">不达标</el-radio> <el-radio label="0">不达标</el-radio>
</el-radio-group> </el-radio-group>
@ -528,10 +554,9 @@
</el-table-column> </el-table-column>
<el-table-column prop="detailDownLimit" label="下限" width="50"> <el-table-column prop="detailDownLimit" label="下限" width="50">
</el-table-column> </el-table-column>
<el-table-column prop="detailUnit" label="单位" width="50"> <el-table-column prop="detailUnit" label="单位" width="40">
</el-table-column> </el-table-column>
</el-table-column> <el-table-column prop="picturePath" label="图片" width="60">
<el-table-column prop="picturePath" label="图片">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover placement="right" width="300" trigger="hover"> <el-popover placement="right" width="300" trigger="hover">
<div class="standardUrl_body"> <div class="standardUrl_body">
@ -551,7 +576,7 @@
</el-popover> </el-popover>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
@ -582,6 +607,7 @@ export default {
// //
CS: { CS: {
"text-align": "center", "text-align": "center",
width: "200px",
}, },
LS: { LS: {
"text-align": "center", "text-align": "center",
@ -616,7 +642,7 @@ export default {
openView: false, openView: false,
// //
queryParams: { queryParams: {
workStatus:"1", workStatus: "1",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
orderId: null, orderId: null,
@ -831,20 +857,24 @@ export default {
this.detailList.forEach((item1) => { this.detailList.forEach((item1) => {
// //
if (item1 != null) { if (item1 != null) {
item1.standardList.forEach((item) => { item1.standardList.forEach((item) => {
var standard = {}; var standard = {};
standard.itemName = item1.itemName; standard.itemTypeName = item1.itemTypeName;
standard.itemMethod = item1.itemMethod; standard.itemName = item1.itemName;
standard.standardName = item.standardName; standard.itemMethod = item1.itemMethod;
standard.detailUpLimit = item.detailUpLimit; standard.itemTools = item1.itemTools;
standard.detailDownLimit = item.detailDownLimit; standard.planLoop = item1.planLoop;
standard.detailUnit = item.detailUnit; standard.planLoopType = item1.planLoopType;
standard.detailReach = item.detailReach; standard.standardName = item.standardName;
standard.actualValue = item.actualValue; standard.detailUpLimit = item.detailUpLimit;
// standard.detailDownLimit = item.detailDownLimit;
standard.repairValue = item.repairValue; standard.detailUnit = item.detailUnit;
standard.repairReach = item.repairReach; standard.detailReach = item.detailReach;
standard.standardType = item.standardType; standard.actualValue = item.actualValue;
//
standard.repairValue = item.repairValue;
standard.repairReach = item.repairReach;
standard.standardType = item.standardType;
// //
var standardUrlLists = []; var standardUrlLists = [];
if (item.picturePaths != null) { if (item.picturePaths != null) {
@ -852,8 +882,10 @@ export default {
standardUrlLists.push(item2.fileAddress); standardUrlLists.push(item2.fileAddress);
}); });
standard.standardUrlLists = standardUrlLists; standard.standardUrlLists = standardUrlLists;
standards.push(standard); } else {
standard.standardUrlLists = null;
} }
standards.push(standard);
}); });
} }
}); });
@ -879,6 +911,58 @@ export default {
` repairOrder_${new Date().getTime()}.xlsx` ` repairOrder_${new Date().getTime()}.xlsx`
); );
}, },
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
//
const currentValue = row[column.property];
//
const preRow = this.detailList[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
//
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
//
let rowspan = 1;
for (let i = rowIndex + 1; i < this.detailList.length; i++) {
const nextRow = this.detailList[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
if (columnIndex === 1) {
//
const currentValue = row[column.property];
//
const preRow = this.detailList[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
//
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
//
let rowspan = 1;
for (let i = rowIndex + 1; i < this.detailList.length; i++) {
const nextRow = this.detailList[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
},
}, },
}; };
</script> </script>

@ -1,10 +1,10 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="名称" prop="checkName"> <el-form-item label="节点名称" prop="checkName">
<el-input <el-input
v-model="queryParams.checkName" v-model="queryParams.checkName"
placeholder="请输入名称" placeholder="请输入检验节点名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -63,9 +63,9 @@
<el-table v-loading="loading" :data="checkTypeList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="checkTypeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="流程编号" align="center" type="index" width="100"/> <el-table-column label="检验节点编码" align="center" prop="orderCode" width="150"/>
<el-table-column label="名称" align="center" prop="checkName" /> <el-table-column label="检验节点名称" align="center" prop="checkName"/>
<el-table-column label="类型名称" align="center" prop="typeCode" > <el-table-column label="类型名称" align="center" prop="typeCode" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.check_type" :options="dict.type.check_type"
@ -106,8 +106,15 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="15"> <el-col :span="15">
<el-form-item label="名称" prop="checkName"> <el-form-item label="节点编码" prop="orderCode">
<el-input v-model="form.checkName" placeholder="请输入名称" /> <el-input v-model="form.orderCode" placeholder="请输入检验节点编码" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="15">
<el-form-item label="节点名称" prop="checkName">
<el-input v-model="form.checkName" placeholder="请输入检验节点名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

@ -308,9 +308,8 @@ export default {
}, },
// //
onSelectMaterial(obj) { onSelectMaterial(obj) {
debugger this.form.materialCode = obj.code;
this.form.materialCode = obj.code[0]; this.form.materialName = obj.name;
this.form.materialName = obj.name[0];
console.log(this.form.groupId); console.log(this.form.groupId);
if(this.form.materialCode != null) { if(this.form.materialCode != null) {
addMaterialGroupDetail(this.form).then((response) => { addMaterialGroupDetail(this.form).then((response) => {

@ -106,17 +106,26 @@
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="检验规则名称" align="center" prop="ruleName" /> <el-table-column label="检验规则名称" align="center" prop="ruleName" />
<el-table-column label="标准值" align="center" prop="standardValue" /> <el-table-column label="标准值" align="left" prop="standardValue" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="上差值" align="center" prop="upperDiff" /> <el-table-column label="上差值" align="left" prop="upperDiff" />
<el-table-column label="下差值" align="center" prop="downDiff" /> <el-table-column label="下差值" align="left" prop="downDiff" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="抽样比例" align="center" prop="sample" /> <el-table-column label="抽样比例" align="left" prop="sample" />
<el-table-column label="抽样数量" align="center" prop="sampleNum" /> <el-table-column label="抽样数量" align="left" prop="sampleNum" />
<el-table-column <el-table-column
label="是否启用" label="是否启用"
align="center" align="center"
prop="status" prop="status"
/> >
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="1"
inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -192,8 +201,20 @@
<el-form-item label="下差值" prop="downDiff"> <el-form-item label="下差值" prop="downDiff">
<el-input v-model="form.downDiff" placeholder="请输入下差值" /> <el-input v-model="form.downDiff" placeholder="请输入下差值" />
</el-form-item> </el-form-item>
<el-form-item label="单位" prop="unit">
<el-select v-model="form.unit" placeholder="请选择单位" >
<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>
</div> </div>
<el-form-item label="排序" prop="sort">
<el-input type="number" v-model="form.sort" placeholder="请输入排序" />
</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>
@ -210,6 +231,7 @@ import {
delCheckTypeProject, delCheckTypeProject,
addCheckTypeProject, addCheckTypeProject,
updateCheckTypeProject, updateCheckTypeProject,
changeStatus
} from "@/api/quality/checkTypeProject"; } from "@/api/quality/checkTypeProject";
import MaterialGroupAdd from "./MaterialGroupAdd.vue"; import MaterialGroupAdd from "./MaterialGroupAdd.vue";
import {listCheckType} from "@/api/quality/checkType"; import {listCheckType} from "@/api/quality/checkType";
@ -217,7 +239,7 @@ import {listProject} from "@/api/quality/project";
export default { export default {
name: "CheckTypeProject", name: "CheckTypeProject",
dicts: ["qc_rule_prop"], dicts: ["qc_rule_prop",'unit'],
components: {MaterialGroupAdd,}, components: {MaterialGroupAdd,},
data() { data() {
return { return {
@ -283,9 +305,15 @@ export default {
}; };
}, },
created() { created() {
//this.getList(); this.getProjectList();
}, },
methods: { methods: {
/**获取检测项目列表**/
getProjectList(){
listProject().then((response) => {
this.checkRuleList = response.rows;
});
},
/** 查询物料检验项目维护列表 */ /** 查询物料检验项目维护列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -376,6 +404,7 @@ export default {
this.form.propertyCode = obj.propertyCode; this.form.propertyCode = obj.propertyCode;
this.form.standardValue = obj.checkStandard; this.form.standardValue = obj.checkStandard;
this.form.projectNo = obj.orderNum; this.form.projectNo = obj.orderNum;
this.form.unit = obj.unitCode;
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
@ -391,13 +420,11 @@ export default {
this.form.groupId = this.groupId; this.form.groupId = this.groupId;
this.form.materialCode = this.materialCode; this.form.materialCode = this.materialCode;
this.form.typeId = this.editableTabsValue; this.form.typeId = this.editableTabsValue;
listProject().then((response) => {
this.checkRuleList = response.rows;
});
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getCheckTypeProject(id).then((response) => { getCheckTypeProject(id).then((response) => {
this.form = response.data; this.form = response.data;
@ -483,6 +510,21 @@ export default {
this.queryParams.typeId = tab.name; this.queryParams.typeId = tab.name;
this.handleQuery(); this.handleQuery();
}, },
//
handleStatusChange(row) {
let text = row.status === "1" ? "启用" : "停用";
this.$modal
.confirm('确认要"' + text + '""' + row.id + '"检测项吗?')
.then(function () {
return changeStatus(row.id, row.status);
})
.then(() => {
this.$modal.msgSuccess(text + "成功");
})
.catch(function () {
row.status = row.status === "0" ? "1" : "0";
});
},
}, },
}; };
</script> </script>

@ -44,7 +44,6 @@
<el-table-column label="姓名" align="center" prop="userName" /> <el-table-column label="姓名" align="center" prop="userName" />
<el-table-column label="联系方式" align="center" prop="phonenumber" /> <el-table-column label="联系方式" align="center" prop="phonenumber" />
<el-table-column label="邮箱" align="center" prop="email" /> <el-table-column label="邮箱" align="center" prop="email" />
<el-table-column label="绑定的检验物料" align="center" prop="materialNames" width="400" />
<el-table-column label="状态" align="center" prop="status" > <el-table-column label="状态" align="center" prop="status" >
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
@ -85,7 +84,7 @@
</el-form> </el-form>
<el-tabs type="border-card" v-if="form.userCodes != null"> <el-tabs type="border-card" v-if="form.userCodes != null">
<el-tab-pane label="关联物料"> <el-tab-pane label="关联物料">
<UserBind v-if="form.userCodes !=null" :optType="optType" :userCodes="form.userCodes"></UserBind> <UserBind v-if="form.userCodes != null" :optType="optType" :userCodes="form.userCodes"></UserBind>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

@ -1,90 +1,114 @@
<template> <template>
<div> <div>
<el-input placeholder="请输入内容" clearable > </el-input> <div class="query">
<el-transfer v-model="rightList" :data="leftList" :titles="titles" <el-input
:filterable=false style="width: 351px; margin-bottom: 10px"
@change="handleChange" v-model="leftQueryParams.materialName"
> placeholder="请输入内容"
<!-- 左侧栏分页 --> clearable
<el-button @keyup.enter.native="handleQuery"
type="text" />
style="color:#606266" <el-input
v-if="leftLength != 0" style="width: 351px; margin-bottom: 10px"
class="transfer-footer" v-model="rightQueryParams.materialName"
slot="left-footer" placeholder="请输入内容"
size="small" clearable
>{{ Ltotal }}</el-button> @keyup.enter.native="handleQuery"
<el-button />
v-if="leftLength != 0" </div>
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftPageNumChange"
:disabled="LPageNum - 1 < 1"
>上一页</el-button>
<el-input
v-if="leftLength != 0"
v-model="LPageNum"
size="mini"
class="transfer-footer"
slot="left-footer"
:placeholder="LPageNum"
style="width: 67px;padding: 1px 3px"
disabled
></el-input>
<el-button
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftAddPageNumChange"
v-if="leftLength != 0"
:disabled="LNextPage>LPages"
>下一页</el-button>
<!-- 右侧栏分页 --> <el-transfer
<el-button v-model="rightList"
type="text" :data="leftList"
style="color:#606266" :titles="titles"
v-if="rightLength != 0" :filterable="true"
class="transfer-footer" @change="handleChange"
slot="right-footer" >
size="small" <!-- 左侧栏分页 -->
>{{ Rtotal }}</el-button> <el-button
<el-button type="text"
v-if="rightLength != 0" style="color: #606266"
class="transfer-footer" v-if="leftLength != 0"
slot="right-footer" class="transfer-footer"
size="small" slot="left-footer"
@click="rightPageNumChange" size="small"
:disabled="RPageNum - 1 < 1" >{{ Ltotal }}</el-button
>上一页</el-button> >
<el-input <el-button
v-if="rightLength != 0" v-if="leftLength != 0"
v-model="RPageNum" class="transfer-footer"
size="mini" slot="left-footer"
class="transfer-footer" size="small"
slot="right-footer" @click="leftPageNumChange"
:placeholder="RPageNum" :disabled="LPageNum - 1 < 1"
style="width: 43px" >上一页</el-button
></el-input> >
<el-button <el-input
class="transfer-footer" v-if="leftLength != 0"
slot="right-footer" v-model="LPageNum"
size="small" size="mini"
@click="rightAddPageNumChange" class="transfer-footer"
v-if="rightLength != 0" slot="left-footer"
:disabled="RNextPage>RPages" :placeholder="LPageNum"
>下一页</el-button> style="width: 67px; padding: 1px 3px"
disabled
></el-input>
<el-button
class="transfer-footer"
slot="left-footer"
size="small"
@click="leftAddPageNumChange"
v-if="leftLength != 0"
:disabled="LNextPage > LPages"
>下一页</el-button
>
</el-transfer> <!-- 右侧栏分页 -->
<el-button
type="text"
style="color: #606266"
v-if="rightLength != 0"
class="transfer-footer"
slot="right-footer"
size="small"
>{{ Rtotal }}</el-button
>
<el-button
v-if="rightLength != 0"
class="transfer-footer"
slot="right-footer"
size="small"
@click="rightPageNumChange"
:disabled="RPageNum - 1 < 1"
>上一页</el-button
>
<el-input
v-if="rightLength != 0"
v-model="RPageNum"
size="mini"
class="transfer-footer"
slot="right-footer"
:placeholder="RPageNum"
style="width: 43px"
></el-input>
<el-button
class="transfer-footer"
slot="right-footer"
size="small"
@click="rightAddPageNumChange"
v-if="rightLength != 0"
:disabled="RNextPage > RPages"
>下一页</el-button
>
</el-transfer>
</div> </div>
</template> </template>
<script> <script>
import { getListProduct,getRightList ,addProduct, updateProduct, getProduct, delProduct} from "@/api/quality/userbind"; import { getListProduct,getRightList ,addProduct} from "@/api/quality/userbind";
export default { export default {
name: "UserBind", name: "Routeprodproduct",
data() { data() {
return { return {
@ -113,8 +137,8 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
userCodes: this.userCodes, userCodes: this.userCodes,
materialId: null, itemId: null,
materialCode: null, itemCode: null,
materialName: null, materialName: null,
specification: null, specification: null,
unitOfMeasure: null, unitOfMeasure: null,
@ -124,11 +148,13 @@ export default {
}, },
// //
form: {}, form: {},
//
page: { pageNo: 1, pageSize: 20, total: 0 },
//---------------------> //--------------------->
leftList: [], leftList: [],
rightList: [], rightList: [],
titles:['未关联物料','已关联物料'], titles: ["未关联产品", "已关联产品"],
// //
Ltotal: "", Ltotal: "",
LPageNum: "1", LPageNum: "1",
@ -137,10 +163,11 @@ export default {
LPages: null, LPages: null,
leftLength: null, leftLength: null,
leftQueryParams: { leftQueryParams: {
userCodes: this.userCodes, materialName: null,
userCodes: this.userCodes,
pageNum: 1, pageNum: 1,
pageSize: 20 pageSize: 20,
}, },
// //
Rtotal: "", Rtotal: "",
RPageNum: "1", RPageNum: "1",
@ -149,42 +176,53 @@ export default {
rightLength: null, rightLength: null,
RNextPage: null, RNextPage: null,
rightQueryParams: { rightQueryParams: {
userCodes: this.userCodes, materialName: null,
userCodes: this.userCodes,
pageNum: 1, pageNum: 1,
pageSize: 20 pageSize: 20,
}, },
}; };
}, },
props :{ props: {
userCodes: undefined, userCodes: undefined,
optType: undefined optType: undefined,
}, },
created() { created() {
this.getList(); this.getList();
this.getRightListFun(); this.getRightListFun();
}, },
methods: { methods: {
// // 穿
// filterMethod(keyword, row) {
// console.log(keyword, row);
// return row.label.indexOf(keyword) > -1;
// },
//
handleQuery() {
this.getList();
this.getRightListFun();
},
/** 查询未分配产品列表 */ /** 查询未分配产品列表 */
getList() { getList() {
this.loading = true; this.loading = true;
getListProduct(this.leftQueryParams).then(response => { getListProduct(this.leftQueryParams).then((response) => {
this.LPages = Math.ceil(response.total/this.LPageSize) this.LPages = Math.ceil(response.total / this.LPageSize);
this.leftList = response.rows; this.leftList = response.rows;
this.Ltotal = response.total; this.Ltotal = response.total;
this.LPageNum = this.leftQueryParams.pageNum; this.LPageNum = this.leftQueryParams.pageNum;
this.LNextPage = this.leftQueryParams.pageNum+1; this.LNextPage = this.leftQueryParams.pageNum + 1;
this.loading = false; this.loading = false;
}); });
}, },
/**左边上一页**/ /**左边上一页**/
leftPageNumChange(){ leftPageNumChange() {
this.leftQueryParams.pageNum = this.LPageNum-1; this.leftQueryParams.pageNum = this.LPageNum - 1;
this.loading = true; this.loading = true;
this.getList(); this.getList();
this.getRightListFun(); this.getRightListFun();
}, },
/**左边下一页**/ /**左边下一页**/
leftAddPageNumChange(){ leftAddPageNumChange() {
this.leftQueryParams.pageNum = this.LNextPage; this.leftQueryParams.pageNum = this.LNextPage;
this.loading = true; this.loading = true;
this.getList(); this.getList();
@ -194,35 +232,33 @@ export default {
/** 查询已分配产品列表 -------------------------------*/ /** 查询已分配产品列表 -------------------------------*/
getRightListFun() { getRightListFun() {
this.loading = true; this.loading = true;
getRightList(this.rightQueryParams).then(response => { getRightList(this.rightQueryParams).then((response) => {
this.RPages = Math.ceil(response.total/this.RPageSize); this.RPages = Math.ceil(response.total / this.RPageSize);
const dataright = []; const dataright = [];
for(let i in response.rows){ for (let i in response.rows) {
// 穿 // 穿
dataright.push(response.rows[i].key) dataright.push(response.rows[i].key);
} }
this.rightList = dataright; this.rightList = dataright;
this.Rtotal = response.total;
this.Rtotal = response.total;
this.RPageNum = this.rightQueryParams.pageNum; this.RPageNum = this.rightQueryParams.pageNum;
this.RNextPage = this.rightQueryParams.pageNum+1; this.RNextPage = this.rightQueryParams.pageNum + 1;
this.loading = false; this.loading = false;
}); });
}, },
/**右边上一页**/ /**右边上一页**/
rightPageNumChange(){ rightPageNumChange() {
this.rightQueryParams.pageNum = this.RPageNum-1; this.rightQueryParams.pageNum = this.RPageNum - 1;
this.loading = true; this.loading = true;
this.getRightListFun(); this.getRightListFun();
}, },
/**右边下一页**/ /**右边下一页**/
rightAddPageNumChange(){ rightAddPageNumChange() {
this.rightQueryParams.pageNum = this.RNextPage; this.rightQueryParams.pageNum = this.RNextPage;
this.loading = true; this.loading = true;
this.getRightListFun(); this.getRightListFun();
}, },
// //
cancel() { cancel() {
@ -233,9 +269,9 @@ export default {
reset() { reset() {
this.form = { this.form = {
recordId: null, recordId: null,
userCodes: this.userCodes, userCodes: this. userCodes,
materialId: null, itemId: null,
materialCode: null, itemCode: null,
materialName: null, materialName: null,
specification: null, specification: null,
unitOfMeasure: null, unitOfMeasure: null,
@ -246,24 +282,29 @@ export default {
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null updateTime: null,
}; };
}, },
/** 提交按钮 */ /** 提交按钮 */
handleChange(value, direction, movedKeys) { handleChange(value, direction, movedKeys) {
if (this.queryParams.userCodes != null) { if (this.queryParams. userCodes != null) {
this.queryParams.selectedValues = value; this.queryParams.selectedValues = value;
addProduct(this.queryParams).then(response => { addProduct(this.queryParams).then((response) => {
this.$modal.msgSuccess("关联成功"); this.$modal.msgSuccess("关联成功");
}); });
} }
} },
} },
}; };
</script> </script>
<style> <style>
.el-transfer-panel { .el-transfer-panel {
width: 350px; width: 350px;
}; }
.query{
display: flex;
justify-content: space-between;
padding-right: 4px;
}
</style> </style>

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="检验规则名称" prop="ruleName"> <el-form-item label="检验规则名称" prop="ruleName">
<el-input <el-input
v-model="queryParams.ruleName" v-model="queryParams.ruleName"
@ -93,8 +93,8 @@
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="检验规则编号" align="center" prop="orderNum" width="100"/> <el-table-column label="检验规则编号" align="center" prop="orderNum" width="100"/>
<el-table-column label="检验规则名称" align="center" prop="ruleName" /> <el-table-column label="检验规则名称" align="center" prop="ruleName" width="100"/>
<el-table-column label="检验规则属性" align="center" prop="propertyCode" > <el-table-column label="检验规则属性" align="center" prop="propertyCode" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:options="dict.type.qc_rule_prop" :options="dict.type.qc_rule_prop"
@ -102,18 +102,16 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检验方式" align="center" prop="checkMode" /> <el-table-column label="检验方式" align="center" prop="checkMode" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="检验工具" align="center" prop="checkTool" /> <el-table-column label="检验工具" align="center" prop="checkTool" />
<el-table-column label="检验标准" align="center" prop="checkStandard" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="单位" align="center" prop="unitCode" > <el-table-column label="单位" align="center" prop="unitCode" >
<template slot-scope="scope"> <template slot-scope="scope"><dict-tag :options="dict.type.unit" :value="scope.row.unitCode"/></template>
<dict-tag
:options="dict.type.unit"
:value="scope.row.unitCode"
/>
</template>
</el-table-column> </el-table-column>
<el-table-column label="检验标准" align="center" prop="checkStandard" /> <el-table-column label="检验标准" align="center" prop="checkStandard" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="抽样方案" align="center" prop="samplePlan" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="合格判定" align="center" prop="judge" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -145,16 +143,16 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px" > <el-form ref="form" :model="form" :rules="rules" label-width="100px" >
<el-row> <el-row>
<el-col :span="15"> <el-col>
<el-form-item label="检验规则名称" prop="ruleName"> <el-form-item label="检验规则名称" prop="ruleName">
<el-input v-model="form.ruleName" placeholder="请输入检验规则名称" /> <el-input v-model="form.ruleName" placeholder="请输入检验规则名称" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="15"> <el-col>
<el-form-item label="检验规则属性" prop="propertyCode"> <el-form-item label="检验规则属性" prop="propertyCode">
<el-select v-model="form.propertyCode" placeholder="请选择检验规则属性" > <el-select v-model="form.propertyCode" placeholder="请选择检验规则属性" style="width:100%">
<el-option <el-option
v-for="dict in dict.type.qc_rule_prop" v-for="dict in dict.type.qc_rule_prop"
:key="dict.value" :key="dict.value"
@ -165,32 +163,30 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<template v-if="form.propertyCode === '0'"> <el-row>
<el-row> <el-col>
<el-col :span="15"> <el-form-item label="检验标准" prop="checkStandard">
<el-form-item label="检验标准" prop="checkStandard"> <el-input type='textarea' v-model="form.checkStandard" placeholder="请输入检验标准" />
<el-input v-model="form.checkStandard" placeholder="请输入检验标准" /> </el-form-item>
</el-form-item> </el-col>
</el-col> </el-row>
</el-row> <el-row>
</template> <el-col>
<el-form-item label="检验方式" prop="checkMode">
<el-input type='textarea' v-model="form.checkMode" placeholder="请输入检验方式" />
</el-form-item>
</el-col>
</el-row>
<template v-if="form.propertyCode === '1'"> <template v-if="form.propertyCode === '1'">
<el-row> <el-row>
<el-col :span="15"> <el-col>
<el-form-item label="检验方式" prop="checkMode">
<el-input v-model="form.checkMode" placeholder="请输入检验方式" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="15">
<el-form-item label="检验工具" prop="checkTool"> <el-form-item label="检验工具" prop="checkTool">
<el-input v-model="form.checkTool" placeholder="请输入检验工具" /> <el-input type='textarea' v-model="form.checkTool" placeholder="请输入检验工具" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="15"> <el-col>
<el-form-item label="单位" prop="unitCode"> <el-form-item label="单位" prop="unitCode">
<el-select v-model="form.unitCode" placeholder="请选择单位" > <el-select v-model="form.unitCode" placeholder="请选择单位" >
<el-option <el-option
@ -204,7 +200,20 @@
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
<el-row>
<el-col>
<el-form-item label="抽样方案" prop="samplePlan">
<el-input type='textarea' v-model="form.samplePlan" placeholder="抽样方案" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="合格判定" prop="judge">
<el-input type='textarea' v-model="form.judge" placeholder="合格判定" />
</el-form-item>
</el-col>
</el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

Loading…
Cancel
Save