|
|
|
@ -243,91 +243,218 @@ |
|
|
|
<el-tab-pane name="index" label="材料"> |
|
|
|
<el-button type="primary" @click="quotationPartDialogFlag = true">新 增</el-button> |
|
|
|
<el-button type="primary">从其他报价单复制</el-button> |
|
|
|
<el-table style="margin-top: 5px" :data="quotationPartList" height="400"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
width="55" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="120" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link style="cursor: pointer">编辑</el-link> |
|
|
|
<el-link style="cursor: pointer">删除</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column type="index" width="50" align="center" label="序号"/> |
|
|
|
<el-table-column label="材料编码" align="center"/> |
|
|
|
<el-table-column label="材料名称" align="center"/> |
|
|
|
<el-table-column label="计量单位" align="center"/> |
|
|
|
<el-table-column label="单位用量" align="center"/> |
|
|
|
<el-table-column label="损耗率" align="center"/> |
|
|
|
<el-table-column label="调机用量" align="center"/> |
|
|
|
<el-table-column label="单位成本" align="center"/> |
|
|
|
<el-table-column label="备注" align="center"/> |
|
|
|
</el-table> |
|
|
|
<el-button type="primary" @click="deleteSelectionQuotationPart">批 量 删 除</el-button> |
|
|
|
<el-form :model="quotationPartFormTable" :rules="quotationPartRules" ref="quotationPartTableForm"> |
|
|
|
<el-table style="margin-top: 5px" v-loading="partTableFlag" |
|
|
|
element-loading-text="拼命加载中" |
|
|
|
element-loading-spinner="el-icon-loading" |
|
|
|
:data="quotationPartFormTable.quotationPartList" height="400" |
|
|
|
@selection-change="handleSelectionChangeQuotationPartTable"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
width="55" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="120" align="center"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-link style="cursor: pointer" @click="deleteQuotationPart($index)">删除</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column type="index" width="50" align="center" label="序号"/> |
|
|
|
<el-table-column label="材料编码" align="center" show-overflow-tooltip prop="quotationPartNo"/> |
|
|
|
<el-table-column label="材料名称" align="center" show-overflow-tooltip prop="quotationPartDesc"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationPartList.'+$index+'.quotationPartDesc'" :rules="quotationPartRules.quotationPartDesc"> |
|
|
|
<el-input :ref="'quotationPartDesc_'+$index" @keyup.native.enter="enterKeyUpFun('quotationPartDesc_'+($index+1))" v-model="row.quotationPartDesc" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="计量单位" align="center" show-overflow-tooltip prop="umId"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationPartList.'+$index+'.umId'" :rules="quotationPartRules.umId"> |
|
|
|
<el-select v-model="row.umId" :disabled="quotationPart.quotationPartNo === '*'" style="width: 100%" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in umInformationList" |
|
|
|
:key="item.umId" |
|
|
|
:label="item.umName" |
|
|
|
:value="item.umId" style="width: 160px"> |
|
|
|
<span style="float: left">{{item.umName }}</span> |
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px"> |
|
|
|
{{ item.umId}} |
|
|
|
</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单位用量" align="center" show-overflow-tooltip prop="unitDosage"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationPartList.'+$index+'.unitDosage'" :rules="quotationPartRules.unitDosage"> |
|
|
|
<el-input :ref="'unitDosage_'+$index" @keyup.native.enter="enterKeyUpFun('unitDosage_'+($index+1))" v-model="row.unitDosage" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="损耗率%" align="center" show-overflow-tooltip prop="attritionRate"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationPartList.'+$index+'.attritionRate'" :rules="quotationPartRules.attritionRate"> |
|
|
|
<el-input :ref="'attritionRate_'+$index" @keyup.native.enter="enterKeyUpFun('attritionRate_'+($index+1))" v-model="row.attritionRate" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="调机用量" align="center" show-overflow-tooltip prop="transferAmount"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationPartList.'+$index+'.transferAmount'" :rules="quotationPartRules.transferAmount"> |
|
|
|
<el-input :ref="'transferAmount_'+$index" @keyup.native.enter="enterKeyUpFun('transferAmount_'+($index+1))" v-model="row.transferAmount" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单位成本" align="center" show-overflow-tooltip prop="unitCost"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationPartList.'+$index+'.unitCost'" :rules="quotationPartRules.unitCost"> |
|
|
|
<el-input :ref="'partUnitCost_'+$index" @keyup.native.enter="enterKeyUpFun('partUnitCost_'+($index+1))" v-model="row.unitCost" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" align="center" show-overflow-tooltip prop="remark"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationPartList.'+$index+'.remark'" :rules="quotationPartRules.remark"> |
|
|
|
<el-input :ref="'partRemark_'+$index" @keyup.native.enter="enterKeyUpFun('partRemark_'+($index+1))" v-model="row.remark" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="工艺"> |
|
|
|
<el-button type="primary" @click="quotationRoutingDialogFlag = true">新 增</el-button> |
|
|
|
<el-button type="primary">从其他报价单复制</el-button> |
|
|
|
<el-button type="primary" @click="deleteSelectionQuotationBtn">批 量 删 除</el-button> |
|
|
|
<el-table style="margin-top: 5px" :data="quotationRoutingList" height="400" @selection-change="handleSelectionChangeQuotationRoutingTable"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
width="55" |
|
|
|
fixed |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="80" align="center" fixed> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-link style="cursor: pointer" @click="deleteQuotationRoutingBtn($index)">删除</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="50" align="center" label="序号" type="index" show-overflow-tooltip/> |
|
|
|
<el-table-column align="center" label="工序编码" prop="quotationRoutingNo" show-overflow-tooltip/> |
|
|
|
<el-table-column align="center" label="工序名称" prop="quotationRoutingDesc" show-overflow-tooltip/> |
|
|
|
<el-table-column align="center" label="加工中心编码" width="120" prop="machiningCenterNo" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-select v-model="row.machiningCenterNo" style="width: 100%" @change="(val) => changeWorkCenterSelect(val, row)" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in workCenterList" |
|
|
|
:key="item.workCenterNo" |
|
|
|
:label="item.workCenterNo" |
|
|
|
:value="item.workCenterNo"> |
|
|
|
<span style="float: left">{{ item.workCenterNo }}</span> |
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 100px"> |
|
|
|
{{ item.workCenterDesc }} |
|
|
|
</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="加工中心名称" align="center" width="120" prop="machiningCenterDesc" show-overflow-tooltip/> |
|
|
|
<el-table-column label="加工中心类别" align="center" width="120" prop="machiningCenterType" show-overflow-tooltip/> |
|
|
|
<el-table-column label="调机时间" align="center" width="60" prop="machiningSetupTime" show-overflow-tooltip/> |
|
|
|
<el-table-column label="单位产出量" align="center" width="120" prop="unitOutputQuantity" show-overflow-tooltip/> |
|
|
|
<el-table-column label="产出单位" align="center" width="120" prop="umName" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-select v-model="row.umId" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in umInformationList" |
|
|
|
:key="item.umId" |
|
|
|
:label="item.umName" |
|
|
|
:value="item.umId"> |
|
|
|
<span style="float: left">{{ item.umName }}</span> |
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.umId }}</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="效率" align="center" width="60" prop="routingEfficiency" show-overflow-tooltip/> |
|
|
|
<el-table-column label="操作工人数" align="center" width="120" prop="operatorsNumber" show-overflow-tooltip/> |
|
|
|
<el-table-column label="单位机械成本" align="center" width="120" prop="unitMachineryCost" show-overflow-tooltip/> |
|
|
|
<el-table-column label="单位人工成本" align="center" width="120" prop="unitLaborCost" show-overflow-tooltip/> |
|
|
|
<el-table-column label="单位制造费用" align="center" width="120" prop="unitManufacturingCost" show-overflow-tooltip/> |
|
|
|
<el-table-column label="单位报价成本" align="center" width="120" prop="unitQuotedCost" show-overflow-tooltip/> |
|
|
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/> |
|
|
|
</el-table> |
|
|
|
<el-button type="primary" @click="deleteSelectionQuotationRoutingBtn">批 量 删 除</el-button> |
|
|
|
<el-form ref="quotationRoutingTableForm" :model="quotationRoutingFormTable" :rules="quotationRoutingRules"> |
|
|
|
<el-table style="margin-top: 5px" :data="quotationRoutingFormTable.quotationRoutingList" height="400" @selection-change="handleSelectionChangeQuotationRoutingTable"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
width="55" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="80" align="center"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-link style="cursor: pointer" @click="deleteQuotationRoutingBtn($index)">删除</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="50" align="center" label="序号" type="index" show-overflow-tooltip/> |
|
|
|
<el-table-column align="center" label="工序编码" prop="quotationRoutingNo" show-overflow-tooltip/> |
|
|
|
<el-table-column align="center" width="120" label="工序名称" prop="quotationRoutingDesc" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.quotationRoutingDesc'" :rules="quotationRoutingRules.quotationRoutingDesc"> |
|
|
|
<el-input :disabled="row.quotationRoutingNo.trim() !=='*'" :ref="'quotationRoutingDesc_'+$index" @keyup.native.enter="enterKeyUpFun('quotationRoutingDesc_'+($index+1))" v-model="row.quotationRoutingDesc" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column align="center" label="加工中心编码" width="120" prop="machiningCenterNo" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.machiningCenterNo'" :rules="quotationRoutingRules.machiningCenterNo"> |
|
|
|
<el-select v-model="row.machiningCenterNo" filterable style="width: 100%" @change="(val) => changeWorkCenterSelect(val, row)" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in workCenterList" |
|
|
|
:key="item.workCenterNo" |
|
|
|
:label="item.workCenterNo" |
|
|
|
:value="item.workCenterNo"> |
|
|
|
<span style="float: left;width: 80px">{{ item.workCenterNo }}</span> |
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 100px"> |
|
|
|
{{ item.workCenterDesc }} |
|
|
|
</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="加工中心名称" align="center" width="120" prop="machiningCenterDesc" show-overflow-tooltip/> |
|
|
|
<el-table-column label="加工中心类别" align="center" width="120" prop="machiningCenterType" show-overflow-tooltip/> |
|
|
|
<el-table-column label="调机时间" align="center" width="120" prop="machiningSetupTime" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.machiningSetupTime'" :rules="quotationRoutingRules.machiningSetupTime"> |
|
|
|
<el-input :ref="'machiningSetupTime_'+$index" @keyup.native.enter="enterKeyUpFun('machiningSetupTime_'+($index+1))" v-model="row.machiningSetupTime" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单位产出量" align="center" width="120" prop="unitOutputQuantity" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.unitOutputQuantity'" :rules="quotationRoutingRules.unitOutputQuantity"> |
|
|
|
<el-input @keyup.native.enter="enterKeyUpFun('unitOutputQuantity_'+($index+1))" v-model="row.unitOutputQuantity" :ref="'unitOutputQuantity_'+$index" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="产出单位" align="center" width="120" prop="outputUnit" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.outputUnit'" :rules="quotationRoutingRules.outputUnit"> |
|
|
|
<el-select v-model="row.outputUnit" clearable |
|
|
|
filterable allow-create |
|
|
|
@blur="(e)=>outputUnitSelect(e,row)" |
|
|
|
default-first-option placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in outputUnitList" |
|
|
|
:key="item.label" |
|
|
|
:label="item.label" |
|
|
|
:value="item.label"> |
|
|
|
<span style="float: left">{{ item.label }}</span> |
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="效率" align="center" width="120" prop="routingEfficiency" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.routingEfficiency'" :rules="quotationRoutingRules.routingEfficiency"> |
|
|
|
<el-input :ref="'routingEfficiency_'+$index" @keyup.native.enter="enterKeyUpFun('routingEfficiency_'+($index+1))" v-model="row.routingEfficiency" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作工人数" align="center" width="120" prop="operatorsNumber" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.operatorsNumber'" :rules="quotationRoutingRules.operatorsNumber"> |
|
|
|
<el-input :ref="'operatorsNumber_'+$index" @keyup.native.enter="enterKeyUpFun('operatorsNumber_'+($index+1))" v-model="row.operatorsNumber" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单位机械成本" align="center" width="120" prop="unitMachineryCost" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.unitMachineryCost'" :rules="quotationRoutingRules.unitMachineryCost"> |
|
|
|
<el-input :ref="'unitMachineryCost_'+$index" @keyup.native.enter="enterKeyUpFun('unitMachineryCost_'+($index+1))" v-model="row.unitMachineryCost" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单位人工成本" align="center" width="120" prop="unitLaborCost" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.unitLaborCost'" :rules="quotationRoutingRules.unitLaborCost"> |
|
|
|
<el-input :ref="'unitLaborCost_'+$index" @keyup.native.enter="enterKeyUpFun('unitLaborCost_'+($index+1))" v-model="row.unitLaborCost" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单位制造费用" align="center" width="120" prop="unitManufacturingCost" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.unitManufacturingCost'" :rules="quotationRoutingRules.unitManufacturingCost"> |
|
|
|
<el-input :ref="'unitManufacturingCost_'+$index" @keyup.native.enter="enterKeyUpFun('unitManufacturingCost_'+($index+1))" v-model="row.unitManufacturingCost" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="单位报价成本" align="center" width="120" prop="unitQuotedCost" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-form-item :prop="'quotationRoutingList.'+$index+'.unitQuotedCost'" :rules="quotationRoutingRules.unitQuotedCost"> |
|
|
|
<el-input :ref="'unitQuotedCost_'+$index" @keyup.native.enter="enterKeyUpFun('unitQuotedCost_'+($index+1))" v-model="row.unitQuotedCost" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" align="center" width="140" prop="remark" show-overflow-tooltip> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-input :ref="'partRemark_'+$index" @keyup.native.enter="enterKeyUpFun('partRemark_'+($index+1))" v-model="row.remark" clearable/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
<!--======================工具========================--> |
|
|
|
<el-tab-pane label="工具"> |
|
|
|
<el-button type="primary" @click="saveQuotationToolFlag = true">新 增</el-button> |
|
|
|
<el-button type="primary">从其他报价单复制</el-button> |
|
|
|
@ -635,13 +762,13 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="6" > |
|
|
|
<el-form-item label="加工中心编码" prop="machiningCenterNo"> |
|
|
|
<el-select v-model="quotationRouting.machiningCenterNo" clearable style="width: 100%" @change="(val) => changeWorkCenterSelect(val, quotationRouting)" placeholder="请选择"> |
|
|
|
<el-select v-model="quotationRouting.machiningCenterNo" filterable clearable style="width: 100%" @change="(val) => changeWorkCenterSelect(val, quotationRouting)" placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in workCenterList" |
|
|
|
:key="item.workCenterNo" |
|
|
|
:label="item.workCenterNo" |
|
|
|
:value="item.workCenterNo"> |
|
|
|
<span style="float: left">{{ item.workCenterNo }}</span> |
|
|
|
<span style="float: left;width: 80px">{{ item.workCenterNo }}</span> |
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 100px"> |
|
|
|
{{ item.workCenterDesc }} |
|
|
|
</span> |
|
|
|
@ -670,47 +797,47 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" :offset="2"> |
|
|
|
<el-form-item label="单位" prop="umId"> |
|
|
|
<el-select v-model="quotationRouting.umId" style="width: 100%" clearable placeholder="请选择"> |
|
|
|
<el-form-item label="产出单位" prop="outputUnit"> |
|
|
|
<el-select v-model="quotationRouting.outputUnit" filterable allow-create |
|
|
|
@blur="(e)=>outputUnitSelect(e,quotationRouting)" |
|
|
|
default-first-option style="width: 100%" clearable placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in umInformationList" |
|
|
|
:key="item.umId" |
|
|
|
:label="item.umName" |
|
|
|
:value="item.umId"> |
|
|
|
<span style="float: left">{{ item.umName }}</span> |
|
|
|
<span style="float: right; color: #8492a6; font-size: 11px">{{ item.umId }}</span> |
|
|
|
v-for="item in outputUnitList" |
|
|
|
:key="item.label" |
|
|
|
:label="item.label" |
|
|
|
:value="item.label"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" > |
|
|
|
<el-form-item label="效率" prop="routingEfficiency"> |
|
|
|
<el-input v-model="quotationRouting.routingEfficiency" style="width: 100%" :controls="false" :min="1"></el-input> |
|
|
|
<el-input v-model="quotationRouting.routingEfficiency"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" :offset="2"> |
|
|
|
<el-form-item label="操作工人数" prop="operatorsNumber"> |
|
|
|
<el-input v-model="quotationRouting.operatorsNumber" style="width: 100%" :controls="false" :min="1"></el-input> |
|
|
|
<el-input v-model="quotationRouting.operatorsNumber"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" :offset="2"> |
|
|
|
<el-form-item label="单位机械成本" prop="unitMachineryCost"> |
|
|
|
<el-input v-model="quotationRouting.unitMachineryCost" style="width: 100%" :controls="false" :min="1"></el-input> |
|
|
|
<el-input v-model="quotationRouting.unitMachineryCost"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" > |
|
|
|
<el-form-item label="单位人工成本" prop="unitLaborCost"> |
|
|
|
<el-input v-model="quotationRouting.unitLaborCost" style="width: 100%" :controls="false" :min="1"></el-input> |
|
|
|
<el-input v-model="quotationRouting.unitLaborCost"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" :offset="2"> |
|
|
|
<el-form-item label="单位制造费用" prop="unitManufacturingCost"> |
|
|
|
<el-input v-model="quotationRouting.unitManufacturingCost" style="width: 100%" :controls="false" :min="1"></el-input> |
|
|
|
<el-input v-model="quotationRouting.unitManufacturingCost"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" :offset="2"> |
|
|
|
<el-form-item label="单位报价成本" prop="unitQuotedCost"> |
|
|
|
<el-input v-model="quotationRouting.unitQuotedCost" style="width: 100%" :controls="false" :min="1"></el-input> |
|
|
|
<el-input v-model="quotationRouting.unitQuotedCost"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -728,27 +855,126 @@ |
|
|
|
<el-dialog |
|
|
|
title="报价材料" |
|
|
|
:visible.sync="quotationPartDialogFlag" |
|
|
|
@close="closeQuotationPartDialog" |
|
|
|
width="30%"> |
|
|
|
<el-form :model="quotationPart" ref="quotationPartForm" label-position="top"> |
|
|
|
<el-form :model="quotationPart" :rules="quotationPartRules" ref="quotationPartForm" label-position="top"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="材料编号" prop="quotationPartNo"> |
|
|
|
<el-input v-model="quotationPart.quotationPartNo" clearable/> |
|
|
|
<span slot="label" @click="partDialogFlag = true" style="cursor: pointer"><a>工具编码</a></span> |
|
|
|
<el-input v-model="quotationPart.quotationPartNo" :disabled="quotationPart.quotationPartDesc" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="10" :offset="2"> |
|
|
|
<el-form-item label="材料名称" prop="quotationPartDesc"> |
|
|
|
<el-input v-model="quotationPart.quotationPartDesc" clearable/> |
|
|
|
<el-input v-model="quotationPart.quotationPartDesc" :disabled="quotationPart.quotationPartNo != '*'" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="计量单位" prop="umId"> |
|
|
|
<el-select v-model="quotationPart.umId" :disabled="quotationPart.quotationPartNo != '*'" style="width: 100%" clearable placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in umInformationList" |
|
|
|
:key="item.umId" |
|
|
|
:label="item.umName" |
|
|
|
:value="item.umId"> |
|
|
|
<span style="float: left">{{item.umName }}</span> |
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 100px"> |
|
|
|
{{ item.umId}} |
|
|
|
</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="10" :offset="2"> |
|
|
|
<el-form-item label="单位用量" prop="unitDosage"> |
|
|
|
<el-input v-model="quotationPart.unitDosage" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="损耗率" prop="attritionRate"> |
|
|
|
<el-input v-model="quotationPart.attritionRate" clearable> |
|
|
|
<template slot="append">%</template> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="10" :offset="2"> |
|
|
|
<el-form-item label="调机用量" prop="transferAmount"> |
|
|
|
<el-input v-model="quotationPart.transferAmount" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="10"> |
|
|
|
<el-form-item label="单位成本" prop="unitCost"> |
|
|
|
<el-input v-model="quotationPart.unitCost" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="22"> |
|
|
|
<el-form-item label="备注" prop="remark" style="height: 80px"> |
|
|
|
<el-input type="textarea" v-model="quotationPart.remark"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="quotationPartDialogFlag = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="quotationPartDialogFlag = false">确 定</el-button> |
|
|
|
<el-button type="primary" @click="saveQuotationPartBtn">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!--材料弹框--> |
|
|
|
<el-dialog title="材料列表" @open="openPartDialog" |
|
|
|
:visible.sync="partDialogFlag"> |
|
|
|
<!--搜索条件--> |
|
|
|
<el-form :model="partData" ref="partDataForm" label-position="top"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item label="工具编号" prop="toolNo"> |
|
|
|
<el-input v-model="partData.partNo" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" :offset="1"> |
|
|
|
<el-form-item label="工具描述" prop="toolDescription"> |
|
|
|
<el-input v-model="partData.partDesc" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" :offset="1"> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="initPartList">重 置</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<!--筛选的数据--> |
|
|
|
<el-table :data="computedPartTable" ref="toolHeaderTable" :style="{marginTop:'10px'}" |
|
|
|
height="300px" stripe border width="30%" @selection-change="handleSelectionChangePartTable"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
width="55" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="材料编号" prop="partNo"/> |
|
|
|
<el-table-column label="材料描述" prop="partDesc"/> |
|
|
|
<el-table-column label="计量单位" width="200" prop="umId"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-select v-model="row.umId" disabled style="width: 100%" clearable placeholder="请选择"> |
|
|
|
<el-option |
|
|
|
v-for="item in umInformationList" |
|
|
|
:key="item.umId" |
|
|
|
:label="item.umName" |
|
|
|
:value="item.umId"> |
|
|
|
<span style="float: left">{{item.umName }}</span> |
|
|
|
<span style="float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 100px"> |
|
|
|
{{ item.umId}} |
|
|
|
</span> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 5px"> |
|
|
|
<el-button @click="partDialogFlag= false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="savePartBtn">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -763,6 +989,7 @@ import { |
|
|
|
insertQuotationRouting, |
|
|
|
updateQuotationRouting, |
|
|
|
deleteQuotationRouting, |
|
|
|
searchQuotationPart, |
|
|
|
} from '@/api/quotation/quotationHeader.js'; |
|
|
|
import { |
|
|
|
searchUmInformationList, // 单位信息列表查询 |
|
|
|
@ -773,6 +1000,9 @@ import { |
|
|
|
import { |
|
|
|
searchWorkCenter, // 加工中心查询 |
|
|
|
} from '@/api/part/workCenter.js'; |
|
|
|
import { |
|
|
|
searchPartList, // 材料查询 |
|
|
|
} from '@/api/part/partInformation.js'; |
|
|
|
export default { |
|
|
|
props: ['quotationHeader'], |
|
|
|
name: "quotationDetail", |
|
|
|
@ -786,11 +1016,19 @@ export default { |
|
|
|
selectionQuotationToolList:[],//选中的报价工具集合 |
|
|
|
toolHeaderList:[],//工具集合 |
|
|
|
selectionToolHeaderList:[],//选中的工具集合 |
|
|
|
quotationRoutingList: [],//工艺记录集合 |
|
|
|
quotationRoutingFormTable:{ |
|
|
|
quotationRoutingList:[],//工艺记录集合 |
|
|
|
}, |
|
|
|
selectionQuotationRoutingList:[],//选中的工艺记录集合 |
|
|
|
umInformationList:[],// 单位集合 |
|
|
|
outputUnitList:[{label:"单位/小时"},{label: "小时/单位"},{label: "小时"}],// 产出单位集合 |
|
|
|
workCenterList:[],// 加工中心集合 |
|
|
|
quotationPartList: [],// 材料对象集合 |
|
|
|
partList:[],//材料信息集合 |
|
|
|
quotationPartFormTable:{ |
|
|
|
quotationPartList: [],// 材料对象集合 |
|
|
|
}, |
|
|
|
selectionQuotationPartList:[],//选中的报价材料集合 |
|
|
|
selectionPartList:[],//选中的材料集合 |
|
|
|
// ===================================================分页参数====================================== |
|
|
|
no: 1,//当前页 |
|
|
|
size: 20,//每页条数 |
|
|
|
@ -802,12 +1040,14 @@ export default { |
|
|
|
toolHeaderDialogFlag:false,// 报价工具头表弹框 |
|
|
|
quotationRoutingDialogFlag: false,// 工艺新增弹框 |
|
|
|
quotationPartDialogFlag:false,// 报价材料新增弹框 |
|
|
|
|
|
|
|
partDialogFlag:false,// 材料信息弹框 |
|
|
|
// =============================================新增报价明细的开关========================================== |
|
|
|
//新增 报价详情数据 |
|
|
|
insertQuotationDetailData: { |
|
|
|
flag: false, |
|
|
|
}, |
|
|
|
// =============================================表格加载状态 ================================================ |
|
|
|
partTableFlag:true, |
|
|
|
// ==============================================标签页================================================ |
|
|
|
activeName: "index",//选择的标签页 |
|
|
|
// ===============================================参数对象========================================== |
|
|
|
@ -819,7 +1059,11 @@ export default { |
|
|
|
site:this.$store.state.user.site,//工厂编码 |
|
|
|
quotationPartNo:undefined,//报价材料编码 |
|
|
|
quotationPartDesc:undefined,//报价材料名称 |
|
|
|
quotationPartQuantity:undefined,//报价材料数量 |
|
|
|
umId:undefined,//计量单位 |
|
|
|
unitDosage:undefined,//单位用量 |
|
|
|
attritionRate:undefined,//损耗率 |
|
|
|
transferAmount:undefined,//调机用量 |
|
|
|
unitCost:undefined,//单位成本 |
|
|
|
remark:undefined,//备注 |
|
|
|
}, |
|
|
|
//报价明细新增对象 |
|
|
|
@ -882,7 +1126,7 @@ export default { |
|
|
|
machiningCenterType:undefined,//加工中心类别 |
|
|
|
machiningSetupTime:undefined,//调机时间 |
|
|
|
unitOutputQuantity:undefined,//单位产出量 |
|
|
|
umId:undefined,//单位编码 |
|
|
|
outputUnit:undefined,//单位编码 |
|
|
|
routingEfficiency:undefined,//效率 |
|
|
|
operatorsNumber:undefined,//操作工人数 |
|
|
|
unitMachineryCost:undefined,//单位机械成本 |
|
|
|
@ -907,6 +1151,11 @@ export default { |
|
|
|
toolNo:undefined,// 编号 |
|
|
|
toolDescription:undefined,// 描述 |
|
|
|
}, |
|
|
|
// 材料列表筛选对象 |
|
|
|
partData:{ |
|
|
|
partNo:undefined,// 编号 |
|
|
|
partDesc:undefined, |
|
|
|
}, |
|
|
|
// ================================================表单校验规则====================================== |
|
|
|
// 报价详情表单校验 |
|
|
|
quotationDetailRules: { |
|
|
|
@ -1014,8 +1263,9 @@ export default { |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
umId: [ |
|
|
|
outputUnit: [ |
|
|
|
{required: true, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
routingEfficiency: [ |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'}, |
|
|
|
@ -1042,6 +1292,37 @@ export default { |
|
|
|
{required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
}, |
|
|
|
//报价材料 |
|
|
|
quotationPartRules:{ |
|
|
|
quotationPartNo:[ |
|
|
|
{required: true, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
quotationPartDesc:[ |
|
|
|
{required: true, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
umId:[ |
|
|
|
{required: true, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
unitDosage:[ |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
attritionRate:[ |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
transferAmount: [ |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
unitCost:[ |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'change'}, |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
}, |
|
|
|
// =========================================参数列表================================= |
|
|
|
// 报价明细 参数列表 |
|
|
|
quotationDetailColumns: [ |
|
|
|
@ -1077,7 +1358,7 @@ export default { |
|
|
|
{label: "machiningCenterType", value: "加工中心类别"}, |
|
|
|
{label: "machiningSetupTime", value: "调机时间"}, |
|
|
|
{label: "unitOutputQuantity", value: "单位产出量"}, |
|
|
|
{label: "umId", value: "单位编码"}, |
|
|
|
{label: "outputUnit", value: "产出单位"}, |
|
|
|
{label: "routingEfficiency", value: "效率"}, |
|
|
|
{label: "operatorsNumber", value: "操作工人数"}, |
|
|
|
{label: "unitMachineryCost", value: "单位机械成本"}, |
|
|
|
@ -1085,6 +1366,16 @@ export default { |
|
|
|
{label: "unitManufacturingCost", value: "单位制造费用"}, |
|
|
|
{label: "unitQuotedCost", value: "单位报价成本"}, |
|
|
|
], |
|
|
|
// 材料 |
|
|
|
quotationPartColumns:[ |
|
|
|
{label:"quotationPartNo",value:"材料编号"}, |
|
|
|
{label: "quotationPartDesc", value: "材料名称"}, |
|
|
|
{label: "umId",value: "计量单位"}, |
|
|
|
{label: "unitDosage", value: "单位用量"}, |
|
|
|
{label: "attritionRate", value: "损耗率"}, |
|
|
|
{label: "transferAmount", value: "调机用量"}, |
|
|
|
{label: "unitCost", value: "单位成本"}, |
|
|
|
], |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
@ -1110,7 +1401,30 @@ export default { |
|
|
|
return tableData; |
|
|
|
} |
|
|
|
return this.toolHeaderList; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 材料计算属性 |
|
|
|
computedPartTable:function (){ |
|
|
|
let searchPartNo = this.partData.partNo; |
|
|
|
let searchPartDescription = this.partData.partDesc; |
|
|
|
if (searchPartNo || searchPartDescription){ |
|
|
|
let tableData = JSON.parse(JSON.stringify(this.partList)); |
|
|
|
if (searchPartNo && searchPartDescription){ |
|
|
|
tableData = tableData.filter(item=>{ |
|
|
|
return item.partNo.includes(searchPartNo) && item.partDesc.includes(searchPartDescription); |
|
|
|
}) |
|
|
|
}else if (searchPartNo){ |
|
|
|
tableData = tableData.filter(item=>{ |
|
|
|
return item.partNo.includes(searchPartNo) ; |
|
|
|
}) |
|
|
|
}else { |
|
|
|
tableData = tableData.filter(item=>{ |
|
|
|
return item.partDesc.includes(searchPartDescription); |
|
|
|
}) |
|
|
|
} |
|
|
|
return tableData; |
|
|
|
} |
|
|
|
return this.partList; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
// 父组件值发生改变,修改子组件的值 |
|
|
|
@ -1184,6 +1498,7 @@ export default { |
|
|
|
}, |
|
|
|
// 报价工具 批量删除 |
|
|
|
deleteSelectionQuotationTool(){ |
|
|
|
console.log(this.selectionQuotationToolList.length) |
|
|
|
this.selectionQuotationToolList.reverse().forEach(item => { |
|
|
|
this.quotationToolFormTable.quotationToolList.splice(item.index,1); |
|
|
|
}); |
|
|
|
@ -1192,20 +1507,33 @@ export default { |
|
|
|
}, |
|
|
|
// 报价工艺删除 |
|
|
|
deleteQuotationRoutingBtn(index){ |
|
|
|
this.quotationRoutingList.splice(index,1); |
|
|
|
this.quotationRoutingFormTable.quotationRoutingList.splice(index,1); |
|
|
|
// 计算价格 |
|
|
|
|
|
|
|
this.$message.success("删除成功!"); |
|
|
|
}, |
|
|
|
// 报价工艺批量删除 |
|
|
|
deleteSelectionQuotationBtn(){ |
|
|
|
deleteSelectionQuotationRoutingBtn(){ |
|
|
|
this.selectionQuotationRoutingList.reverse().forEach(item => { |
|
|
|
this.quotationRoutingList.splice(item.index,1); |
|
|
|
this.quotationRoutingFormTable.quotationRoutingList.splice(item.index,1); |
|
|
|
}); |
|
|
|
// 计算价格 |
|
|
|
|
|
|
|
this.$message.success("删除成功!"); |
|
|
|
}, |
|
|
|
// 报价材料删除 |
|
|
|
deleteQuotationPart(index){ |
|
|
|
this.quotationPartFormTable.quotationPartList.splice(index,1) |
|
|
|
this.$message.success("删除成功!") |
|
|
|
}, |
|
|
|
// 报价材料批量删除 |
|
|
|
deleteSelectionQuotationPart(){ |
|
|
|
this.selectionQuotationPartList.reverse().forEach(item => { |
|
|
|
this.quotationPartFormTable.quotationPartList.splice(item.index,1); |
|
|
|
}); |
|
|
|
// 计算价格 |
|
|
|
this.$message.success("删除成功!"); |
|
|
|
}, |
|
|
|
// =================================================保存=================================================== |
|
|
|
// 保存 报价明细 |
|
|
|
saveQuotationDetail() { |
|
|
|
@ -1218,6 +1546,20 @@ 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) { |
|
|
|
flag = false; |
|
|
|
this.rulesValidateTableLabel(objects, this.quotationRoutingColumns); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 校验报价工具表格表单 |
|
|
|
this.$refs.quotationToolTableForm.validate((validate, objects) => { |
|
|
|
if (!validate) { |
|
|
|
@ -1244,8 +1586,8 @@ export default { |
|
|
|
// 校验通过 保存数据 |
|
|
|
let params = this.quotationDetailData; |
|
|
|
params.quotationToolList = this.quotationToolFormTable.quotationToolList; |
|
|
|
params.quotationPartList = this.quotationPartList; |
|
|
|
params.quotationRoutingList = this.quotationRoutingList; |
|
|
|
params.quotationPartList = this.quotationPartFormTable.quotationPartList; |
|
|
|
params.quotationRoutingList = this.quotationRoutingFormTable.quotationRoutingList; |
|
|
|
updateQuotationDetail(this.quotationDetailData).then(({data}) => { |
|
|
|
if (data.code == 200) { |
|
|
|
this.quotationDetailFlag = false; |
|
|
|
@ -1277,19 +1619,54 @@ export default { |
|
|
|
this.quotationTool.toolDescription = toolDescriptionStr.substring(0, toolDescriptionStr.length - 1); |
|
|
|
this.toolHeaderDialogFlag = false; |
|
|
|
}, |
|
|
|
// 保存材料信息 |
|
|
|
savePartBtn(){ |
|
|
|
let quotationPartNo = ""; |
|
|
|
let quotationPartDesc = ""; |
|
|
|
this.selectionPartList = this.selectionPartList.map(item=>{ |
|
|
|
item.quotationDetailId = this.quotationDetailData.quotationDetailId; |
|
|
|
item.site = this.$store.state.user.site; |
|
|
|
quotationPartNo += item.partNo + ";"; |
|
|
|
quotationPartDesc += item.partDesc + ";"; |
|
|
|
return item; |
|
|
|
}); |
|
|
|
this.quotationPart.quotationPartNo = quotationPartNo.substring(0, quotationPartNo.length - 1); |
|
|
|
this.quotationPart.quotationPartDesc = quotationPartDesc.substring(0, quotationPartDesc.length - 1); |
|
|
|
this.partDialogFlag = false; |
|
|
|
}, |
|
|
|
// 保存 报价工艺 |
|
|
|
saveQuotationRoutingBtn(){ |
|
|
|
this.$refs.quotationRoutingForm.validate((validate,objects)=>{ |
|
|
|
if (!validate){ |
|
|
|
this.rulesValidateLabel(objects,this.quotationRoutingColumns); |
|
|
|
}else { |
|
|
|
// 新增逻辑 |
|
|
|
this.quotationRouting.quotationDetailId = this.quotationDetailData.quotationDetailId; |
|
|
|
this.quotationRoutingList.push(JSON.parse(JSON.stringify(this.quotationRouting))); |
|
|
|
//TODO 表格导入逻辑 |
|
|
|
console.log(this.selectionPartList) |
|
|
|
if (this.selectionPartList.length > 0){ |
|
|
|
|
|
|
|
}else { |
|
|
|
// 新增逻辑 |
|
|
|
this.quotationRouting.quotationDetailId = this.quotationDetailData.quotationDetailId; |
|
|
|
this.quotationRoutingFormTable.quotationRoutingList.push(JSON.parse(JSON.stringify(this.quotationRouting))); |
|
|
|
} |
|
|
|
this.$message.success("新增成功!"); |
|
|
|
this.quotationRoutingDialogFlag = false; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 新增 报价材料 |
|
|
|
saveQuotationPartBtn(){ |
|
|
|
this.$refs['quotationPartForm'].validate((validate,objects)=>{ |
|
|
|
if (!validate){ |
|
|
|
this.rulesValidateLabel(objects,this.quotationPartColumns); |
|
|
|
}else { |
|
|
|
// 新增逻辑 |
|
|
|
this.quotationPart.quotationDetailId = this.quotationDetailData.quotationDetailId; |
|
|
|
this.quotationPartFormTable.quotationPartList.push(JSON.parse(JSON.stringify(this.quotationPart))); |
|
|
|
this.quotationPartDialogFlag = false; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// =====================================================表格修改============================================ |
|
|
|
// 修改 报价详情 |
|
|
|
editQuotationDetail(row) { |
|
|
|
@ -1360,8 +1737,8 @@ export default { |
|
|
|
let total = 0; |
|
|
|
searchQuotationRoutingByDetailId(params).then(({data})=>{ |
|
|
|
if (data.code == 200) { |
|
|
|
this.quotationRoutingList = data.data; |
|
|
|
let unitMachineryCostTotal = this.quotationRoutingList.reduce((total, currentValue) => { |
|
|
|
this.quotationRoutingFormTable.quotationRoutingList = data.data; |
|
|
|
let unitMachineryCostTotal = this.quotationRoutingFormTable.quotationRoutingList.reduce((total, currentValue) => { |
|
|
|
return total + currentValue.unitMachineryCost; |
|
|
|
}, 0); |
|
|
|
this.quotationDetailData.computeMachineCost = unitMachineryCostTotal; |
|
|
|
@ -1377,6 +1754,15 @@ export default { |
|
|
|
}, |
|
|
|
// 报价材料 查询 |
|
|
|
initQuotationPart() { |
|
|
|
let params = { |
|
|
|
quotationDetailId: this.quotationDetailData.quotationDetailId, |
|
|
|
}; |
|
|
|
this.partTableFlag = false; |
|
|
|
searchQuotationPart(params).then(({data})=>{ |
|
|
|
if (data.code == 200){ |
|
|
|
this.quotationPartFormTable.quotationPartList = data.data; |
|
|
|
} |
|
|
|
}) |
|
|
|
let total = 0; |
|
|
|
this.quotationDetailData.computePartCost = total; |
|
|
|
this.quotationDetailData.adjustPartCost = total; |
|
|
|
@ -1406,6 +1792,17 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询 材料信息 |
|
|
|
initPartList(){ |
|
|
|
let params = { |
|
|
|
site:this.$store.state.user.site |
|
|
|
}; |
|
|
|
searchPartList(params).then(({data})=>{ |
|
|
|
if (data.code == 200) { |
|
|
|
this.partList = data.data; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// ===============================================页码变动================================================== |
|
|
|
// 报价详情size 改变 |
|
|
|
detailSizeChange(val) { |
|
|
|
@ -1460,12 +1857,22 @@ export default { |
|
|
|
this.$refs.quotationToolForm.resetFields(); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 打开 材料信息弹框 |
|
|
|
openPartDialog(){ |
|
|
|
if (this.selectionPartList.length > 0) { |
|
|
|
this.$refs.quotationPartForm.resetFields(); |
|
|
|
} |
|
|
|
}, |
|
|
|
// =======================================================关闭dialog事件============================================= |
|
|
|
// 关闭 详情弹框 |
|
|
|
closeInsertDialog() { |
|
|
|
this.activeName = "index"; |
|
|
|
// 清空报价工具表格列表 |
|
|
|
this.quotationToolFormTable.quotationToolList = []; |
|
|
|
// 清空报价工艺表格列表 |
|
|
|
this.quotationRoutingFormTable.quotationRoutingList = []; |
|
|
|
// 清空报价材料表格列表 |
|
|
|
this.quotationPartFormTable.quotationPartList = []; |
|
|
|
this.quotationDetailData = {}; |
|
|
|
this.quotationDetailData.computeToolCost = undefined; |
|
|
|
// 清空表单校验 |
|
|
|
@ -1497,6 +1904,10 @@ export default { |
|
|
|
// 关闭 工具信息 弹框 |
|
|
|
closeToolHeaderDialog(){ |
|
|
|
|
|
|
|
}, |
|
|
|
// 关闭 材料信息 弹框 |
|
|
|
closeQuotationPartDialog(){ |
|
|
|
this.$refs['quotationPartForm'].resetFields(); |
|
|
|
}, |
|
|
|
// ===================================================表格多选发生改变事件============================================ |
|
|
|
// 报价工具表格 |
|
|
|
@ -1511,6 +1922,14 @@ export default { |
|
|
|
handleSelectionChangeQuotationRoutingTable(selection){ |
|
|
|
this.selectionQuotationRoutingList = selection; |
|
|
|
}, |
|
|
|
// 报价材料表格 |
|
|
|
handleSelectionChangeQuotationPartTable(selection){ |
|
|
|
this.selectionQuotationPartList = selection; |
|
|
|
}, |
|
|
|
// 材料表格 |
|
|
|
handleSelectionChangePartTable(selection){ |
|
|
|
this.selectionPartList = selection; |
|
|
|
}, |
|
|
|
// =============================================输入框输入事件======================================================= |
|
|
|
// 利润率 输入框 修改 |
|
|
|
inputProfitRate() { |
|
|
|
@ -1580,7 +1999,7 @@ export default { |
|
|
|
this.inputProfitRate(); |
|
|
|
this.inputOuterCost(); |
|
|
|
}, |
|
|
|
// ====================================================输入框change事件============================================= |
|
|
|
// ====================================================输入框 事件============================================= |
|
|
|
changeWorkCenterSelect(val,obj){ |
|
|
|
let value = this.workCenterList.find((item)=>{ |
|
|
|
return item.workCenterNo == val; |
|
|
|
@ -1588,6 +2007,12 @@ export default { |
|
|
|
obj.machiningCenterDesc = value?value.workCenterDesc:""; |
|
|
|
obj.machiningCenterType = value?value.workCenterType:""; |
|
|
|
}, |
|
|
|
outputUnitSelect(e,row){ |
|
|
|
let value = e.target.value; // 输入框值 |
|
|
|
if(value) { // 你输入才有这个值 不为空,如果你下拉框选择的话 这个值为空 |
|
|
|
row.outputUnit = value |
|
|
|
} |
|
|
|
}, |
|
|
|
// ==================================================校验工具类==================================================== |
|
|
|
// 校验处理 |
|
|
|
rulesValidateLabel(objects, labels) { |
|
|
|
@ -1606,7 +2031,7 @@ export default { |
|
|
|
for (let filed in objects) { |
|
|
|
let tableName = filed.split(".")[0]; |
|
|
|
filed = filed.split(".")[2]; |
|
|
|
tableName = tableName == "quotationToolList" ? "工具" : "工艺"; |
|
|
|
tableName = tableName === "quotationToolList" ? "工具" : tableName === "quotationRoutingList" ? "工艺" : "材料"; |
|
|
|
for (let i = 0; i < labels.length; i++) { |
|
|
|
let quotationToolColumn = labels[i]; |
|
|
|
if (quotationToolColumn.label === filed) { |
|
|
|
@ -1617,9 +2042,11 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// =================================================按下回车事件=================================================== |
|
|
|
// 报价工具 表格按下回车 |
|
|
|
// 表格按下回车 |
|
|
|
enterKeyUpFun(refName){ |
|
|
|
this.$refs[refName].focus(); |
|
|
|
if (this.$refs[refName]){ |
|
|
|
this.$refs[refName].focus(); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -1630,6 +2057,8 @@ export default { |
|
|
|
// 查询工具 |
|
|
|
this.initToolHeader(); |
|
|
|
this.initWorkCenterData(); |
|
|
|
|
|
|
|
this.initPartList(); |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|