Browse Source

高度自适应等

qinbai 3 years ago
parent
commit
0c2fcb4830

+ 13 - 0
src/api/statisticAnalysis/profit.js

@@ -1,5 +1,6 @@
 import request from '@/router/axios';
 
+//利润分析
 export const getProfitList = (current, size,params) => {
   return request({
     url: '/api/blade-purchase-sales/order/listOrderStatisticAnalysis',
@@ -11,3 +12,15 @@ export const getProfitList = (current, size,params) => {
     }
   })
 }
+//提成统计
+export const getCommission = (current, size,params) => {
+  return request({
+    url: '/api/blade-deliver-goods/deliveryReport/commission',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
+}

+ 1 - 0
src/components/fee-info/main.vue

@@ -510,6 +510,7 @@ export default {
       });
     },
     getCorpData(row) {
+      console.log(row)
       this.feeData[row.index].corpName = row.cname;
     },
     countChange(row) {

+ 59 - 0
src/components/selectComponent/userCom.vue

@@ -0,0 +1,59 @@
+<template>
+  <div style="display:flex">
+    <el-select
+      size="small"
+      v-model="value"
+      placeholder="请选择"
+      @input="$emit('balabala', value)"
+      :disabled="disabled"
+      filterable
+      clearable
+      style="width:100%"
+      @change="userChange"
+    >
+      <el-option
+        v-for="item in userList"
+        :key="item.id"
+        :label="item.realName"
+        :value="item.id"
+      >
+      </el-option>
+    </el-select>
+  </div>
+</template>
+
+<script>
+import { getUserList } from "@/api/workManagement/mainProject";
+export default {
+  data() {
+    return {
+      userList: [],
+    };
+  },
+  props: {
+    value: String,
+    disabled: Boolean,
+  },
+  model: {
+    prop: "value",
+    event: "balabala"
+  },
+  created() {
+    getUserList().then(res => {
+      this.userList = res.data.data;
+    });
+  },
+  mounted() {},
+  methods: {
+    userChange(row) {
+      this.userList.forEach(e => {
+        if (row == e.id) {
+          this.$emit("getUserData", { ...e});
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss"></style>

+ 3 - 0
src/main.js

@@ -40,6 +40,8 @@ import goodsSelect from '@/components/goodsSelect/index';
 import breakdownSelect from '@/components/costBreakdown/costBreakdown';
 //用户选择组件
 import userSelect from '@/components/selectComponent/userSelect';
+//用户选择组件重新封装
+import userCom from '@/components/selectComponent/userCom';
 //重新封装了客户选择组件
 import cropSelect from "@/components/crop-select/main";
 // 发送消息㢟
@@ -71,6 +73,7 @@ Vue.component('selectComponent', selectComponent);
 Vue.component('warehouseSelect', warehouseSelect);
 Vue.component('goodsSelect', goodsSelect);
 Vue.component('breakdownSelect', breakdownSelect);
+Vue.component('userCom', userCom);
 Vue.component('userSelect', userSelect);
 Vue.component('cropSelect', cropSelect);
 Vue.component('messagePost', messagePost);

+ 2 - 2
src/views/importTrade/invoice/config/mainList.json

@@ -5,11 +5,11 @@
   "searchShow": true,
   "searchMenuSpan": 8,
   "searchSpan": 8,
-  "align": "center",
   "searchMenuPosition": "right",
+  "align": "center",
   "dialogWidth": "60%",
-  "height": "auto",
   "tree": true,
+  "height": "auto",
   "border": true,
   "index": true,
   "selection": true,

+ 12 - 0
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -72,6 +72,18 @@
                   :disabled="viewDisabled || goodsDisable"
                   style="width: 100%"
                 ></crop-select>
+                <user-com
+                  v-else-if="item.prop === 'arrivalContact'"
+                  :disabled="viewDisabled || goodsDisable"
+                  v-model="form[item.prop]"
+                  style="width: 100%"
+                ></user-com>
+                <user-com
+                  v-else-if="item.prop === 'saleman'"
+                  :disabled="viewDisabled || goodsDisable"
+                  v-model="form[item.prop]"
+                  style="width: 100%"
+                ></user-com>
                 <el-select v-else-if="item.prop === 'storageId'" style="width: 100%" :disabled="goodsDisable || viewDisabled"  @change="warehouseChange" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option v-for="(item,index) in storageList" :key="index" :label="item.stockName" :value="item.storageId"></el-option>
                 </el-select>

+ 19 - 1
src/views/importTrade/invoice/index.vue

@@ -18,6 +18,7 @@
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
                @refresh-change="refreshChange"
+               @search-criteria-switch="searchCriteriaSwitch"
                @on-load="onLoad">
       <template slot="corpIdSearch">
         <select-component
@@ -31,6 +32,12 @@
           :configuration="sConfiguration"
         ></warehouse-select>
       </template>
+      <template slot="arrivalContactSearch">
+        <user-com
+          v-model="search.arrivalContact"
+          style="width: 100%"
+        ></user-com>
+      </template>
       <template slot="menuLeft">
         <el-button size="small"
                    type="success"
@@ -130,7 +137,7 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(43), option);
   },
   mounted() {
-    // this.option.height = window.innerHeight - 200;
+
   },
   activated() {
     if(!this.show && !this.$store.getters.goStatus){
@@ -250,6 +257,9 @@ export default {
       selectInvoiceList(params).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total || this.page.total === 0) {
+          this.option.height = window.innerHeight - 200;
+        }
       }).finally(()=>{
         this.loading = false
       })
@@ -259,6 +269,14 @@ export default {
       this.show = true;
       this.onLoad(this.page,this.search)
     },
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 140
+      }else {
+        this.option.height = this.option.height + 140
+      }
+      this.$refs.crud.getTableHeight()
+    },
     //列保存触发
     async saveColumn() {
       const inSave = await this.saveColumnData(

+ 12 - 0
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -72,6 +72,18 @@
                   :disabled="viewDisabled || receiptDisable"
                   style="width: 100%"
                 ></crop-select>
+                <user-com
+                  v-else-if="item.prop === 'arrivalContact'"
+                  :disabled="receiptDisable || viewDisabled"
+                  v-model="form[item.prop]"
+                  style="width: 100%"
+                ></user-com>
+                <user-com
+                  v-else-if="item.prop === 'saleman'"
+                  :disabled="receiptDisable || viewDisabled"
+                  v-model="form[item.prop]"
+                  style="width: 100%"
+                ></user-com>
                 <el-select v-else-if="item.prop === 'storageId'" style="width: 100%" :disabled="receiptDisable || viewDisabled" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
                   <el-option v-for="(item,index) in storageIdDic" :key="index" :label="item.cname " :value="item.id"></el-option>
                 </el-select>

+ 18 - 0
src/views/importTrade/receipt/index.vue

@@ -18,6 +18,7 @@
                @refresh-change="refreshChange"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
+               @search-criteria-switch="searchCriteriaSwitch"
                @on-load="onLoad">
       <template slot="corpIdSearch">
         <select-component
@@ -25,6 +26,12 @@
           :configuration="configuration"
         ></select-component>
       </template>
+      <template slot="arrivalContactSearch">
+        <user-com
+          v-model="search.arrivalContact"
+          style="width: 100%"
+        ></user-com>
+      </template>
       <template slot="storageIdSearch">
         <warehouse-select
           v-model="search.storageId"
@@ -260,10 +267,21 @@ export default {
       selectReceiptList(params).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total || this.page.total === 0) {
+          this.option.height = window.innerHeight - 200;
+        }
       }).finally(()=>{
         this.loading = false
       })
     },
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 140
+      }else {
+        this.option.height = this.option.height + 140
+      }
+      this.$refs.crud.getTableHeight()
+    },
     goBack() {
       this.detailData=this.$options.data().detailData
       this.show = true;

+ 7 - 0
src/views/purchase/contract/detailsPage.vue

@@ -147,6 +147,12 @@
                     <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue"  :value="item.dictValue"></el-option>
                   </el-select>
                 </div>
+                <user-com
+                  v-else-if="item.prop === 'salesName'"
+                  :disabled="item.disabled?true:false || takeDisabled  || viewDisabled"
+                  v-model="form[item.prop]"
+                  style="width: 100%"
+                ></user-com>
                 <el-input type="age" v-else-if="item.prop === 'exchangeRate'" v-model="form[item.prop]"  :disabled="item.disabled?true:false || takeDisabled  || viewDisabled" size="small" autocomplete="off"  @change="RMBChange" placeholder="请输入">
                 </el-input>
                 <el-input type="textarea" v-else-if="(item.prop === 'orderRemark')" v-model="form[item.prop]" :disabled="viewDisabled"  size="small" autocomplete="off" placeholder="请输入"></el-input>
@@ -500,6 +506,7 @@ export default {
       batchNo:'',
       billType:"",
       billData:{},
+      salesNameDic:[],//业务员列表
       contractTypeDic:[],
       currencyDic:[],
       selectContact:[],//选中采购明细

+ 18 - 0
src/views/purchase/contract/index.vue

@@ -21,6 +21,7 @@
                  @expand-change="expandChange"
                  @saveColumn="saveColumn"
                  @resetColumn="resetColumn"
+                 @search-criteria-switch="searchCriteriaSwitch"
       >
         <template slot="corpIdSearch">
           <select-component
@@ -28,6 +29,12 @@
             :configuration="configuration"
           ></select-component>
         </template>
+        <template slot="salesNameSearch">
+          <user-com
+            v-model="search.salesName"
+            style="width: 100%"
+          ></user-com>
+        </template>
         <template slot-scope="scope" slot="expand">
           <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
             <el-table-column   type="selection" align="center"  width="50"></el-table-column>
@@ -281,11 +288,22 @@ export default {
       selectPurchaseList(params).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 200;
+        }
       })
       .finally(()=>{
         this.loading = false
       })
     },
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 145
+      }else {
+        this.option.height = this.option.height + 145
+      }
+      this.$refs.crud.getTableHeight()
+    },
     goBack() {
       this.detailData=this.$options.data().detailData
       this.show = true;

+ 13 - 0
src/views/purchase/stockBill/index.vue

@@ -15,6 +15,7 @@
                @refresh-change="refreshChange"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
+               @search-criteria-switch="searchCriteriaSwitch"
                @on-load="onLoad">
       <template slot-scope="scope" slot="surplusRouteQuantity">
         <span>{{ scope.row.surplusRouteQuantity | roundNumbers}}</span>
@@ -133,9 +134,21 @@
         customerList(params).then(res=>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total
+          if (this.page.total || this.page.total === 0) {
+            this.option.height = window.innerHeight - 240;
+          }
+        }).finally(()=>{
           this.loading = false;
         })
       },
