|
|
@ -10,15 +10,15 @@
|
|
|
|
<!--</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="UDI码" v-if="destroyType == 2">
|
|
|
|
<el-descriptions-item label="UDI码" v-if="destroyType == 2">
|
|
|
|
{{prescribeData.code}}
|
|
|
|
{{ prescribeData.code }}
|
|
|
|
</el-descriptions-item>
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="产品名称" >{{ prescribeData.cpmctymc }}</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="剩余数量" custom-style class="custom-label">
|
|
|
|
<el-descriptions-item label="剩余数量" custom-style class="custom-label">
|
|
|
|
<el-tag size="small">{{prescribeData.reCount}}</el-tag>
|
|
|
|
<el-tag size="small">{{ prescribeData.reCount }}</el-tag>
|
|
|
|
<!--<el-tag type="danger">{{ prescribeData.reCount}}</el-tag>-->
|
|
|
|
<!--<el-tag type="danger">{{ prescribeData.reCount}}</el-tag>-->
|
|
|
|
</el-descriptions-item>
|
|
|
|
</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="生产日期">{{ produceDate }}</el-descriptions-item>
|
|
|
|
<el-descriptions-item label="生产日期">{{ produceDate }}</el-descriptions-item>
|
|
|
@ -29,11 +29,13 @@
|
|
|
|
</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>-->
|
|
|
|
|
|
|
|
|
|
|
|
<el-form :inline="true" :model="formData" class="demo-form-inline" style="margin-top: 30px" :rules="rules" ref="formRef">
|
|
|
|
<el-form :inline="true" :model="formData" class="demo-form-inline" style="margin-top: 30px" :rules="rules"
|
|
|
|
|
|
|
|
ref="formRef">
|
|
|
|
<el-row :gutter="24">
|
|
|
|
<el-row :gutter="24">
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-col :span="10">
|
|
|
|
<el-form-item label="损耗出库数量" prop="count">
|
|
|
|
<el-form-item label="损耗出库数量" prop="count">
|
|
|
|
<el-input v-model.number="formData.count" placeholder="请填写损耗出库数量" type="number" :min="1" @input="checkCount"></el-input>
|
|
|
|
<el-input v-model.number="formData.count" placeholder="请填写损耗出库数量" type="number" :min="1"
|
|
|
|
|
|
|
|
@input="checkCount"></el-input>
|
|
|
|
<!--<span v-if="countExceeded" class="exceeded-message">损耗出库数量不能超过10个</span>-->
|
|
|
|
<!--<span v-if="countExceeded" class="exceeded-message">损耗出库数量不能超过10个</span>-->
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -58,7 +60,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { destroyOut, destroyOutByCode } from '@/api/collect/IoDestroy'
|
|
|
|
import {destroyOut, destroyOutByCode, destroySplitOut} from '@/api/collect/IoDestroy'
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: 'destroyOutDialog',
|
|
|
|
name: 'destroyOutDialog',
|
|
|
@ -78,22 +80,22 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
formData:{},
|
|
|
|
formData: {},
|
|
|
|
produceDate: null,
|
|
|
|
produceDate: null,
|
|
|
|
expireDate: null,
|
|
|
|
expireDate: null,
|
|
|
|
saveLoading: false,
|
|
|
|
saveLoading: false,
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
count: [
|
|
|
|
count: [
|
|
|
|
{ validator: this.validateCount,message: '损耗出库数量不能超出剩余数量',trigger: 'blur' }
|
|
|
|
{validator: this.validateCount, message: '损耗出库数量不能超出剩余数量', trigger: 'blur'}
|
|
|
|
]
|
|
|
|
]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
conversionDate(dateString){
|
|
|
|
conversionDate(dateString) {
|
|
|
|
const parts = dateString.split('');
|
|
|
|
const parts = dateString.split('');
|
|
|
|
const year = '20' + parts.slice(0, 2).join('') ;
|
|
|
|
const year = '20' + parts.slice(0, 2).join('');
|
|
|
|
const month = parts[2] + parts[3];
|
|
|
|
const month = parts[2] + parts[3];
|
|
|
|
const day = parts[4] + parts[5];
|
|
|
|
const day = parts[4] + parts[5];
|
|
|
|
return `${year}-${month}-${day}`;
|
|
|
|
return `${year}-${month}-${day}`;
|
|
|
@ -109,13 +111,13 @@ export default {
|
|
|
|
// 这里可以调用表单验证方法
|
|
|
|
// 这里可以调用表单验证方法
|
|
|
|
this.$refs.formRef.validateField('count');
|
|
|
|
this.$refs.formRef.validateField('count');
|
|
|
|
},
|
|
|
|
},
|
|
|
|
closeAddDialog(){
|
|
|
|
closeAddDialog() {
|
|
|
|
this.closeDialog()
|
|
|
|
this.closeDialog()
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
//损耗出库
|
|
|
|
//损耗出库
|
|
|
|
destroyOutOrder(){
|
|
|
|
destroyOutOrder() {
|
|
|
|
if ( this.formData.count == null){
|
|
|
|
if (this.formData.count == null) {
|
|
|
|
return this.$message.error("请输入损耗数量")
|
|
|
|
return this.$message.error("请输入损耗数量")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let query = {
|
|
|
|
let query = {
|
|
|
@ -123,32 +125,34 @@ export default {
|
|
|
|
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,
|
|
|
|
code: this.prescribeData.code,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.destroyType == 1){
|
|
|
|
if (this.destroyType == 1) {
|
|
|
|
destroyOut(query).then(res => {
|
|
|
|
destroyOut(query).then(res => {
|
|
|
|
if (res.code == 20000){
|
|
|
|
if (res.code == 20000) {
|
|
|
|
this.closeDialog()
|
|
|
|
this.closeDialog()
|
|
|
|
return this.$message.success("损耗出库成功")
|
|
|
|
return this.$message.success("损耗出库成功")
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
return this.$message.error(res.message)
|
|
|
|
return this.$message.error(res.message)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}else {
|
|
|
|
} else if (this.destroyType == 1) {
|
|
|
|
destroyOutByCode(query).then(res => {
|
|
|
|
destroySplitOut(query).then(res => {
|
|
|
|
if (res.code == 20000){
|
|
|
|
if (res.code == 20000) {
|
|
|
|
this.closeDialog()
|
|
|
|
this.closeDialog()
|
|
|
|
return this.$message.success("损耗出库成功")
|
|
|
|
return this.$message.success("损耗出库成功")
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
return this.$message.error("损耗出库失败")
|
|
|
|
return this.$message.error("损耗出库失败")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
} else if (this.destroyType == 3) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
destroyOutByCodeOrder(){
|
|
|
|
destroyOutByCodeOrder() {
|
|
|
|
if ( this.formData.count == null){
|
|
|
|
if (this.formData.count == null) {
|
|
|
|
return this.$message.error("请输入损耗数量")
|
|
|
|
return this.$message.error("请输入损耗数量")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let query = {
|
|
|
|
let query = {
|
|
|
@ -156,21 +160,21 @@ export default {
|
|
|
|
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.formData.code,
|
|
|
|
code: this.formData.code,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
if (this.prescribeData.produceDate != null){
|
|
|
|
if (this.prescribeData.produceDate != null) {
|
|
|
|
this.produceDate = this.conversionDate(this.prescribeData.produceDate)
|
|
|
|
this.produceDate = this.conversionDate(this.prescribeData.produceDate)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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){
|
|
|
|
if (this.destroyType == 2) {
|
|
|
|
this.prescribeData.reCount = this.prescribeData.totalCount
|
|
|
|
this.prescribeData.reCount = this.prescribeData.totalCount
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|