Browse Source

Merge branch 'orangeUrgent' into mergeBranch

qymljy 1 year ago
parent
commit
ce90dcb68f

+ 6 - 3
src/Form/marketing2/saler/edit.vue

@@ -47,8 +47,8 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item  label="区域:" prop="areaname">
-                  <el-input  v-model="form.areaname" placeholder="区域" disabled></el-input>
-  <!--                <areaList :areaname="form.areaname" @selectArea="selectArea" disabled=""></areaList>-->
+<!--                  <el-input  v-model="form.areaname" placeholder="区域" disabled></el-input>-->
+                  <areaList :areaname="form.areaname" @selectArea="selectArea" disabled=""></areaList>
                 </el-form-item>
               </el-col>
             </el-row>
@@ -77,7 +77,7 @@
 
 <script>
 import selectMenber from '@/components/selectMenber/index.vue'
-import areaList from "@/HManagement/marketing2/saler/area/modules/areaList";
+import areaList from "@/HManagement/marketing2/saler/area/modules/areaListNew";
 export default {
   name: "edit",
   props:["data"],
@@ -135,6 +135,9 @@ export default {
           "id": 20221011144703,
           "content": this.form
         })
+        if (res.code == 0){
+          this.form.discountrate = Math.round((this.form.discountrate*100)*100)/100
+        }
         this.tool.showMessage(res,()=>{
           this.dialogVisible = false
           this.$refs.form.resetFields()

+ 10 - 10
src/HDrpManagement/contractManage/components/editContract.vue

@@ -582,12 +582,12 @@
             </el-col>
             <el-col :span="24" v-if="form.calculatemodel==1">
               <el-form-item label="订单金额比例(%):" prop="orderratio" >
-                <el-input  size="small" v-model.number="form.orderratio" placeholder="请输入0-100%" @change="orderratioChange"></el-input>
+                <el-input  size="small" v-model="form.orderratio" placeholder="请输入0-100%" @change="orderratioChange"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="form.calculatemodel==2">
               <el-form-item label="居间产品折扣(%):" prop="productdiscount">
-                <el-input  size="small" v-model.number="form.productdiscount" placeholder="请输入0-100%" @change="productdiscountChange"></el-input>
+                <el-input  size="small" v-model="form.productdiscount" placeholder="请输入0-100%" @change="productdiscountChange"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -879,9 +879,9 @@ export default {
                 } else {
                   this.form.type = this.$route.query.type
                 }
-                this.form.discountrate ? this.form.discountrate =  (parseInt(this.form.discountrate) / 100).toFixed(4) : ''
-                this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
-                this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
+                this.form.discountrate ? this.form.discountrate =  (parseFloat(this.form.discountrate) / 100).toFixed(4) : ''
+                this.form.productdiscount ? this.form.productdiscount =  (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
+                this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
                 let res = await this.$api.requested({
                   "id":20221121185302,
                   "content": this.form
@@ -900,8 +900,8 @@ export default {
               }
 
             } else {
-              this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
-              this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
+              this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
+              this.form.productdiscount ? this.form.productdiscount =  (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
               let res = await this.$api.requested({
                 "id":20221121185302,
                 "content": this.form
@@ -928,9 +928,9 @@ export default {
             } else {
               this.form.type = this.$route.query.type
             }
-            this.form.discountrate ? this.form.discountrate =  (parseInt(this.form.discountrate) / 100).toFixed(4) : ''
-            this.form.productdiscount ? this.form.productdiscount =  (parseInt(this.form.productdiscount) / 100).toFixed(4) : ''
-            this.form.orderratio ? this.form.orderratio =  (parseInt(this.form.orderratio) / 100).toFixed(4) : ''
+            this.form.discountrate ? this.form.discountrate =  (parseFloat(this.form.discountrate) / 100).toFixed(4) : ''
+            this.form.productdiscount ? this.form.productdiscount =  (parseFloat(this.form.productdiscount) / 100).toFixed(4) : ''
+            this.form.orderratio ? this.form.orderratio =  (parseFloat(this.form.orderratio) / 100).toFixed(4) : ''
             let res = await this.$api.requested({
               "id":20221121185302,
               "content": this.form

+ 1 - 0
src/HDrpManagement/logistics/modules/add.vue

@@ -200,6 +200,7 @@ export default {
       this.setcol = 24
       this.isCorrelate = 0
       this.$refs.dislist.tableData = []
+      this.enterpriseInfo = null
     }
   }
 }

+ 4 - 0
src/HDrpManagement/logistics/modules/dispatchTable.vue

@@ -46,6 +46,10 @@
       prop="remarks"
       label="备注">
     </el-table-column>
+    <el-table-column
+      prop="freightstatus"
+      label="寄付方式">
+    </el-table-column>
     <el-table-column
     v-if="type === 'edit' || type === 'add'"
     fixed="right"

+ 14 - 6
src/HDrpManagement/projectChange/modules/modules/rival/modules/add.vue

@@ -19,7 +19,7 @@
                     width="580"
                     trigger="click"
                     v-model="enterpriseShow"
-                    @show="enterpriseList">
+                    @show="onShow">
                   <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="enterpriseParam.content.where.condition?enterpriseParam.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="enterpriseParam.content.where.condition" @keyup.native.enter="enterpriseList(enterpriseParam.content.pageNumber = 1)" @clear="enterpriseList(enterpriseParam.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
                   </el-input>
                   <el-table :data="enterprise.enterpriseData" @row-click="enterpriseData" height="400px">
@@ -70,10 +70,12 @@
                   <div class="container normal-panel" style="text-align:right">
                     <el-pagination
                         background
-                        small
                         @size-change="handleSizeChangeProject"
                         @current-change="handleCurrentChangeProject"
                         :current-page="enterprise.currentPage"
+                        :page-sizes="[20, 50, 100, 200]"
+                        :page-size="20"
+                        layout="total,sizes, prev, pager, next, jumper"
                         :total="enterprise.total">
                     </el-pagination>
                   </div>
@@ -167,6 +169,10 @@ export default {
     }
   },
   methods:{
+    onShow(){
+      this.enterpriseParam.content.where.condition = ''
+      this.enterpriseList(this.enterpriseParam.content.pageNumber = 1)
+    },
     /*可选企业列表*/
     async enterpriseList(){
       this.enterpriseParam.content.where.sa_projectid = this.data.sa_projectid
@@ -234,17 +240,19 @@ export default {
     handleSizeChangeProject(val) {
       // console.log(`每页 ${val} 条`);
       this.enterpriseParam.content.pageSize = val
-      this.projectList()
+      this.enterpriseList()
     },
     handleCurrentChangeProject(val) {
       // console.log(`当前页: ${val}`);
       this.enterpriseParam.content.pageNumber = val
-      this.projectList()
+      this.enterpriseList()
     },
   }
 }
 </script>
 
 <style scoped>
-
-</style>
+  /deep/ .el-input__validateIcon {
+    display: none;
+  }
+</style>

+ 10 - 4
src/HDrpManagement/projectChange/modules/modules/rival/modules/edit.vue

@@ -19,7 +19,7 @@
                     width="580"
                     trigger="click"
                     v-model="enterpriseShow"
-                    @show="enterpriseList">
+                    @show="enterpriseOnShow">
                   <el-table :data="enterprise.enterpriseData" @row-click="enterpriseData">
                     <el-table-column
                         label="品牌名称"
@@ -68,10 +68,12 @@
                   <div class="container normal-panel" style="text-align:right">
                     <el-pagination
                         background
-                        small
                         @size-change="handleSizeChangeProject"
                         @current-change="handleCurrentChangeProject"
                         :current-page="enterprise.currentPage"
+                        :page-sizes="[20, 50, 100, 200]"
+                        :page-size="20"
+                        layout="total,sizes, prev, pager, next, jumper"
                         :total="enterprise.total">
                     </el-pagination>
                   </div>
@@ -170,6 +172,10 @@ export default {
       console.log(this.data)
       this.form = Object.assign({},this.form,this.data)
     },
+    enterpriseOnShow(){
+      this.enterpriseParam.content.where.condition = ''
+      this.enterpriseList(this.enterpriseParam.content.pageNumber = 1)
+    },
     /*可选企业列表*/
     async enterpriseList(){
       this.enterpriseParam.content.where.sa_projectid = this.data.sa_projectid
@@ -237,12 +243,12 @@ export default {
     handleSizeChangeProject(val) {
       // console.log(`每页 ${val} 条`);
       this.enterpriseParam.content.pageSize = val
-      this.projectList()
+      this.enterpriseList()
     },
     handleCurrentChangeProject(val) {
       // console.log(`当前页: ${val}`);
       this.enterpriseParam.content.pageNumber = val
-      this.projectList()
+      this.enterpriseList()
     },
   }
 }

+ 1 - 1
src/HDrpManagement/workReport/modules/reportComment/index.vue

@@ -49,7 +49,7 @@
                   title="确定删除该评论吗?"
                   @confirm="onDel(item)"
               >
-                <el-button slot="reference" v-if="item.createuserid === userid" style="color: #ccc;font-size: 12px;padding: 0 !important;" type="text">删除</el-button>
+                <el-button slot="reference" v-if="item.createuserid === userid" style="color: #666;font-size: 12px;padding: 0 !important;" type="text">删除</el-button>
               </el-popconfirm>
             </div>
           </div>

+ 7 - 1
src/HManagement/addressList/addressBook/detail/index.vue

@@ -5,11 +5,12 @@
       :editData="mainData"
       :mainAreaData="mainAreaData"
       :isGroup="false"
+      :turnPageId="20220914135203"
       :ownertable="mainData.groupname == '客户联系人'?'sys_enterprise_contacts':mainData.groupname == '项目联系人'?'sa_project_contacts':'sys_phonebook'"
       :idname="mainData.groupname == '客户联系人'?'contactsid':mainData.groupname == '项目联系人'?'sa_project_contactsid':'sys_phonebookid'"
       :ownerid="mainData.groupname == '客户联系人'?mainData.contactsid:mainData.groupname == '项目联系人'?mainData.sa_project_contactsid:$route.query.id"
-      :pageChange="true"
       :tabs="['详细信息','关联客户','关联项目']"
+      :pageChange="true"
       @teamList="teamList"
       >
     <template slot="customOperation">
@@ -295,6 +296,11 @@ export default {
         });
       }
 
+    },
+    // 监听切换数据,上一页,下一页
+    pageChange(id,rowindex){
+      this.$router.replace({path:'/phonebookDetail',query:{id:id,contactsid:this.$route.query.contactsid,sa_project_contactsid:this.$route.query.sa_project_contactsid,rowindex:rowindex,portrait:''}})
+      this.queryMainData(id)
     }
   },
   mounted() {

+ 5 - 1
src/template/logisyticCanUseDisBill/index.vue

@@ -45,6 +45,10 @@
       prop="address"
       label="地址">
     </el-table-column>
+    <el-table-column
+      prop="freightstatus"
+      label="寄付方式">
+    </el-table-column>
     </el-table>
     <div style="margin-top:16px;text-align:right">
       <el-pagination
@@ -116,4 +120,4 @@
         }
       }
     }
-  </script>
+  </script>

+ 14 - 2
src/views/salesData/index.vue

@@ -54,8 +54,8 @@
           <orderTrendAnalysis ref="orderTrendAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull"></orderTrendAnalysis>
           <!--  订单类型占比分析      -->
           <orderType ref="orderType" :dataid="departmentid" :scrollHeight="scrollData" :windowWidth="windowWidth" @backFull="backFull"></orderType>
-          <!--  订单产品类别占比分析      -->
-          <!--        <orderProductCategory ref="orderProductCategory" :dataid="departmentid"></orderProductCategory>-->
+          <!--订单产品类别占比分析-->
+          <orderProductCategory ref="orderProductCategory" :dataid="departmentid" :scrollHeight="scrollData" :windowWidth="windowWidth" @backFull="backFull"></orderProductCategory>
           <!--  出货趋势分析      -->
           <shippingTrendAnalysis ref="shippingTrendAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull"></shippingTrendAnalysis>
           <!--  近12月延期出货情况分析      -->
@@ -179,6 +179,11 @@ export default {
       this.$refs.orderType.$refs.departmentSalesperson.person = userName
       this.$refs.orderType.$refs.departmentSalesperson.deplist = this.deplist
       this.$refs.orderType.$refs.departmentSalesperson.personnelList = this.personnelList
+      /*订单产品类别占比分析*/
+      this.$refs.orderProductCategory.listData(dataid)
+      this.$refs.orderProductCategory.$refs.departmentSalesperson.person = userName
+      this.$refs.orderProductCategory.$refs.departmentSalesperson.deplist = this.deplist
+      this.$refs.orderProductCategory.$refs.departmentSalesperson.personnelList = this.personnelList
       /*出货趋势分析*/
       this.$refs.shippingTrendAnalysis.listData(dataid)
       this.$refs.shippingTrendAnalysis.$refs.departmentSalesperson.person = userName
@@ -278,6 +283,13 @@ export default {
       this.$refs.orderType.$refs.departmentSalesperson.deplist = this.deplist
       this.$refs.orderType.$refs.departmentSalesperson.person = type == '0'?dataid:''
       this.$refs.orderType.$refs.departmentSalesperson.personnelList = this.personnelList
+      /*订单产品类别占比分析*/
+      this.$refs.orderProductCategory.param.content.type = type
+      this.$refs.orderProductCategory.queryModel(dataid,isleave)
+      this.$refs.orderProductCategory.$refs.departmentSalesperson.depment = type == '1'?dataid:''
+      this.$refs.orderProductCategory.$refs.departmentSalesperson.deplist = this.deplist
+      this.$refs.orderProductCategory.$refs.departmentSalesperson.person = type == '0'?dataid:''
+      this.$refs.orderProductCategory.$refs.departmentSalesperson.personnelList = this.personnelList
       /*出货趋势分析*/
       this.$refs.shippingTrendAnalysis.param.content.type = type
       this.$refs.shippingTrendAnalysis.queryModel(dataid,isleave)

+ 447 - 9
src/views/salesData/modules/orderProductCategory.vue

@@ -1,22 +1,460 @@
 <template>
-  <div class="div-new-box-new">
-    <div class="content">
-      <div class="div-line"></div>
-      <div class="title"> 订单产品类别占比分析</div>
-    </div>
+  <div class="div-box-new-margin">
+    <div class="div-border-box" id="orderProductCategoryFull">
+      <div class="out">
+        <div>
+          <div class="div-line div-line-right"></div>
+          <div class="title" style="min-width: 220px;"> 订单产品类别占比分析</div>
+        </div>
+        <div class="in">
+          <div class="inline-16 mt-10">
+            <departmentSalesperson ref="departmentSalesperson" @depSelect="depSelect" @personSelect="personSelect" :isFull="isFull"></departmentSalesperson>
+          </div>
+          <div class="mt-10 inline-16">
+            <p class="search__label">状态:</p>
+            <el-select v-model="param.content.where.isleave" clearable style="margin-right:10px" size="small" placeholder="请选择状态" @change="queryModel(param.content.dataid,param.content.where.isleave)" :disabled="param.content.type == '0'">
+              <el-option label="在职" value="1"></el-option>
+              <el-option label="离职" value="2"></el-option>
+            </el-select>
+          </div>
+
+          <div class="mt-10 inline-16">
+            <p class="search__label">订单类型:</p>
+            <el-select v-model="param.content.where.type" clearable style="margin-right:10px" size="small" placeholder="请选择订单类型" @change="queryModel(param.content.dataid,param.content.where.type)" >
+              <el-option v-for="item in ordertypeList" :key="item.index" :label="item.value" :value="item.value"></el-option>
+            </el-select>
+          </div>
+          <div class="mt-10 inline-16">
+            <p class="search__label">领域:</p>
+            <el-select v-model="param.content.where.tradefield" clearable style="margin-right:10px" size="small" placeholder="请选择领域" @change="queryModel(param.content.dataid,param.content.where.tradefield)" >
+              <el-option v-for="item in tradefieldList" :key="item.index" :label="item.value" :value="item.value"></el-option>
+            </el-select>
+          </div>
+          <div class="mt-10 inline-16">
+            <p class="search__label">品牌:</p>
+            <el-select v-model="param.content.where.sa_brandid" clearable style="margin-right:10px" size="small" placeholder="请选择品牌" @change="queryModel(param.content.dataid,param.content.where.sa_brandid)" >
+              <el-option v-for="item in brandList" :key="item.rowindex" :label="item.brandname" :value="item.sa_brandid"></el-option>
+            </el-select>
+          </div>
+          <div class="mt-10 inline-16">
+            <p class="search__label">营销类别:</p>
+            <el-select v-model="param.content.itemclass" clearable style="margin-right:10px" size="small" placeholder="请选择营销类别" @change="queryModel(param.content.dataid,param.content.where.itemclass)" >
+              <el-option label="一级类别" value="一级类别"></el-option>
+              <el-option label="二级类别" value="二级类别"></el-option>
+            </el-select>
+          </div>
 
-    <div class="chart">
-      <!--      <div id="orderAnalysisChart" style="height: 300px;"></div>-->
+          <div class="inline-16 mt-10">
+            <el-button-group >
+              <el-button size="small" :type="type === '金额'?'primary':''" @click="changeType('金额')">金额</el-button>
+              <el-button size="small" :type="type === '数量'?'primary':''" @click="changeType('数量')">数量</el-button>
+            </el-button-group>
+          </div>
+          <div class="inline-16 mt-10">
+            <el-button-group >
+              <el-button size="small" :type="dateType === '全部'?'primary':''" @click="changeTypeDate('全部')">全部</el-button>
+              <el-button size="small" :type="dateType === '本年'?'primary':''" @click="changeTypeDate('本年')">本年</el-button>
+              <el-button size="small" :type="dateType === '本月'?'primary':''" @click="changeTypeDate('本月')">本月</el-button>
+            </el-button-group>
+          </div>
+          <div class="inline-16 mt-10">
+            <el-date-picker
+                v-model="monthDate"
+                type="monthrange"
+                :append-to-body="!isFull"
+                @change="changMonth"
+                :clearable="false"
+                format="yyyy-MM"
+                value-format="yyyy-MM"
+                size="small"
+                range-separator="至"
+                start-placeholder="开始月份"
+                end-placeholder="结束月份">
+            </el-date-picker>
+          </div>
+          <div class="inline-15 mt-10">
+            <exportFile  :param="param" :columns="tablecols" fileName="订单类型占比分析" :dataid="param.content.dataid"></exportFile>
+          </div>
+
+          <fullScreen  domId="orderProductCategoryFull" @onFull="onFull" @backFull="backFull"></fullScreen>
+        </div>
+      </div>
+      <div class="chart" style="height: 416px;align-items: center;">
+        <div id="orderProductCategoryChart" style="height: 400px;vertical-align: middle;line-height: 400px" :style="{height:heightChart,width:windowWidth < 1355?'48%':windowWidth<1533?'41%':windowWidth<1919?'35%':'42%',float:'left',marginTop:marginChart}"></div>
+        <div style="float: right;" :style="windowWidth<1355?'width:52%':windowWidth<1533?'width:59%':windowWidth<1919?'width:65%':'width:58%'">
+          <tableTemplate style="margin-top: 10px" ref="table" :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="heightTable" fixedName="operation">
+            <template v-slot:customcol="scope">
+              <p v-if="scope.column.columnname === 'operation'">
+              </p>
+              <p v-else-if="scope.column.columnname === 'qty'">
+                <span> {{scope.column.data[scope.column.columnname] == 0?0:scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</span>
+              </p>
+              <p v-else-if="scope.column.columnname === 'itemclassqty'">
+                <span> {{scope.column.data[scope.column.columnname] == 0?0:scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</span>
+              </p>
+              <p v-else-if="scope.column.columnname === 'amount'">
+                <span>¥{{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}</span>
+              </p>
+              <p v-else-if="scope.column.columnname === 'itemclassamount'">
+                <span>¥{{tool.formatAmount(scope.column.data[scope.column.columnname],2)}}</span>
+              </p>
+              <p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
+            </template>
+            <template v-slot:opreation="scope">
+              <el-button size="mini" type="text"  @click="goDetail(scope.data)" :disabled="isFull">详情</el-button>
+            </template>
+          </tableTemplate>
+          <div  class="container normal-panel" style="text-align:right;float: right">
+            <el-pagination
+                background
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="currentPage"
+                :pager-count="3"
+                :page-sizes="[20, 50,100, 200]"
+                :page-size="20"
+                layout="total,sizes, prev, pager, next, jumper"
+                :total="total">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
     </div>
+
   </div>
 </template>
 
 <script>
+import { Pie,G2,measureTextWidth } from '@antv/g2plot';
+import tableTemplate from '@/views/salesData/components/table';
+import fullScreen from "@/views/salesData/components/fullScreen";
+import exportFile from '@/components/export_file/index'
+import departmentSalesperson from "@/views/salesData/components/departmentSalesperson";
+const G = G2.getEngine('canvas');
 export default {
-  name: "orderProductCategory" //订单产品类别
+  name: "orderProductCategory", //订单产品类别
+  props:['dataid','scrollHeight','windowWidth'],
+  components:{tableTemplate,fullScreen,exportFile,departmentSalesperson},
+  data(){
+    return {
+      chartPie:null,
+      type:'金额',
+      dateType:'全部',
+      monthDate:[],
+      list:[],
+      tablecols:[],
+      currentPage:0,
+      total:0,
+      param:{
+        "id": 20240524160004,
+        "content": {
+          "type": 0,
+          "dataid": 54,
+          "dateType": "",// 本年 本月 日期筛选时为空
+          "dataType":"金额",//金额 数量
+          "itemclass":'一级类别',
+          "pageSize":20,
+          "pageNumber":1,
+          "where":{
+            "begdate":"",
+            "tradefield":"",
+            "enddate":"",
+            "type":"", //订单类型
+            "isleave":"",
+            "itemclassid":'',
+            "sa_brandid":''
+          }
+        }
+      },
+      chartData:[],
+      heightChart:'98%',
+      heightTable:'352px',
+      isFull:false,
+      ordertypeList:[],
+      tradefieldList:[],
+      brandList:[],
+      listqueryid:'',
+      pageTotal:0,
+      marginChart:0
+    }
+  },
+  methods:{
+    async listData(val){
+      this.param.content.dataid = val || this.dataid
+      this.param.content.dataType = this.type
+      this.param.content.dateType = this.dateType === '全部'?'':this.dateType
+      const res = await this.$api.requested(this.param)
+      if (res.data.length ===1){
+        if (res.data[0].isEmpty === 1){
+          this.list = []
+          this.total = 0
+          this.currentPage = 0
+        }else {
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.pageTotal = res.pageTotal
+          this.listqueryid = res.listqueryid
+          sessionStorage.setItem('total',res.total)
+        }
+      }else {
+        this.list = res.data
+        this.total = res.total
+        this.currentPage = res.pageNumber
+        this.pageTotal = res.pageTotal
+        this.listqueryid = res.listqueryid
+        sessionStorage.setItem('total',res.total)
+      }
+      if (this.type === '金额'){
+        this.totalamount = '¥'+this.tool.formatAmount(res.data[0].ratio[0].total/10000,2)+'万'
+      }else {
+        this.totalamount = res.data[0].ratio[0].total
+      }
+      this.chartData = res.data[0].ratio.map(item=>{
+        return {
+          "totalamount": this.totalamount,//值
+          "type": item.itemclassfullname,
+          "rowindex": item.rowindex,
+          "ratio": Math.round(((item.ratio * 100)*100)/100) //比例
+        }
+      })
+      this.renderPie(val)
+    },
+    async queryModel(val,type){
+      this.param.content.dataid = val || this.dataid
+     /* this.param.content.where.isleave = type*/
+      this.param.content.dataType = this.type
+      this.param.content.dateType = this.dateType === '全部'?'':this.dateType
+      const res = await this.$api.requested(this.param)
+      if (res.data.length === 1){
+        if (res.data[0].isEmpty === 1){
+          this.list = []
+          this.total = 0
+          this.currentPage = 0
+        }else {
+          this.list = res.data
+          this.total = res.total
+          this.currentPage = res.pageNumber
+          this.pageTotal = res.pageTotal
+          this.listqueryid = res.listqueryid
+          sessionStorage.setItem('total',res.total)
+        }
+      }else {
+        this.list = res.data
+        this.total = res.total
+        this.currentPage = res.pageNumber
+        this.pageTotal = res.pageTotal
+        this.listqueryid = res.listqueryid
+        sessionStorage.setItem('total',res.total)
+      }
+      if (this.type === '金额'){
+        this.totalamount = '¥'+this.tool.formatAmount(res.data[0].ratio[0].total/10000,2)+'万'
+      }else {
+        this.totalamount = res.data[0].ratio[0].total
+      }
+      this.chartData = res.data[0].ratio.map(item=>{
+        return {
+          "totalamount": this.totalamount,//值
+          "type": item.itemclassfullname,
+          "itemclassid":item.itemclassid,
+          "rowindex": item.rowindex,
+          "ratio": Math.round(((item.ratio * 100)*100)/100), //比例
+          "value":item.value
+        }
+      })
+      this.chartPie.changeData(this.chartData)
+    },
+    async queryTable(val,isleave){
+      this.param.content.dataid = val || this.dataid
+      this.param.content.where.isleave = isleave
+      this.param.content.dataType = this.type
+      this.param.content.dateType = this.dateType
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      this.pageTotal = res.pageTotal
+      this.listqueryid = res.listqueryid
+      sessionStorage.setItem('total',res.total)
+    },
+    renderPie(val){
+      this.chartPie = new Pie('orderProductCategoryChart',{
+        appendPadding: 10,
+        data:this.chartData,
+        angleField: 'ratio',
+        colorField: 'type',
+        radius: 1,
+        innerRadius: 0.6,
+        legend:{
+          position:'bottom',
+          style:{
+            marginLeft:'80px'
+          }
+
+        },
+        label:{
+          /*type: 'inner',
+          offset: '-50%',
+          style: {
+            textAlign: 'center',
+          },
+          autoRotate: false,*/
+          formatter: (datum) => `${datum.ratio}%`,
+        },
+        tooltip: {
+          formatter: (datum) => {
+            return { name: datum.type, value: datum.ratio + '%' };
+          },
+        },
+        interactions: [{ type: 'element-single-selected' },{ type: 'element-active' }],
+        statistic: {
+          title: {
+            offsetY: -4,
+            style: {
+              fontSize:'16px'
+            },
+            content: '总计'
+          },
+          content: {
+            offsetY: 4,
+            style: {
+              whiteSpace: 'pre-wrap',
+              overflow: 'hidden',
+              textOverflow: 'ellipsis',
+              fontSize:'16px'
+            },
+            customHtml: (container, view, datum, data) => {
+              const text = data[0].totalamount;
+              return text;
+            },
+          },
+        },
+      })
+      this.chartPie.on('plot:click',ev=>{
+        const states = this.chartPie.getStates()
+        this.param.content.where.itemclassid = states.length ===0 ? '':ev.data.data.itemclassid
+        this.param.content.pageNumber = 1
+        this.queryTable(this.param.content.dataid,this.param.content.where.isleave)
+      })
+      this.chartPie.render()
+      this.queryModel(val,this.param.content.where.isleave)
+    },
+    changeType(val){
+      this.type = val
+      this.queryModel(this.param.content.dataid,this.param.content.where.isleave)
+    },
+    /*切换年月*/
+    changeTypeDate(val){
+      this.param.content.where.begdate = ''
+      this.param.content.where.enddate = ''
+      if (val === '本年'){
+        this.monthDate = [new Date().getFullYear() + '-1',new Date().getFullYear() + '-12']
+      }else if (val === '本月'){
+        this.monthDate[0] = new Date().getFullYear() + '-' + (new Date().getMonth() + 1)
+        this.monthDate[1] = new Date().getFullYear() + '-' + (new Date().getMonth() + 1)
+        this.monthDate = [new Date().getFullYear() + '-' + (new Date().getMonth() + 1),new Date().getFullYear() + '-' + (new Date().getMonth() + 1)]
+      }else {
+        this.monthDate[0] = ''
+        this.monthDate[1] = ''
+        this.monthDate = []
+      }
+      this.dateType = val
+      this.queryModel(this.param.content.dataid,this.param.content.where.isleave)
+    },
+    changMonth(){
+      this.dateType = ''
+      this.param.content.where.begdate = this.monthDate[0]
+      this.param.content.where.enddate = this.monthDate[1]
+      this.queryModel(this.param.content.dataid,this.param.content.where.isleave)
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.queryTable(this.param.content.dataid,this.param.content.where.isleave)
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.queryTable(this.param.content.dataid,this.param.content.where.isleave)
+    },
+    goDetail(data){
+      setTimeout(() => {
+        this.$store.dispatch('changeDetailDrawer',true)
+        let route = this.$route
+        if (route.path !== '/orderdetail') {
+          this.oldRoute = {path:route.path,query:route.query}
+          this.$store.dispatch('setHistoryRouter',this.oldRoute)
+        }
+        sessionStorage.setItem('listqueryid',this.listqueryid)
+        sessionStorage.setItem('isGo','1')
+        this.$router.push({
+          path:'/orderdetail',
+          query:{
+            id:data.sa_orderid,
+            rowindex:data.rowindex,
+            listqueryid:this.listqueryid,
+            fieldname:'sa_orderid',
+            portrait:''
+          }
+        })
+        this.$store.dispatch('saveListData',{listData:this.list,param:this.param,pageTotal:this.pageTotal})
+      })
+    },
+    /*全屏*/
+    onFull(){
+      this.heightChart = 'calc(100vh - 585px)'
+      this.heightTable ='calc(100vh - 165px)'
+      this.marginChart = 'calc(20vh)'
+      this.isFull = true
+    },
+    /*退出全屏*/
+    backFull(val){
+      this.heightChart = '98%'
+      this.heightTable = '352px'
+      this.marginChart = 0
+      this.isFull = false
+      this.$emit('backFull',val)
+    },
+    /*选择部门*/
+    depSelect(val){
+      this.param.content.type = 1
+      this.param.content.dataid = val
+      this.queryModel(val,this.param.content.where.isleave,this.param.content.where.isleave)
+    },
+    /*选择业务员*/
+    personSelect(val){
+      this.param.content.where.isleave = ''
+      this.param.content.type = 0
+      this.param.content.dataid = val
+      this.queryModel(val,this.param.content.where.isleave,this.param.content.where.isleave)
+    },
+
+  },
+  async mounted() {
+    /*获取领域*/
+    const res = await this.$store.dispatch('optiontypeselect','tradefield')
+    /*获取订单类型*/
+    const res1 = await this.$store.dispatch('optiontypeselect','ordertype')
+    this.tradefieldList = res.data
+    console.log(this.tradefieldList,'领域')
+    this.ordertypeList = res1.data
+    console.log(this.ordertypeList,'订单类型')
+    /*获取品牌*/
+    let param = {
+      "id": 20240527112804,
+      "content": {
+      }
+    }
+    const res2 = await this.$api.requested(param)
+    this.brandList = res2.data
+    console.log(this.brandList,'品牌')
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).orderProductCategoryTable.tablecols
+  }
 }
 </script>
 
-<style scoped>
 
+<style scoped>
 </style>

+ 13 - 4
src/views/salesData/modules/orderType.vue

@@ -53,7 +53,7 @@
         </div>
       </div>
       <div class="chart" style="height: 416px">
-        <div id="orderTypeChart" style="height: 400px;" :style="{height:heightChart,width:windowWidth < 1505?'54%':windowWidth<1805?'54%':windowWidth<2500?'45%':'42%',float:'left'}"></div>
+        <div id="orderTypeChart" style="height: 400px;" :style="{height:heightChart,width:windowWidth < 1505?'54%':windowWidth<1805?'54%':windowWidth<2500?'45%':'42%',float:'left',marginTop:marginChart}"></div>
         <div style="float: right;" :style="windowWidth<1505?'width:46%':windowWidth<1805?'width:46%':windowWidth<2500?'width:55%':'width:58%'">
           <tableTemplate style="margin-top: 10px" ref="table" :layout="tablecols" :data="list" :opwidth="200" :custom="true" :height="heightTable" fixedName="operation">
             <template v-slot:customcol="scope">
@@ -133,7 +133,9 @@ export default {
       heightChart:'98%',
       heightTable:'352px',
       isFull:false,
-      listqueryid:''
+      listqueryid:'',
+      pageTotal:0,
+      marginChart:0
     }
   },
   methods:{
@@ -151,6 +153,7 @@ export default {
           this.list = res.data
           this.total = res.total
           this.currentPage = res.pageNumber
+          this.pageTotal = res.pageTotal
           this.listqueryid = res.listqueryid
           sessionStorage.setItem('total',res.total)
         }
@@ -158,6 +161,7 @@ export default {
         this.list = res.data
         this.total = res.total
         this.currentPage = res.pageNumber
+        this.pageTotal = res.pageTotal
         this.listqueryid = res.listqueryid
         sessionStorage.setItem('total',res.total)
       }
@@ -192,6 +196,7 @@ export default {
           this.list = res.data
           this.total = res.total
           this.currentPage = res.pageNumber
+          this.pageTotal = res.pageTotal
           this.listqueryid = res.listqueryid
           sessionStorage.setItem('total',res.total)
         }
@@ -199,6 +204,7 @@ export default {
         this.list = res.data
         this.total = res.total
         this.currentPage = res.pageNumber
+        this.pageTotal = res.pageTotal
         this.listqueryid = res.listqueryid
         sessionStorage.setItem('total',res.total)
       }
@@ -227,6 +233,7 @@ export default {
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      this.pageTotal = res.pageTotal
       this.listqueryid = res.listqueryid
       sessionStorage.setItem('total',res.total)
     },
@@ -350,19 +357,21 @@ export default {
             portrait:''
           }
         })
-        this.$store.dispatch('saveListData',{listData:this.list,param:this.params,pageTotal:this.pageTotal})
+        this.$store.dispatch('saveListData',{listData:this.list,param:this.param,pageTotal:this.pageTotal})
       })
     },
     /*全屏*/
     onFull(){
-      this.heightChart = 'calc(100vh - 85px)'
+      this.heightChart = 'calc(100vh - 585px)'
       this.heightTable ='calc(100vh - 125px)'
+      this.marginChart = 'calc(20vh)'
       this.isFull = true
     },
     /*退出全屏*/
     backFull(val){
       this.heightChart = '98%'
       this.heightTable = '352px'
+      this.marginChart = 0
       this.isFull = false
       this.$emit('backFull',val)
     },