Browse Source

配件商城,达沃特

caojunjie 2 years ago
parent
commit
eb1e4534d6

+ 8 - 1
src/api/basicData/Inventory.js

@@ -23,4 +23,11 @@ export function submit(data) {
         method: 'POST',
         data: data
     })
-}
+}
+export function stockPartsTotal(params) {
+    return request({
+        url: '/api/blade-stock/stockgoods/stockPartsTotal',
+        method: 'get',
+        params: params
+    })
+}

+ 50 - 11
src/views/Inventory/index.vue

@@ -5,12 +5,21 @@
         @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"
-        @row-update="handleRowUpdate">
+        @row-update="handleRowUpdate" :summary-method="summaryMethod">
+        <template slot="storageSearch">
+          <el-select v-model="search.storageId" placeholder="请选择 仓库" size="small" :clearable="true">
+            <el-option
+                v-for="item in storageList"
+                :key="item.id"
+                :label="item.cname"
+                :value="item.id">
+            </el-option>
+          </el-select>
+        </template>
         <template slot="menuLeft">
           <!-- <el-button type="primary" size="mini" @click.stop="newAdd()">新建产品
           </el-button> -->
-          <el-button type="info" size="small" @click="outExport">导出
-          </el-button>
+          <el-button type="info" size="small" @click="outExport">导出</el-button>
         </template>
         <!-- <template slot-scope="{ row, index }" slot="id">
           <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.cname }}
@@ -51,9 +60,10 @@
 <script>
 import detailsPage from "./detailsPage";
 import { option } from "./js/optionList";
-import { getList, getAllgoods, submit } from "@/api/basicData/Inventory";
+import { getList, getAllgoods, submit ,stockPartsTotal} from "@/api/basicData/Inventory";
 import { multiply, sum, subtract, divide } from "@/util/calculate";
 import {getToken} from "@/util/auth";
