对照品同步更改

duizhaopin_ui
tangxuan 2 years ago
parent dd4468d03d
commit d00866a2ef

@ -100,6 +100,31 @@
<el-input v-model="formData.category" placeholder="请输入分类" clearable :style="{ width: '100%' }" /> <el-input v-model="formData.category" placeholder="请输入分类" clearable :style="{ width: '100%' }" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item label="包装" prop="is_packing">
<el-select v-model="formData.is_packing" :style="{ width: '100%' }" placeholder="包装是否完好">
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="标签" prop="is_label">
<el-select v-model="formData.is_label" :style="{ width: '100%' }" placeholder="标签是否清晰">
<el-option label="是" value="1" />
<el-option label="否" value="0" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="外观" prop="is_aspect">
<el-select v-model="formData.is_aspect" :style="{ width: '100%' }" placeholder="外观是否符合要求">
<el-option label="是" value="1" default/>
<el-option label="否" value="0" />
</el-select>
</el-form-item>
</el-col>
<el-col v-for="item in extra_form" :key="item.id" :span="12"> <el-col v-for="item in extra_form" :key="item.id" :span="12">
<el-form-item :label="item.name" :prop="item.name"> <el-form-item :label="item.name" :prop="item.name">
<el-input v-model="formData[item.name]" :placeholder="'请输入' + item.name" clearable <el-input v-model="formData[item.name]" :placeholder="'请输入' + item.name" clearable
@ -197,6 +222,9 @@ export default {
trigger: 'blur' trigger: 'blur'
}], }],
category:[], category:[],
is_packing: [],
is_label: [],
is_aspect: [],
}, },
extra_form: [] extra_form: []
} }

@ -90,9 +90,19 @@
<!-- <el-radio v-model="radio" label="2"></el-radio> --> <!-- <el-radio v-model="radio" label="2"></el-radio> -->
<el-button type="primary" @click="updateDrugRemain"></el-button> <el-button type="primary" @click="updateDrugRemain"></el-button>
<el-button type="primary" plain @click="doTare"></el-button> <el-button type="primary" plain @click="doTare"></el-button>
<el-input v-model="inputWeigh" placeholder="手动输入" />
<el-button type="warning" @click="handleSetEmpty"></el-button> <el-button type="warning" @click="handleSetEmpty"></el-button>
</div> </div>
<div>
<el-input v-model="inputWeigh" placeholder="手动输入" slot="append" style="width: 50%">
<template slot="append">
<el-select style="width: 50px" v-model="select_unit" slot="prepend" placeholder="请选择单位" >
<el-option label="g" value="g"></el-option>
<el-option label="ml" value="ml"></el-option>
</el-select>
</template>
</el-input>
</div>
</div> </div>
</div> </div>
<div class="bottom"> <div class="bottom">
@ -149,7 +159,7 @@
<script> <script>
import Scannner from '@/components/Scannner/index' import Scannner from '@/components/Scannner/index'
import { use, drug_return, use_or_return_list } from '@/api/reagent/receivingReturn' import { use, drug_return, use_or_return_list, calculate_volume_weight } from '@/api/reagent/receivingReturn'
import { import {
get_check_last_drug, get_check_last_drug,
} from '@/api/reagent/createapply' } from '@/api/reagent/createapply'
@ -180,7 +190,8 @@ export default {
surplusWeigh: '', surplusWeigh: '',
dialogVisible: false, dialogVisible: false,
place: null, place: null,
is_wait:true is_wait:true,
select_unit: ""
} }
}, },
computed: { computed: {
@ -366,7 +377,7 @@ export default {
} }
set_drug_empty_bottle(stringify(data)).then(res => { set_drug_empty_bottle(stringify(data)).then(res => {
this.$message.success(res.msg) this.$message.success(res.msg)
// //
if (this.$route.name === 'standardSendBack'){ if (this.$route.name === 'standardSendBack'){
const h = this.$createElement; const h = this.$createElement;
var msg = "" var msg = ""
@ -387,14 +398,15 @@ export default {
this.$message.warning('请选择试剂!') this.$message.warning('请选择试剂!')
} }
}, },
updateDrugRemain() { async updateDrugRemain() {
if (this.infoData.medicament_id) { if (this.infoData.medicament_id) {
const w = this.checkInputWeigh() var weight = await this.check_volume_weight()
const data = { const data = {
'bar_code': this.infoData.bar_code, 'bar_code': this.infoData.bar_code,
'medicament_id': this.infoData.medicament_id, 'medicament_id': this.infoData.medicament_id,
'remain': w ? parseFloat(this.inputWeigh).toFixed(2) : this.surplusWeigh 'remain': weight
} }
// //
if (this.$route.name == "standardReceiving"){ if (this.$route.name == "standardReceiving"){
update_drug_remain(stringify(data)).then(res => { update_drug_remain(stringify(data)).then(res => {
@ -410,7 +422,7 @@ export default {
const h = this.$createElement; const h = this.$createElement;
var msg = "" var msg = ""
if (res.data.is_liquid){ if (res.data.is_liquid){
msg += `用量:${res.data.use_quality}, 液体 体积用量:${res.data.use_volum} ${res.data.net_weight_unit}` msg += `用量:${res.data.use_quality}, 液体 体积用量:${res.data.use_volume} ${res.data.net_weight_unit}`
} else { } else {
msg += `当次用量:${res.data.use_quality} ${res.data.net_weight_unit}` msg += `当次用量:${res.data.use_quality} ${res.data.net_weight_unit}`
} }
@ -420,13 +432,39 @@ export default {
message: h('i', { style: 'color: teal'}, msg) message: h('i', { style: 'color: teal'}, msg)
}); });
}) })
} }
} else { } else {
this.$message.warning('请选择试剂!') this.$message.warning('请选择试剂!')
} }
},
//
check_volume_weight(){
return new Promise((resolve, reject) => {
const w = this.checkInputWeigh()
if (this.inputWeigh && this.select_unit == "ml") {
const data = {
"variety_id": this.infoData.variety_id,
'input_volume': parseFloat(this.inputWeigh).toFixed(2)
}
calculate_volume_weight(stringify(data)).then(res => {
if (res.status == 0){
resolve(res.data.weight)
} else {
this.$message.error(res.msg)
reject(res.msg)
}
})
} else {
resolve(w ? parseFloat(this.inputWeigh).toFixed(2) : this.surplusWeigh)
}
})
} }
} }
} }
</script> </script>

@ -45,6 +45,9 @@
<el-tag :type="statusColorMap[scope.row.status-1]">{{ statusMap[scope.row.status - 1] }}</el-tag> <el-tag :type="statusColorMap[scope.row.status-1]">{{ statusMap[scope.row.status - 1] }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" property="is_packing" label="包装是否完好" :formatter="formatInfo" />
<el-table-column align="center" property="is_label" label="标签是否清晰" :formatter="formatInfo"/>
<el-table-column align="center" property="is_aspect" label="外观是否符合要求" :formatter="formatInfo"/>
<el-table-column align="center" property="by_user_name" label="最后使用人" /> <el-table-column align="center" property="by_user_name" label="最后使用人" />
<el-table-column align="center" property="client_id" label="所属终端"> <el-table-column align="center" property="client_id" label="所属终端">
<template slot-scope="scope"> <template slot-scope="scope">
@ -137,6 +140,10 @@ export default {
}).finally(() => { }).finally(() => {
this.loadingReagent = false this.loadingReagent = false
}) })
},
//
formatInfo(row, column) {
return row[column.property] == 1 ? "是" : "否"
} }
} }
} }

Loading…
Cancel
Save