|
|
|
@ -18,7 +18,7 @@
|
|
|
|
|
<el-input v-model="editData.produceDate" auto-complete="off"
|
|
|
|
|
oninput="if(value.length>6)value=value.slice(0,6)"
|
|
|
|
|
type="number"
|
|
|
|
|
:disabled="false"></el-input>
|
|
|
|
|
:disabled="editType!=1"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="11">
|
|
|
|
@ -26,19 +26,19 @@
|
|
|
|
|
<el-input v-model="editData.expireDate" auto-complete="off"
|
|
|
|
|
oninput="if(value.length>6)value=value.slice(0,6)"
|
|
|
|
|
type="number"
|
|
|
|
|
:disabled="false"></el-input>
|
|
|
|
|
:disabled="editType!=1"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20">
|
|
|
|
|
<el-col :span="11">
|
|
|
|
|
<el-form-item prop="batchNo" label="批次号">
|
|
|
|
|
<el-input v-model="editData.batchNo" auto-complete="off" :disabled="false"></el-input>
|
|
|
|
|
<el-input v-model="editData.batchNo" auto-complete="off" :disabled="editType!=1"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="11">
|
|
|
|
|
<el-form-item prop="serialNo" label="序列号">
|
|
|
|
|
<el-input v-model="editData.serialNo" auto-complete="off"></el-input>
|
|
|
|
|
<el-input v-model="editData.serialNo" auto-complete="off" :disabled="editType!=1"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -72,13 +72,13 @@
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
findByCode,
|
|
|
|
|
saveCode
|
|
|
|
|
saveCode, tabCode
|
|
|
|
|
} from "@/api/inout/code";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "editCode",
|
|
|
|
|
props: {
|
|
|
|
|
editTye: {
|
|
|
|
|
editType: {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true,
|
|
|
|
|
},
|
|
|
|
@ -106,8 +106,20 @@ export default {
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
saveCode() {
|
|
|
|
|
if (this.editTye == 1) {
|
|
|
|
|
if (this.editType == 1) {
|
|
|
|
|
this.repeatAddCode(this.editData);
|
|
|
|
|
|
|
|
|
|
tabCode(this.editData)
|
|
|
|
|
.then((response) => {
|
|
|
|
|
console.log(response)
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.$message.success("提交成功");
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
saveCode(this.editData)
|
|
|
|
|
.then((response) => {
|
|
|
|
|