|
|
|
@ -3,56 +3,57 @@
|
|
|
|
|
<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">
|
|
|
|
|
<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" :min-width="120">
|
|
|
|
|
<template v-slot="scope">
|
|
|
|
|
<div v-if="scope.row.autoTagStatus == 2" :style="getCellStyle1(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>
|
|
|
|
|
<div :style="getCellStyle(scope.row)" style="display: flex; align-items: center; height: 100%; min-height: 60px;" v-else>
|
|
|
|
|
<div v-else :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>
|
|
|
|
|
|
|
|
|
@ -64,9 +65,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>
|
|
|
|
@ -155,47 +156,81 @@ export default {
|
|
|
|
|
countVisible: false,
|
|
|
|
|
scanDetailVisible: false,
|
|
|
|
|
bizId: null,
|
|
|
|
|
codingStatus: '已赋码'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
hasPrescribeData() {
|
|
|
|
|
return this.prescribeData !== null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
deleteMan(_this, row) {
|
|
|
|
|
_this.$confirm('是否确定删除该条扫码?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
_this.loading = true
|
|
|
|
|
_this.codeRemoveMan(row.id, 2)
|
|
|
|
|
})
|
|
|
|
|
async getPrescribeDetail() {
|
|
|
|
|
if (!this.hasPrescribeData) return
|
|
|
|
|
|
|
|
|
|
this.preQuery.page = 1
|
|
|
|
|
this.preQuery.orderIdFk = this.prescribeData.billNo
|
|
|
|
|
this.preLoading = true
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const res = await orderDetail(this.preQuery)
|
|
|
|
|
if (res.code !== 20000) {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.preDetailList = res.data.list
|
|
|
|
|
} catch (error) {
|
|
|
|
|
this.$message.error('数据加载失败')
|
|
|
|
|
} finally {
|
|
|
|
|
this.preLoading = false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
deleteCode(_this, row) {
|
|
|
|
|
_this.$confirm('是否确定移除一个条码?', '提示', {
|
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
_this.loading = true
|
|
|
|
|
_this.codeRemoveMan(row.id, 1)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
preHandleCurrentChange(val) {
|
|
|
|
|
this.preQuery.page = val.page
|
|
|
|
|
this.getPrescribeDetail()
|
|
|
|
|
},
|
|
|
|
|
codeRemoveMan(codeManId, delType) {
|
|
|
|
|
let post = {
|
|
|
|
|
codeManId: codeManId,
|
|
|
|
|
delType: delType
|
|
|
|
|
}
|
|
|
|
|
codeRemove(post).then((response) => {
|
|
|
|
|
|
|
|
|
|
scanDetail(row) {
|
|
|
|
|
this.bizId = row.id
|
|
|
|
|
this.scanDetailVisible = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
closeScanDialog() {
|
|
|
|
|
this.getPrescribeDetail()
|
|
|
|
|
this.refreshPanel()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getStatusType(row) {
|
|
|
|
|
if (row.autoTagStatus === 2) return 'warning'
|
|
|
|
|
if (row.scanActCount == null) return 'danger'
|
|
|
|
|
return row.scanActCount < row.count ? 'danger' : 'success'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getStatusText(row) {
|
|
|
|
|
if (row.autoTagStatus === 2) return '预赋码'
|
|
|
|
|
if (row.scanActCount == null) return '未赋码'
|
|
|
|
|
return row.scanActCount < row.count ? '未赋码' : '已赋码'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getScanCountClass(row) {
|
|
|
|
|
if (row.shouldCount === 0) return 'error'
|
|
|
|
|
return row.scanCount < row.shouldCount ? 'error' : 'success'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async codeRemoveMan(codeManId, delType) {
|
|
|
|
|
try {
|
|
|
|
|
const response = await codeRemove({ codeManId, delType })
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.$message.success('操作成功!')
|
|
|
|
|
this.getList(this)
|
|
|
|
|
this.getPrescribeDetail()
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message)
|
|
|
|
|
}
|
|
|
|
|
this.loading = false
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
})
|
|
|
|
|
} catch (error) {
|
|
|
|
|
this.$message.error('操作失败')
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//界面配置-------------end
|
|
|
|
|
executeFuc(row, type, clickFuc, value) {
|
|
|
|
|
return executeFuc(this, row, type, clickFuc, value)
|
|
|
|
@ -217,122 +252,44 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
///界面配置相关------------end
|
|
|
|
|
|
|
|
|
|
preHandleCurrentChange(val) {
|
|
|
|
|
this.filterQuery.page = val.page
|
|
|
|
|
this.getPrescribeDetail(this, null)
|
|
|
|
|
},
|
|
|
|
|
getPrescribeDetail(_this) {
|
|
|
|
|
|
|
|
|
|
if (_this.prescribeData == null) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (_this.prescribeData != null) {
|
|
|
|
|
_this.preQuery.page = 1
|
|
|
|
|
_this.preQuery.orderIdFk = this.prescribeData.billNo
|
|
|
|
|
}
|
|
|
|
|
_this.preLoading = true
|
|
|
|
|
orderDetail(_this.preQuery).then(res => {
|
|
|
|
|
_this.preLoading = false
|
|
|
|
|
if (res.code != 20000) {
|
|
|
|
|
_this.$message.error(res.message)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
_this.preDetailList = res.data.list
|
|
|
|
|
_this.preLoading = false
|
|
|
|
|
console.log("获取明细数据成功")
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
_this.preLoading = false
|
|
|
|
|
_this.$message.error('数据加载失败')
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
scanDetail(row) {
|
|
|
|
|
this.bizId = row.id
|
|
|
|
|
this.scanDetailVisible = true
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
closeScanDialog() {
|
|
|
|
|
this.getPrescribeDetail(this)
|
|
|
|
|
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
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
getCellStyle1(row) {
|
|
|
|
|
let cellStyle = {}
|
|
|
|
|
if (row.autoTagStatus == 2) {
|
|
|
|
|
cellStyle.fontSize = '30px'
|
|
|
|
|
cellStyle.color = '#E6A23C'
|
|
|
|
|
return cellStyle
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
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
|
|
|
|
|
},
|
|
|
|
|
getTagColor(row) {
|
|
|
|
|
if (row.autoTagStatus == 2) {
|
|
|
|
|
this.codingStatus = '预赋码'
|
|
|
|
|
return 'warning' // 黄色
|
|
|
|
|
}
|
|
|
|
|
if (row.scanActCount == null){
|
|
|
|
|
this.codingStatus = '未赋码'
|
|
|
|
|
return 'danger' //
|
|
|
|
|
}
|
|
|
|
|
if (row.scanActCount < row.count) {
|
|
|
|
|
this.codingStatus = '未赋码'
|
|
|
|
|
return 'danger' // 红色
|
|
|
|
|
} else if (row.scanActCount >= row.count) {
|
|
|
|
|
this.codingStatus = '已赋码'
|
|
|
|
|
return 'success' // 绿色
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
components: {
|
|
|
|
|
PanelOrderManuTagCode
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getPrescribeDetail(this)
|
|
|
|
|
if (this.dealStatus == 1) {
|
|
|
|
|
this.countVisible = false
|
|
|
|
|
} else {
|
|
|
|
|
this.countVisible = true
|
|
|
|
|
}
|
|
|
|
|
this.getPrescribeDetail()
|
|
|
|
|
this.countVisible = this.dealStatus !== 1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.table-cell {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
height: 100%;
|
|
|
|
|
min-height: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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>
|
|
|
|
|