Browse Source

feat:moneyManage/receiveDetail下四个文件的硬编码中文文本,统一替换为多语言配置,提高代码可维护性和国际化支持

milestone-20251209-多语言二期^2
zhangrenyuan 1 month ago
parent
commit
571a72d819
  1. 11
      src/components/locales/lang/en.js
  2. 1213
      src/components/locales/lang/zh-CN.js
  3. 514
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  4. 384
      src/views/moneyManage/receiveDetail/receiveHead.vue
  5. 518
      src/views/moneyManage/receiveDetail/receiveManage.vue
  6. 442
      src/views/moneyManage/receiveDetail/receiveService.vue
  7. 2
      src/views/refund/gold/addCoinRefund.vue

11
src/components/locales/lang/en.js

@ -9,7 +9,7 @@ export default {
name: 'Name', name: 'Name',
jwcode: 'Homily ID', jwcode: 'Homily ID',
jwcodePlaceholder: 'Please enter Homily ID', jwcodePlaceholder: 'Please enter Homily ID',
activityName: 'Activity Name',
activityName: 'Activity',
activityNamePlaceholder: 'Please enter activity name', activityNamePlaceholder: 'Please enter activity name',
goodsName: 'Product Name', goodsName: 'Product Name',
goodsNamePlaceholder: 'Please enter product name', goodsNamePlaceholder: 'Please enter product name',
@ -48,6 +48,7 @@ export default {
cancel: 'Cancel', cancel: 'Cancel',
confirm: 'Confirm', confirm: 'Confirm',
submit: 'Submit', submit: 'Submit',
addReceive: 'Add Receive',
confirmRecharge: 'Confirm Recharge', confirmRecharge: 'Confirm Recharge',
// Buttons - Date // Buttons - Date
@ -135,7 +136,7 @@ export default {
onlyUploadJPGPNG: 'Only JPG/PNG images are allowed', onlyUploadJPGPNG: 'Only JPG/PNG images are allowed',
limitImageSize: 'Image size cannot exceed 1MB', limitImageSize: 'Image size cannot exceed 1MB',
uploadSuccess: 'Upload successful', uploadSuccess: 'Upload successful',
UploadFailed: 'Upload failed',
uploadFailed: 'Upload failed',
// Audit // Audit
noPermission: 'No permission', noPermission: 'No permission',
@ -180,7 +181,7 @@ export default {
refundModelAll: 'Full Refund', refundModelAll: 'Full Refund',
refundModelPart: 'Partial Refund', refundModelPart: 'Partial Refund',
refundGoldCoin: 'Total refunded coins', refundGoldCoin: 'Total refunded coins',
activity: 'Activity Name',
activity: 'Activity',
rateName: 'Currency', rateName: 'Currency',
rechargeAmount: 'Recharge Amount', rechargeAmount: 'Recharge Amount',
Gold: 'Gold Coin Quantity', Gold: 'Gold Coin Quantity',
@ -216,7 +217,7 @@ export default {
// Add Form Fields // Add Form Fields
common_add: { common_add: {
jwcode: 'Homily ID', jwcode: 'Homily ID',
activity: 'Activity Name',
activity: 'Activity',
activityPlaceholder: 'Please enter activity name', activityPlaceholder: 'Please enter activity name',
permanentGold: 'Permanent Gold Coins', permanentGold: 'Permanent Gold Coins',
freeGold: 'Free Gold Coins', freeGold: 'Free Gold Coins',
@ -286,7 +287,7 @@ export default {
name: 'Name', name: 'Name',
jwcode: 'Homily ID', jwcode: 'Homily ID',
market: 'Region', market: 'Region',
activityName: 'Activity Name',
activityName: 'Activity',
currencyName: 'Currency', currencyName: 'Currency',
rechargeAmount: 'Recharge Amount', rechargeAmount: 'Recharge Amount',
note: 'Remark', note: 'Remark',

1213
src/components/locales/lang/zh-CN.js
File diff suppressed because it is too large
View File

514
src/views/moneyManage/receiveDetail/receiveFinance.vue
File diff suppressed because it is too large
View File

384
src/views/moneyManage/receiveDetail/receiveHead.vue

@ -4,34 +4,34 @@
<el-card class="card1" style="margin-bottom: 0.5vh; min-height: 110px;"> <el-card class="card1" style="margin-bottom: 0.5vh; min-height: 110px;">
<div class="row1"> <div class="row1">
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">精网号</el-text>
<el-input v-model="searchData.jwcode" placeholder="请输入精网号" style="width:10vw;"
<el-text style="width: 4vw;">{{ t('common.jwcode') }}</el-text>
<el-input v-model="searchData.jwcode" :placeholder="t('common.jwcodePlaceholder')" style="width:10vw;"
clearable></el-input> clearable></el-input>
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">客户姓名</el-text>
<el-input v-model="searchData.name" placeholder="请输入客户姓名" style="width:10vw;"
<el-text style="width: 4vw;">{{ t('common.customerName') }}</el-text>
<el-input v-model="searchData.name" :placeholder="t('common.customerNamePlaceholder')" style="width:10vw;"
clearable></el-input> clearable></el-input>
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">所属地区</el-text>
<el-text style="width: 4vw;">{{ t('common.market') }}</el-text>
<!-- <el-select v-model="searchData.market" placeholder="请选择所属地区" style="width:10vw;" clearable> <!-- <el-select v-model="searchData.market" placeholder="请选择所属地区" style="width:10vw;" clearable>
<el-option v-for="item in market" :key="item" :label="item" :value="item" /> <el-option v-for="item in market" :key="item" :label="item" :value="item" />
</el-select> --> </el-select> -->
<el-cascader style="width: 9vw;" v-model="searchData.markets" :options="market" <el-cascader style="width: 9vw;" v-model="searchData.markets" :options="market"
placeholder="请选择所属地区" clearable @change="handleMarketChange" />
:placeholder="t('common.marketPlaceholder')" clearable @change="handleMarketChange" />
</div> </div>
<!-- 地区财务固定显示付款币种删除客服的订单状态 --> <!-- 地区财务固定显示付款币种删除客服的订单状态 -->
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">付款币种</el-text>
<el-select v-model="searchData.paymentCurrency" placeholder="请选择付款币种" style="width: 10vw;"
<el-text style="width: 4vw;">{{ t('common.payCurrency') }}</el-text>
<el-select v-model="searchData.paymentCurrency" :placeholder="t('common.payCurrencyPlaceholder')" style="width: 10vw;"
clearable> clearable>
<el-option v-for="item in customOptions" :key="item" :label="item" :value="item" /> <el-option v-for="item in customOptions" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">支付方式</el-text>
<el-select v-model="searchData.payType" placeholder="请选择支付方式" style="width: 10vw;" clearable>
<el-text style="width: 4vw;">{{ t('common.payModel') }}</el-text>
<el-select v-model="searchData.payType" :placeholder="t('common.payModelPlaceholder')" style="width: 10vw;" clearable>
<el-option v-for="item in paytypeList" :key="item" :label="item" :value="item" /> <el-option v-for="item in paytypeList" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
@ -39,32 +39,32 @@
<div class="row2" style="margin-top: 10px;"> <div class="row2" style="margin-top: 10px;">
<div class="left"> <div class="left">
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">活动名称</el-text>
<el-select v-model="searchData.activity" placeholder="请选择活动方式" style="width: 10vw;"
<el-text style="width: 4vw;">{{ t('common.activityName') }}</el-text>
<el-select v-model="searchData.activity" :placeholder="t('common.activityNameChoose')" style="width: 10vw;"
clearable> clearable>
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName" <el-option v-for="item in activityList" :key="item.id" :label="item.activityName"
:value="item.id" /> :value="item.id" />
</el-select> </el-select>
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">产品名称</el-text>
<el-text style="width: 4vw;">{{ t('common.productName') }}</el-text>
<el-cascader v-model="searchData.goodsName" :options="productList" style="width: 10vw;" <el-cascader v-model="searchData.goodsName" :options="productList" style="width: 10vw;"
clearable /> clearable />
</div> </div>
<div class="rowItem" style="width: 25vw"> <div class="rowItem" style="width: 25vw">
<el-text style="width: 4vw; margin-left: 0.5vw;">付款时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator=""
start-placeholder="起始时间" end-placeholder="结束时间" style="width: 22vw; "
<el-text style="width: 4vw; margin-left: 0.5vw;">{{ t('common.payTime') }}</el-text>
<el-date-picker v-model="getTime" type="datetimerange" :range-separator="t('common.to')"
:start-placeholder="t('common.startTime')" :end-placeholder="t('common.endTime')" style="width: 22vw; "
@change="handleDatePickerChange" :default-time="defaultTime" @change="handleDatePickerChange" :default-time="defaultTime"
:disabled-date="disabledDate" /> :disabled-date="disabledDate" />
</div> </div>
</div> </div>
<el-button style="width: 3vw;" type="primary" @click="search">查询</el-button>
<el-button style="width: 3vw;" type="success" @click="reset">重置</el-button>
<el-button style="width: 3vw;" type="primary" @click="search">{{ t('common.search') }}</el-button>
<el-button style="width: 3vw;" type="success" @click="reset">{{ t('common.reset') }}</el-button>
<el-button v-if="activeTab == 'done'" style="width: 5vw;" type="warning" <el-button v-if="activeTab == 'done'" style="width: 5vw;" type="warning"
@click="exportExcel()">导出excel</el-button>
@click="exportExcel()">{{ t('common.exportExcel') }}</el-button>
<el-button v-if="activeTab == 'done'" style="width: 6vw;" type="primary" <el-button v-if="activeTab == 'done'" style="width: 6vw;" type="primary"
@click="openExportList">查看导出列表</el-button>
@click="openExportList">{{ t('common.viewExportList') }}</el-button>
</div> </div>
</el-card> </el-card>
</div> </div>
@ -78,18 +78,18 @@
<el-button class="btnItem" <el-button class="btnItem"
:style="{ backgroundColor: activeTab === 'pass' ? '#2741DE' : '#E5EBFE', color: activeTab === 'pass' ? 'white' : '#666' }" :style="{ backgroundColor: activeTab === 'pass' ? '#2741DE' : '#E5EBFE', color: activeTab === 'pass' ? 'white' : '#666' }"
@click="navigateTo('pass')"> @click="navigateTo('pass')">
已通过
{{ t('common.passed') }}
</el-button> </el-button>
<el-button class="btnItem" <el-button class="btnItem"
:style="{ backgroundColor: activeTab === 'done' ? '#2741DE' : '#E5EBFE', color: activeTab === 'done' ? 'white' : '#666' }" :style="{ backgroundColor: activeTab === 'done' ? '#2741DE' : '#E5EBFE', color: activeTab === 'done' ? 'white' : '#666' }"
@click="navigateTo('done')"> @click="navigateTo('done')">
已完成
{{ t('common.completed') }}
</el-button> </el-button>
</el-button-group> </el-button-group>
</div> </div>
<div class="info-tooltip"> <div class="info-tooltip">
<el-popover placement="top" title="数据说明" :width="260" trigger="hover"
content="收款的所有页面:订单记录默认按照付款时间降序排列" popper-class="custom-popover" :show-arrow="false">
<el-popover placement="top" :title="t('cash.receiveCashDataTitle')" :width="260" trigger="hover"
:content="t('cash.receiveCashDataContent')" popper-class="custom-popover" :show-arrow="false">
<template #reference> <template #reference>
<el-icon class="service-icon"> <el-icon class="service-icon">
<Warning /> <Warning />
@ -103,51 +103,51 @@
<el-table :data="tableData" style="width: 80vw;height:64vh;" @sort-change="handleSortChange" <el-table :data="tableData" style="width: 80vw;height:64vh;" @sort-change="handleSortChange"
:row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }" :row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }"
:cell-style="{ textAlign: 'center' }"> :cell-style="{ textAlign: 'center' }">
<el-table-column type="index" label="序号" width="100px" fixed="left">
<el-table-column type="index" :label="t('common_list.id')" width="100px" fixed="left">
<template #default="scope"> <template #default="scope">
<span>{{ scope.$index + 1 + (pageInfo.pageNum - 1) * pageInfo.pageSize }}</span> <span>{{ scope.$index + 1 + (pageInfo.pageNum - 1) * pageInfo.pageSize }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="left" prop="jwcode" label="Homily ID" width="110px" /> <el-table-column fixed="left" prop="jwcode" label="Homily ID" width="110px" />
<el-table-column fixed="left" prop="name" label="姓名" width="110px" />
<el-table-column prop="marketName" label="所属地区" width="80px" />
<el-table-column prop="activity" label="活动名称" width="120px" show-overflow-tooltip />
<el-table-column prop="goodsName" label="产品名称" width="120px" />
<el-table-column prop="goodNum" label="产品数量" width="130px">
<el-table-column fixed="left" prop="name" :label="t('common_list.name')" width="110px" />
<el-table-column prop="marketName" :label="t('common_list.market')" width="80px" />
<el-table-column prop="activity" :label="t('common_list.activity')" width="120px" show-overflow-tooltip />
<el-table-column prop="goodsName" :label="t('common_list.productName')" width="120px" />
<el-table-column prop="goodNum" :label="t('common_list.productNum')" width="130px">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.goodsName == '金币充值'">{{ scope.row.permanentGold }}</span>
<span v-if="scope.row.goodsName == t('cash.coinRecharge')">{{ scope.row.permanentGold }}</span>
<span v-else>{{ scope.row.goodNum }}</span> <span v-else>{{ scope.row.goodNum }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="paymentCurrency" label="付款币种" width="100px" />
<el-table-column prop="paymentAmount" label="付款金额" width="120px" />
<el-table-column prop="paymentCurrency" :label="t('common_list.payCurrency')" width="100px" />
<el-table-column prop="paymentAmount" :label="t('common_list.payAmount')" width="120px" />
<!-- 总部财务显示到账币种/金额/手续费已通过/已完成标签页 --> <!-- 总部财务显示到账币种/金额/手续费已通过/已完成标签页 -->
<el-table-column prop="receivedCurrency" label="到账币种"
<el-table-column prop="receivedCurrency" :label="t('common_list.receiveCurrency')"
v-if="activeTab == 'pass' || activeTab == 'done'" width="150px"></el-table-column> v-if="activeTab == 'pass' || activeTab == 'done'" width="150px"></el-table-column>
<el-table-column prop="receivedAmount" label="到账金额"
<el-table-column prop="receivedAmount" :label="t('common_list.receiveAmount')"
v-if="activeTab == 'pass' || activeTab == 'done'" width="150px"> v-if="activeTab == 'pass' || activeTab == 'done'" width="150px">
<template #default="scope"> <template #default="scope">
<div v-if="!scope.row.receivedAmount"> <div v-if="!scope.row.receivedAmount">
<text style="color: #FA5A1E;">待补充</text>
<text style="color: #FA5A1E;">{{ t('common_list.toSupply') }}</text>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="handlingCharge" label="手续费"
<el-table-column prop="handlingCharge" :label="t('common_list.fee')"
v-if="activeTab == 'pass' || activeTab == 'done'" width="150px"> v-if="activeTab == 'pass' || activeTab == 'done'" width="150px">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.handlingCharge == null"> <div v-if="scope.row.handlingCharge == null">
<text style="color: #FA5A1E;">待补充</text>
<text style="color: #FA5A1E;">{{ t('common_list.toSupply') }}</text>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payType" label="支付方式" width="130px" />
<el-table-column prop="payTime" label="付款时间" width="180px" />
<el-table-column prop="voucher" label="转账凭证" width="110px">
<el-table-column prop="payType" :label="t('common_list.payModel')" width="130px" />
<el-table-column prop="payTime" :label="t('common_list.payTime')" width="180px" />
<el-table-column prop="voucher" :label="t('common_list.transferVoucher')" width="110px">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.voucher" <div v-if="scope.row.voucher"
style="display: flex; justify-content: center; align-items: center; cursor: pointer;" style="display: flex; justify-content: center; align-items: center; cursor: pointer;"
@click="previewImage(scope.row.voucher)"> @click="previewImage(scope.row.voucher)">
<img :src="scope.row.voucher" alt="支付凭证" style="width: auto; height: 40px;">
<img :src="scope.row.voucher" :alt="t('common_list.payVoucher')" style="width: auto; height: 40px;">
</div> </div>
<div v-else <div v-else
style="display: flex; justify-content: center; align-items: center; height: 40px;"> style="display: flex; justify-content: center; align-items: center; height: 40px;">
@ -155,26 +155,26 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitterName" label="提交人" width="150px"
<el-table-column prop="submitterName" :label="t('common.submitter')" width="150px"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<!-- 总部财务显示审核人已通过/已驳回/已完成标签页 --> <!-- 总部财务显示审核人已通过/已驳回/已完成标签页 -->
<el-table-column prop="auditName" label="审核人"
<el-table-column prop="auditName" :label="t('common.approver')"
v-if="activeTab == 'pass' || activeTab == 'reject' || activeTab == 'done'" width="150px" v-if="activeTab == 'pass' || activeTab == 'reject' || activeTab == 'done'" width="150px"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="receivedTime" label="到账时间"
<el-table-column prop="receivedTime" :label="t('common_list.receiveTime')"
v-if="activeTab == 'pass' || activeTab == 'done'" width="180px" /> v-if="activeTab == 'pass' || activeTab == 'done'" width="180px" />
<el-table-column prop="remark" label="备注" v-if="activeTab != 'reject'" width="150px"
<el-table-column prop="remark" :label="t('common_list.remark')" v-if="activeTab != 'reject'" width="150px"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="status" fixed="right" label="订单状态" v-if="activeTab == 'done'"
<el-table-column prop="status" fixed="right" :label="t('common_list.orderStatus')" v-if="activeTab == 'done'"
width="150px" show-overflow-tooltip> width="150px" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<span style="color: rgb(242, 84, 83);" v-if="scope.row.status == 6">退款</span>
<span style="color: rgb(127,204,133);" v-else>正常</span>
<span style="color: rgb(242, 84, 83);" v-if="scope.row.status == 6">{{ t('common_list.refund') }}</span>
<span style="color: rgb(127,204,133);" v-else>{{ t('common_list.normal') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="auditTime" label="驳回时间" v-if="activeTab == 'reject'" width="180px"
<el-table-column prop="auditTime" :label="t('common_list.rejectTime')" v-if="activeTab == 'reject'" width="180px"
show-overflow-tooltip></el-table-column> show-overflow-tooltip></el-table-column>
<el-table-column prop="rejectReason" label="驳回理由" v-if="activeTab == 'reject'" width="150px">
<el-table-column prop="rejectReason" :label="t('common_list.rejectReason')" v-if="activeTab == 'reject'" width="150px">
<template #default="scope"> <template #default="scope">
<div class="ellipsis-container" <div class="ellipsis-container"
@mouseenter="handleMouseEnter($event, scope.row.rejectReason)" @mouseenter="handleMouseEnter($event, scope.row.rejectReason)"
@ -193,19 +193,16 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- 总部财务表格操作待审核审核已通过编辑 --> <!-- 总部财务表格操作待审核审核已通过编辑 -->
<el-table-column fixed="right" label="操作" width="120px" v-if="activeTab != 'reject'">
<el-table-column fixed="right" :label="t('common_list.operation')" width="120px" v-if="activeTab != 'reject'">
<template #default=scope> <template #default=scope>
<el-link v-if="activeTab == 'wait'" style="color: #2741DE;" <el-link v-if="activeTab == 'wait'" style="color: #2741DE;"
@click="openAuditForm(scope.row)">审核
</el-link>
@click="openAuditForm(scope.row)">{{ t('common.audit') }}</el-link>
<el-link <el-link
v-else-if="activeTab == 'pass' && !(scope.row.status == 6 || scope.row.status == 4)" v-else-if="activeTab == 'pass' && !(scope.row.status == 6 || scope.row.status == 4)"
style="color: #2741DE;" @click="openEditForm(scope.row)">编辑
</el-link>
style="color: #2741DE;" @click="openEditForm(scope.row)">{{ t('common.edit') }}</el-link>
<el-link <el-link
v-else-if="activeTab == 'done' && scope.row.status == 4 && startsWith(scope.row.orderCode, 'GOLDCOIN')" v-else-if="activeTab == 'done' && scope.row.status == 4 && startsWith(scope.row.orderCode, 'GOLDCOIN')"
style="color: rgb(242, 84, 83);" @click="openRefundConfirm(scope.row)">退款
</el-link>
style="color: rgb(242, 84, 83);" @click="openRefundConfirm(scope.row)">{{ t('common.refund') }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -221,16 +218,16 @@
<!-- 退款确认弹窗 --> <!-- 退款确认弹窗 -->
<div class="recallDialog" v-show="refundConfirmDialog"> <div class="recallDialog" v-show="refundConfirmDialog">
<div class="close"> <div class="close">
<button @click="closeConfirmRefund" class="Btn">关闭</button>
<button @click="closeConfirmRefund" class="Btn">{{ t('common.close') }}</button>
</div> </div>
<div class="text"> <div class="text">
<text class="txt">{{ textContent }}</text> <text class="txt">{{ textContent }}</text>
</div> </div>
<div class="cancle"> <div class="cancle">
<button @click="closeConfirmRefund" class="Btn">取消</button>
<button @click="closeConfirmRefund" class="Btn">{{ t('common.cancel') }}</button>
</div> </div>
<div class="confirm"> <div class="confirm">
<button @click="openRefundDialog" class="Btn">确定</button>
<button @click="openRefundDialog" class="Btn">{{ t('common.confirm') }}</button>
</div> </div>
</div> </div>
@ -239,67 +236,67 @@
<div class="content"> <div class="content">
<div class="left"> <div class="left">
<el-form class="editForm" label-width="4.5vw" label-position="left"> <el-form class="editForm" label-width="4.5vw" label-position="left">
<el-form-item label="精网号">
<el-input disabled="true" v-model="editFormData.jwcode" placeholder="精网号" />
<el-form-item :label="t('common_add.jwcode')">
<el-input disabled="true" v-model="editFormData.jwcode" :placeholder="t('common_add.jwcode')" />
</el-form-item> </el-form-item>
<el-form-item label="客户姓名">
<el-input disabled="true" v-model="editFormData.name" placeholder="客户姓名" />
<el-form-item :label="t('common_add.customerName')">
<el-input disabled="true" v-model="editFormData.name" :placeholder="t('common_add.customerName')" />
</el-form-item> </el-form-item>
<el-form-item label="所属地区">
<el-input disabled="true" v-model="editFormData.marketName" placeholder="所属地区" />
<el-form-item :label="t('common_add.market')">
<el-input disabled="true" v-model="editFormData.marketName" :placeholder="t('common_add.market')" />
</el-form-item> </el-form-item>
<el-form-item label="活动名称">
<el-input disabled="true" v-model="editFormData.activity" placeholder="活动名称" />
<el-form-item :label="t('common_add.activity')">
<el-input disabled="true" v-model="editFormData.activity" :placeholder="t('common_add.activity')" />
</el-form-item> </el-form-item>
<el-form-item label="产品名称">
<el-select disabled="true" v-model="editFormData.goodsName" placeholder="产品名称"
<el-form-item :label="t('common_add.productName')">
<el-select disabled="true" v-model="editFormData.goodsName" :placeholder="t('common_add.productName')"
clearable></el-select> clearable></el-select>
</el-form-item> </el-form-item>
<!-- 金币产品特殊显示 --> <!-- 金币产品特殊显示 -->
<el-form-item v-show="!isEditGold" label="产品数量">
<el-form-item v-show="!isEditGold" :label="t('common_add.productNum')">
<div style="display: flex;"> <div style="display: flex;">
<el-input disabled="true" style="padding-right: 30px; flex: 3;" <el-input disabled="true" style="padding-right: 30px; flex: 3;"
v-model="editFormData.goodNum" placeholder="请输入产品数量" />
v-model="editFormData.goodNum" :placeholder="t('common_add.productNumPlaceholder')" />
<CurrencySelect disabled="true" v-model="editFormData.numUnit" :items="numUnitList" <CurrencySelect disabled="true" v-model="editFormData.numUnit" :items="numUnitList"
style="flex: 1.5;" placeholder="单位" />
style="flex: 1.5;" :placeholder="t('common_add.numUnit')" />
</div> </div>
</el-form-item> </el-form-item>
<div v-show="isEditGold" style="margin-bottom: 15px; display: flex;"> <div v-show="isEditGold" style="margin-bottom: 15px; display: flex;">
<div style=" display: flex; margin-right: 10px;"> <div style=" display: flex; margin-right: 10px;">
<span <span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币</span>
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">{{ t('common_add.permanentGold') }}</span>
<el-input disabled="true" <el-input disabled="true"
style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;" style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
v-model="editFormData.permanentGold" /> v-model="editFormData.permanentGold" />
</div> </div>
<div style="padding-right: 5px; display: flex;"> <div style="padding-right: 5px; display: flex;">
<span <span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币</span>
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">{{ t('common_add.freeGold') }}</span>
<el-input disabled="true" <el-input disabled="true"
style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;" style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
v-model="editFormData.freeGold" /> v-model="editFormData.freeGold" />
</div> </div>
</div> </div>
<el-form-item label="付款币种">
<el-form-item :label="t('common_add.payCurrency')">
<CurrencySelect :disabled="!ifOnline" v-model="editFormData.paymentCurrency" <CurrencySelect :disabled="!ifOnline" v-model="editFormData.paymentCurrency"
:items="customOptions" placeholder="付款币种" />
:items="customOptions" :placeholder="t('common_add.payCurrencyPlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item label="付款金额">
<el-input :disabled="!ifOnline" v-model="editFormData.paymentAmount" placeholder="付款金额" />
<el-form-item :label="t('common_add.payAmount')">
<el-input :disabled="!ifOnline" v-model="editFormData.paymentAmount" :placeholder="t('common_add.payAmountPlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item label="支付方式">
<el-select disabled="true" v-model="editFormData.payType" placeholder="支付方式"
<el-form-item :label="t('common_add.payMethod')">
<el-select disabled="true" v-model="editFormData.payType" :placeholder="t('common_add.payMethodPlaceholder')"
clearable></el-select> clearable></el-select>
</el-form-item> </el-form-item>
<el-form-item label="到账地区">
<el-select disabled="true" v-model="editFormData.receivedMarket" placeholder="到账地区"
<el-form-item :label="t('common_add.receiveArea')">
<el-select disabled="true" v-model="editFormData.receivedMarket" :placeholder="t('common_add.receiveAreaPlaceholder')"
clearable></el-select> clearable></el-select>
</el-form-item> </el-form-item>
<el-form-item label="付款时间">
<el-form-item :label="t('common_add.payTime')">
<el-date-picker disabled="true" type="datetime" v-model="editFormData.payTime" <el-date-picker disabled="true" type="datetime" v-model="editFormData.payTime"
placeholder="付款时间" />
:placeholder="t('common_add.payTimePlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item label="转账凭证">
<el-form-item :label="t('common_add.transferVoucher')">
<div class="pic"> <div class="pic">
<el-upload disabled="true" ref="uploadRef" class="uploader" :show-file-list="false" <el-upload disabled="true" ref="uploadRef" class="uploader" :show-file-list="false"
list-type="picture-card" :auto-upload="false" :before-upload="beforeUpload" list-type="picture-card" :auto-upload="false" :before-upload="beforeUpload"
@ -311,12 +308,12 @@
<Plus /> <Plus />
</el-icon> </el-icon>
</el-upload> </el-upload>
<el-text class="picText">仅支持.jpg .png格式文件 2 MB</el-text>
<el-text class="picText">{{ t('common_add.transferVoucherPlaceholder') }}</el-text>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="备注">
<el-form-item :label="t('common_add.remark')">
<el-input disabled="true" v-model="editFormData.remark" type="textarea" :rows="4" <el-input disabled="true" v-model="editFormData.remark" type="textarea" :rows="4"
placeholder="备注" maxlength="100" show-word-limit />
:placeholder="t('common_add.remark')" maxlength="100" show-word-limit />
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -324,26 +321,26 @@
<!-- 总部财务可编辑项仅到账相关信息 --> <!-- 总部财务可编辑项仅到账相关信息 -->
<el-form ref="editFormRef" :rules="editFormRule" :model="editFormData" class="editFormRighrt" <el-form ref="editFormRef" :rules="editFormRule" :model="editFormData" class="editFormRighrt"
label-width="4.5vw" label-position="left"> label-width="4.5vw" label-position="left">
<el-form-item label="到账货币" required>
<el-form-item :label="t('common_add.receiveCurrency')" required>
<CurrencySelect v-model="editFormData.receivedCurrency" :items="customOptions" <CurrencySelect v-model="editFormData.receivedCurrency" :items="customOptions"
placeholder="请选择到账货币" />
:placeholder="t('common_add.receiveCurrencyPlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item label="到账金额" prop="receivedAmount">
<el-input v-model="editFormData.receivedAmount" placeholder="请输入到账金额" type="number" />
<el-form-item :label="t('common_add.receivedAmount')" prop="receivedAmount">
<el-input v-model="editFormData.receivedAmount" :placeholder="t('common_add.receivedAmountPlaceholder')" type="number" />
</el-form-item> </el-form-item>
<el-form-item label="手续费" prop="handlingCharge">
<el-input v-model="editFormData.handlingCharge" placeholder="请输入手续费" type="number" />
<el-form-item :label="t('common_add.fee')" prop="handlingCharge">
<el-input v-model="editFormData.handlingCharge" :placeholder="t('common_add.feePlaceholder')" type="number" />
</el-form-item> </el-form-item>
<el-form-item label="到账时间" required>
<el-date-picker type="datetime" v-model="editFormData.receivedTime" placeholder="请选择到账时间" />
<el-form-item :label="t('common_add.receivedTime')" required>
<el-date-picker type="datetime" v-model="editFormData.receivedTime" :placeholder="t('common_add.receivedTimePlaceholder')" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<span class="editBtns"> <span class="editBtns">
<button class="editBtn1" @click="closeEditForm"> <button class="editBtn1" @click="closeEditForm">
<text class="txt">取消</text>
<text class="txt">{{ t('common.cancel') }}</text>
</button> </button>
<button class="editBtn2" @click="throttledsubmitEditForm"> <button class="editBtn2" @click="throttledsubmitEditForm">
<text class="txt">提交</text>
<text class="txt">{{ t('common.submit') }}</text>
</button> </button>
</span> </span>
</div> </div>
@ -351,68 +348,68 @@
</el-dialog> </el-dialog>
<!-- 新增退款 --> <!-- 新增退款 -->
<el-dialog v-model="refundDialog" title="退款" class="refundDialog" overflow draggable style="width: 40vw;"
<el-dialog v-model="refundDialog" :title="t('common_add.refund')" class="refundDialog" overflow draggable style="width: 40vw;"
:before-close="closeRefundForm"> :before-close="closeRefundForm">
<div style="display: flex;"> <div style="display: flex;">
<div class="left"> <div class="left">
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">精网号</el-text>
<el-text style="width:4vw;">{{ t('common_add.jwcode') }}</el-text>
<el-input v-model="refundFormData.jwcode" style="width:10vw;" disabled /> <el-input v-model="refundFormData.jwcode" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">客户姓名</el-text>
<el-text style="width:4vw;">{{ t('common_add.customerName') }}</el-text>
<el-input v-model="refundFormData.name" style="width:10vw;" disabled /> <el-input v-model="refundFormData.name" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">所属地区</el-text>
<el-text style="width:4vw;">{{ t('common_add.market') }}</el-text>
<el-input v-model="refundFormData.marketName" style="width:10vw;" disabled /> <el-input v-model="refundFormData.marketName" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">活动名称</el-text>
<el-text style="width:4vw;">{{ t('common_add.activity') }}</el-text>
<el-input v-model="refundFormData.activity" style="width:10vw;" disabled /> <el-input v-model="refundFormData.activity" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">产品名称</el-text>
<el-text style="width:4vw;">{{ t('common_add.productName') }}</el-text>
<el-input v-model="refundFormData.goodsName" style="width:10vw;" disabled /> <el-input v-model="refundFormData.goodsName" style="width:10vw;" disabled />
</div> </div>
<div v-show="!isRefundGold" class="add-item"> <div v-show="!isRefundGold" class="add-item">
<el-text style="width:4vw;">产品数量</el-text>
<el-text style="width:4vw;">{{ t('common_add.productNum') }}</el-text>
<el-input style="padding-right: 10px; width:6.5vw;" v-model="refundFormData.goodNum" <el-input style="padding-right: 10px; width:6.5vw;" v-model="refundFormData.goodNum"
placeholder="请输入产品数量" disabled />
:placeholder="t('common_add.productNumPlaceholder')" disabled />
<CurrencySelect disabled="true" v-model="refundFormData.numUnit" :items="numUnitList" <CurrencySelect disabled="true" v-model="refundFormData.numUnit" :items="numUnitList"
style=" width: 3.5vw;" placeholder="单位" />
style=" width: 3.5vw;" :placeholder="t('common_add.numUnit')" />
</div> </div>
<div v-show="isRefundGold" style="display: flex; margin-bottom: 10px;"> <div v-show="isRefundGold" style="display: flex; margin-bottom: 10px;">
<div style=" display: flex; align-items: center;justify-content: center; "> <div style=" display: flex; align-items: center;justify-content: center; ">
<span style="color: #999999; white-space: nowrap;">永久金币</span>
<span style="color: #999999; white-space: nowrap;">{{ t('common_add.permanentGold') }}</span>
<el-input style="padding-right: 10px; height: 30px; width: 70px;" <el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundFormData.permanentGold" disabled /> v-model="refundFormData.permanentGold" disabled />
</div> </div>
<div style=" display: flex; align-items: center;justify-content: center; "> <div style=" display: flex; align-items: center;justify-content: center; ">
<span style="color: #999999; white-space: nowrap;">免费金币</span>
<span style="color: #999999; white-space: nowrap;">{{ t('common_add.freeGold') }}</span>
<el-input style="padding-right: 10px; height: 30px; width: 70px;" <el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundFormData.freeGold" disabled /> v-model="refundFormData.freeGold" disabled />
</div> </div>
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款币种</el-text>
<el-text style="width:4vw;">{{ t('common_add.payCurrency') }}</el-text>
<el-input v-model="refundFormData.paymentCurrency" style="width:10vw;" disabled /> <el-input v-model="refundFormData.paymentCurrency" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款金额</el-text>
<el-text style="width:4vw;">{{ t('common_add.payAmount') }}</el-text>
<el-input v-model="refundFormData.paymentAmount" style="width:10vw;" disabled /> <el-input v-model="refundFormData.paymentAmount" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">支付方式</el-text>
<el-text style="width:4vw;">{{ t('common_add.payMethod') }}</el-text>
<el-input v-model="refundFormData.payType" style="width:10vw;" disabled /> <el-input v-model="refundFormData.payType" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款时间</el-text>
<el-text style="width:4vw;">{{ t('common_add.payTime') }}</el-text>
<el-date-picker v-model="refundFormData.payTime" type="datetime" style="width:10vw;" disabled /> <el-date-picker v-model="refundFormData.payTime" type="datetime" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;" size="small">转账凭证</el-text>
<el-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }">
<el-text style="width:4vw;" size="small">{{ t('common_add.transferVoucher') }}</el-text>
<el-form-item :rules="{ required: true, message: t('common_add.uploadPhoto'), trigger: 'change' }">
<el-upload ref="uploadRef" :auto-upload="false" list-type="picture-card" <el-upload ref="uploadRef" :auto-upload="false" list-type="picture-card"
:show-file-list="false"> :show-file-list="false">
<template #default> <template #default>
@ -426,40 +423,40 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">备注</el-text>
<el-text style="width:4vw;">{{ t('common_add.remark') }}</el-text>
<el-input v-model="refundFormData.remark" style="width:10vw;" :rows="2" type="textarea" <el-input v-model="refundFormData.remark" style="width:10vw;" :rows="2" type="textarea"
maxLength="100" disabled show-word-limit /> maxLength="100" disabled show-word-limit />
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">退款模式</el-text>
<el-text style="width:4vw;">{{ t('common_add.refundModel') }}</el-text>
<el-radio-group v-model="refundFormData.refundModel"> <el-radio-group v-model="refundFormData.refundModel">
<el-radio value="0">全部退款</el-radio>
<el-radio value="1">部分退款</el-radio>
<el-radio value="0">{{ t('common_add.refundModelAll') }}</el-radio>
<el-radio value="1">{{ t('common_add.refundModelPart') }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div v-show="refundFormData.refundModel == '1'" style="display: flex; margin-bottom: 10px;"> <div v-show="refundFormData.refundModel == '1'" style="display: flex; margin-bottom: 10px;">
<div style=" display: flex; align-items: center;justify-content: center; "> <div style=" display: flex; align-items: center;justify-content: center; ">
<span style="color: #999999; white-space: nowrap;">永久金币</span>
<span style="color: #999999; white-space: nowrap;">{{ t('common_add.permanentGold') }}</span>
<el-input style="padding-right: 10px; height: 30px; width: 70px;" <el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundFormData.partRefundGold" dsabled />
v-model="refundFormData.partRefundGold" disabled />
</div> </div>
<div style=" display: flex; align-items: center;justify-content: center; "> <div style=" display: flex; align-items: center;justify-content: center; ">
<span style="color: #999999; white-space: nowrap;">免费金币</span>
<span style="color: #999999; white-space: nowrap;">{{ t('common_add.freeGold') }}</span>
<el-input style="padding-right: 10px; height: 30px; width: 70px;" <el-input style="padding-right: 10px; height: 30px; width: 70px;"
v-model="refundFormData.partRefundFree" /> v-model="refundFormData.partRefundFree" />
</div> </div>
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">退款理由</el-text>
<el-text style="width:4vw;">{{ t('common_add.refundReason') }}</el-text>
<el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150" <el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150"
show-word-limit type="textarea" /> show-word-limit type="textarea" />
</div> </div>
<div>ps:请在退款理由表明用户的退款需求</div>
<div>{{ t('common_add.tip') }}</div>
<div style="display:flex;justify-content: center;margin-top: 5vh;"> <div style="display:flex;justify-content: center;margin-top: 5vh;">
<el-button type="default" @click="resetRefund">重置</el-button>
<el-button type="primary" @click="throttledsubmitRefund">提交</el-button>
<el-button type="default" @click="resetRefund">{{ t('common.reset') }}</el-button>
<el-button type="primary" @click="throttledsubmitRefund">{{ t('common.submit') }}</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -467,33 +464,33 @@
<!-- 导出列表 --> <!-- 导出列表 -->
<el-dialog v-model="exportListVisible" title="导出列表" width="60vw">
<el-dialog v-model="exportListVisible" :title="t('common_export.exportList')" width="60vw">
<el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading"> <el-table :data="exportList" style="width: 100% ;height: 60vh;" :loading="exportListLoading">
<el-table-column prop="fileName" label="文件名" />
<el-table-column prop="state" label="状态">
<el-table-column prop="fileName" :label="t('common_export.fileName')" />
<el-table-column prop="state" :label="t('common_export.status')">
<template #default="scope"> <template #default="scope">
<el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'"> <el-tag :type="getTagType(scope.row.state)" :effect="scope.row.state === 3 ? 'light' : 'plain'">
{{ getTagText(scope.row.state) }} {{ getTagText(scope.row.state) }}
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间">
<el-table-column prop="createTime" :label="t('common_export.createTime')">
<template #default="scope"> <template #default="scope">
{{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }} {{ moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作">
<el-table-column :label="t('common_export.operation')">
<template #default="scope"> <template #default="scope">
<el-button type="primary" size="small" @click="downloadExportFile(scope.row)" <el-button type="primary" size="small" @click="downloadExportFile(scope.row)"
:disabled="scope.row.state !== 2"> :disabled="scope.row.state !== 2">
下载
{{ t('common_export.download') }}
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button text @click="exportListVisible = false">关闭</el-button>
<el-button text @click="exportListVisible = false">{{ t('common_export.close') }}</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
@ -524,6 +521,10 @@ import { productList, MarketNameForId, CurrencyForId, marketList } from './utils
import { useAdminStore } from '@/store/index.js'; import { useAdminStore } from '@/store/index.js';
import { hasMenuPermission } from '@/utils/menuTreePermission.js'; import { hasMenuPermission } from '@/utils/menuTreePermission.js';
//
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
// ===================== 1. ===================== // ===================== 1. =====================
const adminStore = useAdminStore(); const adminStore = useAdminStore();
const { menuTree } = storeToRefs(adminStore); const { menuTree } = storeToRefs(adminStore);
@ -580,7 +581,7 @@ const closeRefundForm = () => {
const isRefundGold = ref(false) const isRefundGold = ref(false)
const ifRefundGold = () => { const ifRefundGold = () => {
if (refundFormData.value.goodsName === '金币充值') {
if (refundFormData.value.goodsName === t('cash.coinRecharge')) {
isRefundGold.value = true isRefundGold.value = true
refundFormData.value.goodNum = 0 refundFormData.value.goodNum = 0
} else { } else {
@ -641,9 +642,9 @@ const exportExcel = async function () {
const res = await API({ url: '/export/exportCash', data: params }) const res = await API({ url: '/export/exportCash', data: params })
if (res.code === 200) { if (res.code === 200) {
ElMessage.success('导出成功')
ElMessage.success(t('elmessage.exportSuccess'))
} else { } else {
ElMessage.error(res.msg || '导出失败')
ElMessage.error(res.msg || t('elmessage.exportFailed'))
} }
} }
@ -664,11 +665,11 @@ const getExportList = async () => {
}) })
exportList.value = filteredData exportList.value = filteredData
} else { } else {
ElMessage.error(result.msg || '获取导出列表失败')
ElMessage.error(result.msg || t('elmessage.getExportListError'))
} }
} catch (error) { } catch (error) {
console.error('获取导出列表出错:', error) console.error('获取导出列表出错:', error)
ElMessage.error('获取导出列表失败,请稍后重试')
ElMessage.error(t('elmessage.getExportListError'))
} finally { } finally {
exportListLoading.value = false exportListLoading.value = false
} }
@ -680,7 +681,7 @@ const downloadExportFile = (item) => {
link.download = item.fileName link.download = item.fileName
link.click() link.click()
} else { } else {
ElMessage.warning('文件还在导出中,请稍后再试')
ElMessage.warning(t('elmessage.exportingInProgress'))
} }
} }
// //
@ -701,32 +702,55 @@ const getTagType = (state) => {
// //
const getTagText = (state) => { const getTagText = (state) => {
switch (state) { switch (state) {
case 0:
return '待执行';
case 1:
return '执行中';
case 2:
return '执行完成';
case 3:
return '执行出错';
default:
return '未知状态';
}
case 0:
return t('elmessage.pendingExecution');
case 1:
return t('elmessage.executing');
case 2:
return t('elmessage.executed');
case 3:
return t('elmessage.errorExecution');
default:
return t('elmessage.unknownStatus');
}
} }
// //
const adminData = ref({}); const adminData = ref({});
const activityList = ref([]); const activityList = ref([]);
const customOptions = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)']);
const paytypeList = ["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"];
//
const customOptions = ref([
t('cash.currency.usd'), // (USD)
t('cash.currency.hkd'), // (HKD)
t('cash.currency.sgd'), // (SGD)
t('cash.currency.myr'), // (MYR)
t('cash.currency.thb'), // (THB)
t('cash.currency.cad'), // (CAD)
t('cash.currency.vnd'), // (VDN)
t('cash.currency.krw') // (KRW)
])
// - 使cash.payMethods
const paytypeList = ref([
t('cash.payMethods.stripe'), // Stripe-
t('cash.payMethods.paymentAsia'), // PaymentAsia-
t('cash.payMethods.ipay88'), // Ipay88-
t('cash.payMethods.grabpay'), // Grabpay
t('cash.payMethods.nets'), // Nets
t('cash.payMethods.transfer'), // E-Transfer
t('cash.payMethods.paypal'), // PayPal
t('cash.payMethods.bankTransfer'),//
t('cash.payMethods.card'), //
t('cash.payMethods.cash'), //
t('cash.payMethods.check') //
])
const paytypeOptions = ref([...paytypeList]); const paytypeOptions = ref([...paytypeList]);
// ===================== 2. ===================== // ===================== 2. =====================
//退 //退
const openRefundConfirm = (row) => { const openRefundConfirm = (row) => {
textContent.value = '将要对该订单退款!'
textContent.value = t('common.willRefundOrder')
refundConfirmDialog.value = true refundConfirmDialog.value = true
refundFormData.value = { ...row } refundFormData.value = { ...row }
ifRefundGold() ifRefundGold()
@ -780,12 +804,12 @@ const getlist = async () => {
if (searchData.value.jwcode) { if (searchData.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchData.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchData.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
// 8 // 8
if (searchData.value.jwcode.length > 8) { if (searchData.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
} }
@ -817,11 +841,11 @@ const getlist = async () => {
tableData.value = result.data.list; tableData.value = result.data.list;
total.value = result.data.total; total.value = result.data.total;
} else { } else {
ElMessage.error('订单数据加载失败');
ElMessage.error(t('elmessage.orderDataLoadFailed'));
} }
} catch (error) { } catch (error) {
console.error('总部财务订单列表请求异常:', error); console.error('总部财务订单列表请求异常:', error);
ElMessage.error('网络异常,请重试');
ElMessage.error(t('elmessage.inNetworkError'));
} }
}; };
@ -833,23 +857,23 @@ const resetRefund = () => {
//退 //退
const submitRefund = async () => { const submitRefund = async () => {
try { try {
if (refundFormData.value.goodsName != '金币充值') {
return ElMessage.error('线上数据仅支持金币充值退款');
if (refundFormData.value.goodsName != t('cash.coinRecharge')) {
return ElMessage.error(t('elmessage.onlineDataSupport'));
} }
if (!refundFormData.value.refundModel) { if (!refundFormData.value.refundModel) {
return ElMessage.error('请选择退款方式');
return ElMessage.error(t('elmessage.selectRefundModel'));
} }
if (!refundFormData.value.refundReason) { if (!refundFormData.value.refundReason) {
return ElMessage.error('请输入退款原因');
return ElMessage.error(t('elmessage.refundReasonPlaceholder'));
} }
// //
if (refundFormData.value.jwcode) { if (refundFormData.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(refundFormData.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(refundFormData.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
return ElMessage.error('精网号格式不正确,必须为正整数');
return ElMessage.error(t('elmessage.jwcodePositiveError'));
} }
if (refundFormData.value.jwcode.length > 20) {
return ElMessage.error('精网号长度不能超过20位');
if (refundFormData.value.jwcode.length > 8) {
return ElMessage.error(t('elmessage.limitJwcodeLength'));
} }
} }
if (refundFormData.value.refundModel == 0) { if (refundFormData.value.refundModel == 0) {
@ -876,7 +900,7 @@ const submitRefund = async () => {
} }
}) })
if (result.code == 200) { if (result.code == 200) {
ElMessage.success('新增退款成功')
ElMessage.success(t('elmessage.addRefundSuccess'))
getlist() getlist()
closeRefundForm() closeRefundForm()
} else { } else {
@ -937,15 +961,15 @@ const handelAudit = async () => {
}); });
if (result.code === 200) { if (result.code === 200) {
ElMessage.success('审核通过');
ElMessage.success(t('elmessage.approveSuccess'));
getlist(); getlist();
closeAuditForm(); closeAuditForm();
} else { } else {
ElMessage.error(result.msg || '审核失败');
ElMessage.error(result.msg || t('elmessage.approveFailed'));
} }
} catch (error) { } catch (error) {
console.error('审核通过请求异常:', error); console.error('审核通过请求异常:', error);
ElMessage.error('网络异常,请重试');
ElMessage.error(t('elmessage.inNetworkError'));
} }
}; };
@ -953,7 +977,7 @@ const handelAudit = async () => {
const isGold = ref(false) const isGold = ref(false)
const ifGold = (data) => { const ifGold = (data) => {
console.log('data', data); console.log('data', data);
if (data.goodsName === '金币充值') {
if (data.goodsName === t('cash.coinRecharge')) {
isGold.value = true isGold.value = true
} else { } else {
isGold.value = false isGold.value = false
@ -965,7 +989,7 @@ const ifGold = (data) => {
const openEditForm = (row) => { const openEditForm = (row) => {
editFormData.value = { ...row }; editFormData.value = { ...row };
// //
if (row.goodsName === '金币充值') isEditGold.value = true;
if (row.goodsName === t('cash.coinRecharge')) isEditGold.value = true;
else isEditGold.value = false; else isEditGold.value = false;
// 线 // 线
if (row.status === 3) ifOnline.value = true; if (row.status === 3) ifOnline.value = true;
@ -1006,15 +1030,15 @@ const submitEditForm = async () => {
}); });
if (result.code === 200) { if (result.code === 200) {
ElMessage.success('编辑提交成功');
ElMessage.success(t('elmessage.editSuccess'));
getlist(); getlist();
closeEditForm(); closeEditForm();
} else { } else {
ElMessage.error(result.msg || '提交失败');
ElMessage.error(result.msg || t('elmessage.editFailed'));
} }
} catch (error) { } catch (error) {
console.error('编辑提交请求异常:', error); console.error('编辑提交请求异常:', error);
ElMessage.error('表单验证失败,请检查数据格式');
ElMessage.error(t('elmessage.formValidationFailed'));
} }
}; };
@ -1069,7 +1093,7 @@ const getAdminData = async () => {
// } // }
} catch (error) { } catch (error) {
console.error('管理员信息获取失败:', error); console.error('管理员信息获取失败:', error);
ElMessage.error('管理员信息加载异常');
ElMessage.error(t('elmessage.adminInfoLoadFailed'));
} }
}; };
@ -1080,11 +1104,11 @@ const getActivitys = async () => {
if (result.code === 200) { if (result.code === 200) {
activityList.value = result.data; activityList.value = result.data;
} else { } else {
ElMessage.error('活动列表加载失败');
ElMessage.error(t('elmessage.activityLoadFailed'));
} }
} catch (error) { } catch (error) {
console.error('活动列表获取失败:', error); console.error('活动列表获取失败:', error);
ElMessage.error('活动数据加载异常');
ElMessage.error(t('elmessage.activityDataLoadFailed'));
} }
}; };
@ -1103,8 +1127,8 @@ onMounted(async () => {
// //
if (!hasMenuPermission(menuTree.value, 91)) { if (!hasMenuPermission(menuTree.value, 91)) {
ElMessageBox.alert( ElMessageBox.alert(
'您暂无该页面操作权限,请联系管理员',
'权限提示',
t('elmessage.noPermissionText'),
t('elmessage.permissionPrompt'),
{ type: 'error' } { type: 'error' }
).then(() => { ).then(() => {
window.history.back(); window.history.back();

518
src/views/moneyManage/receiveDetail/receiveManage.vue
File diff suppressed because it is too large
View File

442
src/views/moneyManage/receiveDetail/receiveService.vue

@ -5,57 +5,60 @@
<el-card class="card1" style="margin-bottom: 0.5vh; min-height: 110px;"> <el-card class="card1" style="margin-bottom: 0.5vh; min-height: 110px;">
<div class="row"> <div class="row">
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">精网号</el-text>
<el-input v-model="searchData.jwcode" placeholder="请输入精网号" style="width:10vw;"
clearable></el-input>
<el-text style="width: 4vw;">{{ t('common.jwcode') }}</el-text>
<el-input v-model="searchData.jwcode" :placeholder="t('common.jwcodePlaceholder')"
style="width:10vw;" clearable></el-input>
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">客户姓名</el-text>
<el-input v-model="searchData.name" placeholder="请输入客户姓名" style="width:10vw;"
clearable></el-input>
<el-text style="width: 4vw;">{{ t('common.customerName') }}</el-text>
<el-input v-model="searchData.name" :placeholder="t('common.customerNamePlaceholder')"
style="width:10vw;" clearable></el-input>
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">所属地区</el-text>
<el-text style="width: 4vw;">{{ t('common.market') }}</el-text>
<el-cascader style="width: 9vw;" v-model="searchData.markets" :options="market" <el-cascader style="width: 9vw;" v-model="searchData.markets" :options="market"
placeholder="请选择所属地区" clearable @change="handleMarketChange" />
:placeholder="t('common.marketPlaceholder')" clearable @change="handleMarketChange" />
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">订单状态</el-text>
<el-select v-model="searchData.status" placeholder="请选择订单状态" style="width: 10vw;" clearable>
<el-text style="width: 4vw;">{{ t('common.orderStatus') }}</el-text>
<el-select v-model="searchData.status" :placeholder="t('common.orderStatusPlaceholder')"
style="width: 10vw;" clearable>
<el-option v-for="item in statusList" :key="item.name" :label="item.name" <el-option v-for="item in statusList" :key="item.name" :label="item.name"
:value="item.value" /> :value="item.value" />
</el-select> </el-select>
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">支付方式</el-text>
<el-select v-model="searchData.payType" placeholder="请选择支付方式" style="width: 10vw;" clearable>
<el-text style="width: 4vw;">{{ t('common.payModel') }}</el-text>
<el-select v-model="searchData.payType" :placeholder="t('common.payModelPlaceholder')"
style="width: 10vw;" clearable>
<el-option v-for="item in paytypeList" :key="item" :label="item" :value="item" /> <el-option v-for="item in paytypeList" :key="item" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
</div> </div>
<div class="row" style="margin-top: 10px;"> <div class="row" style="margin-top: 10px;">
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">活动名称</el-text>
<el-select v-model="searchData.activity" placeholder="请选择活动方式" style="width: 10vw;" clearable>
<el-text style="width: 4vw;">{{ t('common.activityName') }}</el-text>
<el-select v-model="searchData.activity" :placeholder="t('common.activityNameChoose')"
style="width: 10vw;" clearable>
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName" <el-option v-for="item in activityList" :key="item.id" :label="item.activityName"
:value="item.id" /> :value="item.id" />
</el-select> </el-select>
</div> </div>
<div class="rowItem"> <div class="rowItem">
<el-text style="width: 4vw;">产品名称</el-text>
<el-text style="width: 4vw;">{{ t('common.productName') }}</el-text>
<el-cascader v-model="searchData.goodsName" :options="productList" style="width: 10vw;" <el-cascader v-model="searchData.goodsName" :options="productList" style="width: 10vw;"
clearable /> clearable />
</div> </div>
<div class="rowItem" style="width: 30vw"> <div class="rowItem" style="width: 30vw">
<el-text style="width: 4vw; margin-left: 0.5vw;">付款时间</el-text>
<el-date-picker v-model="getTime" type="datetimerange" range-separator=""
start-placeholder="起始时间" end-placeholder="结束时间" style="width: 22vw; "
@change="handleDatePickerChange" :default-time="defaultTime"
<el-text style="width: 4vw; margin-left: 0.5vw;">{{ t('common.payTime') }}</el-text>
<el-date-picker v-model="getTime" type="datetimerange" :range-separator="t('common.to')"
:start-placeholder="t('common.startTime')" :end-placeholder="t('common.endTime')"
style="width: 22vw; " @change="handleDatePickerChange" :default-time="defaultTime"
:disabled-date="disabledDate" /> :disabled-date="disabledDate" />
</div> </div>
<div class="buttons"> <div class="buttons">
<el-button type="primary" @click="search">查询</el-button>
<el-button type="success" @click="reset">重置</el-button>
<el-button type="primary" @click="search">{{ t('common.search') }}</el-button>
<el-button type="success" @click="reset">{{ t('common.reset') }}</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
@ -66,11 +69,12 @@
<el-card class="card2"> <el-card class="card2">
<div class="btns"> <div class="btns">
<div class="btnAdd"> <div class="btnAdd">
<el-button @click="openAddForm" type="success">添加收款</el-button>
<el-button @click="openAddForm" type="success">{{ t('common.addReceive') }}</el-button>
</div> </div>
<div class="info-tooltip"> <div class="info-tooltip">
<el-popover placement="top" title="数据说明" :width="260" trigger="hover"
content="收款的所有页面:订单记录默认按照付款时间降序排列" popper-class="custom-popover" :show-arrow="false">
<el-popover placement="top" :title="t('cash.receiveCashDataTitle')" :width="260" trigger="hover"
:content="t('cash.receiveCashDataContent')" popper-class="custom-popover"
:show-arrow="false">
<template #reference> <template #reference>
<el-icon class="service-icon"> <el-icon class="service-icon">
<Warning /> <Warning />
@ -84,32 +88,35 @@
<el-table :data="tableData" style="width: 80vw;height:64vh;" @sort-change="handleSortChange" <el-table :data="tableData" style="width: 80vw;height:64vh;" @sort-change="handleSortChange"
:row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }" :row-style="{ height: '60px' }" :header-cell-style="{ textAlign: 'center' }"
:cell-style="{ textAlign: 'center' }"> :cell-style="{ textAlign: 'center' }">
<el-table-column type="index" label="序号" width="100px" fixed="left">
<el-table-column type="index" :label="t('common_list.id')" width="100px" fixed="left">
<template #default="scope"> <template #default="scope">
<span>{{ scope.$index + 1 + (pageInfo.pageNum - 1) * pageInfo.pageSize }}</span> <span>{{ scope.$index + 1 + (pageInfo.pageNum - 1) * pageInfo.pageSize }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="left" prop="jwcode" label="Homily ID" width="110px" /> <el-table-column fixed="left" prop="jwcode" label="Homily ID" width="110px" />
<el-table-column fixed="left" prop="name" label="姓名" width="110px" />
<el-table-column prop="marketName" label="所属地区" width="80px" />
<el-table-column prop="activity" label="活动名称" width="120px" show-overflow-tooltip />
<el-table-column prop="goodsName" label="产品名称" width="120px" />
<el-table-column prop="goodNum" label="产品数量" width="130px">
<el-table-column fixed="left" prop="name" :label="t('common_list.name')" width="110px" />
<el-table-column prop="marketName" :label="t('common_list.market')" width="80px" />
<el-table-column prop="activity" :label="t('common_list.activity')" width="120px"
show-overflow-tooltip />
<el-table-column prop="goodsName" :label="t('common_list.productName')" width="120px" />
<el-table-column prop="goodNum" :label="t('common_list.productNum')" width="130px">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.goodsName == '金币充值'">{{ scope.row.permanentGold }}</span>
<span v-if="scope.row.goodsName == t('common_list.goldRecharge')">{{
scope.row.permanentGold }}</span>
<span v-else>{{ scope.row.goodNum }}</span> <span v-else>{{ scope.row.goodNum }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="paymentCurrency" label="付款币种" width="100px" />
<el-table-column prop="paymentAmount" label="付款金额" width="120px" />
<el-table-column prop="payType" label="支付方式" width="130px" />
<el-table-column prop="payTime" label="付款时间" width="180px" />
<el-table-column prop="voucher" label="转账凭证" width="110px">
<el-table-column prop="paymentCurrency" :label="t('common_list.payCurrency')" width="100px" />
<el-table-column prop="paymentAmount" :label="t('common_list.payAmount')" width="120px" />
<el-table-column prop="payType" :label="t('common_list.payModel')" width="130px" />
<el-table-column prop="payTime" :label="t('common_list.payTime')" width="180px" />
<el-table-column prop="voucher" :label="t('common_list.transferVoucher')" width="110px">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.voucher" <div v-if="scope.row.voucher"
style="display: flex; justify-content: center; align-items: center; cursor: pointer;" style="display: flex; justify-content: center; align-items: center; cursor: pointer;"
@click="previewImage(scope.row.voucher)"> @click="previewImage(scope.row.voucher)">
<img :src="scope.row.voucher" alt="支付凭证" style="width: auto; height: 40px;">
<img :src="scope.row.voucher" :alt="t('common_list.payVoucher')"
style="width: auto; height: 40px;">
</div> </div>
<div v-else <div v-else
style="display: flex; justify-content: center; align-items: center; height: 40px;"> style="display: flex; justify-content: center; align-items: center; height: 40px;">
@ -117,30 +124,36 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="submitterName" label="提交人" width="150px" show-overflow-tooltip />
<el-table-column prop="remark" label="备注" width="150px" show-overflow-tooltip />
<el-table-column prop="submitterName" :label="t('common_list.submitter')" width="150px"
show-overflow-tooltip />
<el-table-column prop="remark" :label="t('common_list.remark')" width="150px"
show-overflow-tooltip />
<!-- 客服专属的订单状态列 --> <!-- 客服专属的订单状态列 -->
<el-table-column fixed="right" prop="status" label="订单状态" width="100px">
<el-table-column fixed="right" prop="status" :label="t('common_list.orderStatus')"
width="100px">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.status == 0">待审核</span>
<span v-else-if="scope.row.status == 1 || scope.row.status == 4">已通过</span>
<span v-else-if="scope.row.status == 2">已驳回</span>
<span v-else-if="scope.row.status == 5">已撤回</span>
<span v-else-if="scope.row.status == 6">退款</span>
<span v-if="scope.row.status == 0">{{ t('common.pendingAudit') }}</span>
<span v-else-if="scope.row.status == 1 || scope.row.status == 4">{{ t('common.passed')
}}</span>
<span v-else-if="scope.row.status == 2">{{ t('common.rejected') }}</span>
<span v-else-if="scope.row.status == 5">{{ t('common.withdrawn') }}</span>
<span v-else-if="scope.row.status == 6">{{ t('common.refunded') }}</span>
<span v-else></span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column fixed="right" label="操作" width="120px">
<el-table-column fixed="right" :label="t('common_list.operation')" width="120px">
<template #default=scope> <template #default=scope>
<el-link v-if="scope.row.status == 4" style="color: #FA5A1E;" <el-link v-if="scope.row.status == 4" style="color: #FA5A1E;"
@click="openConfirm('refund', scope.row)">退款</el-link>
<el-link v-else-if="scope.row.status == 1" style="color: #2741DE;">待填写手续费</el-link>
@click="openConfirm('refund', scope.row)">{{ t('common.refund') }}</el-link>
<el-link v-else-if="scope.row.status == 1" style="color: #2741DE;">{{
t('common.pendingFee') }}</el-link>
<el-link v-else-if="scope.row.status == 5" style="color: #2741DE;" <el-link v-else-if="scope.row.status == 5" style="color: #2741DE;"
@click="openAddForm(scope.row)">编辑</el-link>
@click="openAddForm(scope.row)">{{ t('common.edit') }}</el-link>
<el-link v-else-if="scope.row.status == 0" style="color: #FA5A1E;" <el-link v-else-if="scope.row.status == 0" style="color: #FA5A1E;"
@click="openConfirm('recall', scope.row)">撤回</el-link>
@click="openConfirm('recall', scope.row)">{{ t('common.withdraw') }}</el-link>
<el-link v-else-if="scope.row.status == 2" style="color: #FA5A1E;" <el-link v-else-if="scope.row.status == 2" style="color: #FA5A1E;"
@click="openRejectReason(scope.row.rejectReason)">查看驳回理由</el-link>
@click="openRejectReason(scope.row.rejectReason)">{{ t('common.viewRejectReason')
}}</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -158,32 +171,32 @@
<!-- 撤回确认弹窗 --> <!-- 撤回确认弹窗 -->
<div class="recallDialog" v-show="recallDialog"> <div class="recallDialog" v-show="recallDialog">
<div class="close"> <div class="close">
<button @click="closeRecall" class="Btn">关闭</button>
<button @click="closeRecall" class="Btn">{{ t('common.close') }}</button>
</div> </div>
<div class="text"> <div class="text">
<text class="txt">{{ textContent }}</text> <text class="txt">{{ textContent }}</text>
</div> </div>
<div class="cancle"> <div class="cancle">
<button @click="closeRecall" class="Btn">取消</button>
<button @click="closeRecall" class="Btn">{{ t('common.cancel') }}</button>
</div> </div>
<div class="confirm"> <div class="confirm">
<button @click="handleRecall" class="Btn">确定</button>
<button @click="handleRecall" class="Btn">{{ t('common.confirm') }}</button>
</div> </div>
</div> </div>
<!-- 退款确认弹窗 --> <!-- 退款确认弹窗 -->
<div class="recallDialog" v-show="refundConfirmDialog"> <div class="recallDialog" v-show="refundConfirmDialog">
<div class="close"> <div class="close">
<button @click="closeConfirmRefund" class="Btn">关闭</button>
<button @click="closeConfirmRefund" class="Btn">{{ t('common.close') }}</button>
</div> </div>
<div class="text"> <div class="text">
<text class="txt">{{ textContent }}</text> <text class="txt">{{ textContent }}</text>
</div> </div>
<div class="cancle"> <div class="cancle">
<button @click="closeConfirmRefund" class="Btn">取消</button>
<button @click="closeConfirmRefund" class="Btn">{{ t('common.cancel') }}</button>
</div> </div>
<div class="confirm"> <div class="confirm">
<button @click="openRefundDialog" class="Btn">确定</button>
<button @click="openRefundDialog" class="Btn">{{ t('common.confirm') }}</button>
</div> </div>
</div> </div>
@ -191,70 +204,74 @@
<el-dialog class="adddialog" v-model="addFormisible" width="20vw" :before-close="closeAddForm"> <el-dialog class="adddialog" v-model="addFormisible" width="20vw" :before-close="closeAddForm">
<el-form class="addForm" ref="addFormRef" :rules="addFormRule" :model="addFormData" label-width="4vw" <el-form class="addForm" ref="addFormRef" :rules="addFormRule" :model="addFormData" label-width="4vw"
label-position="left"> label-position="left">
<el-form-item label="精网号" required prop="jwcode">
<el-input v-model="addFormData.jwcode" placeholder="请输入精网号" @blur="jwcodeSeachMarket" />
<el-form-item :label="t('common_add.jwcode')" required prop="jwcode">
<el-input v-model="addFormData.jwcode" :placeholder="t('common_add.jwcodePlaceholder')"
@blur="jwcodeSeachMarket" />
</el-form-item> </el-form-item>
<el-form-item label="客户姓名" required prop="name">
<el-input disabled v-model="addFormData.name" placeholder="请输入客户姓名" />
<el-form-item :label="t('common_add.customerName')" required prop="name">
<el-input disabled v-model="addFormData.name"
:placeholder="t('common_add.customerNamePlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item label="所属地区" prop="market">
<el-input disabled v-model="addFormData.marketName" placeholder="请输入所属地区" />
<el-form-item :label="t('common_add.market')" prop="market">
<el-input disabled v-model="addFormData.marketName"
:placeholder="t('common_add.marketPlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item label="活动名称" required prop="activity">
<el-select v-model="addFormData.activity" placeholder="请选择活动方式" clearable>
<el-form-item :label="t('common_add.activity')" required prop="activity">
<el-select v-model="addFormData.activity" :placeholder="t('common_add.activityPlaceholder')"
clearable>
<el-option v-for="item in activityList" :key="item.id" :label="item.activityName" <el-option v-for="item in activityList" :key="item.id" :label="item.activityName"
:value="item.id" /> :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="产品名称" required @change="ifGold" prop="goodsName">
<el-form-item :label="t('common_add.productName')" required @change="ifGold" prop="goodsName">
<ProductSelect ref="productSelectRef" v-model="addFormData.goodsName"></ProductSelect> <ProductSelect ref="productSelectRef" v-model="addFormData.goodsName"></ProductSelect>
</el-form-item> </el-form-item>
<el-form-item v-show="!isGold" label="产品数量" required>
<el-form-item v-show="!isGold" :label="t('common_add.productNum')" required>
<div style="display: flex;"> <div style="display: flex;">
<el-input style="padding-right: 30px; flex: 3;" v-model="addFormData.goodNum" <el-input style="padding-right: 30px; flex: 3;" v-model="addFormData.goodNum"
placeholder="请输入产品数量" />
:placeholder="t('common_add.productNumPlaceholder')" />
<CurrencySelect v-model="addFormData.numUnit" :items="numUnitList" style="flex: 1.5;" <CurrencySelect v-model="addFormData.numUnit" :items="numUnitList" style="flex: 1.5;"
placeholder="单位" @change="handleCurrencyChange" />
:placeholder="t('common_add.numUnit')" @change="handleCurrencyChange" />
</div> </div>
</el-form-item> </el-form-item>
<div v-show="isGold" style="margin-bottom: 15px; display: flex;"> <div v-show="isGold" style="margin-bottom: 15px; display: flex;">
<div style=" display: flex; "> <div style=" display: flex; ">
<span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">永久金币</span>
<span style="color: #999999; display: flex; white-space: nowrap;align-items: center;">{{
t('common_add.permanentGold') }}</span>
<el-input placeholder="0" <el-input placeholder="0"
style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;" style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
v-model="addFormData.permanentGold" /> v-model="addFormData.permanentGold" />
</div> </div>
<div style="padding-right: 5px; display: flex;"> <div style="padding-right: 5px; display: flex;">
<span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;">免费金币</span>
<span style="color: #999999; display: flex; white-space: nowrap;align-items: center;">{{
t('common_add.freeGold') }}</span>
<el-input placeholder="0" <el-input placeholder="0"
style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;" style="padding-right: 10px; padding-left: 10px; height: 30px; width: 110px;"
v-model="addFormData.freeGold" /> v-model="addFormData.freeGold" />
</div> </div>
</div> </div>
<el-form-item label="付款币种" required prop="paymentCurrency">
<CurrencySelect v-model="addFormData.paymentCurrency" :items="customOptions" placeholder="请选择付款币种"
@change="handleCurrencyChange" />
<el-form-item :label="t('common_add.payCurrency')" required prop="paymentCurrency">
<CurrencySelect v-model="addFormData.paymentCurrency" :items="customOptions"
:placeholder="t('common_add.payCurrencyPlaceholder')" @change="handleCurrencyChange" />
</el-form-item> </el-form-item>
<el-form-item label="付款金额" required prop="paymentAmount">
<el-input v-model="addFormData.paymentAmount" placeholder="请输入付款金额" />
<el-form-item :label="t('common_add.payAmount')" required prop="paymentAmount">
<el-input v-model="addFormData.paymentAmount" :placeholder="t('common_add.payAmountPlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item label="支付方式" required prop="payType">
<CurrencySelect v-model="addFormData.payType" :items="paytypeOptions" placeholder="请选择支付方式"
@change="ifGroup">
<el-form-item :label="t('common_add.payMethod')" required prop="payType">
<CurrencySelect v-model="addFormData.payType" :items="paytypeOptions"
:placeholder="t('common_add.payMethodPlaceholder')" @change="ifGroup">
</CurrencySelect> </CurrencySelect>
</el-form-item> </el-form-item>
<el-form-item label="到账地区" prop="receivedMarket">
<el-form-item :label="t('common_add.receiveArea')" prop="receivedMarket">
<CurrencySelect v-model="addFormData.receivedMarket" :items="MoneyAddressOptions" <CurrencySelect v-model="addFormData.receivedMarket" :items="MoneyAddressOptions"
:disabled="isGroup" placeholder="请选择到账地区">
:disabled="isGroup" :placeholder="t('common_add.receiveAreaPlaceholder')">
</CurrencySelect> </CurrencySelect>
</el-form-item> </el-form-item>
<el-form-item label="付款时间" required prop="payTime">
<el-form-item :label="t('common_add.payTime')" required prop="payTime">
<el-date-picker type="datetime" placement="right" v-model="addFormData.payTime" <el-date-picker type="datetime" placement="right" v-model="addFormData.payTime"
placeholder="请选择付款时间" />
:placeholder="t('common_add.payTimePlaceholder')" />
</el-form-item> </el-form-item>
<el-form-item label="转账凭证" prop="voucher">
<el-form-item :label="t('common_add.transferVoucher')" prop="voucher">
<div class="pic"> <div class="pic">
<el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card" <el-upload ref="uploadRef" class="uploader" :show-file-list="false" list-type="picture-card"
:auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr" :auto-upload="false" :before-upload="beforeUpload" :on-error="handelImgErr"
@ -267,87 +284,93 @@
</el-upload> </el-upload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="addFormData.remark" type="textarea" :rows="4" placeholder="请输入备注" maxlength="100"
show-word-limit />
<el-form-item :label="t('common_add.remark')" prop="remark">
<el-input v-model="addFormData.remark" type="textarea" :rows="4" maxlength="100" show-word-limit />
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button style="background-color: #7E91FF;" @click="closeAddForm">取消</el-button>
<el-button style="background-color: #7E91FF;" @click="closeAddForm">{{ t('common.cancel')
}}</el-button>
<el-button v-if="addOrEdit == 1" style="background-color: #2741DE; margin-left: 2.5vw;" <el-button v-if="addOrEdit == 1" style="background-color: #2741DE; margin-left: 2.5vw;"
type="primary" @click="throttledhandleAddForm" :disabled="ifAddDone">确定</el-button>
type="primary" @click="throttledhandleAddForm" :disabled="ifAddDone">{{ t('common.confirm')
}}</el-button>
<el-button v-else-if="addOrEdit == 2" style="background-color: #2741DE; margin-left: 2.5vw;" <el-button v-else-if="addOrEdit == 2" style="background-color: #2741DE; margin-left: 2.5vw;"
type="primary" @click="throttledhandleEditForm" :disabled="ifReAddDone">编辑</el-button>
type="primary" @click="throttledhandleEditForm" :disabled="ifReAddDone">{{ t('common.edit')
}}</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
<!-- 客服新增退款弹窗 --> <!-- 客服新增退款弹窗 -->
<el-dialog v-model="refundDialog" title="退款" class="refundDialog" overflow draggable style="width: 40vw;"
:before-close="closeRefundForm">
<el-dialog v-model="refundDialog" :title="t('common_add.refund')" class="refundDialog" overflow draggable
style="width: 40vw;" :before-close="closeRefundForm">
<div style="display: flex;"> <div style="display: flex;">
<div class="left"> <div class="left">
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">精网号</el-text>
<el-text style="width:4vw;">{{ t('common_add.jwcode') }}</el-text>
<el-input v-model="refundFormData.jwcode" style="width:10vw;" disabled /> <el-input v-model="refundFormData.jwcode" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">客户姓名</el-text>
<el-text style="width:4vw;">{{ t('common_add.customerName') }}</el-text>
<el-input v-model="refundFormData.name" style="width:10vw;" disabled /> <el-input v-model="refundFormData.name" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">所属地区</el-text>
<el-text style="width:4vw;">{{ t('common_add.market') }}</el-text>
<el-input v-model="refundFormData.marketName" style="width:10vw;" disabled /> <el-input v-model="refundFormData.marketName" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">活动名称</el-text>
<el-text style="width:4vw;">{{ t('common_add.activity') }}</el-text>
<el-input v-model="refundFormData.activity" style="width:10vw;" disabled /> <el-input v-model="refundFormData.activity" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">产品名称</el-text>
<el-text style="width:4vw;">{{ t('common_add.productName') }}</el-text>
<el-input v-model="refundFormData.goodsName" style="width:10vw;" disabled /> <el-input v-model="refundFormData.goodsName" style="width:10vw;" disabled />
</div> </div>
<div v-show="!isRefundGold" class="add-item"> <div v-show="!isRefundGold" class="add-item">
<el-text style="width:4vw;">产品数量</el-text>
<el-text style="width:4vw;">{{ t('common_add.productNum') }}</el-text>
<el-input style="padding-right: 10px; width:6.5vw;" v-model="refundFormData.goodNum" <el-input style="padding-right: 10px; width:6.5vw;" v-model="refundFormData.goodNum"
placeholder="请输入产品数量" disabled />
:placeholder="t('common_add.productNumPlaceholder')" disabled />
<CurrencySelect disabled v-model="refundFormData.numUnit" :items="numUnitList" <CurrencySelect disabled v-model="refundFormData.numUnit" :items="numUnitList"
style="width: 3.5vw;" placeholder="单位" @change="handleCurrencyChange" />
style="width: 3.5vw;" :placeholder="t('common_add.numUnit')"
@change="handleCurrencyChange" />
</div> </div>
<div v-show="isRefundGold" style="margin-bottom: 15px; "> <div v-show="isRefundGold" style="margin-bottom: 15px; ">
<div style=" display: flex; "> <div style=" display: flex; ">
<span <span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;width:4vw;">永久金币</span>
style="color: #999999; display: flex; white-space: nowrap;align-items: center;width:4vw;">{{
t('common_add.permanentGold') }}</span>
<el-input style="padding-right: 10px; height: 30px; width: 110px; margin-bottom: 10px" <el-input style="padding-right: 10px; height: 30px; width: 110px; margin-bottom: 10px"
v-model="refundFormData.permanentGold" disabled /> v-model="refundFormData.permanentGold" disabled />
</div> </div>
<div style="padding-right: 5px; display: flex;"> <div style="padding-right: 5px; display: flex;">
<span <span
style="color: #999999; display: flex; white-space: nowrap;align-items: center;width:4vw;">免费金币</span>
style="color: #999999; display: flex; white-space: nowrap;align-items: center;width:4vw;">{{
t('common_add.freeGold') }}</span>
<el-input style="padding-right: 10px; height: 30px; width: 110px;" <el-input style="padding-right: 10px; height: 30px; width: 110px;"
v-model="refundFormData.freeGold" disabled /> v-model="refundFormData.freeGold" disabled />
</div> </div>
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款币种</el-text>
<el-text style="width:4vw;">{{ t('common_add.payCurrency') }}</el-text>
<el-input v-model="refundFormData.paymentCurrency" style="width:10vw;" disabled /> <el-input v-model="refundFormData.paymentCurrency" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款金额</el-text>
<el-text style="width:4vw;">{{ t('common_add.payAmount') }}</el-text>
<el-input v-model="refundFormData.paymentAmount" style="width:10vw;" disabled /> <el-input v-model="refundFormData.paymentAmount" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">支付方式</el-text>
<el-text style="width:4vw;">{{ t('common_add.payMethod') }}</el-text>
<el-input v-model="refundFormData.payType" style="width:10vw;" disabled /> <el-input v-model="refundFormData.payType" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">付款时间</el-text>
<el-text style="width:4vw;">{{ t('common_add.payTime') }}</el-text>
<el-date-picker v-model="refundFormData.payTime" type="datetime" style="width:10vw;" disabled /> <el-date-picker v-model="refundFormData.payTime" type="datetime" style="width:10vw;" disabled />
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;" size="small">转账凭证</el-text>
<el-form-item :rules="{ required: true, message: '请上传图片', trigger: 'change' }">
<el-text style="width:4vw;" size="small">{{ t('common_add.transferVoucher') }}</el-text>
<el-form-item
:rules="{ required: true, message: t('common_add.uploadPhoto'), trigger: 'change' }">
<el-upload ref="uploadRef" :auto-upload="false" list-type="picture-card" <el-upload ref="uploadRef" :auto-upload="false" list-type="picture-card"
:show-file-list="false"> :show-file-list="false">
<template #default> <template #default>
@ -361,51 +384,51 @@
</el-form-item> </el-form-item>
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">备注</el-text>
<el-text style="width:4vw;">{{ t('common_add.remark') }}</el-text>
<el-input v-model="refundFormData.remark" style="width:10vw;" :rows="2" type="textarea" <el-input v-model="refundFormData.remark" style="width:10vw;" :rows="2" type="textarea"
maxLength="100" disabled show-word-limit /> maxLength="100" disabled show-word-limit />
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">退款模式</el-text>
<el-text style="width:4vw;">{{ t('common_add.refundModel') }}</el-text>
<el-radio-group v-model="refundFormData.refundModel"> <el-radio-group v-model="refundFormData.refundModel">
<el-radio value="0">全部退款</el-radio>
<el-radio value="1">部分退款</el-radio>
<el-radio value="0">{{ t('common_add.refundModelAll') }}</el-radio>
<el-radio value="1">{{ t('common_add.refundModelPart') }}</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="add-item" <div class="add-item"
v-show="refundFormData.goodsName === '金币充值' && refundFormData.refundModel === '1'">
<el-text style="width:4vw;">永久金币</el-text>
v-show="refundFormData.goodsName === t('cash.coinRecharge') && refundFormData.refundModel === '1'">
<el-text style="width:4vw;">{{ t('common_add.permanentGold') }}</el-text>
<el-input v-model="refundFormData.partRefundGold" style="width:5vw;" />&nbsp;&nbsp; <el-input v-model="refundFormData.partRefundGold" style="width:5vw;" />&nbsp;&nbsp;
</div> </div>
<div class="add-item" <div class="add-item"
v-show="refundFormData.goodsName === '金币充值' && refundFormData.refundModel === '1'">
<el-text style="width:4vw;">免费金币</el-text>
v-show="refundFormData.goodsName === t('cash.coinRecharge') && refundFormData.refundModel === '1'">
<el-text style="width:4vw;">{{ t('common_add.freeGold') }}</el-text>
<el-input v-model="refundFormData.partRefundFree" style="width:5vw;" />&nbsp;&nbsp; <el-input v-model="refundFormData.partRefundFree" style="width:5vw;" />&nbsp;&nbsp;
</div> </div>
<div class="add-item"> <div class="add-item">
<el-text style="width:4vw;">退款理由</el-text>
<el-text style="width:4vw;">{{ t('common_add.refundReason') }}</el-text>
<el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150" <el-input v-model="refundFormData.refundReason" style="width:10vw;" :rows="5" maxlength="150"
show-word-limit type="textarea" /> show-word-limit type="textarea" />
</div> </div>
<div>ps:请在退款理由表明用户的退款需求</div>
<div>{{ t('common_add.tip') }}</div>
<div style="display:flex;justify-content: center;margin-top: 5vh;"> <div style="display:flex;justify-content: center;margin-top: 5vh;">
<el-button type="default" @click="closeRefundForm">取消</el-button>
<el-button type="primary" @click="throttledsubmitRefund">提交</el-button>
<el-button type="default" @click="closeRefundForm">{{ t('common.cancel') }}</el-button>
<el-button type="primary" @click="throttledsubmitRefund">{{ t('common.submit') }}</el-button>
</div> </div>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
<!-- 查看驳回理由 --> <!-- 查看驳回理由 -->
<el-dialog title="驳回理由" v-model="rejectReasonVisible" width="50%" top="30vh"
<el-dialog :title="t('common_add.rejectReason')" v-model="rejectReasonVisible" width="50%" top="30vh"
style="min-width: 200px; max-width: 500px;" :before-close="closeRejectForm"> style="min-width: 200px; max-width: 500px;" :before-close="closeRejectForm">
<div class="reject-reason-box"> <div class="reject-reason-box">
{{ rejectReason }} {{ rejectReason }}
</div> </div>
<div class="rejectBtn"> <div class="rejectBtn">
<el-button type="primary" @click="closeRejectForm">确定</el-button>
<el-button type="primary" @click="closeRejectForm">{{ t('common.confirm') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -429,6 +452,10 @@ import { isNumber } from 'lodash'
import { addFormRule } from './utils/recriveFormRules.js' import { addFormRule } from './utils/recriveFormRules.js'
import { productList, MarketNameForId, CurrencyForId, marketList, statusList } from './utils/staticData.js' import { productList, MarketNameForId, CurrencyForId, marketList, statusList } from './utils/staticData.js'
//
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
// ===================== ===================== // ===================== =====================
const adminStore = useAdminStore(); const adminStore = useAdminStore();
const { menuTree } = storeToRefs(adminStore); const { menuTree } = storeToRefs(adminStore);
@ -436,7 +463,7 @@ const adminData = ref({}) // 管理员信息
const tableData = ref([]) // const tableData = ref([]) //
const total = ref(0) // const total = ref(0) //
const pageInfo = ref({ pageSize: 10, pageNum: 1 }) // const pageInfo = ref({ pageSize: 10, pageNum: 1 }) //
const numUnitList = ref(['年', '月'])
const numUnitList = ref([t('cash.year'), t('cash.month')])
// //
const market = ref([]) const market = ref([])
@ -522,12 +549,12 @@ const getlist = async () => {
if (searchData.value.jwcode) { if (searchData.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(searchData.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(searchData.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
// //
if (searchData.value.jwcode.length > 8) { if (searchData.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
} }
@ -558,7 +585,7 @@ const getlist = async () => {
tableData.value = result.data.list tableData.value = result.data.list
total.value = result.data.total total.value = result.data.total
} else { } else {
ElMessage.error('数据异常')
ElMessage.error(t('elmessage.dataException'))
console.log(result.msg); console.log(result.msg);
} }
} catch (error) { } catch (error) {
@ -587,24 +614,37 @@ const uploadRef = ref(null) // 上传组件引用
// //
const ifGold = () => { const ifGold = () => {
if (addFormData.value.goodsName === '金币充值') {
if (addFormData.value.goodsName === t('cash.coinRecharge')) {
isGold.value = true isGold.value = true
addFormData.value.goodNum = 0 addFormData.value.goodNum = 0
} else { } else {
isGold.value = false isGold.value = false
numUnitList.value = ['个', '年', '月']
const selectItems = ["AI机构追踪", "AI机构出击", "AI机构资金", "AI机构活跃度", "超级机构透视", "超级机构伏击", "超级机构猎杀", "超级机构脉搏", "超级机构罗盘", 'HC信息费', 'HC信息费', 'AI机构探测神器', '超级机构探测神器']
numUnitList.value = [t('cash.unit'), t('cash.year'), t('cash.month')]
const selectItems = ref([
t('cash.aiService.aiTracking'),
t('cash.aiService.aiAttack'),
t('cash.aiService.aiFunds'),
t('cash.aiService.aiActivity'),
t('cash.aiService.superPerspective'),
t('cash.aiService.superAmbush'),
t('cash.aiService.superHunting'),
t('cash.aiService.superPulse'),
t('cash.aiService.superCompass'),
t('cash.aiService.hcInfoFee'),
t('cash.aiService.aiDetectionTool'),
t('cash.aiService.superDetectionTool')
])
if (selectItems.includes(addFormData.value.goodsName)) { if (selectItems.includes(addFormData.value.goodsName)) {
if (addOrEdit.value == 1) { if (addOrEdit.value == 1) {
addFormData.value.numUnit = '' addFormData.value.numUnit = ''
} }
numUnitList.value = ['年', '月']
} else if (addFormData.value.goodsName == '静态信息费') {
addFormData.value.numUnit = '年'
numUnitList.value = ['年']
numUnitList.value = [t('cash.year'), t('cash.month')]
} else if (addFormData.value.goodsName == t('cash.staticInfoFee')) {
addFormData.value.numUnit = t('cash.year')
numUnitList.value = [t('cash.year')]
} else { } else {
addFormData.value.numUnit = '个'
numUnitList.value = ['个']
addFormData.value.numUnit = t('cash.unit')
numUnitList.value = [t('cash.unit')]
} }
} }
} }
@ -612,18 +652,18 @@ const ifGold = () => {
// //
const isGroup = ref(false) const isGroup = ref(false)
const ifGroup = () => { const ifGroup = () => {
if (addFormData.value.payType === 'Stripe-链接收款' || addFormData.value.payType === 'PaymentAsia-链接收款') {
if (addFormData.value.payType === t('cash.payMethods.stripe') || addFormData.value.payType === t('cash.payMethods.paymentAsia')) {
isGroup.value = true isGroup.value = true
addFormData.value.receivedMarket = '香港'
} else if (addFormData.value.payType === 'Ipay88-链接收款') {
addFormData.value.receivedMarket = t('cash.markets.HongKong')
} else if (addFormData.value.payType === t('cash.payMethods.ipay88')) {
isGroup.value = true isGroup.value = true
addFormData.value.receivedMarket = '马来西亚'
} else if (addFormData.value.payType === 'E-Transfer') {
addFormData.value.receivedMarket = t('cash.markets.Malaysia')
} else if (addFormData.value.payType === t('cash.payMethods.transfer')) {
isGroup.value = true isGroup.value = true
addFormData.value.receivedMarket = '加拿大'
} else if (addFormData.value.payType === 'Grabpay' || addFormData.value.payType === 'Nets' || addFormData.value.payType === 'Paypal') {
addFormData.value.receivedMarket = t('cash.markets.Canada')
} else if (addFormData.value.payType === t('cash.payMethods.grabpay') || addFormData.value.payType === t('cash.payMethods.nets') || addFormData.value.payType === t('cash.payMethods.paypal')) {
isGroup.value = true isGroup.value = true
addFormData.value.receivedMarket = '新加坡'
addFormData.value.receivedMarket = t('cash.markets.Singapore')
} else { } else {
isGroup.value = false isGroup.value = false
} }
@ -637,12 +677,12 @@ const jwcodeSeachMarket = async () => {
data: addFormData.value.jwcode data: addFormData.value.jwcode
}) })
if (result.code == 200) { if (result.code == 200) {
ElMessage.success('客户信息查询成功')
ElMessage.success(t('elmessage.customerSuccess'))
addFormData.value.market = result.data.market addFormData.value.market = result.data.market
addFormData.value.marketName = result.data.marketName addFormData.value.marketName = result.data.marketName
addFormData.value.name = result.data.name addFormData.value.name = result.data.name
} else { } else {
ElMessage.error('客户不存在')
ElMessage.error(t('elmessage.customerNotExist'))
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@ -678,7 +718,7 @@ const closeAddForm = () => {
} }
const testGold = () => { const testGold = () => {
// //
if (addFormData.value.goodsName == '金币充值') {
if (addFormData.value.goodsName == t('cash.coinRecharge')) {
if (addFormData.value.permanentGold == null) { if (addFormData.value.permanentGold == null) {
addFormData.value.permanentGold = 0 addFormData.value.permanentGold = 0
} }
@ -690,13 +730,13 @@ const testGold = () => {
// 0-9999990 // 0-9999990
const reg = /^[0-9]{1,6}$/; const reg = /^[0-9]{1,6}$/;
if (!reg.test(permanentGold) || permanentGold < 0) { if (!reg.test(permanentGold) || permanentGold < 0) {
return { valid: false, message: '请检查永久金币格式' };
return { valid: false, message: t('elmessage.checkPermanentFormat') };
} }
if (!reg.test(freeNum) || freeNum < 0) { if (!reg.test(freeNum) || freeNum < 0) {
return { valid: false, message: '请检查免费金币格式' };
return { valid: false, message: t('elmessage.checkFreeFormat') };
} }
if (permanentGold == 0 && freeNum == 0) { if (permanentGold == 0 && freeNum == 0) {
return { valid: false, message: '永久金币或免费金币不能同为0' };
return { valid: false, message: t('elmessage.permanentAndFreeNoZero') };
} }
} }
return { valid: true }; return { valid: true };
@ -712,18 +752,18 @@ const handleAddForm = async () => {
// //
if (!isGold.value) { if (!isGold.value) {
if (!addFormData.value.goodNum) { if (!addFormData.value.goodNum) {
ElMessage.error('请输入产品数量');
ElMessage.error(t('elmessage.checkProductNum'));
return; return;
} }
const positiveIntReg = /^[1-9]\d*$/; const positiveIntReg = /^[1-9]\d*$/;
if (!positiveIntReg.test(addFormData.value.goodNum)) { if (!positiveIntReg.test(addFormData.value.goodNum)) {
ElMessage.error('产品数量必须为正整数');
ElMessage.error(t('elmessage.productNumError'));
return; return;
} }
} }
if (addFormData.value.numUnit == '') { if (addFormData.value.numUnit == '') {
ElMessage.error('请选择产品数量单位');
ElMessage.error(t('elmessage.checkNumUnit'));
return; return;
} }
// //
@ -746,14 +786,14 @@ const handleAddForm = async () => {
} }
}) })
if (result.code == 200) { if (result.code == 200) {
ElMessage.success('添加成功')
ElMessage.success(t('elmessage.addSuccess'))
getlist() getlist()
closeAddForm() closeAddForm()
} }
ifAddDone.value = false ifAddDone.value = false
} catch (error) { } catch (error) {
console.log('新增报错:', error); console.log('新增报错:', error);
ElMessage.error('请完善表单信息后提交');
ElMessage.error(t('elmessage.checkFormInfoSubmit'));
ifAddDone.value = false ifAddDone.value = false
} }
} }
@ -774,17 +814,17 @@ const handleEditForm = async () => {
// //
if (!isGold.value) { if (!isGold.value) {
if (!addFormData.value.goodNum) { if (!addFormData.value.goodNum) {
ElMessage.error('请输入产品数量');
ElMessage.error(t('elmessage.checkProductNum'));
return; return;
} }
const positiveIntReg = /^[1-9]\d*$/; const positiveIntReg = /^[1-9]\d*$/;
if (!positiveIntReg.test(addFormData.value.goodNum)) { if (!positiveIntReg.test(addFormData.value.goodNum)) {
ElMessage.error('产品数量必须为正整数');
ElMessage.error(t('elmessage.productNumError'));
return; return;
} }
} }
if (addFormData.value.numUnit == '') { if (addFormData.value.numUnit == '') {
ElMessage.error('请选择产品数量单位');
ElMessage.error(t('elmessage.checkNumUnit'));
return; return;
} }
// //
@ -806,7 +846,7 @@ const handleEditForm = async () => {
} }
}) })
if (result.code == 200) { if (result.code == 200) {
ElMessage.success('编辑成功')
ElMessage.success(t('elmessage.editSuccess'))
getlist() getlist()
closeAddForm() closeAddForm()
} }
@ -818,9 +858,38 @@ const handleEditForm = async () => {
} }
// //
const customOptions = ref(['美元(USD)', '港币(HKD)', '新币(SGD)', '马币(MYR)', '泰铢(THB)', '加币(CAD)', '越南盾(VDN)', '韩元(KRW)'])
const paytypeOptions = ref(["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "Grabpay", "Nets", "E-Transfer", "Paypal", "银行转账", "刷卡", "现金", "支票"])
const MoneyAddressOptions = ref(['马来西亚', '香港', '新加坡', '泰国', '越南HCM', '加拿大'])
const customOptions = ref([
t('cash.currency.usd'), // (USD)
t('cash.currency.hkd'), // (HKD)
t('cash.currency.sgd'), // (SGD)
t('cash.currency.myr'), // (MYR)
t('cash.currency.thb'), // (THB)
t('cash.currency.cad'), // (CAD)
t('cash.currency.vnd'), // (VDN)
t('cash.currency.krw') // (KRW)
])
// - 使cash.payMethods
const paytypeOptions = ref([
t('cash.payMethods.stripe'), // Stripe-
t('cash.payMethods.paymentAsia'), // PaymentAsia-
t('cash.payMethods.ipay88'), // Ipay88-
t('cash.payMethods.grabpay'), // Grabpay
t('cash.payMethods.nets'), // Nets
t('cash.payMethods.transfer'), // E-Transfer
t('cash.payMethods.paypal'), // PayPal
t('cash.payMethods.bankTransfer'),//
t('cash.payMethods.card'), //
t('cash.payMethods.cash'), //
t('cash.payMethods.check') //
])
const MoneyAddressOptions = ref([
t('cash.markets.Malaysia'), // 西
t('cash.markets.HongKong'), //
t('cash.markets.Singapore'), //
t('cash.markets.Thailand'), //
t('cash.markets.VietnamHCM'), // HCM
t('cash.markets.Canada') //
])
const handleCurrencyChange = (option) => { const handleCurrencyChange = (option) => {
console.log('选中的币种:', option); console.log('选中的币种:', option);
}; };
@ -830,20 +899,20 @@ const handleImgSuccess = (response) => {
try { try {
addFormData.value.voucher = response.data.url addFormData.value.voucher = response.data.url
} catch (error) { } catch (error) {
ElMessage.error(response.msg || '图片上传失败')
ElMessage.error(response.msg || t('elmessage.uploadFailed'))
} }
} }
const handelImgErr = (err) => { const handelImgErr = (err) => {
console.log(err); console.log(err);
addFormData.value.imageUrl = null addFormData.value.imageUrl = null
ElMessage.error("图片上传失败")
ElMessage.error(t('elmessage.uploadFailed'))
} }
const beforeUpload = (rawFile) => { const beforeUpload = (rawFile) => {
if (rawFile.type !== 'image/jpeg' && rawFile.type !== 'image/png') { if (rawFile.type !== 'image/jpeg' && rawFile.type !== 'image/png') {
ElMessage.error('图片必须是jpg或png类型!')
ElMessage.error(t('elmessage.photoFormatError'))
return false return false
} else if (rawFile.size / 1024 / 1024 > 2) { } else if (rawFile.size / 1024 / 1024 > 2) {
ElMessage.error('图片大小不能超过 2MB!')
ElMessage.error(t('elmessage.limitImageSize2MB'))
return false return false
} }
return true return true
@ -863,14 +932,14 @@ const customUpload = async (options) => {
}) })
if (response.code === 200 && response.data) { if (response.code === 200 && response.data) {
handleImgSuccess(response, options.file) handleImgSuccess(response, options.file)
ElMessage.success('上传成功')
ElMessage.success(t('elmessage.uploadSuccess'))
} else { } else {
options.onError(response) options.onError(response)
ElMessage.error(response.msg || '上传失败')
ElMessage.error(response.msg || t('elmessage.uploadFailed'))
} }
} catch (error) { } catch (error) {
console.error('上传错误:', error) console.error('上传错误:', error)
ElMessage.error(`上传失败: ${error.msg || error.message || '网络异常'}`)
ElMessage.error(t('elmessage.uploadFailed') + `: ${error.msg || error.message || t('elmessage.inNetworkError')}`)
} }
} }
@ -913,7 +982,7 @@ const isRefundGold = ref(false) // 退款产品是否为金币
// 退 // 退
const ifRefundGold = () => { const ifRefundGold = () => {
if (refundFormData.value.goodsName === '金币充值') {
if (refundFormData.value.goodsName === t('cash.coinRecharge')) {
isRefundGold.value = true isRefundGold.value = true
refundFormData.value.goodNum = 0 refundFormData.value.goodNum = 0
} else { } else {
@ -924,12 +993,12 @@ const ifRefundGold = () => {
// /退 // /退
const openConfirm = (val, row) => { const openConfirm = (val, row) => {
if (val === 'refund') { if (val === 'refund') {
textContent.value = '将要对该订单退款!'
textContent.value = t('common.willRefundOrder')
refundFormData.value = { ...row } refundFormData.value = { ...row }
ifRefundGold() ifRefundGold()
refundConfirmDialog.value = true refundConfirmDialog.value = true
} else if (val === 'recall') { } else if (val === 'recall') {
textContent.value = '将要撤回该信息!'
textContent.value = t('common.willRecallOrder')
recallDialog.value = true recallDialog.value = true
RecallNum.value = row.orderCode RecallNum.value = row.orderCode
} }
@ -950,7 +1019,7 @@ const handleRecall = async () => {
data: { orderCode: RecallNum.value } data: { orderCode: RecallNum.value }
}) })
if (result.code == 200) { if (result.code == 200) {
ElMessage.success('撤回成功')
ElMessage.success(t('common.withdrawSuccess'))
getlist() getlist()
closeRecall() closeRecall()
} }
@ -985,7 +1054,7 @@ const submitRefund = async () => {
refundFormData.value.partRefundFree = refundFormData.value.freeGold refundFormData.value.partRefundFree = refundFormData.value.freeGold
} else if (refundFormData.value.refundModel == 1) { } else if (refundFormData.value.refundModel == 1) {
if (refundFormData.value.partRefundGold > refundFormData.value.permanentGold || refundFormData.value.partRefundFree > refundFormData.value.freeGold) { if (refundFormData.value.partRefundGold > refundFormData.value.permanentGold || refundFormData.value.partRefundFree > refundFormData.value.freeGold) {
ElMessage.error('退款金额不能大于订单金额')
ElMessage.error(t('elmessage.limitRefundAmount'))
return return
} }
} }
@ -994,11 +1063,11 @@ const submitRefund = async () => {
if (refundFormData.value.jwcode) { if (refundFormData.value.jwcode) {
const isPositiveInteger = /^[1-9]\d*$/.test(refundFormData.value.jwcode); const isPositiveInteger = /^[1-9]\d*$/.test(refundFormData.value.jwcode);
if (!isPositiveInteger) { if (!isPositiveInteger) {
ElMessage.error('请输入正确的精网号')
ElMessage.error(t('elmessage.checkJwcodeFormat'))
return; return;
} }
if (refundFormData.value.jwcode.length > 8) { if (refundFormData.value.jwcode.length > 8) {
ElMessage.error('精网号长度不能超过8位')
ElMessage.error(t('elmessage.limitJwcodeLength'))
return; return;
} }
} }
@ -1023,7 +1092,7 @@ const submitRefund = async () => {
} }
}) })
if (result.code == 200) { if (result.code == 200) {
ElMessage.success('新增退款成功')
ElMessage.success(t('elmessage.addRefundSuccess'))
getlist() getlist()
closeRefundForm() closeRefundForm()
} else { } else {
@ -1049,7 +1118,7 @@ const getActivitys = async () => {
if (result.code == 200) { if (result.code == 200) {
activityList.value = result.data activityList.value = result.data
} else { } else {
ElMessage.error('活动列表获取失败')
ElMessage.error(t('elmessage.activityLoadFailed'))
} }
} catch (error) { } catch (error) {
console.log('活动列表请求失败', error) console.log('活动列表请求失败', error)
@ -1067,7 +1136,20 @@ const getAdminData = async () => {
} }
// //
const paytypeList = ["Stripe-链接收款", "PaymentAsia-链接收款", "Ipay88-链接收款", "银行转账", "刷卡", "现金", "支票", "Grabpay", "Nets", "E-Transfer", "Paypal"]
// - 使cash.payMethods
const paytypeList = ref([
t('cash.payMethods.stripe'), // Stripe-
t('cash.payMethods.paymentAsia'), // PaymentAsia-
t('cash.payMethods.ipay88'), // Ipay88-
t('cash.payMethods.bankTransfer'),//
t('cash.payMethods.card'), //
t('cash.payMethods.cash'), //
t('cash.payMethods.check'), //
t('cash.payMethods.grabpay'), // Grabpay
t('cash.payMethods.nets'), // Nets
t('cash.payMethods.transfer'), // E-Transfer
t('cash.payMethods.paypal') // PayPal
])
const getMarket = async function () { const getMarket = async function () {
try { try {
const result = await API({ const result = await API({

2
src/views/refund/gold/addCoinRefund.vue

@ -64,7 +64,7 @@ const cancel = function () {
const getRefund = async function () { const getRefund = async function () {
if (!addRefund.value.jwcode) { if (!addRefund.value.jwcode) {
ElMessage.error(t('elmessage.checkJwCode'))
ElMessage.error(t('elmessage.checkJwcode'))
return return
} }
addRefund.value.orderCode = '' addRefund.value.orderCode = ''

Loading…
Cancel
Save