Browse Source

2024-09-29

master
qiezi 1 year ago
parent
commit
94e3b3c87f
  1. 1210
      package-lock.json
  2. 4
      package.json
  3. 3
      src/api/quote/salesQuote.js
  4. 1
      src/router/index.js
  5. 48
      src/views/common/previewFile.vue
  6. 27
      src/views/modules/oss/ossComponents.vue
  7. 106
      src/views/modules/quotation/sellForQuotation.vue
  8. 16
      src/views/modules/quotation/sellForQuotation/quoteDetail.vue
  9. 475
      src/views/modules/quote/salesQuote.vue

1210
package-lock.json
File diff suppressed because it is too large
View File

4
package.json

@ -14,6 +14,9 @@
"build": "gulp"
},
"dependencies": {
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.11",
"@vue/composition-api": "^1.7.2",
"axios": "0.17.1",
"babel-plugin-component": "0.10.1",
"babel-polyfill": "6.26.0",
@ -35,6 +38,7 @@
"svg-sprite-loader": "3.7.3",
"vue": "2.5.16",
"vue-cookie": "1.1.4",
"vue-demi": "^0.14.10",
"vue-i18n": "^8.25.0",
"vue-json-excel": "^0.3.0",
"vue-pdf": "^4.3.0",

3
src/api/quote/salesQuote.js

@ -0,0 +1,3 @@
import {createAPI} from "../../utils/httpRequest";
export const querySalesQuoteByPage = (data) => createAPI(`/sales/quote/${data.no}/${data.size}`,'post',data);

1
src/router/index.js

@ -22,6 +22,7 @@ const globalRoutes = [
{ path: '/login', component: _import('common/login'), name: 'login', meta: { title: '登录' } },
{ path: '/login-token', component: _import('common/login-token'), name: 'login', meta: { title: '登录' } },
{ path: '/cdc', component: _import('modules/cdc/collectScreen'), name: 'cdc', meta: { title: '大屏' } },
{ path: '/pre', component: _import('common/previewFile'), name: 'pre', meta: { title: '文件预览' } },
{ path: '/BMPage', component: _import('modules/sampleManagement/technicalSpecificationDetail/technicalSpecificationDetail'), name: 'BM', meta: { title: '技术参数卡' } },
]

48
src/views/common/previewFile.vue

@ -0,0 +1,48 @@
<script>
import VueOfficeExcel from '@vue-office/excel'
//VueOfficeDocx
import VueOfficeDocx from '@vue-office/docx'
import '@vue-office/docx/lib/index.css'
//
import '@vue-office/excel/lib/index.css'
export default {
name: "previewFile",
components:{
VueOfficeExcel,VueOfficeDocx
},
data() {
return {
src: "",
type: "",
loading: true
}
},
created() {
if (this.$route.query.src){
this.src = this.$route.query.src;
this.type = this.$route.query.type;
}else {
this.$message.error('错误路径')
this.$router.back();
}
},
methods:{
rendered(){
this.loading = false
}
}
}
</script>
<template>
<div v-loading="loading">
<vue-office-excel v-if="type === 'xls'" :options="{xls:true}" :src="src" @rendered="rendered" style="height: 100vh"/>
<vue-office-excel v-if="type === 'xlsx'" :src="src" @rendered="rendered" style="height: 100vh"/>
<vue-office-docx v-if="type === 'docx'" :src="src" @rendered="rendered" style="height: 100vh"/>
</div>
</template>
<style scoped>
</style>

27
src/views/modules/oss/ossComponents.vue

@ -150,15 +150,23 @@ export default {
if (txt.includes(row.fileType.toLowerCase())){
type = 'text/plain;charset=utf-8';
}
let office = ['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx'];
let office = ['doc', 'ppt', 'pptx'];
if (office.includes(row.fileType.toLowerCase())){
this.$message.warning(`该文件格式暂不支持预览`)
return
}
let excel = ['xlsx','xls'];
if (excel.includes(row.fileType.toLowerCase())){
type = row.fileType.toLowerCase();
}
let word = ['docx'];
if (word.includes(row.fileType.toLowerCase())){
type = 'docx'
}
let pdf = ['pdf'];
if (pdf.includes(row.fileType.toLowerCase())){
type = 'application/pdf';
type = 'application/pdf;charset-UTF-8';
}
if (type === ''){
@ -172,8 +180,19 @@ export default {
const blob = new Blob([data], { type: type });
// URL
const fileURL = URL.createObjectURL(blob);
//
const newTab = window.open(fileURL, '_blank');
if (type === 'xls' || type === 'docx' || type === 'xlsx'){
const { href } = this.$router.resolve({
name: 'pre',
query:{
src: fileURL,
type:type
}
})
window.open(href, '_blank')
}else {
//
const newTab = window.open(fileURL, '_blank');
}
});
},
handleDownload(){

106
src/views/modules/quotation/sellForQuotation.vue

@ -92,7 +92,7 @@
</el-col>
<el-col :span="3">
<el-form-item label=" ">
<el-button plain type="primary" @click="initDataBtn" @keyup.enter.native="initDataBtn"> </el-button>
<el-button plain type="primary" @click="initDataBtn"> </el-button>
<el-button type="primary" @click="insertDiaLogFlag = true"> </el-button>
</el-form-item>
</el-col>
@ -113,6 +113,7 @@
@click="handleUpdateStatus(scope.row)">下达
</el-link>
<el-link style="cursor: pointer" v-if="scope.row.quotationStatus === '下达'" @click="handleUpdateStatus(scope.row,true)">取消下达</el-link>
<el-link style="cursor: pointer" v-if="scope.row.quotationStatus !== '草稿'" @click="handleDetail(scope.row)">详情</el-link>
<el-link style="cursor: pointer" v-if="scope.row.quotationStatus === '草稿'" @click="editQuotationHeader(scope.row)">编辑</el-link>
<el-link style="cursor: pointer" v-if="scope.row.quotationStatus === '草稿'" @click="deleteQuotationHeader(scope.row)">删除</el-link>
<el-link style="cursor: pointer" @click="quotationAgain(scope.row)">重新报价</el-link>
@ -153,9 +154,6 @@
<el-tab-pane label="报价明细" name="quote_detail">
<quote-detail :header="quotationHeader"></quote-detail>
</el-tab-pane>
<!-- <el-tab-pane label="报价审批" name="quotation_examine_and_approve">-->
<!-- <quotation-examine-and-approve></quotation-examine-and-approve>-->
<!-- </el-tab-pane>-->
<el-tab-pane label="项目信息" name="quotation_project_information">
<quotation-project-information :quotation-header="quotationHeader"></quotation-project-information>
</el-tab-pane>
@ -171,38 +169,47 @@
</el-tab-pane>
<el-tab-pane label="报价-附件信息" name="quote_oss">
<oss-components label="报价单号" :columns="ossColumns" :order-ref1="quotationHeader.site" :order-ref2="`${quotationHeader.quotationNo}-${quotationHeader.versionCode}`"></oss-components>
<oss-components label="报价单号"
:columns="ossColumns"
:order-ref1="quotationHeader.site?quotationHeader.site:''"
:order-ref2="`${quotationHeader.quotationNo}-${quotationHeader.versionCode}`">
</oss-components>
</el-tab-pane>
<el-tab-pane label="询价-附件信息" name="oss">
<oss-components label="询价单号" :columns="ossColumns" :order-ref1="quotationHeader.site" :order-ref2="quotationHeader.internalInquiryNo"></oss-components>
<oss-components label="询价单号"
:columns="ossColumns"
:order-ref1="quotationHeader.site"
:order-ref2="quotationHeader.internalInquiryNo?quotationHeader.internalInquiryNo:''">
</oss-components>
</el-tab-pane>
</el-tabs>
<!-- 新增弹框 -->
<el-dialog
:title="insertData.quotationHeaderId?`编辑销售报价-${insertData.quotationNo}-${insertData.versionCode}`:`新增销售报价`"
@close="closeInsertDialog" :close-on-click-modal="false" v-drag :visible.sync="insertDiaLogFlag" width="32vw">
:title="insertData.quotationHeaderId?`编辑销售报价-${insertData.quotationNo}-${insertData.versionCode}`:`销售报价`"
@close="closeInsertDialog" :close-on-click-modal="false" v-drag :visible.sync="insertDiaLogFlag" width="500px">
<el-form :rules="rules" label-position="top" ref="insertQuotationForm" :model="insertData"
label-width="120px">
<el-row :gutter="10">
<el-col :span="8">
<el-form-item prop="internalInquiryNo">
<span slot="label" style="" @click="clickInternalInquiryNoHandle"><a herf="#">内部询价单号</a></span>
<el-input v-model="insertData.internalInquiryNo" @blur="blurInternalInquiryNoHandle" clearable/>
<el-form-item label="内部询价单号" prop="internalInquiryNo">
<span slot="label" v-if="!detailDialogVisible" @click="clickInternalInquiryNoHandle"><a herf="#">内部询价单号</a></span>
<el-input v-model="insertData.internalInquiryNo" :disabled="detailDialogVisible" @blur="blurInternalInquiryNoHandle" clearable/>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="客户询价单号" prop="customerInquiryNo">
<el-input v-model="insertData.customerInquiryNo" clearable/>
<el-input v-model="insertData.customerInquiryNo" :disabled="detailDialogVisible" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<el-form-item prop="customerNo" label="客户编码">
<span slot="label" style="" v-if="insertData.internalInquiryNo ===''" @click="getBaseList(102,1)"><a
herf="#">客户编码</a></span>
<el-input v-model="insertData.customerNo" :disabled="insertData.internalInquiryNo !==''"
<span slot="label" v-if="insertData.internalInquiryNo ==='' && !detailDialogVisible" @click="getBaseList(102,1)">
<a>客户编码</a>
</span>
<el-input v-model="insertData.customerNo" :disabled="insertData.internalInquiryNo !=='' || detailDialogVisible"
clearable @change="clearCustomer" @blur="handleQueryCustomer"/>
</el-form-item>
</el-col>
@ -215,11 +222,10 @@
<el-row :gutter="10">
<el-col :span="8">
<el-form-item prop="projectId" label="项目编码">
<span slot="label" style="" v-if="insertData.customerNo !=='' && insertData.internalInquiryNo ===''"
@click="clickProject"><a herf="#">项目编码</a></span>
<el-input v-model="insertData.projectId"
:disabled="insertData.customerNo ==='' || insertData.internalInquiryNo !==''"
clearable @blur="handleQueryProjectByCustomer"/>
<span slot="label" v-if="insertData.customerNo !=='' && insertData.internalInquiryNo ==='' && !detailDialogVisible " @click="clickProject">
<a>项目编码</a>
</span>
<el-input v-model="insertData.projectId" :disabled="insertData.customerNo ==='' || insertData.internalInquiryNo !=='' || detailDialogVisible" clearable @blur="handleQueryProjectByCustomer"/>
</el-form-item>
</el-col>
<el-col :span="16">
@ -243,8 +249,7 @@
<el-row :gutter="10">
<el-col :span="8">
<el-form-item label="货币" prop="currency">
<el-input v-model="insertData.currency" :disabled="insertData.internalInquiryNo !==''"
clearable/>
<el-input v-model="insertData.currency" :disabled="insertData.internalInquiryNo !=='' || detailDialogVisible" clearable/>
</el-form-item>
</el-col>
<el-col :span="8">
@ -254,6 +259,7 @@
v-model="insertData.quotationDate"
type="date"
size="mini"
:disabled="detailDialogVisible"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
@ -263,26 +269,25 @@
</el-row>
<el-row :gutter="10">
<el-col :span="8">
<!-- <el-form-item prop="quoter" label="报价专员">-->
<el-form-item label="报价专员" prop="quoterName">
<span slot="label" style="" @click="getBaseList(2002)"><a herf="#">报价专员</a></span>
<el-input v-model="insertData.quoterName" @clear="clearQuoter" readonly clearable/>
<span slot="label" @click="getBaseList(2002)" v-if="!detailDialogVisible"><a>报价专员</a></span>
<el-input v-model="insertData.quoterName" @clear="clearQuoter" readonly :disabled="detailDialogVisible" clearable/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="采购专员" prop="trackerName">
<!-- <el-form-item prop="tracker" label="采购专员">-->
<span slot="label" style="" v-if="insertData.internalInquiryNo ===''" @click="getBaseList(2000)"><a
herf="#">采购专员</a></span>
<el-input v-model="insertData.trackerName" :disabled="insertData.internalInquiryNo !==''"
@clear="clearTracker" readonly clearable/>
<span slot="label" v-if="insertData.internalInquiryNo ==='' && !detailDialogVisible" @click="getBaseList(2000)">
<a>采购专员</a>
</span>
<el-input v-model="insertData.trackerName" :disabled="insertData.internalInquiryNo !=='' || detailDialogVisible" @clear="clearTracker" readonly clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" style="width: 100%;min-height: 90px">
<el-input type="textarea" style="width: 100%" resize="none" :autosize="{minRows: 3, maxRows: 3}"
<el-input type="textarea" style="width: 100%" :disabled="detailDialogVisible" resize="none" :autosize="{minRows: 3, maxRows: 3}"
v-model="insertData.remark"/>
</el-form-item>
</el-col>
@ -805,7 +810,7 @@ export default {
tableName: '文件信息表',
columnProp: 'fileName',
headerAlign: 'center',
align: 'center',
align: 'left',
columnLabel: '文件名称',
columnHidden: false,
columnImage: false,
@ -823,7 +828,7 @@ export default {
tableName: '文件信息表',
columnProp: 'fileRemark',
headerAlign: 'center',
align: 'center',
align: 'left',
columnLabel: '备注',
columnHidden: false,
columnImage: false,
@ -833,24 +838,6 @@ export default {
fixed: '',
columnWidth: 240
},
// {
// userId: this.$store.state.user.name,
// functionId: 103001,
// serialNumber: '103001Table2OrderRef3',
// tableId: '103001Table2',
// tableName: '',
// columnProp: 'orderRef3',
// 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: 103001,
@ -888,6 +875,7 @@ export default {
columnWidth: 140
}
],
detailDialogVisible: false,
}
},
methods: {
@ -959,7 +947,7 @@ export default {
if (this.tableData.length > 0) {
this.quotationHeader = this.tableData[0];
} else {
this.quotationHeader = null;
this.quotationHeader = {};
}
}else {
this.$message.warning(data.msg)
@ -1357,6 +1345,9 @@ export default {
this.insertData.projectName = '';
},
quotationHeaderRowStyle({row}) {
if (!this.quotationHeader){
return {}
}
if (row.quotationHeaderId === this.quotationHeader.quotationHeaderId) {
return {'background-color': '#E8F7F6'}
}
@ -1474,6 +1465,14 @@ export default {
this.$message.error(error)
})
},
handleDetail(row){
this.insertData = {
...row,
};
this.insertData.internalInquiryBatchNo = this.insertData.internalInquiryNo.split("-")[0]
this.detailDialogVisible = true;
this.insertDiaLogFlag = true;
}
},
computed: {},
watch: {
@ -1492,6 +1491,11 @@ export default {
}
}
},
insertDiaLogFlag(newVal,oldVal){
if (newVal === false){
this.detailDialogVisible = false;
}
}
},
mounted() {
},

