Compare commits

...

7 Commits

Author SHA1 Message Date
zhangrenyuan 8a3cefa918 Merge branch 'zhangrenyuan/feature-20251209163007-多语言二期' into milestone-20251209-多语言二期 4 weeks ago
zhangrenyuan 06f1892332 feat(i18n): 添加退款相关文本和优化语言设置 4 weeks ago
zhangrenyuan ead292d1e5 fix: 修复翻译文件和退款服务页面中的文本引用问题 1 month ago
huangqizhen 926e8c99ce Merge remote-tracking branch 'origin/milestone-20251209-多语言二期' into milestone-20251209-多语言二期 1 month ago
huangqizhen 4f4639716b 12.13现仅退款 1 month ago
zhangrenyuan 62ea785834 Merge branch 'zhangrenyuan/feature-20251209163007-多语言二期' into milestone-20251209-多语言二期 1 month ago
zhangrenyuan 8390e117c3 feat: 添加红包使用选项并优化输入验证逻辑 1 month ago
  1. 506
      src/views/moneyManage/refundDetail/refundCharge.vue
  2. 484
      src/views/moneyManage/refundDetail/refundFinance.vue
  3. 546
      src/views/moneyManage/refundDetail/refundHeader.vue
  4. 361
      src/views/moneyManage/refundDetail/refundService.vue

506
src/views/moneyManage/refundDetail/refundCharge.vue

