Browse Source

轮胎 2024-3-19

caojunjie 1 year ago
parent
commit
eacb0d1932

+ 59 - 0
src/api/tirePartsMall/activity/index.js

@@ -0,0 +1,59 @@
+import request from '@/router/axios';
+
+export const activityList = (current, size, params) => {
+  return request({
+    url: '/api/blade-sales-part/activity/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const activityDetail = (id) => {
+  return request({
+    url: '/api/blade-sales-part/activity/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const activityRemove = (ids) => {
+  return request({
+    url: '/api/blade-sales-part/activity/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const activitySubmit = (row) => {
+  return request({
+    url: '/api/blade-sales-part/activity/submit',
+    method: 'post',
+    data: row
+  })
+}
+// 从表删除
+export const activityitemsRemove = (ids) => {
+  return request({
+    url: '/api/blade-sales-part/activityitems/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+// 发布
+export const activityUpdate = (row) => {
+  return request({
+    url: '/api/blade-sales-part/activity/update',
+    method: 'post',
+    data: row
+  })
+}

+ 8 - 1
src/api/tirePartsMall/basicData/listingManagement/index.js

@@ -40,7 +40,14 @@ export const listAll = (params) => {
     method: 'get'
   })
 }
-
+// 根据品牌查询花纹
+export const brandfigureListAll = (params) => {
+  return request({
+    url: '/api/blade-sales-part/brandfigure/listAll',
+    method: 'get',
+    params: params
+  })
+}
 export const listAllP = (params) => {
   return request({
     url: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1',

+ 52 - 2
src/components/upload/index.vue

@@ -490,6 +490,47 @@ export default {
           }
         ]
       },
+        originalOptionsThree_HW: {
+            dialogDrag: true,
+            index: true,
+            refreshBtn: false,
+            cellBtn: false,
+            cancelBtn: false,
+            delBtn: false,
+            editBtn: false,
+            addBtn: false,
+            align: "center",
+            column: [
+                {
+                    label: "花纹名称",
+                    prop: "figure",
+                    index: 1,
+                    cell: true,
+                    overHidden: true
+                },
+                {
+                    label: "文件名称",
+                    prop: "fileName",
+                    index: 1,
+                    width: 140,
+                    cell: true,
+                    overHidden: true
+                },
+                {
+                    label: "文件地址",
+                    prop: "url",
+                    index: 2,
+                    overHidden: true
+                },
+                {
+                    label: "备注",
+                    prop: "remarks",
+                    index: 4,
+                    cell: true,
+                    overHidden: true
+                }
+            ]
+        },
       uploadCount: 0
     };
   },
@@ -504,12 +545,14 @@ export default {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo);
     } else if (this.enumerationValue === 107.1) {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo);
-    } else if (this.enumerationValue > 230) {
+    } else if (this.enumerationValue > 230 && this.enumerationValue != 338) {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo);
     } else if (this.enumerationValue === 35.1) {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree);
     }else if (this.enumerationValue === 160.1) {
         this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo_LT);
+    }else if (this.enumerationValue === 338) {
+        this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree_HW);
     } else {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptions);
       this.getWorkDicts("picture_type").then(res => {
@@ -551,7 +594,7 @@ export default {
           this.$message.success("重置成功");
           this.$refs.crud.$refs.dialogColumn.columnBox = false;
         }
-      } else if (this.enumerationValue > 230) {
+      } else if (this.enumerationValue > 230 && this.enumerationValue != 338) {
         this.option = this.originalOptionsTwo;
         const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo);
         if (inSave) {
@@ -572,6 +615,13 @@ export default {
               this.$message.success("重置成功");
               this.$refs.crud.$refs.dialogColumn.columnBox = false;
           }
+      }else if (this.enumerationValue === 338) {
+          this.option = this.originalOptionsThree_HW;
+          const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree_HW);
+          if (inSave) {
+              this.$message.success("重置成功");
+              this.$refs.crud.$refs.dialogColumn.columnBox = false;
+          }
       } else {
         this.option = this.originalOptions;
         const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptions);

+ 12 - 0
src/enums/column-name.js

@@ -1579,6 +1579,18 @@ const columnName = [{
     code: 337,
     name: '轮胎商城-财务管理-统计销售'
   },
+  {
+    code: 338,
+    name: '轮胎商城-品牌-花纹附件'
+  },
+  {
+    code: 339,
+    name: '轮胎商城-基础资料-活动'
+  },
+  {
+    code: 339.1,
+    name: '轮胎商城-基础资料-活动详情'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 14 - 0
src/router/views/index.js

@@ -2752,6 +2752,20 @@ export default [{
   }]
 },
   {
+    path: '/tirePartsMall/activity/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/tirePartsMall/activity/index',
+      name: '活动(L)',
+      meta: {
+        i18n: '/tirePartsMall/activity/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/activity/index')
+    }]
+  },
+  {
     path: '/iosBasicData/SeafreightExportF/bills/index',
     component: Layout,
     hidden: true,

+ 2 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -212,7 +212,7 @@
                 </template>
                 <template slot="quantity" slot-scope="{ row }">
                     <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1"
-                              :controls="false" :precision="0"
+                              :controls="false" :precision="2"
                               placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{row.quantity}}</span>
                 </template>
@@ -394,7 +394,7 @@
                 </template>
                 <template slot="quantity" slot-scope="{ row }">
                     <el-input-number v-if="row.edit" v-model="row.quantity" size="small" :min="1"
-                              :controls="false" :precision="0"
+                              :controls="false" :precision="2"
                               placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{row.quantity}}</span>
                 </template>

