Browse Source

Merge branch 'milestone-20251215-多语言二期2' of http://39.101.133.168:8807/huangqizhen/gold-vue into milestone-20251215-多语言二期2

lihuilin/feature-20260121173255-多语言二期2合并
ZhangYong 1 month ago
parent
commit
fb0cdd01c2
  1. 6
      src/components/locales/lang/en.js
  2. 6
      src/components/locales/lang/zh-CN.js
  3. 7
      src/utils/getMessage.js
  4. 6
      src/views/channelManage/fans/fans.vue
  5. 2
      src/views/channelManage/reward/reward.vue
  6. 4
      src/views/consume/bean/addBeanConsume.vue
  7. 5
      src/views/moneyManage/executor/executor.vue
  8. 2
      src/views/moneyManage/receiveDetail/receiveFinance.vue
  9. 2
      src/views/moneyManage/receiveDetail/receiveHead.vue
  10. 2
      src/views/moneyManage/receiveDetail/receiveManage.vue
  11. 2
      src/views/moneyManage/refundDetail/refundCharge.vue
  12. 44
      src/views/moneyManage/refundDetail/refundService.vue
  13. 4
      src/views/recharge/bean/addBeanRecharge.vue
  14. 4
      src/views/recharge/gold/addCoinRecharge.vue
  15. 4
      src/views/refund/gold/addCoinRefund.vue

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

@ -403,6 +403,7 @@ export default {
refundConfirmTitle: "Refund Confirmation", refundConfirmTitle: "Refund Confirmation",
refundConfirmContent: "Are you sure you want to refund order {orderNo}?", refundConfirmContent: "Are you sure you want to refund order {orderNo}?",
exportError: "Export failed", exportError: "Export failed",
currencyMismatch: "Payment currency and received currency mismatch",
}, },
// Common List Fields // Common List Fields
@ -1043,6 +1044,11 @@ export default {
}, },
submitting: "Changing..." submitting: "Changing..."
}, },
difftime: {
minuteAgo: " mins ago",
hourAgo: " hours ago",
yesterday: "yesterday",
}
}, },
// Cash Management // Cash Management

6
src/components/locales/lang/zh-CN.js

@ -403,6 +403,7 @@ export default {
refundConfirmTitle: "退款确认", refundConfirmTitle: "退款确认",
refundConfirmContent: "确定要对订单 {orderNo} 进行退款吗?", refundConfirmContent: "确定要对订单 {orderNo} 进行退款吗?",
exportError: "导出失败", exportError: "导出失败",
currencyMismatch: "付款币种与到账币种不一致",
}, },
// 通用列表字段组 // 通用列表字段组
@ -1054,6 +1055,11 @@ export default {
}, },
submitting: "修改中..." submitting: "修改中..."
}, },
difftime: {
minuteAgo: "分钟前",
hourAgo: "小时前",
yesterday: "昨天",
}
}, },
// 现金管理 // 现金管理

7
src/utils/getMessage.js