@ -340,7 +340,7 @@
import { ref, onMounted, computed } from 'vue' import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload '
import { useAdminStore } from "@/store/index.js" import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia" import { storeToRefs } from "pinia"
import dayjs from 'dayjs' import dayjs from 'dayjs'
@ -356,8 +356,8 @@ const { t } = useI18n()
const currentStep = ref(0)// const currentStep = ref(0)//
const searchForm = ref({ const searchForm = ref({
jwcode: '',
markets: []
jwcode: '',
markets: []
}) })
const isHeadquarters = computed(() => { const isHeadquarters = computed(() => {
const m = adminData.value.markets const m = adminData.value.markets
@ -365,15 +365,15 @@ const isHeadquarters = computed(() => {
}) })
const isReject = ref(false)// const isReject = ref(false)//
const addForm = ref({ const addForm = ref({
remark: ''
remark: ''
}) })
const showReject = ref(false) const showReject = ref(false)
const auditRow = ref({})// const auditRow = ref({})//
const dateRange = ref([]) const dateRange = ref([])
const pagination = ref({ const pagination = ref({
pageNum: 1,
pageSize: 50,
total: 0
pageNum: 1,
pageSize: 50,
total: 0
}) })
const market = ref([]) const market = ref([])
const showAudit2 = ref(false) const showAudit2 = ref(false)
@ -391,14 +391,14 @@ const exportList = ref([])
const exportListLoading = ref(false) const exportListLoading = ref(false)
const statusStepMap = { const statusStepMap = {
10: [1, false],
12: [2, true],
20: [3, false],
22: [4, true],
30: [5, false],
32: [6, true],
40: [7, false],
41: [8, false]
10: [1, false],
12: [2, true],
20: [3, false],
22: [4, true],
30: [5, false],
32: [6, true],
40: [7, false],
41: [8, false]
} }
const currencies = computed(() => [ const currencies = computed(() => [
t('cash.currency.usd'), t('cash.currency.usd'),
@ -450,8 +450,8 @@ const getRefund = async function () {
statuses.value = [20, 22, 30, 32, 40, 41] statuses.value = [20, 22, 30, 32, 40, 41]
} }
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
@ -466,35 +466,35 @@ const getRefund = async function () {
return; return;
} }
if (searchForm.value.paymentCurrency) {
payCurrencySelect.value = CurrencyForId(searchForm.value.paymentCurrency)
}
if (searchForm.value.paymentCurrency) {
payCurrencySelect.value = CurrencyForId(searchForm.value.paymentCurrency)
}
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,//
name: searchForm.value.name,//
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,//
statuses: statuses.value,//1012
// 2022
// 3032
// 4041退
paymentCurrency: payCurrencySelect.value,//
payType: searchForm.value.payType,//
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
}
}
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,//
name: searchForm.value.name,//
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,//
statuses: statuses.value,//1012
// 2022
// 3032
// 4041退
paymentCurrency: payCurrencySelect.value,//
payType: searchForm.value.payType,//
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
}
}
const result = await API({
url: '/Money/select',
method: 'POST',
data: params
})
const result = await API({
url: '/Money/select',
method: 'POST',
data: params
})
tableData.value = result.data.list || [] tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0 pagination.value.total = result.data.total || 0
@ -567,87 +567,87 @@ const showStep = function (row) {
return return
} }
isReject.value = false
submitter.value = row.submitter || ''
areaFinance.value = row.areaFinance || ''
areaCharge.value = row.areaCharge || ''
headFinance.value = row.headFinance || ''
executor.value = row.executorName || ''
currentStep.value = 1
const status = row.status
if (statusStepMap[status]) {
const [step, reject] = statusStepMap[status]
currentStep.value = step
isReject.value = reject
}
console.log('步骤条状态', currentStep.value)
showSteps.value = true
isReject.value = false
submitter.value = row.submitter || ''
areaFinance.value = row.areaFinance || ''
areaCharge.value = row.areaCharge || ''
headFinance.value = row.headFinance || ''
executor.value = row.executorName || ''
currentStep.value = 1
const status = row.status
if (statusStepMap[status]) {
const [step, reject] = statusStepMap[status]
currentStep.value = step
isReject.value = reject
}
console.log('步骤条状态', currentStep.value)
showSteps.value = true
} }
const getMarket = async function () { const getMarket = async function () {
try {
const result = await API({
try {
const result = await API({
url: '/market/selectMarket',
})
console.log('看看地区树', result)
const transformTree = (nodes) => {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child])
: null;
return {
value: child.id,
label: child.name,
children: grandchildren
};
});
url: '/market/selectMarket',
})
console.log('看看地区树', result)
const transformTree = (nodes) => {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child])
: null;
return {
value: child.id,
label: child.name,
children: grandchildren
}; };
market.value = transformTree(result.data)
console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
});
};
market.value = transformTree(result.data)
console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
} }
const exportExcel = async function () { const exportExcel = async function () {
const payCurrencySelect = ref('')
const statuses = ref([20, 22, 30, 32, 40, 41]) //
if (searchForm.value.statuses === '审核通过') {
statuses.value = [30, 40]
} else if (searchForm.value.statuses === '已驳回') {
statuses.value = [22, 32]
} else if (searchForm.value.statuses === '待审核') {
statuses.value = [20]
} else if (searchForm.value.statuses === '退款成功') {
statuses.value = [41]
} else {
statuses.value = [20, 22, 30, 32, 40, 41]
}
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
return
}
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
return;
const payCurrencySelect = ref('')
const statuses = ref([20, 22, 30, 32, 40, 41]) //
if (searchForm.value.statuses === '审核通过') {
statuses.value = [30, 40]
} else if (searchForm.value.statuses === '已驳回') {
statuses.value = [22, 32]
} else if (searchForm.value.statuses === '待审核') {
statuses.value = [20]
} else if (searchForm.value.statuses === '退款成功') {
statuses.value = [41]
} else {
statuses.value = [20, 22, 30, 32, 40, 41]
}
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
return
} }
}
// 400
if (searchForm.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
return;
}
if (searchForm.value.paymentCurrency) {
payCurrencySelect.value = CurrencyForId(searchForm.value.paymentCurrency)
}
if (searchForm.value.paymentCurrency) {
payCurrencySelect.value = CurrencyForId(searchForm.value.paymentCurrency)
}
const params = { const params = {
pageNum: pagination.value.pageNum, pageNum: pagination.value.pageNum,
@ -674,8 +674,8 @@ const exportExcel = async function () {
} }
} }
const openExportList = () => { const openExportList = () => {
getExportList()
exportListVisible.value = true
getExportList()
exportListVisible.value = true
} }
const getExportList = async () => { const getExportList = async () => {
exportListLoading.value = true exportListLoading.value = true
@ -708,18 +708,18 @@ const downloadExportFile = (item) => {
} }
// //
const getTagType = (state) => { const getTagType = (state) => {
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
} }
// //
const getTagText = (state) => { const getTagText = (state) => {
@ -737,43 +737,43 @@ const getTagText = (state) => {
} }
} }
const hideReject = function () { const hideReject = function () {
showReject.value = false
addForm.value.remark = ''
showReject.value = false
addForm.value.remark = ''
} }
const reset = function () { const reset = function () {
searchForm.value = {
jwcode: '',
markets: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
searchForm.value = {
jwcode: '',
markets: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
} }
const showAudit = function (row) { const showAudit = function (row) {
auditRow.value = row
showAudit2.value = true
auditRow.value = row
showAudit2.value = true
} }
const defaultTime = [ const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
] ]
const disabledDate = (time) => { const disabledDate = (time) => {
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
} }
const handlePageSizeChange = function (val) { const handlePageSizeChange = function (val) {
pagination.value.pageSize = val
getRefund()
pagination.value.pageSize = val
getRefund()
} }
const handleCurrentChange = function (val) { const handleCurrentChange = function (val) {
pagination.value.pageNum = val
getRefund()
pagination.value.pageNum = val
getRefund()
} }
onMounted(() => { onMounted(() => {
getRefund()
getMarket()
getRefund()
getMarket()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -781,142 +781,142 @@ onMounted(() => {
:deep(.el-table__body-wrapper), :deep(.el-table__body-wrapper),
:deep(.el-table__cell), :deep(.el-table__cell),
:deep(.el-table__body td) { :deep(.el-table__body td) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
} }
:deep(.el-table__header th) { :deep(.el-table__header th) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
} }
.condition { .condition {
width: 82vw;
width: 82vw;
display: flex;
align-items: center;
height: 4vh;
.item1 {
width: 18%;
display: flex; display: flex;
align-items: center; align-items: center;
height: 4vh;
margin-bottom: 1vh;
margin-right: 0.5vw;
}
.item1 {
width: 18%;
display: flex;
align-items: center;
margin-bottom: 1vh;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
} }
.audit1 { .audit1 {
height: 47vh;
height: 47vh;
.audit-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.audit-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
} }
.audit2 { .audit2 {
display: flex;
justify-content: center;
height: auto;
min-height: 40vh;
display: flex;
justify-content: center;
height: auto;
min-height: 40vh;
.top {
width: 30vw;
height: 22vh;
.top {
width: 30vw;
height: 22vh;
.top-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.top-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
} }
}
.smallTitle {
background-color: white;
color: rgb(64, 158, 255);
border-color: rgb(64, 158, 255);
margin-bottom: 0.5vh;
}
.smallTitle {
background-color: white;
color: rgb(64, 158, 255);
border-color: rgb(64, 158, 255);
margin-bottom: 0.5vh;
}
.center {
display: flex;
width: 30vw;
height: 35vh;
.center {
display: flex;
width: 30vw;
height: 35vh;
.dialog-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.dialog-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.center-left {
width: 60%;
height: 35vh;
.center-left {
width: 60%;
height: 35vh;
.image {
width: 4vw !important;
height: 4vw !important;
}
.image {
width: 4vw !important;
height: 4vw !important;
}
:deep(.el-upload--picture-card) {
width: 4vw !important;
height: 4vw !important;
padding: 0 !important;
}
:deep(.el-upload--picture-card) {
width: 4vw !important;
height: 4vw !important;
padding: 0 !important;
}
.center-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.center-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.center-right {
height: 35vh;
.center-right {
height: 35vh;
.right-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.right-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
} }
}
.bottom {
width: 30vw;
height: 12vh;
.bottom {
width: 30vw;
height: 12vh;
.bottom-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.bottom-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
} }
}
} }
.steps { .steps {
.steps-content {
padding-top: 15vw;
}
.steps-content {
padding-top: 15vw;
}
.steps-status {
display: flex;
align-items: center;
justify-content: center;
}
.steps-status {
display: flex;
align-items: center;
justify-content: center;
}
.steps-btn {
height: 15vh;
display: flex;
justify-content: center;
align-items: center;
}
.steps-btn {
height: 15vh;
display: flex;
justify-content: center;
align-items: center;
}
} }
</style> </style>

484
src/views/moneyManage/refundDetail/refundFinance.vue

@ -335,11 +335,12 @@
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { ref, onMounted, computed } from 'vue' import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload '
import { useAdminStore } from "@/store/index.js" import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia" import { storeToRefs } from "pinia"
import dayjs from 'dayjs' import dayjs from 'dayjs'
@ -355,8 +356,8 @@ const { t } = useI18n()
const currentStep = ref(0)// const currentStep = ref(0)//
const searchForm = ref({ const searchForm = ref({
jwcode: '',
markets: []
jwcode: '',
markets: []
}) })
const isHeadquarters = computed(() => { const isHeadquarters = computed(() => {
const m = adminData.value.markets const m = adminData.value.markets
@ -364,17 +365,17 @@ const isHeadquarters = computed(() => {
}) })
const dateRange = ref([]) const dateRange = ref([])
const addForm = ref({ const addForm = ref({
remark: ''
remark: ''
}) })
const auditForm = ref({ const auditForm = ref({
refundType: ''
refundType: ''
}) })
const isReject = ref(false)// const isReject = ref(false)//
const showReject = ref(false) const showReject = ref(false)
const pagination = ref({ const pagination = ref({
pageNum: 1,
pageSize: 50,
total: 0
pageNum: 1,
pageSize: 50,
total: 0
}) })
const market = ref([]) const market = ref([])
const tableData = ref([]) const tableData = ref([])
@ -392,14 +393,14 @@ const exportList = ref([])
// //
const exportListLoading = ref(false) const exportListLoading = ref(false)
const statusStepMap = { const statusStepMap = {
10: [1, false],
12: [2, true],
20: [3, false],
22: [4, true],
30: [5, false],
32: [6, true],
40: [7, false],
41: [8, false]
10: [1, false],
12: [2, true],
20: [3, false],
22: [4, true],
30: [5, false],
32: [6, true],
40: [7, false],
41: [8, false]
} }
const currencies = computed(() => [ const currencies = computed(() => [
t('cash.currency.usd'), t('cash.currency.usd'),
@ -450,8 +451,8 @@ const getRefund = async function () {
statusParam.value = [10, 20, 22, 30, 32, 40, 41] statusParam.value = [10, 20, 22, 30, 32, 40, 41]
} }
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
@ -466,31 +467,28 @@ const getRefund = async function () {
return; return;
} }
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,//
name: searchForm.value.name,//
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,//
statuses: statusParam.value,//1012
// 2022
// 3032
// 4041退
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),//
payType: searchForm.value.payType,//
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
}
}
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,
name: searchForm.value.name,
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,
statuses: statusParam.value,
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),
payType: searchForm.value.payType,
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
}
}
const result = await API({
url: '/Money/select',
method: 'POST',
data: params
})
const result = await API({
url: '/Money/select',
method: 'POST',
data: params
})
tableData.value = result.data.list || [] tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0 pagination.value.total = result.data.total || 0
@ -498,6 +496,7 @@ const getRefund = async function () {
ElMessage.error(error.message || t('elmessage.searchFailed')) ElMessage.error(error.message || t('elmessage.searchFailed'))
} }
} }
// //
const handlePass = async function () { const handlePass = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) {
@ -525,6 +524,7 @@ const handlePass = async function () {
ElMessage.error(error.message || t('elmessage.approveFailed')) ElMessage.error(error.message || t('elmessage.approveFailed'))
} }
} }
// //
const handleReject = async function () { const handleReject = async function () {
if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) { if (!hasMenuPermission(menuTree.value, permissionMapping.audit_area_finance_refund)) {
@ -558,58 +558,53 @@ const handleReject = async function () {
} }
const getMarket = async function () { const getMarket = async function () {
try {
const result = await API({
url: '/market/selectMarket',
})
console.log('看看地区树', result)
const transformTree = (nodes) => {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child])
: null;
return {
value: child.id,
label: child.name,
children: grandchildren
};
});
try {
const result = await API({
url: '/market/selectMarket',
})
const transformTree = (nodes) => {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child])
: null;
return {
value: child.id,
label: child.name,
children: grandchildren
}; };
market.value = transformTree(result.data)
console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
});
};
market.value = transformTree(result.data)
} catch (error) {
console.log('请求失败', error)
}
} }
const showStep = function (row) { const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_finance_refund_progress)) { if (!hasMenuPermission(menuTree.value, permissionMapping.track_area_finance_refund_progress)) {
ElMessage.error(t('elmessage.noPermission')) ElMessage.error(t('elmessage.noPermission'))
return return
} }
isReject.value = false
submitter.value = row.submitter || ''
areaFinance.value = row.areaFinance || ''
areaCharge.value = row.areaCharge || ''
headFinance.value = row.headFinance || ''
executor.value = row.executorName || ''
currentStep.value = 1
const status = row.status
if (statusStepMap[status]) {
const [step, reject] = statusStepMap[status]
currentStep.value = step
isReject.value = reject
}
console.log('步骤条状态', currentStep.value)
showSteps.value = true
isReject.value = false
submitter.value = row.submitter || ''
areaFinance.value = row.areaFinance || ''
areaCharge.value = row.areaCharge || ''
headFinance.value = row.headFinance || ''
executor.value = row.executorName || ''
currentStep.value = 1
const status = row.status
if (statusStepMap[status]) {
const [step, reject] = statusStepMap[status]
currentStep.value = step
isReject.value = reject
}
showSteps.value = true
} }
const exportExcel = async function () { const exportExcel = async function () {
const statusParam = ref([10, 20, 22, 30, 32, 40, 41]) const statusParam = ref([10, 20, 22, 30, 32, 40, 41])
if (searchForm.value.statuses === t('cash.statusList.passed')) { if (searchForm.value.statuses === t('cash.statusList.passed')) {
@ -624,8 +619,8 @@ const exportExcel = async function () {
statusParam.value = [10, 20, 22, 30, 32, 40, 41] statusParam.value = [10, 20, 22, 30, 32, 40, 41]
} }
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '';
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : '';
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
@ -640,25 +635,22 @@ const exportExcel = async function () {
return; return;
} }
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,//
name: searchForm.value.name,//
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,//
statuses: statusParam.value,//1012
// 2022
// 3032
// 4041退
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),//
payType: searchForm.value.payType,//
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
}
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,
name: searchForm.value.name,
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,
statuses: statusParam.value,
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),
payType: searchForm.value.payType,
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
} }
}
const res = await API({ url: '/export/exportFinance', data: params }) const res = await API({ url: '/export/exportFinance', data: params })
if (res.code === 200) { if (res.code === 200) {
@ -667,10 +659,12 @@ const exportExcel = async function () {
ElMessage.error(res.msg || t('elmessage.exportFailed')) ElMessage.error(res.msg || t('elmessage.exportFailed'))
} }
} }
const openExportList = () => { const openExportList = () => {
getExportList()
exportListVisible.value = true
getExportList()
exportListVisible.value = true
} }
const getExportList = async () => { const getExportList = async () => {
exportListLoading.value = true exportListLoading.value = true
try { try {
@ -690,6 +684,7 @@ const getExportList = async () => {
exportListLoading.value = false exportListLoading.value = false
} }
} }
const downloadExportFile = (item) => { const downloadExportFile = (item) => {
if (item.state === 2) { if (item.state === 2) {
const link = document.createElement('a') const link = document.createElement('a')
@ -700,22 +695,17 @@ const downloadExportFile = (item) => {
ElMessage.warning(t('elmessage.exportingInProgress')) ElMessage.warning(t('elmessage.exportingInProgress'))
} }
} }
//
const getTagType = (state) => { const getTagType = (state) => {
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
switch (state) {
case 0: return 'info';
case 1: return 'primary';
case 2: return 'success';
case 3: return 'danger';
default: return 'info';
}
} }
//
const getTagText = (state) => { const getTagText = (state) => {
switch (state) { switch (state) {
case 0: case 0:
@ -730,178 +720,190 @@ const getTagText = (state) => {
return t('elmessage.unknownStatus'); return t('elmessage.unknownStatus');
} }
} }
const showAudit2 = function (row) { const showAudit2 = function (row) {
auditRow.value = row
showAudit.value = true
auditRow.value = row
showAudit.value = true
} }
const reset = function () { const reset = function () {
searchForm.value = {
jwcode: '',
markets: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
searchForm.value = {
jwcode: '',
markets: [],
statuses: []
}
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
} }
const hideReject = function () { const hideReject = function () {
showReject.value = false
addForm.value.remark = ''
showReject.value = false
addForm.value.remark = ''
} }
const defaultTime = [ const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
] ]
const disabledDate = (time) => { const disabledDate = (time) => {
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
} }
const handlePageSizeChange = function (val) { const handlePageSizeChange = function (val) {
pagination.value.pageSize = val
getRefund()
pagination.value.pageSize = val
getRefund()
} }
const handleCurrentChange = function (val) { const handleCurrentChange = function (val) {
pagination.value.pageNum = val
getRefund()
pagination.value.pageNum = val
getRefund()
}
const handleDatePickerChange = () => {
//
} }
onMounted(() => { onMounted(() => {
console.log('???????????????????', adminData.value)
getRefund()
getMarket()
getRefund()
getMarket()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
/* 样式完全保留,仅注释微调 */
:deep(.el-table__header-wrapper), :deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper), :deep(.el-table__body-wrapper),
:deep(.el-table__cell), :deep(.el-table__cell),
:deep(.el-table__body td) { :deep(.el-table__body td) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
} }
:deep(.el-table__header th) { :deep(.el-table__header th) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
} }
.condition { .condition {
width: 82vw;
width: 82vw;
display: flex;
align-items: center;
height: 4vh;
.item1 {
width: 18%;
display: flex; display: flex;
align-items: center; align-items: center;
height: 4vh;
margin-bottom: 1vh;
margin-right: 0.5vw;
}
.item1 {
width: 18%;
display: flex;
align-items: center;
margin-bottom: 1vh;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
} }
.audit { .audit {
display: flex;
justify-content: center;
height: auto;
min-height: 40vh;
.top {
width: 30vw;
height: 22vh;
.top-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
display: flex;
justify-content: center;
height: auto;
min-height: 40vh;
.top {
width: 30vw;
height: 22vh;
.top-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
} }
}
.smallTitle {
background-color: white;
color: rgb(64, 158, 255);
border-color: rgb(64, 158, 255);
margin-bottom: 0.5vh;
}
.smallTitle {
background-color: white;
color: rgb(64, 158, 255);
border-color: rgb(64, 158, 255);
margin-bottom: 0.5vh;
}
.center {
display: flex;
width: 30vw;
height: 35vh;
.center {
display: flex;
width: 30vw;
height: 35vh;
.dialog-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.dialog-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.center-left {
width: 60%;
height: 35vh;
.center-left {
width: 60%;
height: 35vh;
.image {
width: 4vw !important;
height: 4vw !important;
}
.image {
width: 4vw !important;
height: 4vw !important;
}
:deep(.el-upload--picture-card) {
width: 4vw !important;
height: 4vw !important;
padding: 0 !important;
}
:deep(.el-upload--picture-card) {
width: 4vw !important;
height: 4vw !important;
padding: 0 !important;
}
.center-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.center-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.center-right {
height: 35vh;
.center-right {
height: 35vh;
.right-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.right-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
} }
}
.bottom {
width: 30vw;
height: auto;
padding-bottom: 1vh;
.bottom {
width: 30vw;
height: auto;
padding-bottom: 1vh;
.bottom-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.bottom-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
} }
}
} }
.steps { .steps {
.steps-content {
padding-top: 15vw;
}
.steps-content {
padding-top: 15vw;
}
.steps-status {
display: flex;
align-items: center;
justify-content: center;
}
.steps-status {
display: flex;
align-items: center;
justify-content: center;
}
.steps-btn {
height: 15vh;
display: flex;
justify-content: center;
align-items: center;
}
.steps-btn {
height: 15vh;
display: flex;
justify-content: center;
align-items: center;
}
} }
</style> </style>

546
src/views/moneyManage/refundDetail/refundHeader.vue

@ -352,7 +352,7 @@ import BackgroundSvg from '@/assets/images/refund-progress.png'
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload '
import { useAdminStore } from "@/store/index.js" import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia" import { storeToRefs } from "pinia"
import dayjs from 'dayjs' import dayjs from 'dayjs'
@ -363,26 +363,26 @@ import moment from 'moment'
import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
import { isNumber } from 'lodash' import { isNumber } from 'lodash'
const startsWith1 = (mainStr, prefix) => { const startsWith1 = (mainStr, prefix) => {
//
if (prefix === '') {
return true;
}
//
if (mainStr.length < prefix.length) {
return false;
}
//
return mainStr.substring(0, prefix.length) === prefix;
//
if (prefix === '') {
return true;
}
//
if (mainStr.length < prefix.length) {
return false;
}
//
return mainStr.substring(0, prefix.length) === prefix;
} }
const currentStep = ref(0)// const currentStep = ref(0)//
const searchForm = ref({ const searchForm = ref({
jwcode: '',
markets: [],
statuses: []
jwcode: '',
markets: [],
statuses: []
}) })
const isReject = ref(false)// const isReject = ref(false)//
const addForm = ref({ const addForm = ref({
remark: ''
remark: ''
}) })
const market = ref([]) const market = ref([])
const showReject = ref(false) const showReject = ref(false)
@ -390,9 +390,9 @@ const showExecutor = ref(false)
const auditRow = ref({})// const auditRow = ref({})//
const dateRange = ref([]) const dateRange = ref([])
const pagination = ref({ const pagination = ref({
pageNum: 1,
pageSize: 50,
total: 0
pageNum: 1,
pageSize: 50,
total: 0
}) })
const showAudit2 = ref(false) const showAudit2 = ref(false)
const tableData = ref([]) const tableData = ref([])
@ -408,14 +408,14 @@ const exportList = ref([])
// //
const exportListLoading = ref(false) const exportListLoading = ref(false)
const statusStepMap = { const statusStepMap = {
10: [1, false],
12: [2, true],
20: [3, false],
22: [4, true],
30: [5, false],
32: [6, true],
40: [7, false],
41: [8, false]
10: [1, false],
12: [2, true],
20: [3, false],
22: [4, true],
30: [5, false],
32: [6, true],
40: [7, false],
41: [8, false]
} }
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
const { t } = useI18n() const { t } = useI18n()
@ -454,38 +454,38 @@ const statusList = computed(() => [
t('cash.refundSuccess') t('cash.refundSuccess')
]) ])
const executorList = ref([ const executorList = ref([
{
value: '305485',
label: '新:Zoe'
},
{
value: '200723',
label: '马:Jennifer'
},
{
value: '301388',
label: '港:林育平'
},
{
value: '839448',
label: '加:Mandy'
},
{
value: '304904',
label: '泰:杨丽娇'
},
{
value: '315915',
label: '越:范秋霞'
},
{
value: '90047681',
label: '李慧琳演示机'
},
{
value: '90047947',
label: '宋彤彤'
}
{
value: '305485',
label: '新:Zoe'
},
{
value: '200723',
label: '马:Jennifer'
},
{
value: '301388',
label: '港:林育平'
},
{
value: '839448',
label: '加:Mandy'
},
{
value: '304904',
label: '泰:杨丽娇'
},
{
value: '315915',
label: '越:范秋霞'
},
{
value: '90047681',
label: '李慧琳演示机'
},
{
value: '90047947',
label: '宋彤彤'
}
]) ])
// //
const getRefund = async function () { const getRefund = async function () {
@ -507,8 +507,8 @@ const getRefund = async function () {
statusParam.value = [30, 32, 40, 41] statusParam.value = [30, 32, 40, 41]
} }
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
@ -523,28 +523,28 @@ const getRefund = async function () {
return; return;
} }
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,
name: searchForm.value.name,
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,
statuses: statusParam.value,
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),
payType: searchForm.value.payType,
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
}
}
const result = await API({
url: '/Money/select',
method: 'POST',
data: params
})
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,
name: searchForm.value.name,
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,
statuses: statusParam.value,
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),
payType: searchForm.value.payType,
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
}
}
const result = await API({
url: '/Money/select',
method: 'POST',
data: params
})
tableData.value = result.data.list || [] tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0 pagination.value.total = result.data.total || 0
@ -618,37 +618,37 @@ const handleReject = async function () {
} }
} }
const getMarket = async function () { const getMarket = async function () {
try {
const result = await API({
try {
const result = await API({
url: '/market/selectMarket',
})
console.log('看看地区树', result)
const transformTree = (nodes) => {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child])
: null;
return {
value: child.id,
label: child.name,
children: grandchildren
};
});
url: '/market/selectMarket',
})
console.log('看看地区树', result)
const transformTree = (nodes) => {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child])
: null;
return {
value: child.id,
label: child.name,
children: grandchildren
}; };
market.value = transformTree(result.data)
console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
});
};
market.value = transformTree(result.data)
console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
} }
const hideReject = function () { const hideReject = function () {
showReject.value = false
addForm.value.remark = ''
showReject.value = false
addForm.value.remark = ''
} }
const exportExcel = async function () { const exportExcel = async function () {
const statusParam = ref([30, 32, 40, 41])// const statusParam = ref([30, 32, 40, 41])//
@ -664,8 +664,8 @@ const exportExcel = async function () {
statusParam.value = [30, 32, 40, 41] statusParam.value = [30, 32, 40, 41]
} }
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
@ -680,22 +680,22 @@ const exportExcel = async function () {
return; return;
} }
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,
name: searchForm.value.name,
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,
statuses: statusParam.value,
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),
payType: searchForm.value.payType,
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
}
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,
name: searchForm.value.name,
markets: searchForm.value.markets && searchForm.value.markets.length > 0 ? [searchForm.value.markets[searchForm.value.markets.length - 1]] : [],
goodsName: goodsName,
statuses: statusParam.value,
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),
payType: searchForm.value.payType,
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
adminId: adminData.value.id
} }
}
const res = await API({ url: '/export/exportFinance', data: params }) const res = await API({ url: '/export/exportFinance', data: params })
if (res.code === 200) { if (res.code === 200) {
@ -705,8 +705,8 @@ const exportExcel = async function () {
} }
} }
const openExportList = () => { const openExportList = () => {
getExportList()
exportListVisible.value = true
getExportList()
exportListVisible.value = true
} }
const getExportList = async () => { const getExportList = async () => {
exportListLoading.value = true exportListLoading.value = true
@ -738,18 +738,18 @@ const downloadExportFile = (item) => {
} }
} }
const getTagType = (state) => { const getTagType = (state) => {
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
switch (state) {
case 0:
return 'info';
case 1:
return 'primary';
case 2:
return 'success';
case 3:
return 'danger';
default:
return 'info';
}
} }
// //
const getTagText = (state) => { const getTagText = (state) => {
@ -767,16 +767,16 @@ const getTagText = (state) => {
} }
} }
const reset = function () { const reset = function () {
searchForm.value = {
jwcode: '',
markets: [],
statuses: []
}
//
pagination.value.pageNum = 1
searchForm.value = {
jwcode: '',
markets: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
dateRange.value = []
getRefund()
} }
const showStep = function (row) { const showStep = function (row) {
if (!hasMenuPermission(menuTree.value, permissionMapping.track_headquarters_refund_progress)) { if (!hasMenuPermission(menuTree.value, permissionMapping.track_headquarters_refund_progress)) {
@ -784,52 +784,52 @@ const showStep = function (row) {
return return
} }
isReject.value = false
submitter.value = row.submitter || ''
areaFinance.value = row.areaFinance || ''
areaCharge.value = row.areaCharge || ''
headFinance.value = row.headFinance || ''
executor.value = row.executorName || ''
currentStep.value = 1
const status = row.status
if (statusStepMap[status]) {
const [step, reject] = statusStepMap[status]
currentStep.value = step
isReject.value = reject
}
isReject.value = false
submitter.value = row.submitter || ''
areaFinance.value = row.areaFinance || ''
areaCharge.value = row.areaCharge || ''
headFinance.value = row.headFinance || ''
executor.value = row.executorName || ''
currentStep.value = 1
const status = row.status
if (statusStepMap[status]) {
const [step, reject] = statusStepMap[status]
currentStep.value = step
isReject.value = reject
}
console.log('步骤条状态', currentStep.value)
showSteps.value = true
console.log('步骤条状态', currentStep.value)
showSteps.value = true
} }
const hideExecutor = function () { const hideExecutor = function () {
addForm.value.executor = ''
showExecutor.value = false
addForm.value.executor = ''
showExecutor.value = false
} }
const showAudit = function (row) { const showAudit = function (row) {
auditRow.value = row
showAudit2.value = true
auditRow.value = row
showAudit2.value = true
} }
const defaultTime = [ const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
] ]
const disabledDate = (time) => { const disabledDate = (time) => {
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
} }
const handlePageSizeChange = function (val) { const handlePageSizeChange = function (val) {
pagination.value.pageSize = val
getRefund()
pagination.value.pageSize = val
getRefund()
} }
const handleCurrentChange = function (val) { const handleCurrentChange = function (val) {
pagination.value.pageNum = val
getRefund()
pagination.value.pageNum = val
getRefund()
} }
onMounted(() => { onMounted(() => {
console.log('???????????????????', adminData.value)
getRefund()
getMarket()
console.log('???????????????????', adminData.value)
getRefund()
getMarket()
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -837,135 +837,135 @@ onMounted(() => {
:deep(.el-table__body-wrapper), :deep(.el-table__body-wrapper),
:deep(.el-table__cell), :deep(.el-table__cell),
:deep(.el-table__body td) { :deep(.el-table__body td) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
} }
:deep(.el-table__header th) { :deep(.el-table__header th) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
} }
.condition { .condition {
width: 82vw;
width: 82vw;
display: flex;
align-items: center;
height: 4vh;
.item1 {
width: 18%;
display: flex; display: flex;
align-items: center; align-items: center;
height: 4vh;
margin-bottom: 1vh;
margin-right: 0.5vw;
}
.item1 {
width: 18%;
display: flex;
align-items: center;
margin-bottom: 1vh;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
} }
.audit1 { .audit1 {
height: 47vh;
height: 47vh;
.audit-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.audit-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
} }
.audit2 { .audit2 {
display: flex;
justify-content: center;
display: flex;
justify-content: center;
.top {
width: 30vw;
height: 22vh;
.top {
width: 30vw;
height: 22vh;
.top-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.top-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
} }
}
.smallTitle {
background-color: white;
color: rgb(64, 158, 255);
border-color: rgb(64, 158, 255);
margin-bottom: 0.5vh;
}
.smallTitle {
background-color: white;
color: rgb(64, 158, 255);
border-color: rgb(64, 158, 255);
margin-bottom: 0.5vh;
}
.center {
display: flex;
width: 30vw;
height: 35vh;
.center {
display: flex;
width: 30vw;
height: 35vh;
.dialog-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.dialog-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.center-left {
width: 60%;
height: 35vh;
.center-left {
width: 60%;
height: 35vh;
:deep(.el-upload--picture-card) {
width: 4vw !important;
height: 4vw !important;
padding: 0 !important;
}
:deep(.el-upload--picture-card) {
width: 4vw !important;
height: 4vw !important;
padding: 0 !important;
}
.center-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.center-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.center-right {
height: 35vh;
.center-right {
height: 35vh;
.right-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
}
.right-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
} }
}
.bottom {
width: 30vw;
height: 12vh;
.bottom {
width: 30vw;
height: 12vh;
.bottom-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.bottom-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
} }
}
} }
.steps { .steps {
.steps-content {
padding-top: 15vw;
}
.steps-content {
padding-top: 15vw;
}
.steps-status {
display: flex;
align-items: center;
justify-content: center;
}
.steps-status {
display: flex;
align-items: center;
justify-content: center;
}
.steps-btn {
height: 15vh;
display: flex;
justify-content: center;
align-items: center;
}
.steps-btn {
height: 15vh;
display: flex;
justify-content: center;
align-items: center;
}
} }
</style> </style>

361
src/views/moneyManage/refundDetail/refundService.vue

@ -207,7 +207,7 @@
<ConfirmDialog v-model="showBack" :message="t('common.willRecallOrder')" @confirm="recall" @cancel="showBack = false" <ConfirmDialog v-model="showBack" :message="t('common.willRecallOrder')" @confirm="recall" @cancel="showBack = false"
@close="showBack = false" /> @close="showBack = false" />
<el-dialog v-model="showError" overflow draggable class="back-dialog" :style="{
<el-dialog v-model="showError" overflow draggable class="back-dialog" :style="{
backgroundImage: `url(${RefundRecallBackground})`, backgroundImage: `url(${RefundRecallBackground})`,
backgroundSize: 'cover', backgroundSize: 'cover',
backgroundPosition: 'center' backgroundPosition: 'center'
@ -219,11 +219,12 @@
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script setup> <script setup>
import { ref, onMounted, computed } from 'vue' import { ref, onMounted, computed } from 'vue'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import API from '@/util/http.js' import API from '@/util/http.js'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload'
const uploadUrl = 'https://api.homilychart.com/hljw/api/aws/upload '
import { useAdminStore } from "@/store/index.js" import { useAdminStore } from "@/store/index.js"
import { storeToRefs } from "pinia" import { storeToRefs } from "pinia"
import dayjs from 'dayjs' import dayjs from 'dayjs'
@ -231,7 +232,6 @@ const adminStore = useAdminStore()
const { adminData, menuTree } = storeToRefs(adminStore) const { adminData, menuTree } = storeToRefs(adminStore)
import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menuTreePermission.js" import { permissionMapping, findMenuById, hasMenuPermission } from "@/utils/menuTreePermission.js"
import ConfirmDialog from '@/components/dialogs/ConfirmDialog.vue' import ConfirmDialog from '@/components/dialogs/ConfirmDialog.vue'
import { pa } from 'element-plus/es/locales.mjs'
import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js' import { productList, CurrencyForId } from '@/views/moneyManage/receiveDetail/utils/staticData.js'
import RefundRecallBackground from '@/assets/images/refund-recall.png' import RefundRecallBackground from '@/assets/images/refund-recall.png'
import { isNumber } from 'lodash' import { isNumber } from 'lodash'
@ -245,24 +245,24 @@ const isHeadquarters = computed(() => {
const dateRange = ref([]) const dateRange = ref([])
const searchForm = ref({ const searchForm = ref({
jwcode: '',
market: [],
statuses: []
jwcode: '',
market: [],
statuses: []
}) })
const market = ref([]) const market = ref([])
const backRow = ref({})// const backRow = ref({})//
const editRow = ref({})// const editRow = ref({})//
const editForm = ref({ const editForm = ref({
refundModel: '',
refundReason: ''
refundModel: '',
refundReason: ''
}) })
const auditForm = ref({ const auditForm = ref({
refundType: ''
refundType: ''
}) })
const pagination = ref({ const pagination = ref({
pageNum: 1,
pageSize: 50,
total: 0
pageNum: 1,
pageSize: 50,
total: 0
}) })
const tableData = ref([]) const tableData = ref([])
const showEdit = ref(false) const showEdit = ref(false)
@ -297,8 +297,8 @@ const getRefund = async function () {
statusParam.value = [12, 22, 32] statusParam.value = [12, 22, 32]
} }
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
const goodsName = searchForm.value.goodsName && searchForm.value.goodsName.length > 0
? searchForm.value.goodsName[searchForm.value.goodsName.length - 1] : ''
if (searchForm.value.jwcode) { if (searchForm.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchForm.value.jwcode);
@ -313,31 +313,31 @@ const getRefund = async function () {
return; return;
} }
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,//
name: searchForm.value.name,//
markets: searchForm.value.market && searchForm.value.market.length > 0 ? [searchForm.value.market[searchForm.value.market.length - 1]] : [],
goodsName: goodsName,//
statuses: statusParam.value,//1012
// 2022
// 3032
// 4041退
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),//
payType: searchForm.value.payType,//
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
submitterId: adminData.value.id
}
}
const params = {
pageNum: pagination.value.pageNum,
pageSize: pagination.value.pageSize,
cashRecordDTO: {
jwcode: searchForm.value.jwcode,//
name: searchForm.value.name,//
markets: searchForm.value.market && searchForm.value.market.length > 0 ? [searchForm.value.market[searchForm.value.market.length - 1]] : [],
goodsName: goodsName,//
statuses: statusParam.value,//1012
// 2022
// 3032
// 4041退
paymentCurrency: CurrencyForId(searchForm.value.paymentCurrency),//
payType: searchForm.value.payType,//
startTime: dateRange.value && dateRange.value[0] ? dayjs(dateRange.value[0]).format('YYYY-MM-DD HH:mm:ss') : "",
endTime: dateRange.value && dateRange.value[1] ? dayjs(dateRange.value[1]).format('YYYY-MM-DD HH:mm:ss') : "",
submitterId: adminData.value.id
}
}
const result = await API({
url: '/Money/selecta',
method: 'POST',
data: params
})
const result = await API({
url: '/Money/selecta',
method: 'POST',
data: params
})
tableData.value = result.data.list || [] tableData.value = result.data.list || []
pagination.value.total = result.data.total || 0 pagination.value.total = result.data.total || 0
@ -413,8 +413,8 @@ const submitEdit = async function () {
newRefundGold: (editForm.value.partRefundGold * 100), newRefundGold: (editForm.value.partRefundGold * 100),
newRefundFree: (editForm.value.partRefundFree) * 100 newRefundFree: (editForm.value.partRefundFree) * 100
}
console.log(editRow.value.goodsName);
}
console.log(editRow.value.goodsName);
if (editRow.value.goodsName != '金币充值') { if (editRow.value.goodsName != '金币充值') {
params.newRefundGold = '' params.newRefundGold = ''
@ -446,71 +446,71 @@ const submitEdit = async function () {
} }
} }
const getMarket = async function () { const getMarket = async function () {
try {
const result = await API({
try {
const result = await API({
url: '/market/selectMarket',
})
console.log('看看地区树', result)
const transformTree = (nodes) => {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child])
: null;
return {
value: child.id,
label: child.name,
children: grandchildren
};
});
url: '/market/selectMarket',
})
console.log('看看地区树', result)
const transformTree = (nodes) => {
const allChildren = nodes.flatMap(node => node.children || []);
return allChildren.map(child => {
const grandchildren = child.children && child.children.length
? transformTree([child])
: null;
return {
value: child.id,
label: child.name,
children: grandchildren
}; };
market.value = transformTree(result.data)
console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
});
};
market.value = transformTree(result.data)
console.log('转换后的地区树==============', market.value)
} catch (error) {
console.log('请求失败', error)
}
} }
// //
const previewImage = (imageUrl) => { const previewImage = (imageUrl) => {
// 使 element-plus el-image
const imageElement = document.createElement('img');
imageElement.src = imageUrl;
imageElement.style.maxWidth = '80vw';
imageElement.style.maxHeight = '80vh';
const viewer = document.createElement('div');
viewer.style.position = 'fixed';
viewer.style.top = '0';
viewer.style.left = '0';
viewer.style.width = '100vw';
viewer.style.height = '100vh';
viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
viewer.style.display = 'flex';
viewer.style.justifyContent = 'center';
viewer.style.alignItems = 'center';
viewer.style.zIndex = '9999';
viewer.style.overflow = 'auto';
viewer.appendChild(imageElement);
document.body.appendChild(viewer);
viewer.addEventListener('click', () => {
document.body.removeChild(viewer);
});
// 使 element-plus el-image
const imageElement = document.createElement('img');
imageElement.src = imageUrl;
imageElement.style.maxWidth = '80vw';
imageElement.style.maxHeight = '80vh';
const viewer = document.createElement('div');
viewer.style.position = 'fixed';
viewer.style.top = '0';
viewer.style.left = '0';
viewer.style.width = '100vw';
viewer.style.height = '100vh';
viewer.style.backgroundColor = 'rgba(0, 0, 0, 0.7)';
viewer.style.display = 'flex';
viewer.style.justifyContent = 'center';
viewer.style.alignItems = 'center';
viewer.style.zIndex = '9999';
viewer.style.overflow = 'auto';
viewer.appendChild(imageElement);
document.body.appendChild(viewer);
viewer.addEventListener('click', () => {
document.body.removeChild(viewer);
});
}; };
const cancelEdit = function () { const cancelEdit = function () {
editForm.value = {
refundModel: '',
refundReason: '',
partRefundGold: '',
partRefundFree: ''
}
showEdit.value = false
editForm.value = {
refundModel: '',
refundReason: '',
partRefundGold: '',
partRefundFree: ''
}
showEdit.value = false
} }
const currencies = computed(() => [ const currencies = computed(() => [
t('cash.currency.usd'), t('cash.currency.usd'),
@ -537,131 +537,132 @@ const channelOptions = computed(() => [
]) ])
const reset = function () { const reset = function () {
searchForm.value = {
jwcode: '',
market: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
searchForm.value = {
jwcode: '',
market: [],
statuses: []
}
//
pagination.value.pageNum = 1
dateRange.value = []
getRefund()
} }
const showBackDialog = function (row) { const showBackDialog = function (row) {
backRow.value = row
showBack.value = true
backRow.value = row
showBack.value = true
} }
const showEditDialog = function (row) { const showEditDialog = function (row) {
editRow.value = row
showEdit.value = true
editRow.value = row
showEdit.value = true
} }
const handlePageSizeChange = function (val) { const handlePageSizeChange = function (val) {
pagination.value.pageSize = val
getRefund()
pagination.value.pageSize = val
getRefund()
} }
const handleCurrentChange = function (val) { const handleCurrentChange = function (val) {
pagination.value.pageNum = val
getRefund()
pagination.value.pageNum = val
getRefund()
} }
const disabledDate = (time) => { const disabledDate = (time) => {
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
const limitDate = new Date(2025, 0, 1);
return time.getTime() < limitDate.getTime();
} }
const handleMarketChange = (value) => { const handleMarketChange = (value) => {
searchForm.value.market = value || []
searchForm.value.market = value || []
} }
const defaultTime = [ const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59),
] ]
onMounted(() => { onMounted(() => {
getRefund()
getMarket()
console.log('???????????????????', adminData.value)
getRefund()
getMarket()
console.log('???????????????????', adminData.value)
}) })
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
:deep(.el-table__header-wrapper), :deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper), :deep(.el-table__body-wrapper),
:deep(.el-table__cell), :deep(.el-table__cell),
:deep(.el-table__body td) { :deep(.el-table__body td) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
} }
:deep(.el-table__header th) { :deep(.el-table__header th) {
background-color: #F3FAFE !important;
background-color: #F3FAFE !important;
} }
.condition { .condition {
width: 82vw;
width: 82vw;
display: flex;
align-items: center;
height: 4vh;
.item1 {
width: 18%;
display: flex; display: flex;
align-items: center; align-items: center;
height: 4vh;
.item1 {
width: 18%;
display: flex;
align-items: center;
margin-bottom: 1vh;
margin-right: 0.5vw;
}
margin-bottom: 1vh;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
.item2 {
width: 18%;
display: flex;
align-items: center;
margin-right: 0.5vw;
}
} }
.editDialog { .editDialog {
.left {
width: 50%;
height: 70vh;
padding: 0 2vw;
.add-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.left {
width: 50%;
height: 70vh;
padding: 0 2vw;
.add-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.image {
width: 4vw !important;
height: 4vw !important;
}
.image {
width: 4vw !important;
height: 4vw !important;
} }
}
.right {
width: 50%;
height: 50vh;
.right {
width: 50%;
height: 50vh;
.add-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
}
.add-item {
display: flex;
align-items: center;
margin-bottom: 1vh;
} }
}
} }
.back-dialog { .back-dialog {
width: 700px;
height: auto;
.back-text {
font-size: 60px;
font-weight: bold;
color: #000000;
text-align: center;
justify-content: center;
margin-top: 22vh;
}
.back-btn {
height: 20vh;
display: flex;
justify-content: center;
align-items: center;
}
width: 700px;
height: auto;
.back-text {
font-size: 60px;
font-weight: bold;
color: #000000;
text-align: center;
justify-content: center;
margin-top: 22vh;
}
.back-btn {
height: 20vh;
display: flex;
justify-content: center;
align-items: center;
}
} }
</style> </style>
Loading…
Cancel
Save