This commit is contained in:
liushuai
2020-03-10 18:07:49 +08:00
parent 443f8e1ee2
commit 1176ebff24
19 changed files with 1208 additions and 656 deletions

View File

@@ -24,9 +24,9 @@
</el-row> </el-row>
</el-card> </el-card>
</el-col> </el-col>
<el-col style="width: 350px;"> <el-col style="width: 550px;">
<el-card> <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 :data="tableData2" :row-key="getRowKeys" size="mini" highlight-current-row stripe border height="600" width="100%">
<!--<el-table-column type="expand" label="详情">--> <!--<el-table-column type="expand" label="详情">-->
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->
@@ -67,16 +67,21 @@
{{ scope.row.工艺名称 }} {{ scope.row.工艺名称 }}
</template> </template>
</el-table-column> </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="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block"> <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> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block"> <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> </div>
</el-tooltip> </el-tooltip>
<!--<el-button size="mini" type="primary" plain icon="el-icon-circle-plus-outline" @click="addTechnologicalRequirements(scope.row)">新增要求</el-button>--> <!--<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-form-item label="工艺名称简称" prop="ProcessShort">
<el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/> <el-input v-model="form2.ProcessShort" size="small" clearable style="width:200px"/>
</el-form-item> </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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="calloff"> </el-button> <el-button @click="calloff"> </el-button>
@@ -189,7 +197,8 @@ export default {
}, },
form2: { form2: {
Process: '', Process: '',
ProcessShort: '' ProcessShort: '',
Requirement: ''
}, },
form3: { form3: {
TechnologicalRequirements: '' TechnologicalRequirements: ''
@@ -317,7 +326,8 @@ export default {
this.submiteditProcess() this.submiteditProcess()
this.form2 = { this.form2 = {
Process: '', Process: '',
ProcessShort: '' ProcessShort: '',
Requirement: ''
} }
this.temp = null this.temp = null
} else if (this.temp === 5) { } else if (this.temp === 5) {
@@ -430,7 +440,7 @@ export default {
this.ProcessNum = row.工艺编号 this.ProcessNum = row.工艺编号
}, },
submiteditProcess() { 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') { if (response.data[0].result === '1') {
this.$message.success('信息更新成功') this.$message.success('信息更新成功')
this.dialogFormVisible4 = true this.dialogFormVisible4 = true

View File

@@ -46,12 +46,12 @@
{{ scope.row.终端编号 }} {{ scope.row.终端编号 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.开始加工时间 ? scope.row.开始加工时间.split(' ')[0] : '-' }} {{ scope.row.开始加工时间 ? scope.row.开始加工时间.split(' ')[0] : '-' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
@@ -112,7 +112,7 @@
{{ scope.row.MES终端编号 }} {{ scope.row.MES终端编号 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>

View File

@@ -16,7 +16,7 @@
<el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 150px" clearable/> <el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 150px" clearable/>
<el-checkbox v-model="check" class="remeberPassword">查询全部</el-checkbox> <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-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-card> <el-card>
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border @sort-change="sortChange"> <el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 720px" height="720px" border @sort-change="sortChange">

View File

@@ -310,7 +310,7 @@
</el-col> </el-col>
</el-card> </el-card>
</el-row> </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 ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="请购车间" prop="请购车间"> <el-form-item label="请购车间" prop="请购车间">
<el-input <el-input

View File

@@ -1,576 +1,455 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row> <el-card style="padding: 3px">
<el-col style="width: 290px"> <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">-->
<!-- &lt;!&ndash;<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>&ndash;&gt;-->
<!-- <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">-->
<!-- &lt;!&ndash;<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>&ndash;&gt;-->
<!-- <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-card>
<el-row> <el-table :data="List" border size="small" stripe highlight-current-row height="700px" style="width: 570px">
<el-button type="distribution" style="margin: 10px 10px 3px 0" icon="el-icon-circle-plus-outline" size="small" @click="addProcessClassification()">新增</el-button> <el-table-column label="设备名称" prop="设备名称" align="center" width="120px" >
<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"> <template slot-scope="scope">
<el-radio :label="scope.row.工艺分类流水号" v-model="radio" @change.native="getCurrentRow(scope.row.工艺分类流水号, scope.row.工艺分类名称)"> {{ scope.row.设备名称 }}
{{ a }}
</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="工艺分类"> <el-table-column label="设备编号" prop="设备编号" align="center" width="120px" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工艺分类名称 }} {{ 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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-row> <!-- <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>
<!-- <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>
<el-col style="width: 550px;"> <el-col :span = "12">
<el-card> <el-form-item label="设备编号" prop="设备编号" >
<el-button type="primary" plain style="margin: 10px 0 3px 0" icon="el-icon-circle-plus-outline" size="small" @click="addProcess">新增工艺名称</el-button> <el-input v-model="form.设备编号" placeholder="设备编号" size="small" style="width:200px" clearable />
<el-table :data="tableData2" :row-key="getRowKeys" size="mini" highlight-current-row stripe border height="600" width="100%"> </el-form-item>
<!--<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-col>
</el-row> </el-row>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="新增工艺分类" center style="min-height: 300px" width="400px"> <el-row>
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" > <el-col :span = "12">
<el-form-item label="工艺分类" prop="ProcessClassification"> <el-form-item label="设备型号" prop="设备型号" >
<el-input v-model="form1.ProcessClassification" size="small" clearable style="width:200px"/> <el-input v-model="form.设备型号" placeholder="设备型号" size="small" style="width:200px" clearable />
</el-form-item> </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> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="calloff"> </el-button> <el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="submit1('form1')"> </el-button> <el-button type="primary" @click="submit('form')">确定</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>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <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 { export default {
data() { data() {
return { return {
// 工艺分类所需变量 equipmentName: '', // 设备名称
a: '', List: [],
expands: [], check: 0,
tableData1: [], time: '',
ProcessNum: '', pageCurrent: 1,
loading1: false, pageSize: 10,
loading2: false, total: null,
loading3: false, title: '',
ProcessClassificationNum: '', dialogFormVisible: false,
radio: null, processingName: [],
dialogFormVisible1: false, processing1: '', // 工艺名称简称
dialogFormVisible2: false, equipmentSerialNumber: '', // 设备流水号
dialogFormVisible3: false, typeOfShift: [
dialogFormVisible4: false, { value: '0', label: 0 },
dialogFormVisible5: false, { value: '1', label: 1 },
dialogFormVisible6: false, { value: '2', label: 2 },
temp: null, { value: '3', label: 3 },
ProcessClassificationNumS: '', { value: '4', label: 4 }],
form1: { form: {
ProcessClassification: '' 设备名称: '',
设备编号: '',
设备型号: '',
设备性能指标: '',
设备加工能力: '',
设备加工工艺: '',
班次类型: '',
设备工时系数: '',
整改工时系数: '',
预留工时系数: ''
}, },
form2: { rules: {
Process: '', 设备名称: [{ required: true, message: '请选择设备名称', change: 'blur' }],
ProcessShort: '', 设备编号: [{ required: true, message: '请选择设备编号', change: 'blur' }],
Requirement: '' 设备型号: [{ required: true, message: '请选择设备型号', change: 'blur' }],
}, 设备加工工艺: [{ required: true, message: '请选择设备加工工艺', trigger: 'blur' }]
form3: { // 设备加工能力: [{ required: true, message: '请选择设备加工能力', change: 'blur' }],
TechnologicalRequirements: '' // 班次类型: [{ required: true, message: '请选择班次类型', trigger: 'blur' }],
}, // 设备工时系数: [{ required: true, message: '请选择设备工时系数', change: 'blur' }],
rules1: { // 整改工时系数: [{ required: true, message: '请选择整改工时系数', change: 'blur' }],
ProcessClassification: [{ required: true, message: '请输入工艺分类名称', trigger: 'blur' }] // 预留工时系数: [{ required: true, message: '请选择预留工时系数', change: '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: ''
} }
}, },
created() { created() {
this.searchProcessClassification() this.initialization()
this.fetchData()
}, },
methods: { methods: {
searchProcessClassification() { fetchData() {
this.loading1 = true this.List = []
searchProcessClassification().then(response => { if (this.equipmentName !== '') {
this.loading1 = false this.check = 1
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].工艺分类名称
})
} else { } 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() { initialization() {
editProcessClassification(this.radio, this.form1.ProcessClassification).then(response => { initProcessing().then(response => {
if (response.data[0].result === '1') { for (let i = 0; i < response.data.length; i++) {
this.$message.success('信息更新成功') this.processingName.push({
this.dialogFormVisible2 = false label: response.data[i].工艺名称,
this.searchProcessClassification() value: response.data[i].工艺编号,
} else { processing: response.data[i].工艺名称简称
this.$message.error('信息更新失败') })
} }
}) })
}, },
submitaddProcessClassification() { handleAdd() {
addProcessClassification(this.form1.ProcessClassification).then(response => { if (this.$refs['form'] !== undefined) {
if (response.data[0].result === '1') { this.$refs['form'].resetFields()
this.$message.success('增加成功') }
this.searchProcessClassification() this.title = '新增车间设备'
this.dialogFormVisible1 = false this.form = {
} else { this.$message.error('增加失败') } 设备名称: '',
}) 设备编号: '',
设备型号: '',
设备加工工艺: ''
}
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) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if (this.temp === 1) { if (this.title === '增加') {
this.submitaddProcessClassification() this.submitAdd()
this.form1 = { } else if (this.title === '编辑') {
ProcessClassification: '' this.submitEdit()
}
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
} }
} }
}) })
}, },
delProcessClassification() { submitAdd() {
if (this.radio !== '') { for (let i = 0; i < this.processingName.length; i++) {
if (this.form.设备加工工艺 === this.processingName[i].value) {
this.processing1 = this.processingName[i].processing
}
}
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.$notify({
title: '成功',
message: '信息添加成功',
type: 'success'
})
this.dialogFormVisible = false
this.fetchData()
} else {
this.$message.error('信息添加失败')
}
})
},
ADD() {
this.addForm('form')
this.dialogFormVisible = true
this.form.contractSigningDate = getNowTime()// new Date()
this.temp = 1
this.title = '增加'
},
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.$notify({
title: '成功',
message: '信息编辑成功',
type: 'success'
})
this.dialogFormVisible = false
this.title = ''
this.fetchData()
} else {
this.$message.error('信息编辑失败')
}
})
},
callOff(formName) {
this.dialogFormVisible = false
this.$refs[formName].resetFields()
},
handleDelete(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', { this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
delProcessClassification(this.radio).then(response => { if (this.List && this.List.length === 1 && this.pageCurrent > 1) {
this.pageCurrent--
}
deleteTable(row.设备流水号).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.searchProcessClassification()
this.$message.success('删除成功') this.$message.success('删除成功')
} else { this.fetchData()
this.$message.error('删除失败') } else { this.$message.error('删除失败') }
} })
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
}) })
}) })
} else {
this.$message.warning('请选择工艺分类')
}
}, },
calloff() { setUp() {
this.dialogFormVisible1 = false if (this.time !== '') {
this.dialogFormVisible2 = false setUp(this.time).then(response => {
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 => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('增加成功') this.$message.success('设定成功')
this.loading2 = true } else { this.$message.error('设定失败') }
searchProcessNameOfProcessClassification(this.radio).then(response => {
this.loading2 = false
this.tableData2 = response.data
})
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
} else {
this.$message.error('信息更新失败')
}
})
},
getRowKeys(row) {
return row.工艺编号
},
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 { } else {
this.$message.error('请输入工艺要求') this.$message.warning('请选择有效时间')
this.dialogFormVisible5 = false
} }
}, },
editTechnologicalRequirements(row) { generate() {
this.temp = 6 generate().then(response => {
this.dialogFormVisible6 = true
this.form3.TechnologicalRequirements = row.工艺要求
this.code = row.工艺要求流水号
this.ProcessNum = row.工艺编号
},
submiteditTechnologicalRequirements() {
editTechnologicalRequirements(this.code, this.form3.TechnologicalRequirements).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('信息更新成功') this.$message.success('生成成功')
this.loading3 = true } else { this.$message.error('生成失败') }
searchTechnologicalRequirementsOfProcessNum(this.ProcessNum).then(response => {
this.loading3 = false
this.tableData3 = response.data
})
this.dialogFormVisible6 = false
} else {
this.$message.error('信息更新失败')
}
}) })
}, },
delTechnologicalRequirements(row) { handleSizeChange(val) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', { this.pageSize = val
confirmButtonText: '确定', this.pageCurrent = 1
cancelButtonText: '取消', this.fetchData()
type: 'warning' },
}).then(() => { handleCurrentChange(val) {
delTechnologicalRequirements(row.工艺要求流水号).then(response => { this.pageCurrent = val
if (response.data[0].result === '1') { this.fetchData()
this.loading3 = true
searchTechnologicalRequirementsOfProcessNum(row.工艺编号).then(response => {
this.loading3 = false
this.tableData3 = response.data
})
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
})
})
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
/*.el-card {*/ .el-card{
/* margin-top: 15px;*/ margin-bottom: 1px;
/* margin-left: 15px;*/ }
/* }!**!*/ /*.el-button--success {*/
/* background: #ecf5ff;*/
/* border-color: #2d72d5;*/
/* color: #2d72d5;*/
/*}*/
/*.el-button--primary {*/
/* background: #fdf6ec;*/
/* border-color: #ff9759;*/
/* color: #ff9759;*/
/*}*/
</style> </style>
<style lang="scss"> <style lang="scss">
.subTableHeader { .button111{
th { background:rgb(253,246,236);
background: #8ff4ea !important; border-color: #ff9759;
color: black; color: #ff9759;
&:hover{
background: #ff9759;
border-color: #ff9759;
color: white;
} }
&:focus{
tr.el-table__row td { background: #ff9759;
background-color: #d8e5f6 !important; border-color: #ff9759;
} color: white;
tr.el-table__row.el-table__row--striped td {
background: #e9f0f9 !important;
} }
} }
</style> </style>

View File

@@ -58,11 +58,11 @@
border border
stripe stripe
size="mini"> size="mini">
<el-table-column align="center" label="投标结果" prop="投标结果" width="190"> <el-table-column align="center" label="投标结果" prop="投标结果" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio-group v-model="scope.row.投标结果" @change="changeTenderResult(scope.row)"> <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="1">中标</el-radio>
<el-radio :disabled="scope.row.是否禁用未中标" label="2">未中</el-radio> <el-radio :disabled="scope.row.是否禁用未中标" label="2">未中</el-radio>
</el-radio-group> </el-radio-group>
</template> </template>
</el-table-column> </el-table-column>
@@ -106,14 +106,14 @@
{{ Number(scope.row.转履约保证金金额).toFixed(2) }} {{ Number(scope.row.转履约保证金金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="应收回(万元)" width="80"> <!-- <el-table-column align="center" label="应收回(万元)" width="80">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
{{ Number(scope.row.应收回金额).toFixed(2) }} <!-- {{ Number(scope.row.应收回金额).toFixed(2) }}-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column align="center" label="已收回(万元)" width="80"> <el-table-column align="center" label="已收回(万元)" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="parseInt(scope.row.是否收回) === 2" size="mini" type="success" style="width: 66px">{{ Number(scope.row.应收回金额).toFixed(2) }}</span> <span v-if="parseInt(scope.row.是否收回) === 2" size="mini" type="success" style="width: 66px">{{ scope.row.应收回金额 }}</span>
<span v-else slot="reference" type="danger" size="mini" style="width: 66px">未收回</span> <span v-else slot="reference" type="danger" size="mini" style="width: 66px">未收回</span>
</template> </template>
</el-table-column> </el-table-column>
@@ -167,7 +167,7 @@
<el-tooltip :open-delay="1000" effect="dark" content="收回" placement="top" style="margin-left: 0px"> <el-tooltip :open-delay="1000" effect="dark" content="收回" placement="top" style="margin-left: 0px">
<div style="display: inline-block"> <div style="display: inline-block">
<el-button <el-button
:disabled="scope.row.是否禁用||Number(scope.row.未收金额) ===0" :disabled="scope.row.是否禁用"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-money" icon="el-icon-money"
@@ -390,10 +390,11 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
size="small" size="small"
type="date" type="date"
prop="投标结果公布日期"
placeholder="请选择结果公布日期"/> placeholder="请选择结果公布日期"/>
</el-form-item> </el-form-item>
<el-form-item label="中标服务费(万元)" prop="中标服务费"> <el-form-item v-if="!tenderResultDisabled" label="中标服务费(万元)" prop="中标服务费">
<el-input-number :disabled="tenderResultDisabled" v-model="Timeform.中标服务费" :precision="2" :min="0.00" style="width: 200px" size="small"/> <el-input-number v-model="Timeform.中标服务费" :precision="2" :min="0.00" style="width: 200px" size="small"/>
<!--:max="tenderResultMax"--> <!--:max="tenderResultMax"-->
</el-form-item> </el-form-item>
</el-form> </el-form>
@@ -419,21 +420,21 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="转履约金额(万元)" prop="保证金金额"> <el-form-item label="保证金金额(万元)" prop="保证金金额">
<el-input-number v-model="PerformanceBondform.保证金金额" :precision="2" :step="1" :min="0" :max="PerformanceBondform.保证金金额max" style="width: 200px" size="small"/> <el-input-number v-model="PerformanceBondform.保证金金额" :precision="2" :step="1" :min="0" :max="PerformanceBondform.保证金金额max" style="width: 200px" size="small"/>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <!-- <el-row>-->
<el-form-item label="保证金类型" prop="保证金类型"> <!-- <el-form-item label="保证金类型" prop="保证金类型">-->
<el-select v-model="PerformanceBondform.保证金类型" filterable placeholder="请选择保证金类型" style="width: 200px" size="small"> <!-- <el-select v-model="PerformanceBondform.保证金类型" filterable placeholder="请选择保证金类型" style="width: 200px" size="small">-->
<el-option <!-- <el-option-->
v-for="item in TypeOfGoldDeposit1" <!-- v-for="item in TypeOfGoldDeposit1"-->
:key="item.value" <!-- :key="item.value"-->
:label="item.label" <!-- :label="item.label"-->
:value="item.value"/> <!-- :value="item.value"/>-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
</el-row> <!-- </el-row>-->
<el-row> <el-row>
<el-form-item label="收回条件" prop="收回条件"> <el-form-item label="收回条件" prop="收回条件">
<el-select v-model="PerformanceBondform.收回条件" filterable placeholder="请选择收回条件" style="width: 200px" size="small"> <el-select v-model="PerformanceBondform.收回条件" filterable placeholder="请选择收回条件" style="width: 200px" size="small">
@@ -565,7 +566,7 @@ export default {
回收金额: 0 回收金额: 0
}, },
Timeform: { Timeform: {
投标结果公布日期: '', 投标结果公布日期: getNowShotTime(),
中标服务费: '' 中标服务费: ''
}, },
PerformanceBondform: { PerformanceBondform: {
@@ -609,7 +610,7 @@ export default {
保证金金额: [{ required: true, message: '请输入保证金金额', trigger: 'blur' }, { required: true, trigger: 'change', validator: validateValue }], 保证金金额: [{ required: true, message: '请输入保证金金额', trigger: 'blur' }, { required: true, trigger: 'change', validator: validateValue }],
保证金类型: [{ required: true, message: '请输入保证金类型', trigger: 'change' }], 保证金类型: [{ required: true, message: '请输入保证金类型', trigger: 'change' }],
投标人: [{ required: true, message: '请输入投标人', trigger: 'change' }], 投标人: [{ required: true, message: '请输入投标人', trigger: 'change' }],
投标日期: [{ required: true, message: '请选择收回日期', trigger: 'change' }], // 投标日期: [{ required: true, message: '请选择收回日期', trigger: 'change' }],
计划收回日期: [{ required: true, message: '请选择计划收回日期', trigger: 'change' }], 计划收回日期: [{ required: true, message: '请选择计划收回日期', trigger: 'change' }],
提前X天提醒我: [{ required: true, message: '提前X天提醒我', trigger: 'blur' }] 提前X天提醒我: [{ required: true, message: '提前X天提醒我', trigger: 'blur' }]
} }
@@ -677,8 +678,8 @@ export default {
} }
if (val.length !== 0) { if (val.length !== 0) {
import('@/vendor/Export2Excel').then(excel => { import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['投标结果', '公布日期', '招标企业', '项目名称', '保证金金额(万元)', '缴纳时间', '投标人', '中标服务费(万元)', '转履约保证金(万元)', '应收(万元)', '已收(万元)', '未收(万元)', '保证金备注'] const tHeader = ['投标结果', '公布日期', '招标企业', '项目名称', '保证金金额(万元)', '缴纳时间', '投标人', '中标服务费(万元)', '转履约保证金(万元)', '应收(万元)', '已收(万元)', '未收(万元)', '保金类型', '联系人', '联系电话', '保证金备注']
const filterVal = ['投标结果', '公布日期', '招标企业', '项目名称', '保证金金额', '投标日期', '投标人', '中标服务费', '转履约保证金金额', '应收回金额', '产品品种代码', '未收金额', '备注'] const filterVal = ['投标结果', '公布日期', '招标企业', '项目名称', '保证金金额', '投标日期', '投标人', '中标服务费', '转履约保证金金额', '应收回金额', '产品品种代码', '未收金额', '保证金类型', '联系人', '联系电话', '备注']
const list = val.data const list = val.data
const data = this.formatJson(filterVal, list) const data = this.formatJson(filterVal, list)
excel.export_json_to_excel({ excel.export_json_to_excel({
@@ -917,6 +918,7 @@ export default {
if (row.投标结果 === '1') { if (row.投标结果 === '1') {
this.radio = '1' this.radio = '1'
this.dialogTimeVisible = true this.dialogTimeVisible = true
// this.Timeform.投标结果公布日期 = getNowShotTime()
this.tenderResultDisabled = false this.tenderResultDisabled = false
} else if (row.投标结果 === '2') { } else if (row.投标结果 === '2') {
this.radio = '2' this.radio = '2'
@@ -928,7 +930,9 @@ export default {
this.dialogTimeVisible = false this.dialogTimeVisible = false
this.fetchTableData1() this.fetchTableData1()
}, },
submitTime() { submitTime(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
winningBid(this.code, this.radio, this.Timeform.投标结果公布日期, this.Timeform.中标服务费).then(response => { winningBid(this.code, this.radio, this.Timeform.投标结果公布日期, this.Timeform.中标服务费).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.fetchTableData1() this.fetchTableData1()
@@ -938,6 +942,8 @@ export default {
this.$message.error('操作失败') this.$message.error('操作失败')
} }
}) })
}
})
}, },
callOffPerformanceBondform() { callOffPerformanceBondform() {
this.dialogPerformanceBondVisible = false this.dialogPerformanceBondVisible = false

View File

@@ -10,18 +10,30 @@
:value="item.value"/> :value="item.value"/>
</el-select> </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-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-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-row>
</el-card> </el-card>
<el-card> <el-card>
<el-col :span="17.8"> <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: 985px" height="580" border size="mini" @row-click="selectMachine"> <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="130" show-overflow-tooltip> <el-table-column align="center" label="项目名称" prop="项目名称" width="110" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.项目名称 }} {{ scope.row.项目名称 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.客户名称 }} {{ scope.row.客户名称 }}
</template> </template>
@@ -80,23 +92,33 @@
@current-change="handleCurrentChange"/> @current-change="handleCurrentChange"/>
</div> </div>
</el-col> </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 :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"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.机床名称 }} {{ scope.row.机床名称 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.机床状态 }} {{ scope.row.机床状态 }}
</template> </template>
</el-table-column> </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-table>
</el-col> </el-col>
</el-card> </el-card>
@@ -613,6 +635,34 @@ export default {
}, },
data() { data() {
return { 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: '',
customerName1_check: '', customerName1_check: '',
tableDataLoadingDeliveryManagement: false, tableDataLoadingDeliveryManagement: false,
@@ -696,6 +746,9 @@ export default {
this.peoplename = row.姓名 this.peoplename = row.姓名
}, },
fetchTableData1() { 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.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.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 } if (this.MarketingManagerValue === '' || this.MarketingManagerValue === null) { this.peopleid_check = 0 } else { this.peopleid_check = 1 }

View File

@@ -382,7 +382,7 @@ export default {
return prev return prev
} }
}, 0) }, 0)
sums[index] = sums[index].toFixed(2) + ' 元' sums[index] = sums[index].toFixed(2) + ' 元'
} else { } else {
sums[index] = '0' sums[index] = '0'
} }

View File

@@ -286,11 +286,11 @@
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px" class="demo-ruleForm"> <el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row> <el-row>
<el-form-item label="客户名称" prop="客户名称"> <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>
<el-form-item label="开票金额(万元)" prop="开票金额"> <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>
<el-form-item label="开票时间" prop="开票时间"> <el-form-item label="开票时间" prop="开票时间">
<el-date-picker <el-date-picker
@@ -492,6 +492,10 @@ export default {
this.fetchTableData1() this.fetchTableData1()
}, },
methods: { methods: {
checkNumber() {
// content.withdrawAmount = (withdrawAmount.match(/^\d*(\.?\d{0,2})/g)[0]) || null
this.form.开票金额 = Number(this.form.开票金额).toFixed(2)
},
formatJson(filterVal, jsonData) { formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => { return jsonData.map(v => filterVal.map(j => {
return v[j] return v[j]
@@ -625,7 +629,7 @@ export default {
return prev return prev
} }
}, 0) }, 0)
sums[index] = sums[index].toFixed(2) + ' 元' sums[index] = sums[index].toFixed(2) + ' 元'
} else { } else {
sums[index] = '0' sums[index] = '0'
} }

View File

@@ -90,9 +90,9 @@
{{ scope.row.批次数量 }} {{ scope.row.批次数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="外协价格" align="center" width="130px"> <el-table-column label="外协价格(元)" align="center" width="130px">
<template slot-scope="scope"> <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> </template>
</el-table-column> </el-table-column>
<el-table-column label="机加工开始时间" align="center" width="150px"> <el-table-column label="机加工开始时间" align="center" width="150px">
@@ -341,7 +341,7 @@ export default {
this.List3.push({ this.List3.push({
外协加工任务单明细流水号: response.data[i].外协加工任务单明细流水号, 外协加工任务单明细流水号: response.data[i].外协加工任务单明细流水号,
加工价格_成交: response.data[i].加工价格_成交.toFixed(2), 加工价格_成交: 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].零件名称, 零件名称: response.data[i].零件名称,
批次数量: response.data[i].批次数量, 批次数量: response.data[i].批次数量,

View File

@@ -57,7 +57,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="总额" width="70px"> <el-table-column align="center" label="总额" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.金额 }} {{ Number(scope.row.金额).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -118,6 +118,7 @@ export default {
}, },
searchTable() { searchTable() {
this.loading = true this.loading = true
this.tableData = []
this.contractNumValue ? this.check1 = 1 : this.check1 = 0 this.contractNumValue ? this.check1 = 1 : this.check1 = 0
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue).then(response => { searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue).then(response => {
this.loading = false this.loading = false
@@ -127,7 +128,19 @@ export default {
response.data.rows[i].物料型号 = response.data.rows[i].零件图号 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) console.log(this.tableData)
this.total = response.data.total this.total = response.data.total
}) })

View File

@@ -15,32 +15,32 @@
<el-card> <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 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"> <template slot-scope="scope">
{{ scope.row.采购合同编号 }} {{ scope.row.采购合同编号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件名称" align="center" min-width="100"> <el-table-column label="零件名称" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.组件名称 }} {{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.组件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图号或型号" align="center" min-width="100"> <el-table-column label="图号或型号" align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.组号 }} {{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材料或规格" align="center" min-width="100"> <el-table-column label="材料或规格" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.材料 ? scope.row.材料 : scope.row.物料规格 }} {{ scope.row.材料 ? scope.row.材料 : scope.row.物料规格 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购总数量" align="center" min-width="100"> <el-table-column label="采购总数量" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.数量 }} {{ scope.row.数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="已到货数量" align="center" min-width="100"> <el-table-column label="已到货数量" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.已到货数量 }} {{ scope.row.已到货数量 }}
</template> </template>

View File

@@ -142,7 +142,7 @@
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划完成日期" align="center" width="110"> <el-table-column label="计划完成" align="center" width="110">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.计划完成日期.split(' ')[0] }} {{ scope.row.计划完成日期.split(' ')[0] }}
</template> </template>
@@ -156,7 +156,7 @@
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="text" content="打印" placement="top"> <el-tooltip :open-delay="1200" effect="text" content="打印" placement="top">
<div style="display: inline-block"> <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> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
@@ -972,6 +972,25 @@ export default {
right: 15px; right: 15px;
top: 5px; 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>
<style lang="scss"> <style lang="scss">
.button111{ .button111{

View File

@@ -1,15 +1,16 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<span>申请时间:</span> <!-- <span>发票号:</span>-->
<el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始日期"/>&nbsp;~ <el-input v-model="invoiceNum" placeholder="发票号\供应商" size="small" clearable/>
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/> <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="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="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>
<el-card> <el-card>
<h4 style="margin-top: 5px">票结算申请单</h4> <h4 style="margin: 5px">票结算申请单</h4>
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%" height="330" size="mini" @row-click="searchTable2"> <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="展开" align="center" type="expand" > <el-table-column label="详情" type="expand">
<template slot-scope="scope"> <template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand"> <el-form label-position="left" inline class="demo-table-expand">
<el-row> <el-row>
@@ -41,64 +42,74 @@
</el-form> </el-form>
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.发票号 }} {{ scope.row.发票号 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.发票金额 }} {{ scope.row.发票金额 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }} {{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }} {{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }} {{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }} {{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }} {{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }} {{ scope.row.审批2时间 ? scope.row.审批2时间.split(' ')[0] : '—' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }} {{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }} {{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right"> <el-table-column label="操作" align="center" width="160" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :disabled="false" type="primary" 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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -116,31 +127,37 @@
</el-card> </el-card>
<el-card> <el-card>
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">票结算申请单明</h4> <h4 style="margin: 5px;display: inline-block;width: 150px;">票结算申请单明</h4>
<span>发票号</span> <span>发票号</span>
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/> <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 :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"> <template slot-scope="scope">
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }} {{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }} {{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }} {{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" align="center" min-width="150"> <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"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合同编号" align="center" min-width="100"> <el-table-column label="合同编号" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }} {{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
</template> </template>
@@ -155,34 +172,266 @@
{{ scope.row.到票数量 }} {{ scope.row.到票数量 }}
</template> </template>
</el-table-column> </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-table>
</el-card> </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> </div>
</template> </template>
<script> <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 { mapGetters } from 'vuex'
import { readFile } from '@/utils/request' import { uploadInvoiceScan1 } from '@/utils/request'
import request from '@/utils/request'
export default { export default {
name: '', // 发票结算审批 name: '', // 发票结算申请
data() { data() {
return { return {
date1: '', disabled: false,
date2: '', contractType: '采购合同',
tableData1: [], invoiceNum: '',
total1: 0, total1: 0,
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 10, pageSize1: 10,
tableData1: [],
applyOrderNum: '',
invoiceNumber: '', invoiceNumber: '',
title2: '',
dialogVisible2: false,
tableData2: [], tableData2: [],
tableData3: [] 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: { computed: {
...mapGetters([ ...mapGetters([
'token',
'sidebar', 'sidebar',
'name', 'name',
'id' // 人员编号 'id' // 人员编号
@@ -194,11 +443,35 @@ export default {
}, },
methods: { methods: {
fetchData() { 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() { searchTable1() {
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '') let check1
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => { this.invoiceNum ? check1 = 1 : check1 = 0
searchTable1(check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
this.tableData1 = response.data.rows this.tableData1 = response.data.rows
this.tableData1.map(v => { this.tableData1.map(v => {
this.$set(v, 'scanSrc', '') this.$set(v, 'scanSrc', '')
@@ -210,16 +483,102 @@ export default {
this.total1 = response.data.total this.total1 = response.data.total
}) })
}, },
async searchPic(row, i) { submitAdd1() { // 提交新增
const { data } = await request({ this.$refs['form1'].validate((valid) => {
url: '', if (valid) {
method: 'post', 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 => {
data: { if (response.data[0].result === '1') {
type: '3', this.$message.success('增加成功')
name: `select * from 车间采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}` this.dialogVisible1 = false
this.searchTable1()
} else {
this.$message.error('增加失败')
} }
}) })
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀 } else {
return false
}
})
},
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) { handleSizeChange1(val) {
this.pageCurrent1 = 1 this.pageCurrent1 = 1
@@ -230,41 +589,169 @@ export default {
this.pageCurrent1 = val this.pageCurrent1 = val
this.searchTable1() this.searchTable1()
}, },
excuteApprove(row) { submitApply(row) {
this.$confirm('确认审批签字?', '提示', { if (this.tableData2.length === 0) {
this.$message.warning('发票结算申请明细为空!')
} else {
this.$confirm('确认提交申请吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => { submitApply(row.发票结算申请单流水号, this.id).then(response => {
if (response.data[0].result === '审批成功') { if (response.data[0].result === '1') {
this.$message.success('审批成功') this.$message.success('提交成功')
this.searchTable1() this.searchTable1()
} else if (response.data[0].result === '已完成审批') { this.tableData2 = []
this.$message.warning('已完成审批,不可重复审批') } else { this.$message.error('提交失败') }
} else { this.$message.error('审批失败') }
}) })
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
type: 'info', type: 'info',
message: '已取消审批' message: '已取消操作'
}) })
}) })
}
}, },
searchTable2(row) { searchTable2(row) {
this.applyOrderNum = row.发票结算申请单流水号
this.invoiceNumber = row.发票号 this.invoiceNumber = row.发票号
this.supplierName = row.供应商名称
this.supplierValue = row.供应商流水号
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
searchTable2(row.发票结算申请单流水号).then(response => { searchTable2(row.发票结算申请单流水号).then(response => {
this.tableData2 = response.data 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(() => {
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: '已取消操作'
})
})
},
selectable(row) {
return Number(row.本次到票数量) > 0
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
.el-card{
margin-bottom: 0px;
}
.el-select{ .el-select{
width:200px width:200px
} }
@@ -278,3 +765,4 @@ export default {
margin: 0; margin: 0;
} }
</style> </style>

View File

@@ -174,7 +174,7 @@
{{ scope.row.重量 }} {{ scope.row.重量 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }} {{ (parseInt(scope.row.金额 * 100) / 100).toFixed(2) }}
</template> </template>

View File

@@ -186,6 +186,55 @@
</el-card> </el-card>
</div> </div>
</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> </div>
</template> </template>
@@ -244,6 +293,7 @@ export default {
离线采购计划流水号: '', 离线采购计划流水号: '',
tableData: [], tableData: [],
tableData3: [], tableData3: [],
tableData4: [],
arrival: [], arrival: [],
judge: [] judge: []
} }
@@ -521,6 +571,9 @@ export default {
searchMX(row.离线采购计划流水号).then(response => { searchMX(row.离线采购计划流水号).then(response => {
this.tableData3 = response.data this.tableData3 = response.data
}) })
searchMX(row.离线采购计划流水号).then(response => {
this.tableData4 = response.data
})
}, },
saveWeight(index, row) { saveWeight(index, row) {
saveWeight(row.离线采购计划明细流水号, row.成品尺寸, row.备注, row.数量) saveWeight(row.离线采购计划明细流水号, row.成品尺寸, row.备注, row.数量)

View File

@@ -227,7 +227,7 @@
</div> </div>
</el-dialog> </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 ref="form1" :model="form1" :rules="rules1" label-width="110px">
<el-form-item label="供应商" prop="supplierNameValue"> <el-form-item label="供应商" prop="supplierNameValue">
<el-select v-model="form1.supplierNameValue" placeholder="供应商" size="small" filterable @change="Name=form1.supplierNameValue;searchTable4()"> <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{ .el-input{
width:200px 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; span{margin: 1px 0px;
} }
.searchForm .el-form-item{ .searchForm .el-form-item{

View File

@@ -738,10 +738,18 @@ export default {
.searchForm .el-form-item{ .searchForm .el-form-item{
margin-bottom: 5px; 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>
<style> <style>
.tableData{ .tableData{
height: 30px; height: 30px;
border: 0px;
} }
.tableData1{ .tableData1{
height: 30px; height: 30px;

View File

@@ -35,14 +35,14 @@
<el-col style="width: 940px"> <el-col style="width: 940px">
<el-card> <el-card>
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" stripe @row-click="searchTable02"> <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"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款时间" prop="请款时间" align="center" width="80"> <el-table-column label="请款时间" prop="请款时间" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款时间.substr(0,10) }} {{ scope.row.请款时间.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款人" prop="姓名" align="center" width="100"> <el-table-column label="请款人" prop="姓名" align="center" width="100">
@@ -50,7 +50,7 @@
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.请款金额 }} {{ scope.row.请款金额 }}
</template> </template>