三期存在数据不允许修改

dev
郑明梁 2 years ago
parent 38fe45ed41
commit 0ef786ab01

@ -18,7 +18,7 @@
<el-input v-model="editData.produceDate" auto-complete="off" <el-input v-model="editData.produceDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)" oninput="if(value.length>6)value=value.slice(0,6)"
type="number" type="number"
:disabled="editType!=1 || editData.produceDate!=null"></el-input> :disabled="editType!=1 || !isProduceDate"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
@ -26,19 +26,19 @@
<el-input v-model="editData.expireDate" auto-complete="off" <el-input v-model="editData.expireDate" auto-complete="off"
oninput="if(value.length>6)value=value.slice(0,6)" oninput="if(value.length>6)value=value.slice(0,6)"
type="number" type="number"
:disabled="editType!=1 || editData.expireDate!=null"></el-input> :disabled="editType!=1 || !isExpireDate"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="batchNo" label="批次号"> <el-form-item prop="batchNo" label="批次号">
<el-input v-model="editData.batchNo" auto-complete="off" :disabled="editType!=1 || editData.batchNo!=null"></el-input> <el-input v-model="editData.batchNo" auto-complete="off" :disabled="editType!=1 || !isBatchNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item prop="serialNo" label="序列号"> <el-form-item prop="serialNo" label="序列号">
<el-input v-model="editData.serialNo" auto-complete="off" :disabled="editType!=1 || editData.serialNo!=null"></el-input> <el-input v-model="editData.serialNo" auto-complete="off" :disabled="editType!=1 || !isSerialNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -75,6 +75,7 @@ import {
findByCode, findByCode,
saveCode saveCode
} from "@/api/inout/code"; } from "@/api/inout/code";
import { isBlank } from '@/utils/strUtil'
export default { export default {
name: "editCode", name: "editCode",
@ -101,7 +102,11 @@ export default {
data() { data() {
return { return {
xlhEnable: false, xlhEnable: false,
isUseDyCheck: false isUseDyCheck: false,
isProduceDate: false,
isExpireDate: false,
isBatchNo: false,
isSerialNo: false,
}; };
}, },
@ -154,6 +159,19 @@ export default {
this.editData = JSON.parse(JSON.stringify(this.codeDetail)); this.editData = JSON.parse(JSON.stringify(this.codeDetail));
this.findByCode(); this.findByCode();
//
if(isBlank(this.editData.produceDate)){
this.isProduceDate=true
}
if(isBlank(this.editData.expireDate)){
this.isExpireDate=true
}
if(isBlank(this.editData.batchNo)){
this.isBatchNo=true
}
if(isBlank(this.editData.serialNo)){
this.isSerialNo=true
}
} }
} }
</script> </script>

Loading…
Cancel
Save