Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
1dbc8e2398
|
@ -15,4 +15,19 @@ export function createProductionplan(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//计算物料配置
|
||||||
|
export function createresource(data) {
|
||||||
|
return request({
|
||||||
|
url: '/pm/resource/cal/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//产品对应的设备
|
||||||
|
export function createequip(data) {
|
||||||
|
return request({
|
||||||
|
url: '/pm/resource/cal_equip/',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -144,14 +144,7 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="绑定工序" prop="processes" v-if="material.type==1">
|
|
||||||
<el-transfer
|
|
||||||
v-model="material.processes"
|
|
||||||
:data="processOptions"
|
|
||||||
:titles="['工序清单', '选择的工序清单']"
|
|
||||||
:props="{ key: 'id', label: 'name' }"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="排序" prop="sort_str">
|
<el-form-item label="排序" prop="sort_str">
|
||||||
<el-input v-model="material.sort_str" placeholder="排序" />
|
<el-input v-model="material.sort_str" placeholder="排序" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
|
@ -80,13 +80,17 @@
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
|
highlight-current-row
|
||||||
@current-change="handlespChange"
|
@current-change="handlespChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
<el-table-column label="物料编号">
|
<el-table-column label="分解产品名称">
|
||||||
<template slot-scope="scope">{{scope.row.name}}</template>
|
<template slot-scope="scope">{{scope.row.name}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="单位消耗量">
|
<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.sort }}</template>
|
<template slot-scope="scope">{{ scope.row.sort }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -127,6 +131,17 @@
|
||||||
|
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="subproducation.name" />
|
<el-input v-model="subproducation.name" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="绑定工序" prop="process" >
|
||||||
|
<el-select v-model="subproducation.process" placeholder="请选择" >
|
||||||
|
<el-option
|
||||||
|
v-for="item in processOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-form-item label="排序" prop="sort">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
|
@ -213,17 +228,11 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item label="消耗量" prop="count">
|
<el-form-item label="消耗量" prop="count">
|
||||||
<el-input v-model="inputmaterial.count" placeholder="输入整数或小数" />
|
<el-input-number v-model="inputmaterial.count" :min="0" placeholder="输入整数或小数" />
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="排序" prop="sort">
|
|
||||||
<el-input-number
|
|
||||||
v-model="inputmaterial.sort"
|
|
||||||
:min="-2147483648"
|
|
||||||
:max="2147483647"
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="输入物料" prop="unit">
|
<el-form-item label="输入物料" prop="unit">
|
||||||
<el-select style="width: 100%" v-model="inputmaterial.material" placeholder="请选择">
|
<el-select filterable style="width: 100%" v-model="inputmaterial.material" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in materialoptions"
|
v-for="item in materialoptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
|
@ -232,7 +241,13 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input-number
|
||||||
|
v-model="inputmaterial.sort"
|
||||||
|
:min="-2147483648"
|
||||||
|
:max="2147483647"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -305,15 +320,9 @@
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-form-item label="产出量" prop="count">
|
<el-form-item label="产出量" prop="count">
|
||||||
<el-input v-model="outputmaterial.count" placeholder="输入整数或小数" />
|
<el-input-number v-model="outputmaterial.count" :min="0" />
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="排序" prop="sort">
|
|
||||||
<el-input-number
|
|
||||||
v-model="outputmaterial.sort"
|
|
||||||
:min="-2147483648"
|
|
||||||
:max="2147483647"
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="输出物料" prop="unit">
|
<el-form-item label="输出物料" prop="unit">
|
||||||
<el-select style="width: 100%" v-model="outputmaterial.material" placeholder="请选择">
|
<el-select style="width: 100%" v-model="outputmaterial.material" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -325,7 +334,13 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input-number
|
||||||
|
v-model="outputmaterial.sort"
|
||||||
|
:min="-2147483648"
|
||||||
|
:max="2147483647"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align: right">
|
<div style="text-align: right">
|
||||||
|
@ -507,11 +522,12 @@
|
||||||
import { getMaterialList,getMaterial,getInputmaterialList,createInputmaterial,updateInputmaterial
|
import { getMaterialList,getMaterial,getInputmaterialList,createInputmaterial,updateInputmaterial
|
||||||
,deleteInputmaterial,getOutputmaterialList,createOutputmaterial,updateOutputmaterial,deleteOutputmaterial,
|
,deleteInputmaterial,getOutputmaterialList,createOutputmaterial,updateOutputmaterial,deleteOutputmaterial,
|
||||||
getUsedstepList,createUsedstep,deleteUsedstep,getStepList,gettechdocList,createtechdoc,updatetechdoc,deletetechdoc
|
getUsedstepList,createUsedstep,deleteUsedstep,getStepList,gettechdocList,createtechdoc,updatetechdoc,deletetechdoc
|
||||||
,getsubproducationList,createsubproducation,updatesubproducation,deletesubproducation } from "@/api/mtm";
|
,getsubproducationList,createsubproducation,updatesubproducation,deletesubproducation,getProcessList } from "@/api/mtm";
|
||||||
import { quillEditor } from 'vue-quill-editor'
|
import { quillEditor } from 'vue-quill-editor'
|
||||||
import 'quill/dist/quill.core.css'
|
import 'quill/dist/quill.core.css'
|
||||||
import 'quill/dist/quill.snow.css'
|
import 'quill/dist/quill.snow.css'
|
||||||
import 'quill/dist/quill.bubble.css'
|
import 'quill/dist/quill.bubble.css'
|
||||||
|
|
||||||
import { upUrl, upHeaders } from "@/api/file";
|
import { upUrl, upHeaders } from "@/api/file";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import { genTree } from "@/utils";
|
import { genTree } from "@/utils";
|
||||||
|
@ -541,6 +557,7 @@ export default {
|
||||||
subproducationData:"",
|
subproducationData:"",
|
||||||
inputtableData:"",
|
inputtableData:"",
|
||||||
editorOption: {} ,
|
editorOption: {} ,
|
||||||
|
processOptions:[],
|
||||||
techdoc: defaulttechdoc,
|
techdoc: defaulttechdoc,
|
||||||
subproducation:defaultsubproducation,
|
subproducation:defaultsubproducation,
|
||||||
inputmaterial: defaultinputmaterial,
|
inputmaterial: defaultinputmaterial,
|
||||||
|
@ -625,7 +642,12 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//工序清单
|
||||||
|
getProcessList() {
|
||||||
|
getProcessList().then((res) => {
|
||||||
|
this.processOptions = genTree(res.data.results);
|
||||||
|
});
|
||||||
|
},
|
||||||
//获取产品,工艺
|
//获取产品,工艺
|
||||||
getMaterial(){
|
getMaterial(){
|
||||||
getMaterial(this.product).then((response) => {
|
getMaterial(this.product).then((response) => {
|
||||||
|
@ -639,11 +661,14 @@ export default {
|
||||||
handleCurrentChange(row){
|
handleCurrentChange(row){
|
||||||
this.product=row.id;
|
this.product=row.id;
|
||||||
this.getMaterial();
|
this.getMaterial();
|
||||||
|
this.getProcessList();
|
||||||
this.getsubproducationList();
|
this.getsubproducationList();
|
||||||
|
|
||||||
},
|
},
|
||||||
//点击产品分解弹出输入、输出物料,子工序,技术文件
|
//点击产品分解弹出输入、输出物料,子工序,技术文件
|
||||||
handlespChange(row){
|
handlespChange(row){
|
||||||
this.subproduction = row.id;
|
this.subproduction = row.id;
|
||||||
|
this.processes = row.process;
|
||||||
this.getmaterialList();//物料列表
|
this.getmaterialList();//物料列表
|
||||||
this.getInputmaterialLists();//输入物料
|
this.getInputmaterialLists();//输入物料
|
||||||
|
|
||||||
|
@ -911,7 +936,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
getstepList() {
|
getstepList() {
|
||||||
|
this.listQuerystep.process=this.processes;
|
||||||
getStepList(this.listQuerystep).then((response) => {
|
getStepList(this.listQuerystep).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
this.stepoptions = genTree(response.data);
|
this.stepoptions = genTree(response.data);
|
||||||
|
@ -1071,3 +1096,4 @@ export default {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -159,7 +159,7 @@
|
||||||
<el-input v-model="orderplan.number" placeholder="生产计划编号" />
|
<el-input v-model="orderplan.number" placeholder="生产计划编号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="排产数量" prop="count">
|
<el-form-item label="排产数量" prop="count">
|
||||||
<el-input type="number" v-model.number="orderplan.count"/>
|
<el-input-number v-model="orderplan.count" :min="0"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,60 +7,60 @@
|
||||||
<span>合同订单列表</span>
|
<span>合同订单列表</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<el-button type="primary" @click="handlecount"
|
||||||
|
>计算物料</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
:data="orderList.results"
|
:data="orderList.results"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
>
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="订单编号">
|
<el-table-column label="订单编号">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="所需产品">
|
||||||
|
<template slot-scope="scope">{{ scope.row.product_.name }}</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.planed_count }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="计划生产数" width="140px">
|
||||||
|
<template slot-scope="scope" >
|
||||||
|
<el-form :model="scope.row">
|
||||||
|
<el-form-item size="mini">
|
||||||
|
<el-input-number v-model="scope.row.pgcount" :min="0"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="产品型号">
|
||||||
|
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="客户">
|
<el-table-column label="客户">
|
||||||
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属合同">
|
<el-table-column label="所属合同">
|
||||||
<template slot-scope="scope">{{ scope.row.contract_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.contract_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所需产品">
|
|
||||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="产品型号">
|
|
||||||
<template slot-scope="scope">{{ scope.row.product_.specification }}</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.planed_count }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="交货日期">
|
<el-table-column label="交货日期">
|
||||||
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
<template slot-scope="scope">{{ scope.row.delivery_date }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间">
|
<el-table-column label="创建时间">
|
||||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
|
||||||
align="center"
|
|
||||||
label="操作"
|
|
||||||
width="120px"
|
|
||||||
fixed="right"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
|
|
||||||
<el-link type="primary"
|
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
|
||||||
@click="handleclick(scope)"
|
|
||||||
>排产</el-link
|
|
||||||
>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="orderList.count > 0"
|
v-show="orderList.count > 0"
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="orderList.results"
|
:data="materialpzTable"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
|
@ -90,58 +90,25 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="订单编号">
|
<el-table-column label="物料名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料类型">
|
||||||
|
<template slot-scope="scope"> {{options_[scope.row.type]}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="物料编号">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户">
|
<el-table-column label="生产所需数量">
|
||||||
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="所属合同">
|
|
||||||
<template slot-scope="scope">{{ scope.row.contract_.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="所需产品">
|
|
||||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="产品型号">
|
|
||||||
<template slot-scope="scope">{{ scope.row.product_.specification }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="所需数量">
|
|
||||||
<template slot-scope="scope">{{ scope.row.count }}</template>
|
<template slot-scope="scope">{{ scope.row.count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="已派数量">
|
<el-table-column label="库存量">
|
||||||
<template slot-scope="scope">{{ scope.row.planed_count }}</template>
|
<template slot-scope="scope">{{ scope.row.inv_count }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="交货日期">
|
|
||||||
<template slot-scope="scope">{{ scope.row.delivery_date }}</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="120px"
|
|
||||||
fixed="right"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
|
|
||||||
<el-link type="primary"
|
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
|
||||||
@click="handleclick(scope)"
|
|
||||||
>排产</el-link
|
|
||||||
>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
|
||||||
v-show="orderList.count > 0"
|
|
||||||
:total="orderList.count"
|
|
||||||
:page.sync="listQuery.page"
|
|
||||||
:limit.sync="listQuery.page_size"
|
|
||||||
@pagination="getorderList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -154,59 +121,30 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="orderList.results"
|
:data="equipmentTable"
|
||||||
border
|
border
|
||||||
fit
|
fit
|
||||||
stripe
|
stripe
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<el-table-column type="index" width="50" />
|
<el-table-column type="index" width="50" />
|
||||||
|
|
||||||
<el-table-column label="订单编号">
|
<el-table-column label="设备名称">
|
||||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户">
|
<el-table-column label="设备状态">
|
||||||
<template slot-scope="scope">{{ scope.row.customer_.name }}</template>
|
<template slot-scope="scope"> {{state_[scope.row.state]}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所属合同">
|
<el-table-column label="设备编号">
|
||||||
<template slot-scope="scope">{{ scope.row.contract_.name }}</template>
|
<template slot-scope="scope"> {{scope.row.number}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="所需产品">
|
<el-table-column label="设备型号">
|
||||||
<template slot-scope="scope">{{ scope.row.product_.name }}</template>
|
<template slot-scope="scope"> {{scope.row.model}}</template>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="产品型号">
|
|
||||||
<template slot-scope="scope">{{ scope.row.product_.specification }}</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.planed_count }}</template>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="交货日期">
|
|
||||||
<template slot-scope="scope">{{ scope.row.delivery_date }}</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="120px"
|
|
||||||
fixed="right"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
|
|
||||||
<el-link type="primary"
|
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
|
||||||
@click="handleclick(scope)"
|
|
||||||
>排产</el-link
|
|
||||||
>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="orderList.count > 0"
|
v-show="orderList.count > 0"
|
||||||
|
@ -226,7 +164,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getordertoplan } from "@/api/sam";
|
import { getordertoplan } from "@/api/sam";
|
||||||
import { createProductionplan,getProductionplanList} from "@/api/pm";
|
import { createProductionplan,getProductionplanList,createresource,createequip} from "@/api/pm";
|
||||||
import { getMaterialList } from "@/api/mtm";
|
import { getMaterialList } from "@/api/mtm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
@ -243,13 +181,30 @@ export default {
|
||||||
orderplan: defaulteorderplan,
|
orderplan: defaulteorderplan,
|
||||||
orderList: {
|
orderList: {
|
||||||
count: 0,
|
count: 0,
|
||||||
|
},
|
||||||
|
options_:{
|
||||||
|
|
||||||
|
"1":'成品',
|
||||||
|
"2":'半成品',
|
||||||
|
"3":'主要原料',
|
||||||
|
"4":'辅助原料',
|
||||||
|
"5":'加工工具',
|
||||||
|
"6":'辅助工具',
|
||||||
|
|
||||||
|
},
|
||||||
|
state_:{
|
||||||
|
0:'完好',
|
||||||
|
1:'限用',
|
||||||
|
2:'在修',
|
||||||
|
3:'禁用',
|
||||||
},
|
},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
materialpzTable:"",
|
||||||
|
mutipID:[],
|
||||||
|
equipmentTable:[],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
dialogType: "new",
|
dialogType: "new",
|
||||||
|
@ -278,7 +233,35 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleSelectionChange(row) {
|
||||||
|
let _this=this
|
||||||
|
_this.mutipID=[]
|
||||||
|
row.forEach((item) => {
|
||||||
|
_this.mutipID.push({
|
||||||
|
"id":item.product_.id,
|
||||||
|
"count": item.pgcount
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//物料计算
|
||||||
|
handlecount()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
createresource(this.mutipID).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.materialpzTable=res.data;
|
||||||
|
this.$message.success("物料计算成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
createequip(this.mutipID).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
this.equipmentTable=res.data;
|
||||||
|
this.$message.success("成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
handleclick(scope){
|
handleclick(scope){
|
||||||
this.orderID = scope.row.id;
|
this.orderID = scope.row.id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue