You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
561 lines
17 KiB
561 lines
17 KiB
<script>
|
|
import {queryQuoteByProjectPartNo} from "../../../../api/quotation/quote";
|
|
|
|
export default {
|
|
name: "projectPartQuote",
|
|
props:{
|
|
part:{
|
|
type: Object,
|
|
required: true
|
|
},
|
|
height:{
|
|
type: [String,Number],
|
|
default: '27vh'
|
|
}
|
|
},
|
|
data(){
|
|
return{
|
|
dataList:[],
|
|
queryLoading:false,
|
|
columns:[
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10QuotationNo',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'quotationNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '报价单号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10QuotationDate',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'quotationDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '报价日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10ProductNo',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'productNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10ProductDesc',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'productDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10QuotationDetailQuantity',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'quotationDetailQuantity',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '报价数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10ComputePartCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'computePartCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '计算后材料成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10ComputeMachineCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'computeMachineCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '计算后机器成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10ComputeLabourCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'computeLabourCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '计算后人工成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10ComputeFabricateCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'computeFabricateCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '计算后制造费用',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10ComputeToolCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'computeToolCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '计算后工具成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10AdjustPartCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'adjustPartCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '调整后材料成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10AdjustMachineCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'adjustMachineCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '调整后机器成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10AdjustLabourCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'adjustLabourCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '调整后人工成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10AdjustFabricateCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'adjustFabricateCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '调整后制造费用',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10AdjustToolCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'adjustToolCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '调整后工具成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10DetailOtherCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'detailOtherCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '其他成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10DetailManageCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'detailManageCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '管理成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10DetailTotalCost',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'detailTotalCost',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '总成本',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10DetailProfitRate',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'detailProfitRate',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '利润率%',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10DetailProfitAmount',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'detailProfitAmount',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '利润额',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10FinalUntaxedPrice',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'finalUntaxedPrice',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '未税单价',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10TaxRate',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'taxRate',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '税率%',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10FinalTaxedPrice',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'finalTaxedPrice',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '含税单价',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10SystemComputePrice',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'systemComputePrice',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '含税总价',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10QuotationDetailStatus',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'quotationDetailStatus',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '状态',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10Remark',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'remark',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '备注',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 101002002,
|
|
serialNumber: '101002002Table10InternalInquiryNo',
|
|
tableId: '101002002Table10',
|
|
tableName: '项目物料',
|
|
columnProp: 'internalInquiryNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '询价单号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},
|
|
],
|
|
}
|
|
},
|
|
methods:{
|
|
handleQueryQuote(){
|
|
let params = {
|
|
site:this.part.site,
|
|
projectId:this.part.projectId,
|
|
partNo:this.part.testPartNo,
|
|
}
|
|
this.queryLoading = true
|
|
queryQuoteByProjectPartNo(params).then(({data})=>{
|
|
if (data && data.code === 0){
|
|
this.dataList = data.rows
|
|
}else {
|
|
this.$message.warning(data.msg)
|
|
}
|
|
this.queryLoading = false
|
|
}).catch((error)=>{
|
|
this.$message.error(error)
|
|
this.queryLoading = false
|
|
})
|
|
},
|
|
|
|
handleClick(row){
|
|
if (this.$router.resolve(`/quotation-sellForQuotation`).resolved.name === '404'){
|
|
this.$alert('权限不足,访问失败', '警告', {confirmButtonText: '确定',});
|
|
}else {
|
|
this.$router.push({name:`quotation-sellForQuotation`,params:{quotationNo:row.quotationNo},})
|
|
}
|
|
}
|
|
},
|
|
watch:{
|
|
part(newVal,oldVal){
|
|
if (newVal){
|
|
this.handleQueryQuote()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<el-table :data="dataList" style="width: 100%;margin-top: 5px" :height="height" v-loading="queryLoading" border>
|
|
<el-table-column
|
|
v-for="(item,index) in columns" :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" >
|
|
<div v-if="item.columnProp === 'quotationNo'">
|
|
<el-link v-if="!item.columnHidden" @click="handleClick(scope.row)"> {{ `${scope.row[item.columnProp]}` }}</el-link>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
|
|
</div>
|
|
<div v-else>
|
|
<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>
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
</style>
|