8/30 根据追溯码出库

20240912_adapter_z
wangwei 10 months ago
parent 5157b0de09
commit cfbf91c07f

@ -33,3 +33,11 @@ export function destroyOut(query) {
data: query data: query
}); });
} }
export function destroyOutByCode(query) {
return axios({
url: "/udiwms/collect/fifo/desOrder/destroyOutByCode",
method: "post",
data: query
});
}

@ -455,6 +455,7 @@
> >
<destroyOutDialog <destroyOutDialog
:prescribeData="prescribeData" :prescribeData="prescribeData"
:destroyType="destroyType"
:closeDialog="closeDialog" :closeDialog="closeDialog"
> >
@ -540,6 +541,7 @@ export default {
addInvRemindSetDialogVisible: false, addInvRemindSetDialogVisible: false,
destroyOutDialogVisible: false, destroyOutDialogVisible: false,
prescribeData: {}, prescribeData: {},
destroyType: 1,//1 2.code
} }
}, },
@ -686,11 +688,18 @@ export default {
// //
destroyOut(_this,row){ destroyOut(_this,row){
_this.prescribeData = row _this.prescribeData = row
_this.destroyType = 1
_this.destroyOutDialogVisible = true; _this.destroyOutDialogVisible = true;
}, },
closeDialog(){ closeDialog(){
this.destroyOutDialogVisible = false this.destroyOutDialogVisible = false
this.getList() this.getList()
this.detailClick(this,this.prescribeData)
},
destroyOutByCode(_this,row){
_this.prescribeData = row
_this.destroyType = 2
_this.destroyOutDialogVisible = true;
} }
}, },

@ -9,16 +9,22 @@
<!-- </el-button>--> <!-- </el-button>-->
<!--</div>--> <!--</div>-->
<el-descriptions title="产品信息" :column="2" border style="margin-top: 5px"> <el-descriptions title="产品信息" :column="2" border style="margin-top: 5px">
<el-descriptions-item label="产品名称">{{ prescribeData.cpmctymc }}</el-descriptions-item> <el-descriptions-item label="UDI码" v-if="destroyType == 2">
{{prescribeData.code}}
</el-descriptions-item>
<el-descriptions-item label="产品名称" >{{ prescribeData.cpmctymc }}</el-descriptions-item>
<el-descriptions-item label="产品标识">{{ prescribeData.nameCode }}</el-descriptions-item> <el-descriptions-item label="产品标识">{{ prescribeData.nameCode }}</el-descriptions-item>
<el-descriptions-item label="产品规格">{{ prescribeData.ggxh }}</el-descriptions-item> <el-descriptions-item label="产品规格">{{ prescribeData.ggxh }}</el-descriptions-item>
<el-descriptions-item label="批次号">{{ prescribeData.batchNo }}</el-descriptions-item> <el-descriptions-item label="批次号">{{ prescribeData.batchNo }}</el-descriptions-item>
<el-descriptions-item label="计量单位">{{ prescribeData.measname }}</el-descriptions-item> <el-descriptions-item label="计量单位">{{ prescribeData.measname }}</el-descriptions-item>
<el-descriptions-item label="剩余数量">{{ prescribeData.reCount }}</el-descriptions-item> <el-descriptions-item label="剩余数量" custom-style class="custom-label">
<el-tag size="small">{{prescribeData.reCount}}</el-tag>
<!--<el-tag type="danger">{{ prescribeData.reCount}}</el-tag>-->
</el-descriptions-item>
<el-descriptions-item label="生产日期">{{ produceDate }}</el-descriptions-item> <el-descriptions-item label="生产日期">{{ produceDate }}</el-descriptions-item>
<el-descriptions-item label="失效日期">{{ expireDate }}</el-descriptions-item> <el-descriptions-item label="失效日期">{{ expireDate }}</el-descriptions-item>
<el-descriptions-item label="生产企业">{{ prescribeData.manufactory }}</el-descriptions-item> <el-descriptions-item label="生产企业">{{ prescribeData.manufactory }}</el-descriptions-item>
<el-descriptions-item label="供应商">{{ prescribeData.supName }}</el-descriptions-item> <!--<el-descriptions-item label="供应商">{{ prescribeData.supName }}</el-descriptions-item>-->
<el-descriptions-item label="医保编码">{{ prescribeData.ybbm }}</el-descriptions-item> <el-descriptions-item label="医保编码">{{ prescribeData.ybbm }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<!--<el-button type="primary" icon="el-icon-plus" sty>提交</el-button>--> <!--<el-button type="primary" icon="el-icon-plus" sty>提交</el-button>-->
@ -52,7 +58,7 @@
</template> </template>
<script> <script>
import { destroyOut } from '@/api/collect/IoDestroy' import { destroyOut, destroyOutByCode } from '@/api/collect/IoDestroy'
export default { export default {
name: 'destroyOutDialog', name: 'destroyOutDialog',
@ -61,6 +67,10 @@ export default {
type: Object, type: Object,
required: true required: true
}, },
destroyType: {
type: Object,
required: true
},
closeDialog: { closeDialog: {
type: Function, type: Function,
required: true required: true
@ -105,13 +115,18 @@ export default {
// //
destroyOutOrder(){ destroyOutOrder(){
if ( this.formData.count == null){
return this.$message.error("请输入损耗数量")
}
let query = { let query = {
outCount: this.formData.count, outCount: this.formData.count,
remark: this.formData.remark, remark: this.formData.remark,
updateUser: this.$store.getters.adminId, updateUser: this.$store.getters.adminId,
createUser: this.$store.getters.adminId, createUser: this.$store.getters.adminId,
splitFifoInv : this.prescribeData splitFifoInv : this.prescribeData,
code:this.prescribeData.code,
} }
if (this.destroyType == 1){
destroyOut(query).then(res => { destroyOut(query).then(res => {
if (res.code == 20000){ if (res.code == 20000){
this.closeDialog() this.closeDialog()
@ -120,7 +135,32 @@ export default {
return this.$message.error(res.message) return this.$message.error(res.message)
} }
}) })
}else {
destroyOutByCode(query).then(res => {
if (res.code == 20000){
this.closeDialog()
return this.$message.success("yes")
}else {
return this.$message.error("no")
}
})
}
}, },
destroyOutByCodeOrder(){
if ( this.formData.count == null){
return this.$message.error("请输入损耗数量")
}
let query = {
outCount: this.formData.count,
remark: this.formData.remark,
updateUser: this.$store.getters.adminId,
createUser: this.$store.getters.adminId,
splitFifoInv : this.prescribeData,
code:this.formData.code,
}
}
}, },
created() { created() {
@ -130,12 +170,21 @@ export default {
if (this.prescribeData.expireDate != null){ if (this.prescribeData.expireDate != null){
this.expireDate = this.conversionDate(this.prescribeData.expireDate) this.expireDate = this.conversionDate(this.prescribeData.expireDate)
} }
if (this.destroyType == 2){
this.prescribeData.reCount = this.prescribeData.totalCount
}
} }
} }
</script> </script>
<style scoped> <style scoped>
/* 添加自定义样式 */
.custom-label {
background-color: #f56c6c; /* 选择你想要的背景色 */
color: white; /* 文字颜色,根据背景色调整 */
/*padding: 5px 10px; !* 内边距 *!*/
/*border-radius: 4px; !* 边框圆角 *!*/
}
</style> </style>

Loading…
Cancel
Save