+import {getStoragelist} from "@/api/basicData/product";
 export default {
   name: "index",
   data() {
@@ -65,12 +75,14 @@ export default {
       detailData: {},
       dataList: [],
       selectionList: [],
+      stockParts:{},
       page: {
         pageSize: 20,
         currentPage: 1,
         total: 0,
         pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
       },
+      storageList:[],
       option: {},
     };
   },
@@ -79,7 +91,7 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(219), option);
-    this.option.height = window.innerHeight - 210;
+    // this.option.height = window.innerHeight - 210;
     this.getAllWorkDicts()
   },
   methods: {
@@ -93,17 +105,21 @@ export default {
         this.getWorkDicts("goods_status").then(res => {
             this.findObject(this.option.column, "status").dicData = res.data.data;
         });
+        getStoragelist().then(res => {
+          this.storageList = res.data;
+        });
         // getAllgoods().then(res => {
         //   this.findObject(this.option.column, "goods").dicData = res.data.data
         // });
-        this.$refs.crud.init();
+        // this.$refs.crud.init();
     },
     searchCriteriaSwitch(type) {
-      if (type) {
-        this.option.height = this.option.height - 42;
-      } else {
-        this.option.height = this.option.height + 42;
-      }
+      // if (type) {
+      //   this.option.height = this.option.height - 42;
+      // } else {
+      //   this.option.height = this.option.height + 42;
+      // }
+      this.$refs.crud.doLayout();
       this.$refs.crud.getTableHeight();
     },
     cellStyle() {
@@ -162,6 +178,29 @@ export default {
         }).finally(() => {
             this.loading = false;
         });
+        stockPartsTotal().then(res=>{
+          this.stockParts = res.data.data
+        })
+    },
+    summaryMethod({ columns, data }){
+      const sums = [];
+      if (columns.length > 0) {
+        columns.forEach((column, index) => {
+          if (index === 0) {
+            sums[index] = '合计';
+            return;
+          }
+          let prop=column.property
+          if (['balance','balanceAmount'].includes(prop) ) {
+            if (prop === 'balance'){
+              sums[index] = this.stockParts.balanceTotal
+            }else if (prop === 'balanceAmount'){
+              sums[index] = this.stockParts.balanceAmountTotal
+            }
+          }
+        });
+      }
+      return sums;
     },
     currentChange(val) {
       this.page.currentPage = val;

+ 42 - 5
src/views/Inventory/js/optionList.js

@@ -3,6 +3,7 @@ import { number } from "echarts"
 export const option = {
   searchShow: true,
   searchMenuSpan: 8,
+  height: "auto",
   align: "center",
   searchSpan: 8,
   tip: false,
@@ -13,6 +14,7 @@ export const option = {
   editBtn: false,
   delBtn: false,
   menuWidth: 50,
+  showSummary: true,
   searchIcon: true,
   searchIndex: 2,
   dialogWidth:400,
@@ -29,6 +31,7 @@ export const option = {
       label: "产品分类",
       prop: "goodsType",
       overHidden: true,
+      search: true,
       display:false,
       index: 2
     },
@@ -37,6 +40,7 @@ export const option = {
       prop: "storage",
       overHidden: true,
       display:false,
+      search: true,
       index:3
     },
     {
@@ -81,6 +85,16 @@ export const option = {
       index: 8
     },
     {
+      label: "结余金额",
+      prop: "balanceAmount",
+      type:'number',
+      controls:false,
+      overHidden: true,
+      cell:true,
+      span:24,
+      index:9
+    },
+    {
       label: "单位",
       prop: "unit",
       type: "select",
@@ -95,7 +109,7 @@ export const option = {
       hide: true,
       showColumn: false,
       display:false,
-      index: 9
+      index: 10
     },
     {
       label: "备注",
@@ -103,14 +117,14 @@ export const option = {
       overHidden: true,
       search: true,
       display:false,
-      index: 10
+      index: 11
     },
     {
       label: "更新日期",
       prop: "updateTime",
       overHidden: true,
       display:false,
-      index: 11
+      index: 12
     },
     {
       label: "状态",
@@ -128,7 +142,7 @@ export const option = {
       hide: true,
       showColumn: false,
       display:false,
-      index: 12
+      index: 13
     },
     {
       label: "产品标签",
@@ -146,7 +160,7 @@ export const option = {
       hide: true,
       showColumn: false,
       display:false,
-      index: 13
+      index: 14
     },
     {
       label: "库存数量",
@@ -160,6 +174,29 @@ export const option = {
       span:24,
       index:5
     },
+    {
+      label: "库存",
+      prop: "inventoryConditions",
+      type:'select',
+      overHidden: true,
+      hide: true,
+      search: true,
+      showColumn: false,
+      span:24,
+      dicData:[
+        {
+          label:'大于0',
+          value:1,
+        },{
+          label:'等于0',
+          value:2,
+        },{
+          label:'小于0',
+          value:3,
+        }
+      ],
+      index:15
+    },
   ]
 }
 export const optionList = {

+ 1 - 1
src/views/exportTrade/purchaseInquiry/config/customerContact.json

@@ -29,7 +29,7 @@
       "label": "产品名称",
       "prop": "cname",
       "index": 3,
-      "width": 200,
+      "width": 300,
       "overHidden": true
     },
     {

+ 30 - 23
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -39,12 +39,19 @@
           @resetColumn="resetColumn" :summary-method="summaryMethod" :cell-style="cellStyle">
           <template slot="cname" slot-scope="{ row, index }">
             <span v-if="row.$cellEdit" style="display:flex">
-              <el-select v-model="row.cname" placeholder="请选择" size="small" style="width:60%"
-                @change="cnameChange(row, index)">
-                <el-option v-for="item in goodsoptions" :key="item.id" :label="item.cname" :value="item.cname">
-                </el-option>
-              </el-select>
-              <el-button icon="el-icon-search" size="mini" @click="rePick(row, index)"></el-button>
+              <!--<el-select v-model="row.cname" placeholder="请选择" size="small" style="width:60%"-->
+              <!--  @change="cnameChange(row, index)">-->
+              <!--  <el-option v-for="item in goodsoptions" :key="item.id" :label="item.cname" :value="item.cname">-->
+              <!--  </el-option>-->
+              <!--</el-select>-->
+              <el-button
+                  type="text"
+                  size="small"
+                  @click="rePick(row, index)">
+                选择
+              </el-button>
+              <span style="text-align: center;display: flex;align-items: center;justify-content: center;margin-left: 5px">{{row.cname}}</span>
+              <!--<el-button icon="el-icon-search" size="mini" @click="rePick(row, index)"></el-button>-->
             </span>
             <span v-else> {{ row.cname }}</span>
           </template>
@@ -367,21 +374,21 @@ export default {
     this.getWorkDicts("currency").then(res => {
       this.currencyList = res.data.data;
     });
-    const method = []
-    getGoods(1, 1).then(res => {
-      if (res.data.data.total > 0) {
-        if (Math.ceil(res.data.data.total / 20) > 1) {
-          for (let i = 1; i <= Math.ceil(res.data.data.total / 20); i++) {
-            method.push(getGoods(i, 20))
-          }
-        }
-      }
-      axios.all(method).then(rest=>{
-        for (let item of rest){
-          this.goodsoptions = this.goodsoptions.concat(item.data.data.records);
-        }
-      })
-    })
+    // const method = []
+    // getGoods(1, 1).then(res => {
+    //   if (res.data.data.total > 0) {
+    //     if (Math.ceil(res.data.data.total / 20) > 1) {
+    //       for (let i = 1; i <= Math.ceil(res.data.data.total / 20); i++) {
+    //         method.push(getGoods(i, 20))
+    //       }
+    //     }
+    //   }
+    //   axios.all(method).then(rest=>{
+    //     for (let item of rest){
+    //       this.goodsoptions = this.goodsoptions.concat(item.data.data.records);
+    //     }
+    //   })
+    // })
 
     // selectGoodsAll().then(res => {
     //   this.goodsoptions = res.data.data;
@@ -485,9 +492,9 @@ export default {
         this.data.splice(row.$index, 1);
       }
     },
+    //批量导入修改导入
     importGoods() {
       if (this.reData) {
-        console.log(this.reData);
         if (this.selectionList.length != 1) {
           return this.$message.error("重新选择的时候只能选择一条数据");
         } else {
@@ -551,7 +558,7 @@ export default {
             taxRate: 0,
             unit: e.unit,
             remarks: null,
-            $cellEdit: true
+            $cellEdit: false
           });
         });
       }

+ 1 - 1
src/views/purchaseOrder/detailsPage.vue

@@ -448,7 +448,7 @@ export default {
           if (e.cname == row.cname) {
             row.itemId = e.id
             row.unit = e.unit
-            row.price = e.standardPrice
+            row.price = e.purchasePrice
             row.storageInQuantity = 1
             row.amount = e.standardPrice
             row.purchasePrice = e.purchasePrice

+ 105 - 61
src/views/salesOrder/index.vue

@@ -1,14 +1,38 @@
 <template>
   <div>
     <basic-container v-show="show" class="page-crad">
-      <avue-crud :key="key" 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" @expand-change="expandChange">
+      <avue-crud
+          :key="key"
+          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"
+          @expand-change="expandChange">
         <template slot="menuLeft">
           <div style="display:flex;padding-top: 10px">
-            <el-badge v-for="item of badgeList" :hidden="item.dictionaryStatus == '全部'?true:false" :value="item.count" :max="99" class="item" type="danger">
-              <el-button style="border-radius: 0" :type="search.status == item.status?'success':''" size="mini" @click="query(item.status)">
+            <el-badge
+                v-for="item of badgeList"
+                :hidden="item.dictionaryStatus == '全部'?true:false"
+                :value="item.count"
+                :max="99"
+                class="item"
+                type="danger">
+              <el-button
+                  style="border-radius: 0"
+                  :type="search.status == item.status?'success':''"
+                  size="mini"
+                  @click="query(item.status)">
                 {{ item.dictionaryStatus }}
               </el-button>
             </el-badge>
@@ -16,7 +40,11 @@
           </div>
         </template>
         <template slot="expand" slot-scope="{row}">
-          <avue-crud ref="expandCrud" :option="optionList" :table-loading="row.loading" :data="row.orderItemsList"></avue-crud>
+          <avue-crud
+              ref="expandCrud"
+              :option="optionList"
+              :table-loading="row.loading"
+              :data="row.orderItemsList"></avue-crud>
         </template>
         <template slot="corpIdSearch">
           <crop-select v-model="search.corpId" corpType="KH"></crop-select>
@@ -28,9 +56,15 @@
           <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']"
-            :picker-options="pickerOptions">
+          <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']"
+              :picker-options="pickerOptions">
           </el-date-picker>
         </template>
         <template slot-scope="{ row, index }" slot="menu">
@@ -73,19 +107,20 @@
         <el-form :model="form" label-position="right">
           <el-col :span="24">
             <el-form-item label="收货人姓名:" label-width="100px">
-              <span>{{form.corpAttn}}</span>
+              <span>{{ form.corpAttn }}</span>
             </el-form-item>
             <el-form-item label="收货人电话:" label-width="100px">
-              <span>{{form.corpTel}}</span>
+              <span>{{ form.corpTel }}</span>
             </el-form-item>
             <el-form-item label="收货人地址:" label-width="100px">
-              <span>{{form.arrivalAddress}}</span>
+              <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: 90%;">
+              <!--              <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: 90%;">
                 <el-option
                     v-for="item in courierServices"
                     :key="item.dictKey"
@@ -97,7 +132,11 @@
           </el-col>
           <el-col :span="24">
             <el-form-item label="快递单号:" label-width="100px">
-              <el-input v-model="form.courierNumber" placeholder="请输入快递单号" size="small" style="width: 90%;"></el-input>
+              <el-input
+                  v-model="form.courierNumber"
+                  placeholder="请输入快递单号"
+                  size="small"
+                  style="width: 90%;"></el-input>
             </el-form-item>
           </el-col>
         </el-form>
@@ -131,7 +170,7 @@ export default {
       src: '',
       form: {},
       optionList: {
-        header:false,
+        header: false,
         align: "center",
         addBtn: false,
         refreshBtn: false,
@@ -142,9 +181,9 @@ export default {
         menuWidth: 120,
         stripe: true,
         index: true,
-        menu:false,
-        expandRowKeys:[],
-        rowKey:'id',
+        menu: false,
+        expandRowKeys: [],
+        rowKey: 'id',
         indexSlot: true,
         showSummary: true,
         summaryText: "合计",
@@ -237,7 +276,7 @@ export default {
       show: true,
       loading: false,
       search: {
-        status:''
+        status: ''
       },
       detailData: {},
       dataList: [],
@@ -319,7 +358,7 @@ export default {
             }
           }]
       },
-      courierServices:[]
+      courierServices: []
     };
   },
   components: {
@@ -344,7 +383,7 @@ export default {
     }
     if (this.$route.query.orderId) {
       setTimeout(() => {
-        this.editOpen({ id: this.$route.query.orderId }, 1);
+        this.editOpen({id: this.$route.query.orderId}, 1);
       }, 100);
     }
     if (this.$route.query.check) {
@@ -359,12 +398,12 @@ export default {
     }
   },
   methods: {
-    confirmShipment(){
-      if (!this.form.courierNumber){
+    confirmShipment() {
+      if (!this.form.courierNumber) {
         this.$alert('是否继续发货', '未填写快递单号', {
           confirmButtonText: '确定',
           callback: action => {
-            if (action === "confirm"){
+            if (action === "confirm") {
               const loading = this.$loading({
                 lock: true,
                 text: '加载中',
@@ -372,21 +411,21 @@ export default {
                 background: 'rgba(255,255,255,0.7)'
               });
               delivery({
-                id:this.form.id,
-                courierNumber:this.form.courierNumber,
-                courierCorporation:this.form.courierCorporation
-              }).then(res=>{
+                id: this.form.id,
+                courierNumber: this.form.courierNumber,
+                courierCorporation: this.form.courierCorporation
+              }).then(res => {
                 loading.close();
                 this.$message.success("发货成功")
                 this.dialogVisible = false
                 this.onLoad(this.page)
-              }).catch(()=>{
+              }).catch(() => {
                 loading.close();
               })
             }
           }
         });
-      }else{
+      } else {
         const loading = this.$loading({
           lock: true,
           text: '加载中',
@@ -394,15 +433,15 @@ export default {
           background: 'rgba(255,255,255,0.7)'
         });
         delivery({
-          id:this.form.id,
-          courierNumber:this.form.courierNumber,
-          courierCorporation:this.form.courierCorporation
-        }).then(res=>{
+          id: this.form.id,
+          courierNumber: this.form.courierNumber,
+          courierCorporation: this.form.courierCorporation
+        }).then(res => {
           this.$message.success("发货成功")
           this.dialogVisible = false
           loading.close();
           this.onLoad(this.page)
-        }).catch(()=>{
+        }).catch(() => {
           loading.close();
         })
       }
@@ -429,9 +468,9 @@ export default {
         this.storageoptions = res.data;
         this.findObject(this.optionList.column, "storageId").dicData = res.data;
       })
-      if (row){
+      if (row) {
         row.loading = true
-        getDetails({ id: row.id }).then(res=>{
+        getDetails({id: row.id}).then(res => {
           row.orderItemsList = res.data.data.orderItemsList
           row.loading = false
         })
@@ -457,19 +496,19 @@ export default {
       this.$store.commit("IN_PJXS_STATUS");
     },
     onLoad(page, params = {}) {
-      if (this.$refs.expandCrud){
+      if (this.$refs.expandCrud) {
         this.dataList.forEach(item => {
           this.$refs.crud.toggleRowExpansion(item, false);
         });
       }
-      statusStatisticsApi({type:'1'}).then(res => {
+      statusStatisticsApi({type: '1'}).then(res => {
         this.badgeList = [];
         this.badgeList.push({
-          count:0,
-          dictionaryStatus:"全部",
-          status:''
+          count: 0,
+          dictionaryStatus: "全部",
+          status: ''
         });
-        for (let item of res.data.data){
+        for (let item of res.data.data) {
           this.badgeList.push(item)
         }
       })
@@ -487,17 +526,17 @@ export default {
         page.pageSize,
         data
       ).then(res => {
-          this.dataList = res.data.data.records ? res.data.data.records : [];
-          this.page.total = res.data.data.total;
-        }).finally(() => {
-          this.loading = false;
-        });
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+      }).finally(() => {
+        this.loading = false;
+      });
     },
     editOpen(row, status) {
       this.detailData = {
         id: row.id,
         status: status,
-        billType:row.billType
+        billType: row.billType
       };
       this.show = false;
       this.$store.commit("IN_PJXS_STATUS");
@@ -532,8 +571,8 @@ export default {
     },
     async saveColumn() {
       const inSave = await this.saveColumnData(
-          this.getColumnName(211),
-          this.option
+        this.getColumnName(211),
+        this.option
       );
       if (inSave) {
         this.$nextTick(() => {
@@ -573,14 +612,14 @@ export default {
 }
 </script>
 
-<style  lang="scss"  scoped>
+<style lang="scss" scoped>
 .page-crad ::v-deep .basic-container__card {
   height: 94.2vh;
 }
 
 ::v-deep .el-badge__content.is-fixed {
   z-index: 10;
-  right:25px
+  right: 25px
 }
 
 .item {
@@ -618,20 +657,25 @@ export default {
     margin-bottom: 0px;
   }
 }
-::v-deep .el-form-item__content{
-  margin-left: 90px;
+
+::v-deep .el-form-item__content {
+  //margin-left: 90px;
 }
-::v-deep .avue-crud__right{
+
+::v-deep .avue-crud__right {
   padding-top: 5px;
 }
-::v-deep .elForm{
-  .el-form-item{
+
+::v-deep .elForm {
+  .el-form-item {
     margin-bottom: 0;
   }
 }
-::v-deep .el-dialog__body{
+
+::v-deep .el-dialog__body {
   padding: 0;
 }
+
 ::v-deep .el-form-item__label {
   //text-align: right;
   //vertical-align: middle;

+ 0 - 1
src/views/salesOrder/js/optionList.js

@@ -236,7 +236,6 @@ export const optionList = {
       },
       dicData: [],
       cell: true,
-      overHidden: true
     },
     {
       label: "单价",

+ 342 - 329
src/views/statisticAnalysis/budgetAnalysis/index.vue

@@ -1,26 +1,39 @@
 <template>
-    <div>
-        <basic-container class="page-crad">
-            <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
-                       :cell-style="cellStyle" @search-change="searchChange" @current-change="currentChange"
-                       @size-change="sizeChange"
-                       @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading"
-                       @saveColumn="saveColumn"
-                       @resetColumn="resetColumn" @search-criteria-switch="searchCriteriaSwitch">
-                <template slot="menuLeft">
-                    <el-button type="info" size="small" @click="outExport">导出
-                    </el-button>
-                </template>
-                <template slot="corpNameSearch" slot-scope="scope">
-                    <crop-select v-model="search.corpId" corpType="KH"/>
-                </template>
-                <template slot="monthSearch" slot-scope="scope">
-                    <el-input-number v-model="search.month" :min="1" :max="12" placeholder="请输入 月" :controls="false"
-                                     style="width: 100%;"></el-input-number>
-                </template>
-            </avue-crud>
-        </basic-container>
-    </div>
+  <div>
+    <basic-container class="page-crad">
+      <avue-crud ref="crud"
+                 :option="option"
+                 :data="dataList"
+                 :page.sync="page"
+                 :search.sync="search"
+                 :cell-style="cellStyle"
+                 @search-change="searchChange"
+                 @current-change="currentChange"
+                 @size-change="sizeChange"
+                 @refresh-change="refreshChange"
+                 @on-load="onLoad"
+                 :table-loading="loading"
+                 @saveColumn="saveColumn"
+                 @resetColumn="resetColumn"
+                 @search-criteria-switch="searchCriteriaSwitch">
+        <template slot="menuLeft">
+          <el-button type="info" size="small" @click="outExport">导出</el-button>
+        </template>
+        <template slot="corpNameSearch" slot-scope="scope">
+          <crop-select v-model="search.corpId" corpType="KH"/>
+        </template>
+        <template slot="monthSearch" slot-scope="scope">
+          <el-input-number
+              v-model="search.month"
+              :min="1"
+              :max="12"
+              placeholder="请输入 月"
+              :controls="false"
+              style="width: 100%;"></el-input-number>
+        </template>
+      </avue-crud>
+    </basic-container>
+  </div>
 </template>
 
 <script>
@@ -28,318 +41,318 @@ import {getToken} from "@/util/auth";
 import {getList} from "@/api/budgetAnalysis"
 
 export default {
-    name: "index",
-    data() {
-        return {
-            UConfiguration: {
-                multipleChoices: false,
-                multiple: false,
-                disabled: false,
-                searchShow: true,
-                collapseTags: false,
-                placeholder: '请点击右边按钮选择',
-                dicData: []
-            },
-            form: {},
-            search: {},
-            dataList: [],
-            loading: false,
-            detailData: {},
-            page: {
-                pageSize: 20,
-                currentPage: 1,
-                total: 0,
-                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
-            },
-            option: {},
-            optionBack: {
-                searchShow: true,
-                searchMenuPosition: "right",
-                searchSpan: 8,
-                searchMenuSpan: 16,
-                border: true,
-                index: true,
-                addBtn: false,
-                viewBtn: false,
-                editBtn: false,
-                delBtn: false,
-                searchIcon: true,
-                menu: false,
-                summaryText: "合计",
-                showSummary: true,
-                sumColumnList: [{
-                    name: "keter",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "keterOrdQuantity",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "keterDeliverQuantity",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "xcentway",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "xcentwayOrdQuantity",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "xcentwayDeliverQuantity",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "luxxan",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "luxxanOrdQuantity",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "luxxanDeliverQuantity",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "drivemaster",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "drivemasterOrdQuantity",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "drivemasterDeliverQuantity",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "quantitySummary",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "orderSummary",
-                    type: "sum",
-                    decimals: 2
-                }, {
-                    name: "deliverySummary",
-                    type: "sum",
-                    decimals: 2
-                }],
-                column: [
-                    {
-                        label: "年度",
-                        prop: "year",
-                        overHidden: true,
-                        type: "year",
-                        valueFormat: "yyyy",
-                        search: true
-                    }, {
-                        label: "月",
-                        prop: "month",
-                        overHidden: true,
-                        search: true
-                    }, {
-                        label: "客户名称",
-                        prop: "corpName",
-                        overHidden: true,
-                        search: true
-                    }, {
-                        label: "登马计划",
-                        prop: "drivemaster",
-                        overHidden: true
-                    }, {
-                        label: "订单",
-                        prop: "drivemasterOrdQuantity",
-                        overHidden: true
-                    }, {
-                        label: "发货",
-                        prop: "drivemasterDeliverQuantity",
-                        overHidden: true
-                    }, {
-                        label: "欧记计划",
-                        prop: "keter",
-                        overHidden: true
-                    }, {
-                        label: "订单",
-                        prop: "keterOrdQuantity",
-                        overHidden: true
-                    }, {
-                        label: "发货",
-                        prop: "keterDeliverQuantity",
-                        overHidden: true
-                    }, {
-                        label: "爱特路计划",
-                        prop: "xcentway",
-                        width: 100,
-                        overHidden: true
-                    }, {
-                        label: "订单",
-                        prop: "xcentwayOrdQuantity",
-                        overHidden: true
-                    }, {
-                        label: "发货",
-                        prop: "xcentwayDeliverQuantity",
-                        overHidden: true
-                    }, {
-                        label: "路迈计划",
-                        prop: "luxxan",
-                        overHidden: true
-                    }, {
-                        label: "订单",
-                        prop: "luxxanOrdQuantity",
-                        overHidden: true
-                    }, {
-                        label: "发货",
-                        prop: "luxxanDeliverQuantity",
-                        overHidden: true
-                    }, {
-                        label: "订单完成率",
-                        prop: "orderCompletionRate",
-                        width: 160,
-                        overHidden: true
-                    }, {
-                        label: "发货完成率",
-                        prop: "deliveryCompletionRate",
-                        width: 160,
-                        overHidden: true
-                    }, {
-                        label: "计划汇总",
-                        prop: "quantitySummary",
-                        width: 160,
-                        overHidden: true
-                    }, {
-                        label: "订单汇总",
-                        prop: "orderSummary",
-                        width: 160,
-                        overHidden: true
-                    }, {
-                        label: "发货汇总",
-                        prop: "deliverySummary",
-                        width: 160,
-                        overHidden: true
-                    }
-                    // , {
-                    //     label: "统计方式",
-                    //     prop: "showAll",
-                    //     searchSpan: 8,
-                    //     searchOrder: 0,
-                    //     overHidden: true,
-                    //     type: "select",
-                    //     clearable: false,
-                    //     search: true,
-                    //     hide: true,
-                    //     showColumn: false,
-                    //     dicData: [{
-                    //         label: '年',
-                    //         value: 0
-                    //     }, {
-                    //         label: '季度',
-                    //         value: 1
-                    //     }, {
-                    //         label: '月',
-                    //         value: 2
-                    //     }],
-                    //     searchValue: 0
-                    // }
-                ]
-            }
-        };
+  name: "index",
+  data() {
+    return {
+      UConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        disabled: false,
+        searchShow: true,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
+      form: {},
+      search: {},
+      dataList: [],
+      loading: false,
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      option: {},
+      optionBack: {
+        searchShow: true,
+        searchMenuPosition: "right",
+        searchSpan: 8,
+        searchMenuSpan: 16,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        searchIcon: true,
+        menu: false,
+        summaryText: "合计",
+        showSummary: true,
+        sumColumnList: [{
+          name: "keter",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "keterOrdQuantity",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "keterDeliverQuantity",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "xcentway",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "xcentwayOrdQuantity",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "xcentwayDeliverQuantity",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "luxxan",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "luxxanOrdQuantity",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "luxxanDeliverQuantity",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "drivemaster",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "drivemasterOrdQuantity",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "drivemasterDeliverQuantity",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "quantitySummary",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "orderSummary",
+          type: "sum",
+          decimals: 2
+        }, {
+          name: "deliverySummary",
+          type: "sum",
+          decimals: 2
+        }],
+        column: [
+          {
+            label: "年度",
+            prop: "year",
+            overHidden: true,
+            type: "year",
+            valueFormat: "yyyy",
+            search: true
+          }, {
+            label: "月",
+            prop: "month",
+            overHidden: true,
+            search: true
+          }, {
+            label: "客户名称",
+            prop: "corpName",
+            overHidden: true,
+            search: true
+          }, {
+            label: "登马计划",
+            prop: "drivemaster",
+            overHidden: true
+          }, {
+            label: "订单",
+            prop: "drivemasterOrdQuantity",
+            overHidden: true
+          }, {
+            label: "发货",
+            prop: "drivemasterDeliverQuantity",
+            overHidden: true
+          }, {
+            label: "欧记计划",
+            prop: "keter",
+            overHidden: true
+          }, {
+            label: "订单",
+            prop: "keterOrdQuantity",
+            overHidden: true
+          }, {
+            label: "发货",
+            prop: "keterDeliverQuantity",
+            overHidden: true
+          }, {
+            label: "爱特路计划",
+            prop: "xcentway",
+            width: 100,
+            overHidden: true
+          }, {
+            label: "订单",
+            prop: "xcentwayOrdQuantity",
+            overHidden: true
+          }, {
+            label: "发货",
+            prop: "xcentwayDeliverQuantity",
+            overHidden: true
+          }, {
+            label: "路迈计划",
+            prop: "luxxan",
+            overHidden: true
+          }, {
+            label: "订单",
+            prop: "luxxanOrdQuantity",
+            overHidden: true
+          }, {
+            label: "发货",
+            prop: "luxxanDeliverQuantity",
+            overHidden: true
+          }, {
+            label: "订单完成率(%)",
+            prop: "orderCompletionRate",
+            width: 160,
+            overHidden: true
+          }, {
+            label: "发货完成率(%)",
+            prop: "deliveryCompletionRate",
+            width: 160,
+            overHidden: true
+          }, {
+            label: "计划汇总",
+            prop: "quantitySummary",
+            width: 160,
+            overHidden: true
+          }, {
+            label: "订单汇总",
+            prop: "orderSummary",
+            width: 160,
+            overHidden: true
+          }, {
+            label: "发货汇总",
+            prop: "deliverySummary",
+            width: 160,
+            overHidden: true
+          }
+          // , {
+          //     label: "统计方式",
+          //     prop: "showAll",
+          //     searchSpan: 8,
+          //     searchOrder: 0,
+          //     overHidden: true,
+          //     type: "select",
+          //     clearable: false,
+          //     search: true,
+          //     hide: true,
+          //     showColumn: false,
+          //     dicData: [{
+          //         label: '年',
+          //         value: 0
+          //     }, {
+          //         label: '季度',
+          //         value: 1
+          //     }, {
+          //         label: '月',
+          //         value: 2
+          //     }],
+          //     searchValue: 0
+          // }
+        ]
+      }
+    };
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(258), this.optionBack);
+  },
+  methods: {
+    cellStyle() {
+      return "padding:0;height:40px;";
     },
-    async created() {
-        this.option = await this.getColumnData(this.getColumnName(258), this.optionBack);
+    searchCriteriaSwitch(type) {
+      if (type) {
+        this.option.height = this.option.height - 46;
+      } else {
+        this.option.height = this.option.height + 46;
+      }
+      this.$refs.crud.getTableHeight();
     },
-    methods: {
-        cellStyle() {
-            return "padding:0;height:40px;";
-        },
-        searchCriteriaSwitch(type) {
-            if (type) {
-                this.option.height = this.option.height - 46;
-            } else {
-                this.option.height = this.option.height + 46;
-            }
-            this.$refs.crud.getTableHeight();
-        },
-        //点击搜索按钮触发
-        searchChange(params, done) {
-            this.page.currentPage = 1;
-            this.onLoad(this.page, params);
-            done();
-        },
-        refreshChange() {
-            this.onLoad(this.page, this.search);
-        },
-        currentChange(val) {
-            this.page.currentPage = val;
-        },
-        sizeChange(val) {
-            this.page.currentPage = 1;
-            this.page.pageSize = val;
-        },
-        onLoad(page, params = {}) {
-            let data = this.deepClone(Object.assign({}, params, this.search));
-            this.loading = true;
-            getList(
-                page.currentPage,
-                page.pageSize,
-                Object.assign(data)
-            ).then(res => {
-                this.dataList = res.data.data.records ? res.data.data.records : [];
-                this.page.total = res.data.data.total;
-                if (this.page.total) {
-                    this.option.height = window.innerHeight - 210;
-                }
-            }).finally(() => {
-                this.loading = false;
-            });
-        },
-        //列保存触发
-        async saveColumn() {
-            const inSave = await this.saveColumnData(this.getColumnName(258), this.option);
-            if (inSave) {
-                this.$message.success("保存成功");
-                //关闭窗口
-                this.$refs.crud.$refs.dialogColumn.columnBox = false;
-            }
-        },
-        async resetColumn() {
-            this.option = this.optionBack;
-            const inSave = await this.delColumnData(this.getColumnName(258), this.optionBack);
-            if (inSave) {
-                this.$message.success("重置成功");
-                this.$refs.crud.$refs.dialogColumn.columnBox = false;
-            }
-        },
-        editOpen(row) {
-        },
-        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]
-                        }
-                    }
-                }
+    //点击搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    currentChange(val) {
+      this.page.currentPage = val;
+    },
+    sizeChange(val) {
+      this.page.currentPage = 1;
+      this.page.pageSize = val;
+    },
+    onLoad(page, params = {}) {
+      let data = this.deepClone(Object.assign({}, params, this.search));
+      this.loading = true;
+      getList(
+        page.currentPage,
+        page.pageSize,
+        Object.assign(data)
+      ).then(res => {
+        this.dataList = res.data.data.records ? res.data.data.records : [];
+        this.page.total = res.data.data.total;
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 210;
+        }
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+    //列保存触发
+    async saveColumn() {
+      const inSave = await this.saveColumnData(this.getColumnName(258), this.option);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.option = this.optionBack;
+      const inSave = await this.delColumnData(this.getColumnName(258), this.optionBack);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    editOpen(row) {
+    },
+    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-box-tube/annualItem/annualBudgetProfitExcel',      //跳转目标窗口的地址
-                query: {
-                    ...config.params    //括号内是要传递给新窗口的参数
-                }
-            })
-            window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-box-tube/annualItem/annualBudgetProfitExcel',      //跳转目标窗口的地址
+        query: {
+          ...config.params    //括号内是要传递给新窗口的参数
         }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
     }
+  }
 };
 </script>
 

+ 2 - 2
vue.config.js

@@ -32,9 +32,9 @@ module.exports = {
       '/api': {
         //本地服务接口地址
         // target: 'http://192.168.3.64:1080',
-        // target: 'http://192.168.0.106:1080',
+        target: 'http://192.168.0.106: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: {