Browse Source

feat: 子商户

zh 2 years ago
parent
commit
10c5872fb6

+ 53 - 1
src/api/basic_data/dealer.js

@@ -28,6 +28,50 @@ export function exportDealerStockListV2(data, name) {
   })
   })
 }
 }
 
 
+export function getStagecustomerListV2(params) {
+  return request({
+    url: `/StageCustomer/list/v2?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+export function exportStagecustomerV2(data, name) {
+  return postBlob({
+    url: '/StageCustomer/user/export/v2',
+    data,
+    name
+  })
+}
+export function addStagecustomer(data) {
+  return request({
+    url: '/StageCustomer/add',
+    method: 'post',
+    data
+  })
+}
+export function examineStagecustomer(params) {
+  return request({
+    url: '/StageCustomer/examine',
+    method: 'post',
+    params
+  })
+}
+export function updateStagecustomer(data) {
+  return request({
+    url: '/StageCustomer/update',
+    method: 'post',
+    data
+  })
+}
+
+export function getStageCustomerDetail(params) {
+  return request({
+    url: '/StageCustomer/detail',
+    method: 'get',
+    params
+  })
+}
+
 export function importCustomerV2(data) {
 export function importCustomerV2(data) {
   return handleImport('customer/import', data.formdata, data.id || '')
   return handleImport('customer/import', data.formdata, data.id || '')
 }
 }
@@ -230,7 +274,6 @@ export function importCustomer(data, name) {
   })
   })
 }
 }
 
 
-
 //基础上设置自提和物流
 //基础上设置自提和物流
 export function updatePick(params) {
 export function updatePick(params) {
   return request({
   return request({
@@ -239,3 +282,12 @@ export function updatePick(params) {
     params
     params
   })
   })
 }
 }
+
+// 经销商绑定售后系统
+export function updateSystem(params) {
+  return request({
+    url: '/customer/updateSystem',
+    method: 'post',
+    params
+  })
+}

+ 184 - 78
src/views/basic_data/dealer/components/dealer_list-detail.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <div>
   <div>
     <div class="sty">
     <div class="sty">
-      <el-page-header @back="goBack" content="详情页面"></el-page-header>
+      <el-page-header content="详情" @back="goBack" />
     </div>
     </div>
     <el-form :model="infoList" label-width="130px" size="small" label-position="right">
     <el-form :model="infoList" label-width="130px" size="small" label-position="right">
       <el-card class="">
       <el-card class="">
@@ -13,218 +13,218 @@
           <el-row :gutter="20">
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="创建组织" prop="">
               <el-form-item label="创建组织" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="客户编码" prop="">
               <el-form-item label="客户编码" prop="">
-                <el-input v-model="infoList.number"></el-input>
+                <el-input v-model="infoList.number" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="使用组织" prop="">
               <el-form-item label="使用组织" prop="">
-                <el-input v-model="infoList.useOrgName"></el-input>
+                <el-input v-model="infoList.useOrgName" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="简称" prop="">
               <el-form-item label="简称" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>
           <!-- </el-form> -->
           <!-- </el-form> -->
         </div>
         </div>
       </el-card>
       </el-card>
-      <br />
+      <br>
       <el-card class="">
       <el-card class="">
         <div slot="header" class="clearfix">
         <div slot="header" class="clearfix">
           <strong>基本信息</strong>
           <strong>基本信息</strong>
         </div>
         </div>
         <span>地址</span>
         <span>地址</span>
-        <el-divider></el-divider>
+        <el-divider />
         <div>
         <div>
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <el-row :gutter="20">
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="国家" prop="">
               <el-form-item label="国家" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="地区" prop="">
               <el-form-item label="地区" prop="">
-                <el-input v-model="infoList.region"></el-input>
+                <el-input v-model="infoList.region" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="省份" prop="">
               <el-form-item label="省份" prop="">
-                <el-input v-model="infoList.province"></el-input>
+                <el-input v-model="infoList.province" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="城市" prop="">
               <el-form-item label="城市" prop="">
-                <el-input v-model="infoList.city"></el-input>
+                <el-input v-model="infoList.city" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="通信地址" prop="">
               <el-form-item label="通信地址" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="邮政编码" prop="">
               <el-form-item label="邮政编码" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="公司网址" prop="">
               <el-form-item label="公司网址" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="商城订单对应组织" prop="">
               <el-form-item label="商城订单对应组织" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="联系邮箱" prop="">
               <el-form-item label="联系邮箱" prop="">
-                <el-input v-model="infoList.email"></el-input>
+                <el-input v-model="infoList.email" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>
           <!-- </el-form> -->
           <!-- </el-form> -->
         </div>
         </div>
         <span>管理</span>
         <span>管理</span>
-        <el-divider></el-divider>
+        <el-divider />
         <div>
         <div>
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <el-row :gutter="20">
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="联系电话" prop="">
               <el-form-item label="联系电话" prop="">
-                <el-input v-model="infoList.mobile"></el-input>
+                <el-input v-model="infoList.mobile" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="传真" prop="">
               <el-form-item label="传真" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="公司类别" prop="">
               <el-form-item label="公司类别" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="公司性质" prop="">
               <el-form-item label="公司性质" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="公司规模" prop="">
               <el-form-item label="公司规模" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>
           <!-- </el-form> -->
           <!-- </el-form> -->
         </div>
         </div>
         <span>相关</span>
         <span>相关</span>
-        <el-divider></el-divider>
+        <el-divider />
         <div>
         <div>
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <el-row :gutter="20">
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="对应供应商" prop="">
               <el-form-item label="对应供应商" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="对应集团客户" prop="">
               <el-form-item label="对应集团客户" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="客户类别" prop="">
               <el-form-item label="客户类别" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="客户分组" prop="">
               <el-form-item label="客户分组" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="集团客户" prop="">
               <el-form-item label="集团客户" prop="">
-                <el-checkbox></el-checkbox>
+                <el-checkbox />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="默认付款方" prop="">
               <el-form-item label="默认付款方" prop="">
-                <el-checkbox></el-checkbox>
+                <el-checkbox />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="不校验可发量" prop="">
               <el-form-item label="不校验可发量" prop="">
-                <el-checkbox></el-checkbox>
+                <el-checkbox />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="对应组织" prop="">
               <el-form-item label="对应组织" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="备注" prop="">
               <el-form-item label="备注" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>
           <!-- </el-form> -->
           <!-- </el-form> -->
         </div>
         </div>
         <span>开票信息</span>
         <span>开票信息</span>
-        <el-divider></el-divider>
+        <el-divider />
         <div>
         <div>
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <el-row :gutter="20">
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="发票抬头" prop="">
               <el-form-item label="发票抬头" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="纳税登记号" prop="">
               <el-form-item label="纳税登记号" prop="">
-                <el-input></el-input>
+                <el-input />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="开户银行" prop="">
               <el-form-item label="开户银行" prop="">
-                <el-input v-model="infoList.bank"></el-input>
+                <el-input v-model="infoList.bank" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="银行账号" prop="">
               <el-form-item label="银行账号" prop="">
-                <el-input v-model="infoList.bankAccount"></el-input>
+                <el-input v-model="infoList.bankAccount" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="开票联系电话" prop="">
               <el-form-item label="开票联系电话" prop="">
-                <el-input v-model="infoList.invoicePhone"></el-input>
+                <el-input v-model="infoList.invoicePhone" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="开票通讯地址" prop="">
               <el-form-item label="开票通讯地址" prop="">
-                <el-input v-model="infoList.invoiceAddress"></el-input>
+                <el-input v-model="infoList.invoiceAddress" />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>
           <!-- </el-form> -->
           <!-- </el-form> -->
         </div>
         </div>
         <span>智慧订货</span>
         <span>智慧订货</span>
-        <el-divider></el-divider>
+        <el-divider />
         <div>
         <div>
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <!-- <el-form label-width="130px" size="small" label-position="right"> -->
           <el-row :gutter="20">
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="允许对接智慧订单" prop="">
               <el-form-item label="允许对接智慧订单" prop="">
-                <el-checkbox></el-checkbox>
+                <el-checkbox />
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
           </el-row>
           </el-row>
@@ -232,14 +232,14 @@
         </div>
         </div>
       </el-card>
       </el-card>
     </el-form>
     </el-form>
-    <br />
+    <br>
     <el-card>
     <el-card>
       <div slot="header" class="clearfix">
       <div slot="header" class="clearfix">
         <strong>信用额度</strong>
         <strong>信用额度</strong>
       </div>
       </div>
       <div class="diy-table-1">
       <div class="diy-table-1">
         <el-row :gutter="0" class="xyed">
         <el-row :gutter="0" class="xyed">
-          <div v-for="(v, i) in infoList.customerWallets" :key="i" v-show="v.type == 'COMMONLY'">
+          <div v-for="(v, i) in infoList.customerWallets" v-show="v.type == 'COMMONLY'" :key="i">
             <el-col :span="12" class="item">
             <el-col :span="12" class="item">
               <div class="label">信用额度</div>
               <div class="label">信用额度</div>
               <div class="value">{{ v.freeCreditAmount }}</div>
               <div class="value">{{ v.freeCreditAmount }}</div>
@@ -252,7 +252,7 @@
         </el-row>
         </el-row>
       </div>
       </div>
     </el-card>
     </el-card>
-    <br />
+    <br>
     <el-card>
     <el-card>
       <div slot="header" class="clearfix">
       <div slot="header" class="clearfix">
         <strong>标签信息</strong>
         <strong>标签信息</strong>
@@ -285,27 +285,45 @@
           </el-row>
           </el-row>
           <el-col>
           <el-col>
             <el-form-item label="分子公司">
             <el-form-item label="分子公司">
-              <el-tag class="tagStyle" v-for="v in infoList.kingDeeCustomers" :key="v.id">{{ v.name }}</el-tag>
+              <el-tag v-for="v in infoList.kingDeeCustomers" :key="v.id" class="tagStyle">{{ v.name }}</el-tag>
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
           <el-col>
           <el-col>
             <el-form-item label="提货方式">
             <el-form-item label="提货方式">
-              <el-col :span="12">
+              <div class="pick">
+                <el-row v-if="dataList.length">
+                  <el-col v-for="(item, index) in dataList" :key="index" :span="24" class="pick-item">
+                    <el-checkbox-group v-model="categoryArr">
+                      <el-col :span="6" class="pick-item-category">
+                        <el-checkbox :label="item.id">
+                          {{ item.name }}
+                        </el-checkbox>
+                      </el-col>
+                    </el-checkbox-group>
+                    <el-col :span="18" class="pick-item-way">
+                      <el-checkbox v-model="item.isFront" :label="true"> 物流配送(嘉贤物流)</el-checkbox>
+                      <el-checkbox v-model="item.isPick" :label="true">商家自提</el-checkbox>
+                    </el-col>
+                  </el-col>
+                </el-row>
+              </div>
+              <div>注:设置配送方式后提货预约可根据配置的提货方式进行选择</div>
+              <div style="margin: 20px 0">
+                <el-button type="primary" size="default" @click="onSubmit">保存</el-button>
+              </div>
+
+              <!-- <el-col :span="12">
                 <div>
                 <div>
-                    <el-checkbox v-model="isFront" :label="true"> 物流配送(嘉贤物流)</el-checkbox>
+                  <el-checkbox v-model="isFront" :label="true"> 物流配送(嘉贤物流)</el-checkbox>
                 </div>
                 </div>
                 <div>选择商家自提需配置物流产品类别</div>
                 <div>选择商家自提需配置物流产品类别</div>
                 <div>
                 <div>
-                  <el-checkbox-group v-model="frontCategory">
-                    <el-checkbox v-for="(item, index) in dataList" :key="index" :label="item.id">
-                      {{ item.name }}
-                    </el-checkbox>
-                  </el-checkbox-group>
+
                 </div>
                 </div>
               </el-col>
               </el-col>
               <el-col :span="12">
               <el-col :span="12">
                 <div>
                 <div>
-                    <el-checkbox v-model="isPick" :label="true">商家自提</el-checkbox>
+                  <el-checkbox v-model="isPick" :label="true">商家自提</el-checkbox>
                 </div>
                 </div>
                 <div>选择商家自提需配置自提产品类别</div>
                 <div>选择商家自提需配置自提产品类别</div>
                 <div>
                 <div>
@@ -319,18 +337,43 @@
               <div>注:设置配送方式后提货预约可根据配置的提货方式进行选择</div>
               <div>注:设置配送方式后提货预约可根据配置的提货方式进行选择</div>
               <div>
               <div>
                 <el-button type="primary" size="default" @click="onSubmit">保存</el-button>
                 <el-button type="primary" size="default" @click="onSubmit">保存</el-button>
-              </div>
+              </div> -->
             </el-form-item>
             </el-form-item>
           </el-col>
           </el-col>
         </el-form>
         </el-form>
       </div>
       </div>
     </el-card>
     </el-card>
+    <br>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <strong>售后系统关联信息</strong>
+      </div>
+      <!-- type="flex" justify="center" align="middle" class="" -->
+      <el-row class="flex">
+        <el-col :span="2">售后系统编号</el-col>
+        <el-col
+          :span="3"
+          style="margin: 0 20px"
+        ><el-input v-model="infoList.afterNumber" placeholder="请输入售后系统编号" size="mini" clearable />
+        </el-col>
+        <el-col :span="4">售后系统绑定状态</el-col>
+        <el-col :span="3">{{ infoList.binding === 'YES' ? '是' : '否' }}</el-col>
+        <el-col :span="3">绑定时间</el-col>
+        <el-col :span="3">{{ infoList.bindingTime }}</el-col>
+        <el-col :span="3">绑定人</el-col>
+        <el-col :span="2">{{ infoList.bindingName }}</el-col>
+      </el-row>
+      <div style="margin: 20px 0">
+        <el-button type="primary" size="default" @click="onSave">保存</el-button>
+      </div>
+      <!-- <zj-table /> -->
+    </el-card>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
 import { getKingDeeCategory } from '@/api/basic_data/material'
 import { getKingDeeCategory } from '@/api/basic_data/material'
-import { getDealerInfo, updateCustomer, updatePick } from '@/api/basic_data/dealer'
+import { getDealerInfo, updateCustomer, updatePick, updateSystem } from '@/api/basic_data/dealer'
 
 
 export default {
 export default {
   props: {
   props: {
@@ -344,37 +387,58 @@ export default {
       infoList: {},
       infoList: {},
       dataList: [],
       dataList: [],
       radio: [],
       radio: [],
-      isFront:false,
-      isPick:false,
+      isFront: false,
+      isPick: false,
       pickCategory: [],
       pickCategory: [],
-      frontCategory: []
+      frontCategory: [],
+      categoryArr: [],
+      afterNumber: ''
     }
     }
   },
   },
 
 
   async created() {
   async created() {
-    this.getDataList()
+    await this.getDataList()
     const res = await getDealerInfo({ id: this.detailsId })
     const res = await getDealerInfo({ id: this.detailsId })
-    this.isFront = res.data.isFront
-    this.isPick = res.data.isPick
-    if (res.data.kingDeeCustomerCategoriesFront&& res.data.kingDeeCustomerCategoriesFront.length) {
+    // this.isFront = res.data.isFront
+    // this.isPick = res.data.isPick
+    if (res.data.kingDeeCustomerCategoriesFront && res.data.kingDeeCustomerCategoriesFront.length) {
       this.frontCategory = res.data.kingDeeCustomerCategoriesFront.map(k => {
       this.frontCategory = res.data.kingDeeCustomerCategoriesFront.map(k => {
         return k.categoryId
         return k.categoryId
       })
       })
     }
     }
-    if (res.data.kingDeeCustomerCategories&& res.data.kingDeeCustomerCategories.length) {
+    if (res.data.kingDeeCustomerCategories && res.data.kingDeeCustomerCategories.length) {
       this.pickCategory = res.data.kingDeeCustomerCategories.map(k => {
       this.pickCategory = res.data.kingDeeCustomerCategories.map(k => {
         return k.categoryId
         return k.categoryId
       })
       })
     }
     }
+    this.frontCategory.forEach(k => {
+      this.dataList.forEach(i => {
+        if (i.id === k) {
+          i.isFront = true
+        }
+      })
+    })
+    this.pickCategory.forEach(k => {
+      this.dataList.forEach(i => {
+        if (i.id === k) {
+          i.isPick = true
+        }
+      })
+    })
+    this.categoryArr = [...new Set([...this.frontCategory, ...this.pickCategory])]
     this.infoList = res.data
     this.infoList = res.data
   },
   },
   methods: {
   methods: {
     goBack() {
     goBack() {
       this.$emit('close')
       this.$emit('close')
     },
     },
-    //金蝶存货类别列表
+    // 金蝶存货类别列表
     async getDataList() {
     async getDataList() {
       const res = await getKingDeeCategory()
       const res = await getKingDeeCategory()
+      res.data.forEach(k => {
+        k.isFront = false
+        k.isPick = false
+      })
       this.dataList = res.data
       this.dataList = res.data
     },
     },
 
 
@@ -387,25 +451,48 @@ export default {
       })
       })
     },
     },
     onSubmit() {
     onSubmit() {
-      if (!this.isFront && !this.isPick) {
-        this.$errorMsg('必须选择一种提货方式')
-        return
-      }
-      if ((this.isFront && !this.frontCategory.length) || (this.isPick && !this.pickCategory.length)) {
-        this.$errorMsg('必须选择产品类别')
-        return
-      }
- 
+      this.pickCategory = []
+      this.frontCategory = []
+      this.dataList.map(k => {
+        this.categoryArr.map(i => {
+          if (i === k.id) {
+            if (k.isFront) {
+              this.frontCategory.push(i)
+            }
+            if (k.isPick) {
+              this.pickCategory.push(i)
+            }
+          } else {
+            this.$errorMsg('必须选择产品类别')
+            return
+          }
+        })
+      })
+
       updatePick({
       updatePick({
         id: this.detailsId,
         id: this.detailsId,
-        isFront: this.isFront?this.isFront:false,
-        isPick: this.isPick?this.isPick:false,
-        pickCategory:this.isPick? this.pickCategory.join(','):'',
-        frontCategory:this.isFront? this.frontCategory.join(','):''
+        isFront: !!this.frontCategory.length,
+        isPick: !!this.pickCategory.length,
+        pickCategory: this.pickCategory.length ? this.pickCategory.join(',') : '',
+        frontCategory: this.frontCategory.length ? this.frontCategory.join(',') : ''
       }).then(res => {
       }).then(res => {
         this.$successMsg('保存成功')
         this.$successMsg('保存成功')
         this.$emit('close')
         this.$emit('close')
       })
       })
+    },
+    onSave() {
+      updateSystem({
+        id: this.detailsId,
+        afterNumber: this.afterNumber
+      }).then(res => {
+        getDealerInfo({ id: this.detailsId }).then(res => {
+          const { afterType, bindingTime, bindingName } = res.data
+          this.infoList.afterType = afterType
+          this.infoList.bindingTime = bindingTime
+          this.infoList.bindingName = bindingName
+          this.$successMsg('保存成功')
+        })
+      })
     }
     }
   }
   }
 }
 }
@@ -427,7 +514,26 @@ export default {
     }
     }
   }
   }
 }
 }
-
+.pick {
+  width: 600px;
+  border: 1px solid #ebeef5;
+  border-bottom: none;
+  &-item {
+    height: 40px;
+    border-bottom: 1px solid #ebeef5;
+    &-category {
+      border-right: 1px solid #ebeef5;
+    }
+    &-category,
+    &-way {
+      padding: 0 20px;
+    }
+  }
+}
+.flex {
+  display: flex;
+  align-items: center;
+}
 .tagStyle {
 .tagStyle {
   margin: 0 18px;
   margin: 0 18px;
 }
 }

+ 420 - 0
src/views/basic_data/dealer/components/subMerchantDetail.vue

@@ -0,0 +1,420 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header content="详情" @back="goBack" />
+    </div>
+    <el-form :model="infoList" label-width="130px" size="small" label-position="right">
+      <el-card class="">
+        <div slot="header" class="clearfix">
+          <strong>客户</strong>
+        </div>
+        <div>
+          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="创建组织" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="客户编码" prop="">
+                <el-input v-model="infoList.number" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="使用组织" prop="">
+                <el-input v-model="infoList.useOrgName" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="简称" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!-- </el-form> -->
+        </div>
+      </el-card>
+      <br>
+      <el-card class="">
+        <div slot="header" class="clearfix">
+          <strong>基本信息</strong>
+        </div>
+        <span>地址</span>
+        <el-divider />
+        <div>
+          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="国家" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="地区" prop="">
+                <el-input v-model="infoList.region" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="省份" prop="">
+                <el-input v-model="infoList.province" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="城市" prop="">
+                <el-input v-model="infoList.city" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="通信地址" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="邮政编码" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="公司网址" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="商城订单对应组织" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="联系邮箱" prop="">
+                <el-input v-model="infoList.email" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!-- </el-form> -->
+        </div>
+        <span>管理</span>
+        <el-divider />
+        <div>
+          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="联系电话" prop="">
+                <el-input v-model="infoList.mobile" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="传真" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="公司类别" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="公司性质" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="公司规模" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!-- </el-form> -->
+        </div>
+        <span>相关</span>
+        <el-divider />
+        <div>
+          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="对应供应商" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="对应集团客户" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="客户类别" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="客户分组" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="集团客户" prop="">
+                <el-checkbox disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="默认付款方" prop="">
+                <el-checkbox disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="不校验可发量" prop="">
+                <el-checkbox disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="对应组织" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="备注" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!-- </el-form> -->
+        </div>
+        <span>开票信息</span>
+        <el-divider />
+        <div>
+          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发票抬头" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="纳税登记号" prop="">
+                <el-input disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="开户银行" prop="">
+                <el-input v-model="infoList.bank" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="银行账号" prop="">
+                <el-input v-model="infoList.bankAccount" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="开票联系电话" prop="">
+                <el-input v-model="infoList.invoicePhone" disabled />
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="开票通讯地址" prop="">
+                <el-input v-model="infoList.invoiceAddress" disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!-- </el-form> -->
+        </div>
+        <span>智慧订货</span>
+        <el-divider />
+        <div>
+          <!-- <el-form label-width="130px" size="small" label-position="right"> -->
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="允许对接智慧订单" prop="">
+                <el-checkbox disabled />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <!-- </el-form> -->
+        </div>
+      </el-card>
+    </el-form>
+    <br>
+    <el-card>
+      <div slot="header" class="clearfix">
+        <strong>售后系统关联信息</strong>
+      </div>
+      <el-row :gutter="20" class="flex">
+        <el-col :span="4">售后系统销售编号</el-col>
+        <el-col :span="4"> <el-input v-model="infoList.afterNumber" disabled placeholder="" size="mini" /></el-col>
+        <el-col :span="4">售后系统绑定状态</el-col>
+        <el-col :span="10">{{ infoList.binding === 'YES' ? '是' : '否' }}</el-col>
+      </el-row>
+      <el-row :gutter="20" class="flex">
+        <el-col :span="8">
+          <el-radio-group v-model="infoList.afterType" disabled>
+            <el-radio v-for="item in afterTypeList" :key="item.value" :label="item.value">{{
+              item.label
+            }}</el-radio>
+          </el-radio-group>
+        </el-col>
+        <el-col :span="2"> 绑定时间 </el-col>
+        <el-col :span="4"> {{ infoList.bindingTime }}</el-col>
+        <el-col :span="2"> 绑定人 </el-col>
+        <el-col :span="4"> {{ infoList.bindingName }} </el-col>
+      </el-row>
+    </el-card>
+  </div>
+</template>
+
+<script>
+import { getKingDeeCategory } from '@/api/basic_data/material'
+import { getStageCustomerDetail, updateCustomer, updatePick } from '@/api/basic_data/dealer'
+
+export default {
+  props: {
+    detailsId: {
+      type: String,
+      required: true
+    }
+  },
+  data() {
+    return {
+      infoList: {},
+      dataList: [],
+      radio: [],
+      isFront: false,
+      isPick: false,
+      pickCategory: [],
+      frontCategory: [],
+      categoryArr: [],
+      code: '',
+      afterTypeList: [
+        { label: '上级商户销售编号', value: 'CHARGE' },
+        { label: '二级商户编号', value: 'STAGE' }
+      ]
+    }
+  },
+
+  async created() {
+    await this.getDataList()
+    const res = await getStageCustomerDetail({ id: this.detailsId })
+    // this.isFront = res.data.isFront
+    // this.isPick = res.data.isPick
+    if (res.data.kingDeeCustomerCategoriesFront && res.data.kingDeeCustomerCategoriesFront.length) {
+      this.frontCategory = res.data.kingDeeCustomerCategoriesFront.map(k => {
+        return k.categoryId
+      })
+    }
+    if (res.data.kingDeeCustomerCategories && res.data.kingDeeCustomerCategories.length) {
+      this.pickCategory = res.data.kingDeeCustomerCategories.map(k => {
+        return k.categoryId
+      })
+    }
+    this.frontCategory.forEach(k => {
+      this.dataList.forEach(i => {
+        if (i.id === k) {
+          i.isFront = true
+        }
+      })
+    })
+    this.pickCategory.forEach(k => {
+      this.dataList.forEach(i => {
+        if (i.id === k) {
+          i.isPick = true
+        }
+      })
+    })
+    this.categoryArr = [...new Set([...this.frontCategory, ...this.pickCategory])]
+    this.infoList = res.data
+  },
+  methods: {
+    goBack() {
+      this.$emit('close')
+    },
+    // 金蝶存货类别列表
+    async getDataList() {
+      const res = await getKingDeeCategory()
+      res.data.forEach(k => {
+        k.isFront = false
+        k.isPick = false
+      })
+      this.dataList = res.data
+    },
+
+    handelSubmit() {
+      updateCustomer({
+        id: this.infoList.id,
+        isFront: this.infoList.isFront
+      }).then(res => {
+        this.$successMsg(this.infoList.isFront ? '已更改为前置仓' : '已更改为经销商自有仓库')
+      })
+    },
+    onSubmit() {
+      this.pickCategory = []
+      this.frontCategory = []
+      this.dataList.map(k => {
+        this.categoryArr.map(i => {
+          if (i === k.id) {
+            if (k.isFront) {
+              this.frontCategory.push(i)
+            }
+            if (k.isPick) {
+              this.pickCategory.push(i)
+            }
+          } else {
+            this.$errorMsg('必须选择产品类别')
+            return
+          }
+        })
+      })
+
+      updatePick({
+        id: this.detailsId,
+        isFront: !!this.frontCategory.length,
+        isPick: !!this.pickCategory.length,
+        pickCategory: this.pickCategory.length ? this.pickCategory.join(',') : '',
+        frontCategory: this.frontCategory.length ? this.frontCategory.join(',') : ''
+      }).then(res => {
+        this.$successMsg('保存成功')
+        this.$emit('close')
+      })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.sty {
+  margin-bottom: 20px;
+}
+
+::v-deep .diy-table-1 {
+  width: 50%;
+
+  .xyed {
+    border-top: 1px solid #ebeef5;
+
+    .item {
+      margin-bottom: 18px;
+    }
+  }
+}
+.pick {
+  width: 600px;
+  border: 1px solid #ebeef5;
+  border-bottom: none;
+  &-item {
+    height: 40px;
+    border-bottom: 1px solid #ebeef5;
+    &-category {
+      border-right: 1px solid #ebeef5;
+    }
+    &-category,
+    &-way {
+      padding: 0 20px;
+    }
+  }
+}
+.flex {
+  display: flex;
+  align-items: center;
+  margin-bottom: 20px;
+}
+.tagStyle {
+  margin: 0 18px;
+}
+</style>

+ 248 - 0
src/views/basic_data/dealer/components/subMerchantForm.vue

@@ -0,0 +1,248 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header :content="title" @back="goBack" />
+    </div>
+    <el-form ref="formData" :model="formData" label-width="120px" :inline="false" size="mini" label-position="left">
+      <el-card>
+        <div slot="header" class="clearfix">
+          <strong>客户信息</strong>
+        </div>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="上级商户编码" prop="higherPrantNumber">
+              <el-input v-model="formData.higherPrantNumber" placeholder="请输入上级商户编码" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="上级商户信息" prop="higherPrantName">
+              <el-input v-model="formData.higherPrantName" placeholder="请输入上级商户信息" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="商户编码">
+              <el-input v-model="formData.number" disabled placeholder="创建自动生成(仅显示不能编辑)" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="商户名称" prop="name">
+              <el-input v-model="formData.name" placeholder="请输入客户信息" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="负责人" prop="chargeName">
+              <el-input v-model="formData.chargeName" placeholder="请输入负责人姓名" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="联系电话" prop="mobile">
+              <el-input v-model="formData.mobile" placeholder="请输入联系电话" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="地址" prop="invoiceAddress">
+              <el-input v-model="formData.invoiceAddress" placeholder="请输入地址" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-card>
+      <el-card>
+        <div slot="header" class="clearfix">
+          <strong>售后系统关联信息</strong>
+        </div>
+        <el-row :gutter="20" class="center">
+          <el-col :span="4">售后系统销售编号</el-col>
+          <el-col :span="4">
+            <el-form-item label-width="0" prop="afterNumber" style="margin: 0">
+              <el-input
+                v-model="formData.afterNumber"
+                placeholder="请输入售后系统销售编号"
+                size="mini"
+                :disabled="moduleType == 3"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="4">售后系统绑定状态</el-col>
+          <el-col :span="4">{{ formData.binding === 'YES' ? '是' : '否' }}</el-col>
+          <el-col v-if="moduleType !== 3 && moduleType !== 1" :span="4">
+            <el-button type="primary" size="mini" @click="handleBinding">绑定</el-button>
+          </el-col>
+        </el-row>
+        <el-row class="radio center">
+          <el-col :span="8">
+            <el-form-item label-width="0" prop="afterType" style="margin: 0">
+              <el-radio-group v-model="formData.afterType" :disabled="moduleType == 3">
+                <el-radio v-for="item in afterTypeList" :key="item.value" :label="item.value">{{
+                  item.label
+                }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="2">绑定时间</el-col>
+          <el-col :span="4">{{ formData.bindingTime }}</el-col>
+          <el-col :span="2">绑定人</el-col>
+          <el-col :span="4">{{ formData.bindingName }}</el-col>
+        </el-row>
+      </el-card>
+      <el-card>
+        <div slot="header" class="clearfix">
+          <strong>使用状态</strong>
+        </div>
+        <el-form-item label-width="0" prop="forbidStatus" style="margin: 0">
+          <el-radio-group v-model="formData.forbidStatus" :disabled="moduleType == 3">
+            <el-radio label="A">正常</el-radio>
+            <el-radio label="B">禁用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <div v-if="moduleType !== 3" style="margin: 20px">
+          <el-button type="primary" size="mini" @click="handleSubmit">提交</el-button>
+          <el-button type="primary" size="mini" @click="handleReset">重置</el-button>
+        </div>
+      </el-card>
+      <el-card v-if="moduleType == 3">
+        <div slot="header" class="clearfix">
+          <strong>审核信息</strong>
+        </div>
+        <el-row :gutter="20">
+          <el-col :span="8">
+            <el-form-item label="审核人"> <el-input v-model="formData.approvalName" placeholder="系统自动生成" disabled /> </el-form-item></el-col>
+          <el-col :span="8">
+            <el-form-item label="审核时间"> <el-input v-model="formData.approvalTime" placeholder="系统自动生成" disabled /> </el-form-item></el-col>
+          <el-col :span="24">
+            <el-form-item label="备注"> <el-input v-model="formData.approvalRemark" placeholder="请输入备注" /> </el-form-item></el-col>
+        </el-row>
+
+        <div style="margin: 20px">
+          <el-button type="primary" size="mini" @click="handleExamine">提交</el-button>
+          <el-button type="primary" size="mini" @click="handleReset">重置</el-button>
+        </div>
+      </el-card>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import {
+  addStagecustomer,
+  examineStagecustomer,
+  updateStagecustomer,
+  updateSystem,
+  getStageCustomerDetail
+} from '@/api/basic_data/dealer'
+
+export default {
+  props: {
+    moduleType: {
+      type: Number,
+      default: null
+    },
+    detailsId: {
+      type: String,
+      default: null
+    }
+  },
+  data() {
+    return {
+      title: '新增',
+      afterTypeList: [
+        { label: '上级商户销售编号', value: 'CHARGE' },
+        { label: '二级商户编号', value: 'STAGE' }
+      ],
+      formData: {
+        higherPrantNumber: '',
+        higherPrantName: '',
+        number: '',
+        name: '',
+        chargeName: '',
+        mobile: '',
+        invoiceAddress: '',
+        afterNumber: '',
+        binding: '否',
+        afterType: 'CHARGE',
+        bindingTime: '',
+        bindingName: '',
+        forbidStatus: 'A',
+        approvalName: '',
+        approvalTime: '',
+        approvalRemark: ''
+      }
+    }
+  },
+  mounted() {
+    if ((this.moduleType === 3 || this.moduleType === 4) && this.detailsId) {
+      this.title = this.moduleType === 3 ? '审核' : '编辑'
+      this.getStageCustomerDetail()
+    }
+  },
+  methods: {
+    goBack() {
+      this.$emit('close')
+    },
+    getStageCustomerDetail() {
+      getStageCustomerDetail({ id: this.detailsId }).then(res => {
+        this.formData = res.data
+      })
+    },
+    handleSubmit() {
+      if (this.moduleType !== 1) {
+        updateStagecustomer({
+          ...this.formData
+        }).then(res => {
+          this.$successMsg('编辑成功')
+        })
+      } else {
+        addStagecustomer({
+          ...this.formData
+        }).then(res => {
+          this.$successMsg('新增成功')
+        })
+      }
+      this.$emit('close')
+    },
+    handleExamine() {
+      examineStagecustomer({
+        id: this.formData.id,
+        examineStatus: 'OK',
+        approvalRemark: this.formData.approvalRemark
+      }).then(res => {
+        console.log(res)
+        this.$successMsg('审核成功')
+        this.$emit('close')
+      })
+    },
+    handleBinding() {
+      updateSystem({
+        id: this.detailsId,
+        afterNumber: this.formData.afterNumber
+      }).then(res => {
+        getStageCustomerDetail({ id: this.detailsId }).then(res => {
+          const { afterType, bindingTime, bindingName } = res.data
+          this.formData.afterType = afterType
+          this.formData.bindingTime = bindingTime
+          this.formData.bindingName = bindingName
+          this.$successMsg('绑定成功')
+        })
+      })
+    },
+    handleReset() {
+      this.$refs.formData.resetFields()
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.sty {
+  margin-bottom: 20px;
+}
+::v-deep .el-card {
+  margin-bottom: 20px;
+}
+.center {
+  display: flex;
+  align-items: center;
+}
+.radio {
+  padding: 20px 0;
+}
+</style>

+ 11 - 11
src/views/basic_data/dealer/dealer_list.vue

@@ -1,14 +1,14 @@
 <template>
 <template>
   <template-page
   <template-page
     ref="pageRef"
     ref="pageRef"
-    :getList="getList"
-    :exportList="exportList"
+    :get-list="getList"
+    :export-list="exportList"
     :operation="operation()"
     :operation="operation()"
-    :optionsEvensGroup="optionsEvensGroup"
-    :columnParsing="columnParsing"
+    :options-evens-group="optionsEvensGroup"
+    :column-parsing="columnParsing"
   >
   >
     <Popu v-if="visible">
     <Popu v-if="visible">
-      <DealerListDetail :detailsId="detailsId" @close="handleClose" />
+      <DealerListDetail :details-id="detailsId" @close="handleClose" />
     </Popu>
     </Popu>
   </template-page>
   </template-page>
 </template>
 </template>
@@ -18,7 +18,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
 import Popu from '@/components/template/popu.vue'
 import Popu from '@/components/template/popu.vue'
-import { getDealerListV2, exportDealerListV2,importCustomerV2 } from '@/api/basic_data/dealer'
+import { getDealerListV2, exportDealerListV2, importCustomerV2 } from '@/api/basic_data/dealer'
 import DealerListDetail from './components/dealer_list-detail.vue'
 import DealerListDetail from './components/dealer_list-detail.vue'
 export default {
 export default {
   components: { TemplatePage, Popu, DealerListDetail },
   components: { TemplatePage, Popu, DealerListDetail },
@@ -28,14 +28,14 @@ export default {
       visible: false,
       visible: false,
       // 事件组合
       // 事件组合
       optionsEvensGroup: [
       optionsEvensGroup: [
-       [
+        [
           [
           [
             {
             {
               name: '导入',
               name: '导入',
               render: this.importButton(importCustomerV2)
               render: this.importButton(importCustomerV2)
             }
             }
           ]
           ]
-        ],
+        ]
       ],
       ],
       // 表格属性
       // 表格属性
       tableAttributes: {
       tableAttributes: {
@@ -71,10 +71,10 @@ export default {
     operation() {
     operation() {
       return (h, { row, index, column }) => {
       return (h, { row, index, column }) => {
         return (
         return (
-          <div class="operation-btns">
+          <div class='operation-btns'>
             <el-button
             <el-button
-              size="mini"
-              type="text"
+              size='mini'
+              type='text'
               onClick={ () => {
               onClick={ () => {
                 this.visible = true
                 this.visible = true
                 this.detailsId = row.id
                 this.detailsId = row.id

+ 135 - 0
src/views/basic_data/dealer/subMerchant.vue

@@ -0,0 +1,135 @@
+<template>
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :export-list="exportList"
+    :operation="operation()"
+    :options-evens-group="optionsEvensGroup"
+    :column-parsing="columnParsing"
+    :replace-or-not-map="false"
+  >
+    <Popu v-if="visible">
+      <SubMerchantForm v-if="moduleType === 1 || moduleType === 3 || moduleType === 4" :module-type="moduleType" :details-id="detailsId" @close="handleClose" />
+      <SubMerchantDetail v-if="moduleType === 2" :details-id="detailsId" @close="handleClose" />
+    </Popu>
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import { getStagecustomerListV2, exportStagecustomerV2 } from '@/api/basic_data/dealer'
+import SubMerchantDetail from './components/subMerchantDetail.vue'
+import SubMerchantForm from './components/subMerchantForm.vue'
+
+export default {
+  components: { TemplatePage, Popu, SubMerchantDetail, SubMerchantForm },
+  mixins: [import_mixin, add_callback_mixin],
+  data() {
+    return {
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '新增',
+              click: this.addOn(() => {
+                this.visible = true
+                this.moduleType = 1
+              })
+            //   isRole: this.$checkBtnRole('add', this.$route.meta.roles)
+            }
+          ]
+        ]
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: [],
+
+      detailsId: ''
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getStagecustomerListV2(...p)
+    },
+    // 列表导出函数
+    exportList: exportStagecustomerV2,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return (
+          <div class='operation-btns'>
+            <el-button
+              size='mini'
+              type='text'
+              onClick={ () => {
+                this.visible = true
+                this.moduleType = 2
+                this.detailsId = row.id
+              }}
+            >
+                查看
+            </el-button>
+            {row.examineStatus === 'SAVE' || row.examineStatus === 'WAIT'
+              ? <el-button
+                size='mini'
+                type='text'
+                onClick={ () => {
+                  this.visible = true
+                  this.moduleType = 4
+                  this.detailsId = row.id
+                }}
+              >
+            编辑
+              </el-button> : null
+            }
+            {row.examineStatus === 'SAVE' || row.examineStatus === 'WAIT'
+              ? <el-button
+                size='mini'
+                type='text'
+                onClick={ () => {
+                  this.visible = true
+                  this.moduleType = 3
+                  this.detailsId = row.id
+                }}
+              >
+                审核
+              </el-button> : null
+            }
+          </div>
+        )
+      }
+    },
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
+      this.$refs.pageRef.refreshList()
+    }
+  }
+}
+</script>
+
+  <style lang="scss" scoped></style>
+