luojie 4 weeks ago
parent
commit
ac6fb0bf5f
10 changed files with 414 additions and 175 deletions
  1. +2
    -0
      src/main.js
  2. +16
    -1
      src/utils/ruoyi.js
  3. +2
    -1
      src/views/business/comps/common/sign.vue
  4. +1
    -1
      src/views/business/comps/template/dialog/EditSign.vue
  5. +2
    -1
      src/views/business/form/drug/comp/sign.vue
  6. +2
    -1
      src/views/business/form/nonTrial/comp/sign.vue
  7. +186
    -0
      src/views/business/storageLocation/comps/Bj.vue
  8. +187
    -0
      src/views/business/storageLocation/comps/Xz.vue
  9. +13
    -169
      src/views/business/storageLocation/list.vue
  10. +3
    -1
      src/views/business/study/comp/sign.vue

+ 2
- 0
src/main.js View File

@ -21,6 +21,7 @@ import { getConfigKey } from '@/api/system/config'
import { import {
parseTime, parseTime,
resetForm, resetForm,
clearFormValidate,
addDateRange, addDateRange,
selectDictLabel, selectDictLabel,
selectDictLabels, selectDictLabels,
@ -50,6 +51,7 @@ Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey Vue.prototype.getConfigKey = getConfigKey
Vue.prototype.parseTime = parseTime Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm Vue.prototype.resetForm = resetForm
Vue.prototype.clearFormValidate = clearFormValidate
Vue.prototype.addDateRange = addDateRange Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.selectDictLabels = selectDictLabels

+ 16
- 1
src/utils/ruoyi.js View File

@ -51,11 +51,26 @@ export function parseTime(time, pattern) {
// 表单重置 // 表单重置
export function resetForm(refName) { export function resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields()
}
}
// 表单清除验证
export function clearFormValidate(refName) {
setTimeout(() => { setTimeout(() => {
if (this.$refs[refName]) { if (this.$refs[refName]) {
this.$refs[refName].resetFields()
this.$refs[refName].clearValidate()
} }
}, 100) }, 100)
// if (this.$refs[refName]) {
// this.$refs[refName].clearValidate()
// }
// else {
// setTimeout(() => {
// this.clearFormValidate(refName)
// }, 100)
// }
} }
// 添加日期范围 // 添加日期范围

+ 2
- 1
src/views/business/comps/common/sign.vue View File

@ -106,7 +106,7 @@ export default {
jyksrq: selectedDate && selectedDate.length > 0 ? selectedDate[0] : '', jyksrq: selectedDate && selectedDate.length > 0 ? selectedDate[0] : '',
jyjsrq: selectedDate && selectedDate.length > 0 ? selectedDate[1] : '' jyjsrq: selectedDate && selectedDate.length > 0 ? selectedDate[1] : ''
} }
this.resetForm("signForm")
this.open = true this.open = true
this.isReson = isReson || false this.isReson = isReson || false
@ -142,6 +142,7 @@ export default {
}] }]
} }
} }
this.clearFormValidate("signForm")
}, },
cancel() { cancel() {
this.open = false this.open = false

+ 1
- 1
src/views/business/comps/template/dialog/EditSign.vue View File

@ -98,8 +98,8 @@ export default {
qmrmm:'', qmrmm:'',
} }
this.isChecked = false this.isChecked = false
this.resetForm("formEditSignForm")
this.open = true this.open = true
this.clearFormValidate("formEditSignForm")
}, },
cancel() { cancel() {
this.open = false this.open = false

+ 2
- 1
src/views/business/form/drug/comp/sign.vue View File

@ -114,7 +114,7 @@ export default {
startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'', startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'',
endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:'' endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:''
} }
this.resetForm("signForm")
this.open = true this.open = true
this.isReson = isReson || false this.isReson = isReson || false
@ -150,6 +150,7 @@ export default {
}] }]
} }
} }
this.clearFormValidate("signForm")
}, },
cancel() { cancel() {
this.open = false this.open = false

+ 2
- 1
src/views/business/form/nonTrial/comp/sign.vue View File

@ -114,7 +114,7 @@ export default {
startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'', startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'',
endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:'' endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:''
} }
this.resetForm("signForm")
this.open = true this.open = true
this.isReson = isReson || false this.isReson = isReson || false
@ -150,6 +150,7 @@ export default {
}] }]
} }
} }
this.clearFormValidate("signForm")
}, },
cancel() { cancel() {
this.open = false this.open = false

+ 186
- 0
src/views/business/storageLocation/comps/Bj.vue View File

@ -0,0 +1,186 @@
<template>
<div>
<!-- 编辑弹窗 -->
<el-dialog :title="title" :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.system.storageLocation.fzdd')" prop="location">
<el-input v-model="form.location" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.sbmc')" prop="name">
<el-input v-model="form.name" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.fzhj')" prop="shelfPlacement">
<el-input v-model="form.shelfPlacement" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.wc')" prop="compartment">
<BusinessSelect v-model="form.compartment" dictType="business_cctj" :multiple="true"></BusinessSelect>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.ssbm')" prop="deptId">
<SelectDept v-model="form.deptId" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.zt')" prop="status">
<el-select v-model="form.status" :placeholder="$t('form.placeholderSelect')" style="width: 100%;">
<el-option key="1" :label="$t('page.system.storageLocation.no')" :value="1" />
<el-option key="10" :label="$t('page.system.storageLocation.yes')" :value="10" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input v-model="form.qmyy" disabled :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('form.signer')" prop="qmrmc">
<el-input v-model="nickName" disabled :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm">
<div class="sbzdtcma"> <input type="text"></div>
<el-input v-model="form.qmrmm" show-password :placeholder="$t('form.placeholderInput')" type="password"
maxlength="20" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ $t('form.saveConfirm') }}</el-button>
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { storageLocation_add, storageLocation_edit, storageLocation_info } from '@/api/business/storageLocation/storageLocation'
import { mapGetters } from 'vuex'
import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectDept from '@/views/business/comps/select/SelectDept';
export default {
name: "StorageLocationBj",
components: { BusinessSelect, SelectDept },
data() {
return {
ids: [],
open: false,
form: {},
title: '',
//
rules: {
location: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
name: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
shelfPlacement: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
compartment: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "blur" }
],
deptId: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
],
status: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
],
qmrmm: [
{ required: true, message: this.$t('form.signerPsw') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 20, message: this.$t('form.signerPsw') + this.$t('form.lengthLimit') + '20', trigger: 'blur' }
]
}
}
},
computed: {
...mapGetters([
'nickName','name'
]),
},
created() {
},
methods: {
cancel() {
this.open = false
},
reset() {
this.form = {
compartment: null,
deptId: null,
deptName: null,
location: null,
name: null,
status: null,
shelfPlacement: null,
wc: null,
qmrmm: null,
}
this.resetForm("form")
},
showEdit(row) {
this.reset()
storageLocation_info({id: row.id}).then(response => {
this.form = response.data
this.form.qmyy = this.$t('page.system.storageLocation.editStroageLocation'),
this.title = this.$t('form.edit')
this.open = true
})
},
showAdd() {
this.reset()
this.title = this.$t('form.add')
this.form.qmyy = this.$t('page.system.storageLocation.addStroageLocation'),
this.open = true
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id) {
storageLocation_edit(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.$emit('callback')
})
} else {
storageLocation_add(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.$emit('callback')
})
}
}
})
},
onChangeCcwz(val) {
this.form.cctj = val.wc
}
}
}
</script>

