| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501 |
- <template>
- <div style="background: #f8f8f8;">
- <normalLayout>
- <template #refresh>
- <el-button size="mini" type="text" style="margin-right: 15px;color: #3874f6;font-size: 14px" @click="toTop">{{ $t('返回顶部') }}</el-button>
- <!-- <i class="el-icon-refresh-right"></i>-->
- </template>
- <template #content>
- <div style="overflow: auto;height: calc(100vh - 220px);" ref="rollRef" @scroll="handleScroll">
- <div style="margin: 10px 24px 10px 24px;" >
- <div class="inline-16">
- <label class="search__label" >{{$t('部门')}}:</label>
- <el-cascader ref="selectdep" size="small" v-model="depment" :options="deplist" :props="{emitPath:true,expandTrigger:'hover',checkStrictly:true,label:'label',value:'departmentid',children:'children'}" @change="selectDep" clearable ></el-cascader>
- </div>
- <div class="inline-16">
- <label class="search__label" >{{$t('业务员')}}:</label>
- <el-select v-model="person" filterable :placeholder="$t('请选择')" size="small" @change="selectPerson">
- <el-option
- v-for="item in personnelList"
- :key="item.index"
- :label="$t(item.name)"
- :value="item.userid">
- </el-option>
- </el-select>
- </div>
- <div class="mt-10 inline-16">
- <p class="search__label">{{$t('状态')}}:</p>
- <el-select v-model="isleave" clearable style="margin-right:10px" size="small" :placeholder="$t('请选择状态')" @change="leaveChange" >
- <el-option :label="$t('在职')" value="1"></el-option>
- <el-option :label="$t('离职')" value="2"></el-option>
- </el-select>
- </div>
- </div>
- <!-- 数字看板 -->
- <digitalSigns ref="digitalSigns" :windowWidth="windowWidth" :depment="depment" :person="person" ></digitalSigns>
- <!-- 客户账户余额分析 -->
- <customerAccountBalanceAnalysis ref="customerAccountBalanceAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull" ></customerAccountBalanceAnalysis>
- <!-- 客户业务员销售 -->
- <div class="div-box-new-margin" >
- <div class="div-border-box">
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="客户销售TOP10" name="客户销售">
- <customerSales :dataid="departmentid" ref="customer"></customerSales>
- </el-tab-pane>
- <el-tab-pane label="业务员销售TOP10" name="业务员销售">
- <salespersonSales :dataid="departmentid" ref="salesperson"></salespersonSales>
- </el-tab-pane>
- </el-tabs>
- </div>
- </div>
- <!-- 报价分析 -->
- <quotationAnalysis ref="quotationAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull"></quotationAnalysis>
- <!-- 订单趋势分析 -->
- <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" :scrollHeight="scrollData" :windowWidth="windowWidth" @backFull="backFull"></orderProductCategory>
- <!-- 出货趋势分析 -->
- <shippingTrendAnalysis ref="shippingTrendAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull"></shippingTrendAnalysis>
- <!-- 近12月延期出货情况分析 -->
- <delayedShipmentAnalysis ref="delayedShipmentAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull"></delayedShipmentAnalysis>
- <!-- 未出货已延期情况分析 -->
- <unshippedExtensionAnalysis ref="unshippedExtensionAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull"></unshippedExtensionAnalysis>
- <!-- 开票金额趋势分析 -->
- <invoiceAmountAnalysis ref="invoiceAmountAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull"></invoiceAmountAnalysis>
- <!-- 近12月出货未开票金额趋势分析 -->
- <uninvoiceAmountAnalysis ref="uninvoiceAmountAnalysis" :dataid="departmentid" :windowWidth="windowWidth" :scrollHeight="scrollData" @backFull="backFull"></uninvoiceAmountAnalysis>
- <!-- 出货未开票分析 -->
- <shippingUninvoiceAnalysis ref="shippingUninvoiceAnalysis" :scrollHeight="scrollData" :windowWidth="windowWidth" @backFull="backFull"></shippingUninvoiceAnalysis>
- <!-- 财务回款分析 -->
- <financialCollectionAnalysis ref="financialCollectionAnalysis" :scrollHeight="scrollData" :windowWidth="windowWidth" @backFull="backFull"></financialCollectionAnalysis>
- </div>
- </template>
- </normalLayout>
- </div>
- </template>
- <script>
- import digitalSigns from "@/views/salesData/modules/digitalSigns";
- import customerSales from "@/views/salesData/modules/customerSales";
- import salespersonSales from "@/views/salesData/modules/salespersonSales";
- import quotationAnalysis from "@/views/salesData/modules/quotationAnalysis";
- import orderTrendAnalysis from "@/views/salesData/modules/orderTrendAnalysis";
- import orderType from "@/views/salesData/modules/orderType";
- import orderProductCategory from "@/views/salesData/modules/orderProductCategory";
- import shippingTrendAnalysis from "@/views/salesData/modules/shippingTrendAnalysis";
- import delayedShipmentAnalysis from "@/views/salesData/modules/delayedShipmentAnalysis";
- import invoiceAmountAnalysis from "@/views/salesData/modules/invoiceAmountAnalysis";
- import uninvoiceAmountAnalysis from "@/views/salesData/modules/uninvoiceAmountAnalysis";
- import shippingUninvoiceAnalysis from "@/views/salesData/modules/shippingUninvoiceAnalysis";
- import financialCollectionAnalysis from "@/views/salesData/modules/financialCollectionAnalysis";
- import customerAccountBalanceAnalysis from "@/views/salesData/modules/customerAccountBalanceAnalysis";
- import unshippedExtensionAnalysis from './modules/unshippedExtensionAnalysis'
- import normalLayout from '@/components/normal-basic-layout/normalNew'
- export default {
- name: "index",
- components:{normalLayout,digitalSigns,customerSales,salespersonSales,quotationAnalysis,orderTrendAnalysis,orderType,orderProductCategory,
- shippingTrendAnalysis,delayedShipmentAnalysis,invoiceAmountAnalysis,uninvoiceAmountAnalysis,shippingUninvoiceAnalysis,
- financialCollectionAnalysis,customerAccountBalanceAnalysis,unshippedExtensionAnalysis
- },
- data(){
- return {
- depment:'',
- person:'',
- departmentid:'',
- isleave:'1',
- deplist:[],
- personnelList:[],
- activeName: '客户销售',
- depmentParam:{
- "id": 20230620102004,
- "content": {
- "isleave":'1'
- }
- },
- windowWidth: document.documentElement.clientWidth, //实时屏幕宽度
- scrollData:''
- }
- },
- methods:{
- async departmentrtment() {
- const res = await this.$api.requested(this.depmentParam)
- this.deplist = this.createMenu(res.data.dep)
- this.personnelList = res.data.hr
- this.person = JSON.parse(window.sessionStorage.getItem('active_account')).name
- this.depment = ''
- this.departmentid = ''
- const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
- this.otherMethod(userid)
- },
- /*其他页面调用*/
- otherMethod(dataid){
- const userName = JSON.parse(sessionStorage.getItem('active_account')).name
- /*数字看板*/
- this.$refs.digitalSigns.$refs.order.param.content.dataid = dataid
- this.$refs.digitalSigns.$refs.order.param.content.type = 0
- this.$refs.digitalSigns.$refs.order.listData()
- this.$refs.digitalSigns.$refs.shipment.param.content.dataid = dataid
- this.$refs.digitalSigns.$refs.shipment.param.content.type = 0
- this.$refs.digitalSigns.$refs.shipment.listData()
- this.$refs.digitalSigns.$refs.invoicing.param.content.dataid = dataid
- this.$refs.digitalSigns.$refs.invoicing.param.content.type = 0
- this.$refs.digitalSigns.$refs.invoicing.listData()
- this.$refs.digitalSigns.$refs.returned.param.content.dataid = dataid
- this.$refs.digitalSigns.$refs.returned.param.content.type = 0
- this.$refs.digitalSigns.$refs.returned.listData()
- /*账户余额分析*/
- /*this.$refs.customerAccountBalanceAnalysis.$refs.departmentSalesperson.depment = dataid*/
- this.$refs.customerAccountBalanceAnalysis.person = userName
- this.$refs.customerAccountBalanceAnalysis.deplist = this.deplist
- this.$refs.customerAccountBalanceAnalysis.personnelList = this.personnelList
- this.$refs.customerAccountBalanceAnalysis.listData(dataid)
- /*客户销售*/
- this.$refs.customer.param.content.dataid = dataid
- this.$refs.salesperson.param.content.dataid = dataid
- this.$refs.customer.$refs.sales.$refs.departmentSalesperson.person = userName
- this.$refs.customer.$refs.sales.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.customer.$refs.sales.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.salesperson.$refs.sales.$refs.departmentSalesperson.person = userName
- this.$refs.salesperson.$refs.sales.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.salesperson.$refs.sales.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.customer.listData(dataid,'1')
- this.$refs.salesperson.listData(dataid,'1')
- this.activeName = '客户销售'
- /*报价分析*/
- this.$refs.quotationAnalysis.listData(dataid,'1')
- this.$refs.quotationAnalysis.queryQuotation(dataid,'1')
- /*this.$refs.quotationAnalysis.$refs.departmentSalesperson.depment = dataid*/
- this.$refs.quotationAnalysis.$refs.departmentSalesperson.person = userName
- this.$refs.quotationAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.quotationAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*订单趋势分析*/
- this.$refs.orderTrendAnalysis.listData(dataid,'1')
- /*this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.depment = dataid*/
- this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.person = userName
- this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*订单类型占比分析*/
- this.$refs.orderType.listData(dataid)
- 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
- this.$refs.shippingTrendAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.shippingTrendAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*近12月延期出货情况分析*/
- this.$refs.delayedShipmentAnalysis.listData(dataid)
- this.$refs.delayedShipmentAnalysis.$refs.departmentSalesperson.person = userName
- this.$refs.delayedShipmentAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.delayedShipmentAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*未出货已延期情况分析*/
- this.$refs.unshippedExtensionAnalysis.listData(dataid)
- this.$refs.unshippedExtensionAnalysis.$refs.departmentSalesperson.person = userName
- this.$refs.unshippedExtensionAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.unshippedExtensionAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*开票金额趋势分析*/
- this.$refs.invoiceAmountAnalysis.listData(dataid)
- this.$refs.invoiceAmountAnalysis.$refs.departmentSalesperson.person = userName
- this.$refs.invoiceAmountAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.invoiceAmountAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*近12月出货未开票金额趋势分析*/
- this.$refs.uninvoiceAmountAnalysis.listData(dataid)
- this.$refs.uninvoiceAmountAnalysis.$refs.departmentSalesperson.person = userName
- this.$refs.uninvoiceAmountAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.uninvoiceAmountAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*出货未开票分析*/
- this.$refs.shippingUninvoiceAnalysis.listData(dataid)
- this.$refs.shippingUninvoiceAnalysis.$refs.departmentSalesperson.person = userName
- this.$refs.shippingUninvoiceAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.shippingUninvoiceAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*财务回款分析 */
- this.$refs.financialCollectionAnalysis.listData(dataid)
- this.$refs.financialCollectionAnalysis.$refs.departmentSalesperson.person = userName
- this.$refs.financialCollectionAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.financialCollectionAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- },
- /*其他页面调用*/
- otherModel(dataid,type,isleave,leave){
- /*数字看板*/
- this.$refs.digitalSigns.$refs.order.param.content.type = type
- this.$refs.digitalSigns.$refs.order.param.content.dataid = dataid
- this.$refs.digitalSigns.$refs.order.param.content.where.isleave = isleave
- this.$refs.digitalSigns.$refs.order.listData()
- this.$refs.digitalSigns.$refs.shipment.param.content.type = type
- this.$refs.digitalSigns.$refs.shipment.param.content.dataid = dataid
- this.$refs.digitalSigns.$refs.shipment.param.content.where.isleave = isleave
- this.$refs.digitalSigns.$refs.shipment.listData()
- this.$refs.digitalSigns.$refs.invoicing.param.content.type = type
- this.$refs.digitalSigns.$refs.invoicing.param.content.dataid = dataid
- this.$refs.digitalSigns.$refs.invoicing.param.content.where.isleave = isleave
- this.$refs.digitalSigns.$refs.invoicing.listData()
- this.$refs.digitalSigns.$refs.returned.param.content.type = type
- this.$refs.digitalSigns.$refs.returned.param.content.dataid = dataid
- this.$refs.digitalSigns.$refs.returned.param.content.where.isleave = isleave
- this.$refs.digitalSigns.$refs.returned.listData()
- /*账户余额分析*/
- this.$refs.customerAccountBalanceAnalysis.param.content.type = type
- this.$refs.customerAccountBalanceAnalysis.queryModel(dataid,isleave)
- this.$refs.customerAccountBalanceAnalysis.depment = type == '1'?dataid:''
- this.$refs.customerAccountBalanceAnalysis.person = leave?'':type == '0'?dataid:''
- this.$refs.customerAccountBalanceAnalysis.deplist = this.deplist
- this.$refs.customerAccountBalanceAnalysis.personnelList = this.personnelList
- /*客户销售*/
- this.$refs.customer.param.content.dataid = dataid
- this.$refs.customer.param.content.type = type
- this.$refs.customer.param.content.pageNumber = 1
- this.$refs.customer.param.content.pageSize = 10
- this.$refs.customer.$refs.sales.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.customer.$refs.sales.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.customer.$refs.sales.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.customer.$refs.sales.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.customer.listData(dataid,isleave)
- this.$refs.salesperson.param.content.dataid = dataid
- this.$refs.salesperson.param.content.type = type
- this.$refs.salesperson.param.content.pageNumber = 1
- this.$refs.salesperson.param.content.pageSize = 10
- this.$refs.salesperson.$refs.sales.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.salesperson.$refs.sales.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.salesperson.$refs.sales.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.salesperson.$refs.sales.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.salesperson.listData(dataid,isleave)
- /*报价分析*/
- this.$refs.quotationAnalysis.param.content.type = type
- this.$refs.quotationAnalysis.plotParam.content.type = type
- this.$refs.quotationAnalysis.listData(dataid,isleave)
- this.$refs.quotationAnalysis.queryQuotationModel(dataid,isleave)
- this.$refs.quotationAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.quotationAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.quotationAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.quotationAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*订单趋势分析*/
- this.$refs.orderTrendAnalysis.param.content.type = type
- this.$refs.orderTrendAnalysis.queryModel(dataid,isleave)
- this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*订单类型占比分析*/
- this.$refs.orderType.param.content.type = type
- this.$refs.orderType.queryModel(dataid,isleave)
- this.$refs.orderType.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.orderType.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.orderType.$refs.departmentSalesperson.person = leave?'':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 = leave?'':type == '0'?dataid:''
- this.$refs.orderProductCategory.$refs.departmentSalesperson.personnelList = this.personnelList
- /*出货趋势分析*/
- this.$refs.shippingTrendAnalysis.param.content.type = type
- this.$refs.shippingTrendAnalysis.queryModel(dataid,isleave)
- this.$refs.shippingTrendAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.shippingTrendAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.shippingTrendAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.shippingTrendAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*近12月延期出货情况分析*/
- this.$refs.delayedShipmentAnalysis.param.content.type = type
- this.$refs.delayedShipmentAnalysis.queryModel(dataid,isleave)
- this.$refs.delayedShipmentAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.delayedShipmentAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.delayedShipmentAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.delayedShipmentAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*未出货已延期情况分析*/
- this.$refs.unshippedExtensionAnalysis.param.content.type = type
- this.$refs.unshippedExtensionAnalysis.queryModel(dataid,isleave)
- this.$refs.unshippedExtensionAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.unshippedExtensionAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.unshippedExtensionAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.unshippedExtensionAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*开票金额趋势分析*/
- this.$refs.invoiceAmountAnalysis.param.content.type = type
- this.$refs.invoiceAmountAnalysis.queryModel(dataid,isleave)
- this.$refs.invoiceAmountAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.invoiceAmountAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.invoiceAmountAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.invoiceAmountAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*近12月出货未开票金额趋势分析*/
- this.$refs.uninvoiceAmountAnalysis.param.content.type = type
- this.$refs.uninvoiceAmountAnalysis.queryModel(dataid,isleave)
- this.$refs.uninvoiceAmountAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.uninvoiceAmountAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.uninvoiceAmountAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.uninvoiceAmountAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*出货未开票分析*/
- this.$refs.shippingUninvoiceAnalysis.param.content.type = type
- this.$refs.shippingUninvoiceAnalysis.queryModel(dataid,isleave)
- this.$refs.shippingUninvoiceAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.shippingUninvoiceAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.shippingUninvoiceAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.shippingUninvoiceAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- /*财务回款分析 */
- this.$refs.financialCollectionAnalysis.param.content.type = type
- this.$refs.financialCollectionAnalysis.tableParam.content.type = type
- this.$refs.financialCollectionAnalysis.queryModel(dataid,isleave)
- this.$refs.financialCollectionAnalysis.tableData(dataid,isleave)
- this.$refs.financialCollectionAnalysis.$refs.departmentSalesperson.depment = type == '1'?dataid:''
- this.$refs.financialCollectionAnalysis.$refs.departmentSalesperson.deplist = this.deplist
- this.$refs.financialCollectionAnalysis.$refs.departmentSalesperson.person = leave?'':type == '0'?dataid:''
- this.$refs.financialCollectionAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- },
- createMenu (array) {
- var that = this
- let arr = []
- function convertToElementTree(node) {
- // 新节点
- if (node.subdep.length === 0){
- var elNode = {
- label: node["depname"],
- parentid:node['parentid'],
- parentname:node['parentname'],
- departmentid:node["departmentid"],
- value:node["departmentid"],
- remarks:node["remarks"],
- isused:node["isused"],
- changedate:node['changedate'],
- changeby:node['changeby'],
- createdate:node['createdate'],
- createby:node['createby'],
- depno:node['depno'],
- disabled:that.pageOnlyRead,
- }
- }else {
- var elNode = {
- label: node["depname"],
- parentid:node['parentid'],
- parentname:node['parentname'],
- departmentid:node["departmentid"],
- value:node["departmentid"],
- remarks:node["remarks"],
- isused:node["isused"],
- changedate:node['changedate'],
- changeby:node['changeby'],
- createdate:node['createdate'],
- createby:node['createby'],
- depno:node['depno'],
- disabled:that.pageOnlyRead,
- children: []
- }
- }
- if (node.subdep && node.subdep.length > 0) {
- // 如果存在子节点
- for (var index = 0; index < node.subdep.length; index++) {
- // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
- elNode.children.push(convertToElementTree(node.subdep[index]));
- }
- }
- return elNode;
- }
- array.forEach((element) => {
- arr.push(convertToElementTree(element))
- });
- return arr
- },
- selectDep(val) {
- if (val.length === 0){
- const userid = JSON.parse(sessionStorage.getItem('active_account')).userid
- this.otherModel(userid,'0')
- }else {
- this.person = ''
- this.dataid = ''
- this.departmentid = val[val.length -1]
- this.otherModel(this.departmentid,'1',this.isleave)
- }
- },
- selectPerson(val){
- this.depment = ''
- this.departmentid = ''
- this.dataid = val
- this.otherModel(val,'0',this.isleave)
- },
- leaveChange(){
- const type = this.depment?'1':'0'
- this.person = ''
- const dataid = type == '0'?-1:this.departmentid
- this.otherModel(dataid,type,this.isleave,'状态')
- this.personData()
- },
- /*获取新的业务员列表*/
- async personData(){
- let param = {
- id: 20230620102004,
- content: {
- isleave:this.isleave
- },
- }
- const res = await this.$api.requested(param)
- this.personnelList = res.data.hr
- this.$refs.customerAccountBalanceAnalysis.personnelList = this.personnelList
- this.$refs.customer.$refs.sales.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.salesperson.$refs.sales.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.quotationAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.orderTrendAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.orderType.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.orderProductCategory.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.shippingTrendAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.delayedShipmentAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.invoiceAmountAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.uninvoiceAmountAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.shippingUninvoiceAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- this.$refs.financialCollectionAnalysis.$refs.departmentSalesperson.personnelList = this.personnelList
- },
- handleClick(tab, event) {
- console.log(this.activeName);
- if (this.activeName === '客户销售'){
- this.$refs.customer.listData(this.$refs.customer.param.content.dataid,this.$refs.customer.param.content.where.isleave)
- }else {
- this.$refs.salesperson.listData(this.$refs.salesperson.param.content.dataid,this.$refs.customer.param.content.where.isleave)
- }
- },
- /*返回顶部*/
- toTop() {
- this.$refs.rollRef.scrollTop = 0
- },
- backFull(val){
- if (val){
- this.$refs.rollRef.scrollTop = val
- }
- },
- handleScroll(){
- this.scrollData = this.$refs.rollRef.scrollTop
- }
- },
- watch: {
- windowWidth (val) {
- console.log("实时屏幕宽度:",val );
- }
- },
- mounted() {
- this.departmentrtment()
- var that = this;
- // <!--把window.onresize事件挂在到mounted函数上-->
- window.onresize = () => {
- return (() => {
- window.fullWidth = document.documentElement.clientWidth;
- that.windowWidth = window.fullWidth; // 宽
- })()
- };
- },
- }
- </script>
- <style scoped>
- </style>
|