1 物料产品库存统计表,产品大类下拉选择,数据不显示问题2销售日报表,默认显示当月和上月,其他默认不显示,用户自己勾选显示。2综合销售情况表,客户名称添加下钻。
This commit is contained in:
@@ -86,6 +86,12 @@
|
|||||||
<span v-if="reportCode=='ZHXSQK'" @click="openSaleDetail(scope.row)" style="color: rgb(64, 158, 255);cursor: pointer;">{{scope.row.stdGoodsName}}</span>
|
<span v-if="reportCode=='ZHXSQK'" @click="openSaleDetail(scope.row)" style="color: rgb(64, 158, 255);cursor: pointer;">{{scope.row.stdGoodsName}}</span>
|
||||||
<span v-else> {{scope.row.stdGoodsName}}</span>
|
<span v-else> {{scope.row.stdGoodsName}}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #customName=scope>
|
||||||
|
|
||||||
|
<span v-if="reportCode=='ZHXSQK'" @click="openSaleDetail(scope.row)" style="color: rgb(64, 158, 255);cursor: pointer;">{{scope.row.customName}}</span>
|
||||||
|
<span v-else> {{scope.row.customName}}</span>
|
||||||
|
</template>
|
||||||
<template v-if="reportCode=='ZHXSQK'" #zoneName=scope>
|
<template v-if="reportCode=='ZHXSQK'" #zoneName=scope>
|
||||||
<span @click="openSaleDetail(scope.row)" style="color: rgb(64, 158, 255);cursor: pointer;">{{scope.row.zoneName}}</span>
|
<span @click="openSaleDetail(scope.row)" style="color: rgb(64, 158, 255);cursor: pointer;">{{scope.row.zoneName}}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -148,7 +154,8 @@
|
|||||||
:column="scope.column"
|
:column="scope.column"
|
||||||
></InputTimeRange>
|
></InputTimeRange>
|
||||||
</template>
|
</template>
|
||||||
<template #header v-if="Object.keys(dimensionFields)?.length">
|
<template #header v-if="Object.keys(dimensionFields)?.length||reportCode=='zhxs-hz'">
|
||||||
|
<div v-if="Object.keys(dimensionFields)?.length">
|
||||||
<div style="display:flex;padding-top:10px;margin-bottom:10px;border-top:1px solid #eee;align-items:center;">
|
<div style="display:flex;padding-top:10px;margin-bottom:10px;border-top:1px solid #eee;align-items:center;">
|
||||||
<span style="margin-right:10px;">维度:</span>
|
<span style="margin-right:10px;">维度:</span>
|
||||||
<el-checkbox-group
|
<el-checkbox-group
|
||||||
@@ -163,7 +170,23 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display:flex;align-items:center;" v-if="reportCode=='zhxs-hz'">
|
||||||
|
<span style="margin-right:10px;">月份:</span>
|
||||||
|
<el-checkbox-group
|
||||||
|
@change="changeMonths" v-model="showMonths"
|
||||||
|
placeholder="请选择内容">
|
||||||
|
<template v-for="(item,key) in zhxsMonths" :key="key">
|
||||||
|
<el-checkbox
|
||||||
|
:value="item.value"
|
||||||
|
:label="item.label">
|
||||||
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="h-200px" v-loading="!isInit"></div>
|
<div v-else class="h-200px" v-loading="!isInit"></div>
|
||||||
@@ -222,6 +245,16 @@ const newProps=ref<any>({
|
|||||||
'samoney_yoy':'lastYearSaMoney',
|
'samoney_yoy':'lastYearSaMoney',
|
||||||
'profit_yoy':'lastYearProfit'
|
'profit_yoy':'lastYearProfit'
|
||||||
})
|
})
|
||||||
|
const showMonths=ref<any>([])
|
||||||
|
const changeMonths=(val:any)=>{
|
||||||
|
zhxsMonths.value.forEach((item:any)=>{
|
||||||
|
tableOption.value.column[item.value].hide=true
|
||||||
|
})
|
||||||
|
showMonths.value.forEach((item:any)=>{
|
||||||
|
tableOption.value.column[item].hide=false
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
const tableSaleInfo=ref<any>([])
|
const tableSaleInfo=ref<any>([])
|
||||||
const tableSaleSearch=ref<any>({})
|
const tableSaleSearch=ref<any>({})
|
||||||
const tableSalePage = ref<any>({ currentPage: 1, pageSize: 20, total: 0 })
|
const tableSalePage = ref<any>({ currentPage: 1, pageSize: 20, total: 0 })
|
||||||
@@ -231,6 +264,7 @@ const route = useRoute()
|
|||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { mergeLocaleMessage, t } = useI18n() // 国际化
|
const { mergeLocaleMessage, t } = useI18n() // 国际化
|
||||||
const defualtSearch=ref<any>({})
|
const defualtSearch=ref<any>({})
|
||||||
|
const zhxsMonths=ref<any>([])
|
||||||
const transferFields={
|
const transferFields={
|
||||||
'zoneName':'salezonename',
|
'zoneName':'salezonename',
|
||||||
'saleTypeName':'saletypename',
|
'saleTypeName':'saletypename',
|
||||||
@@ -239,7 +273,8 @@ const transferFields={
|
|||||||
'customName':'customname',
|
'customName':'customname',
|
||||||
'dosageName':'dosagename',
|
'dosageName':'dosagename',
|
||||||
'stdGoodsName':'stdGoodsIdName',
|
'stdGoodsName':'stdGoodsIdName',
|
||||||
'effectName':'effectname'
|
'effectName':'effectname',
|
||||||
|
'classname':'goodsclassname'
|
||||||
}
|
}
|
||||||
const loading = ref(false) // 列表的加载中
|
const loading = ref(false) // 列表的加载中
|
||||||
const isInit = ref(false)
|
const isInit = ref(false)
|
||||||
@@ -504,7 +539,7 @@ const summaryMethod1=({columns,data})=>{
|
|||||||
let styleObj={}
|
let styleObj={}
|
||||||
dictFieldList.value.forEach(item=>{
|
dictFieldList.value.forEach(item=>{
|
||||||
if(row[item.prop]){
|
if(row[item.prop]){
|
||||||
styleObj['color']=item.dicData.find(d=>d.value===row[item.prop]).cssClass
|
styleObj['color']=item.dicData.find(d=>d.value===row[item.prop])?.cssClass
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return styleObj
|
return styleObj
|
||||||
@@ -643,7 +678,12 @@ const initTable = async () => {
|
|||||||
if(props.reportCode=='zhxs-hz'&&item.fieldName=='板块'){
|
if(props.reportCode=='zhxs-hz'&&item.fieldName=='板块'){
|
||||||
config.overHidden=false
|
config.overHidden=false
|
||||||
}
|
}
|
||||||
|
if(props.reportCode=='zhxs-hz'&&config.label.includes('月(万)')){
|
||||||
|
let month=(new Date().getMonth() + 1)+'',lastMonth=(new Date().getMonth() + 1)-1+''
|
||||||
|
if(config.label.includes(month)||config.label.includes(lastMonth)){
|
||||||
|
showMonths.value.push(config.prop)
|
||||||
|
}
|
||||||
|
}
|
||||||
if(['年','年度','年份','月','月度','月份','年月'].includes(item.fieldName)&&config.search){
|
if(['年','年度','年份','月','月度','月份','年月'].includes(item.fieldName)&&config.search){
|
||||||
config.searchSpan=3
|
config.searchSpan=3
|
||||||
if(item.fieldName.includes('年')){
|
if(item.fieldName.includes('年')){
|
||||||
@@ -705,7 +745,8 @@ const initTable = async () => {
|
|||||||
'业务员':'ywyxx',
|
'业务员':'ywyxx',
|
||||||
'业务区域':'ywqy',
|
'业务区域':'ywqy',
|
||||||
'标准品名':'bzpm',
|
'标准品名':'bzpm',
|
||||||
'疗效分类':'effect'
|
'疗效分类':'effect',
|
||||||
|
'产品大类':'cpdl'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1097,6 +1138,11 @@ const getTableData = async (isLoading = true) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
item.hide=hides.includes(item.prop)||hideColumns.value.includes(item.prop)
|
item.hide=hides.includes(item.prop)||hideColumns.value.includes(item.prop)
|
||||||
|
if(props.reportCode=='zhxs-hz'&&!item.hide){
|
||||||
|
if(item.label.includes('月(万)')){
|
||||||
|
zhxsMonths.value.push({value:item.prop,label:item.label.replace('(万)','')})
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const liveWidthCol={
|
const liveWidthCol={
|
||||||
'InventoryRatio':['产品ID','货品ID','产品名称','产品规格',],
|
'InventoryRatio':['产品ID','货品ID','产品名称','产品规格',],
|
||||||
@@ -1104,7 +1150,8 @@ const getTableData = async (isLoading = true) => {
|
|||||||
'ZHXSQK':['标准品名','客户名称'],
|
'ZHXSQK':['标准品名','客户名称'],
|
||||||
'kcqmltj':['产品名称','规格','商品名','通用名'],
|
'kcqmltj':['产品名称','规格','商品名','通用名'],
|
||||||
'zd_customer':['客户名称','年月'],
|
'zd_customer':['客户名称','年月'],
|
||||||
'zhxs-hz':['板块']
|
'zhxs-hz':['板块'],
|
||||||
|
'stgoodTop10':['产品名称']
|
||||||
}
|
}
|
||||||
Object.keys(tableOption.value.column).forEach(key=>{
|
Object.keys(tableOption.value.column).forEach(key=>{
|
||||||
const showCols=Object.values(tableOption.value.column).filter(item=>!item.hide)
|
const showCols=Object.values(tableOption.value.column).filter(item=>!item.hide)
|
||||||
@@ -1118,6 +1165,7 @@ const getTableData = async (isLoading = true) => {
|
|||||||
resolve(data.records)
|
resolve(data.records)
|
||||||
if(props.reportCode=='zhxs-hz'){
|
if(props.reportCode=='zhxs-hz'){
|
||||||
initMerge()
|
initMerge()
|
||||||
|
changeMonths()
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ const initEcharts = () => {
|
|||||||
if (echartsType.includes(item.control)) {
|
if (echartsType.includes(item.control)) {
|
||||||
const dom = document.getElementById(item.prop)
|
const dom = document.getElementById(item.prop)
|
||||||
echartObj[item.prop] = echarts.init(dom)
|
echartObj[item.prop] = echarts.init(dom)
|
||||||
echartObj[item.prop].setOption(item.chartOption)
|
echartObj[item.prop].setOption(item.chartOption,true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user