Merge branch 'master' of http://gitea.zianxin.com/zianxin-tec/biz-pc-cloud
This commit is contained in:
commit
a280748640
8 files changed
+197
-41
No files matched your search
@@ -167,17 +167,39 @@ watch(
|
||||
return
|
||||
}
|
||||
|
||||
fileList.value = newValue
|
||||
.split(",")
|
||||
.map((item: string) => {
|
||||
const url = item.startsWith("http") ? item : imageBaseUrl + item
|
||||
return {
|
||||
name: item.split("/").pop() || "",
|
||||
url: url,
|
||||
fileUrl: item,
|
||||
}
|
||||
})
|
||||
.filter((item) => item.url)
|
||||
if (!newValue.match(/x-oss-process/g)) {
|
||||
fileList.value = newValue
|
||||
.split(",")
|
||||
.map((item: string) => {
|
||||
const url = item.startsWith("http") ? item : imageBaseUrl + item
|
||||
return {
|
||||
name: item.split("/").pop() || "",
|
||||
url: url,
|
||||
fileUrl: item,
|
||||
}
|
||||
})
|
||||
.filter((item) => item.url)
|
||||
|
||||
console.log("fileList.value", fileList.value)
|
||||
} else {
|
||||
fileList.value = newValue
|
||||
.split("?")
|
||||
.filter(
|
||||
(item) =>
|
||||
item.endsWith(".jpg") || item.endsWith(".png") || item.endsWith(".gif") || item.endsWith(".jpeg") || item.endsWith(".webp"),
|
||||
)
|
||||
.map((item: string) => {
|
||||
const url = item.startsWith("http") ? item : imageBaseUrl + item
|
||||
return {
|
||||
name: item.split("/").pop() || "",
|
||||
url: url,
|
||||
fileUrl: item,
|
||||
}
|
||||
})
|
||||
.filter((item) => item.url)
|
||||
|
||||
console.log("fileList.value", fileList.value)
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
)
|
||||
|
||||
@@ -177,6 +177,18 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<el-descriptions title="智能柜日志">
|
||||
<el-descriptions-item labelClassName="no-colon">
|
||||
<el-timeline>
|
||||
<el-timeline-item v-for="v in new Array(2).fill({})" :key="v.id" timestamp="2025-1-1 222222" placement="top">
|
||||
<div class="el-timeline-right-content">
|
||||
<span>{{ "121121" }}</span>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
|
||||
<!-- 柜子设置 -->
|
||||
@@ -305,6 +317,7 @@ const checkOpenAccess = async () => {
|
||||
})
|
||||
if (res.code == 0) {
|
||||
useMessage().success("操作成功")
|
||||
await getDetail()
|
||||
return
|
||||
}
|
||||
useMessage().error(res.msg || "操作失败")
|
||||
@@ -325,6 +338,7 @@ const checkCloseAccess = async () => {
|
||||
})
|
||||
if (res.code == 0) {
|
||||
useMessage().success("操作成功")
|
||||
await getDetail()
|
||||
return
|
||||
}
|
||||
useMessage().error(res.msg || "操作失败")
|
||||
@@ -436,4 +450,69 @@ const deleteGoods = async (v: any) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-timeline-right-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 30px;
|
||||
padding: 10px;
|
||||
background-color: #409eff;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 13px;
|
||||
border-color: transparent #409eff transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 8px;
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
// 时间线样式调整
|
||||
:deep(.el-timeline) {
|
||||
margin: 10px 0 0 160px;
|
||||
|
||||
.el-timeline-item__wrapper {
|
||||
position: relative;
|
||||
top: -20px;
|
||||
|
||||
.el-timeline-item__timestamp {
|
||||
position: absolute !important;
|
||||
top: 10px;
|
||||
left: -150px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-timeline-right-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 30px;
|
||||
padding: 10px;
|
||||
background-color: #409eff;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 13px;
|
||||
border-color: transparent #409eff transparent transparent;
|
||||
border-style: solid;
|
||||
border-width: 8px;
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
.el-timeline-item__node {
|
||||
position: absolute;
|
||||
left: -5px;
|
||||
top: -50%;
|
||||
transform: translateY(100%);
|
||||
display: flex;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 10px;
|
||||
background: #409eff;
|
||||
border-radius: 50%;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -4,7 +4,7 @@
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入商品名" />
|
||||
<el-input v-model="form.name" placeholder="请输入商品名" :disabled="form.skuType == '0'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
@@ -14,27 +14,27 @@
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品封面图片" prop="cover">
|
||||
<upload-imgs v-model="form.cover" />
|
||||
<upload-imgs v-model="form.cover" :disabled="form.skuType == '0'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品识别图片" prop="pic">
|
||||
<upload-imgs v-model="form.pic" />
|
||||
<upload-imgs v-model="form.pic" :disabled="form.skuType == '0'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="口味" prop="specsTaste">
|
||||
<el-input v-model="form.specsTaste" placeholder="" />
|
||||
<el-input v-model="form.specsTaste" :disabled="form.skuType == '0'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="容量" prop="specsCapacity">
|
||||
<el-input v-model="form.specsCapacity" placeholder="" />
|
||||
<el-input v-model="form.specsCapacity" :disabled="form.skuType == '0'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="重量" prop="specsWeight">
|
||||
<el-input v-model="form.specsWeight" placeholder="" />
|
||||
<el-input v-model="form.specsWeight" :disabled="form.skuType == '0'" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
@@ -66,7 +66,7 @@
|
||||
<span>是否标品</span>
|
||||
<tip content="选择是,该商品将会根据商品图片建模" />
|
||||
</template>
|
||||
<el-radio-group v-model="form.isDefault">
|
||||
<el-radio-group v-model="form.isDefault" :disabled="form.skuType == '0'">
|
||||
<el-radio v-for="v in yes_no_type" :key="v.value" :label="v.value" border>
|
||||
{{ v.label }}
|
||||
</el-radio>
|
||||
@@ -98,7 +98,7 @@ const loading = ref(false)
|
||||
// 定义字典
|
||||
const { yes_no_type } = useDict("yes_no_type")
|
||||
// 提交表单数据
|
||||
const form = reactive({
|
||||
const form = reactive<any>({
|
||||
id: "",
|
||||
hardId: "",
|
||||
spuCategoryId: "",
|
||||
@@ -173,7 +173,7 @@ const gethardSpuData = (id: string) => {
|
||||
hardSpu
|
||||
.getObj(id)
|
||||
.then((res: any) => {
|
||||
Object.assign(form, res.data, { price: displayPrice(res.data.price, "", 0) })
|
||||
Object.assign(form, res.data, { price: Number(displayPrice(res.data.price, "", 0)) })
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
|
||||
@@ -97,11 +97,18 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
<template #default="scope">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'hard_hardSpu_edit'" @click="formDialogRef.openDialog(scope.row.id)">
|
||||
<template #default="{ row }">
|
||||
<el-button icon="edit-pen" text type="primary" v-auth="'hard_hardSpu_edit'" @click="formDialogRef.openDialog(row.id)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button icon="delete" text type="primary" v-auth="'hard_hardSpu_del'" @click="handleDelete([scope.row.id])">
|
||||
<el-button
|
||||
v-if="!(row.skuType == '0')"
|
||||
icon="delete"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'hard_hardSpu_del'"
|
||||
@click="handleDelete([row.id])"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="40" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column prop="apiType" label="请求类型">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="third_api_type" :value="row.apiType" />
|
||||
@@ -68,6 +68,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="timeConsuming" label="耗时(毫秒)" show-overflow-tooltip />
|
||||
<el-table-column prop="createTime" label="创建时间" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="钱包" prop="walletTypeId">
|
||||
<!-- <select-wallet-type v-model="form.walletTypeId" placeholder="请选择钱包" :disabled="false" /> -->
|
||||
<el-select v-model="form.walletTypeId" :disabled="true">
|
||||
<el-select v-model="form.walletTypeId" :disabled="walletTypeIdDisabled">
|
||||
<el-option v-for="item in walletTypeOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -66,6 +66,27 @@ const form = reactive({
|
||||
remark: "",
|
||||
})
|
||||
const walletTypeOptions = ref()
|
||||
const walletTypeIdDisabled = ref(true)
|
||||
watch(
|
||||
() => form.bizType,
|
||||
(val) => {
|
||||
if (!val) return
|
||||
|
||||
if (val == "2" && roleCodes.includes("CANTEEN_FINANCE")) {
|
||||
walletTypeIdDisabled.value = false
|
||||
} else {
|
||||
walletTypeIdDisabled.value = true
|
||||
if (roleCodes.includes("CAN_RECH_CONS_WALLET")) {
|
||||
form.walletTypeId = walletTypeOptions.value?.find((item: any) => item.uniqueCode == "2").id || ""
|
||||
} else {
|
||||
form.walletTypeId = walletTypeOptions.value?.find((item: any) => item.uniqueCode == "1").id || ""
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
},
|
||||
)
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
@@ -85,19 +106,14 @@ const openDialog = async (id: string) => {
|
||||
form.walletTypeId = ""
|
||||
})
|
||||
|
||||
const res = await getWalletTypeSimple()
|
||||
walletTypeOptions.value = res.data.records
|
||||
|
||||
// 获取walletRechargeApply信息
|
||||
if (id) {
|
||||
form.id = id
|
||||
await getwalletRechargeApplyData(id)
|
||||
}
|
||||
|
||||
const res = await getWalletTypeSimple()
|
||||
walletTypeOptions.value = res.data.records
|
||||
if (roleCodes.includes("CAN_RECH_CONS_WALLET")) {
|
||||
form.walletTypeId = res.data.records.find((item: any) => item.uniqueCode == "2").id
|
||||
} else {
|
||||
form.walletTypeId = res.data.records.find((item: any) => item.uniqueCode == "1").id
|
||||
}
|
||||
}
|
||||
|
||||
// 提交
|
||||
|
||||
@@ -126,8 +126,9 @@
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_view'"
|
||||
@click="doInfo(row)"
|
||||
>数据</el-button
|
||||
>
|
||||
数据
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.importTime && !row.processId"
|
||||
icon="Connection"
|
||||
@@ -135,8 +136,9 @@
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_apply'"
|
||||
@click="doApply(row)"
|
||||
>申请</el-button
|
||||
>
|
||||
申请
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="!row.processId"
|
||||
icon="edit-pen"
|
||||
@@ -144,8 +146,9 @@
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_edit'"
|
||||
@click="formDialogRef.openDialog(row.id)"
|
||||
>编辑</el-button
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
icon="delete"
|
||||
@@ -153,8 +156,9 @@
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_del'"
|
||||
@click="handleDelete([row.id])"
|
||||
>删除</el-button
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.isCheckUser && row.processStatus == '1'"
|
||||
type="primary"
|
||||
@@ -193,7 +197,7 @@ import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import * as walletRechargeApplyApi from "/@/api/wallet/wallet-recharge-apply"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { ElLoading } from "element-plus"
|
||||
import { ElLoading, ElMessage } from "element-plus"
|
||||
import ProcessDrawer from "/@/components/processDrawer/index.vue"
|
||||
import { getDicts } from "/@/api/admin/dict"
|
||||
|
||||
@@ -254,7 +258,26 @@ const doApply = async (row: any) => {
|
||||
} catch (error: any) {
|
||||
loading.close()
|
||||
if (error && error.code != 0) {
|
||||
useMessage().error(error.msg)
|
||||
// useMessage().error(error.msg)
|
||||
ElMessage({
|
||||
message: h("div", { style: { maxHeight: "80vh", overflow: "auto", marginRight: "20px" } }, [
|
||||
h(
|
||||
"table",
|
||||
{ style: { color: "#7f7f7f" } },
|
||||
error.msg.split("\n").map((item: string) => {
|
||||
return h("tr", {}, [
|
||||
// h("td", { style: { padding: "0 4px", border: "1px solid #7f7f7f77", textAlign: "center" } }, index),
|
||||
item.split(",").map((i: string) => {
|
||||
return h("td", { style: { padding: "0 4px", border: "1px solid #7f7f7f77" } }, i)
|
||||
}),
|
||||
])
|
||||
}),
|
||||
),
|
||||
]),
|
||||
showClose: true,
|
||||
duration: 10000,
|
||||
type: "error",
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,8 +38,16 @@
|
||||
<div v-if="row.afterBalance < 0" class="color-danger">(余额不足记账扣款)</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<slot v-if="data.tableList && data.tableList.length">
|
||||
<el-table-column :prop="v" v-for="(v, i) in data.tableList" :key="i" align="center" min-width="250">
|
||||
|
||||
<slot>
|
||||
<el-table-column
|
||||
v-if="data.tableList && data.tableList.length"
|
||||
:prop="v"
|
||||
v-for="(v, i) in data.tableList"
|
||||
:key="i"
|
||||
align="center"
|
||||
min-width="250"
|
||||
>
|
||||
<template #header>
|
||||
<div>
|
||||
{{ data.tableListStr[i] }}
|
||||
|
||||
Reference in new issue
Block a user