chejiancaozuo
This commit is contained in:
parent
d5336df9fc
commit
1665ee1f76
|
@ -2,8 +2,8 @@
|
|||
ENV = 'development'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:8000/api'
|
||||
#VUE_APP_BASE_API = 'http://47.95.0.242:2222/api'
|
||||
#VUE_APP_BASE_API = 'http://127.0.0.1:8000/api'
|
||||
VUE_APP_BASE_API = 'http://47.95.0.242:2222/api'
|
||||
|
||||
|
||||
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
|
||||
|
|
|
@ -69,3 +69,13 @@ export function getmaterialbatchList(query) {
|
|||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//库存审核
|
||||
export function audit(id, data) {
|
||||
return request({
|
||||
url: `/inm/fifo/${id}/audit/`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -57,3 +57,11 @@ export function deleteTestitem(id, data) {
|
|||
data
|
||||
})
|
||||
}
|
||||
//提交物料检查项目
|
||||
export function createTestrecord(data) {
|
||||
return request({
|
||||
url: '/qm/testrecord/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
|
|
@ -14,4 +14,29 @@ export function getwmaterialList(query) {
|
|||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
}
|
||||
//车间操作
|
||||
export function createWork(data) {
|
||||
return request({
|
||||
url: '/wpm/do/init/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//提交
|
||||
export function submitWork(data) {
|
||||
return request({
|
||||
url: '/wpm/do/submit/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
//子工序半成品
|
||||
export function getwproductList(query) {
|
||||
return request({
|
||||
url: '/wpm/wproduct/',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -2,35 +2,35 @@
|
|||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<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-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">
|
||||
<div style="margin-top: 2px">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增物料</el-button
|
||||
>
|
||||
</div>
|
||||
<div style="margin-top: 2px">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增物料</el-button
|
||||
>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="fifoList.results"
|
||||
|
@ -40,34 +40,42 @@
|
|||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="仓库">
|
||||
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.warehouse_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="出库入人员">
|
||||
<template slot-scope="scope">{{ scope.row.operator_.username }}</template>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.operator_.username
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出入库时间">
|
||||
<el-table-column label="出入库时间">
|
||||
<template slot-scope="scope">{{ scope.row.inout_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出入库类型">
|
||||
<el-table-column label="出入库类型">
|
||||
<template slot-scope="scope">{{ types_[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<el-table-column label="是否审核">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_audited == false">未审核</el-tag>
|
||||
<el-tag v-else>已审核</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
@click="handleDetail(scope)"
|
||||
>查看详情</el-link
|
||||
>查看</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="scope.row.is_audited == false"
|
||||
@click="handleAudit(scope)"
|
||||
>审核</el-link
|
||||
>
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_delete'])"
|
||||
|
@ -86,7 +94,7 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogType === 'edit' ? '编辑仓库' : '新增仓库'"
|
||||
>
|
||||
|
@ -98,66 +106,132 @@
|
|||
:rules="rule1"
|
||||
>
|
||||
<el-form-item label="仓库" prop="warehouse">
|
||||
<el-select v-model="inventory.warehouse" placeholder="请选择" filterable >
|
||||
<el-option v-for="item in warehouseData" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="operator">
|
||||
<el-select v-model="inventory.operator" placeholder="请选择" filterable >
|
||||
<el-option v-for="item in userData" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间" prop="inout_date">
|
||||
<el-select
|
||||
v-model="inventory.warehouse"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehouseData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作人" prop="operator">
|
||||
<el-select
|
||||
v-model="inventory.operator"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in userData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="入库时间" prop="inout_date">
|
||||
<el-date-picker
|
||||
v-model="inventory.inout_date"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width:100%"
|
||||
style="width: 100%"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<div v-for="(item,index) in inventory.details" :key="index">
|
||||
<el-row>
|
||||
<el-col :span="8" style="margin-right:10px;">
|
||||
<el-form-item class="material" label="物料:" :prop="'details.'+index+'.material'" >
|
||||
<el-select v-model="item.material" size="small" >
|
||||
<el-option v-for="item in materialoptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" style="margin-right:10px;">
|
||||
<el-form-item class="count" label="数量" :prop="'details.'+index+'.count'" >
|
||||
<el-input-number v-model="item.count" :min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="margin-right:10px;">
|
||||
<el-form-item class="batch" label="批次" :prop="'details.'+index+'.batch'" >
|
||||
<el-input v-model="item.batch" placeholder="批次号" ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 删除按钮 -->
|
||||
<el-col :span="1" >
|
||||
<el-tooltip class="item" effect="dark" content="删除" placement="top">
|
||||
<el-button @click="deleteItem(index)" style='border:none;background:none;padding:0px;margin-top:4px;'>
|
||||
<i class="el-icon-remove-outline" style='font-size:20px;'></i>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div>
|
||||
<el-tooltip class="item" effect="dark" content="添加条件" placement="top">
|
||||
<el-button @click="addConditions" style='cursor:pointer;width:95%;color:#fe000c;border:1px dashed #fe000c;height:40px;padding:0px;margin-top: 2px;margin-left:20px;font-size:26px'>
|
||||
+
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div v-for="(item, index) in inventory.details" :key="index">
|
||||
<el-row>
|
||||
<el-col :span="8" style="margin-right: 10px">
|
||||
<el-form-item
|
||||
class="material"
|
||||
label="物料:"
|
||||
:prop="'details.' + index + '.material'"
|
||||
>
|
||||
<el-select v-model="item.material" size="small">
|
||||
<el-option
|
||||
v-for="item in materialoptions"
|
||||
:key="item.value"
|
||||
:value="item.value"
|
||||
:label="item.label"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" style="margin-right: 10px">
|
||||
<el-form-item
|
||||
class="count"
|
||||
label="数量"
|
||||
:prop="'details.' + index + '.count'"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="item.count"
|
||||
:min="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6" style="margin-right: 10px">
|
||||
<el-form-item
|
||||
class="batch"
|
||||
label="批次"
|
||||
:prop="'details.' + index + '.batch'"
|
||||
>
|
||||
<el-input v-model="item.batch" placeholder="批次号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- 删除按钮 -->
|
||||
<el-col :span="1">
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
content="删除"
|
||||
placement="top"
|
||||
>
|
||||
<el-button
|
||||
@click="deleteItem(index)"
|
||||
style="
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0px;
|
||||
margin-top: 4px;
|
||||
"
|
||||
>
|
||||
<i class="el-icon-remove-outline" style="font-size: 20px"></i>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div>
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
content="添加条件"
|
||||
placement="top"
|
||||
>
|
||||
<el-button
|
||||
@click="addConditions"
|
||||
style="
|
||||
cursor: pointer;
|
||||
width: 95%;
|
||||
color: #fe000c;
|
||||
border: 1px dashed #fe000c;
|
||||
height: 40px;
|
||||
padding: 0px;
|
||||
margin-top: 2px;
|
||||
margin-left: 20px;
|
||||
font-size: 26px;
|
||||
"
|
||||
>
|
||||
+
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
|
@ -167,140 +241,151 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getfifoList,createInventory,getWarehouseList} from "@/api/inm";
|
||||
import {
|
||||
getfifoList,
|
||||
createInventory,
|
||||
getWarehouseList,
|
||||
audit,
|
||||
} from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getMaterialList} from "@/api/mtm";
|
||||
import { getUserList} from "@/api/user";
|
||||
import { getMaterialList } from "@/api/mtm";
|
||||
import { getUserList } from "@/api/user";
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaulteinventory = {
|
||||
details:[
|
||||
{
|
||||
material:'', // 物料
|
||||
count:'',//数量
|
||||
batch:'',//批次
|
||||
|
||||
}
|
||||
],
|
||||
details: [
|
||||
{
|
||||
material: "", // 物料
|
||||
count: "", //数量
|
||||
batch: "", //批次
|
||||
},
|
||||
],
|
||||
};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
inventory: defaulteinventory,
|
||||
fifoList: {
|
||||
fifoList: {
|
||||
count: 0,
|
||||
},
|
||||
types_:{
|
||||
|
||||
1:'生产领料',
|
||||
2:'销售提货',
|
||||
3:'采购入库',
|
||||
4:'生产入库',
|
||||
|
||||
|
||||
types_: {
|
||||
1: "生产领料",
|
||||
2: "销售提货",
|
||||
3: "采购入库",
|
||||
4: "生产入库",
|
||||
},
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
warehouseData:[],
|
||||
materialoptions:[],
|
||||
userData:[],
|
||||
warehouseData: [],
|
||||
materialoptions: [],
|
||||
userData: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getlists()
|
||||
this.getlists();
|
||||
this.getList();
|
||||
this.getUser();
|
||||
this.getmaterialList();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
|
||||
getfifoList(this.listQuery).then((response) => {
|
||||
|
||||
getfifoList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.fifoList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
|
||||
},
|
||||
//出入库详情
|
||||
handleDetail(scope){
|
||||
this.$router.push({name: "fifodetail", params: { id: scope.row.id }, })
|
||||
//出入库详情
|
||||
handleDetail(scope) {
|
||||
this.$router.push({ name: "fifodetail", params: { id: scope.row.id } });
|
||||
},
|
||||
|
||||
getlists(){
|
||||
getWarehouseList({page:0}).then((response) => {
|
||||
getlists() {
|
||||
getWarehouseList({ page: 0 }).then((response) => {
|
||||
if (response.data) {
|
||||
this.warehouseData = genTree(response.data);
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
getUser() {
|
||||
getUserList({page:0}).then(res => {
|
||||
if (res.data) {
|
||||
this.userData = genTree(res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
addConditions () {
|
||||
|
||||
if(this.inventory.details.length<=10) {
|
||||
this.inventory.details.push({
|
||||
material:'', // 物料
|
||||
count:'', //数量
|
||||
batch:'', // 批次
|
||||
|
||||
});
|
||||
} else {
|
||||
this.$message('最多可添加十项条件');
|
||||
}
|
||||
},
|
||||
deleteItem (index) {
|
||||
this.inventory.details.splice(index, 1)
|
||||
},
|
||||
//物料
|
||||
getUser() {
|
||||
getUserList({ page: 0 }).then((res) => {
|
||||
if (res.data) {
|
||||
this.userData = genTree(res.data);
|
||||
}
|
||||
});
|
||||
},
|
||||
addConditions() {
|
||||
if (this.inventory.details.length <= 10) {
|
||||
this.inventory.details.push({
|
||||
material: "", // 物料
|
||||
count: "", //数量
|
||||
batch: "", // 批次
|
||||
});
|
||||
} else {
|
||||
this.$message("最多可添加十项条件");
|
||||
}
|
||||
},
|
||||
deleteItem(index) {
|
||||
this.inventory.details.splice(index, 1);
|
||||
},
|
||||
//物料
|
||||
getmaterialList() {
|
||||
this.listLoading = true;
|
||||
getMaterialList({pageoff:true}).then((response) => {
|
||||
getMaterialList({ pageoff: true }).then((response) => {
|
||||
if (response.data) {
|
||||
this.materialoptions = genTree(response.data);
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
handleCreate()
|
||||
{
|
||||
this.inventory.details=[
|
||||
{
|
||||
material:'', // 物料
|
||||
count:'',//数量
|
||||
batch:'',//批次
|
||||
|
||||
}
|
||||
];
|
||||
this.inventory = Object.assign({}, defaulteinventory);
|
||||
handleCreate() {
|
||||
this.inventory.details = [
|
||||
{
|
||||
material: "", // 物料
|
||||
count: "", //数量
|
||||
batch: "", //批次
|
||||
},
|
||||
];
|
||||
this.inventory = Object.assign({}, defaulteinventory);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
},
|
||||
//审核
|
||||
handleAudit(scope) {
|
||||
this.$confirm("是否通过?", "提示", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then(async () => {
|
||||
await audit(scope.row.id);
|
||||
this.getList();
|
||||
this.$message.success("已审核");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
|
@ -309,25 +394,21 @@ export default {
|
|||
this.listQuery = {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
}
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
|
||||
|
||||
|
||||
async confirm(form) {
|
||||
console.log(this.inventory)
|
||||
|
||||
createInventory(this.inventory).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
console.log(this.inventory);
|
||||
|
||||
createInventory(this.inventory).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,32 +1,6 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<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-table
|
||||
v-loading="listLoading"
|
||||
:data="fifodetailList.results"
|
||||
|
@ -36,30 +10,53 @@
|
|||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名称">
|
||||
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="物料批次">
|
||||
|
||||
<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_.number }}</template>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.material_.number
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料单位">
|
||||
<el-table-column label="物料单位">
|
||||
<template slot-scope="scope">{{ scope.row.material_.unit }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号">
|
||||
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
|
||||
<el-table-column label="物料型号">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.material_.specification
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量">
|
||||
|
||||
<el-table-column label="入库数量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="是否检查">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_tested == false">未检查</el-tag>
|
||||
<el-tag v-else>已检查</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查是否合格">
|
||||
<template slot-scope="scope" v-if="scope.row.is_tested == true">
|
||||
<el-tag v-if="scope.row.is_testok == false">不合格</el-tag>
|
||||
<el-tag v-else>合格</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="scope.row.is_tested == false"
|
||||
@click="handleMaterial(scope)"
|
||||
>检查</el-link
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="fifodetailList.count > 0"
|
||||
|
@ -69,14 +66,146 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
|
||||
<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
|
||||
width="30%"
|
||||
title="检查项目"
|
||||
:visible.sync="innerVisible"
|
||||
append-to-body
|
||||
>
|
||||
<el-form label-width="80px" label-position="right">
|
||||
<el-row v-for="(item, $index) in fieldList" :key="$index">
|
||||
<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
|
||||
v-else-if="item.field_type === 'int'"
|
||||
: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 === '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
|
||||
style="width: 100%"
|
||||
v-model="item.sort"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
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-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>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="innerVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitfield"
|
||||
>提交检查项目</el-button
|
||||
>
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getfifodetailList } from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getMaterialList} from "@/api/mtm";
|
||||
import { getUserList} from "@/api/user";
|
||||
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||
import { createTestrecord } from "@/api/qm";
|
||||
import { getUserList } from "@/api/user";
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
|
@ -84,22 +213,32 @@ export default {
|
|||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
InventoryList: {
|
||||
InventoryList: {
|
||||
count: 0,
|
||||
},
|
||||
fifodetailList: {
|
||||
count: 0,
|
||||
},
|
||||
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
fieldList: {
|
||||
count: 0,
|
||||
},
|
||||
is_testok: "true",
|
||||
field: [],
|
||||
recordformList: [],
|
||||
recordform: "",
|
||||
fifo_detail: "",
|
||||
listQueryrecordform: {
|
||||
page: 0,
|
||||
},
|
||||
outerVisible: false,
|
||||
innerVisible: false,
|
||||
testrecord: {},
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -110,22 +249,67 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
|
||||
this.listQuery.fifo=this.$route.params.id;
|
||||
getfifodetailList(this.listQuery).then((response) => {
|
||||
|
||||
this.listQuery.fifo = this.$route.params.id;
|
||||
getfifodetailList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.fifodetailList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
handleMaterial(scope) {
|
||||
//调该物料对应的检查表
|
||||
this.outerVisible = true;
|
||||
this.fifo_detail = scope.row.id;
|
||||
this.listQueryrecordform.material = scope.row.material;
|
||||
this.listQueryrecordform.type = 2;
|
||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||
if (response.data) {
|
||||
this.recordformList = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
//根据选择的表,渲染检查项目
|
||||
submitrecordform() {
|
||||
if (this.recordform != "") {
|
||||
getrffieldList({ form: this.recordform, page: 0 }).then((response) => {
|
||||
if (response.data) {
|
||||
this.fieldList = response.data;
|
||||
this.innerVisible = true;
|
||||
}
|
||||
});
|
||||
} else this.$message.error("请选择检查表!");
|
||||
},
|
||||
//提交检查项目
|
||||
submitfield() {
|
||||
let _this = this;
|
||||
_this.field = []; //检查项目
|
||||
this.fieldList.forEach((item) => {
|
||||
|
||||
_this.field.push({
|
||||
form_field:item.id,
|
||||
field_value:item.sort
|
||||
});
|
||||
});
|
||||
|
||||
console.log(this.recordform);
|
||||
this.testrecord.form = this.recordform;
|
||||
this.testrecord.record_data = _this.field;
|
||||
this.testrecord.fifo_item = this.fifo_detail;
|
||||
|
||||
this.testrecord.is_testok = this.is_testok;
|
||||
createTestrecord(this.testrecord).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.innerVisible = false;
|
||||
this.outerVisible = false;
|
||||
this.getList();
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -2,31 +2,30 @@
|
|||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<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-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-table
|
||||
v-loading="listLoading"
|
||||
:data="InventoryList.results"
|
||||
|
@ -36,32 +35,32 @@
|
|||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料批次">
|
||||
<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.material_.number }}</template>
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.material_.number
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库名称">
|
||||
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||
<el-table-column label="仓库名称">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.warehouse_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库编号">
|
||||
<template slot-scope="scope">{{ scope.row.warehouse_.number }}</template>
|
||||
<el-table-column label="仓库编号">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.warehouse_.number
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料总存量">
|
||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="InventoryList.count > 0"
|
||||
|
@ -71,14 +70,19 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getInventoryList,getfifoList,getmaterialbatchList,createInventory,getWarehouseList } from "@/api/inm";
|
||||
import {
|
||||
getInventoryList,
|
||||
getfifoList,
|
||||
getmaterialbatchList,
|
||||
createInventory,
|
||||
getWarehouseList,
|
||||
} from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getMaterialList} from "@/api/mtm";
|
||||
import { getUserList} from "@/api/user";
|
||||
import { getMaterialList } from "@/api/mtm";
|
||||
import { getUserList } from "@/api/user";
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
|
@ -86,46 +90,39 @@ export default {
|
|||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
InventoryList: {
|
||||
InventoryList: {
|
||||
count: 0,
|
||||
},
|
||||
|
||||
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
|
||||
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
this.getList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
|
||||
getmaterialbatchList(this.listQuery).then((response) => {
|
||||
|
||||
getmaterialbatchList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.InventoryList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
|
@ -134,13 +131,9 @@ export default {
|
|||
this.listQuery = {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
}
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -2,33 +2,33 @@
|
|||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<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>
|
||||
<div style="margin-top: 2px">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增仓库</el-button
|
||||
>
|
||||
</div>
|
||||
<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>
|
||||
<div style="margin-top: 2px">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增仓库</el-button
|
||||
>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
|
@ -44,24 +44,20 @@
|
|||
<el-table-column label="仓库名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="仓库编号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="具体地点">
|
||||
<el-table-column label="具体地点">
|
||||
<template slot-scope="scope">{{ scope.row.place }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间">
|
||||
|
||||
<el-table-column label="创建时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
@click="handleMaterial(scope)"
|
||||
>查看物料</el-link
|
||||
|
@ -105,10 +101,9 @@
|
|||
<el-form-item label="仓库编号" prop="number">
|
||||
<el-input v-model="warehouse.number" placeholder="仓库编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="具体地点" prop="place">
|
||||
<el-form-item label="具体地点" prop="place">
|
||||
<el-input v-model="warehouse.place" placeholder="具体地点" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
|
@ -118,45 +113,52 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getWarehouseList, createWarehouse,updateWarehouse,deleteWarehouse } from "@/api/inm";
|
||||
import {
|
||||
getWarehouseList,
|
||||
createWarehouse,
|
||||
updateWarehouse,
|
||||
deleteWarehouse,
|
||||
} from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultewarehouse = {
|
||||
};
|
||||
const defaultewarehouse = {};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
warehouse: defaultewarehouse,
|
||||
warehouseList: {
|
||||
warehouseList: {
|
||||
count: 0,
|
||||
},
|
||||
options: [{
|
||||
options: [
|
||||
{
|
||||
value: 0,
|
||||
label: '运转正常'
|
||||
}, {
|
||||
label: "运转正常",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '停用'
|
||||
}, {
|
||||
label: "停用",
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '报废'
|
||||
}],
|
||||
label: "报废",
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
keeperOptions:[],
|
||||
depOptions:[],
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
rule1: {
|
||||
name: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
place: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
number: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
place: [{ required: true, message: "请输入", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
@ -177,9 +179,9 @@ export default {
|
|||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
//跳转到该仓库的物料表
|
||||
handleMaterial(scope){
|
||||
this.$router.push({name: "inventory", params: { id: scope.row.id }, })
|
||||
//跳转到该仓库的物料表
|
||||
handleMaterial(scope) {
|
||||
this.$router.push({ name: "inventory", params: { id: scope.row.id } });
|
||||
},
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
|
@ -189,7 +191,7 @@ export default {
|
|||
this.listQuery = {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
}
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
handleCreate() {
|
||||
|
@ -200,7 +202,7 @@ export default {
|
|||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
handleEdit(scope) {
|
||||
this.warehouse = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType = "edit";
|
||||
|
@ -224,7 +226,7 @@ export default {
|
|||
console.error(err);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
async confirm(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
|
@ -241,7 +243,7 @@ export default {
|
|||
createWarehouse(this.warehouse).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 16px;
|
||||
font-weight: 700;
|
||||
">过程记录表</span>
|
||||
">物料检验记录表</span>
|
||||
</div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增</el-button>
|
||||
|
@ -187,7 +187,7 @@
|
|||
<el-table-column label="是否判定">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.need_judge==true">是</el-tag>
|
||||
<el-tag v-else>是</el-tag>
|
||||
<el-tag v-else>否</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -251,10 +251,10 @@
|
|||
<el-switch v-model="field.need_judge"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="上限值" prop="high_limit">
|
||||
<el-form-item label="上限值" v-if="field.need_judge==true" prop="high_limit">
|
||||
<el-input-number v-model="field.high_limit" :precision="2" :min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="上限规则" prop="high_rule">
|
||||
<el-form-item label="上限规则" v-if="field.need_judge==true" prop="high_rule">
|
||||
<el-select style="width: 100%" v-model="field.high_rule" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in highoptions"
|
||||
|
@ -264,10 +264,10 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="下限值" prop="low_limit">
|
||||
<el-form-item label="下限值" v-if="field.need_judge==true" prop="low_limit">
|
||||
<el-input-number v-model="field.low_limit" :precision="2" :min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="下限规则" prop="low_rule">
|
||||
<el-form-item label="下限规则" v-if="field.need_judge==true" prop="low_rule">
|
||||
<el-select style="width: 100%" v-model="field.low_rule" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in lowoptions"
|
||||
|
@ -429,7 +429,7 @@
|
|||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.step.process = this.$route.params.id;
|
||||
this.material = this.$route.params.id;
|
||||
this.recordformLists();
|
||||
|
||||
},
|
||||
|
@ -461,7 +461,7 @@
|
|||
},
|
||||
recordformLists()
|
||||
{
|
||||
this.listQueryrecordform.step=this.stepid;
|
||||
this.listQueryrecordform.material=this.material;
|
||||
this.listQueryrecordform.type=2;
|
||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||
if (response.data) {
|
||||
|
@ -476,8 +476,7 @@
|
|||
getrffieldList(this.listQueryfield).then((response) => {
|
||||
if (response.data) {
|
||||
this.fieldList = response.data;
|
||||
debugger;
|
||||
console.log(this.fieldList)
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
:value="item.number">{{item.name}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="子工序类型">
|
||||
<template slot-scope="scope"> {{ type_[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="排序">
|
||||
<template slot-scope="scope">{{ scope.row.sort }}</template>
|
||||
</el-table-column>
|
||||
|
@ -88,6 +93,18 @@
|
|||
<el-input type="textarea" :rows="3" v-model="step.instruction_content" placeholder="指导书内容" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="子工序类型" prop="type">
|
||||
<el-select style="width: 100%" v-model="step.type" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in typeoption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input-number
|
||||
v-model="step.sort"
|
||||
|
@ -428,6 +445,12 @@
|
|||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
type_: {
|
||||
1:'普通',
|
||||
2:'分割',
|
||||
3:'结合',
|
||||
|
||||
},
|
||||
options_: {
|
||||
'string':'文本',
|
||||
'int':'整数',
|
||||
|
@ -437,6 +460,18 @@
|
|||
'select': '单选',
|
||||
'selects': '多选',
|
||||
},
|
||||
typeoption: [{
|
||||
value: '1',
|
||||
label: '普通'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '分割'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '结合'
|
||||
}],
|
||||
fieldtypeoptions: [{
|
||||
value: 'string',
|
||||
label: '文本'
|
||||
|
|
|
@ -12,13 +12,16 @@
|
|||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
max-height="400"
|
||||
max-height="700"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="分解产品名称">
|
||||
<template slot-scope="scope">{{ scope.row.subproduction_.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="生产子计划名">
|
||||
<el-table-column label="生产车间">
|
||||
<template slot-scope="scope">{{ scope.row.workshop_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名">
|
||||
|
@ -36,6 +39,9 @@
|
|||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产个数">
|
||||
<template slot-scope="scope">{{ scope.row.main_count }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开工时间">
|
||||
<template slot-scope="scope">{{ scope.row.start_date }}</template>
|
||||
|
|
|
@ -2,33 +2,33 @@
|
|||
<div class="app-container">
|
||||
<el-card>
|
||||
<div>
|
||||
<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>
|
||||
<div style="margin-top: 2px">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增项目</el-button
|
||||
>
|
||||
</div>
|
||||
<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>
|
||||
<div style="margin-top: 2px">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||
>新增项目</el-button
|
||||
>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-table
|
||||
|
@ -44,27 +44,24 @@
|
|||
<el-table-column label="项目名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="条款号">
|
||||
<template slot-scope="scope">{{ scope.row.term_number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标准名称">
|
||||
<el-table-column label="标准名称">
|
||||
<template slot-scope="scope">{{ scope.row.standard_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="标准编号">
|
||||
<template slot-scope="scope">{{ scope.row.standard_.number }}</template>
|
||||
<el-table-column label="标准编号">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.standard_.number
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间">
|
||||
|
||||
<el-table-column label="创建时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
@click="handleEdit(scope)"
|
||||
|
@ -104,18 +101,21 @@
|
|||
<el-form-item label="条款号" prop="term_number">
|
||||
<el-input v-model="testitem.term_number" placeholder="条款号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标准" prop="standard">
|
||||
<el-select style="width: 100%" v-model="testitem.standard" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
<el-form-item label="标准" prop="standard">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="testitem.standard"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
|
@ -125,27 +125,31 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getTestitemList, createTestitem,updateTestitem,deleteTestitem,getStandardList } from "@/api/qm";
|
||||
import {
|
||||
getTestitemList,
|
||||
createTestitem,
|
||||
updateTestitem,
|
||||
deleteTestitem,
|
||||
getStandardList,
|
||||
} from "@/api/qm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaultetestitem = {
|
||||
};
|
||||
const defaultetestitem = {};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
testitem: defaultetestitem,
|
||||
testitemList: {
|
||||
testitemList: {
|
||||
count: 0,
|
||||
},
|
||||
listQuery: {
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
options:[],
|
||||
options: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
|
@ -159,7 +163,7 @@ export default {
|
|||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getLists()
|
||||
this.getLists();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
@ -173,16 +177,13 @@ export default {
|
|||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
getLists() {
|
||||
|
||||
getStandardList({pageoff:true}).then((response) => {
|
||||
|
||||
this.options = genTree(response.data);
|
||||
|
||||
|
||||
getLists() {
|
||||
getStandardList({ pageoff: true }).then((response) => {
|
||||
this.options = genTree(response.data);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
|
@ -191,7 +192,7 @@ export default {
|
|||
this.listQuery = {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
}
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
handleCreate() {
|
||||
|
@ -202,7 +203,7 @@ export default {
|
|||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
handleEdit(scope) {
|
||||
this.testitem = Object.assign({}, scope.row); // copy obj
|
||||
this.dialogType = "edit";
|
||||
|
@ -226,7 +227,7 @@ export default {
|
|||
console.error(err);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
async confirm(form) {
|
||||
this.$refs[form].validate((valid) => {
|
||||
if (valid) {
|
||||
|
@ -243,7 +244,7 @@ export default {
|
|||
createTestitem(this.testitem).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getList();
|
||||
this.dialogVisible = false;
|
||||
this.dialogVisible = false;
|
||||
this.$message.success("成功");
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,130 +1,194 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
|
||||
<el-tab-pane :key="item.name" v-for="item in processOption"
|
||||
:label="item.name"
|
||||
|
||||
:name="item.id"
|
||||
|
||||
:closable="item.close">
|
||||
|
||||
|
||||
<el-table
|
||||
:data="subproductionplanList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
max-height="400"
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
|
||||
<el-tab-pane
|
||||
:key="item.name"
|
||||
v-for="item in processOption"
|
||||
:label="item.name"
|
||||
:name="item.id"
|
||||
:closable="item.close"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="生产子计划名">
|
||||
<template slot-scope="scope">{{ scope.row.workshop_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名">
|
||||
<template slot-scope="scope">{{ scope.row.process_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序编号">
|
||||
<template slot-scope="scope">{{ scope.row.process_.number }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="子工序">
|
||||
<template slot-scope="scope" v-if="scope.row.steps">
|
||||
<el-tag v-for="item in scope.row.steps"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number">{{item.name}}</el-tag>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开工时间">
|
||||
<template slot-scope="scope">{{ scope.row.start_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完工时间">
|
||||
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template slot-scope="scope">{{ state_[scope.row.state] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领料状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_picked==false">未领料</el-tag>
|
||||
<el-tag v-else>已领料</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
<el-table
|
||||
:data="subproductionplanList.results"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
@click="handleNeed(scope)"
|
||||
>领料</el-link
|
||||
>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="subproductionplanList.count > 0"
|
||||
:total="subproductionplanList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getspList"
|
||||
/>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<el-table-column label="分解产品名称">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.subproduction_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>车间物料</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="wmaterialList"
|
||||
<el-table-column label="生产车间">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.workshop_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="工序名">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.process_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序编号">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.process_.number
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="子工序">
|
||||
<template slot-scope="scope" v-if="scope.row.steps">
|
||||
<el-tag
|
||||
v-for="item in scope.row.steps"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number"
|
||||
>{{ item.name }}</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开工时间">
|
||||
<template slot-scope="scope">{{ scope.row.start_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完工时间">
|
||||
<template slot-scope="scope">{{ scope.row.end_date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<template slot-scope="scope">{{
|
||||
state_[scope.row.state]
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领料状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_picked == false">未领料</el-tag>
|
||||
<el-tag v-else>已领料</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link v-if="scope.row.state == 1" @click="handleNeed(scope)"
|
||||
>领料</el-link
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="subproductionplanList.count > 0"
|
||||
:total="subproductionplanList.count"
|
||||
:page.sync="listQuery.page"
|
||||
:limit.sync="listQuery.page_size"
|
||||
@pagination="subproductionplanList"
|
||||
/>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>车间操作</span>
|
||||
</div>
|
||||
<el-button
|
||||
type="primary"
|
||||
style="margin-left: 50px"
|
||||
v-for="item in steps"
|
||||
:key="item.number"
|
||||
:label="item.name"
|
||||
:value="item.number"
|
||||
@click="handlework(item)"
|
||||
>{{ item.name }}</el-button
|
||||
>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>半成品</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="wproductData"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
max-height="400"
|
||||
max-height="300"
|
||||
>
|
||||
|
||||
<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.material_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料单位">
|
||||
<template slot-scope="scope">{{ scope.row.material_.unit }}</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.count }}</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">{{ scope.row.m_state_.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="所在子工序">
|
||||
<template slot-scope="scope">{{ scope.row.p_state_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所在子工序执行状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_executed" >已执行</el-tag>
|
||||
<el-tag v-else >待执行</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="更新时间">
|
||||
<template slot-scope="scope">{{ scope.row.update_time }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>车间物料</span>
|
||||
</div>
|
||||
<el-table
|
||||
:data="wmaterialList"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
max-height="400"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
<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.material_.unit
|
||||
}}</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.count }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisible"
|
||||
:title="dialogType === 'edit' ? '编辑领料' : '选择仓库领料'"
|
||||
|
@ -134,133 +198,349 @@
|
|||
:model="need"
|
||||
label-width="80px"
|
||||
label-position="right"
|
||||
|
||||
>
|
||||
|
||||
<el-form-item label="仓库" prop="warehouse">
|
||||
<el-select style="width: 100%" v-model="need.warehouse" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in warehouseoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
<el-form-item label="仓库" prop="warehouse">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="need.warehouse"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in warehouseoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirm('Form')">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisiblenw"
|
||||
title="领料"
|
||||
<el-dialog :visible.sync="dialogVisiblenw" title="领料">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>生产所需领料表</span>
|
||||
</div>
|
||||
<template>
|
||||
<el-table :data="needwl" style="width: 100%">
|
||||
<el-table-column prop="material_.name" label="物料名称">
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_.number" label="物料编号">
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_.specification" label="物料规格">
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_.unit" label="物料单位">
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" label="所需物料数量">
|
||||
</el-table-column>
|
||||
<el-table-column prop="count_real" label="已领物料数量">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>当前仓库物料表</span>
|
||||
<el-button
|
||||
style="float: right; padding: 3px 0"
|
||||
@click="handlePick"
|
||||
type="text"
|
||||
>确认领料</el-button
|
||||
>
|
||||
</div>
|
||||
<template>
|
||||
<el-table :data="havewl" style="width: 100%" ref="multipleTable">
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column prop="batch" label="物料批次"> </el-table-column>
|
||||
<el-table-column prop="material_.name" label="物料名称">
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouse_.name" label="物料所在仓库">
|
||||
</el-table-column
|
||||
>\
|
||||
<el-table-column prop="count" label="物料总数量"> </el-table-column>
|
||||
<el-table-column label="输入领料数量" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<el-form :model="scope.row" widht="100px">
|
||||
<el-form-item size="mini">
|
||||
<el-input-number
|
||||
v-model="scope.row.pick_count"
|
||||
:min="0"
|
||||
:precision="2"
|
||||
:controls="false"
|
||||
:value="0"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="count_real" label="已领物料数量">
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_.specification" label="物料规格">
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_.unit" label="物料单位">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:visible.sync="dialogVisiblework"
|
||||
:fullscreen="true"
|
||||
title="填写记录"
|
||||
>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>生产所需领料表</span>
|
||||
|
||||
</div>
|
||||
<template>
|
||||
<el-steps
|
||||
:active="values"
|
||||
spac="400px"
|
||||
align-center=""
|
||||
finish-status="success"
|
||||
style="padding-top: 20px"
|
||||
>
|
||||
<el-step
|
||||
:title="item.name"
|
||||
v-for="(item, index) in forms"
|
||||
:key="index"
|
||||
@click.native="stepclick(item.id)"
|
||||
>
|
||||
</el-step>
|
||||
</el-steps>
|
||||
|
||||
<el-table :data="needwl" style="width: 100%">
|
||||
<el-table-column prop="material_.name" label="物料名称" > </el-table-column>
|
||||
<el-table-column prop="material_.number" label="物料编号"> </el-table-column>
|
||||
<el-table-column prop="material_.specification" label="物料规格" > </el-table-column>
|
||||
<el-table-column prop="material_.unit" label="物料单位" > </el-table-column>
|
||||
<el-table-column prop="count" label="所需物料数量" > </el-table-column>
|
||||
<el-table-column prop="count_real" label="已领物料数量" > </el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
</template>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>当前仓库物料表</span>
|
||||
<el-button style="float: right; padding: 3px 0" @click="handlePick" type="text">确认领料</el-button>
|
||||
</div>
|
||||
<template>
|
||||
|
||||
<el-table :data="havewl" style="width: 100%" ref="multipleTable">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column prop="batch" label="物料批次" > </el-table-column>
|
||||
<el-table-column prop="material_.name" label="物料名称"> </el-table-column>
|
||||
<el-table-column prop="warehouse_.name" label="物料所在仓库" > </el-table-column>\
|
||||
<el-table-column prop="count" label="物料总数量" > </el-table-column>
|
||||
<el-table-column label="输入领料数量" width="140px">
|
||||
<template slot-scope="scope" >
|
||||
<el-form :model="scope.row" widht="100px">
|
||||
<el-card class="box-card" v-if="values === 0">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>消耗物料表</span>
|
||||
</div>
|
||||
<el-table :data="input" border style="width: 100%">
|
||||
|
||||
|
||||
<el-table-column prop="material__name" label="物料名称" width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="material__batch" label="物料批次" 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" >
|
||||
<el-form :model="scope.row">
|
||||
<el-form-item size="mini">
|
||||
<el-input-number v-model="scope.row.pick_count" :min="0" :precision="2" :controls="false" :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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="count_real" label="已领物料数量" > </el-table-column>
|
||||
<el-table-column prop="material_.specification" label="物料规格" > </el-table-column>
|
||||
<el-table-column prop="material_.unit" label="物料单位" > </el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card class="box-card" v-if="values === 0">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>产出物料表</span>
|
||||
</div>
|
||||
<el-table :data="output" border style="width: 100%">
|
||||
|
||||
<el-table-column prop="material__name" label="物料名称" width="180">
|
||||
</el-table-column>
|
||||
|
||||
</template>
|
||||
</el-card>
|
||||
<el-table-column prop="count_output" label="产出数量" width="180">
|
||||
<template slot-scope="scope" >
|
||||
<el-form :model="scope.row">
|
||||
<el-form-item size="mini">
|
||||
<el-input-number v-model="scope.row.count_output" :min="0" :value="0"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<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-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
|
||||
v-else-if="item.field_type === 'int'"
|
||||
: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 === '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
|
||||
style="width: 100%"
|
||||
v-model="item.sort"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
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-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-button
|
||||
style="margin-top: 12px"
|
||||
@click="next"
|
||||
v-if="values == 0 || values == 1 || values == 2"
|
||||
>下一步</el-button
|
||||
>
|
||||
<el-button
|
||||
style="margin-top: 12px"
|
||||
@click="prev"
|
||||
v-if="values == 1 || values == 2 || values == 3"
|
||||
>上一步</el-button
|
||||
>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogVisiblework = false"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button type="primary" @click="submint()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getsubproductionplanList,createPick_need } from "@/api/pm";
|
||||
import { getsubproductionplanList, createPick_need } from "@/api/pm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getProcessList} from "@/api/mtm";
|
||||
import { createPick,getwmaterialList } from "@/api/wpm";
|
||||
import { getProcessList } from "@/api/mtm";
|
||||
import { createPick, getwmaterialList,submitWork,getwproductList} from "@/api/wpm";
|
||||
import { getWarehouseList } from "@/api/inm";
|
||||
import { createWork } from "@/api/wpm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
const defaulteneed = {
|
||||
};
|
||||
const defaulteneed = {};
|
||||
export default {
|
||||
components: { Pagination },
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
need: defaulteneed,
|
||||
need: defaulteneed,
|
||||
subproductionplanList: {
|
||||
count: 0,
|
||||
},
|
||||
wmaterialList:"",
|
||||
wmaterialList: "",
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
activeName:'0',
|
||||
havewl:"",
|
||||
needwl:"",
|
||||
state_:{
|
||||
0:'制定中',
|
||||
1:'已下达',
|
||||
2:'已接受',
|
||||
3:'生产中',
|
||||
4:'已完成'},
|
||||
values: 0,
|
||||
active: 0,
|
||||
activeName: "1",
|
||||
havewl: "",
|
||||
needwl: "",
|
||||
state_: {
|
||||
0: "制定中",
|
||||
1: "已下达",
|
||||
2: "已接受",
|
||||
3: "生产中",
|
||||
4: "已完成",
|
||||
},
|
||||
listLoading: true,
|
||||
listLoading: true,
|
||||
id:"",
|
||||
warehouseoptions:[],
|
||||
listLoading: true,
|
||||
id: "",
|
||||
warehouseoptions: [],
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
dialogVisiblenw: false,
|
||||
dialogVisiblework: false,
|
||||
dialogVisiblenw: false,
|
||||
dialogTypenw: "new",
|
||||
picks:[],
|
||||
pickData:{},
|
||||
picks: [],
|
||||
pickData: {},
|
||||
steps: [],
|
||||
step:null,
|
||||
processOption:"",
|
||||
subproduction_plan: "",
|
||||
form1: [],
|
||||
form2: [],
|
||||
form3: [],
|
||||
input: [],
|
||||
output: [],
|
||||
forms:[],
|
||||
inputData:[],
|
||||
outputData:[],
|
||||
field1:[],
|
||||
field2:[],
|
||||
fromData:[],
|
||||
wproductData:"",
|
||||
wpID:[],
|
||||
multipleSelection: [],
|
||||
wproducts:[],
|
||||
otherforms:[],
|
||||
from:[],
|
||||
};
|
||||
},
|
||||
process: "",
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
@ -269,96 +549,200 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
//选项卡切换
|
||||
handleClick(tab)
|
||||
{
|
||||
|
||||
this.listQuery.process=tab.name;
|
||||
getsubproductionplanList(this.listQuery).then((response) => {
|
||||
handleClick(tab) {
|
||||
this.process = tab.name;
|
||||
this.listQuery.process = tab.name;
|
||||
this.steps = [];
|
||||
getsubproductionplanList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
this.subproductionplanList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
getwmaterialList({process:tab.name,page:0}).then((response) => {
|
||||
getwmaterialList({
|
||||
subproduction_plan__process: this.process,
|
||||
page: 0,
|
||||
}).then((response) => {
|
||||
if (response.data) {
|
||||
this.wmaterialList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
//工序对应的子计划,弹出对应的车间物料
|
||||
handleCurrentChange(row) {
|
||||
this.steps = row.steps; //调出子工序
|
||||
this.subproduction_plan = row.id; //子计划Id
|
||||
getwmaterialList({
|
||||
subproduction_plan__process: this.process,
|
||||
subproduction_plan: row.id,
|
||||
page: 0,
|
||||
}).then((response) => {
|
||||
if (response.data) {
|
||||
this.wmaterialList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
this.getwproductLists();
|
||||
},
|
||||
//工序渲染
|
||||
getProcessList(){
|
||||
getProcessList({page:0}).then((response) => {
|
||||
getProcessList() {
|
||||
getProcessList({ page: 0 }).then((response) => {
|
||||
if (response.data) {
|
||||
this.processOption = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
|
||||
getWarehouseLists(){
|
||||
getWarehouseList({page:0}).then((response) => {
|
||||
},
|
||||
|
||||
getWarehouseLists() {
|
||||
getWarehouseList({ page: 0 }).then((response) => {
|
||||
if (response.data) {
|
||||
this.warehouseoptions = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
handleNeed(scope){
|
||||
handleNeed(scope) {
|
||||
this.need = Object.assign({}, defaulteneed);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
this.id=scope.row.id;
|
||||
this.id = scope.row.id;
|
||||
this.$nextTick(() => {
|
||||
this.$refs["Form"].clearValidate();
|
||||
});
|
||||
},
|
||||
async confirm(form) {
|
||||
|
||||
createPick_need( this.id,this.need).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.dialogVisible = false;
|
||||
this.dialogVisiblenw = true;
|
||||
this.havewl=res.data.have;
|
||||
this.needwl=res.data.need;
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
async confirm(form) {
|
||||
createPick_need(this.id, this.need).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.dialogVisible = false;
|
||||
this.dialogVisiblenw = true;
|
||||
this.havewl = res.data.have;
|
||||
this.needwl = res.data.need;
|
||||
}
|
||||
});
|
||||
},
|
||||
//确认领料
|
||||
handlePick()
|
||||
{
|
||||
|
||||
let _this=this
|
||||
_this.picks=[]//所需物料
|
||||
this.$refs.multipleTable.selection.forEach((item) => {
|
||||
_this.picks.push({
|
||||
"material":item.material,
|
||||
"batch": item.batch,
|
||||
"pick_count":item.pick_count
|
||||
handlePick() {
|
||||
let _this = this;
|
||||
_this.picks = []; //所需物料
|
||||
this.$refs.multipleTable.selection.forEach((item) => {
|
||||
_this.picks.push({
|
||||
material: item.material,
|
||||
batch: item.batch,
|
||||
pick_count: item.pick_count,
|
||||
});
|
||||
|
||||
});
|
||||
this.pickData.subproduction_plan = this.id;
|
||||
this.pickData.warehouse = this.need.warehouse;
|
||||
this.pickData.picks = this.picks;
|
||||
this.pickData.picks = this.picks;
|
||||
|
||||
// console.log(this.pickData);
|
||||
|
||||
console.log(this.pickData)
|
||||
|
||||
createPick(this.pickData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.$message.success("领料成功!");
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
if (res.code >= 200) {
|
||||
this.$message.success("领料成功!");
|
||||
}
|
||||
});
|
||||
},
|
||||
prev() {
|
||||
--this.values;
|
||||
if (this.values < 0) this.values = 0;
|
||||
},
|
||||
next() {
|
||||
if (this.values++ > this.forms.length) this.values = 0;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
let _this = this;
|
||||
_this.wpID = [];
|
||||
val.forEach((item) => {
|
||||
_this.wpID.push(item.id);
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
//车间操作
|
||||
handlework(item) {
|
||||
|
||||
this.step=item.id;
|
||||
// console.log(this.wpID);
|
||||
createWork({
|
||||
step: item.id,
|
||||
wproducts:this.wpID,
|
||||
subproduction_plan: this.subproduction_plan,
|
||||
}).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.dialogVisiblework = true;
|
||||
this.forms=res.data.forms;
|
||||
this.otherforms=res.data.forms.slice(0);//渲染生产表
|
||||
this.otherforms.shift();
|
||||
//console.log(this.otherforms)
|
||||
this.input = res.data.forms[0].input; //消耗
|
||||
this.output = res.data.forms[0].output; //产出
|
||||
this.wproducts=res.data.forms[0].wproducts;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
//提交
|
||||
submint(){
|
||||
this.form = [];
|
||||
this.otherforms.forEach((item) => {
|
||||
let _this = this;
|
||||
_this.field1 = [];
|
||||
item.form_fields.forEach((items) => {
|
||||
_this.field1.push({
|
||||
form_field:items.id,
|
||||
field_value:items.sort
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
this.form.push({
|
||||
form:item.id,
|
||||
record_data:_this.field1
|
||||
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
|
||||
console.log( this.form);
|
||||
|
||||
|
||||
submitWork({
|
||||
step:this.step,
|
||||
subproduction_plan:this.subproduction_plan,
|
||||
wproducts:this.wproducts,
|
||||
input: this.input,
|
||||
output: this.output,
|
||||
forms: this.from
|
||||
}).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.dialogVisiblework = false;
|
||||
this.$message.success("成功!");
|
||||
this.getwproductLists();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
//大工序下子工序产出的半成品
|
||||
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