|
|
|
@ -65,14 +65,17 @@ |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<!-- 表格 和上述搜索框对应 --> |
|
|
|
<el-table :data="tableData" @row-click="rowClickQuotation" stripe border style="width: 100%;margin-top: 12px" :height="height"> |
|
|
|
<el-table :data="tableData" v-loading="initQuotationHeaderLoading" element-loading-text = "数据正在加载中" |
|
|
|
element-loading-spinner = "el-icon-loading" @row-click="rowClickQuotation" stripe border style="width: 100%;margin-top: 12px" :height="height"> |
|
|
|
<el-table-column |
|
|
|
label="操作" |
|
|
|
align="center" |
|
|
|
fixed |
|
|
|
width="60"> |
|
|
|
width="120"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="text" style="padding: 0px 10px" size="small">下达</el-button> |
|
|
|
<el-link style="cursor: pointer">下达</el-link> |
|
|
|
<el-link style="cursor: pointer" @click="editQuotationHeader(scope.row)">编辑</el-link> |
|
|
|
<el-link style="cursor: pointer" @click="deleteQuotationHeader(scope.row)">删除</el-link> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
@ -257,13 +260,15 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="quoter" label="销售员"> |
|
|
|
<!-- <el-form-item prop="quoter" label="销售员">--> |
|
|
|
<el-form-item label="销售员"> |
|
|
|
<span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(103,2)"><a herf="#">销售员</a></span> |
|
|
|
<el-input v-model="insertData.quoterName" :disabled="insertData.internalInquiryNo !=''" @clear="clearQuoter" placeholder="请输入内容" clearable /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" :offset="2"> |
|
|
|
<el-form-item prop="tracker" label="跟单员"> |
|
|
|
<el-form-item label="跟单员"> |
|
|
|
<!-- <el-form-item prop="tracker" label="跟单员">--> |
|
|
|
<span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(103,1)"><a herf="#">跟单员</a></span> |
|
|
|
<el-input v-model="insertData.trackerName" :disabled="insertData.internalInquiryNo !=''" @clear="clearTracker" placeholder="请输入内容" size="large" clearable /> |
|
|
|
</el-form-item> |
|
|
|
@ -295,13 +300,12 @@ |
|
|
|
</el-form> |
|
|
|
<el-footer style="height:30px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button @click="insertDiaLogFlag = false">关闭</el-button> |
|
|
|
<el-button type="primary" :loading="insertQuotationHeaderBtn" @click="insertQuotationHeader">保存</el-button> |
|
|
|
<el-button type="primary" :loading="insertQuotationHeaderBtn" @click="saveQuotationHeader">保存</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!--询价单号选择弹框--> |
|
|
|
<el-dialog title="内部询价单号" |
|
|
|
:close-on-click-modal="false" :close-on-press-escape="false" |
|
|
|
@close="closeQuotationNoDialog" |
|
|
|
@open="openQuotationNoDialog" |
|
|
|
:visible.sync="quotationNoDialogFlag" |
|
|
|
@ -345,7 +349,8 @@ import quotationCustomerContact from "../../../components/quotation/sellForQuota |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist'; |
|
|
|
import { |
|
|
|
getQuotationHeaderByPage, |
|
|
|
insertQuotationHeader, |
|
|
|
saveQuotationHeader, |
|
|
|
deleteByQuotationHeaderId, |
|
|
|
} from '@/api/quotation/quotationHeader.js'; |
|
|
|
import { |
|
|
|
searchQuotationByQuotationNo, |
|
|
|
@ -376,6 +381,7 @@ export default { |
|
|
|
dateValue:[],// 开始时间结束时间数组 |
|
|
|
}, |
|
|
|
tableData: [],// 查询的数据 |
|
|
|
initQuotationHeaderLoading:false,//表格加载状态 |
|
|
|
// 分页信息 |
|
|
|
no:1,//页码 |
|
|
|
size:20,//每页条数 |
|
|
|
@ -487,8 +493,10 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 点击quotation行事件 |
|
|
|
rowClickQuotation(row){ |
|
|
|
this.quotationHeader = row; |
|
|
|
rowClickQuotation(row,column,event){ |
|
|
|
if (column.label != '操作'){ |
|
|
|
this.quotationHeader = row; |
|
|
|
} |
|
|
|
}, |
|
|
|
// 搜索条件中的时间输入框 change事件 |
|
|
|
changeDateRange(){ |
|
|
|
@ -519,6 +527,7 @@ export default { |
|
|
|
startDate:this.searchData.startDate, |
|
|
|
endDate: this.searchData.endDate, |
|
|
|
} |
|
|
|
this.initQuotationHeaderLoading = true; |
|
|
|
getQuotationHeaderByPage(params).then(({data})=>{ |
|
|
|
this.tableData = data.data.records; |
|
|
|
this.total = data.data.total; |
|
|
|
@ -527,8 +536,33 @@ export default { |
|
|
|
}else { |
|
|
|
this.quotationHeader = null; |
|
|
|
} |
|
|
|
this.initQuotationHeaderLoading = false; |
|
|
|
}).catch((error)=>{ |
|
|
|
this.initQuotationHeaderLoading = false; |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 删除方法 |
|
|
|
deleteQuotationHeader(row){ |
|
|
|
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
deleteByQuotationHeaderId(row).then(({data})=>{ |
|
|
|
if (data.code == 200){ |
|
|
|
this.$message.success(data.msg); |
|
|
|
this.initData(); |
|
|
|
}else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 修改方法 |
|
|
|
editQuotationHeader(row){ |
|
|
|
this.insertData = JSON.parse(JSON.stringify(row)); |
|
|
|
this.insertDiaLogFlag = true; |
|
|
|
}, |
|
|
|
// size 发送改变 |
|
|
|
quotationHeaderSizeChange(val){ |
|
|
|
this.size = val; |
|
|
|
@ -540,14 +574,13 @@ export default { |
|
|
|
this.initData(); |
|
|
|
}, |
|
|
|
// 新增QuotationHeader |
|
|
|
insertQuotationHeader(){ |
|
|
|
saveQuotationHeader(){ |
|
|
|
// 校验 |
|
|
|
this.$refs['insertQuotationForm'].validate((valid,objects)=>{ |
|
|
|
if (valid){ |
|
|
|
this.insertQuotationHeaderBtn = true; |
|
|
|
// 请求 |
|
|
|
insertQuotationHeader(this.insertData).then(({data})=>{ |
|
|
|
console.log("回调结果:",data) |
|
|
|
saveQuotationHeader(this.insertData).then(({data})=>{ |
|
|
|
// 返回提示 |
|
|
|
if (data.code === 200){ |
|
|
|
this.initData(); |
|
|
|
|