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