提交 a7566635 authored 作者: lidongxu's avatar lidongxu

Merge branch 'ap' into dev

...@@ -212,4 +212,9 @@ html.dark { ...@@ -212,4 +212,9 @@ html.dark {
.popup-result .title { .popup-result .title {
background: var(--cron-border); background: var(--cron-border);
} }
}
// messageBox 样式
.is-message-box{
z-index: 10000 !important;
} }
\ No newline at end of file
...@@ -19,6 +19,7 @@ export const chooseFile = ({ accept, id = 'fileInput' }) => { ...@@ -19,6 +19,7 @@ export const chooseFile = ({ accept, id = 'fileInput' }) => {
// 关闭窗口没选择文件 // 关闭窗口没选择文件
window.addEventListener('cancel', () => { window.addEventListener('cancel', () => {
document.body.removeChild(fileInput) document.body.removeChild(fileInput)
reject('请选择文件')
}) })
document.body.appendChild(fileInput) document.body.appendChild(fileInput)
fileInput.click() fileInput.click()
......
...@@ -32,20 +32,20 @@ ...@@ -32,20 +32,20 @@
<el-tooltip class="item" <el-tooltip class="item"
effect="dark" effect="dark"
content="下载表格" content="下载表格"
placement="top" placement="top">
v-if="tabsType === '常规陈列'">
<el-button @click="downloadTable" <el-button @click="downloadTable"
type="primary"> type="primary"
v-hasPermi="['display_downExcel']">
下载表格 下载表格
</el-button> </el-button>
</el-tooltip> </el-tooltip>
<el-tooltip class="item" <el-tooltip class="item"
effect="dark" effect="dark"
content="上传表格" content="上传表格"
placement="top" placement="top">
v-if="tabsType === '常规陈列'">
<el-button @click="uploadExcel" <el-button @click="uploadExcel"
type="success"> type="success"
v-hasPermi="['display_upExcel']">
上传表格 上传表格
</el-button> </el-button>
</el-tooltip> </el-tooltip>
...@@ -138,10 +138,11 @@ ...@@ -138,10 +138,11 @@
draggable draggable
overflow overflow
@close="handleDialogCloseUpload"> @close="handleDialogCloseUpload">
<div> <div class="table-container">
<!-- 计划表格 --> <!-- 计划表格 -->
<el-table :data="planTableList" <el-table :data="planTableList"
border border
class="auto-fit-header-table"
style="width: 100%" style="width: 100%"
show-overflow-tooltip show-overflow-tooltip
:row-class-name="tableRowClassName"> :row-class-name="tableRowClassName">
...@@ -153,7 +154,17 @@ ...@@ -153,7 +154,17 @@
:key="item.label" :key="item.label"
:prop="item.prop" :prop="item.prop"
:label="item.label" :label="item.label"
:width="item.width" /> :width="item.width"
class-name="column-style">
<template #header="{ column }">
<span class="formula-column">
<div class="column">
<p>{{ item.label }}</p>
<p v-if="item.subLabel">{{ item.subLabel }}</p>
</div>
</span>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<template #footer> <template #footer>
...@@ -289,22 +300,36 @@ const typeObj = { ...@@ -289,22 +300,36 @@ const typeObj = {
} }
const downloadTable = async () => { const downloadTable = async () => {
proxy.$modal.loading('正在下载表格,请稍候...') proxy.$modal.loading('正在下载表格,请稍候...')
const res = await downloadDisplayScheduleTable({ try {
...props.params, const res = await downloadDisplayScheduleTable({
salesMonth: parseTime(props.params.salesMonth, '{y}-{m}'), ...props.params,
pageNum: null, salesMonth: parseTime(props.params.salesMonth, '{y}-{m}'),
pageSize: null, pageNum: null,
pageType: typeObj[props.tabsType] pageSize: null,
}) pageType: typeObj[props.tabsType]
// 如果 salesMonth 为空,默认当前月 })
if (props.params.salesMonth) { if (res.type === 'application/json') {
saveAs(res, `${props.tabsType}计划${parseTime(props.params.salesMonth, '{y}-{m}')}.xlsx`) // 本次返回的不是二进制,而是 JSON 被转成了 Blob
} else { const result = await res.text()
saveAs(res, `${props.tabsType}计划.xlsx`) const response = JSON.parse(result)
} if (response.code === 910) {
proxy.$modal.closeLoading()
proxy.$modal.msgError(response.msg || '下载表格失败')
return
}
}
// 下载完成后,执行回调函数 // 如果 salesMonth 为空,默认当前月
proxy.$modal.closeLoading() if (props.params.salesMonth) {
saveAs(res, `${props.tabsType}计划${parseTime(new Date(), '{y}-{m}-{d} {h}-{i}-{s}')}.xlsx`)
} else {
saveAs(res, `${props.tabsType}计划${parseTime(new Date(), '{y}-{m}-{d} {h}-{i}-{s}')}.xlsx`)
}
// 下载完成后,执行回调函数
proxy.$modal.closeLoading()
} catch (error) {
proxy.$modal.closeLoading()
}
} }
// 上传表格 // 上传表格
......
...@@ -10,8 +10,7 @@ ...@@ -10,8 +10,7 @@
:isLoading="isLoading" :isLoading="isLoading"
tabsType="常规陈列" tabsType="常规陈列"
@getTableList="getTableList" @getTableList="getTableList"
@updateShowSearch="v => showSearch.value = v" @updateShowSearch="v => showSearch = v" />
/>
</template> </template>
<script setup <script setup
...@@ -116,7 +115,7 @@ ...@@ -116,7 +115,7 @@
/*************** 筛选 ***************/ /*************** 筛选 ***************/
const showSearch = ref(true) const showSearch = ref(true)
</script> </script>
<style lang="scss"> <style lang="scss">
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
:formatter="formatterFn" :formatter="formatterFn"
tabsType="档期计划" tabsType="档期计划"
@getTableList="getTableList" @getTableList="getTableList"
@updateShowSearch="v => showSearch.value = v" /> @updateShowSearch="v => showSearch = v" />
<!-- 弹窗:实际与计划不一致,让用户补充实际内容 --> <!-- 弹窗:实际与计划不一致,让用户补充实际内容 -->
<el-dialog v-model="showPromotionDialog" <el-dialog v-model="showPromotionDialog"
title="请输入实际促销机制内容" title="请输入实际促销机制内容"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:isLoading="isLoading" :isLoading="isLoading"
tabsType="档期陈列" tabsType="档期陈列"
@getTableList="getTableList" @getTableList="getTableList"
@updateShowSearch="v => showSearch.value = v" /> @updateShowSearch="v => showSearch = v" />
</template> </template>
<script setup <script setup
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
actualEndCapQty: row.actualEndCapQty || 0, actualEndCapQty: row.actualEndCapQty || 0,
// 地堆平米数实际 // 地堆平米数实际
actualFloorStackArea: row.actualFloorStackArea || 0, actualFloorStackArea: row.actualFloorStackArea || 0,
// 地堆数量实际(后台要数值)
actualFloorStackQty: row.actualFloorStackQty * 1 || 0,
}) })
} }
// 全部列 // 全部列
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:isLoading="isLoading" :isLoading="isLoading"
tabsType="六小金刚" tabsType="六小金刚"
@getTableList="getTableList" @getTableList="getTableList"
@updateShowSearch="v => showSearch.value = v" /> @updateShowSearch="v => showSearch = v" />
</template> </template>
<script setup <script setup
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:isLoading="isLoading" :isLoading="isLoading"
tabsType="零食陈列" tabsType="零食陈列"
@getTableList="getTableList" @getTableList="getTableList"
@updateShowSearch="v => showSearch.value = v" /> @updateShowSearch="v => showSearch = v" />
</template> </template>
<script setup <script setup
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:isLoading="isLoading" :isLoading="isLoading"
tabsType="三米两秒" tabsType="三米两秒"
@getTableList="getTableList" @getTableList="getTableList"
@updateShowSearch="v => showSearch.value = v" /> @updateShowSearch="v => showSearch = v" />
</template> </template>
<script setup <script setup
......
...@@ -78,7 +78,6 @@ ...@@ -78,7 +78,6 @@
'经销商-分析': getDisplayScheduleDashboardListStore, '经销商-分析': getDisplayScheduleDashboardListStore,
} }
const getTableList = async () => { const getTableList = async () => {
console.log('走了吗?')
isLoading.value = true isLoading.value = true
const res = await apiObj[queryParams.operation]({ const res = await apiObj[queryParams.operation]({
...queryParams, ...queryParams,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论