Browse Source

2023-12-01 plm报价

master
zelian_wu 2 years ago
parent
commit
2cccc49754
  1. 7
      src/api/quotation/quotationHeader.js
  2. 22
      src/views/modules/quotation/sellForQuotation.vue
  3. 0
      src/views/modules/quotation/sellForQuotation/quotationCustomerContact.vue
  4. 0
      src/views/modules/quotation/sellForQuotation/quotationCustomerInformation.vue
  5. 100
      src/views/modules/quotation/sellForQuotation/quotationDetail.vue
  6. 0
      src/views/modules/quotation/sellForQuotation/quotationExamineAndApprove.vue
  7. 0
      src/views/modules/quotation/sellForQuotation/quotationProjectInformation.vue
  8. 549
      src/views/modules/quotation/toBeQuoted.vue

7
src/api/quotation/quotationHeader.js

@ -13,6 +13,13 @@ export const getQuotationHeaderByPage = (data) => createAPI(`/plm/quotationHeade
* @returns {*}
*/
export const saveQuotationHeader = (data) => createAPI('/plm/quotationHeader/saveQuotationHeader','post',data);
/**
* 批量新增报价
* @param data
* @returns {*}
*/
export const saveBatchQuotationHeader = (data) => createAPI('/plm/quotationHeader/saveBatchQuotationHeader','post',data);
export const deleteByQuotationHeaderId = (data) => createAPI('/plm/quotationHeader/deleteByQuotationHeaderId','post',data);
/**

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

@ -47,6 +47,7 @@
v-model="searchData.dateValue"
type="daterange"
size="mini"
unlink-panels
format="yyyy/MM/dd"
value-format="yyyy-MM-dd"
range-separator="至"
@ -269,8 +270,8 @@
<el-col :span="12" :offset="2">
<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 />
<span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">跟单员</a></span>
<el-input v-model="insertData.trackerName" @clear="clearTracker" placeholder="请输入内容" size="large" clearable />
</el-form-item>
</el-col>
</el-row>
@ -300,7 +301,7 @@
</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="saveQuotationHeader">保存</el-button>
<el-button type="primary" :loading="insertQuotationHeaderBtn" @click="saveQuotationHeader">确定</el-button>
</el-footer>
</el-dialog>
@ -341,11 +342,11 @@
</template>
<script>
import quotationDetail from "../../../components/quotation/sellForQuotation/quotationDetail.vue";
import quotationExamineAndApprove from "../../../components/quotation/sellForQuotation/quotationExamineAndApprove.vue";
import quotationProjectInformation from "../../../components/quotation/sellForQuotation/quotationProjectInformation.vue";
import quotationCustomerInformation from "../../../components/quotation/sellForQuotation/quotationCustomerInformation.vue";
import quotationCustomerContact from "../../../components/quotation/sellForQuotation/quotationCustomerContact.vue";
import quotationDetail from "./sellForQuotation/quotationDetail.vue";
import quotationExamineAndApprove from "./sellForQuotation/quotationExamineAndApprove.vue";
import quotationProjectInformation from "./sellForQuotation/quotationProjectInformation.vue";
import quotationCustomerInformation from "./sellForQuotation/quotationCustomerInformation.vue";
import quotationCustomerContact from "./sellForQuotation/quotationCustomerContact.vue";
import Chooselist from '@/views/modules/common/Chooselist';
import {
getQuotationHeaderByPage,
@ -415,7 +416,7 @@ export default {
requireApproval:"",//
approvalStatus:"",//
createBy:this.$store.state.user.id,//
createDate:new Date(),//
createTime:new Date(),//
},
quotationHeaderColumns:[
{label:"quotationNo",value:"客户报价单号"},
@ -739,7 +740,6 @@ export default {
this.insertData.tracker=row.tracker;//
this.insertData.quoter=row.quoter;//
this.insertData.quoterName=row.quoterName;//
this.insertData.trackerName=row.trackerName;//
this.insertData.quotationStatus=row.quotationStatus;//
this.insertData.internalInquiryNo=row.quotationNo;//
this.insertData.currency=row.customerCurrency;//
@ -761,7 +761,7 @@ export default {
}
</script>
<style scoped lang="scss">
<style scoped>
/deep/ .el-range-editor--mini.el-input__inner {
height: 20px;
}

0
src/components/quotation/sellForQuotation/quotationCustomerContact.vue → src/views/modules/quotation/sellForQuotation/quotationCustomerContact.vue

0
src/components/quotation/sellForQuotation/quotationCustomerInformation.vue → src/views/modules/quotation/sellForQuotation/quotationCustomerInformation.vue

100
src/components/quotation/sellForQuotation/quotationDetail.vue → src/views/modules/quotation/sellForQuotation/quotationDetail.vue

@ -610,11 +610,13 @@
<el-row>
<el-col :span="8">
<el-form-item label="工序编码" prop="quotationRoutingNo">
<span slot="label" @click="componentPartModelFlag = true" style="cursor: pointer"><a>工序编码</a></span>
<el-input v-model="quotationRouting.quotationRoutingNo" clearable/>
</el-form-item>
</el-col>
<el-col :span="12" :offset="2">
<el-form-item label="工序名称" prop="quotationRoutingDesc">
<span slot="label" @click="componentPartModelFlag = true" style="cursor: pointer"><a>工序名称</a></span>
<el-input :disabled="quotationRouting.quotationRoutingNo !='*'" v-model="quotationRouting.quotationRoutingDesc" clearable/>
</el-form-item>
</el-col>
@ -986,6 +988,43 @@
<el-button type="primary" :loading="saveBatchLoading" @click="saveOtherQuotationDetailBtn"> </el-button>
</span>
</el-dialog>
<!-- 子明细工序模态框 -->
<el-dialog title="工序清单" :visible.sync="componentPartModelFlag" width="520px">
<el-form :inline="true" label-position="top" :model="operationData">
<el-form-item :label="'工序号'">
<el-input v-model="operationData.operationId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'工序名称'">
<el-input v-model="operationData.operationName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="queryOperationList()">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="300"
:data="operationList"
@row-dblclick="getComponentRowData"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in componentOperationColumnList" :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>
</el-dialog>
</div>
</template>
<script>
@ -1018,6 +1057,9 @@ import {searchToolHeader,} from '@/api/part/toolHeader.js';
import {searchWorkCenter,} from '@/api/part/workCenter.js';
import {searchPartList,} from '@/api/part/partInformation.js';
import {getProjectPartList} from '@/api/project/project.js';
import {
queryOperationList, //
} from '@/api/part/routingManagement.js'
import {Decimal} from "decimal.js";
export default {
@ -1053,6 +1095,7 @@ export default {
selectionOtherDetailList:[],//
selectionProjectPartList:[],//
projectPartTable:[],//
operationList: [],//
// =========================================================================================
no: 1,//
size: 20,//
@ -1067,6 +1110,7 @@ export default {
partDialogFlag:false,//
otherQuotationDetailDialogFlag:false,//
projectPartDialogFlag:false,//
componentPartModelFlag:false,//
options:0,//
//
insertQuotationDetailLoading : false,//
@ -1089,6 +1133,12 @@ export default {
activeName: "index",//
// =========================================================================================
quotation: undefined,// Header
//
operationData: {
site: this.$store.state.user.site,
operationId: '',
operationName: '',
},
//
quotationPart:{
quotationPartId:undefined,//
@ -1206,6 +1256,33 @@ export default {
productNo:undefined,//
productDesc:undefined,//
},
//
componentOperationColumnList: [
{
columnProp: 'operationId',
headerAlign: "center",
align: "center",
columnLabel: '工序号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
},
{
columnProp: 'operationName',
headerAlign: "center",
align: "center",
columnLabel: '工序名称',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
}
],
// ======================================================================================
//
quotationDetailRules: {
@ -2238,6 +2315,22 @@ export default {
}
})
},
/**
* 工序列表
*/
queryOperationList () {
//
queryOperationList(this.operationData).then(({data}) => {
if (data && data.code === 0) {
this.operationList = data.rows
this.componentPartModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
// =================================================================================================
// size
detailSizeChange(val) {
@ -2526,6 +2619,13 @@ export default {
this.quotationTool.unitCost = row.unitCost ? row.unitCost : 1;
this.toolHeaderDialogFlag= false;
},
getComponentRowData (row) {
this.quotationRouting.quotationRoutingNo = row.operationId
this.quotationRouting.quotationRoutingDesc = row.operationName
this.quotationRouting.machiningCenterNo = row.workCenterNo
this.changeWorkCenterSelect(row.workCenterNo, this.quotationRouting)
this.componentPartModelFlag = false
},
// ====================================================================================================
//
computeQuotationPartCost(){

0
src/components/quotation/sellForQuotation/quotationExamineAndApprove.vue → src/views/modules/quotation/sellForQuotation/quotationExamineAndApprove.vue

0
src/components/quotation/sellForQuotation/quotationProjectInformation.vue → src/views/modules/quotation/sellForQuotation/quotationProjectInformation.vue

549
src/views/modules/quotation/toBeQuoted.vue

@ -0,0 +1,549 @@
<template>
<div>
<el-form label-position="top" :model="searchData" @keyup.enter.native="getDataList">
<el-row :gutter="15">
<el-col :span="2">
<el-form-item label="客户编码">
<el-input v-model="searchData.customerNo" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="客户名称">
<el-input v-model="searchData.customerDesc" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="跟单员">
<el-input v-model="searchData.trackerName" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="产品编码">
<el-input v-model="searchData.testPartNo" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="产品名称">
<el-input v-model="searchData.partName" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="要求完成日期">
<el-date-picker
v-model="searchData.dateValue"
type="daterange"
style="width: 100%"
size="mini"
unlink-panels
format="yyyy/MM/dd"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="changeDateRange"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15">
<el-col :span="2">
<el-form-item label="项目编码">
<el-input v-model="searchData.projectId" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="项目名称">
<el-input v-model="searchData.projectName" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="报价专员">
<el-input v-model="searchData.quoterName" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-form-item label="优先等级">
<el-select v-model="searchData.priorityLevel">
<el-option label="全部" value=""></el-option>
<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-button type="primary" @click="getDataList"> </el-button>
<el-button type="primary" :loading="saveBatchQuotationLoading" @click="batchQuotation"> </el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 报价列表 -->
<el-table
:height="700"
:data="dataList"
border
v-loading="dataListLoading"
row-key='quotationNo'
element-loading-text = "数据正在加载中"
element-loading-spinner = "el-icon-loading"
@row-click="quotationClickRow"
@selection-change="selectionQuotation"
ref="quotationTable"
style="width: 100%;">
<el-table-column
type="selection"
header-align="center"
reserve-selection
align="center"
width="50">
</el-table-column>
<el-table-column
v-for="(item,index) in columnList" :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>
<selectDiv ref="selectDiv"></selectDiv>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div>
</template>
<script>
import {
quotationInformationSearch, //
} from '@/api/quotation/quotationInformation.js'
import {
saveBatchQuotationHeader,//
} from '@/api/quotation/quotationHeader.js';
export default {
data(){
return{
//
searchData:{
site: this.$store.state.user.site,
customerNo: '',
customerDesc: '',
trackerName: '',
testPartNo: '',
partName: '',
quotationStatus: '草稿',
startDate: '',
endDate: '',
projectId: '',
projectName: '',
quoterName: '',
priorityLevel: '',
limit:1,
page:0,
},
//
pageIndex: 1,//
pageSize:50,//
totalPage:0,//
//
dataList:[],//
quotationSelections:[],//
//
dataListLoading:false,
//
saveBatchQuotationLoading:false,
// ======== ========
columnList: [
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1QuotationNo',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'quotationNo',
headerAlign: 'center',
align: 'center',
columnLabel: '申请单号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false,
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1CustomerNo',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'customerNo',
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: 102001,
serialNumber: '102001Table1CustomerDesc',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'customerDesc',
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: 102001,
serialNumber: '102001Table1ProjectId',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'projectId',
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: 102001,
serialNumber: '102001Table1ProjectName',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'projectName',
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: 102001,
serialNumber: '102001Table1TrackerName',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'trackerName',
headerAlign: 'center',
align: 'center',
columnLabel: '跟单员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1QuoterName',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'quoterName',
headerAlign: 'center',
align: 'center',
columnLabel: '报价专员',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1TestPartNo',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'testPartNo',
headerAlign: 'center',
align: 'center',
columnLabel: '项目料号',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 130
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1PartName',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'partName',
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: 102001,
serialNumber: '102001Table1PriorityLevel',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'priorityLevel',
headerAlign: 'center',
align: 'center',
columnLabel: '优先等级',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1RequiredCompletionDate',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'requiredCompletionDate',
headerAlign: 'center',
align: 'center',
columnLabel: '要求完成日期',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1quotationStatus',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'quotationStatus',
headerAlign: 'center',
align: 'center',
columnLabel: '状态',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1CreateDate',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'createDate',
headerAlign: 'center',
align: 'center',
columnLabel: '创建时间',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 160
},
{
userId: this.$store.state.user.name,
functionId: 102001,
serialNumber: '102001Table1CreateBy',
tableId: '102001Table1',
tableName: '报价信息表',
columnProp: 'createBy',
headerAlign: 'center',
align: 'center',
columnLabel: '创建人',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 80
},
],
}
},
created() {
this.getDataList();
},
methods:{
// change
changeDateRange(){
if (this.searchData.dateValue){
this.searchData.startDate = this.searchData.dateValue[0];
this.searchData.endDate = this.searchData.dateValue[1];
}else {
this.searchData.startDate="";
this.searchData.endDate="";
}
},
/**
* 获取数据列表
*/
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
this.dataListLoading = true;
quotationInformationSearch(this.searchData).then(({data}) => {
if (data.code === 0) {
this.dataList = data.page.list
this.pageIndex = data.page.currPage
this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
this.$refs.selectDiv.setLengthAll(this.dataList.length)
}
this.dataListLoading = false;
})
},
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
//
quotationClickRow (row) {
this.$refs.quotationTable.toggleRowSelection(row)
},
selectionQuotation (val) {
this.quotationSelections = val
this.$refs.selectDiv.setLengthselected(this.quotationSelections.length)
},
//
batchQuotation(){
if (this.quotationSelections.length === 0){
this.$message.warning("请选择需报价的单号")
return
}
let batchInsertList = this.quotationSelections.map(item=>{
let insertData = {
site:this.$store.state.user.site,
quotationNo:"",//
quotationDate:new Date(),//
customerNo:item.customerNo, //
customerName:item.customerDesc,//
versionCode:"001",
projectId:item.projectId,//
projectName:item.projectName,//
tracker:item.tracker,//
currency:item.customerCurrency,//
quotationStatus:"草稿",//
remark:"",//
customerInquiryNo:"",//
internalInquiryNo:item.quotationNo,//
requireApproval:"",//
approvalStatus:"",//
createBy:this.$store.state.user.id,//
createTime:new Date(),//
};
return insertData;
})
this.saveBatchQuotationHeader(batchInsertList);
},
//
saveBatchQuotationHeader(list){
this.saveBatchQuotationLoading = true;
saveBatchQuotationHeader(list).then(({data})=>{
this.saveBatchQuotationLoading = false;
if (data.code === 200){
this.$message.success(data.msg);
this.$refs.quotationTable.clearSelection();
this.getDataList();
}else {
this.$message.error(data.msg);
}
}).catch((error)=>{
this.saveBatchQuotationLoading = false;
})
},
},
mounted() {
},
}
</script>
<style scoped>
/deep/ .el-range-editor--mini.el-input__inner {
height: 20px;
}
/deep/ .el-range-editor.el-input__inner{
padding: 0px 10px;
}
/deep/ .el-date-editor .el-range-separator{
width: auto;
}
/deep/ .el-input--mini .el-input__icon{
line-height: 20px;
}
</style>
Loading…
Cancel
Save