114 lines
2.9 KiB
Vue
114 lines
2.9 KiB
Vue
<template>
|
|||
|
|
<div>
|
||
|
|
<BasicShowContext title="لیست پیامک ها">
|
||
|
|
<BaseTable v-bind="tblProps" @register="submit" ref="tbl">
|
||
|
|
<template #extraHeader>
|
||
|
|
<BaseButton v-if="!mobile" type="primary" size="small" class="flex" @click="emits('add')">
|
||
|
|
<div>ارسال پیامک</div>
|
||
|
|
<BaseIcon icon="vuesax-linear:sms" Size="16px"/>
|
||
|
|
</BaseButton>
|
||
|
|
</template>
|
||
|
|
<template #action="{ column, record }">
|
||
|
|
<!-- <div class="gap-2 flex justify-center">
|
||
|
|
<a-tooltip placement="bottom" class="cursor-pointer" @click="emits('info', record)">
|
||
|
|
<template #title>
|
||
|
|
<span>مشخصات</span>
|
||
|
|
</template>
|
||
|
|
<Icon icon="vuesax-linear:stickynote" color="#10913A" />
|
||
|
|
</a-tooltip>
|
||
|
|
</div>-->
|
||
|
|
</template>
|
||
|
|
</BaseTable>
|
||
|
|
</BasicShowContext>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script lang="tsx" setup>
|
||
|
|
import type {TableInput} from '@core/type/baseTable'
|
||
|
|
import useBaseTable from '@core/components/BaseTableOld/hooks/useBaseTable'
|
||
|
|
import Icon from '@core/components/BaseIcon/src/Icon.vue'
|
||
|
|
import {changeCustomerActivation, getCustomerTable} from '@/api/customer'
|
||
|
|
import {cols} from '../hooks/smsColumns'
|
||
|
|
import {useUserStore} from '@/store/userStore'
|
||
|
|
import {usePrefix} from '@core/composable/usePrefix'
|
||
|
|
import {message} from 'ant-design-vue'
|
||
|
|
import {getOrderTable} from '@/api/order'
|
||
|
|
import {getPriceTable} from '@/api/price'
|
||
|
|
import {getSMSTable} from '@/api/sms'
|
||
|
|
|
||
|
|
const [submit, reload] = useBaseTable()
|
||
|
|
|
||
|
|
interface Prop {
|
||
|
|
mobile: number
|
||
|
|
}
|
||
|
|
|
||
|
|
const props = defineProps<Prop>()
|
||
|
|
const emits = defineEmits(['delete', 'edit', 'add', 'info'])
|
||
|
|
|
||
|
|
// const { prefixCls } = usePrefix('pophoverstatus')
|
||
|
|
|
||
|
|
//permission
|
||
|
|
/*function checkPermission(temp: string) {
|
||
|
|
const store = useUserStore()
|
||
|
|
return store.canAccess(temp)
|
||
|
|
}*/
|
||
|
|
|
||
|
|
//define table
|
||
|
|
const table = ref(null)
|
||
|
|
|
||
|
|
const tblProps = ref<any>({
|
||
|
|
columns: cols,
|
||
|
|
api: (params: TableInput) => {
|
||
|
|
if (props.mobile) {
|
||
|
|
params.filters = []
|
||
|
|
params.filters?.push({
|
||
|
|
field: "receiver",
|
||
|
|
type: "text",
|
||
|
|
value: props.mobile,
|
||
|
|
cr: "and",
|
||
|
|
op: "eq",
|
||
|
|
hidden: false
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
return getSMSTable(params)
|
||
|
|
}
|
||
|
|
//bordered: true
|
||
|
|
})
|
||
|
|
// const loading = ref<boolean>(false)
|
||
|
|
|
||
|
|
const fetch = () => {
|
||
|
|
// console.log('sss')
|
||
|
|
reload()
|
||
|
|
}
|
||
|
|
// const spinTable = (val: boolean) => {
|
||
|
|
// // console.log('sss')
|
||
|
|
// table?.value?.loading.value = val
|
||
|
|
// }
|
||
|
|
defineExpose({
|
||
|
|
fetch
|
||
|
|
// spinTable
|
||
|
|
})
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="less">
|
||
|
|
@prefix: ~'@{prefixCls}-pophoverstatus';
|
||
|
|
|
||
|
|
.@{prefix} {
|
||
|
|
.ant-menu-rtl.ant-menu-inline,
|
||
|
|
.ant-menu-rtl.ant-menu-vertical {
|
||
|
|
border-left: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.ant-menu-item-only-child {
|
||
|
|
border-radius: @border-radius-base;
|
||
|
|
}
|
||
|
|
|
||
|
|
//bor
|
||
|
|
/* .ant-input-group-addon:first-child {
|
||
|
|
!* border: #d9d9d9 1px solid;
|
||
|
|
border-radius: 0 6px 6px 0;*!
|
||
|
|
}*/
|
||
|
|
}
|
||
|
|
</style>
|