+      searchCriteriaSwitch(type){
+        if (type){
+          this.option.height = this.option.height - 45
+        }else {
+          this.option.height = this.option.height + 45
+        }
+        this.$refs.crud.getTableHeight()
+      },
       //列保存触发
       async saveColumn() {
         const inSave = await this.saveColumnData(

+ 6 - 0
src/views/salesManagement/salesContract/detailsPage.vue

@@ -134,6 +134,12 @@
                   :disabled="viewDisabled || takeDisabled"
                   corpType="GS"
                 ></crop-select>
+                <user-com
+                  v-else-if="item.prop === 'salesName'"
+                  :disabled="viewDisabled || takeDisabled"
+                  v-model="form[item.prop]"
+                  style="width: 100%"
+                ></user-com>
                 <el-input type="age" v-else-if="item.type === 'unit'" v-model="form[item.prop]"  @change="downPaymentChange"  :disabled="viewDisabled|| takeDisabled " size="small" autocomplete="off" placeholder="请输入">
                   <template slot="append">%</template>
                 </el-input>

+ 18 - 0
src/views/salesManagement/salesContract/index.vue

@@ -20,6 +20,7 @@
                @expand-change="expandChange"
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
+               @search-criteria-switch="searchCriteriaSwitch"
     >
       <template slot="corpIdSearch">
         <select-component
@@ -27,6 +28,12 @@
           :configuration="configuration"
         ></select-component>
       </template>
+      <template slot="salesNameSearch">
+        <user-com
+          v-model="search.salesName"
+          style="width: 100%"
+        ></user-com>
+      </template>
       <template slot-scope="{row,size}" slot="search">
       </template>
       <template slot-scope="scope" slot="expand" width="48px">
@@ -261,6 +268,9 @@ export default {
           this.$set(item,'insideList',[])
           this.$set(item,'loading', true)
         })
+        if (this.page.total) {
+          this.option.height = window.innerHeight - 200;
+        }
       }).finally(()=>{
         this.loading = false
       })
