添加:兑换码作废功能
This commit is contained in:
parent
1f8a961b24
commit
7144b4b4f2
|
|
@ -196,7 +196,11 @@ export function exchangeCodeBatchList() {
|
||||||
export function exchangeCodeActivateForm() {
|
export function exchangeCodeActivateForm() {
|
||||||
return request.get('user/exchangeCode/activateForm')
|
return request.get('user/exchangeCode/activateForm')
|
||||||
}
|
}
|
||||||
// 会员卡兑换码 - 激活表单
|
// 会员卡兑换码 - 搜索内容
|
||||||
export function exchangeCodeSearchData() {
|
export function exchangeCodeSearchData() {
|
||||||
return request.get('user/exchangeCode/getSearchData')
|
return request.get('user/exchangeCode/getSearchData')
|
||||||
}
|
}
|
||||||
|
// 会员卡兑换码 - 激活表单
|
||||||
|
export function cancelCodeSearchData() {
|
||||||
|
return request.get('user/exchangeCode/cancelForm')
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
<el-option label="未激活" :value="0"></el-option>
|
<el-option label="未激活" :value="0"></el-option>
|
||||||
<el-option label="已激活" :value="1"></el-option>
|
<el-option label="已激活" :value="1"></el-option>
|
||||||
<el-option label="已使用" :value="2"></el-option>
|
<el-option label="已使用" :value="2"></el-option>
|
||||||
|
<el-option label="已作废" :value="3"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select v-if="Object.values(batch_list).length > 0" v-model="tableFrom.batch_unique" class="selWidth" clearable placeholder="请选择批次">
|
<el-select v-if="Object.values(batch_list).length > 0" v-model="tableFrom.batch_unique" class="selWidth" clearable placeholder="请选择批次">
|
||||||
<el-option v-for="(item,index) in batch_list" :label="index" :value="item"></el-option>
|
<el-option v-for="(item,index) in batch_list" :label="index" :value="item"></el-option>
|
||||||
|
|
@ -25,6 +26,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button size="small" type="primary" @click="getList(1)">搜索</el-button>
|
<el-button size="small" type="primary" @click="getList(1)">搜索</el-button>
|
||||||
<el-button size="small" type="warning" @click="activateExchangeCode">分配并激活</el-button>
|
<el-button size="small" type="warning" @click="activateExchangeCode">分配并激活</el-button>
|
||||||
|
<el-button size="small" type="danger" @click="cancelExchangeCode">作废兑换码</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--表格信息-->
|
<!--表格信息-->
|
||||||
|
|
@ -39,14 +41,9 @@
|
||||||
<el-table-column label="兑换码" min-width="100" align="center">
|
<el-table-column label="兑换码" min-width="100" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.status == 0" type="info" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
<el-tag v-if="scope.row.status == 0" type="info" effect="dark">{{ scope.row.exchange_code }}</el-tag>
|
||||||
<el-tag v-else-if="scope.row.status == 1" type="primary" effect="dark">{{
|
<el-tag v-else-if="scope.row.status == 1" type="primary" effect="dark">{{scope.row.exchange_code}}</el-tag>
|
||||||
scope.row.exchange_code
|
<el-tag v-else-if="scope.row.status == 2" type="success" effect="dark">{{scope.row.exchange_code}}</el-tag>
|
||||||
}}
|
<el-tag v-else-if="scope.row.status == 3" type="danger" effect="dark">{{scope.row.exchange_code}}</el-tag>
|
||||||
</el-tag>
|
|
||||||
<el-tag v-else-if="scope.row.status == 2" type="success" effect="dark">{{
|
|
||||||
scope.row.exchange_code
|
|
||||||
}}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="状态" min-width="150" align="center">
|
<el-table-column label="状态" min-width="150" align="center">
|
||||||
|
|
@ -68,6 +65,9 @@
|
||||||
{{ scope.row.use_time }}
|
{{ scope.row.use_time }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="scope.row.status == 3">
|
||||||
|
<el-tag type="danger">已作废</el-tag>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="绑定员工" prop="staff_nickname" min-width="100" align="center" />
|
<el-table-column label="绑定员工" prop="staff_nickname" min-width="100" align="center" />
|
||||||
|
|
@ -108,7 +108,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {exchangeCodeActivateForm, exchangeCodeBatchList, exchangeCodeList, exchangeCodeSearchData} from "@/api/user";
|
import {
|
||||||
|
cancelCodeSearchData,
|
||||||
|
exchangeCodeActivateForm,
|
||||||
|
exchangeCodeBatchList,
|
||||||
|
exchangeCodeList,
|
||||||
|
exchangeCodeSearchData
|
||||||
|
} from "@/api/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "preSaleProductList",
|
name: "preSaleProductList",
|
||||||
|
|
@ -188,6 +194,10 @@ export default {
|
||||||
activateExchangeCode() {
|
activateExchangeCode() {
|
||||||
this.$modalForm(exchangeCodeActivateForm()).then(() => this.getList(''));
|
this.$modalForm(exchangeCodeActivateForm()).then(() => this.getList(''));
|
||||||
},
|
},
|
||||||
|
// 激活
|
||||||
|
cancelExchangeCode() {
|
||||||
|
this.$modalForm(cancelCodeSearchData()).then(() => this.getList(''));
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue