Browse Source

2023-11-21 plm报价

master
zelian_wu 3 years ago
parent
commit
c8eea73236
  1. 8
      src/api/part/partInformation.js
  2. 7
      src/api/quotation/quotationHeader.js
  3. 575
      src/components/quotation/sellForQuotation/quotationDetail.vue

8
src/api/part/partInformation.js

@ -46,3 +46,11 @@ export const getFileContentList = data => createAPI(`/plm/partInformation/getFil
export const deletePartFile = data => createAPI(`/plm/partInformation/deletePartFile`,'post',data) export const deletePartFile = data => createAPI(`/plm/partInformation/deletePartFile`,'post',data)
/**
* 查询材料信息
* @param data
* @returns {*}
*/
export const searchPartList = (data) => createAPI(`/plm/partInformation/searchPartList`,'get',data);

7
src/api/quotation/quotationHeader.js

@ -81,3 +81,10 @@ export const updateQuotationRouting = (data) => createAPI('/plm/quotationRouting
* @returns {*} * @returns {*}
*/ */
export const deleteQuotationRouting = (data) => createAPI('/plm/quotationRouting/deleteQuotationRouting','post',data); export const deleteQuotationRouting = (data) => createAPI('/plm/quotationRouting/deleteQuotationRouting','post',data);
/**
* 查询 quotationPart
* @param data
* @returns {*}
*/
export const searchQuotationPart = (data) => createAPI('/plm/quotationPart/searchQuotationPart','get',data);

575
src/components/quotation/sellForQuotation/quotationDetail.vue

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

Loading…
Cancel
Save