danweirijiao
This commit is contained in:
parent
e71d5e0e32
commit
1f53777f4f
|
@ -71,4 +71,13 @@ export function issuesubplan(id) {
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//领料需求单,库存数量
|
||||||
|
export function createPick_need(id, data) {
|
||||||
|
return request({
|
||||||
|
url: `/pm/subproduction_plan/${id}/pick_need/`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
}
|
}
|
|
@ -259,6 +259,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addConditions () {
|
addConditions () {
|
||||||
|
|
||||||
if(this.inventory.details.length<=10) {
|
if(this.inventory.details.length<=10) {
|
||||||
this.inventory.details.push({
|
this.inventory.details.push({
|
||||||
material:'', // 物料
|
material:'', // 物料
|
||||||
|
@ -285,6 +286,14 @@ export default {
|
||||||
},
|
},
|
||||||
handleCreate()
|
handleCreate()
|
||||||
{
|
{
|
||||||
|
this.inventory.details=[
|
||||||
|
{
|
||||||
|
material:'', // 物料
|
||||||
|
count:'',//数量
|
||||||
|
batch:'',//批次
|
||||||
|
|
||||||
|
}
|
||||||
|
];
|
||||||
this.inventory = Object.assign({}, defaulteinventory);
|
this.inventory = Object.assign({}, defaulteinventory);
|
||||||
this.dialogType = "new";
|
this.dialogType = "new";
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
|
|
|
@ -235,6 +235,16 @@ export default {
|
||||||
}, {
|
}, {
|
||||||
value: '套',
|
value: '套',
|
||||||
label: '套'
|
label: '套'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '个',
|
||||||
|
label: '个'
|
||||||
|
}, {
|
||||||
|
value: 'm2',
|
||||||
|
label: 'm2'
|
||||||
|
}, {
|
||||||
|
value: '瓶',
|
||||||
|
label: '瓶'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
|
|
|
@ -50,7 +50,21 @@
|
||||||
<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="220px"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
|
@click="handleNeed(scope)"
|
||||||
|
>领料</el-link
|
||||||
|
>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination
|
<pagination
|
||||||
v-show="subproductionplanList.count > 0"
|
v-show="subproductionplanList.count > 0"
|
||||||
|
@ -60,11 +74,34 @@
|
||||||
@pagination="getspList"
|
@pagination="getspList"
|
||||||
/>
|
/>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-dialog
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:title="dialogType === 'edit' ? '编辑仓库进行领料' : '选择仓库进行领料'"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="Form"
|
||||||
|
:model="warehouse"
|
||||||
|
label-width="80px"
|
||||||
|
label-position="right"
|
||||||
|
: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>
|
||||||
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getsubproductionplanList } from "@/api/pm";
|
import { getsubproductionplanList,createPick_need } from "@/api/pm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
|
||||||
|
|
||||||
|
@ -82,19 +119,24 @@ export default {
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
warehouseData:[],
|
||||||
state_:{
|
state_:{
|
||||||
0:'制定中',
|
0:'制定中',
|
||||||
1:'已下达',
|
1:'已下达',
|
||||||
2:'已接受',
|
2:'已接受',
|
||||||
3:'生产中',
|
3:'生产中',
|
||||||
4:'已完成'},
|
4:'已完成'},
|
||||||
listLoading: true
|
listLoading: true,
|
||||||
|
listLoading: true,
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogType: "new",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
this.getspList();
|
this.getspList();
|
||||||
|
this.getlists();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
@ -109,6 +151,17 @@ export default {
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getlists(){
|
||||||
|
getWarehouseList({page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.warehouseData = genTree(response.data);
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleNeed(scope){
|
||||||
|
createPick_need()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue