danweirijiao
This commit is contained in:
parent
e71d5e0e32
commit
1f53777f4f
|
@ -72,3 +72,12 @@ export function issuesubplan(id) {
|
|||
|
||||
})
|
||||
}
|
||||
|
||||
//领料需求单,库存数量
|
||||
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 () {
|
||||
|
||||
if(this.inventory.details.length<=10) {
|
||||
this.inventory.details.push({
|
||||
material:'', // 物料
|
||||
|
@ -285,6 +286,14 @@ export default {
|
|||
},
|
||||
handleCreate()
|
||||
{
|
||||
this.inventory.details=[
|
||||
{
|
||||
material:'', // 物料
|
||||
count:'',//数量
|
||||
batch:'',//批次
|
||||
|
||||
}
|
||||
];
|
||||
this.inventory = Object.assign({}, defaulteinventory);
|
||||
this.dialogType = "new";
|
||||
this.dialogVisible = true;
|
||||
|
|
|
@ -235,6 +235,16 @@ export default {
|
|||
}, {
|
||||
value: '套',
|
||||
label: '套'
|
||||
},
|
||||
{
|
||||
value: '个',
|
||||
label: '个'
|
||||
}, {
|
||||
value: 'm2',
|
||||
label: 'm2'
|
||||
}, {
|
||||
value: '瓶',
|
||||
label: '瓶'
|
||||
},
|
||||
],
|
||||
listQuery: {
|
||||
|
|
|
@ -50,7 +50,21 @@
|
|||
<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="checkPermission(['warehouse_update'])"
|
||||
@click="handleNeed(scope)"
|
||||
>领料</el-link
|
||||
>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="subproductionplanList.count > 0"
|
||||
|
@ -60,11 +74,34 @@
|
|||
@pagination="getspList"
|
||||
/>
|
||||
</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>
|
||||
</template>
|
||||
<script>
|
||||
import { getsubproductionplanList } from "@/api/pm";
|
||||
import { getsubproductionplanList,createPick_need } from "@/api/pm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
|
||||
|
@ -82,19 +119,24 @@ export default {
|
|||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
warehouseData:[],
|
||||
state_:{
|
||||
0:'制定中',
|
||||
1:'已下达',
|
||||
2:'已接受',
|
||||
3:'生产中',
|
||||
4:'已完成'},
|
||||
listLoading: true
|
||||
listLoading: true,
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
dialogType: "new",
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.getspList();
|
||||
this.getlists();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
@ -109,6 +151,17 @@ export default {
|
|||
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