|
|
@@ -5,14 +5,14 @@
|
|
|
<app-filter :option="filterOption">
|
|
|
<template #userid="{ item }">
|
|
|
<el-form-item :label="item.label" prop="userid">
|
|
|
- <app-select-member v-model="item.value" :params="{ usertype: '2,3' }"
|
|
|
+ <app-select-member v-model="item.value" :params="{ usertype: '2', roles: '7' }"
|
|
|
:placeholder="t('member.institution.goodscfg.tips2')" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
<template #goodsid="{ item }">
|
|
|
<el-form-item :label="item.label" prop="goodsid">
|
|
|
- <app-select-goods v-model="item.value"
|
|
|
- :params="{ trademodels: '52', goodsStatusIds: '3,6,7' }" />
|
|
|
+ <app-select-goods ref="goodsRef" v-model="item.value"
|
|
|
+ :params="{ marketId: queryParams.marketid ?? -1, goodsStatusIds: '3,6,7' }" />
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</app-filter>
|
|
|
@@ -45,6 +45,7 @@ import { useDataFilter } from '@/hooks/datatable-v2'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { useOperation } from '@/hooks/operation'
|
|
|
import { useMarket } from '@/hooks/market'
|
|
|
+import { useEnum } from '@/hooks/enum'
|
|
|
import { queryMemberGoodsLimit } from '@/services/api/member'
|
|
|
import { i18n } from '@/stores'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
@@ -54,8 +55,11 @@ import AppFilter from '@pc/components/base/table-filter-v2/index.vue'
|
|
|
import AppSelectGoods from '@pc/components/modules/select-goods/index.vue'
|
|
|
import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
|
|
|
|
+const flagEnum = useEnum('flag') // 确认状态
|
|
|
+
|
|
|
const { getMarketOptions } = useMarket()
|
|
|
const { global: { t } } = i18n
|
|
|
+const goodsRef = ref() // 商品组件实例
|
|
|
|
|
|
const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Member.MemberGoodsLimitRsp>({
|
|
|
onClose: () => onSearch()
|
|
|
@@ -64,7 +68,8 @@ const { componentMap, componentId, record, openComponent, closeComponent, getAct
|
|
|
const { dataList, total, pageSize, pageIndex, loading, run } = useRequest(queryMemberGoodsLimit, {
|
|
|
params: {
|
|
|
pageNum: 1,
|
|
|
- pageSize: 20
|
|
|
+ pageSize: 20,
|
|
|
+ roletype: 7
|
|
|
},
|
|
|
onError: (err) => {
|
|
|
ElMessage.error(err)
|
|
|
@@ -75,29 +80,27 @@ const tableColumns = ref<Model.TableColumn[]>([
|
|
|
{ field: 'membername', label: 'member.institution.goodscfg.membername' },
|
|
|
{ field: 'roledisplay', label: 'member.institution.goodscfg.roledisplay' },
|
|
|
{ field: 'goodsdisplay', label: 'member.institution.goodscfg.goodsdisplay' },
|
|
|
- { field: 'nodisplay', label: 'member.institution.goodscfg.nodisplay' },
|
|
|
- { field: 'cannotbuy', label: 'member.institution.goodscfg.cannotsell' },
|
|
|
- { field: 'cannotsell', label: 'member.institution.goodscfg.tips1' },
|
|
|
+ { field: 'isnodisplay', label: 'member.institution.goodscfg.nodisplay', formatValue: (val) => flagEnum.getEnumTypeName(val) },
|
|
|
+ { field: 'iscannotbuy', label: 'member.institution.goodscfg.cannotsell', formatValue: (val) => flagEnum.getEnumTypeName(val) },
|
|
|
+ { field: 'iscannotsell', label: 'member.institution.goodscfg.tips1', formatValue: (val) => flagEnum.getEnumTypeName(val) },
|
|
|
{ field: 'operate', label: 'common.operate', fixed: 'right' }
|
|
|
])
|
|
|
|
|
|
-const { filterOption, getQueryParams, resetFilters } = useDataFilter<Member.MemberGoodsLimitReq>({
|
|
|
+const { filterOption, queryParams, getQueryParams, resetFilters } = useDataFilter<Member.MemberGoodsLimitReq>({
|
|
|
filters: [
|
|
|
{
|
|
|
field: 'userid',
|
|
|
- label: t('member.institution.goodscfg.userid'),
|
|
|
- required: true,
|
|
|
+ label: t('member.institution.goodscfg.userid')
|
|
|
},
|
|
|
{
|
|
|
field: 'marketid',
|
|
|
label: t('member.institution.goodscfg.marketid'),
|
|
|
- required: true,
|
|
|
- options: () => getMarketOptions()
|
|
|
+ options: () => getMarketOptions([15, 97, 99], true),
|
|
|
+ onChange: () => goodsRef.value.onReset()
|
|
|
},
|
|
|
{
|
|
|
field: 'goodsid',
|
|
|
- label: t('member.institution.goodscfg.goodsid'),
|
|
|
- required: true,
|
|
|
+ label: t('member.institution.goodscfg.goodsid')
|
|
|
}
|
|
|
],
|
|
|
buttons: [
|
|
|
@@ -110,5 +113,4 @@ const onSearch = () => {
|
|
|
const qs = getQueryParams()
|
|
|
run(qs)
|
|
|
}
|
|
|
-
|
|
|
</script>
|