fix(金币代理页): 更新接口展示字段和操作字段

This commit is contained in:
hzj 2025-11-18 17:03:48 +08:00
parent 90db4287d1
commit 4109704296

View File

@ -22,7 +22,7 @@
</el-select>
<el-select
v-model="listQuery.display"
v-model="listQuery.h5Display"
placeholder="显示状态"
style="width: 120px"
class="filter-item"
@ -137,7 +137,7 @@
>
<template slot-scope="scope">
<el-switch
v-model="scope.row.display"
v-model="scope.row.h5Display"
:active-value="false"
:inactive-value="true"
:disabled="scope.row.close"
@ -234,9 +234,11 @@
{{ scope.row.createTime | dateFormat }}
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" width="140">
<el-table-column fixed="right" label="操作" align="center" width="190">
<template slot-scope="scope">
<!-- <el-button type="text" @click="clickChip(scope.row)">发货</el-button> -->
<el-button type="text" @click.native="handleUpdate(scope.row)"
>修改</el-button
>
<el-button type="text" @click="showGoldInputBox(scope.row, true)"
>发货</el-button
>
@ -326,7 +328,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="hideGoldInputBox()">
<el-button @click="hideDialog()">
取消
</el-button>
<el-button
@ -338,6 +340,20 @@
</el-button>
</div>
</el-dialog>
<el-dialog title="修改" :visible.sync="updateBoxVisible" width="400px">
<div slot="footer" class="dialog-footer">
<el-button @click="hideDialog()">
取消
</el-button>
<el-button
v-loading="updateLoading"
type="primary"
@click="updateInfo()"
>
保存
</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
@ -350,7 +366,8 @@ import {
switchStatusFreight,
showStatusFreight,
switchStatusDealer,
switchStatusSuperDealer
switchStatusSuperDealer,
updateInfoCP //
} from "@/api/app-user";
import Pagination from "@/components/Pagination";
import FormEdit from "./form-edit";
@ -373,6 +390,7 @@ export default {
thatRow: null,
userInfo: {},
searchDisabled: false,
updateBoxVisible: false,
goldInputBoxVisible: false,
// true false
type: false,
@ -407,7 +425,15 @@ export default {
sysOrigin: commonRules
},
listLoading: true,
formEditVisable: false
formEditVisable: false,
//
infoData: {
id: 0, //id
supportedCountries: "", //
contactInfo: "" //
},
updateLoading: false //
};
},
computed: {
@ -471,10 +497,10 @@ export default {
});
},
showSwitchChange(row) {
showStatusFreight(row.id, row.display)
showStatusFreight(row.id, row.h5Display)
.then(res => {})
.catch(er => {
row.display = !row.display;
row.h5Display = !row.h5Display;
});
},
switchChangeDealer(row) {
@ -514,10 +540,29 @@ export default {
};
that.goldInputBoxVisible = true;
},
hideGoldInputBox() {
//
handleUpdate(row) {
const that = this;
that.infoData = {
id: row.userId,
supportedCountries: row.supportedCountries || "",
contactInfo: row.contactInfo || ""
};
console.log("infoData:", that.infoData);
that.updateBoxVisible = true;
},
//
hideDialog() {
const that = this;
that.goldInputBoxVisible = false;
that.updateBoxVisible = false;
},
// /
goldSubmit() {
const that = this;
@ -556,6 +601,14 @@ export default {
console.error(er);
});
});
},
// ()
updateInfo() {
const that = this;
that.updateLoading = true; //
that.updateLoading = false; //
that.hideDialog(); //
}
}
};