|
|
|
@ -83,7 +83,7 @@
|
|
|
|
|
<!--单据业务详情-->
|
|
|
|
|
<el-tab-pane>
|
|
|
|
|
<span slot="label">单据 {{ orderData.billNo }}-追溯码详情</span>
|
|
|
|
|
<el-table :data="detailList" style="width: 100%;" highlight-current-row="true" border ref="multipleTable" >
|
|
|
|
|
<el-table :data="detailList" style="width: 100%;" highlight-current-row="true" border ref="multipleTable" :row-style="rowStyle">
|
|
|
|
|
<el-table-column label="序号" type="index"></el-table-column>
|
|
|
|
|
<el-table-column label="追溯码" prop="code" width="160"></el-table-column>
|
|
|
|
|
<el-table-column label="药品编码" prop="nameCode"></el-table-column>
|
|
|
|
@ -97,6 +97,32 @@
|
|
|
|
|
<el-table-column label="批准文号" prop="zczbhhzbapzbh"></el-table-column>
|
|
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-row style="text-align: right;font-size: 12px;margin-top: 10px">
|
|
|
|
|
<el-col span="24">
|
|
|
|
|
<div style="float: right">
|
|
|
|
|
<!--<td>-->
|
|
|
|
|
<!-- <div style="background-color: #F56C6C;width: 10px;height: 10px;"></div>-->
|
|
|
|
|
<!--</td>-->
|
|
|
|
|
<!--<td><span style="color: #6d6d6d;"><pre>未赋码 </pre></span></td>-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
<div style="background-color: #E6A23C;width: 10px;height: 10px;"></div>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<span style="color: #6d6d6d;"><pre>替换码 </pre></span>
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
<div style="background-color: #67C23A;width: 10px;height: 10px;"></div>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
<span style="color: #6d6d6d;"><pre>已校验</pre></span>
|
|
|
|
|
</td>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="resultTotal>0"
|
|
|
|
|
:total="resultTotal"
|
|
|
|
@ -104,6 +130,8 @@
|
|
|
|
|
:page.sync="codeQuery.page"
|
|
|
|
|
@pagination="getResultDetailList"
|
|
|
|
|
></pagination>
|
|
|
|
|
<!-- 在表格下方添加说明 -->
|
|
|
|
|
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</div>
|
|
|
|
@ -143,6 +171,7 @@ export default {
|
|
|
|
|
codeQuery: {
|
|
|
|
|
billNo:null,
|
|
|
|
|
code: null,
|
|
|
|
|
selectType:2,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
},
|
|
|
|
@ -186,15 +215,27 @@ export default {
|
|
|
|
|
if (res.code == 20000) {
|
|
|
|
|
if (Array.isArray(res.data)) {
|
|
|
|
|
this.printCodeResultList(res.data)
|
|
|
|
|
this.codeQuery.selectType = 1
|
|
|
|
|
this.getResultDetailList()
|
|
|
|
|
let codeList = res.data
|
|
|
|
|
let filterCodeList = codeList.filter(item => item.status === 5).map(item => item.code);;
|
|
|
|
|
if (filterCodeList.length > 0){
|
|
|
|
|
query.codeList = filterCodeList
|
|
|
|
|
this.replaceCode(query,1)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.verifyFinish(1, res.data, res.message)
|
|
|
|
|
this.checkCodeEndList.push(query.code)
|
|
|
|
|
this.codeQuery.selectType = 1
|
|
|
|
|
this.getResultDetailList()
|
|
|
|
|
//码不对 全部码
|
|
|
|
|
this.$message.success('校验成功')
|
|
|
|
|
}
|
|
|
|
|
}else if (res.code == 503){
|
|
|
|
|
this.replaceCode(query,2)
|
|
|
|
|
} else if (res.code == 504){
|
|
|
|
|
//追溯码不存在 是否执行更换
|
|
|
|
|
this.$confirm('该追溯码不存在是否继续添加', '提示', {
|
|
|
|
|
this.$confirm('追溯码校验超出是否继续添加', '提示', {
|
|
|
|
|
confirmButtonText: '添加',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning',
|
|
|
|
@ -207,6 +248,8 @@ export default {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
this.scanCode = ''
|
|
|
|
|
this.orderData.checkCodeConfirm = res.data.checkCodeConfirm
|
|
|
|
|
this.codeQuery.selectType = 1
|
|
|
|
|
this.getResultDetailList()
|
|
|
|
|
this.getInputFocus()
|
|
|
|
|
this.$message.success("添加成功")
|
|
|
|
|
}else {
|
|
|
|
@ -218,12 +261,49 @@ export default {
|
|
|
|
|
if (Array.isArray(res.data)) {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.verifyFinish(2, res.data, res.message)
|
|
|
|
|
this.scanCode = ''
|
|
|
|
|
this.getInputFocus()
|
|
|
|
|
// this.verifyFinish(2, res.data, res.message)
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
replaceCode(query,type){
|
|
|
|
|
let title = ''
|
|
|
|
|
if (type == 1){
|
|
|
|
|
const codeStr = query.codeList.join('\n');
|
|
|
|
|
title = `${codeStr}该追溯码不存在是否继续添加`;
|
|
|
|
|
}else {
|
|
|
|
|
title = '该追溯码不存在是否继续添加'
|
|
|
|
|
}
|
|
|
|
|
//追溯码不存在 是否执行更换
|
|
|
|
|
this.$confirm(title, '提示', {
|
|
|
|
|
confirmButtonText: '添加',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning',
|
|
|
|
|
center: true,
|
|
|
|
|
closeOnPressEscape: false,//按下 ESC 键关闭弹窗
|
|
|
|
|
closeOnClickModal: false,//点击遮罩关闭弹窗
|
|
|
|
|
distinguishCancelAndClose: true,//区分取消与关闭
|
|
|
|
|
}).then(() => {
|
|
|
|
|
scanCheckCodeReplace(query).then(res => {
|
|
|
|
|
if (res.code == 20000){
|
|
|
|
|
this.scanCode = ''
|
|
|
|
|
this.orderData.checkCodeConfirm = res.data.checkCodeConfirm
|
|
|
|
|
this.codeQuery.selectType = 1
|
|
|
|
|
this.getResultDetailList()
|
|
|
|
|
this.getInputFocus()
|
|
|
|
|
this.$message.success("添加成功")
|
|
|
|
|
}else {
|
|
|
|
|
this.$message.error("添加失败")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.scanCode = ''
|
|
|
|
|
this.getInputFocus()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
verifyFinish(val, data, message) {
|
|
|
|
|
if (val == 1) {
|
|
|
|
|
this.errVisible = false
|
|
|
|
@ -297,9 +377,13 @@ export default {
|
|
|
|
|
for (let i = 0; i < vailCodeResultResponses.length; i++) {
|
|
|
|
|
let data = vailCodeResultResponses[i]
|
|
|
|
|
if (data.status == 1) {
|
|
|
|
|
this.scanResultType = "success"
|
|
|
|
|
this.result = this.result + (isBlank(this.result) ? '' : ';') + vailCodeResultResponses[i].code + ':' + vailCodeResultResponses[i].sucMsg
|
|
|
|
|
} else if (data.status == 2) {
|
|
|
|
|
this.errResult = this.errResult + '\n' + vailCodeResultResponses[i].code + ':' + vailCodeResultResponses[i].errMsg
|
|
|
|
|
}else if (data.status == 5) {
|
|
|
|
|
this.scanResultType = "warning"
|
|
|
|
|
this.result = this.result + (isBlank(this.result) ? '' : ';') + vailCodeResultResponses[i].code + ':' + vailCodeResultResponses[i].errMsg
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!isBlank(this.result)) {
|
|
|
|
@ -345,6 +429,7 @@ export default {
|
|
|
|
|
this.detailList = res.data.list || []
|
|
|
|
|
this.checkCodeList = this.detailList.map(item => item.code)
|
|
|
|
|
this.resultTotal = res.data.total || 0;
|
|
|
|
|
this.codeQuery.selectType = 2
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
this.detailList = []
|
|
|
|
@ -407,6 +492,9 @@ export default {
|
|
|
|
|
this.closeCodeCheckDialog()
|
|
|
|
|
this.$message.success("校验完成")
|
|
|
|
|
}else {
|
|
|
|
|
if (this.orderData.checkCodeConfirm == 1){
|
|
|
|
|
this.closeCodeCheckDialog()
|
|
|
|
|
}
|
|
|
|
|
this.$message.error(res.message)
|
|
|
|
|
}
|
|
|
|
|
}).catch(() => {
|
|
|
|
@ -417,6 +505,7 @@ export default {
|
|
|
|
|
this.codeQuery = {
|
|
|
|
|
billNo: null,
|
|
|
|
|
code: null,
|
|
|
|
|
selectType:2,
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
}
|
|
|
|
@ -425,20 +514,15 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
rowStyle({row, rowIndex}) {
|
|
|
|
|
let rowBackground = {}
|
|
|
|
|
if (this.checkCodeEndList.length == 0) {
|
|
|
|
|
rowBackground.color = '#F56C6C'
|
|
|
|
|
rowBackground.height = '38px'
|
|
|
|
|
return rowBackground
|
|
|
|
|
}
|
|
|
|
|
if (this.checkCodeEndList.includes(row.code)) {
|
|
|
|
|
if (row.scanCodeCheckStatus == 1) {
|
|
|
|
|
rowBackground.color = '#56a717'
|
|
|
|
|
}
|
|
|
|
|
if (!this.checkCodeEndList.includes(row.code)) {
|
|
|
|
|
rowBackground.color = '#F56C6C'
|
|
|
|
|
}
|
|
|
|
|
rowBackground.height = '38px'
|
|
|
|
|
return rowBackground
|
|
|
|
|
if (row.scanCodeCheckStatus == 3) {
|
|
|
|
|
rowBackground.color = '#E6A23C';
|
|
|
|
|
}
|
|
|
|
|
rowBackground.height = "38px"
|
|
|
|
|
return rowBackground;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.filterQuery.billNo = this.orderData.billNo
|
|
|
|
|