|
|
|
@ -0,0 +1,129 @@ |
|
|
|
G<template> |
|
|
|
<div class="app-container"> |
|
|
|
<!-- 锁定弹窗 --> |
|
|
|
<el-dialog :title="$t('form.lock')" :visible.sync="open" width="500px" append-to-body |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<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-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item :label="$t('form.remark')" prop="remark"> |
|
|
|
<el-input type="textarea" v-model="form.remark" :rows="2" maxlength="500" |
|
|
|
:placeholder="$t('form.placeholderInput')"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<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.password')" prop="sdrmm"> |
|
|
|
<el-input type="text" v-model="form.sdrmm" maxlength="20" :placeholder="$t('form.placeholderInput')" /> |
|
|
|
</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 { mjy_sd, mjy_sdBatch } from "@/api/business/mjy/mjy" |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "MjySd", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
isBatch: false, |
|
|
|
ids: [], |
|
|
|
selectList: [], |
|
|
|
open: false, |
|
|
|
form: {}, |
|
|
|
rules: { |
|
|
|
sdrmm: [{ |
|
|
|
required: true, |
|
|
|
message: ' ', |
|
|
|
trigger: 'blur' |
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'nickName' |
|
|
|
]), |
|
|
|
}, |
|
|
|
created() { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
showBatch(val) { |
|
|
|
this.reset() |
|
|
|
this.isBatch = true |
|
|
|
this.form.ids = val.map(item => item.id) |
|
|
|
this.selectList = val |
|
|
|
this.open = true |
|
|
|
}, |
|
|
|
cancel() { |
|
|
|
this.open = false |
|
|
|
}, |
|
|
|
reset() { |
|
|
|
this.form = { |
|
|
|
id: null, |
|
|
|
ids: null, |
|
|
|
mc: null, |
|
|
|
bh: null, |
|
|
|
qmyy: '锁定麻精药', |
|
|
|
sdrmm: null |
|
|
|
} |
|
|
|
this.resetForm("form") |
|
|
|
}, |
|
|
|
show(row) { |
|
|
|
this.reset() |
|
|
|
this.isBatch = false |
|
|
|
this.form.ids = [] |
|
|
|
this.selectList = [] |
|
|
|
this.form.id = row.id |
|
|
|
this.form.mc = row.mc |
|
|
|
this.form.bh = row.bh |
|
|
|
this.open = true |
|
|
|
}, |
|
|
|
save() { |
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
if (this.isBatch) { |
|
|
|
mjy_sdBatch(this.form).then(response => { |
|
|
|
this.open = false |
|
|
|
this.$emit('callback') |
|
|
|
}) |
|
|
|
} else { |
|
|
|
mjy_sd(this.form).then(response => { |
|
|
|
this.open = false |
|
|
|
this.$emit('callback') |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |