|
|
@ -79,9 +79,9 @@ |
|
|
width="180" |
|
|
width="180" |
|
|
label="Action"> |
|
|
label="Action"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-link |
|
|
|
|
|
v-if="scope.row.status === '待报价'" |
|
|
|
|
|
style="cursor: pointer" |
|
|
|
|
|
|
|
|
<el-link |
|
|
|
|
|
v-if="scope.row.status === '待报价'||scope.row.status === '未接受'" |
|
|
|
|
|
style="cursor: pointer" |
|
|
@click="openQuoteDialog(scope.row)"> |
|
|
@click="openQuoteDialog(scope.row)"> |
|
|
报价 |
|
|
报价 |
|
|
</el-link> |
|
|
</el-link> |
|
|
@ -113,21 +113,21 @@ |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
|
|
|
|
|
|
|
<!-- 报价信息新增弹出框 --> |
|
|
<!-- 报价信息新增弹出框 --> |
|
|
<el-dialog |
|
|
|
|
|
title="报价信息" |
|
|
|
|
|
:visible.sync="quoteDialogVisible" |
|
|
|
|
|
width="600px" |
|
|
|
|
|
top="3vh" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
|
|
|
|
|
|
<el-dialog |
|
|
|
|
|
title="报价信息" |
|
|
|
|
|
:visible.sync="quoteDialogVisible" |
|
|
|
|
|
width="600px" |
|
|
|
|
|
top="3vh" |
|
|
|
|
|
:close-on-click-modal="false" |
|
|
class="part-dialog"> |
|
|
class="part-dialog"> |
|
|
<div class="dialog-content"> |
|
|
<div class="dialog-content"> |
|
|
<el-form |
|
|
|
|
|
:model="quoteForm" |
|
|
|
|
|
:rules="quoteRules" |
|
|
|
|
|
ref="quoteForm" |
|
|
|
|
|
label-position="top" |
|
|
|
|
|
|
|
|
<el-form |
|
|
|
|
|
:model="quoteForm" |
|
|
|
|
|
:rules="quoteRules" |
|
|
|
|
|
ref="quoteForm" |
|
|
|
|
|
label-position="top" |
|
|
class="part-form"> |
|
|
class="part-form"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 基础信息 --> |
|
|
<!-- 基础信息 --> |
|
|
<div class="form-section"> |
|
|
<div class="form-section"> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
@ -140,7 +140,7 @@ |
|
|
<el-form-item label="物料名称" prop="partDesc"> |
|
|
<el-form-item label="物料名称" prop="partDesc"> |
|
|
<el-input v-model="quoteForm.partDesc" :disabled="true" placeholder="物料名称"></el-input> |
|
|
<el-input v-model="quoteForm.partDesc" :disabled="true" placeholder="物料名称"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
|
|
|
|
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="18"> |
|
|
<el-col :span="18"> |
|
|
@ -164,8 +164,8 @@ |
|
|
<el-form-item label="计量单位" prop="umid"> |
|
|
<el-form-item label="计量单位" prop="umid"> |
|
|
<el-input v-model="quoteForm.umid" :disabled="true" placeholder="计量单位"></el-input> |
|
|
<el-input v-model="quoteForm.umid" :disabled="true" placeholder="计量单位"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<!-- 费用信息 --> |
|
|
<!-- 费用信息 --> |
|
|
@ -238,7 +238,7 @@ |
|
|
<el-form-item label="运费" prop="freight"> |
|
|
<el-form-item label="运费" prop="freight"> |
|
|
<el-input-number v-model="quoteForm.freight" :precision="2" :min="0" style="width: 100%"></el-input-number> |
|
|
<el-input-number v-model="quoteForm.freight" :precision="2" :min="0" style="width: 100%"></el-input-number> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
|
|
|
|
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
@ -258,7 +258,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
@ -276,7 +276,7 @@ import { |
|
|
getQuoPurDetailPage |
|
|
getQuoPurDetailPage |
|
|
} from '@/api/supplier/purQuotation.js' |
|
|
} from '@/api/supplier/purQuotation.js' |
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
|
import { |
|
|
createPurReplyHist |
|
|
createPurReplyHist |
|
|
} from '@/api/supplier/purReplyHist.js' |
|
|
} from '@/api/supplier/purReplyHist.js' |
|
|
|
|
|
|
|
|
@ -325,7 +325,7 @@ export default { |
|
|
{ columnProp: 'spec', columnLabel: '规格型号', columnWidth: '150', headerAlign: 'center', align: 'left', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'spec', columnLabel: '规格型号', columnWidth: '150', headerAlign: 'center', align: 'left', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'qty', columnLabel: '询价数量', columnWidth: '100', headerAlign: 'center', align: 'right', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'qty', columnLabel: '询价数量', columnWidth: '100', headerAlign: 'center', align: 'right', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'remark2', columnLabel: '特殊要求', columnWidth: '80', headerAlign: 'center', align: 'center', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'remark2', columnLabel: '特殊要求', columnWidth: '80', headerAlign: 'center', align: 'center', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ columnProp: 'buyer', columnLabel: '采购员', columnWidth: '120', headerAlign: 'center', align: 'center', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'buyer', columnLabel: '采购员', columnWidth: '120', headerAlign: 'center', align: 'center', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'paymentTerm', columnLabel: '付款方式', columnWidth: '80', headerAlign: 'center', align: 'center', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'paymentTerm', columnLabel: '付款方式', columnWidth: '80', headerAlign: 'center', align: 'center', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'deliveryTerm', columnLabel: '交易条款', columnWidth: '120', headerAlign: 'center', align: 'center', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
{ columnProp: 'deliveryTerm', columnLabel: '交易条款', columnWidth: '120', headerAlign: 'center', align: 'center', fixed: false, columnHidden: false, columnSortable: false, showOverflowTooltip: true }, |
|
|
@ -458,8 +458,8 @@ export default { |
|
|
this.currentRow = row ? JSON.parse(JSON.stringify(row)) : { site: '', orderNo: '', itemNo: '' } |
|
|
this.currentRow = row ? JSON.parse(JSON.stringify(row)) : { site: '', orderNo: '', itemNo: '' } |
|
|
this.refreshCurrentTabTable() |
|
|
this.refreshCurrentTabTable() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tabClick() { |
|
|
tabClick() { |
|
|
this.refreshCurrentTabTable() |
|
|
this.refreshCurrentTabTable() |
|
|
}, |
|
|
}, |
|
|
@ -503,12 +503,12 @@ export default { |
|
|
this.$message.warning('请选择要报价的询价单') |
|
|
this.$message.warning('请选择要报价的询价单') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 检查是否有上次填写的数据且是当前行的数据 |
|
|
// 检查是否有上次填写的数据且是当前行的数据 |
|
|
const hasLastData = this.lastQuoteData && |
|
|
|
|
|
this.lastQuoteData.orderNo === row.orderNo && |
|
|
|
|
|
|
|
|
const hasLastData = this.lastQuoteData && |
|
|
|
|
|
this.lastQuoteData.orderNo === row.orderNo && |
|
|
this.lastQuoteData.itemNo === row.itemNo |
|
|
this.lastQuoteData.itemNo === row.itemNo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 填充表单数据 |
|
|
// 填充表单数据 |
|
|
this.quoteForm = { |
|
|
this.quoteForm = { |
|
|
// 基础信息 |
|
|
// 基础信息 |
|
|
@ -544,15 +544,15 @@ export default { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
createdBy: this.$store.state.user.name |
|
|
createdBy: this.$store.state.user.name |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 计算含税单价 |
|
|
// 计算含税单价 |
|
|
this.calculatePrice() |
|
|
this.calculatePrice() |
|
|
this.quoteDialogVisible = true |
|
|
this.quoteDialogVisible = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
calculatePrice(){ |
|
|
calculatePrice(){ |
|
|
//未税单价=材料成本+加工费+表面费用+利润 |
|
|
//未税单价=材料成本+加工费+表面费用+利润 |
|
|
this.quoteForm.price = this.quoteForm.materialCost + this.quoteForm.produceFee + |
|
|
|
|
|
|
|
|
this.quoteForm.price = this.quoteForm.materialCost + this.quoteForm.produceFee + |
|
|
this.quoteForm.surfaceFee + this.quoteForm.profit |
|
|
this.quoteForm.surfaceFee + this.quoteForm.profit |
|
|
this.calculateTax() |
|
|
this.calculateTax() |
|
|
|
|
|
|
|
|
@ -564,22 +564,22 @@ export default { |
|
|
this.quoteForm.tax = this.quoteForm.price * (1 + this.quoteForm.taxRate / 100) |
|
|
this.quoteForm.tax = this.quoteForm.price * (1 + this.quoteForm.taxRate / 100) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 提交报价 |
|
|
// 提交报价 |
|
|
submitQuote() { |
|
|
submitQuote() { |
|
|
this.$refs.quoteForm.validate((valid) => { |
|
|
this.$refs.quoteForm.validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
// 计算总成本(可选) |
|
|
// 计算总成本(可选) |
|
|
const totalCost = this.quoteForm.materialCost + this.quoteForm.produceFee + |
|
|
|
|
|
this.quoteForm.surfaceFee + this.quoteForm.profit + |
|
|
|
|
|
this.quoteForm.mouldFee + this.quoteForm.additionalCost + |
|
|
|
|
|
|
|
|
const totalCost = this.quoteForm.materialCost + this.quoteForm.produceFee + |
|
|
|
|
|
this.quoteForm.surfaceFee + this.quoteForm.profit + |
|
|
|
|
|
this.quoteForm.mouldFee + this.quoteForm.additionalCost + |
|
|
this.quoteForm.freight + this.quoteForm.duty |
|
|
this.quoteForm.freight + this.quoteForm.duty |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const submitData = { |
|
|
const submitData = { |
|
|
...this.quoteForm, |
|
|
...this.quoteForm, |
|
|
totalCost: totalCost |
|
|
totalCost: totalCost |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
createPurReplyHist(submitData).then(({ data }) => { |
|
|
createPurReplyHist(submitData).then(({ data }) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.$message.success('报价提交成功') |
|
|
this.$message.success('报价提交成功') |
|
|
@ -601,7 +601,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 取消报价(保存当前填写的数据用于下次残留) |
|
|
// 取消报价(保存当前填写的数据用于下次残留) |
|
|
cancelQuote() { |
|
|
cancelQuote() { |
|
|
// 保存当前填写的数据(只保存可编辑的字段) |
|
|
// 保存当前填写的数据(只保存可编辑的字段) |
|
|
@ -746,4 +746,4 @@ export default { |
|
|
height: 28px; |
|
|
height: 28px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
|
|
|
|
|
|
</style> |