|
|
@ -2,12 +2,6 @@
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<el-form :model="formData" ref="dataForm">
|
|
|
|
<el-form :model="formData" ref="dataForm">
|
|
|
|
<el-button-group style="display: flex;margin: -50px 0 10px 80%; height: 35px">
|
|
|
|
<el-button-group style="display: flex;margin: -50px 0 10px 80%; height: 35px">
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
:disabled="this.detailList.length > 0"
|
|
|
|
|
|
|
|
@click.native="selectInvProduct()"
|
|
|
|
|
|
|
|
>录入产品
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="primary"
|
|
|
|
type="primary"
|
|
|
|
@click.native="saveDeviceCollectOrder()"
|
|
|
|
@click.native="saveDeviceCollectOrder()"
|
|
|
@ -48,6 +42,7 @@
|
|
|
|
<el-form-item prop="deptCode">
|
|
|
|
<el-form-item prop="deptCode">
|
|
|
|
<el-select v-model="formData.deptCode" placeholder="领用部门"
|
|
|
|
<el-select v-model="formData.deptCode" placeholder="领用部门"
|
|
|
|
:disabled="detailList.length >0 "
|
|
|
|
:disabled="detailList.length >0 "
|
|
|
|
|
|
|
|
@change="deptChange"
|
|
|
|
clearable>
|
|
|
|
clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in deptList"
|
|
|
|
v-for="item in deptList"
|
|
|
@ -68,16 +63,18 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="7">
|
|
|
|
<el-col :span="7">
|
|
|
|
<el-form-item prop="collectUser">
|
|
|
|
<el-form-item prop="collectUser">
|
|
|
|
<el-select v-model="formData.deptCode" placeholder="领用部门"
|
|
|
|
<el-select v-model="formData.collectUser" placeholder="领用人"
|
|
|
|
:disabled="detailList.length >0 "
|
|
|
|
:disabled="detailList.length >0 "
|
|
|
|
clearable>
|
|
|
|
clearable>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="item in deptList"
|
|
|
|
v-for="item in userList"
|
|
|
|
:key="item.name"
|
|
|
|
:key="item.employeeName"
|
|
|
|
:label="item.name"
|
|
|
|
:label="item.employeeName"
|
|
|
|
:value="item.code">
|
|
|
|
:value="item.employeeName">
|
|
|
|
<span style="float: left">{{ item.name }}</span>
|
|
|
|
<span style="float: left">{{ item.employeeName }}</span>
|
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
|
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{
|
|
|
|
|
|
|
|
item.employeeName
|
|
|
|
|
|
|
|
}}</span>
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -113,9 +110,17 @@
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
@click.native.stop="addCode()"
|
|
|
|
@click.native.stop="addCode()"
|
|
|
|
style="height: 31px; margin-left: 20px"
|
|
|
|
style="height: 31px; margin-left: 20px"
|
|
|
|
>添加
|
|
|
|
>扫码添加
|
|
|
|
</el-button
|
|
|
|
</el-button
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
style="height: 31px; margin-left: 20px"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
:disabled="this.detailList.length > 0"
|
|
|
|
|
|
|
|
@click.native="selectInvProduct()"
|
|
|
|
|
|
|
|
>手动添加
|
|
|
|
|
|
|
|
</el-button>
|
|
|
|
</el-button-group>
|
|
|
|
</el-button-group>
|
|
|
|
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -281,7 +286,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import {filterSubAll} from "@/api/basic/invSubWarehouse";
|
|
|
|
import { getInvWarehouseList} from "@/api/basic/invSubWarehouse";
|
|
|
|
import {getSpaceCodeList} from "@/api/inventory/invSpace";
|
|
|
|
import {getSpaceCodeList} from "@/api/inventory/invSpace";
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
addCollectOrder,
|
|
|
|
addCollectOrder,
|
|
|
@ -295,6 +300,8 @@ import {
|
|
|
|
import {getMAInvProducts} from "@/api/inventory/InvProducts";
|
|
|
|
import {getMAInvProducts} from "@/api/inventory/InvProducts";
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
import {filterDepts} from "@/api/auth/authDept";
|
|
|
|
import {filterDepts} from "@/api/auth/authDept";
|
|
|
|
|
|
|
|
import {authAdminList} from "@/api/auth/authAdmin";
|
|
|
|
|
|
|
|
import {userInfo} from "@/api/auth/login";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
@ -316,6 +323,7 @@ export default {
|
|
|
|
batchNo: null,
|
|
|
|
batchNo: null,
|
|
|
|
invWarehouseCode: null,
|
|
|
|
invWarehouseCode: null,
|
|
|
|
invSpaceCode: null,
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
|
|
|
cplb: "设备",
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
limit: 10
|
|
|
|
limit: 10
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -329,6 +337,7 @@ export default {
|
|
|
|
deptCode: null,
|
|
|
|
deptCode: null,
|
|
|
|
status: 0,
|
|
|
|
status: 0,
|
|
|
|
code: null,
|
|
|
|
code: null,
|
|
|
|
|
|
|
|
collectUser: null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
detailList: [],
|
|
|
|
detailList: [],
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
@ -336,12 +345,24 @@ export default {
|
|
|
|
currentIndex: -1,
|
|
|
|
currentIndex: -1,
|
|
|
|
selectInvProductVisible: false,
|
|
|
|
selectInvProductVisible: false,
|
|
|
|
multiProduct: [],
|
|
|
|
multiProduct: [],
|
|
|
|
deptList: []
|
|
|
|
deptList: [],
|
|
|
|
|
|
|
|
userList: []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
getAllWarehouse() {
|
|
|
|
getAllWarehouse() {
|
|
|
|
filterSubAll().then((res) => {
|
|
|
|
let userId = null;
|
|
|
|
|
|
|
|
if (!isBlank(this.formData.collectUser)) {
|
|
|
|
|
|
|
|
this.userList.forEach(item => {
|
|
|
|
|
|
|
|
if (item.name === this.formData.collectUser) {
|
|
|
|
|
|
|
|
userId = item.id;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
userId = this.$store.getters.adminId;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let params = {userId: userId};
|
|
|
|
|
|
|
|
getInvWarehouseList(params).then((res) => {
|
|
|
|
if (res.code === 20000) {
|
|
|
|
if (res.code === 20000) {
|
|
|
|
this.warehouseList = res.data || [];
|
|
|
|
this.warehouseList = res.data || [];
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -356,7 +377,24 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
selectInvProduct() {
|
|
|
|
selectInvProduct() {
|
|
|
|
this.getAllWarehouse();
|
|
|
|
if (isBlank(this.formData.deptCode)) {
|
|
|
|
|
|
|
|
this.$message.error("请选择领用部门!")
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
} else if (isBlank(this.formData.collectUser)) {
|
|
|
|
|
|
|
|
this.$message.error("请选择领用人!")
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
userInfo().then((res) => {
|
|
|
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
|
|
|
if (!isBlank(res.data.locInvCode)) {
|
|
|
|
|
|
|
|
this.filterQuery.invWarehouseCode = res.data.locSubInvCode;
|
|
|
|
|
|
|
|
this.getAllWarehouse();
|
|
|
|
|
|
|
|
this.warehouseChange();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.getList();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
});
|
|
|
|
//保存或更新养护记录仓库信息
|
|
|
|
//保存或更新养护记录仓库信息
|
|
|
|
this.saveOrder();
|
|
|
|
this.saveOrder();
|
|
|
|
this.filterQuery = {
|
|
|
|
this.filterQuery = {
|
|
|
@ -364,6 +402,7 @@ export default {
|
|
|
|
cpmctymc: null,
|
|
|
|
cpmctymc: null,
|
|
|
|
batchNo: null,
|
|
|
|
batchNo: null,
|
|
|
|
invWarehouseCode: null,
|
|
|
|
invWarehouseCode: null,
|
|
|
|
|
|
|
|
cplb: "设备",
|
|
|
|
invSpaceCode: null,
|
|
|
|
invSpaceCode: null,
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
limit: 10
|
|
|
|
limit: 10
|
|
|
@ -499,6 +538,7 @@ export default {
|
|
|
|
batchNo: null,
|
|
|
|
batchNo: null,
|
|
|
|
invWarehouseCode: null,
|
|
|
|
invWarehouseCode: null,
|
|
|
|
invSpaceCode: null,
|
|
|
|
invSpaceCode: null,
|
|
|
|
|
|
|
|
cplb: "设备",
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
limit: 10
|
|
|
|
limit: 10
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -568,6 +608,17 @@ export default {
|
|
|
|
this.deptList = res.data.list || [];
|
|
|
|
this.deptList = res.data.list || [];
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
deptChange() {
|
|
|
|
|
|
|
|
//查询此部门下的用户
|
|
|
|
|
|
|
|
this.userList = [];
|
|
|
|
|
|
|
|
this.formData.collectUser = null;
|
|
|
|
|
|
|
|
let params = {
|
|
|
|
|
|
|
|
deptCode: this.formData.deptCode
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
authAdminList(params).then((res) => {
|
|
|
|
|
|
|
|
this.userList = res.data.list || [];
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getDepts();
|
|
|
|
this.getDepts();
|
|
|
@ -577,6 +628,7 @@ export default {
|
|
|
|
this.formData.deptCode = this.deviceCollectOrder.deptCode;
|
|
|
|
this.formData.deptCode = this.deviceCollectOrder.deptCode;
|
|
|
|
this.formData.createTime = this.deviceCollectOrder.createTime;
|
|
|
|
this.formData.createTime = this.deviceCollectOrder.createTime;
|
|
|
|
this.formData.invWarehouseCode = this.deviceCollectOrder.invWarehouseCode;
|
|
|
|
this.formData.invWarehouseCode = this.deviceCollectOrder.invWarehouseCode;
|
|
|
|
|
|
|
|
this.formData.collectUser = this.deviceCollectOrder.collectUser;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|