@@ -270,6 +280,14 @@ export default {
       this.show = true;
       this.onLoad(this.page,this.search)
     },
+    searchCriteriaSwitch(type){
+      if (type){
+        this.option.height = this.option.height - 145
+      }else {
+        this.option.height = this.option.height + 145
+      }
+      this.$refs.crud.getTableHeight()
+    },
     //列保存触发
     async saveColumn() {
       const inSave = await this.saveColumnData(

+ 58 - 1
src/views/statisticAnalysis/royalty/config/mainList.json

@@ -85,12 +85,69 @@
   ],
   "column": [
     {
+      "label": "年",
+      "prop": "year",
+      "width": 170,
+      "hide": true,
+      "search": true
+    },
+    {
+      "label": "季度",
+      "prop": "quarter",
+      "width": 170,
+      "hide": true,
+      "search": true,
+      "type": "select",
+      "dicData": [
+        {
+          "label": "第一季度",
+          "value": "1"
+        },
+        {
+          "label": "第二季度",
+          "value": "2"
+        },
+        {
+          "label": "第三季度",
+          "value": "3"
+        },
+        {
+          "label": "第四季度",
+          "value": "4"
+        }
+      ]
+    },
+    {
+      "label": "用户类型",
+      "prop": "userType",
+      "width": 170,
+      "hide": true,
+      "search": true,
+      "type": "select",
+      "dicData": [
+        {
+          "label": "业务",
+          "value": "11"
+        },
+        {
+          "label": "操作",
+          "value": "12"
+        }
+      ]
+    },
+    {
       "label": "姓名",
-      "prop": "name",
+      "prop": "userId",
       "width": 170,
+      "hide": true,
       "search": true
     },
     {
+      "label": "姓名",
+      "prop": "name",
+      "width": 170
+    },
+    {
       "label": "销售数量",
       "children": [
         {

+ 30 - 14
src/views/statisticAnalysis/royalty/index.vue

@@ -17,6 +17,19 @@
                @saveColumn="saveColumn"
                @resetColumn="resetColumn"
                @on-load="onLoad">
+      <template slot="yearSearch">
+        <el-date-picker
+          v-model="search.year"
+          type="year"
+          placeholder="">
+        </el-date-picker>
+      </template>
+      <template slot="userIdSearch">
+        <user-com
+          v-model="search.userId"
+          style="width: 100%"
+        ></user-com>
+      </template>
       <template slot="menuLeft">
         <el-button size="small"
                    type="info"
@@ -32,7 +45,7 @@
 
 <script>
   import option from "./config/mainList.json";
-  import { getProfitList } from "@/api/statisticAnalysis/profit";
+  import { getCommission } from "@/api/statisticAnalysis/profit";
   import { contrastList } from "@/util/contrastData";
 
   export default {
@@ -136,23 +149,26 @@
       },
       paramsAdjustment(params) {
         params = Object.assign({}, this.search);
-        if (params.createTime &&  params.createTime.length !==0 ) {  //发货
-          params.startTime = params.createTime[0]+ " " + "00:00:00";
-          params.endTime = params.createTime[1] + " " + "23:59:59";
-          this.$delete(params,'createTime')
+        // if (params.createTime &&  params.createTime.length !==0 ) {  //发货
+        //   params.startTime = params.createTime[0]+ " " + "00:00:00";
+        //   params.endTime = params.createTime[1] + " " + "23:59:59";
+        //   this.$delete(params,'createTime')
+        // }
+        if(!params.userType){
+          params.userType = "业务"
         }
         return params
       },
       onLoad(page, params) {
-        // this.loading = true;
-        // params = this.paramsAdjustment(params)
-        // getProfitList(page.currentPage, page.pageSize,params).then(res=>{
-        //   this.dataList = res.data.data.records
-        //   this.page.total = res.data.data.total
-        //   this.rowspan()
-        // }).finally(()=>{
-        //   this.loading = false;
-        // })
+        this.loading = true;
+        params = this.paramsAdjustment(params)
+        getCommission(page.currentPage, page.pageSize,params).then(res=>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          // this.rowspan()
+        }).finally(()=>{
+          this.loading = false;
+        })
       },
       //列保存触发
       async saveColumn() {

+ 23 - 11
src/views/system/application/config/detailsPage.json

@@ -40,8 +40,7 @@
       "prop": "versionCode",
       "overHidden": true,
       "cell":true,
-      "width": 120,
-      "type": "number",
+      "width": 180,
       "index": 2,
       "rules": [
         {
@@ -52,25 +51,38 @@
       ]
     },
     {
-      "label": "版本描述",
-      "prop": "versionDesc",
+      "label": "最低版本",
+      "prop": "versionCode",
       "overHidden": true,
-      "cell":true,
-      "width": 300,
+      "cell": true,
+      "width": 80,
       "index": 3
     },
     {
+      "label": "最新版本",
+      "prop": "lastVersionCode",
+      "overHidden": true,
+      "cell": true,
+      "width": 80,
+      "index": 4
+    },
+    {
       "label": "下载地址",
       "prop": "downloadUrl",
       "overHidden": true,
-      "cell":true,
-      "width": 300,
-      "index": 4
+      "width": 500,
+      "index": 5
+    },
+    {
+      "label": "版本描述",
+      "prop": "versionDesc",
+      "overHidden": true,
+      "width": 360,
+      "index": 6
     },
     {
       "label": "是否发布",
       "prop": "isRelease",
-      "cell": true,
       "type": "select",
       "value": 1,
       "dicData": [
@@ -85,7 +97,7 @@
       ],
       "overHidden": true,
       "width": 120,
-      "index": 5
+      "index": 7
     }
   ]
 }

+ 130 - 0
src/views/system/application/detailsPage.vue

@@ -43,6 +43,51 @@
                    @current-change="currentChange"
                    @size-change="sizeChange"
                    @refresh-change="refreshChange">
+          <template slot="downloadUrl" slot-scope="{ row }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.downloadUrl"
+              style="width: 80%"
+              size="small"
+            >
+            </el-input>
+            <el-button
+              style="width: 20%"
+              size="small"
+              v-if="row.$cellEdit"
+              @click="uploadFiles(row)"
+            >
+              附件
+            </el-button>
+            <span v-else>{{ row.downloadUrl }}</span>
+          </template>
+          <template slot="versionDesc" slot-scope="{ row }">
+            <el-input type="textarea"
+                      v-if="row.$cellEdit"
+                      v-model="row.versionDesc"
+                      size="small"
+                      autocomplete="off"
+                      placeholder="">
+            </el-input>
+            <span v-else>{{ row.versionDesc }}</span>
+          </template>
+          <template slot="isRelease" slot-scope="{ row, index }">
+            <el-select
+              v-if="row.$cellEdit"
+              v-model="row.isRelease"
+              size="small"
+              @change="isReleaseChange(row,index)"
+            >
+              <el-option
+                v-for="(item,index) in isReleaseList"
+                :key="index"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+            <span v-else>{{ row.isRelease ===1?"是":"否" }}</span>
+          </template>
           <template slot="menuLeft">
             <el-button type="primary"
                        size="small"
@@ -69,6 +114,22 @@
           </template>
         </avue-crud>
       </basic-container>
+      <el-dialog
+        title="上传附件"
+        append-to-body
+        :visible.sync="excelBox"
+        width="555px"
+        v-dialog-drag
+      >
+        <avue-form
+          :option="excelOption"
+          v-model="excelForm"
+          table-loading="excelLoading"
+          :upload-before="uploadBefore"
+          :upload-after="uploadAfter"
+        >
+        </avue-form>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -146,6 +207,40 @@
             },
           ],
         },
+        selectRow:{},
+        isReleaseList:[
+          {
+            label: "是",
+            value: 1
+          },
+          {
+            label: "否",
+            value: 0
+          }
+          ],
+        excelBox: false,
+        excelLoading: false,
+        excelForm: {},
+        excelOption: {
+          submitBtn: false,
+          emptyBtn: false,
+          column: [
+            {
+              label: "附件上传",
+              prop: "excelFile",
+              type: "upload",
+              drag: true,
+              dataType: "string",
+              loadText: "模板上传中,请稍等",
+              span: 24,
+              propsHttp: {
+                res: "data",
+                url: "link"
+              },
+              action: "/api/blade-resource/oss/endpoint/put-file"
+            }
+          ]
+        },
         oldForm:{},
         oldDataList:[],
       }
