Merge branch 'master' of http://123.56.95.229:10010/r/高精
This commit is contained in:
@@ -24,9 +24,9 @@
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width: 350px;">
|
||||
<el-col style="width: 550px;">
|
||||
<el-card>
|
||||
<el-button type="primary" plain style="margin: 10px 0 3px 0" icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺名称</el-button>
|
||||
<el-button type="primary" plain style="margin: 10px 0 3px 0" icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺</el-button>
|
||||
<el-table :data="tableData2" :row-key="getRowKeys" size="mini" highlight-current-row stripe border height="600" width="100%">
|
||||
<!--<el-table-column type="expand" label="详情">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
@@ -67,16 +67,21 @@
|
||||
{{ scope.row.工艺名称 }}
|
||||
</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 align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button type="text" size="mini" icon="el-icon-edit-outline" style="margin-left: 10px" @click="delProcess(scope.row)"/>
|
||||
<el-button type="text" size="mini" icon="el-icon-edit-outline" style="margin-left: 10px" @click="editProcess(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button type="text" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="editProcess(scope.row)"/>
|
||||
<el-button type="text" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="delProcess(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!--<el-button size="mini" type="primary" plain icon="el-icon-circle-plus-outline" @click="addTechnologicalRequirements(scope.row)">新增要求</el-button>-->
|
||||
@@ -130,6 +135,9 @@
|
||||
<el-form-item label="工艺名称简称" prop="ProcessShort">
|
||||
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺要求" prop="Process">
|
||||
<el-input v-model="form2.Requirement" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
@@ -189,7 +197,8 @@ export default {
|
||||
},
|
||||
form2: {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
ProcessShort: '',
|
||||
Requirement: ''
|
||||
},
|
||||
form3: {
|
||||
TechnologicalRequirements: ''
|
||||
@@ -317,7 +326,8 @@ export default {
|
||||
this.submiteditProcess()
|
||||
this.form2 = {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
ProcessShort: '',
|
||||
Requirement: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 5) {
|
||||
@@ -430,7 +440,7 @@ export default {
|
||||
this.ProcessNum = row.工艺编号
|
||||
},
|
||||
submiteditProcess() {
|
||||
editProcess(this.ProcessNum, this.form2.Process, this.form2.ProcessShort).then(response => {
|
||||
editProcess(this.ProcessNum, this.form2.Process, this.form2.ProcessShort, this.form2.Requirement).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.dialogFormVisible4 = true
|
||||
|
||||
@@ -46,12 +46,12 @@
|
||||
{{ scope.row.终端编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开始加工时间" show-overflow-tooltip align="center" width="90px">
|
||||
<el-table-column label="开始时间" show-overflow-tooltip align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开始加工时间 ? scope.row.开始加工时间.split(' ')[0] : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作者" prop="姓名" show-overflow-tooltip align="center" width="60px">
|
||||
<el-table-column label="操作者" prop="姓名" show-overflow-tooltip align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
@@ -112,7 +112,7 @@
|
||||
{{ scope.row.MES终端编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作者" show-overflow-tooltip prop="姓名" align="center" width="60px">
|
||||
<el-table-column label="操作者" show-overflow-tooltip prop="姓名" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 150px" clearable/>
|
||||
<el-checkbox v-model="check" class="remeberPassword">查询全部</el-checkbox>
|
||||
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="pageCurrent=1;pageSize=50;searchTable()">查询</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
|
||||
<el-button size="small" type="success" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border @sort-change="sortChange">
|
||||
|
||||
@@ -310,7 +310,7 @@
|
||||
</el-col>
|
||||
</el-card>
|
||||
</el-row>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="新增请购单" center style="min-height: 300px" width="300px">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="新增请购单" center style="min-height: 300px" width="350px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="请购车间" prop="请购车间">
|
||||
<el-input
|
||||
|
||||
@@ -1,576 +1,455 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col style="width: 290px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-button type="distribution" style="margin: 10px 10px 3px 0" icon="el-icon-circle-plus-outline" size="small" @click="addProcessClassification()">新增</el-button>
|
||||
<el-button size="small" style="margin: 10px 10px 3px 0" type="warning" icon="el-icon-edit-outline" plain @click="editProcessClassification()">编辑</el-button>
|
||||
<el-button size="small" style="margin: 10px 0 3px 0" type="danger" icon="el-icon-delete" plain @click="delProcessClassification()">删除</el-button>
|
||||
<el-table v-loading="loading1" ref="multipleTable" :data="tableData1" size="mini" highlight-current-row stripe border tooltip-effect="dark" style="width: 100%" height="600">
|
||||
<el-table-column align="center" label=" " width="50px">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row.工艺分类流水号" v-model="radio" @change.native="getCurrentRow(scope.row.工艺分类流水号, scope.row.工艺分类名称)">
|
||||
{{ a }}
|
||||
</el-radio>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工艺分类">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺分类名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col style="width: 550px;">
|
||||
<el-card>
|
||||
<el-button type="primary" plain style="margin: 10px 0 3px 0" icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺名称</el-button>
|
||||
<el-table :data="tableData2" :row-key="getRowKeys" size="mini" highlight-current-row stripe border height="600" width="100%">
|
||||
<!--<el-table-column type="expand" label="详情">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-table :data="tableData3" class="subTableHeader" border stripe size="mini" style="width: 40%">-->
|
||||
<!--<el-table-column label="工艺要求" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.工艺要求 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="操作" align="center" >-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-tooltip effect="dark" content="编辑" placement="top">-->
|
||||
<!--<div style="display: inline-block">-->
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="text"-->
|
||||
<!--icon="el-icon-edit-outline"-->
|
||||
<!--@click="editTechnologicalRequirements(scope.row)"/>-->
|
||||
<!--</div>-->
|
||||
<!--</el-tooltip>-->
|
||||
<!--<el-tooltip effect="dark" content="删除" placement="top">-->
|
||||
<!--<div style="display: inline-block">-->
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="text"-->
|
||||
<!--style="margin-left: 20px"-->
|
||||
<!--icon="el-icon-delete"-->
|
||||
<!--@click="delTechnologicalRequirements(scope.row)"/>-->
|
||||
<!--</div>-->
|
||||
<!--</el-tooltip>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--</el-table>-->
|
||||
<!--</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="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button type="text" size="mini" icon="el-icon-edit-outline" style="margin-left: 10px" @click="editProcess(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button type="text" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="delProcess(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<!--<el-button size="mini" type="primary" plain icon="el-icon-circle-plus-outline" @click="addTechnologicalRequirements(scope.row)">新增要求</el-button>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="新增工艺分类" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺分类" prop="ProcessClassification">
|
||||
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-card style="padding: 3px">
|
||||
<el-input v-model="equipmentName" placeholder="设备名称" size="small" clearable style="width:200px;margin-left: 0px"/>
|
||||
<!--<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: 20px" plain @click="PageSize = 10;PageCurrent = 1;fetchData()">查询</el-button>
|
||||
<el-tooltip effect="dark" content="添加新设备" placement="top">
|
||||
<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-->
|
||||
<!-- v-model="time"-->
|
||||
<!-- type="date"-->
|
||||
<!-- size="small"-->
|
||||
<!-- 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="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="primary" size="small" icon="el-icon-edit-outline" plain style="margin-left:10px" @click="generate">生成设备加工能力</el-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="List" border size="small" stripe highlight-current-row height="700px" style="width: 570px">
|
||||
<el-table-column label="设备名称" prop="设备名称" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备编号" prop="设备编号" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备型号" rop="设备型号" align="center" width="120px" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="设备性能指标" align="center" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.设备性能指标 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="设备加工能力" align="center" >-->
|
||||
<!-- <template slot-scope="scope">p-->
|
||||
<!-- {{ scope.row.设备加工能力工时 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="设备加工工艺" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺属性 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="班次类型" align="center" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.班次类型 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="设备工时系数" align="center" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.设备工时系数 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="整改工时系数" align="center" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.整改工时比例 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="预留工时系数" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.设备预留工时系数 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" width="70px">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="mini" icon="el-icon-edit" style="margin-left:5px" @click="handleEdit(scope.row)"/>
|
||||
<el-button type="text" size="mini" icon="el-icon-delete" style="margin-left:5px" @click="handleDelete(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div class="block" style="margin-top: 10px;">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- :current-page="pageCurrent"-->
|
||||
<!-- :page-sizes="[10, 20, 30, 40]"-->
|
||||
<!-- :page-size="pageSize"-->
|
||||
<!-- :total="total"-->
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!-- @size-change="handleSizeChange"-->
|
||||
<!-- @current-change="handleCurrentChange"/>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
<!-- <el-card>-->
|
||||
<!-- <span>有效时间:</span>-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="time"-->
|
||||
<!-- type="date"-->
|
||||
<!-- size="small"-->
|
||||
<!-- 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" @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" @click="generate">生成设备加工能力</el-button>-->
|
||||
<!-- </el-tooltip>-->
|
||||
<!-- </el-card>-->
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="设备名称" prop="设备名称" >
|
||||
<el-input v-model="form.设备名称" placeholder="设备名称" size="small" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="设备编号" prop="设备编号" >
|
||||
<el-input v-model="form.设备编号" placeholder="设备编号" size="small" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="设备型号" prop="设备型号" >
|
||||
<el-input v-model="form.设备型号" placeholder="设备型号" size="small" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="设备加工工艺" prop="设备加工工艺" >
|
||||
<el-select v-model="form.设备加工工艺" placeholder="设备加工工艺" filterable size="small" style="width:200px" clearable >
|
||||
<el-option
|
||||
v-for="item in processingName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="false">
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="设备加工能力" prop="设备加工能力" >
|
||||
<el-input v-model="form.设备加工能力" placeholder="设备加工能力" size="small" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="设备性能指标" prop="设备性能指标" >
|
||||
<el-input v-model="form.设备性能指标" placeholder="设备性能指标" size="small" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="false">
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="班次类型" prop="班次类型" >
|
||||
<el-select v-model="form.班次类型" placeholder="班次类型" size="small" style="width:200px" clearable >
|
||||
<el-option
|
||||
v-for="item in typeOfShift"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="设备工时系数" prop="设备工时系数" >
|
||||
<el-input v-model="form.设备工时系数" placeholder="设备工时系数" size="small" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-show="false">
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="整改工时系数" prop="整改工时系数" >
|
||||
<el-input v-model="form.整改工时系数" placeholder="整改工时系数" size="small" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span = "12">
|
||||
<el-form-item label="预留工时系数" prop="预留工时系数" >
|
||||
<el-input v-model="form.预留工时系数" placeholder="预留工时系数" size="small" style="width:200px" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible2" title="编辑工艺分类" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺分类" prop="ProcessClassification">
|
||||
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible3" title="新增工艺" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺名称" prop="Process">
|
||||
<el-input v-model="form2.Process" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺名称简称" prop="ProcessShort">
|
||||
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form2')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="编辑工艺" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺名称" prop="Process">
|
||||
<el-input v-model="form2.Process" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺名称简称" prop="ProcessShort">
|
||||
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺要求" prop="Process">
|
||||
<el-input v-model="form2.Requirement" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form2')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible5" title="新增工艺要求" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺要求" prop="Process">
|
||||
<el-input v-model="form3.TechnologicalRequirements" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form3')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible6" title="编辑工艺要求" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="110px" >
|
||||
<el-form-item label="工艺要求" prop="TechnologicalRequirements">
|
||||
<el-input v-model="form3.TechnologicalRequirements" size="small" clearable style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="calloff">取 消</el-button>
|
||||
<el-button type="primary" @click="submit1('form3')">确 定</el-button>
|
||||
<el-button @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchProcessClassification, searchProcessNameOfProcessClassification, searchTechnologicalRequirementsOfProcessNum, searchProcessClassificationOfProcessClassificationNum, addProcessClassification, editProcessClassification, delProcessClassification, addProcess, delProcess, editProcess, addTechnologicalRequirements, editTechnologicalRequirements, delTechnologicalRequirements } from '@/api/BasicData/WorkshopProcessMaintenance'
|
||||
import { getData, initProcessing, addTable, editTable, deleteTable, setUp, generate } from '@/api/ManufacturingCenter/WorkshopEquipmentManagement'
|
||||
import { getNowTime } from '@/utils/tool'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 工艺分类所需变量
|
||||
a: '',
|
||||
expands: [],
|
||||
tableData1: [],
|
||||
ProcessNum: '',
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
loading3: false,
|
||||
ProcessClassificationNum: '',
|
||||
radio: null,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible5: false,
|
||||
dialogFormVisible6: false,
|
||||
temp: null,
|
||||
ProcessClassificationNumS: '',
|
||||
form1: {
|
||||
ProcessClassification: ''
|
||||
equipmentName: '', // 设备名称
|
||||
List: [],
|
||||
check: 0,
|
||||
time: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
title: '',
|
||||
dialogFormVisible: false,
|
||||
processingName: [],
|
||||
processing1: '', // 工艺名称简称
|
||||
equipmentSerialNumber: '', // 设备流水号
|
||||
typeOfShift: [
|
||||
{ value: '0', label: 0 },
|
||||
{ value: '1', label: 1 },
|
||||
{ value: '2', label: 2 },
|
||||
{ value: '3', label: 3 },
|
||||
{ value: '4', label: 4 }],
|
||||
form: {
|
||||
设备名称: '',
|
||||
设备编号: '',
|
||||
设备型号: '',
|
||||
设备性能指标: '',
|
||||
设备加工能力: '',
|
||||
设备加工工艺: '',
|
||||
班次类型: '',
|
||||
设备工时系数: '',
|
||||
整改工时系数: '',
|
||||
预留工时系数: ''
|
||||
},
|
||||
form2: {
|
||||
Process: '',
|
||||
ProcessShort: '',
|
||||
Requirement: ''
|
||||
},
|
||||
form3: {
|
||||
TechnologicalRequirements: ''
|
||||
},
|
||||
rules1: {
|
||||
ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }]
|
||||
},
|
||||
rules2: {
|
||||
Process: [{ required: true, message: '请输入工艺名称', trigger: 'blur' }],
|
||||
ProcessShort: [{ required: true, message: '请输入工艺名称简称', trigger: 'blur' }]
|
||||
},
|
||||
rules3: {
|
||||
TechnologicalRequirements: [{ required: true, message: '请输入工艺要求', trigger: 'blur' }]
|
||||
},
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
Num: [],
|
||||
maxNum: '',
|
||||
max: [],
|
||||
code: ''
|
||||
rules: {
|
||||
设备名称: [{ required: true, message: '请选择设备名称', change: 'blur' }],
|
||||
设备编号: [{ required: true, message: '请选择设备编号', change: 'blur' }],
|
||||
设备型号: [{ required: true, message: '请选择设备型号', change: 'blur' }],
|
||||
设备加工工艺: [{ required: true, message: '请选择设备加工工艺', trigger: 'blur' }]
|
||||
// 设备加工能力: [{ required: true, message: '请选择设备加工能力', change: 'blur' }],
|
||||
// 班次类型: [{ required: true, message: '请选择班次类型', trigger: 'blur' }],
|
||||
// 设备工时系数: [{ required: true, message: '请选择设备工时系数', change: 'blur' }],
|
||||
// 整改工时系数: [{ required: true, message: '请选择整改工时系数', change: 'blur' }],
|
||||
// 预留工时系数: [{ required: true, message: '请选择预留工时系数', change: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchProcessClassification()
|
||||
this.initialization()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
searchProcessClassification() {
|
||||
this.loading1 = true
|
||||
searchProcessClassification().then(response => {
|
||||
this.loading1 = false
|
||||
this.tableData1 = response.data
|
||||
this.total1 = response.data
|
||||
return this.tableData1
|
||||
}).then(data => {
|
||||
this.Num = data
|
||||
this.max = []
|
||||
for (let i = 0; i < this.Num.length; i++) {
|
||||
this.max.push(this.Num[i].工艺分类流水号)
|
||||
}
|
||||
return this.max
|
||||
}).then(data => {
|
||||
const a = data
|
||||
this.maxNum = a[0]
|
||||
for (let j = 0; j < a.length; j++) {
|
||||
if (this.maxNum < a[j]) {
|
||||
this.maxNum = a[j]
|
||||
}
|
||||
}
|
||||
return this.maxNum
|
||||
}).then(data => {
|
||||
const b = data
|
||||
this.radio = b
|
||||
return this.radio
|
||||
}).then(data => {
|
||||
const c = data
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(c).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
})
|
||||
},
|
||||
addProcessClassification() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1 = {}
|
||||
this.dialogFormVisible1 = true
|
||||
this.temp = 1
|
||||
},
|
||||
editProcessClassification() {
|
||||
if (this.radio !== '') {
|
||||
this.temp = 2
|
||||
this.dialogFormVisible2 = true
|
||||
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {
|
||||
this.form1.ProcessClassification = response.data[0].工艺分类名称
|
||||
})
|
||||
fetchData() {
|
||||
this.List = []
|
||||
if (this.equipmentName !== '') {
|
||||
this.check = 1
|
||||
} else {
|
||||
this.$message.warning('请选择工艺分类')
|
||||
this.check = 0
|
||||
}
|
||||
getData(this.check, this.equipmentName, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.List = response.data
|
||||
// this.total = response.data.total
|
||||
})
|
||||
},
|
||||
submitProcessClassification() {
|
||||
editProcessClassification(this.radio, this.form1.ProcessClassification).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.dialogFormVisible2 = false
|
||||
this.searchProcessClassification()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
initialization() {
|
||||
initProcessing().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processingName.push({
|
||||
label: response.data[i].工艺名称,
|
||||
value: response.data[i].工艺编号,
|
||||
processing: response.data[i].工艺名称简称
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submitaddProcessClassification() {
|
||||
addProcessClassification(this.form1.ProcessClassification).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.searchProcessClassification()
|
||||
this.dialogFormVisible1 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
handleAdd() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.title = '新增车间设备'
|
||||
this.form = {
|
||||
设备名称: '',
|
||||
设备编号: '',
|
||||
设备型号: '',
|
||||
设备加工工艺: ''
|
||||
}
|
||||
this.form.设备性能指标 = 1
|
||||
this.form.设备加工能力 = 1
|
||||
this.form.班次类型 = 1
|
||||
this.form.设备工时系数 = 1
|
||||
this.form.整改工时系数 = 0
|
||||
this.form.预留工时系数 = 0
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
submit1(formName) {
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.title = '编辑'
|
||||
this.dialogFormVisible = true
|
||||
this.form.设备名称 = row.设备名称
|
||||
this.form.设备编号 = row.设备编号
|
||||
this.form.设备型号 = row.设备型号
|
||||
this.form.设备性能指标 = row.设备性能指标
|
||||
this.form.设备加工能力 = row.设备加工能力工时
|
||||
this.form.设备加工工艺 = parseInt(row.工艺属性代码)
|
||||
this.form.班次类型 = row.班次类型
|
||||
this.form.设备工时系数 = row.设备工时系数
|
||||
this.form.整改工时系数 = row.整改工时比例
|
||||
this.form.预留工时系数 = row.设备预留工时系数
|
||||
this.equipmentSerialNumber = row.设备流水号
|
||||
},
|
||||
submit(formName) {
|
||||
console.log(this.title)
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.submitaddProcessClassification()
|
||||
this.form1 = {
|
||||
ProcessClassification: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 2) {
|
||||
this.submitProcessClassification()
|
||||
this.form1 = {
|
||||
ProcessClassification: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 3) {
|
||||
this.submitaddProcess()
|
||||
this.form2 = {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 4) {
|
||||
this.submiteditProcess()
|
||||
this.form2 = {
|
||||
Process: '',
|
||||
ProcessShort: '',
|
||||
Requirement: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 5) {
|
||||
this.submitTechnologicalRequirements()
|
||||
this.form3 = {
|
||||
TechnologicalRequirements: ''
|
||||
}
|
||||
this.temp = null
|
||||
} else if (this.temp === 6) {
|
||||
this.submiteditTechnologicalRequirements()
|
||||
this.form3 = {
|
||||
TechnologicalRequirements: ''
|
||||
}
|
||||
this.temp = null
|
||||
if (this.title === '增加') {
|
||||
this.submitAdd()
|
||||
} else if (this.title === '编辑') {
|
||||
this.submitEdit()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
delProcessClassification() {
|
||||
if (this.radio !== '') {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delProcessClassification(this.radio).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.searchProcessClassification()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择工艺分类')
|
||||
submitAdd() {
|
||||
for (let i = 0; i < this.processingName.length; i++) {
|
||||
if (this.form.设备加工工艺 === this.processingName[i].value) {
|
||||
this.processing1 = this.processingName[i].processing
|
||||
}
|
||||
}
|
||||
},
|
||||
calloff() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
this.dialogFormVisible3 = false
|
||||
this.dialogFormVisible4 = false
|
||||
this.dialogFormVisible5 = false
|
||||
this.dialogFormVisible6 = false
|
||||
this.form1 = {
|
||||
ProcessClassification: ''
|
||||
}
|
||||
this.form2 = {
|
||||
Process: '',
|
||||
ProcessShort: ''
|
||||
}
|
||||
this.form3 = {
|
||||
TechnologicalRequirements: ''
|
||||
}
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
searchProcessClassificationOfProcessClassificationNum(this.radio).then(response => {
|
||||
this.form1.ProcessClassification = response.data[0].工艺分类名称
|
||||
})
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(row).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
searchTechnologicalRequirementsOfProcessNum(row, expandedRows) {
|
||||
// this.expands = []
|
||||
// this.expands.push(row.工艺编号)
|
||||
if (expandedRows.length > 1) {
|
||||
expandedRows.shift()
|
||||
}
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
addProcess() {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
if (this.radio !== '') {
|
||||
this.form2.Process = ''
|
||||
this.form2.ProcessShort = ''
|
||||
this.dialogFormVisible3 = true
|
||||
this.temp = 3
|
||||
} else {
|
||||
this.$message.warning('请选择一个工艺分类')
|
||||
}
|
||||
},
|
||||
submitaddProcess() {
|
||||
addProcess(this.radio, this.form2.Process, this.form2.ProcessShort).then(response => {
|
||||
addTable(this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备加工能力, this.form.设备工时系数, this.processing1, this.form.设备加工工艺, this.form.班次类型, this.form.整改工时系数, this.form.设备编号, this.form.预留工时系数).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible3 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
},
|
||||
editProcess(row) {
|
||||
this.dialogFormVisible4 = true
|
||||
this.temp = 4
|
||||
this.form2.Process = row.工艺名称
|
||||
this.form2.ProcessShort = row.工艺名称简称
|
||||
this.ProcessNum = row.工艺编号
|
||||
},
|
||||
submiteditProcess() {
|
||||
editProcess(this.ProcessNum, this.form2.Process, this.form2.ProcessShort, this.form2.Requirement).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.dialogFormVisible4 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.dialogFormVisible4 = false
|
||||
this.dialogFormVisible = false
|
||||
this.fetchData()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
this.$message.error('信息添加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
getRowKeys(row) {
|
||||
return row.工艺编号
|
||||
ADD() {
|
||||
this.addForm('form')
|
||||
this.dialogFormVisible = true
|
||||
this.form.contractSigningDate = getNowTime()// new Date()
|
||||
this.temp = 1
|
||||
this.title = '增加'
|
||||
},
|
||||
delProcess(row) {
|
||||
this.$confirm('此操作将永久删除' + row.工艺名称 + '行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delProcess(row.工艺编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.loading2 = true
|
||||
searchProcessNameOfProcessClassification(this.radio).then(response => {
|
||||
this.loading2 = false
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
addTechnologicalRequirements(row) {
|
||||
if (this.$refs['form3'] !== undefined) {
|
||||
this.$refs['form3'].resetFields()
|
||||
}
|
||||
this.ProcessNum = row.工艺编号
|
||||
this.form3.TechnologicalRequirements = ''
|
||||
this.dialogFormVisible5 = true
|
||||
this.temp = 5
|
||||
},
|
||||
submitTechnologicalRequirements() {
|
||||
if (this.form3.TechnologicalRequirements !== '') {
|
||||
addTechnologicalRequirements(this.ProcessNum, this.form3.TechnologicalRequirements).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.dialogFormVisible5 = false
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请输入工艺要求')
|
||||
this.dialogFormVisible5 = false
|
||||
}
|
||||
},
|
||||
editTechnologicalRequirements(row) {
|
||||
this.temp = 6
|
||||
this.dialogFormVisible6 = true
|
||||
this.form3.TechnologicalRequirements = row.工艺要求
|
||||
this.code = row.工艺要求流水号
|
||||
this.ProcessNum = row.工艺编号
|
||||
},
|
||||
submiteditTechnologicalRequirements() {
|
||||
editTechnologicalRequirements(this.code, this.form3.TechnologicalRequirements).then(response => {
|
||||
submitEdit() {
|
||||
console.log(2323)
|
||||
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') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息编辑成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.dialogFormVisible6 = false
|
||||
this.dialogFormVisible = false
|
||||
this.title = ''
|
||||
this.fetchData()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
this.$message.error('信息编辑失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
delTechnologicalRequirements(row) {
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delTechnologicalRequirements(row.工艺要求流水号).then(response => {
|
||||
if (this.List && this.List.length === 1 && this.pageCurrent > 1) {
|
||||
this.pageCurrent--
|
||||
}
|
||||
deleteTable(row.设备流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.loading3 = true
|
||||
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
this.fetchData()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
setUp() {
|
||||
if (this.time !== '') {
|
||||
setUp(this.time).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('设定成功')
|
||||
} else { this.$message.error('设定失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择有效时间')
|
||||
}
|
||||
},
|
||||
generate() {
|
||||
generate().then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成成功')
|
||||
} else { this.$message.error('生成失败') }
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/*.el-card {*/
|
||||
/* margin-top: 15px;*/
|
||||
/* margin-left: 15px;*/
|
||||
/* }!**!*/
|
||||
|
||||
.el-card{
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
/*.el-button--success {*/
|
||||
/* background: #ecf5ff;*/
|
||||
/* border-color: #2d72d5;*/
|
||||
/* color: #2d72d5;*/
|
||||
/*}*/
|
||||
/*.el-button--primary {*/
|
||||
/* background: #fdf6ec;*/
|
||||
/* border-color: #ff9759;*/
|
||||
/* color: #ff9759;*/
|
||||
/*}*/
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.subTableHeader {
|
||||
th {
|
||||
background: #8ff4ea !important;
|
||||
color: black;
|
||||
.button111{
|
||||
background:rgb(253,246,236);
|
||||
border-color: #ff9759;
|
||||
color: #ff9759;
|
||||
&:hover{
|
||||
background: #ff9759;
|
||||
border-color: #ff9759;
|
||||
color: white;
|
||||
}
|
||||
|
||||
tr.el-table__row td {
|
||||
background-color: #d8e5f6 !important;
|
||||
}
|
||||
|
||||
tr.el-table__row.el-table__row--striped td {
|
||||
background: #e9f0f9 !important;
|
||||
&:focus{
|
||||
background: #ff9759;
|
||||
border-color: #ff9759;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
border
|
||||
stripe
|
||||
size="mini">
|
||||
<el-table-column align="center" label="投标结果" prop="投标结果" width="190">
|
||||
<el-table-column align="center" label="投标结果" prop="投标结果" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-radio-group v-model="scope.row.投标结果" @change="changeTenderResult(scope.row)">
|
||||
<el-radio :disabled="scope.row.是否禁用已中标" label="1">已中标</el-radio>
|
||||
<el-radio :disabled="scope.row.是否禁用未中标" label="2">未中标</el-radio>
|
||||
<el-radio :disabled="scope.row.是否禁用已中标" label="1">中标</el-radio>
|
||||
<el-radio :disabled="scope.row.是否禁用未中标" label="2">未中</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -106,11 +106,11 @@
|
||||
{{ Number(scope.row.转履约保证金金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="应收回(万元)" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.应收回金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="应收回(万元)" width="80">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ Number(scope.row.应收回金额).toFixed(2) }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="已收回(万元)" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="parseInt(scope.row.是否收回) === 2" size="mini" type="success" style="width: 66px">{{ scope.row.应收回金额 }}</span>
|
||||
@@ -424,17 +424,17 @@
|
||||
<el-input-number v-model="PerformanceBondform.保证金金额" :precision="2" :step="1" :min="0" :max="PerformanceBondform.保证金金额max" style="width: 200px" size="small"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="保证金类型" prop="保证金类型">
|
||||
<el-select v-model="PerformanceBondform.保证金类型" filterable placeholder="请选择保证金类型" style="width: 200px" size="small">
|
||||
<el-option
|
||||
v-for="item in TypeOfGoldDeposit1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-form-item label="保证金类型" prop="保证金类型">-->
|
||||
<!-- <el-select v-model="PerformanceBondform.保证金类型" filterable placeholder="请选择保证金类型" style="width: 200px" size="small">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in TypeOfGoldDeposit1"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-row>-->
|
||||
<el-row>
|
||||
<el-form-item label="收回条件" prop="收回条件">
|
||||
<el-select v-model="PerformanceBondform.收回条件" filterable placeholder="请选择收回条件" style="width: 200px" size="small">
|
||||
@@ -678,8 +678,8 @@ export default {
|
||||
}
|
||||
if (val.length !== 0) {
|
||||
import('@/vendor/Export2Excel').then(excel => {
|
||||
const tHeader = ['投标结果', '公布日期', '招标企业', '项目名称', '保证金金额(万元)', '缴纳时间', '投标人', '中标服务费(万元)', '转履约保证金(万元)', '应收(万元)', '已收(万元)', '未收(万元)', '保证金备注']
|
||||
const filterVal = ['投标结果', '公布日期', '招标企业', '项目名称', '保证金金额', '投标日期', '投标人', '中标服务费', '转履约保证金金额', '应收回金额', '产品品种代码', '未收金额', '备注']
|
||||
const tHeader = ['投标结果', '公布日期', '招标企业', '项目名称', '保证金金额(万元)', '缴纳时间', '投标人', '中标服务费(万元)', '转履约保证金(万元)', '应收(万元)', '已收(万元)', '未收(万元)', '保金类型', '联系人', '联系电话', '保证金备注']
|
||||
const filterVal = ['投标结果', '公布日期', '招标企业', '项目名称', '保证金金额', '投标日期', '投标人', '中标服务费', '转履约保证金金额', '应收回金额', '产品品种代码', '未收金额', '保证金类型', '联系人', '联系电话', '备注']
|
||||
const list = val.data
|
||||
const data = this.formatJson(filterVal, list)
|
||||
excel.export_json_to_excel({
|
||||
|
||||
@@ -10,18 +10,30 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="customerName1" clearable size="small" style="width:200px;margin: 0px 10px" placeholder="合同编号或客户名称" @keyup.enter.native="PageSize = 30;PageCurrent = 1;fetchTableData1()"/>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
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" icon="el-icon-search" size="small" style="margin-left: 10px" plain @click="PageSize = 30;PageCurrent = 1;fetchTableData1()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-col :span="17.8">
|
||||
<el-table v-loading="listLoading" :data="tableData1" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" stripe highlight-current-row style="margin-top: 3px;width: 985px" height="580" border size="mini" @row-click="selectMachine">
|
||||
<el-table-column align="center" label="项目名称" prop="项目名称" width="130" show-overflow-tooltip>
|
||||
<el-col :span="16.5">
|
||||
<el-table v-loading="listLoading" :data="tableData1" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" stripe highlight-current-row style="margin-top: 3px;width: 935px" height="580" border size="mini" @row-click="selectMachine">
|
||||
<el-table-column align="center" label="项目名称" prop="项目名称" width="110" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="客户名称" prop="客户名称" width="150" show-overflow-tooltip>
|
||||
<el-table-column align="center" label="客户名称" prop="客户名称" width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
@@ -80,23 +92,33 @@
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6.3">
|
||||
<el-col :span="6.5">
|
||||
<el-table :data="tableData2" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" class="subTableHeader" border style="text-align: center" size="mini">
|
||||
<el-table-column label="设备型号" align="center" width="100" show-overflow-tooltip>
|
||||
<el-table-column label="机床图号" align="center" width="80" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" align="center" min-width="180" show-overflow-tooltip>
|
||||
<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="80">
|
||||
<el-table-column label="数量" align="center" width="50">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="进程" align="center" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床状态 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货时间" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发出时间.split(' ')[2] + '/' + scope.row.发出时间.split(' ')[0] + '/' + scope.row.发出时间.split(' ')[1] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-card>
|
||||
@@ -613,6 +635,34 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dateRange: '',
|
||||
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])
|
||||
}
|
||||
}]
|
||||
},
|
||||
customerName1: '',
|
||||
customerName1_check: '',
|
||||
tableDataLoadingDeliveryManagement: false,
|
||||
@@ -696,6 +746,9 @@ export default {
|
||||
this.peoplename = row.姓名
|
||||
},
|
||||
fetchTableData1() {
|
||||
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
|
||||
this.startTime = this.dateRange[0] ? this.dateRange[0] : null
|
||||
this.endTime = this.dateRange[1] ? this.dateRange[1] : null
|
||||
if (this.customerName1 === '' || this.customerName1 === null) { this.customerName1_check = 0 } else { this.customerName1_check = 1 }
|
||||
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
|
||||
if (this.MarketingManagerValue === '' || this.MarketingManagerValue === null) { this.peopleid_check = 0 } else { this.peopleid_check = 1 }
|
||||
|
||||
@@ -384,7 +384,7 @@ export default {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(2) + ' 元'
|
||||
sums[index] = sums[index].toFixed(2) + ' 万元'
|
||||
} else {
|
||||
sums[index] = '0'
|
||||
}
|
||||
|
||||
@@ -286,11 +286,11 @@
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-form-item label="客户名称" prop="客户名称">
|
||||
<el-input v-model="form.客户名称" readonly size="small" placeholder="请双击选择客户" style="width:200px" clearable @dblclick.native="CustomerChange()" @clear="clearCustomer()"/>
|
||||
<el-input v-model="form.客户名称" class="num" readonly size="small" placeholder="请双击选择客户" style="width:200px" clearable @dblclick.native="CustomerChange()" @clear="clearCustomer()"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="开票金额(万元)" prop="开票金额">
|
||||
<el-input v-model="form.开票金额" clearable size="small" placeholder="请输入开票金额" style="width:200px"/>
|
||||
<el-input v-model="form.开票金额" clearable size="small" placeholder="请输入开票金额" style="width:200px" @blur="checkNumber()" />
|
||||
</el-form-item>
|
||||
<el-form-item label="开票时间" prop="开票时间">
|
||||
<el-date-picker
|
||||
@@ -492,6 +492,10 @@ export default {
|
||||
this.fetchTableData1()
|
||||
},
|
||||
methods: {
|
||||
checkNumber() {
|
||||
// content.withdrawAmount = (withdrawAmount.match(/^\d*(\.?\d{0,2})/g)[0]) || null
|
||||
this.form.开票金额 = Number(this.form.开票金额).toFixed(2)
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
@@ -625,7 +629,7 @@ export default {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(2) + ' 元'
|
||||
sums[index] = sums[index].toFixed(2) + ' 万元'
|
||||
} else {
|
||||
sums[index] = '0'
|
||||
}
|
||||
|
||||
@@ -90,9 +90,9 @@
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协价格" align="center" width="130px">
|
||||
<el-table-column label="外协价格(元)" align="center" width="130px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-positive="'float'" v-model="scope.row.加工价格_成交" type="float" size="small"/>
|
||||
<el-input v-positive="'float'" v-model="scope.row.加工价格_成交" type="float" style="text-align: right" size="small"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机加工开始时间" align="center" width="150px">
|
||||
@@ -341,7 +341,7 @@ export default {
|
||||
this.List3.push({
|
||||
外协加工任务单明细流水号: response.data[i].外协加工任务单明细流水号,
|
||||
加工价格_成交: response.data[i].加工价格_成交.toFixed(2),
|
||||
机加工开始时间: response.data[i].机加工开始时间,
|
||||
机加工开始时间: response.data[i].机加工开始时间 ? response.data[i].机加工开始时间.split(' ')[0] : '',
|
||||
零件图号: response.data[i].零件图号,
|
||||
零件名称: response.data[i].零件名称,
|
||||
批次数量: response.data[i].批次数量,
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总额" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
{{ Number(scope.row.金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -118,6 +118,7 @@ export default {
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.tableData = []
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue).then(response => {
|
||||
this.loading = false
|
||||
@@ -127,7 +128,19 @@ export default {
|
||||
response.data.rows[i].物料型号 = response.data.rows[i].零件图号
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData.push({
|
||||
采购合同编号: response.data.rows[i].采购合同编号,
|
||||
供应商名称: response.data.rows[i].供应商名称,
|
||||
物料型号: response.data.rows[i].物料型号,
|
||||
物料名称: response.data.rows[i].物料名称,
|
||||
数量: response.data.rows[i].数量,
|
||||
单价: Number(response.data.rows[i].单价).toFixed(2),
|
||||
金额: response.data.rows[i].金额
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log(this.tableData)
|
||||
this.total = response.data.total
|
||||
})
|
||||
|
||||
@@ -15,32 +15,32 @@
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData" stripe border style="width: 100%;max-height: 600px;margin-top: 10px" height="600px" size="mini">
|
||||
<el-table-column label="采购合同编号" align="center" min-width="100">
|
||||
<el-table-column label="采购合同编号" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="100">
|
||||
<el-table-column label="零件名称" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.组件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<el-table-column label="图号或型号" align="center" width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料或规格" align="center" min-width="100">
|
||||
<el-table-column label="材料或规格" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 ? scope.row.材料 : scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购总数量" align="center" min-width="100">
|
||||
<el-table-column label="采购总数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" min-width="100">
|
||||
<el-table-column label="已到货数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 }}
|
||||
</template>
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划完成日期" align="center" width="110">
|
||||
<el-table-column label="计划完成" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划完成日期.split(' ')[0] }}
|
||||
</template>
|
||||
@@ -156,7 +156,7 @@
|
||||
</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>
|
||||
<el-button size="mini" type="text" style="margin-left: 10px" icon="el-icon-printer" @click="exportExcel(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
|
||||
@@ -972,6 +972,25 @@ export default {
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
}
|
||||
.el-form--label-left >>> .el-form-item__label {
|
||||
text-align: right;
|
||||
}
|
||||
>>>.el-dialog--center .el-dialog__body {
|
||||
text-align: initial;
|
||||
padding: 20px 30px 20px
|
||||
}
|
||||
>>>.el-dialog__header {
|
||||
padding: 20px 20px 0px;
|
||||
}
|
||||
>>>.el-dialog__footer {
|
||||
padding: 0px 20px 20px;
|
||||
/*text-align: right;*/
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
>>>.el-form-item {
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.button111{
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>申请时间:</span>
|
||||
<el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始日期"/> ~
|
||||
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<!-- <span>发票号:</span>-->
|
||||
<el-input v-model="invoiceNum" placeholder="发票号\供应商" size="small" clearable/>
|
||||
<el-button type="primary" size="small" plain icon="el-icon-search" style="margin-left:10px" @click="tableData2=[];total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="createOrder()">到票</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<!--<h4 style="margin-top: 5px">发票结算申请单</h4>-->
|
||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%" height="330" size="mini">
|
||||
<el-table-column label="展开" align="center" type="expand" >
|
||||
<h4 style="margin: 5px">到票结算申请单</h4>
|
||||
<el-table id="expandTable" :data="tableData1" border stripe highlight-current-row style="width: 100%;" height="350px" size="mini" @row-click="searchTable2">
|
||||
<el-table-column label="详情" type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
@@ -41,65 +42,74 @@
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="200">
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" width="170" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发票号" align="center" min-width="118">
|
||||
<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" min-width="70">
|
||||
<el-table-column label="发票金额(元)" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" min-width="85">
|
||||
<el-table-column label="申请人" prop="申请人姓名" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="140">
|
||||
<el-table-column label="申请时间" prop="申请时间" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购审批" align="center" min-width="60">
|
||||
<el-table-column label="采购审批" prop="审批人1姓名" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<el-table-column label="审批时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批1时间 ? scope.row.审批1时间split(' ')[0] : '—' }}
|
||||
{{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务审批" align="center" min-width="60">
|
||||
<el-table-column label="财务审批" prop="审批人2姓名" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<el-table-column label="审批时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批2时间 ? scope.row.审批2时间split(' ')[0] : '—' }}
|
||||
{{ scope.row.审批2时间 ? scope.row.审批2时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||
<el-table-column label="总经理审批" prop="审批人3姓名" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<el-table-column label="审批时间" align="center" min-width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批3时间 ? scope.row.审批3时间split(' ')[0] : '—' }}
|
||||
{{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="160" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button slot="reference" type="text" size="mini" icon="el-icon-search" style="margin-right: 5px" @click="searchTable2(scope.row)">查看详情</el-button>
|
||||
<el-button :disabled="false" type="text" icon="el-icon-check" size="mini" plain @click="excuteApprove(scope.row)">通过</el-button>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="编辑" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="text" icon="el-icon-edit-outline" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="删除" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="text" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="text" icon="el-icon-circle-check" size="mini" style="margin-left:10px" @click="submitApply(scope.row)">提交申请</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -116,24 +126,38 @@
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="明细" center style="min-height: 200px" width="1000px">
|
||||
<el-card>
|
||||
<h4 style="margin: 5px;display: inline-block;width: 150px;">到票结算申请单明</h4>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||
<el-button :disabled="disabled" type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
|
||||
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<el-table-column label="名称" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="180">
|
||||
<el-table-column label="图号或型号" align="center" min-width="100" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="100">
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="100">
|
||||
<el-table-column label="备注" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
|
||||
</template>
|
||||
@@ -143,35 +167,266 @@
|
||||
{{ scope.row.到票数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="删除" placement="top">
|
||||
<div style="display: inline-block">
|
||||
<el-button :disabled="disabled" type="text" size="mini" icon="el-icon-delete" @click="deleteTable2(scope.row)"/>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="680px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发票金额(元)" prop="money">
|
||||
<el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="发票金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商" prop="supplierValue">
|
||||
<el-select v-model="form1.supplierValue" :disabled="title1 === '编辑发票结算申请单'" placeholder="供应商" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尚欠金额(元)">
|
||||
<el-input v-model="form1.unpaid" size="small" placeholder="尚欠金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税额(元)">
|
||||
<el-input v-model="form1.tax" size="small" placeholder="税额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已付款项">
|
||||
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否费用类">
|
||||
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>-->
|
||||
<!--<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">-->
|
||||
<!--<el-upload-->
|
||||
<!--id="invoiceScan"-->
|
||||
<!--ref="upload"-->
|
||||
<!--:auto-upload="false"-->
|
||||
<!--:on-success="uploadSuccess"-->
|
||||
<!--:before-upload="beforeUpload"-->
|
||||
<!--:on-exceed="warningExceed"-->
|
||||
<!--:limit="limit"-->
|
||||
<!--:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"-->
|
||||
<!--list-type="picture-card">-->
|
||||
<!--<i class="el-icon-plus"/>-->
|
||||
<!--</el-upload>-->
|
||||
<!--</el-form-item>-->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
<el-button v-if="title1 === '创建发票结算申请单'" size="small" type="primary" @click="submitAdd1()">确定</el-button>
|
||||
<el-button v-else size="small" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" size="small" placeholder="请选择供应商发票" style="margin: 0 5px 10px 0;" readonly/>
|
||||
<el-radio-group v-show="false" v-model="contractType" size="small" @change="searchTable01()">
|
||||
<el-radio label="采购合同" border/>
|
||||
<el-radio label="离线合同" border/>
|
||||
</el-radio-group>
|
||||
<el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02">
|
||||
<el-table-column label="供应商" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-show="type!==4" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="名称" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到票数量" 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">
|
||||
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table v-show="type===4" ref="multipleTable" :data="tableData03" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="名称" align="center" min-width="150">
|
||||
<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="备注" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到票数量" 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">
|
||||
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
||||
<el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable1, searchTable2, excuteApprove } from '@/api/WorkshopProcurement/InvoiceSettlementApprove1'
|
||||
import { insertInto, searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail, searchPurchaseDetail1,
|
||||
addTable2, deleteTable2 } from '@/api/WorkshopProcurement/InvoiceSettlementApplication1'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { readFile } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
import { uploadInvoiceScan1 } from '@/utils/request'
|
||||
|
||||
export default {
|
||||
name: '', // 发票结算审批
|
||||
name: '', // 发票结算申请
|
||||
data() {
|
||||
return {
|
||||
date1: '',
|
||||
date2: '',
|
||||
tableData1: [],
|
||||
disabled: false,
|
||||
contractType: '采购合同',
|
||||
invoiceNum: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
applyOrderNum: '',
|
||||
invoiceNumber: '',
|
||||
title2: '',
|
||||
dialogVisible2: false,
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
dialogFormVisible: false
|
||||
dialogVisible1: false,
|
||||
title1: '',
|
||||
type: '',
|
||||
supplier: [],
|
||||
supplierName: '',
|
||||
supplierValue: '',
|
||||
form1: {
|
||||
invoiceNum: '',
|
||||
money: '',
|
||||
supplierValue: '',
|
||||
paid: '',
|
||||
unpaid: '',
|
||||
tax: '',
|
||||
isCost: '',
|
||||
remark: '',
|
||||
applyOrderNum: ''
|
||||
},
|
||||
rules1: {
|
||||
invoiceNum: [
|
||||
{ required: true, message: '请输入发票号' }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: '请输入开票金额' }
|
||||
],
|
||||
supplierValue: [
|
||||
{ required: true, message: '请选择供应商' }
|
||||
]
|
||||
},
|
||||
upload: uploadInvoiceScan1,
|
||||
limit: 1,
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
tableData03: [],
|
||||
inboundCardNumber: '', // 入库单号
|
||||
group: [] // 发票结算申请单明细流水号组
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'token',
|
||||
'sidebar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
@@ -183,11 +438,35 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
console.log(this.token)
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
createOrder() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1.invoiceNum = ''
|
||||
this.form1.money = ''
|
||||
this.form1.supplierValue = ''
|
||||
this.form1.paid = ''
|
||||
this.form1.unpaid = ''
|
||||
this.form1.tax = ''
|
||||
this.form1.isCost = ''
|
||||
this.form1.remark = ''
|
||||
this.title1 = '创建发票结算申请单'
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
searchTable1() {
|
||||
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
|
||||
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
let check1
|
||||
this.invoiceNum ? check1 = 1 : check1 = 0
|
||||
searchTable1(check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
@@ -199,16 +478,102 @@ export default {
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
async searchPic(row, i) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 车间采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||
submitAdd1() { // 提交新增
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
insertInto(this.form1.invoiceNum, this.form1.money, this.form1.supplierValue, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
},
|
||||
submitEdit() { // 提交编辑
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
|
||||
if (response.data[0].result === '修改成功') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '修改失败') {
|
||||
this.$message.error('已提交申请,编辑失败')
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1.invoiceNum = row.发票号
|
||||
this.form1.money = row.发票金额
|
||||
this.form1.supplierValue = Number(row.供应商流水号)
|
||||
this.form1.paid = row.已付款项
|
||||
this.form1.unpaid = row.尚欠金额
|
||||
this.form1.tax = row.税额
|
||||
this.form1.isCost = row.是否费用类
|
||||
this.form1.remark = row.备注
|
||||
this.form1.applyOrderNum = row.发票结算申请单流水号
|
||||
this.title1 = '编辑发票结算申请单'
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
submitDelete(row.发票结算申请单流水号).then(response => {
|
||||
if (response.data[0].result === '删除成功') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '删除失败') {
|
||||
this.$message.error('已提交申请,删除失败')
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
async searchPic(row, i) {
|
||||
},
|
||||
warningExceed() {
|
||||
this.$message.error('仅可上传一张发票')
|
||||
},
|
||||
beforeUpload(file) { // 上传前检测
|
||||
const isJPG = /^image\/.*/.test(file.type)
|
||||
const isLt4M = file.size / 1024 / 1024 < 4
|
||||
if (!isJPG) {
|
||||
this.$message.error('只能上传图片。。')
|
||||
}
|
||||
if (!isLt4M) {
|
||||
this.$message.error('上传头像图片大小不能超过 4MB!')
|
||||
}
|
||||
return isJPG && isLt4M
|
||||
},
|
||||
uploadSuccess(res) { // 上传成功回调
|
||||
if (res[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
this.$refs.upload.clearFiles()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
@@ -219,42 +584,169 @@ export default {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
excuteApprove(row) {
|
||||
this.$confirm('确认审批签字?', '提示', {
|
||||
submitApply(row) {
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.warning('发票结算申请明细为空!')
|
||||
} else {
|
||||
this.$confirm('确认提交申请吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
submitApply(row.发票结算申请单流水号, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('提交成功')
|
||||
this.searchTable1()
|
||||
this.tableData2 = []
|
||||
} else { this.$message.error('提交失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.applyOrderNum = row.发票结算申请单流水号
|
||||
this.invoiceNumber = row.发票号
|
||||
this.supplierName = row.供应商名称
|
||||
this.supplierValue = row.供应商流水号
|
||||
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
|
||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
addInStoreRecord() {
|
||||
if (this.applyOrderNum) {
|
||||
this.searchTable01()
|
||||
this.title2 = '追加入库单'
|
||||
this.dialogVisible2 = true
|
||||
} else {
|
||||
this.$message.error('请选择发票!')
|
||||
}
|
||||
},
|
||||
searchTable01() {
|
||||
this.tableData01 = []
|
||||
this.tableData02 = []
|
||||
this.tableData03 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
searchPurchase(this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
} else if (this.contractType === '离线合同') {
|
||||
searchOffline(this.supplierValue).then(response => {
|
||||
response.data.map(data => {
|
||||
if (Number(data.离线合同状态) === 2) {
|
||||
this.tableData01.push(data)
|
||||
}
|
||||
})
|
||||
})
|
||||
this.type = ''
|
||||
}
|
||||
},
|
||||
searchTable02(row) {
|
||||
this.tableData02 = []
|
||||
this.tableData03 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
if (row.模板类型 === 4) {
|
||||
this.type = row.模板类型
|
||||
searchPurchaseDetail1(row.采购合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.已到货数量 - data.到票数量
|
||||
this.tableData03.push(data)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
searchPurchaseDetail(row.采购合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.已到货数量 - data.到票数量
|
||||
this.tableData02.push(data)
|
||||
})
|
||||
})
|
||||
}
|
||||
} else if (this.contractType === '离线合同') {
|
||||
searchOfflineDetail(row.离线合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.到货数量 - data.到票数量
|
||||
this.tableData02.push(data)
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.group = val
|
||||
},
|
||||
submitAdd2() { // 追加入库单
|
||||
if (this.group.length === 0) {
|
||||
this.$message.warning('请选择零件或物料')
|
||||
} else {
|
||||
const group1 = []
|
||||
const group2 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
for (let i = 0; i < this.group.length; i++) {
|
||||
group1.push(this.group[i].采购合同明细流水号)
|
||||
group2.push(this.group[i].本次到票数量)
|
||||
}
|
||||
addTable2(this.applyOrderNum, group1, group2, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('追加成功')
|
||||
this.dialogVisible2 = false
|
||||
searchTable2(this.applyOrderNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else { this.$message.error('追加失败') }
|
||||
})
|
||||
} else if (this.contractType === '离线合同') {
|
||||
for (let i = 0; i < this.group.length; i++) {
|
||||
group1.push(this.group[i].离线合同明细流水号)
|
||||
group2.push(this.group[i].本次到票数量)
|
||||
}
|
||||
addTable2(this.applyOrderNum, group1, group2, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('追加成功')
|
||||
this.dialogVisible2 = false
|
||||
searchTable2(this.applyOrderNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else { this.$message.error('追加失败') }
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteTable2(row) {
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => {
|
||||
if (response.data[0].result === '审批成功') {
|
||||
this.$message.success('审批成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '已完成审批') {
|
||||
this.$message.warning('已完成审批,不可重复审批')
|
||||
} else { this.$message.error('审批失败') }
|
||||
deleteTable2(row.发票结算申请单明细流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
searchTable2(this.applyOrderNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消审批'
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.invoiceNumber = row.发票号
|
||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
this.dialogFormVisible = true
|
||||
})
|
||||
selectable(row) {
|
||||
return Number(row.本次到票数量) > 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
@@ -268,3 +760,4 @@ export default {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
{{ scope.row.重量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额小计(KG)" align="center" prop="总金额" width="130">
|
||||
<el-table-column label="金额小计(元)" align="center" prop="总金额" width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }}
|
||||
</template>
|
||||
|
||||
@@ -186,6 +186,55 @@
|
||||
</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.备注 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -244,6 +293,7 @@ export default {
|
||||
离线采购计划流水号: '',
|
||||
tableData: [],
|
||||
tableData3: [],
|
||||
tableData4: [],
|
||||
arrival: [],
|
||||
judge: []
|
||||
}
|
||||
@@ -521,6 +571,9 @@ export default {
|
||||
searchMX(row.离线采购计划流水号).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
searchMX(row.离线采购计划流水号).then(response => {
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
},
|
||||
saveWeight(index, row) {
|
||||
saveWeight(row.离线采购计划明细流水号, row.成品尺寸, row.备注, row.数量)
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="编辑备料到票" center style="height: 600px" width="400px">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="编辑备料到票" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-width="110px">
|
||||
<el-form-item label="供应商" prop="supplierNameValue">
|
||||
<el-select v-model="form1.supplierNameValue" placeholder="供应商" size="small" filterable @change="Name=form1.supplierNameValue;searchTable4()">
|
||||
@@ -683,6 +683,25 @@ function saveAs(blob, filename = '下载文件.xls') {
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
.el-form--label-left >>> .el-form-item__label {
|
||||
text-align: right;
|
||||
}
|
||||
>>>.el-dialog--center .el-dialog__body {
|
||||
text-align: initial;
|
||||
padding: 20px 30px 20px
|
||||
}
|
||||
>>>.el-dialog__header {
|
||||
padding: 20px 20px 0px;
|
||||
}
|
||||
>>>.el-dialog__footer {
|
||||
padding: 0px 20px 20px;
|
||||
/*text-align: right;*/
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
>>>.el-form-item {
|
||||
margin-bottom: 13px;
|
||||
}
|
||||
span{margin: 1px 0px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
|
||||
@@ -738,10 +738,18 @@ export default {
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
el-button.is-disabled.is-plain, .el-button.is-disabled.is-plain:focus, .el-button.is-disabled.is-plain {
|
||||
background: #9BD7FC;
|
||||
border: 0px
|
||||
}
|
||||
el-button.is-disabled.is-plain, .el-button.is-disabled.is-plain:focus, .el-button.is-disabled.is-plain:hover {
|
||||
background: rgb(238, 238, 238);
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.tableData{
|
||||
height: 30px;
|
||||
border: 0px;
|
||||
}
|
||||
.tableData1{
|
||||
height: 30px;
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
<el-col style="width: 940px">
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" stripe @row-click="searchTable02">
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" width="230" show-overflow-tooltip>
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" width="210" show-overflow-tooltip>
|
||||
<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.请款时间.substr(0,10) }}
|
||||
{{ scope.row.请款时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款人" prop="姓名" align="center" width="100">
|
||||
@@ -50,7 +50,7 @@
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" width="90" prop="请款金额">
|
||||
<el-table-column label="请款金额(元)" align="center" width="110" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user