Browse Source

Merge remote-tracking branch 'origin/master'

master
ruanqi 2 years ago
parent
commit
32beed9760
  1. 29
      src/api/part/umInformation.js
  2. 43
      src/api/quotation/quotationHeader.js
  3. 7
      src/api/quotation/quotationInformation.js
  4. 13
      src/components/quotation/sellForQuotation/quotationCustomerContact.vue
  5. 14
      src/components/quotation/sellForQuotation/quotationCustomerInformation.vue
  6. 707
      src/components/quotation/sellForQuotation/quotationDetail.vue
  7. 14
      src/components/quotation/sellForQuotation/quotationExamineAndApprove.vue
  8. 14
      src/components/quotation/sellForQuotation/quotationProjectInformation.vue
  9. 5
      src/views/modules/common/Chooselist.vue
  10. 55
      src/views/modules/part/partInformation.vue
  11. 514
      src/views/modules/part/umInformation.vue
  12. 686
      src/views/modules/quotation/sellForQuotation.vue

29
src/api/part/umInformation.js

@ -0,0 +1,29 @@
import { createAPI } from "@/utils/httpRequest.js";
/**
* 单位信息列表查询
* @param data
* @returns {*}
*/
export const umInformationSearch = data => createAPI(`/plm/umInformation/umInformationSearch`,'post',data)
/**
* 单位信息新增
* @param data
* @returns {*}
*/
export const umInformationSave = data => createAPI(`/plm/umInformation/umInformationSave`,'post',data)
/**
* 单位信息编辑
* @param data
* @returns {*}
*/
export const umInformationEdit = data => createAPI(`/plm/umInformation/umInformationEdit`,'post',data)
/**
* 单位信息删除
* @param data
* @returns {*}
*/
export const umInformationDelete = data => createAPI(`/plm/umInformation/umInformationDelete`,'post',data)

43
src/api/quotation/quotationHeader.js

@ -0,0 +1,43 @@
import { createAPI } from "@/utils/httpRequest.js";
import {data} from "autoprefixer";
/**
* 报价信息列表查询 QuotationHeader
* @param data
* @returns {*}
*/
export const getQuotationHeaderByPage = (data) => createAPI(`/plm/quotationHeader/getQuotationHeaderByPage`,'get',data);
/**
* 新增报价信息 QuotationHeader
* @param data
* @returns {*}
*/
export const insertQuotationHeader = (data) => createAPI('/plm/quotationHeader/insertQuotationHeader','post',data);
/**
* 查询 报价工具列表 page
* @param data 请求参数
* @returns {*}
*/
export const searchQuotationTool = (data) => createAPI('/plm/quotationTool/page','get',data);
/**
* 新增报价工具 记录
* @param data 请求携带参数
* @returns {*}
*/
export const insertQuotationTool = (data) => createAPI('/plm/quotation','post',data);
/**
* 分页查询QuotationDetail
* @param data
* @returns {*}
*/
export const searchQuotationDetailPageByHeaderId = (data) => createAPI('/plm/quotationDetail/searchQuotationDetailPageByHeaderId','get',data);
/**
* 新增QuotationDetail
* @param data
* @returns {*}
*/
export const insertQuotationDetail = (data) => createAPI('/plm/quotationDetail/insertQuotationDetail','post',data);

7
src/api/quotation/quotationInformation.js

@ -1,4 +1,5 @@
import { createAPI } from "@/utils/httpRequest.js";
import {data} from "autoprefixer";
/**
* 报价信息列表查询
@ -108,3 +109,9 @@ export const batchDeleteQuotationFile = data => createAPI(`/plm/quotationInforma
* @returns {*}
*/
export const closeModalDeleteFile = data => createAPI(`/plm/quotationInformation/closeModalDeleteFile`,'post',data)
/**
* 通过询价单编号查询询价单信息
* @param data
* @returns {*}
*/
export const searchQuotationByQuotationNo = data => createAPI(`/plm/quotationInformation/searchQuotationByQuotationNo`,'get',data)

13
src/components/quotation/sellForQuotation/quotationCustomerContact.vue

@ -0,0 +1,13 @@
<template>
<div class="mode-config">
<h2>客户联系人</h2>
</div>
</template>
<script>
export default {
name: "quotationCustomerContact"
}
</script>
<style scoped>
</style>

14
src/components/quotation/sellForQuotation/quotationCustomerInformation.vue

@ -0,0 +1,14 @@
<template>
<div class="mode-config">
<h2>客户信息</h2>
</div>
</template>
<script>
export default {
name: "quotationCustomerInformation"
}
</script>
<style scoped>
</style>

707
src/components/quotation/sellForQuotation/quotationDetail.vue

