|
|
|
@ -126,9 +126,28 @@ |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template v-if="item.columnProp === 'ttlAmount' || item.columnProp === 'sumPrice'"> |
|
|
|
<span>{{!!scope.row[item.columnProp]?scope.row[item.columnProp].toFixed(2):''}}</span> |
|
|
|
<!-- 金额字段特殊处理 --> |
|
|
|
<span v-if="item.columnProp === 'ttlAmount' || item.columnProp === 'sumPrice'"> |
|
|
|
{{!!scope.row[item.columnProp]?scope.row[item.columnProp].toFixed(2):''}} |
|
|
|
</span> |
|
|
|
|
|
|
|
<!-- PN字段特殊处理,添加提示信息 --> |
|
|
|
<template v-else-if="item.columnProp === 'pn'"> |
|
|
|
<el-tooltip |
|
|
|
v-if="isPnDataIncomplete(scope.row)" |
|
|
|
content="基本信息(每卷数量、每箱卷数、箱重量)未维护,点击跳转到维护页面" |
|
|
|
placement="top"> |
|
|
|
<span |
|
|
|
v-if="!item.columnHidden" |
|
|
|
class="clickable-pn" |
|
|
|
@click="navigateToPartHsCode(scope.row.pn)"> |
|
|
|
{{ scope.row[item.columnProp] }} |
|
|
|
</span> |
|
|
|
</el-tooltip> |
|
|
|
<span v-else-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
</template> |
|
|
|
|
|
|
|
<!-- 其他字段正常处理 --> |
|
|
|
<template v-else> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
@ -1644,6 +1663,28 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
isPnDataIncomplete(row) { |
|
|
|
const hasBoxrolls = row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== ''; |
|
|
|
const hasRollqty = row.rollqty !== null && row.rollqty !== undefined && row.rollqty !== ''; |
|
|
|
const hasBoxweight = row.boxweight !== null && row.boxweight !== undefined && row.boxweight !== ''; |
|
|
|
|
|
|
|
return !hasBoxrolls || !hasRollqty || !hasBoxweight; |
|
|
|
}, |
|
|
|
|
|
|
|
// 跳转到PN维护页面 |
|
|
|
navigateToPartHsCode(pn) { |
|
|
|
if (!pn) { |
|
|
|
this.$message.warning('PN不能为空'); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$router.push({ |
|
|
|
path: '/ecss-partHsCode', |
|
|
|
query: { |
|
|
|
sku: pn |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
openPartDialog () { |
|
|
|
this.searchPartList(); |
|
|
|
this.partFlag = true |
|
|
|
@ -1737,6 +1778,18 @@ |
|
|
|
if ((column.property === 'pn' || column.property === 'qty') && row.modifyFlag===true) { // 根据列属性判断 |
|
|
|
return { color: '#ff5d03' }; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查 pn 列,当 boxrolls、rollqty、boxweight 其中任意一个没有值时,将 pn 颜色改成橙色 |
|
|
|
if (column.property === 'pn') { |
|
|
|
const hasBoxrolls = row.boxrolls !== null && row.boxrolls !== undefined && row.boxrolls !== ''; |
|
|
|
const hasRollqty = row.rollqty !== null && row.rollqty !== undefined && row.rollqty !== ''; |
|
|
|
const hasBoxweight = row.boxweight !== null && row.boxweight !== undefined && row.boxweight !== ''; |
|
|
|
|
|
|
|
if (!hasBoxrolls || !hasRollqty || !hasBoxweight) { |
|
|
|
return { color: '#ff8c00' }; // 橙色 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return {}; |
|
|
|
}, |
|
|
|
changeData(row){ |
|
|
|
@ -2345,6 +2398,16 @@ |
|
|
|
height: 24px; |
|
|
|
} |
|
|
|
|
|
|
|
/* 可点击的PN样式 */ |
|
|
|
.clickable-pn { |
|
|
|
cursor: pointer; |
|
|
|
text-decoration: underline; |
|
|
|
} |
|
|
|
|
|
|
|
.clickable-pn:hover { |
|
|
|
opacity: 0.8; |
|
|
|
} |
|
|
|
|
|
|
|
/* 对话框标题样式 */ |
|
|
|
.dialog-title { |
|
|
|
display: flex; |
|
|
|
|