+ 187
- 0
src/views/business/storageLocation/comps/Xz.vue View File

@ -0,0 +1,187 @@
<template>
<div>
<!-- 编辑弹窗 -->
<el-dialog :title="title" :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.system.storageLocation.fzdd')" prop="location">
<el-input v-model="form.location" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.sbmc')" prop="name">
<el-input v-model="form.name" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.fzhj')" prop="shelfPlacement">
<el-input v-model="form.shelfPlacement" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.wc')" prop="compartment">
<BusinessSelect v-model="form.compartment" dictType="business_cctj" :multiple="true"></BusinessSelect>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.ssbm')" prop="deptId">
<SelectDept v-model="form.deptId" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.zt')" prop="status">
<el-select v-model="form.status" :placeholder="$t('form.placeholderSelect')" style="width: 100%;">
<el-option key="1" :label="$t('page.system.storageLocation.no')" :value="1" />
<el-option key="10" :label="$t('page.system.storageLocation.yes')" :value="10" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input v-model="form.qmyy" disabled :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('form.signer')" prop="qmrmc">
<el-input v-model="nickName" disabled :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm">
<div class="sbzdtcma"> <input type="text"></div>
<el-input v-model="form.qmrmm" show-password :placeholder="$t('form.placeholderInput')" type="password"
maxlength="20" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ $t('form.saveConfirm') }}</el-button>
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { storageLocation_add, storageLocation_edit, storageLocation_info } from '@/api/business/storageLocation/storageLocation'
import { mapGetters } from 'vuex'
import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectDept from '@/views/business/comps/select/SelectDept';
export default {
name: "StorageLocationBj",
components: { BusinessSelect, SelectDept },
data() {
return {
ids: [],
open: false,
form: {},
title: '',
//
rules: {
location: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
name: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
shelfPlacement: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
compartment: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "blur" }
],
deptId: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
],
status: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
],
qmrmm: [
{ required: true, message: this.$t('form.signerPsw') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 20, message: this.$t('form.signerPsw') + this.$t('form.lengthLimit') + '20', trigger: 'blur' }
]
}
}
},
computed: {
...mapGetters([
'nickName','name'
]),
},
created() {
},
methods: {
cancel() {
this.reset()
this.open = false
},
reset() {
this.form = {
compartment: null,
deptId: null,
deptName: null,
location: null,
name: null,
status: null,
shelfPlacement: null,
wc: null,
qmrmm: null,
}
this.resetForm("form")
},
showEdit(row) {
this.reset()
storageLocation_info({id: row.id}).then(response => {
this.form = response.data
this.form.qmyy = this.$t('page.system.storageLocation.editStroageLocation'),
this.title = this.$t('form.edit')
this.open = true
})
},
showAdd() {
this.reset()
this.title = this.$t('form.add')
this.form.qmyy = this.$t('page.system.storageLocation.addStroageLocation'),
this.open = true
},
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id) {
storageLocation_edit(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.$emit('callback')
})
} else {
storageLocation_add(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.$emit('callback')
})
}
}
})
},
onChangeCcwz(val) {
this.form.cctj = val.wc
}
}
}
</script>

