Merge branch 'master' of http://gitea.zianxin.com/zianxin-tec/biz-pc-cloud
This commit is contained in:
commit
072eaaef18
7 files changed
+123
-16
No files matched your search
@@ -1,8 +1,8 @@
|
||||
import request from "/@/utils/request"
|
||||
|
||||
export function select(query?: Object) {
|
||||
export function pageJoin(query?: Object) {
|
||||
return request({
|
||||
url: "/hard/hard-spu-repertory/select",
|
||||
url: "/hard/hard-spu-repertory/page-join",
|
||||
method: "get",
|
||||
params: query,
|
||||
})
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<dict-select v-model="state.queryForm.merchantType" dict-code="merchant_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="商户" prop="mchIds">
|
||||
<select-mch v-model="state.queryForm.mchIds" />
|
||||
<select-mch v-model="state.queryForm.mchIds" :apiParams="{ parentIsNull: false }" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 300px" label="设备类型" prop="hardTypeCode">
|
||||
<dict-select v-model="state.queryForm.hardTypeCode" dict-code="hard_type" />
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<dict-select v-model="state.queryForm.merchantType" dict-code="merchant_type" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 250px" label="商户" prop="merchantId">
|
||||
<select-mch v-model="state.queryForm.merchantId" />
|
||||
<select-mch v-model="state.queryForm.merchantId" :apiParams="{ parentIsNull: false }" />
|
||||
</el-form-item>
|
||||
<el-form-item style="width: 450px" label="创建时间" prop="payTimeList">
|
||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD HH:mm:ss" type="datetimerange" />
|
||||
|
||||
@@ -41,7 +41,7 @@ const form = reactive({
|
||||
userId: "",
|
||||
hardId: "",
|
||||
spuId: "",
|
||||
count: "",
|
||||
count: 5,
|
||||
})
|
||||
|
||||
// 定义校验规则
|
||||
|
||||
@@ -36,11 +36,59 @@
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column prop="userId" label="用户id" show-overflow-tooltip />
|
||||
<el-table-column prop="hardId" label="设备id" show-overflow-tooltip />
|
||||
<el-table-column prop="spuId" label="商品id" show-overflow-tooltip />
|
||||
<el-table-column prop="count" label="更新库存数量" show-overflow-tooltip />
|
||||
<el-table-column type="index" label="#" width="80" />
|
||||
<el-table-column prop="userId" label="上架">
|
||||
<el-table-column min-width="120" label="上架人">
|
||||
<template #default="{ row }">
|
||||
<span> {{ row.username }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" min-width="120" label="上架时间" />
|
||||
<el-table-column label="上架类型">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="hard_spu_repertory_type" :value="row.bizType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="beforeCount" min-width="120" label="上架前数量" />
|
||||
<el-table-column prop="count" min-width="120" label="上架数量" />
|
||||
</el-table-column>
|
||||
<el-table-column label="商品">
|
||||
<el-table-column min-width="120" label="商品">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary">
|
||||
{{ row.spuName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="120" label="分类">
|
||||
<template #default="{ row }">
|
||||
<span class="color-success">
|
||||
{{ row.spuCategoryName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column prop="hardId" label="设备">
|
||||
<el-table-column min-width="120" label="所属商家">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary">
|
||||
{{ row.merchantName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="120" label="设备名称">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary">
|
||||
{{ row.hardName }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="120" label="放置层数">
|
||||
<template #default="{ row }">
|
||||
<span class="color-primary"> {{ row.hardDoorNumber }}层 </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
@@ -67,14 +115,14 @@
|
||||
|
||||
<script setup lang="ts" name="systemHardSpuRepertory">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { fetchList, delObjs } from "/@/api/hard/hard-spu-repertory"
|
||||
import * as hardSpuRepertory from "/@/api/hard/hard-spu-repertory"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
// 定义查询字典
|
||||
|
||||
const { hard_spu_repertory_type } = useDict("hard_spu_repertory_type")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
@@ -86,7 +134,7 @@ const multiple = ref(true)
|
||||
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: fetchList,
|
||||
pageList: hardSpuRepertory.pageJoin,
|
||||
})
|
||||
|
||||
// table hook
|
||||
@@ -121,7 +169,7 @@ const handleDelete = async (ids: string[]) => {
|
||||
}
|
||||
|
||||
try {
|
||||
await delObjs(ids)
|
||||
await hardSpuRepertory.delObjs(ids)
|
||||
getDataList()
|
||||
useMessage().success("删除成功")
|
||||
} catch (err: any) {
|
||||
@@ -129,3 +177,57 @@ const handleDelete = async (ids: string[]) => {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.text-line {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.desc {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2px;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
min-width: 60px;
|
||||
max-width: 100px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
flex: 1;
|
||||
min-width: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2px;
|
||||
|
||||
span {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
span:nth-child(1) {
|
||||
min-width: 60px;
|
||||
max-width: 100px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
span:nth-child(2) {
|
||||
flex: 1;
|
||||
min-width: 50px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -10,7 +10,7 @@
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item prop="hardDoorNumber">
|
||||
<template #label>
|
||||
<span>商品层数</span>
|
||||
<span>放置层数</span>
|
||||
<tip content="商品在智能柜的层数,按层数放置会提高识别率" />
|
||||
</template>
|
||||
<el-input-number :min="0" :step="1" v-model="form.hardDoorNumber" placeholder="" />
|
||||
@@ -101,7 +101,7 @@ const form = reactive({
|
||||
salesCount: 0,
|
||||
repertoryCount: 0,
|
||||
sort: 0,
|
||||
hardDoorNumber: "",
|
||||
hardDoorNumber: 1,
|
||||
status: "1",
|
||||
isDefault: "0",
|
||||
})
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
<span>{{ row.merchantName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150" label="放置层数">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.hardDoorNumber }}层</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="150" label="设备名">
|
||||
<template #default="{ row }">
|
||||
<span>{{ row.hardName }}</span>
|
||||
|
||||
Reference in new issue
Block a user