Browse Source

供应商报价增加附件,我的报价计算含税单价

master
yanyan 1 month ago
parent
commit
68419a31db
  1. 18
      src/views/modules/supplier/myPurReplyHistList.vue
  2. 59
      src/views/modules/supplier/supPurReplyHistList.vue

18
src/views/modules/supplier/myPurReplyHistList.vue

@ -466,7 +466,25 @@ export default {
otherCondition: '' otherCondition: ''
} }
} }
// :
this.calculatePrice()
// this.calculateTax()
this.quoteDialogVisible = true
this.dialogVisible = true this.dialogVisible = true
},
calculatePrice(){
//=+++
this.form.price = this.form.materialCost + this.form.produceFee +
this.form.surfaceFee + this.form.profit
this.calculateTax()
},
//
calculateTax() {
//=*(1+)
if (this.form.price && this.form.taxRate) {
this.form.tax = this.form.price * (1 + this.form.taxRate / 100)
}
}, },
validateForm() { validateForm() {
if (!this.form.partNo) { if (!this.form.partNo) {

59
src/views/modules/supplier/supPurReplyHistList.vue

@ -38,7 +38,7 @@
</el-form> </el-form>
<!-- 列表 --> <!-- 列表 -->
<el-table :data="dataList" :height="height" border highlight-current-row v-loading="loading" style="width:100%" stripe>
<el-table :data="dataList" :height="height" border ref="mainTable" highlight-current-row v-loading="loading" style="width:100%" stripe>
<el-table-column fixed="right" :label="'操作'" header-align="center" align="center" width="140"> <el-table-column fixed="right" :label="'操作'" header-align="center" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<a class="customer-a" v-if="scope.row.status === '已报价'" @click="openDialog(scope.row)">审批</a> <a class="customer-a" v-if="scope.row.status === '已报价'" @click="openDialog(scope.row)">审批</a>
@ -142,6 +142,14 @@
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper" /> layout="total, sizes, prev, pager, next, jumper" />
<!-- 标签页 -->
<el-tabs v-model="activeName" style="margin-top: 0px; width: 99%;" @tab-click="tabClick" class="customer-tab" type="border-card">
<el-tab-pane label="附件" name="attachments">
<attachments ref="attachments" :height="tabHeight"></attachments>
</el-tab-pane>
</el-tabs>
<!-- 新增 / 编辑 弹窗 --> <!-- 新增 / 编辑 弹窗 -->
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false" v-drag> <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px" :close-on-click-modal="false" v-drag>
<el-form label-position="top" class="pi-form" :model="form" label-width="120px"> <el-form label-position="top" class="pi-form" :model="form" label-width="120px">
@ -512,6 +520,7 @@
</div> </div>
</template> </template>
<script> <script>
import { import {
searchPurReplyHistPage, searchPurReplyHistPage,
@ -525,8 +534,13 @@ import {
createPartSupplierRelation createPartSupplierRelation
} from '../../../api/part/partSupplierRelation' } from '../../../api/part/partSupplierRelation'
import attachments from './com_inquiry_Attachments'
export default { export default {
name: 'MyQuotation', name: 'MyQuotation',
components: {
attachments
},
data() { data() {
return { return {
height: 200, height: 200,
@ -536,6 +550,8 @@ export default {
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
totalPage: 0, totalPage: 0,
currentRow: {},
activeName: 'attachments',
searchData: { searchData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
createdBy: this.$store.state.user.name, createdBy: this.$store.state.user.name,
@ -636,8 +652,31 @@ export default {
methods: { methods: {
calcHeight() { calcHeight() {
this.$nextTick(() => { this.$nextTick(() => {
this.height = window.innerHeight - 212
// this.height = window.innerHeight - 212
this.height = (window.innerHeight - 280) / 2
this.tabHeight = this.height - 50
this.refreshCurrentTabTable()
}) })
},
refreshCurrentTabTable() {
if (this.currentRow === '' || this.currentRow === null) {
this.currentRow = {site: '', orderNo: ''}
}
if (this.activeName === 'attachments') {
this.refreshAttachments()
}
},
refreshAttachments () {
console.log('刷新附件组件,当前行数据:', this.currentRow)
let inData = {
orderRef1: this.currentRow.site,
orderRef2: this.currentRow.orderNo,
orderRef3: this.currentRow.partNo,
orderReftype: 'purQuotationDetail',
height: this.tabHeight
}
this.$refs.attachments.init(inData)
}, },
getStatusType(status) { getStatusType(status) {
const map = { const map = {
@ -672,6 +711,13 @@ export default {
this.pageIndex = data.page.currPage this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
if (this.dataList.length > 0) {
this.$refs.mainTable.setCurrentRow(this.dataList[0])
console.log('默认选中第一行:', this.dataList[0])
this.changeData(this.dataList[0])
} else {
this.changeData(null)
}
} else { } else {
this.$message.error((data && data.msg) || '获取列表失败') this.$message.error((data && data.msg) || '获取列表失败')
} }
@ -681,6 +727,15 @@ export default {
this.$message.error('请求失败') this.$message.error('请求失败')
}) })
}, },
changeData(row) {
this.currentRow = row ? JSON.parse(JSON.stringify(row)) : { site: '', orderNo: '', itemNo: '' }
console.log('选中行数据:', this.currentRow)
this.refreshCurrentTabTable()
},
tabClick() {
this.refreshCurrentTabTable()
},
sizeChangeHandle(val) { sizeChangeHandle(val) {
this.pageSize = val this.pageSize = val
this.pageIndex = 1 this.pageIndex = 1

Loading…
Cancel
Save