1004749546@qq.com 4 éve
szülő
commit
70216a8ac0

+ 1 - 1
.env

@@ -2,4 +2,4 @@ NODE_ENV=production
 VUE_APP_PREVIEW=false
 VUE_APP_API_BASE_URL=https://channel.zyucgj.com/zyyc-channel/
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=供应商管理系统
+VUE_APP_PRO_NAME=供应商运营管理平台

+ 1 - 1
.env.development

@@ -2,4 +2,4 @@ NODE_ENV=development
 VUE_APP_PREVIEW=true
 VUE_APP_API_BASE_URL=/api
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=供应商管理系统-dev
+VUE_APP_PRO_NAME=供应商运营管理平台-dev

+ 1 - 1
.env.preview

@@ -2,4 +2,4 @@ NODE_ENV=production
 VUE_APP_PREVIEW=true
 VUE_APP_API_BASE_URL=https://channel.test.zyucgj.com/zyyc-channel/
 VUE_APP_VERSION=V1.0.1
-VUE_APP_PRO_NAME=供应商管理系统-pro
+VUE_APP_PRO_NAME=供应商运营管理平台-pro

+ 97 - 59
src/config/router.config.js

@@ -44,78 +44,116 @@ export const asyncRouterMap = [{
     }
     ]
   },
-  {
-	  path: '/FinancialManagement',
-	  name: 'FinancialManagement',
-	  component: PageView,
-	  meta: { title: '财务管理', icon: 'account-book', permission: 'M_cwgn' },
-	  children: [
-	    {
-	      path: 'LedgerRecords/list',
-	      name: 'LedgerRecords',
-	      component: () => import(/* webpackChunkName: "FinancialManagement" */ '@/views/FinancialManagement/LedgerRecords.vue'),
-	      meta: { title: '分账记录', icon: 'form' }
-	    },
-      {
-        path: 'CashOutManagement/list',
-        name: 'CashOutManagement',
-        component: () => import(/* webpackChunkName: "FinancialManagement" */ '@/views/FinancialManagement/CashOutManagement.vue'),
-        meta: { title: '提现管理', icon: 'property-safety' }
-      }
-	  ]
-  },
+  /**
+   *  之后迭代版本可能有用
+   */
+  // {
+	 //  path: '/FinancialManagement',
+	 //  name: 'FinancialManagement',
+	 //  component: PageView,
+	 //  meta: { title: '财务管理', icon: 'account-book', permission: 'M_cwgn' },
+	 //  children: [
+	 //    {
+	 //      path: 'LedgerRecords/list',
+	 //      name: 'LedgerRecords',
+	 //      component: () => import(/* webpackChunkName: "FinancialManagement" */ '@/views/FinancialManagement/LedgerRecords.vue'),
+	 //      meta: { title: '分账记录', icon: 'form' }
+	 //    },
+  //     {
+  //       path: 'CashOutManagement/list',
+  //       name: 'CashOutManagement',
+  //       component: () => import(/* webpackChunkName: "FinancialManagement" */ '@/views/FinancialManagement/CashOutManagement.vue'),
+  //       meta: { title: '提现管理', icon: 'property-safety' }
+  //     }
+	 //  ]
+  // },
   {
     path: '/storehouseManagement',
     name: 'storehouseManagement',
     component: PageView,
     meta: { title: '卫星仓管理', icon: 'switcher' },
     children: [
-      {
-        path: 'StockSearch/list',
-        name: 'StockSearch',
-        component: () => import(/* webpackChunkName: "storehouseManagement" */ '@/views/storehouseManagement/StockSearch.vue'),
-        meta: { title: '库存查询', icon: 'security-scan' }
-      },
+      /**
+        *  之后迭代版本可能有用
+        */
+      // {
+      //   path: 'StockSearch/list',
+      //   name: 'StockSearch',
+      //   component: () => import(/* webpackChunkName: "storehouseManagement" */ '@/views/storehouseManagement/StockSearch.vue'),
+      //   meta: { title: '库存查询', icon: 'security-scan' }
+      // },
       {
         path: 'storeBind/list',
         name: 'StoreBind',
         component: () => import(/* webpackChunkName: "storehouseManagement" */ '@/views/storehouseManagement/storeBind/StoreBindList.vue'),
-        meta: { title: '卫星仓绑定', icon: 'security-scan' }
+        meta: { title: '卫星仓绑定', icon: 'block' }
+      },
+      {
+        path: 'customerInfo/list',
+        name: 'CustomerList',
+        component: () => import(/* webpackChunkName: "storehouseManagement" */ '@/views/storehouseManagement/customerInfo/CustomerList.vue'),
+        meta: { title: '客户信息', icon: 'idcard' }
+      },
+      {
+        path: 'productInfo/list',
+        name: 'ProductList',
+        component: () => import(/* webpackChunkName: "storehouseManagement" */ '@/views/storehouseManagement/productInfo/ProductList.vue'),
+        meta: { title: '产品信息', icon: 'profile' }
+      }
+    ]
+  },
+  {
+    path: '/supplierManagement',
+    name: 'supplierManagement',
+    component: PageView,
+    meta: { title: '供应商管理', icon: 'switcher' },
+    children: [
+      {
+        path: 'supplierList',
+        name: 'SupplierList',
+        component: () => import(/* webpackChunkName: "storehouseManagement" */ '@/views/supplierManagement/SupplierList.vue'),
+        meta: { title: '供应商信息', icon: 'security-scan' }
+      },
+      {
+        path: 'organization',
+        name: 'Organization',
+        component: () => import(/* webpackChunkName: "storehouseManagement" */ '@/views/supplierManagement/Organization.vue'),
+        meta: { title: '组织机构', icon: 'security-scan' }
+      }
+    ]
+  },
+  {
+    path: '/auth',
+    redirect: '/auth/userList',
+    component: PageView,
+    meta: {
+      title: '运营平台权限管理',
+      icon: 'apartment',
+      permission: 'M_power_auth'
+    },
+    children: [
+      {
+        path: '/auth/userList',
+        name: 'powerUserList',
+        component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
+        meta: {
+          title: '用户管理',
+          icon: 'user',
+          permission: 'M_power_user_list'
+        }
+      },
+      {
+        path: '/auth/roleList',
+        name: 'powerRoleList',
+        component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
+        meta: {
+          title: '角色管理',
+          icon: 'solution',
+          permission: 'M_power_role_list'
+        }
       }
     ]
   }
