|
|
@ -0,0 +1,234 @@ |
|
|
|
|
|
G<template> |
|
|
|
|
|
<div> |
|
|
|
|
|
<!-- 新增试验间弹窗 --> |
|
|
|
|
|
<el-dialog :title="$t('page.business.study.studyRoom.xzsyj')" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false"> |
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<!-- 名称 --> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.mc')" prop="mc"> |
|
|
|
|
|
<el-input type="text" v-model="form.mc" maxlength="50" :placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<!-- 编号 --> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.bh')" prop="bh"> |
|
|
|
|
|
<el-input type="text" v-model="form.bh" maxlength="50" :placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<!-- 批号 --> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.ph')" prop="ph"> |
|
|
|
|
|
<el-input type="text" v-model="form.ph" maxlength="50" :placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<!-- 规格 --> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.gg')" prop="gg"> |
|
|
|
|
|
<el-input type="text" v-model="form.gg" maxlength="50" :placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<!-- 规格单位 --> |
|
|
|
|
|
<el-col :span="4"> |
|
|
|
|
|
<BusinessSelect v-model="form.ggdw" |
|
|
|
|
|
dictType="system_business_nddw,system_business_zldw,system_business_tjdw"></BusinessSelect> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<!-- 库存量 --> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.kcl')" prop="kc"> |
|
|
|
|
|
<el-input type="number" v-model="form.kc" maxlength="50" :placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<!-- 库存量单位 --> |
|
|
|
|
|
<el-col :span="4"> |
|
|
|
|
|
<BusinessSelect v-model="form.kcdw" |
|
|
|
|
|
dictType="system_business_nddw,system_business_zldw,system_business_tjdw"></BusinessSelect> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.yxq')" prop="yxq"> |
|
|
|
|
|
<el-date-picker v-model="form.yxq" type="datetime" format="yyyy-MM-dd HH:mm" |
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('form.placeholderInput')"> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<!-- 存储条件 --> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.cctj')" prop="cctj"> |
|
|
|
|
|
<BusinessSelect v-model="form.cctj" dictType="system_business_cctj"></BusinessSelect> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<!-- 接收日期 --> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.jsrq')" prop="jsrq"> |
|
|
|
|
|
<el-date-picker v-model="form.jsrq" type="datetime" format="yyyy-MM-dd HH:mm" |
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('form.placeholderInput')"> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<!-- 注意事项 --> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.resource.gsp.zysx')" prop="zysx"> |
|
|
|
|
|
<el-input type="textarea" :rows="2" v-model="form.zysx" maxlength="500" |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="$t('form.qmyy')" prop="qmyy"> |
|
|
|
|
|
<el-input type="text" :value="form.qmyy" maxlength="50" disabled |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
<el-form-item :label="$t('form.signer')"> |
|
|
|
|
|
<el-input type="text" v-model="nickName" maxlength="50" disabled |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm"> |
|
|
|
|
|
<el-input type="password" v-model="form.qmrmm" maxlength="20" |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="24"> |
|
|
|
|
|
<el-form-item :label="$t('form.qmbz')" prop="qmbz"> |
|
|
|
|
|
<el-input type="textarea" v-model="form.qmbz" :rows="2" maxlength="500" |
|
|
|
|
|
:placeholder="$t('form.placeholderInput')"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button type="primary" @click="save">{{ $t('form.confirm') }}</el-button> |
|
|
|
|
|
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
import { save } from "@/api/business/gsp/gsp" |
|
|
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
name: "XzSyj", |
|
|
|
|
|
components: { BusinessSelect }, |
|
|
|
|
|
data() { |
|
|
|
|
|
return { |
|
|
|
|
|
open: false, |
|
|
|
|
|
form: {}, |
|
|
|
|
|
rules: { |
|
|
|
|
|
mc: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
bh: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
ph: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
gg: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
kc: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
yxq: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
jsrq: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
cctj: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
zysx: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
qmrmm: [{ |
|
|
|
|
|
required: true, |
|
|
|
|
|
message: ' ', |
|
|
|
|
|
trigger: 'blur' |
|
|
|
|
|
}], |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapGetters([ |
|
|
|
|
|
'nickName' |
|
|
|
|
|
]), |
|
|
|
|
|
}, |
|
|
|
|
|
created() { |
|
|
|
|
|
}, |
|
|
|
|
|
methods: { |
|
|
|
|
|
cancel() { |
|
|
|
|
|
this.open = false |
|
|
|
|
|
}, |
|
|
|
|
|
reset() { |
|
|
|
|
|
this.form = { |
|
|
|
|
|
id: null, |
|
|
|
|
|
mc: null, |
|
|
|
|
|
bh: null, |
|
|
|
|
|
nd: null, |
|
|
|
|
|
nddw: null, |
|
|
|
|
|
sxrq: null, |
|
|
|
|
|
cctj: null, |
|
|
|
|
|
ccwz: null, |
|
|
|
|
|
qmrmm: null, |
|
|
|
|
|
qmyy: '新增供试品', |
|
|
|
|
|
bjbz: '' |
|
|
|
|
|
} |
|
|
|
|
|
this.resetForm("form") |
|
|
|
|
|
}, |
|
|
|
|
|
show() { |
|
|
|
|
|
this.reset() |
|
|
|
|
|
|
|
|
|
|
|
this.open = true |
|
|
|
|
|
}, |
|
|
|
|
|
save() { |
|
|
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
|
|
if (valid) { |
|
|
|
|
|
save(this.form).then(response => { |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.$emit('callback') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
</script> |