ソースを参照

经销商详情

zhouhao 2 年 前
コミット
583d675fb6

+ 33 - 10
src/views/basic_data/dealer/components/dealer_list-detail.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="sty">
-      <el-page-header @back="goBack" content="详情页面"> </el-page-header>
+      <el-page-header @back="goBack" content="详情页面"></el-page-header>
     </div>
     <el-form :model="infoList" label-width="130px" size="small" label-position="right">
       <el-card class="">
@@ -257,12 +257,22 @@
       <div slot="header" class="clearfix">
         <strong>标签信息</strong>
       </div>
-      <div class="diy-table-1">
+      <div class="diy-table-1" style="width: 100%">
         <el-form label-width="120px" class="demo-ruleForm">
-          <el-form-item label="集团客户" prop="">
-            <el-radio v-model="infoList.isGroupCompany" :label="true">是</el-radio>
-            <el-radio v-model="infoList.isGroupCompany" :label="false">否</el-radio>
-          </el-form-item>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="集团客户" prop="">
+                <el-radio v-model="infoList.isGroupCompany" :label="true">是</el-radio>
+                <el-radio v-model="infoList.isGroupCompany" :label="false">否</el-radio>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="是否前置仓" prop="">
+                <el-radio v-model="infoList.isFront" :label="true">前置仓</el-radio>
+                <el-radio v-model="infoList.isFront" :label="false">经销商自有仓库</el-radio>
+              </el-form-item>
+            </el-col>
+          </el-row>
           <el-form-item label="分子公司" prop="">
             <el-tag class="tagStyle" v-for="v in infoList.kingDeeCustomers" :key="v.id">{{ v.name }}</el-tag>
           </el-form-item>
@@ -277,17 +287,26 @@
 </template>
 
 <script>
+import { getDealerInfo } from '@/api/basic_data/dealer'
+
 export default {
   props: {
-    infoList: {
-      type: Object,
+
+    detailsId: {
+      type: String,
       required: true
     }
   },
   data() {
-    return {}
+    return {
+      infoList: {}
+    }
+  },
+
+  async created() {
+    const res = await getDealerInfo({ id: this.detailsId })
+    this.infoList = res.data
   },
-  created() {},
   methods: {
     goBack() {
       this.$parent.isShow = true
@@ -300,15 +319,19 @@ export default {
 .sty {
   margin-bottom: 20px;
 }
+
 ::v-deep .diy-table-1 {
   width: 50%;
+
   .xyed {
     border-top: 1px solid #ebeef5;
+
     .item {
       margin-bottom: 18px;
     }
   }
 }
+
 .tagStyle {
   margin: 0 18px;
 }

+ 4 - 5
src/views/basic_data/dealer/dealer_list.vue

@@ -115,7 +115,7 @@
         </div>
       </div>
     </div>
-    <DealerListDetail :infoList="inforList" v-else />
+    <DealerListDetail :infoList="inforList" :detailsId="detailsId" v-else />
   </div>
 </template>
 
@@ -128,7 +128,7 @@ export default {
     return {
       isShow: true,
       dataList: [], // 列表数据
-
+      detailsId: '',
       listLoading: false, // 列表加载loading
       screenForm: {},
       currentPage: 1, // 当前页码
@@ -197,10 +197,9 @@ export default {
       this.dataList = res.data.records
       this.listTotal = res.data.total
     },
-    async editFn(id) {
+    editFn(id) {
       this.isShow = false
-      const res = await getDealerInfo({ id })
-      this.inforList = res.data
+      this.detailsId = id
     }
   }
 }