|
@@ -278,6 +278,28 @@
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
|
|
|
+ <el-form-item
|
|
|
+ v-if="showLocationFlag"
|
|
|
+ label="请选择location"
|
|
|
+ prop="inventoryProtection"
|
|
|
+ >
|
|
|
+ <el-select
|
|
|
+ v-model="warehouseForm.locationId"
|
|
|
+ filterable
|
|
|
+ placeholder="请选择location"
|
|
|
+ style="width: 360px;"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in locationList"
|
|
|
+ :key="item.locationId"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.locationId"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+
|
|
|
<el-form-item
|
|
|
:label="$t('label.inventoryProtection')"
|
|
|
prop="inventoryProtection"
|
|
@@ -320,7 +342,7 @@ import {
|
|
|
getById,
|
|
|
editStatus,
|
|
|
typeKeyValue,
|
|
|
- statusKeyValue
|
|
|
+ statusKeyValue, getLocation
|
|
|
} from "@/api/oms/inventory/warehouse";
|
|
|
import inventoryProtectingDialog from "@/views/oms/basicConfig/components/inventoryProtectingDialog";
|
|
|
|
|
@@ -357,11 +379,17 @@ export default {
|
|
|
status: ""
|
|
|
},
|
|
|
checkAll: false,
|
|
|
+ showLocationFlag:false,
|
|
|
storeCheckAll: [],
|
|
|
store: [],
|
|
|
isIndeterminate: true,
|
|
|
isStoreIndeterminate: true,
|
|
|
flag: false,
|
|
|
+ locationList:{
|
|
|
+ storeId:"",
|
|
|
+ locationId:"",
|
|
|
+ name:""
|
|
|
+ },
|
|
|
warehouseForm: {
|
|
|
warehouseId: "",
|
|
|
warehouseCode: "",
|
|
@@ -370,7 +398,9 @@ export default {
|
|
|
status: "",
|
|
|
supportStocking: "",
|
|
|
checkedStore: [],
|
|
|
- inventoryProtection: ""
|
|
|
+ inventoryProtection: "",
|
|
|
+ locationId:"",
|
|
|
+ locationName:""
|
|
|
},
|
|
|
warehouseTypes: [
|
|
|
{ value: "10", label: "歌莉娅WMS(香港)" },
|
|
@@ -417,6 +447,7 @@ export default {
|
|
|
created() {
|
|
|
this.getList();
|
|
|
this.getStockStore();
|
|
|
+ this.getLocations();
|
|
|
},
|
|
|
activated() {
|
|
|
this.getList();
|
|
@@ -456,6 +487,15 @@ export default {
|
|
|
//分页
|
|
|
this.getList();
|
|
|
},
|
|
|
+ getLocations(){
|
|
|
+ getLocation({storeId:2200}).then(res => {
|
|
|
+ if (200 == res.code) {
|
|
|
+ console.log(res.data)
|
|
|
+ this.locationList = res.data;
|
|
|
+ console.log(this.locationList)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getStockStore() {
|
|
|
getStoreList().then(res => {
|
|
|
if (200 == res.code) {
|
|
@@ -469,10 +509,23 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
storeHandleCheckAllChange(val) {
|
|
|
+ if(val==true && this.warehouseForm.supportStocking==1){
|
|
|
+ this.showLocationFlag=true;
|
|
|
+ }else{
|
|
|
+ this.warehouseForm.locationId="";
|
|
|
+ this.showLocationFlag=false;
|
|
|
+ }
|
|
|
+
|
|
|
this.warehouseForm.checkedStore = val ? this.stockStoreId : [];
|
|
|
this.isStoreIndeterminate = false;
|
|
|
},
|
|
|
handleCheckedStoresChange(value) {
|
|
|
+ if(value.findIndex(item => (item===2200))!=-1 && this.warehouseForm.supportStocking==1){
|
|
|
+ this.showLocationFlag=true;
|
|
|
+ }else{
|
|
|
+ this.warehouseForm.locationId="";
|
|
|
+ this.showLocationFlag=false;
|
|
|
+ }
|
|
|
if (value) {
|
|
|
let checkedCount = value.length;
|
|
|
this.storeCheckAll = checkedCount === this.stockStoreId.length;
|
|
@@ -481,6 +534,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+
|
|
|
editWarehouseSubmit() {
|
|
|
this.$refs["warehouseForm"].validate(valid => {
|
|
|
//表单提交时的验证
|
|
@@ -503,6 +557,7 @@ export default {
|
|
|
});
|
|
|
this.warehouseEditVisible = false;
|
|
|
this.getList();
|
|
|
+ this.getLocations();
|
|
|
}
|
|
|
this.listLoading = false;
|
|
|
});
|
|
@@ -553,6 +608,12 @@ export default {
|
|
|
this.warehouseForm = res.data;
|
|
|
this.flag = true;
|
|
|
this.warehouseEditVisible = true;
|
|
|
+ if(this.warehouseForm.locationId!=null){
|
|
|
+ this.showLocationFlag=true;
|
|
|
+ this.warehouseForm.locationId=this.warehouseForm.locationName;
|
|
|
+ }else{
|
|
|
+ this.showLocationFlag=false;
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|