-
-
+
@@ -140,7 +140,7 @@
-
+
@@ -164,8 +164,8 @@
-
-
+
+
@@ -238,7 +238,7 @@
-
+
@@ -258,7 +258,7 @@
-
+
@@ -276,7 +276,7 @@ import {
getQuoPurDetailPage
} from '@/api/supplier/purQuotation.js'
-import {
+import {
createPurReplyHist
} 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: '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: '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: '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.refreshCurrentTabTable()
},
-
-
+
+
tabClick() {
this.refreshCurrentTabTable()
},
@@ -503,12 +503,12 @@ export default {
this.$message.warning('请选择要报价的询价单')
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.quoteForm = {
// 基础信息
@@ -544,15 +544,15 @@ export default {
site: this.$store.state.user.site,
createdBy: this.$store.state.user.name
}
-
+
// 计算含税单价
this.calculatePrice()
this.quoteDialogVisible = true
},
-
+
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.calculateTax()
@@ -564,22 +564,22 @@ export default {
this.quoteForm.tax = this.quoteForm.price * (1 + this.quoteForm.taxRate / 100)
}
},
-
+
// 提交报价
submitQuote() {
this.$refs.quoteForm.validate((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
-
+
const submitData = {
...this.quoteForm,
totalCost: totalCost
}
-
+
createPurReplyHist(submitData).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success('报价提交成功')
@@ -601,7 +601,7 @@ export default {
}
})
},
-
+
// 取消报价(保存当前填写的数据用于下次残留)
cancelQuote() {
// 保存当前填写的数据(只保存可编辑的字段)
@@ -746,4 +746,4 @@ export default {
height: 28px;
}
}
-
\ No newline at end of file
+