2 changed files with 65 additions and 0 deletions
@ -0,0 +1,9 @@
|
||||
import request from '@/axios'; |
||||
|
||||
export const postSyncTrayInfo = data => { |
||||
return request({ |
||||
url: '/api/logpm-warehouse/api/warehouseTrayType/batchSyncOldTrayTypeInfo', |
||||
method: 'post', |
||||
data, |
||||
}); |
||||
}; |
@ -0,0 +1,56 @@
|
||||
<template> |
||||
<div> |
||||
<div v-loading="details.loading"> |
||||
<h3 class="title">同步托盘信息功能</h3> |
||||
<h4 style="text-align: center">输入托盘码进行数据同步,多个托盘码使用英文逗号进行分隔</h4> |
||||
<div class="flex-c-c"> |
||||
<el-input |
||||
style="width: 30%; margin-right: 20px" |
||||
v-model.trim="details.trayCode" |
||||
placeholder="请输入托盘码" |
||||
clearable |
||||
></el-input> |
||||
<el-button type="primary" icon="Position" @click="handleSync">同 步</el-button> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</template> |
||||
|
||||
<script setup lang="ts"> |
||||
import { reactive } from 'vue'; |
||||
import { postSyncTrayInfo } from '@/api/warehouse/SyncTrayInfo'; |
||||
import { ElMessage } from 'element-plus'; |
||||
const details = reactive({ |
||||
/** 托盘码 */ |
||||
trayCode: '', |
||||
/** 页面loading */ |
||||
loading: false, |
||||
}); |
||||
|
||||
const handleSync = async () => { |
||||
try { |
||||
if (!details.trayCode) { |
||||
return ElMessage.error('请输入托盘码'); |
||||
} |
||||
details.loading = true; |
||||
|
||||
const res = await postSyncTrayInfo({ |
||||
trayCode: details.trayCode, |
||||
}); |
||||
|
||||
const { code, msg } = res.data; |
||||
|
||||
ElMessage.success(msg); |
||||
} catch (error) { |
||||
console.log('error :>> ', error); |
||||
} finally { |
||||
details.loading = false; |
||||
} |
||||
}; |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.title { |
||||
text-align: center; |
||||
} |
||||
</style> |
Loading…
Reference in new issue