4/5 扫码退货优化1.0

dev2.5_scan
wangwei 4 days ago
parent d8c92ddb55
commit 80ee546bdd

@ -3,57 +3,60 @@
<el-table :data="preDetailList" highlight-current-row="true" border ref="multipleTable" size="100"
:row-style="{ height: '60px' }"
:cell-style="{ padding: '0' }"
v-loading="preLoading"
>
<el-table-column label="赋码状态" prop="cpmctymc">
<template v-slot="scope">
<div style="text-align: center;">
<el-tag :type="getTagColor(scope.row)" size="26">
{{ codingStatus }}
<el-tag :type="getStatusType(scope.row)" size="26">
{{ getStatusText(scope.row) }}
</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="产品通用名" prop="cpmctymc">
<template v-slot="scope">
<div :style="{ fontSize: '16px' }">{{ scope.row.cpmctymc }}</div>
<div class="table-cell">{{ scope.row.cpmctymc }}</div>
</template>
</el-table-column>
<el-table-column label="退药数量" prop="count">
<el-table-column label="单据数量" prop="count">
<template v-slot="scope">
<div :style="{ fontSize: '26px' }">{{ scope.row.count }}</div>
<div class="table-cell count">{{ scope.row.count }}</div>
</template>
</el-table-column>
<el-table-column label="应扫码数量" prop="scanActCount">
<el-table-column label="应扫码数量" prop="scanActCount" :min-width="120">
<template v-slot="scope">
<div :style="getCellStyle(scope.row)" style="display: flex; align-items: center; height: 100%; min-height: 40px;">
<!--<div v-if="scope.row.autoTagStatus === 2" class="table-cell warning">-->
<!-- 无需扫码-->
<!--</div> v-else -->
<div :class="getScanCountClass(scope.row)" class="table-cell">
{{ scope.row.scanCount }}/{{ scope.row.shouldCount }}
</div>
</template>
</el-table-column>
<el-table-column label="制剂规格" prop="prepnSpec">
<template v-slot="scope">
<div :style="{ fontSize: '16px' }">{{ scope.row.prepnSpec }}</div>
<div class="table-cell">{{ scope.row.prepnSpec }}</div>
</template>
</el-table-column>
<el-table-column label="包装规格" prop="spec">
<template v-slot="scope">
<div :style="{ fontSize: '16px' }">{{ scope.row.spec }}</div>
<div class="table-cell">{{ scope.row.spec }}</div>
</template>
</el-table-column>
<!--<el-table-column label="产品标识" prop="nameCode" width="120"></el-table-column> fixed="right"-->
<el-table-column label="医保编码" prop="ybbm" width="240">
<template v-slot="scope">
<div :style="{ fontSize: '16px' }">{{ scope.row.ybbm }}</div>
<div class="table-cell">{{ scope.row.ybbm }}</div>
</template>
</el-table-column>
<el-table-column label="批次号" prop="batchNo">
<template v-slot="scope">
<div :style="{ fontSize: '16px' }">{{ scope.row.batchNo }}</div>
<div class="table-cell">{{ scope.row.batchNo }}</div>
</template>
</el-table-column>
>
<el-table-column
fixed="right"
label="操作"
@ -61,9 +64,9 @@
>
<template slot-scope="scope">
<el-button type="primary" @click="scanDetail(scope.row)" style="font-size: 14px"
:disabled="scope.row.scanCount == null || scope.row.scanCount == 0 "
:disabled="!scope.row.scanCount"
>
扫码明细({{ scope.row.scanCount == null ? 0 : scope.row.scanCount }})
扫码明细({{ scope.row.scanCount || 0 }})
</el-button>
</template>
</el-table-column>
@ -244,53 +247,21 @@ export default {
this.refreshPanel(this)
},
rowStyle({ row, rowIndex }) {
let rowBackground = {}
rowBackground.fontSize = '16px'
rowBackground.height = '50px'
if (row.scanActCount < row.count) {
rowBackground.color = '#F56C6C'
}
if (row.autoTagStatus == 2) {
rowBackground.color = '#E6A23C'
}
if (row.scanActCount >= row.count) {
rowBackground.color = '#56a717'
}
return rowBackground
getStatusText(row) {
if (row.autoTagStatus === 2) return '预赋码'
if (row.scanActCount == null) return '未赋码'
return row.scanActCount < row.count ? '未赋码' : '已赋码'
},
getCellStyle(row) {
let cellStyle = {
fontSize: '50px'
}
if (row.shouldCount == 0) {
cellStyle.fontSize = '30px'
cellStyle.color = '#F56C6C'
return cellStyle
}
if (row.scanCount < row.shouldCount) {
cellStyle.color = '#F56C6C'
} else if (row.scanCount === row.shouldCount) {
cellStyle.color = '#56a717'
}
return cellStyle
getStatusType(row) {
if (row.scanActCount == null) return 'danger'
return row.scanActCount < row.count ? 'danger' : 'success'
},
// cellStyle({ row, column, rowIndex, columnIndex }) {
// return { height: '60px' };
// },
getTagColor(row) {
if (row.scanActCount < row.count) {
this.codingStatus = '未赋码'
return 'danger' //
} else if (row.autoTagStatus == 2) {
this.codingStatus = '预赋码'
return 'warning' //
} else if (row.scanActCount >= row.count) {
this.codingStatus = '已赋码'
return 'success' // 绿
}
}
getScanCountClass(row) {
if (row.shouldCount === 0) return 'error'
return row.scanCount < row.shouldCount ? 'error' : 'success'
},
},
@ -298,16 +269,6 @@ export default {
PanelOrderManuTagCode
},
created() {
if (this.tableHeader1 == null || this.tableHeader1.length == 0) {
getHead('prescribeOriginPanel', '1').then((re) => {
//
this.tableObj1 = re.data
this.tableHeader1 = re.data.tableList
this.queryList1 = re.data.queryList
this.fromList1 = re.data.fromList
this.getPrescribeDetail(this)
})
}
this.getPrescribeDetail(this)
if (this.dealStatus == 1) {
this.countVisible = false
@ -320,6 +281,31 @@ export default {
</script>
<style scoped>
.table-cell {
font-size: 16px;
display: flex;
align-items: center;
height: 100%;
min-height: 60px;
}
.table-cell.count {
font-size: 26px;
}
.table-cell.warning {
font-size: 30px;
color: #E6A23C;
}
.table-cell.error {
font-size: 50px;
color: #F56C6C;
}
.table-cell.success {
font-size: 50px;
color: #56a717;
}
</style>

Loading…
Cancel
Save