jianyan
This commit is contained in:
parent
e68f7fdb15
commit
6e2e80e77b
|
@ -95,3 +95,12 @@ export function createTestrecord(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//半成品库存
|
||||||
|
export function getiproductList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/inm/iproduct/',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
|
@ -15,6 +15,15 @@ export function getwmaterialList(query) {
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//车间生产计划
|
||||||
|
export function getsubplanList(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wpm/subplan/',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//车间操作
|
//车间操作
|
||||||
export function createWork(data) {
|
export function createWork(data) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -40,6 +49,23 @@ export function getwproductList(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//半成品检验
|
||||||
|
|
||||||
|
export function wproductTest(data) {
|
||||||
|
return request({
|
||||||
|
url: '/wpm/wproduct/test/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//半成品入库
|
||||||
|
|
||||||
|
export function wproductPutin(id, data) {
|
||||||
|
return request({
|
||||||
|
url: `/wpm/wproduct/${id}/putin/`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -316,8 +316,13 @@ export const asyncRoutes = [
|
||||||
component: () => import('@/views/inm/fifodetail'),
|
component: () => import('@/views/inm/fifodetail'),
|
||||||
meta: { title: '仓库物料', perms: ['vendor_manage'] },
|
meta: { title: '仓库物料', perms: ['vendor_manage'] },
|
||||||
hidden: true
|
hidden: true
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
path: 'wproduct',
|
||||||
|
name: 'wproduct',
|
||||||
|
component: () => import('@/views/inm/wproduct'),
|
||||||
|
meta: { title: '半成品', icon: 'example', perms: ['index_manage'] }
|
||||||
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="iproductData.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="600"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="半成品编号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="半成品批次">
|
||||||
|
<template slot-scope="scope">{{ scope.row.batch }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="半成品名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="所在仓库">
|
||||||
|
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="iproductData.count > 0"
|
||||||
|
:total="iproductData.count"
|
||||||
|
:page.sync="listQuery.page"
|
||||||
|
:limit.sync="listQuery.page_size"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getiproductList,
|
||||||
|
} from "@/api/inm";
|
||||||
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
import { genTree } from "@/utils";
|
||||||
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: { Pagination },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
iproductData: {
|
||||||
|
count: 0,
|
||||||
|
},
|
||||||
|
listQuery: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
|
},
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
//半成品列表
|
||||||
|
getList() {
|
||||||
|
this.listLoading = true;
|
||||||
|
getiproductList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.iproductData= response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -261,6 +261,13 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="fieldList.count > 0"
|
||||||
|
:total="fieldList.count"
|
||||||
|
:page.sync="listQueryfield.page"
|
||||||
|
:limit.sync="listQueryfield.page_size"
|
||||||
|
@pagination="fieldLists"
|
||||||
|
/>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible1"
|
:visible.sync="dialogVisible1"
|
||||||
:title="dialogType1 === 'edit' ? '编辑表格字段' : '新增表格字段'"
|
:title="dialogType1 === 'edit' ? '编辑表格字段' : '新增表格字段'"
|
||||||
|
|
|
@ -1,31 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-card>
|
<el-tabs type="border-card">
|
||||||
<div>
|
<el-tab-pane label="待检半成品">
|
||||||
<el-input
|
|
||||||
v-model="listQuery.search"
|
|
||||||
placeholder="项目名称"
|
|
||||||
style="width: 300px"
|
|
||||||
class="filter-item"
|
|
||||||
@keyup.enter.native="handleFilter"
|
|
||||||
/>
|
|
||||||
<el-button
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-search"
|
|
||||||
@click="handleFilter"
|
|
||||||
>搜索</el-button
|
|
||||||
>
|
|
||||||
<el-button
|
|
||||||
class="filter-item"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-refresh-left"
|
|
||||||
@click="resetFilter"
|
|
||||||
>重置</el-button
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-card>
|
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
@ -46,7 +22,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="检测状态">
|
<el-table-column label="检测状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{actstate_[scope.row.act_state]}}
|
{{ actstate_[scope.row.act_state] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -61,7 +37,6 @@
|
||||||
@click="handleInspection(scope)"
|
@click="handleInspection(scope)"
|
||||||
>检验</el-link
|
>检验</el-link
|
||||||
>
|
>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -73,31 +48,181 @@
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="已检半成品">
|
||||||
|
<el-card style="margin-top: 2px">
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="wproductList1.results"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="600"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="半成品名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.m_state_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="半成品编号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检测状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ actstate_[scope.row.act_state] }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="所在子工序">
|
||||||
|
<template slot-scope="scope">{{ scope.row.p_state_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
|
@click="handlePutin(scope)"
|
||||||
|
>入库</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="wproductList1.count > 0"
|
||||||
|
:total="wproductList1.count"
|
||||||
|
:page.sync="listQuery1.page"
|
||||||
|
:limit.sync="listQuery1.page_size"
|
||||||
|
@pagination="getList1"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-dialog title="物料检查表" :visible.sync="outerVisible">
|
||||||
|
<el-select style="width: 100%" v-model="recordform" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in recordformList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisible"
|
width="50%"
|
||||||
:title="dialogType === 'edit' ? '编辑项目' : '新增项目'"
|
title="检查项目"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
append-to-body
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form label-width="100px" label-position="right">
|
||||||
ref="Form"
|
<el-row
|
||||||
:model="testitem"
|
:gutter="24"
|
||||||
label-width="80px"
|
v-for="(item, $index) in fieldList"
|
||||||
label-position="right"
|
:key="$index"
|
||||||
:rules="rule1"
|
|
||||||
>
|
>
|
||||||
<el-form-item label="项目名称" prop="name">
|
<el-col :span="12">
|
||||||
<el-input v-model="testitem.name" placeholder="项目名称" />
|
<el-form-item
|
||||||
|
v-if="item.field_type === 'string'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-input placeholder="请输入" v-model="item.sort" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="条款号" prop="term_number">
|
<el-form-item
|
||||||
<el-input v-model="testitem.term_number" placeholder="条款号" />
|
v-else-if="item.field_type === 'int'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
width="120"
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入"
|
||||||
|
v-model="item.sort"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="标准" prop="standard">
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'float'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
type="number"
|
||||||
|
placeholder="请输入"
|
||||||
|
v-model="item.sort"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'date'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="item.create_time"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'datetime'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="item.create_time"
|
||||||
|
type="datetime"
|
||||||
|
placeholder="选择日期"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'select'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="testitem.standard"
|
v-model="item.sort"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item1 in item.field_choice"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-else-if="item.field_type === 'selects'"
|
||||||
|
:label="item.field_name"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="optio"
|
||||||
|
multiple
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item1 in item.field_choice"
|
||||||
|
:key="item1"
|
||||||
|
:label="item1"
|
||||||
|
:value="item1"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="是否检验合格" width="50px">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="item.is_testok"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in choice"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
|
@ -105,20 +230,64 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="是否合格" prop="sort_str">
|
||||||
|
<el-radio v-model="is_testok" label="true">检查合格</el-radio>
|
||||||
|
<el-radio v-model="is_testok" label="false">检查不合格</el-radio>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
|
||||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
<el-button @click="innerVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitfield"
|
||||||
|
>提交检查项目</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitrecordform"
|
||||||
|
>填写检查项目</el-button
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<el-dialog title="半成品入库" :visible.sync="dialogFormVisible">
|
||||||
|
<el-form :model="form">
|
||||||
|
<el-form-item label="仓库" :label-width="formLabelWidth">
|
||||||
|
<el-select
|
||||||
|
style="width: 100%"
|
||||||
|
v-model="form.warehouse"
|
||||||
|
placeholder="请选择仓库"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in WarehouseData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||||
|
<el-input v-model="form.remark" ></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="putin">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { getwproductList ,wproductTest,wproductPutin} from "@/api/wpm";
|
||||||
getwproductList,
|
|
||||||
} from "@/api/wpm";
|
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
import { getWarehouseList } from "@/api/inm";
|
||||||
|
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||||
const defaultetestitem = {};
|
const defaultetestitem = {};
|
||||||
|
@ -127,35 +296,60 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
testitem: defaultetestitem,
|
testitem: defaultetestitem,
|
||||||
|
form:{},
|
||||||
wproductList: {
|
wproductList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
|
},
|
||||||
|
wproductList1: {
|
||||||
|
count: 0,
|
||||||
},
|
},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
actstate_:{
|
listQuery1: {
|
||||||
|
page: 1,
|
||||||
|
page_size: 20,
|
||||||
1:'生产中',
|
|
||||||
2:'待检测',
|
|
||||||
3:'已合格',
|
|
||||||
4:'库存中',
|
|
||||||
},
|
},
|
||||||
|
actstate_: {
|
||||||
|
1: "生产中",
|
||||||
|
2: "待检测",
|
||||||
|
3: "已合格",
|
||||||
|
4: "库存中",
|
||||||
|
},
|
||||||
|
choice: [
|
||||||
|
{
|
||||||
|
value: true,
|
||||||
|
label: "合格",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: false,
|
||||||
|
label: "不合格",
|
||||||
|
},
|
||||||
|
],
|
||||||
options: [],
|
options: [],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
dialogVisible: false,
|
fieldList: "",
|
||||||
dialogType: "new",
|
is_testok: "true",
|
||||||
rule1: {
|
field: [],
|
||||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
recordformList: [],
|
||||||
term_number: [{ required: true, message: "请输入", trigger: "blur" }],
|
recordform: "",
|
||||||
|
fifo_detail: "",
|
||||||
|
listQueryrecordform: {
|
||||||
|
page: 0,
|
||||||
},
|
},
|
||||||
|
outerVisible: false,
|
||||||
|
innerVisible: false,
|
||||||
|
dialogFormVisible:false,
|
||||||
|
testrecord: {},
|
||||||
|
WarehouseData:"",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getList1();
|
||||||
this.getLists();
|
this.getLists();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -163,7 +357,7 @@ export default {
|
||||||
//半成品列表
|
//半成品列表
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
this.listQuery.act_state=2
|
this.listQuery.act_state = 2;
|
||||||
getwproductList(this.listQuery).then((response) => {
|
getwproductList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.wproductList = response.data;
|
this.wproductList = response.data;
|
||||||
|
@ -171,83 +365,89 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getList1() {
|
||||||
|
|
||||||
|
this.listQuery1.act_state = 3;
|
||||||
|
getwproductList(this.listQuery1).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.wproductList1 = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
getLists() {
|
|
||||||
getStandardList({ pageoff: true }).then((response) => {
|
|
||||||
this.options = genTree(response.data);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//仓库列表
|
||||||
|
getWarehouseLists(){
|
||||||
|
|
||||||
|
getWarehouseList({page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.WarehouseData = response.data;
|
||||||
|
}
|
||||||
|
|
||||||
handleFilter() {
|
|
||||||
this.listQuery.page = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
resetFilter() {
|
|
||||||
this.listQuery = {
|
|
||||||
page: 1,
|
|
||||||
page_size: 20,
|
|
||||||
};
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
handleCreate() {
|
|
||||||
this.testitem = Object.assign({}, defaultetestitem);
|
|
||||||
this.dialogType = "new";
|
|
||||||
this.dialogVisible = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs["Form"].clearValidate();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleInspection(scope) {
|
||||||
handleEdit(scope) {
|
//调该物料对应的检查表
|
||||||
this.testitem = Object.assign({}, scope.row); // copy obj
|
this.outerVisible = true;
|
||||||
this.dialogType = "edit";
|
this.wproduct=scope.row.id;//半成品ID
|
||||||
this.dialogVisible = true;
|
this.listQueryrecordform.material = scope.row.m_state;//
|
||||||
this.$nextTick(() => {
|
this.listQueryrecordform.type = 2;
|
||||||
this.$refs["Form"].clearValidate();
|
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.recordformList = response.data;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleDelete(scope) {
|
//根据选择的表,渲染检查项目
|
||||||
this.$confirm("确认删除?", "警告", {
|
submitrecordform() {
|
||||||
confirmButtonText: "确认",
|
if (this.recordform != "") {
|
||||||
cancelButtonText: "取消",
|
getrffieldList({ form: this.recordform, page: 0 }).then((response) => {
|
||||||
type: "error",
|
if (response.data) {
|
||||||
})
|
this.fieldList = response.data;
|
||||||
.then(async () => {
|
this.innerVisible = true;
|
||||||
await deleteTestitem(scope.row.id);
|
}
|
||||||
this.getList();
|
|
||||||
this.$message.success("成功");
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.error(err);
|
|
||||||
});
|
});
|
||||||
|
} else this.$message.error("请选择检查表!");
|
||||||
},
|
},
|
||||||
|
//提交检查项目
|
||||||
|
submitfield() {
|
||||||
|
let _this = this;
|
||||||
|
_this.field = []; //检查项目
|
||||||
|
this.fieldList.forEach((item) => {
|
||||||
|
|
||||||
async confirm(form) {
|
_this.field.push({
|
||||||
this.$refs[form].validate((valid) => {
|
form_field:item.id,
|
||||||
if (valid) {
|
field_value:item.sort,
|
||||||
const isEdit = this.dialogType === "edit";
|
is_testok:item.is_testok//单项检查结果
|
||||||
if (isEdit) {
|
});
|
||||||
updateTestitem(this.testitem.id, this.testitem).then((res) => {
|
});
|
||||||
|
|
||||||
|
console.log(this.recordform);
|
||||||
|
this.testrecord.form = this.recordform;//检查表
|
||||||
|
this.testrecord.record_data = _this.field;//检查项列表
|
||||||
|
this.testrecord.is_testok = this.is_testok;//检查表检查结果
|
||||||
|
this.testrecord.wproduct = this.wproduct;//半成品ID
|
||||||
|
wproductTest(this.testrecord).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
|
this.innerVisible = false;
|
||||||
|
this.outerVisible = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.dialogVisible = false;
|
|
||||||
this.$message.success("成功");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
createTestitem(this.testitem).then((res) => {
|
|
||||||
if (res.code >= 200) {
|
|
||||||
this.getList();
|
|
||||||
this.dialogVisible = false;
|
|
||||||
this.$message.success("成功");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//半成品入库
|
||||||
|
handlePutin(scope){
|
||||||
|
this.dialogFormVisible=true;
|
||||||
|
this.getWarehouseLists();//仓库
|
||||||
|
this.id=scope.row.id;//半成品id
|
||||||
|
},
|
||||||
|
putin(){
|
||||||
|
wproductPutin(this.id,this.form).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.$message.success("入库成功!");
|
||||||
|
this.dialogFormVisible=false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
<el-table
|
<el-table
|
||||||
:data="subproductionplanList.results"
|
:data="subproductionplanList.results"
|
||||||
border
|
border
|
||||||
|
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
height="300"
|
height="300"
|
||||||
|
@ -32,9 +31,6 @@
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="子工序" width="160">
|
<el-table-column label="子工序" width="160">
|
||||||
<template slot-scope="scope" v-if="scope.row.steps">
|
<template slot-scope="scope" v-if="scope.row.steps">
|
||||||
<el-tag
|
<el-tag
|
||||||
|
@ -69,7 +65,11 @@
|
||||||
}}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="生产进度">
|
<el-table-column label="生产进度">
|
||||||
<template slot-scope="scope">{{ scope.row.main_count_real }}/{{scope.row.main_count}}</template>
|
<template slot-scope="scope"
|
||||||
|
>{{ scope.row.main_count_real }}/{{
|
||||||
|
scope.row.main_count
|
||||||
|
}}</template
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" label="操作" width="130px">
|
<el-table-column align="center" label="操作" width="130px">
|
||||||
|
@ -103,6 +103,12 @@
|
||||||
@click="handlework(item)"
|
@click="handlework(item)"
|
||||||
>{{ item.name }}</el-button
|
>{{ item.name }}</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
@click="handleAll()"
|
||||||
|
style="float: right"
|
||||||
|
>显示全部子计划</el-button
|
||||||
|
>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
|
@ -188,8 +194,7 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
|
<el-dialog :visible.sync="dialogVisiblenw" width="80%" title="领料">
|
||||||
<el-dialog :visible.sync="dialogVisiblenw" title="领料">
|
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>生产所需领料表</span>
|
<span>生产所需领料表</span>
|
||||||
|
@ -250,11 +255,55 @@
|
||||||
<el-table-column prop="material_.specification" label="物料规格">
|
<el-table-column prop="material_.specification" label="物料规格">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="material_.unit" label="物料单位">
|
<el-table-column prop="material_.unit" label="物料单位">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
|
@click="handlewproduct(scope)"
|
||||||
|
>选择半成品</el-link
|
||||||
|
>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</template>
|
</template>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="半成品列表" :visible.sync="dialogTableVisible">
|
||||||
|
<el-table
|
||||||
|
|
||||||
|
:data="iproductData"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
stripe
|
||||||
|
highlight-current-row
|
||||||
|
max-height="600"
|
||||||
|
@selection-change="handleSelectionChanges"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="55"> </el-table-column>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column label="半成品编号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="半成品批次">
|
||||||
|
<template slot-scope="scope">{{ scope.row.batch }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="半成品名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="所在仓库">
|
||||||
|
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogTableVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="iproductsSubmit">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:visible.sync="dialogVisiblework"
|
:visible.sync="dialogVisiblework"
|
||||||
:fullscreen="true"
|
:fullscreen="true"
|
||||||
|
@ -276,27 +325,34 @@
|
||||||
</el-step>
|
</el-step>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="14">
|
||||||
<el-card class="box-card" v-if="showPrise1&&values === 0">
|
<el-card class="box-card" v-if="showPrise1 && values === 0">
|
||||||
<div slot="header" class="clearfix" >
|
<div slot="header" class="clearfix">
|
||||||
<span>消耗物料表</span>
|
<span>消耗物料表</span>
|
||||||
|
|
||||||
<el-table :data="input" border style="width: 100%">
|
<el-table :data="input" border style="width: 100%">
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="material__name"
|
prop="subproduction_plan"
|
||||||
|
label="子计划编号"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="material_.name"
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
width="180"
|
width="180"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="batch" label="物料批次" width="150">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="count" label="可用数量" width="80">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="batch"
|
prop="count_input"
|
||||||
label="物料批次"
|
label="使用数量"
|
||||||
width="180"
|
width="180"
|
||||||
>
|
>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="count" label="可用数量" width="180">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="count_input" 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">
|
||||||
|
@ -313,17 +369,18 @@
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="10">
|
||||||
<el-card class="box-card" v-if="values === 0&&showPrise">
|
<el-card class="box-card" v-if="values === 0 && showPrise">
|
||||||
<div slot="header" class="clearfix" >
|
<div slot="header" class="clearfix">
|
||||||
<span>产出物料表</span>
|
<span>产出物料表</span>
|
||||||
|
|
||||||
<el-table
|
<el-table :data="output" border style="width: 100%">
|
||||||
:data="output"
|
<el-table-column
|
||||||
|
prop="subproduction_plan"
|
||||||
border
|
label="子计划编号"
|
||||||
style="width: 100%"
|
width="180"
|
||||||
>
|
>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="material__name"
|
prop="material__name"
|
||||||
label="物料名称"
|
label="物料名称"
|
||||||
|
@ -331,7 +388,11 @@
|
||||||
>
|
>
|
||||||
</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">
|
||||||
|
@ -358,10 +419,7 @@
|
||||||
<el-input v-model="remark" width="300"></el-input>
|
<el-input v-model="remark" width="300"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button
|
<el-button style="margin-top: 12px" @click="next" v-if="values == 0"
|
||||||
style="margin-top: 12px"
|
|
||||||
@click="next"
|
|
||||||
v-if="values == 0 "
|
|
||||||
>下一步</el-button
|
>下一步</el-button
|
||||||
>
|
>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -470,20 +528,18 @@
|
||||||
<el-button
|
<el-button
|
||||||
style="margin-top: 12px"
|
style="margin-top: 12px"
|
||||||
@click="next"
|
@click="next"
|
||||||
v-if=" values == $index+2"
|
v-if="values == $index + 2"
|
||||||
>下一步</el-button
|
>下一步</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
style="margin-top: 12px"
|
style="margin-top: 12px"
|
||||||
@click="prev"
|
@click="prev"
|
||||||
v-if="values == $index+1"
|
v-if="values == $index + 1"
|
||||||
>上一步</el-button
|
>上一步</el-button
|
||||||
>
|
>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
<div style="text-align: right; position: sticky">
|
||||||
|
|
||||||
<div style="text-align: right;position:sticky">
|
|
||||||
<el-button type="danger" @click="dialogVisiblework = false"
|
<el-button type="danger" @click="dialogVisiblework = false"
|
||||||
>取消</el-button
|
>取消</el-button
|
||||||
>
|
>
|
||||||
|
@ -495,14 +551,15 @@
|
||||||
<script>
|
<script>
|
||||||
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, getStepLists } from "@/api/mtm";
|
||||||
import {
|
import {
|
||||||
createPick,
|
createPick,
|
||||||
getwmaterialList,
|
getwmaterialList,
|
||||||
submitWork,
|
submitWork,
|
||||||
getwproductList,
|
getwproductList,
|
||||||
|
getsubplanList
|
||||||
} from "@/api/wpm";
|
} from "@/api/wpm";
|
||||||
import { getWarehouseList } from "@/api/inm";
|
import { getiproductList } 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
|
||||||
const defaulteneed = {};
|
const defaulteneed = {};
|
||||||
|
@ -520,6 +577,7 @@ export default {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
iproductData:"",
|
||||||
remark: "",
|
remark: "",
|
||||||
values: 0,
|
values: 0,
|
||||||
active: 0,
|
active: 0,
|
||||||
|
@ -527,7 +585,7 @@ export default {
|
||||||
havewl: "",
|
havewl: "",
|
||||||
needwl: "",
|
needwl: "",
|
||||||
showPrise: false,
|
showPrise: false,
|
||||||
showPrise1:false,
|
showPrise1: false,
|
||||||
state_: {
|
state_: {
|
||||||
0: "制定中",
|
0: "制定中",
|
||||||
1: "已下达",
|
1: "已下达",
|
||||||
|
@ -538,7 +596,7 @@ export default {
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
id: "",
|
id: "",
|
||||||
|
dialogTableVisible:false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
dialogVisiblework: false,
|
dialogVisiblework: false,
|
||||||
|
@ -567,6 +625,9 @@ export default {
|
||||||
wproducts: [],
|
wproducts: [],
|
||||||
otherforms: [],
|
otherforms: [],
|
||||||
from: [],
|
from: [],
|
||||||
|
workdata: {},
|
||||||
|
wproductdata: {},
|
||||||
|
iproducts: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
process: "",
|
process: "",
|
||||||
|
@ -583,7 +644,7 @@ export default {
|
||||||
this.process = tab.name;
|
this.process = tab.name;
|
||||||
this.listQuery.process = tab.name;
|
this.listQuery.process = tab.name;
|
||||||
this.steps = [];
|
this.steps = [];
|
||||||
getsubproductionplanList(this.listQuery).then((response) => {
|
getsubplanList(this.listQuery).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.subproductionplanList = response.data;
|
this.subproductionplanList = response.data;
|
||||||
}
|
}
|
||||||
|
@ -598,11 +659,22 @@ export default {
|
||||||
}
|
}
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
|
//子工序列表
|
||||||
|
|
||||||
|
getStepLists(tab.name).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.steps = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
this.getwproductLists();
|
||||||
},
|
},
|
||||||
//工序对应的子计划,弹出对应的车间物料
|
//工序对应的子计划,弹出对应的车间物料
|
||||||
handleCurrentChange(row) {
|
handleCurrentChange(row) {
|
||||||
this.steps = row.steps; //调出子工序
|
// this.steps = row.steps; //调出子工序
|
||||||
|
|
||||||
this.subproduction_plan = row.id; //子计划Id
|
this.subproduction_plan = row.id; //子计划Id
|
||||||
|
this.getwproductLists();
|
||||||
getwmaterialList({
|
getwmaterialList({
|
||||||
subproduction_plan__process: this.process,
|
subproduction_plan__process: this.process,
|
||||||
subproduction_plan: row.id,
|
subproduction_plan: row.id,
|
||||||
|
@ -613,7 +685,7 @@ export default {
|
||||||
}
|
}
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
this.getwproductLists();
|
|
||||||
},
|
},
|
||||||
//工序渲染
|
//工序渲染
|
||||||
getProcessList() {
|
getProcessList() {
|
||||||
|
@ -625,7 +697,71 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//显示全部子计划
|
||||||
|
handleAll() {
|
||||||
|
this.listQuery.process = this.process;
|
||||||
|
this.subproduction_plan = "";
|
||||||
|
//子计划
|
||||||
|
getsubproductionplanList(this.listQuery).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.subproductionplanList = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
//车间物料表
|
||||||
|
getwmaterialList({
|
||||||
|
subproduction_plan__process: this.process,
|
||||||
|
page: 0,
|
||||||
|
}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.wmaterialList = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
//半成品
|
||||||
|
getwproductList({page:0,p_state__process:this.process}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.wproductData = response.data;
|
||||||
|
//console.log( this.wproductData)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
//大工序下子工序产出的半成品
|
||||||
|
getwproductLists() {
|
||||||
|
this.wproductdata.page = 0;
|
||||||
|
this.wproductdata.p_state__process = this.process;
|
||||||
|
if (this.subproduction_plan != "") {
|
||||||
|
this.wproductdata.subproduction_plan = this.subproduction_plan;
|
||||||
|
}
|
||||||
|
getwproductList(this.wproductdata).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.wproductData = response.data;
|
||||||
|
//console.log( this.wproductData)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//调出该批次,该仓库的所有半成品
|
||||||
|
handlewproduct(scope){
|
||||||
|
|
||||||
|
this.dialogTableVisible = true;
|
||||||
|
getiproductList({page:0,material:scope.row.material,warehouse:scope.row.warehouse,batch:scope.row.batch}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.iproductData= response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
//勾选半成品
|
||||||
|
handleSelectionChanges(val){
|
||||||
|
let _this = this;
|
||||||
|
_this.wpID = [];
|
||||||
|
val.forEach((item) => {
|
||||||
|
_this.wpID.push(item.id);
|
||||||
|
});
|
||||||
|
},
|
||||||
//领料
|
//领料
|
||||||
handleNeed(scope) {
|
handleNeed(scope) {
|
||||||
this.need = Object.assign({}, defaulteneed);
|
this.need = Object.assign({}, defaulteneed);
|
||||||
|
@ -641,7 +777,6 @@ export default {
|
||||||
|
|
||||||
//确认领料
|
//确认领料
|
||||||
handlePick() {
|
handlePick() {
|
||||||
|
|
||||||
this.pickData.subproduction_plan = this.id;
|
this.pickData.subproduction_plan = this.id;
|
||||||
this.pickData.picks = this.havewl;
|
this.pickData.picks = this.havewl;
|
||||||
|
|
||||||
|
@ -673,12 +808,14 @@ export default {
|
||||||
handlework(item) {
|
handlework(item) {
|
||||||
this.step = item.id;
|
this.step = item.id;
|
||||||
// console.log(this.wpID);
|
// console.log(this.wpID);
|
||||||
this.values=0;
|
this.values = 0;
|
||||||
createWork({
|
this.workdata.step = item.id;
|
||||||
step: item.id,
|
this.workdata.wproducts = this.wpID;
|
||||||
wproducts: this.wpID,
|
if (this.subproduction_plan != "") {
|
||||||
subproduction_plan: this.subproduction_plan,
|
this.workdata.subproduction_plan = this.subproduction_plan;
|
||||||
}).then((res) => {
|
}
|
||||||
|
|
||||||
|
createWork(this.workdata).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.dialogVisiblework = true;
|
this.dialogVisiblework = true;
|
||||||
this.forms = res.data.forms;
|
this.forms = res.data.forms;
|
||||||
|
@ -686,26 +823,25 @@ export default {
|
||||||
this.otherforms.shift();
|
this.otherforms.shift();
|
||||||
//console.log(this.otherforms)
|
//console.log(this.otherforms)
|
||||||
|
|
||||||
if ( res.data.forms[0].input !== undefined && res.data.forms[0].input.length > 0 )
|
if (
|
||||||
{
|
res.data.forms[0].input !== undefined &&
|
||||||
|
res.data.forms[0].input.length > 0
|
||||||
|
) {
|
||||||
this.input = res.data.forms[0].input; //消耗
|
this.input = res.data.forms[0].input; //消耗
|
||||||
this.showPrise1 = true;
|
this.showPrise1 = true;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
this.showPrise1 = false;
|
this.showPrise1 = false;
|
||||||
}
|
}
|
||||||
if ( res.data.forms[0].output !== undefined && res.data.forms[0].output.length > 0 )
|
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.showPrise = true;
|
this.showPrise = true;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
this.showPrise = false;
|
this.showPrise = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.wproducts = res.data.forms[0].wproducts;
|
this.wproducts = res.data.forms[0].wproducts;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -748,19 +884,7 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//大工序下子工序产出的半成品
|
|
||||||
getwproductLists() {
|
|
||||||
getwproductList({
|
|
||||||
page: 0,
|
|
||||||
subproduction_plan: this.subproduction_plan,
|
|
||||||
p_state__process: this.process,
|
|
||||||
}).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
this.wproductData = response.data;
|
|
||||||
//console.log( this.wproductData)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue