fix:光芯成品检验
This commit is contained in:
parent
cf3cb5139a
commit
1ec89273e5
|
@ -1001,7 +1001,7 @@ const routes = [
|
|||
name: "materials_gx",
|
||||
path: "/mtm/materials_gx",
|
||||
meta: {
|
||||
title: "物料产品",
|
||||
title: "物料清单",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["material_gx"],
|
||||
},
|
||||
|
@ -1062,7 +1062,7 @@ const routes = [
|
|||
name: "routepack",
|
||||
path: "/mtm/routepack",
|
||||
meta: {
|
||||
title: "加工工艺",
|
||||
title: "工艺路线",
|
||||
// icon: "el-icon-share",
|
||||
perms: ["routepack"],
|
||||
},
|
||||
|
@ -1139,7 +1139,7 @@ const routes = [
|
|||
name: "utask",
|
||||
path: "/pm/utask",
|
||||
meta: {
|
||||
title: "车间任务",
|
||||
title: "生产任务",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["utask_gx"],
|
||||
},
|
||||
|
@ -1380,12 +1380,30 @@ const routes = [
|
|||
name: "chaoxi",
|
||||
path: "/wpm_gx/chaoxi",
|
||||
meta: {
|
||||
title: "超洗",
|
||||
title: "一次超洗",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["wpm_cx"],
|
||||
},
|
||||
component: "wpm_gx/chaoxi",
|
||||
},
|
||||
{
|
||||
name: "chaoxicc",
|
||||
path: "/wpm_gx/chaoxi2",
|
||||
meta: {
|
||||
title: "二次超洗",
|
||||
perms: ["wpm_cx2"],
|
||||
},
|
||||
component: "wpm_gx/chaoxi2",
|
||||
},
|
||||
{
|
||||
name: "chaoxiwg",
|
||||
path: "/wpm_gx/chaoxi3",
|
||||
meta: {
|
||||
title: "三次超洗",
|
||||
perms: ["wpm_cx3"],
|
||||
},
|
||||
component: "wpm_gx/chaoxi3",
|
||||
},
|
||||
],
|
||||
},
|
||||
//检验管理 qm
|
||||
|
@ -1459,6 +1477,26 @@ const routes = [
|
|||
},
|
||||
component: "qm/product",
|
||||
},
|
||||
{
|
||||
name: "products_cc",
|
||||
path: "/qm/products_cc",
|
||||
meta: {
|
||||
title: "尺寸检验",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["productstest_cc"],
|
||||
},
|
||||
component: "qm/products_cc",
|
||||
},
|
||||
{
|
||||
name: "products_wg",
|
||||
path: "/qm/products_wg",
|
||||
meta: {
|
||||
title: "外观检验",
|
||||
// icon: "el-icon-cellphone",
|
||||
perms: ["productstest__wg"],
|
||||
},
|
||||
component: "qm/products_wg",
|
||||
},
|
||||
{
|
||||
name: "productDetail",
|
||||
path: "/qm/productDetail",
|
||||
|
@ -2142,7 +2180,7 @@ const routes = [
|
|||
name: "wf",
|
||||
path: "/wf",
|
||||
meta: {
|
||||
title: "审批",
|
||||
title: "审批管理",
|
||||
icon: "el-icon-circle-check-filled",
|
||||
type: "menu",
|
||||
perms: ["wf"],
|
||||
|
|
|
@ -222,7 +222,7 @@ export default {
|
|||
getMaterialIn() {
|
||||
let that = this;
|
||||
this.$API.mtm.material.list
|
||||
.req({ page: 0, type__in: "20,30" })
|
||||
.req({ page: 0, type__in: "10,20,30" })
|
||||
.then((res) => {
|
||||
this.materialsIn = res;
|
||||
});
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<el-descriptions-item label="工艺名称:">{{
|
||||
form.name
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="物料名称:">{{
|
||||
form.material_name
|
||||
}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 8px" shadow="hover">
|
||||
|
|
|
@ -0,0 +1,187 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="table_add"
|
||||
v-auth="'mlog.create'"
|
||||
>新增
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
style="margin-right: 5px"
|
||||
v-model="query.search"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
:params="params"
|
||||
:query="params"
|
||||
@row-click="table_detail"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="检验日期" prop="test_date"></el-table-column>
|
||||
<el-table-column label="批次号" prop="batch"> </el-table-column>
|
||||
<el-table-column label="物料名" prop="material_name" show-overflow-tooltip> </el-table-column>
|
||||
<el-table-column label="总数" prop="count"> </el-table-column>
|
||||
<el-table-column label="抽检数" prop="count_sampling"> </el-table-column>
|
||||
<el-table-column label="合格数" prop="count_ok"> </el-table-column>
|
||||
<el-table-column label="不合格数" prop="count_notok"> </el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template #default="scope">
|
||||
<el-link type="primary" @click="table_edit(scope.row)">编辑</el-link>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-link type="danger" @click="table_del(scope.row)">删除</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
:process="processId"
|
||||
:mgroup="mgroupId"
|
||||
:dept="deptId"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
>
|
||||
</save-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./products_form.vue";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
mgroupName: {
|
||||
// cc wg
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
name: "mlog",
|
||||
components: {
|
||||
saveDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: null,
|
||||
params: { material__process__name: "" },
|
||||
query: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
detail: false,
|
||||
},
|
||||
tableData: [],
|
||||
selection: [],
|
||||
mtask: "",
|
||||
mlogId: "",
|
||||
deptId: null,
|
||||
processId: "",
|
||||
processCate: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
if(that.mgroupName == "size"){
|
||||
this.params.material__process__name = "一次超洗";
|
||||
}else{
|
||||
this.params.material__process__name = "二次超洗";
|
||||
}
|
||||
that.apiObj= this.$API.qm.ftestwork.list;
|
||||
},
|
||||
methods: {
|
||||
detailClose() {
|
||||
this.dialog.detail = false;
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
//添加日志
|
||||
table_add() {
|
||||
let mode = this.mgroupName+"Add";
|
||||
console.log('mode',mode)
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open(mode);
|
||||
});
|
||||
},
|
||||
//编辑日志
|
||||
table_edit(row) {
|
||||
let mode = this.mgroupName+"Edit";
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open(mode).setData(row);
|
||||
});
|
||||
},
|
||||
//日志详情
|
||||
table_detail(row) {
|
||||
this.mlogId = row.id;
|
||||
this.dialog.detail = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.detailDialog.open();
|
||||
});
|
||||
},
|
||||
//日志删除
|
||||
table_del(row) {
|
||||
this.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
var id = row.id;
|
||||
this.$API.wpm.mlog.delete.req(id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
//日志撤回
|
||||
mlogRevert(row) {
|
||||
this.$confirm(`确定撤回该日志吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
var id = row.id;
|
||||
this.$API.wpm.mlog.revert.req(id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("撤回成功");
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection) {
|
||||
this.selection = selection;
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
//本地更新数据
|
||||
//新增岗位后更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.dialog.save = true;
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
|
@ -0,0 +1,53 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-segmented
|
||||
v-model="values"
|
||||
:options="options"
|
||||
size="default"
|
||||
></el-segmented>
|
||||
</el-header>
|
||||
<el-main id="elMain" class="nopadding">
|
||||
<!-- 检验记录 -->
|
||||
<mlogs
|
||||
v-if="values == '检验记录'"
|
||||
:mgroupName="mgroupName"
|
||||
></mlogs>
|
||||
<!-- 交接记录 -->
|
||||
<handover
|
||||
v-else-if="values == '交接记录'"
|
||||
:mgroupName="mgroupName"
|
||||
></handover>
|
||||
<!-- 库存 -->
|
||||
<inm v-else :mgroupName="mgroupName"></inm>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import inm from "../wpm_gx/inm.vue";
|
||||
import mlogs from "./mlogs.vue";
|
||||
import handover from "../wpm_gx/handover.vue";
|
||||
export default {
|
||||
components: { inm, mlogs, handover },
|
||||
data() {
|
||||
return {
|
||||
tableHieght: 200,
|
||||
options: ["检验记录", "交接记录", "库存"],
|
||||
values: "检验记录",
|
||||
mgroupName: "size",
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let height = document.getElementById("elMain").clintHeight / 2;
|
||||
that.tableHieght = height;
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
this.value = value;
|
||||
console.log("Selected value:", value);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,493 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="modeTitle[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="物料批次" prop="batch">
|
||||
<el-select
|
||||
v-model="form.batch"
|
||||
placeholder="物料批次"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.batch"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="总数">
|
||||
<el-input
|
||||
v-model="form.count"
|
||||
disabled
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检验日期" prop="test_date">
|
||||
<el-date-picker
|
||||
v-model="form.test_date"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检验数量">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="form.count_sampling"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCheckChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="合格数量">
|
||||
<el-input
|
||||
v-model="form.count_ok"
|
||||
disabled
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="不合格数量">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="form.count_notok"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange('notok')"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="mode=='sizeAdd'||mode=='sizeEdit'">
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈内径">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqnj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈内径圆度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqnjyd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈外径">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqwj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈外径圆度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqwjyd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品外径">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_wj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品圆度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_yd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="产品同心度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_txd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="厚度">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hd"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-else>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="气泡">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_qp"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="水纹">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_swen"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="崩边">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_bb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="棕边">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_zb"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="划伤">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hs"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="麻点">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_md"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="黑圈变形">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_hqbx"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="倒角">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_dj"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="破损">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_ps"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="篮圈">
|
||||
<el-input-number
|
||||
controls-position="right"
|
||||
v-model="count_notok_json.count_n_lq"
|
||||
style="width: 100%"
|
||||
precision="0"
|
||||
@change="handleCountChange"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit"
|
||||
>保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
mode:'sizeAdd',
|
||||
modeTitle: {
|
||||
sizeAdd: "尺寸检验",
|
||||
sizeEdit: "尺寸检验",
|
||||
facadeAdd: "外观和内质检验",
|
||||
facadeEdit: "外观和内质检验",
|
||||
},
|
||||
loading: false,
|
||||
form: {
|
||||
test_date: "",
|
||||
batch: "",
|
||||
count: null,
|
||||
count_ok: null,
|
||||
count_notok: 0,
|
||||
count_sampling:0,
|
||||
count_notok_json:{}
|
||||
},
|
||||
count_notok_json:{
|
||||
//尺寸
|
||||
count_n_hqnj: 0,
|
||||
count_n_hqnjyd: 0,
|
||||
count_n_hqwj: 0,
|
||||
count_n_hqwjyd: 0,
|
||||
count_n_wj: 0,
|
||||
count_n_yd: 0,
|
||||
count_n_txd: 0,
|
||||
count_n_hd: 0,
|
||||
//外观和内质
|
||||
count_n_qp: 0,
|
||||
count_n_swen: 0,
|
||||
count_n_bb: 0,
|
||||
count_n_zb: 0,
|
||||
count_n_hs: 0,
|
||||
count_n_md: 0,
|
||||
count_n_hqbx: 0,
|
||||
count_n_dj: 0,
|
||||
count_n_ps: 0,
|
||||
count_n_lq: 0,
|
||||
},
|
||||
rules: {
|
||||
test_date: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择检验日期",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
batch: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择物料批次",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMaterialBatch();
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
open(mode = "sizeAdd") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
handleCheckChange(){
|
||||
this.form.count_ok = this.form.count_sampling-this.form.count_notok;
|
||||
},
|
||||
handleCountChange(type){
|
||||
if(type == 'notok'){
|
||||
this.count_notok_json.count_n_hqnj=
|
||||
this.count_notok_json.count_n_hqnjyd=
|
||||
this.count_notok_json.count_n_hqwj=
|
||||
this.count_notok_json.count_n_hqwjyd=
|
||||
this.count_notok_json.count_n_wj=
|
||||
this.count_notok_json.count_n_yd=
|
||||
this.count_notok_json.count_n_txd=
|
||||
this.count_notok_json.count_n_hd=
|
||||
this.count_notok_json.count_n_qp=
|
||||
this.count_notok_json.count_n_swen=
|
||||
this.count_notok_json.count_n_zb=
|
||||
this.count_notok_json.count_n_hs=
|
||||
this.count_notok_json.count_n_md=
|
||||
this.count_notok_json.count_n_hqbx=
|
||||
this.count_notok_json.count_n_dj=
|
||||
this.count_notok_json.count_n_ps=
|
||||
this.count_notok_json.count_n_lq=0;
|
||||
}else{
|
||||
this.form.count_notok =
|
||||
this.count_notok_json.count_n_hqnj+
|
||||
this.count_notok_json.count_n_hqnjyd+
|
||||
this.count_notok_json.count_n_hqwj+
|
||||
this.count_notok_json.count_n_hqwjyd+
|
||||
this.count_notok_json.count_n_wj+
|
||||
this.count_notok_json.count_n_yd+
|
||||
this.count_notok_json.count_n_txd+
|
||||
this.count_notok_json.count_n_hd+
|
||||
this.count_notok_json.count_n_qp+
|
||||
this.count_notok_json.count_n_swen+
|
||||
this.count_notok_json.count_n_zb+
|
||||
this.count_notok_json.count_n_hs+
|
||||
this.count_notok_json.count_n_md+
|
||||
this.count_notok_json.count_n_hqbx+
|
||||
this.count_notok_json.count_n_dj+
|
||||
this.count_notok_json.count_n_ps+
|
||||
this.count_notok_json.count_n_lq;
|
||||
}
|
||||
this.form.count_ok = this.form.count_sampling - this.form.count_notok;
|
||||
},
|
||||
//获取物料批次
|
||||
getMaterialBatch() {
|
||||
let that = this;
|
||||
let obj = {page: 0, count__gte: 0};
|
||||
if(that.mode == "sizeAdd"||that.mode == "sizeEdit"){
|
||||
obj.material__process__name = '一次超洗'
|
||||
}else{
|
||||
obj.material__process__name = '二次超洗'
|
||||
}
|
||||
that.$API.wpm.wmaterial.list
|
||||
.req(obj)
|
||||
.then((res) => {
|
||||
that.options = res;
|
||||
});
|
||||
},
|
||||
handleChange(val) {
|
||||
let that = this;
|
||||
console.log(val);
|
||||
that.options.forEach((item) => {
|
||||
if (item.id == val) {
|
||||
that.form.count = item.count;
|
||||
that.form.batch = item.batch;
|
||||
that.form.material = item.material;
|
||||
that.form.wm = item.id;
|
||||
}
|
||||
});
|
||||
},
|
||||
//提交
|
||||
submit() {
|
||||
let that = this;
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
that.isSaveing = true;
|
||||
that.form.count_notok_json = that.count_notok_json;
|
||||
if (that.mode == "sizeAdd"||that.mode == "facadeAdd") {
|
||||
that.$API.qm.ftestwork.create.req(that.form)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("操作成功");
|
||||
}).catch( err=>{
|
||||
//可以处理校验错误
|
||||
that.isSaveing = false;
|
||||
})
|
||||
} else if (that.mode == "sizeEdit"||that.mode == "facadeEdit") {
|
||||
that.$API.qm.ftestwork.update.req(that.form.id, that.form)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.visible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("操作成功");
|
||||
}).catch( err=>{
|
||||
//可以处理校验错误
|
||||
that.isSaveing = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
this.form.test_group = this.form.split(",");
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
|
@ -0,0 +1,53 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-segmented
|
||||
v-model="values"
|
||||
:options="options"
|
||||
size="default"
|
||||
></el-segmented>
|
||||
</el-header>
|
||||
<el-main id="elMain" class="nopadding">
|
||||
<!-- 检验记录 -->
|
||||
<mlogs
|
||||
v-if="values == '检验记录'"
|
||||
:mgroupName="mgroupName"
|
||||
></mlogs>
|
||||
<!-- 交接记录 -->
|
||||
<handover
|
||||
v-else-if="values == '交接记录'"
|
||||
:mgroupName="mgroupName"
|
||||
></handover>
|
||||
<!-- 库存 -->
|
||||
<inm v-else :mgroupName="mgroupName"></inm>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import inm from "../wpm_gx/inm.vue";
|
||||
import mlogs from "./mlogs.vue";
|
||||
import handover from "../wpm_gx/handover.vue";
|
||||
export default {
|
||||
components: { inm, mlogs, handover },
|
||||
data() {
|
||||
return {
|
||||
tableHieght: 200,
|
||||
options: ["检验记录", "交接记录", "库存"],
|
||||
values: "检验记录",
|
||||
mgroupName: "facade",
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let height = document.getElementById("elMain").clintHeight / 2;
|
||||
that.tableHieght = height;
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
this.value = value;
|
||||
console.log("Selected value:", value);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -42,7 +42,7 @@ export default {
|
|||
tableHieght: 200,
|
||||
options: ["日志", "交接记录", "库存"],
|
||||
values: "日志",
|
||||
mgroupName: "超洗",
|
||||
mgroupName: "一次超洗",
|
||||
mgroupId: "",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-segmented
|
||||
v-model="values"
|
||||
:options="options"
|
||||
size="default"
|
||||
></el-segmented>
|
||||
</el-header>
|
||||
<el-main id="elMain" class="nopadding">
|
||||
<!-- 日志 -->
|
||||
<mlogs
|
||||
v-if="values == '日志'"
|
||||
:mgroupName="mgroupName"
|
||||
style="height: 50%"
|
||||
></mlogs>
|
||||
<mtask
|
||||
v-if="values == '日志'"
|
||||
:mgroupName="mgroupName"
|
||||
style="height: 50%"
|
||||
></mtask>
|
||||
<!-- 交接记录 -->
|
||||
<handover
|
||||
v-else-if="values == '交接记录'"
|
||||
:mgroupName="mgroupName"
|
||||
></handover>
|
||||
<!-- 库存 -->
|
||||
<inm v-else :mgroupName="mgroupName"></inm>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import inm from "./inm.vue";
|
||||
import mlogs from "./mlogs.vue";
|
||||
import mtask from "./mtask.vue";
|
||||
import handover from "./handover.vue";
|
||||
export default {
|
||||
components: { inm, mlogs, mtask, handover },
|
||||
data() {
|
||||
return {
|
||||
tableHieght: 200,
|
||||
options: ["日志", "交接记录", "库存"],
|
||||
values: "日志",
|
||||
mgroupName: "超洗(尺寸)",
|
||||
mgroupId: "",
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let height = document.getElementById("elMain").clintHeight / 2;
|
||||
that.tableHieght = height;
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
this.value = value;
|
||||
console.log("Selected value:", value);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,62 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-segmented
|
||||
v-model="values"
|
||||
:options="options"
|
||||
size="default"
|
||||
></el-segmented>
|
||||
</el-header>
|
||||
<el-main id="elMain" class="nopadding">
|
||||
<!-- 日志 -->
|
||||
<mlogs
|
||||
v-if="values == '日志'"
|
||||
:mgroupName="mgroupName"
|
||||
style="height: 50%"
|
||||
></mlogs>
|
||||
<mtask
|
||||
v-if="values == '日志'"
|
||||
:mgroupName="mgroupName"
|
||||
style="height: 50%"
|
||||
></mtask>
|
||||
<!-- 交接记录 -->
|
||||
<handover
|
||||
v-else-if="values == '交接记录'"
|
||||
:mgroupName="mgroupName"
|
||||
></handover>
|
||||
<!-- 库存 -->
|
||||
<inm v-else :mgroupName="mgroupName"></inm>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import inm from "./inm.vue";
|
||||
import mlogs from "./mlogs.vue";
|
||||
import mtask from "./mtask.vue";
|
||||
import handover from "./handover.vue";
|
||||
export default {
|
||||
components: { inm, mlogs, mtask, handover },
|
||||
data() {
|
||||
return {
|
||||
tableHieght: 200,
|
||||
options: ["日志", "交接记录", "库存"],
|
||||
values: "日志",
|
||||
mgroupName: "超洗(外观)",
|
||||
mgroupId: "",
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let height = document.getElementById("elMain").clintHeight / 2;
|
||||
that.tableHieght = height;
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
this.value = value;
|
||||
console.log("Selected value:", value);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -2,13 +2,6 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<!-- <el-header>
|
||||
<el-segmented
|
||||
v-model="values"
|
||||
:options="options"
|
||||
size="default"
|
||||
></el-segmented>
|
||||
</el-header> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
|
@ -23,6 +16,14 @@
|
|||
v-auth="'handover.create'"
|
||||
>返工</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="table_add(30)"
|
||||
v-auth="'handover.create'"
|
||||
v-if="mgroupName=='一次超洗'||mgroupName=='二次超洗'"
|
||||
>检验</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-select
|
||||
|
@ -88,7 +89,7 @@
|
|||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" prop="type">
|
||||
<el-table-column label="交接类别" prop="type">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.type == 10" type="success"
|
||||
>正常</el-tag
|
||||
|
@ -96,6 +97,9 @@
|
|||
<el-tag v-if="scope.row.type == 20" type="warning"
|
||||
>返工</el-tag
|
||||
>
|
||||
<el-tag v-if="scope.row.type == 30" type="warning"
|
||||
>检验</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -215,6 +219,7 @@ export default {
|
|||
},
|
||||
params: {
|
||||
mgroup: "",
|
||||
count_xtest__gte: 0,
|
||||
},
|
||||
query: {
|
||||
send_mgroup: "",
|
||||
|
@ -240,8 +245,17 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.printer_name = localStorage.getItem("printer_name");
|
||||
that.$API.mtm.mgroup.list
|
||||
if(that.mgroupName=="size"){
|
||||
that.params.type=30;
|
||||
that.params.send_mgroup__name="一次超洗";
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
}else if(that.mgroupName=="facade"){
|
||||
that.params.type=30;
|
||||
that.params.send_mgroup__name="二次超洗";
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
}else{
|
||||
that.printer_name = localStorage.getItem("printer_name");
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: that.mgroupName })
|
||||
.then((res) => {
|
||||
if (res.length != 1) {
|
||||
|
@ -254,6 +268,7 @@ export default {
|
|||
that.params.mgroup = that.mgroupId;
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handoverPrint() {
|
||||
|
@ -301,6 +316,7 @@ export default {
|
|||
},
|
||||
//编辑
|
||||
table_edit(row) {
|
||||
this.type=row.type;
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
|
@ -321,7 +337,6 @@ export default {
|
|||
selectionChange(selection) {
|
||||
this.selection = selection;
|
||||
},
|
||||
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
|
|
|
@ -85,7 +85,25 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-col :md="12" :sm="24" v-if="type==30">
|
||||
<el-form-item label="接收部门" prop="recive_dept">
|
||||
<el-select
|
||||
v-model="form.recive_dept"
|
||||
placeholder="接收工段"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="getUserList3"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" v-else>
|
||||
<el-form-item label="接收工段" prop="recive_mgroup">
|
||||
<el-select
|
||||
v-model="form.recive_mgroup"
|
||||
|
@ -215,6 +233,7 @@ export default {
|
|||
},
|
||||
userList: [],
|
||||
userList2: [],
|
||||
deptOptions:[],
|
||||
mgroupOptions: [],
|
||||
materialOptions: [],
|
||||
visible: false,
|
||||
|
@ -234,10 +253,19 @@ export default {
|
|||
this.form.send_mgroup = this.mgroupId;
|
||||
this.getMaterial();
|
||||
this.getUserList();
|
||||
this.getDeptOptions();
|
||||
this.getMgroupOptions();
|
||||
},
|
||||
methods: {
|
||||
//获取部门列表
|
||||
getDeptOptions() {
|
||||
this.$API.system.dept.list
|
||||
.req({ page: 0, type: "dept" })
|
||||
.then((res) => {
|
||||
this.deptOptions = res;
|
||||
});
|
||||
},
|
||||
//获取工段列表
|
||||
getMgroupOptions() {
|
||||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, type__in: "dept" })
|
||||
|
@ -245,12 +273,11 @@ export default {
|
|||
this.mgroupOptions = res;
|
||||
});
|
||||
},
|
||||
|
||||
//获取车间物料
|
||||
getMaterial() {
|
||||
let that = this;
|
||||
this.$API.wpm.wmaterial.list
|
||||
.req({ mgroup: that.mgroupId, page: 0 })
|
||||
.req({ mgroupx: that.mgroupId, page: 0 })
|
||||
.then((res) => {
|
||||
that.materialOptions = res;
|
||||
});
|
||||
|
@ -273,7 +300,15 @@ export default {
|
|||
that.userList2 = res;
|
||||
});
|
||||
},
|
||||
|
||||
//获取接收部门人员
|
||||
getUserList3() {
|
||||
let that = this;
|
||||
this.$API.system.user.list
|
||||
.req({ depts: that.form.recive_dept, page: 0 })
|
||||
.then((res) => {
|
||||
that.userList2 = res;
|
||||
});
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
|
@ -325,7 +360,8 @@ export default {
|
|||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
this.this.getUserList2();
|
||||
this.getUserList2();
|
||||
that.form.recive_dept();
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div class="left-panel" v-if="mgroupName!=='size'&&mgroupName!=='facade'">
|
||||
<el-button type="primary" @click="tomio" v-auth="'mio.do'"
|
||||
>领料</el-button
|
||||
>
|
||||
|
@ -9,6 +9,7 @@
|
|||
>入库</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="left-panel" v-else></div>
|
||||
<div class="right-panel">
|
||||
<!-- <el-button type="primary" @click="materialsChoses('wm')"
|
||||
>选择物料</el-button
|
||||
|
@ -33,6 +34,7 @@
|
|||
row-key="id"
|
||||
hidePagination
|
||||
:params="params"
|
||||
:query="query"
|
||||
>
|
||||
<el-table-column
|
||||
label="#"
|
||||
|
@ -90,20 +92,6 @@
|
|||
>编辑</el-button
|
||||
>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
v-auth="'mgroup.delete'"
|
||||
type="danger"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</scTable>
|
||||
|
@ -154,7 +142,14 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list
|
||||
if(that.mgroupName=="size"){
|
||||
that.params.material__process__name = "一次超洗";
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
}else if(that.mgroupName=="facade"){
|
||||
that.params.material__process__name = "二次超洗";
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
}else{
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: that.mgroupName })
|
||||
.then((res) => {
|
||||
if (res.length != 1) {
|
||||
|
@ -165,6 +160,7 @@ export default {
|
|||
that.params.mgroupx = res[0].id;
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
materialsChoses(str) {
|
||||
|
|
Loading…
Reference in New Issue