Browse Source

同步SAP按钮操作更改

branch_ccpg_220107
44673626 3 years ago
parent
commit
0ef10389a2
  1. 80
      vue/src/views/ux/billManage/WMSOutputSumReport/index.vue
  2. 2
      vue/src/views/ux/billManage/kanbanWithOutOrder/detail.vue

80
vue/src/views/ux/billManage/WMSOutputSumReport/index.vue

@ -158,6 +158,24 @@
@click="handleImportSap()"
>同步到SAP
</el-button>
<div v-if="this.resultData && this.resultData.errSize > 0">
<el-card shadow="always">
<!-- <i class="el-icon-error" /> -->
<p>
<span style="color: red"
>{{ this.resultData.successMessage }}
</span>
<el-button type="text" @click="downloadErrData"
>下载错误数据</el-button
>
</p>
</el-card>
</div>
<div v-else-if="this.resultData.errSize === 0">
<p>
<span>{{ this.resultData.successMessage }} </span>
</p>
</div>
</el-form-item>
</el-form>
</flexbox>
@ -438,6 +456,13 @@ export default {
userId: "",
accountDate: undefined,
},
resultData: {
totalSize: 0,
errSize: 0,
errTemplate: "",
errMessage: "",
successMessage: "",
},
materialGroupList: [],
getmaterialGroupValue: "",
page: 1,
@ -530,6 +555,42 @@ export default {
},
},
methods: {
/**
* 下载错误模板
*/
downloadErrData() {
let fileNameOfProject = this.resultData.errTemplate;
this.$axios
.BolbGets(
"/api/settleaccount/getblobfile/download/" + fileNameOfProject
)
.then((response) => {
if (fileNameOfProject.indexOf("_") != -1) {
let downName =
fileNameOfProject.slice(0, fileNameOfProject.lastIndexOf("_")) +
fileNameOfProject.slice(fileNameOfProject.lastIndexOf("."));
downloadFile(response, downName);
this.$notify({
title: "成功",
message: "错误数据-导出成功!",
type: "success",
duration: 2000,
});
} else {
downloadFile(response, fileNameOfProject);
this.$notify({
title: "成功",
message: "错误数据-导出成功!",
type: "success",
duration: 2000,
});
}
this.listLoading = false;
})
.catch((error) => {
this.listLoading = false;
});
},
valueChange(data) {
this.getmaterialGroupValue = "";
this.getmaterialGroupValue += data + ",";
@ -644,6 +705,7 @@ export default {
this.isEdit = false;
this.form = {};
this.dialogAccounDateVisible = true;
this.resultData = {};
},
//
save() {
@ -695,6 +757,7 @@ export default {
this.$refs.formCount.validate((valid) => {
if (valid) {
this.formLoading = true;
this.resultData.errSize == 0; //
if (this.dataValue === "") {
this.$message.error("必需选择过账日期!");
this.formLoading = false;
@ -713,22 +776,23 @@ export default {
this.listQuery
)
.then((res) => {
if (res == true) {
if (res === "Success") {
this.$notify({
title: "成功",
message: "数据同步成功!",
message: "数据同步SAP成功!",
type: "success",
duration: 2000,
});
this.resultData.errSize = 0;
this.resultData.successMessage = "同步SAP成功!";
this.getList();
this.formLoading = false;
this.dialogAccounDateVisible = false;
} else {
this.$message({
message: "数据同步失败!",
type: "warning",
});
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "同步SAP失败,单击下载!";
}
this.formLoading = false;
this.dialogAccounDateVisible = false;
})
.catch(() => {
this.formLoading = false;

2
vue/src/views/ux/billManage/kanbanWithOutOrder/detail.vue

@ -579,7 +579,7 @@ export default {
this.resultData.errTemplate = res; //
this.resultData.errSize = 1; //0
this.resultData.successMessage = "有错误检验信息!";
alert(JSON.stringify(this.resultData));
//alert(JSON.stringify(this.resultData));
}
this.formLoading = false;
})

Loading…
Cancel
Save