| @ -1,290 +0,0 @@ | |||
| <template> | |||
| <div> | |||
| <!-- 归还弹窗 --> | |||
| <el-dialog :title="$t('page.business.resource.gyzj.sqguihuan')" :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.gyzj.mc')"> | |||
| <el-input type="text" v-model="form.mc" maxlength="50" disabled /> | |||
| </el-form-item> | |||
| </el-col> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.bh')"> | |||
| <el-input type="text" v-model="form.bh" maxlength="50" disabled /> | |||
| </el-form-item> | |||
| </el-col> | |||
| </el-row> | |||
| <el-row> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.sxrq')"> | |||
| <el-input type="text" v-model="form.sxrq" maxlength="50" disabled /> | |||
| </el-form-item> | |||
| </el-col> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.nd')"> | |||
| <el-input type="text" v-model="form.nd" maxlength="50" disabled> <template slot="append">{{ form.nddw | |||
| }}</template> | |||
| </el-input> | |||
| </el-form-item> | |||
| </el-col> | |||
| </el-row> | |||
| <el-row> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.cctj')"> | |||
| <el-input type="text" v-model="form.cctj" maxlength="50" disabled /> | |||
| </el-form-item> | |||
| </el-col> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.ccwz')"> | |||
| <el-input type="text" v-model="form.ccwz" maxlength="50" disabled /> | |||
| </el-form-item> | |||
| </el-col> | |||
| </el-row> | |||
| <el-row> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.ckjz')"> | |||
| <el-input type="text" v-model="form.ckl" maxlength="50" disabled> <template slot="append">{{ form.ckldw | |||
| }}</template> | |||
| </el-input> | |||
| </el-form-item> | |||
| </el-col> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.cksj')"> | |||
| <el-input type="text" v-model="form.ffrq" maxlength="50" disabled /> | |||
| </el-form-item> | |||
| </el-col> | |||
| </el-row> | |||
| <el-row> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.md')"> | |||
| <el-input type="text" :value="(form.mdOthers && form.mdOthers != '') ? (form.mdMcs + ',' + form.mdMcs) : form.mdMcs" | |||
| maxlength="50" disabled /> | |||
| </el-form-item> | |||
| </el-col> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.zytj')" prop="ghzytj"> | |||
| <el-input type="text" v-model="form.ghzytj" 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.gyzj.rkwz')" prop="rkwz"> | |||
| <el-input type="text" v-model="form.rkwz" maxlength="50" :placeholder="$t('form.placeholderInput')" /> | |||
| </el-form-item> | |||
| </el-col> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.rktj')" prop="rktj"> | |||
| <el-input type="text" v-model="form.rktj" maxlength="50" :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="5" maxlength="500" | |||
| :placeholder="$t('form.placeholderInput')"> | |||
| </el-input> | |||
| </el-form-item> | |||
| </el-col> | |||
| </el-row> | |||
| <el-row> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.ghr1Id')"> | |||
| <el-input type="text" v-model="nickName" maxlength="50" disabled /> | |||
| </el-form-item> | |||
| </el-col> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.ghr1Id') + $t('form.password')" prop="ghr1mm"> | |||
| <el-input type="password" v-model="form.ghr1mm" maxlength="20" | |||
| :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.gyzj.ghr2Id')" prop="ghr2Id"> | |||
| <SelectDeptUser v-model="form.ghr2Id" key="ghr2Id" /> | |||
| </el-form-item> | |||
| </el-col> | |||
| <el-col :span="12"> | |||
| <el-form-item :label="$t('page.business.resource.gyzj.ghr2Id') + $t('form.password')" prop="ghr2mm"> | |||
| <el-input type="password" v-model="form.ghr2mm" 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.qmyy')" prop="qmyy"> | |||
| <el-input type="text" :value="form.qmyy" maxlength="50" disabled /> | |||
| </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 { sqgh, info } from "@/api/business/gyzj/gyzj" | |||
| import { mapGetters } from 'vuex' | |||
| import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; | |||
| export default { | |||
| name: "Gh", | |||
| components: { SelectDeptUser }, | |||
| data() { | |||
| return { | |||
| isBatch: false, | |||
| ids: [], | |||
| selectList: [], | |||
| open: false, | |||
| form: {}, | |||
| rules: { | |||
| rkwz: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| rktj: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| ghzytj: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| rkmz: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| jsl: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| syl: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| ghr1Id: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| ghr1mm: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| ghr2Id: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| ghr2mm: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| jsr1Id: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| jsr1mm: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| jsr2Id: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }], | |||
| jsr2mm: [{ | |||
| required: true, | |||
| message: ' ', | |||
| trigger: 'blur' | |||
| }] | |||
| } | |||
| } | |||
| }, | |||
| computed: { | |||
| ...mapGetters([ | |||
| 'nickName' | |||
| ]), | |||
| }, | |||
| created() { | |||
| }, | |||
| methods: { | |||
| // rklChange() { | |||
| // if (!isNaN(this.form.rkmz)) { | |||
| // this.form.jsl = _.subtract(parseFloat(this.form.ckmz), parseFloat(this.form.rkmz)) | |||
| // }else{ | |||
| // this.form.jsl = '' | |||
| // } | |||
| // }, | |||
| cancel() { | |||
| this.open = false | |||
| }, | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| rkwz: null, | |||
| rktj: null, | |||
| ghzytj: null, | |||
| rkmz: null, | |||
| jsl: null, | |||
| syl: null, | |||
| ghr1Id: null, | |||
| ghr1mm: null, | |||
| ghr2Id: null, | |||
| ghr2mm: null, | |||
| jsr1Id: null, | |||
| jsr1mm: null, | |||
| jsr2Id: null, | |||
| jsr2mm: null, | |||
| qmyy: '归还', | |||
| } | |||
| this.resetForm("form") | |||
| }, | |||
| show(row) { | |||
| this.reset() | |||
| let that = this | |||
| info({ id: row.id }).then(response => { | |||
| that.form = _.merge({}, this.form, response.data) | |||
| that.open = true | |||
| }) | |||
| }, | |||
| save() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| this.$modal.loading() | |||
| sqgh(this.form).then(response => { | |||
| this.open = false | |||
| this.$emit('callback') | |||
| this.$modal.closeLoading() | |||
| }).finally(() => { | |||
| this.$modal.closeLoading() | |||
| }) | |||
| } | |||
| }) | |||
| } | |||
| } | |||
| } | |||
| </script> | |||