-  // {
-  //   path: '/auth',
-  //   redirect: '/auth/userList',
-  //   component: PageView,
-  //   meta: {
-  //     title: '运营平台权限管理',
-  //     icon: 'apartment',
-  //     permission: 'M_power_auth'
-  //   },
-  //   children: [
-  //     {
-  //       path: '/auth/userList',
-  //       name: 'powerUserList',
-  //       component: () => import(/* webpackChunkName: "auth" */ '@/views/power/user/userList.vue'),
-  //       meta: {
-  //         title: '用户管理',
-  //         icon: 'user',
-  //         permission: 'M_power_user_list'
-  //       }
-  //     },
-  //     {
-  //       path: '/auth/roleList',
-  //       name: 'powerRoleList',
-  //       component: () => import(/* webpackChunkName: "auth" */ '@/views/power/role/roleList.vue'),
-  //       meta: {
-  //         title: '角色管理',
-  //         icon: 'solution',
-  //         permission: 'M_power_role_list'
-  //       }
-  //     }
-  //   ]
-  // }
   ]
 },
 {

+ 144 - 0
src/views/storehouseManagement/customerInfo/CustomerList.vue

@@ -0,0 +1,144 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model ref="queryForm" :model="queryParam" layout="inline" @keyup.enter.native="refresh">
+        <a-row :gutter="48">
+          <a-col :lg="8" :sm="12">
+            <a-form-model-item prop="storeName" label="客户名称" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
+              <a-input class="full-width" v-model="queryParam.storeName" placeholder="请输入客户名称" allowClear id="PaySettlementRecords-queryOrderDate"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :lg="6" :sm="12">
+            <a-button type="primary" @click="handleSearch" id="PaySettlementRecords-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" id="PaySettlementRecords-resetSearchForm">重置</a-button>
+          </a-col>
+        </a-row>
+        </a-form>
+      </a-form-model></div>
+    <!-- 列表 -->
+    <div>
+      <s-table
+        ref="table"
+        size="default"
+        rowKey="id"
+        bordered
+        :columns="columns"
+        :data="loadData">
+      </s-table>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  settlementRecordsList,
+  settlementRecordsListTotal
+} from '@/api/FinancialManagement'
+export default {
+  name: 'StockSearch',
+  components: {
+    VSelect,
+    STable
+  },
+  data () {
+    return {
+      storeList: [
+        { id: 11, name: '常青二路店' },
+        { id: 112, name: '西部大道店99999999999999999' },
+        { id: 114, name: '渭滨路店' },
+        { id: 115, name: '未央店' },
+        { id: 116, name: '凤城八路店' }
+      ],
+      // 搜索条件
+      queryParam: {
+        storeName: '', // 客户名称
+        // partName: '', // 配件名称
+        // status: '', // 分账状态
+        settleNo: ''
+      },
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 60,
+        align: 'center'
+      },
+      {
+        title: '客户名称',
+        dataIndex: 'settleDate',
+        width: 200,
+        align: 'center'
+      },
+      {
+        title: '负责人',
+        dataIndex: 'settleNo',
+        width: 150,
+        align: 'center'
+      },
+      {
+        title: '手机号码',
+        dataIndex: 'orderNum',
+        width: 150,
+        align: 'center'
+      },
+      {
+        title: '地址',
+        dataIndex: 'realAmount',
+        align: 'center',
+        width: 150
+      }
+      ],
+      loadData: parameter => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        console.log(this.queryOrderDate, 'this.queryOrderDate')
+        if (this.queryOrderDate && this.queryOrderDate.length) {
+          searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+          searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+        } else {
+          searchData.beginDate = ''
+          searchData.endDate = ''
+        }
+        return settlementRecordsList(searchData).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          for (let i = 0; i < res.data.list.length; i++) {
+            const _item = res.data.list[i]
+            _item.no = no + i + 1
+          }
+          return res.data
+        })
+      }
+    }
+  },
+  methods: {
+    // 查询
+    handleSearch () {
+      this.$refs.queryForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          return false
+        }
+      })
+    },
+    // 重置
+    resetSearchForm () {
+      this.$refs.queryForm.resetFields()
+      this.$refs.table.refresh(true)
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.$refs.queryForm.resetFields()
+    })
+  }
+}
+</script>
+
+<style scoped lang="less">
+
+</style>

