|
@ -63,17 +63,19 @@ const cancel = function () { |
|
|
addRe.value.typeR = '0' |
|
|
addRe.value.typeR = '0' |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const show = function(){ |
|
|
|
|
|
console.log('===================================',addRefund.value.refundType) |
|
|
|
|
|
} |
|
|
// 这是添加退款信息的接口 |
|
|
// 这是添加退款信息的接口 |
|
|
const add = async function () { |
|
|
const add = async function () { |
|
|
try { |
|
|
try { |
|
|
|
|
|
|
|
|
// 更新 refundModel |
|
|
// 更新 refundModel |
|
|
addRefund.value.refundModel = parseInt(addRe.value.typeR); |
|
|
addRefund.value.refundModel = parseInt(addRe.value.typeR); |
|
|
if (addRefund.value.refundType = '商品退款') { |
|
|
|
|
|
addRefund.value.type === 1 |
|
|
|
|
|
|
|
|
if (addRefund.value.refundType === '商品退款') { |
|
|
|
|
|
addRefund.value.type = 1 |
|
|
} else { |
|
|
} else { |
|
|
addRefund.value.type === 0 |
|
|
|
|
|
|
|
|
addRefund.value.type = 0 |
|
|
} |
|
|
} |
|
|
// 对提交的金币数乘以 100 |
|
|
// 对提交的金币数乘以 100 |
|
|
const processedRefund = { |
|
|
const processedRefund = { |
|
@ -89,6 +91,7 @@ const add = async function () { |
|
|
url: '/refund/add', |
|
|
url: '/refund/add', |
|
|
data: processedRefund |
|
|
data: processedRefund |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
addDisabled.value = false |
|
|
addDisabled.value = false |
|
|
if (result.code === 0) { |
|
|
if (result.code === 0) { |
|
|
ElMessage.error(result.msg) |
|
|
ElMessage.error(result.msg) |
|
@ -467,7 +470,7 @@ onMounted(async function () { |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
|
|
|
|
|
|
<div class="father"> |
|
|
<div class="userAndForm"> |
|
|
<div class="userAndForm"> |
|
|
<div class="left"> |
|
|
<div class="left"> |
|
|
<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" |
|
@ -477,7 +480,7 @@ onMounted(async function () { |
|
|
<el-button type="primary" @click="getUser(addRefund.jwcode)" style="margin-left: 20px">查询 |
|
|
<el-button type="primary" @click="getUser(addRefund.jwcode)" style="margin-left: 20px">查询 |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item prop="refundType" label="退款类型"> |
|
|
|
|
|
|
|
|
<el-form-item prop="refundType" label="退款类型" @change="show"> |
|
|
<el-select v-model="addRefund.refundType" placeholder="请选择" style="width: 220px" @change="getGoods(addRefund.jwcode)"> |
|
|
<el-select v-model="addRefund.refundType" placeholder="请选择" style="width: 220px" @change="getGoods(addRefund.jwcode)"> |
|
|
<el-option v-for="item in refundType" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
<el-option v-for="item in refundType" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
@ -539,12 +542,14 @@ onMounted(async function () { |
|
|
<el-button type="primary" :disabled="addDisabled" @click="addBefore"> 提交</el-button> |
|
|
<el-button type="primary" :disabled="addDisabled" @click="addBefore"> 提交</el-button> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="right"> |
|
|
|
|
|
|
|
|
<div class="right"> |
|
|
|
|
|
<div class="right-up"> |
|
|
<!-- 客户信息栏 --> |
|
|
<!-- 客户信息栏 --> |
|
|
<el-card v-if="user.jwcode" style="width: 800px; float: right" class="customer-info"> |
|
|
|
|
|
|
|
|
<el-card v-if="user.jwcode" class="customer-info"> |
|
|
<el-form :model="user" label-width="auto" style="max-width: 1000px" label-position="left"> |
|
|
<el-form :model="user" label-width="auto" style="max-width: 1000px" label-position="left"> |
|
|
<el-text size="large" style="margin-left: 20px">客户信息</el-text> |
|
|
|
|
|
|
|
|
<el-text size="large" style="padding:30%; ">客户信息</el-text> |
|
|
|
|
|
|
|
|
<!-- 第一行:姓名 + 历史金币 --> |
|
|
<!-- 第一行:姓名 + 历史金币 --> |
|
|
<el-row style="margin-top: 20px"> |
|
|
<el-row style="margin-top: 20px"> |
|
@ -587,18 +592,6 @@ onMounted(async function () { |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
<!-- 第三行:首次充值日期 + 充值次数 --> |
|
|
|
|
|
<!-- <el-row > |
|
|
|
|
|
<el-col :span="9"> |
|
|
|
|
|
<el-form-item label="首次充值日期"> |
|
|
|
|
|
<p v-if="user.firstRecharge"> |
|
|
|
|
|
{{ moment(user.firstRecharge).format('YYYY-MM-DD HH:mm:ss') }} |
|
|
|
|
|
</p> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
|
|
|
</el-row> --> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 第四行:消费次数 + 所属门店 --> |
|
|
<!-- 第四行:消费次数 + 所属门店 --> |
|
|
<el-row> |
|
|
<el-row> |
|
|
<el-col :span="9"> |
|
|
<el-col :span="9"> |
|
@ -611,9 +604,11 @@ onMounted(async function () { |
|
|
</el-card> |
|
|
</el-card> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<div class="right-down"> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
@ -621,11 +616,18 @@ p { |
|
|
margin: 0px; |
|
|
margin: 0px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.father{ |
|
|
|
|
|
width: 75vw; |
|
|
|
|
|
height: 70vh; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.userAndForm { |
|
|
.userAndForm { |
|
|
width: 1150px; |
|
|
|
|
|
|
|
|
width:25vw; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
|
|
|
|
|
|
background-color: azure; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.left { |
|
|
.left { |
|
|
width: 35%; |
|
|
width: 35%; |
|
@ -637,8 +639,9 @@ p { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.right { |
|
|
|
|
|
flex: 1; |
|
|
|
|
|
|
|
|
.right-up { |
|
|
|
|
|
width: 35vw; |
|
|
|
|
|
height:30vh; |
|
|
margin-left: 20px; |
|
|
margin-left: 20px; |
|
|
display: flex; |
|
|
display: flex; |
|
|
|
|
|
|
|
@ -650,6 +653,10 @@ p { |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
padding: 0 10px; |
|
|
padding: 0 10px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.right-down{ |
|
|
|
|
|
flex:1; |
|
|
|
|
|
background-color: antiquewhite; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |