This commit is contained in:
liushuai
2019-10-29 15:54:18 +08:00
parent 68e2b8e750
commit ad31970800
17 changed files with 1626 additions and 784 deletions

View File

@@ -2,88 +2,83 @@
<div class="app-container">
<el-card>
<div slot="header">
<span>机床编号:</span>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable @change="machineChange">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>组号:</span>
<el-select v-model="groupNumberValue" placeholder="组号" size="small" clearable>
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>名称:</span>
<el-input v-model="Name" placeholder="名称" clearable size="small"/>
<span>领料情况:</span>
<el-select v-model="PickingValue" placeholder="领料情况" size="small" clearable>
<el-option
v-for="item in Picking"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent0=1;pageSize0=20;pageCurrent1=1;pageSize1=20;pageCurrent2=1;pageSize2=20;searchTable()">查询</el-button>
<el-row>
<el-select v-model="machineNumberValue" filterable placeholder="机床编号" size="small" clearable style="width: 120px" @change="machineChange">
<el-option
v-for="item in machineNumber"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-select v-model="groupNumberValue" placeholder="组号" size="small" style="width: 120px" clearable>
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="PickingValue" placeholder="领料情况" size="small" style="width: 120px" clearable>
<el-option
v-for="item in Picking"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="Name" placeholder="名称" clearable style="width: 120px" size="small"/>
<el-input v-model="materialSpec" placeholder="物料规格" style="width: 120px" clearable size="small"/>
<el-input v-model="materialModel" placeholder="物料型号" style="width: 120px" clearable size="small"/>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="pageCurrent0=1;pageSize0=20;pageCurrent1=1;pageSize1=20;pageCurrent2=1;pageSize2=20;pageCurrent4=1;pageSize4=20;searchTable()">查询</el-button>
</el-row>
</div>
<el-tabs v-model="PartType" type="card" @tab-click="searchTable()">
<el-tab-pane label="标准件" name="标准件">
<el-table ref="multipleTable" :data="tableData0" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column align="center" sortable prop="机床图号" label="机床图号" min-width="100px">
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column align="center" sortable prop="机床图号" label="机床图号" width="130px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="组号" label="组号" min-width="80px">
<el-table-column align="center" sortable prop="组号" label="组号" width="80px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="物料名称" label="名称" min-width="100px">
<el-table-column align="center" sortable prop="物料名称" label="名称" width="100px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>date
</el-table-column>
<el-table-column align="center" sortable prop="型号" label="型号" min-width="100px">
<el-table-column align="center" sortable prop="型号" label="型号" width="120px">
<template slot-scope="scope">
{{ scope.row.物料型号 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="规格排序" label="规格" min-width="200px">
<el-table-column align="center" sortable prop="规格排序" label="规格" width="150px">
<template slot-scope="scope">
{{ scope.row.物料规格 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="单台机床数量" min-width="100px">
<template slot-scope="scope">
{{ scope.row.单台机床数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="总数量" min-width="100px">
<el-table-column align="center" label="数量" width="60px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="备件数" min-width="100px">
<el-table-column align="center" label="备件数" width="60px">
<template slot-scope="scope">
{{ scope.row.备件总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="领料单编号" min-width="100px">
<el-table-column align="center" label="领料单编号" width="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;">
<div class="block">
<el-pagination
:current-page="pageCurrent0"
:page-sizes="[10, 20, 30, 40]"
@@ -97,49 +92,49 @@
</el-tab-pane>
<el-tab-pane label="外购件" name="外购件">
<el-table ref="multipleTable" :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column align="center" sortable prop="机床图号" label="机床图号" min-width="100px">
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column align="center" sortable prop="机床图号" label="机床图号" width="130px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="组号" label="组号" min-width="80px">
<el-table-column align="center" sortable prop="组号" label="组号" width="80px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="物料名称" label="名称" min-width="100px">
<el-table-column align="center" sortable prop="物料名称" label="名称" width="100px">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="型号" label="型号" min-width="100px">
<el-table-column align="center" sortable prop="型号" label="型号" width="130px">
<template slot-scope="scope">
{{ scope.row.物料型号 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="物料规格" label="规格" min-width="200px">
<el-table-column align="center" sortable prop="物料规格" label="规格" width="200px">
<template slot-scope="scope">
{{ scope.row.物料规格 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="总数量" min-width="100px">
<el-table-column align="center" label="总数量" width="60px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="备件数" min-width="100px">
<el-table-column align="center" label="备件数" width="60px">
<template slot-scope="scope">
{{ scope.row.备件总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="领料单编号" min-width="100px">
<el-table-column align="center" label="领料单编号" width="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;">
<div class="block">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
@@ -153,54 +148,54 @@
</el-tab-pane>
<el-tab-pane label="基本件" name="基本件">
<el-table ref="multipleTable" :data="tableData2" size="mini" style="max-height: 600px" height="600px" border stripe @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column align="center" sortable prop="机床图号" label="机床图号" min-width="100px">
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
<el-table-column align="center" sortable prop="机床图号" label="机床图号" width="130px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="组号" label="组号" min-width="80px">
<el-table-column align="center" sortable prop="组号" label="组号" width="80px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="零件名称" label="名称" min-width="100px">
<el-table-column align="center" sortable prop="零件名称" label="名称" width="100px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="图号" sortable prop="零件图号" min-width="100px">
<el-table-column align="center" label="图号" sortable prop="零件图号" width="130px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" sortable prop="规格" label="规格" min-width="100px">
<el-table-column align="center" sortable prop="规格" label="规格" width="80px">
<template slot-scope="scope">
{{ scope.row.规格 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="材料" min-width="100px">
<el-table-column align="center" label="材料" width="80px">
<template slot-scope="scope">
{{ scope.row.材料 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="总数量" min-width="100px">
<el-table-column align="center" label="总数量" width="60px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="备件数" min-width="100px">
<el-table-column align="center" label="备件数" width="60px">
<template slot-scope="scope">
{{ scope.row.备件总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="领料单编号" min-width="100px">
<el-table-column align="center" label="领料单编号" width="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;">
<div class="block">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
@@ -212,154 +207,187 @@
@current-change="handleCurrentChange2"/>
</div>
</el-tab-pane>
<el-tab-pane label="离线采购件" name="离线采购件">
<el-table v-loading="listLoading" :data="tableDataBasic" highlight-current-row size="mini" border stripe style="width: 100%;" height="600px" @selection-change="handleSelectionChange1">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="物料名称" prop="物料名称" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" prop="物料型号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" prop="物料规格" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="库存量" align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.货位存量 }}
</template>
</el-table-column>
<el-table-column label="领用数量" align="center" width="130px" show-overflow-tooltip>
<template slot-scope="scope">
<el-input-number v-model="scope.row.领用数量" :min="0" :precision="2" size="mini" style="margin: 0;width: 100%"/>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent4"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize4"
:total="total4"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange5"
@current-change="handleCurrentChange5"/>
</div>
</el-tab-pane>
</el-tabs>
</el-card>
<el-card>
<div slot="header">
<span style="margin: 5px">领料单编号:</span>
<el-input v-model="pickingListNumber" clearable size="small" style="width:200px" />
<el-input v-model="pickingListNumber" clearable size="small" placeholder="领料单编号" style="width:120px;margin-left: 10px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchList()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="createList()">创建</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="createList()">创建领料单</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top">
<el-button size="small" type="warning" icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入物料</el-button>
</el-tooltip>
<el-button :disabled="Number(审批情况)===1" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropList()">删除领料单</el-button>
<span style="font-weight: bold">选中领料单{{ pickingListNumberShow }}</span>
<span style="font-weight: bold">领料人{{ peopleName }}</span>
</div>
<span style="margin:0;width: 100px;font-size: 20px">领料单</span>
<el-tooltip :open-delay="1200" effect="dark" content="为所选领料单增加物料明细" placement="top">
<el-button size="small" type="primary" icon="el-icon-bottom" style="margin: 0 0 5px 10px" @click="selectInto()">选入</el-button>
</el-tooltip>
<el-table :data="pickListTable1" highlight-current-row border style="width: 100%;" size="mini" height="300" @row-click="clickList">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column sortable prop="领料单编号" label="领料单编号" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" min-width="200" >
<template slot-scope="scope">
{{ scope.row.操作日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="领料人" sortable prop="领料人" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="领料单备注" sortable prop="领料单备注" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.领料单备注 }}
</template>
</el-table-column>
<el-table-column label="审批" sortable prop="审批" align="center" min-width="90">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否审批)===1" type="success">已审批</el-tag>
<el-tag v-else type="warning">未审批</el-tag>
</template>
</el-table-column>
<!--<el-table-column label="领回确认" align="center" min-width="80">-->
<!--<template slot-scope="scope">-->
<!--<el-tag v-if="Number(scope.row.是否启用)===1" type="warning">未确认</el-tag>-->
<!--<el-tag v-else type="success">已确认</el-tag>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="操作" align="center" width="230px">
<template slot-scope="scope" align="center">
<!--<el-button v-if="Number(token)===21 || Number(token)===36" :disabled="Number(scope.row.是否审批)===0 || Number(scope.row.是否启用)===0" size="mini" type="primary" @click="checkList(scope.row)">确认领回</el-button>-->
<el-button :disabled="Number(scope.row.是否启用)===0" size="mini" plain type="danger" icon="el-icon-delete" @click="dropList(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;margin: 10px 0;">
<el-pagination
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize3"
:total="total3"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
<div style="width: 30%;float: left">
<el-table :data="pickListTable1" :row-class-name="tableRowClassName" highlight-current-row border size="mini" height="300" @row-click="clickList">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column prop="领料单编号" label="领料单编号" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.领料单编号 }}
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" width="100px" >
<template slot-scope="scope">
{{ scope.row.操作日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="领料人" prop="领料人" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="备注" prop="备注" align="center" width="130px">
<template slot-scope="scope">
{{ scope.row.领料单备注 }}
</template>
</el-table-column>
<el-table-column label="审批" prop="审批" align="center" width="90">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否审批)===1" type="success">已审批</el-tag>
<el-tag v-else type="warning">未审批</el-tag>
</template>
</el-table-column>
</el-table>
<div class="block" style="float:right;margin: 10px 0;">
<el-pagination
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize3"
:total="total3"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
</div>
<div style="width: 69%;float: left">
<el-table :data="pickListTable2" border style="width: 100%;" size="mini" height="300">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" sortable prop="名称" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" sortable prop="图号或型号" min-width="100">
<template slot-scope="scope">
{{ scope.row.图号或型号 || '—' }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" sortable prop="规格" min-width="100">
<template slot-scope="scope">
{{ scope.row.规格 || '—' }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" sortable prop="机床图号" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" sortable prop="组号" 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" 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.出库数量1 }}
</template>
</el-table-column>
<el-table-column v-if="true" label="备料确认" align="center" sortable prop="是否备料确认" width="100">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否备料确认)===1" type="success" size="mini">已备料</el-tag>
<el-tag v-else type="warning" size="mini">未备料</el-tag>
</template>
</el-table-column>
<el-table-column v-if="true" label="领料确认" align="center" sortable prop="是否领料确认" width="100">
<template slot-scope="scope">
<el-tag v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领料</el-tag>
<el-tag v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">未领完</el-tag>
<el-tag v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领料</el-tag>
</template>
</el-table-column>
<el-table-column v-if="true" label="操作" align="center" width="230">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" highlight-current-row size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="100" align="center" label="姓名">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column min-width="150" align="center" label="领料时间">
<template slot-scope="scope">
{{ scope.row.操作日期 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="数量" prop="出库数量">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="primary" size="mini" icon="el-icon-search" plain @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button :disabled="!!scope.row.是否出库 || Number(scope.row.是否领料确认)===1" size="mini" plain type="danger" icon="el-icon-delete" style="margin-left: 10px" @click="dropListDetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<h4>领料单明细{{ pickingListNumberShow }}</h4>
<el-table :data="pickListTable2" border style="width: 100%;" size="mini" height="300">
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" align="center" sortable prop="名称" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" sortable prop="图号或型号" min-width="100">
<template slot-scope="scope">
{{ scope.row.图号或型号 || '—' }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" sortable prop="规格" min-width="100">
<template slot-scope="scope">
{{ scope.row.规格 || '—' }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" sortable prop="机床图号" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" sortable prop="组号" 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" 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.出库数量1 }}
</template>
</el-table-column>
<el-table-column v-if="true" label="备料确认" align="center" sortable prop="是否备料确认" width="100">
<template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否备料确认)===1" type="success" size="mini">已备料</el-tag>
<el-tag v-else type="warning" size="mini">未备料</el-tag>
</template>
</el-table-column>
<el-table-column v-if="true" label="领料确认" align="center" sortable prop="是否领料确认" width="100">
<template slot-scope="scope">
<el-tag v-if="(Number(scope.row.总数量) <= Number(scope.row.出库数量1)) || Number(scope.row.是否领料确认) === 1" type="success" size="mini">已领料</el-tag>
<el-tag v-else-if="Number(scope.row.总数量) > Number(scope.row.出库数量1) && Number(scope.row.出库数量1) > 0" type="primary" size="mini">未领完</el-tag>
<el-tag v-else-if="Number(scope.row.出库数量1) === 0" type="warning" size="mini">未领料</el-tag>
</template>
</el-table-column>
<el-table-column v-if="true" label="操作" align="center" width="230">
<template slot-scope="scope">
<el-popover placement="right" width="500" trigger="click">
<el-table :data="gridData" highlight-current-row size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="100" align="center" label="姓名">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column min-width="150" align="center" label="领料时间">
<template slot-scope="scope">
{{ scope.row.操作日期 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="数量" prop="出库数量">
<template slot-scope="scope">
{{ scope.row.出库数量 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="primary" size="mini" icon="el-icon-search" plain @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button :disabled="!!scope.row.是否出库 || Number(scope.row.是否领料确认)===1" size="mini" plain type="danger" icon="el-icon-delete" style="margin-left: 10px" @click="dropListDetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="创建领料单" center width="380px">
@@ -386,16 +414,20 @@
</template>
<script>
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail, searchListDetailMX } from '@/api/Inventory/CreatePickingList'
import { initPickPerson, initMachineProject, searchgroup, searchTable, searchList, createList, dropList, selectIntoList, searchListDetail, dropListDetail, searchListDetailMX, searchPart, IntoMateerial } from '@/api/Inventory/CreatePickingList'
import request from '@/utils/request'
import { mapGetters } from 'vuex'
export default {
name: 'CreatePickingList',
data() {
return {
审批情况: '',
peopleName: '',
PartType: '基本件',
machineNumberValue: '',
machineNumber: [],
MachineNumber: '',
tableDataBasic: [],
PickingValue: '',
Picking: [{
value: 0,
@@ -424,8 +456,14 @@ export default {
pageCurrent3: 1,
pageSize3: 20,
total3: 0,
pageCurrent4: 1,
pageSize4: 20,
total4: 0,
pickListTable2: [],
dialogFormVisible1: false,
listLoading: false,
materialSpec: '', // 物料规格
materialModel: '', // 物料型号
form1: {
领料人流水号: '',
领料单备注: ''
@@ -437,7 +475,8 @@ export default {
pickingListNumber: '', // 领料单编号
pickingListNumberShow: '', // 领料单编号
pickingListNum: '', // 领料单流水号
multipleSelection: []
multipleSelection: [],
multipleSelection1: []
}
},
computed: {
@@ -516,24 +555,40 @@ export default {
}
})
},
tableRowClassName({ row }) {
if (row.是否审批 === 1) {
return 'shenpi-row'
} else {
return ''
}
},
selectable(row, index) { // 控制某行是否可选
console.log(row)
return row.领料单编号 === null // 未采购&&确认物料修改
},
// 查三表
searchTable() {
this.multipleSelection = []
this.multipleSelection1 = []
if (this.PartType === '标准件') {
this.searchTable0()
} else if (this.PartType === '外购件') {
this.searchTable1()
} else if (this.PartType === '基本件') {
this.searchTable2()
} else if (this.PartType === '离线采购件') {
this.searchTable4()
}
},
// 标准件
searchTable0() {
let check1, check2, check3
let check1, check2, check3, check4, check5
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
this.Name ? check3 = 1 : check3 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, this.pageCurrent0, this.pageSize0, 1).then(response => {
this.materialModel ? check4 = 1 : check4 = 0
this.materialSpec ? check5 = 1 : check5 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, check4, this.materialModel, check5, this.materialSpec, this.pageCurrent0, this.pageSize0, 1).then(response => {
console.log(response.data.rows)
this.tableData0 = response.data.rows
this.total0 = response.data.total
@@ -541,28 +596,46 @@ export default {
},
// 外购件
searchTable1() {
let check1, check2, check3
let check1, check2, check3, check4, check5
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
this.Name ? check3 = 1 : check3 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, this.pageCurrent1, this.pageSize1, 2).then(response => {
this.materialModel ? check4 = 1 : check4 = 0
this.materialSpec ? check5 = 1 : check5 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, check4, this.materialModel, check5, this.materialSpec, this.pageCurrent1, this.pageSize1, 2).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
// 基本件
searchTable2() {
let check1, check2, check3
let check1, check2, check3, check4, check5
this.machineNumberValue ? check1 = 1 : check1 = 0
this.groupNumberValue ? check2 = 1 : check2 = 0
this.Name ? check3 = 1 : check3 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, this.pageCurrent2, this.pageSize2, 3).then(response => {
this.materialModel ? check4 = 1 : check4 = 0
this.materialSpec ? check5 = 1 : check5 = 0
searchTable(check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.Name, check4, this.materialModel, check5, this.materialSpec, this.pageCurrent2, this.pageSize2, 3).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
// 离线采购件
searchTable4() {
this.listLoading = true
this.tableDataBasic = []
let check1, check2, check3
this.Name ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchPart(check1, this.Name, check2, this.materialSpec, check3, this.materialModel, this.pageCurrent4, this.pageSize4).then(response => {
this.tableDataBasic = response.data.rows
this.total4 = response.data.total
this.listLoading = false
})
},
searchTable02(row) {
searchListDetailMX(row.领料单流水号, row.基本件流水号, row.标准件和外购件流水号).then(response => {
searchListDetailMX(row.领料单流水号, row.基本件流水号, row.标准件和外购件流水号, row.离线采购件流水号).then(response => {
this.gridData = response.data
})
},
@@ -593,6 +666,15 @@ export default {
this.pageCurrent2 = val
this.searchTable2()
},
handleSizeChange5(val) {
this.pageSize4 = val
this.pageCurrent4 = 1
this.searchTable4()
},
handleCurrentChange5(val) {
this.pageCurrent4 = val
this.searchTable4()
},
// 查询领料单列表
searchList() {
let check, isElectrical
@@ -612,6 +694,15 @@ export default {
this.pageCurrent3 = val
this.searchList()
},
handleSizeChange4(val) {
this.pageSize3 = val
this.pageCurrent3 = 1
this.searchList()
},
handleCurrentChange4(val) {
this.pageCurrent3 = val
this.searchList()
},
// 创建领料单
createList() {
if (this.$refs['form1'] !== undefined) {
@@ -665,13 +756,13 @@ export default {
})
},
// 删除领料单
dropList(row) {
dropList() {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
dropList(row.领料单流水号).then(response => {
dropList(this.pickingListNum).then(response => {
if (Number(response.data[0].result) === 1) {
this.$message.success('删除成功')
this.searchList()
@@ -690,44 +781,81 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val
},
// 多选
handleSelectionChange1(val) {
this.multipleSelection1 = val
console.log(val, 111)
},
// 选入
selectInto() {
const basePartGroup = []
const purchasePartGroup = []
this.multipleSelection.map(v => {
v.基本件流水号 ? basePartGroup.push(v.基本件流水号) : purchasePartGroup.push(v.标准件和外购件流水号)
})
if (basePartGroup.length === 0 && purchasePartGroup.length === 0) {
this.$message.warning('请勾选零件')
return
}
if (!this.pickingListNum || !this.pickingListNumberShow) {
this.$message.warning('请选择领料单')
return
}
if (basePartGroup.length) { // 基本件
selectIntoList(basePartGroup, null, this.pickingListNum).then(response => {
if (this.PartType === '离线采购件') {
const materialGroup = []
const groupPartGroup = []
const numGroup = []
this.multipleSelection1.map(v => {
materialGroup.push(v.物料流水号)
groupPartGroup.push(v.组件零件基本件流水号)
numGroup.push(v.领用数量)
})
if (materialGroup.length === 0) {
this.$message.warning('请勾选零件')
return
}
if (!this.pickingListNum || !this.pickingListNumberShow) {
this.$message.warning('请选择领料单')
return
}
if (!this.machineNumberValue) {
this.$message.warning('请选择机床')
return
}
IntoMateerial(materialGroup, groupPartGroup, numGroup, this.pickingListNum, this.machineNumberValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable()
this.clickList()
} else { this.$message.error('操作失败') }
})
} else { // 标准件外购件
selectIntoList(null, purchasePartGroup, this.pickingListNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable()
this.clickList()
} else { this.$message.error('操作失败') }
} else {
const basePartGroup = []
const purchasePartGroup = []
this.multipleSelection.map(v => {
v.基本件流水号 ? basePartGroup.push(v.基本件流水号) : purchasePartGroup.push(v.标准件和外购件流水号)
})
if (basePartGroup.length === 0 && purchasePartGroup.length === 0) {
this.$message.warning('请勾选零件')
return
}
if (!this.pickingListNum || !this.pickingListNumberShow) {
this.$message.warning('请选择领料单')
return
}
if (basePartGroup.length) { // 基本件
selectIntoList(basePartGroup, null, this.pickingListNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable()
this.clickList()
} else { this.$message.error('操作失败') }
})
} else { // 标准件外购件
selectIntoList(null, purchasePartGroup, this.pickingListNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable()
this.clickList()
} else { this.$message.error('操作失败') }
})
}
}
},
// 查看领料单明细
clickList(row) {
console.log(row)
row ? this.审批情况 = row.是否审批 : this.审批情况
row ? this.pickingListNum = row.领料单流水号 : this.pickingListNum
row ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
row ? this.peopleName = row.姓名 : this.peopleName
searchListDetail(this.pickingListNum).then(res => {
this.pickListTable2 = res.data
})
@@ -743,6 +871,7 @@ export default {
dropListDetail(row.领料单明细流水号).then(response => {
if (Number(response.data[0].result) === 1) {
this.$message.success('删除成功')
this.searchTable()
this.clickList()
} else {
this.$message.error('已领取,不可删除')
@@ -775,4 +904,8 @@ export default {
.el-tag{
margin: 0
}
.el-table .shenpi-row {
background: #55a532 !important;
}
</style>

View File

@@ -60,7 +60,7 @@
</el-col>
</el-row>
<el-table :data="pickListTable2" highlight-current-row stripe border style="width: 100%;" size="mini" height="400" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column :selectable="selectable" type="selection" align="center" width="55"/>
<el-table-column label="序号" align="center" type="index" width="50"/>
<el-table-column label="名称" sortable prop="名称" align="center" min-width="100">
<template slot-scope="scope">
@@ -99,7 +99,7 @@
</el-table-column>
<el-table-column label="货位存量" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.请购单明细流水号 ? scope.row.货位存量 : scope.row.货位存量1 }}
{{ scope.row.货位存量1 }}
</template>
</el-table-column>
<el-table-column label="已领数量" align="center" min-width="50">
@@ -392,6 +392,7 @@ export default {
inventoryNum: '', // 中间变量仓库流水号
locationNum: '', // 中间变量货位流水号
outNumber: [], // 中间变量出库数量
offlineNum: [],
inventoryName: [],
locateName: [],
物料流水号: '',
@@ -523,6 +524,10 @@ export default {
inputPassword() {
this.dialogFormVisible3 = true
},
selectable(row, index) { // 控制某行是否可选
console.log(row)
return ((Number(row.总数量) <= Number(row.出库数量1))) === false
},
// 提交领料确认
pickConfirm() {
this.$confirm('是否领料确认?', '提示', {
@@ -631,8 +636,16 @@ export default {
row && row.领料单编号 ? this.pickingListNumberShow = row.领料单编号 : this.pickingListNumberShow
row && row.姓名 ? this.form3.personName = row.姓名 : this.form3.personName
searchListDetail(this.pickingListNum).then(res => {
console.log(res.data)
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].离线采购件流水号 !== 0) {
res.data[i].货位存量1 = res.data[i].货位存量
}
if (res.data[i].请购单明细流水号 !== 0 && res.data[i].请购单明细流水号 !== '' && res.data[i].请购单明细流水号 !== null) {
res.data[i].货位存量1 = res.data[i].货位存量
}
}
this.pickListTable2 = res.data
console.log(this.pickListTable2, 111)
})
},
// 多选
@@ -650,13 +663,22 @@ export default {
this.purchaseBillNum.push(this.SELECTION[i].请购单明细流水号)
this.groupNumValue.push(this.SELECTION[i].组件流水号)
this.machineValue.push(this.SELECTION[i].机床流水号)
this.offlineNum.push(this.SELECTION[i].离线采购件流水号)
this.outNumber.push(this.SELECTION[i].出库数量)
}
submitOutStore(this.multipleSelection, this.basePartNum, this.materialNum, this.parchasePartNum, this.purchaseBillNum, this.groupNumValue, this.machineValue, this.outNumber, this.id, this.form3.password, this.form3.outTypeValue, this.pickingListNum).then(response => {
submitOutStore(this.multipleSelection, this.basePartNum, this.materialNum, this.parchasePartNum, this.purchaseBillNum, this.groupNumValue, this.machineValue, this.outNumber, this.id, this.form3.password, this.form3.outTypeValue, this.pickingListNum, this.offlineNum).then(response => {
if (response.data[0].result === '1') {
this.$message.success('出库成功')
this.dialogFormVisible3 = false
searchListDetail(this.pickingListNum).then(res => {
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].离线采购件流水号 !== 0) {
res.data[i].货位存量1 = res.data[i].货位存量
}
if (res.data[i].请购单明细流水号 !== 0 && res.data[i].请购单明细流水号 !== '' && res.data[i].请购单明细流水号 !== null) {
res.data[i].货位存量1 = res.data[i].货位存量
}
}
this.pickListTable2 = res.data
})
} else { this.$message.error('操作失败') }

View File

@@ -238,7 +238,8 @@ export default {
materialName: '', // 物料名称
materialSpec: '', // 物料规格
materialModel: '', // 物料型号
离线合同明细流水号: ''
离线合同明细流水号: '',
组件零件基本件流水号: ''
}
},
computed: {
@@ -350,6 +351,7 @@ export default {
this.materialNumber = row.物料流水号
this.partnumber = row.货位存量
this.离线合同明细流水号 = row.离线合同明细流水号
this.组件零件基本件流水号 = row.组件零件基本件流水号
},
// 重置表单
callOff() {
@@ -375,7 +377,7 @@ export default {
} else {
this.$refs['form'].validate((valid) => {
if (valid) {
outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber, this.离线合同明细流水号).then(response => {
outlinePartOut(this.form.PeopleValue, this.form.DirectNumber, this.locateNumber, this.form.DirectNote, this.form.ProjectValue, this.form.MachineValue, this.form.GroupNumValue, this.materialNumber, this.PeopleNumber, this.离线合同明细流水号, this.组件零件基本件流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('零件出库成功')
this.dialogFormVisible = false

View File

@@ -20,8 +20,7 @@
<el-button type="success" size="small" style="margin-left: 10px" @click="searchContractDetail">查询明细</el-button>
</el-card>
<el-card>
<el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
<el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px">
<el-table-column label="合同编号" sortable prop="离线合同编号" width="120px" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
@@ -237,6 +236,7 @@ export default {
},
// 查询离线合同明细
async searchContractDetail() {
this.table1 = []
if (this.contractValue && this.searchType === '2') {
this.qrCode = this.contractValue
} else if (!this.supplierValue) {
@@ -265,11 +265,15 @@ export default {
this.contractNumber = ''
}
// this.table1 = res.data
console.log(res.data)
res.data.map(v => {
this.table1.push({
离线合同编号: v.离线合同编号,
物料名称: v.物料名称,
规格型: v.物料规格 + v.物料型,
离线合同明细流水号: v.离线合同明细流水号,
物料流水: v.物料流水,
组件零件基本件流水号: v.组件零件基本件流水号,
物料名称: v.物料名称 ? v.物料名称 : v.零件名称,
规格型号: v.物料规格 + (v.零件图号 === null ? v.物料型号 : v.零件图号),
数量: v.数量,
到货数量: v.到货数量,
本次到货数量: v.本次到货数量
@@ -280,21 +284,24 @@ export default {
// 多选
handleSelectionChange(val) {
this.multipleSelection = val
console.log(val, 123)
},
// 提交入库
submitInStorage() {
if (this.multipleSelection.length === 0) {
this.$message.warning('请勾选入库物料')
} else if (!this.locateNumber) {
if (!this.locateNumber) {
this.$message.warning('请选择货位或者扫码货位二维码')
} else {
const materialGroup = []
const BasicGroup = []
const numberGroup = []
const partGroup = []
for (let i = 0; i < this.multipleSelection.length; i++) {
materialGroup.push(this.multipleSelection[i].物料流水号)
numberGroup.push(this.multipleSelection[i].本次到货数量)
partGroup.push(this.multipleSelection[i].离线合同明细流水号)
for (let i = 0; i < this.table1.length; i++) {
if (this.table1[i].本次到货数量 !== 0) {
materialGroup.push(this.table1[i].物料流水号)
BasicGroup.push(this.table1[i].组件零件基本件流水号)
numberGroup.push(this.table1[i].本次到货数量)
partGroup.push(this.table1[i].离线合同明细流水号)
}
}
this.$confirm('确认入库?', '提示', {
confirmButtonText: '确定入库',
@@ -308,7 +315,7 @@ export default {
data: {
type: '2',
name: '采购管理_离线采购件入库_增加数据',
param: `物料流水号组=${materialGroup}&离线合同明细流水号组=${partGroup}&数量组=${numberGroup}&货位流水号=${this.locateNumber}&入库人员流水号=${this.inventoryPeople}`
param: `物料流水号组=${materialGroup}&组件零件基本件流水号组=${BasicGroup}&离线合同明细流水号组=${partGroup}&数量组=${numberGroup}&货位流水号=${this.locateNumber}&入库人员流水号=${this.inventoryPeople}`
}
}
const res = await axios(param)

View File

@@ -30,11 +30,11 @@
<el-card>
<el-table ref="multipleTable" :data="table1" border stripe size="mini" highlight-current-row style="width: 100%;margin-bottom: 5px" @selection-change="handleSelectionChange">
<el-table-column :selectable="selectable" type="selection" align="center" width="50px"/>
<el-table-column label="合同编号" sortable prop="合同编号" width="120px" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.合同编号 }}
</template>
</el-table-column>
<!--<el-table-column label="合同编号" sortable prop="合同编号" width="120px" align="center" show-overflow-tooltip>-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.合同编号 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="名称" sortable prop="物料名称" width="150px" align="center" show-overflow-tooltip >
<template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
@@ -308,7 +308,7 @@ export default {
method: 'post',
data: {
type: '1',
name: '库存管理_外购件入库_采购部查询',
name: '库存管理_外购件入库_采购部查询_新',
param: `供应商流水号=${this.supplierValue}&采购合同流水号_check=${this.contractValue_check}&采购合同流水号=${this.contractValue}`
}
}
@@ -317,17 +317,17 @@ export default {
this.$set(v, '本次到货数量', v.数量 - v.到货数量)
return v
})
// this.table1 = res.data
res.data.map(v => {
this.table1.push({
合同编号: v.合同编号,
物料名称: v.物料名称,
规格型号: v.物料规格 + v.物料型号,
数量: v.数量,
到货数量: v.到货数量,
本次到货数量: v.本次到货数量
})
})
this.table1 = res.data
// res.data.map(v => {
// this.table1.push({
// 合同编号: v.合同编号,
// 物料名称: v.物料名称,
// 规格型号: v.物料规格 + v.物料型号,
// 数量: v.数量,
// 到货数量: v.到货数量,
// 本次到货数量: v.本次到货数量
// })
// })
} else if (this.TypeValue === 3) {
if (this.contractValue) { this.contractValue_check = 1 } else { this.contractValue_check = 0 }
const param = {
@@ -395,7 +395,6 @@ export default {
const materialGroup = []
const numberGroup = []
const partGroup = []
const 组件零件流水号 = []
const 组件零件基本件流水号 = []
this.$confirm('确认入库?', '提示', {
confirmButtonText: '确定入库',
@@ -407,8 +406,6 @@ export default {
for (let i = 0; i < this.multipleSelection.length; i++) {
materialGroup.push(this.multipleSelection[i].物料流水号)
numberGroup.push(this.multipleSelection[i].本次到货数量)
partGroup.push(this.multipleSelection[i].采购合同明细流水号)
组件零件流水号.push(this.multipleSelection[i].组件零件流水号)
组件零件基本件流水号.push(this.multipleSelection[i].组件零件基本件流水号)
}
const param = {
@@ -416,8 +413,8 @@ export default {
method: 'post',
data: {
type: '2',
name: '采购件入库_外购件入库_循环执行',
param: `物料流水号组=${materialGroup}&实际到货数量组=${numberGroup}&货位流水号=${this.locateNumber}&采购合同明细流水号=${partGroup}&入库人员流水号=${this.inventoryPeople}&组件零件流水号=${组件零件流水号}&组件零件基本件流水号组=${组件零件基本件流水号}`
name: '采购件入库_外购件入库_循环执行_新',
param: `物料流水号组=${materialGroup}&实际到货数量组=${numberGroup}&货位流水号=${this.locateNumber}&入库人员流水号=${this.inventoryPeople}&供应商流水号=${this.supplierValue}&采购合同流水号=${this.contractValue}&组件零件基本件流水号组=${组件零件基本件流水号}`
}
}
const res = await axios(param)