+ 181 - 0
src/views/storehouseManagement/productInfo/ProductList.vue

@@ -0,0 +1,181 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model ref="queryForm" :model="queryParam" layout="inline" @keyup.enter.native="handleSearch">
+        <a-row :gutter="48">
+          <a-col :lg="6" :sm="12">
+            <a-form-model-item prop="partName" label="配件名称" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
+              <a-input class="full-width" v-model="queryParam.partName" placeholder="请输入配件名称" allowClear id="PaySettlementRecords-queryOrderDate"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :lg="6" :sm="12">
+            <a-form-model-item prop="storeName" label="配件品牌" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
+              <a-select
+                show-search
+                allowClear
+                placeholder="请选择配件品牌"
+                option-filter-prop="children"
+                v-model="queryParam.storeName"
+              >
+                <a-select-option v-for="item in storeList" :key="item.id" :value="item.id">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :lg="6" :sm="12">
+            <a-form-model-item prop="settleNo" label="配件编码/OE码" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
+              <a-input class="full-width" v-model="queryParam.settleNo" placeholder="配件编码/OE码" allowClear id="PaySettlementRecords-queryOrderDate"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :lg="6" :sm="12">
+            <a-button type="primary" @click="handleSearch" id="PaySettlementRecords-refresh">查询</a-button>
+            <a-button style="margin-left: 8px" @click="resetSearchForm" id="PaySettlementRecords-resetSearchForm">重置</a-button>
+          </a-col>
+        </a-row>
+        </a-form>
+      </a-form-model></div>
+    <!-- 列表 -->
+    <div>
+      <s-table
+        ref="table"
+        size="default"
+        rowKey="id"
+        bordered
+        :columns="columns"
+        :data="loadData">
+      </s-table>
+    </div>
+  </a-card>
+</template>
+
+<script>
+import moment from 'moment'
+import {
+  STable,
+  VSelect
+} from '@/components'
+import {
+  settlementRecordsList,
+  settlementRecordsListTotal
+} from '@/api/FinancialManagement'
+export default {
+  name: 'StockSearch',
+  components: {
+    VSelect,
+    STable
+  },
+  data () {
+    return {
+      storeList: [
+        { id: 11, name: '常青二路店' },
+        { id: 112, name: '西部大道店99999999999999999' },
+        { id: 114, name: '渭滨路店' },
+        { id: 115, name: '未央店' },
+        { id: 116, name: '凤城八路店' }
+      ],
+      // 搜索条件
+      queryParam: {
+        storeName: undefined, // 配件品牌
+        partName: '', // 配件名称
+        settleNo: '' // 配件编码/OE码
+      },
+      columns: [{
+        title: '序号',
+        dataIndex: 'no',
+        width: 60,
+        align: 'center'
+      },
+      {
+        title: '配件名称',
+        dataIndex: 'settleNo',
+        width: 150,
+        align: 'center'
+      },
+      {
+        title: '配件品牌',
+        dataIndex: 'orderNum',
+        width: 150,
+        align: 'center',
+        scopedSlots: {
+          customRender: 'userInfo'
+        }
+      },
+      {
+        title: '配件编码',
+        dataIndex: 'realAmount',
+        align: 'center',
+        width: 150
+      },
+      {
+        title: 'OE码',
+        dataIndex: 'code',
+        align: 'center',
+        width: 150
+      },
+      {
+        title: '单位',
+        dataIndex: 'status',
+        align: 'center',
+        width: 150
+      },
+      {
+        title: '终端采购价(¥)',
+        dataIndex: 'remarks',
+        width: 100,
+        align: 'center',
+        customRender: (text) => {
+          return text || '--'
+        }
+      }
+      ],
+      loadData: parameter => {
+        const searchData = Object.assign(parameter, this.queryParam)
+        console.log(this.queryOrderDate, 'this.queryOrderDate')
+        if (this.queryOrderDate && this.queryOrderDate.length) {
+          searchData.beginDate = moment(this.queryOrderDate[0]).format('YYYY-MM-DD')
+          searchData.endDate = moment(this.queryOrderDate[1]).format('YYYY-MM-DD')
+        } else {
+          searchData.beginDate = ''
+          searchData.endDate = ''
+        }
+        return settlementRecordsList(searchData).then(res => {
+          const no = (res.data.pageNo - 1) * res.data.pageSize
+          for (let i = 0; i < res.data.list.length; i++) {
+            const _item = res.data.list[i]
+            _item.no = no + i + 1
+          }
+          return res.data
+        })
+      }
+    }
+  },
+  methods: {
+    // 查询
+    handleSearch () {
+      this.$refs.queryForm.validate(valid => {
+        if (valid) {
+          this.$refs.table.refresh(true)
+        } else {
+          return false
+        }
+      })
+    },
+    // 重置
+    resetSearchForm () {
+      this.$refs.queryForm.resetFields()
+      this.$refs.table.refresh(true)
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.$refs.queryForm.resetFields()
+    })
+  }
+}
+</script>
+
+<style scoped lang="less">
+
+</style>

+ 51 - 32
src/views/storehouseManagement/storeBind/StoreBindList.vue

