From d2057f9fd66a382e615b449d1e8b6990c34a0599 Mon Sep 17 00:00:00 2001 From: MrShi <1878285526@qq.com> Date: 星期三, 15 一月 2025 09:18:22 +0800 Subject: [PATCH] 对接口 --- admin/src/views/stock/query.vue | 66 +++++++++------------------------ 1 files changed, 18 insertions(+), 48 deletions(-) diff --git a/admin/src/views/stock/query.vue b/admin/src/views/stock/query.vue index 3dd9bdb..e46add8 100644 --- a/admin/src/views/stock/query.vue +++ b/admin/src/views/stock/query.vue @@ -2,16 +2,16 @@ <div class="main_app"> <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> <div class="mt20"> - <el-button @click="handleEx()" v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button> + <el-button v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button> </div> <el-table v-loading="loading" :data="list" stripe> - <el-table-column prop="platformName" label="璧勪骇缂栫爜" min-width="100" show-overflow-tooltip /> - <el-table-column prop="platformGroupName" label="璧勪骇鍚嶇О" min-width="100" show-overflow-tooltip /> - <el-table-column prop="carCodeFront" label="鏉$爜" min-width="100" show-overflow-tooltip /> - <el-table-column prop="carCodeBack" label="鍝佺墝" min-width="100" show-overflow-tooltip /> - <el-table-column prop="param1" label="瑙勬牸鍨嬪彿" min-width="100" show-overflow-tooltip /> - <el-table-column prop="param2" label="鎵�鍦ㄤ粨搴�" min-width="100" show-overflow-tooltip /> - <el-table-column prop="workTime" label="搴撳瓨" min-width="80" show-overflow-tooltip /> + <el-table-column prop="materialId" label="璧勪骇缂栫爜" min-width="100" show-overflow-tooltip /> + <el-table-column prop="materialName" label="璧勪骇鍚嶇О" min-width="100" show-overflow-tooltip /> + <el-table-column prop="materialQrcode" label="鏉$爜" min-width="100" show-overflow-tooltip /> + <el-table-column prop="materialBrand" label="鍝佺墝" min-width="100" show-overflow-tooltip /> + <el-table-column prop="materialAttr" label="瑙勬牸鍨嬪彿" min-width="100" show-overflow-tooltip /> + <el-table-column prop="warehouseName" label="鎵�鍦ㄤ粨搴�" min-width="100" show-overflow-tooltip /> + <el-table-column prop="stock" label="搴撳瓨" min-width="80" show-overflow-tooltip /> </el-table> <div class="mt20"> <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> @@ -25,7 +25,7 @@ import dayjs from 'dayjs' import duration from 'dayjs/plugin/duration' dayjs.extend(duration) -import { platformLogPage, getPlatformGroupList } from '@/api' +import { fetchList } from '@/api/ywStock' export default { components: { Pagination, @@ -45,72 +45,42 @@ queryFormConfig: { formItems: [ { - filed: 'platformGroupId', + filed: 'warehouseId', type: 'select', label: '鎵�鍦ㄤ粨搴�', options: [] }, { - filed: 'carCodeFront', + filed: 'materialId', type: 'input', - label: '璧勪骇淇℃伅', - placeholder: '璇疯緭鍏ヨ祫浜у悕绉�/缂栫爜' + label: '鐗╂枡鍚嶇О/缂栫爜', + placeholder: '璇疯緭鍏ョ墿鏂欏悕绉�/缂栫爜' }, { - filed: 'carCodeFront', + filed: 'materialAttr', type: 'input', label: '鍨嬪彿', }, - ], - online: true + ] } } }, created() { - // this.getList() - // this.getGroupList() + this.getList() }, methods: { - handleSub() { - this.$refs.ruleForm.validate((valid) => { - if (valid) { - alert('submit!') - } - }) - }, - handleEx() { }, - getGroupList() { - getPlatformGroupList({ queryData: 0, queryType: 0 }).then(res => { - this.queryFormConfig.formItems[1].options = res.map(i => { - return { - value: i.id, - label: i.name - } - }) - // this.queryFormConfig.formItems[1].options.unshift({ value: '', label: '鍏ㄩ儴鏈堝彴缁�' }) - }) - }, getList(page) { const { pagination, filters } = this this.loading = true - platformLogPage({ + fetchList({ model: { - ...filters, - queryStatus: '6,7,8', - beginWorkDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, - beginWorkDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, + ...filters }, - sorts: [{ direction: 'DESC', property: 'param1' }], capacity: pagination.pageSize, page: page || pagination.page, }).then(res => { this.loading = false this.list = res.records || [] - this.list.forEach(item => { - item.inTypeTemp = item.inType == 0 ? '鏁存墭鐩�' : '浠剁儫' - item.taskOrigin = 'WMS鑾峰彇' - item.workTime = dayjs.duration(item.param3, 'seconds').format('H鏃秏鍒唖绉�') - }) this.pagination.total = res.total || 0 }, () => { this.loading = false -- Gitblit v1.9.3