@ -20,12 +20,13 @@ function formatTime(timeStr) {
const diffHours = Math.floor(diffMins / 60); const diffHours = Math.floor(diffMins / 60);
const diffDays = Math.floor(diffHours / 24); const diffDays = Math.floor(diffHours / 24);
const t = i18n.global.t
if (diffHours < 1) { if (diffHours < 1) {
return `${diffMins}分钟前`
return `${diffMins}${t('home.difftime.minuteAgo')}`
} else if (diffDays < 1) { } else if (diffDays < 1) {
return `${diffHours}小时前`
return `${diffHours}${t('home.difftime.hourAgo')}`
} else if (diffDays === 1) { } else if (diffDays === 1) {
return '昨天'
return t('home.difftime.yesterday')
} else { } else {
return `${msgTime.getFullYear()}-${String(msgTime.getMonth() + 1).padStart(2, '0')}-${String(msgTime.getDate()).padStart(2, '0')}` return `${msgTime.getFullYear()}-${String(msgTime.getMonth() + 1).padStart(2, '0')}-${String(msgTime.getDate()).padStart(2, '0')}`
} }

6
src/views/channelManage/fans/fans.vue

@ -86,7 +86,7 @@ const getRoleChannel = async function () {
} }
const result = await request({ const result = await request({
url: '/beanConsume/getRoleChannel', url: '/beanConsume/getRoleChannel',
data: { roleId: adminData.value.roleId }
data: adminData.value.roleId
}) })
const data = result.data ?? result const data = result.data ?? result
const channelName = typeof data === 'string' ? data : data.channelName const channelName = typeof data === 'string' ? data : data.channelName
@ -521,7 +521,7 @@ const getTagText = (state) => {
<el-card class="card1" style="margin-bottom: 0.5vh;"> <el-card class="card1" style="margin-bottom: 0.5vh;">
<el-col style="margin-bottom: 1vh"> <el-col style="margin-bottom: 1vh">
<div class="select"> <div class="select">
<div class="selectRow" v-if="showChannelFilter">
<div class="selectRow">
<el-text class="text">{{ t('common.jwcode') }}</el-text> <el-text class="text">{{ t('common.jwcode') }}</el-text>
<el-input class="selectContent" v-model="beanConsumeFan.jwcode" :placeholder="t('common.jwcodePlaceholder')" clearable /> <el-input class="selectContent" v-model="beanConsumeFan.jwcode" :placeholder="t('common.jwcodePlaceholder')" clearable />
</div> </div>
@ -531,7 +531,7 @@ const getTagText = (state) => {
<el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" /> <el-option v-for="(item, index) in dept" :key="index" :label="item" :value="item" />
</el-select> </el-select>
</div> </div>
<div class="selectRow">
<div class="selectRow" v-if="showChannelFilter">
<el-text class="text">{{ t('common.channel') }}</el-text> <el-text class="text">{{ t('common.channel') }}</el-text>
<el-select class="selectContent" v-model="beanConsumeFan.channel" :placeholder="t('common.channelPlaceholder')" clearable filterable> <el-select class="selectContent" v-model="beanConsumeFan.channel" :placeholder="t('common.channelPlaceholder')" clearable filterable>
<el-option v-for="(item, index) in channels" :key="index" :label="item" :value="item" /> <el-option v-for="(item, index) in channels" :key="index" :label="item" :value="item" />

2
src/views/channelManage/reward/reward.vue

@ -111,7 +111,7 @@ const getRoleChannel = async function () {
} }
const result = await request({ const result = await request({
url: '/beanConsume/getRoleChannel', url: '/beanConsume/getRoleChannel',
data: { roleId: adminData.value.roleId }
data: adminData.value.roleId
}) })
const data = result.data ?? result const data = result.data ?? result
const channelName = typeof data === 'string' ? data : data.channelName const channelName = typeof data === 'string' ? data : data.channelName

4
src/views/consume/bean/addBeanConsume.vue

@ -214,11 +214,7 @@ const throttledHandleConsumeFormt = _.throttle(handleConsumeForm, 5000, {
<el-form :model="consumeForm" :rules="rules" ref="formRef" label-width="auto" style="max-width: 600px" <el-form :model="consumeForm" :rules="rules" ref="formRef" label-width="auto" style="max-width: 600px"
class="add-form"> class="add-form">
<el-form-item prop="jwcode" :label="t('common_add.jwcode')" label-position="left"> <el-form-item prop="jwcode" :label="t('common_add.jwcode')" label-position="left">
<<<<<<< HEAD
<el-input v-model="consumeForm.jwcode" style="width: 220px" @keyup.enter="getUser(consumeForm.jwcode)"/> <el-input v-model="consumeForm.jwcode" style="width: 220px" @keyup.enter="getUser(consumeForm.jwcode)"/>
=======
<el-input v-model="consumeForm.jwcode" style="width: 220px" @keyup.enter="getUser(consumeForm.jwcode)" />
>>>>>>> lihuilin/feature-20260121173255-多语言二期2合并
<el-button type="primary" @click="getUser(consumeForm.jwcode)" style="margin-left: 20px">{{ t('common.search') }}</el-button> <el-button type="primary" @click="getUser(consumeForm.jwcode)" style="margin-left: 20px">{{ t('common.search') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item prop="permanentBean" :label="t('common_add.permanentBean')" label-position="left"> <el-form-item prop="permanentBean" :label="t('common_add.permanentBean')" label-position="left">

5
src/views/moneyManage/executor/executor.vue

@ -155,13 +155,12 @@
<el-option :label="t('common_add.refundModelPart')" :value="1"></el-option> <el-option :label="t('common_add.refundModelPart')" :value="1"></el-option>
</el-select> </el-select>
</div> </div>
<!-- TODO多语言 -->
<div class="dialog-item" v-if="editRow.goodsName === '金币充值'"> <div class="dialog-item" v-if="editRow.goodsName === '金币充值'">
<el-text style="width:4vw;">永久金币</el-text>
<el-text style="width:4vw;">{{ t('common_add.permanentGold') }}</el-text>
<el-input v-model="editRow.permanentGold" style="width:10vw;" disabled /> <el-input v-model="editRow.permanentGold" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item" v-if="editRow.goodsName === '金币充值'"> <div class="dialog-item" v-if="editRow.goodsName === '金币充值'">
<el-text style="width:4vw;">免费金币</el-text>
<el-text style="width:4vw;">{{ t('common_add.freeGold') }}</el-text>
<el-input v-model="editRow.freeGold" style="width:10vw;" disabled /> <el-input v-model="editRow.freeGold" style="width:10vw;" disabled />
</div> </div>
<div class="dialog-item"> <div class="dialog-item">

2
src/views/moneyManage/receiveDetail/receiveFinance.vue

@ -1215,7 +1215,7 @@ const submitEditForm = async () => {
await editFormRef.value.validate(); await editFormRef.value.validate();
if (editFormData.value.paymentCurrency != editFormData.value.receivedCurrency) { if (editFormData.value.paymentCurrency != editFormData.value.receivedCurrency) {
ElMessage.error('付款币种与到账币种不一致')
ElMessage.error(t('elmessage.currencyMismatch'))
return return
} }

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

@ -1033,7 +1033,7 @@ const submitEditForm = async () => {
await editFormRef.value.validate(); await editFormRef.value.validate();
if (editFormData.value.paymentCurrency != editFormData.value.receivedCurrency) { if (editFormData.value.paymentCurrency != editFormData.value.receivedCurrency) {
ElMessage.error('付款币种与到账币种不一致')
ElMessage.error(t('elmessage.currencyMismatch'))
return return
} }

2
src/views/moneyManage/receiveDetail/receiveManage.vue

@ -1215,7 +1215,7 @@ const submitEditForm = async () => {
await editFormRef.value.validate(); await editFormRef.value.validate();
if (editFormData.value.paymentCurrency != editFormData.value.receivedCurrency) { if (editFormData.value.paymentCurrency != editFormData.value.receivedCurrency) {
ElMessage.error('付款币种与到账币种不一致')
ElMessage.error(t('elmessage.currencyMismatch'))
return return
} }

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

@ -324,7 +324,7 @@
</el-step> </el-step>
</el-steps> </el-steps>
</div> </div>
<div class="reject-reason" v-if="isReject">驳回理由{{ rejectReason }}</div>
<div class="reject-reason" v-if="isReject">{{ t('common_list.rejectReason') }}{{ rejectReason }}</div>
<div class="steps-btn"> <div class="steps-btn">
<el-button type="primary" @click="showSteps = false">{{ t('common.confirm') }}</el-button> <el-button type="primary" @click="showSteps = false">{{ t('common.confirm') }}</el-button>
</div> </div>

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

@ -4,11 +4,13 @@
<div class="condition"> <div class="condition">
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">{{ t('common.jwcode') }}</el-text> <el-text size="large" style="width:4vw;">{{ t('common.jwcode') }}</el-text>
<el-input v-model="searchForm.jwcode" :placeholder="t('common.jwcodePlaceholder')" style="width:9vw;" clearable />
<el-input v-model="searchForm.jwcode" :placeholder="t('common.jwcodePlaceholder')" style="width:9vw;"
clearable />
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">{{ t('common.customerName') }}</el-text> <el-text size="large" style="width:4vw;">{{ t('common.customerName') }}</el-text>
<el-input v-model="searchForm.name" :placeholder="t('common.customerNamePlaceholder')" style="width:9vw;" clearable />
<el-input v-model="searchForm.name" :placeholder="t('common.customerNamePlaceholder')"
style="width:9vw;" clearable />
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;">{{ t('common.productName') }}</el-text> <el-text size="large" style="width:4vw;">{{ t('common.productName') }}</el-text>
@ -16,8 +18,8 @@
</div> </div>
<div class="item1" v-if="isHeadquarters"> <div class="item1" v-if="isHeadquarters">
<el-text size="large" style="width:4vw;">{{ t('common.market') }}</el-text> <el-text size="large" style="width:4vw;">{{ t('common.market') }}</el-text>
<el-cascader style="width: 9vw;" v-model="searchForm.market" :options="market" :placeholder="t('common.marketPlaceholder')"
clearable @change="handleMarketChange" />
<el-cascader style="width: 9vw;" v-model="searchForm.market" :options="market"
:placeholder="t('common.marketPlaceholder')" clearable @change="handleMarketChange" />
</div> </div>
<div class="item1"> <div class="item1">
<el-text size="large" style="width:4vw;" multiple>{{ t('common.orderStatus') }}</el-text> <el-text size="large" style="width:4vw;" multiple>{{ t('common.orderStatus') }}</el-text>
@ -41,9 +43,9 @@
</div> </div>
<div class="item2" style="width: 28.5vw;"> <div class="item2" style="width: 28.5vw;">
<el-text size="large" style="width:4vw;">{{ t('common.payTime') }}</el-text> <el-text size="large" style="width:4vw;">{{ t('common.payTime') }}</el-text>
<el-date-picker v-model="dateRange" type="datetimerange" :range-separator="t('common.to')" :start-placeholder="t('common.startTime')"
:end-placeholder="t('common.endTime')" style="width:22vw;" :disabled-date="disabledDate" :default-time="defaultTime"
clearable />
<el-date-picker v-model="dateRange" type="datetimerange" :range-separator="t('common.to')"
:start-placeholder="t('common.startTime')" :end-placeholder="t('common.endTime')"
style="width:22vw;" :disabled-date="disabledDate" :default-time="defaultTime" clearable />
</div> </div>
<div> <div>
<el-button type="primary" @click="getRefund">{{ t('common.search') }}</el-button> <el-button type="primary" @click="getRefund">{{ t('common.search') }}</el-button>
@ -62,7 +64,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" /> <el-table-column prop="jwcode" label="Homily ID" width="120" fixed="left" />
<el-table-column prop="name" :label="t('common_list.name')" width="120" fixed="left" show-overflow-tooltip />
<el-table-column prop="name" :label="t('common_list.name')" width="120" fixed="left"
show-overflow-tooltip />
<el-table-column prop="marketName" :label="t('common_list.market')" width="120" /> <el-table-column prop="marketName" :label="t('common_list.market')" width="120" />
<el-table-column prop="activity" :label="t('common_list.activity')" width="120px" show-overflow-tooltip /> <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="130" show-overflow-tooltip /> <el-table-column prop="goodsName" :label="t('common_list.productName')" width="130" show-overflow-tooltip />
@ -78,7 +81,8 @@
@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="转账凭证" style="width: auto; height: 40px;">
</div> </div>
<div v-else style="display: flex; justify-content: center; align-items: center; height: 40px;">{{ t('common_add.noTransferVoucher') }}
<div v-else style="display: flex; justify-content: center; align-items: center; height: 40px;">{{
t('common_add.noTransferVoucher') }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -105,6 +109,10 @@
@click="showEditDialog(scope.row)"> @click="showEditDialog(scope.row)">
{{ t('common.edit') }} {{ t('common.edit') }}
</el-button> </el-button>
<el-button v-if="[12, 22, 32].includes(scope.row.status)" type="primary" text
@click="showRejectReasonDialog(scope.row)">
查看驳回理由
</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -214,8 +222,8 @@
</div> </div>
</el-dialog> </el-dialog>
<ConfirmDialog v-model="showBack" :message="t('common.willRecallOrder')" @confirm="recall" @cancel="showBack = false"
@close="showBack = false" />
<ConfirmDialog v-model="showBack" :message="t('common.willRecallOrder')" @confirm="recall"
@cancel="showBack = false" @close="showBack = false" />
<el-dialog v-model="showError" overflow draggable class="back-dialog" :style="{ <el-dialog v-model="showError" overflow draggable class="back-dialog" :style="{
backgroundImage: `url(${RefundRecallBackground})`, backgroundImage: `url(${RefundRecallBackground})`,
@ -228,6 +236,10 @@
<el-button type="primary" @click="" style="margin-left: 2vw;">{{ t('common.confirm') }}</el-button> <el-button type="primary" @click="" style="margin-left: 2vw;">{{ t('common.confirm') }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-model="showRejectReason" title="驳回理由" width="40%" style="background-color: rgb(243,250,254);">
<div>{{ rejectReason }}</div>
</el-dialog>
</template> </template>
<script setup> <script setup>
import { ref, onMounted, computed } from 'vue' import { ref, onMounted, computed } from 'vue'
@ -263,6 +275,8 @@ const searchForm = ref({
const market = ref([]) const market = ref([])
const backRow = ref({})// const backRow = ref({})//
const editRow = ref({})// const editRow = ref({})//
const rejectReason = ref('')//
const showRejectReason = ref(false)
const editForm = ref({ const editForm = ref({
refundModel: '', refundModel: '',
refundReason: '' refundReason: ''
@ -392,10 +406,10 @@ const submitEdit = async function () {
} }
try { try {
console.log(editRow.value) console.log(editRow.value)
if(!editForm.value.refundModel) {
if (!editForm.value.refundModel) {
ElMessage.error(t('elmessage.selectRefundModel')) ElMessage.error(t('elmessage.selectRefundModel'))
return return
}else if(!editForm.value.refundReason) {
} else if (!editForm.value.refundReason) {
ElMessage.error(t('elmessage.refundReasonPlaceholder')) ElMessage.error(t('elmessage.refundReasonPlaceholder'))
return return
} else if (editRow.value.goodsName === '金币充值' && editForm.value.refundModel == 1) { } else if (editRow.value.goodsName === '金币充值' && editForm.value.refundModel == 1) {
@ -587,6 +601,10 @@ const defaultTime = [
new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 0, 0, 0),
new Date(2000, 2, 1, 23, 59, 59), new Date(2000, 2, 1, 23, 59, 59),
] ]
const showRejectReasonDialog = function (row) {
rejectReason.value = row.rejectReason
showRejectReason.value = true
}
onMounted(() => { onMounted(() => {
getRefund() getRefund()
getMarket() getMarket()

4
src/views/recharge/bean/addBeanRecharge.vue

@ -195,11 +195,7 @@ const handleAddForm = async () => {
<el-form :model="addForm" :rules="rules" ref="formRef" label-width="auto" style="max-width: 600px" <el-form :model="addForm" :rules="rules" ref="formRef" label-width="auto" style="max-width: 600px"
class="add-form"> class="add-form">
<el-form-item prop="jwcode" :label="t('common.jwcode')" label-position="left"> <el-form-item prop="jwcode" :label="t('common.jwcode')" label-position="left">
<<<<<<< HEAD
<el-input v-model="addForm.jwcode" style="width: 220px" @keyup.enter="getUser(addForm.jwcode)"/> <el-input v-model="addForm.jwcode" style="width: 220px" @keyup.enter="getUser(addForm.jwcode)"/>
=======
<el-input v-model="addForm.jwcode" style="width: 220px" @keyup.enter="getUser(addForm.jwcode)" />
>>>>>>> lihuilin/feature-20260121173255-多语言二期2合并
<el-button type="primary" @click="getUser(addForm.jwcode)" style="margin-left: 20px">{{ t('common.search') }}</el-button> <el-button type="primary" @click="getUser(addForm.jwcode)" style="margin-left: 20px">{{ t('common.search') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item prop="permanentBean" :label="t('recharge.permanentBean')" label-position="left"> <el-form-item prop="permanentBean" :label="t('recharge.permanentBean')" label-position="left">

4
src/views/recharge/gold/addCoinRecharge.vue

@ -654,11 +654,7 @@ onMounted(() => {
<el-form :model="recharge" ref="Ref" :rules="rules" label-width="auto" label-position="right" <el-form :model="recharge" ref="Ref" :rules="rules" label-width="auto" label-position="right"
style="min-width: 500px" class="add-form"> style="min-width: 500px" class="add-form">
<el-form-item prop="jwcode" :label="$t('common_add.jwcode')"> <el-form-item prop="jwcode" :label="$t('common_add.jwcode')">
<<<<<<< HEAD
<el-input v-model="recharge.jwcode" style="width: 220px" @keyup.enter="getUser(recharge.jwcode)"/> <el-input v-model="recharge.jwcode" style="width: 220px" @keyup.enter="getUser(recharge.jwcode)"/>
=======
<el-input v-model="recharge.jwcode" style="width: 220px" @keyup.enter="getUser(recharge.jwcode)" />
>>>>>>> lihuilin/feature-20260121173255-多语言二期2合并
<el-button type="primary" @click="getUser(recharge.jwcode)" style="margin-left: 20px">{{ $t('common.search') }}</el-button> <el-button type="primary" @click="getUser(recharge.jwcode)" style="margin-left: 20px">{{ $t('common.search') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item prop="activity" :label="$t('common_add.activity')"> <el-form-item prop="activity" :label="$t('common_add.activity')">

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

@ -471,11 +471,7 @@ onMounted(() =>{
<el-form :model="addRefund" ref="Ref" :rules="rules" label-width="auto" label-position="right" <el-form :model="addRefund" ref="Ref" :rules="rules" label-width="auto" label-position="right"
style="min-width: 500px" class="add-form"> style="min-width: 500px" class="add-form">
<el-form-item prop="jwcode" :label="$t('common_add.jwcode')"> <el-form-item prop="jwcode" :label="$t('common_add.jwcode')">
<<<<<<< HEAD
<el-input v-model="addRefund.jwcode" style="width: 220px" @keyup.enter="getUser(addRefund.jwcode)"/> <el-input v-model="addRefund.jwcode" style="width: 220px" @keyup.enter="getUser(addRefund.jwcode)"/>
=======
<el-input v-model="addRefund.jwcode" style="width: 220px" @keyup.enter="getUser(addRefund.jwcode)" />
>>>>>>> lihuilin/feature-20260121173255-多语言二期2合并
<el-button type="primary" @click="getUser(addRefund.jwcode)" style="margin-left: 20px">{{ $t('common.search') }} <el-button type="primary" @click="getUser(addRefund.jwcode)" style="margin-left: 20px">{{ $t('common.search') }}
</el-button> </el-button>
</el-form-item> </el-form-item>

Loading…
Cancel
Save