@@ -2,10 +2,10 @@
   <a-card :bordered="false">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="refresh">
+      <a-form-model layout="inline" @keyup.enter.native="refresh">
         <a-row :gutter="48">
           <a-col :lg="8" :sm="12">
-            <a-form-item label="提现时间" :label-col="{ span:4 }" :wrapper-col="{ span:16}">
+            <a-form-model-item label="绑定时间" :label-col="{ span:4 }" :wrapper-col="{ span:16}">
               <a-range-picker
                 id="PaySettlementRecords-queryOrderDate"
                 :disabledDate="disabledDate"
@@ -14,19 +14,49 @@
                 :show-time="{ format: 'HH:mm' }"
                 format="YYYY-MM-DD HH:mm"
                 :placeholder="['开始时间', '结束时间']" />
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :lg="6" :sm="12">
-            <a-button type="primary" @click="refresh" id="PaySettlementRecords-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" id="PaySettlementRecords-resetSearchForm">重置</a-button>
+            <a-form-model-item prop="channeName" label="供应商名称" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
+              <a-select
+                show-search
+                allowClear
+                placeholder="请输入供应商名称"
+                option-filter-prop="children"
+                v-model="queryParam.channeName"
+              >
+                <a-select-option v-for="item in storeList" :key="item.id" :value="item.id">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :lg="6" :sm="12">
+            <a-form-model-item prop="channeName" label="门店名称" :label-col="{ span:4 }" :wrapper-col="{ span:12}">
+              <a-select
+                show-search
+                allowClear
+                placeholder="请输入门店名称"
+                option-filter-prop="children"
+                v-model="queryParam.storeName"
+              >
+                <a-select-option v-for="item in storeList" :key="item.id" :value="item.id">
+                  {{ item.name }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :lg="4" :sm="12">
+            <a-button style="margin:0 4px 3px 4px" type="primary" @click="refresh" id="PaySettlementRecords-refresh">查询</a-button>
+            <a-button style="margin: 0 4px 3px 4px" @click="resetSearchForm" id="PaySettlementRecords-resetSearchForm">重置</a-button>
           </a-col>
         </a-row>
-      </a-form>
+      </a-form-model>
     </div>
     <!-- 合计 -->
     <div class="ftext" >
-      <a-button class="btn-cont" type="primary" @click="openModal" id="PaySettlementRecords-refresh">申请提现</a-button>
-      可提现余额:<span>{{ amountTotal }}</span>元</div>
+      <a-button class="btn-cont" type="primary" @click="openModal" id="PaySettlementRecords-refresh">新增绑定</a-button>
+    </div>
     <!-- 列表 -->
     <div>
       <s-table
@@ -39,7 +69,7 @@
       </s-table>
     </div>
     <!-- 申请提现弹窗 -->
-    <cashOut-modal :openCashOutModal="openCashOutModal" @close="openCashOutModal=false" @refresh="refresh"></cashOut-modal>
+    <store-bind-modal :openStoreBindModal="openStoreBindModal" @close="openStoreBindModal=false" @refresh="refresh"></store-bind-modal>
   </a-card>
 </template>
 
@@ -49,7 +79,7 @@ import {
   STable,
   VSelect
 } from '@/components'
-import cashOutModal from './StoreBindModal.vue'
+import storeBindModal from './StoreBindModal.vue'
 import {
   settlementRecordsList,
   settlementRecordsListTotal
@@ -59,11 +89,11 @@ export default {
   components: {
     VSelect,
     STable,
-    cashOutModal
+    storeBindModal
   },
   data () {
     return {
-      openCashOutModal: false, // 是否打开申请提现弹窗
+      openStoreBindModal: false, // 是否打开申请提现弹窗
       queryOrderDate: undefined,
       storeList: [
         { id: 11, name: '常青二路店' },
@@ -73,10 +103,8 @@ export default {
         { id: 116, name: '凤城八路店' }
       ],
       queryParam: {
-        storeName: '', // 客户名称
-        partName: '', // 配件名称
-        status: '', // 分账状态
-        settleNo: '',
+        storeName: undefined, // 客户名称
+        channeName: undefined, // 供应商名称
         beginDate: '',
         endDate: ''
       },
@@ -91,19 +119,19 @@ export default {
         align: 'center'
       },
       {
-        title: '提现时间',
+        title: '绑定时间',
         dataIndex: 'settleDate',
         width: 200,
         align: 'center'
       },
       {
-        title: '提现单号',
+        title: '供应商',
         dataIndex: 'settleNo',
         width: 150,
         align: 'center'
       },
       {
-        title: '申请提现金额',
+        title: '绑定门店',
         dataIndex: 'orderNum',
         width: 150,
         align: 'center',
@@ -112,31 +140,22 @@ export default {
         }
       },
       {
-        title: '开户名',
+        title: '门店地址',
         dataIndex: 'realAmount',
         align: 'center',
         width: 150
       },
       {
-        title: '银行卡号',
+        title: '门店负责人',
         dataIndex: 'code',
         align: 'center',
         width: 150
       },
       {
-        title: '状态',
+        title: '电话',
         dataIndex: 'status',
         align: 'center',
         width: 150
-      },
-      {
-        title: '备注',
-        dataIndex: 'remarks',
-        width: 100,
-        align: 'center',
-        customRender: (text) => {
-          return text || '--'
-        }
       }
       ],
       loadData: parameter => {
@@ -204,7 +223,7 @@ export default {
     },
     // 打开提现弹窗
     openModal () {
-      this.openCashOutModal = true
+      this.openStoreBindModal = true
     }
     //
 

+ 42 - 16
src/views/storehouseManagement/storeBind/StoreBindModal.vue

@@ -2,22 +2,41 @@
   <div>
     <a-modal
       class="modalBox"
-      title="申请提现"
+      title="新增绑定"
       v-model="isshow"
       @cancle="cancel"
       :footer="null"
       :width="600"
       :centered="true">
       <a-form-model ref="ruleForm" :model="form" :rules="rules" :labelCol="{span:5}" :wrapperCol="{span:15}">
-        <a-form-model-item required label="申请提现金额" prop="money">
-          <a-input-number style="width: 100%;" placeholder="请输入提现金额" :min="1" :max="10000" v-model="form.money" />
+        <a-form-model-item required label="选择供应商" prop="channeName">
+          <a-select
+            show-search
+            allowClear
+            placeholder="请选择供应商"
+            option-filter-prop="children"
+            v-model="form.channeName"
+          >
+            <a-select-option v-for="item in storeList" :key="item.id" :value="item.id">
+              {{ item.name }}
+            </a-select-option>
+          </a-select>
         </a-form-model-item>
-        <a-form-model-item label="实际扣除金额" prop="finalMoney">
-          <span>{{ finalMoney }} &nbsp;&nbsp;元</span>&nbsp;&nbsp;&nbsp;&nbsp;(申请提现金额+提现手续费)
+        <a-form-model-item label="选择关联客户" prop="storeName">
+          <a-select
+            show-search
+            allowClear
+            placeholder="请选择关联客户"
+            option-filter-prop="children"
+            v-model="form.storeName"
+          >
+            <a-select-option v-for="item in storeList" :key="item.id" :value="item.id">
+              {{ item.name }}
+            </a-select-option>
+          </a-select>
         </a-form-model-item>
-        <a-form-model-item label="提现账户" >
-          <div >中国农业银行(阳光)</div>
-          <div>12345454679874</div>
+        <a-form-model-item label="门店地址" prop="storeAddress">
+          <span>{{ form.storeAddress }}</span>
         </a-form-model-item>
         <a-form-model-item class="submit-cont" :wrapper-col="{ span: 14, offset: 9 }">
           <a-button type="primary" @click="submitForm('ruleForm')">
@@ -38,7 +57,7 @@ import {
 } from '@/api/FinancialManagement'
 export default {
   props: {
-    openCashOutModal: {
+    openStoreBindModal: {
       type: Boolean,
       default: false
     },
@@ -49,19 +68,26 @@ export default {
   },
   data () {
     return {
-      isshow: this.openCashOutModal,
+      isshow: this.openStoreBindModal,
+      storeList: [
+        { id: 11, name: '常青二路店' },
+        { id: 112, name: '西部大道店' },
+        { id: 114, name: '渭滨路店' },
+        { id: 115, name: '未央店' },
+        { id: 116, name: '凤城八路店' }
+      ],
       form: {
-        money: ''
+        channeName: undefined, // 供应商名称
+        storeName: undefined, // 门店名称
+        storeAddress: '' // 门店地址
       },
       rules: {
-        money: [{ required: true, message: '请输入提现金额', trigger: ['change', 'blur'] }]
+        channeName: [{ required: true, message: '请选择供应商', trigger: ['change', 'blur'] }],
+        storeName: [{ required: true, message: '请选择关联客户', trigger: ['change', 'blur'] }]
       }
     }
   },
   computed: {
-    finalMoney () {
-      return this.form.money ? (this.form.money + 0.5).toFixed(2) : 0
-    }
   },
   methods: {
     // 提交
@@ -82,7 +108,7 @@ export default {
 	  }
   },
   watch: {
-	  openCashOutModal (newValue, oldValue) {
+	  openStoreBindModal (newValue, oldValue) {
 	  		  this.isshow = newValue
 	  },
 	  isshow (val) {

+ 228 - 0
src/views/supplierManagement/Organization.vue

@@ -0,0 +1,228 @@
+<template>
+  <a-card class="organization-wrap" :bordered="false">
+    <!-- 新建 -->
+    <div class="table-operator"><a-button id="organization-add" type="primary" icon="plus" @click="addOrg()" >新增最高级</a-button></div>
+    <!-- 表格列表 -->
+    <s-table
+      class="s-table"
+      ref="table"
+      size="default"
+      rowKey="id"
+      :showPagination="false"
+      :columns="columns"
+      :data="loadData"
+      :defaultExpandedRowKeys="defaultExpandedRowKeys"
+      :bordered="true">
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          v-if="record.parentIdPaths.split(',').length < 5"
+          type="link"
+          size="small"
+          icon="plus"
+          class="btn-add-s"
+          id="organization-addSubItem"
+          @click="addOrg(text)"
+          v-hasPermission="'B_basicSettings_organization_add_child'">新增子级</a-button>
+        <a-button
+          v-if="record.pid != 0"
+          type="link"
+          size="small"
+          icon="edit"
+          class="btn-edit-s"
+          id="organization-edit"
+          @click="editOrg(text)"
+          v-hasPermission="'B_basicSettings_organization_edit'">编辑</a-button>
+        <a-button
+          v-if="record.pid != 0"
+          type="link"
+          size="small"
+          icon="delete"
+          class="btn-del-s"
+          id="organization-del"
+          @click="delOrg(text)"
+          v-hasPermission="'B_basicSettings_organization_del'">删除</a-button>
+      </template>
+    </s-table>
+    <!-- 新增子级 -->
+    <a-modal
+      class="organization-modal"
+      centered
+      :title="title"
+      :visible="visible"
+      :footer="null"
+      :closable="true"
+      @cancel="onCancel"
+      width="600px">
+      <!-- 表单 -->
+      <a-form-model ref="ruleForm" :model="form" :rules="rules">
+        <a-form-model-item
+          label="组织机构名称"
+          prop="name"
+          :label-col="{ span: 5 }"
+          :wrapper-col="{ span: 17 }">
+          <a-input v-model.trim="form.name" @input="removeSpaces('name')" id="organization-itemName" :maxLength="30" placeholder="请输入组织机构名称(最多30个字符)" />
+        </a-form-model-item>
+        <a-form-model-item class="btn-cont">
+          <a-button type="primary" id="organization-save" @click="onSubmit">保存</a-button>
+          <a-button class="cancel" id="organization-cancel" @click="onCancel">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-modal>
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+// import { findOrgTree, saveAtorg, delAtorg } from '@/api/atorg.js'
+export default {
+  components: { STable, VSelect },
+  data () {
+    return {
+      title: '新增', //  对话框标题
+      visible: false, //  对话框是否可见
+      form: { //  新增编辑  组织机构
+        name: ''
+      },
+      rules: { //  表单校验规则
+        name: [{ required: true, message: '请输入组织机构名称', trigger: 'blur' }]
+      },
+      nowId: '', //  当前操作的数据id
+      nowPid: '', //  当前操作的数据上级id
+      defaultExpandedRowKeys: [], //  树形数据默认展开项
+      columns: [
+        { title: '组织机构名称', dataIndex: 'name', width: 200, align: 'left' },
+        { title: '创建时间', dataIndex: 'createDate', width: 150, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        // return findOrgTree().then(res => {
+        //   //  递归去除空children
+        //   this.recursionFun(res.data)
+        //   this.defaultExpandedRowKeys[0] = res.data[0].id
+        //   return res.data
+        // })
+        return Promise.resolve().then(data => {
+          return [
+
+          ]
+        })
+      }
+    }
+  },
+  methods: {
+    //  去除空格
+    removeSpaces (val) {
+      this.form[val] = this.form[val].replace(/\s|\r\n|\n|<|>/g, '')
+    },
+    //  新增子级
+    addOrg (item) {
+      this.nowId = ''
+      this.form.name = ''
+      if (item) { //  子级
+        this.nowPid = item.id
+      } else { //  最高级
+        this.nowPid = ''
+      }
+      this.title = '新增'
+      this.visible = true
+    },
+    //  编辑
+    editOrg (item) {
+      this.nowId = item.id
+      this.nowPid = item.pid
+      this.title = '编辑'
+      this.form.name = item.name
+      this.visible = true
+    },
+    //  保存
+    onSubmit () {
+      const _this = this
+      _this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const formData = JSON.parse(JSON.stringify(_this.form))
+          formData.id = _this.nowId
+          formData.pid = _this.nowPid
+          saveAtorg(formData).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh(true)
+              _this.visible = false
+            }
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    //  关闭对话框
+    onCancel () {
+      this.$refs.ruleForm.resetFields()
+      this.visible = false
+    },
+    //  删除
+    delOrg (item) {
+      const _this = this
+      _this.nowId = item.id
+      _this.$confirm({
+        title: '提示',
+        centered: true,
+        content: '删除后原数据不可恢复,是否删除?',
+        onOk () {
+          delAtorg({ id: _this.nowId }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+          })
+        }
+      })
+    },
+    //  递归函数
+    recursionFun (data) {
+      if (data) {
+        data.map((item, index) => {
+          if (item.children && item.children.length == 0) {
+            delete item.children
+          } else {
+            this.recursionFun(item.children)
+          }
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .organization-wrap{
+    // 表格
+    .s-table{
+      .btn-edit-s{
+        color: #1891ff;
+        margin: 0 5px;
+      }
+      .btn-del-s{
+        color: #ff4d4f;
+      }
+      .btn-edit-s.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .btn-edit-s.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
+        color: #1891ff;
+        border-color: #1891ff;
+      }
+      .btn-del-s.ant-btn:focus:not(.ant-btn-primary):not(.ant-btn-danger), .btn-del-s.ant-btn:hover:not(.ant-btn-primary):not(.ant-btn-danger){
+        color: #ff4d4f;
+        border-color: #ff4d4f;
+      }
+    }
+  }
+  // 弹框
+  .organization-modal{
+    .btn-cont{
+      text-align: center;
+      .cancel {
+      	margin-left: 50px;
+      }
+    }
+  }
+</style>

+ 181 - 0
src/views/supplierManagement/SupplierList.vue

@@ -0,0 +1,181 @@
+<template>
+  <a-card class="StoreManagement" :bordered="false">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <a-form-model ref="queryForm" :model="queryParam" layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-row :gutter="48">
+          <a-col :span="6">
+            <a-form-model-item class="search-item" label="供应商名称">
+              <a-input id="store-name" v-model.trim="queryParam.name" placeholder="请输入供应商名称" allowClear />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item class="search-item" label="组织机构">
+              <a-tree-select
+                showSearch
+                id="store-orgCode"
+                v-model="queryParam.orgCode"
+                allowClear
+                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                :replace-fields="{children:'children', title:'name', key:'id', value: 'code' }"
+                :tree-data="treeData"
+                placeholder="请选择组织机构"
+                treeNodeFilterProp="title">
+              </a-tree-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6" style="padding-bottom: 10px;">
+            <a-button type="primary" id="store-search" class="search-btn" @click="$refs.table.refresh(true)">查询</a-button>
+            <a-button id="store-reset" @click="reset">重置</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </div>
+    <!-- 表格列表 -->
+    <s-table
+      ref="table"
+      size="default"
+      :rowKey="(record) => record.id"
+      :columns="columns"
+      :data="loadData"
+      bordered>
+      <!-- 组织机构 -->
+      <template slot="orgCode" slot-scope="text, record">
+        <span v-for="(item, index) in record.codeNameArr" :key="index">
+          {{ item }}
+          <strong v-if="index != record.codeNameArr.length-1">></strong>
+        </span>
+      </template>
+      <!-- 负责人名称 -->
+      <template slot="managerName" slot-scope="text, record">
+        <div v-if="record.managerName">{{ record.managerName }}</div>
+        <div v-else>--</div>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-icon
+          type="edit"
+          title="编辑"
+          id="store-edit"
+          @click="handleEdit(record)"
+          class="actionBtn icon-blues"
+        />
+      </template>
+    </s-table>
+
+    <!-- 编辑 门店所属组织 -->
+    <supplier-modal :openModal="openModal" :supplierId="supplierId" :supplierName="supplierName" @success="storeSubmit" @close="openModal=false" />
+  </a-card>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import SupplierModal from './SupplierModal.vue'
+// import { findStoreList } from '@/api/store.js'
+// import { findOrgTree } from '@/api/atorg.js'
+export default {
+  name: 'StoreManagement',
+  components: { STable, VSelect, SupplierModal },
+  data () {
+    return {
+      queryParam: {
+        name: '', //  门店名称
+        managerMobile: '', //  负责人手机
+        orgCode: null, //  组织机构
+        enableFlag: '' //  启用状态
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
+        { title: '组织机构', scopedSlots: { customRender: 'orgCode' }, width: 150, align: 'center' },
+        { title: '供应商名称', dataIndex: 'name', width: 120, align: 'center' },
+        { title: '联系人', scopedSlots: { customRender: 'managerName' }, width: 100, align: 'center' },
+        { title: '手机号码', dataIndex: 'managerMobile', width: 100, align: 'center' },
+        { title: '座机号码', dataIndex: 'phone', customRender: (text, record, index) => { return text || '--' }, width: 80, align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: 120, align: 'center' }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        // return findStoreList(Object.assign(parameter, this.queryParam)).then(res => {
+        //   if (res.status == 200) {
+        //     const no = (res.data.pageNo - 1) * res.data.pageSize
+        //     for (let i = 0; i < res.data.list.length; i++) {
+        //       const _item = res.data.list[i]
+        //       _item.no = no + i + 1
+        //       // 重组组织机构
+        //       let codeNameArr = []
+        //       if (_item.orgPCodeName) { //  父级组织机构名称
+        //         const orgPCodeNameArr = _item.orgPCodeName.split(',')
+        //         codeNameArr = orgPCodeNameArr.splice(0, orgPCodeNameArr.length - 1)
+        //       }
+        //       if (_item.orgCodeName) { //  当前组织机构名称
+        //         codeNameArr.push(_item.orgCodeName)
+        //       }
+        //       _item.codeNameArr = codeNameArr
+        //     }
+        //     return res.data
+        //   }
+        // })
+        return Promise.resolve().then(data => {
+          return {
+            list: [
+              { no: '1', id: '1', codeNameArr: ['陕西省公司', '西安分公司'], name: '箭冠汽配南京分公司', managerName: '张三', managerMobile: '18792701236' }
+            ],
+            pageNo: 1,
+            pageSize: 10,
+            count: 1
+          }
+        })
+      },
+      openModal: false, //  编辑 门店所属组织  弹框展示状态
+      supplierId: '', // 供应商id
+      supplierName: '', // 供应商名称
+      treeData: [] //  组织机构
+    }
+  },
+  methods: {
+    //  获取组织机构  数据
+    getOrgList () {
+      findOrgTree().then(res => {
+        if (res.status == 200) {
+          this.treeData = res.data
+        } else {
+          this.treeData = []
+        }
+      })
+    },
+    // 编辑供应商
+    handleEdit (item) {
+      this.supplierId = item.id
+      this.supplierName = item.name
+      this.openModal = true
+    },
+    // 编辑  提交成功
+    storeSubmit () {
+      this.$refs.table.refresh()
+      this.openModal = false
+    },
+    //  重置
+    reset () {
+      this.$refs.queryForm.resetFields()
+      this.$refs.table.refresh(true)
+    }
+
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {
+      vm.$refs.queryForm.resetFields()
+      // vm.getOrgList()
+    })
+  }
+}
+</script>
+
+<style lang="less">
+.StoreManagement {
+	.table-page-search-wrapper {
+		.search-btn {
+			margin-right: 10px;
+		}
+	}
+}
+</style>

+ 194 - 0
src/views/supplierManagement/SupplierModal.vue

@@ -0,0 +1,194 @@
+<template>
+  <a-modal
+    class="StoreModal"
+    centered
+    title="编辑"
+    :width="600"
+    :footer="null"
+    :destroyOnClose="true"
+    @cancel="isShow = false"
+    v-model="isShow">
+    <!-- 表单 -->
+    <a-form-model
+      class="form"
+      ref="ruleForm"
+      :model="form"
+      :rules="rules"
+      :label-col="{ span: 2 }"
+      :wrapper-col="{ span: 18 }">
+      <a-form-model-item
+        label="供应商名称"
+        :label-col="{ span: 5 }"
+        :wrapper-col="{ span: 17 }">
+        <div>{{ supplierName }}</div>
+      </a-form-model-item>
+      <a-form-model-item
+        class="form-label"
+        required
+        label="选择组织机构"
+        prop="orgCode"
+        :label-col="{ span: 5 }"
+        :wrapper-col="{ span: 17 }">
+        <a-tree-select
+          showSearch
+          id="store-editOrg"
+          v-model="form.orgCode"
+          allowClear
+          style="width: 100%"
+          :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+          :tree-data="treeData"
+          :replace-fields="{children:'children', title:'name', key:'id', value: 'code' }"
+          placeholder="请选择组织机构"
+          @change="treeChange">
+        </a-tree-select>
+      </a-form-model-item>
+      <a-form-model-item class="btn-cont" :label-col="{ span: 0 }" :wrapper-col="{ span: 24 }">
+        <a-button id="store-saveOrg" type="primary" @click="onSubmit">确定</a-button>
+        <a-button id="store-cancelOrg" class="cancel" @click="isShow = false">取消</a-button>
+      </a-form-model-item>
+    </a-form-model>
+  </a-modal>
+</template>
+
+<script>
+export default {
+  name: 'SupplierModal',
+  props: {
+    openModal: {
+      //  弹框是否展示
+      type: Boolean,
+      default: false
+    },
+    // 供应商id
+    supplierId: {
+      type: [String || Number],
+      default: ''
+    },
+    // 供应商名称
+    supplierName: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  弹框是否展示
+      form: { //  编辑
+        orgCode: null //  机构编码
+      },
+      rules: { //  表单校验规则
+        orgCode: [{ required: true, message: '请选择所属组织归属', trigger: 'change' }]
+      },
+      treeData: [], //  组织机构
+      parentCodePaths: '', //  机构编码父路径
+      orgPid: '', //  父级id
+      storeInfo: null //  门店详情
+    }
+  },
+  methods: {
+    //  门店详情
+    getStoreInfo (id) {
+      findStoreDetail({ id: id }).then(res => {
+        if (res.status == 200) {
+          this.storeInfo = res.data
+          this.form.orgCode = res.data.orgCode
+          this.parentCodePaths = res.data.orgCodePaths
+          this.orgPid = res.data.orgPid
+        }
+      })
+    },
+    //  获取组织机构  数据
+    getOrgList () {
+      findOrgTree().then(res => {
+        if (res.status == 200) {
+          this.treeData = res.data
+        } else {
+          this.treeData = []
+        }
+      })
+    },
+    //  组织归属  change
+    treeChange (value, label, extra) {
+      this.parentCodePaths = extra.triggerNode.$options.propsData.dataRef.parentCodePaths
+      this.orgPid = extra.triggerNode.$options.propsData.dataRef.pid
+    },
+    //  保存
+    onSubmit () {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const formData = JSON.parse(JSON.stringify(this.form))
+          formData.id = this.storeId
+          formData.orgCodePaths = this.parentCodePaths
+          formData.orgPid = this.orgPid
+          saveStoreOrg(formData).then(res => {
+            if (res.status == 200) {
+              this.$message.success(res.message)
+              this.$emit('success')
+            }
+          })
+        } else {
+          return false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (val) {
+      if (!val) {
+        this.$emit('close')
+      } else {
+        //  重置表单数据
+        this.form.orgCode = null
+      }
+    },
+    supplierId (newValue, oldValue) {
+      if (newValue && this.isShow) {
+        // this.getOrgList()
+        // this.getStoreInfo(newValue)
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .StoreModal{
+    .form{
+      .item-w{
+        display: flex;
+        line-height: 24px;
+        padding: 8px 0;
+        margin-bottom: 24px;
+        .item-label{
+          flex-shrink: 0;
+          width: 90px;
+          text-align: left;
+          font-weight: bold;
+        }
+        .item-cont{
+          flex-grow: 1;
+        }
+      }
+      .btn-cont {
+        text-align: center;
+        margin-top: 80px;
+        .cancel {
+          margin-left: 40px;
+        }
+      }
+      // .form-label{
+      //   .ant-form-item-label{
+      //     .ant-form-item-required{
+      //       font-weight: bold;
+      //       color: rgba(0, 0, 0, 0.65);
+      //     }
+      //   }
+      // }
+    }
+  }
+</style>