fix:生产执行添加辅料列表
This commit is contained in:
parent
08947d8bdd
commit
b16894ae86
|
@ -0,0 +1,171 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
|
||||
</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 class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
:params="params"
|
||||
:query="query"
|
||||
>
|
||||
<!-- <el-table-column type="selection"></el-table-column> -->
|
||||
<el-table-column label="状态" prop="state" width="100" >
|
||||
<template #default="scope">
|
||||
<el-tag :type="wmState[scope.row.state]?.type">
|
||||
{{wmState[scope.row.state]?.text}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="物料名称"
|
||||
prop="material_name"
|
||||
min-width="150"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{ scope.row.material_name }}
|
||||
<span v-if="scope.row.material_origin != null"
|
||||
>({{ scope.row.material_origin_name }})</span
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
prop="batch"
|
||||
min-width="120"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="部门/工段"
|
||||
prop="belong_dept_name"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{scope.row.belong_dept_name}}/{{scope.row.mgroup_name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="数量"
|
||||
prop="count"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="生产中"
|
||||
prop="count_working"
|
||||
min-width="80"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="不合格标记"
|
||||
prop="defect_name"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
width="150"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
align="center"
|
||||
width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button @click="printMaterial(scope.row)" type="text">物料标签</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import { wmState } from "@/utils/enum.js";
|
||||
export default {
|
||||
props: {
|
||||
deptId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupName: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
processId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
mgroupcode: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
name: "wmaterial",
|
||||
data() {
|
||||
return {
|
||||
wmState,
|
||||
apiObj: null,
|
||||
params: {
|
||||
mgroup: "",
|
||||
},
|
||||
query: {
|
||||
search: "",
|
||||
},
|
||||
apiObjPrint:this.$API.cm.labelmat.fromWm,
|
||||
printer_name:localStorage.getItem("printer_name"),
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
that.params.mgroup = that.mgroupId;
|
||||
that.params.material__type=40;
|
||||
that.$TOOL.data.set('gx_deptID',that.deptId)
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
},
|
||||
methods: {
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
//打印物料标签
|
||||
printMaterial(row){
|
||||
let that = this;
|
||||
if(that.printer_name!==''&&that.printer_name!==null&&that.printer_name!==undefined){
|
||||
let params = {};
|
||||
params.tid = row.id;
|
||||
params.extra_data={count:row.count};
|
||||
params.label_template_name = '工段物料打印模板';
|
||||
that.apiObjPrint.req(params).then((res) => {
|
||||
let obj = {};
|
||||
obj.printer_commands = res.commands;
|
||||
obj.printer_name = that.printer_name;
|
||||
that.$API.wpm.prints.req(obj).then((response) => {
|
||||
that.$message.success("打印成功");
|
||||
});
|
||||
})
|
||||
}else{
|
||||
that.$message.warning("请先设置打印机");
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped></style>
|
|
@ -54,13 +54,20 @@
|
|||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></inmOut>
|
||||
<record v-else
|
||||
<record v-else-if="values == '出入库记录'"
|
||||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></record>
|
||||
<helpso v-else-if="values == '辅料'"
|
||||
:mgroupId="mgroupId"
|
||||
:deptId = "mgroupDept"
|
||||
:mgroupName="mgroupName"
|
||||
:processId="processId"
|
||||
:mgroupcode="mgroup_code"
|
||||
></helpso>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
@ -71,14 +78,15 @@ import mlogs from "./mlogs.vue";
|
|||
import mtask from "./mtask.vue";
|
||||
import handover from "./handover.vue";
|
||||
import record from "./inmrecord.vue";
|
||||
import helpso from "./helpso.vue";
|
||||
export default {
|
||||
name: "bx",
|
||||
components: { inm, inmOut,mlogs, mtask, handover,record },
|
||||
components: { inm, inmOut,mlogs, mtask, handover,record,helpso },
|
||||
data() {
|
||||
return {
|
||||
mgroups:[],
|
||||
tableHieght: 200,
|
||||
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录"],
|
||||
options: ["日志", "交接记录", "来料未完成","出料已完成","出入库记录",'辅料'],
|
||||
values: "日志",
|
||||
mgroupName: "",
|
||||
mgroupId: "",
|
||||
|
|
Loading…
Reference in New Issue