From fa25b6e0bc9dfb8195759dd13ad85ec6d8a13b24 Mon Sep 17 00:00:00 2001 From: "yu.wu" Date: Sat, 20 Nov 2021 17:23:54 +0800 Subject: [PATCH] =?UTF-8?q?fish=E9=A1=B5=E9=9D=A2=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/components/ImportTxt/index.vue | 63 +- vue/src/router/modules/fis.js | 10 + .../pg-fis/basedate/assemblyCfg/index.vue | 25 +- .../pg-fis/basedate/customerPartCfg/index.vue | 166 +- .../views/pg-fis/basedate/m100BIll/detail.vue | 347 ++++ .../views/pg-fis/basedate/m100BIll/index.vue | 118 +- .../pg-fis/basedate/m100Online/detail.vue | 354 ++++ .../pg-fis/basedate/m100Online/index.vue | 82 +- .../pg-fis/basedate/productLine/index.vue | 6 +- .../pg-fis/basedate/r100Online/detail.vue | 354 ++++ .../pg-fis/basedate/r100Online/index.vue | 106 +- .../basedate/unknownAssembly/detail.vue | 270 +++ .../pg-fis/basedate/unknownAssembly/index.vue | 1491 +++++++++++++++++ .../pg-fis/basedate/weldingAssembly/index.vue | 128 +- 14 files changed, 3329 insertions(+), 191 deletions(-) create mode 100644 vue/src/views/pg-fis/basedate/m100BIll/detail.vue create mode 100644 vue/src/views/pg-fis/basedate/m100Online/detail.vue create mode 100644 vue/src/views/pg-fis/basedate/r100Online/detail.vue create mode 100644 vue/src/views/pg-fis/basedate/unknownAssembly/detail.vue create mode 100644 vue/src/views/pg-fis/basedate/unknownAssembly/index.vue diff --git a/vue/src/components/ImportTxt/index.vue b/vue/src/components/ImportTxt/index.vue index 4eea759b..6392dce9 100644 --- a/vue/src/components/ImportTxt/index.vue +++ b/vue/src/components/ImportTxt/index.vue @@ -345,6 +345,7 @@ export default { { fis: "FIS发运数据", settleAccount: "R3数据", + AssemblyCfgERP:"总成SAP数据", }[this.crmType] || "" ); }, @@ -352,7 +353,8 @@ export default { return ( { fis: "/api/settleaccount/fis/ExcelImport", - settleAccount: "/api/settleaccount/SettleAccount/ExcelImport", + settleAccount: "/api/settleaccount/SettleAccount/ExcelImport", + AssemblyCfgERP:"/api/newjit/assembly-cfg-erp/import", }[this.crmType] || "" ); }, @@ -362,6 +364,7 @@ export default { { fis: "FIS发运数据导入模板.xlsx", settleAccount: "R3数据模板.xlsx", + AssemblyCfgERP:"BOM-批量导入模板.txt", }[this.crmType] || "" ); }, @@ -560,24 +563,48 @@ export default { .posts(webapi, fd) .then(async (res) => { console.log("导入条件:" + JSON.stringify(res)); - if (res === "Success") { - if (this.isLt2M === "1" && this.isFileType === "1") { - this.$notify({ - title: "成功", - message: "数据导入成功!", - type: "success", - duration: 2000, - }); - this.stepList[1].status = "finish"; - this.resultData.successMessage = "数据导入成功!"; - this.stepsActive = 4; + if(this.crmType !== "AssemblyCfgERP"){ + if (res === "Success") { + if (this.isLt2M === "1" && this.isFileType === "1") { + this.$notify({ + title: "成功", + message: "数据导入成功!", + type: "success", + duration: 2000, + }); + this.stepList[1].status = "finish"; + this.resultData.successMessage = "数据导入成功!"; + this.stepsActive = 4; + } + } else { + this.stepList[0].status = "wait"; + this.resultData.errTemplate = res; //指定错误模板名称,作为参数,用于错误模板下载 + this.resultData.errSize = 1; //保持大于0,用于控制错误数据下载按钮的可不可见 + this.resultData.successMessage = "数据导入失败!"; + this.stepsActive = 3; + } + } + else{ + console.log(res.status) + if (res.status === true) { + if (this.isLt2M === "1" && this.isFileType === "1") { + this.$notify({ + title: "成功", + message: "数据导入成功!", + type: "success", + duration: 2000, + }); + this.stepList[1].status = "finish"; + this.resultData.successMessage = "数据导入成功!"; + this.stepsActive = 4; + } + } else { + this.stepList[0].status = "wait"; + this.resultData.errTemplate = res; //指定错误模板名称,作为参数,用于错误模板下载 + this.resultData.errSize = 1; //保持大于0,用于控制错误数据下载按钮的可不可见 + this.resultData.successMessage = "数据导入失败!"; + this.stepsActive = 3; } - } else { - this.stepList[0].status = "wait"; - this.resultData.errTemplate = res; //指定错误模板名称,作为参数,用于错误模板下载 - this.resultData.errSize = 1; //保持大于0,用于控制错误数据下载按钮的可不可见 - this.resultData.successMessage = "数据导入失败!"; - this.stepsActive = 3; } this.$emit("status", "finish"); this.loading = false; diff --git a/vue/src/router/modules/fis.js b/vue/src/router/modules/fis.js index 4655ab23..576b0c7c 100644 --- a/vue/src/router/modules/fis.js +++ b/vue/src/router/modules/fis.js @@ -36,6 +36,16 @@ const pgfis = { icon: '发货' } }, + { + path: '/pg-unknownAssembly', + component: () => import('@/views/pg-fis/basedate/unknownAssembly'), + name: 'pg-unknownAssembly',//命名路由 + meta: { + title: '未知总成模块管理', + roles: ['SettleAccount.Reports'], + icon: '发货' + } + }, { path: '/pg-workLine', component: () => import('@/views/pg-fis/basedate/productLine'), diff --git a/vue/src/views/pg-fis/basedate/assemblyCfg/index.vue b/vue/src/views/pg-fis/basedate/assemblyCfg/index.vue index 038670b9..8f4922c6 100644 --- a/vue/src/views/pg-fis/basedate/assemblyCfg/index.vue +++ b/vue/src/views/pg-fis/basedate/assemblyCfg/index.vue @@ -174,7 +174,7 @@ align="center" > @@ -185,6 +185,7 @@ :close-on-click-modal="false" :title="formTitle" width="700px" + @close='closeDialog' > + + { }); }, + closeDialog(){ + //this.multipleSelection = [];//清空数据 + }, }, }; diff --git a/vue/src/views/pg-fis/basedate/customerPartCfg/index.vue b/vue/src/views/pg-fis/basedate/customerPartCfg/index.vue index 80ade2ac..fad25f00 100644 --- a/vue/src/views/pg-fis/basedate/customerPartCfg/index.vue +++ b/vue/src/views/pg-fis/basedate/customerPartCfg/index.vue @@ -22,7 +22,7 @@ - - + + - + - - + + @@ -274,12 +280,12 @@ export default { MaxResultCount: 15, version: "", //site: "TH", - customerCode: "", + customerCode: undefined, //userId: "00000000-0000-0000-0000-000000000000", partCode:"",//零件编码 partName:"",//零件名称 partType:"",//零件类型 - partChildType:"",//零件子类型 + partType2:"",//零件子类型 }, listExportQuery: { Filters: [ @@ -308,26 +314,34 @@ export default { isEdit: false, sortState:false, //标记刷新是否是排序调用 - partCode:'', - partName:'', - partType:'', - partChildType:'', + + + partType1Query:{ + dicTypeName:"客户零件类型1", + }, + partType2Query:{ + dicTypeName:"客户零件类型2", + }, + + partType1List:[], + partType2List:[], }; }, mounted() { this.$nextTick(() => { var offsetHei = document.documentElement.clientHeight; - console.log(offsetHei); + //console.log(offsetHei); let boxH = this.$refs.box.offsetHeight; this.tableHeight = offsetHei - boxH - 57 - 79;//57为footer高度,79为页面上部标签高度 - console.log(this.$refs.box.offsetHeight); - console.log(this.tableHeight); + //console.log(this.$refs.box.offsetHeight); + //console.log(this.tableHeight); }); }, created() { //this.getVersionInfo(); //if (this.versionList == []) { + this.getPartType(); this.getList(); //} }, @@ -353,7 +367,7 @@ export default { }); tempsTabs.push({ label: "零件子类型", - prop: "partChildType", + prop: "partType2", width: 120, }); tempsTabs.push({ @@ -452,16 +466,16 @@ export default { //return moment(date).format("YYYY-MM-DD HH:mm:ss"); return moment(date).format("YYYY-MM-DD"); } */ - if(column.property === 'customerCode') + if(column.property === "partType") { - if(row[column.property] === 'R0001') + if(row[column.property] === "1") { - var vname = '二配'; + var vname = '门板'; return vname; } - else if(row[column.property] === 'R0003') + else if(row[column.property] === '2') { - var vname = '结算'; + var vname = '柱护板'; return vname; } else @@ -472,7 +486,7 @@ export default { return row[column.property] || "--"; }, importExcelData() { - this.getVersionInfo(); + //this.getVersionInfo(); this.listLoading = false; //关闭导入窗体时调用 this.showExcelImport = false; @@ -480,34 +494,29 @@ export default { //导出功能 async handleDownload() { this.listLoading = true; - if (this.versionValue === "") { - this.$message.error("必需选择版本!"); - this.listLoading = false; - return; - } - if (this.versionValue != "") { - this.listQuery.version = this.versionValue; - } + // if (this.versionValue === "") { + // this.$message.error("必需选择版本!"); + // this.listLoading = false; + // return; + // } + // if (this.versionValue != "") { + // this.listQuery.version = this.versionValue; + // } console.log("发票导出:" + JSON.stringify(this.listQuery)); this.$axios .posts( - "/api/settleaccount/SettlementPart/Export", + "/api/newjit/part-cfg/export", this.listQuery ) .then((res) => { - let fileNameOfProject = res; + let filename = res.item; this.$axios - .BolbGets( - "/api/settleaccount/getblobfile/download/" + fileNameOfProject - ) + .BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) .then((response) => { - if (fileNameOfProject.indexOf("_") != -1) { + if (filename.indexOf("_") != -1) { let downName = - fileNameOfProject.slice( - 0, - fileNameOfProject.lastIndexOf("_") - ) + - fileNameOfProject.slice(fileNameOfProject.lastIndexOf(".")); + filename.slice(0, filename.lastIndexOf("_")) + + filename.slice(filename.lastIndexOf(".")); downloadFile(response, downName); this.$notify({ title: "成功", @@ -516,7 +525,7 @@ export default { duration: 2000, }); } else { - downloadFile(response, fileNameOfProject); + downloadFile(response, filename); this.$notify({ title: "成功", message: "数据-导出成功!", @@ -541,22 +550,22 @@ export default { } console.log("列表查询条件:" + JSON.stringify(this.listQuery)); this.$axios - .posts( + .gets( "/api/newjit/part-cfg/list", this.listQuery ) .then((response) => { this.list = response.items; - this.list.forEach(item => { - if(item.customerCode === 'R0001') - { - item.customerCode = '二配'; - } - else if(item.customerCode === 'R0003') - { - item.customerCode = '结算'; - } - }); + // this.list.forEach(item => { + // if(item.customerCode === 'R0001') + // { + // item.customerCode = '二配'; + // } + // else if(item.customerCode === 'R0003') + // { + // item.customerCode = '结算'; + // } + // }); this.totalCount = response.totalCount; setTimeout(() => { //大数据量加载时 @@ -617,15 +626,15 @@ export default { this.listQuery.Filters.push(filter); } - if (this.partChildType != "") { - var column = "partChildType"; + if (this.partType2 != "") { + var column = "partType2"; let filter = { logic: 0, column: column, action: 0, - value: this.partChildType, + value: this.partType2, }; - this.listQuery.Filters = this.listQuery.Filters.filter(u => u.column !== "partChildType") + this.listQuery.Filters = this.listQuery.Filters.filter(u => u.column !== "partType2") this.listQuery.Filters.push(filter); } */ @@ -677,9 +686,12 @@ export default { }, /** 重置按钮操作 */ resetQuery(refName) { - this.OnlineTimeVale = []; - this.ReceiveTimeVale = []; + this.listQuery.partCode = ""; + this.listQuery.partName = ""; + this.listQuery.partType = ""; + this.listQuery.partType2 = ""; this.$refs[refName].resetFields(); + this.getPartType() this.handleFilter(); }, sortChange(data) { @@ -723,6 +735,32 @@ export default { this.$refs.multipleTable.clearSelection(); this.$refs.multipleTable.toggleRowSelection(row); }, + //获取零件类型 + getPartType() + { + this.$axios + .gets( + "/api/newjit/dic/list",this.partType1Query + ) + .then((response) => { + console.log(response); + this.partType1List = response.item; + //console.log() + }) + .catch(() => { + }); + this.$axios + .gets( + "/api/newjit/dic/list",this.partType2Query + ) + .then((response) => { + console.log(response); + this.partType2List = response.item; + //console.log() + }) + .catch(() => { + }); + }, }, }; diff --git a/vue/src/views/pg-fis/basedate/m100BIll/detail.vue b/vue/src/views/pg-fis/basedate/m100BIll/detail.vue new file mode 100644 index 00000000..5ba51a93 --- /dev/null +++ b/vue/src/views/pg-fis/basedate/m100BIll/detail.vue @@ -0,0 +1,347 @@ + + + + + + + + diff --git a/vue/src/views/pg-fis/basedate/m100BIll/index.vue b/vue/src/views/pg-fis/basedate/m100BIll/index.vue index 6121f3e8..789de8c9 100644 --- a/vue/src/views/pg-fis/basedate/m100BIll/index.vue +++ b/vue/src/views/pg-fis/basedate/m100BIll/index.vue @@ -320,9 +320,9 @@ - + - + - + - + - 添加ERP总成 + @@ -454,9 +454,9 @@ - + @@ -464,17 +464,17 @@ - + - 添加ERP结算件 + @@ -559,6 +559,7 @@ import CRMTableHead from "../../components/CRMTableHead"; import importExcel from "@/components/ImportExcel-vw"; import Lockr from "lockr"; import moment from "moment"; +import Detail from "./detail.vue"; import { downloadFile } from "@/utils/crmindex.js"; //组件计量单位 @@ -574,7 +575,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { export default { name: "m100Bill", - components: { Pagination, CRMTableHead, importExcel }, + components: { Pagination, CRMTableHead, importExcel, Detail }, directives: { permission }, filters: { IsCustomerSignFilter(status) { @@ -652,6 +653,11 @@ export default { //UserId: "00000000-0000-0000-0000-000000000000", }, form:{ + knr:"", + vehicleModelCode:"", + vin:"", + hostSN:"", + onlineTimeVale:"", leftdetails:[], rightdetails:[], }, @@ -758,11 +764,12 @@ export default { this.$refs.form.validate((valid) => { if (valid) { console.log("保存参数:" + JSON.stringify(this.form)); + console.log(this.form); this.formLoading = true; if (this.isEdit) { //修改 this.$axios - .puts("/api/newjit/assembly-cfg-erp/" + this.form.id, this.form) + .puts("/api/newjit/new-m100" + this.form.id, this.form) .then((response) => { this.formLoading = false; this.$notify({ @@ -875,9 +882,9 @@ export default { fetchData(id) { //循环动态 this.$axios - .gets("/api/newjit/assembly-cfg-erp/" + id) + .gets("/api/newjit/new-m100/" + id) .then((response) => { - this.form = response.item; + this.form = response.item.m100Bill; //this.details = response.item.details; //console.log(this.details); }); @@ -889,7 +896,7 @@ export default { this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; console.log(JSON.stringify(this.listExportQuery)); this.$axios - .posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) + .posts("/api/newjit/new-m100/export", this.listExportQuery) .then((res) => { let filename = res.item; this.$axios @@ -932,10 +939,10 @@ export default { this.listQuery.KNREnd = ""; this.listQuery.VINBegin = ""; this.listQuery.VINEnd = ""; - this.listQuery.OnlineTimeValue = ""; + this.listQuery.OnlineTimeValue = []; this.listQuery.OnlineTimeBegin = ""; this.listQuery.OnlineTimeEnd = ""; - this.listQuery.ReceiveTimeValue = ""; + this.listQuery.ReceiveTimeValue = []; this.listQuery.ReceiveTimeBegin = ""; this.listQuery.ReceiveTimeEnd = ""; this.handleQuery(); @@ -968,24 +975,42 @@ export default { } }, - handleAddDetails() { - if (this.form.details === undefined) { - this.form.details = []; + handleAddLeftDetails() { + this.$forceUpdate(); + if (this.form.leftdetails === undefined) { + this.form.leftdetails = []; //console.log(679); } let obj = {}; - obj.partCode = ""; - obj.partName = ""; - obj.partNum = ""; - obj.isKey = false; - obj.description = ""; + obj.erpAssemblyCode = ""; + obj.erpAssemblyName = ""; + obj.vehicleModel = this.form.vehicleModel; - console.log(this.form.details); - this.form.details.push(obj); + console.log(this.form.leftdetails); + this.form.leftdetails.push(obj); //console.log(688); }, - handleDeleteDetails(index){ - this.form.details.splice(index, 1); + handleAddRightDetails() { + this.$forceUpdate(); + if (this.form.rightdetails === undefined) { + this.form.rightdetails = []; + //console.log(679); + } + let obj = {}; + obj.customerPartCode = ""; + obj.customerpartName = ""; + obj.partQty= ""; + + console.log(this.form.rightdetails); + this.form.rightdetails.push(obj); + //console.log(688); + }, + handleLeftDeleteDetails(index){ + this.form.leftdetails.splice(index, 1); + //console.log(693); + }, + handleRightDeleteDetails(index){ + this.form.rightdetails.splice(index, 1); //console.log(693); }, @@ -1009,8 +1034,22 @@ export default { getList() { this.listLoading = true; this.listQuery.SkipCount = (this.page - 1) * 10; + console.log(1030) + if(this.listQuery.OnlineTimeValue!== undefined) + { + console.log(1033) + console.log(this.listQuery.OnlineTimeValue) + this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0]; + this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1]; + } + console.log(this.listQuery.OnlineTimeValue) + if(this.listQuery.ReceiveTimeValue!== undefined) + { + this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0]; + this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1]; + } this.$axios - .gets("/api/newjit/bill-r100/list", this.listQuery) + .gets("/api/newjit/new-m100/list", this.listQuery) .then((response) => { this.list = response.items; this.totalCount = response.totalCount; @@ -1121,6 +1160,7 @@ export default { //console.log(this.listQuery.productType) //console.log(this.PLChildList) }, + //获取车型 getvehicleModel() { this.$axios @@ -1141,7 +1181,7 @@ export default { let obj = {}; obj.erpAssemblyCode = this.form.erpAssemblyCode; obj.erpAssemblyName = this.form.erpAssemblyName; - obj.vehicleModel = this.form.vehicleModel; + obj.vehicleModel = this.form.vehicleModelCode; if (this.form.leftdetails === undefined) { this.form.leftdetails = []; diff --git a/vue/src/views/pg-fis/basedate/m100Online/detail.vue b/vue/src/views/pg-fis/basedate/m100Online/detail.vue new file mode 100644 index 00000000..25108fdd --- /dev/null +++ b/vue/src/views/pg-fis/basedate/m100Online/detail.vue @@ -0,0 +1,354 @@ + + + + + + + + diff --git a/vue/src/views/pg-fis/basedate/m100Online/index.vue b/vue/src/views/pg-fis/basedate/m100Online/index.vue index 2246fc30..26d182b4 100644 --- a/vue/src/views/pg-fis/basedate/m100Online/index.vue +++ b/vue/src/views/pg-fis/basedate/m100Online/index.vue @@ -39,7 +39,7 @@ v-for="item in PLChildList" :key="item.id" :label="item.productLineName" - :value="item.id"/> + :value="item.productLineCode"/> @@ -141,7 +141,7 @@ --> - - + + {{ item.name }} @@ -294,6 +294,12 @@ :visible.sync="drawer" :before-close="handleDrawerClose" > +
+ +
@@ -306,6 +312,7 @@ import CRMTableHead from "../../components/CRMTableHead"; import importExcel from "@/components/ImportExcel-vw"; import Lockr from "lockr"; import moment from "moment"; +import Detail from "./detail.vue"; import { downloadFile } from "@/utils/crmindex.js"; //组件计量单位 @@ -323,7 +330,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { export default { name: "M100Online", - components: { Pagination, CRMTableHead, importExcel }, + components: { Pagination, CRMTableHead, importExcel, Detail }, directives: { permission }, filters: { IsCustomerSignFilter(status) { @@ -381,7 +388,7 @@ export default { MaxResultCount: 15, productType: 1, ProductLine: undefined, - version:undefined, + Version:undefined, serialNumBegin:undefined, serialNumEnd:undefined, HostSNBegin:undefined, @@ -390,12 +397,13 @@ export default { KNREnd:undefined, VINBegin:undefined, VINEnd:undefined, - OnlineTimeValue:undefined, + OnlineTimeValue:[], OnlineTimeBegin:undefined, OnlineTimeEnd:undefined, - ReceiveTimeValue:undefined, + ReceiveTimeValue:[], ReceiveTimeBegin:undefined, ReceiveTimeEnd:undefined, + billStatus:undefined, state:[], }, @@ -439,6 +447,12 @@ export default { }); }, created() { + this.billState.forEach((element,index) => { + if(index === 0) + { + this.listQuery.state.push(element.id); + } + }); this.getList(); this.getProductLine(); }, @@ -488,6 +502,11 @@ export default { prop: "r100ReceiveTime", width: 180, }); + tempsTabs.push({ + label: "产线", + prop: "productLine", + width: 120, + }); tempsTabs.push({ label: "备注", prop: "remark", @@ -500,7 +519,9 @@ export default { //抽屉 handleDrawerOpen(param) { this.drawer = true; - var parentId = param.id; //主键id + console.log(510) + console.log(param) + var parentId = param.assemblyID; //主键id this.customerInfos = [ { ParentId: parentId, @@ -525,9 +546,9 @@ export default { this.listLoading = true; this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; - console.log(JSON.stringify(this.listExportQuery)); + console.log(JSON.stringify(this.listQuery)); this.$axios - .posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) + .posts("/api/newjit/assembly-cfg-erp/export", this.listQuery) .then((res) => { let filename = res.item; this.$axios @@ -563,19 +584,23 @@ export default { //this.$refs[refName].resetFields(); this.listQuery.billType = ""; this.listQuery.productLine = ""; - this.listQuery.version = ""; + this.listQuery.Version = ""; + this.listQuery.serialNumBegin = ""; + this.listQuery.serialNumEnd = ""; this.listQuery.HostSNBegin = ""; this.listQuery.HostSNEnd = ""; this.listQuery.KNRBegin = ""; this.listQuery.KNREnd = ""; this.listQuery.VINBegin = ""; this.listQuery.VINEnd = ""; - this.listQuery.OnlineTimeValue = ""; + this.listQuery.OnlineTimeValue = []; this.listQuery.OnlineTimeBegin = ""; this.listQuery.OnlineTimeEnd = ""; - this.listQuery.ReceiveTimeValue = ""; + this.listQuery.ReceiveTimeValue = []; this.listQuery.ReceiveTimeBegin = ""; this.listQuery.ReceiveTimeEnd = ""; + this.listQuery.state = []; + this.listQuery.billStatus = ""; this.handleQuery(); this.getProductLine(); }, @@ -647,6 +672,20 @@ export default { getList() { this.listLoading = true; this.listQuery.SkipCount = (this.page - 1) * 10; + if(this.listQuery.OnlineTimeValue!== undefined) + { + this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0]; + this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1]; + } + if(this.listQuery.ReceiveTimeValue!== undefined) + { + this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0]; + this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1]; + } + if(this.listQuery.state!== undefined) + { + this.listQuery.billStatus = this.listQuery.state[0]; + } this.$axios .gets("/api/newjit/bill-m100/list", this.listQuery) .then((response) => { @@ -759,6 +798,19 @@ export default { this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType)); //console.log(this.PLList) }, + /*单据状态变更 */ + checkedListChange(index) + { + if(this.listQuery.state.length <= 1) + { + this.listQuery.state.push(this.billState[index].id); + } + else + { + this.listQuery.state = []; + this.listQuery.state.push(this.billState[index].id); + } + }, }, }; diff --git a/vue/src/views/pg-fis/basedate/productLine/index.vue b/vue/src/views/pg-fis/basedate/productLine/index.vue index 3d824d00..b30113d7 100644 --- a/vue/src/views/pg-fis/basedate/productLine/index.vue +++ b/vue/src/views/pg-fis/basedate/productLine/index.vue @@ -394,9 +394,9 @@ export default { version: "", customerCode: "", //userId: "00000000-0000-0000-0000-000000000000", - userName:"",//用户名称 - name:"",//真实姓名 - productLineCode:"",//生产线 + userName:undefined,//用户名称 + name:undefined,//真实姓名 + productLineCode:undefined,//生产线 }, listExportQuery: { Filters: [ diff --git a/vue/src/views/pg-fis/basedate/r100Online/detail.vue b/vue/src/views/pg-fis/basedate/r100Online/detail.vue new file mode 100644 index 00000000..25108fdd --- /dev/null +++ b/vue/src/views/pg-fis/basedate/r100Online/detail.vue @@ -0,0 +1,354 @@ + + + + + + + + diff --git a/vue/src/views/pg-fis/basedate/r100Online/index.vue b/vue/src/views/pg-fis/basedate/r100Online/index.vue index 0fe9f3c3..f107c337 100644 --- a/vue/src/views/pg-fis/basedate/r100Online/index.vue +++ b/vue/src/views/pg-fis/basedate/r100Online/index.vue @@ -39,7 +39,7 @@ v-for="item in PLChildList" :key="item.id" :label="item.productLineName" - :value="item.id"/> + :value="item.productLineCode"/> @@ -98,7 +98,7 @@ - + --> - + {{ item.name }} @@ -210,9 +210,9 @@ @row-click="handleRowClick" > - + +
+ +
@@ -272,6 +278,7 @@ import CRMTableHead from "../../components/CRMTableHead"; import importExcel from "@/components/ImportExcel-vw"; import Lockr from "lockr"; import moment from "moment"; +import Detail from "./detail.vue"; import { downloadFile } from "@/utils/crmindex.js"; //组件计量单位 @@ -289,7 +296,7 @@ const projectTypeKeyValue = bomUnit.reduce((acc, cur) => { export default { name: "M100Online", - components: { Pagination, CRMTableHead, importExcel }, + components: { Pagination, CRMTableHead, importExcel , Detail}, directives: { permission }, filters: { IsCustomerSignFilter(status) { @@ -347,19 +354,20 @@ export default { MaxResultCount: 15, productType: 1, ProductLine: undefined, - version:undefined, + Version:undefined, HostSNBegin:undefined, HostSNBegin:undefined, KNRBegin:undefined, KNREnd:undefined, - VINBegin:undefined, + //VINBegin:undefined, VINEnd:undefined, - OnlineTimeValue:undefined, + OnlineTimeValue:[], OnlineTimeBegin:undefined, OnlineTimeEnd:undefined, - ReceiveTimeValue:undefined, + ReceiveTimeValue:[], ReceiveTimeBegin:undefined, ReceiveTimeEnd:undefined, + billStatus:undefined, state:[], }, @@ -402,6 +410,12 @@ export default { }); }, created() { + this.billState.forEach((element,index) => { + if(index === 0) + { + this.listQuery.state.push(element.id); + } + }); this.getList(); this.getProductLine(); }, @@ -415,11 +429,11 @@ export default { // prop: "vin", // width: 130, // }); - tempsTabs.push({ - label: "KNR", - prop: "knr", - width: 150, - }); + // tempsTabs.push({ + // label: "KNR", + // prop: "knr", + // width: 150, + // }); tempsTabs.push({ label: "单据状态", prop: "billState", @@ -455,6 +469,11 @@ export default { prop: "erpAssemblyName", width: 180, }); + tempsTabs.push({ + label: "产线", + prop: "productLine", + width: 120, + }); tempsTabs.push({ label: "备注", prop: "remark", @@ -467,7 +486,7 @@ export default { //抽屉 handleDrawerOpen(param) { this.drawer = true; - var parentId = param.id; //主键id + var parentId = param.assemblyID; //主键id this.customerInfos = [ { ParentId: parentId, @@ -482,9 +501,9 @@ export default { this.listLoading = true; this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; - console.log(JSON.stringify(this.listExportQuery)); + console.log(JSON.stringify(this.listQuery)); this.$axios - .posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) + .posts("/api/newjit/bill-r100/export", this.listQuery) .then((res) => { let filename = res.item; this.$axios @@ -520,19 +539,21 @@ export default { //this.$refs[refName].resetFields(); this.listQuery.billType = ""; this.listQuery.productLine = ""; - this.listQuery.version = ""; + this.listQuery.Version = ""; this.listQuery.HostSNBegin = ""; this.listQuery.HostSNEnd = ""; this.listQuery.KNRBegin = ""; this.listQuery.KNREnd = ""; - this.listQuery.VINBegin = ""; + //this.listQuery.VINBegin = ""; this.listQuery.VINEnd = ""; - this.listQuery.OnlineTimeValue = ""; + this.listQuery.OnlineTimeValue = []; this.listQuery.OnlineTimeBegin = ""; this.listQuery.OnlineTimeEnd = ""; - this.listQuery.ReceiveTimeValue = ""; + this.listQuery.ReceiveTimeValue = []; this.listQuery.ReceiveTimeBegin = ""; this.listQuery.ReceiveTimeEnd = ""; + this.listQuery.state = []; + this.listQuery.billStatus = ""; this.handleQuery(); this.getProductLine(); }, @@ -604,8 +625,22 @@ export default { getList() { this.listLoading = true; this.listQuery.SkipCount = (this.page - 1) * 10; + if(this.listQuery.OnlineTimeValue!== undefined) + { + this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0]; + this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1]; + } + if(this.listQuery.ReceiveTimeValue!== undefined) + { + this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0]; + this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1]; + } + if(this.listQuery.state!== undefined) + { + this.listQuery.billStatus = this.listQuery.state[0]; + } this.$axios - .gets("/api/newjit/bill-m100/list", this.listQuery) + .gets("/api/newjit/bill-r100/list", this.listQuery) .then((response) => { this.list = response.items; this.totalCount = response.totalCount; @@ -714,6 +749,19 @@ export default { this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType)); //console.log(this.PLList) }, + /*单据状态变更 */ + checkedListChange(index) + { + if(this.listQuery.state.length <= 1) + { + this.listQuery.state.push(this.billState[index].id); + } + else + { + this.listQuery.state = []; + this.listQuery.state.push(this.billState[index].id); + } + }, }, }; diff --git a/vue/src/views/pg-fis/basedate/unknownAssembly/detail.vue b/vue/src/views/pg-fis/basedate/unknownAssembly/detail.vue new file mode 100644 index 00000000..e5bc3487 --- /dev/null +++ b/vue/src/views/pg-fis/basedate/unknownAssembly/detail.vue @@ -0,0 +1,270 @@ + + + + + + + + + + diff --git a/vue/src/views/pg-fis/basedate/weldingAssembly/index.vue b/vue/src/views/pg-fis/basedate/weldingAssembly/index.vue index 5e91f023..4638babd 100644 --- a/vue/src/views/pg-fis/basedate/weldingAssembly/index.vue +++ b/vue/src/views/pg-fis/basedate/weldingAssembly/index.vue @@ -19,9 +19,11 @@ style="margin-right: 15px" @change="ptypeselectChange" > - - - +
@@ -34,10 +36,10 @@ @change="valueselectChange" > + :value="item.id"/> @@ -139,7 +141,7 @@ --> - - + + {{ item.name }} @@ -192,7 +194,16 @@ size="mini" style="margin-left: 15px" @click="handleDownload()" - >导出焊装总成对比 + >导出焊装总成对比(Excel) + + 导出焊装总成对比(CSV) @@ -328,7 +339,7 @@ export default { { required: true, message: "必须输入!", trigger: "blur" }, ], }, - billState:[ + compareState:[ {id:0,name:"有焊装无总装"}, {id:1,name:"有焊装有总装"} ], @@ -373,7 +384,9 @@ export default { ReceiveTimeValue:undefined, ReceiveTimeBegin:undefined, ReceiveTimeEnd:undefined, - state:[], + HasR100NotHasM100:undefined,//有焊装无总装 + HasR100HasM100:undefined,//有焊装有总装 + cstate:[], }, listExportQuery: { @@ -400,6 +413,9 @@ export default { tableHeight: document.documentElement.clientHeight - 335, detailTableHeight:250, details:[], //修改子表数据源 + billStatus:[], + PLChildList:[],//筛选后产线下拉 + productTypeList:[{id:1,name:'门板'},{id:2,name:'柱护板'}] }; }, mounted() { @@ -413,6 +429,10 @@ export default { }); }, created() { + this.compareState.forEach((element,index) => { + this.listQuery.cstate.push(element.id); + }); + this.getProductLine(); this.getList(); }, computed: { @@ -514,7 +534,45 @@ export default { this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; console.log(JSON.stringify(this.listExportQuery)); this.$axios - .posts("/api/newjit/assembly-cfg-erp/export", this.listExportQuery) + .posts("/api/newjit/r100-m100-compare/export", this.listExportQuery) + .then((res) => { + let filename = res.item; + this.$axios + .BolbGets("/api/newjit/exclude-part-cfg/download/" + filename) + .then((response) => { + if (filename.indexOf("_") != -1) { + let downName = + filename.slice(0, filename.lastIndexOf("_")) + + filename.slice(filename.lastIndexOf(".")); + downloadFile(response, downName); + this.$notify({ + title: "成功", + message: "数据-导出成功!", + type: "success", + duration: 2000, + }); + } else { + downloadFile(response, filename); + this.$notify({ + title: "成功", + message: "数据-导出成功!", + type: "success", + duration: 2000, + }); + } + this.listLoading = false; + }); + }); + this.listLoading = false; + }, + /** 导出功能 */ + handleDownloadCSV() { + this.listLoading = true; + this.listExportQuery.erpAssemblyCode = this.listQuery.ErpAssemblyCode; + this.listExportQuery.erpAssemblyName = this.listQuery.ErpAssemblyName; + console.log(JSON.stringify(this.listQuery)); + this.$axios + .posts("/api/newjit/r100-m100-compare/export-CSV", this.listQuery) .then((res) => { let filename = res.item; this.$axios @@ -550,7 +608,9 @@ export default { //this.$refs[refName].resetFields(); this.listQuery.billType = ""; this.listQuery.productLine = ""; - this.listQuery.version = ""; + this.listQuery.Version = ""; + this.listQuery.serialNumBegin = ""; + this.listQuery.serialNumEnd = ""; this.listQuery.HostSNBegin = ""; this.listQuery.HostSNEnd = ""; this.listQuery.KNRBegin = ""; @@ -563,6 +623,7 @@ export default { this.listQuery.ReceiveTimeValue = ""; this.listQuery.ReceiveTimeBegin = ""; this.listQuery.ReceiveTimeEnd = ""; + this.listQuery.cstate = []; this.handleQuery(); this.getProductLine(); }, @@ -634,8 +695,38 @@ export default { getList() { this.listLoading = true; this.listQuery.SkipCount = (this.page - 1) * 10; + if(this.listQuery.OnlineTimeValue!== undefined) + { + this.listQuery.OnlineTimeBegin = this.listQuery.OnlineTimeValue[0]; + this.listQuery.OnlineTimeEnd = this.listQuery.OnlineTimeValue[1]; + } + if(this.listQuery.ReceiveTimeValue!== undefined) + { + this.listQuery.ReceiveTimeBegin = this.listQuery.ReceiveTimeValue[0]; + this.listQuery.ReceiveTimeEnd = this.listQuery.ReceiveTimeValue[1]; + } + + this.listQuery.HasR100NotHasM100 = false; + this.listQuery.HasR100HasM100 = false; + + if(this.listQuery.cstate!== undefined && this.listQuery.cstate.length > 0) + { + console.log(this.listQuery.cstate) + this.listQuery.cstate.forEach(element => { + console.log(element) + if(element === 0) + { + this.listQuery.HasR100NotHasM100 = true; + } + if(element === 1) + { + this.listQuery.HasR100HasM100 = true; + } + }); + + } this.$axios - .gets("/api/newjit/assembly-cfg-erp/list", this.listQuery) + .gets("/api/newjit/r100-m100-compare/list", this.listQuery) .then((response) => { this.list = response.items; this.totalCount = response.totalCount; @@ -729,7 +820,7 @@ export default { .then((response) => { //console.log(response); this.PLList = response.item; - //console.log(this.PLList); + this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType)); }) .catch(() => { }); @@ -738,7 +829,8 @@ export default { ptypeselectChange() { //console.log(this.listQuery.productType); - this.PLList = this.PLList.filter(u => u.productType === this.listQuery.productType); + this.listQuery.productLine = ""; + this.PLChildList = this.PLList.filter(u => u.productType === parseInt(this.listQuery.productType)); //console.log(this.PLList); }, },