Commit d888cd34 by zhouzy

更改了一些基础bug

1 parent 64331f6c
......@@ -22,7 +22,7 @@
批次:
<div class="Input">
<el-input
v-model="batchListSearch.batchId"
v-model="selectBatchId"
placeholder="请输入批次号"
size="small"
></el-input>
......@@ -34,10 +34,10 @@
>
</div>
</div>
<div class="block">
<div class="firstpickerContainer">
权益套餐:
<el-select
v-model="batchListSearch.benefitPackagePickerList"
v-model="batchListSearch.defineCode"
placeholder="请选择权益套餐"
>
<el-option
......@@ -48,7 +48,6 @@
></el-option>
</el-select>
</div>
<el-dialog
title="批次明细"
:visible.sync="batchdetailsVisible"
......@@ -167,7 +166,6 @@
<el-button type="primary" @click="generateCards">确 定</el-button>
</span>
</el-dialog>
<div class="tablecontainer">
<d2-table
ref="batchDetailTable"
......@@ -197,6 +195,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
size="small"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
......@@ -210,7 +209,7 @@
></el-input>
</div>
</div>
<div class="InputContainer">
<div class="lastInputContainer">
账号:
<div class="Input">
<el-input
......@@ -243,7 +242,7 @@
<div class="firstpickerContainer">
权益套餐:
<el-select
v-model="collectionListSearch.benefitPackagePickerList"
v-model="collectionListSearch.defineCode"
placeholder="请选择权益套餐"
>
<el-option
......@@ -320,6 +319,7 @@
:searchForm="collectionListSearch"
:tableParams="collectionTableParams"
:getListApi="listRequisitionMemberCard"
>
<span slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="startcollectiondetails(scope.scope)"
......@@ -379,18 +379,20 @@ export default {
},
// 批次弹窗列表搜索项
batchPopupListSearch: {
batchId: "",
batchId: '',
cardNo:'',
// mobile:''
},
getlistMemberBatch: listMemberBatch,
// 批次列表搜索项
selectBatchId: "",
batchListSearch: {
batchId: "",
benefitPackagePickerList: "",
batchId: +"",
defineCode: "",
createdDateStart:"",
createdDateEnd:""
},
merchantId: 1,
merchantName: "三只松鼠",
//领用列表搜索项
dialogVisible: false,
beforeSearchFn: null,
activeName: "first",
......@@ -406,11 +408,11 @@ export default {
children: [
{
value: "option1",
label: "",
label: ""
},
{
value: "option2",
label: "",
label: ""
},
],
},
......@@ -437,11 +439,11 @@ export default {
children: [
{
value: "option1",
label: "选项一",
label: "选项一"
},
{
value: "option2",
label: "选项二",
label: "选项二"
},
],
},
......@@ -451,11 +453,11 @@ export default {
children: [
{
value: "option3",
label: "选项一",
label: "选项一"
},
{
value: "option4",
label: "选项二",
label: "选项二"
},
],
},
......@@ -468,11 +470,11 @@ export default {
children: [
{
value: "option1",
label: "选项一",
label: "选项一"
},
{
value: "option2",
label: "选项二",
label: "选项二"
},
],
},
......@@ -482,11 +484,11 @@ export default {
children: [
{
value: "option3",
label: "选项一",
label: "选项一"
},
{
value: "option4",
label: "选项二",
label: "选项二"
},
],
},
......@@ -495,8 +497,8 @@ export default {
MemberBatchVo: {
count: "",
defineCode: "",
merchantId: "",
merchantName: "",
// merchantId: "",
// merchantName: "",
remark: "",
},
batchTableParams: {
......@@ -506,27 +508,27 @@ export default {
tableColumns: [
{
label: "批次",
prop: "batchId",
prop: "batchId"
},
{
label: "权益套餐",
prop: "memberName",
prop: "memberName"
},
{
label: "生成数量",
prop: "number",
prop: "number"
// width: 110,
// tagLabel: true
},
{
label: "激活数量",
prop: "activationCount",
prop: "activationCount"
// minWidth: '200'
},
{
label: "生成时间",
prop: "createdDateStr",
prop: "createdDateStr"
// formatter: (cellValue) => {
// return {
// 0: '进行中',
......@@ -540,7 +542,7 @@ export default {
{
label: "备注",
prop: "remarks",
minWidth: "200",
minWidth: "200"
},
],
},
......@@ -553,27 +555,27 @@ export default {
tableColumns: [
{
label: "卡号",
prop: "cardNo",
prop: "cardNo"
// minWidth: '200'
},
{
label: "激活码",
prop: "activationCode",
prop: "activationCode"
},
{
label: "账号",
prop: "mobile",
prop: "mobile"
},
{
label: "激活时间",
prop: "updatedDate",
prop: "updatedDate"
// width: 110,
// tagLabel: true
},
{
label: "状态",
prop: "status",
prop: "status"
// formatter: (cellValue) => {
// return {
// 0: '进行中',
......@@ -595,20 +597,20 @@ export default {
tableColumns: [
{
label: "卡号",
prop: "cardNo",
prop: "cardNo"
// minWidth: '200'
},
{
label: "激活码",
prop: "activationCode",
prop: "activationCode"
},
{
label: "设备SN",
prop: "searchValue",
prop: "searchValue"
},
{
label: "账号",
prop: "mobile",
prop: "mobile"
// width: 110,
// tagLabel: true
},
......@@ -619,7 +621,7 @@ export default {
// },
{
label: "权益套餐",
prop: "memberName",
prop: "memberName"
// formatter: (cellValue) => {
// return {
// 0: '进行中',
......@@ -636,7 +638,7 @@ export default {
minWidth: "200",
formatter: (cellValue) => {
return this.date_format(cellValue.updatedDate);
},
}
},
{
label: "有效时间",
......@@ -644,21 +646,21 @@ export default {
minWidth: "200",
formatter: (cellValue) => {
return this.date_format(cellValue.validitDate);
},
}
},
{
label: "状态",
prop: "status",
minWidth: "200",
},
],
minWidth: "200"
}
]
},
// 批量生成权益卡弹窗表格
generateRightCardsForm: {
applicableChannel: "",
relatedRightsPackage: "",
cardsNumber: "",
remarks: "",
remarks: ""
},
rules: {
applicableChannel: [{ required: true, message: "请选择渠道", trigger: "change" }],
......@@ -670,34 +672,34 @@ export default {
// 详情界面弹窗
// 用户详情
cardId: "2473",
cardId: '2473',
userInformationForm: {
detailsVisible: false,
mobile: "",
validitDate: "",
updatedDate: "",
mobile: '',
validitDate: '',
updatedDate: ''
},
// 权益卡信息
rightsCardInformationForm: {
cardNo: "",
activationCode: "",
memberName: "",
cardNo: '',
activationCode: '',
memberName: ''
},
// 详情界面table
// 详情弹框权益明细table
detailTable: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "list",
listName: 'list',
tableOption: true,
tableColumns: [
{
label: "权益名",
prop: "equityName",
label: '权益名',
prop: 'equityName'
// minWidth: '200'
},
{
label: "状态",
prop: "status",
label: '状态',
prop: 'status'
// formatter: (cellValue) => {
// return {
// 0: '进行中',
......@@ -709,62 +711,56 @@ export default {
// }
},
{
label: "有效期",
prop: "termOfValidity",
label: '有效期',
prop: 'termOfValidity'
},
{
label: "账号",
prop: "accountNumber",
label: '账号',
prop: 'accountNumber'
// width: 110,
// tagLabel: true
},
{
label: "剩余次数",
prop: "remainingTimes",
label: '剩余次数',
prop: 'remainingTimes'
// minWidth: '200'
},
{
label: "权益说明",
prop: "Description ",
label: '权益说明',
prop: 'Description'
// minWidth: '200'
},
],
}
]
},
// 批次管理详情弹窗
cardsInformationForm: {
batchdetailsVisible: false,
cardName: "",
attributionChannel: "",
generationDate: "",
batch: "",
generateNumber: "",
activation: "",
},
// 权益卡信息
rightsCardInformationForm: {
cardNumber: "96",
activationCode: "123",
cardName: "23",
cardName: '',
attributionChannel: '',
generationDate: '',
batch: '',
generateNumber: '',
activation: ''
},
// 权益明细
BatchDetailInformationForm: {
cardName: "",
account: "",
cardName: '',
account: ''
},
// 批次管理详情弹框权益明细table
detailTable: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: "",
listName: '',
tableOption: true,
tableColumns: [
{
label: "权益名",
prop: "equityName",
label: '权益名',
prop: 'equityName'
// minWidth: '200'
},
{
label: "状态",
prop: "status",
label: '状态',
prop: 'status'
// formatter: (cellValue) => {
// return {
// 0: '进行中',
......@@ -776,132 +772,135 @@ export default {
// }
},
{
label: "有效期",
prop: "termOfValidity",
label: '有效期',
prop: 'termOfValidity'
},
{
label: "账号",
prop: "accountNumber",
label: '账号',
prop: 'accountNumber'
// width: 110,
// tagLabel: true
},
{
label: "剩余次数",
prop: "remainingTimes",
label: '剩余次数',
prop: 'remainingTimes'
// minWidth: '200'
},
{
label: "权益说明",
prop: "Description ",
label: '权益说明',
prop: 'Description'
// minWidth: '200'
},
],
},
};
}
]
}
}
},
mounted() {
getlistByCardName({}).then((res) => {
this.baseDate.equityList = res;
});
this.baseDate.equityList = res
})
},
methods: {
// 打开领用详情界面
startcollectiondetails(row) {
this.userInformationForm = row;
this.rightsCardInformationForm = row;
this.detailsVisible = true;
this.userInformationForm = row
this.rightsCardInformationForm = row
this.detailsVisible = true
},
// 改变日期数据格式
changeDataFormat() {
return new Promise((resolve, reject) => {
this.batchListSearch.createdDateEnd = this.batchDate ? this.batchDate[1] : ''
this.batchListSearch.createdDateStart = this.batchDate ? this.batchDate[0] : ''
this.batchListSearch.batchId=parseInt(this.selectBatchId)
console.log(this.batchListSearch)
// this.batchListSearch.createdDateEnd=this.batchListSearch.batchDate[1]
// this.batchListSearch.createdDateStart=this.batchListSearch.batchDate[0]
resolve();
});
resolve()
})
},
// 领用详情搜索
beforecollectionListSearch() {
return new Promise((resolve, reject) => {
this.batchPopupListSearch.batchId = this.cardsInformationForm.batchId;
resolve();
});
this.batchPopupListSearch.batchId = this.cardsInformationForm.batchId
resolve()
})
},
// 批次管理弹窗搜索
beforebatchPopupListSearch() {
return new Promise((resolve, reject) => {
this.batchPopupListSearch.batchId = this.cardsInformationForm.batchId;
resolve();
});
this.batchPopupListSearch.batchId = +this.cardsInformationForm.batchId
this.batchPopupListSearch.cardNo = this.BatchDetailInformationForm.cardName
// this.batchPopupListSearch.mobile = this.BatchDetailInformationForm.account
resolve()
})
},
handleClick(tab, event) {},
handleChange(value) {},
// 关闭批量生成界面
handleClose(done) {
this.$confirm("确认关闭?")
this.$confirm('确认关闭?')
.then((_) => {
done();
done()
})
.catch((_) => {});
.catch((_) => {})
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert("submit!");
alert('submit!')
} else {
console.log("error submit!!");
return false;
console.log('error submit!!')
return false
}
});
})
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.$refs[formName].resetFields()
},
// 批量制造卡片
generateCards() {
var params = {
count: this.generateRightCardsForm.cardsNumber + "",
defineCode: this.generateRightCardsForm.relatedRightsPackage + "",
merchantId: this.merchantId,
merchantName: this.merchantName + "",
remark: this.generateRightCardsForm.remarks + "",
};
count: +this.generateRightCardsForm.cardsNumber ,
defineCode: this.generateRightCardsForm.relatedRightsPackage + '',
// merchantId: this.merchantId,
// merchantName: this.merchantName + '',
remark: this.generateRightCardsForm.remarks + ''
}
generateMemberBatch(params).then((res) => {
console.log(res);
console.log(res)
if (res > 0) {
this.$message({
message: "增添成功!",
type: "success",
});
this.dialogVisible = false;
message: '增添成功!',
type: 'success'
})
this.dialogVisible = false
} else {
this.$message({
message: "增添失败!",
type: "error",
});
message: '增添失败!',
type: 'error'
})
}
});
})
},
// 批次详情弹窗
batchdetails(row) {
this.cardsInformationForm = row;
this.batchdetailsVisible = true;
this.cardsInformationForm = row
this.batchdetailsVisible = true
},
// dataExport(){
// }
// 关闭详情界面
detailClose(done) {
this.$confirm("确认关闭?")
this.$confirm('确认关闭?')
.then(() => {
done();
done()
})
.catch(() => {});
},
},
};
.catch(() => {})
}
}
}
</script>
<style>
* {
......@@ -915,19 +914,26 @@ export default {
.topline {
display: flex;
flex-direction: row;
margin-left: 25px;
}
.linecontainer {
display: flex;
flex-direction: row;
min-width: 576px;
}
.InputContainer {
display: flex;
flex-direction: row;
margin-left: 5%;
margin-left: 20px;
}
.lastInputContainer {
display: flex;
flex-direction: row;
margin-left: 100px;
}
.firstpickerContainer {
margin-left: 25px;
margin-left: 20px;
margin-top: 20px;
}
.lastpickerContainer {
......@@ -941,10 +947,11 @@ export default {
margin-left: 20px;
}
.buttonContainer {
margin-left: 20%;
margin-left: 100px;
}
.batchGeneration {
margin-left: 80px;
margin-left: 100px;
margin-top: 10px;
}
</style>
......@@ -37,8 +37,7 @@
<el-input-number
v-model="ruleForm.validity"
controls-position="right"
:min="0"
:max="10"
:min="1"
size="mini"
></el-input-number>
月内有效
......@@ -155,6 +154,7 @@ export default {
// name:ruleForm.name,
// validitVaule:""
// },
submit: false,
ruleForm: {
name: '',
explain: '',
......@@ -183,10 +183,10 @@ export default {
},
rules: {
name: [
{ required: true, message: '请输入权益卡名字', trigger: 'blur' },
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
{ required: true, message: '请输入长度在2-10以内的权益卡名称', trigger: 'blur' },
{ min: 2, max: 10, message: '长度在 2 到 10 个字符', trigger: 'blur' }
],
explain: [{ required: true, message: '请填写说明', trigger: 'blur' }],
explain: [{ min: 0, max: 200, required: true, message: '请填写200字以内的说明', trigger: 'blur' }],
validity: [{ required: true, message: '请选择有效期', trigger: 'blur' }],
currencyInpution: [
{ required: true, message: '请填写返回的嘀币数', trigger: 'blur' }
......@@ -246,54 +246,78 @@ export default {
rightsId: 20,
equityItemJson: JSON.stringify(equityItemJson)
})
this.submit = true
}
if (this.ruleForm.oilCheckbox) {
params.rightsList.push({
rightsId: 21,
equityItemJson: JSON.stringify(equityItemJson)
})
this.submit = true
}
if (this.ruleForm.worryFreeCheckbox) {
params.rightsList.push({
rightsId: 22,
equityItemJson: JSON.stringify(equityItemJson)
})
this.submit = true
}
if (this.ruleForm.specialOfferCheckbox) {
params.rightsList.push({
rightsId: 23,
equityItemJson: JSON.stringify(equityItemJson)
})
this.submit = true
}
if (this.ruleForm.rescueCheckbox) {
params.rightsList.push({
rightsId: 24,
equityItemJson: JSON.stringify(equityItemJson)
})
this.submit = true
}
if (this.ruleForm.creditCheckbox) {
params.rightsList.push({
rightsId: 25,
equityItemJson: JSON.stringify(equityItemJson)
})
this.submit = true
}
if (this.ruleForm.meituanCheckbox) {
params.rightsList.push({
rightsId: 26,
equityItemJson: JSON.stringify(equityItemJson)
})
this.submit = true
}
insertMemberCardDefineRf(params).then((res) => {
console.log(res)
if (res > 0) {
window.history.go(-1)
if (this.ruleForm.name) {
if (this.submit == true) {
insertMemberCardDefineRf(params).then((res) => {
// console.log(res)
if (res > 0) {
window.history.go(-1)
ruleForm = {}
}else {
this.$message({
message: '增加失败',
type: 'error'
})
}
})
} else {
this.$message({
message: '增添失败!',
message: '需开通至少一项服务',
type: 'error'
})
}
})
} else {
this.$message({
message: '权益卡名称不能为空',
type: 'error'
})
}
}
......@@ -317,6 +341,8 @@ export default {
.container {
overflow-y: scroll;
height: 900px;
margin-left: 100px;
margin-top: 20px;
}
.itemContainer {
margin-left: 20px;
......
......@@ -6,10 +6,8 @@
type="primary"
@click="addCard"
>新建权益卡</el-button>
</div>
<div class="tablecontainer">
<d2-table
ref="recordTable"
:searchForm="searchForm"
......@@ -26,15 +24,21 @@
</d2-table>
</div>
</div>
</template>
<script>
function date_format(d) {
var date = new Date(d);
var Y = date.getFullYear() + "-";
var M =
(date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1) + "-";
var D = date.getDate() + " ";
return Y + M + D;
}
// import { getListApi } from '@/api/test'
// import {memberCardDetails} from "@/api/test";
import { listMemberCardDefine } from '@/api/test'
// import selectbotton from '@/components/selectbotton'
export default {
// components: {
......@@ -42,8 +46,8 @@ export default {
// },
data() {
return {
date_format,
getListApi: listMemberCardDefine,
// getListApi: none,
searchForm: null,
tableParams: {
......@@ -58,7 +62,10 @@ export default {
},
{
label: '有效期',
prop: 'validitDate'
prop: 'validitDate',
formatter: (cellValue) => {
return this.date_format(cellValue.validitDate);
}
},
{
label: '权益内容',
......@@ -80,7 +87,7 @@ export default {
prop: 'status',
formatter: (cellValue) => {
return {
1: '正常',
1: '正常'
}[cellValue.status]
}
......@@ -96,16 +103,14 @@ export default {
}
},
mounted() {
},
methods: {
addCard() {
// window.location.href = 'http://glsx-oss-equity2.frontend.test.glsx.com.cn/customer/newEquityCard.html'
window.location.href = '/customer/newEquityCard.html'
}
// handleEdit() {
// // },
// updateRightCardTable(params = {}) {
// var _this = this;
......@@ -120,7 +125,6 @@ export default {
// });
// },
}
}
</script>
<style>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!