This commit is contained in:
yanggongyan
2020-02-07 19:58:38 +08:00
23 changed files with 874 additions and 672 deletions

View File

@@ -29,7 +29,7 @@
v-loading="loading"
:data="tableData"
height="760"
style="width: 1126px; margin: 3px 0"
style="width: 1408px; margin: 3px 0"
size="mini"
border
stripe
@@ -81,6 +81,16 @@
{{ scope.row.工艺要求 }}
</template>
</el-table-column>
<el-table-column label="备料任务接受时间" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备料任务接受时间 }}
</template>
</el-table-column>
<el-table-column label="备料任务分配时间" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备料任务分配时间 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
@@ -217,7 +227,9 @@ export default {
工艺要求: response.data[0].工艺要求,
材料: this.Data[i].材料,
重量: this.Data[i].重量,
批次数量: this.Data[i].批次数量
批次数量: this.Data[i].批次数量,
备料任务接受时间: this.Data[i].备料任务接受时间,
备料任务分配时间: this.Data[i].备料任务分配时间
})
})
this.loading = false

View File

@@ -28,7 +28,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="total1=0;pageSize1 = 10000;pageCurrent1 = 1;searchData1()">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 15px" @click="total1=0;pageSize1 = 10000;pageCurrent1 = 1;searchData1()">查询</el-button>
</el-row>
</el-card>
<el-card style="margin-top: 15px">

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total = 0;pageSize = 10000;pageList = 1;getTable()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-search" style="margin-left:10px" plain @click="total = 0;pageSize = 10000;pageList = 1;getTable()">查询</el-button>
</el-form-item>
</el-form>
</el-col>
@@ -103,7 +103,7 @@
type="selection"
align="center"
width="35"/>
<el-table-column label="零件号" prop="零件图号" align="center" min-width="220">
<el-table-column label="零件号" prop="零件图号" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
@@ -148,18 +148,20 @@
{{ scope.row.零件类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" width="170px" fixed="right" align="center">
<el-table-column label="操作" width="220px" fixed="right" align="center">
<template slot-scope="scope">
<el-button
:disabled="checked_hebing"
size="mini"
type="primary"
icon="el-icon-star-off"
style="padding: 4px 8px"
plain
@click="handleEdit(scope.$index, scope.row, 'form')">分批投产</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-star-off"
style="padding: 4px 8px"
plain
@click="handleEditNumber(scope.$index, scope.row)">更改数量</el-button>
@@ -178,13 +180,13 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
<el-tooltip :open-delay="1200" effect="dark" content="打回到零件分配" placement="top">
<el-button :loading="listLoading3" type="danger" size="small" style="float:right;margin-left: 10px" @click="back">打回</el-button>
<el-button :loading="listLoading3" type="danger" size="small" style="float:right;margin-left: 10px" plain @click="back">打回</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="选中零件进行投产" placement="top">
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;" @click="production">投产</el-button>
<el-button :loading="listLoading3" type="warning" size="small" style="float:right;" plain @click="production">投产</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="选中零件进行备料投产" placement="top">
<el-button :loading="listLoading3" type="success" size="small" style="float:right;" @click="production10">备料投产</el-button>
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;" plain @click="production10">备料投产</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="将零件加急处理" placement="top">
<el-checkbox v-model="checked_UrgentItem" style="float:right;margin-top:10px;margin-right:10px">是否加急</el-checkbox>

View File

@@ -6,7 +6,7 @@
<el-input v-model="materialName" placeholder="名称规格型号" size="small" clearable style="margin-bottom: 10px; width: 180px;"/>
<!-- <el-input v-model="materialSpec" placeholder="物料规格" size="small" style="margin-bottom: 10px; width: 120px;" clearable/>-->
<!-- <el-input v-model="materialModel" placeholder="物料型号" size="small" style="margin-bottom: 10px; width: 120px;" clearable/>-->
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageCurrent=1;pageSize=30;searchMaterial()">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="small" plain style="margin-left: 10px" @click="pageCurrent=1;pageSize=30;searchMaterial()">查询</el-button>
<!-- <el-button type="primary" icon="el-icon-edit" size="small" @click="addMaterial()">新增</el-button>-->
</el-row>
</div>

View File

@@ -64,7 +64,7 @@
<el-card>
<el-tabs type="border-card" @tab-click="selectPart">
<el-tab-pane label="基本件">
<el-table :data="tableData1" :row-class-name="tableRowClassName1" border size="mini" style="width: 100%" height="300px" @selection-change="handleSelectionChange">
<el-table :data="tableData1" :row-class-name="tableRowClassName1" stripe border size="mini" style="width: 100%" height="300px" @selection-change="handleSelectionChange">
<el-table-column align="center" width="50" type="selection"/>
<el-table-column label="零件名称" align="center" width="120px">
<template slot-scope="scope">
@@ -229,15 +229,15 @@
placeholder="选择日期"/>
<span style="font-weight: bold">制造:</span>
<el-tooltip :open-delay="1200" effect="dark" content="将零件选择到采购单" placement="top">
<el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 5px" @click="purchaseRequisition()">制造部采购</el-button>
<el-button type="primary" size="small" icon="el-icon-star-off" plain style="margin-top: 3px; margin-left: 5px" @click="purchaseRequisition()">制造部采购</el-button>
</el-tooltip>
<span style="margin-left: 40px;font-weight: bold">金工:</span>
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配为自家生产" placement="top">
<el-button type="danger" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 5px" @click="Production()">车间生产</el-button>
<el-button type="danger" size="small" icon="el-icon-star-off" plain style="margin-top: 3px; margin-left: 5px" @click="Production()">车间生产</el-button>
</el-tooltip>
<span style="margin-left: 40px;font-weight: bold">采购:</span>
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配到采购部" placement="top">
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 5px" @click="PurchasingDepartment()">采购部门采购</el-button>
<el-button type="success" size="small" icon="el-icon-star-off" plain style="margin-top: 3px; margin-left: 5px" @click="PurchasingDepartment()">采购部门采购</el-button>
</el-tooltip>
</el-card>
<el-card>
@@ -252,7 +252,7 @@
<el-row>
<el-col style="width: 400px">
<el-card>
<el-table :data="tableData4" border size="mini" style="width: 100%" height="300px" highlight-current-row @row-click="searchDetailed">
<el-table :data="tableData4" stripe border size="mini" style="width: 100%" height="300px" highlight-current-row @row-click="searchDetailed">
<el-table-column label="请购单号" show-overflow-tooltip align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.请购单编号 }}
@@ -669,11 +669,13 @@ export default {
const _this = this
if (route.name === 'PartAssignment') {
_this.fetchData()
_this.DeliveryTime = ''
}
}
}
},
created() {
this.DeliveryTime = ''
this.fetchData()
},
methods: {

View File

@@ -21,11 +21,11 @@
:value="item.value"/>
</el-select>
<el-input v-model="partNumber" clearable size="small" placeholder="零件图号" style="width: 150px;margin: 0px 10px;"/>
<el-button v-if="是否扫描 === false" size="small" type="success" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="total = 0;pageList = 1;getTable()">查询</el-button>
<el-button v-if="是否扫描 === true" size="small" type="success" icon="el-icon-search" style="margin: 10px 0 0 10px" @click="total5 = 0;pageList5 = 1;getTable5()">查询</el-button>
<el-button v-if="是否扫描 === false" size="small" type="primary" icon="el-icon-search" plain style="margin: 10px 0 0 10px" @click="total = 0;pageList = 1;getTable()">查询</el-button>
<el-button v-if="是否扫描 === true" size="small" type="primary" icon="el-icon-search" plain style="margin: 10px 0 0 10px" @click="total5 = 0;pageList5 = 1;getTable5()">查询</el-button>
<el-checkbox v-if="false" v-model="是否扫描">是否扫描查询</el-checkbox>
<el-tooltip :open-delay="1200" effect="dark" content="变更零件加工开始和结束时间" style="margin-left:200px" placement="top">
<el-button size="small" type="primary" @click="PartPlan()">零件计划变更</el-button>
<el-button size="small" type="warning" plain @click="PartPlan()">零件计划变更</el-button>
</el-tooltip>
<el-date-picker
v-model="startTime"
@@ -139,9 +139,9 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
<el-tooltip :open-delay="1200" effect="dark" content="将选中零件自动排出加工工序" placement="top">
<el-button type="warning" size="small" icon="el-icon-download" @click="Selection">选入</el-button>
<el-button type="warning" size="small" icon="el-icon-download" plain @click="Selection">选入</el-button>
</el-tooltip>
<el-button type="warning" size="small" icon="el-icon-download" @click="SelectionAll">全部选入</el-button>
<el-button type="warning" size="small" icon="el-icon-download" plain @click="SelectionAll">全部选入</el-button>
</div>
<div v-if="是否扫描 === true" class="block" style="margin-top: 10px;">
<el-pagination
@@ -428,11 +428,11 @@
@current-change="handleCurrentChange1"/>
<div style="float:right">
<el-tooltip :open-delay="1200" effect="dark" content="自动计算工序加工时间" placement="top">
<el-button type="primary" size="small" style="margin:5px 10px 10px 10px" @click="Discharge">虚拟排产</el-button>
<el-button type="warning" size="small" style="margin:5px 10px 10px 10px" plain @click="Discharge">虚拟排产</el-button>
</el-tooltip>
<el-button v-if="可以确定零件计划" type="primary" size="small" style="margin:5px 10px 10px 10px" @click="Plan" >确定零件计划</el-button>
<el-button v-if="可以确定零件计划" type="warning" size="small" style="margin:5px 10px 10px 10px" plain @click="Plan" >确定零件计划</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="选出重新设置零件的加工时间" placement="top">
<el-button type="danger" size="small" icon="el-icon-upload2" style="float:right;margin:5px 50px 10px 10px" @click="allOut">全部选出</el-button>
<el-button type="danger" size="small" icon="el-icon-upload2" style="float:right;margin:5px 50px 10px 10px" plain @click="allOut">全部选出</el-button>
</el-tooltip>
</div>
</div>

View File

@@ -25,7 +25,7 @@
:value="item.value"/>
</el-select>
<el-input v-model="PartDrawing" placeholder="请输入零件图号" size="small" style="width: 150px; margin: 0px 10px" clearable/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="currentPage1=1; fetchTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" plain @click="currentPage1=1; fetchTableData()">查询</el-button>
</el-row>
</el-card>
<el-row>
@@ -131,7 +131,6 @@
element-loading-background="rgba(226,223,223,1)"
height="600"
border
stripe
style="width: 510px">
<el-table-column
width="50px"
@@ -213,7 +212,7 @@
<el-input v-model="inputC" auto-complete="off" style="width: 100px" size="small" />
<span>开始工序</span>
<el-input v-model="inputD" :disabled="true" auto-complete="off" style="width: 100px" size="small"/>
<el-button type="success" size="small" @click="editB">补投重新生产零件</el-button>
<el-button type="primary" size="small" plain @click="editB">补投重新生产零件</el-button>
</div>
</el-card>
<el-card v-show="false">

View File

@@ -3,9 +3,11 @@
<el-card>
<span>设备名称:</span>
<el-input v-model="equipmentName" placeholder="设备名称" size="small" clearable style="width:200px;margin-left: 10px"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:30px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="pageCurrent = 1;fetchData()">查询</el-button>
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin-left:30px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="pageCurrent = 1;fetchData()">查询</el-button>-->
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" plain @click="PageSize = 10;PageCurrent = 1;fetchData()">查询</el-button>
<el-tooltip effect="dark" content="添加新设备" placement="top">
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="handleAdd()">新增</el-button>
<el-button class="button111" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增</el-button>
<!--<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" plain style="margin-left:10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="handleAdd()">新增</el-button>-->
</el-tooltip>
<span style="margin-left: 40px">有效时间</span>
<el-date-picker
@@ -15,10 +17,12 @@
value-format="yyyy-MM-dd"
placeholder="选择日期"/>
<el-tooltip :open-delay="1200" effect="dark" content="设定设备参数有效时间" placement="top">
<el-button type="primary" size="small" icon="el-icon-setting" style="margin-left:10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="setUp">设定</el-button>
<!--<el-button type="primary" size="small" icon="el-icon-setting" style="margin-left:10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="setUp">设定</el-button>-->
<el-button type="warning" size="small" icon="el-icon-setting" plain style="margin-left:10px" @click="setUp">设定</el-button>
</el-tooltip>
<el-tooltip effect="dark" content="生成有效时间内设备加工能力" placement="top">
<el-button type="success" size="small" icon="el-icon-edit-outline" style="margin-left:10px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="generate">生成设备加工能力</el-button>
<!--<el-button type="success" size="small" icon="el-icon-edit-outline" style="margin-left:10px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="generate">生成设备加工能力</el-button>-->
<el-button type="primary" size="small" icon="el-icon-edit-outline" plain style="margin-left:10px" @click="generate">生成设备加工能力</el-button>
</el-tooltip>
</el-card>
@@ -74,10 +78,10 @@
{{ scope.row.设备预留工时系数 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px" fixed="right" >
<el-table-column label="操作" align="center" width="100px" fixed="right" >
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit" plain style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" plain @click="handleDelete(scope.row)">删除</el-button>
<el-button type="text" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)"/>
<el-button type="text" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)"/>
</template>
</el-table-column>
</el-table>
@@ -336,6 +340,13 @@ export default {
}
})
},
ADD() {
this.addForm('form')
this.dialogFormVisible1 = true
this.form.contractSigningDate = getNowTime()// new Date()
this.temp = 1
this.title = '新增项目'
},
submitEdit() {
editTable(this.equipmentSerialNumber, this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备加工能力, this.form.设备工时系数, this.form.班次类型, this.form.设备加工工艺, this.form.整改工时系数, this.form.设备编号, this.form.预留工时系数).then(response => {
if (response.data[0].result === '1') {
@@ -423,3 +434,20 @@ export default {
/* color: #ff9759;*/
/*}*/
</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

@@ -177,10 +177,10 @@
<el-table-column label="操作" align="center" width="170">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-circle-plus-outline"
@click.stop="addMachine(scope.row);flag = 1">增加机床</el-button>
size="mini"
type="text"
icon="el-icon-circle-plus-outline"
@click.stop="addMachine(scope.row);flag = 1">增加机床</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button

View File

@@ -39,9 +39,11 @@
<!-- size="small"-->
<!-- type="date"-->
<!-- placeholder="请选择结束日期"/>-->
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<!--<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px;background: #ecf5ff;border-color: #2d72d5;color: #2d72d5;" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>-->
<el-button type="primary" icon="el-icon-search" size="small" style="margin-left: 10px" plain @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="新增项目" placement="top">
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="ADD()">新增</el-button>
<el-button class="button111" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增</el-button>
<!--<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;background: #fdf6ec;border-color: #ff9759;color: #ff9759;" @click="ADD()">新增</el-button>-->
</el-tooltip>
</div>
</el-card>
@@ -83,14 +85,19 @@
</el-table-column>
<el-table-column label="操作" align="center" width="160">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="增加机床" placement="top">
<el-button
size="mini"
type="warning"
plain
icon="el-icon-plus"
@click.stop="addMachine(scope.row);flag = 1">机床</el-button>
</el-tooltip>
<!--<el-tooltip :open-delay="1200" effect="dark" content="增加机床" placement="top">-->
<!--<el-button-->
<!--size="mini"-->
<!--type="warning"-->
<!--plain-->
<!--icon="el-icon-plus"-->
<!--@click.stop="addMachine(scope.row);flag = 1">机床</el-button>-->
<!--</el-tooltip>-->
<el-button
size="mini"
type="text"
icon="el-icon-circle-plus-outline"
@click.stop="addMachine(scope.row);flag = 1">增加机床</el-button>
<el-button
size="mini"
type="text"
@@ -118,7 +125,8 @@
</el-col>
<el-col style="width: 43%">
<el-card>
<el-table :data="tableData2" class="subTableHeader" border stripe style="width: 100%; text-align: center" size="mini">
<!--<el-table :data="tableData2" class="subTableHeader" border stripe style="width: 100%; text-align: center" size="mini">-->
<el-table :data="tableData2" border stripe style="width: 100%; text-align: center" size="mini">
<el-table-column label="设备型号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -472,6 +480,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;
}
}
.subTableHeader {
th {
background: #8ff4ea !important;

View File

@@ -50,7 +50,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=20;searchTable()">查询</el-button>
<el-button type="primary" class="el-icon-search" size="small" plain @click="pageCurrent=1;pageSize=20;searchTable()">查询</el-button>
</el-row>
<el-table v-loading="loading" :data="tableData" height="500" size="mini" stripe style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中">
<el-table-column label="序号" type="index" align="center" fixed="left" width="50"/>

View File

@@ -58,30 +58,30 @@
</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>
<!--<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>
<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="pageCurrent2=1;pageSize2=10;total2=0;searchTable()">查询</el-button>
<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>-->
@@ -137,17 +137,17 @@
</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>
<!--<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" stripe highlight-current-row border style="width: 100%;max-height: 300px;margin-top: 10px" size="mini">
@@ -402,7 +402,7 @@ export default {
})
}
})
this.getTableData()
// this.getTableData()
}
}, // 获取组号
getGroup() {
@@ -415,7 +415,7 @@ export default {
value: response.data[i].组件流水号
})
}
this.Group = response.data[0].组件流水号
// this.Group = response.data[0].组件流水号
})
this.getTableData()
},
@@ -442,6 +442,10 @@ export default {
// 按条件查询
getTableData() {
this.tableData10 = []
if (!this.Machine && !this.Group && !this.number) {
this.$message.error('请输入筛选条件!')
return
}
if (this.Machine === '') {
this.checkbox_Machine = 0
} else {
@@ -457,21 +461,20 @@ export default {
} else {
this.checkbox_number = 1
}
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, '', '', this.pageCurrent10, this.pageSize10, this.ordername, this.order).then(response => {
if (response.data.rows.length !== 0) {
for (let i = 0; i < response.data.rows.length; i++) {
getTable(this.checkbox_Machine, this.Machine, this.checkbox_Group, this.Group, this.checkbox_number, this.number, '', '', this.ordername, this.order).then(response => {
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.tableData10.push({
工艺计划流水号: response.data.rows[i].工艺计划流水号,
机床图号: response.data.rows[i].机床图号,
组号: response.data.rows[i].组号,
零件图号: response.data.rows[i].零件图号,
零件名称: response.data.rows[i].零件名称,
批次数量: response.data.rows[i].批次数量,
材料: response.data.rows[i].材料
工艺计划流水号: response.data[i].工艺计划流水号,
机床图号: response.data[i].机床图号,
组号: response.data[i].组号,
零件图号: response.data[i].零件图号,
零件名称: response.data[i].零件名称,
批次数量: response.data[i].批次数量,
材料: response.data[i].材料
})
}
}
this.total10 = response.data.total
this.loading = false
})
},
@@ -492,11 +495,16 @@ export default {
}
},
searchTable() {
this.tableData = []
if (!this.purchasingOrder && !this.supplierName) {
this.$message.error('请输入筛选条件!')
return
}
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
this.supplierName ? this.check4 = 1 : this.check4 = 0
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName).then(response => {
this.tableData = response.data.rows
this.total2 = response.data.total
searchPurchaseOrder(this.check3, this.purchasingOrder, this.check4, this.supplierName).then(response => {
this.tableData = response.data
// this.total2 = response.data.total
})
},
handleSizeChange2(val) { // 采购单列表分页

View File

@@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-card style="width: 72%">
<el-card style="width: 76%">
<div style="margin-top: 7px; margin-bottom: 7px">
<span>供应商</span>
<el-select v-model="supplierNameValue" style="width:200px" placeholder="供应商" size="small" filterable clearable>
@@ -20,11 +20,24 @@
: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-button icon="el-icon-search" type="success" size="small" @click="pageCurrent = 1;pageSize = 100;getTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-download" size="small" @click="exportExcel()">导出</el-button>
</div>
</el-card>
<el-card style="width: 72%">
<el-card style="width: 76%">
<el-table
v-loading="loading"
:data="tableData"
@@ -33,7 +46,8 @@
stripe
size="mini"
style="width: 100%"
height="760">
height="760"
@sort-change="sortChange">
<el-table-column
label="序号"
align="center"
@@ -52,7 +66,11 @@
<el-table-column
label="供应商"
align="center"
min-width="210px">
min-width="210px"
width="300"
prop="供应商名称"
sortable="custom"
show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.供应商名称 }}</template>
</el-table-column>
<el-table-column
@@ -64,12 +82,16 @@
<el-table-column
label="物料名称"
align="center"
prop="零件名称"
sortable="custom"
width="120px">
<template slot-scope="scope">{{ scope.row.零件名称 }}</template>
</el-table-column>
<el-table-column
label="材料"
width="100"
width="90"
prop="材料"
sortable="custom"
align="center">
<template slot-scope="scope">{{ scope.row.材料 }}</template>
</el-table-column>
@@ -78,7 +100,7 @@
{{ scope.row.采购数量 }}
</template>
</el-table-column>
<el-table-column label="备料时间" align="center" width="100">
<el-table-column label="备料时间" align="center" prop="下单日期" sortable="custom" width="100">
<template slot-scope="scope">
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '' }}
</template>
@@ -122,6 +144,37 @@ export default {
name: 'Index',
data() {
return {
ordername: '',
order: '',
dateRange: '',
expands: [],
pickerOptions: {
shortcuts: [{
text: '上季度',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
picker.$emit('pick', [start, end])
}
}, {
text: '过去半年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
picker.$emit('pick', [start, end])
}
}, {
text: '过去一年',
onClick(picker) {
const end = new Date()
const start = new Date()
start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
picker.$emit('pick', [start, end])
}
}]
},
supplierNameValue: '',
supplierNames: [],
partNumber: '',
@@ -145,7 +198,7 @@ export default {
},
created() {
this.fetchData()
this.getTableData()
// this.getTableData()
},
methods: {
formatJson(filterVal, jsonData) {
@@ -154,7 +207,8 @@ export default {
}))
},
exportExcel() {
let check, check1, check2
let check, check1, check2, check3
this.dateRange ? check3 = 1 : (check3 = 0, this.dateRange = '')
this.supplierNameValue ? check = 1 : check = 0
this.partNumber ? check1 = 1 : check1 = 0
if (this.MaterialsValue !== '' && this.MaterialsValue !== null) {
@@ -162,11 +216,11 @@ export default {
} else {
check2 = 0
}
searchTablesheet(check, this.supplierNameValue, check1, this.partNumber, check2, this.MaterialsValue).then(res => {
searchTablesheet(check, this.supplierNameValue, check1, this.partNumber, check2, this.MaterialsValue, check3, this.dateRange[0], this.dateRange[1], this.ordername, this.order).then(res => {
console.log(res.data, 11)
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['备料状态', '供应商', '物料编码', '物料名称', '材料', '备件数', '备料时间', '到货件数', '到货时间', '结算时间']
const filterVal = ['是否到货', '供应商名称', '物料编码', '零件名称', '材料', '采购数量', '下单日期', '到货数量', '日期', '开票时间']
const tHeader = ['备料状态', '供应商', '物料编码', '物料名称', '材料', '备件数', '备料时间', '到货件数', '到货时间', '结算时间']
const filterVal = ['备料状态', '供应商名称', '物料编码', '零件名称', '材料', '采购数量', '下单日期', '到货数量', '日期', '开票时间']
const list = res.data
const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({
@@ -189,9 +243,31 @@ export default {
}
})
},
// 按供应商名称,下单日期,零件名称,材料
sortChange(column) {
console.log(column + '-' + column.prop + '-' + column.order, 11111)
if (column.prop === '供应商名称') {
this.ordername = 1
} else if (column.prop === '零件名称') {
this.ordername = 2
} else if (column.prop === '材料') {
this.ordername = 3
} else if (column.prop === '下单日期') {
this.ordername = 4
} else {
this.ordername = ''
}
if (column.order === 'ascending') {
this.order = 1
} else if (column.order === 'descending') { this.order = 2 } else {
this.order = ''
}
this.getTableData()
},
getTableData() {
this.loading = true
let check, check1, check2
let check, check1, check2, check3
this.dateRange ? check3 = 1 : (check3 = 0, this.dateRange = '')
this.supplierNameValue ? check = 1 : check = 0
this.partNumber ? check1 = 1 : check1 = 0
if (this.MaterialsValue !== '' && this.MaterialsValue !== null) {
@@ -199,8 +275,8 @@ export default {
} else {
check2 = 0
}
console.log(this.MaterialsValue, check2, 123)
searchTable(check, this.supplierNameValue, check1, this.partNumber, check2, this.MaterialsValue, this.pageSize, this.pageCurrent).then(response => {
searchTable(check, this.supplierNameValue, check1, this.partNumber, check2, this.MaterialsValue, check3, this.dateRange[0], this.dateRange[1], this.ordername, this.order, this.pageSize, this.pageCurrent).then(response => {
console.log(response)
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false

View File

@@ -300,7 +300,7 @@ export default {
this.searchTable1()
},
requestFund() { // 请款
this.searchTable01()
// this.searchTable01()
this.dialogVisible2 = true
this.supplierValue = ''
this.fetchData() // 重新获取供应商
@@ -333,7 +333,7 @@ export default {
} else { this.$message.error('请款失败') }
})
} else {
this.$message.error('请选择需要请款合同')
this.$message.error('请选择供应商及对应请款合同')
}
},
searchTable02(row) { // 查看详情(请款信息包含的合同)