Ver Fonte

配件商城和车型

caojunjie há 2 anos atrás
pai
commit
8aa85ef024

+ 20 - 0
src/api/vehicleBrandAndModel.js

@@ -0,0 +1,20 @@
+//查询列表
+import request from "@/router/axios";
+
+export const getList = (params) => {
+    return request({
+        url: '/api/blade-client/vehicleBrand/list',
+        method: 'get',
+        params: params
+    })
+}
+//删除
+export const remove = (ids) => {
+    return request({
+        url: '/api/blade-box-tube/annual/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}

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

@@ -1096,6 +1096,9 @@ const columnName = [{
 }, {
   code: 260,
   name: '参数配置'
+}, {
+  code: 261,
+  name: '车辆品牌车系车型-列表'
 }]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 9 - 4
src/views/boxManagement/stockpilingManage/index.vue

@@ -90,13 +90,13 @@ export default {
         column: [{
           label: '系统号',
           prop: 'sysNo',
-          width: 220,
+          width: 120,
           search: true,
           searchOrder:2
         },{
           label: '箱号',
           prop: 'code',
-          width: 100,
+          width: 120,
           searchOrder:1,
           overHidden: true,
           filterable: true,
@@ -113,19 +113,24 @@ export default {
         }, {
           label: '合同号',
           prop: 'contractNo',
-          width: 170,
+          width: 120,
           search: true,
           searchOrder:1,
         }, {
           label: '箱数',
           prop: 'boxNumber',
-          width: 170
+          width: 100
         }, {
           label: '箱型箱量',
           prop: 'boxTypeNumber',
           overHidden: true,
           width: 170
         }, {
+          label: '起始日期',
+          prop: 'rentStartDate',
+          overHidden: true,
+          width: 120
+        }, {
           label: '付费对象',
           prop: 'purchaseCompanyId',
           width: 200,

+ 3 - 0
src/views/product/index.vue

@@ -287,6 +287,9 @@ export default {
         .then(res => {
           this.dataList = res.data.data.records ? res.data.data.records : [];
           this.page.total = res.data.data.total;
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+          });
         })
         .finally(() => {
           this.loading = false;

+ 8 - 8
src/views/product/js/optionList.js

@@ -19,14 +19,14 @@ export const option = {
     {
       label: "商品名称",
       prop: "cname",
-      type: "select",
-      dicUrl:"/api/blade-client/goodsdesc/descListByCname?cname={{key}}",
-      filterable:true,
-      remote:true,
-      props: {
-        label: "cname",
-        value: "cname"
-      },
+      // type: "select",
+      // dicUrl:"/api/blade-client/goodsdesc/descListByCname?cname={{key}}",
+      // filterable:true,
+      // remote:true,
+      // props: {
+      //   label: "cname",
+      //   value: "cname"
+      // },
       search: true,
       overHidden: true,
       index: 1

+ 12 - 0
src/views/productLaunch/index.vue

@@ -201,6 +201,9 @@ export default {
       }
     }
   },
+  activated() {
+    this.onLoad(this.page, this.search)
+  },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(249), this.optionList);
     this.key++
@@ -327,6 +330,9 @@ export default {
       getList(params).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
         this.loading = false
       }).finally(() => {
         this.loading = false
@@ -343,6 +349,9 @@ export default {
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
         this.$refs[ref].$refs.dialogColumn.columnBox = false;
       }
     },
@@ -353,6 +362,9 @@ export default {
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
       }
     }
   }

+ 19 - 15
src/views/salesOrder/detailsPage.vue

@@ -203,13 +203,12 @@ export default {
             prop: "srcOrderNo",
             disabled: true,
             span: 8,
-          },
-          {
+          }, {
             label: "订单来源",
             prop: "orderSource",
             disabled: true,
             type: 'select',
-            dataType:'number',
+            dataType: 'number',
             dicData: [
               {
                 label: "APP/PC",
@@ -224,8 +223,17 @@ export default {
               value: 'value'
             },
             span: 8,
-          },
-          {
+          }, {
+            label: "联系人",
+            prop: "corpAttn",
+            disabled: true,
+            span: 8,
+          }, {
+            label: "联系电话",
+            prop: "corpTel",
+            disabled: true,
+            span: 8,
+          }, {
             label: "送货地址",
             prop: "arrivalAddress",
             type: 'select',
@@ -237,41 +245,37 @@ export default {
             allowCreate: true,
             filterable: true,
             span: 16,
-          },
-          {
+          }, {
             label: "销售日期",
             prop: "businesDate",
             type: "datetime",
             format: "yyyy-MM-dd hh:mm:ss",
             valueFormat: "yyyy-MM-dd hh:mm:ss",
             span: 8,
-          },
-          {
+          }, {
             label: "计划收款日期",
             prop: "advanceCollectionDate",
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd hh:mm:ss",
             span: 8,
-          },
-          {
+          }, {
             label: "送货日期",
             prop: "requiredDeliveryDate",
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd 00:00:00",
             span: 8,
-          },
-          {
+          }, {
             label: "快递公司",
             prop: "courierCorporation",
-            disabled:true,
+            disabled: true,
             span: 8,
           },
           {
             label: "快递单号",
             prop: "courierNumber",
-            disabled:true,
+            disabled: true,
             span: 8,
           },
           {

+ 26 - 9
src/views/salesOrder/index.vue

@@ -24,6 +24,9 @@
         <template slot-scope="{ row, index }" slot="corpId">
           <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.corpsName }}</span>
         </template>
+        <template slot-scope="{ row, index }" slot="sysNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.sysNo }}</span>
+        </template>
         <template slot="businesDateSearch">
           <el-date-picker v-model="search.businesDate" 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']"
@@ -65,10 +68,21 @@
         append-to-body
         close-on-click-modal
         close-on-press-escape
-        width="60%">
-      <div>
+        width="40%">
+      <div class="elForm">
         <el-form :model="form" label-position="right">
-          <el-col :span="12">
+          <el-col :span="24">
+            <el-form-item label="收货人姓名:" label-width="100px">
+              <span>{{form.corpAttn}}</span>
+            </el-form-item>
+            <el-form-item label="收货人电话:" label-width="100px">
+              <span>{{form.corpTel}}</span>
+            </el-form-item>
+            <el-form-item label="收货人地址:" label-width="100px">
+              <span>{{form.arrivalAddress}}</span>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
             <el-form-item label="快递公司:" label-width="100px">
 <!--              <el-input v-model="form.courierCorporation" placeholder="请输入快递公司" size="small" style="width: 100%;"></el-input>-->
               <el-select v-model="form.courierCorporation" placeholder="请选择快递公司" clearable filterable size="small" style="width: 100%;">
@@ -81,7 +95,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item label="快递单号:" label-width="100px">
               <el-input v-model="form.courierNumber" placeholder="请输入快递单号" size="small" style="width: 100%;"></el-input>
             </el-form-item>
@@ -413,11 +427,6 @@ export default {
       }
     },
     searchCriteriaSwitch(type) {
-      if (type) {
-        this.option.height = this.option.height - 138;
-      } else {
-        this.option.height = this.option.height + 138;
-      }
       this.$refs.crud.getTableHeight();
     },
     cellStyle() {
@@ -603,6 +612,14 @@ export default {
 ::v-deep .avue-crud__right{
   padding-top: 5px;
 }
+::v-deep .elForm{
+  .el-form-item{
+    margin-bottom: 0;
+  }
+}
+::v-deep .el-dialog__body{
+  padding: 0;
+}
 ::v-deep .el-form-item__label {
   //text-align: right;
   //vertical-align: middle;

+ 294 - 0
src/views/vehicleBrandAndModel/index.vue

@@ -0,0 +1,294 @@
+<template>
+  <div>
+    <basic-container v-show="!detailsOpen">
+      <avue-crud
+          :option="option"
+          :search.sync="search"
+          v-model="form"
+          :table-loading="loading"
+          :data="dataList"
+          ref="crud"
+          :key="key"
+          @on-load="onLoad"
+          @search-change="searchChange"
+          @row-del="rowDel"
+          @search-criteria-switch="searchCriteriaSwitch"
+          @refresh-change="refreshChange"
+          @resetColumn="resetColumnTwo('crud','option','optionList',261)"
+          @saveColumn="saveColumnTwo('crud','option','optionList',261)"
+          :page.sync="page">
+        <template slot-scope="{type,size,row,$index}" slot="menu">
+          <el-button icon="el-icon-view" :size="size" :type="type" @click="check(row)">查看</el-button>
+          <el-button icon="el-icon-delete" :size="size" v-if="row.status == 0" :type="type" @click="$refs.crud.rowDel(row,$index)">删除
+          </el-button>
+        </template>
+        <template slot="corpIdsSearch" slot-scope="scope">
+          <crop-select v-model="search.corpIds" corpType="KH"></crop-select>
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+          <div style="display:flex;">
+<!--            <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">创建单据</el-button>-->
+            <el-upload
+                class="upload-demo"
+                action="/api/blade-client/vehicleBrand/importBrand"
+                :headers="headers"
+                :on-error="onError"
+                :show-file-list="false"
+                multiple>
+              <el-button size="small" type="primary">导入品牌</el-button>
+            </el-upload>
+            <el-upload
+                class="upload-demo"
+                action="/api/blade-client/vehicleSeries/importSeries"
+                :headers="headers"
+                :on-error="onError"
+                :show-file-list="false"
+                multiple>
+              <el-button size="small" type="primary">导入车系</el-button>
+            </el-upload>
+            <el-upload
+                class="upload-demo"
+                action="/api/blade-client/vehicleModel/importModel"
+                :headers="headers"
+                :on-error="onError"
+                :show-file-list="false"
+                multiple>
+              <el-button size="small" type="primary">导入车型</el-button>
+            </el-upload>
+          </div>
+        </template>
+      </avue-crud>
+    </basic-container>
+<!--    <detailsPage v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>-->
+  </div>
+</template>
+
+<script>
+import {getList, remove} from "@/api/vehicleBrandAndModel.js";
+import {getToken} from "@/util/auth";
+// import detailsPage from "./detailsPage"
+
+export default {
+  name: "index",
+  components: {
+    // detailsPage
+  },
+  data() {
+    return {
+      headers: { "Blade-Auth": "Bearer " + getToken() },
+      detailsOpen: false,
+      loading: false,
+      search: {},
+      form: {},
+      dataList: [],
+      detailData: {},
+      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,
+        height:"auto",
+        searchMenuPosition: "right",
+        align: "center",
+        menu:false,
+        menuWidth:140,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        dialogWidth: "70%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'boxNumber',
+          type: 'sum',
+          decimals:0
+        },{
+          name: 'totalAmount',
+          type: 'sum',
+          decimals:2
+        }],
+        column: [{
+          label: '品牌',
+          prop: 'brand',
+          width: 220,
+          search: true
+        },{
+          label: "制单人",
+          prop: "createUserName",
+          searchProp:"createUser",
+          overHidden: true,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp:"createTimeList",
+          type: "date",
+          overHidden: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp:"updateUser",
+          overHidden: true,
+          search: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp:"updateTimeList",
+          type: "date",
+          overHidden: true,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }]
+      }
+    }
+  },
+  activated() {
+    if (this.$route.query.check) {
+      this.detailsOpen = false
+      this.detailData = {
+        id: this.$route.query.check.billId,
+        check: this.$route.query.check,
+      };
+      this.form = {
+        id:this.$route.query.check.billId
+      }
+      this.detailsOpen = true
+      this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(261), this.optionList);
+    this.key++
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+    onError(err, file, fileList){
+      this.$message.error(JSON.parse(err.message).msg)
+    },
+    check(row){
+      this.form = row
+      this.detailsOpen = true
+    },
+    backToList(type) {
+      this.form = {}
+      this.detailsOpen = false
+      if (type === 0){
+        this.detailData = {}
+      }
+      this.onLoad(this.page,this.search)
+    },
+    searchCriteriaSwitch(type) {
+      this.$refs.crud.getTableHeight();
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    rowDel(form, index) {
+      this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        remove(form.id).then(res => {
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+        })
+      }).catch(() => {
+      });
+    },
+    searchChange(params, done) {
+      done();
+      this.onLoad(this.page, params)
+    },
+    onLoad(page, params = {}) {
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        ...Object.assign(params, this.search)
+      }
+      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.$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>

+ 2 - 2
vue.config.js

@@ -32,9 +32,9 @@ module.exports = {
       '/api': {
         //本地服务接口地址
         // target: 'http://192.168.3.64:1080',
-        target: 'http://192.168.0.103:1080',
+        // target: 'http://192.168.0.103:1080',
         // 打包地址
-        // target: 'http://121.37.83.47:10004',//服务器ip
+        target: 'http://121.37.83.47:10004',//服务器ip
         // target: 'http://trade.tubaosoft.com:10004',//服务器域名
         ws: true,
         pathRewrite: {