|
@@ -9,7 +9,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="仓库" prop="warehouseId">
|
|
<el-form-item label="仓库" prop="warehouseId">
|
|
|
<el-select v-model="dataForm.warehouseId" clearable placeholder="请选择" style="width: 200px;"
|
|
<el-select v-model="dataForm.warehouseId" clearable placeholder="请选择" style="width: 200px;"
|
|
|
- :disabled="type === 'detail'">
|
|
|
|
|
|
|
+ :disabled="type === 'detail'" @change="handleChangeWarehouse">
|
|
|
<el-option :key="item.id" v-for="item in warehouseList" :label="item.warehouseName"
|
|
<el-option :key="item.id" v-for="item in warehouseList" :label="item.warehouseName"
|
|
|
:value="item.id">
|
|
:value="item.id">
|
|
|
</el-option>
|
|
</el-option>
|
|
@@ -178,18 +178,21 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.getAssembleProducList();
|
|
this.getAssembleProducList();
|
|
|
- this.getStoreList();
|
|
|
|
|
|
|
+ this.getWarehouseList();
|
|
|
this.getAllUserList();
|
|
this.getAllUserList();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ handleChangeWarehouse(){
|
|
|
|
|
+ this.getAssembleProducList();
|
|
|
|
|
+ },
|
|
|
/** 获取拆卸商品列表数据 */
|
|
/** 获取拆卸商品列表数据 */
|
|
|
getAssembleProducList() {
|
|
getAssembleProducList() {
|
|
|
- listGoods().then(response => {
|
|
|
|
|
|
|
+ listGoods({warehouseId: this.dataForm.warehouseId}).then(response => {
|
|
|
this.assembleProducList = response.data.data;
|
|
this.assembleProducList = response.data.data;
|
|
|
}).catch(() => { });
|
|
}).catch(() => { });
|
|
|
},
|
|
},
|
|
|
/** 获取仓库列表数据 */
|
|
/** 获取仓库列表数据 */
|
|
|
- getStoreList() {
|
|
|
|
|
|
|
+ getWarehouseList() {
|
|
|
warehouseList().then(response => {
|
|
warehouseList().then(response => {
|
|
|
this.warehouseList = response.data.data;
|
|
this.warehouseList = response.data.data;
|
|
|
}).catch(() => { });
|
|
}).catch(() => { });
|
|
@@ -219,7 +222,7 @@ export default {
|
|
|
const Goods = await this.$EnPickerGoods({
|
|
const Goods = await this.$EnPickerGoods({
|
|
|
// goodsApi: '/warehouse-entry/info/inventory',
|
|
// goodsApi: '/warehouse-entry/info/inventory',
|
|
|
selectedIds: selectedIds,
|
|
selectedIds: selectedIds,
|
|
|
- goodsApiParams: { warehouseId: this.dataForm.warehouseId }
|
|
|
|
|
|
|
+ goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'1' }
|
|
|
})
|
|
})
|
|
|
if (!Goods.length) return
|
|
if (!Goods.length) return
|
|
|
if(val=='inventoryEntryInfos'){
|
|
if(val=='inventoryEntryInfos'){
|
|
@@ -243,7 +246,7 @@ export default {
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
this.$refs["dataForm"].validate((valid) => {
|
|
this.$refs["dataForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- if (this.dataForm.inventoryEntryInfos.length == 0 || this.dataForm.inventoryOutInfos.length == 0) {
|
|
|
|
|
|
|
+ if (this.dataForm.inventoryEntryInfos.length == 0) {
|
|
|
this.$message.error('请选择商品/物料!')
|
|
this.$message.error('请选择商品/物料!')
|
|
|
return
|
|
return
|
|
|
} else {
|
|
} else {
|