This commit is contained in:
liushuai
2020-02-27 08:38:16 +08:00
parent bd984ae0a8
commit 5f59d6031e

View File

@@ -1,5 +1,4 @@
<template> <template>
<<<<<<< HEAD
<div> <div>
<div style="width: 100%;overflow:auto"> <div style="width: 100%;overflow:auto">
<div style="white-space: nowrap"> <div style="white-space: nowrap">
@@ -187,283 +186,6 @@
</el-card> </el-card>
</div> </div>
</div> </div>
=======
<div class="app-container">
<el-card style="width: 1137px">
<span>机床号</span>
<el-select v-model="Machine" filterable clearable size="small" style="width: 150px;" placeholder="机床号" @change="getGroup">
<el-option
v-for="item in Machines"
: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.value2 }}</div>
</el-option>
</el-select>
<span>组号</span>
<el-select v-model="Group" size="small" clearable placeholder="组号" style="width: 120px;" @change="getTableData">
<el-option
v-for="item in Groups"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>零件号</span>
<el-input v-model="number" placeholder="零件号" clearable size="small" style="width: 150px"/>
<el-button type="primary" plain class="el-icon-search" size="small" style="margin: 0px 10px;" @click="pageCurrent10 = 1;pageSize10 = 10;getTableData()">查询</el-button>
</el-card>
<el-card style="width: 1137px">
<el-table v-loading="" :data="tableData10" stripe highlight-current-row border style="width: 100%;max-height: 315px;margin-top: 10px" height="315px" size="mini" @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="机床图号" prop="机床图号" min-width="180" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" width="120" sortable="custom" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" prop="零件图号" align="center" sortable="custom" width="220">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="220">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" align="center" sortable="custom" min-width="160">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
</el-table>
<!--<div class="block">-->
<!--<el-pagination-->
<!--:current-page="pageCurrent10"-->
<!--:page-sizes="[10, 20, 30, 40]"-->
<!--:page-size="pageSize10"-->
<!--:total="total10"-->
<!--style="display:inline-block;width:50%"-->
<!--layout="total, sizes, prev, pager, next, jumper"-->
<!--@size-change="handleSizeChange10"-->
<!--@current-change="handleCurrentChange10"/>-->
<!--</div>-->
</el-card>
<el-card style="width: 1137px">
<span>离线备料单号:</span>
<el-input v-model="purchasingOrder" placeholder="离线备料单号" size="small" style="width: 160px" clearable/>
<span style="margin-left: 10px">供应商:</span>
<el-select v-model="supplierName" placeholder="供应商" size="small" style="width: 150px" filterable clearable @change="searchTable">
<el-option
v-for="item in supplierNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购计划单</el-button>
<!--<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">-->
<!--<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>-->
<!--</el-tooltip>-->
<el-button type="primary" size="small" plain icon="el-icon-download" style="margin-left: 10px" @click="submitAddMaterial">选入备料</el-button>
</el-card>
<el-card style="width: 1137px">
<el-table v-loading="" :data="tableData" stripe highlight-current-row border style="width: 100%;max-height: 230px;margin-top: 10px" height="230px" size="mini" @row-click="searchMX">
<el-table-column label="采购状态" prop="采购计划状态" align="center" width="90">
<template slot-scope="scope">
<span v-if="Number(scope.row.采购计划状态)===0" type="warning" 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="离线采购计划编号" align="center" width="200">
<template slot-scope="scope">
{{ scope.row.离线采购计划编号 }}
</template>
</el-table-column>
<el-table-column label="离线采购计划名称" align="center" width="180">
<template slot-scope="scope">
{{ scope.row.离线采购计划名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" width="250" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="下单日期" prop="下单日期" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.下单日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="290">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="打印采购计划单" placement="top">
<div style="display: inline-block">
<el-button size="mini" type="text" 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" style="margin-left: 10px" type="text" 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" style="margin-left: 10px" type="text" 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:50%"-->
<!--layout="total, sizes, prev, pager, next, jumper"-->
<!--@size-change="handleSizeChange2"-->
<!--@current-change="handleCurrentChange2"/>-->
<!--</div>-->
</el-card>
<el-card style="width: 1137px">
<el-table v-loading="" :data="tableData3" highlight-current-row border style="width: 100%;max-height: 300px;margin-top: 10px" size="mini">
<el-table-column label="采购状态" align="center" width="90">
<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="180">
<template slot-scope="scope">
{{ scope.row.物料零件编码 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="160">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" prop="数量" width="100px">
<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="160px">
<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" prop="备注" width="220px">
<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="100px">
<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="deleteMX(scope.row)">移出</el-button>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
>>>>>>> 0b6cb6f55ad7cb26c02017b256ea0ec59eca150f
<el-card style="width: 1137px">
<div id="WGBLD" style="width: 1037px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr style="height: 60px">
<th colspan="12"><h3>江苏高精机电装备有限公司</h3></th>
</tr>
<tr style="height: 40px">
<th colspan="12"><h4>{{ 采购单名称 }}</h4></th>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
<td colspan="4" style="text-align: center;width: 35%">{{ 下单单位 }}</td>
<td colspan="2" style="text-align: center;width: 15%">单号</td>
<td colspan="4" style="text-align: center;width: 35%">{{ 单号 }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
<td colspan="4" style="text-align: center;width: 35%">{{ 下单日期 }}</td>
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
<td colspan="4" 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: 20%">成品尺寸</td>
<td style="text-align: center;width: 17%">备注</td>
</tr>
<tr v-for="(list, index) in tableData3" :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: 20%">{{ list.成品尺寸 }}</td>
<td style="text-align: center;width: 17%">{{ list.备注 }}</td>
</tr>
</table>
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
</div>
</el-card>
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="520px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="150px">
<el-form-item label="离线采购计划名称" prop="离线采购计划名称">
<el-input v-model="form2.离线采购计划名称" size="small"/>
</el-form-item>
<el-form-item label="供应商" prop="supplierNameValue">
<el-select v-model="form2.supplierNameValue" placeholder="供应商" size="small" filterable>
<el-option
v-for="item in supplierNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
v-show="title2==='创建离线采购计划'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitAddPurchaseOrder">确定</el-button>
<el-button
v-show="title2==='编辑离线采购计划'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitEditPurchaseOrder">确定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>