Merge branch 'master' of http://124.223.211.244:8418/zianxin/biz-pc-cloud
# Conflicts: # src/views/admin/system/user/face-manage.vue
This commit is contained in:
commit
99e13cf104
26 files changed
+303
-97
No files matched your search
@@ -2,7 +2,7 @@ import request from '/@/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplier/page',
|
||||
url: '/supermarket/smErpSupplier/page',
|
||||
method: 'get',
|
||||
params: query,
|
||||
});
|
||||
@@ -10,7 +10,7 @@ export function fetchList(query?: Object) {
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplier',
|
||||
url: '/supermarket/smErpSupplier',
|
||||
method: 'post',
|
||||
data: obj,
|
||||
});
|
||||
@@ -18,14 +18,14 @@ export function addObj(obj?: Object) {
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplier/' + id,
|
||||
url: '/supermarket/smErpSupplier/' + id,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplier',
|
||||
url: '/supermarket/smErpSupplier',
|
||||
method: 'delete',
|
||||
data: ids,
|
||||
});
|
||||
@@ -33,7 +33,7 @@ export function delObjs(ids?: Object) {
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplier',
|
||||
url: '/supermarket/smErpSupplier',
|
||||
method: 'put',
|
||||
data: obj,
|
||||
});
|
||||
@@ -41,7 +41,7 @@ export function putObj(obj?: Object) {
|
||||
|
||||
export function getSupplierTypeOptions(): any {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplierType/simpleAll',
|
||||
url: '/supermarket/smErpSupplierType/simpleAll',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import request from "/@/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplierType/page',
|
||||
url: '/supermarket/smErpSupplierType/page',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -10,7 +10,7 @@ export function fetchList(query?: Object) {
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplierType',
|
||||
url: '/supermarket/smErpSupplierType',
|
||||
method: 'post',
|
||||
data: obj
|
||||
})
|
||||
@@ -18,14 +18,14 @@ export function addObj(obj?: Object) {
|
||||
|
||||
export function getObj(id?: string) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplierType/' + id,
|
||||
url: '/supermarket/smErpSupplierType/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
export function delObjs(ids?: Object) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplierType',
|
||||
url: '/supermarket/smErpSupplierType',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
@@ -33,7 +33,7 @@ export function delObjs(ids?: Object) {
|
||||
|
||||
export function putObj(obj?: Object) {
|
||||
return request({
|
||||
url: '/supermarketerp/smErpSupplierType',
|
||||
url: '/supermarket/smErpSupplierType',
|
||||
method: 'put',
|
||||
data: obj
|
||||
})
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import request from "/@/utils/request"
|
||||
import request from "/src/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import request from "/@/utils/request"
|
||||
import request from "/src/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import request from "/@/utils/request"
|
||||
import request from "/src/utils/request"
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from '/@/utils/request';
|
||||
import request from '/src/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from '/@/utils/request';
|
||||
import request from '/src/utils/request';
|
||||
|
||||
export function fetchList(query?: Object) {
|
||||
return request({
|
||||
@@ -0,0 +1,196 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- 头部区域 -->
|
||||
<div class="container-header">
|
||||
<div class="container-header-input">
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
suffix-icon="search"
|
||||
:placeholder="placeholder"
|
||||
clearable
|
||||
@change="getTreeData"
|
||||
/>
|
||||
</div>
|
||||
<div class="container-header-dropdown" v-if="showExpand">
|
||||
<el-dropdown :hide-on-click="false">
|
||||
<el-icon style="transform: rotate(90deg)">
|
||||
<MoreFilled />
|
||||
</el-icon>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item>
|
||||
<el-button
|
||||
class="!h-[20px] !text-gray-500 dark:!text-white dark:hover:!text-primary"
|
||||
link
|
||||
:icon="isExpand ? 'expand' : 'fold'"
|
||||
@click="toggleRowExpansionAll(isExpand ? false : true)"
|
||||
>
|
||||
{{ isExpand ? "折叠" : "展开" }}
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 树形结构 -->
|
||||
<div class="container-tree">
|
||||
<el-tree
|
||||
ref="depTreeRef"
|
||||
:props="props.props"
|
||||
:data="state.treeList"
|
||||
:expand-on-click-node="false"
|
||||
:loading="state.loading"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
<template #default="{ node, data }" v-if="$slots.default">
|
||||
<slot :node="node" :data="data" />
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
|
||||
<!-- 底部区域 -->
|
||||
<div class="container-switch">
|
||||
<el-switch
|
||||
v-model="state.isDeep"
|
||||
@change="handleTreeDeepSearch"
|
||||
:inactive-text="switchInactiveText"
|
||||
:active-text="switchActiveText"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="dep-tree">
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
placeholder?: string // 输入框占位符
|
||||
loading?: boolean // 加载中的状态
|
||||
showExpand?: boolean // 折叠控制
|
||||
query?: (searchName?: string) => Promise<any> // 查询函数
|
||||
props?: object
|
||||
switchInactiveText?: string | undefined
|
||||
switchActiveText?: string | undefined
|
||||
}>(),
|
||||
{
|
||||
placeholder: "",
|
||||
loading: false,
|
||||
showExpand: true,
|
||||
query: () => new Promise((resolve) => resolve([])),
|
||||
props: () => {
|
||||
return {
|
||||
label: "name",
|
||||
children: "children",
|
||||
value: "id",
|
||||
}
|
||||
},
|
||||
switchInactiveText: "当前级",
|
||||
switchActiveText: "当前级及子级",
|
||||
},
|
||||
)
|
||||
const emit = defineEmits(["nodeClick", "treeDeepSearch"])
|
||||
|
||||
const state = reactive({
|
||||
treeList: [],
|
||||
loading: props.loading,
|
||||
isDeep: false,
|
||||
})
|
||||
|
||||
const depTreeRef = ref()
|
||||
const searchName = ref() // 查询关键字
|
||||
const isExpand = ref(true) // 是否展开所有节点
|
||||
|
||||
// 获取部门树形结构数据
|
||||
const getTreeData = () => {
|
||||
if (props.query instanceof Function) {
|
||||
state.loading = true
|
||||
|
||||
// 调用传入的查询函数,并将查询关键字作为参数传入
|
||||
const result = props.query(unref(searchName))
|
||||
|
||||
// 如果查询结果为 Promise 类型,则进行后续处理
|
||||
if ((typeof result === "object" || typeof result === "function") && typeof result.then === "function") {
|
||||
result
|
||||
.then((r: any) => {
|
||||
state.treeList = r.data
|
||||
})
|
||||
.catch((err) => {
|
||||
useMessage().error(err.msg)
|
||||
})
|
||||
.finally(() => (state.loading = false))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 点击树形结构节点
|
||||
const handleNodeClick = (item: any) => emit("nodeClick", item)
|
||||
|
||||
// 节点深度搜索
|
||||
const handleTreeDeepSearch = () => emit("treeDeepSearch", state.isDeep)
|
||||
|
||||
// 切换所有节点的展开/收起状态。status:true 为展开,false 为收起
|
||||
const toggleRowExpansionAll = (status: boolean) => {
|
||||
isExpand.value = status
|
||||
const nodes = depTreeRef.value.store._getAllNodes()
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
nodes[i].expanded = status
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getTreeData()
|
||||
})
|
||||
|
||||
defineExpose({
|
||||
getTreeData,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
&-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 10px;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 10;
|
||||
|
||||
&-input {
|
||||
width: 90%;
|
||||
}
|
||||
&-dropdown {
|
||||
flex: 1;
|
||||
margin-left: 5%;
|
||||
line-height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&-tree {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
&:hover {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&-switch {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding-top: 10px;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 10;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,13 @@
|
||||
<div class="head-container">
|
||||
<div class="head-container-header">
|
||||
<div class="head-container-header-input">
|
||||
<el-input v-model="searchName" suffix-icon="search" :placeholder="placeholder" clearable @change="getdeptTree" />
|
||||
<el-input
|
||||
v-model="searchName"
|
||||
suffix-icon="search"
|
||||
:placeholder="placeholder"
|
||||
clearable
|
||||
@change="getdeptTree"
|
||||
/>
|
||||
</div>
|
||||
<div class="head-container-header-dropdown" v-if="showExpand">
|
||||
<el-dropdown :hide-on-click="false">
|
||||
@@ -19,7 +25,7 @@
|
||||
:icon="isExpand ? 'expand' : 'fold'"
|
||||
@click="toggleRowExpansionAll(isExpand ? false : true)"
|
||||
>
|
||||
{{ isExpand ? '折叠' : '展开' }}
|
||||
{{ isExpand ? "折叠" : "展开" }}
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -47,8 +53,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="query-tree">
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
const emit = defineEmits(['search', 'nodeClick']);
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
const emit = defineEmits(["search", "nodeClick"])
|
||||
|
||||
const props = defineProps({
|
||||
/**
|
||||
@@ -60,10 +66,10 @@ const props = defineProps({
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
label: 'name',
|
||||
children: 'children',
|
||||
value: 'id',
|
||||
};
|
||||
label: "name",
|
||||
children: "children",
|
||||
value: "id",
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -74,7 +80,7 @@ const props = defineProps({
|
||||
*/
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '',
|
||||
default: "",
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -102,20 +108,20 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
const state = reactive({
|
||||
List: [], // 树形结构列表数据
|
||||
localLoading: props.loading, // 是否加载中
|
||||
});
|
||||
})
|
||||
|
||||
const deptTreeRef = ref(); // 部门树形结构组件实例引用
|
||||
const searchName = ref(); // 查询关键字
|
||||
const isExpand = ref(true); // 是否展开所有节点
|
||||
const deptTreeRef = ref() // 部门树形结构组件实例引用
|
||||
const searchName = ref() // 查询关键字
|
||||
const isExpand = ref(true) // 是否展开所有节点
|
||||
|
||||
const buttonClass = computed(() => {
|
||||
return ['!h-[20px]', 'reset-margin', '!text-gray-500', 'dark:!text-white', 'dark:hover:!text-primary'];
|
||||
});
|
||||
return ["!h-[20px]", "reset-margin", "!text-gray-500", "dark:!text-white", "dark:hover:!text-primary"]
|
||||
})
|
||||
|
||||
/**
|
||||
* 点击树形结构节点触发的事件。
|
||||
@@ -123,31 +129,31 @@ const buttonClass = computed(() => {
|
||||
* @param item 被点击的节点数据。
|
||||
*/
|
||||
const handleNodeClick = (item: any) => {
|
||||
emit('nodeClick', item);
|
||||
};
|
||||
emit("nodeClick", item)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门树形结构数据。
|
||||
*/
|
||||
const getdeptTree = () => {
|
||||
if (props.query instanceof Function) {
|
||||
state.localLoading = true;
|
||||
state.localLoading = true
|
||||
|
||||
// 调用传入的查询函数,并将查询关键字作为参数传入
|
||||
const result = props.query(unref(searchName));
|
||||
const result = props.query(unref(searchName))
|
||||
|
||||
// 如果查询结果为 Promise 类型,则进行后续处理
|
||||
if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
|
||||
if ((typeof result === "object" || typeof result === "function") && typeof result.then === "function") {
|
||||
result
|
||||
.then((r: any) => {
|
||||
state.List = r.data;
|
||||
state.List = r.data
|
||||
})
|
||||
.catch((err) => {
|
||||
useMessage().error(err.msg);
|
||||
});
|
||||
useMessage().error(err.msg)
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换所有节点的展开/收起状态。
|
||||
@@ -155,21 +161,21 @@ const getdeptTree = () => {
|
||||
* @param status 目标状态,true 为展开,false 为收起。
|
||||
*/
|
||||
const toggleRowExpansionAll = (status) => {
|
||||
isExpand.value = status;
|
||||
const nodes = deptTreeRef.value.store._getAllNodes();
|
||||
isExpand.value = status
|
||||
const nodes = deptTreeRef.value.store._getAllNodes()
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
nodes[i].expanded = status;
|
||||
nodes[i].expanded = status
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getdeptTree();
|
||||
});
|
||||
getdeptTree()
|
||||
})
|
||||
|
||||
// 方便父组件调用刷新树方法
|
||||
defineExpose({
|
||||
getdeptTree,
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.head-container {
|
||||
|
||||
@@ -12,6 +12,7 @@ import Tip from "/@/components/Tip/index.vue"
|
||||
import TagList from "/@/components/TagList/index.vue"
|
||||
import SvgIcon from "/@/components/SvgIcon/index.vue"
|
||||
import PreviewImage from "/@/components/PreviewImage/index.vue"
|
||||
import DepTree from "/@/components/DepTree/index.vue"
|
||||
|
||||
// 业务组件
|
||||
import SelectUser from "/@/components/Select/SelectUser.vue"
|
||||
@@ -56,6 +57,8 @@ export default {
|
||||
app.component("TagList", TagList)
|
||||
app.component("SvgIcon", SvgIcon)
|
||||
app.component("PreviewImage", PreviewImage)
|
||||
app.component("DepTree", DepTree)
|
||||
|
||||
app.component("SelectUser", SelectUser)
|
||||
app.component("SelectWalletType", SelectWalletType)
|
||||
app.component("SelectMch", SelectMch)
|
||||
|
||||
@@ -26,10 +26,15 @@
|
||||
label="操作"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<<<<<<< HEAD
|
||||
<el-button v-auth="'userFace_sysUserFace_edit'" link type="primary" @click="editFace(row)">
|
||||
<Icon icon="ep:edit" />修改
|
||||
</el-button>
|
||||
<el-button v-auth="'userFace_sysUserFace_del'" link type="danger" @click="delFace(row)"> 删除 </el-button>
|
||||
=======
|
||||
<el-button link type="primary" @click="editFace(row)">修改</el-button>
|
||||
<el-button link type="danger" @click="delFace(row)">删除</el-button>
|
||||
>>>>>>> 8cfb59e9a6321865edc4426d8f37304c734f1b05
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<splitpanes>
|
||||
<pane size="15">
|
||||
<pane size="30">
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-scrollbar>
|
||||
<query-tree
|
||||
<dep-tree
|
||||
ref="queryTreeRef"
|
||||
:placeholder="$t('common.queryDeptTip')"
|
||||
:query="deptData.queryList"
|
||||
:show-expand="true"
|
||||
@node-click="handleNodeClick"
|
||||
@treeDeepSearch="treeDeepSearch"
|
||||
switch-inactive-text="当前部门"
|
||||
switch-active-text="当前部门及子部门"
|
||||
>
|
||||
<!-- 没有数据权限提示 -->
|
||||
<template #default="{ node, data }">
|
||||
@@ -20,23 +23,15 @@
|
||||
:content="$t('sysuser.noDataScopeTip')"
|
||||
placement="right-start"
|
||||
>
|
||||
<span
|
||||
>{{ node.label }}
|
||||
<span>
|
||||
{{ node.label }}
|
||||
<SvgIcon name="ele-Lock" />
|
||||
</span>
|
||||
</el-tooltip>
|
||||
<span v-if="!data.isLock">{{ node.label }}</span>
|
||||
</template>
|
||||
</query-tree>
|
||||
</dep-tree>
|
||||
</el-scrollbar>
|
||||
<div class="flex justify-center items-center pt-2">
|
||||
<el-switch
|
||||
v-model="state.queryForm.isDeepDept"
|
||||
@change="isDeepDeptChange"
|
||||
inactive-text="当前部门"
|
||||
active-text="当前部门及子部门"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</pane>
|
||||
<pane class="ml8">
|
||||
@@ -283,7 +278,8 @@ const deptData = reactive({
|
||||
},
|
||||
})
|
||||
|
||||
const isDeepDeptChange = () => {
|
||||
const treeDeepSearch = (isDeep: boolean) => {
|
||||
state.queryForm.isDeepDept = isDeep
|
||||
getDataList()
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
|
||||
<script setup lang="ts" name="SupermarketAuxiliaryCodeDialog">
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import { getObj, addObj, putObj } from '/@/api/supermarket/supermarketAuxiliaryCode';
|
||||
import { getObj, addObj, putObj } from '/src/api/supermarketerp/supermarketAuxiliaryCode';
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
// 定义变量内容
|
||||
+1
-1
@@ -87,7 +87,7 @@
|
||||
|
||||
<script setup lang="ts" name="systemSupermarketAuxiliaryCode">
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||
import { fetchList, delObjs } from '/@/api/supermarket/supermarketAuxiliaryCode';
|
||||
import { fetchList, delObjs } from '/src/api/supermarketerp/supermarketAuxiliaryCode';
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||
|
||||
// 引入组件
|
||||
+1
-1
@@ -55,7 +55,7 @@
|
||||
<script setup lang="ts" name="SupermarketBrandDialog">
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import { getObj, addObj, putObj } from "/@/api/supermarket/supermarketBrand"
|
||||
import { getObj, addObj, putObj } from "/src/api/supermarketerp/supermarketBrand"
|
||||
import { rule } from "/@/utils/validate"
|
||||
const emit = defineEmits(["refresh"])
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@
|
||||
|
||||
<script setup lang="ts" name="systemSupermarketBrand">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { fetchList, delObjs } from "/@/api/supermarket/supermarketBrand"
|
||||
import { fetchList, delObjs } from "/src/api/supermarketerp/supermarketBrand"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
<script setup lang="ts" name="SupermarketCategoryDialog">
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import { getObj, addObj, putObj } from "/@/api/supermarket/supermarketCategory"
|
||||
import { getObj, addObj, putObj } from "/src/api/supermarketerp/supermarketCategory"
|
||||
import { rule } from "/@/utils/validate"
|
||||
const emit = defineEmits(["refresh"])
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@
|
||||
|
||||
<script setup lang="ts" name="systemSupermarketCategory">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { fetchList, delObjs } from "/@/api/supermarket/supermarketCategory"
|
||||
import { fetchList, delObjs } from "/src/api/supermarketerp/supermarketCategory"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+20
-20
@@ -67,21 +67,26 @@
|
||||
<upload-img v-model:imageUrl="form.picUrl"></upload-img>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" class="mb20">
|
||||
<!-- <el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品轮播图" prop="sliderPicUrls">
|
||||
<upload-imgs v-model:imageUrl="form.sliderPicUrls"></upload-imgs>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="排序字段" prop="sort">
|
||||
<el-input-number :min="0" :max="1000" :precision="0" v-model="form.sort" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="总库存" prop="stock">
|
||||
<el-input-number v-model="form.stock" :min="0" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12" class="mb20">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品状态" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
@@ -96,16 +101,11 @@
|
||||
<!-- <el-input-number v-model="form.costPrice" placeholder="请输入成本单价,单位:分"></el-input-number>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="库存" prop="stock">
|
||||
<el-input-number v-model="form.stock" :min="0" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" class="mb20">
|
||||
<!-- <el-col :span="12" class="mb20">
|
||||
<el-form-item label="赠送积分" prop="giveIntegral">
|
||||
<el-input-number v-model="form.giveIntegral" :min="0" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<!-- <el-col :span="12" class="mb20">-->
|
||||
<!-- <el-form-item label="规格" prop="specification">-->
|
||||
<!-- <el-input v-model="form.specification" placeholder="请输入规格" />-->
|
||||
@@ -171,11 +171,11 @@
|
||||
<el-input type="textarea" v-model="form.introduction" rows="4" placeholder="请输入商品简介" maxlength="400" show-word-limit />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="24" class="mb20">
|
||||
<!-- <el-col :span="24" class="mb20">
|
||||
<el-form-item label="商品详情" prop="description">
|
||||
<editor v-if="visible" v-model:get-html="form.description" placeholder="请输入商品详情"></editor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>-->
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item label="库存上限" prop="inventoryUpperLimit">
|
||||
<el-input-number v-model="form.inventoryUpperLimit" :min="0" :precision="0" />
|
||||
@@ -218,15 +218,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import { getObj, addObj, putObj, getSupermarketCategory, getSupermarketBrand } from "/@/api/supermarket/supermarketSpu"
|
||||
import { getSupplierTypeOptions } from "/@/api/supermarketerp/smErpSupplier"
|
||||
import { rule } from "/@/utils/validate"
|
||||
import { useDict } from "/src/hooks/dict"
|
||||
import { useMessage } from "/src/hooks/message"
|
||||
import { getObj, addObj, putObj, getSupermarketCategory, getSupermarketBrand } from "/src/api/supermarketerp/supermarketSpu"
|
||||
import { getSupplierTypeOptions } from "/src/api/supermarketerp/smErpSupplier"
|
||||
import { rule } from "/src/utils/validate"
|
||||
import supermarketAuxiliaryCode from "./components/supermarketAuxiliaryCode/index.vue"
|
||||
import supermarketUnit from "./components/supermarketUnit/index.vue"
|
||||
import { TabPaneName } from "element-plus"
|
||||
import { displayPrice, storePrice } from "/@/utils/formatMoney"
|
||||
import { displayPrice, storePrice } from "/src/utils/formatMoney"
|
||||
|
||||
const emit = defineEmits(["refresh"])
|
||||
|
||||
@@ -283,7 +283,7 @@ const dataRules = {
|
||||
productCode: [{ required: true, message: "货号不能为空", trigger: "blur" }],
|
||||
barcode: [{ required: true, message: "自编码/条码不能为空", trigger: "blur" }],
|
||||
productName: [{ required: true, message: "商品名称不能为空", trigger: "blur" }],
|
||||
unit: [{ required: true, message: "单位不能为空", trigger: "blur" }],
|
||||
stock: [{ required: true, message: "单位不能为空", trigger: "blur" }],
|
||||
categoryId: [{ required: true, message: "商品分类不能为空", trigger: "blur" }],
|
||||
brandId: [{ required: true, message: "品牌不能为空", trigger: "blur" }],
|
||||
picUrl: [{ required: true, message: "商品封面图不能为空", trigger: "blur" }],
|
||||
+4
-4
@@ -134,10 +134,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemSupermarketSpu">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { fetchList, delObjs, getSupermarketCategory, getSupermarketBrand } from "/@/api/supermarket/supermarketSpu"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { BasicTableProps, useTable } from "/src/hooks/table"
|
||||
import { fetchList, delObjs, getSupermarketCategory, getSupermarketBrand } from "/src/api/supermarketerp/supermarketSpu"
|
||||
import { useMessage, useMessageBox } from "/src/hooks/message"
|
||||
import { useDict } from "/src/hooks/dict"
|
||||
const imageBaseUrl = import.meta.env.VITE_IMAGE_BASE_PATH
|
||||
|
||||
// 引入组件
|
||||
+2
-2
@@ -52,8 +52,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="SupermarketAuxiliaryCodeDialog">
|
||||
import { useMessage } from '/@/hooks/message';
|
||||
import { getObj, addObj, putObj } from '/@/api/supermarket/supermarketUnit';
|
||||
import { useMessage } from '/src/hooks/message';
|
||||
import { getObj, addObj, putObj } from '/src/api/supermarketerp/supermarketUnit';
|
||||
const emit = defineEmits(['refresh']);
|
||||
|
||||
// 定义变量内容
|
||||
+3
-3
@@ -86,9 +86,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="systemSupermarketAuxiliaryCode">
|
||||
import { BasicTableProps, useTable } from '/@/hooks/table';
|
||||
import { fetchList, delObjs } from '/@/api/supermarket/supermarketUnit';
|
||||
import { useMessage, useMessageBox } from '/@/hooks/message';
|
||||
import { BasicTableProps, useTable } from '/src/hooks/table';
|
||||
import { fetchList, delObjs } from '/src/api/supermarketerp/supermarketUnit';
|
||||
import { useMessage, useMessageBox } from '/src/hooks/message';
|
||||
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import('./form.vue'));
|
||||
Reference in new issue
Block a user