diff --git a/src/components/LowDesign/src/LowReport/index.vue b/src/components/LowDesign/src/LowReport/index.vue
index 4ba2c5c..a278698 100644
--- a/src/components/LowDesign/src/LowReport/index.vue
+++ b/src/components/LowDesign/src/LowReport/index.vue
@@ -86,6 +86,12 @@
{{scope.row.stdGoodsName}}
{{scope.row.stdGoodsName}}
+
+
+
+ {{scope.row.customName}}
+ {{scope.row.customName}}
+
{{scope.row.zoneName}}
@@ -148,8 +154,9 @@
:column="scope.column"
>
-
-
+
+
+
+ 月份:
+
+
+
+
+
+
+
+
+
@@ -222,6 +245,16 @@ const newProps=ref({
'samoney_yoy':'lastYearSaMoney',
'profit_yoy':'lastYearProfit'
})
+const showMonths=ref([])
+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([])
const tableSaleSearch=ref({})
const tableSalePage = ref({ currentPage: 1, pageSize: 20, total: 0 })
@@ -231,6 +264,7 @@ const route = useRoute()
const message = useMessage() // 消息弹窗
const { mergeLocaleMessage, t } = useI18n() // 国际化
const defualtSearch=ref({})
+const zhxsMonths=ref([])
const transferFields={
'zoneName':'salezonename',
'saleTypeName':'saletypename',
@@ -239,7 +273,8 @@ const transferFields={
'customName':'customname',
'dosageName':'dosagename',
'stdGoodsName':'stdGoodsIdName',
- 'effectName':'effectname'
+ 'effectName':'effectname',
+ 'classname':'goodsclassname'
}
const loading = ref(false) // 列表的加载中
const isInit = ref(false)
@@ -504,7 +539,7 @@ const summaryMethod1=({columns,data})=>{
let styleObj={}
dictFieldList.value.forEach(item=>{
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
@@ -643,7 +678,12 @@ const initTable = async () => {
if(props.reportCode=='zhxs-hz'&&item.fieldName=='板块'){
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){
config.searchSpan=3
if(item.fieldName.includes('年')){
@@ -705,7 +745,8 @@ const initTable = async () => {
'业务员':'ywyxx',
'业务区域':'ywqy',
'标准品名':'bzpm',
- '疗效分类':'effect'
+ '疗效分类':'effect',
+ '产品大类':'cpdl'
}
@@ -1097,6 +1138,11 @@ const getTableData = async (isLoading = true) => {
})
}
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={
'InventoryRatio':['产品ID','货品ID','产品名称','产品规格',],
@@ -1104,7 +1150,8 @@ const getTableData = async (isLoading = true) => {
'ZHXSQK':['标准品名','客户名称'],
'kcqmltj':['产品名称','规格','商品名','通用名'],
'zd_customer':['客户名称','年月'],
- 'zhxs-hz':['板块']
+ 'zhxs-hz':['板块'],
+ 'stgoodTop10':['产品名称']
}
Object.keys(tableOption.value.column).forEach(key=>{
const showCols=Object.values(tableOption.value.column).filter(item=>!item.hide)
@@ -1118,6 +1165,7 @@ const getTableData = async (isLoading = true) => {
resolve(data.records)
if(props.reportCode=='zhxs-hz'){
initMerge()
+ changeMonths()
}
} finally {
diff --git a/src/components/LowDesign/src/LowTable/components/SummaryTop.vue b/src/components/LowDesign/src/LowTable/components/SummaryTop.vue
index 150ec1d..f95b5c5 100644
--- a/src/components/LowDesign/src/LowTable/components/SummaryTop.vue
+++ b/src/components/LowDesign/src/LowTable/components/SummaryTop.vue
@@ -78,7 +78,7 @@ const initEcharts = () => {
if (echartsType.includes(item.control)) {
const dom = document.getElementById(item.prop)
echartObj[item.prop] = echarts.init(dom)
- echartObj[item.prop].setOption(item.chartOption)
+ echartObj[item.prop].setOption(item.chartOption,true)
}
})
}