From d0d1863e4eb23ffa4a743f73d08e6ad9a445dc46 Mon Sep 17 00:00:00 2001 From: "songnan.zhang" Date: Fri, 24 Dec 2021 15:14:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/components/ImportTxt/index.vue | 46 ++-- .../pg-fis/basedate/m100Online/ScrapMB.vue | 209 +++++++++++++----- .../pg-fis/basedate/m100Online/ScrapZHB.vue | 194 ++++++++++++---- 3 files changed, 332 insertions(+), 117 deletions(-) diff --git a/vue/src/components/ImportTxt/index.vue b/vue/src/components/ImportTxt/index.vue index 6392dce9..8a2b1e7d 100644 --- a/vue/src/components/ImportTxt/index.vue +++ b/vue/src/components/ImportTxt/index.vue @@ -151,13 +151,13 @@ {{ this.resultData.successMessage }} - 下载错误数据 + > -->

@@ -427,7 +427,7 @@ export default { this.factoryList = []; // this.listQuery.SkipCount = (this.page - 1) * 500; this.$axios - .posts("/api/settleaccount/CentralizedControl/openlist") + .posts("/api/newjit/assembly-cfg-erp/import") .then((response) => { response.forEach((element) => { let options = {}; @@ -440,25 +440,25 @@ export default { this.listLoading = false; }); }, - getAllCarModel() { - //取车型列表信息 - this.carModelList = []; - this.listQueryCustom.SkipCount = (this.page - 1) * 500; - console.log(JSON.stringify(this.listQueryCustom)); - this.$axios - .posts("/api/settleaccount/CodeSetting/list", this.listQueryCustom) - .then((response) => { - response.items.forEach((element) => { - let options = {}; - options.value = element.value; - options.label = element.description; - this.carModelList.push(options); - }); - }) - .catch(() => { - this.listLoading = false; - }); - }, + // getAllCarModel() { + // //取车型列表信息 + // this.carModelList = []; + // this.listQueryCustom.SkipCount = (this.page - 1) * 500; + // console.log(JSON.stringify(this.listQueryCustom)); + // this.$axios + // .posts("/api/settleaccount/CodeSetting/list", this.listQueryCustom) + // .then((response) => { + // response.items.forEach((element) => { + // let options = {}; + // options.value = element.value; + // options.label = element.description; + // this.carModelList.push(options); + // }); + // }) + // .catch(() => { + // this.listLoading = false; + // }); + // }, handleImportExcelClick() { //父组件中,初始化此子组件时调用 this.fileuploadList = []; @@ -602,7 +602,7 @@ export default { this.stepList[0].status = "wait"; this.resultData.errTemplate = res; //指定错误模板名称,作为参数,用于错误模板下载 this.resultData.errSize = 1; //保持大于0,用于控制错误数据下载按钮的可不可见 - this.resultData.successMessage = "数据导入失败!"; + this.resultData.successMessage = res.message; this.stepsActive = 3; } } diff --git a/vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue b/vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue index 445fd29f..9d67cedc 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/ScrapMB.vue @@ -99,7 +99,7 @@ type="danger" icon="el-icon-delete" size="mini" - @click="handleDelete()" + @click="print()" >作废(支持批量) @@ -195,6 +195,57 @@ /> +
+ + + + + + + + + + + + +
@@ -243,6 +294,7 @@ export default { }; return { crmType: "M100Online-MB", + dialogTableVisible: false, getRowKeys: (row) => { return row.id; //这里看这一行中需要根据哪个属性值是id }, @@ -506,20 +558,14 @@ export default { this.listQuery ) .then((response) => { - response.items.forEach((item)=>{ - if(item.printType == 0) - { + response.items.forEach((item) => { + if (item.printType == 0) { item.printType = "正常打印"; - } - else if(item.printType == 1) - { + } else if (item.printType == 1) { item.printType = "重打"; - } - else - { + } else { item.printType = "补打"; } - }); this.list = response.items; this.totalCount = response.totalCount; @@ -581,25 +627,21 @@ export default { .catch(() => {}); } }, - //作废操作,支持批量操作-门板 - handleDelete(row) { - //批量删除 + print(row) { var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - let myalertcount = []; if (row) { //单行 params.push(row.id); - myalert = row.name; } else { //多选 this.multipleSelection.forEach((element) => { let id = element.id; params.push(id); }); - myalert = "选中项"; } - console.log("作废查询参数:" + JSON.stringify(params)); + this.zuofei = params; + + this.dialogTableVisible = true; this.$axios .posts("/api/newjit/MenBanPackingList/get-all-del-List", params) .then((response) => { @@ -613,46 +655,111 @@ export default { return; } else { this.fileQuery.dataname = JSON.stringify(response); - response.forEach((itemsss) => { - myalertcount.push(itemsss.billNum); - }); + this.zflist = response; console.log( "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + JSON.stringify(this.fileQuery.dataname) ); - this.$confirm( - "是否作废选中的" + response.length + "条记录?", - "提示", - { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - } - ) - .then(() => { - this.$axios - .posts("/api/newjit/MenBanPackingList/scrap", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "作废成功", - type: "success", - duration: 2000, - }); - this.getList(); - }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", - }); - }); } }) .catch(() => {}); }, + + //作废详情页确认按钮 + handleDelete() { + //debugger; + let params = this.zuofei; + + this.$axios + .posts("/api/newjit/MenBanPackingList/scrap", params) + .then((response) => { + console.log( + "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + + JSON.stringify(response) + ); + this.$notify({ + title: "成功", + message: "作废成功", + type: "success", + duration: 2000, + }); + }); + this.dialogTableVisible = false; + this.getList(); + }, + + //作废操作,支持批量操作-门板 + // handleDelete(row) { + // //批量删除 + // var params = []; + // let myalert = ""; //声明变量,其变量必须在此声明后使用 + // let myalertcount = []; + // if (row) { + // //单行 + // params.push(row.id); + // myalert = row.name; + // } else { + // //多选 + // this.multipleSelection.forEach((element) => { + // let id = element.id; + // params.push(id); + // }); + // myalert = "选中项"; + // } + // console.log("作废查询参数:" + JSON.stringify(params)); + // this.$axios + // .posts("/api/newjit/MenBanPackingList/get-all-del-List", params) + // .then((response) => { + // //alert(response.status); + // const index = this.list.indexOf(row); + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else { + // this.fileQuery.dataname = JSON.stringify(response); + // response.forEach((itemsss) => { + // myalertcount.push(itemsss.billNum); + // }); + // console.log( + // "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + + // JSON.stringify(this.fileQuery.dataname) + // ); + // this.$confirm( + // "是否作废选中的" + response.length + "条记录?", + // "提示", + // { + // confirmButtonText: "确定", + // cancelButtonText: "取消", + // type: "warning", + // } + // ) + // .then(() => { + // this.$axios + // .posts("/api/newjit/MenBanPackingList/scrap", params) + // .then((response) => { + // const index = this.list.indexOf(row); + // this.$notify({ + // title: "成功", + // message: "作废成功", + // type: "success", + // duration: 2000, + // }); + // this.getList(); + // }); + // }) + // .catch(() => { + // this.$message({ + // type: "info", + // message: "已取消操作", + // }); + // }); + // } + // }) + // .catch(() => {}); + // }, fetchData(id) { //循环动态 this.$axios diff --git a/vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue b/vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue index 02335f75..b9c1b721 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/ScrapZHB.vue @@ -124,7 +124,7 @@ type="danger" icon="el-icon-delete" size="mini" - @click="handleDelete()" + @click="print()" >作废(支持批量) @@ -200,6 +200,53 @@ /> +
+ + + + + + + + + + + + +
@@ -248,6 +295,7 @@ export default { }; return { crmType: "M100Online-MB", + dialogTableVisible :false, getRowKeys: (row) => { return row.id; //这里看这一行中需要根据哪个属性值是id }, @@ -594,25 +642,21 @@ export default { .catch(() => {}); } }, - //作废操作,支持批量操作-门板 - handleDelete(row) { - //批量删除 - var params = []; - let myalert = ""; //声明变量,其变量必须在此声明后使用 - let myalertcount = []; + print(row) { + var params = []; if (row) { //单行 params.push(row.id); - myalert = row.name; } else { //多选 this.multipleSelection.forEach((element) => { let id = element.id; params.push(id); }); - myalert = "选中项"; } - console.log("作废查询参数:" + JSON.stringify(params)); + this.zuofei = params; + + this.dialogTableVisible = true; this.$axios .posts("/api/newjit/ZhuHuBanPackingList/get-all-del-List", params) .then((response) => { @@ -626,46 +670,110 @@ export default { return; } else { this.fileQuery.dataname = JSON.stringify(response); - response.forEach((itemsss) => { - myalertcount.push(itemsss.billNum); - }); + this.zflist = response; console.log( - "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + + "柱护板-调用Handlers/Handler1.ashx?report=menban传的值:" + JSON.stringify(this.fileQuery.dataname) ); - this.$confirm( - "是否作废选中的" + response.length + "条记录?", - "提示", - { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - } - ) - .then(() => { - this.$axios - .posts("/api/newjit/ZhuHuBanPackingList/scrap", params) - .then((response) => { - const index = this.list.indexOf(row); - this.$notify({ - title: "成功", - message: "作废成功", - type: "success", - duration: 2000, - }); - this.getList(); - }); - }) - .catch(() => { - this.$message({ - type: "info", - message: "已取消操作", - }); - }); } }) .catch(() => {}); }, + //作废详情页确认按钮 + handleDelete() { + //debugger; + let params = this.zuofei; + + this.$axios + .posts("/api/newjit/ZhuHuBanPackingList/scrap", params) + .then((response) => { + console.log( + "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + + JSON.stringify(response) + ); + this.$notify({ + title: "成功", + message: "作废成功", + type: "success", + duration: 2000, + }); + + }); + this.dialogTableVisible = false; + this.getList(); + }, + //作废操作,支持批量操作-门板 + // handleDelete(row) { + // //批量删除 + // var params = []; + // let myalert = ""; //声明变量,其变量必须在此声明后使用 + // let myalertcount = []; + // if (row) { + // //单行 + // params.push(row.id); + // myalert = row.name; + // } else { + // //多选 + // this.multipleSelection.forEach((element) => { + // let id = element.id; + // params.push(id); + // }); + // myalert = "选中项"; + // } + // console.log("作废查询参数:" + JSON.stringify(params)); + // this.$axios + // .posts("/api/newjit/ZhuHuBanPackingList/get-all-del-List", params) + // .then((response) => { + // //alert(response.status); + // const index = this.list.indexOf(row); + // if (response.status === false) { + // this.$message({ + // message: response.message, + // type: "error", + // }); + // return; + // } else { + // this.fileQuery.dataname = JSON.stringify(response); + // response.forEach((itemsss) => { + // myalertcount.push(itemsss.billNum); + // }); + // console.log( + // "门板-调用Handlers/Handler1.ashx?report=menban传的值:" + + // JSON.stringify(this.fileQuery.dataname) + // ); + // this.$confirm( + // "是否作废选中的" + response.length + "条记录?", + // "提示", + // { + // confirmButtonText: "确定", + // cancelButtonText: "取消", + // type: "warning", + // } + // ) + // .then(() => { + // this.$axios + // .posts("/api/newjit/ZhuHuBanPackingList/scrap", params) + // .then((response) => { + // const index = this.list.indexOf(row); + // this.$notify({ + // title: "成功", + // message: "作废成功", + // type: "success", + // duration: 2000, + // }); + // this.getList(); + // }); + // }) + // .catch(() => { + // this.$message({ + // type: "info", + // message: "已取消操作", + // }); + // }); + // } + // }) + // .catch(() => {}); + // }, fetchData(id) { //循环动态 this.$axios