diff --git a/src/components/quotation/sellForQuotation/quotationDetail.vue b/src/components/quotation/sellForQuotation/quotationDetail.vue index a93f947..505bf0b 100644 --- a/src/components/quotation/sellForQuotation/quotationDetail.vue +++ b/src/components/quotation/sellForQuotation/quotationDetail.vue @@ -2,12 +2,11 @@
- 新增 + 新增 - 从历史询价导入 + 从历史询价导入 - 从历史报价导入 + 从历史报价导入 + align="center" + prop="itemNo"> + :visible.sync="quotationLeadIntoDetailFlag" title="新增报价明细" width="40%" :close-on-click-modal="false"> + label-position="top"> - - + + - + + + - - - + + + + + - + + + - - - - - - + + + + + 保存进入报价界面 - - - 保存进入报价界面 + + + - - - + + + + + @@ -212,36 +218,32 @@ - + - + - + - - - - - + + - - + + - + 新 增 从其他报价单复制 @@ -259,71 +261,23 @@ - - - + - - - - - - - - - - - - - - - + + + + + @@ -340,118 +294,26 @@ - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + @@ -473,48 +335,17 @@ - - - + - - - - - - - - - - - - - - - + + + + + @@ -522,6 +353,7 @@ + 计 算
系统自动计算结果(料工费/工具) @@ -668,40 +500,57 @@
- + 取 消 - 确 定 + 确 定 + top="15vh" :close-on-click-modal="false"> - + 工具编码 - + + + + + + - - - + + + + + + + + + + + + + + + - - 取 消 - 确 定 + 取 消 + 确 定 @@ -734,39 +583,36 @@ - - + @row-dblclick="dblclickToolHeader"> - - 取 消 - 确 定 - - + - + - + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + - - - + 取 消 - 确 定 + 确 定 @@ -863,21 +711,21 @@ :visible.sync="quotationPartDialogFlag" @close="closeQuotationPartDialog" :close-on-click-modal="false" - width="30%"> + width="40%"> - + 材料编码 - + - + - + - + - + - + - - + + 取 消 - 确 定 + 确 定 - @@ -954,41 +802,24 @@ - - - - 取 消 - 确 定 - + :visible.sync="otherQuotationDetailDialogFlag" + width="50%"> @@ -1010,20 +841,85 @@ - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 - 确 定 + 确 定
@@ -1091,6 +987,9 @@ export default { selectionQuotationPartList:[],//选中的报价材料集合 selectionPartList:[],//选中的材料集合 otherQuotationDetailList:[],//其他报价集合 + otherQuotationPartList:[],//其他报价材料 + otherQuotationRoutingList:[],//其他工艺集合 + otherQuotationToolList:[],//其他报价工具集合 selectionOtherDetailList:[],//选中的其他报价集合 // ===================================================分页参数====================================== no: 1,//当前页 @@ -1106,14 +1005,6 @@ export default { partDialogFlag:false,// 材料信息弹框 otherQuotationDetailDialogFlag:false,// 其他报价明细 options:0,// 从其他报价明细 复制选项 - - // ===============================================按钮状态========================================== - updateQuotationDetailBtnFlag:false, - otherQuotationDetailBtn:false, - quotationLeadIntoDetailBtn:false, - saveQuotationToolBtn:false, - quotationRoutingDialogBtn:false, - quotationPartDialogBtn:true, // =============================================新增报价明细的开关========================================== //新增 报价详情数据 insertQuotationDetailData: { @@ -1133,10 +1024,10 @@ export default { quotationPartNo:undefined,//报价材料编码 quotationPartDesc:undefined,//报价材料名称 umId:undefined,//计量单位 - unitDosage:undefined,//单位用量 - attritionRate:undefined,//损耗率 - transferAmount:undefined,//调机用量 - unitCost:undefined,//单位成本 + unitDosage:1,//单位用量 + attritionRate:1,//损耗率 + transferAmount:1,//调机用量 + unitCost:1,//单位成本 remark:undefined,//备注 }, //报价明细新增对象 @@ -1146,10 +1037,10 @@ export default { site: this.$store.state.user.site,// 工厂编号 productNo: undefined,//产品编码 productDesc: undefined,//产品名称 - quotationDetailQuantity: undefined,//报价数量 + quotationDetailQuantity: 1,//报价数量 internalInquiryNo: undefined,//内部询价单号 + itemNo:0,//序号 quotationDetailStatus: "草稿",//报价状态 - itemNo: undefined,//序号 taxRate: 13,//税率 remark: undefined,//备注 }, @@ -1197,11 +1088,11 @@ export default { machiningCenterNo:undefined,//加工中心编码 machiningCenterDesc:undefined,//加工中心名称 machiningCenterType:undefined,//加工中心类别 - machiningSetupTime:undefined,//调机时间 - unitOutputQuantity:undefined,//单位产出量 - outputUnit:undefined,//单位编码 - routingEfficiency:undefined,//效率 - operatorsNumber:undefined,//操作工人数 + machiningSetupTime:1,//调机时间 + unitOutputQuantity:0,//单位产出量 + outputUnit:'单位/小时',//单位编码 + routingEfficiency:100,//效率 + operatorsNumber:1,//操作工人数 unitMachineryCost:undefined,//单位机械成本 unitLaborCost:undefined,//单位人工成本 unitManufacturingCost:undefined,//单位制造费用 @@ -1214,9 +1105,9 @@ export default { site: this.$store.state.user.site, toolNo: "", toolDescription: "", - toolQuantity: undefined, - unitCost: undefined, - expectedServiceLife: undefined, + toolQuantity: 1, + unitCost: 1, + expectedServiceLife: 1, remark: "", }, // 工具列表筛选对象 @@ -1253,6 +1144,10 @@ export default { {required: true, message: ' ', trigger: 'change'}, {required: true, message: ' ', trigger: 'blur'}, ], + itemNo:[ + {required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'}, + {required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'}, + ], quotationDetailQuantity: [ {required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'}, {required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'}, @@ -1427,6 +1322,7 @@ export default { {label: "toolDescription", value: "工具描述",}, {label: "toolQuantity", value: "工具数量",}, {label: "unitCost", value: "单位成本",}, + {label: "itemNo", value: "序号",}, {label: "expectedServiceLife", value: "预计使用寿命",}, ], // 工艺 列表 @@ -1510,7 +1406,91 @@ export default { quotationHeader: function (val) { this.quotation = val; this.initData(); - } + }, + // 监听其他报价集合 + otherQuotationDetailList:function (val){ + let dataList = []; + switch (this.options){ + case 0: + dataList = this.otherQuotationDetailList; + break; + case 1: + for (let j = 0; j < val.length; j++) { + val[j].quotationPartList.forEach(item=>{ + item.quotationNo = val[j].quotationNo; + item.productNo = val[j].productNo; + item.productDesc = val[j].productDesc; + dataList.push(item); + }) + } + this.otherQuotationPartList = dataList; + break; + case 2: + for (let j = 0; j < val.length; j++) { + val[j].quotationRoutingVoList.forEach(item=>{ + item.quotationNo = val[j].quotationNo; + item.productNo = val[j].productNo; + item.productDesc = val[j].productDesc; + dataList.push(item); + }) + } + this.otherQuotationRoutingList = dataList; + break; + case 3: + for (let j = 0; j < val.length; j++) { + val[j].quotationToolList.forEach(item=>{ + item.quotationNo = val[j].quotationNo; + item.productNo = val[j].productNo; + item.productDesc = val[j].productDesc; + dataList.push(item); + }) + } + this.otherQuotationToolList = dataList; + break; + } + }, + // 监听其他报价的选择 + options:function (val){ + let dataList = []; + switch (val){ + case 0: + dataList = this.otherQuotationDetailList; + break; + case 1: + for (let j = 0; j < this.otherQuotationDetailList.length; j++) { + this.otherQuotationDetailList[j].quotationPartList.forEach(item=>{ + item.quotationNo = this.otherQuotationDetailList[j].quotationNo; + item.productNo = this.otherQuotationDetailList[j].productNo; + item.productDesc = this.otherQuotationDetailList[j].productDesc; + dataList.push(item); + }) + } + this.otherQuotationPartList = dataList; + break; + case 2: + for (let j = 0; j < this.otherQuotationDetailList.length; j++) { + this.otherQuotationDetailList[j].quotationRoutingVoList.forEach(item=>{ + item.quotationNo = this.otherQuotationDetailList[j].quotationNo; + item.productNo = this.otherQuotationDetailList[j].productNo; + item.productDesc = this.otherQuotationDetailList[j].productDesc; + dataList.push(item); + }) + } + this.otherQuotationRoutingList = dataList; + break; + case 3: + for (let j = 0; j < this.otherQuotationDetailList.length; j++) { + this.otherQuotationDetailList[j].quotationToolList.forEach(item=>{ + item.quotationNo = this.otherQuotationDetailList[j].quotationNo; + item.productNo = this.otherQuotationDetailList[j].productNo; + item.productDesc = this.otherQuotationDetailList[j].productDesc; + dataList.push(item); + }) + } + this.otherQuotationToolList = dataList; + break; + } + }, }, methods: { // ===============================================新增================================================ @@ -1518,14 +1498,12 @@ export default { insertQuotationDetailBtn() { this.$refs['insertQuotationDetailForm'].validate((validate, objects) => { if (validate) { - this.quotationLeadIntoDetailBtn = true; insertQuotationDetail(this.insertQuotationDetail).then(({data}) => { if (data.code == 200) { this.quotationLeadIntoDetailFlag = false; // 保存成功后 if (this.insertQuotationDetailData.flag) { this.quotationDetailData = data.data; - this.quotationLeadIntoDetailBtn = false; this.quotationDetailFlag = true; } this.initData(); @@ -1543,28 +1521,14 @@ export default { saveQuotationTool() { this.$refs['quotationToolForm'].validate((validate, object) => { if (validate) { - this.saveQuotationToolBtn= true; - if (this.selectionToolHeaderList.length > 0){ - // 批量修改的数据 - let batchUpdateList = this.quotationToolFormTable.quotationToolList.filter((v) => this.selectionToolHeaderList.some((val) => val.toolNo == v.toolNo)); - batchUpdateList.map(item => { - item.toolQuantity = +item.toolQuantity + 1; - return item; - }); - // 批量新增的数据 - let batchInsertList = this.selectionToolHeaderList.filter((v) => this.quotationToolFormTable.quotationToolList.every((val) => val.toolNo != v.toolNo)); - let batchInsertQuotationToolList = batchUpdateList.concat(batchInsertList); - this.batchInsertQuotationToolData(batchInsertQuotationToolList); - }else { + this.$confirm('是否保存工具信息?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { this.quotationTool.quotationDetailId = this.quotationDetailData.quotationDetailId; - // 添加到集合 - if (this.quotationTool.toolNo.trim() == '*'){ - this.quotationTool.toolQuantity = 1; - this.quotationTool.unitCost = 0; - this.quotationTool.expectedServiceLife = 0; - } this.insertQuotationToolData(); - } + }) } else { this.rulesValidateLabel(object, this.quotationToolColumns);// 校验提示 } @@ -1576,7 +1540,6 @@ export default { if (data.code == 200) { this.initQuotationToolData(); this.$message.success(data.msg); - this.saveQuotationToolBtn = false; this.saveQuotationToolFlag = false;// 关闭弹框 } else { this.$message.error(data.msg); @@ -1588,8 +1551,6 @@ export default { batchInsertQuotationTool(batchInsertQuotationToolList).then(({data})=>{ if (data.code == 200){ this.initQuotationToolData(); - this.otherQuotationDetailBtn = false; - this.saveQuotationToolBtn = false; this.otherQuotationDetailDialogFlag = false; this.saveQuotationToolFlag = false; } @@ -1616,6 +1577,10 @@ export default { }, // 报价工具 批量删除 deleteSelectionQuotationTool(){ + if (this.selectionQuotationToolList.length === 0) { + this.$message.warning("请选择要删除的工具记录") + return; + } this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1650,6 +1615,10 @@ export default { }, // 报价工艺批量删除 deleteSelectionQuotationRoutingBtn(){ + if (this.selectionQuotationRoutingList.length === 0) { + this.$message.warning("请选择要删除的工艺记录") + return; + } this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1684,6 +1653,10 @@ export default { }, // 报价材料批量删除 deleteSelectionQuotationPart(){ + if (this.selectionQuotationPartList.length === 0) { + this.$message.warning("请选择要删除的材料记录"); + return; + } this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1719,7 +1692,6 @@ export default { // =================================================保存=================================================== // 保存 报价明细 saveQuotationDetail() { - this.updateQuotationDetailBtnFlag=true; // 校验 let flag = true; // 校验报价详情表单 @@ -1729,13 +1701,6 @@ export default { this.rulesValidateLabel(objects, this.quotationDetailColumns); } }); - // 校验报价材料表格表单 - this.$refs.quotationPartTableForm.validate((validate, objects) => { - if (!validate) { - flag = false; - this.rulesValidateTableLabel(objects, this.quotationPartColumns); - } - }); // 校验报价工艺表格表单 this.$refs.quotationRoutingTableForm.validate((validate, objects) => { if (!validate) { @@ -1743,17 +1708,8 @@ export default { this.rulesValidateTableLabel(objects, this.quotationRoutingColumns); } }); - // 校验报价工具表格表单 - this.$refs.quotationToolTableForm.validate((validate, objects) => { - if (!validate) { - flag = false; - this.rulesValidateTableLabel(objects, this.quotationToolColumns); - } - }); - if (!flag) { - return - } - // 清空表单校验 + + // 表单校验 for (let i = 1; i <= 4; i++) { this.$refs['priceForm' + i].validate((validate, objects) => { if (!validate) { @@ -1768,14 +1724,9 @@ export default { if (flag) { // 校验通过 保存数据 let params = this.quotationDetailData; - params.quotationToolList = this.quotationToolFormTable.quotationToolList; - params.quotationPartList = this.quotationPartFormTable.quotationPartList; - params.quotationRoutingList = this.quotationRoutingFormTable.quotationRoutingList; - - updateQuotationDetail(this.quotationDetailData).then(({data}) => { + updateQuotationDetail(params).then(({data}) => { if (data.code == 200) { this.quotationDetailFlag = false; - this.updateQuotationDetailBtnFlag = false; this.initData(); this.$message.success(data.msg); } else { @@ -1839,12 +1790,10 @@ export default { }, // 新增报价工艺 insertQuotationRoutingData(){ - this.quotationRoutingDialogBtn = true; insertQuotationRouting(this.quotationRouting).then(({data})=>{ if (data.code == 200){ this.initQuotationRoutingData(); this.$message.success(data.msg); - this.quotationRoutingDialogBtn = false; this.quotationRoutingDialogFlag = false; }else { this.$message.error(data.msg); @@ -1857,7 +1806,6 @@ export default { if (data.code == 200){ this.initQuotationRoutingData(); this.$message.success(data.msg); - this.otherQuotationDetailBtn = false; this.otherQuotationDetailDialogFlag = false; this.quotationRoutingDialogFlag = false; }else { @@ -1871,27 +1819,14 @@ export default { if (!validate){ this.rulesValidateLabel(objects,this.quotationPartColumns); }else { - // 新增逻辑 - this.quotationPartDialogBtn = true; - if (this.selectionPartList.length > 0){ - let quotationPartList = this.selectionPartList.map(item=>{ - let data = this.quotationPartFormTable.quotationPartList.find(val => val.partNo == item.partNo); - if (!data){ - item.unitDosage = this.quotationPart.unitDosage; - item.attritionRate = this.quotationPart.attritionRate; - item.transferAmount = this.quotationPart.transferAmount; - item.unitCost = this.quotationPart.unitCost; - item.remark = this.quotationPart.remark; - }else { - item = data; - } - return item; - }) - this.batchInsertQuotationPartData(quotationPartList); - }else { + this.$confirm('此操作将保存材料信息, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { this.quotationPart.quotationDetailId = this.quotationDetailData.quotationDetailId; this.insertQuotationPartData(); - } + }) } }) }, @@ -1901,8 +1836,6 @@ export default { if (data.code == 200){ this.initQuotationPart(); this.$message.success(data.msg); - this.otherQuotationDetailBtn = false; - this.quotationPartDialogBtn = false; this.otherQuotationDetailDialogFlag = false; this.quotationPartDialogFlag = false; }else { @@ -1916,7 +1849,6 @@ export default { if (data.code == 200){ this.initQuotationPart(); this.$message.success(data.msg); - this.quotationPartDialogBtn = false; this.quotationPartDialogFlag = false; }else { this.$message.error(data.msg); @@ -1925,22 +1857,19 @@ export default { }, // 保存勾选的其他报价信息 saveOtherQuotationDetailBtn(){ + this.$confirm('此操作将从其他报价明细添加记录, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.otherQuotationDetailFun(); + }) + }, + // 处理其他报价信息数据复制 + otherQuotationDetailFun(){ let otherSelectionPart = [];// 选中的 材料 let otherSelectionRouting = [];// 选中的 工艺 let otherSelectionTool = [];// 选中的 工具 - this.otherQuotationDetailBtn = true; - // 遍历选中的其他报价信息 - for (let i = 0; i < this.selectionOtherDetailList.length; i++) { - if (this.selectionOtherDetailList[i].quotationPartList){ - otherSelectionPart = otherSelectionPart.concat(this.selectionOtherDetailList[i].quotationPartList); - } - if (this.selectionOtherDetailList[i].quotationRoutingVoList){ - otherSelectionRouting = otherSelectionRouting.concat(this.selectionOtherDetailList[i].quotationRoutingVoList); - } - if (this.selectionOtherDetailList[i].quotationToolList){ - otherSelectionTool = otherSelectionTool.concat(this.selectionOtherDetailList[i].quotationToolList); - } - } switch (this.options){ case 0: this.selectionOtherDetailList = this.selectionOtherDetailList.map(value => { @@ -1953,7 +1882,7 @@ export default { this.batchInsertQuotationDetailData(this.selectionOtherDetailList); break; case 1: - otherSelectionPart = otherSelectionPart.map(item=>{ + otherSelectionPart = this.selectionOtherDetailList.map(item=>{ item.quotationDetailId = this.quotationDetailData.quotationDetailId; item.quotationPartId = undefined; return item; @@ -1961,7 +1890,7 @@ export default { this.batchInsertQuotationPartData(otherSelectionPart); break; case 2: - otherSelectionRouting = otherSelectionRouting.map(item=>{ + otherSelectionRouting = this.selectionOtherDetailList.map(item=>{ item.quotationDetailId = this.quotationDetailData.quotationDetailId; item.quotationRoutingId = undefined; return item; @@ -1969,7 +1898,7 @@ export default { this.batchInsertQuotationRoutingData(otherSelectionRouting); break; case 3: - otherSelectionTool = otherSelectionTool.map(item=>{ + otherSelectionTool = this.selectionOtherDetailList.map(item=>{ item.quotationDetailId = this.quotationDetailData.quotationDetailId; item.quotationToolId = undefined; return item; @@ -1977,14 +1906,12 @@ export default { this.batchInsertQuotationToolData(otherSelectionTool); break; } - }, // 批量新增报价明细信息 batchInsertQuotationDetailData(quotationDetailList){ batchInsertQuotationDetail(quotationDetailList).then(({data})=>{ if (data.code == 200){ this.initData(); - this.otherQuotationDetailBtn= false; this.otherQuotationDetailDialogFlag = false; this.$message.success(data.msg); }else { @@ -1992,13 +1919,27 @@ export default { } }) }, + // 编辑报价工具 + clickEditToolTableBtn(row){ + this.quotationTool = JSON.parse(JSON.stringify(row)); + this.saveQuotationToolFlag= true; + }, + // 编辑报价材料 + editQuotationPart(row){ + this.quotationPart = JSON.parse(JSON.stringify(row)); + this.quotationPartDialogFlag = true; + }, + // 编辑报价工艺 + editQuotationRoutingBtn(row){ + this.quotationRouting = JSON.parse(JSON.stringify(row)); + this.quotationRoutingDialogFlag = true; + }, // =====================================================表格修改============================================ // 修改 报价详情 editQuotationDetail(row) { - this.quotationDetailData = JSON.parse(JSON.stringify(row)); + this.quotationDetailData = {...row}; this.quotationDetailFlag = true; }, - // =============================================查询================================================= // 查询报价明细 initData() { @@ -2209,6 +2150,7 @@ export default { }, // 点击其他报价明细 按钮 clickOtherQuotationDetailsBtn(i){ + this.initOtherQuotationDetail(); this.otherQuotationDetailDialogFlag = true; this.options = i; }, @@ -2243,10 +2185,41 @@ export default { // 报价工艺弹框关闭事件 closeQuotationRoutingDialog() { this.$refs['quotationRoutingForm'].resetFields(); + this.quotationRouting={ + quotationRoutingId:undefined,//主键 + quotationDetailId:undefined,//外键 + site:this.$store.state.user.site,//工厂编码 + itemNo:undefined,//序号 + quotationRoutingNo:undefined,//报价工序编码 + quotationRoutingDesc:undefined,//报价工序名称 + machiningCenterNo:undefined,//加工中心编码 + machiningCenterDesc:undefined,//加工中心名称 + machiningCenterType:undefined,//加工中心类别 + machiningSetupTime:1,//调机时间 + unitOutputQuantity:0,//单位产出量 + outputUnit:'单位/小时',//单位编码 + routingEfficiency:100,//效率 + operatorsNumber:1,//操作工人数 + unitMachineryCost:undefined,//单位机械成本 + unitLaborCost:undefined,//单位人工成本 + unitManufacturingCost:undefined,//单位制造费用 + unitQuotedCost:undefined,//单位报价成本 + remark:undefined,//备注 + }; }, // 关闭 报价工具 新增弹框 closeQuotationToolDialog() { this.$refs['quotationToolForm'].resetFields(); + this.quotationTool = { + quotationToolId: undefined, + site: this.$store.state.user.site, + toolNo: "", + toolDescription: "", + toolQuantity: 1, + unitCost: 1, + expectedServiceLife: 1, + remark: "", + }; if (this.selectionToolHeaderList.length > 0){ this.$refs.toolHeaderForm.resetFields(); } @@ -2265,6 +2238,19 @@ export default { if (this.selectionPartList.length > 0){ this.$refs.partDataForm.resetFields(); } + this.quotationPart = { + quotationPartId:undefined,//主键 + quotationDetailId:undefined,//外键 + site:this.$store.state.user.site,//工厂编码 + quotationPartNo:undefined,//报价材料编码 + quotationPartDesc:undefined,//报价材料名称 + umId:undefined,//计量单位 + unitDosage:1,//单位用量 + attritionRate:1,//损耗率 + transferAmount:1,//调机用量 + unitCost:1,//单位成本 + remark:undefined,//备注 + }; this.selectionPartList = []; if (this.$refs.partDataTable) { this.$refs.partDataTable.clearSelection(); @@ -2279,7 +2265,9 @@ export default { productDesc:undefined,// 产品名称 }; this.$refs['otherDetailForm'].resetFields(); - this.$refs.otherQuotationDetailTable.clearSelection(); + if (this.$refs.otherQuotationDetailTable){ + this.$refs.otherQuotationDetailTable.clearSelection(); + } }, // ===================================================表格多选发生改变事件============================================ // 报价工具表格 @@ -2311,6 +2299,21 @@ export default { toggleRowSelectionTable(row,refName){ this.$refs[refName].toggleRowSelection(row); }, + dblClickPartTable(row){ + row = JSON.parse(JSON.stringify(row)); + this.quotationPart.quotationPartNo = row.partNo; + this.quotationPart.quotationPartDesc = row.partDesc; + this.quotationPart.umId = row.umId; + this.partDialogFlag = false; + }, + // 工具表格双击事件 + dblclickToolHeader(row){ + row = JSON.parse(JSON.stringify(row)); + this.quotationTool.toolNo = row.toolNo; + this.quotationTool.toolDescription = row.toolDescription; + this.quotationTool.unitCost = row.unitCost ? row.unitCost : 1; + this.toolHeaderDialogFlag= false; + }, // =============================================输入框输入事件======================================================= // 利润率 输入框 修改 计算利润额 inputProfitRate() { @@ -2394,10 +2397,23 @@ export default { obj.machiningCenterDesc = value?value.workCenterDesc:""; obj.machiningCenterType = value?value.workCenterType:""; }, - outputUnitSelect(e,row){ + machiningCenterNoSelect(e,row){ let value = e.target.value; // 输入框值 if(value) { // 你输入才有这个值 不为空,如果你下拉框选择的话 这个值为空 - row.outputUnit = value + row.machiningCenterNo = value + } + }, + // 计算工艺单位成本 + changeRoutingCost(){ + this.quotationRouting.unitQuotedCost = 0; + if (this.quotationRouting.unitMachineryCost){ + this.quotationRouting.unitQuotedCost += +this.quotationRouting.unitMachineryCost; + } + if (this.quotationRouting.unitLaborCost){ + this.quotationRouting.unitQuotedCost += +this.quotationRouting.unitLaborCost; + } + if (this.quotationRouting.unitManufacturingCost){ + this.quotationRouting.unitQuotedCost += +this.quotationRouting.unitManufacturingCost; } }, // ==================================================校验工具类==================================================== @@ -2435,6 +2451,11 @@ export default { this.$refs[refName].focus(); } }, + // 获取单位 + getUmName(id){ + let value = this.umInformationList.find(item=>item.umId == id) + return value?value.umName:id; + }, }, created() { // 创建时 父组件值绑定zi @@ -2444,7 +2465,6 @@ export default { // 查询工具 this.initToolHeader(); this.initWorkCenterData(); - this.initPartList(); }, } diff --git a/src/views/modules/quotation/sellForQuotation.vue b/src/views/modules/quotation/sellForQuotation.vue index 7c1533a..01d4c8a 100644 --- a/src/views/modules/quotation/sellForQuotation.vue +++ b/src/views/modules/quotation/sellForQuotation.vue @@ -80,15 +80,13 @@ align="center" prop="quotationNo" label="报价单号" - show-overflow-tooltip - width="120"> + show-overflow-tooltip> + show-overflow-tooltip> @@ -115,29 +113,26 @@ label="项目编码"> @@ -145,14 +140,12 @@ align="center" prop="quotationStatus" show-overflow-tooltip - width="60" label="状态"> - - + - + 内部询价单号 - + + + - + - - + + + + 客户编码 - 客户编码 - + - - 客户 - 客户 - + + + + 客户名称 + - - + + + + 项目编码 - 项目编码 - + - + + + 项目名称 - 项目名称 - + - + + + - + + + - - + + + + 销售员 - 销售员 - + - + + + 跟单员 - 跟单员 - + - + + + - + + + + + @@ -695,6 +706,7 @@ export default { this.insertData.trackerName=row.trackerName;//跟单员 this.insertData.quotationStatus=row.quotationStatus;//状态 this.insertData.internalInquiryNo=row.quotationNo;//内部询价单号 + this.insertData.currency=row.customerCurrency;//内部询价单号 // 关闭弹框 this.quotationNoDialogFlag = false; }