1.修改库存查询分库选择,主库和分库实现联动,当主库未选择时,禁用分库选择按钮

fencang
x_z 3 years ago
parent 57b89e9565
commit 5f87de6953

@ -63,6 +63,7 @@
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
:disabled="invWarehouseDisabled"
size="mini">
<el-option
v-for="item in subInvList"
@ -159,15 +160,13 @@
<script>
import {
filterProducts,
filterDetailProducts,
deleteProducts,
} from "../../api/inventory/InvProducts";
import draggable from "vuedraggable";
import codeDetail from "./InvProductsDetail";
import store from "../../store";
import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {filterAllByUser, filterUplLocInv} from "@/api/basic/invWarehouse";
import {filterUplLocInv} from "@/api/basic/invWarehouse";
import {filterCustomers} from "@/api/auth/customer";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
@ -202,6 +201,7 @@ export default {
loading: true,
index: null,
dialogTableVisible: false,
invWarehouseDisabled: true,
formLoading: false,
dialogVisible: false,
deleteLoading: false,
@ -228,9 +228,12 @@ export default {
customerId: null,
unitFk: null,
supId: null,
invWarehouseCode: null,
invStorageCode: null,
page: 1,
limit: 20,
};
this.invChange();
this.getList();
},
onSubmit() {
@ -261,7 +264,6 @@ export default {
this.filterQuery.customerId = store.getters.customerId;
filterProducts(this.filterQuery)
.then((response) => {
console.log(response)
this.showSup = response.data.showSup;
this.loading = false;
this.list = response.data.list || [];
@ -309,7 +311,6 @@ export default {
});
},
findMethod(query) {
console.log(query);
this.fromOptions = [];
let cQuery = {
key: query,
@ -344,18 +345,22 @@ export default {
invChange() {
// this.$set(this.filterQuery, "entrustUser", "");
this.filterQuery.invWarehouseCode = "";
this.subInvList = [];
let query = {
pcode: this.filterQuery.invStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
if (this.filterQuery.invStorageCode != null) {
this.invWarehouseDisabled = false;
let query = {
pcode: this.filterQuery.invStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
})
.catch(() => {
});
} else {
this.invWarehouseDisabled = true;
}
},
intentDetail(row) {

@ -90,7 +90,6 @@
<script>
import {
filterProducts,
filterDetailProducts,
deleteProducts,
} from "../../api/inventory/InvProducts";
import draggable from "vuedraggable";
@ -183,7 +182,6 @@ export default {
this.filterQuery.customerId = store.getters.customerId;
filterProducts(this.filterQuery)
.then((response) => {
console.log(response)
this.showSup = response.data.showSup;
this.loading = false;
this.list = response.data.list || [];
@ -231,7 +229,6 @@ export default {
});
},
findMethod(query) {
console.log(query);
this.fromOptions = [];
let cQuery = {
key: query,

Loading…
Cancel
Save