采购部采购样式

This commit is contained in:
bryan sun
2019-11-06 17:01:47 +08:00
parent 4b718ff6ed
commit bcecdb9b19
16 changed files with 1114 additions and 601 deletions

View File

@@ -39,7 +39,7 @@
<el-tabs v-model="tabName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="外购件" name="外购件">
<el-row style="margin-bottom: 10px">
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-select v-model="projectValue" placeholder="项目名称" size="small" style="width:100px" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
@@ -53,20 +53,20 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="groupValue" placeholder="组号" size="small" clearable filterable>
<el-select v-model="groupValue" placeholder="组号" style="width:100px" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small"/>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>
<el-input v-model="materialName" placeholder="物料名称" size="small" style="width:120px" clearable/>
<el-input v-model="materialSpec" placeholder="物料规格" size="small" style="width:120px" clearable/>
<el-switch v-model="switchValue" active-color="#13ce66" inactive-color="#ff4949"/>
</el-row>
<el-row style="margin-bottom: 10px">
<el-input v-model="materialSpec" placeholder="物料规格" size="small" clearable/>
<el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/>
<!-- <el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/>-->
<el-date-picker
v-model="startTime"
size="small"
@@ -111,40 +111,34 @@
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="materialChange(scope.row)">物料变更</el-button>
</template>
</el-table-column>
<el-table-column label="物料状态" align="center" width="80">
<el-table-column label="状态" align="center" width="70">
<template slot-scope="scope">
<el-tag v-if="unInquiry(scope.row)" type="warning" size="small">未询价</el-tag>
<el-tag v-if="inquiry(scope.row)" type="success" size="small">已询价</el-tag>
<el-tag v-if="approval(scope.row)" type="primary" size="small">审批中</el-tag>
<el-tag v-if="purchased(scope.row)" type="info" size="small">已采购</el-tag>
<span v-if="unInquiry(scope.row)" style="color: orange">未询价</span>
<span v-if="inquiry(scope.row)" style="color: blue">已询价</span>
<span v-if="approval(scope.row)" style="color: green">审批中</span>
<span v-if="purchased(scope.row)">已采购</span>
<!-- <el-tag v-if="unInquiry(scope.row)" type="warning" size="mini">未询价</el-tag>-->
<!-- <el-tag v-if="inquiry(scope.row)" type="success" size="mini">已询价</el-tag>-->
<!-- <el-tag v-if="approval(scope.row)" type="primary" size="mini">审批中</el-tag>-->
<!-- <el-tag v-if="purchased(scope.row)" type="info" size="mini">已采购</el-tag>-->
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商">
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="供货商" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.任务分配时间.split(' ')[0] }}
</template>
</el-table-column>
<!--<el-table-column label="项目名称" align="center" min-width="100">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.项目名称 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="机床图号" align="center" min-width="100" prop="机床图号">
<el-table-column label="机床图号" align="center" min-width="130" prop="机床图号" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="设计者" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="80">
<el-table-column label="组号" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
@@ -159,37 +153,37 @@
<!--{{ scope.row.物料品种 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="名称" align="center" min-width="100" prop="名称">
<el-table-column label="名称" align="center" width="100" prop="名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="120" prop="物料型号">
<el-table-column label="图号或型号" align="center" min-width="130" prop="物料型号">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="150" prop="物料规格">
<el-table-column label="规格" align="center" min-width="100" prop="物料规格" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="分配数" align="center" min-width="80">
<el-table-column label="分配数" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="待询价数" align="center" min-width="90">
<el-table-column label="待询价数" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.待询价数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="库存数" align="center" min-width="90">
<el-table-column label="库存数" align="center" min-width="60">
<template slot-scope="scope">
{{ Number(scope.row.货位存量) }}
</template>
</el-table-column>
<el-table-column label="使用滞货数量" align="center" min-width="100">
<el-table-column label="用滞货" align="center" min-width="70">
<template slot-scope="scope">
{{ Number(scope.row.使用滞货数量) }}
</template>
@@ -207,16 +201,26 @@
<!--</el-tooltip>-->
</template>
</el-table-column>
<el-table-column label="可用滞货数量" align="center" min-width="100">
<el-table-column label="可用滞货" align="center" min-width="80">
<template slot-scope="scope">
{{ Number(scope.row.滞货数量) }}
</template>
</el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注">
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="分配时间" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.任务分配时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="设计者" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }}
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="100">
<template slot-scope="scope">
<b v-if="inquiry(scope.row)">{{ scope.row.询价单编号 }}</b>
@@ -244,7 +248,7 @@
</el-tab-pane>
<el-tab-pane label="基本件" name="基本件">
<el-row style="margin-bottom: 10px">
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-select v-model="projectValue" placeholder="项目名称" size="small" style="width: 100px" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
@@ -258,19 +262,19 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="groupValue" placeholder="组号" size="small" clearable filterable>
<el-select v-model="groupValue" placeholder="组号" size="small" style="width: 100px" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small"/>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" style="width: 100px" size="small"/>
<el-input v-model="partNum" placeholder="零件图号" size="small" clearable/>
<el-input v-model="partName" placeholder="零件名称" size="small" style="width: 120px" clearable/>
<el-input v-model="partSpec" placeholder="零件规格" size="small" style="width: 120px" clearable/>
</el-row>
<el-row style="margin-bottom: 10px">
<el-input v-model="partName" placeholder="零件名称" size="small" clearable/>
<el-input v-model="partSpec" placeholder="零件规格" size="small" clearable/>
<el-date-picker
v-model="endTime"
size="small"
@@ -315,7 +319,7 @@
<!--<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="partChange(scope.row)">零件变更</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="零件状态" align="center" width="100">
<el-table-column label="采购状态" align="center" width="80">
<template slot-scope="scope">
<el-tag v-if="unInquiry(scope.row)" type="warning" size="small">未询价</el-tag>
<el-tag v-if="inquiry(scope.row)" type="success" size="small">已询价</el-tag>
@@ -328,52 +332,42 @@
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.任务分配时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="100">
<!-- <el-table-column label="项目名称" align="center" min-width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.项目名称 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="机床图号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="设计者" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="80">
<el-table-column label="组号" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="图号" align="center" min-width="100">
<el-table-column label="图号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="100">
<el-table-column label="名称" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="100">
<el-table-column label="规格" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" min-width="100">
<el-table-column label="材料" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<el-table-column label="数量" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
@@ -383,6 +377,16 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="分配时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.任务分配时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="设计者" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.组件设计者 || scope.row.机床设计者 || '—' }}
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="100">
<template slot-scope="scope">
<b v-if="inquiry(scope.row)">{{ scope.row.询价单编号 }}</b>
@@ -588,170 +592,183 @@
<el-card>
<div slot="header">
<span>询价单号:</span>
<el-input v-model="inquirySheetNum" placeholder="询价单号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<!-- <span>询价单号:</span>-->
<el-input v-model="inquirySheetNum" placeholder="询价单号" size="small" style="margin: 0px 10px" clearable/>
<!-- <span>供应商:</span>-->
<el-input v-model="supplierName" placeholder="供应商" size="small" style="margin: 0px 10px" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
<el-button
type="primary"
size="small"
style="margin-left: 10px"
@click="createInquirySheet">创建询价单</el-button>
style="margin:0px 10px"
@click="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()">查询</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top">
<el-button
type="warning"
size="small"
style="margin-left: 10px"
style="margin: 0px 20px"
@click="addInquirySheet">选入物料</el-button>
</el-tooltip>
<el-button
type="primary"
size="small"
style="float: right;margin:0px 10px"
@click="createInquirySheet">创建询价单</el-button>
</div>
<h3 style="margin-top: 0;display:inline-block;width:50%">询价单</h3>
<el-button :loading="baseInfoLoading" type="success" size="mini" style="float: right" @click="inquirySheetBaseInfoMaintain">询价单基础信息维护</el-button>
<el-table v-loading="" :data="tableData2" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="询价单编号" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.询价单编号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="200" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="电话" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.电话号码 }}
</template>
</el-table-column>
<el-table-column label="传真" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column label="受托人" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.注册资本 }}
</template>
</el-table-column>
<el-table-column label="帐号" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.帐号 }}
</template>
</el-table-column>
<el-table-column label="开户行" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column label="税号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column label="法人" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.企业性质 }}
</template>
</el-table-column>
<el-table-column label="邮编" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.货期 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right">
<template slot-scope="scope">
<el-button type="warning" size="mini" plain icon="el-icon-edit" @click="editInquirySheet(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" plain icon="el-icon-delete" @click="deleteInquirySheet(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
<el-button :disabled="tableData3.length===0" type="warning" size="mini" style="margin-left:10px;float: right" @click="printInquirySheet()">打印</el-button>
<el-button :disabled="tableData3.length===0" type="warning" size="mini" style="margin-left:10px;float: right" @click="exportInquirySheet()">导出</el-button>
<el-card>
<h3 style="margin: 0px 30px;display:inline-block; ">询价单</h3>
<el-button type="warning" size="mini" plain icon="el-icon-edit" style="margin: 0px 20px" @click="editInquirySheet()">编辑</el-button>
<el-button type="danger" size="mini" plain icon="el-icon-delete" style="margin: 0px 60px 0px 20px" @click="deleteInquirySheet()">删除</el-button>
<!-- <h3 style="margin: 0px 40px;display:inline-block;">询价单明细</h3>-->
<el-button :disabled="tableData3.length===0" type="primary" size="small" plain style="margin-left:300px" @click="printInquirySheet()">打印</el-button>
<el-button :disabled="tableData3.length===0" type="warning" size="small" style="margin-left:10px" @click="exportInquirySheet()">导出</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="保存该询价单" placement="top">
<el-button :disabled="tableData3.length===0" type="success" size="mini" style="float: right" @click="saveOrder()">保存</el-button>
<el-button :disabled="tableData3.length===0" type="success" size="small" @click="saveOrder()">保存</el-button>
</el-tooltip>
</div><hr>
<h3 style="margin-top: 0">询价单明细</h3>
<el-table v-loading="" :data="tableData3" border style="max-height: 500px;" height="500px" size="mini">
<el-table-column label="供应商" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.组件零件流水号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.组件零件流水号 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.组件零件流水号 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="待询价数量" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.技术下达数量 }}
</template>
</el-table-column>
<el-table-column label="实际询价(采购)数量" align="center" width="130">
<template slot-scope="scope">
<el-input v-direction="{x: 0, y: scope.$index}" v-model="scope.row.数量" size="mini" style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="60">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column label="询价备注" align="center" min-width="120">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-model="scope.row.备注" size="mini" style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="询价单编号" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.询价单编号 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 || scope.row.基本件机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.组号 || scope.row.基本件组号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="将该物料从询价单中删除" placement="top">
<el-button type="danger" size="mini" plain icon="el-icon-delete" @click="outInquirySheet(scope.row)">移出</el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<el-button :loading="baseInfoLoading" type="success" size="mini" style="float: right" plain @click="inquirySheetBaseInfoMaintain">信息维护</el-button>
</el-card>
<el-row>
<el-col style="width:310px">
<el-card style="width:310px">
<el-table v-loading="" :data="tableData2" border style="width:320px;float: left;margin-right: 20px" height="500px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="询价单编号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.询价单编号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" width="180" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<!-- <el-table-column label="电话" align="center" min-width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.电话号码 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="传真" align="center" min-width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.传真 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="受托人" align="center" min-width="70">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.注册资本 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="帐号" align="center" min-width="100" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.帐号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="开户行" align="center" min-width="100" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.开户行 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="税号" align="center" min-width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.税号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="法人" align="center" min-width="70">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.企业性质 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="邮编" align="center" min-width="70">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.货期 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" align="center" width="200" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; <el-button type="warning" size="mini" plain icon="el-icon-edit" @click="editInquirySheet(scope.row)">编辑</el-button>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-button type="danger" size="mini" plain icon="el-icon-delete" @click="deleteInquirySheet()">删除</el-button>&ndash;&gt;-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-card>
</el-col>
<!-- <div class="block" style="margin: 10px 0;">-->
<!-- <el-pagination-->
<!-- :current-page="pageCurrent2"-->
<!-- :page-sizes="[10, 20, 30, 40]"-->
<!-- :page-size="pageSize2"-->
<!-- :total="total2"-->
<!-- layout="total"-->
<!-- @size-change="handleSizeChange2"-->
<!-- @current-change="handleCurrentChange2"/>-->
<!-- </div>-->
<el-col style="width:880px">
<el-card>
<el-table v-loading="" :data="tableData3" border style="max-height: 500px;width: 850px;float: left" height="500px" size="mini" >
<!-- <el-table-column label="供应商" align="center" min-width="150" show-overflow-tooltip>-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.供应商名称 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="图号" align="center" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.组件零件流水号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.组件零件流水号 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" width="110" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.组件零件流水号 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="待询数" align="center" width="60">
<template slot-scope="scope">
{{ scope.row.技术下达数量 }}
</template>
</el-table-column>
<el-table-column label="实询数" align="center" width="90">
<template slot-scope="scope">
<el-input v-direction="{x: 0, y: scope.$index}" v-model="scope.row.数量" size="mini" style="width:100%"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column label="询价备注" align="center" width="110">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-model="scope.row.备注" size="mini" style="width:100%"/>
</template>
</el-table-column>
<!-- <el-table-column label="询价单编号" align="center" min-width="100">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.询价单编号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="机床图号" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 || scope.row.基本件机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.组号 || scope.row.基本件组号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="50">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="将该物料从询价单中删除" placement="top">
<el-button type="text" size="mini" icon="el-icon-delete" @click="outInquirySheet(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
<div id="inquirySheet" style="width: 1000px;margin: 0 auto;display:none">
@@ -1132,10 +1149,10 @@ export default {
value: 0,
label: '全部'
},
{
value: 1,
label: '未分配'
},
// {
// value: 1,
// label: '未分配'
// },
{
value: 2,
label: '已分配',
@@ -1178,7 +1195,7 @@ export default {
tableData2: [], // 询价单列表
total2: 0,
pageCurrent2: 1,
pageSize2: 10,
pageSize2: 10000,
tableData3: [], // 询价单明细
dialogVisible1: false,
inquirySheetNum: '', // 询价单号
@@ -1248,7 +1265,8 @@ export default {
backlogMaterialNum: '',
cancelNum: 0,
machines1: [],
machines2: []
machines2: [],
row1: ''
}
},
computed: {
@@ -1876,41 +1894,52 @@ export default {
}
})
},
deleteInquirySheet(row) { // 删除询价单
this.$confirm('确定删除该询价单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInquirySheet(row.询价单流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.inquirySheetNum = ''
this.supplierName = ''
this.supplierValue = ''
this.searchTable2()
this.tableData3 = []
this.searchTable11()
this.searchTable12()
} else { this.$message.error('删除失败') }
deleteInquirySheet() { // 删除询价单
if (this.row1 === '') {
console.log(this.row1, 1)
this.$message.error('请选择询价单')
} else {
console.log(this.row1, 2)
this.$confirm('确定删除该询价单?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInquirySheet(this.row1.询价单流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.inquirySheetNum = ''
this.supplierName = ''
this.supplierValue = ''
this.searchTable2()
this.tableData3 = []
this.searchTable11()
this.searchTable12()
} else { this.$message.error('删除失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
editInquirySheet(row) { // 编辑询价单
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '编辑询价单'
this.form2.inquirySheetNumValue = row.询价单流水号
this.form2.inquirySheetNum = row.询价单编号
this.form2.supplierValue = row.供应商流水号
this.form2.supplierName = row.供应商名称
this.dialogVisible2 = true
},
editInquirySheet() { // 编辑询价单
if (this.row1 === '') {
console.log(this.row1)
this.$message.error('请选择询价单')
} else {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '编辑询价单'
this.form2.inquirySheetNumValue = this.row1.询价单流水号
this.form2.inquirySheetNum = this.row1.询价单编号
this.form2.supplierValue = this.row1.供应商流水号
this.form2.supplierName = this.row1.供应商名称
this.dialogVisible2 = true
}
},
submitEditInquirySheet() { // 提交编辑询价单
this.$refs['form2'].validate((valid) => {
@@ -1926,7 +1955,7 @@ export default {
if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1 && numGroup1.indexOf(this.form2.inquirySheetNum) !== numGroup2.indexOf(parseInt(this.form2.inquirySheetNumValue))) {
this.$message.error('该询价单号已存在')
} else {
editInquirySheet(this.form2.inquirySheetNumValue, this.form2.inquirySheetNum, this.form2.supplierValue).then(response => {
editInquirySheet(this.form2.inquirySheetNumValue, this.form2.inquirySheetNum, this.form2.supplierNameValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.inquirySheetNum = ''
@@ -2211,6 +2240,7 @@ export default {
this.dialogVisible1 = false
},
searchTable3(row) { // 查询该询价单中的物料和零件
this.row1 = row
this.tableData3 = []
this.inquirySheetFlowNum = row.询价单流水号
this.orderExport = row.询价单编号