This commit is contained in:
caoqianming 2024-07-02 13:47:19 +08:00
commit 66142799fd
19 changed files with 2542 additions and 1413 deletions

Binary file not shown.

BIN
public/img/ly/hzy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 843 B

BIN
public/img/ly/mm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
public/img/ly/shsps.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 958 B

BIN
public/img/ly/ylm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
public/img/ly/yrfd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Binary file not shown.

View File

@ -298,8 +298,8 @@ export default {
color: #ffffff; color: #ffffff;
} }
.elProgress > .el-progress-circle { .elProgress > .el-progress-circle {
width: 5vw !important; width: 9vh !important;
height: 5vw !important; height: 9vh !important;
} }
// //
</style> </style>

View File

@ -2687,7 +2687,7 @@ const routes = [
path: "/bigScreenly", path: "/bigScreenly",
name: "bigScreenly", name: "bigScreenly",
meta: { meta: {
title: "能管大屏ly", title: "数智大屏",
icon: "el-icon-position", icon: "el-icon-position",
perms: ["bigScreenly"], perms: ["bigScreenly"],
fullpage: true, fullpage: true,

View File

@ -17,7 +17,13 @@
export default { export default {
methods: { methods: {
gohome(){ gohome(){
location.href="#/" let base_dashboard = this.$TOOL.data.get('BASE_INFO').base.base_dashboard;
if (base_dashboard == null || base_dashboard == undefined) {
base_dashboard = '/dashboard'
}
this.$router.replace({
path: base_dashboard,
});
}, },
goback(){ goback(){
this.$router.go(-1); this.$router.go(-1);

File diff suppressed because it is too large Load Diff

View File

@ -2,26 +2,65 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'material.create'">新增</el-button> <el-button
<scFileImport :templateUrl="materialTemplate" accept=".xlsx" :apiObj="$API.common.upload" @success="upSuccess"> type="primary"
icon="el-icon-plus"
@click="add"
v-auth="'material.create'"
>新增</el-button
>
<scFileImport
:templateUrl="materialTemplate"
accept=".xlsx"
:apiObj="$API.common.upload"
@success="upSuccess"
>
</scFileImport> </scFileImport>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input v-model="query.search" placeholder="名称" clearable></el-input> <el-input
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button> v-model="query.search"
placeholder="名称"
clearable
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<el-container> <el-container>
<el-header> <el-header>
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick" type="card"> <el-tabs
<el-tab-pane v-for="item in tabOptions" v-bind:key="item.name" :label="item.label" :name="item.name"> v-model="activeName"
class="demo-tabs"
@tab-click="handleClick"
type="card"
>
<el-tab-pane
v-for="item in tabOptions"
v-bind:key="item.name"
:label="item.label"
:name="item.name"
>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-checkbox v-model="showHidden" label="显示隐式物料" @change="hiddenChange" /> <el-checkbox
v-model="showHidden"
label="显示隐式物料"
@change="hiddenChange"
/>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe> <scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
@row-click="rowClick"
>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料编号" prop="number"> <el-table-column label="物料编号" prop="number">
</el-table-column> </el-table-column>
@ -31,40 +70,92 @@
</el-table-column> </el-table-column>
<el-table-column label="型号" prop="model"> <el-table-column label="型号" prop="model">
</el-table-column> </el-table-column>
<el-table-column label="物料特征" prop="type" width="230"> <el-table-column
label="物料特征"
prop="type"
width="230"
>
<template #default="scope"> <template #default="scope">
<span><el-tag>{{ typeOptions[scope.row.type] }}</el-tag> <span
<el-tag type="warning" v-if="scope.row.is_assemb" effect="plain"></el-tag> ><el-tag>{{
<el-tag type="warning" v-if="scope.row.process_name" effect="plain">{{ scope.row.process_name typeOptions[scope.row.type]
}}</el-tag> }}</el-tag>
<el-tag type="warning" v-if="scope.row.is_hidden" effect="plain"></el-tag></span> <el-tag
type="warning"
v-if="scope.row.is_assemb"
effect="plain"
></el-tag
>
<el-tag
type="warning"
v-if="scope.row.process_name"
effect="plain"
>{{ scope.row.process_name }}</el-tag
>
<el-tag
type="warning"
v-if="scope.row.is_hidden"
effect="plain"
></el-tag
></span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="关联物料" prop="brothers"> <el-table-column label="关联物料" prop="brothers">
<template #default="scope"> <template #default="scope">
<el-icon v-if="scope.row.brothers.length > 0" color="green"> <el-icon
v-if="scope.row.brothers.length > 0"
color="green"
>
<CircleCheckFilled /> <CircleCheckFilled />
</el-icon> </el-icon>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计量单位" prop="unit" width="80"> <el-table-column
label="计量单位"
prop="unit"
width="80"
>
</el-table-column> </el-table-column>
<el-table-column label="总库存" prop="count" width="80"> <el-table-column label="总库存" prop="count" width="80">
</el-table-column> </el-table-column>
<el-table-column label="安全库存" prop="count_safe" width="80"> <el-table-column
label="安全库存"
prop="count_safe"
width="80"
>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="140"> <el-table-column
v-if="materialType !== ''"
label="操作"
fixed="right"
align="center"
width="140"
>
<template #default="scope"> <template #default="scope">
<el-button link type="primary" @click="table_edit(scope.row)" v-auth="'material.update'"> <el-button
link
type="primary"
@click="table_edit(scope.row)"
v-auth="'material.update'"
>
编辑 编辑
</el-button> </el-button>
<el-button link type="warning" @click="table_copy(scope.row)" v-auth="'material.create'"> <el-button
link
type="warning"
@click="table_copy(scope.row)"
v-auth="'material.create'"
>
复制 复制
</el-button> </el-button>
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'material.delete'"> <el-button
link
type="danger"
@click="table_del(scope.row)"
v-auth="'material.delete'"
>
删除 删除
</el-button> </el-button>
</template> </template>
@ -72,41 +163,53 @@
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
</el-main> </el-main>
</el-container> </el-container>
<save-dialog v-if="dialog.save" ref="saveDialog" @success="handleSaveSuccess" <save-dialog
@closed="dialog.save = false"></save-dialog> v-if="dialog.save"
ref="saveDialog"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
</template> </template>
<script> <script>
import saveDialog from "./materials_form.vue"; import saveDialog from "./materials_form.vue";
import scFileImport from '@/components/scFileImport' import scFileImport from "@/components/scFileImport";
import scFileExport from '@/components/scFileExport' import scFileExport from "@/components/scFileExport";
import { ElLoading } from 'element-plus' import { ElLoading } from "element-plus";
export default { export default {
name: "rparty", name: "rparty",
props: {
materialType: {
type: String,
default() {
return "";
},
},
},
components: { components: {
saveDialog, saveDialog,
scFileImport, scFileImport,
scFileExport, scFileExport,
ElLoading ElLoading,
}, },
data() { data() {
return { return {
materialTemplate: '/media/template/material.xlsx', materialTemplate: "/media/template/material.xlsx",
dialog: { dialog: {
save: false, save: false,
}, },
apiObj: null, apiObj: null,
query: { type: 10, is_hidden: false }, query: { type: 10, is_hidden: false },
activeName: '主要原料', activeName: "主要原料",
selection: [], selection: [],
state_: { state_: {
10: '完好', 10: "完好",
20: '限用', 20: "限用",
30: '在修', 30: "在修",
40: '禁用', 40: "禁用",
}, },
tabOptions: [ tabOptions: [
{ label: "成品", name: 10 }, { label: "成品", name: 10 },
@ -119,27 +222,36 @@ export default {
// { label: "//", name: 0 }, // { label: "//", name: 0 },
], ],
typeOptions: { typeOptions: {
0: '电/水/气', 0: "电/水/气",
10: '成品', 10: "成品",
20: '半成品', 20: "半成品",
30: '主要原料', 30: "主要原料",
40: '辅助材料', 40: "辅助材料",
// 50: '', // 50: '',
// 60: '', // 60: '',
70: '办公用品', 70: "办公用品",
}, },
materialId: "",
materialName: "",
showHidden: false, showHidden: false,
}; };
}, },
mounted() { mounted() {
this.apiObj = this.$API.mtm.material.list console.log("materialType", this.materialType);
this.$refs.table.queryData(this.query) this.apiObj = this.$API.mtm.material.list;
this.$refs.table.queryData(this.query);
}, },
methods: { methods: {
rowClick(row) {
console.log("rowClick", row);
this.materialId = row.id;
this.materialName = row.full_name;
this.$emit("choseChange", row.id);
},
handleClick(pane, ev) { handleClick(pane, ev) {
this.query.type = pane.props.name this.query.type = pane.props.name;
this.query.page = 1 this.query.page = 1;
this.$refs.table.queryData(this.query) this.$refs.table.queryData(this.query);
}, },
// //
add() { add() {
@ -172,15 +284,20 @@ export default {
async table_del(row) { async table_del(row) {
this.$confirm(`确定删除吗?`, "提示", { this.$confirm(`确定删除吗?`, "提示", {
type: "warning", type: "warning",
}).then(() => { })
this.$API.mtm.material.delete.req(row.id).then((res) => { .then(() => {
this.$API.mtm.material.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.$refs.table.refresh(); this.$refs.table.refresh();
return res; return res;
}).catch((err) => { })
.catch((err) => {
return err; return err;
}); });
}).catch(() => { }); })
.catch(() => {});
}, },
// //
@ -192,31 +309,36 @@ export default {
} }
}, },
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query) this.$refs.table.queryData(this.query);
}, },
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
}, },
upSuccess(res, close) { upSuccess(res, close) {
close(); close();
const loading = ElLoading.service({ fullscreen: true, text: "解析中...请稍等" }); const loading = ElLoading.service({
this.$API.mtm.material.daoru.req({ path: res.path }).then(res => { fullscreen: true,
text: "解析中...请稍等",
});
this.$API.mtm.material.daoru
.req({ path: res.path })
.then((res) => {
loading.close(); loading.close();
this.$message.success("导入成功"); this.$message.success("导入成功");
this.$refs.table.queryData(this.query) this.$refs.table.queryData(this.query);
}).catch(err => {
loading.close();
}) })
.catch((err) => {
loading.close();
});
}, },
hiddenChange(val) { hiddenChange(val) {
if (val) { if (val) {
this.query.is_hidden = '' this.query.is_hidden = "";
} } else {
else { this.query.is_hidden = false;
this.query.is_hidden = false
}
this.$refs.table.queryData(this.query)
} }
this.$refs.table.queryData(this.query);
},
}, },
}; };
</script> </script>

View File

@ -3,7 +3,11 @@
<el-header> <el-header>
<div class="left-panel"></div> <div class="left-panel"></div>
<div class="right-panel"> <div class="right-panel">
<el-select v-model="query.mgroup" clearable> <el-select
v-model="query.mgroup"
clearable
style="width: 150px"
>
<el-option <el-option
v-for="item in mgroupOption" v-for="item in mgroupOption"
:key="item.id" :key="item.id"
@ -17,7 +21,17 @@
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
style="width: 150px"
/> />
<el-input
v-model="query.search"
placeholder="批次号"
clearable
style="width: 150px"
></el-input>
<el-button type="primary" @click="materialsChoses()"
>选择物料</el-button
>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@ -110,17 +124,30 @@
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
ref="materialsChose"
@choseChange="choseChange"
></materials>
</el-dialog>
</el-container> </el-container>
</template> </template>
<script> <script>
import materials from "./../mtm/materials.vue";
export default { export default {
components: {
materials,
},
name: "rparty", name: "rparty",
data() { data() {
return { return {
apiObj: this.$API.wpm.mlog.list, apiObj: this.$API.wpm.mlog.list,
query: { query: {
page: 1, search: "",
page_size: 20, material: "",
mgroup: "",
handle_date: "",
}, },
selection: [], selection: [],
state_: { state_: {
@ -128,12 +155,21 @@ export default {
20: "", 20: "",
}, },
mgroupOption: [], mgroupOption: [],
materialsVisible: false,
}; };
}, },
mounted() { mounted() {
this.getMgroup(); this.getMgroup();
}, },
methods: { methods: {
materialsChoses() {
this.materialsVisible = true;
},
choseChange(data) {
this.query.material = data;
this.$refs.table.queryData(this.query);
this.materialsVisible = false;
},
getMgroup() { getMgroup() {
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => { this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
this.mgroupOption = res; this.mgroupOption = res;

View File

@ -426,6 +426,24 @@
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">交接记录</span> <span style="font-size: 14px">交接记录</span>
</div> </div>
<div class="right-panel">
<el-input
v-model="queryHandover.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="queryHandoverChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('handover')"
>选择物料</el-button
>
</div>
</el-header> </el-header>
<el-main> <el-main>
<scTable <scTable
@ -507,6 +525,22 @@
<span style="font-size: 14px">车间库存</span> <span style="font-size: 14px">车间库存</span>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input
v-model="queryWm.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="paramsWmChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('wm')"
>选择物料</el-button
>
<el-button <el-button
type="primary" type="primary"
@click="tomio" @click="tomio"
@ -610,16 +644,26 @@
<el-button @click="addMtaskInfoVisible = false">取消</el-button> <el-button @click="addMtaskInfoVisible = false">取消</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
:materialType="materialType"
ref="materialsChose"
@choseChange="choseChange"
></materials>
</el-dialog>
</el-container> </el-container>
</template> </template>
<script> <script>
import saveDialog from "./worktask_form.vue"; import saveDialog from "./worktask_form.vue";
import showDrawer from "./mlog_drawer.vue"; import showDrawer from "./mlog_drawer.vue";
import materials from "./../mtm/materials.vue";
export default { export default {
components: { components: {
saveDialog, saveDialog,
showDrawer, showDrawer,
materials,
}, },
data() { data() {
return { return {
@ -647,19 +691,50 @@ export default {
visibleDrawer: false, visibleDrawer: false,
dialogSave: false, dialogSave: false,
paramsHandover: {}, paramsHandover: {},
queryHandover: {
search: "",
material: "",
},
paramsWm: {}, paramsWm: {},
queryWm: {
search: "",
material: "",
},
materialType: "wm",
mgroup: "", mgroup: "",
mlogId: "", mlogId: "",
mtaskDate: "", mtaskDate: "",
material_out: "", material_out: "",
material_model: "", material_model: "",
queryMtaskState: false, queryMtaskState: false,
materialsVisible: false,
}; };
}, },
mounted() { mounted() {
this.initDept(); this.initDept();
}, },
methods: { methods: {
materialsChoses(str) {
this.materialType = str;
this.materialsVisible = true;
},
choseChange(data) {
if (this.materialType == "wm") {
this.queryWm.material = data;
this.$refs.table_wm.queryData(this.queryWm);
} else {
this.queryHandover.material = data;
this.$refs.table_handover.queryData(this.queryHandover);
}
this.materialsVisible = false;
},
queryHandoverChange() {
this.$refs.table_handover.queryData(this.queryHandover);
},
paramsWmChange() {
this.$refs.table_wm.queryData(this.queryWm);
},
mlog_revert(row) { mlog_revert(row) {
this.mlogHandleLoading = true; this.mlogHandleLoading = true;
this.$API.wpm.mlog.revert this.$API.wpm.mlog.revert

View File

@ -159,6 +159,24 @@
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">交接记录</span> <span style="font-size: 14px">交接记录</span>
</div> </div>
<div class="right-panel">
<el-input
v-model="queryHandover.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="queryHandoverChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('handover')"
>选择物料</el-button
>
</div>
</el-header> </el-header>
<el-main> <el-main>
<scTable <scTable
@ -167,6 +185,7 @@
row-key="id" row-key="id"
stripe stripe
:params="paramsHandover" :params="paramsHandover"
:query="queryHandover"
> >
<el-table-column <el-table-column
label="送料日期" label="送料日期"
@ -235,6 +254,22 @@
<span style="font-size: 14px">车间库存</span> <span style="font-size: 14px">车间库存</span>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input
v-model="queryWm.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="paramsWmChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('wm')"
>选择物料</el-button
>
<el-button <el-button
type="primary" type="primary"
@click="tomio" @click="tomio"
@ -255,6 +290,7 @@
:apiObj="apiObjWm" :apiObj="apiObjWm"
row-key="id" row-key="id"
:params="paramsWm" :params="paramsWm"
:query="queryWm"
stripe stripe
hidePagination hidePagination
> >
@ -303,13 +339,23 @@
@closed="visibleDrawer = false" @closed="visibleDrawer = false"
> >
</showDrawer> </showDrawer>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
:materialType="materialType"
ref="materialsChose"
@choseChange="choseChange"
></materials>
</el-dialog>
</template> </template>
<script> <script>
import showDrawer from "./mlog_dept6_detail.vue"; import showDrawer from "./mlog_dept6_detail.vue";
import materials from "./../mtm/materials.vue";
export default { export default {
components: { components: {
showDrawer, showDrawer,
materials,
}, },
data() { data() {
return { return {
@ -326,7 +372,9 @@ export default {
34: "已终止", 34: "已终止",
40: "已提交", 40: "已提交",
}, },
wmaterials: [],
hideDo: true, hideDo: true,
materialsVisible: false,
queryMtaskState: false, queryMtaskState: false,
apiObjWm: this.$API.wpm.wmaterial.list, apiObjWm: this.$API.wpm.wmaterial.list,
paramsMlog: { paramsMlog: {
@ -336,9 +384,18 @@ export default {
paramsHandover: { paramsHandover: {
recive_dept__name: "6车间", recive_dept__name: "6车间",
}, },
queryHandover: {
search: "",
material: "",
},
paramsWm: { paramsWm: {
belong_dept__name: "6车间", belong_dept__name: "6车间",
count__gte: 1, count__gte: 1,
page: 0,
},
queryWm: {
search: "",
material: "",
}, },
paramsMtask: { paramsMtask: {
mgroup__belong_dept__name: "6车间", mgroup__belong_dept__name: "6车间",
@ -349,6 +406,9 @@ export default {
state__in: "", state__in: "",
}, },
mtaskId: "", mtaskId: "",
dataWm: [],
dataWmOrigin: [],
materialType: "wm",
visibleDrawer: false, visibleDrawer: false,
}; };
}, },
@ -361,6 +421,27 @@ export default {
tomio() { tomio() {
this.$router.push({ name: "halfgood_mio" }); this.$router.push({ name: "halfgood_mio" });
}, },
materialsChoses(str) {
this.materialType = str;
this.materialsVisible = true;
},
choseChange(data) {
if (this.materialType == "wm") {
this.queryWm.material = data;
this.$refs.table_wm.queryData(this.queryWm);
} else {
this.queryHandover.material = data;
this.$refs.table_handover.queryData(this.queryHandover);
}
this.materialsVisible = false;
},
queryHandoverChange() {
this.$refs.table_handover.queryData(this.queryHandover);
},
paramsWmChange() {
this.$refs.table_wm.queryData(this.queryWm);
},
// //
rowClick(row) { rowClick(row) {
let that = this; let that = this;
@ -392,6 +473,7 @@ export default {
this.$refs.table.queryData(this.queryMtask); this.$refs.table.queryData(this.queryMtask);
}, },
table_submit(row) { table_submit(row) {
let that = this;
let lengths = row.mlogs.length, let lengths = row.mlogs.length,
infoText = ""; infoText = "";
if (lengths > 0) { if (lengths > 0) {
@ -399,26 +481,27 @@ export default {
} else { } else {
infoText = "该任务没有日志,确定提交吗?"; infoText = "该任务没有日志,确定提交吗?";
} }
this.$confirm(infoText, "提示", { that.$confirm(infoText, "提示", {
type: "warning", type: "warning",
}).then(() => { }).then(() => {
this.$API.pm.mtask.submit that.$API.pm.mtask.submit
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("操作成功"); that.$message.success("操作成功");
this.$refs.table_mtask.refresh(); that.$refs.table_mtask.refresh();
this.mtaskClick(this.currentMtask); that.mtaskClick(that.currentMtask);
}) })
.catch((err) => {}); .catch((err) => {});
}); });
}, },
handover_submit(row) { handover_submit(row) {
this.$API.wpm.handover.submit let that = this;
that.$API.wpm.handover.submit
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
this.$message.success("操作成功"); that.$message.success("操作成功");
this.$refs.table_handover.refresh(); that.$refs.table_handover.refresh();
this.$refs.table_wm.refresh(); that.$refs.table_wm.refresh();
}) })
.catch((err) => {}); .catch((err) => {});
}, },

View File

@ -396,6 +396,24 @@
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">交接记录</span> <span style="font-size: 14px">交接记录</span>
</div> </div>
<div class="right-panel">
<el-input
v-model="queryHandover.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="queryHandoverChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('handover')"
>选择物料</el-button
>
</div>
</el-header> </el-header>
<el-main> <el-main>
<scTable <scTable
@ -477,6 +495,22 @@
<span style="font-size: 14px">车间库存</span> <span style="font-size: 14px">车间库存</span>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-input
v-model="queryWm.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="paramsWmChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('wm')"
>选择物料</el-button
>
<el-button <el-button
type="primary" type="primary"
@click="tomio" @click="tomio"
@ -557,15 +591,25 @@
@closed="visibleDrawer = false" @closed="visibleDrawer = false"
> >
</showDrawer> </showDrawer>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
:materialType="materialType"
ref="materialsChose"
@choseChange="choseChange"
></materials>
</el-dialog>
</el-container> </el-container>
</template> </template>
<script> <script>
import saveDialog from "./worktask_form.vue"; import saveDialog from "./worktask_form.vue";
import showDrawer from "./mlog_drawer.vue"; import showDrawer from "./mlog_drawer.vue";
import materials from "./../mtm/materials.vue";
export default { export default {
components: { components: {
saveDialog, saveDialog,
showDrawer, showDrawer,
materials,
}, },
data() { data() {
return { return {
@ -588,19 +632,50 @@ export default {
queryMtaskState: false, queryMtaskState: false,
apiObjHandover: null, apiObjHandover: null,
paramsHandover: {}, paramsHandover: {},
queryHandover: {
search: "",
material: "",
},
apiObjWm: null, apiObjWm: null,
paramsWm: {}, paramsWm: {},
queryWm: {
search: "",
material: "",
},
materialType: "wm",
mlogs: [], mlogs: [],
mlogId: "", mlogId: "",
mgroup: "", mgroup: "",
material_out: "", material_out: "",
material_model: "", material_model: "",
materialsVisible: false,
}; };
}, },
mounted() { mounted() {
this.initDept(); this.initDept();
}, },
methods: { methods: {
materialsChoses(str) {
this.materialType = str;
this.materialsVisible = true;
},
choseChange(data) {
if (this.materialType == "wm") {
this.queryWm.material = data;
this.$refs.table_wm.queryData(this.queryWm);
} else {
this.queryHandover.material = data;
this.$refs.table_handover.queryData(this.queryHandover);
}
this.materialsVisible = false;
},
queryHandoverChange() {
this.$refs.table_handover.queryData(this.queryHandover);
},
paramsWmChange() {
this.$refs.table_wm.queryData(this.queryWm);
},
mlog_revert(row) { mlog_revert(row) {
this.mlogHandleLoading = true; this.mlogHandleLoading = true;
this.$API.wpm.mlog.revert this.$API.wpm.mlog.revert

View File

@ -4,55 +4,104 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'mlog.create'">新增</el-button> <el-button
type="primary"
icon="el-icon-plus"
@click="add"
v-auth="'mlog.create'"
>新增</el-button
>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="params"> <scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="params"
>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="配料日期" prop="handle_date"> <el-table-column label="配料日期" prop="handle_date">
</el-table-column> </el-table-column>
<el-table-column label="产物" prop="material" show-overflow-tooltip> <el-table-column
<template #default="scope"><span v-if="scope.row.material_out_">{{ label="产物"
prop="material"
show-overflow-tooltip
>
<template #default="scope"
><span v-if="scope.row.material_out_">{{
scope.row.material_out_.full_name scope.row.material_out_.full_name
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="批次" prop="batch"> </el-table-column> <el-table-column label="批次" prop="batch">
</el-table-column>
<el-table-column label="数量/桶数" prop="count_real"> <el-table-column label="数量/桶数" prop="count_real">
</el-table-column> </el-table-column>
<el-table-column label="每桶重量/kg" prop="count_real_eweight"> <el-table-column
label="每桶重量/kg"
prop="count_real_eweight"
>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.count_real_eweight"> {{ scope.row.count_real_eweight.toFixed(2) <span v-if="scope.row.count_real_eweight">
}}</span> {{
scope.row.count_real_eweight.toFixed(2)
}}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="配料人" prop="handle_user_name"> <el-table-column label="配料人" prop="handle_user_name">
<template #default="scope"> <template #default="scope">
<span v-for="item in scope.row.handle_users_" v-bind:key="item.id"> <span
v-for="item in scope.row.handle_users_"
v-bind:key="item.id"
>
{{ item.name }}/ {{ item.name }}/
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180"> <el-table-column
label="操作"
fixed="right"
align="center"
width="180"
>
<template #default="scope"> <template #default="scope">
<el-button link type="primary" v-if="scope.row.submit_time == null" <el-button
@click="table_edit(scope.row)" v-auth="'mlog.update'"> link
type="primary"
v-if="scope.row.submit_time == null"
@click="table_edit(scope.row)"
v-auth="'mlog.update'"
>
编辑 编辑
</el-button> </el-button>
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'" <el-button
v-if="scope.row.submit_time == null"> link
type="danger"
@click="table_del(scope.row)"
v-auth="'mlog.delete'"
v-if="scope.row.submit_time == null"
>
删除 删除
</el-button> </el-button>
<el-button link type="success" v-if="scope.row.submit_user == null" <el-button
@click="table_submit(scope.row)" v-auth="'mlog.submit'"> link
type="success"
v-if="scope.row.submit_user == null"
@click="table_submit(scope.row)"
v-auth="'mlog.submit'"
>
提交 提交
</el-button> </el-button>
<el-button link type="warning" v-if="scope.row.submit_time != null" <el-button
@click="table_revert(scope.row)" v-auth="'mlog.submit'"> link
type="warning"
v-if="scope.row.submit_time != null"
@click="table_revert(scope.row)"
v-auth="'mlog.submit'"
>
撤回 撤回
</el-button> </el-button>
</template> </template>
@ -60,7 +109,6 @@
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<el-container> <el-container>
@ -69,52 +117,117 @@
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">交接记录</span> <span style="font-size: 14px">交接记录</span>
</div> <el-button
<div class="right-panel"> type="primary"
<el-button type="primary" @click="addHandover" v-auth="'handover.create'"> @click="addHandover"
v-auth="'handover.create'"
>
新增 新增
</el-button> </el-button>
</div> </div>
<div class="right-panel">
<el-input
v-model="queryHandover.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="queryHandoverChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('handover')"
>选择物料</el-button
>
</div>
</el-header> </el-header>
<el-main> <el-main>
<scTable ref="table2" :apiObj="apiObjHandover" row-key="id" stripe :params="paramsHandover"> <scTable
ref="table2"
:apiObj="apiObjHandover"
row-key="id"
stripe
:params="paramsHandover"
>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="送料日期" prop="send_date" width="120"> <el-table-column
label="送料日期"
prop="send_date"
width="120"
>
</el-table-column> </el-table-column>
<el-table-column label="产物" prop="material_name" show-overflow-tooltip width="120"> <el-table-column
label="产物"
prop="material_name"
show-overflow-tooltip
width="120"
>
</el-table-column>
<el-table-column label="批次" prop="batch">
</el-table-column> </el-table-column>
<el-table-column label="批次" prop="batch"> </el-table-column>
<el-table-column label="数量/桶数" prop="count"> <el-table-column label="数量/桶数" prop="count">
</el-table-column> </el-table-column>
<el-table-column label="每桶/kg" prop="count_eweight"> <el-table-column
label="每桶/kg"
prop="count_eweight"
>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.count_eweight"> {{ scope.row.count_eweight.toFixed(2) <span v-if="scope.row.count_eweight">
}}</span> {{
scope.row.count_eweight.toFixed(
2
)
}}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="交送人" prop="send_user_name"> <el-table-column
label="交送人"
prop="send_user_name"
>
</el-table-column> </el-table-column>
<el-table-column label="接收车间" prop="recive_dept_name"> <el-table-column
label="接收车间"
prop="recive_dept_name"
>
</el-table-column> </el-table-column>
<el-table-column label="接收人" prop="recive_user_name"> <el-table-column
label="接收人"
prop="recive_user_name"
>
</el-table-column> </el-table-column>
<el-table-column label="是否确认" prop="submit_time"> <el-table-column
label="是否确认"
prop="submit_time"
>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.submit_time"></span> <span v-if="scope.row.submit_time"
></span
>
<span v-else></span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="100"> <el-table-column
label="操作"
fixed="right"
align="left"
width="100"
>
<template #default="scope"> <template #default="scope">
<!-- <el-button link type="primary" @click="handover_edit(scope.row)" <!-- <el-button link type="primary" @click="handover_edit(scope.row)"
v-auth="'handover.update'" v-if="scope.row.submit_time == null"> v-auth="'handover.update'" v-if="scope.row.submit_time == null">
编辑 编辑
</el-button> --> </el-button> -->
<el-button link type="danger" @click="handover_delete(scope.row)" <el-button
v-auth="'handover.delete'" v-if="scope.row.submit_time == null"> link
type="danger"
@click="handover_delete(scope.row)"
v-auth="'handover.delete'"
v-if="scope.row.submit_time == null"
>
删除 删除
</el-button> </el-button>
</template> </template>
@ -129,20 +242,47 @@
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">车间库存</span> <span style="font-size: 14px">车间库存</span>
</div> </div>
<div class="right-panel">
<el-input
v-model="queryWm.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="paramsWmChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('wm')"
>选择物料</el-button
>
</div>
</el-header> </el-header>
<el-main> <el-main>
<scTable ref="table_wm" :apiObj="apiObjWm" row-key="id" :params="paramsWm" stripe <scTable
hidePagination> ref="table_wm"
:apiObj="apiObjWm"
row-key="id"
:params="paramsWm"
stripe
hidePagination
>
<el-table-column label="物料" prop="material"> <el-table-column label="物料" prop="material">
<template #default="scope">{{ <template #default="scope">{{
scope.row.material_name scope.row.material_name
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column label="批次" prop="batch"> </el-table-column> <el-table-column label="批次" prop="batch">
</el-table-column>
<el-table-column label="数量/桶数" prop="count"> <el-table-column label="数量/桶数" prop="count">
</el-table-column> </el-table-column>
<el-table-column label="每桶/kg" prop="count_eweight"></el-table-column> <el-table-column
label="每桶/kg"
prop="count_eweight"
></el-table-column>
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
@ -150,66 +290,141 @@
</el-container> </el-container>
</el-main> </el-main>
</el-container> </el-container>
<el-dialog title="交接单" ref="handoverDialog" v-model="handoverVisible" :size="1000" destroy-on-close <el-dialog
@closed="handoverVisible = false"> title="交接单"
<el-form ref="dialogForm" :model="handoverForm" :rules="rules" label-width="120px"> ref="handoverDialog"
v-model="handoverVisible"
:size="1000"
destroy-on-close
@closed="handoverVisible = false"
>
<el-form
ref="dialogForm"
:model="handoverForm"
:rules="rules"
label-width="120px"
>
<el-row> <el-row>
<el-col :md="24" :sm="24"> <el-col :md="24" :sm="24">
<el-form-item label="交送物料" prop="wm"> <el-form-item label="交送物料" prop="wm">
<el-select v-model="selectWm" placeholder="交送物料" clearable style="width: 100%" <el-select
:disabled="handoverType == 'edit'" value-key="id" @change="selectWmChange"> v-model="selectWm"
<el-option v-for="item in wmaterialList" :key="item.id" placeholder="交送物料"
:label="item.material_name + '---' + item.batch" :value="item"> clearable
<span style="float: left">{{ item.material_name }}---{{ item.batch }}</span> style="width: 100%"
<span style=" :disabled="handoverType == 'edit'"
value-key="id"
@change="selectWmChange"
>
<el-option
v-for="item in wmaterialList"
:key="item.id"
:label="item.material_name + '---' + item.batch"
:value="item"
>
<span style="float: left"
>{{ item.material_name }}---{{
item.batch
}}</span
>
<span
style="
float: right; float: right;
color: var(--el-text-color-secondary); color: var(--el-text-color-secondary);
font-size: 13px; font-size: 13px;
">{{ item.count }}</span> "
>{{ item.count }}</span
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="送料日期" prop="send_date"> <el-form-item label="送料日期" prop="send_date">
<el-date-picker v-model="handoverForm.send_date" type="date" value-format="YYYY-MM-DD" <el-date-picker
style="width: 100%" /> v-model="handoverForm.send_date"
type="date"
value-format="YYYY-MM-DD"
style="width: 100%"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="接收部门" prop="recive_dept"> <el-form-item label="接收部门" prop="recive_dept">
<el-select v-model="handoverForm.recive_dept" placeholder="接收部门" clearable style="width: 100%" <el-select
@change="getUserList2"> v-model="handoverForm.recive_dept"
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" placeholder="接收部门"
:value="item.id"></el-option> clearable
style="width: 100%"
@change="getUserList2"
>
<el-option
v-for="item in deptOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="接收人" prop="recive_user"> <el-form-item label="接收人" prop="recive_user">
<el-select v-model="handoverForm.recive_user" placeholder="接收人" clearable style="width: 100%"> <el-select
<el-option v-for="item in userList2" :key="item.id" :label="item.name" :value="item.id" /> v-model="handoverForm.recive_user"
placeholder="接收人"
clearable
style="width: 100%"
>
<el-option
v-for="item in userList2"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="交送人" prop="send_user"> <el-form-item label="交送人" prop="send_user">
<el-select v-model="handoverForm.send_user" placeholder="交送人" clearable style="width: 100%"> <el-select
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id" /> v-model="handoverForm.send_user"
placeholder="交送人"
clearable
style="width: 100%"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="桶数" prop="count"> <el-form-item label="桶数" prop="count">
<el-input-number v-model="handoverForm.count" controls-position="right" :min="0" step="1" <el-input-number
:step-strictly="true" style="width:100%" placeholder="桶数"> v-model="handoverForm.count"
controls-position="right"
:min="0"
step="1"
:step-strictly="true"
style="width: 100%"
placeholder="桶数"
>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="每桶(kg)" prop="count_eweight"> <el-form-item label="每桶(kg)" prop="count_eweight">
<el-input-number v-model="handoverForm.count_eweight" controls-position="right" :min="0" <el-input-number
:precision="2" style="width:100%" placeholder="每桶kg"> v-model="handoverForm.count_eweight"
controls-position="right"
:min="0"
:precision="2"
style="width: 100%"
placeholder="每桶kg"
>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -220,28 +435,53 @@
<el-button type="primary" @click="submitHandover">提交</el-button> <el-button type="primary" @click="submitHandover">提交</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<save-dialog v-if="dialogSave" ref="saveDialog" :mgroup="currentMgroup.id" <save-dialog
:mgroupShiftRule="currentMgroup.shift_rule" :activeType="activeName" @success="handleSaveSuccess" v-if="dialogSave"
@closed="dialogSave = false"> ref="saveDialog"
:mgroup="currentMgroup.id"
:mgroupShiftRule="currentMgroup.shift_rule"
:activeType="activeName"
@success="handleSaveSuccess"
@closed="dialogSave = false"
>
</save-dialog> </save-dialog>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
:materialType="materialType"
ref="materialsChose"
@choseChange="choseChange"
></materials>
</el-dialog>
</template> </template>
<script> <script>
import saveDialog from "./worktask_form.vue"; import saveDialog from "./worktask_form.vue";
import materials from "./../mtm/materials.vue";
export default { export default {
components: { components: {
saveDialog, saveDialog,
materials,
}, },
data() { data() {
return { return {
activeName: '8车间', activeName: "8车间",
currentMgroup: {}, currentMgroup: {},
apiObj: null, apiObj: null,
params: {}, params: {},
apiObjHandover: null, apiObjHandover: null,
paramsHandover: {}, paramsHandover: {},
queryHandover: {
search: "",
material: "",
},
apiObjWm: null, apiObjWm: null,
paramsWm: {}, paramsWm: {},
queryWm: {
search: "",
material: "",
},
materialType: "wm",
handoverForm: {}, handoverForm: {},
handoverVisible: false, handoverVisible: false,
dialogSave: false, dialogSave: false,
@ -249,27 +489,52 @@ export default {
userList: [], userList: [],
userList2: [], userList2: [],
wmaterialList: [], wmaterialList: [],
selectWm: null selectWm: null,
} materialsVisible: false,
};
}, },
mounted() { mounted() {
this.initMgroup() this.initMgroup();
this.getDepts() this.getDepts();
}, },
methods: { methods: {
materialsChoses(str) {
this.materialType = str;
this.materialsVisible = true;
},
choseChange(data) {
if (this.materialType == "wm") {
this.queryWm.material = data;
this.$refs.table_wm.queryData(this.queryWm);
} else {
this.queryHandover.material = data;
this.$refs.table2.queryData(this.queryHandover);
}
this.materialsVisible = false;
},
queryHandoverChange() {
this.$refs.table2.queryData(this.queryHandover);
},
paramsWmChange() {
this.$refs.table_wm.queryData(this.queryWm);
},
table_revert(row) { table_revert(row) {
this.$API.wpm.mlog.revert.req(row.id).then(res => { this.$API.wpm.mlog.revert
.req(row.id)
.then((res) => {
this.$message.success("撤回成功"); this.$message.success("撤回成功");
this.$refs.table.refresh(); this.$refs.table.refresh();
this.$refs.table_wm.refresh(); this.$refs.table_wm.refresh();
}).catch(e => { }) })
.catch((e) => {});
}, },
table_submit(row) { table_submit(row) {
this.$API.wpm.mlog.submit.req(row.id).then(res => { this.$API.wpm.mlog.submit.req(row.id).then((res) => {
this.$message.success("提交成功"); this.$message.success("提交成功");
this.$refs.table.refresh(); this.$refs.table.refresh();
this.$refs.table_wm.refresh(); this.$refs.table_wm.refresh();
}) });
}, },
add() { add() {
this.dialogSave = true; this.dialogSave = true;
@ -287,79 +552,96 @@ export default {
async table_del(row) { async table_del(row) {
this.$confirm(`确定删除吗?`, "提示", { this.$confirm(`确定删除吗?`, "提示", {
type: "warning", type: "warning",
}).then(() => { })
this.$API.wpm.mlog.delete.req(row.id).then((res) => { .then(() => {
this.$API.wpm.mlog.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.$refs.table.refresh(); this.$refs.table.refresh();
return res; return res;
}).catch((err) => { })
.catch((err) => {
return err; return err;
}); });
}).catch(() => { }); })
.catch(() => {});
}, },
handleSaveSuccess() { handleSaveSuccess() {
this.$refs.table.refresh(); this.$refs.table.refresh();
}, },
getDepts() { getDepts() {
this.$API.system.dept.list.req({ page: 0, name__in: '7车间,8车间,10车间' }).then(res => { this.$API.system.dept.list
.req({ page: 0, name__in: "7车间,8车间,10车间" })
.then((res) => {
this.deptOptions = res; this.deptOptions = res;
}) });
}, },
getUserList2(val) { getUserList2(val) {
this.$API.system.user.list.req({ belong_dept: val, page: 0 }).then(res => { this.$API.system.user.list
this.userList2 = res .req({ belong_dept: val, page: 0 })
}) .then((res) => {
this.userList2 = res;
});
}, },
initMgroup() { initMgroup() {
this.$API.mtm.mgroup.list.req({ page: 0, name: '混料' }).then(res => { this.$API.mtm.mgroup.list
.req({ page: 0, name: "混料" })
.then((res) => {
if (res.length == 1) { if (res.length == 1) {
this.currentMgroup = res[0] this.currentMgroup = res[0];
this.params.mgroup = this.currentMgroup.id this.params.mgroup = this.currentMgroup.id;
this.apiObj = this.$API.wpm.mlog.list this.apiObj = this.$API.wpm.mlog.list;
this.paramsHandover.send_mgroup = this.currentMgroup.id this.paramsHandover.send_mgroup = this.currentMgroup.id;
this.apiObjHandover = this.$API.wpm.handover.list this.apiObjHandover = this.$API.wpm.handover.list;
this.paramsWm.belong_dept = this.currentMgroup.belong_dept this.paramsWm.belong_dept =
this.paramsWm.material__name__contains = '混料' this.currentMgroup.belong_dept;
this.paramsWm.count__gte = 1 this.paramsWm.material__name__contains = "混料";
this.apiObjWm = this.$API.wpm.wmaterial.list this.paramsWm.count__gte = 1;
this.apiObjWm = this.$API.wpm.wmaterial.list;
this.$API.system.user.list.req({ page: 0, belong_dept: this.currentMgroup.belong_dept }).then(res => { this.$API.system.user.list
this.userList = res .req({
page: 0,
belong_dept: this.currentMgroup.belong_dept,
}) })
.then((res) => {
this.userList = res;
});
} else { } else {
this.$message.error("未找到工段"); this.$message.error("未找到工段");
} }
}) });
}, },
// //
addHandover() { addHandover() {
this.getWmaterial(); this.getWmaterial();
this.handoverForm.wm = ''; this.handoverForm.wm = "";
this.handoverForm.send_date = ""; this.handoverForm.send_date = "";
this.handoverForm.send_user = ""; this.handoverForm.send_user = "";
this.handoverForm.recive_user = '';// this.handoverForm.recive_user = ""; //
this.handoverForm.recive_dept = '';// this.handoverForm.recive_dept = ""; //
this.handoverForm.send_dept = this.currentMgroup.belong_dept; this.handoverForm.send_dept = this.currentMgroup.belong_dept;
this.handoverForm.send_mgroup = this.currentMgroup.id; this.handoverForm.send_mgroup = this.currentMgroup.id;
this.handoverType = 'add'; this.handoverType = "add";
this.handoverVisible = true; this.handoverVisible = true;
}, },
getWmaterial() { getWmaterial() {
let obj = {}; let obj = {};
obj.belong_dept = this.currentMgroup.belong_dept; obj.belong_dept = this.currentMgroup.belong_dept;
obj.material__name__contains = '混料'; obj.material__name__contains = "混料";
obj.page = 0; obj.page = 0;
obj.count__gte = 1; obj.count__gte = 1;
this.$API.wpm.wmaterial.list.req(obj).then(res => { this.$API.wpm.wmaterial.list.req(obj).then((res) => {
this.wmaterialList = res; this.wmaterialList = res;
}) });
}, },
selectWmChange(item) { selectWmChange(item) {
this.handoverForm.count = item.count this.handoverForm.count = item.count;
this.handoverForm.count_eweight = item.count_eweight this.handoverForm.count_eweight = item.count_eweight;
this.handoverForm.wm = item.id this.handoverForm.wm = item.id;
this.handoverForm.send_dept = this.currentMgroup.belong_dept; this.handoverForm.send_dept = this.currentMgroup.belong_dept;
this.handoverForm.send_mgroup = this.currentMgroup.id; this.handoverForm.send_mgroup = this.currentMgroup.id;
this.handoverForm.material = item.material; this.handoverForm.material = item.material;
@ -374,13 +656,14 @@ export default {
}, },
handover_edit(row) { handover_edit(row) {
Object.assign(this.handoverForm, row); Object.assign(this.handoverForm, row);
this.getUserList2(row.recive_dept) this.getUserList2(row.recive_dept);
this.handoverVisible = true; this.handoverVisible = true;
}, },
handover_delete(row) { handover_delete(row) {
this.$confirm(`确定删除吗?`, "提示", { this.$confirm(`确定删除吗?`, "提示", {
type: "warning", type: "warning",
}).then(() => { })
.then(() => {
this.$API.wpm.handover.delete this.$API.wpm.handover.delete
.req(row.id) .req(row.id)
.then((res) => { .then((res) => {
@ -394,6 +677,6 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
} },
} };
</script> </script>

View File

@ -4,13 +4,28 @@
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<el-button type="primary" icon="el-icon-plus" @click="add" v-auth="'mlog.create'">新增</el-button> <el-button
type="primary"
icon="el-icon-plus"
@click="add"
v-auth="'mlog.create'"
>新增</el-button
>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="params"> <scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="params"
>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名" prop="material_out_name"> <el-table-column
label="物料名"
prop="material_out_name"
>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.material_out_"> <span v-if="scope.row.material_out_">
{{ scope.row.material_out_.full_name }} {{ scope.row.material_out_.full_name }}
@ -29,23 +44,47 @@
</el-table-column> </el-table-column>
<el-table-column label="不合格数" prop="count_notok"> <el-table-column label="不合格数" prop="count_notok">
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180"> <el-table-column
label="操作"
fixed="right"
align="center"
width="180"
>
<template #default="scope"> <template #default="scope">
<el-button link type="primary" v-if="scope.row.submit_time == null" <el-button
@click="table_edit(scope.row)" v-auth="'mlog.update'"> link
type="primary"
v-if="scope.row.submit_time == null"
@click="table_edit(scope.row)"
v-auth="'mlog.update'"
>
编辑 编辑
</el-button> </el-button>
<el-button link type="danger" @click="table_del(scope.row)" v-auth="'mlog.delete'" <el-button
v-if="scope.row.submit_time == null"> link
type="danger"
@click="table_del(scope.row)"
v-auth="'mlog.delete'"
v-if="scope.row.submit_time == null"
>
删除 删除
</el-button> </el-button>
<el-button link type="success" v-if="scope.row.submit_user == null" <el-button
@click="table_submit(scope.row)" v-auth="'mlog.submit'"> link
type="success"
v-if="scope.row.submit_user == null"
@click="table_submit(scope.row)"
v-auth="'mlog.submit'"
>
提交 提交
</el-button> </el-button>
<el-button link type="warning" v-if="scope.row.submit_time != null" <el-button
@click="table_revert(scope.row)" v-auth="'mlog.submit'"> link
type="warning"
v-if="scope.row.submit_time != null"
@click="table_revert(scope.row)"
v-auth="'mlog.submit'"
>
撤回 撤回
</el-button> </el-button>
</template> </template>
@ -53,7 +92,6 @@
</scTable> </scTable>
</el-main> </el-main>
</el-container> </el-container>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<el-container> <el-container>
@ -62,43 +100,102 @@
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel">
<span style="font-size: 14px">交接记录</span> <span style="font-size: 14px">交接记录</span>
<el-button
type="primary"
@click="addHandover"
v-auth="'handover.create'"
>新增</el-button
>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-button type="primary" @click="addHandover" v-auth="'handover.create'">新增</el-button> <el-input
v-model="queryHandover.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="queryHandoverChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('handover')"
>选择物料</el-button
>
</div> </div>
</el-header> </el-header>
<el-main> <el-main>
<scTable ref="table2" :apiObj="apiObjHandover" row-key="id" stripe :params="paramsHandover"> <scTable
ref="table2"
:apiObj="apiObjHandover"
row-key="id"
stripe
:params="paramsHandover"
>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="送料日期" prop="send_date" width="120"> <el-table-column
label="送料日期"
prop="send_date"
width="120"
>
</el-table-column> </el-table-column>
<el-table-column label="产物" prop="material_name" show-overflow-tooltip width="120"> <el-table-column
label="产物"
prop="material_name"
show-overflow-tooltip
width="120"
>
</el-table-column>
<el-table-column label="批次" prop="batch">
</el-table-column> </el-table-column>
<el-table-column label="批次" prop="batch"> </el-table-column>
<el-table-column label="数量" prop="count"> <el-table-column label="数量" prop="count">
</el-table-column> </el-table-column>
<el-table-column label="交送人" prop="send_user_name"> <el-table-column
label="交送人"
prop="send_user_name"
>
</el-table-column> </el-table-column>
<el-table-column label="接收部门" prop="recive_dept_name"> <el-table-column
label="接收部门"
prop="recive_dept_name"
>
</el-table-column> </el-table-column>
<el-table-column label="接收人" prop="recive_user_name"> <el-table-column
label="接收人"
prop="recive_user_name"
>
</el-table-column> </el-table-column>
<el-table-column label="是否确认" prop="submit_time"> <el-table-column
label="是否确认"
prop="submit_time"
>
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.submit_time"></span> <span v-if="scope.row.submit_time"
></span
>
<span v-else></span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="100"> <el-table-column
label="操作"
fixed="right"
align="left"
width="100"
>
<template #default="scope"> <template #default="scope">
<!-- <el-button link type="primary" @click="handover_edit(scope.row)" <!-- <el-button link type="primary" @click="handover_edit(scope.row)"
v-auth="'handover.update'" v-if="scope.row.submit_time == null"> v-auth="'handover.update'" v-if="scope.row.submit_time == null">
编辑 编辑
</el-button> --> </el-button> -->
<el-button link type="danger" @click="handover_delete(scope.row)" <el-button
v-auth="'handover.delete'" v-if="scope.row.submit_time == null"> link
type="danger"
@click="handover_delete(scope.row)"
v-auth="'handover.delete'"
v-if="scope.row.submit_time == null"
>
删除 删除
</el-button> </el-button>
</template> </template>
@ -114,17 +211,57 @@
<span style="font-size: 14px">车间库存</span> <span style="font-size: 14px">车间库存</span>
</div> </div>
<div class="right-panel"> <div class="right-panel">
<el-button type="primary" @click="tomio" v-auth="'mio.do'">领料</el-button> <el-input
<el-button type="primary" @click="tomio" v-auth="'mio.do'">入库</el-button> v-model="queryWm.search"
placeholder="批次号"
clearable
style="margin-right: 5px"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="paramsWmChange"
></el-button>
<el-button
type="primary"
@click="materialsChoses('wm')"
>选择物料</el-button
>
<el-button
type="primary"
@click="tomio"
v-auth="'mio.do'"
>领料</el-button
>
<el-button
type="primary"
@click="tomio"
v-auth="'mio.do'"
>入库</el-button
>
</div> </div>
</el-header> </el-header>
<el-main> <el-main>
<scTable ref="table_wm" :apiObj="apiObjWm" row-key="id" :params="paramsWm" stripe <scTable
hidePagination> ref="table_wm"
<el-table-column label="物料" prop="material_name"> :apiObj="apiObjWm"
row-key="id"
:params="paramsWm"
stripe
hidePagination
>
<el-table-column
label="物料"
prop="material_name"
>
</el-table-column> </el-table-column>
<el-table-column label="批次" prop="batch"> </el-table-column> <el-table-column label="批次" prop="batch">
<el-table-column label="数量" prop="count" width="80"> </el-table-column>
<el-table-column
label="数量"
prop="count"
width="80"
>
</el-table-column> </el-table-column>
</scTable> </scTable>
</el-main> </el-main>
@ -133,61 +270,132 @@
</el-container> </el-container>
</el-main> </el-main>
</el-container> </el-container>
<el-dialog :title="titleOptions[handoverType]" ref="handoverDialog" v-model="handoverVisible" :size="1000" <el-dialog
destroy-on-close @closed="handoverVisible = false"> :title="titleOptions[handoverType]"
<el-form ref="dialogForm" :model="handoverForm" :rules="rules" label-width="120px"> ref="handoverDialog"
v-model="handoverVisible"
:size="1000"
destroy-on-close
@closed="handoverVisible = false"
>
<el-form
ref="dialogForm"
:model="handoverForm"
:rules="rules"
label-width="120px"
>
<el-row> <el-row>
<el-col :md="24" :sm="24"> <el-col :md="24" :sm="24">
<el-form-item label="交送物料" prop="wm"> <el-form-item label="交送物料" prop="wm">
<el-select v-model="selectWm" placeholder="交送物料" clearable style="width: 100%" <el-select
:disabled="handoverType == 'edit'" value-key="id" @change="selectWmChange"> v-model="selectWm"
<el-option v-for="item in wmaterialList" :key="item.id" placeholder="交送物料"
:label="item.material_name + '---' + item.batch" :value="item"> clearable
<span style="float: left">{{ item.material_name }}---{{ item.batch }}</span> style="width: 100%"
<span style=" :disabled="handoverType == 'edit'"
value-key="id"
@change="selectWmChange"
>
<el-option
v-for="item in wmaterialList"
:key="item.id"
:label="item.material_name + '---' + item.batch"
:value="item"
>
<span style="float: left"
>{{ item.material_name }}---{{
item.batch
}}</span
>
<span
style="
float: right; float: right;
color: var(--el-text-color-secondary); color: var(--el-text-color-secondary);
font-size: 13px; font-size: 13px;
">{{ item.count }}</span> "
>{{ item.count }}</span
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="送料日期" prop="send_date"> <el-form-item label="送料日期" prop="send_date">
<el-date-picker v-model="handoverForm.send_date" type="date" value-format="YYYY-MM-DD" <el-date-picker
style="width: 100%" :disabled="handoverType == 'edit'" /> v-model="handoverForm.send_date"
type="date"
value-format="YYYY-MM-DD"
style="width: 100%"
:disabled="handoverType == 'edit'"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="交送数量" prop="count"> <el-form-item label="交送数量" prop="count">
<el-input-number v-model="handoverForm.count" controls-position="right" :min="0" step="1" <el-input-number
:step-strictly="true" style="width:100%" placeholder="数量"> v-model="handoverForm.count"
controls-position="right"
:min="0"
step="1"
:step-strictly="true"
style="width: 100%"
placeholder="数量"
>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="交送人" prop="send_user"> <el-form-item label="交送人" prop="send_user">
<el-select v-model="handoverForm.send_user" placeholder="交送人" clearable style="width: 100%" <el-select
:disabled="handoverType == 'edit'"> v-model="handoverForm.send_user"
<el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id" /> placeholder="交送人"
clearable
style="width: 100%"
:disabled="handoverType == 'edit'"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="接收部门" prop="recive_dept"> <el-form-item label="接收部门" prop="recive_dept">
<el-select v-model="handoverForm.recive_dept" placeholder="接收部门" clearable style="width: 100%" <el-select
@change="getUserList2" :disabled="handoverType == 'edit'"> v-model="handoverForm.recive_dept"
<el-option v-for="item in deptOptions" :key="item.id" :label="item.name" placeholder="接收部门"
:value="item.id"></el-option> clearable
style="width: 100%"
@change="getUserList2"
:disabled="handoverType == 'edit'"
>
<el-option
v-for="item in deptOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :md="12" :sm="24"> <el-col :md="12" :sm="24">
<el-form-item label="接收人" prop="recive_user"> <el-form-item label="接收人" prop="recive_user">
<el-select v-model="handoverForm.recive_user" placeholder="接收人" clearable style="width: 100%" <el-select
:disabled="handoverType == 'edit'"> v-model="handoverForm.recive_user"
<el-option v-for="item in userList2" :key="item.id" :label="item.name" :value="item.id" /> placeholder="接收人"
clearable
style="width: 100%"
:disabled="handoverType == 'edit'"
>
<el-option
v-for="item in userList2"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -198,33 +406,58 @@
<el-button type="primary" @click="submitHandover">提交</el-button> <el-button type="primary" @click="submitHandover">提交</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<save-dialog v-if="dialogSave" ref="saveDialog" :belongdept="currentMgroup.belong_dept" :mgroup="currentMgroup.id" <save-dialog
:mgroupShiftRule="currentMgroup.shift_rule" :activeType="activeName" @success="handleSaveSuccess" v-if="dialogSave"
@closed="dialogSave = false"> ref="saveDialog"
:belongdept="currentMgroup.belong_dept"
:mgroup="currentMgroup.id"
:mgroupShiftRule="currentMgroup.shift_rule"
:activeType="activeName"
@success="handleSaveSuccess"
@closed="dialogSave = false"
>
</save-dialog> </save-dialog>
<el-dialog title="选择物料" v-model="materialsVisible" width="90%">
<materials
style="height: 500px"
:materialType="materialType"
ref="materialsChose"
@choseChange="choseChange"
></materials>
</el-dialog>
</template> </template>
<script> <script>
import saveDialog from "./worktask_form.vue"; import saveDialog from "./worktask_form.vue";
import materials from "./../mtm/materials.vue";
export default { export default {
components: { components: {
saveDialog, saveDialog,
materials,
}, },
data() { data() {
return { return {
activeName: '退火', activeName: "退火",
handoverType: 'add', handoverType: "add",
titleOptions: { titleOptions: {
'add': '新增', add: "新增",
'edit': '编辑', edit: "编辑",
}, },
currentMgroup: {}, currentMgroup: {},
apiObj: null, apiObj: null,
params: {}, params: {},
apiObjHandover: null, apiObjHandover: null,
paramsHandover: {}, paramsHandover: {},
queryHandover: {
search: "",
material: "",
},
apiObjWm: null, apiObjWm: null,
paramsWm: {}, paramsWm: {},
queryWm: {
search: "",
material: "",
},
handoverForm: {}, handoverForm: {},
dialogSave: false, dialogSave: false,
handoverVisible: false, handoverVisible: false,
@ -233,13 +466,35 @@ export default {
userList2: [], userList2: [],
wmaterialList: [], wmaterialList: [],
selectWm: null, selectWm: null,
} materialsVisible: false,
};
}, },
mounted() { mounted() {
this.initMgroup() this.initMgroup();
this.getDepts(); this.getDepts();
}, },
methods: { methods: {
materialsChoses(str) {
this.materialType = str;
this.materialsVisible = true;
},
choseChange(data) {
if (this.materialType == "wm") {
this.queryWm.material = data;
this.$refs.table_wm.queryData(this.queryWm);
} else {
this.queryHandover.material = data;
this.$refs.table2.queryData(this.queryHandover);
}
this.materialsVisible = false;
},
queryHandoverChange() {
this.$refs.table2.queryData(this.queryHandover);
},
paramsWmChange() {
this.$refs.table_wm.queryData(this.queryWm);
},
add() { add() {
this.dialogSave = true; this.dialogSave = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -257,24 +512,30 @@ export default {
this.$router.push({ name: "halfgood_mio" }); this.$router.push({ name: "halfgood_mio" });
}, },
table_submit(row) { table_submit(row) {
this.$API.wpm.mlog.submit.req(row.id).then(res => { this.$API.wpm.mlog.submit.req(row.id).then((res) => {
this.$message.success("提交成功"); this.$message.success("提交成功");
this.$refs.table.refresh(); this.$refs.table.refresh();
this.$refs.table_wm.refresh(); this.$refs.table_wm.refresh();
}) });
}, },
table_revert(row) { table_revert(row) {
this.$API.wpm.mlog.revert.req(row.id).then(res => { this.$API.wpm.mlog.revert
.req(row.id)
.then((res) => {
this.$message.success("撤回成功"); this.$message.success("撤回成功");
this.$refs.table.refresh(); this.$refs.table.refresh();
this.$refs.table_wm.refresh(); this.$refs.table_wm.refresh();
}).catch(e => { }) })
.catch((e) => {});
}, },
async table_del(row) { async table_del(row) {
this.$confirm(`确定删除吗?`, "提示", { this.$confirm(`确定删除吗?`, "提示", {
type: "warning", type: "warning",
}).then(() => { })
this.$API.wpm.mlog.delete.req(row.id).then((res) => { .then(() => {
this.$API.wpm.mlog.delete
.req(row.id)
.then((res) => {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.$refs.table.refresh(); this.$refs.table.refresh();
return res; return res;
@ -289,55 +550,68 @@ export default {
this.$refs.table.refresh(); this.$refs.table.refresh();
}, },
getDepts() { getDepts() {
this.$API.system.dept.list.req({ page: 0, name__in: '6车间,7车间,10车间' }).then(res => { this.$API.system.dept.list
this.deptOptions = res .req({ page: 0, name__in: "6车间,7车间,10车间" })
}) .then((res) => {
this.deptOptions = res;
});
}, },
getUserList2() { getUserList2() {
this.$API.system.user.list.req({ belong_dept: this.handoverForm.recive_dept, page: 0 }).then(res => { this.$API.system.user.list
this.userList2 = res .req({ belong_dept: this.handoverForm.recive_dept, page: 0 })
}) .then((res) => {
this.userList2 = res;
});
}, },
initMgroup() { initMgroup() {
this.$API.mtm.mgroup.list.req({ page: 0, name: '管料退火' }).then(res => { this.$API.mtm.mgroup.list
.req({ page: 0, name: "管料退火" })
.then((res) => {
if (res.length == 1) { if (res.length == 1) {
this.currentMgroup = res[0] this.currentMgroup = res[0];
this.params.mgroup = this.currentMgroup.id this.params.mgroup = this.currentMgroup.id;
this.apiObj = this.$API.wpm.mlog.list this.apiObj = this.$API.wpm.mlog.list;
this.paramsHandover.send_mgroup = this.currentMgroup.id this.paramsHandover.send_mgroup = this.currentMgroup.id;
this.apiObjHandover = this.$API.wpm.handover.list this.apiObjHandover = this.$API.wpm.handover.list;
this.paramsWm.belong_dept = this.currentMgroup.belong_dept this.paramsWm.belong_dept =
this.paramsWm.material__process__name__contains = '管料' this.currentMgroup.belong_dept;
this.paramsWm.count__gte = 1 this.paramsWm.material__process__name__contains =
this.apiObjWm = this.$API.wpm.wmaterial.list "管料";
this.paramsWm.count__gte = 1;
this.apiObjWm = this.$API.wpm.wmaterial.list;
this.$API.system.user.list.req({ page: 0, belong_dept: this.currentMgroup.belong_dept }).then(res => { this.$API.system.user.list
this.userList = res .req({
page: 0,
belong_dept: this.currentMgroup.belong_dept,
}) })
.then((res) => {
this.userList = res;
});
} else { } else {
this.$message.error("未找到工段"); this.$message.error("未找到工段");
} }
}) });
}, },
// //
addHandover(row) { addHandover(row) {
this.getWmaterial(); this.getWmaterial();
this.handoverForm.wm = ''; this.handoverForm.wm = "";
this.handoverForm.send_date = ""; this.handoverForm.send_date = "";
this.handoverForm.send_user = ""; this.handoverForm.send_user = "";
this.handoverForm.recive_user = '';// this.handoverForm.recive_user = ""; //
this.handoverForm.recive_dept = '';// this.handoverForm.recive_dept = ""; //
this.handoverForm.send_mgroup = this.currentMgroup.id; this.handoverForm.send_mgroup = this.currentMgroup.id;
this.handoverType = 'add'; this.handoverType = "add";
this.handoverVisible = true; this.handoverVisible = true;
}, },
selectWmChange(item) { selectWmChange(item) {
this.handoverForm.count = item.count this.handoverForm.count = item.count;
this.handoverForm.count_eweight = item.count_eweight this.handoverForm.count_eweight = item.count_eweight;
this.handoverForm.wm = item.id this.handoverForm.wm = item.id;
this.handoverForm.send_dept = this.currentMgroup.belong_dept; this.handoverForm.send_dept = this.currentMgroup.belong_dept;
this.handoverForm.send_mgroup = this.currentMgroup.id; this.handoverForm.send_mgroup = this.currentMgroup.id;
this.handoverForm.material = item.material; this.handoverForm.material = item.material;
@ -349,9 +623,9 @@ export default {
obj.material__process = this.currentMgroup.process; obj.material__process = this.currentMgroup.process;
obj.page = 0; obj.page = 0;
obj.count__gte = 1; obj.count__gte = 1;
this.$API.wpm.wmaterial.list.req(obj).then(res => { this.$API.wpm.wmaterial.list.req(obj).then((res) => {
this.wmaterialList = res; this.wmaterialList = res;
}) });
}, },
submitHandover() { submitHandover() {
this.$API.wpm.handover.create.req(this.handoverForm).then((res) => { this.$API.wpm.handover.create.req(this.handoverForm).then((res) => {
@ -363,7 +637,7 @@ export default {
handover_edit(row) { handover_edit(row) {
Object.assign(this.handoverForm, row); Object.assign(this.handoverForm, row);
this.getUserList2(row.recive_dept); this.getUserList2(row.recive_dept);
this.handoverType = 'edit'; this.handoverType = "edit";
this.handoverVisible = true; this.handoverVisible = true;
}, },
handover_delete(row) { handover_delete(row) {
@ -384,6 +658,6 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
} },
} };
</script> </script>