This commit is contained in:
bryan sun
2019-11-09 14:19:06 +08:00
3 changed files with 170 additions and 532 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="app-container">
<el-card>
<el-row>
<el-row v-if="false">
<el-select
v-model="MaterialCategoryValue"
placeholder="物料类别"
@@ -85,6 +85,13 @@
@click="pageCurrent=1;searchMaterial()">查询</el-button>
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">新增采购物料申请</el-button>
</el-row>
<el-row>
<el-input v-model="MaterialName" placeholder="物料名称" size="small" clearable/>
<el-input v-model="MaterialSpecification" placeholder="物料规格" size="small" clearable/>
<el-input v-model="MaterialModel" placeholder="物料型号" size="small" clearable/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent=1;searchMaterial()">查询</el-button>
<el-button type="primary" style="margin-bottom: 3px;margin-top: 10px" icon="el-icon-circle-plus-outline" size="small" @click="handleAdd()">新增采购物料申请</el-button>
</el-row>
</el-card>
<el-card>

View File

@@ -3,36 +3,16 @@
<el-row id="PurchasingCenter/OfflineContract">
<el-col :span="24">
<el-tabs v-model="tabName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="标准件" name="标准件">
<el-tab-pane label="三表" name="标准件">
<el-row>
<el-select v-model="projectValue" style="width:120px" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="machineValue" style="width:120px;margin-left: 10px" placeholder="机床图号" size="small" clearable filterable @change="machineChange">
<el-input v-model="materialName" style="width: 150px;margin-left: 5px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()"/>
<el-select v-model="machineValue" style="width:150px;margin-left: 5px" placeholder="机床图号" size="small" clearable filterable @change="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="groupValue" style="width:120px;margin-left: 10px" placeholder="组号" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="materialName" style="width: 120px;margin-left: 10px" placeholder="物料名称" size="small" clearable/>
<el-input v-model="materialSpec" style="width: 120px;margin-left: 10px" placeholder="物料规格" size="small" clearable/>
<el-input v-model="materialModel" style="width: 120px;margin-left: 10px" placeholder="物料型号" size="small" clearable/>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small" style="width: 120px; margin: 0px 10px"/>
</el-row>
<el-row>
<!-- <span>物料状态:</span>-->
<el-date-picker
v-model="startTime"
size="small"
@@ -41,18 +21,13 @@
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margin-left: 0px"
style="width:250px;margin-left: 5px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin:10px 10px 0px 10px"
@click="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 5px" @click="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()">查询</el-button>
<el-popover v-model="visible1" placement="top" width="140">
<div style="text-align: right; margin: 0">
<el-select v-model="PersonValue" style="width:100px;margin: 10px 0px" placeholder="人员" size="small" filterable clearable>
<el-select v-model="PersonValue" style="width:100px" placeholder="人员" size="small" filterable clearable>
<el-option
v-for="item in Person"
:key="item.value"
@@ -64,172 +39,6 @@
<el-button slot="reference" type="success" size="small" plain style="float: right;margin-right: 20px">调整采购任务</el-button>
</el-popover>
</el-row>
<el-table
v-loading=""
:data="tableData00"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 500px;"
height="500px"
size="mini"
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<el-table-column label="采购状态" prop="询价状态编号" align="center" width="80">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" min-width="50">
<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.物料类别 }}
</template>
</el-table-column>
<el-table-column label="物料品种" prop="物料品种" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.物料品种 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" prop="物料型号" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="物料规格" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="分配数量" align="center" min-width="70" prop="零件数量">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="库存" align="center" min-width="50" prop="库存">
<template slot-scope="scope">
{{ scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) }}
</template>
</el-table-column>
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
<template slot-scope="scope">
<el-input-number v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > Number(scope.row.货位存量) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量)) : Number(scope.row.零件数量)" :disabled="Number(scope.row.货位存量) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="待采数量" align="center" min-width="70" prop="待采购数量">
<template slot-scope="scope">
{{ scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) }}
</template>
</el-table-column>
<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 :filters="source" :filter-method="filterSource" align="center" label="来源" min-width="60px" prop="零件类型筛选">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" prop="任务分配时间" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0 0 0;">
<el-pagination
:current-page="pageCurrent11"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize11"
:total="total11"
style="display:inline-block;width:800px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange11"
@current-change="handleCurrentChange11"/>
</div>
</el-tab-pane>
<el-tab-pane label="外购件" name="外购件">
<el-row>
<el-select v-model="projectValue" style="width:120px" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="machineValue" style="width:120px;margin-left: 10px" placeholder="机床图号" size="small" clearable filterable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="groupValue" style="width:120px;margin-left: 10px" placeholder="组号" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="materialName" style="width: 120px;margin-left: 10px" placeholder="物料名称" size="small" clearable/>
<el-input v-model="materialSpec" style="width: 120px;margin-left: 10px" placeholder="物料规格" size="small" clearable/>
<el-input v-model="materialModel" style="width: 120px;margin-left: 10px" placeholder="物料型号" size="small" clearable/>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small" style="width: 120px; margin: 0px 10px"/>
</el-row>
<el-row>
<!-- <span>物料状态:</span>-->
<el-date-picker
v-model="startTime"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margin: 10px 10px 0px 0px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()">查询</el-button>
<el-popover v-model="visible" placement="top" width="140">
<div style="text-align: right; margin: 0">
<el-select v-model="PersonValue" style="width:100px;margin: 10px 0px" placeholder="人员" size="small" filterable clearable>
<el-option
v-for="item in Person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="primary" size="mini" @click="visible = false;tiaozheng1()">确定</el-button>
</div>
<el-button slot="reference" type="success" size="small" plain style="float: right;margin-right: 20px">调整采购任务</el-button>
</el-popover>
</el-row>
<el-table
v-loading=""
:data="tableData00"
@@ -247,9 +56,24 @@
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="物料规格" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="型号" prop="物料型号" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 }}
{{ scope.row.供货商 === '0' ? '-' : scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" min-width="100" show-overflow-tooltip>
@@ -272,29 +96,30 @@
{{ scope.row.物料品种 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" prop="物料型号" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="物料规格" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="分配数量" align="center" min-width="70" prop="零件数量">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="库存(BZ)" align="center" min-width="50" prop="库存">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用库存数量" align="center" min-width="105" prop="使用库存数">
<template slot-scope="scope">
<span v-if="Number(scope.row.零件类型) !== 1">-</span>
<el-input-number v-if="Number(scope.row.零件类型) === 1" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > Number(scope.row.货位存量) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量)) : Number(scope.row.零件数量)" :disabled="Number(scope.row.货位存量) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="待采数量" align="center" min-width="70" prop="待采购数量">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="使用滞货数量" align="center" min-width="100" prop="使用滞货数量">
<template slot-scope="scope">
{{ Number(scope.row.使用滞货数量) }}
{{ Number(scope.row.零件类型) === 1 ? Number(scope.row.使用滞货数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用滞货" align="center" min-width="70">
@@ -307,12 +132,7 @@
</el-table-column>
<el-table-column label="可用滞货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ Number(scope.row.滞货数量) }}
</template>
</el-table-column>
<el-table-column label="待采购数" align="center" min-width="70" prop="待采购数量">
<template slot-scope="scope">
{{ scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
{{ Number(scope.row.零件类型) === 2 ? Number(scope.row.滞货数量) : '-' }}
</template>
</el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注筛选" show-overflow-tooltip>
@@ -320,14 +140,14 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型筛选">
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="来源" min-width="60px" prop="零件类型筛选">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" prop="任务分配时间" align="center" min-width="110">
<el-table-column label="分配时间" prop="任务分配时间" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '-' }}
{{ scope.row.任务分配时间 ? (scope.row.任务分配时间.split(' ')[0] === '1900/1/4' ? '-' : scope.row.任务分配时间.split(' ')[0]) : '-' }}
</template>
</el-table-column>
</el-table>
@@ -343,217 +163,33 @@
@current-change="handleCurrentChange11"/>
</div>
</el-tab-pane>
<el-tab-pane label="基本件" name="基本件">
<el-row style="margin-bottom: 5px">
<el-select v-model="projectValue" style="width:120px" placeholder="项目名称" size="small" filterable clearable @change="projectChange">
<el-option
v-for="item in project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="machineValue" style="width:120px;margin-left: 10px" placeholder="机床图号" size="small" clearable filterable @change="machineChange">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="groupValue" style="width:120px;margin-left: 10px" placeholder="组号" size="small" clearable filterable>
<el-option
v-for="item in group"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="partNum" style="width: 120px;margin-left: 10px" placeholder="零件图号" size="small" clearable/>
<el-input v-model="partName" style="width: 120px;margin-left: 10px" placeholder="零件名称" size="small" clearable/>
<el-input v-model="partSpec" style="width: 120px;margin-left: 10px" placeholder="零件规格" size="small" clearable/>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small" style="width: 120px;margin: 0px 10px"/>
</el-row>
<el-row>
<!-- <span style="margin-right: -10px">物料状态:</span>-->
<el-date-picker
v-model="startTime"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margi: 10px 10px 0px 0px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent12=1;pageSize12=100;total12=0;searchTable12()">查询</el-button>
<el-popover v-model="visible2" placement="top" width="140">
<div style="text-align: right; margin: 0">
<el-select v-model="PersonValue" style="width:100px;margin: 10px 0px" placeholder="人员" size="small" filterable clearable>
<el-option
v-for="item in Person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="primary" size="mini" @click="visible2 = false;tiaozheng2()">确定</el-button>
</div>
<el-button slot="reference" type="success" size="small" plain style="float: right;margin-right: 20px">调整采购任务</el-button>
</el-popover>
</el-row>
<el-row style="margin-bottom: 10px">
<el-table
v-loading=""
:data="tableData12"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 500px;"
height="500px"
size="mini"
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<el-table-column label="零件状态" align="center" width="80">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="120" prop="供货商" 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="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<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="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.待采购数量 }}
</template>
</el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注">
<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.组件设计者 || scope.row.机床设计者 || '—' }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" align="center" min-width="110">
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
</el-table>
</el-row>
<div class="block">
<el-pagination
:current-page="pageCurrent12"
:page-sizes="[10, 50, 100, 150]"
:page-size="pageSize12"
:total="total12"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange12"
@current-change="handleCurrentChange12"/>
</div>
</el-tab-pane>
<el-tab-pane label="仓库" name="仓库">
<el-row style="margin-bottom: 10px">
<el-input v-model="materialName" style="width: 120px;margin-left: 10px" placeholder="物料名称" size="small" clearable/>
<el-input v-model="materialSpec" style="width: 120px;margin-left: 10px" placeholder="物料规格" size="small" clearable/>
<el-input v-model="materialModel" style="width: 120px;margin-left: 10px" placeholder="物料型号" size="small" clearable/>
<span>物料状态:</span>
<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small" style="width: 120px;margin: 0px"/>
<el-date-picker
v-model="startTime"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margin-left: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="searchTable22()">查询</el-button>
<el-input v-model="materialName" style="width: 150px;margin-left: 10px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent11=1;pageSize11=20;total11=0;searchTable22()"/>
<!--<span>物料状态:</span>-->
<!--<el-cascader :options="materialStatus" :props="{ checkStrictly: true }" v-model="materialStatusValue" size="small" style="width: 120px;margin: 0px"/>-->
<!--<el-date-picker-->
<!--v-model="startTime"-->
<!--size="small"-->
<!--type="daterange"-->
<!--align="center"-->
<!--value-format="yyyy-MM-dd"-->
<!--format="yyyy-MM-dd"-->
<!--range-separator=""-->
<!--style="width:250px;margin-left: 10px"-->
<!--start-placeholder="开始日期"-->
<!--end-placeholder="结束日期"/>-->
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable22()">查询</el-button>
</el-row>
<el-table
v-loading=""
:data="tableData22"
:row-class-name="tableRowClassName"
border
show-summary
style="width: 100%;max-height: 500px;"
height="500px"
size="mini"
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<el-table-column label="物料状态" prop="询价状态编号" align="center" width="100">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="任务分配时间" prop="任务分配时间" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? scope.row.任务分配时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 ? scope.row.机床图号 : '-' }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.组号 ? scope.row.组号 : '-' }}
</template>
</el-table-column>
<el-table-column align="center" width="50" type="selection"/>
<el-table-column label="名称" align="center" prop="物料名称" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
@@ -569,22 +205,23 @@
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="分配数量" align="center" min-width="80" prop="零件数量">
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.待采购数量 }}
</template>
</el-table-column>
<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 :filters="source" :filter-method="filterSource" align="center" label="数据来源" min-width="90px" prop="零件类型筛选">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 4 ? '仓库' : '-' }}
{{ scope.row.供货商 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent22"
:page-sizes="[20, 50, 100, 150]"
:page-size="pageSize22"
:total="total22"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange22"
@current-change="handleCurrentChange22"/>
</div>
</el-tab-pane>
</el-tabs>
</el-col>
@@ -630,8 +267,8 @@
</el-tooltip>
<el-input v-model="taxRate" style="float:right;width:100px" placeholder="税率" size="mini"/>
<h4 style="float:right;width: 40px;margin: 5px">税率:</h4>
<el-button v-if="quickChangePrice" size="mini" style="float:right; width80px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>
<el-button v-else size="mini" style="float:right;" @click="quickChangePrice=!quickChangePrice">还原</el-button>
<!--<el-button v-if="quickChangePrice" size="mini" style="float:right; width: 100px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>-->
<!--<el-button v-else size="mini" style="float:right;" @click="quickChangePrice=!quickChangePrice">还原</el-button>-->
</div>
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="详情" type="expand" fixed="left">
@@ -702,22 +339,8 @@
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible4" title="使用滞货" center style="min-height: 300px;" width="400px">
<span>使用滞货数量:</span>
<el-input-number :min="0" :max="maxUseNumber" v-model="useNumber" controls-position="right"/>
<div style="margin: 10px 0 0 10px;color: red">注意:确定后将不可取消使用滞货</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible4=false">取消</el-button>
<el-button :disabled="Number(useNumber)===0" type="primary" size="small" @click="submitUseInventory">确定</el-button>
</div>
</el-dialog>
<!--<h3>合同详细信息</h3>-->
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 500px;" height="450px" size="mini" show-summary>
<!-- <el-table-column label="离线合同编号" align="center" width="110">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.离线合同编号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="物料名称" align="center" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
@@ -755,7 +378,7 @@
<b v-show="hasTax!=='未税'">{{ (scope.row.单价 / (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
<el-table-column label="单价(含税)" align="center" min-width="100" prop="单价">
<el-table-column label="单价(含税)" align="center" min-width="120" prop="单价">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:70px"/>
<b v-show="hasTax!=='含税'">{{ (scope.row.未税单价 * (1 + taxRate)).toFixed(2) }}</b>
@@ -771,13 +394,13 @@
{{ hasTax==='含税' ? scope.row.含税总额 = (Number(scope.row.数量) * Number(scope.row.单价)).toFixed(2) : scope.row.含税总额 = (scope.row.未税总额 * (1+taxRate)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="160" prop="备注">
<el-table-column label="备注" align="center" min-width="120" prop="备注">
<template slot-scope="scope">
<el-input v-direction="{x: 3, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.备注" :disabled="disable" size="mini" style="width:120px"/>
<b v-else>{{ scope.row.备注 || '—' }}</b>
</template>
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="130" prop="交货期要求">
<el-table-column label="交货期" align="center" min-width="130" prop="交货期要求">
<template slot-scope="scope">
<el-input v-direction="{x: 2, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.交货期要求" :disabled="disable" size="mini" style="width:90px"/>
<b v-else>{{ scope.row.交货期要求 || '—' }}</b>
@@ -788,14 +411,54 @@
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<el-table-column label="操作" align="center" min-width="50">
<template slot-scope="scope">
<el-button v-if="quickChangePrice" :disabled="disable" type="danger" plain size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
<!--<el-button :disabled="arrival(scope.row)" type="text" icon="el-icon-delete" plain size="mini" @click="deleteOfflineContract(scope.row)"/>-->
<el-button v-if="quickChangePrice" :disabled="disable" type="text" plain size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)"/>
<b v-else>移除</b>
</template>
</el-table-column>
</el-table>
</el-card>
<div id="offlineContract" style="width: 800px;margin: 0 auto;display: none">
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
<th colspan="14"><h1>离线合同</h1></th>
</tr>
<tr>
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
<td width="80px">合同名称</td>
<td id="contractName" colspan="2" style="text-align: left;"/>
<td width="80px">供应商</td>
<td id="supplier" colspan="5" style="text-align: left;"/>
<td id="qrCode" colspan="2" rowspan="2">二维码粘贴处</td>
</tr>
<tr>
<td width="80px">合同编号</td>
<td id="contractNum" colspan="2" style="text-align: left;"/>
<td width="80px">采购员</td>
<td id="buyer" colspan="5" style="text-align: left;"/>
</tr>
<tr id="tablehead">
<td>序号</td>
<td colspan="2">名称</td>
<td>规格</td>
<td colspan="2">型号</td>
<td>数量</td>
<td>单价</td>
<td>单位</td>
<td colspan="2">合计</td>
<td>交货期</td>
<td colspan="2">备注</td>
</tr>
<tr>
<td>总计</td>
<td id="remark" colspan="10"/>
<td id="total" colspan="2" style="text-align: left;"/>
<td/>
</tr>
</table>
</div>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px" width="700px">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
@@ -902,7 +565,6 @@
</el-table>
</el-form>
</el-dialog>
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="750px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
<el-row>
@@ -969,46 +631,15 @@
@click="submitEditOfflineContract">确定</el-button>
</div>
</el-dialog>
<div id="offlineContract" style="width: 800px;margin: 0 auto;display: none">
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
<th colspan="14"><h1>离线合同</h1></th>
</tr>
<tr>
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
<td width="80px">合同名称</td>
<td id="contractName" colspan="2" style="text-align: left;"/>
<td width="80px">供应商</td>
<td id="supplier" colspan="5" style="text-align: left;"/>
<td id="qrCode" colspan="2" rowspan="2">二维码粘贴处</td>
</tr>
<tr>
<td width="80px">合同编号</td>
<td id="contractNum" colspan="2" style="text-align: left;"/>
<td width="80px">采购员</td>
<td id="buyer" colspan="5" style="text-align: left;"/>
</tr>
<tr id="tablehead">
<td>序号</td>
<td colspan="2">名称</td>
<td>规格</td>
<td colspan="2">型号</td>
<td>数量</td>
<td>单价</td>
<td>单位</td>
<td colspan="2">合计</td>
<td>交货期</td>
<td colspan="2">备注</td>
</tr>
<tr>
<td>总计</td>
<td id="remark" colspan="10"/>
<td id="total" colspan="2" style="text-align: left;"/>
<td/>
</tr>
</table>
</div>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible4" title="使用滞货" center style="min-height: 300px;" width="400px">
<span>使用滞货数量:</span>
<el-input-number :min="0" :max="maxUseNumber" v-model="useNumber" controls-position="right"/>
<div style="margin: 10px 0 0 10px;color: red">注意:确定后将不可取消使用滞货</div>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible4=false">取消</el-button>
<el-button :disabled="Number(useNumber)===0" type="primary" size="small" @click="submitUseInventory">确定</el-button>
</div>
</el-dialog>
</div>
</template>
@@ -1214,7 +845,10 @@ export default {
离线合同状态: '',
paramRow: '', // 参数row
disable: true, // 其他的禁用
tabName: '标准件'
tabName: '标准件',
total22: 0,
pageCurrent22: 1,
pageSize22: 20
}
},
computed: {
@@ -1225,7 +859,7 @@ export default {
},
created() {
this.getPerson()
this.fetchData()
this.projectChange()
// this.searchTable2()
this.searchTable11()
this.initDirection()
@@ -1234,7 +868,6 @@ export default {
initDirection() {
const direction = this.$getDirection()
direction.on('keyup', function(e, val) {
console.log(val)
if (e.keyCode === 39) {
direction.next()
}
@@ -1919,21 +1552,15 @@ export default {
return Number(row.采购状态编号) < 3 && Number(row.是否确认) === 1 // 未采购&&确认物料修改
},
searchTable11() { // 查询外购件列表
let check1, check2, check3, check4, check5, check6, check7
let check1, check5, check7
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
this.projectValue ? check4 = 1 : check4 = 0
this.machineValue ? check5 = 1 : check5 = 0
this.groupValue ? check6 = 1 : check6 = 0
this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '')
console.log(this.tabName)
if (this.tabName === '外购件') { this.partType = 2 }
if (this.tabName === '标准件') { this.partType = 1 }
console.log(this.partType)
searchMaterial1(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check4, this.projectValue, check5, this.machineValue, check6, this.groupValue, this.partType, check7, this.startTime[0], this.startTime[1]).then(response => {
searchMaterial1(this.pageCurrent11, this.pageSize11, check1, this.materialName, this.id, check5, this.machineValue, check7, this.startTime[0], this.startTime[1]).then(response => {
console.log(response.data, 111222)
this.tableData00 = response.data.rows
console.log(this.tableData00, 111222)
this.total11 = response.data.total
const remark = []
const supplier = []
@@ -1962,7 +1589,8 @@ export default {
this.pageCurrent11 = val
this.searchTable11()
},
searchTable12() { // 查询基本件列表
// 查询基本件列表
searchTable12() {
let check1, check2, check3, check4, check5, check6, check7
this.partNum ? check1 = 1 : check1 = 0
this.partName ? check2 = 1 : check2 = 0
@@ -1999,30 +1627,32 @@ export default {
this.searchTable12()
},
searchTable22() {
let check1, check2, check3, check7
let check1
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
this.startTime ? check7 = 1 : (check7 = 0, this.startTime = '')
searchMaterial22(this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id, check7, this.startTime[0], this.startTime[1]).then(response => {
this.tableData22 = response.data
const remark = []
searchMaterial22(check1, this.materialName, this.pageCurrent22, this.pageSize22).then(response => {
console.log(response.data, 3333)
this.tableData22 = response.data.rows
this.total22 = response.data.total
const supplier = []
this.remarkFilters = []
this.supplierFilters = []
response.data.map(v => {
if (v.备注 === null) { v.备注 = '' }
response.data.rows.map(v => {
if (v.供货商 === null) { v.供货商 = '' }
if (!remark.includes(v.备注)) {
remark.push(v.备注)
this.remarkFilters.push({ text: v.备注, value: v.备注 })
}
if (!supplier.includes(v.供货商)) {
supplier.push(v.供货商)
this.supplierFilters.push({ text: v.供货商, value: v.供货商 })
}
})
})
},
handleSizeChange22(val) { // 标准件和外购件列表分页
this.pageSize11 = val
this.pageCurrent11 = 1
this.searchTable22()
},
handleCurrentChange22(val) { // 标准件和外购件列表分页
this.pageCurrent11 = val
this.searchTable22()
}
}
}