|
|
|
@ -11,7 +11,7 @@
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="采购部门">
|
|
|
|
|
<el-select v-model="filterQuery.targetDeptCode" placeholder="请选择申购部门" style="width: 90%">
|
|
|
|
|
<el-select v-model="filterQuery.targetDeptCode" @change="getInvList" placeholder="请选择申购部门" style="width: 90%">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in deptList"
|
|
|
|
|
:key="item.code"
|
|
|
|
@ -26,7 +26,7 @@
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="采购仓库">
|
|
|
|
|
<el-select v-model="filterQuery.targetInvCode" style="width: 90%" placeholder="请选择所属仓库">
|
|
|
|
|
<el-select v-model="filterQuery.targetInvCode" style="width: 90%" clearable placeholder="请选择所属仓库">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in invList"
|
|
|
|
|
:key="item.name"
|
|
|
|
@ -159,6 +159,7 @@ import {delApply, inserThrOrderWeb, listPlan, listApplyDetail, delPlanDetailAll}
|
|
|
|
|
import {delApplyDetailAll} from "@/api/purchase/purApply";
|
|
|
|
|
import { getInvListByUser } from '@/api/system/invWarehouse'
|
|
|
|
|
import { getDeptListByUser } from '@/api/auth/authDept'
|
|
|
|
|
import {filterSubAll} from "@/api/system/invSubWarehouse";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
@ -176,8 +177,10 @@ export default {
|
|
|
|
|
corpName: null,
|
|
|
|
|
type: 1,
|
|
|
|
|
editStatus: 1,
|
|
|
|
|
emergency:''
|
|
|
|
|
emergency:'',
|
|
|
|
|
targetDeptCode:'',
|
|
|
|
|
},
|
|
|
|
|
invCodebe:null,
|
|
|
|
|
formName: null,
|
|
|
|
|
formMap: {
|
|
|
|
|
add: "新增采购计划",
|
|
|
|
@ -258,6 +261,7 @@ export default {
|
|
|
|
|
corpName: null,
|
|
|
|
|
type: 1,
|
|
|
|
|
editStatus: 1,
|
|
|
|
|
targetDeptCode: this.invCodebe,
|
|
|
|
|
};
|
|
|
|
|
this.actDateRange = [];
|
|
|
|
|
this.getList();
|
|
|
|
@ -307,6 +311,7 @@ export default {
|
|
|
|
|
if (response.code == 20000) {
|
|
|
|
|
this.list = response.data.list || [];
|
|
|
|
|
this.total = response.data.total || 0;
|
|
|
|
|
this.detailList=[]
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
@ -397,17 +402,26 @@ export default {
|
|
|
|
|
this.detailList = [];
|
|
|
|
|
},
|
|
|
|
|
getInvList() {
|
|
|
|
|
getInvListByUser().then((res) => {
|
|
|
|
|
var query={
|
|
|
|
|
parentId:this.filterQuery.targetDeptCode
|
|
|
|
|
}
|
|
|
|
|
filterSubAll(query).then((res) => {
|
|
|
|
|
this.invList = res.data || [];
|
|
|
|
|
this.getBusType();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getDeptList() {
|
|
|
|
|
getDeptListByUser().then((res) => {
|
|
|
|
|
this.deptList = res.data || [];
|
|
|
|
|
if(this.deptList.length>0){
|
|
|
|
|
this.filterQuery.targetDeptCode=this.deptList[0].code
|
|
|
|
|
this.invCodebe=this.filterQuery.targetDeptCode
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
this. getInvList();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newDistributionForm(index, row) {
|
|
|
|
|
this.idQuery.id = '';
|
|
|
|
|
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
|
|
|
|
@ -440,8 +454,6 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.getInvList();
|
|
|
|
|
this.getDeptList();
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|