瀏覽代碼

基础资料L >供货商 :
部分参数删除
列表新增参数 供应商分类

cyang233 2 年之前
父節點
當前提交
07bf856bfa

+ 11 - 3
src/components/corpType/index.vue

@@ -43,7 +43,7 @@ import {
   detail,
   deleteDetails
 } from "@/api/basicData/customerCategory";
-import { customerParameter } from "@/enums/management-type";
+import { customerParameter,supplierParameter } from "@/enums/management-type";
 export default {
   name: "customerInformation",
   data() {
@@ -63,6 +63,12 @@ export default {
       query: {}
     };
   },
+  props:{
+    corpType:{
+        type:String,
+        default:''
+    }
+  },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(141), option);
     this.option.height = window.innerHeight - 500;
@@ -126,7 +132,8 @@ export default {
     },
     //查询全部
     initData() {
-      customerList({ corpType: customerParameter.code }).then(res => {
+      console.log("this.corpType==='GYS'",this.corpType==='GYS')
+      customerList({ corpType: this.corpType==='GYS'?supplierParameter.code:customerParameter.code }).then(res => {
         const column = this.findObject(this.option.column, "parentId");
         column.dicData = res.data.data.records;
       });
@@ -187,7 +194,8 @@ export default {
       const { createTimeA } = this.query;
       let values = {
         ...params,
-        corpType: customerParameter.code,
+        // corpType: customerParameter.code,
+        corpType:this.corpType==='GYS'?supplierParameter.code:customerParameter.code,
         size: this.page.pageSize,
         current: this.page.currentPage
       };

+ 134 - 130
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -37,6 +37,9 @@
             <!--<el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0" @change="whetherChange"/>-->
             <el-switch v-model="form.whether" active-text="是" inactive-text="否" active-value="1" inactive-value="0"/>
           </template>
+          <template slot="explosionProof">
+            <el-switch v-model="form.explosionProof" active-text="是" inactive-text="否" active-value="1" inactive-value="0"/>
+          </template>
         </avue-form>
       </trade-card>
       <containerTitle title="附件信息"></containerTitle>
@@ -203,136 +206,136 @@ export default {
             prop: "goodsDescription",
             span: 8,
           },
-          {
-            label: "采购价",
-            prop: "purchasePrice",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "销售价",
-            prop: "salesPrice",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "售价1",
-            prop: "priceOne",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "售价2",
-            prop: "priceTwo",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "售价3",
-            prop: "priceThree",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "售价4",
-            prop: "priceFour",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "售价5",
-            prop: "priceFive",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "售价6",
-            prop: "priceSix",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "售价7",
-            prop: "priceSeven",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: "售价8",
-            prop: "priceEight",
-            type: 'number',
-            minRows: 0,
-            controls: false,
-            span: 8,
-            rules: [{
-              required: true,
-              message: " ",
-              trigger: "blur"
-            }]
-          },
+          // {
+          //   label: "采购价",
+          //   prop: "purchasePrice",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "销售价",
+          //   prop: "salesPrice",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "售价1",
+          //   prop: "priceOne",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "售价2",
+          //   prop: "priceTwo",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "售价3",
+          //   prop: "priceThree",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "售价4",
+          //   prop: "priceFour",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "售价5",
+          //   prop: "priceFive",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "售价6",
+          //   prop: "priceSix",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "售价7",
+          //   prop: "priceSeven",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
+          // {
+          //   label: "售价8",
+          //   prop: "priceEight",
+          //   type: 'number',
+          //   minRows: 0,
+          //   controls: false,
+          //   span: 8,
+          //   rules: [{
+          //     required: true,
+          //     message: " ",
+          //     trigger: "blur"
+          //   }]
+          // },
           {
             label: "是否管理批次号",
             prop: "whether",
@@ -592,6 +595,7 @@ export default {
       getDetails({ id: id })
         .then(res => {
           this.form = res.data.data;
+          this.form.explosionProof+=''
           // this.data = res.data.data.stockGoodsList;
           this.filesList = res.data.data.goodsFilesList
           this.whetherChange(res.data.data.whether)

+ 29 - 1
src/views/tirePartsMall/basicData/commodityInformation/index.vue

@@ -18,7 +18,9 @@
             <template slot="menuLeft">
               <el-button type="primary" size="mini" @click.stop="newAdd()">新建产品
               </el-button>
-              <el-button type="primary" size="mini" @click="excelBox = true">导入
+              <el-button type="primary" size="mini" icon="el-icon-bottom" @click="excelBox = true">导入
+              </el-button>
+              <el-button type="primary" size="mini" icon="el-icon-top" @click="outExport">导出
               </el-button>
             </template>
             <template slot-scope="{ row, index }" slot="cname">
@@ -233,6 +235,32 @@ export default {
         }=${getToken()}`
       );
     },
+        //导出
+        outExport() {
+      let config = { params: { ...this.search } }
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof (value) !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + '[' + key + ']';
+                config.params[params] = value[key]
+              }
+              delete config.params[propName]
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-sales-part/goodsDesc/exportGoodsList',      //跳转目标窗口的地址
+        query: {
+          ...config.params,    //括号内是要传递给新窗口的参数
+          identification: this.url
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    },
     uploadAfter(res, done, loading, column) {
       this.excelBox = false;
       this.refreshChange();

+ 57 - 27
src/views/tirePartsMall/basicData/commodityInformation/js/optionList.js

@@ -23,6 +23,11 @@ export const option = {
       overHidden: true,
     },
     {
+      label: "商品分类",
+      prop: "brand_name",
+      overHidden: true,
+    },
+    {
       label: "规格型号",
       prop: "specificationAndModel",
       search: true,
@@ -45,49 +50,74 @@ export const option = {
         value: 'id'
       },
       dicUrl: '/api/blade-sales-part/brandDesc/listAll'
-    },{
-      label: "所属公司",
-      prop: "salesCompanyId",
+    },
+    {
+      label: "采购价",
+      prop: "brandId",
       search: true,
       overHidden: true,
-      type: 'select',
-      props: {
-        label: 'fullName',
-        value: 'id'
-      },
-      dicUrl: '/api/blade-system/dept/top-list'
     },
     {
-      label: "是否管理批次号",
-      prop: "whether",
-      width:120,
+      label: "销售价",
+      prop: "brandId",
+      search: true,
+      overHidden: true,
+    },{
+      label: "库存预警",
+      prop: "inventory_alert",
+      search: true,
+      overHidden: true,
+      type: 'select',
+    },{
+      label: "商品描述",
+      prop: "goods_description",
       search: true,
       overHidden: true,
-      labelWidth:120,
-      searchLabelWidth:120,
-      type:'select',
-      dicData:[{
-        label:'否',
-        value:"0"
-      },{
-        label:'是',
-        value:"1"
-      }],
     },
     {
-      label: "防爆",
-      prop: "explosionProof",
-      search: true,
+      label: "是否启用",
+      prop: "enableOrNot",
       overHidden: true,
-      type:'select',
+      type: 'select',
       dicData:[{
         label:'否',
         value:0
       },{
         label:'是',
         value:1
-      }],
+      }]
     },
+    // {
+    //   label: "是否管理批次号",
+    //   prop: "whether",
+    //   width:120,
+    //   search: true,
+    //   overHidden: true,
+    //   labelWidth:120,
+    //   searchLabelWidth:120,
+    //   type:'select',
+    //   dicData:[{
+    //     label:'否',
+    //     value:"0"
+    //   },{
+    //     label:'是',
+    //     value:"1"
+    //   }],
+    // },
+    // {
+    //   label: "防爆",
+    //   prop: "explosionProof",
+    //   search: true,
+    //   overHidden: true,
+    //   type:'select',
+    //   dicData:[{
+    //     label:'否',
+    //     value:0
+    //   },{
+    //     label:'是',
+    //     value:1
+    //   }],
+    // },
   ]
 }
 export const optionList = {

+ 21 - 23
src/views/tirePartsMall/basicData/customerInformation/index.vue

@@ -4,18 +4,18 @@
       <el-row>
         <el-col :span="4">
           <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;"
-                     @save="corpTypeVisible = true">
+            @save="corpTypeVisible = true">
             <template slot="addBtn">
               <i class="el-icon-setting" style="font-size:18px;line-height: 30px;width: 20px;padding: 0 10px;"
-                 @click="corpTypeVisible = true"></i>
+                @click="corpTypeVisible = true"></i>
             </template>
           </avue-tree>
         </el-col>
         <el-col :span="20">
           <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
-                     @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
-                     @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
-                     @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
+            @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+            @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+            @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
             <template slot="menuLeft">
               <el-button type="primary" size="mini" @click.stop="newAdd()">新建客户
               </el-button>
@@ -31,11 +31,9 @@
             <!--  <crop-select v-model="search.ids" corpType="KH"></crop-select>-->
             <!--</template>-->
             <template slot="dateSearch">
-              <el-date-picker v-model="search.date" type="daterange" start-placeholder="开始日期"
-                              end-placeholder="结束日期"
-                              format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
-                              :default-time="['00:00:00', '23:59:59']"
-                              :picker-options="pickerOptions">
+              <el-date-picker v-model="search.date" type="daterange" start-placeholder="开始日期" end-placeholder="结束日期"
+                format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" :default-time="['00:00:00', '23:59:59']"
+                :picker-options="pickerOptions">
               </el-date-picker>
             </template>
             <template slot-scope="{type,size, row, index }" slot="menu">
@@ -47,10 +45,10 @@
       </el-row>
 
     </basic-container>
-    <details-page v-if="!show" @goBack="goBack()" :detailData="detailData"/>
+    <details-page v-if="!show" @goBack="goBack()" :detailData="detailData" />
     <!--<details-info v-if="!showInfo" @goBack="goBack()" @editOpen="editOpen" :detailData="detailData" />-->
-    <el-dialog title="设置客户分类" v-dialogDrag :visible.sync="corpTypeVisible" class="avue-dialog" width="80%"
-               append-to-body @closed="corpTypeClosed">
+    <el-dialog title="设置客户分类" v-dialogDrag :visible.sync="corpTypeVisible" class="avue-dialog" width="80%" append-to-body
+      @closed="corpTypeClosed">
       <span>
         <corp-type></corp-type>
         <!-- <avue-form :key="reload" ref="corpType" v-model="form4" :option="option4" style="margin-top:20px">
@@ -62,9 +60,9 @@
       </div>
     </el-dialog>
     <el-dialog title="导入客户" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
-               v-dialog-drag>
-      <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading"
-                 :upload-before="uploadBefore" :upload-after="uploadAfter">
+      v-dialog-drag>
+      <avue-form :option="excelOption" v-model="excelForm" table-loading="excelLoading" :upload-before="uploadBefore"
+        :upload-after="uploadAfter">
         <template slot="excelTemplate">
           <el-button type="primary" @click="derivation">
             点击下载<i class="el-icon-download el-icon--right"></i>
@@ -80,7 +78,7 @@
 
 <script>
 import detailsPage from "./detailsPage";
-import {option} from "./js/optionList";
+import { option } from "./js/optionList";
 import {
   getList,
   getCorpType,
@@ -89,7 +87,7 @@ import {
   customerList
 } from "@/api/tirePartsMall/basicData/customerInformation";
 import corpType from './components/index'
-import {getToken} from "@/util/auth";
+import { getToken } from "@/util/auth";
 
 export default {
   name: "index",
@@ -279,7 +277,7 @@ export default {
     },
     //导出
     outExport() {
-      let config = {params: {...this.search}}
+      let config = { params: { ...this.search } }
       if (config.params) {
         for (const propName of Object.keys(config.params)) {
           const value = config.params[propName];
@@ -295,7 +293,7 @@ export default {
         }
       }
       const routeData = this.$router.resolve({
-        path: '/api/blade-sales-part/corpsDesc/pjCorpsExport',      //跳转目标窗口的地址
+        path: '/api/blade-sales-part/corpsDesc/supplierExport',      //跳转目标窗口的地址
         query: {
           ...config.params,    //括号内是要传递给新窗口的参数
           identification: this.url
@@ -330,10 +328,10 @@ export default {
       this.getWorkDicts("client_status").then(res => {
         this.findObject(this.option.column, "status").dicData = res.data.data;
       });
-      getCorpType({corpType: 'KH'}).then(res => {
+      getCorpType({ corpType: 'KH' }).then(res => {
         this.treeData = res.data.data
       });
-      customerList({corpType: "KH"}).then(res => {
+      customerList({ corpType: "KH" }).then(res => {
         this.findObject(this.option4.column, "parentId").dicData = res.data.data.records
       });
       this.$refs.crud.init();
@@ -421,7 +419,7 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-        remove({id: row.id, corpType: "KH"}).then(res => {
+        remove({ id: row.id, corpType: "KH" }).then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",

+ 54 - 18
src/views/tirePartsMall/basicData/customerInformation/js/optionList.js

@@ -21,53 +21,92 @@ export const option = {
       label: "客户名称",
       prop: "cname",
       overHidden: true,
-      index: 1
+      search: true,
     },
     {
-      label: "客户名称",
-      prop: "ids",
-      type: 'select',
-      hide: true,
-      showColumn: false,
+      label: "发货仓库",
+      prop: "deliveryWarehouseName",
+      overHidden: true,
       search: true,
-      index: 2
     },
     {
-      label: "电话",
-      prop: "tel",
+      label: "商城价格",
+      prop: "priceSystem",
+      overHidden: true,
+    },
+    {
+      label: "客户分类",
+      prop: "corpType",
+      overHidden: true,
+    },
+    {
+      label: "业务员",
+      prop: "salesmanName",
       overHidden: true,
       search: true,
-      index: 3
+    },
+    {
+      label: "账期",
+      prop: "accountPeriod",
+      overHidden: true,
+    },
+    {
+      label: "信用额度",
+      prop: "creditLimit",
+      overHidden: true,
+    },
+    {
+      label: "使用信用额度",
+      prop: "useCreditLimit",
+      overHidden: true,
+    },
+    {
+      label: "是否启用",
+      prop: "enableOrNot",
+      overHidden: true,
+      type: 'select',
+      dicData:[{
+        label:'否',
+        value:0
+      },{
+        label:'是',
+        value:1
+      }]
     },
     {
       label: "合同金额",
       prop: "debitAmount",
       overHidden: true,
-      index: 4
+      hide: true,
+      showColumn: false,
     },
     {
       label: "已送货",
       prop: "deliveringAmount",
       overHidden: true,
-      index: 5
+      hide: true,
+      showColumn: false,
     },
     {
       label: "预收款",
       prop: "advancePayment",
       overHidden: true,
-      index: 6
+      hide: true,
+      showColumn: false,
     },
     {
       label: "未收款",
       prop: "balanceAmount",
       overHidden: true,
-      index: 7
+      hide: true,
+      showColumn: false,
     },
     {
       label: "已收款",
       prop: "settlmentAmount",
       overHidden: true,
-      index: 8
+      hide: true,
+      showColumn: false,
     },
     {
       label: "状态",
@@ -82,16 +121,13 @@ export const option = {
       search: true,
       showColumn: false,
       overHidden: true,
-      index: 9
     },
     {
       label: "日期",
       prop: "date",
       hide: true,
-      search: true,
       showColumn: false,
       overHidden: true,
-      index: 11
     }
   ]
 }

+ 2 - 1
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -316,7 +316,8 @@ export default {
         ...params,
         current: page.currentPage,
         size: page.pageSize,
-        ...Object.assign(params, this.search)
+        ...Object.assign(params, this.search),
+        billType:0
       }
       this.loading = true
       getList(params).then(res => {

+ 105 - 63
src/views/tirePartsMall/basicData/supplier/detailsPage.vue

@@ -3,106 +3,108 @@
     <div class="customer-head">
       <div class="customer-back">
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
-                   @click="backToList(0)">返回列表
+          @click="backToList(0)">返回列表
         </el-button>
       </div>
       <div class="add-customer-btn">
         <!--        <el-button class="el-button&#45;&#45;small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"-->
         <!--                   @click="confirmEditing">编辑-->
         <!--        </el-button>-->
-        <el-button
-            class="el-button--small-yh"
-            type="primary"
-            size="small"
-            @click="editCustomer">保存数据
+        <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据
         </el-button>
-        <el-button
-            class="el-button--small-yh"
-            type="primary"
-            size="small"
-            v-if="form.id">启用
+        <el-button class="el-button--small-yh" type="primary" size="small" v-if="form.id">启用
         </el-button>
       </div>
     </div>
     <div style="margin-top: 50px">
       <trade-card title="基础信息">
-        <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
+        <avue-form :option="optionForm" v-model="form" ref="form">
+          <template slot="corpsTypeId">
+            <div style="display:flex;">
+              <avue-input-tree v-model="form.corpsTypeId" placeholder="请选择供货商分类" :dic="corpTypeList" :props="props">
+              </avue-input-tree>
+              <i class="el-icon-setting" style="font-size:18px;line-height: 32px;margin-left:4px"
+                @click="corpTypeVisible = true"></i>
+            </div>
+          </template>
+        </avue-form>
       </trade-card>
       <trade-card title="联系人信息">
         <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.corpsAttnList"
-                   @row-save="rowSave"
-                   @row-update="rowUpdate"
-                   @resetColumn="resetColumnTwo('formContacts','optionContacts','optionContactsBack',262.1)"
-                   @saveColumn="saveColumnTwo('formContacts','optionContacts','optionContactsBack',262.1)">
+          @row-save="rowSave" @row-update="rowUpdate"
+          @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 262.1)"
+          @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 262.1)">
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-            <el-button
-                :size="size" :disabled="disabled" :type="type"
-                :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
-                @click="$refs.formContacts.rowCell(row,index)"
-            >{{ row.$cellEdit ? '确认' : '修改' }}
+            <el-button :size="size" :disabled="disabled" :type="type" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
+              @click="$refs.formContacts.rowCell(row, index)">{{ row.$cellEdit ? '确认' : '修改' }}
             </el-button>
             <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
-                       @click="rowDelBox(row,index)">删除
+              @click="rowDelBox(row, index)">删除
             </el-button>
           </template>
         </avue-crud>
       </trade-card>
       <trade-card title="地址信息">
         <avue-crud :option="optionAddress" v-model="formAddress" ref="formAddress" :data="form.corpsAddrList"
-                   @row-save="rowSave"
-                   @row-update="rowUpdate"
-                   @resetColumn="resetColumnTwo('formContacts','optionAddress','optionAddressBack',262.2)"
-                   @saveColumn="saveColumnTwo('formContacts','optionAddress','optionAddressBack',262.2)">>
+          @row-save="rowSave" @row-update="rowUpdate"
+          @resetColumn="resetColumnTwo('formContacts', 'optionAddress', 'optionAddressBack', 262.2)"
+          @saveColumn="saveColumnTwo('formContacts', 'optionAddress', 'optionAddressBack', 262.2)">>
           <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-            <el-button
-                :size="size" :disabled="disabled" :type="type"
-                :icon="row.$cellEdit?'el-icon-plus':'el-icon-edit'"
-                @click="$refs.formAddress.rowCell(row,index)"
-            >{{ row.$cellEdit ? '确认' : '修改' }}
+            <el-button :size="size" :disabled="disabled" :type="type" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
+              @click="$refs.formAddress.rowCell(row, index)">{{ row.$cellEdit ? '确认' : '修改' }}
             </el-button>
             <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
-                       @click="rowDelBox(row,index)">删除
+              @click="rowDelBox(row, index)">删除
             </el-button>
           </template>
           <template slot="defaultAddres" slot-scope="{row,index,disabled}">
-            <el-switch
-                active-value="1"
-                inactive-value="0"
-                :disabled="disabled"
-                v-model="row.defaultAddres"
-                @change="addressUnique(row,index)">
+            <el-switch active-value="1" inactive-value="0" :disabled="disabled" v-model="row.defaultAddres"
+              @change="addressUnique(row, index)">
             </el-switch>
           </template>
         </avue-crud>
       </trade-card>
       <trade-card title="附件信息">
-        <c-upload
-            basic
-            :data="form.corpsFilesList"
-            :disabled="disabled"
-            deleteUrl="/api/blade-box-tube/shippingfile/remove"
-            :enumerationValue="262.3"
-            display
-        />
+        <c-upload basic :data="form.corpsFilesList" :disabled="disabled"
+          deleteUrl="/api/blade-box-tube/shippingfile/remove" :enumerationValue="262.3" display />
       </trade-card>
     </div>
+    <el-dialog title="设置供应商分类" v-dialogDrag :visible.sync="corpTypeVisible" class="avue-dialog" width="80%" append-to-body
+      @closed="corpTypeClosed">
+      <span>
+        <corp-type corpType="GYS"></corp-type>
+        <!-- <avue-form :key="reload" ref="corpType" v-model="form4" :option="option4" style="margin-top:20px">
+        </avue-form> -->
+      </span>
+      <div class="avue-dialog__footer">
+        <el-button @click="corpTypeVisible = false" size="mini">取 消</el-button>
+        <el-button @click="addCorpType" type="primary" size="mini">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 
 // import {detail, submit} from "@/api/basicData/shipManagement";
-import {getDetails, submit} from "@/api/tirePartsMall/basicData/customerInformation";
-
+import { getDetails, submit } from "@/api/tirePartsMall/basicData/customerInformation";
+import {getCorpType} from "@/api/tirePartsMall/basicData/customerInformation"
+import corpType from '@/components/corpType/index'
 export default {
   name: "detailsPage",
   data() {
     return {
+      props: {
+        label: 'title',
+        value: 'value'
+      },
+      corpTypeList: [], //供货商列表
+      corpTypeVisible: false, //设置供应商分类
       disabled: false,
       form: {
-        corpsAddrList:[],
-        corpsAttnList:[],
-        corpsFilesList:[]
+        corpsAddrList: [],
+        corpsAttnList: [],
+        corpsFilesList: []
       },
       optionForm: {
         menuBtn: false,
@@ -110,6 +112,16 @@ export default {
         column: [{
           label: '全称',
           prop: "cname",
+          span: 12,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '供货商分类',
+          prop: "corpsTypeId",
+          span: 12,
           rules: [{
             required: true,
             message: " ",
@@ -117,11 +129,13 @@ export default {
           }]
         }, {
           label: '电话',
-          prop: "let"
+          prop: "let",
+          span: 12,
         }, {
           label: "业务员",
           prop: "salesmanId",
           type: "select",
+          span: 12,
           props: {
             label: "name",
             value: "id"
@@ -217,6 +231,9 @@ export default {
       }
     }
   },
+  components: {
+    corpType
+  },
   props: {
     onLoad: Object,
     detailData: Object
@@ -230,6 +247,7 @@ export default {
       this.refresh(this.onLoad.id, true)
     }
     this.findObject(this.optionAddress.column, "belongtoarea").dicData = JSON.parse(localStorage.getItem('areaTypeTree'))
+    this.getCorpType()
   },
   methods: {
     refresh(id, type) {
@@ -239,13 +257,37 @@ export default {
         spinner: 'el-icon-loading',
         background: 'rgba(255,255,255,0.7)'
       })
-      getDetails({id: id}).then(res => {
+      getDetails({ id: id }).then(res => {
         this.form = res.data.data
         loading.close();
       }).catch(() => {
         loading.close();
       })
     },
+    getCorpType() {
+      getCorpType({corpType: 'GYS'}).then(res => {
+        this.corpTypeList = res.data.data
+      })
+    }
+    ,
+    addCorpType() {
+      // this.$refs["corpType"].validate((valid, done) => {
+      //   done();
+      //   if (valid) {
+      //     addCorpType({ ...this.form4, corpType: 'KH', status: 0 })
+      //       .then(res => {
+      //         this.$message.success("保存成功");
+      //         this.getCorpType()
+      //         this.corpTypeVisible = false
+      //       })
+      //   } else {
+      //     return false;
+      //   }
+      // });
+      this.getCorpType()
+      this.corpTypeVisible = false
+    }
+    ,
     editCustomer() {
       this.$refs["form"].validate((valid, done) => {
         done()
@@ -288,18 +330,18 @@ export default {
         cancelButtonText: "取消",
         type: "warning"
       }).then(() => {
-          if (row.id) {
-            // tradingBox(row.id).then(res => {
-            //   this.form.contactsList.splice(index, 1);
-            //   this.$message.success("操作成功!");
-            // });
-          } else {
-            this.form.contactsList.splice(index, 1);
-            this.$message.success("操作成功!");
-          }
+        if (row.id) {
+          // tradingBox(row.id).then(res => {
+          //   this.form.contactsList.splice(index, 1);
+          //   this.$message.success("操作成功!");
+          // });
+        } else {
+          this.form.contactsList.splice(index, 1);
+          this.$message.success("操作成功!");
         }
+      }
       )
-      ;
+        ;
     },
     rowSave(form, done, loading) {
       done(form)

+ 7 - 1
src/views/tirePartsMall/basicData/supplier/index.vue

@@ -92,6 +92,7 @@ import detailsPage from "./detailsPage"
 import {getToken} from "@/util/auth";
 import {getCorpType,getList,remove} from "@/api/tirePartsMall/basicData/customerInformation";
 import corpType from "./components/index";
+import { option } from "../commodityInformation/js/optionList";
 
 export default {
   name: "index",
@@ -177,7 +178,12 @@ export default {
           prop: "cname",
           search: true,
           overHidden: true,
-        }, {
+        },{
+          label: '供应商分类',
+          prop: "corpsTypeName",
+          search: true,
+          overHidden: true,
+        },  {
           label: '电话',
           prop: "let",
           search: true,