@ -0,0 +1,707 @@
<template>
<div class="mode-config">
<el-row>
<el-col :span="24">
<el-button type="primary" @click="quotationLeadIntoDetailFlag = true">从询价单导入明细</el-button>
<el-button type="primary" @click="quotationDetailFlag = true">新增报价明细</el-button>
<el-button type="primary">从历史报价明细导入</el-button>
</el-col>
<el-col :span="24" style="margin-top: 10px">
<el-table :data="tableData" height="250px" stripe border :header-cell-style="{background:'rgba(23,179,163)',color:'#fff'}">
<el-table-column
label="操作"
fixed
width="60" align="center">
<template slot-scope="scope">
<el-button type="text" style="padding: 0px 10px" size="small">下达</el-button>
</template>
</el-table-column>
<el-table-column
label="序号"
width="80"
align="center"
prop="itemNo">
</el-table-column>
<el-table-column
label="产品编码" prop="productNo"
width="80" align="center">
</el-table-column>
<el-table-column
label="产品名称" prop="productDesc"
width="80" align="center">
</el-table-column>
<el-table-column
label="报价数量" prop="quotationDetailQuantity"
width="80" align="center">
</el-table-column>
<el-table-column label="计算后成本" align="center">
<el-table-column
label="材料成本" prop="computePartCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="机器成本" prop="computeMachineCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="人工成本" prop="computeLabourCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="制造费用" prop="computeFabricateCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="工具成本" prop="computeToolCost"
width="80" align="center">
</el-table-column>
</el-table-column>
<el-table-column label="调整后成本" align="center">
<el-table-column
label="材料成本" prop="adjustPartCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="机器成本" prop="adjustMachineCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="人工成本" prop="adjustLabourCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="制造费用" prop="adjustFabricateCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="工具成本" prop="adjustToolCost"
width="80" align="center">
</el-table-column>
</el-table-column>
<el-table-column
label="其他成本" prop="detailOtherCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="管理成本" prop="detailManageCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="总成本" prop="detailTotalCost"
width="80" align="center">
</el-table-column>
<el-table-column
label="利润率" prop="detailProfitRate"
width="80" align="center">
</el-table-column>
<el-table-column
label="利润额" prop="detailProfitAmount"
width="80" align="center">
</el-table-column>
<el-table-column
label="系统计算金额" prop="systemComputeAmount"
width="90" align="center">
</el-table-column>
<el-table-column
label="系统计算价格" prop="systemComputePrice"
width="90" align="center">
</el-table-column>
<el-table-column
label="最终未税价格" prop="finalUntaxedPrice"
width="90" align="center">
</el-table-column>
<el-table-column
label="最终含税价格" prop="finalTaxedPrice"
width="90" align="center">
</el-table-column>
<el-table-column
label="状态" prop="quotationDetailStatus"
width="80" align="center">
</el-table-column>
<el-table-column
label="备注" prop="remark"
width="80" align="center">
</el-table-column>
<el-table-column
label="询价单序号" prop="internalInnquiryNo"
width="80" align="center">
</el-table-column>
<el-table-column
label="报价次数" prop="quotationDetailCount"
width="80" align="center">
</el-table-column>
</el-table>
</el-col>
<el-col :span="24">
<el-pagination style="margin-top: 0px"
@size-change="detailSizeChange"
@current-change="detailCurrentChange"
:current-page="no"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="size"
:total="total"
layout="total,sizes, prev, pager, next, jumper">
</el-pagination>
</el-col>
</el-row>
<!--新增报价明细-->
<el-dialog :visible.sync="quotationLeadIntoDetailFlag" title="新增报价明细" width="30%">
<el-form :model="insertQuotationDetailData" label-width="80px" label-position="top" :inline="true">
<el-row>
<el-col :span="24">
<el-form-item label="产品编码" style="width: 47%">
<el-input />
</el-form-item>
<el-form-item label="产品名称" style="width: 47%">
<el-input />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="报价数量" style="width: 47%">
<el-input />
</el-form-item>
<el-form-item label="内部询价单号" style="width: 47%">
<el-input />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="状态" style="width: 47%">
<el-select style="width: 100%" clearable placeholder="请选择" value="草稿">
<el-option label="草稿" value="草稿"></el-option>
<el-option label="下达" value="下达"></el-option>
</el-select>
</el-form-item>
<el-form-item label="序号" style="width: 47%">
<el-input />
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="" style="width: 47%">
<el-checkbox v-model="insertQuotationDetailData.flag">保存进入报价界面</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" style="display: block;height: 60px">
<el-input type="textarea" :autosize="{minRows: 1, maxRows: 3}"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer" style="margin-top: 20px">
<el-button @click="quotationLeadIntoDetailFlag = false"> </el-button>
<el-button type="primary" @click="quotationLeadIntoDetailFlag = false"> </el-button>
</div>
</el-dialog>
<!--新增-->
<el-dialog @close="closeInsertDialog" :visible.sync="quotationDetailFlag" width="60%" top="2vh">
<el-form :rules="quotationDetailRules" ref="quotationDetailForm" :model="insertQuotationDetailData" label-width="80px" label-position="top" :inline="true">
<el-row>
<el-col :span="24">
<el-form-item label="产品编码" prop="productNo">
<el-input clearable v-model="quotationDetailData.productNo" />
</el-form-item>
<el-form-item label="产品名称" prop="productDesc">
<el-input clearable v-model="quotationDetailData.productDesc"/>
</el-form-item>
<el-form-item label="报价数量" prop="quotationDetailQuantity">
<el-input clearable v-model="quotationDetailData.quotationDetailQuantity"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="内部询价单号" prop="internalInnquiryNo">
<el-input clearable v-model="quotationDetailData.internalInnquiryNo"/>
</el-form-item>
<el-form-item label="状态" prop="quotationDetailStatus">
<el-select v-model="quotationDetailData.quotationDetailStatus" style="width: 100%" clearable placeholder="请选择" value="草稿">
<el-option label="草稿" value="草稿"></el-option>
<el-option label="下达" value="下达"></el-option>
</el-select>
</el-form-item>
<el-form-item label="序号" prop="itemNo">
<el-input clearable v-model="quotationDetailData.itemNo"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" style="display: block;height: 60px;width: 60%">
<el-input type="textarea" v-model="quotationDetailData.remark" :autosize="{minRows: 1, maxRows: 1}" style="height: 60px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-tabs v-model="activeName" style="height: 505px" border stripe>
<el-tab-pane name="index" label="材料">
<el-button type="primary"> </el-button>
<el-button type="primary">从其他报价单复制</el-button>
<el-table style="margin-top: 5px" :data="materialDataList" height="400">
<el-table-column label="操作" width="120" align="center">
<template slot-scope="scope">
<el-link style="cursor: pointer">编辑</el-link>
<el-link style="cursor: pointer">删除</el-link>
</template>
</el-table-column>
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column label="材料编码" align="center"/>
<el-table-column label="材料名称" align="center"/>
<el-table-column label="计量单位" align="center"/>
<el-table-column label="单位用量" align="center"/>
<el-table-column label="损耗率" align="center"/>
<el-table-column label="调机用量" align="center"/>
<el-table-column label="单位成本" align="center"/>
<el-table-column label="备注" align="center"/>
</el-table>
</el-tab-pane>
<el-tab-pane label="工艺">
<el-button type="primary"> </el-button>
<el-button type="primary">从其他报价单复制</el-button>
<el-table style="margin-top: 5px" :data="materialDataList" height="400">
<el-table-column label="操作" width="120" align="center" >
<template slot-scope="scope">
<el-link style="cursor: pointer">编辑</el-link>
<el-link style="cursor: pointer">删除</el-link>
</template>
</el-table-column>
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column align="center" label="工序名称"/>
<el-table-column align="center" label="加工中心编码" width="120"/>
<el-table-column label="加工中心名称" align="center" width="120"/>
<el-table-column label="加工中心类别" align="center" width="120"/>
<el-table-column label="调机时间" align="center" width="60"/>
<el-table-column label="单位产出量" align="center" width="120"/>
<el-table-column label="产出单位" align="center" width="80"/>
<el-table-column label="效率" align="center" width="60"/>
<el-table-column label="操作工人数" align="center" width="120"/>
<el-table-column label="单位机械成本" align="center" width="120"/>
<el-table-column label="单位人工成本" align="center" width="120"/>
<el-table-column label="单位制造费用" align="center" width="120"/>
<el-table-column label="单位报价成本" align="center" width="80"/>
<el-table-column label="备注" align="center"/>
</el-table>
</el-tab-pane>
<el-tab-pane label="工具">
<el-button type="primary" @click="insertQuotationToolFlag = true"> </el-button>
<el-button type="primary">从其他报价单复制</el-button>
<el-table style="margin-top: 5px" :data="quotationToolList" height="400">
<el-table-column label="操作" width="120" align="center">
<template slot-scope="scope">
<el-link style="cursor: pointer">编辑</el-link>
<el-link style="cursor: pointer">删除</el-link>
</template>
</el-table-column>
<el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column label="工具编码" align="center"/>
<el-table-column label="工具描述" align="center"/>
<el-table-column label="工具数量" align="center"/>
<el-table-column label="单位成本" align="center"/>
<el-table-column label="预计使用寿命" align="center"/>
<el-table-column label="备注" align="center"/>
</el-table>
</el-tab-pane>
<el-tab-pane label="成品属性">
</el-tab-pane>
<el-tab-pane label="成本&价格">
<el-button type="primary"> </el-button>
<!--系统自动计算结果-->
<fieldset style="height:80px;margin-top: 2px;border-color: rgb(255,255,255);">
<legend>系统自动计算结果(料工费/工具)</legend>
<el-form :inline="true" label-position="top" label-width="120px">
<el-row>
<el-col :span="4">
<el-form-item label="材料成本:" prop="computePartCost">
<el-input v-model="quotationDetailData.computePartCost" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="机器成本:" prop="computeMachineCost">
<el-input v-model="quotationDetailData.computeMachineCost" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="制造费用成本:" prop="computeFabricateCost">
<el-input v-model="quotationDetailData.computeFabricateCost" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="人工成本:" prop="computeLabourCost">
<el-input v-model="quotationDetailData.computeLabourCost" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="工具成本:" prop="computeToolCost">
<el-input v-model="quotationDetailData.computeToolCost" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</fieldset>
<!--调整后成本-->
<fieldset style="height:80px;margin-top: 5px;border-color: rgb(255,255,255);">
<legend>调整后成本(料工费/工具)</legend>
<el-form :rules="rules" ref="priceForm1" :model="quotationDetailData" :inline="true" label-position="top" label-width="120px">
<el-row>
<el-col :span="4">
<el-form-item label="材料成本:" prop="adjustPartCost">
<el-input v-model="quotationDetailData.adjustPartCost" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="机器成本:" prop="adjustMachineCost">
<el-input v-model="quotationDetailData.adjustMachineCost" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="制造费用成本:" prop="adjustFabricateCost">
<el-input v-model="quotationDetailData.adjustFabricateCost" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="人工成本:" prop="adjustLabourCost">
<el-input v-model="quotationDetailData.adjustLabourCost" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="工具成本:" prop="adjustToolCost">
<el-input v-model="quotationDetailData.adjustToolCost" clearable/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</fieldset>
<!--其他成本-->
<fieldset style="height:80px;margin-top: 5px;border-color: rgb(255,255,255);">
<legend>其他成本</legend>
<el-form :rules="rules" ref="priceForm2" :model="quotationDetailData" :inline="true" label-position="top" label-width="120px">
<el-row>
<el-col :span="4">
<el-form-item label="管理成本:" prop="detailManageCost">
<el-input v-model="quotationDetailData.detailManageCost" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="其他成本:" prop="detailOtherCost">
<el-input v-model="quotationDetailData.detailOtherCost" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="总成本:" prop="detailTotalCost">
<el-input v-model="quotationDetailData.detailTotalCost" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</fieldset>
<!--利润-->
<fieldset style="height:80px;margin-top: 5px;border-color: rgb(255,255,255);">
<legend>利润</legend>
<el-form :rules="rules" ref="priceForm3" :model="quotationDetailData" :inline="true" label-position="top" label-width="120px">
<el-row>
<el-col :span="4">
<el-form-item label="利润率%:" prop="detailProfitRate">
<el-input v-model="quotationDetailData.detailProfitRate" />
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="利润额:" prop="detailProfitAmount">
<el-input v-model="quotationDetailData.detailProfitAmount" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</fieldset>
<!--最终单位价格-->
<fieldset style="height:80px;margin-top: 5px;border-color: rgb(255,255,255);">
<legend>最终单位价格</legend>
<el-form :rules="rules" ref="priceForm4" :model="quotationDetailData" :inline="true" label-position="top" label-width="120px">
<el-row>
<el-col :span="4">
<el-form-item label="系统计算总金额:" prop="systemComputeAmount">
<el-input v-model="quotationDetailData.systemComputeAmount" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="系统计算价格:" prop="systemComputePrice">
<el-input v-model="quotationDetailData.systemComputePrice" disabled/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="最终去税价格:" prop="finalUntaxedPrice">
<el-input v-model="quotationDetailData.finalUntaxedPrice" clearable/>
</el-form-item>
</el-col>
<el-col :span="4" :offset="1">
<el-form-item label="最终含税价格:" prop="finalTaxedPrice">
<el-input v-model="quotationDetailData.finalTaxedPrice" disabled/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</fieldset>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer" style="margin-top: 5px">
<el-button @click=" quotationDetailFlag= false"> </el-button>
<el-button type="primary" @click="quotationDetailFlag = false"> </el-button>
</span>
</el-dialog>
<!--quotationTool新增-->
<el-dialog @close="closeQuotationToolDialog" title="新增报价工具" :visible.sync="insertQuotationToolFlag" width="40%" top="10vh">
<el-form :rules="quotationToolRules" ref="quotationToolForm" :model="quotationTool" label-position="top" style="height: 260px">
<el-row>
<el-col span="10">
<el-form-item label="工具编码" prop="toolNo">
<el-input v-model="quotationTool.toolNo" clearable/>
</el-form-item>
</el-col>
<el-col span="10" offset="2">
<el-form-item label="工具描述" prop="toolDescription">
<el-input v-model="quotationTool.toolDescription" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col span="10">
<el-form-item label="工具数量" prop="toolQuantity">
<el-input v-model="quotationTool.toolQuantity" clearable/>
</el-form-item>
</el-col>
<el-col span="10" offset="2">
<el-form-item label="单位成本" prop="unitCost">
<el-input v-model="quotationTool.unitCost" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="预计使用寿命" prop="expectedServiceLife">
<el-input v-model="quotationTool.expectedServiceLife" clearable/>
</el-form-item>
</el-col>
<el-col :span="10" offset="2">
<el-form-item label="序号" prop="itemNo">
<el-input v-model="quotationTool.itemNo" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="备注" prop="remark">
<el-input v-model="quotationTool.remark" type="textarea" :rows="2" style="max-height: 60px;min-height: 30px;width: 93%"/>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: 5px">
<el-button @click=" insertQuotationToolFlag= false"> </el-button>
<el-button type="primary" @click="insertQuotationToolFlag = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
insertQuotationTool,
searchQuotationTool,
searchQuotationDetailPageByHeaderId,
insertQuotationDetail,
} from '@/api/quotation/quotationHeader.js';
export default {
props:['quotationHeader'],
name: "quotationDetail",
data(){
return{
quotation:undefined,//
tableData:[],//
quotationToolList:[],//
//
no:1,//
size:20,//
total:0,//
//
quotationDetailFlag:false,
quotationLeadIntoDetailFlag:false,
insertQuotationToolFlag:false,
//
insertQuotationDetailData:{
flag:false,
},
activeName:"index",//
materialDataList:[{id:1}],//
quotationTool:{//
site:this.$store.state.user.site,
toolNo:"",
itemNo:undefined,
toolDescription:"",
toolQuantity:undefined,
unitCost:undefined,
expectedServiceLife:undefined,
remark:"",
},
quotationDetailData:{//
site:this.$store.state.user.site,//
productNo:undefined,//
productDesc:undefined,//
quotationDetailQuantity:undefined,//
internalInnquiryNo:undefined,//
quotationDetailStatus:"草稿",//
itemNo:undefined,//
computePartCost:undefined,//
computeLabourCost:undefined,//
computeMachineCost:undefined,//
computeFabricateCost:undefined,//
computeToolCost:undefined,//
adjustPartCost:undefined,//
adjustLabourCost:undefined,//
adjustFabricateCost:undefined,//
adjustToolCost:undefined,//
adjustMachineCost:undefined,//
detailProfitRate:undefined,//
detailProfitAmount:undefined,//
detailManageCost:undefined,//
detailOtherCost:undefined,//
detailTotalCost:undefined,//
systemComputeAmount:undefined,//
systemComputePrice:undefined,//
finalUntaxedPrice:undefined,//
finalTaxedPrice:undefined,//
remark: undefined,//
},
//
//
quotationDetailRules:{
itemNo:[
{ required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'blur' },
],
},
//
quotationToolRules:{
toolNo:[
{ required: true, message: ' ', trigger: 'change' },
{ required: true, message: ' ', trigger: 'blur' },
],
toolDescription:[
{ required: true, message: ' ', trigger: 'change' },
{ required: true, message: ' ', trigger: 'blur' },
],
toolQuantity:[
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
unitCost:[
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
expectedServiceLife:[
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
itemNo:[
{ required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^([1-9]\d*|[0]{1,1})$/, message: ' ', trigger: 'blur' },
],
},
//
rules: {
detailProfitRate: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
adjustPartCost: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
adjustMachineCost: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
adjustFabricateCost: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
adjustLabourCost: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
adjustToolCost: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
detailManageCost: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
detailOtherCost: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
finalUntaxedPrice: [
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'change' },
{ required: true, pattern: /^[0-9]+(.[0-9]{2})?$/, message: ' ', trigger: 'blur' },
],
}
}
},
computed:{
},
watch:{
//
quotationHeader:function (val){
this.quotation = val;
this.initData();
}
},
methods:{
initData(){
let params = {
no:this.no,
size:this.size,
quotationHeaderId:this.quotation.quotationHeaderId
}
searchQuotationDetailPageByHeaderId(params).then(({data})=>{
if (data.code == 200){
this.tableData = data.data.records;
this.total = data.data.total;
}
})
},
// size
detailSizeChange(val){
this.size = val;
this.initData();
},
//
detailCurrentChange(val){
this.no = val;
this.initData();
},
//
closeInsertDialog(){
this.activeName = "index";
for (let i = 1; i <= 4; i++) {
this.$refs['priceForm'+i].resetFields();
}
this.$refs['quotationDetailForm'].resetFields();
},
//
closeQuotationToolDialog(){
this.$refs['quotationToolForm'].resetFields();
}
},
created() {
// zi
this.quotation = this.quotationHeader
}
}
</script>
<style scoped>
/deep/ .el-card__header{
padding: 10px 20px;
}
/deep/ .el-scrollbar__wrap {
overflow-x: hidden;
}
/deep/ .is-horizontal {
display: none;
}
</style>

14
src/components/quotation/sellForQuotation/quotationExamineAndApprove.vue

@ -0,0 +1,14 @@
<template>
<div class="mode-config">
<h2>审批</h2>
</div>
</template>
<script>
export default {
name: "quotationExamineAndApprove.vue"
}
</script>
<style scoped>
</style>

14
src/components/quotation/sellForQuotation/quotationProjectInformation.vue

@ -0,0 +1,14 @@
<template>
<div class="mode-config">
<h2>项目信息</h2>
</div>
</template>
<script>
export default {
name: "quotationProjectInformation"
}
</script>
<style scoped>
</style>

5
src/views/modules/common/Chooselist.vue

@ -111,13 +111,14 @@ export default {
getChooselist({"tagNo": tagNo}).then(({data}) => {
this.columnList = []
this.baseListData = data.data
let start = data.data.sqlcode.indexOf("Select")
let end = data.data.sqlcode.indexOf("from")
let start = data.data.sqlcode.toUpperCase().indexOf("Select".toUpperCase())
let end = data.data.sqlcode.toUpperCase().indexOf("from".toUpperCase())
let length = end - start
let columns = data.data.sqlcode.trim().substring(start + 6, length).trim()
let props = columns.split(",")
props.forEach((item, index) => {
let name = '信息列'
//debugger
switch (index) {
case 0:
name = this.baseListData.caption1

55
src/views/modules/part/partInformation.vue

@ -130,7 +130,7 @@
<el-form-item label="规格型号">
<el-input v-model="modalData.spec" style="width: 221px"></el-input>
</el-form-item>
<el-form-item prop="umId" :rules="rules.umId">
<el-form-item>
<span slot="label" @click="getBaseList(107,1)"><a herf="#">计量单位</a></span>
<el-input v-model="modalData.umName" style="width: 221px"></el-input>
</el-form-item>
@ -166,7 +166,7 @@
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item prop="codeDesc" :rules="rules.codeDesc">
<el-form-item>
<span slot="label" @click="getBaseList(20,1)"><a herf="#">属性模板</a></span>
<el-input v-model="modalData.codeDesc" style="width: 221px"></el-input>
</el-form-item>
@ -736,55 +736,7 @@
],
// ======== ========
rules: {
customerDesc: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
trackerName: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
projectName: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
quoterName: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
partName: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
priorityLevel: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
requiredCompletionDate: [
{
required: true,
message: ' ',
trigger: 'change'
}
]
},
// ======== ========
partSelections: [],
@ -1209,7 +1161,6 @@
* @param val
*/
getBaseData (val) {
console.log(222)
if (this.tagNo === 107) {
if(this.tagNo1 === 1) {
this.modalData.umId = val.um_id

514
src/views/modules/part/umInformation.vue

@ -0,0 +1,514 @@
<template>
<div class="mod-config">
<!-- 查询条件 -->
<el-form :inline="true" label-position="top" :model="searchData" @keyup.enter.native="getDataList()">
<el-form-item :label="'单位编码'">
<el-input v-model="searchData.umId" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'单位名称'">
<el-input v-model="searchData.umName" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'是否在用'">
<el-select clearable v-model="searchData.active" style="width: 120px">
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="' '">
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addModal()">新增</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
:before-generate="startDownload"
:before-finish="finishDownload"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ "导出" }}
</download-excel>
</el-form-item>
</el-form>
<!-- 材料列表 -->
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<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-column
fixed="right"
header-align="center"
align="center"
width="100"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="updateModal(scope.row)">编辑</a>
<a type="text" size="small" @click="delModal(scope.row)">删除</a>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 材料新增/编辑模态框 -->
<el-dialog :title="modalData.title" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="495px">
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="单位编码" prop="umId" :rules="rules.umId">
<el-input v-model="modalData.umId" :disabled="modalDisableFlag" style="width: 221px"></el-input>
</el-form-item>
<el-form-item label="单位名称" prop="umName" :rules="rules.umName">
<el-input v-model="modalData.umName" style="width: 221px"></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="是否在用" prop="active" :rules="rules.active">
<el-select v-model="modalData.active" style="width: 221px">
<el-option label="是" value="Y"></el-option>
<el-option label="否" value="N"></el-option>
</el-select>
</el-form-item>
</el-form>
<el-footer style="height:30px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="saveData()">保存</el-button>
<el-button type="primary" @click="modalFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import {
umInformationSearch, //
umInformationSave, //
umInformationEdit, //
umInformationDelete //
} from '@/api/part/umInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
export default {
components: {
Chooselist
},
watch: {
searchData: {
deep: true,
handler: function (newV, oldV) {
this.searchData.umId = this.searchData.umId.toUpperCase()
}
}
},
data () {
return {
//
exportData: [],
exportName: '计量单位' + this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ['计量单位'],
exportFooter: [],
resultList: [],
// ======== ========
height: 200,
// ======== ========
pageIndex: 1,
pageSize: 50,
totalPage: 0,
//
searchData: {
site: this.$store.state.user.site,
umId: '',
umName: '',
active: '',
page: 1,
limit: 10
},
//
dataListLoading: false,
// ======== ========
modalData: {
flag: '',
title: '',
site: this.$store.state.user.site,
umId: '',
umName: '',
active: ''
},
// ======== ========
dataList: [],
// ======== ========
columnList: [
{
userId: this.$store.state.user.name,
functionId: 100003,
serialNumber: '100003Table1UmId',
tableId: '100003Table1',
tableName: '单位信息表',
columnProp: 'umId',
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: 100003,
serialNumber: '100003Table1UmName',
tableId: '100003Table1',
tableName: '单位信息表',
columnProp: 'umName',
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: 100003,
serialNumber: '100003Table1Active',
tableId: '100003Table1',
tableName: '单位信息表',
columnProp: 'active',
headerAlign: 'center',
align: 'center',
columnLabel: '是否在用',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
],
// ======== ========
rules: {
umId: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
umName: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
active: [
{
required: true,
message: ' ',
trigger: 'change'
}
],
},
// ======== ========
modalFlag: false,
modalDisableFlag: false,
}
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight - 210
})
},
created () {
this.getDataList()
},
methods: {
// ======== ========
/**
* 每页数
* @param val
*/
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
/**
* 当前页
* @param val
*/
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// ======== ========
/**
* 获取数据列表
*/
getDataList () {
this.searchData.limit = this.pageSize
this.searchData.page = this.pageIndex
umInformationSearch(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
})
},
// ======== / ========
/**
* 材料信息新增模态框
*/
addModal () {
this.modalData = {
flag: '1',
title: '单位新增',
site: this.$store.state.user.site,
umId: '',
umName: '',
active: 'Y',
}
this.modalDisableFlag = false
this.modalFlag = true
},
/**
* 材料信息编辑模态框
* @param row
*/
updateModal (row) {
this.modalData = {
flag: '2',
title: '单位编辑',
site: row.site,
umId: row.umId,
umName: row.umName,
active: row.active
}
this.modalDisableFlag = true
this.modalFlag = true
},
// ======== // ========
/**
* 材料信息新增/编辑
*/
saveData () {
if (this.modalData.umId === '' || this.modalData.umId == null) {
this.$message.warning('请填写单位编码!')
return
}
if (this.modalData.umName === '' || this.modalData.umName == null) {
this.$message.warning('请填写单位名称!')
return
}
if (this.modalData.active === '' || this.modalData.active == null) {
this.$message.warning('请选择是否可用!')
return
}
if (this.modalData.flag === '1') {
umInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
} else {
umInformationEdit(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}
},
/**
* 材料信息删除
*/
delModal (row) {
this.$confirm(`是否删除这条材料信息?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
umInformationDelete(row).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
this.partSelections = []
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
}).catch(() => {
})
},
// ======== chooseList ========
/**
* 获取基础数据列表S
* @param val
* @param type
*/
getBaseList (val, type) {
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 107) {
if(type === 1) {
strVal = this.modalData.umId
}
}
if (val === 108) {
if(type === 1) {
strVal = this.modalData.familyId
}
}
if (val === 109) {
if(type === 1) {
strVal = this.modalData.groupId
}
}
if (val === 110) {
if(type === 1) {
strVal = this.modalData.otherGroup1
}
}
this.$refs.baseList.init(val, strVal)
})
},
/**
* 列表方法的回调
* @param val
*/
getBaseData (val) {
if (this.tagNo === 107) {
if(this.tagNo1 === 1) {
this.modalData.umId = val.um_id
this.modalData.umName = val.um_name
}
}
if (this.tagNo === 108) {
if(this.tagNo1 === 1) {
this.modalData.familyId = val.family_id
this.modalData.familyName = val.family_name
}
}
if (this.tagNo === 109) {
if(this.tagNo1 === 1) {
this.modalData.groupId = val.group_id
this.modalData.groupName = val.group_name
}
}
},
// ======== ========
/**
* 导出excel
*/
async createExportData () {
this.searchData.limit = -1
this.searchData.page = 1
await umInformationSearch(this.searchData).then(({data}) => {
this.resultList = data.page.list
})
return this.resultList
},
startDownload () {
},
finishDownload () {
},
fields () {
let json = '{'
this.columnList.forEach((item, index) => {
if (index == this.columnList.length - 1) {
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
} else {
json += '"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"' + ','
}
})
json += '}'
let s = eval('(' + json + ')')
return s
}
}
}
</script>
<style scoped lang="scss">
/deep/ .customer-tab .el-tabs__content {
padding: 0px !important;
height: 459px;
}
</style>

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

@ -0,0 +1,686 @@
<template>
<div class="mode-config" style="padding: 5px">
<el-form :inline="true" label-position="top" :model="searchData">
<el-row>
<el-col :span="24">
<el-form-item label="客户编码">
<el-input v-model="searchData.customerNo" placeholder="请输入内容" clearable style="width: 120px"/>
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="searchData.customerName" placeholder="请输入内容" clearable style="width: 120px"/>
</el-form-item>
<el-form-item label="跟单员">
<el-input v-model="searchData.trackerName" placeholder="请输入内容" clearable style="width: 120px"/>
</el-form-item>
<el-form-item label="报价单号">
<el-input v-model="searchData.quotationNo" placeholder="请输入内容" clearable style="width: 120px"/>
</el-form-item>
<el-form-item label="客户询价单号">
<el-input v-model="searchData.customerInquiryNo" placeholder="请输入内容" clearable style="width: 120px"/>
</el-form-item>
<el-form-item label="内部询价单号">
<el-input v-model="searchData.internalInquiryNo" placeholder="请输入内容" clearable style="width: 120px"/>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="searchData.quotationStatus" placeholder="请选择" style="width: 120px">
<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-row>
<el-row>
<el-col :span="24">
<el-form-item label="项目编码">
<el-input v-model="searchData.projectId" placeholder="请输入内容" clearable style="width: 120px"/>
</el-form-item>
<el-form-item label="项目名称">
<el-input v-model="searchData.projectName" placeholder="请输入内容" clearable style="width: 120px"/>
</el-form-item>
<el-form-item label="销售员">
<el-input v-model="searchData.quoterName" placeholder="请输入内容" size="large" clearable style="width: 120px;height: 28px"/>
</el-form-item>
<el-form-item label="报价日期">
<el-date-picker
style="width: 255px"
v-model="searchData.dateValue"
type="daterange"
size="mini"
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-form-item label=" ">
<el-button plain type="primary" @click="initData" @keyup.enter.native="initData">查询</el-button>
<el-button type="primary" @click="insertDiaLogFlag = true">新增</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 表格 和上述搜索框对应 -->
<el-table :data="tableData" @row-click="rowClickQuotation" stripe border style="width: 100%;margin-top: 12px" :height="height">
<el-table-column
label="操作"
align="center"
fixed
width="60">
<template slot-scope="scope">
<el-button type="text" style="padding: 0px 10px" size="small">下达</el-button>
</template>
</el-table-column>
<el-table-column
align="center"
prop="quotationNo"
label="报价单号"
show-overflow-tooltip
width="120">
</el-table-column>
<el-table-column
align="center"
prop="quotationDate"
label="报价日期"
show-overflow-tooltip
width="120">
</el-table-column>
<el-table-column
align="center"
prop="customerNo"
show-overflow-tooltip
label="客户编码">
</el-table-column>
<el-table-column
align="center"
prop="customerName"
show-overflow-tooltip
label="客户名称">
</el-table-column>
<el-table-column
align="center"
prop="versionCode"
show-overflow-tooltip
label="版本号">
</el-table-column>
<el-table-column
align="center"
prop="projectId"
show-overflow-tooltip
label="项目编码">
</el-table-column>
<el-table-column
align="center"
prop="projectName"
show-overflow-tooltip
label="项目名称">
</el-table-column>
<el-table-column
align="center"
prop="quoterName"
width="60"
show-overflow-tooltip
label="销售员">
</el-table-column>
<el-table-column
align="center"
prop="trackerName"
width="60"
show-overflow-tooltip
label="跟单员">
</el-table-column>
<el-table-column
align="center"
prop="currency"
width="60"
show-overflow-tooltip
label="货币">
</el-table-column>
<el-table-column
align="center"
prop="quotationStatus"
show-overflow-tooltip
width="60"
label="状态">
</el-table-column>
<el-table-column
align="center"
prop="remark"
show-overflow-tooltip
width="60"
label="备注">
</el-table-column>
<el-table-column
align="center"
prop="customerInquiryNo"
show-overflow-tooltip
label="客户询价单号">
</el-table-column>
<el-table-column
align="center"
prop="internalInquiryNo"
show-overflow-tooltip
label="内部询价单号">
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination style="margin-top: 0px"
@size-change="quotationHeaderSizeChange"
@current-change="quotationHeaderCurrentChange"
:current-page="no"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="size"
:total="total"
layout="total,sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 标签页 -->
<el-tabs v-model="activeTabName" @tab-click="handleClickTab"
style="box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);border: 2px;min-height: 380px;margin-top: 5px;padding: 5px">
<el-tab-pane label="明细" name="quotation_detail">
<quotation-detail :quotation-header="quotationHeader"></quotation-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-project-information>
</el-tab-pane>
<el-tab-pane label="客户信息" name="quotation_customer_information">
<quotation-customer-information></quotation-customer-information>
</el-tab-pane>
<el-tab-pane label="客户联系人" name="quotation_customer_contact">
<quotation-customer-contact></quotation-customer-contact>
</el-tab-pane>
</el-tabs>
<!-- 新增弹框 -->
<el-dialog title="新增报价" @close="closeInsertDialog" :close-on-click-modal="false" v-drag :visible.sync="insertDiaLogFlag" width="620px">
<el-form :rules="rules" :inline="true" label-position="top" ref="insertQuotationForm" :model="insertData"
label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item prop="internalInquiryNo">
<span slot="label" style="" @click="quotationNoDialogFlag = true"><a herf="#">内部询价单号</a></span>
<el-input v-model="insertData.internalInquiryNo" placeholder="请输入内容" clearable style="width: 280px"/>
</el-form-item>
<el-form-item label="客户询价单号" prop="customerInquiryNo">
<el-input v-model="insertData.customerInquiryNo" placeholder="请输入内容" clearable style="width: 280px"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="customerNo">
<span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(102,1)"><a herf="#">客户编码</a></span>
<span slot="label" style="" v-else><a herf="#">客户编码</a></span>
<el-input v-model="insertData.customerNo" :disabled="insertData.internalInquiryNo !=''" placeholder="请输入内容" clearable style="width: 280px"/>
</el-form-item>
<el-form-item prop="customerName">
<span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(102,1)"><a herf="#">客户</a></span>
<span slot="label" style="" v-else><a herf="#">客户</a></span>
<el-input v-model="insertData.customerName" :disabled="insertData.internalInquiryNo !=''" placeholder="请输入内容" clearable style="width: 280px"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item prop="projectId">
<span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(104,1)"><a herf="#">项目编码</a></span>
<span slot="label" style="" v-else><a herf="#">项目编码</a></span>
<el-input v-model="insertData.projectId" :disabled="insertData.internalInquiryNo !=''" placeholder="请输入内容" clearable style="width: 280px"/>
</el-form-item>
<el-form-item prop="projectName">
<span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(104,1)"><a herf="#">项目名称</a></span>
<span slot="label" style="" v-else><a herf="#">项目名称</a></span>
<el-input v-model="insertData.projectName" :disabled="insertData.internalInquiryNo !=''" placeholder="请输入内容" clearable style="width: 280px"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="货币" prop="currency">
<el-input v-model="insertData.currency" placeholder="请输入内容" size="large" clearable style="width: 280px"/>
</el-form-item>
<el-form-item label="报价日期" prop="quotationDate">
<el-date-picker
style="width: 280px"
v-model="insertData.quotationDate"
type="date"
size="mini"
format="yyyy/MM/dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
<el-col>
<el-form-item prop="quoter">
<span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(103,2)"><a herf="#">销售员</a></span>
<span slot="label" style="" v-else><a herf="#">销售员</a></span>
<el-input v-model="insertData.quoterName" :disabled="insertData.internalInquiryNo !=''" @clear="clearQuoter" placeholder="请输入内容" clearable style="width: 280px"/>
</el-form-item>
<el-form-item prop="tracker">
<span slot="label" style="" v-if="insertData.internalInquiryNo ==''" @click="getBaseList(103,1)"><a herf="#">跟单员</a></span>
<span slot="label" style="" v-else ><a herf="#">跟单员</a></span>
<el-input v-model="insertData.trackerName" :disabled="insertData.internalInquiryNo !=''" @clear="clearTracker" placeholder="请输入内容" size="large" clearable style="width: 280px"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="状态" prop="quotationStatus">
<el-select v-model="insertData.quotationStatus" style="width: 280px" :disabled="insertData.internalInquiryNo !=''" clearable placeholder="请选择" >
<el-option label="草稿" value="草稿"></el-option>
<el-option label="下达" value="下达"></el-option>
</el-select>
</el-form-item>
<el-form-item label=" ">
<el-checkbox v-model="insertData.requireApproval" style="width: 23%" true-label="0" false-label="1" label="需要审批"></el-checkbox>
<el-checkbox v-model="insertData.approvalStatus" style="width: 22%" true-label="已审批" false-label="未审批" label="是否审批"></el-checkbox>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" style="width: 100%;min-height: 70px">
<el-input type="textarea" style="width: 100%" :show-word-limit="true" v-model="insertData.remark"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-footer style="height:30px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="insertDiaLogFlag = false">关闭</el-button>
<el-button type="primary" @click="insertQuotationHeader">保存</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"
width="685px" v-drag>
<el-form label-position="top"
inline="inline"
:model="quotationNoSearchData"
size="mini"
label-width="120px">
<el-form-item label="询价单号">
<el-input v-model="quotationNoSearchData.quotationNo" clearable/>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" style="padding: 3px 12px" @click="searchQuotationData">查询</el-button>
</el-form-item>
</el-form>
<el-table :data="quotationNoData" stripe border @cell-dblclick="dblclickQuotationNo">
<el-table-column prop="quotationNo" label="询价单号">
</el-table-column>
<el-table-column prop="projectName" label="项目名称">
</el-table-column>
</el-table>
<el-footer style="height:30px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="quotationNoDialogFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 -->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</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 Chooselist from '@/views/modules/common/Chooselist';
import {
getQuotationHeaderByPage,
insertQuotationHeader,
} from '@/api/quotation/quotationHeader.js';
import {
searchQuotationByQuotationNo,
} from '@/api/quotation/quotationInformation.js';
export default {
components:{
Chooselist,
quotationDetail,
quotationExamineAndApprove,
quotationProjectInformation,
quotationCustomerInformation,
quotationCustomerContact,
},
data () {
return {
//
searchData:{
site:this.$store.state.user.site,//
customerNo:"", //
customer:"", //
tracker:"", //
quotationStatus:"", //
projectId:"", //
projectName:"", //
quoterName:"", //
startDate:"", //
endDate:"", //
dateValue:[],//
},
tableData: [],//
//
no:1,//
size:20,//
total:0,//
//
height:200,
//
activeTabName:"quotation_detail",
//dialog
insertDiaLogFlag:false,
quotationNoDialogFlag:false,
//
insertData:{
site:this.$store.state.user.site,
quotationNo:"",//
quotationDate:new Date(),//
customerNo:"", //
customerName:"",//
versionCode:"001",
projectId:"",//
projectName:"",//
tracker:"",//
quoter:"",//
quoterName:"",//
trackerName:"",//
currency:"",//
quotationStatus:"草稿",//
remark:"",//
customerInquiryNo:"",//
internalInquiryNo:"",//
requireApproval:"",//
approvalStatus:"",//
createBy:this.$store.state.user.id,//
createDate:new Date(),//
},
//
rules: {
customerNo: [
{ required: true,message:' '},
],
customerName: [
{ required: true,message:' '},
],
projectId:[
{ required: true,message:' '}
],
projectName:[
{ required: true,message:' '}
],
tracker:[
{ required: true,message:' '}
],
trackerName:[
{ required: true,message:' '}
],
currency:[
{ required: true,message:' '}
],
quoter:[
{ required: true,message:' '}
],
quoterName:[
{ required: true,message:' '}
],
quotationStatus:[
{ required: true,message:' '}
],
quotationDate:[
{ required: true,message:' '}
],
},
//
tagNo1:"",
tagNo:"",
//
quotationNoSearchData:{
quotationNo:"",//
site:this.$store.state.user.site,//
},
//
quotationNoData:[],
//
quotationHeader:{},
}
},
methods: {
// quotation
rowClickQuotation(row){
this.quotationHeader = row;
},
// change
changeDateRange(){
this.searchData.startDate = this.searchData.dateValue[0];
this.searchData.endDate = this.searchData.dateValue[1];
},
//
initData(){
let params = {
no:this.no,
size:this.size,
site:this.$store.state.user.site,
customerNo:this.searchData.customerNo,
customerName:this.searchData.customerName,
trackerName:this.searchData.trackerName,
quotationNo:this.searchData.quotationNo,
customerInquiryNo:this.searchData.customerInquiryNo,
internalInquiryNo:this.searchData.internalInquiryNo,
quotationStatus:this.searchData.quotationStatus,
projectId:this.searchData.projectId,
projectName:this.searchData.projectName,
quoterName:this.searchData.quoterName,
startDate:this.searchData.startDate,
endDate: this.searchData.endDate,
}
getQuotationHeaderByPage(params).then(({data})=>{
this.tableData = data.data.records;
this.total = data.data.total;
this.quotationHeader = this.tableData[0];
})
},
// size
quotationHeaderSizeChange(val){
this.size = val;
this.initData();
},
// no
quotationHeaderCurrentChange(val){
this.no = val;
this.initData();
},
// QuotationHeader
insertQuotationHeader(){
//
this.$refs['insertQuotationForm'].validate((valid)=>{
if (valid){
//
insertQuotationHeader(this.insertData).then(({data})=>{
console.log("回调结果:",data)
//
if (data.code === 200){
this.initData();
this.insertDiaLogFlag = false;
}
this.$message.success(data.msg);
})
}else {
this.$message.warning("校验未通过,必填项未填!");
}
})
},
// resetInsertData
resetInsertData(){
this.insertData = {
site:this.$store.state.user.site,
quotationNo:"",//
quotationDate:new Date(),//
customerNo:"", //
customerName:"",//
versionCode:"001",
projectId:"",//
projectName:"",//
tracker:"",//
quoter:"",//
quoterName:"",//
trackerName:"",//
currency:"",//
quotationStatus:"草稿",//
remark:"",//
customerInquiryNo:"",//
internalInquiryNo:"",//
requireApproval:"",//
approvalStatus:"",//
createBy:this.$store.state.user.id,//
createDate:new Date(),//
}
},
//
clearQuoter(){
this.insertData.quoter = "";
this.insertData.quoterName = "";
},
//
clearTracker(){
this.insertData.tracker = "";
this.insertData.trackerName = "";
},
//
closeInsertDialog(){
this.resetInsertData();
this.$refs['insertQuotationForm'].resetFields();
},
//
handleClickTab(tab, event){
},
// ======== chooseList ========
/**
* 获取基础数据列表S
* @param val
* @param type
*/
getBaseList (val, type) {
this.tagNo = val
this.tagNo1 = type
this.$nextTick(() => {
let strVal = ''
if (val === 102) {
if(type === 1) {
strVal = this.insertData.customerNo
}
}
if (val === 103) {
if(type === 1) {
strVal = this.insertData.tracker
}
if(type === 2) {
strVal = this.insertData.quoter
}
}
if (val === 104) {
if(type === 1) {
strVal = this.insertData.projectId
}
}
this.$refs.baseList.init(val, strVal)
})
},
/**
* 列表方法的回调
* @param val
*/
getBaseData (val) {
if (this.tagNo === 102) {
if(this.tagNo1 === 1) {
this.insertData.customerNo = val.Customer_no
this.insertData.customerName = val.Customer_desc
}
}
if (this.tagNo === 103) {
if(this.tagNo1 === 1) {
this.insertData.tracker = val.username
this.insertData.trackerName = val.user_display
}
if(this.tagNo1 === 2) {
this.insertData.quoter = val.username
this.insertData.quoterName = val.user_display
}
}
if (this.tagNo === 104) {
if(this.tagNo1 === 1) {
this.insertData.projectId = val.project_id
this.insertData.projectName = val.project_name
}
}
},
//
searchQuotationData(){
searchQuotationByQuotationNo(this.quotationNoSearchData).then(({data})=>{
this.quotationNoData = data.data;
})
},
//
openQuotationNoDialog(){
//
this.searchQuotationData();
},
//
closeQuotationNoDialog(){
this.quotationNoSearchData = {
quotationNo:"",//
site:this.$store.state.user.site,//
}
},
//
dblclickQuotationNo(row){
this.insertData.customerNo = row.customerNo
this.insertData.customerName=row.customerDesc,//
this.insertData.projectId=row.projectId,//
this.insertData.projectName=row.projectName,//
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.quotationNoDialogFlag = false;
}
},
computed:{
},
mounted () {
this.$nextTick(() => {
this.height = window.innerHeight / 2 - 240;
})
},
created () {
this.initData();//
},
}
</script>
<style scoped lang="scss">
/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