16
src/views/modules/quotation/sellForQuotation/quoteDetail.vue

@ -1098,6 +1098,17 @@ export default {
}).catch((error)=>{
this.$message.error(error);
})
},
handleDetail(row,index){
if (index < 10){
this.index = "00"+index;
}else if (index%10 <= 10){
this.index = "0"+index;
}else if (index%100 <= 10){
this.index = index
}
this.quotationDetail = {...row};
this.quotationDetailFlag = true;
}
},
}
@ -1109,16 +1120,15 @@ export default {
<el-button type="primary" @click="quotationLeadIntoDetailFlag = true">新增</el-button>
</div>
<el-table v-loading="initQuotationDetailLoading" element-loading-text = "数据正在加载中"
element-loading-spinner = "el-icon-loading" :data="tableData" :height="height" border
:header-cell-style="{background:'rgba(23,179,163)',color:'#fff'}">
element-loading-spinner = "el-icon-loading" :data="tableData" :height="height" border>
<el-table-column
label="操作"
fixed
width="140" align="center">
<template slot-scope="{row,$index}">
<!-- <el-link style="cursor: pointer" v-if="row.quotationDetailStatus !== '下达'" @click="editQuotationDetailStatus(row,'下达')">下达</el-link>-->
<el-link style="cursor: pointer" v-if="row.quotationDetailStatus === '草稿'" @click="editQuotationDetail(row,$index+1)">编辑</el-link>
<el-link style="cursor: pointer" v-if="row.quotationDetailStatus === '草稿'" @click="deleteQuotationDetailData(row)">删除</el-link>
<!-- <el-link style="cursor: pointer" v-if="row.quotationDetailStatus !== '草稿'" @click="handleDetail(row,$index)">详情</el-link>-->
<el-dropdown trigger="click">
<el-link style="cursor: pointer;font-size: 12px">
更多

475
src/views/modules/quote/salesQuote.vue

@ -0,0 +1,475 @@
<script>
import {querySalesQuoteByPage} from "../../../api/quote/salesQuote";
export default {
name: "salesQuote",
props: {
queryStyle: {
type: Object,
default: () => ({
width: "1200px",
})
},
height: {
type: [String, Number],
default: "80vh"
},
currentRow:{
type: Object,
default: () => ({
id: "",
})
}
},
data() {
return {
queryLoading: false,
dataList: [],
querySalesQuote: {
site: "",
customerNo: "",
customerDesc: "",
projectId: "",
projectDesc: "",
status: "",
quoterName: "",
trackerName: "",
quotationNo: "",
startDate: "",
endDate: "",
customerInquiryNo: "",
internalInquiryNo: "",
},
no: 1,
size: 20,
total: 0,
columns: [
{
userId: this.$store.state.user.name,
functionId: 102003,
serialNumber: '102003Table1QuoteVersionNo',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'quoteVersionNo',
headerAlign: 'center',
align: 'center',
columnLabel: '报价单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 140
},
{
userId: this.$store.state.user.name,
functionId: 102003,
serialNumber: '102003Table1QuotationDate',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'quotationDate',
headerAlign: 'center',
align: 'center',
columnLabel: '报价日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 100
},
{
userId: this.$store.state.user.name,
functionId: 102003,
serialNumber: '102003Table1CustomerNo',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'customerNo',
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: 102003,
serialNumber: '102003Table1CustomerName',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'customerDesc',
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: 102003,
serialNumber: '102003Table1ProjectId',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'projectId',
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: 102003,
serialNumber: '102003Table1ProjectName',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'projectDesc',
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: 102003,
serialNumber: '102003Table1QuoterName',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'quoterName',
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: 102003,
serialNumber: '102003Table1TrackerName',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'trackerName',
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: 102003,
serialNumber: '102003Table1Currency',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'currency',
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: 102003,
serialNumber: '102003Table1Status',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'status',
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: 102003,
serialNumber: '102003Table1CustomerInquiryNo',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'customerInquiryNo',
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: 102003,
serialNumber: '102003Table1InternalInquiryNo',
tableId: '102003Table1',
tableName: '报价信息表',
columnProp: 'internalInquiryNo',
headerAlign: 'center',
align: 'center',
columnLabel: '内部询价单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
],
}
},
methods: {
handleQuerySalesQuote() {
let params = {
...this.querySalesQuote,
no: this.no,
size: this.size,
site: this.$store.state.user.site,
}
this.queryLoading = true;
querySalesQuoteByPage(params).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.rows
this.total = data.total
} else {
this.$message.warning(data.msg)
}
this.queryLoading = false;
}).catch((error) => {
this.$message.error(error)
this.queryLoading = false;
})
},
handleSizeChange(val){
this.size = val;
this.handleQuerySalesQuote();
},
handleCurrentChange(val){
this.no = val;
this.handleQuerySalesQuote();
},
handleSaveSalesQuote(){
this.$emit("save")
},
handleUpdateSalesQuoteStatus(row){
let salesQuote = {
...row,
quotationStatus: row.status,
}
this.$emit("updateStatus",salesQuote)
},
handleShowSalesQuote(row){
this.$emit("show",row)
},
handleUpdateSalesQuote(row){
this.$emit("update",row)
},
handleRemoveSalesQuote(row){
this.$emit("remove",row)
},
handleAgainSalesQuote(row){
this.$emit("again",row)
},
rowStyle({row}){
if (this.currentRow.id === row.id){
return {'background-color': '#E8F7F6'}
}
},
handleClickRow(row){
let salesQuote = {
...row,
quotationHeaderId: row.id,
}
this.$emit("rowClick",salesQuote)
}
}
}
</script>
<template>
<div>
<div :style="queryStyle">
<el-form :model="querySalesQuote" label-position="top">
<el-row :gutter="10">
<el-col :span="3">
<el-form-item label="客户编码">
<el-input v-model="querySalesQuote.customerNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="客户名称">
<el-input v-model="querySalesQuote.customerDesc"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="采购专员">
<el-input v-model="querySalesQuote.trackerName"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="报价单号">
<el-input v-model="querySalesQuote.quotationNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="客户询价单号">
<el-input v-model="querySalesQuote.customerInquiryNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="内部询价单号">
<el-input v-model="querySalesQuote.internalInquiryNo"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="3">
<el-form-item label="项目编码">
<el-input v-model="querySalesQuote.projectId"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="项目名称">
<el-input v-model="querySalesQuote.projectDesc"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="报价专员">
<el-input v-model="querySalesQuote.quoterName"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="状态">
<el-select v-model="querySalesQuote.status">
<el-option label="全部" value=""></el-option>
<el-option label="草稿" value="草稿"></el-option>
<el-option label="下达" value="下达"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报价日期">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="querySalesQuote.startDate"
style="width: 48%"
type="date"
placeholder=" ">
</el-date-picker>
<div style="width: 1.2%;text-align: center;display: inline-block;">
-
</div>
<el-date-picker
value-format="yyyy-MM-dd"
v-model="querySalesQuote.endDate"
style="width: 48%"
type="date"
placeholder=" ">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label=" ">
<el-button type="primary" :loading="queryLoading" @click="handleQuerySalesQuote">查询</el-button>
<el-button type="primary" @click="handleSaveSalesQuote">新增</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table :data="dataList"
border
:height="height"
:row-style="rowStyle"
@row-click="handleClickRow">
<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">
<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-column
label="操作"
align="center"
fixed="right"
width="160">
<template slot-scope="{row,$index}">
<a v-if="row.status === '草稿'" @click="handleUpdateSalesQuoteStatus(row)">下达</a>
<a v-if="row.status === '下达'" @click="handleUpdateSalesQuoteStatus(row)">取消下达</a>
<a v-if="row.status !== '草稿'" @click="handleShowSalesQuote(row)">详情</a>
<a v-if="row.status === '草稿'" @click="handleUpdateSalesQuote(row)">编辑</a>
<a v-if="row.status === '草稿'" @click="handleRemoveSalesQuote(row)">删除</a>
<a @click="handleAgainSalesQuote(row)">重新报价</a>
</template>
</el-table-column>
</el-table>
<el-pagination style="margin-top: 0px"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="no"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="size"
:total="total"
layout="total,sizes, prev, pager, next, jumper">
</el-pagination>
</div>
</template>
<style scoped>
</style>
Loading…
Cancel
Save