|
|
@ -386,7 +386,7 @@ const addBefore = () => { |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
ReadCookies.value = `coinConsume:${addConsume.value.jwcode}:${addConsume.value.goodsName}}` |
|
|
|
ReadCookies.value = `coinConsume:${addConsume.value.jwcode}:${addConsume.value.goodsName}` |
|
|
|
// 获取cookie |
|
|
|
const cookie = Cookies.get(ReadCookies.value) |
|
|
|
console.log("time", WriteCookiesTime.value) |
|
|
@ -529,54 +529,48 @@ onMounted(async function () { |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<el-form :model="addConsume" ref="Ref" :rules="rules" style="max-width: 600px;" class="add-form"> |
|
|
|
<div style="width:25vw"> |
|
|
|
<el-form-item prop="jwcode" label="精网号" style="margin-top: 50px"> |
|
|
|
<el-input v-model="addConsume.jwcode" style="width: 10vw;margin-left:45px" /> |
|
|
|
<el-button type="primary" @click="getUser(addConsume.jwcode)" style="margin-left: 10px">查询 |
|
|
|
</el-button> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div style="width:25vw"> |
|
|
|
|
|
|
|
<el-form-item prop="goodsName" label="商品名称" style="flex: 1; margin-right: 0px"> |
|
|
|
<el-select v-model="addConsume.goodsName" placeholder="请选择商品" style="width: 10vw;margin-left:30px"> |
|
|
|
<el-option v-for="item in goods" :key="item.value" :label="item.label" :value="item.value" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div style="width:25vw"> |
|
|
|
|
|
|
|
<el-form-item prop="sumGold" label="消耗金币总数"> |
|
|
|
<el-input v-model="addConsume.sumGold" style="width: 10vw;margin-left:2px" @input="validateInput()" |
|
|
|
@change="calculateCoins(addConsume.sumGold)" /> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 三类金币自动计算(禁用状态,不可编辑) --> |
|
|
|
<div style="width:25vw"> |
|
|
|
|
|
|
|
<el-form-item prop="permanentGold" label="永久金币"> |
|
|
|
<el-input v-model="addConsume.permanentGold" disabled style="width: 10vw;margin-left:40px"> |
|
|
|
<template #default="scope">{{ scope.row.permanentGold }}</template> |
|
|
|
</el-input> |
|
|
|
<p style="margin-right: 0px"> 个</p> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div style="width:25vw"> |
|
|
|
|
|
|
|
<el-form-item prop="freeCoin" label="免费金币"> |
|
|
|
<el-input disabled v-model="addConsume.freeGold" style="width: 10vw;margin-left:40px" /> |
|
|
|
<p style="margin-right: 0px"> 个</p> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div style="width:25vw"> |
|
|
|
|
|
|
|
<el-form-item prop="taskGold" label="任务金币"> |
|
|
|
<el-input disabled v-model="addConsume.taskGold" style="width: 10vw;margin-left:40px" /> |
|
|
|
<p style="margin-right: 20px"> 个</p> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
<div style="width:25vw"> |
|
|
|
|
|
|
|
<el-form-item prop="remark" label="备注"> |
|
|
|
<el-input v-model="addConsume.remark" style="width: 13.5vw;margin-left:70px" :rows="4" maxlength="100" show-word-limit |
|
|
|
type="textarea" /> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-button type="success" @click="resetForm()" style="margin-left: 200px;margin-top:10px">重置</el-button> |
|
|
|
<el-button type="primary" :disabled="addDisabled" @click="addBefore" style="margin-top:10px"> 提交</el-button> |
|
|
|
</el-form> |
|
|
|