Browse Source

Merge branch 'discount-dev' of http://git.gloria.com.cn:10080/FOMS/foms_view into cjx

chenjiaxin 3 months ago
parent
commit
c44ef73b74

+ 7 - 0
src/api/oms/inventory/warehouse.js

@@ -119,5 +119,12 @@ export function getReturnWarehouseInfo(id) {
     method: 'get'
   })
 }
+export function getLocation(date) {
+  return request({
+    url:  '/storeLocations/getLocation',
+    method: 'get',
+    params: date
+  })
+}
 
 

+ 63 - 2
src/views/oms/inventory/inventory/warehouseList.vue

@@ -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;
+          }
         }
       });
     },

+ 11 - 0
src/views/oms/refund/refundDetail.vue

@@ -920,6 +920,17 @@ export default {
               this.refundInfo.warehouseCode = "HKW002";
               this.selectedWarehouseCode = "HKW002";
             }
+
+            var esCountries = ['ES','AT','BE','BG','HR',
+                              'CZ','DK','EE','FI','FR',
+                              'DE','GR','HU','IE','IT',
+                              'LV','LT','LU','NL','PL',
+                              'PT','RO','SK','SI','SE'];
+
+            if (esCountries.includes(this.addressInfo.receiverCountryCode)) {
+                this.refundInfo.warehouseCode = 'ESPW03';
+                this.selectedWarehouseCode = 'ESPW03';
+            }
           }
         });
     },

+ 5 - 0
src/views/oms/refund/returnDetail.vue

@@ -321,6 +321,11 @@ export default {
         if (200 == res.code) {
           this.returnInfo = res.data;
           this.returnOrderItemInfo = res.data.items;
+            for(var i=0;i<this.returnOrderItemInfo.length;i++){
+              if("00" == this.returnOrderItemInfo[i].status){
+                 this.returnOrderItemInfo[i].inboundStatus = '';
+              }
+            }
           this.logs = res.data.logItems;
         }
       });