Commit 462a29f6 authored by tanghao's avatar tanghao

123

parent 8954a046
......@@ -175,27 +175,21 @@
<template #default="{ row }">{{ row['数据区'] }}</template>
</vxe-column>
<!-- 查看状态下直接显示 -->
<!-- <template v-if="currentRow.status == 'un_confirm'">
<vxe-column
v-for="item in tableTitle"
:key="item"
:title="item"
:field="item"
width="200"
/>
</template> -->
<!-- 转换下使用 -->
<template>
<vxe-colgroup v-for="item in tableTitle" :key="item" :title="item">
<vxe-column :title="item" :field="item" width="200">
<template #header>
<div class="header-cell" @click="(e) => showPopover(e, item)">
<el-tooltip v-if="showScriptNumber(getAllMapConfigs[item].orderFiledConfs) !=0" class="item" effect="dark"
:content="showScriptNames(getAllMapConfigs[item].orderFiledConfs)" placement="top-start">
<el-button type="danger" size="small" circle>{{ showScriptNumber(getAllMapConfigs[item].orderFiledConfs) }}</el-button>
</el-tooltip>
<template v-for="cf in getAllMapConfigs[item].orderFiledConfs">
<span>{{ cf.orderFiled.fliedTitle }}</span>
<span>{{ cf.orderFiled.fliedTitle }} </span>
</template>
<!-- <span>{{ allMapConfigs[item]?.orderFiled.fliedTitle || '' }}</span> -->
<el-icon><Setting /></el-icon>
</div>
</template>
......@@ -500,6 +494,18 @@ const saveOrderField = async () => {
})
}
const showScriptNames = (array) => {
let value = array?array.map(item => item.scripts.map(scrip=> scrip.scriptName)).join('\n'):''
return value
}
const showScriptNumber = (array) => {
let value =array?array.map(item => item.scripts.map(scrip=> scrip.scriptName)).length:0
return value
}
/** 确认订单转换 */
const confirmChange = async (row) => {
await ElMessageBox.confirm('是否确认订单转换?', '提示', {
......@@ -533,7 +539,8 @@ const toDetail = async (row: any) => {
// console.log(tableTitle.value)
nextTick(() => {
detailVisible.value = true
// detailVisible.value = true
detailVisible.value = true
})
excludeTitles.forEach((key) => {
......@@ -580,7 +587,6 @@ const toSaleOrderDetail = async (row: any) => {
/**批量删除行 */
const removeRows = async () => {
const list = xTable.value?.getCheckboxRecords()
......
......@@ -140,18 +140,32 @@
<vxe-colgroup>
<template #header>
<div class="header-cell" @click="(e) => showPopover(e, item)">
<el-tooltip v-if="showScriptNumber(getAllMapConfigs[item].filedConfs) !=0" class="item" effect="dark"
:content="showScriptNames(getAllMapConfigs[item].filedConfs)" placement="top-start">
<el-button type="danger" size="small" circle>{{ showScriptNumber(getAllMapConfigs[item].filedConfs) }}</el-button>
</el-tooltip>
<template v-for="cf in getAllMapConfigs[item].filedConfs">
<span>{{ cf.orderFiled?.fliedTitle }}</span>
</template>
<!-- <span>{{ allMapConfigs[item]?.orderFiled.fliedTitle || '' }}</span> -->
<el-icon><Setting /></el-icon>
</div>
</template>
<vxe-column :title="item" :field="item" width="200" :key="item">
<template #header>
<div class="header-cell" @click="(e) => showPopover(e, item)">
<el-tooltip v-if="showFilterScriptNumber(getAllMapConfigs[item].filedConfs) !=0" class="item" effect="dark"
:content="showFilterScriptNames(getAllMapConfigs[item].filedConfs)" placement="top-start">
<el-button type="danger" size="small" circle>{{ showFilterScriptNumber(getAllMapConfigs[item].filedConfs) }}</el-button>
</el-tooltip>
<template v-for="cf in getAllMapConfigs[item].filedConfs">
<span>{{ cf.filterFiled?.fliedTitle }}</span>
</template>
<el-icon><Setting /></el-icon>
</div>
</template>
</vxe-column>
</vxe-colgroup>
......@@ -356,6 +370,40 @@ const detailHide = () => {
tableTitle.value = []
}
const showScriptNames = (array) => {
let value = array?array.map(item => item.scripts.map(scrip=> scrip.scriptName)).join('\n'):''
return value
}
const showScriptNumber = (array) => {
let value = 0;
let arr = array.map(item =>{
value += item.scripts.length
// item.scripts.filter(Boolean)
});
return value
}
const showFilterScriptNames = (array) => {
let value = array?array.map(item => item.filterScripts.map(scrip=> scrip.scriptName)).join('\n'):''
return value
}
const showFilterScriptNumber = (array) => {
let value = 0;
array.map(item =>{
item.filterScripts.map(scrip=>{
if(scrip&&scrip.scriptName&&scrip.scriptName!=='') {
value++
}
})
});
return value
}
/**保存订单字段 */
const saveOrderField = async () => {
const params = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment