Browse Source

2023-11-30 plm报价

master
zelian_wu 2 years ago
parent
commit
e85d7c0b71
  1. 4
      src/api/quotation/quotationHeader.js
  2. 265
      src/components/quotation/sellForQuotation/quotationDetail.vue
  3. 59
      src/views/modules/quotation/sellForQuotation.vue

4
src/api/quotation/quotationHeader.js

@ -12,7 +12,8 @@ export const getQuotationHeaderByPage = (data) => createAPI(`/plm/quotationHeade
* @param data * @param data
* @returns {*} * @returns {*}
*/ */
export const insertQuotationHeader = (data) => createAPI('/plm/quotationHeader/insertQuotationHeader','post',data);
export const saveQuotationHeader = (data) => createAPI('/plm/quotationHeader/saveQuotationHeader','post',data);
export const deleteByQuotationHeaderId = (data) => createAPI('/plm/quotationHeader/deleteByQuotationHeaderId','post',data);
/** /**
* 查询 报价工具列表 page * 查询 报价工具列表 page
@ -55,6 +56,7 @@ export const batchDeleteQuotationTool = (data) => createAPI('/plm/quotationTool/
export const searchQuotationDetailPageByHeaderId = (data) => createAPI('/plm/quotationDetail/searchQuotationDetailPageByHeaderId','get',data); export const searchQuotationDetailPageByHeaderId = (data) => createAPI('/plm/quotationDetail/searchQuotationDetailPageByHeaderId','get',data);
export const searchQuotationDetail = (data) => createAPI('/plm/quotationDetail/list','get',data); export const searchQuotationDetail = (data) => createAPI('/plm/quotationDetail/list','get',data);
export const quotationDetailList = (data) => createAPI('/plm/quotationDetail/quotationDetailList','get',data);
/** /**
* 新增QuotationDetail * 新增QuotationDetail
* @param data * @param data

265
src/components/quotation/sellForQuotation/quotationDetail.vue
File diff suppressed because it is too large
View File

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

@ -65,14 +65,17 @@
</el-form> </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 <el-table-column
label="操作" label="操作"
align="center" align="center"
fixed fixed
width="60">
width="120">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -257,13 +260,15 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <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> <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-input v-model="insertData.quoterName" :disabled="insertData.internalInquiryNo !=''" @clear="clearQuoter" placeholder="请输入内容" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" :offset="2"> <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> <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-input v-model="insertData.trackerName" :disabled="insertData.internalInquiryNo !=''" @clear="clearTracker" placeholder="请输入内容" size="large" clearable />
</el-form-item> </el-form-item>
@ -295,13 +300,12 @@
</el-form> </el-form>
<el-footer style="height:30px;margin-top: 20px;text-align:center"> <el-footer style="height:30px;margin-top: 20px;text-align:center">
<el-button @click="insertDiaLogFlag = false">关闭</el-button> <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-footer>
</el-dialog> </el-dialog>
<!--询价单号选择弹框--> <!--询价单号选择弹框-->
<el-dialog title="内部询价单号" <el-dialog title="内部询价单号"
:close-on-click-modal="false" :close-on-press-escape="false"
@close="closeQuotationNoDialog" @close="closeQuotationNoDialog"
@open="openQuotationNoDialog" @open="openQuotationNoDialog"
:visible.sync="quotationNoDialogFlag" :visible.sync="quotationNoDialogFlag"
@ -345,7 +349,8 @@ import quotationCustomerContact from "../../../components/quotation/sellForQuota
import Chooselist from '@/views/modules/common/Chooselist'; import Chooselist from '@/views/modules/common/Chooselist';
import { import {
getQuotationHeaderByPage, getQuotationHeaderByPage,
insertQuotationHeader,
saveQuotationHeader,
deleteByQuotationHeaderId,
} from '@/api/quotation/quotationHeader.js'; } from '@/api/quotation/quotationHeader.js';
import { import {
searchQuotationByQuotationNo, searchQuotationByQuotationNo,
@ -376,6 +381,7 @@ export default {
dateValue:[],// dateValue:[],//
}, },
tableData: [],// tableData: [],//
initQuotationHeaderLoading:false,//
// //
no:1,// no:1,//
size:20,// size:20,//
@ -487,8 +493,10 @@ export default {
}, },
methods: { methods: {
// quotation // quotation
rowClickQuotation(row){
this.quotationHeader = row;
rowClickQuotation(row,column,event){
if (column.label != '操作'){
this.quotationHeader = row;
}
}, },
// change // change
changeDateRange(){ changeDateRange(){
@ -519,6 +527,7 @@ export default {
startDate:this.searchData.startDate, startDate:this.searchData.startDate,
endDate: this.searchData.endDate, endDate: this.searchData.endDate,
} }
this.initQuotationHeaderLoading = true;
getQuotationHeaderByPage(params).then(({data})=>{ getQuotationHeaderByPage(params).then(({data})=>{
this.tableData = data.data.records; this.tableData = data.data.records;
this.total = data.data.total; this.total = data.data.total;
@ -527,8 +536,33 @@ export default {
}else { }else {
this.quotationHeader = null; 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 // size
quotationHeaderSizeChange(val){ quotationHeaderSizeChange(val){
this.size = val; this.size = val;
@ -540,14 +574,13 @@ export default {
this.initData(); this.initData();
}, },
// QuotationHeader // QuotationHeader
insertQuotationHeader(){
saveQuotationHeader(){
// //
this.$refs['insertQuotationForm'].validate((valid,objects)=>{ this.$refs['insertQuotationForm'].validate((valid,objects)=>{
if (valid){ if (valid){
this.insertQuotationHeaderBtn = true; this.insertQuotationHeaderBtn = true;
// //
insertQuotationHeader(this.insertData).then(({data})=>{
console.log("回调结果:",data)
saveQuotationHeader(this.insertData).then(({data})=>{
// //
if (data.code === 200){ if (data.code === 200){
this.initData(); this.initData();

Loading…
Cancel
Save