This commit is contained in:
Vergil
2020-02-14 15:18:43 +08:00
parent e8eeade817
commit 1895977eb2
25 changed files with 1304 additions and 738 deletions

View File

@@ -1,232 +1,294 @@
<template>
<div class="app-container">
<el-card style="margin-left: 0px;width: 37%;float: left">
<el-col>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0" @keyup.enter.native="searchTable1"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top">
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top">
<el-button type="danger" size="small" icon="el-icon-download" plain style="margin-left: 10px;float: right;" @click="back">打回重新分配</el-button>
</el-tooltip>
<el-table v-loading="loading1" :data="tableData1" border stripe highlight-current-row style="width: 100%;margin-top:3px;" height="690" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="45"/>
<el-table-column label="机床图号" prop="机床图号" width="95" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" width="55" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" prop="零件图号" min-width="120" width="155" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" prop="零件名称" width="110" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" width="45" align="center">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" width="85" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
</el-table>
<div v-show="false" class="block">
<el-pagination
:current-page="pageCurrent1"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, prev, pager, next"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
<div>
<div style="width: 100%;overflow:auto">
<div style="white-space: nowrap">
<el-card style="margin-left: 0px;width:820px; display: inline-block;">
<el-col>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0;width: 180px" @keyup.enter.native="searchTable1"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top">
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top">
<el-button type="danger" size="small" icon="el-icon-download" plain style="margin-left: 10px;float: right;" @click="back">打回重新分配</el-button>
</el-tooltip>
<el-table v-loading="loading1" :data="tableData1" :header-cell-style="{fontFamily:'YouYuan',fontSize:'14px',fontWeight:200}" border stripe highlight-current-row style="width:795px ;margin-top:3px;" height="690" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="45"/>
<el-table-column label="机床图号" prop="机床图号" width="120" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" width="70" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" prop="零件图号" min-width="120" width="180" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" prop="零件名称" width="140" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" width="70" align="center">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" width="150" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
</el-table>
<div v-show="false" class="block">
<el-pagination
:current-page="pageCurrent1"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, prev, pager, next"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-col>
</el-card>
<el-card style="margin-left: 1px;width:1120px; display: inline-block;">
<div> <!--slot="header"-->
<!--<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0;width: 155px" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()"/>-->
<el-select v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" filterable clearable @change="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">
<el-option
v-for="item in supplierName0s"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 240px;margin: 3px 10px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<!--<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>-->
<!--<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">-->
<!--<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-tooltip>-->
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable2">查询</el-button>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">新增</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button type="primary" plain size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">
<el-button type="success" size="small" icon="el-icon-tickets" plain style="margin-top: 3px;margin-left: 90px" @click="saveMateriel">保存</el-button>
</el-tooltip>
</div>
<el-table
v-loading=""
:data="tableData2"
:header-cell-style="{fontFamily:'YouYuan',fontSize:'14px',fontWeight:200}"
border
stripe
style="max-height: 460px;width: 930px"
height="230px"
size="mini"
highlight-current-row
@row-click="searchTable3">
<el-table-column label="进程" prop="采购计划状态" align="center" width="60" fixed="left">
<template slot-scope="scope">
<span v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">编辑中</span>
<span v-if="Number(scope.row.采购计划状态)===1" type="primary" size="mini">已保存</span>
<span v-if="Number(scope.row.采购计划状态)===3" type="success" size="mini">已到货</span>
<span v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</span>
</template>
</el-table-column>
<el-table-column label="外购备料单号" prop="采购单号" align="center" width="130">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column label="外购计划单名称" prop="采购单名称" align="center" width="160">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
</el-table-column>
<!--<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="200" show-overflow-tooltip>-->
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="190" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" prop="姓名" align="center" width="70" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="计划完成日期" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.计划完成日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="190px">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="导出" placement="top">
<div style="display: inline-block">
<el-button size="mini" style="margin-left: 10px" type="text" icon="el-icon-download" @click="exportExcel2(scope.row)">导出</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="text" content="打印" placement="top">
<div style="display: inline-block">
<el-button size="mini" type="text" style="margin-left: 10px" icon="el-icon-printer" @click="exportExcel(scope.row)">打印</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="text" style="margin-left: 10px" size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="text" style="margin-left: 10px" size="mini" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<!--<div class="block">-->
<!--<el-pagination-->
<!--:current-page="pageCurrent2"-->
<!--:page-sizes="[10, 20, 30, 40]"-->
<!--:page-size="pageSize2"-->
<!--:total="total2"-->
<!--style="display:inline-block;width:40%;float: right;margin-right: 60px"-->
<!--layout="total, sizes, prev, pager, next, jumper"-->
<!--@size-change="handleSizeChange2"-->
<!--@current-change="handleCurrentChange2"/>-->
<!--</div>-->
<div class="block">
<el-pagination
v-show="false"
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:40%;float: right;margin-right: 60px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table v-loading="" :data="tableData3" :header-cell-style="{fontFamily:'YouYuan',fontSize:'14px',fontWeight:200}" border highlight-current-row style="margin: 3px 0;width: 1100px" height="455px" width="1100px" size="mini">
<el-table-column label="进程" align="center" width="60">
<template slot-scope="scope">
<span v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</span>
<span v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</span>
<span v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</span>
</template>
</el-table-column>
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料零件编码 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="115">
<template slot-scope="scope">
<el-input-number :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.采购数量" :min="0" size="mini" style="width: 100%" @change="saveWeight(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px">
<template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="80px">
<template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.单位" size="mini" style="width:100%" @change="saveMoney(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="备注" min-width="100px">
<template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注1" size="mini" style="width:100%" @change="saveRemarks(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="90px" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="移出" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="text" size="mini" icon="el-icon-right" @click="deleteMateriel(scope.row)">移出</el-button>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</div>
<div>
<el-card style="width: 1100px;margin: 10px auto">
<div id="WGBLD" style="width: 1000px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr style="height: 60px">
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
</tr>
<tr style="height: 40px">
<th colspan="14"><h4>{{ 采购单名称 }}</h4></th>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 下单单位 }}</td>
<td colspan="2" style="text-align: center;width: 15%">单号</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 单号 }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 下单日期 }}</td>
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 计划完成日期 }}</td>
</tr>
</table>
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
<tr id="tablehead" style="height: 35px">
<td style="text-align: center;width: 7%">序号</td>
<td colspan="2" style="text-align: center;width: 20%">物料编码</td>
<td colspan="2" style="text-align: center;width: 10%">名称</td>
<td colspan="2" style="text-align: center;width: 10%">材料</td>
<td colspan="2" style="text-align: center;width: 8%">单位</td>
<td colspan="2" style="text-align: center;width: 8%">数量</td>
<td colspan="2" style="text-align: center;width: 20%">成品尺寸(长、宽、高)</td>
<td style="text-align: center;width: 17%">备注</td>
</tr>
<tr v-for="(list, index) in tableData4" :key="index" style="height: 35px">
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.物料零件编码 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.零件名称 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.总数量 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.成品尺寸 }}</td>
<td style="text-align: center;width: 17%">{{ list.备注1 }}</td>
</tr>
</table>
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
</div>
</el-col>
</el-card>
<el-card style="margin-left: 10px;width: 62.3%;float: left">
<div> <!--slot="header"-->
<!--<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0;width: 155px" clearable @keyup.enter.native="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()"/>-->
<el-select v-model="supplierName0" placeholder="供应商" size="small" filterable clearable @change="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">
<el-option
v-for="item in supplierName0s"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>日期</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 300px;margin: 3px 0"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<!--<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>-->
<!--<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">-->
<!--<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-tooltip>-->
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable2">查询</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">新增</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button type="primary" plain size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">
<el-button type="success" size="small" icon="el-icon-download" plain style="margin-left: 140px" @click="saveMateriel">保存</el-button>
</el-tooltip>
</div>
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="200px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="备料状态" prop="采购计划状态" align="center" width="75" fixed="left">
<template slot-scope="scope">
<span v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">编辑中</span>
<span v-if="Number(scope.row.采购计划状态)===1" type="primary" size="mini">已保存</span>
<span v-if="Number(scope.row.采购计划状态)===3" type="success" size="mini">已到货</span>
<span v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</span>
</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="供应商" prop="供应商名称" align="center" min-width="200" width="200" show-overflow-tooltip>-->
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" width="200" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" prop="姓名" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="计划完成日期" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.计划完成日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="330" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="导出" placement="top">
<div style="display: inline-block">
<el-button size="mini" style="margin-left: 10px" type="text" icon="el-icon-download" @click="exportExcel2(scope.row)">导出</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="text" content="打印" placement="top">
<div style="display: inline-block">
<el-button size="mini" type="text" style="margin-left: 10px" icon="el-icon-printer" @click="exportExcel(scope.row)">打印</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="text" style="margin-left: 10px" size="mini" icon="el-icon-edit-outline" @click="editPurchaseOrder(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.采购计划状态)===3 || parseInt(scope.row.采购计划状态)===4" type="text" style="margin-left: 10px" size="mini" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<!--<div class="block">-->
<!--<el-pagination-->
<!--:current-page="pageCurrent2"-->
<!--:page-sizes="[10, 20, 30, 40]"-->
<!--:page-size="pageSize2"-->
<!--:total="total2"-->
<!--style="display:inline-block;width:40%;float: right;margin-right: 60px"-->
<!--layout="total, sizes, prev, pager, next, jumper"-->
<!--@size-change="handleSizeChange2"-->
<!--@current-change="handleCurrentChange2"/>-->
<!--</div>-->
<div class="block">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:40%;float: right;margin-right: 60px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table v-loading="" :data="tableData3" border highlight-current-row style="margin: 3px 0" height="455px" size="mini">
<el-table-column label="备料状态" align="center" width="80">
<template slot-scope="scope">
<span v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</span>
<span v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</span>
<span v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</span>
</template>
</el-table-column>
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料零件编码 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="115">
<template slot-scope="scope">
<el-input-number :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.采购数量" :min="0" size="mini" style="width: 100%" @change="saveWeight(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px">
<template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="80px">
<template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.单位" size="mini" style="width:100%" @change="saveMoney(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="备注" min-width="100px">
<template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注1" size="mini" style="width:100%" @change="saveRemarks(scope.$index, scope.row)"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="90px" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="移出" placement="top">
<div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="text" size="mini" icon="el-icon-right" @click="deleteMateriel(scope.row)">移出</el-button>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
</el-card>
</div>
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="750px" @close="closedialog()">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
@@ -282,54 +344,9 @@
@click="submitEditPurchaseOrder">确定</el-button>
</div>
</el-dialog>
<el-card style="width: 1100px;margin: 10px auto">
<div id="WGBLD" style="width: 1000px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr style="height: 60px">
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
</tr>
<tr style="height: 40px">
<th colspan="14"><h4>{{ 采购单名称 }}</h4></th>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 下单单位 }}</td>
<td colspan="2" style="text-align: center;width: 15%">单号</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 单号 }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 下单日期 }}</td>
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 计划完成日期 }}</td>
</tr>
</table>
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
<tr id="tablehead" style="height: 35px">
<td style="text-align: center;width: 7%">序号</td>
<td colspan="2" style="text-align: center;width: 20%">物料编码</td>
<td colspan="2" style="text-align: center;width: 10%">名称</td>
<td colspan="2" style="text-align: center;width: 10%">材料</td>
<td colspan="2" style="text-align: center;width: 8%">单位</td>
<td colspan="2" style="text-align: center;width: 8%">数量</td>
<td colspan="2" style="text-align: center;width: 20%">成品尺寸</td>
<td style="text-align: center;width: 17%">备注</td>
</tr>
<tr v-for="(list, index) in tableData4" :key="index" style="height: 35px">
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.物料零件编码 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.零件名称 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.总数量 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.成品尺寸 }}</td>
<td style="text-align: center;width: 17%">{{ list.备注1 }}</td>
</tr>
</table>
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
</div>
</el-card>
</div>
</template>
<script>
@@ -338,7 +355,6 @@ import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, addPurc
import QRCode from 'qrcode'
import $ from 'jquery'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购计划
data() {
@@ -907,4 +923,21 @@ export default {
top: 5px;
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -3,7 +3,7 @@
<el-card>
<div>
<span style="margin-left: 10px">供应商:</span>
<el-select v-model="supplierNameValue" placeholder="供应商" size="small" filterable clearable @change="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">
<el-select v-model="supplierNameValue" placeholder="供应商" size="small" style="width: 220px" filterable clearable @change="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">
<el-option
v-for="item in supplierName"
:key="item.value"
@@ -17,26 +17,26 @@
size="small"
type="daterange"
align="center"
style="width: 300px;margin: 3px 0"
style="width: 240px;margin: 3px 0"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">查询</el-button>
<el-button type="distribution" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button>
<el-button class="button111" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button>
</div>
</el-card>
<el-card style="width: 45%;float: left">
<span>到货单</span>
<el-table v-loading="" :data="tableData4" border stripe style="width: 100%" height="230px" size="mini" highlight-current-row @row-click="searchTable5">
<el-table v-loading="" :data="tableData4" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" border stripe style="width: 7000px" height="240px" size="mini" highlight-current-row @row-click="searchTable5">
<el-table-column label="关联情况" align="center" width="80">
<template slot-scope="scope">
<span v-if="Number(scope.row.是否关联) === 1" type="success" size="mini">已结算</span>
<span v-else type="primary" size="mini">未结算</span>
</template>
</el-table-column>
<el-table-column label="供应商" prop="供应商名称" align="center" width="260" show-overflow-tooltip>
<el-table-column label="供应商" prop="供应商名称" align="center" width="245" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -51,10 +51,10 @@
{{ scope.row.到货单编号 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170" fixed="right">
<el-table-column label="操作" align="center" width="110">
<template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 10px" icon="el-icon-circle-plus-outline" @click="addArrivalOrderMX(scope.row)">到货明细</el-button>
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalOrder(scope.row)"/>
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: -5px" icon="el-icon-circle-plus-outline" @click="addArrivalOrderMX(scope.row)">到货明细</el-button>
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 5px" icon="el-icon-delete" @click="deleteArrivalOrder(scope.row)"/>
</template>
</el-table-column>
<!--</el-tooltip>-->
@@ -91,40 +91,41 @@
v-loading=""
:data="tableData5"
:summary-method="getSummaries"
:header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}"
border
show-summary
highlight-current-row
style="margin: 3px 0"
style="margin: 3px 0; width: 900px"
height="260px"
size="mini"
@row-click="searchTable6">
<el-table-column width="60" align="center" type="index" label="序号"/>
<el-table-column label="材料" prop="材料" align="center" width="180">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column label="材料" prop="材料" align="center" width="140">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="数量">
<el-table-column label="数量" align="center" prop="数量" width="70">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="单位" align="center" >
<el-table-column label="单位" align="center" width="70" >
<template slot-scope="scope">
{{ scope.row.单位 }}
</template>
</el-table-column>
<el-table-column label="单价" align="right">
<el-table-column label="单价" align="right" width="130">
<template slot-scope="scope">
{{ scope.row.单价.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="金额" align="right">
<el-table-column label="金额" align="right" width="130">
<template slot-scope="scope">
{{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="220" fixed="right">
<el-table-column label="操作" align="center" width="140">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="关联备料材料" placement="top">
<div style="display: inline-block">
@@ -149,55 +150,55 @@
border
show-summary
highlight-current-row
style="margin: 3px 0"
style="margin: 3px 0; width: 1280px"
height="500px"
size="mini">
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="200">
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.物料零件编码 }}
</template>
</el-table-column>
<el-table-column label="零件名称" prop="零件名称" align="center">
<el-table-column label="零件名称" prop="零件名称" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" align="center" >
<el-table-column label="材料" prop="材料" align="center" width="140" >
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center">
<el-table-column label="数量" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center">
<el-table-column label="成品尺寸(长、宽、高)" align="center" width="240">
<template slot-scope="scope">
{{ scope.row.成品尺寸 }}
</template>
</el-table-column>
<el-table-column label="总重量" align="center" prop="总重量">
<el-table-column label="总重量" align="center" prop="总重量" width="100">
<template slot-scope="scope">
{{ scope.row.重量 }}
</template>
</el-table-column>
<el-table-column label="单位" align="center" >
<el-table-column label="单位" align="center" width="70" >
<template slot-scope="scope">
{{ scope.row.单位 }}
</template>
</el-table-column>
<el-table-column label="总金额" align="center" prop="总金额">
<el-table-column label="总金额" align="center" prop="总金额" width="130">
<template slot-scope="scope">
{{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" >
<el-table-column label="备注" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="110px" fixed="right">
<el-table-column label="操作" align="center" width="90px">
<template slot-scope="scope">
<el-tooltip effect="dark" content="取消关联" placement="top">
<div style="display: inline-block">
@@ -1221,4 +1222,21 @@ export default {
color: black;
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -678,4 +678,21 @@ export default {
margin: 0
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -44,12 +44,13 @@
<el-tooltip :open-delay="1200" effect="dark" content="查询外购备料发票信息" placement="top">
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()">查询</el-button>
</el-tooltip>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">到票</el-button>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">到票</el-button>
</el-row>
</el-card>
<el-card style="float: left">
<el-table
:data="tableData1"
:header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}"
size="mini"
style="margin-top: 3px"
height="750px"
@@ -57,7 +58,7 @@
border
highlight-current-row
@row-click="searchTable02">
<el-table-column align="center" label="进程" width="70px">
<el-table-column align="center" label="进程" width="60px">
<template slot-scope="scope">
<span v-if="Number(scope.row.是否请款) === 0" type="warning" size="mini">未请款</span>
<span v-else-if="Number(scope.row.是否请款) === 1" type="primary" size="mini">已请款</span>
@@ -140,7 +141,7 @@
</div>
</el-card>
<el-card style="float: left;margin-left: 5px">
<el-table :data="gridData" :summary-method="getSummaries" class="subTableHeader" show-summary border size="mini" style="width: 100%">
<el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" class="subTableHeader" show-summary border size="mini" style="width: 100%">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column label="到货单编号" align="center" width="120px">
<template slot-scope="scope">
@@ -673,3 +674,21 @@ function saveAs(blob, filename = '下载文件.xls') {
}
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-card>
<el-card style="">
<el-col>
<span>请款时间段:</span>
<el-date-picker
@@ -9,14 +9,14 @@
size="small"
type="daterange"
align="center"
style="width: 300px;margin: 3px 0"
style="width: 240px;margin: 3px 0"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span style="margin-left: 10px">供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<el-input v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" clearable/>
<el-tooltip :open-delay="1000" effect="dark" content="查询外购备料清款信息" placement="top">
<el-button
type="primary"
@@ -27,39 +27,20 @@
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
<el-button type="distribution" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
<el-button class="button111" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="对选择的请款任务创建请款申请" placement="top">
<el-button type="primary" plain class="el-icon-download" size="small" style="margin: 10px 0 0 130px" @click="exportExcel">导出</el-button>
</el-tooltip>
</el-col>
</el-card>
<el-card style="margin-left: 0px;width: 68%;float: left">
<!--@expand-change="searchTable02"-->
<!--<el-table-column type="expand" label="详情">-->
<!--<template slot-scope="scope">-->
<!--<el-table :data="gridData" class="subTableHeader" stripe size="mini" show-summary style="width: 40%">-->
<!--<el-table-column width="50" align="center" type="index" label="序号"/>-->
<!--<el-table-column min-width="150" 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="150" align="center" label="开票金额" prop="开票金额">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.开票金额 }}-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table>-->
<!--</template>-->
<!--</el-table-column>-->
<el-card style="margin-left: 0px;width: 67%;float: left" >
<el-table
v-loading=""
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
:header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}"
border
stripe
style="margin-top: 3px;"
@@ -88,14 +69,14 @@
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="审批情况内容" width="100" align="center">
<el-table-column label="审批进程" width="80" align="center">
<template slot-scope="scope">
<span v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="mini">未审批</span>
<span v-if="Number(scope.row.审批情况流水号)===1" type="success" size="mini">已通过</span>
<span v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="mini">不通过</span>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<el-table-column label="未通过审批原因" width="120" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template>
@@ -134,27 +115,25 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card style="margin-left: 0px;width: 32%;float: left">
<el-table-column type="expand" label="详情">
<el-table :data="gridData" class="subTableHeader" size="mini" show-summary style="width: 100%">
<el-table-column width="50" align="center" type="index" label="号"/>
<el-table-column min-width="150" 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="150" align="center" label="开票金额" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
</el-table>
</el-table-column>
<el-card style="margin-left: 0px;width:31%; float: left">
<el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" border class="subTableHeader" size="mini" show-summary style="">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="120" align="center" label="发票号">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column min-width="170" align="center" label="供应商" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" width="100px" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.开票金额.toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="外购备料请款" center style="min-height: 300px" width="800px">
<span>供应商:</span>
@@ -263,6 +242,43 @@ export default {
this.searchTable1()
},
methods: {
getSummaries(param) { // 合计
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
} else if (index === 3) {
const values = data.map(item => Number(parseFloat(item['开票金额'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(2) + ' 元'
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
exportExcel() {
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
this.supplierName0 ? this.check2 = 1 : (this.check2 = 0, this.supplierName0 = '')
var param = []
param[0] = ['时间段_check', this.check1]
param[1] = ['开始时间', this.dateRange[0]]
param[2] = ['结束时间', this.dateRange[1]]
param[3] = ['供应商名称_check', this.check2]
param[4] = ['供应商名称', this.supplierName0]
var Data = this.CreateData('03', '报表_备料管理_请款_查询数据', param)
this.exportExcel_NPOI(Data)
},
// dateFormat(row, column) {
// var date = row[column.property]
// console.log(date)
@@ -411,8 +427,8 @@ export default {
<style lang="scss">
.subTableHeader {
th {
background: #8ff4ea !important;
color: black;
background: #7eaced !important;
color: #FFFFFF;
}
tr.el-table__row td {
@@ -424,3 +440,21 @@ export default {
}
}
</style>
<style lang="scss">
.button111{
background:rgb(253,246,236);
border-color: #ff9759;
color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
}
&:focus{
background: #ff9759;
border-color: #ff9759;
color: white;
}
}
</style>