|
|
|
@ -209,8 +209,8 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer" style="margin-top: 20px"> |
|
|
|
<el-button @click="quotationLeadIntoDetailFlag = false">关 闭</el-button> |
|
|
|
<el-button type="primary" :loading="insertQuotationDetailLoading" @click="insertQuotationDetailBtn">保 存</el-button> |
|
|
|
<el-button @click="quotationLeadIntoDetailFlag = false">关 闭</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -358,7 +358,41 @@ |
|
|
|
</el-form> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="成品属性"> |
|
|
|
|
|
|
|
<el-button type="primary" @click="saveQuotationProductFlag = true">新 增</el-button> |
|
|
|
<el-table |
|
|
|
:height="400" |
|
|
|
:data="quotationPropertiesItemList" |
|
|
|
v-loading="quotationProductLoading" element-loading-text = "数据正在加载中" |
|
|
|
element-loading-spinner = "el-icon-loading" |
|
|
|
border stripe |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="160" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="{row,$index}"> |
|
|
|
<el-link type="text" style="cursor: pointer" size="small" @click="updateQuotationProductBtn(row)">修改</el-link> |
|
|
|
<el-link type="text" style="cursor: pointer" size="small" @click="chooseModalBtn(row)" v-if="row.valueChooseFlag==='Y'" >可选值</el-link> |
|
|
|
<el-link type="text" style="cursor: pointer" size="small" @click="deleteQuotationProductBtn(row)">删除</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in productColumnList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="成本&价格"> |
|
|
|
<el-button type="primary" @click="adjustCost"> 计 算 </el-button> |
|
|
|
@ -549,8 +583,8 @@ |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 20px"> |
|
|
|
<el-button @click=" quotationDetailFlag= false">取 消</el-button> |
|
|
|
<el-button type="primary" :loading="editQuotationDetailLoading" @click="saveQuotationDetail">确 定</el-button> |
|
|
|
<el-button @click=" quotationDetailFlag= false">取 消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -602,8 +636,8 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 5px"> |
|
|
|
<el-button @click="saveQuotationToolFlag= false">取 消</el-button> |
|
|
|
<el-button type="primary" :loading="saveQuotationToolLoading" @click="saveQuotationTool">确 定</el-button> |
|
|
|
<el-button @click="saveQuotationToolFlag= false">取 消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -770,8 +804,8 @@ |
|
|
|
|
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 5px"> |
|
|
|
<el-button @click="quotationRoutingDialogFlag= false">取 消</el-button> |
|
|
|
<el-button type="primary" :loading="saveQuotationRoutingLoading" @click="saveQuotationRoutingBtn">确 定</el-button> |
|
|
|
<el-button @click="quotationRoutingDialogFlag= false">取 消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -847,8 +881,8 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="quotationPartDialogFlag = false">取 消</el-button> |
|
|
|
<el-button type="primary" :loading="saveQuotationPartLoading" @click="saveQuotationPartBtn">确 定</el-button> |
|
|
|
<el-button @click="quotationPartDialogFlag = false">取 消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -1042,8 +1076,8 @@ |
|
|
|
<el-table-column label="预计使用寿命" prop="expectedServiceLife" show-overflow-tooltip/> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 5px"> |
|
|
|
<el-button @click="otherQuotationDetailDialogFlag= false">取 消</el-button> |
|
|
|
<el-button type="primary" :loading="saveBatchLoading" @click="saveOtherQuotationDetailBtn">确 定</el-button> |
|
|
|
<el-button @click="otherQuotationDetailDialogFlag= false">取 消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -1083,6 +1117,189 @@ |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="成品属性" :visible.sync="saveQuotationProductFlag" width="40%" |
|
|
|
top="15vh" :close-on-click-modal="false" @close="closeQuotationProductDialog"> |
|
|
|
<el-form label-position="top" ref="quotationProductForm" :model="modalData" :rules="quotationProductRule" style="height: 260px"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="属性编码" prop="itemNo"> |
|
|
|
<span slot="label" @click="propertiesItemDialogFlag = true" style="cursor: pointer"><a>属性编码</a></span> |
|
|
|
<el-input v-model="modalData.itemNo" :disabled="quotationProductFlag"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" :offset="2"> |
|
|
|
<el-form-item label="属性名称" prop="itemDesc"> |
|
|
|
<el-input v-model="modalData.itemDesc"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="值类型" prop="valueTypeDb"> |
|
|
|
<el-select filterable v-model="modalData.valueTypeDb" style="width: 100%"> |
|
|
|
<el-option label="文本" value="T"></el-option> |
|
|
|
<el-option label="数字" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" :offset="2"> |
|
|
|
<el-form-item label="参照值" v-if="modalData.valueTypeDb === 'N'" prop="defaultValue"> |
|
|
|
<el-input v-model="modalData.defaultValue" type="number" onKeypress="return (/[\d\.]/.test(String.fromCharCode(event.keyCode)))"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="参照值" v-else> |
|
|
|
<el-input v-model="modalData.defaultValue"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="最大值" prop="maxValue"> |
|
|
|
<el-input v-model="modalData.maxValue" type="number" onKeypress="return (/[\d\.]/.test(String.fromCharCode(event.keyCode)))"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" :offset="2"> |
|
|
|
<el-form-item label="最小值" prop="minValue"> |
|
|
|
<el-input v-model="modalData.minValue" type="number" onKeypress="return (/[\d\.]/.test(String.fromCharCode(event.keyCode)))"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="属性类型" prop="itemType"> |
|
|
|
<el-select filterable v-model="modalData.itemType" :disabled="quotationProductFlag" style="width: 100%"> |
|
|
|
<el-option label="A" value="A"></el-option> |
|
|
|
<el-option label="B" value="B"></el-option> |
|
|
|
<el-option label="BM" value="BM"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" :offset="2"> |
|
|
|
<el-form-item label="是否值可选" prop="valueChooseFlag"> |
|
|
|
<el-select v-model="modalData.valueChooseFlag" style="width: 100%"> |
|
|
|
<el-option label="是" value="Y"></el-option> |
|
|
|
<el-option label="否" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: 5px"> |
|
|
|
<el-button type="primary" :loading="saveQuotationProductBtnFlag" @click="saveQuotationProductBtn">确 定</el-button> |
|
|
|
<el-button @click="saveQuotationProductFlag= false">取 消</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="可选值" @close="closeChooseModalData" :close-on-click-modal="false" v-drag :visible.sync="chooseModalFlag" width="35%"> |
|
|
|
<el-form :inline="true" label-position="top" :model="chooseModalData"> |
|
|
|
<el-form-item label="属性名称:"> |
|
|
|
<el-input v-model="chooseModalData.itemDesc" disabled style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'值类型'"> |
|
|
|
<el-select filterable v-model="chooseModalData.valueTypeDb" disabled style="width: 120px"> |
|
|
|
<el-option label="文本" value="T"></el-option> |
|
|
|
<el-option label="数字" value="N"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="addChooseModal">新增</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="280" |
|
|
|
:data="chooseTableData" |
|
|
|
border |
|
|
|
stripe |
|
|
|
style="width: 100%;margin-top: 10px;margin-bottom: 10px;padding-bottom: 10px"> |
|
|
|
<el-table-column |
|
|
|
v-if="chooseModalData.valueTypeDb === 'N'" |
|
|
|
prop="availableValue" |
|
|
|
header-align="center" |
|
|
|
align="left" |
|
|
|
min-width="200" |
|
|
|
label="属性值"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-else |
|
|
|
prop="availableValue" |
|
|
|
header-align="center" |
|
|
|
align="right" |
|
|
|
min-width="200" |
|
|
|
label="属性值"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
min-width="100" |
|
|
|
label="操作"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-link type="text" style="cursor: pointer" size="small" @click="updateChooseModal(scope.row)">修改</el-link> |
|
|
|
<el-link type="text" style="cursor: pointer" @click="deleteItemAvailable(scope.row)">删除</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog title="可选值维护" @close="closeItemData" :close-on-click-modal="false" v-drag :visible.sync="itemModalFlag" width="30%" > |
|
|
|
<el-form ref="itemDataForm" :model="itemData" label-position="top" :rules="itemDataRule" style="height: 80px;width: 80%"> |
|
|
|
<el-form-item label="可选值" prop="availableValue"> |
|
|
|
<el-input v-model="itemData.availableValue" v-if="chooseModalData.valueTypeDb === 'T'"></el-input> |
|
|
|
<el-input v-model="itemData.availableValue" v-else type="number" onKeypress="return (/[\d\.]/.test(String.fromCharCode(event.keyCode)))"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="saveItemAvailable">保存</el-button> |
|
|
|
<el-button type="primary" @click="itemModalFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!--成品选择--> |
|
|
|
<el-dialog title="成品属性列表" @close="closePropertiesItemDialog" @open="openPropertiesItemDialog" :visible.sync="propertiesItemDialogFlag" width="40%"> |
|
|
|
<el-form :inline="true" label-position="top" ref="searchPropertiesDataForm" :model="searchPropertiesData" @keyup.enter.native="getDataList()"> |
|
|
|
<el-form-item label="属性编码"> |
|
|
|
<el-input v-model="searchPropertiesData.itemNo" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="属性名称"> |
|
|
|
<el-input v-model="searchPropertiesData.itemDesc" style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="属性类型" > |
|
|
|
<el-select filterable v-model="searchPropertiesData.itemType" style="width: 120px"> |
|
|
|
<el-option label="全部" value=""></el-option> |
|
|
|
<el-option label="A" value="A"></el-option> |
|
|
|
<el-option label="B" value="B"></el-option> |
|
|
|
<el-option label="BM" value="BM"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" " > |
|
|
|
<el-button type="primary" @click="openPropertiesItemDialog">查 询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
height="400" |
|
|
|
:data="propertiesDataList" |
|
|
|
border @row-dblclick="dblclickPropertiesTable" |
|
|
|
style="width: 100%;margin-top: 10px"> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in productColumnList" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-footer style="margin-top: 20px;text-align:center"> |
|
|
|
<!-- <el-button type="primary" @click="propertiesItemDialogFlag = false">关闭</el-button>--> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -1109,22 +1326,26 @@ import { |
|
|
|
searchQuotationTool, |
|
|
|
updateQuotationDetail, |
|
|
|
quotationDetailList, |
|
|
|
searchQuotationPropertiesItem, |
|
|
|
saveQuotationPropertiesItem, |
|
|
|
deleteQuotationPropertiesItem, |
|
|
|
deleteQuotationPropertiesItemAvailable, |
|
|
|
searchQuotationPropertiesItemAvailable, |
|
|
|
saveQuotationPropertiesItemAvailable |
|
|
|
} from '@/api/quotation/quotationHeader.js'; |
|
|
|
import {searchUmInformationList,} from '@/api/part/umInformation.js'; |
|
|
|
import {searchToolHeader,searchTool} from '@/api/part/toolHeader.js'; |
|
|
|
import {searchWorkCenter,} from '@/api/part/workCenter.js'; |
|
|
|
import {searchPartList,searchPart} from '@/api/part/partInformation.js'; |
|
|
|
import {getProjectPartList,getProjectPart} from '@/api/project/project.js'; |
|
|
|
import { |
|
|
|
queryOperationList, // 查询工序列表 |
|
|
|
} from '@/api/part/routingManagement.js' |
|
|
|
import {queryOperationList,} from '@/api/part/routingManagement.js' |
|
|
|
import {propertiesItemList,propertiesAvailableList} from "@/api/base/properties.js" |
|
|
|
import {Decimal} from "decimal.js"; |
|
|
|
|
|
|
|
export default { |
|
|
|
props: ['quotationHeader'], |
|
|
|
name: "quotationDetail", |
|
|
|
data() { |
|
|
|
// 后台校验 |
|
|
|
// 产品编码校验 |
|
|
|
const validateProductNo = (rule, value, callback) =>{ |
|
|
|
if (value === '' || value === null || value === undefined){ |
|
|
|
@ -1226,6 +1447,9 @@ export default { |
|
|
|
selectionProjectPartList:[],//选择的项目集合 |
|
|
|
projectPartTable:[],//查询的姓名集合 |
|
|
|
operationList: [],//工艺集合 |
|
|
|
quotationPropertiesItemList:[],//成品属性集合 |
|
|
|
chooseTableData:[],//成品属性可选值 |
|
|
|
propertiesDataList:[], |
|
|
|
// ===================================================分页参数====================================== |
|
|
|
no: 1,//当前页 |
|
|
|
size: 20,//每页条数 |
|
|
|
@ -1241,6 +1465,11 @@ export default { |
|
|
|
otherQuotationDetailDialogFlag:false,// 其他报价明细 |
|
|
|
projectPartDialogFlag:false,// 项目物料 |
|
|
|
componentPartModelFlag:false,//工艺窗口 |
|
|
|
saveQuotationProductFlag:false,//成品属性 |
|
|
|
quotationProductFlag:false,// 成品属性修改 |
|
|
|
chooseModalFlag:false,// 可选值 |
|
|
|
itemModalFlag:false, |
|
|
|
propertiesItemDialogFlag:false, |
|
|
|
options:0,// 从其他报价明细 复制选项 |
|
|
|
// 新增修改按钮状态 |
|
|
|
insertQuotationDetailLoading : false,//新增报价明细按钮 |
|
|
|
@ -1249,11 +1478,13 @@ export default { |
|
|
|
saveQuotationRoutingLoading:false,//保存报价工序信息按钮 |
|
|
|
saveQuotationPartLoading:false,//保存报价材料信息按钮 |
|
|
|
saveBatchLoading:false,//导入按钮状态 |
|
|
|
saveQuotationProductBtnFlag:false,//成品属性状态 |
|
|
|
// 表格查询状态 |
|
|
|
initQuotationDetailLoading:false,//报价明细 |
|
|
|
initQuotationRoutingLoading:false,//报价工艺 |
|
|
|
initQuotationToolLoading:false,// 报价工具 |
|
|
|
initQuotationPartLoading:false,// 报价材料 |
|
|
|
quotationProductLoading:false,//成品属性 |
|
|
|
// =============================================新增报价明细的开关========================================== |
|
|
|
//新增 报价详情数据 |
|
|
|
insertQuotationDetailData: { |
|
|
|
@ -1269,6 +1500,44 @@ export default { |
|
|
|
operationId: '', |
|
|
|
operationName: '', |
|
|
|
}, |
|
|
|
searchPropertiesData:{ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
itemNo: '', |
|
|
|
itemDesc: '', |
|
|
|
itemType:'', |
|
|
|
}, |
|
|
|
itemData:{ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
itemNo:'', |
|
|
|
valueNo:'', |
|
|
|
availableValue:'', |
|
|
|
itemType:'', |
|
|
|
createdBy: this.$store.state.user.name |
|
|
|
}, |
|
|
|
// 成品属性 |
|
|
|
modalData:{ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
flag: '', |
|
|
|
itemNo: '', |
|
|
|
itemDesc: '', |
|
|
|
valueTypeDb: 'T', |
|
|
|
defaultValue: '', |
|
|
|
valueChooseFlag: 'N', |
|
|
|
createdBy: this.$store.state.user.name, |
|
|
|
maxValue: '', |
|
|
|
minValue: '', |
|
|
|
itemType: 'A', |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
quotationDetailId:undefined, |
|
|
|
QuotationPropertiesItemAvailable:[], |
|
|
|
}, |
|
|
|
chooseModalData:{ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
itemNo: '', |
|
|
|
itemDesc: '', |
|
|
|
itemType:'', |
|
|
|
valueTypeDb:'', |
|
|
|
}, |
|
|
|
// 报价材料对象 |
|
|
|
quotationPart:{ |
|
|
|
quotationPartId:undefined,//主键 |
|
|
|
@ -1415,7 +1684,149 @@ export default { |
|
|
|
fixed: '', |
|
|
|
} |
|
|
|
], |
|
|
|
productColumnList: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 100002001, |
|
|
|
serialNumber: '100002001TableValueType', |
|
|
|
tableId: "100002001Table", |
|
|
|
tableName: "属性表", |
|
|
|
columnProp: 'itemType', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '属性类型', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 100002001, |
|
|
|
serialNumber: '100002001TableValueType', |
|
|
|
tableId: "100002001Table", |
|
|
|
tableName: "属性表", |
|
|
|
columnProp: 'itemNo', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '属性编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 100002001, |
|
|
|
serialNumber: '100002001TableValueType', |
|
|
|
tableId: "100002001Table", |
|
|
|
tableName: "属性表", |
|
|
|
columnProp: 'itemDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '属性名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 100002001, |
|
|
|
serialNumber: '100002001TableValueType', |
|
|
|
tableId: "100002001Table", |
|
|
|
tableName: "属性表", |
|
|
|
columnProp: 'valueType', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '值类型', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 100002001, |
|
|
|
serialNumber: '100002001TableDefaultValue', |
|
|
|
tableId: "100002001Table", |
|
|
|
tableName: "属性表", |
|
|
|
columnProp: 'defaultValue', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: '参照值', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 100002001, |
|
|
|
serialNumber: '100002001TableMaxValue', |
|
|
|
tableId: "100002001Table", |
|
|
|
tableName: "属性表", |
|
|
|
columnProp: 'maxValue', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: '最大值', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 100002001, |
|
|
|
serialNumber: '100002001TableMinValue', |
|
|
|
tableId: "100002001Table", |
|
|
|
tableName: "属性表", |
|
|
|
columnProp: 'minValue', |
|
|
|
headerAlign: "center", |
|
|
|
align: "right", |
|
|
|
columnLabel: '最小值', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 100002001, |
|
|
|
serialNumber: '100002001TableValueChooseFlag', |
|
|
|
tableId: "100002001Table", |
|
|
|
tableName: "属性表", |
|
|
|
columnProp: 'valueChooseFlag', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '是否值可选', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
], |
|
|
|
// ================================================表单校验规则====================================== |
|
|
|
// 可选值校验 |
|
|
|
itemDataRule:{ |
|
|
|
availableValue:[{required: true, message: ' ', trigger: 'change'},{required: true, message: ' ', trigger: 'blur'},] |
|
|
|
}, |
|
|
|
// 报价详情表单校验 |
|
|
|
quotationDetailRules: { |
|
|
|
productNo: [ |
|
|
|
@ -1597,7 +2008,27 @@ export default { |
|
|
|
{required: true, pattern: /^[0-9]+(.[0-9]{1,2})?$/, message: ' ', trigger: 'blur'}, |
|
|
|
], |
|
|
|
}, |
|
|
|
quotationProductRule:{ |
|
|
|
itemNo:[{required: true,message: ' ',trigger: 'change'},{required: true,message: ' ',trigger: 'blur'}], |
|
|
|
itemDesc:[{required: true,message: ' ',trigger: 'change'},{required: true,message: ' ',trigger: 'blur'}], |
|
|
|
valueTypeDb:[{required: true,message: ' ',trigger: 'change'},{required: true,message: ' ',trigger: 'blur'}], |
|
|
|
defaultValue:[{type: 'number',message:' ', trigger: 'change',transform: (value) => Number(value)},{type: 'number',message:' ', trigger: 'blur',transform: (value) => Number(value)}], |
|
|
|
maxValue:[{type: 'number',message:' ', trigger: 'change',transform: (value) => Number(value)},{type: 'number',message:' ', trigger: 'blur',transform: (value) => Number(value)}], |
|
|
|
minValue:[{type: 'number',message:' ',trigger: 'change',transform: (value) => Number(value)},{type: 'number',message:' ', trigger: 'blur',transform: (value) => Number(value)}], |
|
|
|
itemType:[{required: true,message: ' ',trigger: 'change'},{required: true,message: ' ',trigger: 'blur'}], |
|
|
|
valueChooseFlag:[{required: true,message: ' ',trigger: 'change'},{required: true,message: ' ',trigger: 'blur'}], |
|
|
|
}, |
|
|
|
// =========================================参数列表================================= |
|
|
|
quotationProductColumns:[ |
|
|
|
{label:"itemNo",value:"属性编码"}, |
|
|
|
{label:"itemDesc",value:"属性名称"}, |
|
|
|
{label:"valueTypeDb",value:"值类型"}, |
|
|
|
{label:"defaultValue",value:"defaultValue"}, |
|
|
|
{label:"maxValue",value:"最大值"}, |
|
|
|
{label:"minValue",value:"最小值"}, |
|
|
|
{label:"itemType",value:"属性类型"}, |
|
|
|
{label:"valueChooseFlag",value:"valueChooseFlag"}, |
|
|
|
], |
|
|
|
// 报价明细 参数列表 |
|
|
|
quotationDetailColumns: [ |
|
|
|
{label: "productDesc", value: "产品名称"}, |
|
|
|
@ -1797,6 +2228,43 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// ===============================================新增================================================ |
|
|
|
saveItemAvailable(){ |
|
|
|
this.$refs.itemDataForm.validate((validate)=>{ |
|
|
|
if (!validate){ |
|
|
|
this.$message.warning("可选值不能为空!") |
|
|
|
}else { |
|
|
|
saveQuotationPropertiesItemAvailable(this.itemData).then(({data})=>{ |
|
|
|
if (data.code === 200){ |
|
|
|
this.searchQuotationPropertiesItemAvailable(); |
|
|
|
this.$message.success(data.msg); |
|
|
|
this.itemModalFlag = false; |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg); |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error("网络异常!") |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 新增成品属性 |
|
|
|
saveQuotationPropertiesItem(){ |
|
|
|
// 添加报价明细编号 |
|
|
|
this.modalData.quotationDetailId = this.quotationDetailData.quotationDetailId; |
|
|
|
saveQuotationPropertiesItem(this.modalData).then(({data})=>{ |
|
|
|
if (data.code === 200){ |
|
|
|
this.$message.success(data.msg); |
|
|
|
this.searchQuotationPropertiesItem(); |
|
|
|
this.saveQuotationProductFlag= false |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg); |
|
|
|
} |
|
|
|
this.saveQuotationProductBtnFlag = false; |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error("网络异常!"); |
|
|
|
this.saveQuotationProductBtnFlag = false; |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 新增 报价明细 |
|
|
|
insertQuotationDetailBtn() { |
|
|
|
this.$refs['insertQuotationDetailForm'].validate((validate, objects) => { |
|
|
|
@ -1815,6 +2283,7 @@ export default { |
|
|
|
this.$message.success(data.msg); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
// this.$set |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.insertQuotationDetailLoading = false; |
|
|
|
@ -1889,6 +2358,43 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 删除 |
|
|
|
deleteItemAvailable(row){ |
|
|
|
this.$confirm(`是否删除这个可选值?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deleteQuotationPropertiesItemAvailable(row).then(({data}) => { |
|
|
|
if (data.code === 200) { |
|
|
|
this.searchQuotationPropertiesItemAvailable(); |
|
|
|
this.$message.success(data.msg) |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error) => { |
|
|
|
this.$message.error("网络异常") |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
deleteQuotationProductBtn(row){ |
|
|
|
this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deleteQuotationPropertiesItem(row).then(({data})=>{ |
|
|
|
if (data.code === 200){ |
|
|
|
this.searchQuotationPropertiesItem(); |
|
|
|
this.$message.success(data.msg); |
|
|
|
}else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error("网络异常!"); |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 报价工具 批量删除 |
|
|
|
deleteSelectionQuotationTool(){ |
|
|
|
if (this.selectionQuotationToolList.length === 0) { |
|
|
|
@ -2150,6 +2656,18 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 新增成本 |
|
|
|
saveQuotationProductBtn(){ |
|
|
|
this.$refs.quotationProductForm.validate((validate,objects)=>{ |
|
|
|
if (!validate) { |
|
|
|
this.rulesValidateLabel(objects, this.quotationProductColumns); |
|
|
|
}else { |
|
|
|
// 开启新增状态 |
|
|
|
this.saveQuotationProductBtnFlag = true; |
|
|
|
this.saveQuotationPropertiesItem(); |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 批量新增报价材料 |
|
|
|
batchInsertQuotationPartData(quotationPrtList){ |
|
|
|
batchInsertQuotationPart(quotationPrtList).then(({data})=>{ |
|
|
|
@ -2266,6 +2784,29 @@ export default { |
|
|
|
this.quotationDetailFlag = true; |
|
|
|
}, |
|
|
|
// =============================================查询================================================= |
|
|
|
// 查询成品属性 |
|
|
|
searchQuotationPropertiesItem(){ |
|
|
|
// 参数 |
|
|
|
let params = { |
|
|
|
quotationDetailId: this.quotationDetailData.quotationDetailId, |
|
|
|
site:this.$store.state.user.site, |
|
|
|
} |
|
|
|
// 清空数据 |
|
|
|
this.quotationPropertiesItemList = [] |
|
|
|
// 开启查询状态 |
|
|
|
this.quotationProductLoading = true; |
|
|
|
searchQuotationPropertiesItem(params).then(({data})=>{ |
|
|
|
if (data.code === 200){ |
|
|
|
// 添加数据 |
|
|
|
this.quotationPropertiesItemList = data.data; |
|
|
|
} |
|
|
|
// 关闭查询状态 |
|
|
|
this.quotationProductLoading = false; |
|
|
|
}).catch((error)=>{ |
|
|
|
//关闭查询状态 |
|
|
|
this.quotationProductLoading = false; |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询报价明细 |
|
|
|
initData() { |
|
|
|
let params = { |
|
|
|
@ -2296,6 +2837,20 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询 |
|
|
|
searchQuotationPropertiesItemAvailable(){ |
|
|
|
this.chooseTableData = []; |
|
|
|
searchQuotationPropertiesItemAvailable(this.chooseModalData).then(({data})=>{ |
|
|
|
if (data.code === 200){ |
|
|
|
this.chooseTableData = data.data |
|
|
|
this.chooseModalFlag=true; |
|
|
|
}else { |
|
|
|
this.$message.error("参数有误!") |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error("网络异常") |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取工具列表 |
|
|
|
initToolHeader(){ |
|
|
|
searchToolHeader(this.toolHeader).then(({data})=>{ |
|
|
|
@ -2469,7 +3024,32 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// ===============================================打开dialog事件================================================== |
|
|
|
// 点击可选择打开 可选择弹框 |
|
|
|
chooseModalBtn(row){ |
|
|
|
this.chooseModalData.itemNo=row.itemNo; |
|
|
|
this.chooseModalData.itemDesc=row.itemDesc; |
|
|
|
this.chooseModalData.valueTypeDb=row.valueTypeDb; |
|
|
|
this.chooseModalData.itemType=row.itemType; |
|
|
|
this.searchQuotationPropertiesItemAvailable(); |
|
|
|
}, |
|
|
|
// 修改可选值 |
|
|
|
updateChooseModal(row){ |
|
|
|
this.itemData = JSON.parse(JSON.stringify(row)); |
|
|
|
this.itemModalFlag = true; |
|
|
|
}, |
|
|
|
// 打开 <<报 价 明 细>> 弹框 |
|
|
|
openPropertiesItemDialog(){ |
|
|
|
this.propertiesDataList = []; |
|
|
|
propertiesItemList(this.searchPropertiesData).then(({data})=>{ |
|
|
|
if (data.code === 200){ |
|
|
|
this.propertiesDataList = data.data; |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error("网络异常") |
|
|
|
}) |
|
|
|
}, |
|
|
|
openQuotationDetailData() { |
|
|
|
// 设置默认值 |
|
|
|
if (this.insertQuotationDetailData.flag){ |
|
|
|
@ -2499,6 +3079,7 @@ export default { |
|
|
|
this.initQuotationRoutingData(); |
|
|
|
this.initQuotationPart(); |
|
|
|
this.initOtherQuotationDetail(); |
|
|
|
this.searchQuotationPropertiesItem(); |
|
|
|
}, |
|
|
|
// 打开新增报价明细 |
|
|
|
openInsertQuotationDetail() { |
|
|
|
@ -2521,9 +3102,25 @@ export default { |
|
|
|
this.$refs.quotationPartForm.resetFields(); |
|
|
|
} |
|
|
|
}, |
|
|
|
addChooseModal(){ |
|
|
|
this.itemData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
itemNo:this.chooseModalData.itemNo, |
|
|
|
valueNo:0, |
|
|
|
availableValue:'', |
|
|
|
itemType:this.chooseModalData.itemType, |
|
|
|
createdBy: this.$store.state.user.name |
|
|
|
} |
|
|
|
this.itemModalFlag = true; |
|
|
|
}, |
|
|
|
openProjectPartDialog(){ |
|
|
|
this.getProjectPartList(); |
|
|
|
}, |
|
|
|
updateQuotationProductBtn(row){ |
|
|
|
this.modalData = JSON.parse(JSON.stringify(row)); |
|
|
|
this.saveQuotationProductFlag = true; |
|
|
|
this.quotationProductFlag = true |
|
|
|
}, |
|
|
|
// 点击其他报价明细 按钮 |
|
|
|
clickOtherQuotationDetailsBtn(i){ |
|
|
|
this.initOtherQuotationDetail(); |
|
|
|
@ -2695,6 +3292,59 @@ export default { |
|
|
|
} |
|
|
|
this.otherQuotationDetailList = []; |
|
|
|
}, |
|
|
|
closePropertiesItemDialog(){ |
|
|
|
this.$refs.searchPropertiesDataForm.resetFields(); |
|
|
|
this.searchPropertiesData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
itemNo: '', |
|
|
|
itemDesc: '', |
|
|
|
itemType:'', |
|
|
|
} |
|
|
|
}, |
|
|
|
closeQuotationProductDialog(){ |
|
|
|
//清除校验 |
|
|
|
this.$refs.quotationProductForm.resetFields(); |
|
|
|
// 重置数据 |
|
|
|
this.modalData={ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
flag: '', |
|
|
|
itemNo: '', |
|
|
|
itemDesc: '', |
|
|
|
valueTypeDb: 'T', |
|
|
|
defaultValue: '', |
|
|
|
valueChooseFlag: 'N', |
|
|
|
createdBy: this.$store.state.user.name, |
|
|
|
maxValue: '', |
|
|
|
minValue: '', |
|
|
|
itemType: 'A', |
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
quotationDetailId:undefined, |
|
|
|
QuotationPropertiesItemAvailable:[] |
|
|
|
} |
|
|
|
this.quotationProductFlag = false; |
|
|
|
}, |
|
|
|
// |
|
|
|
closeChooseModalData(){ |
|
|
|
this.chooseModalData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
itemNo: '', |
|
|
|
itemDesc: '', |
|
|
|
itemType:'', |
|
|
|
valueTypeDb:'', |
|
|
|
} |
|
|
|
}, |
|
|
|
// |
|
|
|
closeItemData(){ |
|
|
|
this.$refs.itemDataForm.resetFields(); |
|
|
|
this.itemData={ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
itemNo:'', |
|
|
|
valueNo:'', |
|
|
|
availableValue:'', |
|
|
|
itemType:'', |
|
|
|
createdBy: this.$store.state.user.name |
|
|
|
} |
|
|
|
}, |
|
|
|
// ===================================================表格多选发生改变事件============================================ |
|
|
|
// 报价工具表格 |
|
|
|
handleSelectionChangeQuotationToolTable(selection){ |
|
|
|
@ -2725,6 +3375,10 @@ export default { |
|
|
|
toggleRowSelectionTable(row,refName){ |
|
|
|
this.$refs[refName].toggleRowSelection(row); |
|
|
|
}, |
|
|
|
dblclickPropertiesTable(row){ |
|
|
|
this.modalData = JSON.parse(JSON.stringify(row)); |
|
|
|
this.propertiesItemDialogFlag = false |
|
|
|
}, |
|
|
|
dblClickPartTable(row){ |
|
|
|
row = JSON.parse(JSON.stringify(row)); |
|
|
|
this.quotationPart.quotationPartNo = row.partNo; |
|
|
|
|