yemianqunaxiananniutinajia

This commit is contained in:
shijing 2022-03-02 11:04:24 +08:00
parent 72ec880a45
commit 8dcaec8003
8 changed files with 1488 additions and 1540 deletions

View File

@ -2,34 +2,40 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button
>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
style="width: 300px"
class="filter-item"
@keyup.enter.native="handleFilter"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button
>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button
>
</div>
<el-button
v-if="checkPermission(['equipment_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增设备
</el-button>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
style="width: 300px"
class="filter-item"
@keyup.enter.native="handleFilter"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>
重置
</el-button>
</div>
</el-card>
<el-card >
<el-card>
<el-table
v-loading="listLoading"
:data="equipmentList.results"
@ -37,92 +43,82 @@
fit
stripe
highlight-current-row
height="100"
height="100"
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50" />
<el-table-column label="设备名称" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.name }}</template>
<el-table-column type="index" width="50"/>
<el-table-column label="设备名称" prop="name" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column label="设备编号" width="120">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="设备编号" prop="number" width="120">
</el-table-column>
<el-table-column label="型号规格" width="120">
<template slot-scope="scope">{{ scope.row.model }}</template>
<el-table-column label="型号规格" prop="model" width="120">
</el-table-column>
<el-table-column label="生产厂及国别" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.factory }}</template>
<el-table-column label="生产厂及国别" prop="factory" width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column label="生产日期" width="120">
<template slot-scope="scope">{{ scope.row.production_date }}</template>
<el-table-column label="生产日期" prop="production_date" width="120">
</el-table-column>
<el-table-column label="购置日期" width="120">
<template slot-scope="scope">{{ scope.row.buy_date }}</template>
<el-table-column label="购置日期" prop="buy_date" width="120">
</el-table-column>
<el-table-column label="数量" width="120">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column label="数量" prop="count" width="120">
</el-table-column>
<el-table-column label="状态" width="120">
<el-table-column label="状态" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.state===10" type="success">
{{ state_[scope.row.state] }}
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else-if="scope.row.state===20" type="warning">
{{ state_[scope.row.state] }}
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else-if="scope.row.state===30" >
{{ state_[scope.row.state] }}
<el-tag v-else-if="scope.row.state===30">
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.state] }}
<el-tag v-else type="danger">
{{ state_[scope.row.state] }}
</el-tag>
</template>
</template>
</el-table-column>
<el-table-column label="技术指标" width="120" show-overflow-tooltip>
<el-table-column label="技术指标" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.parameter }}</template>
</el-table-column>
<el-table-column label="保管人" width="120">
<el-table-column label="保管人" width="120">
<template slot-scope="scope" v-if="scope.row.keeper_">{{ scope.row.keeper_.username }}</template>
</el-table-column>
<el-table-column label="存放位置" width="120" show-overflow-tooltip>
<el-table-column label="存放位置" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.place }}</template>
</el-table-column>
<el-table-column label="绑定工序" width="120" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.step_">
<el-table-column label="绑定工序" width="120" show-overflow-tooltip>
<template slot-scope="scope" v-if="scope.row.step_">
<el-tag v-for="item in scope.row.step_"
:key="item.number"
:label="item.name"
:value="item.number">{{item.name}}</el-tag>
:value="item.number">{{item.name}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" width="120" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.description }}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="120px"
fixed="right"
fixed="right"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['equipment_update'])"
type="primary"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['equipment_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -146,72 +142,70 @@
label-position="right"
:rules="rule1"
>
<el-row>
<el-col :span="12">
<el-form-item label="设备名称" prop="name">
<el-input v-model="equipment.name" placeholder="设备名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备编号" prop="number">
<el-input v-model="equipment.number" placeholder="设备编号" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="型号规格" prop="model">
<el-input v-model="equipment.model" placeholder="规格型号规格" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="数量" prop="count">
<el-input v-model="equipment.count" placeholder="数量" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="厂商及国别" prop="factory">
<el-input v-model="equipment.factory" placeholder="生产厂商及国别" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="生产日期" prop="production_date">
<el-date-picker
v-model="equipment.production_date"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:100%"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="购置日期" prop="buy_date">
<el-date-picker
v-model="equipment.buy_date"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:100%"
>
</el-date-picker>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="设备名称" prop="name">
<el-input v-model="equipment.name" placeholder="设备名称"/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="状态" prop="state">
<el-select style="width: 100%" v-model="equipment.state" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
<el-col :span="12">
<el-form-item label="设备编号" prop="number">
<el-input v-model="equipment.number" placeholder="设备编号"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="型号规格" prop="model">
<el-input v-model="equipment.model" placeholder="规格型号规格"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="数量" prop="count">
<el-input v-model="equipment.count" placeholder="数量"/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="厂商及国别" prop="factory">
<el-input v-model="equipment.factory" placeholder="生产厂商及国别"/>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="生产日期" prop="production_date">
<el-date-picker
v-model="equipment.production_date"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:100%"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="购置日期" prop="buy_date">
<el-date-picker
v-model="equipment.buy_date"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
style="width:100%"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="状态" prop="state">
<el-select style="width: 100%" v-model="equipment.state" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="技术指标" prop="parameter">
<el-input
type="textarea"
:rows="4"
@ -219,38 +213,35 @@
placeholder="技术指标"
/>
</el-form-item>
<el-form-item label="存放位置" prop="place">
<el-input v-model="equipment.place" placeholder="存放位置" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="所属部门" prop="belong_dept">
<el-cascader :options="depOptions" :props="{ checkStrictly: true,emitPath:false }" ref="demoCascader" style="width:100%" v-model="equipment.belong_dept"></el-cascader>
<el-form-item label="存放位置" prop="place">
<el-input v-model="equipment.place" placeholder="存放位置"/>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="所属部门" prop="belong_dept">
<el-cascader :options="depOptions" :props="{ checkStrictly: true,emitPath:false }" ref="demoCascader"
style="width:100%" v-model="equipment.belong_dept"></el-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保管人" prop="keeper">
<el-select
v-model="equipment.keeper"
filterable
style="width: 100%"
allow-create
default-first-option
placeholder="请选择">
<el-option
v-for="item in keeperOptions"
<el-col :span="12">
<el-form-item label="保管人" prop="keeper">
<el-select
v-model="equipment.keeper"
filterable
style="width: 100%"
allow-create
default-first-option
placeholder="请选择">
<el-option
v-for="item in keeperOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="设备备注" prop="description">
<el-input
type="textarea"
@ -259,15 +250,6 @@
placeholder="设备备注"
/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -277,33 +259,33 @@
</div>
</template>
<script>
import { getpEquipmentList, createEquipment,updateEquipment,deleteEquipment } from "@/api/equipment";
import { getUserList } from "@/api/user";
import { getOrgList } from "@/api/org";
import checkPermission from "@/utils/permission";
import {getpEquipmentList, createEquipment, updateEquipment, deleteEquipment} from "@/api/equipment";
import {getUserList} from "@/api/user";
import {getOrgList} from "@/api/org";
import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultequipment = {
name: "",
number: "",
};
export default {
components: { Pagination },
data() {
return {
equipment: defaultequipment,
equipmentList: {
count: 0,
},
state_:{
10:'完好',
20:'限用',
30:'在修',
40:'禁用',
},
options: [{
import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultequipment = {
name: "",
number: "",
};
export default {
components: {Pagination},
data() {
return {
equipment: defaultequipment,
equipmentList: {
count: 0,
},
state_: {
10: '完好',
20: '限用',
30: '在修',
40: '禁用',
},
options: [{
value: 10,
label: '完好'
}, {
@ -316,130 +298,135 @@ export default {
value: 40,
label: '禁用'
}],
listQuery: {
page: 1,
page_size: 20,
},
keeperOptions:[],
depOptions:[],
listLoading: true,
dialogVisible: false,
dialogType: "new",
rule1: {
name: [{ required: true, message: "请输入", trigger: "blur" }],
number: [{ required: true, message: "请输入", trigger: "blur" }],
type: [{ required: true, message: "请输入", trigger: "blur" }],
model: [{ required: true, message: "请输入", trigger: "blur" }],
state: [{ required: true, message: "请选择", trigger: "blur" }],
belong_dept:[{ required: true, message: "请选择", trigger: "blur" }]
},
};
},
computed: {},
watch: {},
created() {
this.getList();
this.getUserList();
this.getOrgList();
},
methods: {
checkPermission,
//设备列表
getList() {
this.listLoading = true;
this.listQuery.type=1;
getpEquipmentList(this.listQuery).then((response) => {
if (response.data) {
this.equipmentList = response.data;
}
this.listLoading = false;
});
listQuery: {
page: 1,
page_size: 20,
},
keeperOptions: [],
depOptions: [],
listLoading: true,
dialogVisible: false,
dialogType: "new",
rule1: {
name: [{required: true, message: "请输入", trigger: "blur"}],
number: [{required: true, message: "请输入", trigger: "blur"}],
type: [{required: true, message: "请输入", trigger: "blur"}],
model: [{required: true, message: "请输入", trigger: "blur"}],
state: [{required: true, message: "请选择", trigger: "blur"}],
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
},
};
},
//组员列表
getUserList() {
getUserList({pageoff:true}).then((res) => {
this.keeperOptions = genTree(res.data);
});
},
//部门列表
getOrgList() {
getOrgList({pageoff:true}).then((res) => {
this.depOptions = genTree(res.data);
});
computed: {},
watch: {},
created() {
this.getList();
this.getUserList();
this.getOrgList();
},
methods: {
checkPermission,
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}
this.getList();
},
handleCreate() {
this.equipment = Object.assign({}, defaultequipment);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.equipment = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteEquipment(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
});
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updateEquipment(this.equipment.id, this.equipment).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} else {
this.equipment.type=1;
createEquipment(this.equipment).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
//设备列表
getList() {
this.listLoading = true;
this.listQuery.type = 1;
getpEquipmentList(this.listQuery).then((response) => {
if (response.data) {
this.equipmentList = response.data;
}
} else {
return false;
this.listLoading = false;
});
},
//组员列表
getUserList() {
getUserList({pageoff: true}).then((res) => {
this.keeperOptions = genTree(res.data);
});
},
//部门列表
getOrgList() {
getOrgList({pageoff: true}).then((res) => {
this.depOptions = genTree(res.data);
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}
});
this.getList();
},
handleCreate() {
this.equipment = Object.assign({}, defaultequipment);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.equipment = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteEquipment(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
this.$message.error(err);
});
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updateEquipment(this.equipment.id, this.equipment).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} else {
this.equipment.type = 1;
createEquipment(this.equipment).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
}
} else {
return false;
}
});
},
},
},
};
};
</script>

