1.修改搜索框提示信息,调整代码格式

master
x_z 3 years ago
parent 6d7a9fa7ce
commit 91672030a7

@ -6,7 +6,7 @@
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.taskId" placeholder="记录ID"></el-input> <el-input v-model="filterQuery.taskId" placeholder="任务ID"></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
@ -124,263 +124,263 @@
</template> </template>
<script> <script>
import {filterLog, deleteLog, findConfig, updateConfig} from "../../api/thrsys/spsSyncDownload"; import {filterLog, deleteLog, findConfig, updateConfig} from "../../api/thrsys/spsSyncDownload";
import store from "@/store"; import store from "@/store";
import ShowText from "../other/showText"; import ShowText from "../other/showText";
export default { export default {
data() { data() {
return { return {
filterQuery: { filterQuery: {
taskId: null, taskId: null,
status: "1", status: "1",
page: 1, page: 1,
limit: 10, limit: 10,
syncTime: null, syncTime: null,
}, },
list: [], list: [],
headers: {}, headers: {},
detailList: [], detailList: [],
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
total: 0, total: 0,
currentRow: null, currentRow: null,
editQuery: null, editQuery: null,
type: { type: {
"AutoDownloadOrder": "已完成单据", "AutoDownloadOrder": "已完成单据",
"AutoDownloadBusType": "单据类型", "AutoDownloadBusType": "单据类型",
"AutoDownloadAllData": "基础信息", "AutoDownloadAllData": "基础信息",
"AutoDownloadDiProducts": "国家库DI数据" "AutoDownloadDiProducts": "国家库DI数据"
}, },
status: { status: {
0: "等待处理", 0: "等待处理",
1: "处理完成", 1: "处理完成",
2: "处理异常", 2: "处理异常",
}, },
configQuery: { configQuery: {
id: null, id: null,
typeBus: null, typeBus: null,
typeScan: null, typeScan: null,
typeThird: null, typeThird: null,
basicProducts: null, basicProducts: null,
basicCorp: null, basicCorp: null,
basicInv: null, basicInv: null,
basicThirdProducts: null, basicThirdProducts: null,
basicThirdCorp: null, basicThirdCorp: null,
basicThirdInv: null, basicThirdInv: null,
basicThirdBusOrder: null, basicThirdBusOrder: null,
orderScanFinish: null, orderScanFinish: null,
dbDiProducts: null, dbDiProducts: null,
downstreamEnable: null, downstreamEnable: null,
syncTime: null,
},
uploadFileUrl: null,
uploadData: {
thirdSys: "thirdId",
},
templateDlUrl: null,
checked: false,
syncTime: null, syncTime: null,
}, syncInfo: null,
uploadFileUrl: null, syncVisible: false
uploadData: {
thirdSys: "thirdId",
},
templateDlUrl: null,
checked: false,
syncTime: null,
syncInfo: null,
syncVisible: false
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
taskId: null,
status: "1",
page: 1,
limit: 20,
}; };
this.getList();
},
getList() {
this.loading = true;
filterLog(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
}, },
getConfig() { methods: {
findConfig() onReset() {
.then((response) => { this.$router.push({
if (response.code == 20000) { path: "",
this.configQuery = response.data;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
}); });
}, this.filterQuery = {
saveConfig() { taskId: null,
updateConfig(this.configQuery) status: "1",
.then((response) => { page: 1,
this.loading = false; limit: 20,
if (response.code == 20000) { };
this.$message.success("更新成功!"); this.getList();
this.getConfig(); },
} getList() {
}) this.loading = true;
.catch(() => { filterLog(this.filterQuery)
this.loading = false; .then((response) => {
}); this.loading = false;
}, if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
getConfig() {
findConfig()
.then((response) => {
if (response.code == 20000) {
this.configQuery = response.data;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
saveConfig() {
updateConfig(this.configQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("更新成功!");
this.getConfig();
}
})
.catch(() => {
this.loading = false;
});
},
cancelDialog(val) { cancelDialog(val) {
this.udiImportDetailVisible = false; this.udiImportDetailVisible = false;
this.thrCorpSelectVisible = false; this.thrCorpSelectVisible = false;
if (val) { if (val) {
this.getList();
}
}
,
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList(); this.getList();
} }
} ,
,
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
}
,
createSchedule(type) { createSchedule(type) {
let query = { let query = {
createType: type, createType: type,
syncTime: this.syncTime, syncTime: this.syncTime,
} }
createSchedule(query) createSchedule(query)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("创建成功!"); this.$message.success("创建成功!");
} else if (response.code == 501) { } else if (response.code == 501) {
this.$message.warning(response.message); this.$message.warning(response.message);
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.getList(); this.getList();
})
.catch(() => {
this.loading = false;
});
},
deleteDialog(rowId) {
this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}) })
.catch(() => { .then(() => {
this.loading = false; let dQuery = {
}); id: rowId,
}, };
deleteDialog(rowId) { deleteLog(dQuery)
this.$confirm("此操作将删除该任务信息, 是否继续?", "提示", { .then((response) => {
confirmButtonText: "确定", this.loading = false;
cancelButtonText: "取消", if (response.code == 20000) {
type: "warning", this.$message.success("删除成功");
}) } else {
.then(() => { this.$message.error(response.message);
let dQuery = { }
id: rowId, this.getList();
}; })
deleteLog(dQuery) .catch(() => {
.then((response) => { this.loading = false;
this.loading = false; });
if (response.code == 20000) { })
this.$message.success("删除成功"); .catch(() => {
} else { });
this.$message.error(response.message); },
} handleChange(response, files, fileList) {
this.getList(); console.log(response);
}) if (response.code != 20000) {
.catch(() => { this.$message.error(response.message);
this.loading = false; this.getList();
}); } else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList();
}
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "success",
2: "danger",
};
return statusMap[status];
},
detailDialog(id) {
this.syncVisible = true;
this.list.forEach(item => {
if (id === item.id) {
this.syncInfo = item.remark;
}
}) })
.catch(() => {
});
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
this.getList();
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success(response.data);
this.getList();
} }
}, },
statusFilterType(status) {
const statusMap = { mounted() {
0: "warning", },
1: "success", components: {ShowText},
2: "danger", created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
}; };
return statusMap[status]; this.getList();
this.getConfig();
}, },
detailDialog(id) { };
this.syncVisible = true;
this.list.forEach(item => {
if (id === item.id) {
this.syncInfo = item.remark;
}
})
}
},
mounted() {
},
components: {ShowText},
created() {
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.getList();
this.getConfig();
},
};
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
.syncInfo { .syncInfo {
font-size: medium; font-size: medium;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
line-height: 25px; line-height: 25px;
} }
</style> </style>

Loading…
Cancel
Save