分销提现,滑块验证bug修改

master
mabo 2021-07-02 16:45:52 +08:00
parent 3a76ba2c1f
commit cc1afed902
5 changed files with 72 additions and 61 deletions

View File

@ -72,19 +72,25 @@ export default {
xPos: this.distance xPos: this.distance
}; };
postVerifyImg(params).then(res => { postVerifyImg(params).then(res => {
if (res.result) { if (res.success) {
this.bgColor = 'green'; if (res.result) {
this.verifyText = '解锁成功'; this.bgColor = 'green';
this.$emit('change', { status: true, distance: this.distance }); this.verifyText = '解锁成功';
this.$emit('change', { status: true, distance: this.distance });
} else {
this.bgColor = 'red';
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
}
} else { } else {
this.bgColor = 'red'; this.refresh()
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
} }
}).catch(() => {
this.refresh()
}); });
}, },
refresh () { // refresh () { //

View File

@ -37,8 +37,8 @@
</FormItem> </FormItem>
<FormItem label="是否通过" prop="result" v-if="handleStatus =='edit'"> <FormItem label="是否通过" prop="result" v-if="handleStatus =='edit'">
<RadioGroup v-model="result" type="button" button-style="solid"> <RadioGroup v-model="result" type="button" button-style="solid">
<Radio :key=0 :label=0>通过</Radio> <Radio label="PASS">通过</Radio>
<Radio :key=-1 :label=-1>拒绝</Radio> <Radio label="REFUSE">拒绝</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
</Form> </Form>
@ -67,7 +67,7 @@ export default {
loading: true, // loading: true, //
modalVisible: false, // modalVisible: false, //
modalTitle: "", // modalTitle: "", //
result: -1, // result: 'REFUSE', //
searchForm: { // searchForm: { //
pageNumber: 1, // pageNumber: 1, //
pageSize: 10, // pageSize: 10, //
@ -80,9 +80,6 @@ export default {
memberName: "", memberName: "",
price: "", price: "",
}, },
auditForm: { //
result: -1
},
submitLoading: false, // submitLoading: false, //
selectList: [], // selectList: [], //
selectCount: 0, // selectCount: 0, //
@ -101,11 +98,9 @@ export default {
title: "申请金额", title: "申请金额",
key: "price", key: "price",
minWidth: 90, minWidth: 90,
render: (h, params) => { render: (h, params) => {
if (params.row.price) { return h("div", this.$options.filters.unitPrice(params.row.price,'¥'));
return h("div", this.$options.filters.unitPrice(params.row.price,'¥')); }
}
}
}, },
{ {
title: "申请时间", title: "申请时间",
@ -193,23 +188,27 @@ export default {
}; };
}, },
methods: { methods: {
//
init() { init() {
this.getDataList(); this.getDataList();
}, },
//
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNumber = v;
this.getDataList(); this.getDataList();
this.clearSelectAll();
}, },
//
changePageSize(v) { changePageSize(v) {
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
//
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
//
changeSort(e) { changeSort(e) {
this.searchForm.sort = e.key; this.searchForm.sort = e.key;
this.searchForm.order = e.order; this.searchForm.order = e.order;
@ -218,14 +217,7 @@ export default {
} }
this.getDataList(); this.getDataList();
}, },
clearSelectAll() { //
this.$refs.table.selectAll(false);
},
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
},
getDataList() { getDataList() {
this.loading = true; this.loading = true;
// //
@ -241,7 +233,7 @@ export default {
}, },
handleSubmit() { handleSubmit() {
let result = "拒绝" let result = "拒绝"
if(this.result == 0){ if(this.result == 'PASS'){
result = "通过" result = "通过"
} }
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
@ -251,13 +243,14 @@ export default {
content: "您确认要审核"+result+"么?", content: "您确认要审核"+result+"么?",
loading: true, loading: true,
onOk: () => { onOk: () => {
this.auditForm.result = this.result; auditDistributionCash(this.form.id,{result:this.result}).then(res => {
auditDistributionCash(this.form.id,this.auditForm).then(res => {
if (res.success) { if (res.success) {
this.$Modal.remove(); this.$Modal.remove();
this.$Message.success("审核成功"); this.$Message.success("审核成功");
this.getDataList(); this.getDataList();
this.modalVisible = false; this.modalVisible = false;
} else {
this.modalVisible = false;
} }
}); });
} }
@ -275,9 +268,7 @@ export default {
v[attr] = ""; v[attr] = "";
} }
} }
let str = JSON.stringify(v); this.form = JSON.parse(JSON.stringify(v));
let data = JSON.parse(str);
this.form = data;
this.modalVisible = true; this.modalVisible = true;
}, },
view(v){ view(v){

View File

@ -72,19 +72,26 @@ export default {
xPos: this.distance xPos: this.distance
}; };
postVerifyImg(params).then(res => { postVerifyImg(params).then(res => {
if (res.result) { if (res.success) {
this.bgColor = 'green'; if (res.result) {
this.verifyText = '解锁成功'; this.bgColor = 'green';
this.$emit('change', { status: true, distance: this.distance }); this.verifyText = '解锁成功';
this.$emit('change', { status: true, distance: this.distance });
} else {
this.bgColor = 'red';
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
}
} else { } else {
this.bgColor = 'red'; this.refresh()
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
} }
}).catch(()=>{
this.refresh()
}); });
}, },
refresh () { // refresh () { //

View File

@ -72,19 +72,26 @@ export default {
xPos: this.distance xPos: this.distance
}; };
postVerifyImg(params).then(res => { postVerifyImg(params).then(res => {
if (res.result) { if (res.success) {
this.bgColor = 'green'; if (res.result) {
this.verifyText = '解锁成功'; this.bgColor = 'green';
this.$emit('change', { status: true, distance: this.distance }); this.verifyText = '解锁成功';
this.$emit('change', { status: true, distance: this.distance });
} else {
this.bgColor = 'red';
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
}
} else { } else {
this.bgColor = 'red'; this.refresh()
this.verifyText = '解锁失败';
let that = this;
setTimeout(() => {
that.refresh();
}, 1000);
this.$emit('change', { status: false, distance: this.distance });
} }
}).catch(()=>{
this.refresh()
}); });
}, },
refresh () { // refresh () { //

View File

@ -121,7 +121,7 @@ export default {
{ {
title: "发票状态", title: "发票状态",
key: "receiptStatus", key: "receiptStatus",
width: 90, width: 100,
tooltip: true, tooltip: true,
render: (h, params) => { render: (h, params) => {
if (params.row.receiptStatus == 0) { if (params.row.receiptStatus == 0) {
@ -138,7 +138,7 @@ export default {
{ {
title: "订单状态", title: "订单状态",
key: "orderStatus", key: "orderStatus",
width: 90, width: 100,
render: (h, params) => { render: (h, params) => {
if (params.row.orderStatus == "UNPAID") { if (params.row.orderStatus == "UNPAID") {
return h("div", [ return h("div", [