|
|
|
@ -72,6 +72,7 @@
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
checkTempCode,
|
|
|
|
|
findByCode,
|
|
|
|
|
saveCode, tabCode
|
|
|
|
|
} from "@/api/inout/code";
|
|
|
|
@ -113,7 +114,20 @@ export default {
|
|
|
|
|
methods: {
|
|
|
|
|
saveCode() {
|
|
|
|
|
if (this.editType == 1) {
|
|
|
|
|
//校验该单有没有存在同序列号的码
|
|
|
|
|
if (!isBlank(this.editData.serialNo)) {
|
|
|
|
|
checkTempCode(this.editData).then((response) => {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.repeatAddCode(this.editData);
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
this.repeatAddCode(this.editData);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// tabCode(this.editData)
|
|
|
|
|
// .then((response) => {
|
|
|
|
@ -171,17 +185,17 @@ export default {
|
|
|
|
|
this.editData = JSON.parse(JSON.stringify(this.codeDetail));
|
|
|
|
|
this.findByCode();
|
|
|
|
|
//判断三区有数据的不允许修改
|
|
|
|
|
if(isBlank(this.editData.produceDate)){
|
|
|
|
|
this.isProduceDate=true
|
|
|
|
|
if (isBlank(this.editData.produceDate)) {
|
|
|
|
|
this.isProduceDate = true
|
|
|
|
|
}
|
|
|
|
|
if(isBlank(this.editData.expireDate)){
|
|
|
|
|
this.isExpireDate=true
|
|
|
|
|
if (isBlank(this.editData.expireDate)) {
|
|
|
|
|
this.isExpireDate = true
|
|
|
|
|
}
|
|
|
|
|
if(isBlank(this.editData.batchNo)){
|
|
|
|
|
this.isBatchNo=true
|
|
|
|
|
if (isBlank(this.editData.batchNo)) {
|
|
|
|
|
this.isBatchNo = true
|
|
|
|
|
}
|
|
|
|
|
if(isBlank(this.editData.serialNo)){
|
|
|
|
|
this.isSerialNo=true
|
|
|
|
|
if (isBlank(this.editData.serialNo)) {
|
|
|
|
|
this.isSerialNo = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|