+ 13
- 169
src/views/business/storageLocation/list.vue View File

@ -11,8 +11,9 @@
<el-form-item :label="$t('page.system.storageLocation.fzhj') + ':'" prop="shelfPlacement"> <el-form-item :label="$t('page.system.storageLocation.fzhj') + ':'" prop="shelfPlacement">
<el-input v-model="queryParams.shelfPlacement" placeholder="" clearable @keyup.enter.native="handleQuery" /> <el-input v-model="queryParams.shelfPlacement" placeholder="" clearable @keyup.enter.native="handleQuery" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('page.system.storageLocation.zt')" prop="status" >
<el-select v-model="queryParams.status" :placeholder="$t('form.placeholderSelect')" clearable @change="handleQuery">
<el-form-item :label="$t('page.system.storageLocation.zt')" prop="status">
<el-select v-model="queryParams.status" :placeholder="$t('form.placeholderSelect')" clearable
@change="handleQuery">
<el-option key="1" :label="$t('page.system.storageLocation.no')" :value="1" /> <el-option key="1" :label="$t('page.system.storageLocation.no')" :value="1" />
<el-option key="10" :label="$t('page.system.storageLocation.yes')" :value="10" /> <el-option key="10" :label="$t('page.system.storageLocation.yes')" :value="10" />
</el-select> </el-select>
@ -56,111 +57,36 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" /> @pagination="getList" />
<!-- 添加或修改仪器管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.fzdd')" prop="location">
<el-input v-model="form.location" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.sbmc')" prop="name">
<el-input v-model="form.name" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.fzhj')" prop="shelfPlacement">
<el-input v-model="form.shelfPlacement" :placeholder="$t('form.placeholderInput')" maxlength="50" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.wc')" prop="compartment">
<BusinessSelect v-model="form.compartment" dictType="business_cctj" :multiple="true"></BusinessSelect>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.ssbm')" prop="deptId">
<SelectDept v-model="form.deptId" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('page.system.storageLocation.zt')" prop="status">
<el-select v-model="form.status" :placeholder="$t('form.placeholderSelect')" style="width: 100%;">
<el-option key="1" :label="$t('page.system.storageLocation.no')" :value="1" />
<el-option key="10" :label="$t('page.system.storageLocation.yes')" :value="10" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.qmyy')" prop="qmyy">
<el-input v-model="form.qmyy" disabled :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('form.signer')" prop="qmrmc">
<el-input v-model="nickName" disabled :placeholder="$t('form.placeholderInput')" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item :label="$t('form.signerPsw')" prop="qmrmm">
<div class="sbzdtcma"> <input type="text"></div>
<el-input v-model="form.qmrmm" show-password
:placeholder="$t('form.placeholderInput')" type="password" maxlength="20" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">{{ $t('form.saveConfirm') }}</el-button>
<el-button @click="cancel">{{ $t('form.cancel') }}</el-button>
</div>
</el-dialog>
<StorageLocationDetail ref="storageLocationDetail"/>
<StorageLocationDetail ref="storageLocationDetail" />
<Bj ref="Bj" @callback="handleQuery"/>
<Xz ref="Xz" @callback="handleQuery"/>
</div> </div>
</template> </template>
<script> <script>
import { storageLocation_list, storageLocation_add, storageLocation_edit } from '@/api/business/storageLocation/storageLocation'
import { storageLocation_list } from '@/api/business/storageLocation/storageLocation'
import BusinessSelect from '@/views/business/comps/select/BusinessSelect'; import BusinessSelect from '@/views/business/comps/select/BusinessSelect';
import SelectDept from '@/views/business/comps/select/SelectDept'; import SelectDept from '@/views/business/comps/select/SelectDept';
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import SelectStorageLocation from '@/views/business/comps/select/SelectStorageLocation'
import StorageLocationDetail from './comps/detail' import StorageLocationDetail from './comps/detail'
import Bj from "./comps/Bj";
import Xz from "./comps/Xz";
export default { export default {
name: 'StorageLocation', name: 'StorageLocation',
components: { BusinessSelect, SelectDept, SelectStorageLocation, StorageLocationDetail },
components: { BusinessSelect, SelectDept, StorageLocationDetail, Bj, Xz },
data() { data() {
return { return {
// //
loading: true, loading: true,
//
single: true,
//
multiple: true,
// //
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
list: [], list: [],
//
title: '',
//
open: false,
// //
dateRange: [], dateRange: [],
// //
@ -171,39 +97,7 @@ export default {
name: null, name: null,
shelfPlacement: null, shelfPlacement: null,
}, },
//
form: {
'qmyy': this.$t('page.form.add'),
qmrmm: null,
},
//
rules: {
location: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
name: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
shelfPlacement: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 50, message: this.$t('form.lengthLimit') + '50', trigger: 'blur' }
],
compartment: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "blur" }
],
deptId: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
],
status: [
{ required: true, message: this.$t('form.notEmpty'), trigger: "change" },
],
qmrmm: [
{ required: true, message: this.$t('form.signerPsw') + this.$t('form.notEmpty'), trigger: "change" },
{ min: 0, max: 20, message: this.$t('form.signerPsw') + this.$t('form.lengthLimit') + '20', trigger: 'blur' }
]
}
} }
}, },
computed: { computed: {
@ -224,29 +118,6 @@ export default {
this.loading = false this.loading = false
}) })
}, },
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
id: null,
mc: null,
bh: null,
xh: null,
ly: null,
jzrq: null,
bmId: null,
wc: null,
ccwz: null,
fzdd: null,
qmrmm: null,
qmyy: this.$t('page.system.storageLocation.addStroageLocation'),
}
this.resetForm('form')
},
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
@ -260,42 +131,15 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset()
this.open = true
this.title = this.$t('form.add')
this.$refs.Bj.showAdd()
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset()
this.form = row
this.form.qmyy = this.$t('page.system.storageLocation.editStroageLocation')
this.open = true
this.title = this.$t('form.edit')
this.$refs.Bj.showEdit(row)
}, },
handleDetail(row) { handleDetail(row) {
this.$refs.storageLocationDetail.show(row) this.$refs.storageLocationDetail.show(row)
}, },
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate((valid) => {
if (valid) {
if (this.form.id) {
storageLocation_edit(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.getList()
})
} else {
storageLocation_add(this.form).then((response) => {
this.$modal.msgSuccess(this.$t('form.operationSuccess'))
this.open = false
this.getList()
})
}
}
})
},
} }
} }
</script> </script>

+ 3
- 1
src/views/business/study/comp/sign.vue View File

@ -114,7 +114,7 @@ export default {
startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'', startDate:selectedDate&&selectedDate.length>0?selectedDate[0]:'',
endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:'' endDate:selectedDate&&selectedDate.length>1?selectedDate[1]:''
} }
this.resetForm("signForm")
this.open = true this.open = true
this.isReson = isReson || false this.isReson = isReson || false
@ -150,6 +150,8 @@ export default {
}] }]
} }
} }
this.clearFormValidate("signForm")
}, },
cancel() { cancel() {
this.open = false this.open = false

Loading…
Cancel
Save