View File

@ -2,9 +2,14 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增设备</el-button
<el-button
v-if="checkPermission(['equipment_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增设备
</el-button>
<el-input
v-model="listQuery.search"
placeholder="检测设备名称/检测设备编号/备注"
@ -17,39 +22,39 @@
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button
>
重置
</el-button>
</div>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="equipmentList.results"
border
fit
stripe
height="100"
v-el-height-adaptive-table="{ bottomOffset: 42 }"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="设备编号" width="100">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
<el-table-column label="管理类别">
<template slot-scope="scope">{{
mgmtype_[scope.row.mgmtype]
}}</template>
<template slot-scope="scope">
{{mgmtype_[scope.row.mgmtype]}}
</template>
</el-table-column>
<el-table-column label="校/检方式" width="100">
<el-table-column label="校/检方式" width="100">
<template slot-scope="scope">{{ waytype_[scope.row.way] }}</template>
</el-table-column>
<el-table-column label="标准/依据" width="100">
@ -63,13 +68,12 @@
</el-table-column>
<el-table-column label="下次校准日期" width="130">
<template slot-scope="scope">
<el-tag v-if="scope.row.next_check_date" :type="setClass(scope.row.next_check_date)">
{{scope.row.next_check_date}}
</el-tag>
<div v-else></div></template
>
<el-tag v-if="scope.row.next_check_date" :type="setClass(scope.row.next_check_date)">
{{scope.row.next_check_date}}
</el-tag>
<div v-else></div>
</template>
</el-table-column>
<el-table-column label="设备名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
@ -83,23 +87,20 @@
<el-table-column label="使用类别">
<template slot-scope="scope">{{ usetype_[scope.row.way] }}</template>
</el-table-column>
<el-table-column label="校/检状态" width="100">
<el-table-column label="校/检状态" width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.state===10" type="success">
{{ state_[scope.row.state] }}
{{ state_[scope.row.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.state] }}
<el-tag v-else type="danger">
{{ state_[scope.row.state] }}
</el-tag>
</template>
</template>
</el-table-column>
<el-table-column label="保管人">
<template slot-scope="scope" v-if="scope.row.keeper_">{{
scope.row.keeper_.username
}}</template>
<template slot-scope="scope" v-if="scope.row.keeper_">
{{scope.row.keeper_.username}}
</template>
</el-table-column>
<el-table-column label="存放位置" width="100">
<template slot-scope="scope">{{ scope.row.place }}</template>
@ -111,28 +112,30 @@
:key="item.number"
:label="item.name"
:value="item.number"
>{{ item.name }}</el-tag
>
{{ item.name }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注">
<template slot-scope="scope">{{ scope.row.description }}</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="120px">
<el-table-column align="center" label="操作" fixed="right" width="120px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['equipment_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['equipment_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -159,19 +162,19 @@
<el-row>
<el-col :span="12">
<el-form-item label="设备名称" prop="name">
<el-input v-model="equipment.name" placeholder="设备名称" />
<el-input v-model="equipment.name" placeholder="设备名称"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="设备编号" prop="number">
<el-input v-model="equipment.number" placeholder="设备编号" />
<el-input v-model="equipment.number" placeholder="设备编号"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="型号规格" prop="model">
<el-input v-model="equipment.model" placeholder="规格型号规格" />
<el-input v-model="equipment.model" placeholder="规格型号规格"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -183,7 +186,6 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="校/检状态" prop="state">
@ -223,7 +225,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="存放位置" prop="place">
<el-input v-model="equipment.place" placeholder="存放位置" />
<el-input v-model="equipment.place" placeholder="存放位置"/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -267,7 +269,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="存放位置" prop="place">
<el-input v-model="equipment.place" placeholder="存放位置" />
<el-input v-model="equipment.place" placeholder="存放位置"/>
</el-form-item>
</el-col>
</el-row>
@ -298,11 +300,9 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="生产厂家" prop="factory">
<el-input v-model="equipment.factory" placeholder="生产厂商及国别" />
<el-input v-model="equipment.factory" placeholder="生产厂商及国别"/>
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input
type="textarea"
@ -321,230 +321,230 @@
</template>
<script>
import {
getpEquipmentList,
createEquipment,
updateEquipment,
deleteEquipment,
} from "@/api/equipment";
import { getUserList } from "@/api/user";
import checkPermission from "@/utils/permission";
import {
getpEquipmentList,
createEquipment,
updateEquipment,
deleteEquipment,
} from "@/api/equipment";
import {getUserList} from "@/api/user";
import checkPermission from "@/utils/permission";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultequipment = {
name: "",
number: "",
type:null,
};
export default {
components: { Pagination },
data() {
return {
equipment: defaultequipment,
equipmentList: {
count: 0,
},
mgmtype_: {
1: "A",
2: "B",
3: "C",
},
mgmoptions: [
{
value: 1,
label: "A",
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultequipment = {
name: "",
number: "",
type: null,
};
export default {
components: {Pagination},
data() {
return {
equipment: defaultequipment,
equipmentList: {
count: 0,
},
{
value: 2,
label: "B",
mgmtype_: {
1: "A",
2: "B",
3: "C",
},
{
value: 3,
label: "C",
mgmoptions: [
{
value: 1,
label: "A",
},
{
value: 2,
label: "B",
},
{
value: 3,
label: "C",
},
],
waytype_: {
1: "外检",
2: "自检",
},
],
waytype_: {
1: "外检",
2: "自检",
},
wayoptions: [
{
value: 1,
label: "外检",
wayoptions: [
{
value: 1,
label: "外检",
},
{
value: 2,
label: "自检",
},
],
usetype_: {
1: "专用",
2: "公用",
},
{
value: 2,
label: "自检",
},
],
usetype_: {
1: "专用",
2: "公用",
},
useoptions: [
{
value: 1,
label: "专用",
},
{
value: 2,
label: "公用",
},
],
state_: {
10: "合格",
useoptions: [
{
value: 1,
label: "专用",
},
{
value: 2,
label: "公用",
},
],
state_: {
10: "合格",
40: "禁用",
},
options: [
{
value: 10,
label: "合格",
40: "禁用",
},
{
value: 40,
label: "禁用",
options: [
{
value: 10,
label: "合格",
},
{
value: 40,
label: "禁用",
},
],
listQuery: {
page: 1,
page_size: 20,
type: null,
},
],
listQuery: {
page: 1,
page_size: 20,
type:null,
},
keeperOptions: [],
depOptions: [],
listLoading: true,
dialogVisible: false,
dialogType: "new",
rule1: {
name: [{ required: true, message: "请输入", trigger: "blur" }],
number: [{ required: true, message: "请输入", trigger: "blur" }],
model: [{ required: true, message: "请输入", trigger: "blur" }],
state: [{ required: true, message: "请选择", trigger: "blur" }],
},
datatime: null,
};
},
computed: {},
watch: {},
created() {
this.getList();
keeperOptions: [],
depOptions: [],
listLoading: true,
dialogVisible: false,
dialogType: "new",
rule1: {
name: [{required: true, message: "请输入", trigger: "blur"}],
number: [{required: true, message: "请输入", trigger: "blur"}],
this.getUserList();
},
methods: {
checkPermission,
model: [{required: true, message: "请输入", trigger: "blur"}],
state: [{required: true, message: "请选择", trigger: "blur"}],
//设备列表
getList() {
this.listLoading = true;
this.listQuery.type = 2;
getpEquipmentList(this.listQuery).then((response) => {
if (response.data) {
this.equipmentList = response.data;
}
this.listLoading = false;
});
},
datatime: null,
};
},
computed: {},
watch: {},
created() {
this.getList();
//校准时间提醒
setClass:function(check_date) {
this.getUserList();
},
methods: {
checkPermission,
//设备列表
getList() {
this.listLoading = true;
this.listQuery.type = 2;
getpEquipmentList(this.listQuery).then((response) => {
if (response.data) {
this.equipmentList = response.data;
}
this.listLoading = false;
});
},
//校准时间提醒
setClass: function (check_date) {
let obj = {};
if(check_date!=null){
if (check_date != null) {
let dat = new Date();
let time = dat.getTime();
let check = new Date(check_date).getTime();
let timeDiffer = (check-time)/1000/60/60/24;
if (4>timeDiffer&&timeDiffer>0) {
let timeDiffer = (check - time) / 1000 / 60 / 60 / 24;
if (4 > timeDiffer && timeDiffer > 0) {
obj = 'warning';
}else if (timeDiffer<0) {
} else if (timeDiffer < 0) {
obj = "danger";
}
}
return obj;
},
//组员列表
getUserList() {
getUserList({ page: 0 }).then((res) => {
this.keeperOptions = res.data;
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
};
this.getList();
},
handleCreate() {
this.equipment = Object.assign({}, defaultequipment);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.equipment = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteEquipment(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
//组员列表
getUserList() {
getUserList({page: 0}).then((res) => {
this.keeperOptions = res.data;
});
},
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updateEquipment(this.equipment.id, this.equipment).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
};
this.getList();
},
handleCreate() {
this.equipment = Object.assign({}, defaultequipment);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.equipment = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteEquipment(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
});
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updateEquipment(this.equipment.id, this.equipment).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} else {
this.equipment.type = 2;
createEquipment(this.equipment).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
}
} else {
this.equipment.type = 2;
createEquipment(this.equipment).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
return false;
}
} else {
return false;
}
});
});
},
},
},
};
};
</script>

View File

@ -2,34 +2,40 @@
<div class="app-container">
<el-card>
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增校准或检定</el-button
>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
style="width: 300px"
class="filter-item"
@keyup.enter.native="handleFilter"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>搜索</el-button
>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>重置</el-button
>
</div>
<el-button
v-if="checkPermission(['echeckrecord_create'])"
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增校准或检定
</el-button>
<el-input
v-model="listQuery.search"
placeholder="设备名称/设备编号/备注"
style="width: 300px"
class="filter-item"
@keyup.enter.native="handleFilter"
/>
<el-button
class="filter-item"
type="primary"
icon="el-icon-search"
@click="handleFilter"
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter"
>
重置
</el-button>
</div>
</el-card>
<el-card >
<el-card>
<el-table
v-loading="listLoading"
:data="equipmentrecordList.results"
@ -40,55 +46,52 @@
height="100"
v-el-height-adaptive-table="{bottomOffset: 42}"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="设备名称">
<template slot-scope="scope">{{ scope.row.equipment_.name }}</template>
</el-table-column>
<el-table-column label="设备编号">
<el-table-column label="设备编号">
<template slot-scope="scope">{{ scope.row.equipment_.number }}</template>
</el-table-column>
<el-table-column label="型号规格">
<el-table-column label="型号规格">
<template slot-scope="scope">{{ scope.row.equipment_.model }}</template>
</el-table-column>
<el-table-column label="设备状态">
<template slot-scope="scope">
<el-table-column label="设备状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.equipment_.state===10" type="success">
{{ state_[scope.row.equipment_.state] }}
{{ state_[scope.row.equipment_.state] }}
</el-tag>
<el-tag v-else type="danger">
{{ state_[scope.row.equipment_.state] }}
<el-tag v-else type="danger">
{{ state_[scope.row.equipment_.state] }}
</el-tag>
</template>
</template>
</el-table-column>
<el-table-column label="校准检查日期">
<el-table-column label="校准检查日期">
<template slot-scope="scope">{{ scope.row.check_date }}</template>
</el-table-column>
<el-table-column label="备注">
<el-table-column label="备注">
<template slot-scope="scope">{{ scope.row.description }}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="120px"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['equipment_update'])"
type="primary"
v-if="checkPermission(['echeckrecord_update'])"
type="primary"
@click="handleEdit(scope)"
>编辑</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['equipment_delete'])"
v-if="checkPermission(['echeckrecord_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
@ -112,21 +115,19 @@
label-position="right"
:rules="rule1"
>
<el-form-item label="校准检定设备" prop="equipment">
<el-select style="width: 100%" v-model="equipmentrecord.equipment" placeholder="请选择">
<el-option
v-for="item in equipmentoptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
<el-select style="width: 100%" v-model="equipmentrecord.equipment" placeholder="请选择">
<el-option
v-for="item in equipmentoptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="校准检查日期" prop="check_date">
<el-date-picker
<el-form-item label="校准检查日期" prop="check_date">
<el-date-picker
v-model="equipmentrecord.check_date"
type="date"
placeholder="选择日期"
@ -134,20 +135,15 @@
style="width: 100%"
>
</el-date-picker>
</el-form-item>
<el-form-item label="备注" prop="description">
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input
v-model="equipmentrecord.description"
type="textarea"
:rows="4"
v-model="equipmentrecord.description"
placeholder="备注"
/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -157,143 +153,142 @@
</div>
</template>
<script>
import { getpEquipmentList,
getEquipmentrecordList, createEquipmentrecord,updateEquipmentrecord,deleteEquipmentrecord } from "@/api/equipment";
import { getUserList } from "@/api/user";
import { getOrgList } from "@/api/org";
import checkPermission from "@/utils/permission";
import {
getpEquipmentList,
getEquipmentrecordList, createEquipmentrecord, updateEquipmentrecord, deleteEquipmentrecord
} from "@/api/equipment";
// import {getUserList} from "@/api/user";
// import {getOrgList} from "@/api/org";
import checkPermission from "@/utils/permission";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultequipment = {
};
export default {
components: { Pagination },
data() {
return {
equipmentrecord: defaultequipment,
equipmentrecordList: {
count: 0,
},
listQuery: {
page: 1,
page_size: 20,
},
equipmentoptions:[],
state_:{
10:'合格',
40:'禁用',
import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultequipment = {};
export default {
components: {Pagination},
data() {
return {
equipmentrecord: defaultequipment,
equipmentrecordList: {
count: 0,
},
listLoading: true,
dialogVisible: false,
dialogType: "new",
rule1: {
equipment: [{ required: true, message: "请输入", trigger: "blur" }],
},
};
},
computed: {},
watch: {},
created() {
this.getequipmentList();
this.getList();
},
methods: {
checkPermission,
//设备
getequipmentList() {
getpEquipmentList({pageoff:true,type:2}).then((res) => {
this.equipmentoptions = genTree(res.data);
});
},
getList() {
this.listLoading = true;
getEquipmentrecordList(this.listQuery).then((response) => {
if (response.data) {
this.equipmentrecordList = response.data;
}
this.listLoading = false;
});
listQuery: {
page: 1,
page_size: 20,
},
equipmentoptions: [],
state_: {
10: '合格',
40: '禁用',
},
listLoading: true,
dialogVisible: false,
dialogType: "new",
rule1: {
equipment: [{required: true, message: "请输入", trigger: "blur"}],
},
};
},
handleFilter() {
this.listQuery.page = 1;
created() {
this.getequipmentList();
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
}
this.getList();
},
handleCreate() {
this.equipmentrecord = Object.assign({}, defaultequipment);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.equipmentrecord = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteEquipmentrecord(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
methods: {
checkPermission,
//设备
getequipmentList() {
getpEquipmentList({pageoff: true, type: 2}).then((res) => {
this.equipmentoptions = genTree(res.data);
});
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updateEquipmentrecord(this.equipmentrecord.id, this.equipmentrecord).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} else {
createEquipmentrecord(this.equipmentrecord).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
},
getList() {
this.listLoading = true;
getEquipmentrecordList(this.listQuery).then((response) => {
if (response.data) {
this.equipmentrecordList = response.data;
}
} else {
return false;
}
});
this.listLoading = false;
});
},
handleFilter() {
this.listQuery.page = 1;
this.getList();
},
resetFilter() {
this.listQuery = {
page: 1,
page_size: 20,
};
this.getList();
},
handleCreate() {
this.equipmentrecord = Object.assign({}, defaultequipment);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.equipmentrecord = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteEquipmentrecord(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
this.$message.error(err);
});
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updateEquipmentrecord(this.equipmentrecord.id, this.equipmentrecord).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} else {
createEquipmentrecord(this.equipmentrecord).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
}
} else {
return false;
}
});
},
},
},
};
};
</script>

