Browse Source

feat: 库存调整

master
wangqi 2 months ago
parent
commit
5fe1310090
  1. 2
      src/api/module/eam/device/template.ts
  2. 9
      src/pages/deviceInfo/index.vue
  3. 2
      src/pages/deviceStorage/components/data-filter.vue
  4. 8
      src/pages/deviceStorage/index.vue
  5. 7
      src/pages/deviceTest/testPlan/index.vue
  6. 8
      src/pages/system/manufacturer/index.vue

2
src/api/module/eam/device/template.ts

@ -47,7 +47,7 @@ export const updateTempStatus = (id: string, enabled: number) =>
eamServer({ eamServer({
url: '/template/update-status', url: '/template/update-status',
method: 'put', method: 'put',
data: { id, enabled }, params: { id, enabled },
}) })
export const updateSheetStatus = (id: string, status: number) => export const updateSheetStatus = (id: string, status: number) =>

9
src/pages/deviceInfo/index.vue

@ -60,6 +60,7 @@
class="table" class="table"
v-loading="loading" v-loading="loading"
:data="list" :data="list"
ref="tableRef"
:highlight-current-row="true" :highlight-current-row="true"
:page-total="total" :page-total="total"
:current-page="queryParams.pageNo" :current-page="queryParams.pageNo"
@ -157,15 +158,18 @@ const total = ref(0)
const list = ref<IDevice[]>([]) const list = ref<IDevice[]>([])
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: undefined,
serialNo: undefined, serialNo: undefined,
name: undefined, name: undefined,
status: undefined, status: undefined,
categoryId: [], categoryId: [],
createTime: [], createTime: [],
}) })
const tableRef = ref()
const getList = async () => { const getList = async () => {
if (!queryParams.pageSize) {
queryParams.pageSize = tableRef.value.getSize()
}
loading.value = true loading.value = true
const options = { const options = {
@ -237,7 +241,6 @@ function addDevice() {
function onView(row: any) { function onView(row: any) {
router.push({ path: '/device/deviceOperation', query: { action: 'view', id: row.id } }) router.push({ path: '/device/deviceOperation', query: { action: 'view', id: row.id } })
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

2
src/pages/deviceStorage/components/data-filter.vue

@ -121,7 +121,7 @@ function formatParams() {
for (const key of keys) { for (const key of keys) {
if (checkbox.value[key]) { if (checkbox.value[key]) {
if (key === 'startDay' || key === 'endDay') { if (key === 'startDay' || key === 'endDay') {
params['createTime'] = [filterData.value.startDay, filterData.value.endDay] params['updateTime'] = [filterData.value.startDay, filterData.value.endDay]
} else { } else {
params[key] = filterData.value[key] params[key] = filterData.value[key]
} }

8
src/pages/deviceStorage/index.vue

@ -13,6 +13,7 @@
class="table" class="table"
v-loading="loading" v-loading="loading"
:data="list" :data="list"
ref="tableRef"
:highlight-current-row="true" :highlight-current-row="true"
:page-total="total" :page-total="total"
:current-page="queryParams.pageNo" :current-page="queryParams.pageNo"
@ -91,10 +92,13 @@ const total = ref(0)
const list = ref<any>([]) const list = ref<any>([])
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: undefined,
}) })
const tableRef = ref<any>(null)
const getList = async () => { const getList = async () => {
if (!queryParams.pageSize) {
queryParams.pageSize = tableRef.value.getSize()
}
loading.value = true loading.value = true
const res = await getStoragePage(Object.assign({}, queryParams, filter.value)) const res = await getStoragePage(Object.assign({}, queryParams, filter.value))

7
src/pages/deviceTest/testPlan/index.vue

@ -51,6 +51,7 @@
<EdfsTable <EdfsTable
class="table" class="table"
v-loading="loading" v-loading="loading"
ref="tableRef"
:data="list" :data="list"
:highlight-current-row="true" :highlight-current-row="true"
:page-total="total" :page-total="total"
@ -159,14 +160,18 @@ const total = ref(0) // 列表的总页数
const list = ref<IDeviceTemp[]>([]) // const list = ref<IDeviceTemp[]>([]) //
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: undefined,
createTime: [], createTime: [],
name: undefined, name: undefined,
enabled: undefined, enabled: undefined,
}) })
/** 查询列表 */ /** 查询列表 */
const tableRef = ref<any>(null)
const getList = async () => { const getList = async () => {
if (!queryParams.pageSize) {
queryParams.pageSize = tableRef.value.getSize()
}
loading.value = true loading.value = true
const res = await getDeviceTempPage(queryParams) const res = await getDeviceTempPage(queryParams)
if (!isResError(res)) { if (!isResError(res)) {

8
src/pages/system/manufacturer/index.vue

@ -60,6 +60,7 @@
class="table" class="table"
v-loading="loading" v-loading="loading"
:data="list" :data="list"
ref="tableRef"
:highlight-current-row="true" :highlight-current-row="true"
:page-total="total" :page-total="total"
:current-page="queryParams.pageNo" :current-page="queryParams.pageNo"
@ -157,7 +158,7 @@ const total = ref(0) // 列表的总页数
const list = ref<CustomerVO[]>([]) // const list = ref<CustomerVO[]>([]) //
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: undefined,
name: undefined, name: undefined,
contact: undefined, contact: undefined,
phone: undefined, phone: undefined,
@ -166,7 +167,11 @@ const queryParams = reactive({
}) })
/** 查询列表 */ /** 查询列表 */
const tableRef = ref<any>(null)
const getList = async () => { const getList = async () => {
if (!queryParams.pageSize) {
queryParams.pageSize = tableRef.value.getSize()
}
loading.value = true loading.value = true
const res = await getCustomerList(queryParams) const res = await getCustomerList(queryParams)
@ -238,7 +243,6 @@ const handleStatusChange = async (row: CustomerVO) => {
id: row.id, id: row.id,
enabled: row.enabled, enabled: row.enabled,
}) })
await getList() await getList()
} catch { } catch {

Loading…
Cancel
Save