+ 1 - 1
src/views/iosBasicData/aiamends/amendsDetails.vue

@@ -397,7 +397,7 @@ import {reportsGetReportData} from "@/api/iosBasicData/reports";
 import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
 import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
 import {aeabillsGetDetail} from "@/api/iosBasicData/aeabills";
-
+import {getList as getreportsList} from "@/api/iosBasicData/reports";
 export default {
     components: {reportformsList, reportContainer, TreeSelect, reports, SearchQuery, amendsCostdetails, billgenerated},
     data() {

+ 28 - 2
src/views/iosBasicData/paymentSummary/index.vue

@@ -9,6 +9,7 @@
                    ref="crud"
                    id="out-table"
                    :header-cell-class-name="headerClassName"
+                   @selection-change="selectionChange"
                    @search-change="searchChange"
                    @search-reset="searchReset"
                    @current-change="currentChange"
@@ -20,7 +21,7 @@
             <template slot="menuLeft">
                 <el-button type="success" size="small" plain @click="exportfun" >导出</el-button>
                 <el-button type="primary" size="small" plain >打印报表</el-button>
-                <el-button type="info" size="small" plain >设计报表</el-button>
+                <el-button type="info" size="small" plain @click="designReportStart" >设计报表</el-button>
             </template>
             <template slot-scope="{disabled,size}" slot="dcSearch">
                 <el-radio v-model="query.dc" label="D" @input="dcInput" >应收</el-radio>
@@ -100,6 +101,13 @@
             </template>
 
         </avue-crud>
+
+        <!--设计报表弹窗-->
+        <el-dialog append-to-body title="设计报表" class="el-dialogDeep" :visible.sync="DesignreportDialog" width="70%"
+                   :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+            <reports :id="form.id" :assemblyForm="form" businessValue="JCFX" classifyCode="SFHZ" ></reports>
+        </el-dialog>
+
     </basic-container>
 </template>
 
@@ -112,11 +120,14 @@
     import {getDeptLazyTree} from "@/api/system/dept";
     import {getList as userGetList} from '@/api/system/user'
     import {getToken} from "@/util/auth";
+    import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
 
     export default {
-        components: {SearchQuery},
+        components: {reports, SearchQuery},
         data(){
             return {
+                DesignreportDialog:false, // 设计报表弹窗
+                printingDialog:false, // 打印弹窗
                 form: {},
                 loading: true,
                 page: {
@@ -307,6 +318,7 @@
                 srcTypeData:[], // 业务来源
                 srcIdData:[], // 业务员
                 srcforParameter:{key:'id', label:'cnName', value:'cnName'},
+                selectionList:[], // 多选数据
 
             }
         },
@@ -314,6 +326,16 @@
             this.option = await this.getColumnData(this.getColumnName(332), this.optionBack);
         },
         methods:{
+            // 设计报表
+            designReportStart(){
+                this.DesignreportDialog = true
+                // this.selectionList
+                if (this.selectionList.length == 0) {
+                    return this.$message.warning('请选择一条数据')
+                }else {
+
+                }
+            },
             // 导出
             exportfun(){
                 const routeData = this.$router.resolve({
@@ -504,6 +526,10 @@
             refreshChange() {
                 this.onLoad(this.page, this.query);
             },
+            // 多选弹窗
+            selectionChange(list){
+                this.selectionList = list;
+            },
             onLoad(page, params = {}) {
                 this.loading = true;
                 financeStatisticsFeeSummary(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {

+ 10 - 1
src/views/system/user.vue

@@ -871,7 +871,16 @@
       initData(tenantId) {
         getRoleTree(tenantId).then(res => {
           const column = this.findObject(this.option.group, "roleId");
-          column.dicData = res.data.data;
+            column.dicData = []
+            if (localStorage.getItem('roleName').indexOf('admin') != -1) {
+                column.dicData = res.data.data
+            }else {
+                for (let item of res.data.data) {
+                    if (item.title != '管理员') {
+                        column.dicData.push(item)
+                    }
+                }
+            }
         });
         getDeptTree(tenantId).then(res => {
           const column = this.findObject(this.option.group, "deptId");

+ 342 - 0
src/views/tirePartsMall/activity/assembly/assemblyDetails.vue

@@ -0,0 +1,342 @@
+<template>
+    <basic-container>
+        <el-row>
+            <el-col :span="4">
+                <avue-tree ref="treeRef" :option="treeOption" :data="treeData" @node-click="nodeClick" style="height:73vh;"
+                           @save="corpTypeVisible = true">
+                </avue-tree>
+            </el-col>
+            <el-col :span="20">
+                <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+                           ref="crud" :key="key" :page.sync="page" @selection-change="selectionChange"
+                           @search-change="searchChange" @search-reset="resetChange" @refresh-change="refreshChange"
+                           @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 273)"
+                           @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 273)">
+                </avue-crud>
+            </el-col>
+        </el-row>
+    </basic-container>
+</template>
+
+<script>
+import {getList, listAllP} from "@/api/tirePartsMall/basicData/listingManagement";
+
+export default {
+        data(){
+            return{
+                // 左侧数据
+                treeOption: {
+                    addBtn: false,
+                    menu: false,
+                    size: "small",
+                    props: {
+                        labelText: "标题",
+                        label: "cname",
+                        value: "id",
+                    }
+                },
+                treeData: [],
+                corpTypeVisible: false,
+                // 右侧数据
+                loading: false,
+                search: {},
+                form: {},
+                dataList: [],
+                selectionList: [],
+                page: {
+                    pageSize: 20,
+                    currentPage: 1,
+                    total: 0,
+                    pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+                },
+                key:0,
+                option: {},
+                optionList: {
+                    viewBtn: false,
+                    editBtn: false,
+                    delBtn: false,
+                    addBtn: false,
+                    index: true,
+                    span: 8,
+                    border: true,
+                    selection: true,
+                    height: "auto",
+                    updateBtnText:'保存',
+                    searchMenuPosition: "right",
+                    align: "center",
+                    menuWidth: 220,
+                    searchSpan: 8,
+                    searchIcon: true,
+                    searchIndex: 2,
+                    highlightCurrentRow: true,
+                    dialogWidth: "90%",
+                    menu:true,
+                    column: [{
+                        label: '商品名称',
+                        prop: 'cname',
+                        search: true,
+                        disabled: true,
+                        overHidden: true,
+                    }, {
+                        label: '规格型号',
+                        prop: 'specificationAndModel',
+                        disabled: true,
+                        search: true,
+                        overHidden: true,
+                    },{
+                        label: '花纹',
+                        prop: 'brandItem',
+                        disabled: true,
+                        search: true,  // 是否搜索
+                        // type: 'select',
+                        // remote:true, // 是否为远程搜索
+                        // dicUrl:'/api/blade-sales-part/productLaunch/list?brandItem={{key}}',   //key为当前输入值
+                        overHidden: true,
+                    }, {
+                        label: '公司',
+                        prop: 'salesCompanyName',
+                        disabled: true,
+                        overHidden: true,
+                        type: 'select',
+                        props: {
+                            label: 'fullName',
+                            value: 'id'
+                        },
+                        dicUrl: '/api/blade-system/dept/top-list'
+                    }, {
+                        label: '库存',
+                        prop: 'inventory',
+                        disabled: true,
+                        overHidden: true,
+                    }, {
+                        label: '产品状态',
+                        prop: 'upAndDownShelves',
+                        filterable: true,
+                        display: false,
+                        search: true,
+                        hide: true,
+                        disabled: true,
+                        showColumn: false,
+                        type: 'select',
+                        dicData: [{
+                            label: "上架",
+                            value: 1
+                        }, {
+                            label: "下架",
+                            value: 0
+                        }]
+                    }, {
+                        label: "品牌",
+                        prop: "brandId",
+                        search: true,
+                        type: 'select',
+                        props: {
+                            label: 'cname',
+                            value: 'id'
+                        },
+                        dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1',
+                        hide: true,
+                        disabled: true,
+                        overHidden: false,
+                    }, {
+                        label: "品牌",
+                        prop: "brandName",
+                        disabled: true,
+                        overHidden: false,
+                    },
+                        {
+                            label: "售价1",
+                            prop: "priceOne",
+                            hide: false,
+                            overHidden: true,
+                        }, {
+                            label: "售价2",
+                            prop: "priceTwo",
+                            hide: false,
+                            overHidden: true,
+                        }, {
+                            label: "售价3",
+                            prop: "priceThree",
+                            hide: false,
+                            overHidden: true,
+                        }, {
+                            label: "售价4",
+                            prop: "priceFour",
+                            hide: false,
+                            overHidden: true,
+                        },
+                        {
+                            label: "共享公司",
+                            prop: "sharedCompany",
+                            // searchProp: "sharedCompanyList",
+                            search: true,
+                            overHidden: true,
+                            // tags: true,
+                            multiple: true,   //将可选变为多选
+                            searchMultiple:false,
+                            type: 'select',
+                            props: {
+                                label: 'fullName',
+                                value: 'id'
+                            },
+                            dicUrl: '/api/blade-system/dept/deptList'
+                        },
+                        {
+                            label: "商品图片",
+                            prop: "filesList",
+                            hide: true,
+                            showColumn: false,
+                            overHidden: true,
+                            span: 24,
+                        },{
+                            label: "防爆",
+                            prop: "explosionProof",
+                            display:false,
+                            search: true,
+                            span: 8,
+                            type: 'select',
+                            dicData: [{
+                                label: '否',
+                                value: 0
+                            }, {
+                                label: '是',
+                                value: 1
+                            }],
+                        }, {
+                            label: "静音棉",
+                            prop: "originalFactory",
+                            display:false,
+                            search: true,
+                            span: 8,
+                            type: 'select',
+                            dicData: [{
+                                label: '否',
+                                value: "0"
+                            }, {
+                                label: '是',
+                                value: "1"
+                            }],
+                        },
+                        {
+                            label: "自修补",
+                            prop: "selfRecovery",
+                            display:false,
+                            search: true,
+                            span: 8,
+                            type: 'select',
+                            dicData: [{
+                                label: '否',
+                                value: "0"
+                            }, {
+                                label: '是',
+                                value: "1"
+                            }],
+                        }, {
+                            label: "商品详情",
+                            prop: "detailsText",
+                            hide: true,
+                            span: 24,
+                            showColumn: false,
+                            overHidden: true,
+                        }]
+                }
+            }
+        },
+        async created() {
+            this.option = await this.getColumnData(this.getColumnName(273), this.optionList);
+            this.findObject(this.option.column, "upAndDownShelves").search = false
+            this.option.menu = false
+        },
+        methods:{
+            // 获取左侧数据
+            listAllPfun(){
+                listAllP().then(res=>{
+                    this.treeData = res.data.data
+                })
+            },
+            // 左侧点击搜索
+            nodeClick(data) {
+                this.search.brandId = data.id
+                this.page.currentPage = 1;
+                this.onLoad(this.page, this.search);
+            },
+            // 多选框
+            selectionChange(list) {
+                this.selectionList = list
+                this.$emit('selectionDetails',list)
+            },
+            // 搜索
+            searchChange(params, done) {
+                this.page.currentPage = 1;
+                this.onLoad(this.page, params)
+                done();
+            },
+            // 清空搜索
+            resetChange(){
+                this.search = {}
+                this.page.currentPage = 1;
+                this.onLoad(this.page, this.search)
+            },
+            //刷新
+            refreshChange() {
+                this.onLoad(this.page, this.search)
+            },
+            // 获取数据
+            onLoad(page, params = {}) {
+                // 深拷贝一份防止弹出框的搜索参数和外面表格的搜索参数一样
+                let search = JSON.parse(JSON.stringify(this.search))
+                search.cname = params.cname
+                params = {
+                    ...params,
+                    current: page.currentPage,
+                    size: page.pageSize,
+                    ...Object.assign(params, search),
+                    billType: 0,
+                    upAndDownShelves:1
+                }
+                this.loading = true
+                getList(params).then(res => {
+                    this.dataList = res.data.data.records
+                    this.page.total = res.data.data.total
+                    this.loading = false
+                }).finally(() => {
+                    this.loading = false
+                })
+            },
+            //自定义列保存
+            async saveColumnTwo(ref, option, optionBack, code) {
+                /**
+                 * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+                 * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+                 * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+                 */
+                const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+                if (inSave) {
+                    this.$message.success("保存成功");
+                    //关闭窗口
+                    this.$nextTick(() => {
+                        this.$refs.crud.doLayout();
+                    });
+                    this.$refs[ref].$refs.dialogColumn.columnBox = false;
+                }
+            },
+            //自定义列重置
+            async resetColumnTwo(ref, option, optionBack, code) {
+                this[option] = this[optionBack];
+                const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+                if (inSave) {
+                    this.$message.success("重置成功");
+                    this.$refs[ref].$refs.dialogColumn.columnBox = false;
+                    this.$nextTick(() => {
+                        this.$refs.crud.doLayout();
+                    });
+                }
+            }
+
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 579 - 0
src/views/tirePartsMall/activity/detailsPage.vue

@@ -0,0 +1,579 @@
+<template>
+    <div>
+        <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">返回列表
+                </el-button>
+            </div>
+            <div class="add-customer-btn">
+                <el-button v-if="form.status == 0 || form.status == 2"
+                           type="success" size="small" :disabled="!form.id"
+                           @click="releasefun" >发 布</el-button>
+                <el-button v-if="form.status == 1" type="warning" size="small" :disabled="!form.id"
+                           @click="releasefun" >撤销发布</el-button>
+                <el-button class="el-button--small-yh" type="primary" size="small" @click="editCustomer">保存数据</el-button>
+            </div>
+        </div>
+        <div style="margin-top: 50px">
+            <trade-card title="基础信息">
+                <avue-form class="trading-form" :option="optionForm" v-model="form" ref="form">
+                    <template slot="activePictures">
+                        <div style="display: flex;align-items: center;justify-content: center;">
+                            <el-input v-model="form.activePictures" :disabled="true" placeholder="请输入内容"></el-input>
+                            <el-button type="primary" size="small" icon="el-icon-edit" @click="addPicture" >上传</el-button>
+                        </div>
+                    </template>
+                </avue-form>
+            </trade-card>
+        </div>
+        <div style="margin-top: 10px">
+            <trade-card title="详情">
+                <avue-crud :option="optionDetails" ref="optionDetailsRef" :data="form.activityItemsList"
+                           @selection-change="detailsMultiplechoice"
+                           @resetColumn="resetColumnTwo('optionDetailsRef', 'optionDetails', 'optionDetailsBack', 339.1)"
+                           @saveColumn="saveColumnTwo('optionDetailsRef', 'optionDetails', 'optionDetailsBack', 339.1)" >
+                    <template slot="menuLeft">
+                        <el-button icon="el-icon-plus" type="primary" size="small" @click="detailsAddButton" >添加数据</el-button>
+                        <el-button type="danger"
+                                   size="small"
+                                   icon="el-icon-delete"
+                                   plain
+                                   @click="multipleActivityitemsRemovefun">删 除
+                        </el-button>
+                    </template>
+                    <template slot-scope="{row,index}" slot="menu">
+                        <el-button
+                            type="text"
+                            size="small"
+                            @click="detailsRowCell(row,index)"
+                        >{{row.$cellEdit?'确认':'修改'}}</el-button>
+                        <el-button type="text" size="small" @click="activityitemsRemovefun(row,index)" >删除</el-button>
+                        <el-button type="text" size="small" @click="changingtheImage(row,index)" >换图</el-button>
+                    </template>
+                </avue-crud>
+            </trade-card>
+        </div>
+
+        <el-dialog title="商城数据" append-to-body v-dialog-drag :visible.sync="detailsVisible" width="80%" >
+            <assembly-details ref="assemblyDetails" @selectionDetails="selectionDetails" ></assembly-details>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="detailsVisible = false">取 消</el-button>
+                <el-button type="primary" @click="popupConfirmation">确 定</el-button>
+            </span>
+        </el-dialog>
+
+        <el-dialog
+            title="上传附件"
+            append-to-body
+            :visible.sync="excelBox"
+            width="555px"
+            :close-on-click-modal="false"
+            v-dialog-drag >
+            <el-upload
+                class="upload-demo" drag
+                style="text-align: center"
+                ref="upload"
+                :action="action"
+                :headers="headers"
+                :on-success="onSuccess"
+                multiple >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+                <div class="el-upload__tip" slot="tip">
+                    如上传文件过大,请耐心等待上传成功
+                </div>
+            </el-upload>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import assemblyDetails from "./assembly/assemblyDetails.vue";
+import {getToken} from "@/util/auth";
+import {activityDetail, activityitemsRemove, activitySubmit, activityUpdate} from "@/api/tirePartsMall/activity";
+    export default {
+        data(){
+            return {
+                optionForm:{
+                    menuBtn: false,
+                    span: 6,
+                    column: [{
+                        label: '活动名称',
+                        prop: "activityName",
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },{
+                        label: '开始日期',
+                        prop: "startDate",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },{
+                        label: '结束日期',
+                        prop: "endDate",
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },{
+                        label: '最小购买',
+                        prop: "minQuantity",
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },{
+                        label: '最大购买',
+                        prop: "maxQuantity",
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },{
+                        label: '图片名称',
+                        prop: "activePictures",
+                        formslot:true,
+                        disabled:true,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },{
+                        label: '图片地址',
+                        prop: "url",
+                        disabled:true,
+                        span:12,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    },{
+                        label: '活动说明',
+                        prop: "activityDescription",
+                        span:24,
+                        type:'textarea',
+                        minRows: 2,
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }]
+                    }]
+                },
+                form:{
+                    minQuantity:1, // 最小购买
+                    activityItemsList:[]
+                },
+                // 详情配置
+                optionDetails:{},
+                optionDetailsBack:{
+                    height:'auto',
+                    calcHeight: 30,
+                    tip: false,
+                    searchShow: true,
+                    searchMenuSpan: 6,
+                    border: true,
+                    index: true,
+                    selection: true,
+                    dialogClickModal: false,
+                    addBtn:false,
+                    viewBtn:false,
+                    editBtn:false,
+                    delBtn:false,
+                    cancelBtn:false,
+                    menuWidth:120,
+                    cellBtn:false,
+                    addRowBtn:false,
+                    rowKey:'$index',
+                    column: [
+                        {
+                            label: "名称",
+                            prop: "cname",
+                            overHidden:true,
+                        },
+                        {
+                            label: "规格型号",
+                            prop: "specificationAndModel",
+                            overHidden:true,
+                        },
+                        {
+                            label: "花纹",
+                            prop: "brandItem",
+                            overHidden:true,
+                        },
+                        {
+                            label: "库存",
+                            prop: "inventory",
+                            overHidden:true,
+                        },
+                        {
+                            label: "最小购买数量",
+                            prop: "minQuantity",
+                            overHidden:true,
+                            type:'number',
+                            controls:false,
+                            cell: true,
+                            width:'100px',
+                        },
+                        {
+                            label: "最大购买数量",
+                            prop: "maxQuantity",
+                            overHidden:true,
+                            type:'number',
+                            controls:false,
+                            cell: true,
+                            width:'100px',
+                        },
+                        {
+                            label: "原售价1",
+                            prop: "priceOnePrimary",
+                            overHidden:true,
+                        },
+                        {
+                            label: "原售价2",
+                            prop: "priceTwoPrimary",
+                            overHidden:true,
+                        },
+                        {
+                            label: "原售价3",
+                            prop: "priceThreePrimary",
+                            overHidden:true,
+                        },
+                        {
+                            label: "原售价4",
+                            prop: "priceFourPrimary",
+                            overHidden:true,
+                        },
+                        {
+                            label: "促销价1",
+                            prop: "priceOne",
+                            overHidden:true,
+                            cell: true
+                        },
+                        {
+                            label: "促销价2",
+                            prop: "priceTwo",
+                            overHidden:true,
+                            cell: true
+                        },
+                        {
+                            label: "促销价3",
+                            prop: "priceThree",
+                            overHidden:true,
+                            cell: true
+                        },
+                        {
+                            label: "促销价4",
+                            prop: "priceFour",
+                            overHidden:true,
+                            cell: true
+                        },
+                        {
+                            label: "品牌名称",
+                            prop: "brandName",
+                            overHidden:true,
+                        },
+
+                        {
+                            label: "产地",
+                            prop: "placeProduction",
+                            overHidden:true,
+                            cell: true
+                        },
+                        {
+                            label: "防爆",
+                            prop: "explosionProof",
+                            type: 'select',
+                            dicData: [{
+                                label: '否',
+                                value: 0
+                            }, {
+                                label: '是',
+                                value: 1
+                            }],
+                            overHidden:true,
+                        },
+                        {
+                            label: "原厂",
+                            prop: "originalFactory",
+                            overHidden:true,
+                        },
+                        {
+                            label: "自修补",
+                            prop: "selfRecovery",
+                            overHidden:true,
+                        },
+                        // {
+                        //     label: "原价",
+                        //     prop: "originalPrice",
+                        //     overHidden:true,
+                        //     cell: true
+                        // },
+                        {
+                            label: "商品图片名称",
+                            prop: "goodsPictures",
+                            overHidden:true,
+                            width:'140px',
+                        },
+                        {
+                            label: "商品图片地址",
+                            prop: "url",
+                            overHidden:true,
+                            width:'140px',
+                        },
+                        {
+                            label: "备注",
+                            prop: "remarks",
+                            overHidden:true,
+                            cell: true
+                        },
+                    ]
+                },
+                detailsMultipleData:[], // 详情多选数据
+                detailsVisible:false, // 商城弹窗显示隐藏
+                selectionDetailsData:[], // 弹窗多选数据
+                excelBox:false, // 上传图片的弹窗
+                action: "/api/blade-resource/oss/endpoint/put-file",
+                headers: { "Blade-Auth": "Bearer " + getToken() },
+                detailsIndex:null, // 详情下标
+            }
+        },
+        components:{
+            assemblyDetails
+        },
+        async created() {
+            this.optionDetails = await this.getColumnData(this.getColumnName(339.1), this.optionDetailsBack);
+        },
+        methods:{
+            // 从表单个删除
+            activityitemsRemovefun(row,index){
+                if (row.id) {
+                    activityitemsRemove(row.id).then(res=>{
+                        this.$message.success('操作成功!')
+                    })
+                }
+                this.form.activityItemsList.splice(index,1)
+            },
+            // 从表多个删除
+            multipleActivityitemsRemovefun(){
+                if (this.detailsMultipleData.length === 0) {
+                    this.$message.warning("请选择至少一条数据");
+                    return;
+                }
+                this.$confirm("确定将选择数据删除?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(()=>{
+                        let multiList = this.detailsMultipleData
+                        let arr = this.form.activityItemsList
+                        // 获取有id 的数据
+                        const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
+                        let arrIds = itemsWithId.map(item=>item.id) // 获取id 数据
+                        // 把选中的删除掉
+                        multiList.forEach((item)=>{
+                            for (let index in arr) {
+                                if (JSON.stringify(item) == JSON.stringify(arr[index])) {
+                                    arr.splice(Number(index),1)
+                                }
+                            }
+                        })
+                        // 有id 的处理
+                        if(itemsWithId.length != 0) {
+                            activityitemsRemove(arrIds.join(',')).then(res=>{
+                                this.$message.success('操作成功!')
+                            })
+                        }
+                })
+            },
+            // 详情多选
+            detailsMultiplechoice(list){
+                this.detailsMultipleData = list
+            },
+            // 发布
+            releasefun(){
+                if (this.form.status == 0 || this.form.status == 2) {
+                    this.form.status = 1
+                }else if (this.form.status == 1) {
+                    this.form.status = 2
+                }
+                activityUpdate(this.form).then(res=>{
+                    this.$message.success('操作成功')
+                    this.activityDetailfun(this.form.id)
+                })
+            },
+            // 大保存
+            editCustomer(){
+                this.$refs["form"].validate((valid, done) => {
+                    if (valid) {
+                        let sumText = '请输入'
+                        let maxnum = 0
+                        for (let item of this.form.activityItemsList) {
+                            if (!Number(item.priceOne)) {
+                                sumText += ` 序号${item.$index + 1}促销价1`
+                            }
+                            if (!Number(item.priceTwo)) {
+                                sumText += ` 序号${item.$index + 1}促销价2`
+                            }
+                            if (!Number(item.priceThree)) {
+                                sumText += ` 序号${item.$index + 1}促销价3`
+                            }
+                            if (!Number(item.priceFour)) {
+                                sumText += ` 序号${item.$index + 1}促销价4`
+                            }
+                            maxnum += Number(item.maxQuantity)
+                        }
+                        if(sumText != '请输入') {
+                            this.$confirm(sumText, {
+                                confirmButtonText: "确定",
+                                cancelButtonText: "取消",
+                                type: "warning"
+                            })
+                            return;
+                        }
+                        if (this.form.maxQuantity < maxnum) {
+                            return this.$message.warning('最大购买数量过大请重新修改')
+                        }
+                        activitySubmit(this.form).then(res=>{
+                            this.$message.success('操作成功')
+                            this.activityDetailfun(res.data.data.id)
+                        })
+                        done()
+                    }
+                })
+            },
+            // 详情获取数据
+            activityDetailfun(id){
+                activityDetail(id).then(res=>{
+                    this.form = res.data.data
+                })
+            },
+            // 详情确认按钮
+            detailsRowCell(row,index){
+                if (row.$cellEdit) {
+                    this.$refs.optionDetailsRef.rowCancel(row,index)
+                }else {
+                    this.$refs.optionDetailsRef.rowCell(row, index)
+                }
+            },
+            // 图片上传
+            addPicture(){
+                this.excelBox = true
+            },
+            // 替换图片
+            changingtheImage(row,index){
+                this.detailsIndex = index
+                this.excelBox = true
+            },
+            //新增上传成功
+            onSuccess(response, file, fileList) {
+                if (this.detailsIndex) {
+                    this.$set(this.form.activityItemsList[this.detailsIndex],'goodsPictures',response.data.originalName)
+                    this.$set(this.form.activityItemsList[this.detailsIndex],'url',response.data.link)
+                }else {
+                    this.form.activePictures = response.data.originalName
+                    this.form.url = response.data.link
+                }
+                this.detailsIndex = null
+                this.excelBox = false;
+            },
+            // 弹窗多选回调
+            selectionDetails(list){
+                this.selectionDetailsData = list
+            },
+            // 弹窗确认
+            popupConfirmation(){
+                for (let item of this.selectionDetailsData) {
+                    this.form.activityItemsList.push({
+                        pid:this.form.id?this.form.id:null,
+                        cname:item.cname,
+                        specificationAndModel:item.specificationAndModel,
+                        inventory:item.inventory,
+                        goodsId:item.goodsId,
+                        priceOnePrimary:item.priceOne,
+                        priceTwoPrimary:item.priceTwo,
+                        priceThreePrimary:item.priceThree,
+                        priceFourPrimary:item.priceFour,
+                        brandId:item.brandId,
+                        brandName:item.brandName,
+                        brandItem:item.brandItem,
+                        placeProduction:null, // 产地
+                        explosionProof:item.explosionProof,
+                        originalFactory:item.originalFactory,
+                        selfRecovery:item.selfRecovery,
+                        minQuantity:1, // 最小购买数量
+                        maxQuantity:1, // 最大购买数量
+                        originalPrice:null, // 原价
+                        priceOne:null, // 促销价1
+                        priceTwo:null, // 促销价2
+                        priceThree:null, // 促销价3
+                        priceFour:null, // 促销价4
+                        goodsPictures:item.filesList.length > 0?item.filesList[0].fileName:'', // 商品图片名称
+                        url:item.filesList.length > 0?item.filesList[0].url:'',// 商品图片地址
+                        $cellEdit:true
+                    })
+                }
+                this.detailsVisible = false
+            },
+            // 详情添加商品
+            detailsAddButton(){
+                this.detailsVisible = true
+                let page = {pageSize: 20, currentPage: 1}
+                this.$nextTick(()=>{
+                    this.$refs.assemblyDetails.listAllPfun()
+                    this.$refs.assemblyDetails.onLoad(page)
+                })
+
+
+            },
+            //自定义列保存
+            async saveColumnTwo(ref, option, optionBack, code) {
+                /**
+                 * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+                 * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+                 * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+                 */
+                const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+                if (inSave) {
+                    this.$message.success("保存成功");
+                    //关闭窗口
+                    this.$refs[ref].$refs.dialogColumn.columnBox = false;
+                }
+            },
+            //自定义列重置
+            async resetColumnTwo(ref, option, optionBack, code) {
+                this[option] = this[optionBack];
+                const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+                if (inSave) {
+                    this.$message.success("重置成功");
+                    this.$refs[ref].$refs.dialogColumn.columnBox = false;
+                }
+            },
+            // 返回列表
+            backToList() {
+                this.$emit("backToList");
+            }
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 332 - 0
src/views/tirePartsMall/activity/index.vue

@@ -0,0 +1,332 @@
+<template>
+  <div>
+      <basic-container v-if="!detailsOpen">
+          <avue-crud :option="option"
+                     :table-loading="loading"
+                     :data="data"
+                     :page.sync="page"
+                     :permission="permissionList"
+                     :before-open="beforeOpen"
+                     v-model="form"
+                     ref="crud"
+                     @row-update="rowUpdate"
+                     @row-save="rowSave"
+                     @row-del="rowDel"
+                     @search-change="searchChange"
+                     @search-reset="searchReset"
+                     @selection-change="selectionChange"
+                     @current-change="currentChange"
+                     @size-change="sizeChange"
+                     @refresh-change="refreshChange"
+                     @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 339)"
+                     @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 339)"
+                     @on-load="onLoad">
+              <template slot="menuLeft">
+                  <el-button icon="el-icon-plus" type="primary" size="small" @click="addButton" >新增</el-button>
+                  <el-button type="danger"
+                             size="small"
+                             icon="el-icon-delete"
+                             plain
+                             @click="handleDelete">删 除
+                  </el-button>
+              </template>
+              <template slot-scope="scope" slot="menu">
+                  <el-button type="text" size="small" @click.stop="editOpen(scope.row)">编辑</el-button>
+                  <el-button type="text" size="small" @click.stop="rowDel(scope.row, scope.index)">删除</el-button>
+              </template>
+          </avue-crud>
+      </basic-container>
+      <detailsPage ref="detailsPageRef" v-if="detailsOpen" :onLoad="form" @backToList="backToList"></detailsPage>
+  </div>
+</template>
+
+<script>
+  import {activityList, activityDetail, activitySubmit, activityRemove} from "@/api/tirePartsMall/activity/index";
+  import {mapGetters} from "vuex";
+  import detailsPage from "./detailsPage"
+  import {getWorkDicts} from "@/api/system/dictbiz";
+
+  export default {
+    components: {
+        detailsPage
+    },
+    data() {
+      return {
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option:{},
+        optionList: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          menuWidth:100,
+          column: [
+            {
+              label: "活动状态",
+              prop: "status",
+              overHidden:true,
+              search: true,
+              type:"select",
+              // dicUrl: "/api/blade-system/dict-biz/dictionary?code=active_state_lt",
+              dicData:[],
+              props: {
+                  label: "dictValue",
+                  value: "dictKey"
+              },
+            },
+            {
+              label: "活动名称",
+              prop: "activityName",
+              overHidden:true,
+            },
+            {
+              label: "发布日期",
+              prop: "releaseDate",
+              overHidden:true,
+            },
+            {
+              label: "活动开始日期",
+              prop: "startDate",
+              overHidden:true,
+            },
+            {
+              label: "活动结束日期",
+              prop: "endDate",
+              overHidden:true,
+            },
+            {
+              label: "最小购买数量",
+              prop: "minQuantity",
+              overHidden:true,
+            },
+            {
+              label: "最大购买数量",
+              prop: "maxQuantity",
+              overHidden:true,
+            },
+            {
+              label: "活动图片名称",
+              prop: "activePictures",
+              overHidden:true,
+            },
+            {
+              label: "活动图片地址",
+              prop: "url",
+              overHidden:true,
+            },
+            {
+              label: "活动说明",
+              prop: "activityDescription",
+              overHidden:true,
+            },
+            {
+                label: "备注",
+                prop: "remarks",
+                overHidden:true,
+            },
+          ]
+        },
+        data: [],
+        detailsOpen:false, // 列表详情切换
+      };
+    },
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.activity_add, false),
+          viewBtn: this.vaildData(this.permission.activity_view, false),
+          delBtn: this.vaildData(this.permission.activity_delete, false),
+          editBtn: this.vaildData(this.permission.activity_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(339), this.optionList);
+        this.getWorkDictsfun()
+    },
+    methods: {
+        // 获取字典数据
+        getWorkDictsfun(){
+            // 活动状态
+            getWorkDicts('active_state_lt').then(res=>{
+                this.findObject(this.option.column, "status").dicData = res.data.data
+            })
+        },
+      // 编辑按钮
+      editOpen(row){
+          this.detailsOpen = true
+          this.$nextTick(()=>{
+              this.$refs.detailsPageRef.activityDetailfun(row.id)
+          })
+      },
+      // 新增按钮
+      addButton(){
+          this.detailsOpen = true
+      },
+      // 返回列表
+      backToList() {
+          this.form = {}
+          this.detailsOpen = false
+          this.onLoad(this.page, this.search)
+      },
+      rowSave(row, done, loading) {
+        activitySubmit(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        activitySubmit(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return activityRemove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return activityRemove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          activityDetail(this.form.id).then(res => {
+            this.form = res.data.data;
+          });
+        }
+        done();
+      },
+      searchReset() {
+        this.query = {};
+        this.onLoad(this.page);
+      },
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      selectionChange(list) {
+        this.selectionList = list;
+      },
+      selectionClear() {
+        this.selectionList = [];
+        this.$refs.crud.toggleSelection();
+      },
+      currentChange(currentPage){
+        this.page.currentPage = currentPage;
+      },
+      sizeChange(pageSize){
+        this.page.pageSize = pageSize;
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.query);
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        activityList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+          const data = res.data.data;
+          this.page.total = data.total;
+          this.data = data.records;
+          this.loading = false;
+          this.selectionClear();
+        });
+      },
+        //自定义列保存
+        async saveColumnTwo(ref, option, optionBack, code) {
+            /**
+             * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+             * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+             * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+             */
+            const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+            if (inSave) {
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            }
+        },
+        //自定义列重置
+        async resetColumnTwo(ref, option, optionBack, code) {
+            this[option] = this[optionBack];
+            const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+            if (inSave) {
+                this.$message.success("重置成功");
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            }
+        }
+    }
+  };
+</script>
+
+<style scoped>
+
+</style>

+ 27 - 4
src/views/tirePartsMall/basicData/brandPage/detailsPage.vue

@@ -30,6 +30,18 @@
       <trade-card title="基础信息">
         <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
       </trade-card>
+        <trade-card title="花纹附件信息  (图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)">
+            <c-upload
+                basic
+                :data="form.brandFigureList"
+                :disabled="disabled"
+                deleteUrl="/api/blade-sales-part/brandfigure/remove"
+                :enumerationValue="338"
+                display
+            />
+            <!-- <span style="font-size: 12px;">(图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)</span> -->
+        </trade-card>
+
       <trade-card title="附件信息  (图片文件像素推荐700X750,有且只允许有一张主图,其余均为副图)">
         <c-upload
         basic
@@ -55,7 +67,8 @@ export default {
     return {
       disabled: false,
       form: {
-        brandFilesList: []
+        brandFilesList: [],
+          brandFigureList:[]
       },
       optionForm: {
         menuBtn: false,
@@ -148,9 +161,15 @@ export default {
             this.$message.warning('暂无权限')
             return
         }
-      if (this.form.brandFilesList.length === 0){
-        return this.$message.error("请上传主图")
-      }
+        if (this.form.brandFigureList.length === 0 && this.form.brandFilesList.length === 0) {
+            return this.$message.error('请上传图片')
+        }
+        if (this.form.brandFilesList.length != 0) {
+            this.form.brandFilesList[0].version = '0'
+        }
+      // if (this.form.brandFilesList.length === 0){
+      //   return this.$message.error("请上传主图")
+      // }
       let num = 0
       for (let item of this.form.brandFilesList){
         if (item.version == 0){
@@ -165,6 +184,10 @@ export default {
         if (valid) {
           this.loadingBtn = true;
           this.form.type = 'PP'
+            // 把花纹数组里的全部默认0
+            for (let item of this.form.brandFigureList) {
+                item.version = '0'
+            }
           submit({
             ...this.form
           }).then(res => {

+ 16 - 0
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -116,6 +116,7 @@ import {
 import { optionList } from "./js/optionList";
 import goodsType from '@/components/goodsType/index'
 import corpType from './components/index'
+import {brandfigureListAll} from "@/api/tirePartsMall/basicData/listingManagement";
 
 export default {
     name: "index",
@@ -189,6 +190,12 @@ export default {
                             disabled: 'disabled'
                         },
                         dicUrl: '/api/blade-sales-part/brandDesc/listAllV1?type=PP&enableOrNot=1',
+                        change:(value)=>{
+                            if (!value.value) return
+                            brandfigureListAll({pid:value.value}).then(res=>{
+                                this.findObject(this.option.column, "brandItem").dicData = res.data.data
+                            })
+                        },
                         rules: [{
                             required: true,
                             message: " ",
@@ -219,6 +226,15 @@ export default {
                         label: "花纹",
                         prop: "brandItem",
                         span: 8,
+                        type: 'select',
+                        filterable:true,
+                        allowCreate:true,
+                        dicData:[],
+                        props: {
+                            label: 'figure',
+                            value: 'figure',
+                            disabled: 'disabled'
+                        },
                         rules: [{
                             required: true,
                             message: " ",

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

@@ -2,7 +2,7 @@ import {number} from "echarts"
 
 export const option = {
   searchShow: true,
-  searchMenuSpan: 16,
+  searchMenuSpan: 24,
   align: "center",
   height: "auto",
   searchSpan: 8,
@@ -30,7 +30,7 @@ export const option = {
       label: "电话",
       prop: "tel",
       overHidden: true,
-      search: false,
+      search: true,
     },
     {
       label: "发货仓库",