@@ -160,10 +255,45 @@
         })
       }
     },
+    watch:{
+      'excelForm.excelFile'(val) {
+        this.selectRow.downloadUrl = val
+      },
+    },
     mounted() {
 
     },
     methods: {
+      isReleaseChange(row,indexs){
+        if(row.isRelease === 1){
+          //如果其他版本有发布的
+          let yes ;
+          this.dataList.map((item,index)=>{
+            if(indexs != index && item.isRelease === 1){
+              yes =  true
+            }
+          })
+          if(yes){
+            this.$message.warning("已有其他版本发布!")
+            row.isRelease = 0
+          }
+        }
+
+      },
+      uploadFiles(row){
+        this.selectRow = row
+        this.excelBox = true
+      },
+      uploadBefore(file, done, loading) {
+        done();
+        loading = true;
+      },
+      uploadAfter(res, done, loading, column) {
+        this.excelBox = false;
+        this.$message.success("上传成功!");
+        loading = false;
+        done();
+      },
       rowUpdate(row, index, done) {
         done(row);
       },

+ 4 - 2
src/views/workManagement/main-items/detailsPage.vue

@@ -930,8 +930,10 @@
         })
       },
       value(value,row){
-        row.userid = value.id
-        row.deptid = value.deptId
+        if(value){
+          row.userid = value.id
+          row.deptid = value.deptId
+        }
       },
       //合计
       totalChange(row,type){