|
@@ -509,19 +509,19 @@ export default {
|
|
|
methods: {
|
|
|
// 获取异常原因下拉列表
|
|
|
async getresultlist() {
|
|
|
- const res = await asyncRequest.resultlist({
|
|
|
+ const { code, data, message } = await asyncRequest.resultlist({
|
|
|
page: 1,
|
|
|
size: 100,
|
|
|
type: "8",
|
|
|
status: "3",
|
|
|
});
|
|
|
- if (res && res.code === 0 && res.data) {
|
|
|
- const { list } = res.data;
|
|
|
+ if (code === 0) {
|
|
|
+ const { list } = data ?? [];
|
|
|
this.donline_formStOps = list;
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
- this.$message.warning(res.message);
|
|
|
+ this.$message.warning(message);
|
|
|
}
|
|
|
},
|
|
|
// 时间函数
|
|
@@ -556,20 +556,20 @@ export default {
|
|
|
if (valid) {
|
|
|
this.loading = true;
|
|
|
const obj = JSON.parse(JSON.stringify(this.donline_form));
|
|
|
- const res = await asyncRequest.yz_goodoff(obj);
|
|
|
+ const { code, data, message } = await asyncRequest.yz_goodoff(obj);
|
|
|
this.dialogFormVisible = false;
|
|
|
- if (res && res.code === 0) {
|
|
|
+ if (code === 0) {
|
|
|
this.loading = false;
|
|
|
this.$notify.success({
|
|
|
- title: res.message,
|
|
|
+ title: message,
|
|
|
message: "",
|
|
|
});
|
|
|
await this.searchList();
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
this.loading = false;
|
|
|
- this.$message.warning(res.message);
|
|
|
+ this.$message.warning(message);
|
|
|
}
|
|
|
} else {
|
|
|
console.log("error submit!!");
|
|
@@ -804,9 +804,10 @@ export default {
|
|
|
model.plat_code = this.select === "6" ? this.sinput : ""; //平台商品编号
|
|
|
model.creater = this.select === "7" ? this.sinput : ""; //
|
|
|
model.company_name = this.select === "9" ? this.sinput : ""; // 部门
|
|
|
- const res = await asyncRequest.list(model);
|
|
|
- if (res && res.code === 0 && res.data) {
|
|
|
- this.tableData = res.data.list;
|
|
|
+ const { code, data, message } = await asyncRequest.list(model);
|
|
|
+ if (code === 0) {
|
|
|
+ const { list, count } = data ?? {};
|
|
|
+ this.tableData = list ?? [];
|
|
|
this.tableData.forEach((a) => {
|
|
|
a.cat_name = "";
|
|
|
let list = a.cat_info || [];
|
|
@@ -814,8 +815,8 @@ export default {
|
|
|
a.cat_name += i == 0 ? b.name : "/" + b.name;
|
|
|
});
|
|
|
});
|
|
|
- this.pageInfo.total = Number(res.data.count);
|
|
|
- } else if (res && res.code >= 100 && res.code <= 104) {
|
|
|
+ this.pageInfo.total = Number(count ?? "0");
|
|
|
+ } else if (code >= 100 && code <= 104) {
|
|
|
await this.logout();
|
|
|
} else {
|
|
|
this.tableData = [];
|