fix(金币代理页): 更新接口展示字段和操作字段
This commit is contained in:
parent
90db4287d1
commit
4109704296
@ -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(); //隐藏弹窗
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user