View File

@ -63,21 +63,21 @@
>
<template slot-scope="scope">
<el-link
v-if="scope.row.first_test===null"
v-if="checkPermission(['first_test'])&&scope.row.first_test===null"
type="primary"
@click="handleTest(scope)"
>
首件检验
</el-link>
<el-link
v-else-if="scope.row.first_test!==null&&!scope.row.first_test_.is_submited"
v-if="checkPermission(['first_test'])&&scope.row.first_test!==null&&!scope.row.first_test_.is_submited"
type="primary"
@click="handleTestContinue(scope)"
>
检验
</el-link>
<el-link
v-else-if="scope.row.first_test_.is_submited&&(scope.row.leader_1===null||scope.row.leader_2===null||scope.row.leader_3===null)"
v-if="checkPermission(['first_audit'])&&scope.row.first_test_.is_submited&&(scope.row.leader_1===null||scope.row.leader_2===null||scope.row.leader_3===null)"
type="primary"
@click="handleSelectclick(scope,'0')"
>
@ -291,12 +291,14 @@
}
});
},
//工序转换
changeIndex(item,index) {
this.activeIndex = index;
this.listQuery.process = item.id;
this.getTableData();
},
//获取table数据
getTableData() {
this.listLoading = true;
@ -309,8 +311,12 @@
this.listLoading = false;
});
},
//分页
getsList(){},
getsList(){
this.getTableData
},
//第一次点击首件检验
handleTest(scope){
let that = this;
@ -331,6 +337,7 @@
}
});
},
//首件审批
handleSelectclick(scope,index){
let that = this;
@ -362,6 +369,7 @@
});
})
},
//选择物料检查表
recordFormChange() {
let that = this;
@ -370,6 +378,7 @@
});
that.formName = arr[0].name;
},
//根据选择的表渲染检查项目
selectedRecordForm() {
let that = this;
@ -396,40 +405,27 @@
});
} else this.$message.error("请选择检查表!");
},
//第一次保存提交检查项目
recordCancel() {
this.recordVisible = false;
this.listVisible = false;
this.getTableData();
},
/*关闭相机*/
closeCamera () {
this.$refs.faceTracking.closeCamera();
let video = document.getElementById('video');
let stream = video.srcObject;
console.log(stream);
// console.log(stream);
let tracks = stream.getTracks();
tracks.forEach(track => {
track.stop()
});
video.srcObject = null;
/*let firstTestIndex = sessionStorage.getItem('firstTestIndex');
let firstTestProcess = sessionStorage.getItem('firstTestProcess');
if(firstTestIndex){
sessionStorage.removeItem('firstTestIndex');
sessionStorage.setItem('firstTestIndex',this.activeIndex);
}else{
sessionStorage.setItem('firstTestIndex',this.activeIndex);
}
if(firstTestProcess){
sessionStorage.removeItem('firstTestProcess');
sessionStorage.setItem('firstTestProcess',this.listQuery.process);
}else{
sessionStorage.setItem('firstTestProcess',this.listQuery.process);
}
this.reload();*/
// this.thisVideo.srcObject.getTracks()[0].stop();
},
//保存首件检查
recordSave(value) {
let that = this;
@ -445,10 +441,10 @@
that.$message.error(res.msg)
}
}).catch((err) => {
// console.error(err);
that.$message.error(err)
});
},
//提交首件检查
recordSubmit(value) {
let that = this;
@ -471,6 +467,7 @@
that.$message.error(err);
});
},
//再次点击首件检验
handleTestContinue(scope) {
let that = this;
@ -508,11 +505,13 @@
}
});*/
},
//点击人脸验证
directorConfirm(index){
this.leader = index;
this.limitedPhoto = true;
},
//获取人脸数据
getMsgFormSon(data){
let that =this;
@ -553,25 +552,7 @@
},
},
mounted() {
debugger;
this.getProcessList();
/*let that = this;
let activeIndex = sessionStorage.getItem('firstTestIndex');
let firstTestProcess = sessionStorage.getItem('firstTestProcess');
if(activeIndex&&firstTestProcess){
this.activeIndex = parseInt(activeIndex);
this.listQuery.process = parseInt(firstTestProcess);
sessionStorage.removeItem('firstTestIndex');
sessionStorage.removeItem('firstTestProcess');
this.getTableData();
getProcessList({page: 0}).then((response) => {
if (response.data) {
that.processOption = response.data;
}
});
}else{
this.getProcessList();
}*/
},
}
</script>

