Bläddra i källkod

上一任未提交代码

wangzhuo 1 år sedan
förälder
incheckning
e057032997

+ 9 - 0
src/api/basicdata/corps.js

@@ -88,3 +88,12 @@ export function selectCorpList(fId) {
     method: 'get',
   })
 }
+
+// 根据客户id查询客户对应仓库
+//客户和司机
+export function customerWarehouse(fId) {
+  return request({
+    url: '/basicdata/corps/customer-warehouse/'+ fId,
+    method: 'get',
+  })
+}

+ 8 - 0
src/api/basicdata/dept.js

@@ -33,6 +33,14 @@ export function treeselect() {
   })
 }
 
+// 查询部门下拉树结构
+export function warehouseTreeselect() {
+  return request({
+    url: '/basicdata/warehouse/treeselect',
+    method: 'get'
+  })
+}
+
 // 根据角色ID查询部门树结构
 export function roleDeptTreeselect(roleId) {
   return request({

+ 12 - 0
src/api/basicdata/warehouse.js

@@ -84,6 +84,18 @@ export function treeselect(ancestors) {
   })
 }
 
+// 根据当前登录用户查询部门下拉树结构
+export function nominateTreeselect(ancestors) {
+  const query = {
+    ancestors
+  }
+  return request({
+    url: '/basicdata/warehouse/nominate-treeselect',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询商品详情列表
 export function listWarehousesss(query) {
   return request({

+ 1 - 1
src/layout/components/Navbar.vue

@@ -26,7 +26,7 @@
 
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
         <div class="avatar-wrapper">
-          <img :src="avatar" onerror="this.src = 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1684356118,1784469661&fm=26&gp=0.jpg'" class="user-avatar">
+<!--          <img :src="avatar" onerror="this.src = 'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1684356118,1784469661&fm=26&gp=0.jpg'" class="user-avatar">-->
           <i class="el-icon-caret-bottom" />
         </div>
         <el-dropdown-menu slot="dropdown">

+ 19 - 0
src/views/Warehousing/cargoClearance/AddOrUpdate.vue

@@ -1154,6 +1154,9 @@ import draggable from "vuedraggable";
 import upLoad from "../components/upLoad";
 import incomeMoney from '../components/incomeMoney'
 import payMoney from '../components/payMoney'
+
+import { customerWarehouse } from '@/api/basicdata/corps'
+
 export default {
   name: "inStock",
   props: {
@@ -2171,6 +2174,22 @@ export default {
       });
     },
     changefStltype(row) {
+      // 根据客户id查询客户所属仓库
+      if (row != null && row != '') {
+        customerWarehouse(row).then((res) => {
+          this.warehouseOptions = res.data;
+          if (res.data == null) {
+            this.warehouseOptions = [];
+            this.form.fWarehouseid = null;
+            this.form.fInwarehouseid = null;
+          }
+        })
+      } else {
+            this.warehouseOptions = [];
+            this.form.fWarehouseid = null;
+            this.form.fInwarehouseid = null;
+      }
+
       this.fMblnoOptions.map((e) => {
         if (row == e.fId) {
           this.$set(

+ 22 - 4
src/views/Warehousing/goodsTransfer/AddOrUpdate.vue

@@ -1453,6 +1453,9 @@ import upLoad from "../components/upLoad";
 import incomeMoney from '../components/incomeMoney'
 import payMoney from '../components/payMoney'
 import {warehousebillsitems, warehousecntr} from "@/api/warehouseBusiness/warehouseInStock";
+
+import { customerWarehouse } from '@/api/basicdata/corps'
+
 export default {
   name: "inStock",
   props: {
@@ -1980,9 +1983,9 @@ export default {
     this.getConfigKey("warehouse.show.feesConfirm").then((response) => {
       this.isShowFeesConfirm = response.msg;
     });
-    listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
-      this.warehouseOptions = response.rows;
-    });
+    // listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
+    //   this.warehouseOptions = response.rows;
+    // });
     listFees({ fDc: "C" }).then((response) => {
       this.fCNameOptions = response.rows;
     });
@@ -2371,7 +2374,22 @@ export default {
         })
       }
     },
-    changeCorp() {
+    changeCorp(row) {
+      console.log("aaa");
+      // 根据客户id查询客户所属仓库
+      if (row != null && row != '') {
+        customerWarehouse(row).then((res) => {
+          this.warehouseOptions = res.data;
+          if (res.data == null) {
+            this.warehouseOptions = [];
+            this.form.fWarehouseid = null;
+          }
+        })
+      } else {
+            this.warehouseOptions = [];
+            this.form.fWarehouseid = null;
+      }
+
       if (this.form.fMblno && this.form.fCorpid) {
         this.$set(this.form, "fWarehouseid", '')
         let data = {

+ 24 - 4
src/views/Warehousing/stockTransfer/AddOrUpdate.vue

@@ -2996,6 +2996,9 @@ import {
 } from '@/api/warehouseBusiness/warehouseInStock'
 import incomeMoney from '../components/incomeMoney'
 import payMoney from '../components/payMoney'
+
+import { customerWarehouse } from '@/api/basicdata/corps'
+
 export default {
   name: "inStock",
   props: {
@@ -3593,9 +3596,9 @@ export default {
     this.getConfigKey("warehouse.show.feesConfirm").then((response) => {
       this.isShowFeesConfirm = response.msg;
     });
-    listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
-      this.warehouseOptions = response.rows;
-    });
+    // listWarehousesss({ fStatus: 0, delFlag: 0 }).then((response) => {
+    //   this.warehouseOptions = response.rows;
+    // });
     listFees({ fDc: "C" }).then((response) => {
       this.fCNameOptions = response.rows;
     });
@@ -3739,7 +3742,7 @@ export default {
     },
   },
   methods: {
-    init() {
+    init() {  
       this.approVal = false;
       this.resetForm("form");
       this.detailList = [];
@@ -4176,6 +4179,23 @@ export default {
       });
     },
     changefStltype(row) {
+
+      
+      // 根据客户id查询客户所属仓库
+      if (row != null && row != '') {
+        customerWarehouse(row).then((res) => {
+          this.warehouseOptions = res.data;
+          if (res.data == null) {
+            this.warehouseOptions = [];
+            this.form.fWarehouseid = null;
+          }
+        })
+      } else {
+            this.warehouseOptions = [];
+            this.form.fWarehouseid = null;
+            this.form.fInwarehouseid = null;
+      }
+
       this.fMblnoOptions.map((e) => {
         if (row == e.fId) {
           this.$set(

+ 67 - 0
src/views/basicdata/corps/index.vue

@@ -441,6 +441,20 @@
           </el-col>
         </el-row>
         <el-row>
+          <el-col :span="8">
+            <el-form-item label="仓库">
+                  <el-select v-model="form.warehouseIdLsit" placeholder="请选择仓库" multiple>
+                    <el-option
+                      v-for="(item, index) in fWarehouseidOption"
+                      :key="index.fId"
+                      :label="item.fName"
+                      :value="item.fId"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
           <div style="display: flex; justify-content: flex-end">
             <el-button style="margin: 10px" @click="showForm = !showForm"
               >{{ showForm ? "隐藏" : "更多" }}
@@ -827,6 +841,11 @@ import upLoad from "@/views/Warehousing/components/upLoad";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Vue from "vue";
+
+// import { listWarehouse, nominateTreeselect } from "@/api/basicdata/warehouse";
+// import { warehouseTreeselect } from "@/api/basicdata/dept";
+import { listWarehousesss } from "@/api/basicdata/warehouse";
+
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -889,6 +908,8 @@ export default {
   components: { draggable, Treeselect, upLoad },
   data() {
     return {
+      // 当前登录用户所属仓库
+      fWarehouseidOption: [],
       treevalue: null,
       deptOptions: null,
       disCorps: false,
@@ -1079,6 +1100,18 @@ export default {
     this.getRow();
     this.getTreeselect();
     this.username = Cookies.get("userName");
+
+    
+      // // 查询仓库下拉
+      // warehouseTreeselect().then((res) => {
+      //   this.fWarehouseidOption = res.data;
+      //   console.log(res);
+      // })
+
+      // 查询仓库下拉
+    listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
+      this.fWarehouseidOption = response.rows;
+    });
   },
   methods: {
     getTreeselect() {
@@ -1308,6 +1341,20 @@ export default {
             .replace(/\"/g, "")
             .split(",");
         }
+
+        // 仓库回显
+        if (response.data.corp.warehouseId != null && response.data.corp.warehouseId != '') {
+          var warehouseIdLsitString = response.data.corp.warehouseId;
+          warehouseIdLsitString = warehouseIdLsitString.split(',');
+          var warehouseIdLsitInt = [];
+          for (const key in warehouseIdLsitString) {
+            let warehouseIdString = parseInt(warehouseIdLsitString[key]);
+            warehouseIdLsitInt.push(warehouseIdString);
+          }
+          response.data.corp.warehouseIdLsit = warehouseIdLsitInt;
+        }
+       
+
         this.relevantAttachments = response.data["attach"]? response.data["attach"]: [];
         this.form = response.data["corp"];
         console.log(this.form);
@@ -1353,6 +1400,16 @@ export default {
             if (this.contactList.length == 0 && Cookies.get("sysType") == 2) {
               return this.$message.error("联系人不能为空");
             }
+
+            // 拼接仓库id
+            let warehouseIds = "";
+            for (const key in this.form.warehouseIdLsit) {
+              warehouseIds += this.form.warehouseIdLsit[key];
+              warehouseIds += ',';
+            }
+            warehouseIds = warehouseIds.slice(0, -1);
+            this.form.warehouseId = warehouseIds;
+
             formDate.append("corps", JSON.stringify(this.form));
             formDate.append(
               "customerContacts",
@@ -1388,6 +1445,16 @@ export default {
             if (this.contactList.length == 0 && Cookies.get("sysType") == 2) {
               return this.$message.error("联系人不能为空");
             }
+
+            // 拼接仓库id
+            let warehouseIds = "";
+            for (const key in this.form.warehouseIdLsit) {
+              warehouseIds += this.form.warehouseIdLsit[key];
+              warehouseIds += ',';
+            }
+            warehouseIds = warehouseIds.slice(0, -1);
+            this.form.warehouseId = warehouseIds;
+
             formDate.append("corps", JSON.stringify(this.form));
             formDate.append(
               "customerContacts",

+ 41 - 2
src/views/finance/Invoicing/index.vue

@@ -1056,6 +1056,18 @@
                 </el-form-item>
               </el-col>
             </el-row>
+            <el-row>
+                <el-form-item label="仓库">
+                  <el-select v-model="queryParameter.warehouseIdLsit" placeholder="请选择仓库" multiple>
+                    <el-option
+                      v-for="(item, index) in fWarehouseidOption"
+                      :key="index.fId"
+                      :label="item.fName"
+                      :value="item.fId"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+            </el-row>
           </el-form>
           <el-dialog
             title="自定义列显示"
@@ -2174,6 +2186,11 @@ import Vue from "vue";
 import { addSet, select, resetModule } from "@/api/system/set";
 import { MessageBox } from "element-ui";
 // import kaiheIndex from "./kaihe-index.vue";
+
+import Treeselect from '@riophae/vue-treeselect';
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { listWarehousesss } from "@/api/basicdata/warehouse";
+
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -2235,6 +2252,8 @@ export default {
   name: "Charge",
   data() {
     return {
+      // 仓库树结构下拉
+      fWarehouseidOption: [],
       login: Cookies.get("sysType"),
       show: false,
       drag: false,
@@ -2340,6 +2359,13 @@ export default {
           checked: 0,
           width: 100,
         },
+        {
+          surface: "15",
+          label: "warehouseName",
+          name: "仓库",
+          checked: 0,
+          width: 100,
+        },
       ],
       setRowList: [],
       getRowList: [],
@@ -2483,20 +2509,27 @@ export default {
         },
         {
           surface: "9",
+          label: "fSrcpName",
+          name: "仓库",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
           label: "fAmtdr",
           name: "金额",
           checked: 0,
           width: 100,
         },
         {
-          surface: "10",
+          surface: "11",
           label: "fAmt",
           name: "本次金额",
           checked: 0,
           width: 100,
         },
         {
-          surface: "11",
+          surface: "12",
           label: "fRemarks",
           name: "备注",
           checked: 0,
@@ -2660,6 +2693,7 @@ export default {
     AddOrUpdate,
     ApprovalComments,
     // kaiheIndex,
+    Treeselect
   },
   created() {
     this.setRowList = this.tableDate;
@@ -2684,6 +2718,11 @@ export default {
     this.getRow2();
     this.getRow3();
     this.corpsRemoteMethod();
+    
+    // 查询仓库下拉
+    listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
+      this.fWarehouseidOption = response.rows;
+    });
   },
   activated() {
     if (this.$route.query.data) {

+ 45 - 6
src/views/finance/charge/index.vue

@@ -1024,6 +1024,18 @@
               </el-form-item>
             </el-col>
           </el-row>
+          <el-row>
+                <el-form-item label="仓库">
+                  <el-select v-model="queryParameter.warehouseIdLsit" placeholder="请选择仓库" multiple>
+                    <el-option
+                      v-for="(item, index) in fWarehouseidOption"
+                      :key="index.fId"
+                      :label="item.fName"
+                      :value="item.fId"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+          </el-row>
         </el-form>
         <div style="margin-right: 20px;float: right">
           <el-button
@@ -1440,6 +1452,11 @@ import draggable from "vuedraggable";
 import { addSet, select,resetModule } from "@/api/system/set";
 import { MessageBox } from 'element-ui'
 import kaiheIndex from "./kaihe-index.vue";
+
+import Treeselect from '@riophae/vue-treeselect';
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { listWarehousesss } from "@/api/basicdata/warehouse";
+
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -1501,6 +1518,8 @@ export default {
   name: "Charge",
   data() {
     return {
+      // 仓库树结构下拉
+      fWarehouseidOption: [],
       login:Cookies.get('sysType'),
       show:false,
       mainTable:false,
@@ -1630,6 +1649,13 @@ export default {
           checked: 0,
           width: 100,
         },
+        {
+          surface: "17",
+          label: "warehouseName",
+          name: "仓库",
+          checked: 0,
+          width: 100,
+        },
       ],
       tableDate2: [
         {
@@ -1776,41 +1802,48 @@ export default {
         },
         {
           surface: "8",
+          label: "fSrcpName",
+          name: "仓库",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
           label: "fFeeName",
           name: "费用名称",
           checked: 0,
           width: 100,
         },
         {
-          surface: "9",
+          surface: "10",
           label: "fAmtdr",
           name: "金额",
           checked: 0,
           width: 100,
         },
         {
-          surface: "10",
+          surface: "11",
           label: "fAmt",
           name: "本次金额",
           checked: 0,
           width: 100,
         },
         {
-          surface: "11",
+          surface: "12",
           label: "fBillno",
           name: "业务编号",
           checked: 0,
           width: 120,
         },
         {
-          surface: "12",
+          surface: "13",
           label: "invoiceNo",
           name: "发票号",
           checked: 0,
           width: 120,
         },
         {
-          surface: "13",
+          surface: "14",
           label: "fRemarks",
           name: "备注",
           checked: 0,
@@ -1979,7 +2012,8 @@ export default {
     AddOrUpdate,
     ApprovalComments,
     draggable,
-    kaiheIndex
+    kaiheIndex,
+    Treeselect
   },
   created() {
     this.setRowList = this.tableDate;
@@ -2004,6 +2038,11 @@ export default {
     // this.getRow2();
     this.getRow3();
     this.corpsRemoteMethod()
+
+    // 查询仓库下拉
+    listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
+      this.fWarehouseidOption = response.rows;
+    });
   },
   activated() {
     if(this.$route.query.data){

+ 60 - 10
src/views/finance/contrast/index.vue

@@ -1248,7 +1248,7 @@
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="8">
+              <el-col :span="6">
                 <el-form-item
                   label="审核日期"
                   v-if="typevalue == 1 || typevalue == 3"
@@ -1267,7 +1267,7 @@
                   </el-date-picker>
                 </el-form-item>
               </el-col>
-              <el-col :span="8">
+              <el-col :span="6">
                 <el-form-item
                   label="对账日期"
                   label-width="85px"
@@ -1286,7 +1286,7 @@
                   ></el-date-picker>
                 </el-form-item>
               </el-col>
-              <el-col :span="8" style="width: 320px">
+              <el-col :span="6" style="width: 320px">
                 <el-form-item label="结算方式" prop="fBusinessType">
                   <el-select
                     v-model="TWareHouseFees.stlTypeid"
@@ -1307,11 +1307,23 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :span="8">
+              <el-col :span="6">
                 <el-form-item label="业务编号">
                   <el-input  v-model="TWareHouseFees.fBillno" placeholder="业务编号" clearable />
                 </el-form-item>
               </el-col>
+              <el-col :span="6">
+                <el-form-item label="仓库">
+                  <el-select v-model="TWareHouseFees.warehouseIdLsit" placeholder="请选择仓库" multiple>
+                    <el-option
+                      v-for="(item, index) in fWarehouseidOption"
+                      :key="index.fId"
+                      :label="item.fName"
+                      :value="item.fId"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
             </el-row>
             <div style="margin-right: 20px; float: right">
               <el-button type="cyan" size="mini" @click="searchFee(typevalue)"
@@ -1510,6 +1522,9 @@
                   <span v-if="item.label == 'fReviewDate'">{{
                     scope.row.fReviewDate
                   }}</span>
+                  <span v-if="item.label == 'fSrcpName'">{{
+                    scope.row.fSrcpName
+                  }}</span>
                   <span v-if="item.label == 'fAmtdr'">{{
                     scope.row.fAmtdr
                   }}</span>
@@ -1880,6 +1895,12 @@ import draggable from "vuedraggable";
 import Vue from "vue";
 import { MessageBox } from "element-ui";
 import kaiheIndex from "./kaihe-index.vue";
+
+
+import Treeselect from '@riophae/vue-treeselect';
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { listWarehousesss } from "@/api/basicdata/warehouse";
+
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -1941,6 +1962,8 @@ export default {
 
   data() {
     return {
+      // 仓库树结构下拉
+      fWarehouseidOption: [],
       login: Cookies.get("sysType"),
       show: false,
       mainTable: false,
@@ -2033,6 +2056,13 @@ export default {
           checked: 0,
           width: 100,
         },
+        {
+          surface: "11",
+          label: "fSrcpName",
+          name: "仓库",
+          checked: 0,
+          width: 100,
+        },
       ],
       tableDate2: [
         {
@@ -2196,6 +2226,13 @@ export default {
           checked: 0,
           width: 100,
         },
+        {
+          surface: "24",
+          label: "warehouseName",
+          name: "仓库",
+          checked: 0,
+          width: 100,
+        },
       ],
       tableDate3: [
         // {
@@ -2256,48 +2293,55 @@ export default {
         },
         {
           surface: "9",
+          label: "fSrcpName",
+          name: "仓库",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
           label: "fAmtdr",
           name: "金额",
           checked: 0,
           width: 100,
         },
         {
-          surface: "10",
+          surface: "11",
           label: "fAmt",
           name: "本次金额",
           checked: 0,
           width: 100,
         },
         {
-          surface: "10",
+          surface: "12",
           label: "fTaxrate",
           name: "税率",
           checked: 0,
           width: 100,
         },
         {
-          surface: "11",
+          surface: "13",
           label: "fFeeName",
           name: "费用名称",
           checked: 0,
           width: 100,
         },
         {
-          surface: "12",
+          surface: "14",
           label: "fBillno",
           name: "业务编号",
           checked: 0,
           width: 120,
         },
         {
-          surface: "13",
+          surface: "15",
           label: "invoiceNo",
           name: "发票号",
           checked: 0,
           width: 120,
         },
         {
-          surface: "14",
+          surface: "16",
           label: "fRemarks",
           name: "备注",
           checked: 0,
@@ -2734,6 +2778,7 @@ export default {
     AddOrUpdate,
     ApprovalComments,
     kaiheIndex,
+    Treeselect
   },
   created() {
     this.setRowList = this.tableDate;
@@ -2767,6 +2812,11 @@ export default {
     this.getRow5();
     this.getRow6();
     this.corpsRemoteMethod();
+
+    // 查询仓库下拉
+    listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
+      this.fWarehouseidOption = response.rows;
+    });
   },
   activated() {
     if (this.$route.query.data) {

+ 23 - 0
src/views/finance/payment/index.vue

@@ -1070,6 +1070,18 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+              <el-col :span="8">
+                <el-form-item label="仓库">
+                  <el-select v-model="queryParameter.warehouseIdLsit" placeholder="请选择仓库" multiple>
+                    <el-option
+                      v-for="(item, index) in fWarehouseidOption"
+                      :key="index.fId"
+                      :label="item.fName"
+                      :value="item.fId"
+                    ></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
             </el-row>
           </el-form>
           <el-dialog
@@ -2198,6 +2210,11 @@ import Vue from "vue";
 import { addSet, select, resetModule } from "@/api/system/set";
 import { MessageBox } from "element-ui";
 import kaiheIndex from "./kaihe-index.vue";
+
+import Treeselect from '@riophae/vue-treeselect';
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import { listWarehousesss } from "@/api/basicdata/warehouse";
+
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -2734,6 +2751,7 @@ export default {
     AddOrUpdate,
     ApprovalComments,
     kaiheIndex,
+    Treeselect
   },
   created() {
     this.setRowList = this.tableDate;
@@ -2758,6 +2776,11 @@ export default {
     this.getRow2();
     this.getRow3();
     this.corpsRemoteMethod();
+
+    // 查询仓库下拉
+    listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
+      this.fWarehouseidOption = response.rows;
+    });
   },
   activated() {
     if (this.$route.query.data) {

+ 31 - 6
src/views/reportManagement/whgenleg/index.vue

@@ -222,7 +222,8 @@ import {
   superviseExportWhgenleg,
   warehouseSupervise
 } from '@/api/reportManagement/whgenleg'
-import { listWarehouse, treeselect } from "@/api/basicdata/warehouse";
+// import { listWarehouse, treeselect } from "@/api/basicdata/warehouse";
+import { listWarehouse, treeselect, nominateTreeselect } from "@/api/basicdata/warehouse";
 import { listArea } from "@/api/basicdata/area";
 import { listGoods } from "@/api/basicdata/goods";
 import { listCorps } from "@/api/basicdata/corps";
@@ -545,15 +546,38 @@ export default {
     // }
     // this.queryParams.orgStorageDate = [year + '-' + month + '-' + '01 00:00:00', year + '-' + month + '-' + day + ' 23:59:59']
 
+    nominateTreeselect().then((response) => {
+      this.fWarehouseidOption = response.data;
+      console.log("仓库")
+      console.log(this.fWarehouseidOption)
+      console.log(this.fWarehouseidOption[0].id);
+      if (this.fWarehouseidOption.length > 0) {
+        this.queryParams.fWarehouseLocationid = this.fWarehouseidOption[0].id;
+        this.getList();
+      } else {
+        this.$alert('您没有所属仓库', '提示', {
+          confirmButtonText: '确定',
+          callback: action => {
+            // const visitedViews = this.$store.state.tagsView.visitedViews
+            // this.$store.state.tagsView.visitedViews = visitedViews.filter(v => {
+            //   return v.path !== this.$route.path
+            // })
+            // this.$router.go(-1)
+          }
+        });
+        
+      }
+    });
+
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
-    this.getList();
+    // this.getList();
     this.getDicts("data_trademodes").then((response) => {
       this.fTrademodeidOptions = response.data;
     });
-    treeselect().then((response) => {
-      this.fWarehouseidOption = response.data;
-    });
+    // treeselect().then((response) => {
+    //   this.fWarehouseidOption = response.data;
+    // });
     this.getRow();
   },
   mounted() {
@@ -734,7 +758,8 @@ export default {
       this.queryParams.fWarehouseLocationid = tree.id;
     },
     getTreeselect() {
-      treeselect().then((response) => {
+      // treeselect().then((response) => {
+        nominateTreeselect().then((response) => {
         this.warehousesOptions = response.data;
       });
     },

+ 24 - 5
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -443,7 +443,7 @@
                   :disabled="browseStatus"
                   style="width:80%"
                   placeholder="请输入模糊查找客户名称"
-                  @change="changeFeeDate"
+                  @change="customerClick"
               >
                 <el-option
                     v-for="(dict, index) in NfMblnoOptions"
@@ -1373,6 +1373,8 @@ import {
 } from "@/api/basicdata/warehouse";
 import { getAgreement } from '@/api/warehouseBusiness/agreement'
 
+import { customerWarehouse } from '@/api/basicdata/corps'
+
 Vue.directive('dialogDrag', {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector('.el-dialog__header')
@@ -1763,9 +1765,9 @@ export default {
       this.showTrademode = response.msg;
     });
     this.register()
-    listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
-      this.warehouseOptions = response.rows;
-    });
+    // listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
+    //   this.warehouseOptions = response.rows;
+    // });
     agreementListCorpsNoParams().then((res) => {
       if (res.data.corpList) {
         this.NfMblnoOptions = res.data.corpList;
@@ -2068,7 +2070,24 @@ export default {
       //   this.dataList = []
       //   this.getStorageFee()
       // }
-
+    },
+    customerClick(row) {
+      // 根据客户id查询客户所属仓库
+      if (row != null && row != '') {
+        customerWarehouse(row).then((res) => {
+          this.warehouseOptions = res.data;
+          if (res.data == null) {
+            this.warehouseOptions = [];
+            this.form.fWarehouseid = null;
+          }
+        })
+      } else {
+            this.warehouseOptions = [];
+            this.form.fWarehouseid = null;
+      }
+      if (!this.form.fCorpid || !this.form.fBillingDeadline) return
+      this.dataList = []
+      this.getStorageFee()
     },
     // 计算仓储费
     calculateCost() {

+ 9 - 2
vue.config.js

@@ -56,7 +56,9 @@ module.exports = {
         // target: `https://dh.tubaosoft.com/prod-api/`,
         // target: `https://jhy.tubaosoft.com/prod-api/`,
         // target: `https://hwc.tubaosoft.com/prod-api/`,
-        target: `https://zjxd.dhscs.net/prod-api/`,
+
+        // target: `https://zjxd.dhscs.net/prod-api/`,
+
         // target: `http://ck.huodaonar.com/prod-api/`,
         // target: `https://ck.hturing.com/prod-api/`,
         // target: `https://hltd.echepei.com/prod-api/`,
@@ -81,7 +83,12 @@ module.exports = {
         // 大木服务器
         // target: `http://115.29.151.39:9010/`,
         // target: `http://47.105.221.72:9010/`,
-        // target: `http://localhost:9020/`,
+        // target: `http://localhost:9010/`,
+
+        // target: `http://192.168.8.107:9099/`,
+        target: `http://127.0.0.1:8010/`,
+        // target: `https://yd.echepei.com/prod-api/`,
+
         // target: `http://csmgn2.natappfree.cc`,
         // target: `http://engineering.echepei.com:9010/`,
         changeOrigin: true,