Browse Source

轮胎 品牌添加 审核状态 通过驳回

caojunjie 1 year ago
parent
commit
65c3dbc2b1

+ 12 - 0
src/api/tirePartsMall/basicData/customerInformation/index.js

@@ -1,4 +1,5 @@
 import request from '@/router/axios';
+import data from "@/views/util/data.vue";
 
 export const getList = (params) => {
   return request({
@@ -95,3 +96,14 @@ export function getUserByRole(data) {
     params: data
   })
 }
+
+
+// 查询品牌
+export function getBrandDesc(data){
+  return request({
+    url:'api/blade-sales-part/brandDesc/listAllV1?type=PP',
+    method:'get',
+    params:data
+  })
+}
+

+ 45 - 4
src/views/tirePartsMall/basicData/customerInformation/detailsPage.vue

@@ -26,6 +26,12 @@
                 @click="corpTypeVisible = true"></i>
             </div>
           </template>
+            <!--<template slot="brandDesc">-->
+            <!--    <div>-->
+            <!--        <avue-input-tree v-model="brandlist" :disabled="false" :dic="brandDescData"  :props="propsBrand" multiple placeholder="请选品牌">-->
+            <!--        </avue-input-tree>-->
+            <!--    </div>-->
+            <!--</template>-->
           <template slot="deliveryWarehouseId">
             <div style="display:flex;">
               <avue-input-tree v-model="form.deliveryWarehouseId" :disabled="option.disabled" placeholder="请选择发货仓库" :dic="corpTypeListCk"
@@ -148,7 +154,7 @@ import {
     customerList,
     itemDel,
     corpsattn,
-    editenable, getUserByRole
+    editenable, getUserByRole,getBrandDesc
 } from "@/api/tirePartsMall/basicData/customerInformation"
 import corpType from './components/index'
 import { creatingUsersTwo } from "@/api/basicData/customerInformation";
@@ -475,7 +481,10 @@ export default {
           {
             label: "商城价格",
             prop: "priceSystem",
-            span: 8, filterable: true, type: "select", dicUrl: "/api/blade-system/dict-biz/dictionary?code=mall_price",
+            span: 8,
+              filterable: true,
+              type: "select",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=mall_price",
             props: {
               label: "dictValue",
               value: "dictKey"
@@ -507,6 +516,27 @@ export default {
             controls: false,
             precision: 2,
           },
+
+            {
+                label:"品牌",
+                prop:"brandId",
+                props:{
+                  label:'cname',
+                  value:'id'
+                },
+                span:24,
+                search:true,
+                dicDate:[],
+                multiple:true,
+                dicUrl: '/api/blade-sales-part/brandDesc/listAllV1?type=PP',
+                type:"tree",
+                rules: [{
+                    message: "请选择品牌",
+                    trigger: "click"
+                }]
+            }
+
+            ,
           // {
           //   label: "使用信用额度",
           //   prop: "useCreditLimit",
@@ -638,8 +668,10 @@ export default {
     this.getCorpType()
     this.getAllWorkDicts()
     this.getCorpTypeCk()
+
   },
   activated() {
+
     setTimeout(() => {
       this.$nextTick(() => {
         this.$refs.crud.doLayout()
@@ -714,6 +746,11 @@ export default {
       }
     },
     initData(tenantId) {
+        getBrandDesc().then(res =>{
+            const column = this.findObject(this.option.column,'brandId')
+            column.dicData = res.data.data
+            this.form.brandId = '';
+        })
       getRoleTree(tenantId).then(res => {
         const column = this.findObject(this.optionData.column, "roleId");
         column.dicData = res.data.data;
@@ -807,6 +844,9 @@ export default {
             }else {
                 this.$set(this.option,'disabled',false)
             }
+            if (this.form.brandId == null || this.form.brandId === "") {
+                this.form.brandId = "";
+            }
           this.data = res.data.data.corpsAddrList
           this.corpsFiles = res.data.data.corpsFilesList
           this.contactsData = res.data.data.corpsAttnList
@@ -940,11 +980,12 @@ export default {
     editCustomer() {
       this.$refs["form"].validate((valid, done) => {
         done();
-
         if (valid) {
           this.loadingBtn = true;
           if(!this.form.id) {
               this.form.checkStatus = '通过'
+
+              typeof(this.form.brandId) == 'Array' ? this.form.prandId.join(',') : this.form.brandId = ''
           }
           submit({
             ...this.form,
@@ -953,7 +994,7 @@ export default {
             corpsAddrList: this.data,
             corpsFilesList: this.corpsFiles,
             corpsAttnList: this.contactsData,
-            billType: 1
+            billType: 1,
           }).then(res => {
             this.$message.success("保存成功");
             this.form = res.data.data;

+ 4 - 2
src/views/tirePartsMall/basicData/customerInformation/index.vue

@@ -25,6 +25,7 @@
               </el-button>
               <el-button type="primary" size="mini" icon="el-icon-top" @click="outExport">导出
               </el-button>
+
             </template>
             <template slot="enableOrNot" slot-scope="{row,index,disabled}">
               <div v-if="row.enableOrNot === 1">启用</div>
@@ -44,8 +45,8 @@
             </template>
             <template slot-scope="{type,size, row, index }" slot="menu">
               <!-- <el-button :size="size" :type="type" :disabled="!row.enableOrNot" @click="editOpen(row, 2)">编辑</el-button> -->
-                <el-button v-if="row.checkStatus == '提交'" :size="size" :type="type"  @click.stop="passThrough(row,'通过')">通过</el-button>
-                <el-button v-if="row.checkStatus == '提交'" :size="size" :type="type"  @click.stop="passThrough(row,'驳回')">驳回</el-button>
+                <el-button v-if="row.checkStatus == '提交' || row.checkStatus == '驳回'" :size="size" :type="type"  @click.stop="passThrough(row,'通过')">通过</el-button>
+                <el-button v-if="row.checkStatus == '提交' || row.checkStatus == '通过'" :size="size" :type="type"  @click.stop="passThrough(row,'驳回')">驳回</el-button>
                 <el-button :size="size" :type="type" :disabled="row.enableOrNot" @click.stop="rowDel(row)">删除</el-button>
             </template>
             <!-- <template slot="deliveryWarehouseName">
@@ -94,6 +95,7 @@
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
 import {customerListAll} from '@/api/tirePartsMall/basicData/warehouse'
+import {getBrandDesc} from "@/api/tirePartsMall/basicData/customerInformation"
 import {
   getList,
   getCorpType,

+ 10 - 2
src/views/tirePartsMall/basicData/customerInformation/js/optionList.js

@@ -81,6 +81,7 @@ export const option = {
     //   prop: "useCreditLimit",
     //   overHidden: true,
     // },
+
     {
       label: "是否启用",
       prop: "enableOrNot",
@@ -100,9 +101,9 @@ export const option = {
       label: "审核状态",
       prop: "checkStatus",
       overHidden: true,
-      hide: true,
+      // hide: true,
       search:true,
-      showColumn: false,
+      // showColumn: false,
       type: 'select',
       dicData: [{
         label: '提交',
@@ -116,6 +117,13 @@ export const option = {
       }]
     },
     {
+      label: "品牌",
+      prop: "brandName",
+      overHidden: true,
+      // hide: true,
+      search:true,
+    },
+    {
       label: "合同金额",
       prop: "debitAmount",
       overHidden: true,