Merge branch 'master' of https://e.coding.net/g-cphe0354/cashier/cashier-web into ymf
This commit is contained in:
commit
90dc61dee8
|
|
@ -41,6 +41,24 @@ const AuthAPI = {
|
||||||
method: "delete",
|
method: "delete",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 退款退回
|
||||||
|
refundToStock(data: any) {
|
||||||
|
return request<any, Responseres>({
|
||||||
|
url: `${baseURL}/refundToStock`,
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
// 耗材列表
|
||||||
|
productcons(params: any) {
|
||||||
|
return request<any, Responseres>({
|
||||||
|
url: `/product/admin/product/cons/page`,
|
||||||
|
method: "get",
|
||||||
|
params
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 上下架
|
// 上下架
|
||||||
onOff(data: any) {
|
onOff(data: any) {
|
||||||
return request<any, Responseres>({
|
return request<any, Responseres>({
|
||||||
|
|
@ -71,6 +89,37 @@ const AuthAPI = {
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 报损
|
||||||
|
reportDamage(data: any) {
|
||||||
|
return request<any, Responseres>({
|
||||||
|
url: `${baseURL}/reportDamage`,
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 商品-绑定耗材
|
||||||
|
bind(data: any) {
|
||||||
|
return request<any, Responseres>({
|
||||||
|
url: `${baseURL}/bind`,
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 库存预警
|
||||||
|
stockWarning(data: any) {
|
||||||
|
return request<any, Responseres>({
|
||||||
|
url: `${baseURL}/stockWarning?warnLine=${data}`,
|
||||||
|
method: "post",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 售罄
|
||||||
|
markIsSoldOut(data: any) {
|
||||||
|
return request<any, Responseres>({
|
||||||
|
url: `${baseURL}/markIsSoldOut`,
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,58 +8,37 @@
|
||||||
<template v-if="typeof item === 'string'">
|
<template v-if="typeof item === 'string'">
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<template v-if="item === 'add'">
|
<template v-if="item === 'add'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:${item}`]" type="primary" icon="plus"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:${item}`]"
|
@click="handleToolbar(item)">
|
||||||
type="primary"
|
|
||||||
icon="plus"
|
|
||||||
@click="handleToolbar(item)"
|
|
||||||
>
|
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<!-- 删除 -->
|
<!-- 删除 -->
|
||||||
<template v-else-if="item === 'delete'">
|
<template v-else-if="item === 'delete'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:${item}`]" type="danger" icon="delete"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:${item}`]"
|
:disabled="removeIds.length === 0" @click="handleToolbar(item)">
|
||||||
type="danger"
|
|
||||||
icon="delete"
|
|
||||||
:disabled="removeIds.length === 0"
|
|
||||||
@click="handleToolbar(item)"
|
|
||||||
>
|
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<!-- 导入 -->
|
<!-- 导入 -->
|
||||||
<template v-else-if="item === 'import'">
|
<template v-else-if="item === 'import'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:${item}`]" type="default" icon="upload"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:${item}`]"
|
@click="handleToolbar(item)">
|
||||||
type="default"
|
|
||||||
icon="upload"
|
|
||||||
@click="handleToolbar(item)"
|
|
||||||
>
|
|
||||||
导入
|
导入
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<!-- 导出 -->
|
<!-- 导出 -->
|
||||||
<template v-else-if="item === 'export'">
|
<template v-else-if="item === 'export'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:${item}`]" type="default" icon="download"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:${item}`]"
|
@click="handleToolbar(item)">
|
||||||
type="default"
|
|
||||||
icon="download"
|
|
||||||
@click="handleToolbar(item)"
|
|
||||||
>
|
|
||||||
导出
|
导出
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<!-- 其他 -->
|
<!-- 其他 -->
|
||||||
<template v-else-if="typeof item === 'object'">
|
<template v-else-if="typeof item === 'object'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:${item.auth}`]" :icon="item.icon"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:${item.auth}`]"
|
:type="item.type ?? 'default'" @click="handleToolbar(item.name)">
|
||||||
:icon="item.icon"
|
|
||||||
:type="item.type ?? 'default'"
|
|
||||||
@click="handleToolbar(item.name)"
|
|
||||||
>
|
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -88,68 +67,36 @@
|
||||||
</template>
|
</template>
|
||||||
<!-- 导出 -->
|
<!-- 导出 -->
|
||||||
<template v-else-if="item === 'exports'">
|
<template v-else-if="item === 'exports'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:export`]" icon="download" circle title="导出"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:export`]"
|
@click="handleToolbar(item)" />
|
||||||
icon="download"
|
|
||||||
circle
|
|
||||||
title="导出"
|
|
||||||
@click="handleToolbar(item)"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<!-- 导入 -->
|
<!-- 导入 -->
|
||||||
<template v-else-if="item === 'imports'">
|
<template v-else-if="item === 'imports'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:import`]" icon="upload" circle title="导入"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:import`]"
|
@click="handleToolbar(item)" />
|
||||||
icon="upload"
|
|
||||||
circle
|
|
||||||
title="导入"
|
|
||||||
@click="handleToolbar(item)"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<template v-else-if="item === 'search'">
|
<template v-else-if="item === 'search'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:query`]" icon="search" circle title="搜索"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:query`]"
|
@click="handleToolbar(item)" />
|
||||||
icon="search"
|
|
||||||
circle
|
|
||||||
title="搜索"
|
|
||||||
@click="handleToolbar(item)"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<!-- 其他 -->
|
<!-- 其他 -->
|
||||||
<template v-else-if="typeof item === 'object'">
|
<template v-else-if="typeof item === 'object'">
|
||||||
<template v-if="item.auth">
|
<template v-if="item.auth">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:${item.auth}`]" :icon="item.icon" circle
|
||||||
v-hasPerm="[`${contentConfig.pageName}:${item.auth}`]"
|
:title="item.title" @click="handleToolbar(item.name)" />
|
||||||
:icon="item.icon"
|
|
||||||
circle
|
|
||||||
:title="item.title"
|
|
||||||
@click="handleToolbar(item.name)"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-button
|
<el-button :icon="item.icon" circle :title="item.title" @click="handleToolbar(item.name)" />
|
||||||
:icon="item.icon"
|
|
||||||
circle
|
|
||||||
:title="item.title"
|
|
||||||
@click="handleToolbar(item.name)"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<el-table
|
<el-table ref="tableRef" v-loading="loading" v-bind="contentConfig.table" :data="pageData" :row-key="pk"
|
||||||
ref="tableRef"
|
@selection-change="handleSelectionChange" @filter-change="handleFilterChange">
|
||||||
v-loading="loading"
|
|
||||||
v-bind="contentConfig.table"
|
|
||||||
:data="pageData"
|
|
||||||
:row-key="pk"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@filter-change="handleFilterChange"
|
|
||||||
>
|
|
||||||
<template v-for="col in cols" :key="col">
|
<template v-for="col in cols" :key="col">
|
||||||
<el-table-column v-if="col.show" v-bind="col">
|
<el-table-column v-if="col.show" v-bind="col">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|
@ -158,24 +105,15 @@
|
||||||
<template v-if="col.prop">
|
<template v-if="col.prop">
|
||||||
<template v-if="Array.isArray(scope.row[col.prop])">
|
<template v-if="Array.isArray(scope.row[col.prop])">
|
||||||
<template v-for="(item, index) in scope.row[col.prop]" :key="item">
|
<template v-for="(item, index) in scope.row[col.prop]" :key="item">
|
||||||
<el-image
|
<el-image :src="item" :preview-src-list="scope.row[col.prop]" :initial-index="index"
|
||||||
:src="item"
|
:preview-teleported="true" :style="`width: ${col.imageWidth ?? 40}px; height: ${col.imageHeight ?? 40
|
||||||
:preview-src-list="scope.row[col.prop]"
|
}px`" />
|
||||||
:initial-index="index"
|
|
||||||
:preview-teleported="true"
|
|
||||||
:style="`width: ${col.imageWidth ?? 40}px; height: ${
|
|
||||||
col.imageHeight ?? 40
|
|
||||||
}px`"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-image
|
<el-image :src="scope.row[col.prop]" :preview-src-list="[scope.row[col.prop]]"
|
||||||
:src="scope.row[col.prop]"
|
|
||||||
:preview-src-list="[scope.row[col.prop]]"
|
|
||||||
:preview-teleported="true"
|
:preview-teleported="true"
|
||||||
:style="`width: ${col.imageWidth ?? 40}px; height: ${col.imageHeight ?? 40}px`"
|
:style="`width: ${col.imageWidth ?? 40}px; height: ${col.imageHeight ?? 40}px`" />
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -197,30 +135,20 @@
|
||||||
<template v-else-if="col.templet === 'switch'">
|
<template v-else-if="col.templet === 'switch'">
|
||||||
<template v-if="col.prop">
|
<template v-if="col.prop">
|
||||||
<!-- pageData.length>0: 解决el-switch组件会在表格初始化的时候触发一次change事件 -->
|
<!-- pageData.length>0: 解决el-switch组件会在表格初始化的时候触发一次change事件 -->
|
||||||
<el-switch
|
<el-switch v-model="scope.row[col.prop]" :active-value="col.activeValue ?? 1"
|
||||||
v-model="scope.row[col.prop]"
|
:inactive-value="col.inactiveValue ?? 0" :inline-prompt="true" :active-text="col.activeText ?? ''"
|
||||||
:active-value="col.activeValue ?? 1"
|
:inactive-text="col.inactiveText ?? ''" :validate-event="false"
|
||||||
:inactive-value="col.inactiveValue ?? 0"
|
:disabled="!hasAuth(`${contentConfig.pageName}:modify`)" @change="
|
||||||
:inline-prompt="true"
|
|
||||||
:active-text="col.activeText ?? ''"
|
|
||||||
:inactive-text="col.inactiveText ?? ''"
|
|
||||||
:validate-event="false"
|
|
||||||
:disabled="!hasAuth(`${contentConfig.pageName}:modify`)"
|
|
||||||
@change="
|
|
||||||
pageData.length > 0 && handleModify(col.prop, scope.row[col.prop], scope.row)
|
pageData.length > 0 && handleModify(col.prop, scope.row[col.prop], scope.row)
|
||||||
"
|
" />
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<!-- 生成输入框组件 -->
|
<!-- 生成输入框组件 -->
|
||||||
<template v-else-if="col.templet === 'input'">
|
<template v-else-if="col.templet === 'input'">
|
||||||
<template v-if="col.prop">
|
<template v-if="col.prop">
|
||||||
<el-input
|
<el-input v-model="scope.row[col.prop]" :type="col.inputType ?? 'text'"
|
||||||
v-model="scope.row[col.prop]"
|
|
||||||
:type="col.inputType ?? 'text'"
|
|
||||||
:disabled="!hasAuth(`${contentConfig.pageName}:modify`)"
|
:disabled="!hasAuth(`${contentConfig.pageName}:modify`)"
|
||||||
@blur="handleModify(col.prop, scope.row[col.prop], scope.row)"
|
@blur="handleModify(col.prop, scope.row[col.prop], scope.row)" />
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<!-- 格式化为价格 -->
|
<!-- 格式化为价格 -->
|
||||||
|
|
@ -263,52 +191,36 @@
|
||||||
<template v-if="typeof item === 'string'">
|
<template v-if="typeof item === 'string'">
|
||||||
<!-- 编辑/删除 -->
|
<!-- 编辑/删除 -->
|
||||||
<template v-if="item === 'edit' || item === 'delete'">
|
<template v-if="item === 'edit' || item === 'delete'">
|
||||||
<el-button
|
<el-button v-hasPerm="[`${contentConfig.pageName}:${item}`]"
|
||||||
v-hasPerm="[`${contentConfig.pageName}:${item}`]"
|
:type="item === 'edit' ? 'primary' : 'danger'" :icon="item" size="small" link @click="
|
||||||
:type="item === 'edit' ? 'primary' : 'danger'"
|
|
||||||
:icon="item"
|
|
||||||
size="small"
|
|
||||||
link
|
|
||||||
@click="
|
|
||||||
handleOperat({
|
handleOperat({
|
||||||
name: item,
|
name: item,
|
||||||
row: scope.row,
|
row: scope.row,
|
||||||
column: scope.column,
|
column: scope.column,
|
||||||
$index: scope.$index,
|
$index: scope.$index,
|
||||||
})
|
})
|
||||||
"
|
">
|
||||||
>
|
|
||||||
{{ item === "edit" ? "编辑" : "删除" }}
|
{{ item === "edit" ? "编辑" : "删除" }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<!-- 其他 -->
|
<!-- 其他 -->
|
||||||
<template v-else-if="typeof item === 'object'">
|
<template v-else-if="typeof item === 'object'">
|
||||||
<el-dropdown>
|
<el-dropdown style="margin-top: 4px;">
|
||||||
<el-button
|
<el-button v-if="item.render === undefined || item.render(scope.row)" v-bind="item.auth ? { 'v-hasPerm': [`${contentConfig.pageName}:${item.auth}`] } : {}
|
||||||
v-if="item.render === undefined || item.render(scope.row)"
|
" :icon="item.icon" :type="item.type ?? 'primary'" size="small" link @click="
|
||||||
v-bind="
|
|
||||||
item.auth ? { 'v-hasPerm': [`${contentConfig.pageName}:${item.auth}`] } : {}
|
|
||||||
"
|
|
||||||
:icon="item.icon"
|
|
||||||
:type="item.type ?? 'primary'"
|
|
||||||
size="small"
|
|
||||||
link
|
|
||||||
@click="
|
|
||||||
handleOperat({
|
handleOperat({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
row: scope.row,
|
row: scope.row,
|
||||||
column: scope.column,
|
column: scope.column,
|
||||||
$index: scope.$index,
|
$index: scope.$index,
|
||||||
})
|
})
|
||||||
"
|
">
|
||||||
>
|
|
||||||
{{ item.text }}
|
{{ item.text }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<template #dropdown v-if="item.options && item.options.length > 0">
|
<template #dropdown v-if="item.options && item.options.length > 0">
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item
|
<el-dropdown-item @click="
|
||||||
@click="
|
|
||||||
handleOperat({
|
handleOperat({
|
||||||
name: item.name,
|
name: item.name,
|
||||||
row: scope.row,
|
row: scope.row,
|
||||||
|
|
@ -316,10 +228,7 @@
|
||||||
$index: scope.$index,
|
$index: scope.$index,
|
||||||
command: opt.command ? opt.command : '',
|
command: opt.command ? opt.command : '',
|
||||||
})
|
})
|
||||||
"
|
" v-for="opt in item.options" :key="opt.value">
|
||||||
v-for="opt in item.options"
|
|
||||||
:key="opt.value"
|
|
||||||
>
|
|
||||||
{{ opt.label }}
|
{{ opt.label }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
|
@ -340,33 +249,18 @@
|
||||||
<template v-if="showPagination">
|
<template v-if="showPagination">
|
||||||
<el-scrollbar>
|
<el-scrollbar>
|
||||||
<div class="mt-[12px]">
|
<div class="mt-[12px]">
|
||||||
<el-pagination
|
<el-pagination v-bind="pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
||||||
v-bind="pagination"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</template>
|
</template>
|
||||||
<!-- 导出弹窗 -->
|
<!-- 导出弹窗 -->
|
||||||
<el-dialog
|
<el-dialog v-model="exportsModalVisible" :align-center="true" title="导出数据" width="600px" style="padding-right: 0"
|
||||||
v-model="exportsModalVisible"
|
@close="handleCloseExportsModal">
|
||||||
:align-center="true"
|
|
||||||
title="导出数据"
|
|
||||||
width="600px"
|
|
||||||
style="padding-right: 0"
|
|
||||||
@close="handleCloseExportsModal"
|
|
||||||
>
|
|
||||||
<!-- 滚动 -->
|
<!-- 滚动 -->
|
||||||
<el-scrollbar max-height="60vh">
|
<el-scrollbar max-height="60vh">
|
||||||
<!-- 表单 -->
|
<!-- 表单 -->
|
||||||
<el-form
|
<el-form ref="exportsFormRef" label-width="auto" style="padding-right: var(--el-dialog-padding-primary)"
|
||||||
ref="exportsFormRef"
|
:model="exportsFormData" :rules="exportsFormRules">
|
||||||
label-width="auto"
|
|
||||||
style="padding-right: var(--el-dialog-padding-primary)"
|
|
||||||
:model="exportsFormData"
|
|
||||||
:rules="exportsFormRules"
|
|
||||||
>
|
|
||||||
<el-form-item label="文件名" prop="filename">
|
<el-form-item label="文件名" prop="filename">
|
||||||
<el-input v-model="exportsFormData.filename" clearable />
|
<el-input v-model="exportsFormData.filename" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -376,16 +270,10 @@
|
||||||
<el-form-item label="数据源" prop="origin">
|
<el-form-item label="数据源" prop="origin">
|
||||||
<el-select v-model="exportsFormData.origin">
|
<el-select v-model="exportsFormData.origin">
|
||||||
<el-option label="当前数据 (当前页的数据)" :value="ExportsOriginEnum.CURRENT" />
|
<el-option label="当前数据 (当前页的数据)" :value="ExportsOriginEnum.CURRENT" />
|
||||||
<el-option
|
<el-option label="选中数据 (所有选中的数据)" :value="ExportsOriginEnum.SELECTED"
|
||||||
label="选中数据 (所有选中的数据)"
|
:disabled="selectionData.length <= 0" />
|
||||||
:value="ExportsOriginEnum.SELECTED"
|
<el-option label="全量数据 (所有分页的数据)" :value="ExportsOriginEnum.REMOTE"
|
||||||
:disabled="selectionData.length <= 0"
|
:disabled="contentConfig.exportsAction === undefined" />
|
||||||
/>
|
|
||||||
<el-option
|
|
||||||
label="全量数据 (所有分页的数据)"
|
|
||||||
:value="ExportsOriginEnum.REMOTE"
|
|
||||||
:disabled="contentConfig.exportsAction === undefined"
|
|
||||||
/>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段" prop="fields">
|
<el-form-item label="字段" prop="fields">
|
||||||
|
|
@ -406,35 +294,17 @@
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 导入弹窗 -->
|
<!-- 导入弹窗 -->
|
||||||
<el-dialog
|
<el-dialog v-model="importModalVisible" :align-center="true" title="导入数据" width="600px" style="padding-right: 0"
|
||||||
v-model="importModalVisible"
|
@close="handleCloseImportModal">
|
||||||
:align-center="true"
|
|
||||||
title="导入数据"
|
|
||||||
width="600px"
|
|
||||||
style="padding-right: 0"
|
|
||||||
@close="handleCloseImportModal"
|
|
||||||
>
|
|
||||||
<!-- 滚动 -->
|
<!-- 滚动 -->
|
||||||
<el-scrollbar max-height="60vh">
|
<el-scrollbar max-height="60vh">
|
||||||
<!-- 表单 -->
|
<!-- 表单 -->
|
||||||
<el-form
|
<el-form ref="importFormRef" label-width="auto" style="padding-right: var(--el-dialog-padding-primary)"
|
||||||
ref="importFormRef"
|
:model="importFormData" :rules="importFormRules">
|
||||||
label-width="auto"
|
|
||||||
style="padding-right: var(--el-dialog-padding-primary)"
|
|
||||||
:model="importFormData"
|
|
||||||
:rules="importFormRules"
|
|
||||||
>
|
|
||||||
<el-form-item label="文件名" prop="files">
|
<el-form-item label="文件名" prop="files">
|
||||||
<el-upload
|
<el-upload ref="uploadRef" v-model:file-list="importFormData.files" class="w-full"
|
||||||
ref="uploadRef"
|
|
||||||
v-model:file-list="importFormData.files"
|
|
||||||
class="w-full"
|
|
||||||
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
|
||||||
:drag="true"
|
:drag="true" :limit="1" :auto-upload="false" :on-exceed="handleFileExceed">
|
||||||
:limit="1"
|
|
||||||
:auto-upload="false"
|
|
||||||
:on-exceed="handleFileExceed"
|
|
||||||
>
|
|
||||||
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
|
||||||
<div class="el-upload__text">
|
<div class="el-upload__text">
|
||||||
<span>将文件拖到此处,或</span>
|
<span>将文件拖到此处,或</span>
|
||||||
|
|
@ -443,13 +313,8 @@
|
||||||
<template #tip>
|
<template #tip>
|
||||||
<div class="el-upload__tip">
|
<div class="el-upload__tip">
|
||||||
*.xlsx / *.xls
|
*.xlsx / *.xls
|
||||||
<el-link
|
<el-link v-if="contentConfig.importTemplate" type="primary" icon="download" :underline="false"
|
||||||
v-if="contentConfig.importTemplate"
|
@click="handleDownloadTemplate">
|
||||||
type="primary"
|
|
||||||
icon="download"
|
|
||||||
:underline="false"
|
|
||||||
@click="handleDownloadTemplate"
|
|
||||||
>
|
|
||||||
下载模板
|
下载模板
|
||||||
</el-link>
|
</el-link>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -461,11 +326,7 @@
|
||||||
<!-- 弹窗底部操作按钮 -->
|
<!-- 弹窗底部操作按钮 -->
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div style="padding-right: var(--el-dialog-padding-primary)">
|
<div style="padding-right: var(--el-dialog-padding-primary)">
|
||||||
<el-button
|
<el-button type="primary" :disabled="importFormData.files.length === 0" @click="handleImportSubmit">
|
||||||
type="primary"
|
|
||||||
:disabled="importFormData.files.length === 0"
|
|
||||||
@click="handleImportSubmit"
|
|
||||||
>
|
|
||||||
确 定
|
确 定
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button @click="handleCloseImportModal">取 消</el-button>
|
<el-button @click="handleCloseImportModal">取 消</el-button>
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,32 @@
|
||||||
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
|
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
|
||||||
@click="handleSwitchChange(scope.row)"></el-switch>
|
@click="handleSwitchChange(scope.row)"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
|
<template #tuikuantuihui="scope">
|
||||||
|
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
|
||||||
|
@click="handleSwitchhaocai(scope.row)"></el-switch>
|
||||||
|
</template>
|
||||||
|
<template #sellOut="scope">
|
||||||
|
<el-switch v-model="scope.row[scope.prop]" :active-value="1" :inactive-value="0"
|
||||||
|
@click="handleSwitchChangeTwo(scope.row)"></el-switch>
|
||||||
|
</template>
|
||||||
<template #mobile="scope">
|
<template #mobile="scope">
|
||||||
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
<el-text>{{ scope.row[scope.prop] }}</el-text>
|
||||||
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
<copy-button v-if="scope.row[scope.prop]" :text="scope.row[scope.prop]" style="margin-left: 2px" />
|
||||||
</template>
|
</template>
|
||||||
|
<template #consumables="scope">
|
||||||
|
<template v-if="scope.row.type != null">
|
||||||
|
<span style="color: #4080ff;" v-if="scope.row.consName">
|
||||||
|
{{ scope.row.consName }}
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
绑定
|
||||||
|
</span>
|
||||||
|
<el-icon @click="editOpen(scope.row)" style="cursor: pointer;color: #4080ff;">
|
||||||
|
<EditPen />
|
||||||
|
</el-icon>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
|
||||||
</page-content>
|
</page-content>
|
||||||
|
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
|
|
@ -49,10 +71,74 @@
|
||||||
<MyDialog ref="myDialogRef" @confirm="confirm" title="修改库存预警">
|
<MyDialog ref="myDialogRef" @confirm="confirm" title="修改库存预警">
|
||||||
<el-form :model="form">
|
<el-form :model="form">
|
||||||
<el-form-item label="库存预警" label-width="">
|
<el-form-item label="库存预警" label-width="">
|
||||||
<el-input-number v-model="form.num" label="描述文字"></el-input-number>
|
<el-input-number v-model="form.warnLine" label="描述文字"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</MyDialog>
|
</MyDialog>
|
||||||
|
<!-- 报损 -->
|
||||||
|
<MyDialog ref="myDialogRefbaosun" @confirm="confirmbaosun" title="报损">
|
||||||
|
<el-form :model="form">
|
||||||
|
<el-form-item label="报损数量" label-width="">
|
||||||
|
<el-input-number v-model="datas.number" label="描述文字"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="报损照片" label-width="">
|
||||||
|
<MultiImageUpload v-model="datas.images" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" label-width="">
|
||||||
|
<el-input v-model="datas.remark" type="textarea" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</MyDialog>
|
||||||
|
<!-- 耗材绑定 -->
|
||||||
|
<MyDialog ref="myDialogRefhaocai" @confirm="confirmhaocai" width="50%" title="耗材绑定">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12"> <el-form-item label="商品名">
|
||||||
|
{{ haocaiData.name }}
|
||||||
|
</el-form-item></el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<!-- <el-form-item label="退款退回库存">
|
||||||
|
<el-switch v-model="haocaiData.isRefundStock" :active-value="1" :inactive-value="0"
|
||||||
|
@click="handleSwitchhaocai(haocaiData.isRefundStock)"></el-switch>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-table :data="haocaiData.consList" border>
|
||||||
|
<el-table-column label="序号" type="index" width="60"></el-table-column>
|
||||||
|
<el-table-column label="耗材名称" prop="consInfoId">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-select v-model="scope.row.consInfoId" reserve-keyword placeholder="请输入关键词"
|
||||||
|
@change="selectionChange($event, scope.row)">
|
||||||
|
<el-option v-for="item in options" :key="item.id" :label="item.conName" :value="item.id">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <div class="tips" v-if="scope.row.stockNumber">库存:{{ scope.row.stockNumber }}</div> -->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="单位" prop="conUnit"> </el-table-column>
|
||||||
|
<el-table-column label="使用数量" prop="surplusStock" min-width="150px">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-input-number v-model="scope.row.surplusStock" :min="0" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="100">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<div class="table_btn_wrap">
|
||||||
|
<div class="btn sub" v-if="haocaiData.consList.length > 1"
|
||||||
|
@click="haocaiData.consList.splice(scope.$index, 1)">
|
||||||
|
<el-icon>
|
||||||
|
<RemoveFilled />
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
|
<div class="btn add" v-if="scope.$index == haocaiData.consList.length - 1" @click="createItem(scope.row)">
|
||||||
|
<el-icon>
|
||||||
|
<CirclePlusFilled />
|
||||||
|
</el-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</MyDialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -63,12 +149,12 @@ import type { IObject, IOperatData } from "@/components/CURD/types";
|
||||||
import usePage from "@/components/CURD/usePage";
|
import usePage from "@/components/CURD/usePage";
|
||||||
import addModalConfig from "./indexconfig/add";
|
import addModalConfig from "./indexconfig/add";
|
||||||
import contentConfig from "./indexconfig/content";
|
import contentConfig from "./indexconfig/content";
|
||||||
|
import MultiImageUpload from "@/components/Upload/MultiImageUpload.vue"
|
||||||
import contentConfig2 from "./indexconfig/content2";
|
import contentConfig2 from "./indexconfig/content2";
|
||||||
import editModalConfig from "./indexconfig/edit";
|
import editModalConfig from "./indexconfig/edit";
|
||||||
import searchConfig from "./indexconfig/search";
|
import searchConfig from "./indexconfig/search";
|
||||||
import MyDialog from "@/components/mycomponents/myDialog.vue";
|
import MyDialog from "@/components/mycomponents/myDialog.vue";
|
||||||
import Statistics from "./indexconfig/statistics.vue";
|
import Statistics from "./indexconfig/statistics.vue";
|
||||||
|
|
||||||
const {
|
const {
|
||||||
searchRef,
|
searchRef,
|
||||||
contentRef,
|
contentRef,
|
||||||
|
|
@ -84,11 +170,38 @@ const {
|
||||||
} = usePage();
|
} = usePage();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
let gongjiData = ref({});
|
let gongjiData = ref({});
|
||||||
|
const myDialogRef = ref(null);
|
||||||
|
const route = useRoute();
|
||||||
|
const myDialogRefbaosun = ref(null);
|
||||||
|
const myDialogRefhaocai = ref(null);
|
||||||
|
let haocaiData = ref({});
|
||||||
|
let options = ref([]);
|
||||||
|
const form = reactive({
|
||||||
|
warnLine: "",
|
||||||
|
});
|
||||||
|
let datas = reactive({
|
||||||
|
number: 0,
|
||||||
|
remark: "",
|
||||||
|
images: []
|
||||||
|
});
|
||||||
function newHandleQueryClick(e: IObject | undefined) {
|
function newHandleQueryClick(e: IObject | undefined) {
|
||||||
const filterParams = contentRef.value?.getFilterParams();
|
const filterParams = contentRef.value?.getFilterParams();
|
||||||
contentRef.value?.fetchPageData({ ...e, ...filterParams }, true);
|
contentRef.value?.fetchPageData({ ...e, ...filterParams }, true);
|
||||||
getTongji(e);
|
getTongji(e);
|
||||||
}
|
}
|
||||||
|
function editOpen(item: any) {
|
||||||
|
haocaiData.value = item
|
||||||
|
if (haocaiData.value.consList.length == 0) {
|
||||||
|
let items = {
|
||||||
|
"productId": item.id,
|
||||||
|
"consInfoId": "",
|
||||||
|
"surplusStock": '0'
|
||||||
|
}
|
||||||
|
haocaiData.value.consList.push(items)
|
||||||
|
}
|
||||||
|
handleResetClick()
|
||||||
|
myDialogRefhaocai.value.open();
|
||||||
|
}
|
||||||
// 重置
|
// 重置
|
||||||
function handleResetClick2(queryParams: IObject) {
|
function handleResetClick2(queryParams: IObject) {
|
||||||
const filterParams = contentRef.value?.getFilterParams();
|
const filterParams = contentRef.value?.getFilterParams();
|
||||||
|
|
@ -102,9 +215,7 @@ function getTongji(params: IObject | undefined) {
|
||||||
gongjiData.value = res
|
gongjiData.value = res
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const form = reactive({
|
|
||||||
num: "",
|
|
||||||
});
|
|
||||||
// 新增
|
// 新增
|
||||||
async function handleAddClick() {
|
async function handleAddClick() {
|
||||||
router.push({ name: "addgoods" });
|
router.push({ name: "addgoods" });
|
||||||
|
|
@ -112,7 +223,15 @@ async function handleAddClick() {
|
||||||
// 加载上级规格下拉数据源
|
// 加载上级规格下拉数据源
|
||||||
// addModalConfig.formItems[2]!.attrs!.data = await UserAPI.getPage({ name: "" });
|
// addModalConfig.formItems[2]!.attrs!.data = await UserAPI.getPage({ name: "" });
|
||||||
// 加载角色下拉数据源
|
// 加载角色下拉数据源
|
||||||
// addModalConfig.formItems[4]!.options = await RoleAPI.getOptions();
|
}
|
||||||
|
// 生成新商品绑定耗材关系项
|
||||||
|
function createItem(val: IObject) {
|
||||||
|
let item = {
|
||||||
|
"productId": val.productId,
|
||||||
|
"consInfoId": "",
|
||||||
|
"surplusStock": ''
|
||||||
|
}
|
||||||
|
haocaiData.value.consList.push(item)
|
||||||
}
|
}
|
||||||
// 上架
|
// 上架
|
||||||
function handleSwitchChange(data: any) {
|
function handleSwitchChange(data: any) {
|
||||||
|
|
@ -123,11 +242,37 @@ function handleSwitchChange(data: any) {
|
||||||
};
|
};
|
||||||
UserAPI.onOff(obj);
|
UserAPI.onOff(obj);
|
||||||
}
|
}
|
||||||
|
// 售罄
|
||||||
|
function handleSwitchChangeTwo(data: any) {
|
||||||
|
let obj = {
|
||||||
|
type: data.type == "sku" ? "sku" : "product",
|
||||||
|
id: data.id,
|
||||||
|
isSoldOut: data.isSoldStock,
|
||||||
|
};
|
||||||
|
UserAPI.markIsSoldOut(obj);
|
||||||
|
}
|
||||||
|
function handleSwitchChangethree(data: any) {
|
||||||
|
let obj = {
|
||||||
|
type: data.type == "sku" ? "sku" : "product",
|
||||||
|
id: data.id,
|
||||||
|
isSoldOut: data.isSoldStock,
|
||||||
|
};
|
||||||
|
UserAPI.markIsSoldOut(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退款退回
|
||||||
|
async function handleSwitchhaocai(row: IObject) {
|
||||||
|
let res = await UserAPI.refundToStock({ isReturn: row.isRefundStock, id: row.id })
|
||||||
|
ElMessage.success('成功')
|
||||||
|
handleResetClick()
|
||||||
|
// myDialogRefhaocai.value.close()
|
||||||
|
}
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
async function handleEditClick(row: IObject) {
|
async function handleEditClick(row: IObject) {
|
||||||
router.push({ name: "addgoods", query: { goods_id: row.id } });
|
router.push({ name: "addgoods", query: { goods_id: row.id } });
|
||||||
}
|
}
|
||||||
const myDialogRef = ref(null);
|
|
||||||
// 其他工具栏
|
// 其他工具栏
|
||||||
function handleToolbarClick(name: string) {
|
function handleToolbarClick(name: string) {
|
||||||
console.log(name);
|
console.log(name);
|
||||||
|
|
@ -136,8 +281,32 @@ function handleToolbarClick(name: string) {
|
||||||
myDialogRef.value.open();
|
myDialogRef.value.open();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function confirm() {
|
async function confirm() {
|
||||||
console.log(form, "debug");
|
let res = await UserAPI.stockWarning(form.warnLine)
|
||||||
|
ElMessage.success("成功");
|
||||||
|
myDialogRef.value.close();
|
||||||
|
|
||||||
|
}
|
||||||
|
// 商品选择耗材
|
||||||
|
function selectionChange(e, row) {
|
||||||
|
let item = options.value.find(item => item.id == e)
|
||||||
|
row.name = item.conName
|
||||||
|
row.conUnit = item.conUnit
|
||||||
|
}
|
||||||
|
async function confirmbaosun() {
|
||||||
|
let res = await UserAPI.reportDamage(datas)
|
||||||
|
ElMessage.success("成功");
|
||||||
|
myDialogRefbaosun.value.close();
|
||||||
|
}
|
||||||
|
async function confirmhaocai() {
|
||||||
|
let obj = {
|
||||||
|
consList: haocaiData.value.consList,
|
||||||
|
id: haocaiData.value.id
|
||||||
|
}
|
||||||
|
let res = await UserAPI.bind(obj)
|
||||||
|
ElMessage.success("成功");
|
||||||
|
handleResetClick()
|
||||||
|
myDialogRefhaocai.value.close();
|
||||||
}
|
}
|
||||||
// 商品规格
|
// 商品规格
|
||||||
function typeFilter(item: any) {
|
function typeFilter(item: any) {
|
||||||
|
|
@ -155,44 +324,40 @@ function typeFilter(item: any) {
|
||||||
}
|
}
|
||||||
// 其他操作列
|
// 其他操作列
|
||||||
async function handleOperatClick(data: IOperatData) {
|
async function handleOperatClick(data: IOperatData) {
|
||||||
console.log(data);
|
datas.productId = data.row.id
|
||||||
// 重置密码
|
myDialogRefbaosun.value.open();
|
||||||
if (data.name === "reset_pwd") {
|
|
||||||
ElMessageBox.prompt("请输入用户「" + data.row.username + "」的新密码", "重置密码", {
|
|
||||||
confirmButtonText: "确定",
|
|
||||||
cancelButtonText: "取消",
|
|
||||||
}).then(({ value }) => {
|
|
||||||
if (!value || value.length < 6) {
|
|
||||||
ElMessage.warning("密码至少需要6位字符,请重新输入");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// UserAPI.resetPassword(data.row.id, value).then(() => {
|
|
||||||
// ElMessage.success("密码重置成功,新密码是:" + value);
|
|
||||||
// });
|
|
||||||
});
|
|
||||||
} else if (data.name === "detail") {
|
|
||||||
// 禁用表单编辑
|
|
||||||
editModalRef.value?.handleDisabled(true);
|
|
||||||
// 打开抽屉
|
|
||||||
editModalRef.value?.setModalVisible();
|
|
||||||
// 修改抽屉标题
|
|
||||||
editModalConfig.drawer = { ...editModalConfig.drawer, title: "用户详情" };
|
|
||||||
// 加载部门下拉数据源
|
|
||||||
// editModalConfig.formItems[2]!.attrs!.data = await DeptAPI.getOptions();
|
|
||||||
// 加载角色下拉数据源
|
|
||||||
// editModalConfig.formItems[4]!.options = await RoleAPI.getOptions();
|
|
||||||
// 根据id获取数据进行填充
|
|
||||||
// const formData = await UserAPI.getFormData(data.row.id);
|
|
||||||
// 设置表单数据
|
|
||||||
// editModalRef.value?.setFormData(formData);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const route = useRoute();
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log(route.query);
|
console.log(route.query);
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
contentRef.value?.fetchPageData({ id: route.query.id });
|
contentRef.value?.fetchPageData({ id: route.query.id });
|
||||||
}
|
}
|
||||||
|
// 获取耗材列表
|
||||||
|
gethaocaiList()
|
||||||
});
|
});
|
||||||
|
async function gethaocaiList() {
|
||||||
|
let res = await UserAPI.productcons({ id: route.query.id })
|
||||||
|
options.value = res.records
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.table_btn_wrap {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
font-size: 26px;
|
||||||
|
|
||||||
|
&.sub {
|
||||||
|
color: #FF4D4F;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.add {
|
||||||
|
color: #52C41A;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -27,7 +27,7 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
||||||
obj.createEndTime = obj['1']
|
obj.createEndTime = obj['1']
|
||||||
const res = await UserAPI.getPage(obj);
|
const res = await UserAPI.getPage(obj);
|
||||||
res.records.forEach((element: any) => {
|
res.records.forEach((element: any) => {
|
||||||
if (element.type == "single") {
|
if (element.type != "sku") {
|
||||||
delete element.skuList
|
delete element.skuList
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -59,13 +59,13 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
||||||
pk: "id",
|
pk: "id",
|
||||||
toolbar: [
|
toolbar: [
|
||||||
"add",
|
"add",
|
||||||
// {
|
{
|
||||||
// icon: "edit",
|
icon: "edit",
|
||||||
// text: "库存预警",
|
text: "库存预警",
|
||||||
// type: "info",
|
type: "info",
|
||||||
// name: "custom1",
|
name: "custom1",
|
||||||
// auth: "import",
|
auth: "import",
|
||||||
// },
|
},
|
||||||
],
|
],
|
||||||
cols: [
|
cols: [
|
||||||
// { type: "selection", width: 50, align: "center" },
|
// { type: "selection", width: 50, align: "center" },
|
||||||
|
|
@ -77,7 +77,7 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
||||||
slotName: "type",
|
slotName: "type",
|
||||||
},
|
},
|
||||||
{ label: "库存", align: "center", prop: "stockNumber" },
|
{ label: "库存", align: "center", prop: "stockNumber" },
|
||||||
{ label: "耗材信息", align: "center", prop: "consName" },
|
{ label: "耗材信息", align: "center", prop: "consName", slotName: "consumables", templet: "custom", },
|
||||||
{
|
{
|
||||||
label: "上架",
|
label: "上架",
|
||||||
align: "center",
|
align: "center",
|
||||||
|
|
@ -85,13 +85,27 @@ const contentConfig: IContentConfig<UserPageQuery> = {
|
||||||
templet: "custom",
|
templet: "custom",
|
||||||
slotName: "shangjia",
|
slotName: "shangjia",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "售罄",
|
||||||
|
align: "center",
|
||||||
|
prop: "isSoldStock",
|
||||||
|
templet: "custom",
|
||||||
|
slotName: "sellOut",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "退款退回库存",
|
||||||
|
align: "center",
|
||||||
|
prop: "isRefundStock",
|
||||||
|
templet: "custom",
|
||||||
|
slotName: "tuikuantuihui",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "操作",
|
label: "操作",
|
||||||
align: "center",
|
align: "center",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
width: 280,
|
width: 280,
|
||||||
templet: "tool",
|
templet: "tool",
|
||||||
operat: ["edit", "delete"],
|
operat: [{ text: "报损" }, "edit", "delete"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-for="(item, index) in datas.DialogForm.couponsList" :label="item.title">
|
<el-form-item v-for="(item, index) in datas.DialogForm.couponsList" :label="item.title">
|
||||||
<el-input-number v-model="item.number" min="1" controls-position="right" placeholder="请输入数量" />
|
<el-input-number v-model="item.number" min="1" controls-position="right" placeholder="请输入数量" />
|
||||||
|
<el-button type="" text @click="removegoods(index)">删除</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -96,6 +97,9 @@ onMounted(() => {
|
||||||
getList(res)
|
getList(res)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
function removegoods(index) {
|
||||||
|
datas.DialogForm.couponsList.splice(index, 1)
|
||||||
|
}
|
||||||
function selectShopRes(item) {
|
function selectShopRes(item) {
|
||||||
item.forEach(ele => {
|
item.forEach(ele => {
|
||||||
ele.number = 1
|
ele.number = 1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue