xiugai
This commit is contained in:
parent
91d82a7882
commit
4950bcd2f9
|
|
@ -120,23 +120,23 @@
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
max-height="300"
|
max-height="300"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column type="selection" width="55"> </el-table-column>
|
||||||
type="selection"
|
|
||||||
width="55">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="半成品编号">
|
<el-table-column label="半成品编号">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="半成品状态">
|
<el-table-column label="半成品状态">
|
||||||
<template slot-scope="scope">{{ scope.row.m_state_.name }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.m_state_.name
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="所在子工序">
|
<el-table-column label="所在子工序">
|
||||||
<template slot-scope="scope">{{ scope.row.p_state_.name }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.p_state_.name
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所在子工序执行状态">
|
<el-table-column label="所在子工序执行状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
@ -146,7 +146,9 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="更新时间">
|
<el-table-column label="更新时间">
|
||||||
<template slot-scope="scope">{{ scope.row.update_time }}</template>
|
<template slot-scope="scope">{{
|
||||||
|
scope.row.update_time
|
||||||
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -308,17 +310,24 @@
|
||||||
>
|
>
|
||||||
</el-step>
|
</el-step>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="12">
|
||||||
<el-card class="box-card" v-if="values === 0">
|
<el-card class="box-card" v-if="values === 0">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>消耗物料表</span>
|
<span>消耗物料表</span>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="input" border style="width: 100%">
|
<el-table :data="input" border style="width: 100%">
|
||||||
|
<el-table-column
|
||||||
|
prop="material__name"
|
||||||
<el-table-column prop="material__name" label="物料名称" width="180">
|
label="物料名称"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="material__batch" label="物料批次" width="180">
|
<el-table-column
|
||||||
|
prop="material__batch"
|
||||||
|
label="物料批次"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="count" label="可用数量" width="180">
|
<el-table-column prop="count" label="可用数量" width="180">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -326,36 +335,74 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form :model="scope.row">
|
<el-form :model="scope.row">
|
||||||
<el-form-item size="mini">
|
<el-form-item size="mini">
|
||||||
<el-input-number v-model="scope.row.count_input" :min="0" :value="0"></el-input-number>
|
<el-input-number
|
||||||
|
v-model="scope.row.count_input"
|
||||||
|
:min="0"
|
||||||
|
:value="0"
|
||||||
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
<el-card class="box-card" v-if="values === 0">
|
<el-card class="box-card" v-if="values === 0">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>产出物料表</span>
|
<span>产出物料表</span>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="output" border style="width: 100%">
|
<el-table
|
||||||
|
:data="output"
|
||||||
<el-table-column prop="material__name" label="物料名称" width="180">
|
v-if="showPrise"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="material__name"
|
||||||
|
label="物料名称"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="count_output" label="产出数量" width="180">
|
<el-table-column prop="count_output" label="产出数量" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-form :model="scope.row">
|
<el-form :model="scope.row">
|
||||||
<el-form-item size="mini">
|
<el-form-item size="mini">
|
||||||
<el-input-number v-model="scope.row.count_output" :min="0" :value="0"></el-input-number>
|
<el-input-number
|
||||||
|
v-model="scope.row.count_output"
|
||||||
|
:min="0"
|
||||||
|
:value="0"
|
||||||
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-card class="box-card" v-if="values === 0">
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<span>备注</span>
|
||||||
|
</div>
|
||||||
|
<el-form ref="form" label-width="80px">
|
||||||
|
<el-form-item label="操作备注">
|
||||||
|
<el-input v-model="remark" width="300"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
<el-card class="box-card" v-for="(itemf,$index) in otherforms" :key="$index" >
|
</el-card>
|
||||||
<el-form label-width="80px" label-position="right" v-if="values === $index+1">
|
<el-card
|
||||||
|
class="box-card"
|
||||||
|
v-for="(itemf, $index) in otherforms"
|
||||||
|
:key="$index"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
label-width="80px"
|
||||||
|
label-position="right"
|
||||||
|
v-if="values === $index + 1"
|
||||||
|
>
|
||||||
<el-row v-for="(item, $index) in itemf.form_fields" :key="$index">
|
<el-row v-for="(item, $index) in itemf.form_fields" :key="$index">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="item.field_type === 'string'"
|
v-if="item.field_type === 'string'"
|
||||||
|
|
@ -475,7 +522,12 @@
|
||||||
import { getsubproductionplanList, createPick_need } from "@/api/pm";
|
import { getsubproductionplanList, createPick_need } from "@/api/pm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { getProcessList } from "@/api/mtm";
|
import { getProcessList } from "@/api/mtm";
|
||||||
import { createPick, getwmaterialList,submitWork,getwproductList} from "@/api/wpm";
|
import {
|
||||||
|
createPick,
|
||||||
|
getwmaterialList,
|
||||||
|
submitWork,
|
||||||
|
getwproductList,
|
||||||
|
} from "@/api/wpm";
|
||||||
import { getWarehouseList } from "@/api/inm";
|
import { getWarehouseList } from "@/api/inm";
|
||||||
import { createWork } from "@/api/wpm";
|
import { createWork } from "@/api/wpm";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
|
@ -494,11 +546,13 @@ export default {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
remark: "",
|
||||||
values: 0,
|
values: 0,
|
||||||
active: 0,
|
active: 0,
|
||||||
activeName: "1",
|
activeName: "1",
|
||||||
havewl: "",
|
havewl: "",
|
||||||
needwl: "",
|
needwl: "",
|
||||||
|
showPrise: false,
|
||||||
state_: {
|
state_: {
|
||||||
0: "制定中",
|
0: "制定中",
|
||||||
1: "已下达",
|
1: "已下达",
|
||||||
|
|
@ -659,13 +713,10 @@ export default {
|
||||||
_this.wpID = [];
|
_this.wpID = [];
|
||||||
val.forEach((item) => {
|
val.forEach((item) => {
|
||||||
_this.wpID.push(item.id);
|
_this.wpID.push(item.id);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
//车间操作
|
//车间操作
|
||||||
handlework(item) {
|
handlework(item) {
|
||||||
|
|
||||||
this.step = item.id;
|
this.step = item.id;
|
||||||
// console.log(this.wpID);
|
// console.log(this.wpID);
|
||||||
createWork({
|
createWork({
|
||||||
|
|
@ -680,15 +731,19 @@ export default {
|
||||||
this.otherforms.shift();
|
this.otherforms.shift();
|
||||||
//console.log(this.otherforms)
|
//console.log(this.otherforms)
|
||||||
this.input = res.data.forms[0].input; //消耗
|
this.input = res.data.forms[0].input; //消耗
|
||||||
|
if (
|
||||||
|
res.data.forms[0].output !== undefined &&
|
||||||
|
res.data.forms[0].output.length > 0
|
||||||
|
) {
|
||||||
this.output = res.data.forms[0].output; //产出
|
this.output = res.data.forms[0].output; //产出
|
||||||
this.wproducts=res.data.forms[0].wproducts;
|
this.showPrise = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.wproducts = res.data.forms[0].wproducts;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//提交
|
//提交
|
||||||
submint() {
|
submint() {
|
||||||
this.form = [];
|
this.form = [];
|
||||||
|
|
@ -698,23 +753,17 @@ export default {
|
||||||
item.form_fields.forEach((items) => {
|
item.form_fields.forEach((items) => {
|
||||||
_this.field1.push({
|
_this.field1.push({
|
||||||
form_field: items.id,
|
form_field: items.id,
|
||||||
field_value:items.sort
|
field_value: items.sort,
|
||||||
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
this.form.push({
|
this.form.push({
|
||||||
form: item.id,
|
form: item.id,
|
||||||
record_data:_this.field1
|
record_data: _this.field1,
|
||||||
|
});
|
||||||
})
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(this.remark);
|
||||||
console.log( this.form);
|
|
||||||
|
|
||||||
|
|
||||||
submitWork({
|
submitWork({
|
||||||
step: this.step,
|
step: this.step,
|
||||||
|
|
@ -722,27 +771,29 @@ export default {
|
||||||
wproducts: this.wproducts,
|
wproducts: this.wproducts,
|
||||||
input: this.input,
|
input: this.input,
|
||||||
output: this.output,
|
output: this.output,
|
||||||
forms: this.from
|
forms: this.from,
|
||||||
|
remark: this.remark,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.dialogVisiblework = false;
|
this.dialogVisiblework = false;
|
||||||
this.$message.success("成功!");
|
this.$message.success("成功!");
|
||||||
this.getwproductLists();
|
this.getwproductLists();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
//大工序下子工序产出的半成品
|
//大工序下子工序产出的半成品
|
||||||
getwproductLists() {
|
getwproductLists() {
|
||||||
getwproductList({page:0, subproduction_plan:this.subproduction_plan, p_state__process:this.process}).then((response) => {
|
getwproductList({
|
||||||
|
page: 0,
|
||||||
|
subproduction_plan: this.subproduction_plan,
|
||||||
|
p_state__process: this.process,
|
||||||
|
}).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.wproductData = response.data;
|
this.wproductData = response.data;
|
||||||
//console.log( this.wproductData)
|
//console.log( this.wproductData)
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue