refactor(src/views/reagent/warehousing): 新增试剂模板添加节流功能

duizhaopin_ui
duan 2 years ago
parent fbff08cc9c
commit 606c99de61

@ -118,7 +118,7 @@
</div>
</template>
<script>
import { throttle } from '@/utils'
export default {
name: 'ReagentForm',
// title dialog title
@ -178,7 +178,7 @@ export default {
}
},
methods: {
handleConfirm() {
handleConfirm: throttle(function() {
this.$refs['elForm'].validate(valid => {
if (valid) {
//
@ -197,7 +197,7 @@ export default {
}
if (!valid) return
})
},
}, 2000),
//
strToDate(datestr) {
return new Date(datestr)

@ -224,7 +224,7 @@ import Scanner from '@/components/Scannner/index'
import { show_tmp, select_drug, bind_tmp_enter_warehouse, add_tmp, del_tmp } from '@/api/reagent/warehousing'
import stringify from '@/utils/stringify'
import { getClients } from '@/views/reagent/mixin/getClients'
import { throttle } from '@/utils'
export default {
name: 'Warehousing',
components: { ReagentForm, Scanner },
@ -446,7 +446,7 @@ export default {
this.reagentAddClient = null
this.reagentAddTmpData = []
},
handleAddSave() {
handleAddSave: throttle(function() {
if (!this.reagentAddTmpName) {
this.$message.warning('请输入模板名称!')
return
@ -467,7 +467,7 @@ export default {
}
}
)
},
}, 2000),
//
handleADDOpen(t) {
if (t === 'add') {

Loading…
Cancel
Save