|
|
<script>import { deleteQuotationDetail, insertQuotationDetail, searchQuotationDetailPageByHeaderId, updateQuotationDetail} from "../../../../api/quotation/quotationHeader";import {getProjectPart, getProjectPartList} from "../../../../api/project/project";import ToolQuotation from "./quotationDetail/toolQuotation.vue";import PropertyTemplates from "./quotationDetail/propertyTemplates.vue";import CostPrice from "./quotationDetail/costPrice.vue";import BillOfMateriel from "./quotationDetail/billOfMateriel.vue";import {Decimal} from "decimal.js";import {searchQuoteBomHeader, searchQuoteBomList} from "../../../../api/quotation/quoteOfBom";import QuoteRouting from "./quotationDetail/quoteRouting.vue";import {searchQuoteRoutingHeader} from "../../../../api/quotation/quoteOfRouting";
export default { name:'quoteDetail', components: {QuoteRouting, BillOfMateriel, CostPrice, PropertyTemplates, ToolQuotation}, props:{ header:{ type:Object, request:true, } }, watch:{ header:function (){ this.initData() } }, data(){ const validateProductNo = (rule, value, callback) =>{ if (this.quotationDetailFlag !== true && this.quotationLeadIntoDetailFlag !== true){ return; } if (value === '' || value === null || value === undefined){ callback(new Error(' ')) return } let params = {...this.projectPartData} params.testPartNo = value getProjectPart(params).then(({data})=>{ if (data && data.rows.length === 1){ callback() return } this.projectPartData.testPartNo = undefined; this.$message.error("产品编码不存在!") callback(new Error(" ")) }).catch((error)=>{ this.projectPartData.testPartNo = undefined callback(new Error(' ')) }) }; return{ index:'', insertQuotationDetailLoading:false, projectPartDialogFlag:false, quotationLeadIntoDetailFlag:false, initQuotationDetailLoading:false, quotationDetailFlag:false, editQuotationDetailLoading:false, no: 1,//当前页
size: 20,//每页条数
total: 0,//总条数
tableData:[], projectPartTable:[], projectPartDetailList: [ { userId: this.$store.state.user.name, functionId: 102001, serialNumber: '102001Table3TestPartNo', tableId: '102001Table3', tableName: '项目物料表', columnProp: 'testPartNo', headerAlign: 'center', align: 'center', columnLabel: '产品编码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 150 }, { userId: this.$store.state.user.name, functionId: 102001, serialNumber: '102001Table3PartDesc', tableId: '102001Table3', tableName: '项目物料表', columnProp: 'partDesc', headerAlign: 'center', align: 'center', columnLabel: '产品名称', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 120 },{ userId: this.$store.state.user.name, functionId: 102001, serialNumber: '102001Table3PartSpec', tableId: '102001Table3', tableName: '项目物料表', columnProp: 'partSpec', headerAlign: 'center', align: 'center', columnLabel: '产品规格', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 120 },{ userId: this.$store.state.user.name, functionId: 102001, serialNumber: '102001Table3PartTypeDesc', tableId: '102001Table3', tableName: '项目物料表', columnProp: 'partTypeDesc', headerAlign: 'center', align: 'center', columnLabel: '产品类型', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 120 },{ userId: this.$store.state.user.name, functionId: 102001, serialNumber: '102001Table3CodeNo', tableId: '102001Table3', tableName: '项目物料表', columnProp: 'codeNo', headerAlign: 'center', align: 'center', columnLabel: '模板编码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 120 },{ userId: this.$store.state.user.name, functionId: 102001, serialNumber: '102001Table3CodeDesc', tableId: '102001Table3', tableName: '项目物料表', columnProp: 'codeDesc', headerAlign: 'center', align: 'center', columnLabel: '模板名称', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', columnWidth: 120 } ], //报价明细新增对象
quotationDetail: { quotationDetailId: undefined,//主键
quotationHeaderId: undefined,//父编号
site: this.$store.state.user.site,// 工厂编号
productNo: undefined,//产品编码
productDesc: undefined,//产品名称
quotationDetailQuantity: 1,//报价数量
internalInquiryNo: undefined,//内部询价单号
itemNo:0,//序号
quotationDetailStatus: "草稿",//报价状态
taxRate: 13,//税率
remark: undefined,//备注
flag:false }, projectPartData:{ site:this.$store.state.user.site, testPartNo:undefined,// 项目编号
partDesc:undefined,// 项目名称
}, fullscreen:false, // 报价明细 参数列表
quotationDetailColumns: [ {label: "productDesc", value: "产品名称"}, {label: "quotationDetailQuantity", value: "报价数量"}, {label: "internalInquiryNo", value: "内部询价单号"}, {label: "quotationDetailStatus", value: "报价状态"}, {label: "itemNo", value: "序号"}, {label: "adjustPartCost", value: "调整后的材料成本"}, {label: "adjustMachineCost", value: "调整后的机器成本"}, {label: "adjustFabricateCost", value: "调整后的制造费用"}, {label: "adjustLabourCost", value: "调整后人的工成本"}, {label: "adjustToolCost", value: "调整后的工具成本"}, {label: "detailManageCost", value: "管理成本"}, {label: "detailOtherCost", value: "其他成本"}, {label: "detailProfitRate", value: "利润率"}, {label: "finalUntaxedPrice", value: "最终去税价格"}, ], // 报价详情表单校验
quotationDetailRules: { productNo: [{required: true,validator:validateProductNo,trigger: 'change'}], productDesc: [{required: true, message: ' ', trigger: ['change','blur']}], quotationDetailStatus: [{required: true, message: ' ', trigger: 'change'}], internalInquiryNo: [{required: true, message: ' ', trigger: ['change','blur']}], itemNo:[{required: true, message: ' ', trigger: ['change','blur']}], quotationDetailQuantity: [{required: true, message: ' ', trigger: ['change','blur']}], }, activeName:'bom', } }, methods:{ // 报价详情size 改变
detailSizeChange(val) { this.size = val; this.initData(); }, // 报价详情 页码
detailCurrentChange(val) { this.no = val; this.initData(); }, // 查询报价明细
initData() { let params = { no: this.no, size: this.size, quotationHeaderId: this.header.quotationHeaderId } this.tableData = []; this.initQuotationDetailLoading = true; searchQuotationDetailPageByHeaderId(params).then(({data}) => { this.initQuotationDetailLoading = false; if (data && data.code === 200) { this.tableData = data.data.records; this.total = data.data.total; }else { this.tableData = []; this.total = 0; } }).catch((error)=>{ this.initQuotationDetailLoading = false; }) }, // 修改 报价详情
editQuotationDetail(row,index) { if (index < 10){ this.index = "00"+index; }else if (index%10 <= 10){ this.index = "0"+index; }else if (index%100 <= 10){ this.index = index } this.quotationDetail = JSON.parse(JSON.stringify(row)); this.quotationDetailFlag = true; }, // 删除 报价明细
deleteQuotationDetailData(row){ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { deleteQuotationDetail(row).then(({data})=>{ if (data.code === 200){ this.initData(); this.$message.success(data.msg); }else { this.$message.error(data.msg); } }) }) }, openInsertQuotationDetail() { this.quotationDetail.quotationHeaderId = this.header.quotationHeaderId; this.quotationDetail.internalInquiryNo = this.header.internalInquiryNo; }, closeInsertQuotationDetail() { this.$refs['insertQuotationDetailForm'].resetFields(); this.resetQuotationDetail(); }, resetQuotationDetail(){ this.quotationDetail = { quotationDetailId: undefined,//主键
quotationHeaderId: undefined,//父编号
site: this.$store.state.user.site,// 工厂编号
productNo: undefined,//产品编码
productDesc: undefined,//产品名称
quotationDetailQuantity: 1,//报价数量
internalInquiryNo: undefined,//内部询价单号
itemNo:0,//序号
quotationDetailStatus: "草稿",//报价状态
taxRate: 13,//税率
remark: undefined,//备注
flag:false }; }, insertQuotationDetailBtn() { this.$refs['insertQuotationDetailForm'].validate((validate, objects) => { if (validate) { this.insertQuotationDetailLoading = true; insertQuotationDetail(this.quotationDetail).then(({data}) => { this.insertQuotationDetailLoading = false; if (data.code === 200) { // 保存成功后
if (this.quotationDetail.flag) { this.$nextTick(()=>{ this.quotationDetail = JSON.parse(JSON.stringify(data.data)); }) this.quotationDetailFlag = true; }else { this.quotationLeadIntoDetailFlag = false; } this.initData(); this.$message.success(data.msg); } else { this.$message.error(data.msg); } }).catch((error)=>{ this.insertQuotationDetailLoading = false; }) } else { this.rulesValidateLabel(objects, this.quotationDetailColumns); } }) }, // 校验处理
rulesValidateLabel(objects, labels) { for (let filed in objects) { for (let i = 0; i < labels.length; i++) { let quotationToolColumn = labels[i]; if (quotationToolColumn.label === filed) { this.$message.warning(quotationToolColumn.value+"为空或填写不正确"); return } } } }, closeProjectPartDialog(){ this.projectPartData = { site:this.$store.state.user.site, testPartNo:undefined,// 项目编号
partDesc:undefined,// 项目名称
} this.projectPartTable = []; }, openProjectPartDialog(){ this.getProjectPartList(); }, getProjectPartList(){ let params = {...this.projectPartData} params.projectId = this.header.projectId getProjectPartList(params).then(({data})=>{ if (data && data.code === 0){ this.projectPartTable = data.rows; } }) }, // 项目物料双击事件
dblClickProjectPartTable(row){ this.quotationDetail.productNo = row.testPartNo; this.quotationDetail.productDesc = row.partDesc; this.projectPartDialogFlag = false; }, closeDetailEditDialog(){ this.activeName = 'bom' this.fullscreen = false; this.resetQuotationDetail(); this.$refs.cost.restCostForm()
// 关闭新增弹框
this.quotationLeadIntoDetailFlag = false; }, openQuotationDetail(){ this.$nextTick(()=>{ this.$refs.property.getPropertyTemplatesItem();// 属性
this.$refs.tool.initQuotationToolData();//刀具
this.searchQuoteBomList();//bom
this.searchQuoteRoutingHeader();// routing
}) }, searchQuoteRoutingHeader(){ let params = { site:this.$store.state.user.site, quoteDetailId:this.quotationDetail.quotationDetailId, testPartNo:this.quotationDetail.productNo } searchQuoteRoutingHeader(params).then(({data})=>{ if (data && data.code === 0){ let row = data.row let arr = []; if (row){ arr[0] = row.version; arr[1] = row.routingType; arr[2] = row.alternativeNo; } this.$refs.routing.setSelectRouting(arr); }else { this.$message.warning(data.msg) } }).catch((error)=>{ this.$message.error(error) }) }, searchQuoteBomList(){ let params = { site:this.$store.state.user.site, quoteDetailId:this.quotationDetail.quotationDetailId, testPartNo:this.quotationDetail.productNo } searchQuoteBomHeader(params).then(({data})=>{ if (data && data.code === 0){ let row = data.row let arr = []; if (row){ arr[0] = row.version; arr[1] = row.bomType; arr[2] = row.alternativeNo; } this.$refs.bom.setSelectBom(arr); }else { this.$message.warning(data.msg) } }).catch((error)=>{ this.$message.error(error) }) }, saveQuotationDetail(){ if (!this.$refs.cost.ruleCostForm()) { return } let params = this.$refs.cost.getQuotationDetail(); this.editQuotationDetailLoading = true; updateQuotationDetail(params).then(({data}) => { this.editQuotationDetailLoading = false; if (data.code === 200) { this.quotationDetailFlag = false; this.initData(); this.$message.success(data.msg); } else { this.$message.warning(data.msg); } }).catch((error)=>{ this.$message.error(error); this.editQuotationDetailLoading = false; }) // this.$message.success(this.$refs.cost.getQuotationDetail())
// this.quotationDetailFlag = false;
}, tabClick(tab){ if (this.activeName === 'cost'){ this.setQuoteCost(); } }, setQuoteCost(){ let bomCost = new Decimal(this.$refs.bom.getQuoteBomCost()).mul(new Decimal(this.quotationDetail.quotationDetailQuantity)) let toolCost = new Decimal(this.$refs.tool.getQuotationToolList()).mul(new Decimal(this.quotationDetail.quotationDetailQuantity)) let packCost = new Decimal(this.$refs.property.getPackInfoCost()).mul(new Decimal(this.quotationDetail.quotationDetailQuantity)) let shippingCost = new Decimal(this.$refs.property.getShippingInfoCost()).mul(new Decimal(this.quotationDetail.quotationDetailQuantity)) this.$nextTick(()=>{ this.$refs.cost .setCost(bomCost,0,0,0,toolCost, packCost,shippingCost) }) }, editQuotationDetailStatus(row,status){ let params = JSON.parse(JSON.stringify(row)) params.quotationDetailStatus = status; updateQuotationDetail(params).then(({data}) => { if (data.code === 200) { this.initData(); this.$message.success(data.msg); } else { this.$message.warning(data.msg); } }).catch((error)=>{ this.$message.error(error); }) } },}</script>
<template><div> <div style="margin-bottom: 10px;padding-left: 10px"> <el-button type="primary" @click="quotationLeadIntoDetailFlag = true">新增</el-button> </div> <el-table v-loading="initQuotationDetailLoading" element-loading-text = "数据正在加载中" element-loading-spinner = "el-icon-loading" :data="tableData" height="360px" stripe border :header-cell-style="{background:'rgba(23,179,163)',color:'#fff'}"> <el-table-column label="操作" fixed width="120" align="center"> <template slot-scope="{row,$index}"> <el-link style="cursor: pointer" v-if="row.quotationDetailStatus !== '下达'" @click="editQuotationDetailStatus(row,'下达')">下达</el-link> <el-link style="cursor: pointer" @click="editQuotationDetail(row,$index+1)">编辑</el-link> <el-link style="cursor: pointer" @click="deleteQuotationDetailData(row)">删除</el-link> </template> </el-table-column> <el-table-column header-align="center" label="序号" width="55" align="right" type="index"> </el-table-column> <el-table-column show-overflow-tooltip label="产品编码" prop="productNo" width="140" align="center"> </el-table-column> <el-table-column show-overflow-tooltip header-align="center" label="产品名称" prop="productDesc" width="120" align="left"> </el-table-column> <el-table-column show-overflow-tooltip header-align="center" label="报价数量" prop="quotationDetailQuantity" width="80" align="right"> </el-table-column> <el-table-column label="计算后成本" align="center"> <el-table-column show-overflow-tooltip label="材料成本" prop="computePartCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="机器成本" prop="computeMachineCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="人工成本" prop="computeLabourCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="制造费用" prop="computeFabricateCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="工具成本" prop="computeToolCost" width="120" align="right" header-align="center"> </el-table-column> </el-table-column> <el-table-column label="调整后成本" align="center"> <el-table-column show-overflow-tooltip label="材料成本" prop="adjustPartCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="机器成本" prop="adjustMachineCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="人工成本" prop="adjustLabourCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="制造费用" prop="adjustFabricateCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="工具成本" prop="adjustToolCost" width="120" align="right" header-align="center"> </el-table-column> </el-table-column> <el-table-column show-overflow-tooltip label="其他成本" prop="detailOtherCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="管理成本" prop="detailManageCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="总成本" prop="detailTotalCost" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="利润率%" prop="detailProfitRate" width="80" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="利润额" prop="detailProfitAmount" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="未税单价" prop="finalUntaxedPrice" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="未税总价" prop="systemComputeAmount" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="税率%" prop="taxRate" width="90" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="含税单价" prop="finalTaxedPrice" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="含税总价" prop="systemComputePrice" width="120" align="right" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="状态" prop="quotationDetailStatus" width="80" align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="备注" prop="remark" width="80" align="left" header-align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="询价单号" prop="internalInquiryNo" width="160" align="center"> </el-table-column> <el-table-column show-overflow-tooltip label="报价次数" prop="quotationDetailCount" width="80" align="right" header-align="center"> </el-table-column> <div slot="empty"> <svg height="180" node-id="1" sillyvg="true" template-height="1024" template-width="1024" version="1.1" viewBox="0 0 1024 1024" width="1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs node-id="115"><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28" node-id="5" spreadMethod="pad" x1="26305.36" x2="26384.72" y1="-42886.72" y2="-42888.098"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28-2" node-id="8" spreadMethod="pad" x1="26305.36" x2="26384.72" y1="-42886.72" y2="-42888.098"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_3" node-id="9" spreadMethod="pad" x1="198806.11" x2="199736.11" y1="-228966.97" y2="-228966.97"><stop offset="0" stop-color="#fff5de"/><stop offset="1" stop-color="#fbd2ac"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28-3" node-id="12" spreadMethod="pad" x1="15798.319" x2="15845.487" y1="-23888.906" y2="-23889.418"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28-4" node-id="13" spreadMethod="pad" x1="10883.409" x2="10916.618" y1="-16576.174" y2="-16576.527"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28-5" node-id="14" spreadMethod="pad" x1="10883.409" x2="10916.618" y1="-16576.174" y2="-16576.527"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28-6" node-id="15" spreadMethod="pad" x1="7478.883" x2="7501.544" y1="-11524.333" y2="-11524.578"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientTransform="matrix(269.22 47.47 27.01 -153.15 -82548.68 133303.42)" gradientUnits="userSpaceOnUse" id="未命名的渐变_28-7" node-id="16" spreadMethod="pad" x1="213.04" x2="213.68" y1="931.65" y2="931.72"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientTransform="matrix(50.26 -50.26 -135.69 -135.69 115943.22 138005.55)" gradientUnits="userSpaceOnUse" id="未命名的渐变_13" node-id="17" spreadMethod="pad" x1="213.03" x2="213.21" y1="932.64" y2="932.57"><stop offset="0.03" stop-color="#afdef9"/><stop offset="1" stop-color="#7cc9f9"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28-8" node-id="20" spreadMethod="pad" x1="43370.684" x2="43480.617" y1="-201779.2" y2="-201831.23"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientTransform="matrix(64.64 -31.53 -95 -194.77 74960.15 188980.58)" gradientUnits="userSpaceOnUse" id="未命名的渐变_13-2" node-id="21" spreadMethod="pad" x1="212.15" x2="212.28" y1="932.39" y2="932.32"><stop offset="0.03" stop-color="#afdef9"/><stop offset="1" stop-color="#7cc9f9"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28-9" node-id="22" spreadMethod="pad" x1="23507.504" x2="23531.85" y1="-226021.66" y2="-226160.14"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color="#47b0f1"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_13-3" node-id="23" spreadMethod="pad" x1="15016.36" x2="15028.444" y1="-178656.97" y2="-178643.53"><stop offset="0.03" stop-color="#afdef9"/><stop offset="1" stop-color="#7cc9f9"/></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="未命名的渐变_28-10" node-id="24" spreadMethod="pad" x1="8457.1875" x2="8441.035" y1="-33805.3" y2="-33833.215"><stop offset="0" stop-color="#98d6fa"/><stop offset="1" stop-color= <p><span>暂无数据</span></p> </div> </el-table> <el-pagination style="margin-top: 0px" @size-change="detailSizeChange" @current-change="detailCurrentChange" :current-page="no" :page-sizes="[20, 50, 100, 200, 500]" :page-size="size" :total="total" layout="total,sizes, prev, pager, next, jumper"> </el-pagination>
<el-dialog title="新增报价明细" v-drag @open="openInsertQuotationDetail" @close="closeInsertQuotationDetail" :visible.sync="quotationLeadIntoDetailFlag" width="40%" :close-on-click-modal="false"> <el-form :model="quotationDetail" ref="insertQuotationDetailForm" :rules="quotationDetailRules" label-position="top"> <el-row :gutter="10"> <el-col :span="8"> <el-form-item label="产品编码" prop="productNo"> <span slot="label" style="" @click="projectPartDialogFlag = true"><a>产品编码</a></span> <el-input v-model="quotationDetail.productNo" clearable/> </el-form-item> </el-col> <el-col :span="14"> <el-form-item label="产品名称" prop="productDesc"> <el-input v-model="quotationDetail.productDesc" disabled clearable/> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="报价数量" prop="quotationDetailQuantity"> <el-input-number style="width: 100%;margin-top: -5px;" :min="1" v-model="quotationDetail.quotationDetailQuantity" :controls="false"></el-input-number> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="22"> <el-form-item label=""> <el-checkbox v-model="quotationDetail.flag">保存进入报价界面</el-checkbox> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="22"> <el-form-item label="备注" style="display: block;min-height: 80px" prop="remark"> <el-input type="textarea" resize="none" v-model="quotationDetail.remark" :autosize="{minRows: 3, maxRows: 3}" style="min-height: 80px"/> </el-form-item> </el-col> </el-row> </el-form> <div slot="footer" class="dialog-footer" style="margin-top: 20px"> <el-button type="primary" :loading="insertQuotationDetailLoading" @click="insertQuotationDetailBtn">保 存</el-button> <el-button @click="quotationLeadIntoDetailFlag = false">关 闭</el-button> </div> </el-dialog> <el-dialog v-drag :fullscreen="fullscreen" :visible.sync="quotationDetailFlag" @open="openQuotationDetail" @close="closeDetailEditDialog" width="60%" top="10vh" :close-on-click-modal="false"> <div slot="title" class="medium"> <div> <span class="el-dialog__title">报价单号 {{this.header.quotationNo+"-"+this.header.versionCode+"-"+index}}</span> <span style="float: right;margin-right: 30px;cursor:pointer;" @click="fullscreen = !fullscreen"> <svg v-if="!fullscreen" t="1710144122404" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4774" width="16" height="16"><path d="M145.066667 85.333333h153.6c25.6 0 42.666667-17.066667 42.666666-42.666666S324.266667 0 298.666667 0H34.133333C25.6 0 17.066667 8.533333 8.533333 17.066667 0 25.6 0 34.133333 0 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666666s42.666667-17.066667 42.666666-42.666666V145.066667l230.4 230.4c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733334L145.066667 85.333333z m170.666666 563.2L162.133333 802.133333l-76.8 76.8V725.333333C85.333333 699.733333 68.266667 682.666667 42.666667 682.666667s-42.666667 17.066667-42.666667 42.666666v256c0 25.6 17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666H145.066667l76.8-76.8 153.6-153.6c17.066667-17.066667 17.066667-42.666667 0-59.733334-17.066667-17.066667-42.666667-17.066667-59.733334 0z m665.6 34.133334c-25.6 0-42.666667 17.066667-42.666666 42.666666v153.6l-76.8-76.8-153.6-153.6c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733334l153.6 153.6 76.8 76.8H725.333333c-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666666z m0-682.666667h-256c-25.6 0-42.666667 17.066667-42.666666 42.666667s17.066667 42.666667 42.666666 42.666666h153.6l-76.8 76.8-153.6 153.6c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733334 0l153.6-153.6 76.8-76.8v153.6c0 25.6 17.066667 42.666667 42.666666 42.666666s42.666667-17.066667 42.666667-42.666666v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z" fill="#8a8a8a" p-id="4775"></path></svg> <svg v-else t="1710143735808" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4603" width="16" height="16"><path d="M354.133333 682.666667H256v-42.666667h170.666667v170.666667H384v-98.133334L243.2 853.333333l-29.866667-29.866666L354.133333 682.666667z m358.4 0l140.8 140.8-29.866666 29.866666-140.8-140.8V810.666667h-42.666667v-170.666667h170.666667v42.666667h-98.133334zM354.133333 384L213.333333 243.2l29.866667-29.866667L384 354.133333V256h42.666667v170.666667H256V384h98.133333z m358.4 0H810.666667v42.666667h-170.666667V256h42.666667v98.133333L823.466667 213.333333l29.866666 29.866667L712.533333 384z" fill="#444444" p-id="4604"></path></svg> </span> </div> </div> <el-form :rules="quotationDetailRules" style="margin-top: 5px" ref="quotationDetailForm" :model="quotationDetail" label-width="80px" :inline="true" label-position="top"> <el-form-item label="产品编码" prop="productNo"> <el-input clearable disabled style="width: 160px" v-model="quotationDetail.productNo"/> </el-form-item> <el-form-item label="产品名称" prop="productDesc"> <el-input clearable disabled style="width: 200px" v-model="quotationDetail.productDesc"/> </el-form-item> <el-form-item label="报价数量" prop="quotationDetailQuantity"> <el-input-number disabled style="width: 100%;margin-top: -5px;" :min="1" v-model="quotationDetail.quotationDetailQuantity" :controls="false"></el-input-number> </el-form-item> <el-form-item label="备注" style="display: block;min-height: 90px;width: 60%"> <el-input type="textarea" resize="none" disabled v-model="quotationDetail.remark" :autosize="{minRows: 3, maxRows: 3}" style="min-height: 80px" /> </el-form-item> </el-form> <el-tabs v-model="activeName" @tab-click="tabClick" :style="{height:`${fullscreen?740:500}px`}" border stripe> <el-tab-pane name="bom" label="材料"> <bill-of-materiel ref="bom" v-if="quotationDetailFlag" :height="fullscreen?655:415" :detail="quotationDetail"></bill-of-materiel> </el-tab-pane> <el-tab-pane name="routing" label="工艺"> <quote-routing ref="routing" v-if="quotationDetailFlag" :height="fullscreen?655:415" :detail="quotationDetail"></quote-routing> </el-tab-pane> <el-tab-pane name="tool" label="工具"> <tool-quotation ref="tool" v-if="quotationDetailFlag" :height="fullscreen?660:420" :detail="quotationDetail"></tool-quotation> </el-tab-pane> <el-tab-pane name="property" label="成品属性"> <property-templates ref="property" v-if="quotationDetailFlag" :height="fullscreen?660:420" :detail="quotationDetail" ></property-templates> </el-tab-pane> <el-tab-pane name="cost" label="成本&价格"> <cost-price ref="cost" v-if="quotationDetailFlag" :height="fullscreen?660:420" :detail="quotationDetail"></cost-price> </el-tab-pane> </el-tabs> <div slot="footer" style="padding-top: 10px"> <el-button type="primary" :loading="editQuotationDetailLoading" @click="saveQuotationDetail">确 定</el-button> <el-button @click=" quotationDetailFlag= false">取 消</el-button> </div> </el-dialog>
<el-dialog v-drag title="产品列表" @close="closeProjectPartDialog" @open="openProjectPartDialog" :visible.sync="projectPartDialogFlag"> <!--搜索条件--> <el-form :model="projectPartData" ref="projectPartDataForm" :inline="true" label-position="top"> <el-form-item label="产品编号" prop="toolNo"> <el-input v-model="projectPartData.testPartNo" clearable/> </el-form-item> <el-form-item label="产品名称" prop="toolDescription"> <el-input v-model="projectPartData.partDesc" clearable/> </el-form-item> <el-form-item label=" "> <el-button @click="getProjectPartList" type="primary"> 查 询 </el-button> </el-form-item> </el-form> <el-table height="300px" stripe border width="30%" @row-dblclick="dblClickProjectPartTable" :data="projectPartTable" ref="projectPartDataTable" :style="{marginTop:'10px'}"> <el-table-column v-for="(item,index) in projectPartDetailList" :key="index" :sortable="item.columnSortable" :prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip" :align="item.align" :fixed="item.fixed===''?false:item.fixed" :min-width="item.columnWidth" :label="item.columnLabel"> <template slot-scope="scope"> <span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> </template> </el-table-column> </el-table> </el-dialog></div></template>
<style scoped>.el-input-number /deep/ .el-input__inner{ text-align: right; padding-right: 5px !important;}</style>
|