View File

@ -15,14 +15,16 @@
type="primary"
icon="el-icon-search"
@click="handleFilter1"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter1"
>重置
>
重置
</el-button>
<el-table
v-loading="listLoading"
@ -38,15 +40,12 @@
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="半成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="半成品编号" prop="number">
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
</el-table-column>
<el-table-column label="检测状态"
>
<el-table-column label="检测状态">
<template slot-scope="scope">
{{ actstate_[scope.row.act_state] }}
</template>
@ -54,31 +53,34 @@
<el-table-column label="子计划编号">
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column>
<el-table-column label="所在子工序" :filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
:filter-method="filterTag"
filter-placement="bottom-end">
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
filter-placement="bottom-end"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
v-if="checkPermission(['wp_test_init'])&&scope.row.test===null"
@click="handleInspection(scope,'1')"
>检验
>
检验
</el-link>
<el-link
v-if="scope.row.test!==null"
@click="checkRecord(scope,'1')"
>检验记录
>
检验记录
</el-link>
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['wp_scrap'])"
type="danger"
@click="handleScrapbcp(scope)"
>报废
>
报废
</el-link>
</template>
</el-table-column>
@ -129,22 +131,22 @@
type="primary"
icon="el-icon-search"
@click="handleFilter2"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter2"
>重置
>
重置
</el-button>
<el-table
:data="wproductList2.results"
border
fit
stripe
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
@ -153,7 +155,6 @@
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="半成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
@ -168,18 +169,16 @@
<el-table-column label="子计划编号">
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column>
<el-table-column label="所在子工序"
:filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
:filter-method="filterTag">
<el-table-column
:filters="filtersList"
:filter-method="filterTag"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
v-if="checkPermission(['wp_test_init'])&&scope.row.test===null"
@click="handleInspection(scope,'2')"
>检验
</el-link>
@ -217,26 +216,26 @@
type="primary"
icon="el-icon-search"
@click="handleFilter3"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter3"
>重置
>
重置
</el-button>
<el-table
:data="wproductList1.results"
ref="multipleTable"
:data="wproductList1.results"
border
fit
stripe
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column
type="selection"
@ -246,9 +245,7 @@
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="半成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="半成品编号" prop="number">
</el-table-column>
<el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
@ -261,26 +258,26 @@
<el-table-column label="子计划编号">
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column>
<el-table-column label="所在子工序"
:filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
:filter-method="filterTag">
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['wp_putins'])"
@click="handlePutin(scope)"
>入库
>
入库
</el-link>
<el-link
v-if="scope.row.test!==null"
@click="checkRecord(scope)"
>检验记录
>
检验记录
</el-link>
</template>
</el-table-column>
@ -308,17 +305,18 @@
type="primary"
icon="el-icon-search"
@click="handleFilter4"
>搜索
>
搜索
</el-button>
<el-button
class="filter-item"
type="primary"
icon="el-icon-refresh-left"
@click="resetFilter4"
>重置
>
重置
</el-button>
<el-table
:data="wproductList4.results"
border
fit
@ -331,7 +329,6 @@
<el-table-column label="半成品名称">
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
</el-table-column>
<el-table-column label="半成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
@ -343,11 +340,11 @@
<el-table-column label="规格型号">
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
</el-table-column>
<el-table-column label="所在子工序" :filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]"
:filter-method="filterTag">
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column label="不合格标记">
@ -361,14 +358,14 @@
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['wmaterial_scrap'])"
type="danger"
@click="handleScrap(scope)"
>
报废
</el-link>
<el-link
v-if="!scope.row.ticket"
v-if="checkPermission(['operation_hear'])&&!scope.row.ticket"
type="primary"
@click="handleRetrial(scope)"
>
@ -389,7 +386,6 @@
<el-tab-pane label="夹层半成品" name="5">
<el-card style="margin-top: 2px">
<el-table
:data="wproductList3.results"
border
fit
@ -416,16 +412,17 @@
<el-table-column label="子计划编号">
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column>
<el-table-column label="所在子工序" :filters="[{ text: '切割', value: '切割' },{ text: '磨边', value: '磨边' },
{ text: '清洗', value: '清洗' }, { text: '热弯成型', value: '热弯成型' },{ text: '化学钢化', value: '化学钢化' },
{ text: '镀膜', value: '镀膜' }, { text: '断膜', value: '断膜' },{ text: '汇流条制备', value: '汇流条制备' },
{ text: '夹层', value: '夹层' }, { text: '包边', value: '包边' }]" :filter-method="filterTag">
<el-table-column
label="所在子工序"
:filters="filtersList"
:filter-method="filterTag"
>
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="scope.row.test===null"
v-if="scope.row.test===null&&checkPermission(['wp_test_init'])"
@click="handleInspection(scope,'3')"
>检验
</el-link>
@ -458,40 +455,6 @@
>
</el-option>
</el-select>
<!-- &lt;!&ndash;第一次操作时的展示&ndash;&gt;
<el-dialog
width="60%"
:title="formName"
:visible.sync="innerVisible"
append-to-body
>
<customForm
:results="fieldList"
:hasPicture="hasPicture"
:formID="recordform"
:wproduct="wproduct"
:recordId="recordId"
@recordSubmit="recordSubmit"
@recordSave="recordSave"
/>
</el-dialog>
&lt;!&ndash;复检检验表单&ndash;&gt;
<el-dialog
width="60%"
:title="formName"
:visible.sync="limitedReview"
append-to-body
>
<reviewForm
:results="fieldList"
:originList="originList"
:formID="recordform"
:hasPicture="hasPicture"
:wproduct="wproduct"
:origintest="origintest"
@formFunc="formFunc"
/>
</el-dialog>-->
<div slot="footer" class="dialog-footer">
<el-button @click="outerVisible = false">
@ -602,18 +565,22 @@
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
v-if="!scope.row.is_submited"
v-if="checkPermission(['wp_test_init'])&&!scope.row.is_submited"
@click="handleInspectionRecord(scope)"
>检验
>
检验
</el-link>
<el-link
v-else
v-if="scope.row.is_submited"
@click="handleRecordDetail(scope)"
>查看
>
查看
</el-link>
<el-link
v-if="checkPermission(['wp_test_init'])"
@click="delTestRecord(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -924,6 +891,10 @@
},
WarehouseData: "",
formName: '项目检查表',
filtersList: [{text: '切割', value: '切割'}, {text: '磨边', value: '磨边'},
{text: '清洗', value: '清洗'}, {text: '热弯成型', value: '热弯成型'}, {text: '化学钢化', value: '化学钢化'},
{text: '镀膜', value: '镀膜'}, {text: '断膜', value: '断膜'}, {text: '汇流条制备', value: '汇流条制备'},
{text: '夹层', value: '夹层'}, {text: '包边', value: '包边'}]
};
},
computed: {},
@ -952,7 +923,6 @@
} else if (tab.name == 5) {
this.getList3();
}
},
//待检半成品列表
getList() {
@ -965,37 +935,38 @@
this.listLoading = false;
});
},
handleFilter1() {
this.listQuery.page = 1;
this.getList();
},
resetFilter1() {
resetFilter1() {
this.listQuery = {
page: 1,
page_size: 20,
};
this.getList();
},
//待检半成品报废
handleScrapbcp(scope) {
this.dialogFormVisiblebcp = true;
this.bcpbf = scope.row.id;
},
//确定报废半成品
scrapesubmit() {
console.log(this.formbcp);
// console.log(this.formbcp);
scrap(this.bcpbf, this.formbcp).then((response) => {
if (response.code >= 200) {
this.$message.success("该半成品已报废!");
this.dialogFormVisiblebcp = false;
this.getList();
}
});
},
//复检半成品列表
getList2() {
this.listQuery2.act_state = 6;
@ -1005,18 +976,20 @@
}
});
},
handleFilter2() {
this.listQuery2.page = 1;
this.getList2();
},
resetFilter2() {
resetFilter2() {
this.listQuery2 = {
page: 1,
page_size: 20,
};
this.getList2();
},
//已合格半成品
getList1() {
this.listQuery1.act_state = 30;
@ -1025,21 +998,22 @@
if (response.data) {
this.wproductList1 = response.data;
}
});
},
handleFilter3() {
this.listQuery1.page = 1;
this.getList1();
},
resetFilter3() {
resetFilter3() {
this.listQuery1 = {
page: 1,
page_size: 20,
};
this.getList1();
},
//不合格半成品
getList4() {
this.listQuery4.act_state = 50;
@ -1048,21 +1022,22 @@
if (response.data) {
this.wproductList4 = response.data;
}
});
},
handleFilter4() {
this.listQuery4.page = 1;
this.getList4();
},
resetFilter4() {
resetFilter4() {
this.listQuery4 = {
page: 1,
page_size: 20,
};
this.getList4();
},
//不合格半成品报废
handleScrap(scope) {
this.$confirm("确认该半成品报废?", "警告", {
@ -1076,9 +1051,10 @@
this.$message.success("该半成品已报废!");
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//不合格产品重审展示
handleRetrial(scope) {
let that = this;
@ -1111,13 +1087,13 @@
if (that.customfieldList[i].label === "deptSelect") {
that.customfieldList[i].field_choice = that.orgList;
}
}
}
});
that.limitedRetrial = true;
})
},
//不合格产品重审提交
retrialSubmit() {
let that = this;
@ -1137,10 +1113,12 @@
}
});
},
//筛选
filterTag(value, row) {
return row.step_.name === value;
},
//夹层半成品列表
getList3() {
this.listQuery3.act_state = 26;
@ -1150,11 +1128,13 @@
}
});
},
//半成品批量入库
handleCreate() {
this.dialogFormVisibles = true;
this.getWarehouseLists();//仓库
},
//批量入库
putins() {
let _this = this;
@ -1174,6 +1154,7 @@
}
});
},
//仓库列表
getWarehouseLists() {
getWarehouseList({page: 0}).then((response) => {
@ -1182,6 +1163,7 @@
}
});
},
//点击检验:如果有一个直接进入如果有多个表再进行选择
handleInspection(scope, index) {
//调该物料对应的检查表
@ -1211,6 +1193,7 @@
}
});
},
//选择物料检查表
recordformChange() {
let that = this;
@ -1219,6 +1202,7 @@
});
that.formName = arr[0].name;
},
//检验记录
checkRecord(scope, index) {
let that = this;
@ -1233,6 +1217,7 @@
}
})
},
//点击记录里的检验
handleInspectionRecord(scope) {
let that = this;
@ -1282,7 +1267,6 @@
if (res.data) {
that.hasPicture = false;
let fieldList = res.data.record_data;
that.origintest = res.data.origin_test;
that.recordform = res.data.origin_test_.form;
let originList = res.data.origin_test_.record_data;
@ -1311,6 +1295,7 @@
})
}
},
//点击记录里的查看
handleRecordDetail(scope) {
let that = this;
@ -1325,6 +1310,7 @@
}
})
},
//半产品复检
handleReview() {
let that = this;
@ -1349,8 +1335,6 @@
}
that.fieldList.push(obj)
}
/*that.fieldList = [...fieldList];
that.originList = [...originList];*/
let arr = fieldList.filter(item => {
return item.field_type === 'draw'
});
@ -1377,7 +1361,6 @@
that.formName = res.data.form_.name;
let fieldList = res.data.record_data;
that.fieldList = [...fieldList];
debugger;
let arr = fieldList.filter(item => {
return item.field_type === 'draw'
});
@ -1403,6 +1386,7 @@
this.getWarehouseLists();//仓库
this.id = scope.row.id;//半成品id
},
putin() {
wproductPutin(this.id, this.form).then((res) => {
if (res.code >= 200) {
@ -1412,6 +1396,7 @@
}
});
},
delTestRecord(scope) {
let that = this;
this.$confirm("确认删除?", "警告", {
@ -1434,9 +1419,10 @@
});
})
.catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//更新检验记录列表
refreshRecord() {
let that = this;
@ -1448,6 +1434,7 @@
}
})
},
//保存检查项目
recordSave(value) {
let that = this;
@ -1468,9 +1455,10 @@
this.$message.error(res.msg)
}
}).catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//记录提交检查项目
recordSubmit(value) {
let that = this;
@ -1496,9 +1484,10 @@
this.$message.error(res.msg)
}
}).catch((err) => {
console.error(err);
this.$message.error(err);
});
},
//第一次保存提交检查项目
recordCancel() {
this.recordVisible = false;
@ -1508,9 +1497,6 @@
this.getList1();
this.getList3();
},
pageRefresh() {
this.reload()
},
},
mounted() {
getUserList({page: 0}).then(response => {

View File

@ -1,186 +1,185 @@
<template>
<div class="app-container">
<el-card class="box-card">
<el-tabs @tab-click="handleClick" type="border-card">
<el-tab-pane
:key="item.name"
v-for="item in processOption"
:label="item.name"
:name="item.id"
:closable="item.close"
<el-tabs
type="border-card"
@tab-click="handleClick"
>
<el-table
:data="operationList.results"
border
fit
stripe
style="width: 100%"
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
>
<el-table-column type="index" width="50" />
<el-table-column label="子工序工序">
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column label="是否提交">
<template slot-scope="scope">
<el-span v-if="scope.row.is_submited"></el-span>
<el-span v-else></el-span></template
<el-tab-pane
v-for="item in processOption"
:key="item.name"
:label="item.name"
:name="item.id"
:closable="item.close"
>
<el-table
:data="operationList.results"
border
fit
stripe
style="width: 100%"
height="100"
highlight-current-row
v-el-height-adaptive-table="{bottomOffset: 50}"
>
</el-table-column>
<el-table-column label="创建人">
<template slot-scope="scope">{{
scope.row.create_by_.username
}}</template>
</el-table-column>
<el-table-column label="过程记录表">
<template slot-scope="scope" v-if="scope.row.record_">
<el-tag v-for="item in scope.row.record_"
:key="item.id"
:label="item.name"
:value="item.id">{{item.name}}</el-tag>
</template>
</el-table-column>
<el-table-column label="产品数量">
<template slot-scope="scope" >
{{ scope.row.count_work }}
</template>
</el-table-column>
<el-table-column label="生产设备">
<template slot-scope="scope" v-if="scope.row.equip_">
<el-tag v-for="item in scope.row.equip_"
:key="item.id"
:label="item.number"
:value="item.id">{{item.number}}</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="100px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])&&scope.row.is_submited"
type="primary"
@click="handleoperation(scope)"
>前往查看</el-link>
<el-table-column type="index" width="50"/>
<el-table-column label="子工序工序">
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column>
<el-table-column label="是否提交">
<template slot-scope="scope">
<el-span v-if="scope.row.is_submited"></el-span>
<el-span v-else></el-span>
</template>
</el-table-column>
<el-table-column label="创建人">
<template slot-scope="scope">
{{scope.row.create_by_.username}}
</template>
</el-table-column>
<el-table-column label="过程记录表">
<template v-if="scope.row.record_" slot-scope="scope">
<el-tag
v-for="item in scope.row.record_"
:key="item.id"
:label="item.name"
:value="item.id"
>
{{item.name}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="产品数量">
<template slot-scope="scope">
{{ scope.row.count_work }}
</template>
</el-table-column>
<el-table-column label="生产设备">
<template slot-scope="scope" v-if="scope.row.equip_">
<el-tag v-for="item in scope.row.equip_"
:key="item.id"
:label="item.number"
:value="item.id">{{item.number}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
<el-table-column align="center" label="操作" width="100px">
<template slot-scope="scope">
<el-link
v-else
type="primary"
@click="handleoperation(scope)"
>前往操作</el-link>
<el-link
v-if="checkPermission(['warehouse_update'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="operationList.count > 0"
:total="operationList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
v-if="checkPermission(['operation_create'])&&scope.row.is_submited"
type="primary"
@click="handleoperation(scope)"
>
前往查看
</el-link>
<el-link
v-if="checkPermission(['operation_create'])&&!scope.row.is_submited"
type="primary"
@click="handleoperation(scope)"
>
前往操作
</el-link>
<el-link
v-if="checkPermission(['operation_delete'])"
type="danger"
@click="handleDelete(scope)"
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
<pagination
v-show="operationList.count > 0"
:total="operationList.count"
:page.sync="listQuery.page"
:limit.sync="listQuery.page_size"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
</el-card>
</div>
</template>
<script>
import { getoperationList, deleteOperation } from "@/api/wpm";
import checkPermission from "@/utils/permission";
<script>
import {getoperationList, deleteOperation} from "@/api/wpm";
import checkPermission from "@/utils/permission";
import { getProcessList, getStepLists } from "@/api/mtm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import {getProcessList, getStepLists} from "@/api/mtm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default {
components: { Pagination },
data() {
return {
operationList: {
count: 0,
},
listQuery: {
page: 1,
page_size: 20,
},
processOption: "",
};
},
computed: {},
watch: {},
created() {
this.id = this.$route.params.id;
this.getProcessList()
},
methods: {
checkPermission,
handleoperation(scope)
{
this.$router.push({name: "operationdo", params: { id: scope.row.id}, })
},
//大工序工序渲染
getProcessList() {
getProcessList({ page: 0 }).then((response) => {
if (response.data) {
this.processOption = response.data;
}
});
export default {
components: {Pagination},
data() {
return {
operationList: {
count: 0,
},
listQuery: {
page: 1,
page_size: 20,
},
processOption: "",
};
},
getList(){
getoperationList(this.listQuery).then((response) => {
if (response.data) {
this.operationList = response.data;
}
});
},
computed: {},
watch: {},
created() {
this.id = this.$route.params.id;
this.getProcessList()
},
methods: {
checkPermission,
handleoperation(scope) {
this.$router.push({name: "operationdo", params: {id: scope.row.id},})
},
//大工序工序渲染
getProcessList() {
getProcessList({page: 0}).then((response) => {
if (response.data) {
this.processOption = response.data;
}
});
},
getList() {
getoperationList(this.listQuery).then((response) => {
if (response.data) {
this.operationList = response.data;
}
});
},
//选项卡切换
handleClick(tab) {
this.process = tab.name;
this.listQuery.step__process = tab.name;
this.getList();
},
handleClick(tab) {
this.process = tab.name;
this.listQuery.step__process = tab.name;
this.getList();
//操作记录删除
handleDelete(scope) {
this.$confirm("确认该操作删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteOperation(scope.row.id);
this.getList();
this.$message.success("成功");
},
//操作记录删除
handleDelete(scope) {
this.$confirm("确认该操作删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.catch((err) => {
console.error(err);
});
},
.then(async () => {
await deleteOperation(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
this.$message.error(err);
});
},
},
};
</script>
},
};
</script>

View File

@ -12,11 +12,11 @@
highlight-current-row
max-height="600"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="成品名称">
<template slot-scope="scope">{{
scope.row.material_.name
}}</template>
<template slot-scope="scope">
{{scope.row.material_.name}}
</template>
</el-table-column>
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
@ -33,17 +33,16 @@
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="
checkPermission(['warehouse_update']) &&
scope.row.test === null
"
v-if="checkPermission(['wp_test_init']) &&scope.row.test === null"
@click="handleInspection(scope)"
>检验
>
检验
</el-link>
<el-link
v-if="scope.row.test !== null"
@click="checkRecord(scope)"
>检验记录
>
检验记录
</el-link>
</template>
</el-table-column>
@ -60,26 +59,25 @@
<el-tab-pane label="已合格成品">
<el-card style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>批量入库
>批量入库
</el-button>
<el-table
ref="multipleTable"
v-loading="listLoading"
:data="wproductList1.results"
ref="multipleTable"
border
fit
stripe
highlight-current-row
max-height="600"
>
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column type="index" width="50" />
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column type="index" width="50"/>
<el-table-column label="成品名称">
<template slot-scope="scope">{{
scope.row.material_.name
}}</template>
<template slot-scope="scope">
{{scope.row.material_.name}}
</template>
</el-table-column>
<el-table-column label="成品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
</el-table-column>
@ -88,7 +86,7 @@
{{ actstate_[scope.row.act_state] }}
</template>
</el-table-column>
<el-table-column label="指派订单">
<el-table-column label="指派订单">
<template slot-scope="scope" v-if="scope.row.to_order_">
{{scope.row.to_order_.number }}
</template>
@ -98,7 +96,7 @@
{{scope.row.to_order_.customer_.name }}
</template>
</el-table-column>
<el-table-column label="合同">
<el-table-column label="合同">
<template slot-scope="scope" v-if="scope.row.to_order_">
{{scope.row.to_order_.contract_.name }}
</template>
@ -106,9 +104,10 @@
<el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope">
<el-link
v-if="checkPermission(['warehouse_update'])"
v-if="checkPermission(['wp_putins'])"
@click="handlePutin(scope)"
>入库
>
入库
</el-link>
</template>
</el-table-column>
@ -143,12 +142,14 @@
>
</el-option>
</el-select>
<div slot="footer" class="dialog-footer">
<el-button @click="outerVisible = false"> </el-button>
<el-button type="primary" @click="submitrecordform()"
>填写检查项目</el-button
<el-button @click="outerVisible = false"> </el-button>
<el-button
type="primary"
@click="submitrecordform()"
>
填写检查项目
</el-button>
</div>
</el-dialog>
<!--检查表显示-->
@ -178,14 +179,14 @@
:visible.sync="limitedCheckRecord"
>
<el-table :data="recordList" border height="400">
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="表单名称">
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
</el-table-column>
<el-table-column label="检查类型">
<template slot-scope="scope">{{
checkTypes[scope.row.type]
}}</template>
<template slot-scope="scope">
{{checkTypes[scope.row.type]}}
</template>
</el-table-column>
<el-table-column label="是否提交">
<template slot-scope="scope">
@ -196,12 +197,18 @@
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link
v-if="!scope.row.is_submited"
v-if="checkPermission(['wp_test_init'])&&!scope.row.is_submited"
@click="handleInspectionRecord(scope)"
>检验
>
检验
</el-link>
<el-link v-else @click="handleRecordDetail(scope)">查看 </el-link>
<el-link @click="delTestRecord(scope)">删除 </el-link>
<el-link
v-if="scope.row.is_submited"
@click="handleRecordDetail(scope)"
>
查看
</el-link>
<el-link @click="delTestRecord(scope)">删除</el-link>
</template>
</el-table-column>
</el-table>
@ -218,8 +225,8 @@
<el-form :model="form">
<el-form-item label="仓库">
<el-select
style="width: 100%"
v-model="form.warehouse"
style="width: 100%"
placeholder="请选择仓库"
>
<el-option
@ -248,8 +255,8 @@
<el-form :model="form">
<el-form-item label="仓库">
<el-select
style="width: 100%"
v-model="form.warehouse"
style="width: 100%"
placeholder="请选择仓库"
>
<el-option
@ -270,266 +277,339 @@
<el-button type="primary" @click="putins"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getOrderList } from "@/api/sam";
import checkPermission from "@/utils/permission";
import { getWarehouseList } from "@/api/inm";
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import customForm from "@/components/customForm/index";
import {
getwproductList,
wproductTest,
wproductPutin,
createputins,
testInit,
toorder,
} from "@/api/wpm";
import {
getTestRecord,
getTestRecordItem,
putTestRecordItem,
delTestRecordItem,
subTestRecordItem,
} from "@/api/qm";
const defaultetestitem = {};
export default {
components: { Pagination, customForm },
data() {
return {
testitem: defaultetestitem,
form: { remark: "", warehouse: "" },
// import {getOrderList} from "@/api/sam";
import checkPermission from "@/utils/permission";
import {getWarehouseList} from "@/api/inm";
import { getrecordformList, getrffieldList} from "@/api/mtm";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import customForm from "@/components/customForm/index";
import {
getwproductList,
wproductTest,
wproductPutin,
createputins,
testInit,
} from "@/api/wpm";
import {
getTestRecord,
getTestRecordItem,
putTestRecordItem,
delTestRecordItem,
subTestRecordItem,
} from "@/api/qm";
const defaultetestitem = {};
export default {
components: {Pagination, customForm},
data() {
return {
testitem: defaultetestitem,
form: {remark: "", warehouse: ""},
form1: {},
wproductList: {
count: 0,
},
wproductList1: {
count: 0,
},
wproductList2: {
count: 0,
},
listQuery: {
page: 1,
page_size: 20,
},
listQuery1: {
page: 1,
page_size: 20,
},
listQuery2: {
page: 1,
page_size: 20,
},
actstate_: {
6: "待复检",
10: "生产中",
20: "待检验",
30: "已合格",
40: "库存中",
50: "不合格",
60: "待成品检验",
},
checkTypes: {
10: "子工序检验",
20: "工序检验",
30: "工序复检",
36: "夹层检验",
40: "成品检验",
},
choice: [
{
value: true,
label: "合格",
wproductList: {
count: 0,
},
{
value: false,
label: "不合格",
wproductList1: {
count: 0,
},
],
options: [],
listLoading: true,
wproduct: null,
recordId: null,
fieldList: null,
is_testok: "true",
field: [],
recordList: [],
recordformList: [],
recordform: null,
fifo_detail: "",
listQueryrecordform: {
page: 0,
},
hasPicture: false,
outerVisible: false,
innerVisible: false,
dialogFormVisible: false,
dialogFormVisibles: false,
limitedCheckRecord: false,
testrecord: {},
formName: "检验表",
WarehouseData: "",
};
},
computed: {},
watch: {},
created() {
this.getList();
wproductList2: {
count: 0,
},
listQuery: {
page: 1,
page_size: 20,
},
listQuery1: {
page: 1,
page_size: 20,
},
listQuery2: {
page: 1,
page_size: 20,
},
actstate_: {
6: "待复检",
10: "生产中",
20: "待检验",
30: "已合格",
40: "库存中",
50: "不合格",
60: "待成品检验",
},
checkTypes: {
10: "子工序检验",
20: "工序检验",
30: "工序复检",
36: "夹层检验",
40: "成品检验",
},
choice: [
{value: true, label: "合格"},
{value: false, label: "不合格"},
],
options: [],
listLoading: true,
wproduct: null,
recordId: null,
fieldList: null,
is_testok: "true",
field: [],
recordList: [],
recordformList: [],
recordform: null,
fifo_detail: "",
listQueryrecordform: {
page: 0,
},
hasPicture: false,
outerVisible: false,
innerVisible: false,
dialogFormVisible: false,
dialogFormVisibles: false,
limitedCheckRecord: false,
testrecord: {},
formName: "检验表",
WarehouseData: "",
this.getList1();
// this.getLists();
},
methods: {
checkPermission,
//待检成品列表
getList() {
this.listLoading = true;
this.listQuery.act_state = 60;
this.listQuery.material__type = 1;
getwproductList(this.listQuery).then((response) => {
if (response.data) {
this.wproductList = response.data;
}
this.listLoading = false;
});
};
},
computed: {},
watch: {},
created() {
this.getList();
//已合格成品
getList1() {
this.listQuery1.act_state = 30;
this.listQuery1.material__type = 1;
getwproductList(this.listQuery1).then((response) => {
if (response.data) {
this.wproductList1 = response.data;
}
});
this.getList1();
// this.getLists();
},
//成品批量入库
handleCreate() {
this.dialogFormVisibles = true;
this.getWarehouseLists(); //仓库
},
//批量入库
putins() {
let _this = this;
_this.mutipID = [];
this.$refs.multipleTable.selection.forEach((item) => {
_this.mutipID.push(item.id);
});
console.log(_this.mutipID);
createputins({
warehouse: this.form.warehouse,
wproducts: _this.mutipID,
remark: this.form.remark,
}).then((res) => {
if (res.code >= 200) {
this.$message.success("批量入库成功!");
this.dialogFormVisibles = false;
this.getList1();
}
});
},
//仓库列表
getWarehouseLists() {
getWarehouseList({ page: 0 }).then((response) => {
if (response.data) {
this.WarehouseData = response.data;
}
});
},
//提交检查项目
submitfield() {
let _this = this;
_this.field = []; //检查项目
this.fieldList.forEach((item) => {
_this.field.push({
form_field: item.id,
field_value: item.sort,
is_testok: item.is_testok, //单项检查结果
});
});
console.log(this.recordform);
this.testrecord.form = this.recordform; //检查表
this.testrecord.record_data = _this.field; //检查项列表
this.testrecord.is_testok = this.is_testok; //检查表检查结果
this.testrecord.wproduct = this.wproduct; //半成品ID
wproductTest(this.testrecord).then((res) => {
if (res.code >= 200) {
this.innerVisible = false;
this.outerVisible = false;
this.getList();
this.getList1();
}
});
},
//半成品入库
handlePutin(scope) {
this.dialogFormVisible = true;
this.getWarehouseLists(); //仓库
this.id = scope.row.id; //半成品id
},
putin() {
wproductPutin(this.id, this.form).then((res) => {
if (res.code >= 200) {
this.$message.success("入库成功!");
this.dialogFormVisible = false;
this.getList1();
}
});
},
//点击table中的检验
handleInspection(scope) {
let that = this;
//调该物料对应的检查表
this.wproduct = scope.row.id; //成品ID
this.listQueryrecordform.material = scope.row.material; //
this.listQueryrecordform.type = 40;
this.recordform = null;
getrecordformList(this.listQueryrecordform).then((response) => {
if (response.data) {
this.recordformList = response.data;
if (response.data.length === 1) {
that.recordform = response.data[0].id;
that.formName = response.data[0].name;
that.submitrecordform();
} else {
//弹出列表选择框
this.outerVisible = true;
methods: {
checkPermission,
//待检成品列表
getList() {
this.listLoading = true;
this.listQuery.act_state = 60;
this.listQuery.material__type = 1;
getwproductList(this.listQuery).then((response) => {
if (response.data) {
this.wproductList = response.data;
}
}
});
},
//根据选择的表渲染检查项目
submitrecordform() {
let that = this;
if (this.recordform != "") {
testInit({ wproduct: that.wproduct, form: that.recordform }).then(
this.listLoading = false;
});
},
//已合格成品
getList1() {
this.listQuery1.act_state = 30;
this.listQuery1.material__type = 1;
getwproductList(this.listQuery1).then((response) => {
if (response.data) {
this.wproductList1 = response.data;
}
});
},
//成品批量入库
handleCreate() {
this.dialogFormVisibles = true;
this.getWarehouseLists(); //仓库
},
//批量入库
putins() {
let _this = this;
_this.mutipID = [];
this.$refs.multipleTable.selection.forEach((item) => {
_this.mutipID.push(item.id);
});
createputins({
warehouse: this.form.warehouse,
wproducts: _this.mutipID,
remark: this.form.remark,
}).then((res) => {
if (res.code >= 200) {
this.$message.success("批量入库成功!");
this.dialogFormVisibles = false;
this.getList1();
}
});
},
//仓库列表
getWarehouseLists() {
getWarehouseList({page: 0}).then((response) => {
if (response.data) {
this.WarehouseData = response.data;
}
});
},
//提交检查项目
submitfield() {
let _this = this;
_this.field = []; //检查项目
this.fieldList.forEach((item) => {
_this.field.push({
form_field: item.id,
field_value: item.sort,
is_testok: item.is_testok, //单项检查结果
});
});
this.testrecord.form = this.recordform; //检查表
this.testrecord.record_data = _this.field; //检查项列表
this.testrecord.is_testok = this.is_testok; //检查表检查结果
this.testrecord.wproduct = this.wproduct; //半成品ID
wproductTest(this.testrecord).then((res) => {
if (res.code >= 200) {
this.innerVisible = false;
this.outerVisible = false;
this.getList();
this.getList1();
}
});
},
//半成品入库
handlePutin(scope) {
this.dialogFormVisible = true;
this.getWarehouseLists(); //仓库
this.id = scope.row.id; //半成品id
},
putin() {
wproductPutin(this.id, this.form).then((res) => {
if (res.code >= 200) {
this.$message.success("入库成功!");
this.dialogFormVisible = false;
this.getList1();
}
});
},
//点击table中的检验
handleInspection(scope) {
let that = this;
//调该物料对应的检查表
this.wproduct = scope.row.id; //成品ID
this.listQueryrecordform.material = scope.row.material; //
this.listQueryrecordform.type = 40;
this.recordform = null;
getrecordformList(this.listQueryrecordform).then((response) => {
if (response.data) {
this.recordformList = response.data;
if (response.data.length === 1) {
that.recordform = response.data[0].id;
that.formName = response.data[0].name;
that.submitrecordform();
} else {
//弹出列表选择框
this.outerVisible = true;
}
}
});
},
//根据选择的表渲染检查项目
submitrecordform() {
let that = this;
if (this.recordform != "") {
testInit({wproduct: that.wproduct, form: that.recordform}).then(
(response) => {
if (response.data) {
that.hasPicture = false;
that.recordId = response.data.id;
getTestRecordItem(response.data.id).then((res) => {
that.formName = res.data.form_.name;
let fieldList = res.data.record_data;
that.fieldList = [...fieldList];
let arr = fieldList.filter((item) => {
return item.field_type === "draw";
});
if (arr.length > 0) {
that.hasPicture = true;
}
that.$nextTick(() => {
that.innerVisible = true;
});
});
}
}
);
} else this.$message.error("请选择检查表!");
},
//选择物料检查表
recordformChange() {
let that = this;
let arr = this.recordformList.filter((item) => {
return item.id === that.recordform;
});
that.formName = arr[0].name;
},
//更新检验记录列表
refreshRecord() {
let that = this;
getTestRecord({wproduct: that.wproduct, page: 0}).then((res) => {
if (res.code == 200) {
that.recordList = res.data;
} else {
this.$message.error(res.msg);
}
});
},
//检验记录
checkRecord(scope) {
let that = this;
that.wproduct = scope.row.id; //半成品ID
that.limitedCheckRecord = true;
getTestRecord({wproduct: scope.row.id, page: 0}).then((res) => {
if (res.code == 200) {
that.recordList = res.data;
} else {
this.$message.error(res.msg);
}
});
},
//点击记录里的检验
handleInspectionRecord(scope) {
let that = this;
that.innerVisible = false;
that.recordId = scope.row.id;
that.recordform = scope.row.form;
that.formName = scope.row.form_.name;
getrffieldList({form: this.recordform, page: 1, page_size: 100}).then(
(response) => {
if (response.data) {
that.hasPicture = false;
that.recordId = response.data.id;
getTestRecordItem(response.data.id).then((res) => {
that.formName = res.data.form_.name;
let fieldList = response.data.results;
that.fieldList = [...fieldList];
let arr = fieldList.filter((item) => {
return item.field_type === "draw";
});
if (arr.length > 0) {
that.hasPicture = true;
}
getTestRecordItem(scope.row.id).then((res) => {
let arr = [];
let fieldList = res.data.record_data;
that.fieldList = [...fieldList];
let arr = fieldList.filter((item) => {
return item.field_type === "draw";
});
if (arr.length > 0) {
that.hasPicture = true;
for (let i = 0; i < that.fieldList.length; i++) {
let obj = that.fieldList[i];
obj.is_testok = null;
for (let j = 0; j < fieldList.length; j++) {
if (that.fieldList[i].field_key === fieldList[j].field_key) {
obj.id = parseInt(fieldList[j].id);
obj.is_testok = fieldList[j].is_testok;
obj.field_value = fieldList[j].field_value;
}
}
arr.push(obj);
}
that.fieldList = arr;
that.$nextTick(() => {
that.innerVisible = true;
});
@ -537,162 +617,90 @@ export default {
}
}
);
} else this.$message.error("请选择检查表!");
},
//选择物料检查表
recordformChange() {
let that = this;
let arr = this.recordformList.filter((item) => {
return item.id === that.recordform;
});
that.formName = arr[0].name;
},
//更新检验记录列表
refreshRecord() {
let that = this;
getTestRecord({ wproduct: that.wproduct, page: 0 }).then((res) => {
if (res.code == 200) {
that.recordList = res.data;
} else {
this.$message.error(res.msg);
}
});
},
//检验记录
checkRecord(scope) {
let that = this;
that.wproduct = scope.row.id; //半成品ID
that.limitedCheckRecord = true;
getTestRecord({ wproduct: scope.row.id, page: 0 }).then((res) => {
if (res.code == 200) {
that.recordList = res.data;
} else {
this.$message.error(res.msg);
}
});
},
//点击记录里的检验
handleInspectionRecord(scope) {
let that = this;
that.innerVisible = false;
that.recordId = scope.row.id;
that.recordform = scope.row.form;
that.formName = scope.row.form_.name;
getrffieldList({ form: this.recordform, page: 1, page_size: 100 }).then(
(response) => {
if (response.data) {
that.hasPicture = false;
let fieldList = response.data.results;
that.fieldList = [...fieldList];
let arr = fieldList.filter((item) => {
return item.field_type === "draw";
});
if (arr.length > 0) {
that.hasPicture = true;
}
getTestRecordItem(scope.row.id).then((res) => {
let arr = [];
let fieldList = res.data.record_data;
for (let i = 0; i < that.fieldList.length; i++) {
let obj = that.fieldList[i];
obj.is_testok = null;
for (let j = 0; j < fieldList.length; j++) {
if (that.fieldList[i].field_key === fieldList[j].field_key) {
obj.id = parseInt(fieldList[j].id);
obj.is_testok = fieldList[j].is_testok;
obj.field_value = fieldList[j].field_value;
}
}
arr.push(obj);
},
delTestRecord(scope) {
let that = this;
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await delTestRecordItem(scope.row.id).then((res) => {
if (res.code >= 200) {
that.$message.success("成功");
that.refreshRecord();
this.getList();
this.getList1();
} else {
this.$message.error(res.msg);
}
that.fieldList = arr;
that.$nextTick(() => {
that.innerVisible = true;
});
});
}
}
);
},
delTestRecord(scope) {
let that = this;
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await delTestRecordItem(scope.row.id).then((res) => {
})
.catch((err) => {
this.$message.error(err);
});
},
//保存检查项目
recordSave(value) {
let that = this;
let id = value.id;
let params = {};
params.record_data = value.record_data;
params.is_testok = value.is_testok;
putTestRecordItem(id, params)
.then((res) => {
if (res.code >= 200) {
that.$message.success("成功");
that.innerVisible = false;
that.limitedReview = false;
that.getList();
that.getList1();
that.refreshRecord();
this.getList();
this.getList1();
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
})
.catch((err) => {
console.error(err);
});
},
//记录提交检查项目
recordSubmit(value) {
let that = this;
let id = value.id;
let params = {};
params.record_data = value.record_data;
params.is_testok = value.is_testok;
putTestRecordItem(id, params)
.then((res) => {
if (res.code >= 200) {
subTestRecordItem(id, params).then((res) => {
if (res.code >= 200) {
that.innerVisible = false;
that.limitedReview = false;
that.limitedCheckRecord = false;
this.getList();
this.getList1();
that.refreshRecord();
}
});
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
},
//第一次保存提交检查项目
recordCancel() {
this.outerVisible = false;
this.innerVisible = false;
},
},
//保存检查项目
recordSave(value) {
let that = this;
let id = value.id;
let params = {};
params.record_data = value.record_data;
params.is_testok = value.is_testok;
putTestRecordItem(id, params)
.then((res) => {
if (res.code >= 200) {
that.innerVisible = false;
that.limitedReview = false;
that.getList();
that.getList1();
that.refreshRecord();
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
console.error(err);
});
},
//记录提交检查项目
recordSubmit(value) {
let that = this;
let id = value.id;
let params = {};
params.record_data = value.record_data;
params.is_testok = value.is_testok;
putTestRecordItem(id, params)
.then((res) => {
if (res.code >= 200) {
subTestRecordItem(id, params).then((res) => {
if (res.code >= 200) {
that.innerVisible = false;
that.limitedReview = false;
that.limitedCheckRecord = false;
this.getList();
this.getList1();
that.refreshRecord();
}
});
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
console.error(err);
});
},
//第一次保存提交检查项目
recordCancel() {
this.outerVisible = false;
this.innerVisible = false;
},
},
};
};
</script>

View File

@ -2,8 +2,8 @@
<div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
<el-tab-pane
:key="item.name"
v-for="item in processOption"
:key="item.name"
:label="item.name"
:name="item.id"
:closable="item.close"
@ -18,8 +18,7 @@
@current-change="handleCurrentChange"
>
<el-table-column type="index" width="50"/>
<el-table-column label="子计划编号" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="子计划编号" prop="number" min-width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column label="产品名称" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
@ -58,11 +57,9 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="开工时间" width="100">
<template slot-scope="scope">{{ scope.row.start_date }}</template>
<el-table-column label="开工时间" prop="start_date" width="100">
</el-table-column>
<el-table-column label="完工时间" width="100">
<template slot-scope="scope">{{ scope.row.end_date }}</template>
<el-table-column label="完工时间" prop="end_date" width="100">
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
@ -88,20 +85,21 @@
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['wmaterial_pick'])&&!scope.row.is_picked"
type="success"
v-if="scope.row.is_picked == false"
@click="handleNeed(scope)"
>
领料
</el-link>
<el-link
v-if="checkPermission(['wmaterial_pick'])&&scope.row.is_picked"
type="success"
v-if="scope.row.is_picked"
@click="handleNeed(scope)"
>
继续领料
</el-link>
<el-link
v-if="checkPermission(['wmaterial_pick'])"
type="primary"
@click="handlepick(scope)"
>
@ -124,10 +122,11 @@
<span>半成品</span>
</div>
<el-button
v-for="item in steps"
v-show="checkPermission(['wmaterial_operation'])"
:key="item.number"
type="primary"
style="margin-left: 2px"
v-for="item in steps"
:key="item.number"
:label="item.name"
:value="item.number"
@click="handlework(item)"
@ -135,10 +134,11 @@
{{ item.name }}
</el-button>
<el-button
type="primary"
@click="handleScrapbcp()"
v-if="checkPermission(['wmaterial_scrap'])"
id="scrap"
type="primary"
style="float: right; display: none"
@click="handleScrapbcp()"
>
报废
</el-button>
@ -167,10 +167,7 @@
{{scope.row.subproduction_plan_.number}}
</template>
</el-table-column>
<el-table-column label="玻璃编号" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.number }}
</template>
<el-table-column label="玻璃编号" prop="number" width="100" show-overflow-tooltip>
</el-table-column>
<el-table-column label="玻璃状态" width="100" show-overflow-tooltip>
<template slot-scope="scope">
@ -192,10 +189,7 @@
{{ ng_sign_[scope.row.ng_sign] }}
</template>
</el-table-column>
<el-table-column label="更新时间" width="160">
<template slot-scope="scope">
{{scope.row.update_time}}
</template>
<el-table-column label="更新时间" prop="update_time" width="160">
</el-table-column>
</el-table>
</el-card>
@ -229,11 +223,9 @@
{{scope.row.material_.unit}}
</template>
</el-table-column>
<el-table-column label="物料批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
<el-table-column prop="batch" label="物料批次">
</el-table-column>
<el-table-column label="物料数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
<el-table-column prop="count" label="物料数量">
</el-table-column>
</el-table>
</el-card>
@ -249,8 +241,8 @@
<el-form :model="formbcp">
<el-form-item label="甩片原因">
<el-select
style="width: 80%"
v-model="formbcp.scrap_reason"
style="width: 80%"
placeholder="请甩片原因"
>
<el-option