This commit is contained in:
liushuai
2018-12-17 20:37:18 +08:00
60 changed files with 5561 additions and 731 deletions

View File

@@ -0,0 +1,257 @@
<template>
<div style="width: 100%;">
<el-card style="width: 400px;margin: auto;margin-top: 20px">
<div class="flex">
<div>
<calendar :events="calendar1.events" :value="calendar1.value" :begin="calendar1.begin" :end="calendar1.end" :weeks="calendar1.weeks" :months="calendar1.months" @search="search" @select="select" />
</div>
</div>
</el-card>
<el-card style="width: 400px;text-align: center;margin: auto">
<el-button type="primary" plain @click="setWork">上班</el-button>
<el-button type="success" plain @click="setRest">休息</el-button>
<el-button type="warning" plain @click="setToday">返回今天</el-button>
</el-card>
</div>
</template>
<script>
import { initClendar, changeState } from '@/api/BasicData/FactoryCalendar'
import calendar from '@/components/Calendar/calendar.vue'
export default {
components: {
calendar
},
data() {
return {
year: '', // 年
month: '', // 月
selectDate: '', // 选择的日期
time: '',
serNum: [], // 工作日流水号
serNumValue: '', // 工作日流水号值
arr: [], // 日期数组
arr1: [], // 日期数组
calendar1: {
value: [],
weeks: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'], // 周的显示
months: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'], // 月的显示
events: {} // 上不上班
}
}
},
created() {
this.fetchData()
},
methods: {
select(val) { // 选择
this.selectDate = val[0] + '-' + val[1] + '-' + val[2]
},
setToday() { // 返回今天
this.fetchData()
},
fetchData() { // 日历初始化
var date = new Date()
this.year = date.getFullYear()
this.month = date.getMonth() + 1
this.day = date.getDate()
this.calendar1.value = [this.year, this.month, this.day] // 当前日期!
var events = Object() // 声明events是object对象
initClendar(this.year, this.month).then(response => {
for (let i = 0; i < response.data.length; i++) { // 这个循环是将时间1900-01-01转成1900-1-1型
var str = response.data[i].工作日期
var str1 = str.substr(0, 10)
var nian = str.substr(0, 4)
var yue = str.substr(5, 2)
var ri = str.substr(8, 2)
if (str.substr(5, 1) === '0') {
yue = yue.replace('0', '')
}
if (str.substr(8, 1) === '0') {
ri = ri.replace('0', '')
}
var x = nian + '-' + yue + '-' + ri
events[x] = response.data[i].是否工作
this.arr.push(x)
this.arr1.push(str1)
}
this.calendar1.events = events
})
},
search(year1, month1) { // !子组件的,上下月,改变年
var events = Object() // 声明events是object对象
initClendar(year1, month1).then(response => {
this.serNum = []
this.arr = []
this.arr1 = []
for (let i = 0; i < response.data.length; i++) { // 这个循环是将时间1900-01-01转成1900-1-1型
var str = response.data[i].工作日期
var str1 = str.substr(0, 10)
var nian = str.substr(0, 4)
var yue = str.substr(5, 2)
var ri = str.substr(8, 2)
if (str.substr(5, 1) === '0') {
yue = yue.replace('0', '')
}
if (str.substr(8, 1) === '0') {
ri = ri.replace('0', '')
}
var x = nian + '-' + yue + '-' + ri
this.arr.push(x)
this.arr1.push(str1)
events[x] = response.data[i].是否工作
}
this.calendar1.events = events
})
},
setWork() { // 上班
this.code = 1
for (let i = 0; i < this.arr.length; i++) {
if (this.arr[i] === this.selectDate) {
this.time = this.arr1[i]
break
}
}
changeState(this.time, this.code).then(response => {
if (response.data[0].result === '1') {
this.fetchData()
this.$message.success('更改状态成功')
} else {
this.$message.error('更改状态失败')
}
})
},
setRest() { // 休息
this.code = 0
for (let i = 0; i < this.arr.length; i++) {
if (this.arr[i] === this.selectDate) {
this.time = this.arr1[i]
break
}
}
changeState(this.time, this.code).then(response => {
if (response.data[0].result === '1') {
this.fetchData()
this.$message.success('更改状态成功')
} else {
this.$message.error('更改状态失败')
}
})
}
}
}
</script>
<style>
/*demo*/
.flex{
box-sizing: border-box;
display: -webkit-box;
-webkit-box-pack: start;
-webkit-box-align: start;
display: -webkit-flex;
-webkit-justify-content: space-between;
-webkit-align-items: top;
display: flex;
justify-content: space-between;
align-items: top;
flex-flow:row wrap
}
.flex>div{
margin:10px;
padding:20px;
width:25%;
min-width:300px;
border-radius: 2px;
position: relative;
}
.flex>div>span{
position: absolute;
left:0px;
top:0px;
padding:2px 10px;
font-size:10px;
border-radius:0 0 2px 0;
background:#ea6151;
color:#fff;
}
.flex>div>input{
box-sizing: border-box;
width:100%;
margin-top:20px;
border-radius: 2px;
border:1px solid #dedede;
padding:10px;
font-size: 16px;
background:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwhW0NEQVRBWwpAZm9udC1mYWNlIHsgZm9udC1mYW1pbHk6IGlmb250OyBzcmM6IHVybCgiLy9hdC5hbGljZG4uY29tL3QvZm9udF8xNDQyMzczODk2XzQ3NTQ0NTUuZW90PyNpZWZpeCIpIGZvcm1hdCgiZW1iZWRkZWQtb3BlbnR5cGUiKSwgdXJsKCIvL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS53b2ZmIikgZm9ybWF0KCJ3b2ZmIiksIHVybCgiLy9hdC5hbGljZG4uY29tL3QvZm9udF8xNDQyMzczODk2XzQ3NTQ0NTUudHRmIikgZm9ybWF0KCJ0cnVldHlwZSIpLCB1cmwoIi8vYXQuYWxpY2RuLmNvbS90L2ZvbnRfMTQ0MjM3Mzg5Nl80NzU0NDU1LnN2ZyNpZm9udCIpIGZvcm1hdCgic3ZnIik7IH0KCl1dPjwvc3R5bGU+PC9kZWZzPjxnIGNsYXNzPSJ0cmFuc2Zvcm0tZ3JvdXAiPjxnIHRyYW5zZm9ybT0ic2NhbGUoMC4wMTU2MjUsIDAuMDE1NjI1KSI+PHBhdGggZD0iTTcxMS4zMDYyIDI5MC42OTcyYzI0LjI4MjEgMCA0NS4zNzY1LTE5LjcwNjkgNDUuMzc2NS00NC4wMzJWNDYuNTYwMjU1OTk5OTk5OTk1YzAtMjQuMzI1MS0yMS4wOTU0LTQ0LjA1MzUtNDUuMzc2NS00NC4wNTM1LTI0LjMwMjYgMC00My45ODggMTkuNzI4NC00My45ODggNDQuMDUzNXYyMDAuMTA0OTZDNjY3LjMxODMgMjcwLjk5MDMgNjg3LjAwMzYgMjkwLjY5NzIgNzExLjMwNjIgMjkwLjY5NzJ6TTYyMy40ODA4IDExMy40MjAzSDQwMC43NjQ5Mjh2NjYuNTEzOTJoMjIyLjcxNTkwNDAwMDAwMDAyVjExMy40MjAyODh6TTg4NC4wNTMgMTEzLjQyMDNoLTgyLjc3NDAxNnY2Ni4xNDUyOGg4NS45NDAyMjRjMjUuMjc4NSAwIDQ2LjYxMTUgMjEuMzc2IDQ2LjYxMTUgNDYuNjc3djE1My45Mjc2OEg5MC40Mzg2NTYwMDAwMDAwMXYtMTUzLjkyNzY4YzAtMjUuMyAyMS4zMzMtNDYuNjc3IDQ2LjYxMTUtNDYuNjc3aDg2LjUwMzQyNFYxMTMuNDIwMjg4aC04Mi42NDI5NDRjLTY0LjA4NiAwLTExNi41MDc2IDUyLjUwODctMTE2LjUwNzYgMTE2LjcwMzJ2Njc2LjgwMTUzNTk5OTk5OTljMCA2NC4xNzQxIDUwLjQ5MTQgMTE2LjY4MDcgMTE0LjU3NzQgMTE2LjY4MDdIODg0LjA1Mjk5MmM2NC4wNjI1IDAgMTE2LjUwNjYtNTIuNTA2NiAxMTYuNTA2Ni0xMTYuNjgwN1YyMzAuMTIzNTE5OTk5OTk5OThDMTAwMC41NTk2IDE2NS45MjkgOTQ4LjExNDQgMTEzLjQyMDMgODg0LjA1MyAxMTMuNDIwM3pNOTMzLjgyOTYgOTEwLjM1MTRjMCAyNS4zLTIxLjMzMyA0Ni42NzYtNDYuNjExNSA0Ni42NzZIMTM3LjA1MDExMTk5OTk5OTk4Yy0yNS4yNzg1IDAtNDYuNjExNS0yMS4zNzYtNDYuNjExNS00Ni42NzZWNDQ2LjQ0NTU2OEg5MzMuODI5NjMyVjkxMC4zNTEzNnpNMjY3LjEwODQgNjQ2LjE4MTljMzYuODc3MyAwIDY2Ljc1MjUtMjkuOTM5NyA2Ni43NTI1LTY2Ljg4MTUgMC0zNi45MjI0LTI5Ljg3NTItNjYuODYxMS02Ni43NTI1LTY2Ljg2MTEtMzYuODU0OCAwLTY2Ljc1MjUgMjkuOTM5Ny02Ni43NTI1IDY2Ljg2MTFDMjAwLjM1NTggNjE2LjI0MjIgMjMwLjI1MjUgNjQ2LjE4MTkgMjY3LjEwODQgNjQ2LjE4MTl6TTUxMS41NDg0IDY0Ni4xODE5YzM2Ljg1NTggMCA2Ni43NTI1LTI5LjkzOTcgNjYuNzUyNS02Ni44ODE1IDAtMzYuOTIyNC0yOS44OTU3LTY2Ljg2MTEtNjYuNzUyNS02Ni44NjExLTM2Ljg3NzMgMC02Ni43NTI1IDI5LjkzOTctNjYuNzUyNSA2Ni44NjExQzQ0NC43OTU5IDYxNi4yNDIyIDQ3NC42NzExIDY0Ni4xODE5IDUxMS41NDg0IDY0Ni4xODE5ek0yNjUuOTE2NCA4OTAuNzA5YzM2Ljg3NzMgMCA2Ni43NTE1LTI5LjkzOTcgNjYuNzUxNS02Ni44NjExIDAtMzYuOTQyOC0yOS44NzQyLTY2Ljg4MjYtNjYuNzUxNS02Ni44ODI2LTM2Ljg1NTggMC02Ni43NTI1IDI5LjkzOTctNjYuNzUyNSA2Ni44ODI2QzE5OS4xNjM5IDg2MC43NjkzIDIyOS4wNTk2IDg5MC43MDkgMjY1LjkxNjQgODkwLjcwOXpNNTExLjU0ODQgODkwLjcwOWMzNi44NTU4IDAgNjYuNzUyNS0yOS45Mzk3IDY2Ljc1MjUtNjYuODYxMSAwLTM2Ljk0MjgtMjkuODk1Ny02Ni44ODI2LTY2Ljc1MjUtNjYuODgyNi0zNi44NzczIDAtNjYuNzUyNSAyOS45Mzk3LTY2Ljc1MjUgNjYuODgyNkM0NDQuNzk1OSA4NjAuNzY5MyA0NzQuNjcxMSA4OTAuNzA5IDUxMS41NDg0IDg5MC43MDl6TTc1NS42NDEzIDY0Ni4xODE5YzM2Ljg1NjggMCA2Ni43NTM1LTI5LjkzOTcgNjYuNzUzNS02Ni44ODE1IDAtMzYuOTIyNC0yOS44OTY3LTY2Ljg2MTEtNjYuNzUzNS02Ni44NjExLTM2Ljg3NzMgMC02Ni43NTI1IDI5LjkzOTctNjYuNzUyNSA2Ni44NjExQzY4OC44ODk5IDYxNi4yNDIyIDcxOC43NjQgNjQ2LjE4MTkgNzU1LjY0MTMgNjQ2LjE4MTl6TTMxMS43MDM2IDI5MC42OTcyYzI0LjI4MTEgMCA0NS4zNzY1LTE5LjcwNjkgNDUuMzc2NS00NC4wMzJWNDYuNTYwMjU1OTk5OTk5OTk1YzAtMjQuMzI1MS0yMS4wOTQ0LTQ0LjA1MzUtNDUuMzc2NS00NC4wNTM1LTI0LjMwMTYgMC00My45ODkgMTkuNzI4NC00My45ODkgNDQuMDUzNXYyMDAuMTA0OTZDMjY3LjcxNDYgMjcwLjk5MDMgMjg3LjQwMiAyOTAuNjk3MiAzMTEuNzAzNiAyOTAuNjk3MnoiIGZpbGw9IiM1ZTdhODgiPjwvcGF0aD48L2c+PC9nPjwvc3ZnPg==) no-repeat 8px 10px;
padding-left: 36px;
color:#666;
}
/*transition*/
.fade-enter-active,
.fade-leave-active {
transition: all .5s ease-in-out;
}
.fade-enter,.fade-leave-active{
opacity: 0;
transform: translateY(-10px);
}
/*下拉框*/
.calendar-dropdown{
background: #fff;
position: absolute;
left:0;
top:0;
padding:20px;
border: 1px solid #eee;
border-radius: 2px;
}
.calendar-dropdown:before {
position: absolute;
left:30px;
top: -10px;
content: "";
border:5px solid rgba(0, 0, 0, 0);
border-bottom-color: #DEDEDE;
}
.calendar-dropdown:after {
position: absolute;
left:30px;
top: -9px;
content: "";
border:5px solid rgba(0, 0, 0, 0);
border-bottom-color: #fff;
}
/*弹出框*/
.calendar-dialog{
position: absolute;
left:0;
top:0;
right:0;
bottom:0;
}
.calendar-dialog-mask{
background:rgba(255,255,255,.5);
width:100%;
height:100%;
}
.calendar-dialog-body{
background: #fff;
position: absolute;
left:50%;
top:50%;
transform: translate(-50%,-50%);
padding:20px;
border: 1px solid #eee;
border-radius: 2px;
}
</style>

View File

@@ -0,0 +1,474 @@
<template>
<div class="app-container">
<el-card>
<span style="margin-left: 15px">班次类型:</span>
<el-select v-model="roleName" placeholder="班次类型" clearable size="small" style="width:200px">
<el-option
v-for="item in roleNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 15px" @click="searchTable()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="addShifttable()">增加</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="ShiftType()">班次类型工作时间</el-button>
</el-card>
<el-card>
<el-table
:data="tableData"
border
size="mini"
style="width: 100%;height: 400px;">
<el-table-column label="开始工作时间">
<template slot-scope="scope">
{{ scope.row.开始工作时间 }}
</template>
</el-table-column>
<el-table-column disabled label="结束工作时间" >
<template slot-scope="scope">
{{ scope.row.结束工作时间 }}
</template>
</el-table-column>
<el-table-column label="班次类型">
<template slot-scope="scope">
{{ scope.row.班次类型 }}
</template>
</el-table-column>
<el-table-column label="班次代码">
<template slot-scope="scope">
{{ scope.row.班次代码 }}
</template>
</el-table-column>
<el-table-column label="是否夜班">
<template slot-scope="scope">
{{ scope.row.是否夜班 }}
</template>
</el-table-column>
<el-table-column label="是否工作">
<template slot-scope="scope">
{{ scope.row.是否工作 }}
</template>
</el-table-column>
<el-table-column label="是否工作">
<template slot-scope="scope">
{{ scope.row.是否工作 }}
</template>
</el-table-column>
<el-table-column label="日工作能力">
<template slot-scope="scope">
{{ scope.row.日工作能力 }}
</template>
</el-table-column>
<el-table-column label="是否可以安排高难度件">
<template slot-scope="scope">
{{ scope.row.是否可以安排高难度件 }}
</template>
</el-table-column>
<el-table-column label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" width="200">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="aeditShifttable(scope.row)">修改</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 50]"
:page-size="10"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :visible.sync ="dialogFormVisible1" title="增加" center style="min-height: 270px" width="900px">
<el-form ref="form1" :model="form1" :rules="rules" label-position="right" label-width="160px" class="demo-ruleForm">
<el-row>
<el-col :span="10">
<el-form-item label="开始工作时间" >
<el-time-picker
v-model="form1.value"
:picker-options="{
selectableRange: '01:30:00 - 23:30:00'
}"
value-format="hh:mm:ss"
size="mini"
style="width: 200px"
placeholder="任意时间点"/>
</el-form-item>
<el-form-item label="结束工作时间" >
<el-time-picker
v-model="form1.value2"
:picker-options="{
selectableRange: '01:30:00 - 23:30:00'
}"
value-format="hh:mm:ss"
size="mini"
style="width: 200px"
placeholder="任意时间点"/>
</el-form-item>
<el-form-item label="班次类型" >
<el-input
v-model="form1.shifttype"
size="mini"
style="width:200px"/>
</el-form-item>
<el-form-item label="班次代码" >
<el-input v-model="form1.shiftnumber" size="mini" style="width:200px"/>
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item label="是否夜班" >
<el-select v-model="form1.nightwork" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否工作" >
<el-select v-model="form1.work" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否可以安排临时件" >
<el-select v-model="form1.temporary" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否可以安排高难度件" >
<el-select v-model="form1.difficult" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注" >
<el-input
v-model="form1.note"
size="mini"
style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOFF"> </el-button>
<el-button type="primary" @click="submitAdd1()"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormVisible2" title="编辑" center style="min-height: 270px" width="900px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
<el-row>
<el-col :span="10">
<el-form-item label="开始工作时间" >
<el-time-picker
v-model="form1.value"
:picker-options="{
selectableRange: '01:30:00 - 23:30:00'
}"
value-format="hh:mm:ss"
size="mini"
style="width: 200px"
placeholder="任意时间点"/>
</el-form-item>
<el-form-item label="结束工作时间" >
<el-time-picker
v-model="form1.value2"
:picker-options="{
selectableRange: '01:30:00 - 23:30:00'
}"
value-format="hh:mm:ss"
size="mini"
style="width: 200px"
placeholder="任意时间点"/>
</el-form-item>
<el-form-item label="班次类型" >
<el-input
v-model="form2.shifttype"
size="mini"
style="width:200px"/>
</el-form-item>
<el-form-item label="班次代码" >
<el-input v-model="form2.shiftnumber" size="mini" style="width:200px"/>
</el-form-item>
</el-col>
<el-col :span="14">
<el-form-item label="是否夜班" >
<el-select v-model="form2.nightwork" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否工作" >
<el-select v-model="form2.work" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否可以安排临时件" >
<el-select v-model="form2.temporary" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="是否可以安排高难度件" >
<el-select v-model="form2.difficult" placeholder="请选择" size="mini">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注" >
<el-input
v-model="form2.note"
size="mini"
style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOFF">取消</el-button>
<el-button type="primary" @click="submitAdd2()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getScheduling, searchProgramme, addShift, editShift, deleteShift, addShiftType } from '@/api/BasicData/ShiftManagement'
export default {
data() {
return {
roleName: '',
roleNames: [],
tableData: [],
hour: '',
minutes: '',
seconds: '',
tableDatate: [],
dialogFormVisible: false,
form1: {
value: '',
value2: '',
shifttype: '',
shiftnumber: '',
nightwork: '',
work: '',
temporary: '',
difficult: '',
note: ''
},
options: [{
value: '1',
label: '是'
}, {
value: '0',
label: '否'
}],
rules: { // 表单验证规则
value: [{ required: true, message: '请选择时间', trigger: 'blur' }],
value2: [{ required: true, message: '请选择时间', trigger: 'blur' }],
shifttype: [{ required: true, message: '请输入班次', trigger: 'change' }]
},
form2: {
value: new Date(2016, 9, 10, 18, 40),
value2: new Date(2016, 9, 10, 18, 40),
shifttype: '',
shiftnumber: '',
nightwork: '',
work: '',
temporary: '',
difficult: '',
note: ''
},
dialogFormVisible1: false,
dialogFormVisible2: false,
pageCurrent: 1,
pageSize: 10,
total: 0,
rules2: { // 表单验证规则
value: [{ required: true, message: '请选择时间', trigger: 'blur' }],
value2: [{ required: true, message: '请选择时间', trigger: 'blur' }],
shifttype: [{ required: true, message: '请输入班次', trigger: 'change' }]
},
listnumber: ''
}
},
created() {
this.searchData()
},
methods: {
searchData() {
searchProgramme().then(response => {
console.log(response.data)
for (let i = 0; i < response.data.length; i++) {
this.roleNames.push({
label: response.data[i].班次代码,
value: response.data[i].班次代码
})
}
})
},
searchTable() {
getScheduling(this.roleName).then(response => {
this.tableDatate = response.data
for (let i = 0; i < this.tableDatate.length; i++) {
this.hour = this.tableDatate[i].开始工作时间.Hours
this.minutes = this.tableDatate[i].开始工作时间.Minutes
this.seconds = this.tableDatate[i].开始工作时间.Seconds
this.tableDatate[i].开始工作时间 = JSON.stringify(this.tableDatate[i].开始工作时间)
this.tableDatate[i].开始工作时间 = this.hour.toString() + ':' + this.minutes.toString() + ':' + this.seconds.toString()
}
for (let i = 0; i < this.tableDatate.length; i++) {
this.hour = this.tableDatate[i].结束工作时间.Hours
this.minutes = this.tableDatate[i].结束工作时间.Minutes
this.seconds = this.tableDatate[i].结束工作时间.Seconds
this.tableDatate[i].结束工作时间 = JSON.stringify(this.tableDatate[i].结束工作时间)
this.tableDatate[i].结束工作时间 = this.hour.toString() + ':' + this.minutes.toString() + ':' + this.seconds.toString()
}
this.tableData = this.tableDatate
this.total = this.tableData.length
})
},
addShifttable() {
this.dialogFormVisible1 = true
},
aeditShifttable(row) {
this.listnumber = row.序号
this.form2.value = row.开始工作时间
this.form2.value2 = row.结束工作时间
this.form2.shifttype = row.班次类型
this.form2.shiftnumber = row.班次代码
this.form2.nightwork = row.是否夜班
this.form2.work = row.是否工作
this.form2.temporary = row.是否可以安排临时件
this.form2.difficult = row.是否可以安排高难度件
this.form2.note = row.备注
this.dialogFormVisible2 = true
},
submitAdd1() {
this.$refs['form1'].validate((valid) => {
if (valid) {
addShift(this.form1.value, this.form1.value2, this.form1.shifttype, this.form1.shiftnumber, this.form1.nightwork, this.form1.work, this.form1.temporary, this.form1.difficult, this.form1.note).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.form1 = {}
this.searchTable()
this.dialogFormVisible1 = false
} else { this.$message.error('增加失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
ShiftType() {
addShiftType().then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.searchTable()
} else { this.$message.error('增加失败') }
})
},
submitAdd2() {
this.$refs['form2'].validate((valid) => {
if (valid) {
editShift(this.listnumber, this.form2.value, this.form2.value2, this.form2.shifttype, this.form2.shiftnumber, this.form2.nightwork, this.form2.work, this.form2.temporary, this.form2.difficult, this.form2.note).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.searchTable()
this.dialogFormVisible2 = false
this.form2 = {}
} else { this.$message.error('修改失败') }
})
} else {
console.log('error submit!!')
return false
}
})
},
handleDelete(row) { // 删除
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteShift(row.序号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
} else { this.$message.error('删除失败') }
this.searchTable()
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
callOFF() {
this.dialogFormVisible1 = false
this.form1 = {}
this.dialogFormVisible2 = false
this.form2 = {}
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
.el-card{
margin-bottom:15px;
margin-left: 15px;
margin-right: 15px;
}
</style>

View File

@@ -40,6 +40,7 @@
<el-table
v-loading="listLoading"
:data="tableDataBasic"
size="mini"
border
style="width: 100%;"
height="200">
@@ -68,7 +69,7 @@
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" min-width="80">
<el-table-column label="零件数量" min-width="120" align="center">
<template slot-scope="scope">
{{ scope.row.可出库数量 }}
</template>
@@ -78,9 +79,13 @@
{{ scope.row.零件类型名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchBasicPartRecord(scope.row)">选择</el-button>
<el-table-column label="设置" min-width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon="el-icon-edit"
@click="AlterNumber(scope.row)">设置</el-button>
</template>
</el-table-column>
</el-table>
@@ -100,6 +105,7 @@
v-loading="listLoading1"
:data="BasicPartIn"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -128,6 +134,7 @@
v-show="basicshow"
:data="BasicPartOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -160,7 +167,7 @@
<el-card v-show="genneralshow">
<el-radio-group
v-model="radio"
size="small"
size="mini"
style="margin: 10px;"
@change="BasicShow()">
<el-radio v-model="radio" :label="1" >基本件</el-radio>
@@ -197,6 +204,7 @@
v-loading="listLoading3"
:data="tableDataGeneral"
:row-style="tableRowClassName2"
size="mini"
border
style="width: 100%;"
height="200">
@@ -237,7 +245,7 @@
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @click="searchGeneralPartRecord(scope.row)">选择</el-button>
<el-button size="small" type="warning" icon="el-icon-tickets" style="margin: 0 0 0 0px" @row-click="searchGeneralPartRecord(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
@@ -257,6 +265,7 @@
v-loading="listLoading4"
:data="PurchasePartIn"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -284,6 +293,7 @@
v-loading="listLoading5"
v-show="genneralshow"
:data="PurchasePartOut"
size="mini"
border
style="width: 100%;"
height="200">
@@ -310,11 +320,26 @@
</el-table>
</el-card>
</el-tab-pane>
<!--编辑零件数量对话框-->
<el-dialog :visible.sync="dialogFormVisible" title="盘点修改" center width="380px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" class="demo-ruleForm">
<el-form-item label="零件数量" prop="Number" label-width="100px" size="small">
<el-input v-model="form2.Number" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
<el-form-item label="修改原因" prop="AlterReason" label-width="100px">
<el-input v-model="form2.AlterReason" size="small" placeholder="请输入备注" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff2('form2')">取消</el-button>
<el-button type="primary" @click="submitChannge()"> </el-button>
</div>
</el-dialog>
<el-tab-pane label="采购" name="second">
<el-card v-show="purchaseshow">
<el-radio-group
v-model="radio"
size="small"
size="mini"
style="margin: 10px;"
@change="GeneralShow()">
<el-radio v-model="radio2" :label="3">外购件</el-radio>
@@ -351,6 +376,7 @@
v-loading="listLoading6"
:data="tableDataPurchase"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -409,11 +435,13 @@
<el-table
v-loading="listLoading7"
:data="PurchasePartIn"
size="mini"
border
style="width: 100%;"
height="200">
<el-table-column
label="序号"
size="mini"
align="center"
type="index"
width="50"/>
@@ -437,6 +465,7 @@
v-loading="listLoading8"
:data="PurchasePartOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -464,7 +493,7 @@
<el-card v-show="standardshow">
<el-radio-group
v-model="radio"
size="small"
size="mini"
style="margin: 10px;"
@change="GeneralShow()">
<el-radio v-model="radio2" :label="3">外购件</el-radio>
@@ -501,6 +530,7 @@
v-loading="listLoading9"
:data="tableDataStandard"
:row-style="tableRowClassName1"
size="mini"
border
style="width: 100%;"
height="200">
@@ -579,6 +609,7 @@
v-loading="listLoading10"
:data="StandardPartIn"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -605,6 +636,7 @@
<el-table
v-loading="listLoading11"
:data="StandardPartOut"
size="mini"
border
style="width: 100%;"
height="200">
@@ -672,6 +704,7 @@
v-loading="listLoadingx1"
:data="HouseDataBasic"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -735,6 +768,7 @@
<el-table
v-loading="listLoading10"
:data="HouseDataBasicIn"
size="mini"
border
style="width: 100%;"
height="200">
@@ -763,6 +797,7 @@
v-loading="listLoading11"
:data="HouseDataBasicOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -827,6 +862,7 @@
v-loading="listLoadingx2"
:data="HouseDataPurchase"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -896,6 +932,7 @@
v-loading="listLoading10"
:data="HouseDataPurchaseIn"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -923,6 +960,7 @@
v-loading="listLoading11"
:data="HouseDataPurchaseOut"
border
size="mini"
style="width: 100%;"
height="200">
<el-table-column
@@ -953,7 +991,8 @@
</template>
<script>
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut, searchHourseBasicPart, searchHoursePurchasePart } from '@/api/Inventory/InventoryCheck'
import { mapGetters } from 'vuex'
import { initProject, searchmachine, searchTeam, searchPurchasePart, searchBasicPart, searchStandardPart, searchGeneralPart, searchPurchasePartIn, searchPurchasePartOut, searchBasicPartIn, searchBasicPartOut, safeAmount, searchStandardPartIn, searchStandardPartOut, searchHourseBasicPart, searchHoursePurchasePart, CheckAlter } from '@/api/Inventory/InventoryCheck'
export default {
data() {
return {
@@ -1036,9 +1075,31 @@ export default {
HouseDataBasicIn: [],
HouseDataPurchase: [],
HouseDataPurchaseOut: [],
HouseDataPurchaseIn: []
HouseDataPurchaseIn: [],
rules2: { // 表单验证规则
Number: [{ required: true, message: '请输入安全库存量', trigger: 'blur' }],
AlterReason: [{ required: true, message: '请输入安全库存量', trigger: 'blur' }]
},
dialogFormVisible: false,
form2: {
AlterReason: '',
Number: ''
},
project: '',
machinenumber: '',
partnumber: '',
oldnumber: '',
locate: '',
contractdetail: '',
craftnumber: '',
receive: ''
}
},
computed: {
...mapGetters([
'id' // 人员编号
])
},
created() {
this.fetchData()
},
@@ -1239,6 +1300,11 @@ export default {
searchBasicPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableDataBasic = response.data.rows
this.listLoading = false
this.tableDataBasic.map(v => {
this.$set(v, 'changeSafeValue', false)
v.可出库数量 = v.可出库数量
return v
})
this.total = response.data.total
})
},
@@ -1438,6 +1504,35 @@ export default {
this.HouseDataPurchaseOut = response.data
this.listLoading8 = false
})
},
AlterNumber(row) {
this.project = row.项目流水号
this.machinenumber = row.机床流水号
this.partnumber = row.组件流水号
this.oldnumber = row.可出库数量
this.locate = row.货位流水号
this.contractdetail = row.采购合同明细流水号
this.craftnumber = row.工艺计划流水号
this.receive = row.收件信息ID
this.materiallocate = row.物料与货位对照流水号
this.materialType = row.零件类型代码
this.dialogFormVisible = true
},
submitChannge() {
console.log(this.receive, this.project, this.machinenumber, this.partnumber, this.oldnumber, this.form2.AlterReason, this.form2.Number, this.id, this.locate, this.contractdetail, this.craftnumber, this.materialType, this.materiallocate)
CheckAlter(this.receive, this.project, this.machinenumber, this.partnumber, this.oldnumber, this.form2.AlterReason, this.form2.Number, this.id, this.locate, this.contractdetail, this.craftnumber, this.materialType, this.materiallocate).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.dialogFormVisible = false
this.searchBasciPartinfo()
} else {
this.$message.error('修改失败')
}
})
},
callOff2() {
this.dialogFormVisible = false
this.form2 = {}
}
}
}

View File

@@ -113,7 +113,7 @@
</el-table>
</el-card>
<!--仓库表单-->
<el-dialog :visible.sync="dialogFormVisible" title="增加仓库" center width="450px">
<el-dialog :visible.sync="dialogFormVisible" title="仓库" center width="450px">
<el-form ref="form" :model="form" :rules="rules" label-position="center" label-width="110px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
@@ -162,7 +162,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="联系人" prop="ContactpeopleValue">
<el-select v-model="form.ContactpeopleValue" clearable filterable size="small" placeholder="领用者" style="width: 200px;margin-right:10px">
<el-select v-model="form.ContactpeopleValue" clearable filterable size="small" placeholder="联系人" style="width: 200px;margin-right:10px">
<el-option
v-for="item in Contactpeople"
:key="item.value"

View File

@@ -218,7 +218,6 @@ import { searchRequestCard, initWarehouse, addRequestCard, searchInventoryNum, S
import { mapGetters } from 'vuex'
export default {
name: '', // 离线合同
data() {
return {
purchasecard: '',

View File

@@ -97,25 +97,28 @@
</el-table>
</el-card>
<!--异常出库对话框-->
<el-dialog :visible.sync="dialogFormVisible1" title="编辑直达件" center width="380px">
<el-dialog :visible.sync="dialogFormVisible" title="异常出库" center width="380px">
<el-form ref="form" :model="form" :rules="rules" label-position="left">
<el-form-item label="出库数量" prop="ContractNumberValue" label-width="100px" size="small">
<el-input v-model="form.ErrorNumber" size="small" placeholder="出库数量" style="width: 200px"/>
</el-form-item>
<el-form-item label="异常数量" prop="ContractNumberValue" label-width="100px" size="small">
<el-input v-model="form.ErrorNumber" size="small" placeholder="到货数量" style="width: 200px"/>
<el-input v-model="form.ErrorNumber" size="small" placeholder="异常数量" style="width: 200px"/>
</el-form-item>
<el-form-item label="异常原因" prop="TotalContractAmount" label-width="100px">
<el-input v-model="form.Reason" size="small" placeholder="请输入备注" style="width: 200px"/>
<el-input v-model="form.Reason" size="small" placeholder="异常原因" style="width: 200px"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="editDirectPartm()"> </el-button>
<el-button type="primary" @click="submitEdit()"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ListDetailOut } from '@/api/Inventory/PartOut'
import { searchList, searchListDetail, PurchasePart, BasicPart, WorkShopPart, ListDetailOut, ErrorOut } from '@/api/Inventory/PartOut'
import { mapGetters } from 'vuex'
export default {
data() {
@@ -150,13 +153,22 @@ export default {
listLoading: '',
listLoading1: '',
rules: { // 表单验证规则
ErrorNumber: [{ required: true, message: '请输入直达件数量', trigger: 'blur' }],
Normalnumber: [{ required: true, message: '请输入正常数量', trigger: 'blur' }],
ErrorNumber: [{ required: true, message: '请输入异常数量', trigger: 'blur' }],
Reason: [{ required: true, message: '请选择领用人', trigger: 'blur' }]
},
form: {
Normalnumber: '',
ErrorNumber: '',
Reason: ''
}
},
dialogFormVisible: false,
projectnumber: '',
machinenumber: '',
teamnumber: '',
teanmpartnumber: '',
craftnumber: '',
locatenumber: ''
}
},
computed: {
@@ -235,8 +247,29 @@ export default {
})
}
},
ErrorpartOut() {
console.log(21231)
ErrorpartOut(row) {
this.dialogFormVisible = true
this.projectnumber = row.项目流水号
this.machinenumber = row.机床流水号
this.teamnumber = row.组件流水号
this.teanmpartnumber = row.采购合同明细流水号
this.craftnumber = row.工艺计划流水号
this.locatenumber = row.货位流水号
},
callOff(form) {
this.form = []
this.dialogFormVisible = false
},
submitEdit() {
ErrorOut(this.projectnumber, this.machinenumber, this.teamnumber, this.teanmpartnumber, this.craftnumber, this.locatenumber, this.form.ErrorNumber, this.form.Reason).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.dialogFormVisible = false
this.form = []
} else {
this.$message.error('添加失败')
}
})
}
}
}

View File

@@ -0,0 +1,505 @@
<template>
<div class="app-container">
<el-card>
<el-radio-group
v-model="radio"
size="small"
style="margin: 10px;"
@change="BasicShow()">
<el-radio v-model="radio" :label="1" >修改记录</el-radio>
<el-radio v-model="radio" :label="2" style="margin-left: 2px" >异常记录</el-radio>
</el-radio-group>
<span style="margin-left: 20px">项目名称:</span>
<el-select v-model="ProjectValue" filterable clearable size="small" placeholder="请选择项目名称" style="width: 200px;margin-right:10px" @change="searchMachine()">
<el-option
v-for="item in Project"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床图号:</span>
<el-select v-model="MachineValue" filterable clearable size="small" placeholder="机床图号" style="width: 200px;margin-right:10px" @change="searchGroupList()">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select v-model="GroupNumValue" filterable clearable size="small" placeholder="组号" style="width: 200px">
<el-option
v-for="item in GroupNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent=1;pageSize=10;total=0;getAlterRecord()">查询</el-button>
</el-card>
<el-card v-show="altershow">
<el-table
v-loading="loading1"
:data="tableData1"
border
style="width: 100%;max-height: 300px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="项目名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="数量" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="修改原因" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.修改原因 }}
</template>
</el-table-column>
<el-table-column label="记录人" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="修改日期" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.修改日期 }}
</template>
</el-table-column>
<el-table-column label="仓库" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="零件类型" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card v-show="errorshow">
<el-table
v-loading="loading1"
:data="tableData2"
border
style="width: 100%;max-height: 300px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="项目名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="异常数量" min-width="50" align="center">
<template slot-scope="scope">
{{ scope.row.异常数量 }}
</template>
</el-table-column>
<el-table-column label="异常原因" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.异常原因 }}
</template>
</el-table-column>
<el-table-column label="仓库" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="记录时间" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.记录时间 }}
</template>
</el-table-column>
<el-table-column label="零件类型" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.类型名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
<el-card>
<span>补投单号:</span>
<el-input v-model="repleacecard" placeholder="补投单号" size="small" clearable style="width: 150px"/>
<span>仓库:</span>
<el-select v-model="HouseNumber" placeholder="请选择仓库" size="small" @change="searchDemo();payMethodChange()">
<el-option
v-for="item in House"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent3=1;pageSize3=10;total3=0;getReplacement()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="addCard">创建补投单</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-download"
style="margin-left: 10px"
@click="addMateriel">选入物料</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData3" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="补投单状态" align="center" width="80" fixed="left">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否传递)===0" type="warning" size="small">未传递</el-tag>
<el-tag v-if="parseInt(scope.row.是否传递)===1" type="primary" size="small">已传递</el-tag>
</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" min-width="150">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="补投时间" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.补投时间 }}
</template>
</el-table-column>
<el-table-column label="仓库名称" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="280" fixed="right">
<template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.离线合同状态) === 1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)">作废</el-button>
<el-button type="warning" size="mini" icon="el-icon-download" @click="doneRequestCard()">传递</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0;">
<el-pagination
:current-page="pageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize3"
:total="total3"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange3"
@current-change="handleCurrentChange3"/>
</div>
<el-table v-loading="" :data="tableData4" border style="max-height: 300px;" height="300px" size="mini">
<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">
<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.物料规格 }}
</template>
</el-table-column>
<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">
<el-input v-model="scope.row.数量" :disabled="disable" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</div>
</template>
<script>
import { initProject, searchmachine, searchTeam, searchAlterRecord, searchErrorRecord, searchReplacementCard, addReplacementCard, initWarehouse } from '@/api/Inventory/PartsReplacement'
import { mapGetters } from 'vuex'
export default {
data() {
return {
ProjectValue: '',
Project: [],
MachineValue: '',
Machine: [],
GroupNumValue: '',
GroupNum: '',
tableData1: [],
tableData2: [],
tableData3: [],
tableData4: [],
listLoading: false,
listLoading2: false,
listLoading3: false,
listLoading4: false,
PageCurrent: 1,
PageSize: 10,
total: 0,
PageCurrent2: 1,
PageSize2: 10,
total2: 0,
PageCurrent3: 1,
PageSize3: 10,
total3: 0,
ProjectValue_check: '',
MachineValue_check: '',
GroupNumValue_check: '',
repleacecard: '',
repleacecard_check: '',
people: '',
HouseNumber: '',
House: [],
radio: '',
altershow: true,
errorshow: false
}
},
computed: {
...mapGetters([
'id' // 人员编号
])
},
created() {
this.fetchData()
this.getpeopleid()
this.getHouse()
},
methods: {
// 获取人员编号
getpeopleid() {
this.people = this.id
},
getHouse() {
initWarehouse().then(response => { // 初始化仓库
console.log(response)
for (let i = 0; i < response.data.length; i++) {
this.House.push({
label: response.data[i].仓库名称,
value: response.data[i].仓库流水号
})
}
})
},
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'Project') // 项目名称
},
searchMachine() { // 查询机床
this.Machine = []
this.GroupNum = []
this.MachineValue = ''
this.GroupNumValue = ''
console.log(this.ProjectValue)
if (this.ProjectValue !== '') {
searchmachine(1, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
}
},
searchGroupList() { // 查询组号
this.GroupNum = []
this.GroupNumValue = ''
searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
},
// 查询修改记录
getAlterRecord() {
this.listLoading = true
this.tableData1 = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
}
if (this.MachineValue === '') {
this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
}
if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
}
searchAlterRecord(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableData1 = response.data.rows
this.total = response.data.total
this.listLoading = false
})
this.getErrorRecord()
},
// 查询异常记录
getErrorRecord() {
this.listLoading2 = true
this.tableData2 = []
if (this.ProjectValue === '') {
this.ProjectValue_check = 0
} else {
this.ProjectValue_check = 1
}
if (this.MachineValue === '') {
this.MachineValue_check = 0
} else {
this.MachineValue_check = 1
}
if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0
} else {
this.GroupNumValue_check = 1
}
searchErrorRecord(this.PageCurrent2, this.PageSize2, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
this.listLoading2 = false
})
},
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.searchPartinfo()
},
handleCurrentChange(val) {
this.PageCurrent = val
this.searchPartinfo()
},
handleSizeChange2(val) {
this.PageCurrent2 = 1
this.PageSize2 = val
this.searchPartinfo()
},
handleCurrentChange2(val) {
this.PageCurrent2 = val
this.searchPartinfo()
},
// 查询补投单
getReplacement() {
this.listLoading3 = true
this.tableData3 = []
if (this.repleacecard === '') {
this.repleacecard_check = 0
} else {
this.repleacecard_check = 1
}
searchReplacementCard(this.PageCurrent3, this.PageSize3, this.repleacecard_check, this.repleacecard).then(response => {
this.tableData3 = response.data.rows
this.total3 = response.data.total
this.listLoading3 = false
})
},
addCard() {
addReplacementCard(this.people, this.HouseNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.getReplacement()
} else {
this.$message.error('删除失败')
}
})
},
BasicShow() {
if (this.radio === 1) {
this.altershow = true
this.errorshow = false
} else if (this.radio === 2) {
this.altershow = false
this.errorshow = true
}
}
}
}
</script>
<style scoped>
</style>

View File

@@ -11,6 +11,7 @@
:data="tableData1"
border
style="width: 100%;"
size="mini"
height="200"
@row-click = "searchListDetailt()">
<el-table-column
@@ -55,6 +56,7 @@
:data="tableDataPicking"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
@@ -152,6 +154,7 @@
:data="tableDataBasic"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
@@ -234,6 +237,7 @@
:data="tableDataPurchase"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"

View File

@@ -0,0 +1,166 @@
<template>
<div>
<el-card>
<el-row>
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-checkbox v-model="all" size="mini">查询全部</el-checkbox>
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left:10px" @click="downLoad('BL');edit()">导出备料单</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column label="打印状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.备料打印!=='0'" type="success" size="small">已导出</el-tag>
<el-tag v-else type="warning" size="small">未导出</el-tag>
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" width="240px">
<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>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<table id="BL" border cellspacing="0px" style="table-layout: fixed; width: 600px;display: none">
<colgroup>
<col style="width: 100px">
<col style="width: 150px">
<col style="width: 450px">
</colgroup>
<tr>
<th height="60px">GAOJING</th>
<th colspan="2" height="60px"><span style="font-weight:bold">备料单</span></th>
</tr>
<tr>
<td align="center">零件名称</td>
<td align="center">零件图号</td>
<td align="center">备料</td>
</tr>
<tr v-for="(list, index) in tableData2" :key="index">
<td align="center">{{ list.零件名称 }}</td>
<td align="center">{{ list.零件图号 }}</td>
<td>{{ list.工艺要求 }}</td>
</tr>
</table>
</div>
</template>
<script>
import { searchtable, searchtable2, edit } from '@/api/ManufacturingCenter/CreatePreparationBill'
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
export default {
data() {
return {
tableData2: [],
partName: '',
all: false,
loading: false,
Data: [],
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
created() {
this.searchTable()
},
methods: {
// 查询表格数据
searchTable() {
this.loading = true
this.tableData = []
this.Data = []
if (this.partName !== '' && this.partName !== null) {
this.partNamecheck = true
} else {
this.partNamecheck = false
}
searchtable(this.partNamecheck, this.partName, !this.all, 0, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
this.Data = response.data.rows
this.total = response.data.total
}
}).then(() => {
for (let i = 0; i < this.Data.length; i++) {
searchtable2(this.Data[i].工艺计划流水号).then(response => {
this.tableData.push({
零件名称: this.Data[i].零件名称,
零件图号: this.Data[i].零件图号,
备料打印: this.Data[i].备料打印,
工艺要求: response.data[i].工艺要求
})
})
this.loading = false
}
})
},
handleSelectionChange(val) {
this.tableData2 = []
this.tableData2 = val
},
edit() {
for (let i = 0; i < this.tableData2.length; i++) {
edit(this.tableData2[i].工艺计划流水号)
}
},
downLoad(tableid) {
if (this.tableData2.length === 0) {
this.$message.warning('暂无数据')
} else {
this.searchTable()
getExplorer()
method5(tableid)
Cleanup()
}
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -86,7 +86,7 @@
</el-col>
<el-col :span="1" class="line"></el-col>
<el-col :span="11">
<el-date-picker v-model="time_machiningFinish" size="small" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="margin-bottom:20px;width:200px"/>
<el-date-picker v-model="time_machiningFinish" default-time="23:59:59" size="small" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" style="margin-bottom:20px;width:200px"/>
</el-col>
</el-form-item>
</el-form>

View File

@@ -0,0 +1,141 @@
<template>
<div>
<el-card>
<el-row>
<span>零件图号:</span>
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
<el-checkbox v-model="all" size="mini" @change="searchTable">查询全部</el-checkbox>
<el-button :disabled="all" size="small" icon="el-icon-success" type="primary" style="margin-left: 10px" @click="edit()">到货</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center"/>
<el-table-column label="到货状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.备料到货==='1'" type="success" size="small">已到货</el-tag>
<el-tag v-if="scope.row.备料到货==='0'" type="warning" size="small">未到货</el-tag>
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" width="240px">
<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>
<div class="block">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</div>
</template>
<script>
import { searchtable, searchtable2, edit, handlechange } from '@/api/ManufacturingCenter/MaterialArrivalManagement'
export default {
data() {
return {
arrest: [],
all: false,
partName: '',
loading: false,
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 10, // 每页显示条数
pageCurrent: 1 // 后台获取页
}
},
created() {
this.searchTable()
},
methods: {
// 查询表格数据
searchTable() {
this.loading = true
this.tableData = []
this.Data = []
if (this.partName !== '' && this.partName !== null) {
this.partNamecheck = true
} else {
this.partNamecheck = false
}
searchtable(this.partNamecheck, this.partName, !this.all, this.pageCurrent, this.pageSize).then(response => {
if (response.data.total === 0) {
this.loading = false
} else {
this.Data = response.data.rows
this.total = response.data.total
}
}).then(() => {
for (let i = 0; i < this.Data.length; i++) {
searchtable2(this.Data[i].工艺计划流水号).then(response => {
this.tableData.push({
工艺计划流水号: this.Data[i].工艺计划流水号,
零件名称: this.Data[i].零件名称,
零件图号: this.Data[i].零件图号,
备料到货: this.Data[i].备料到货,
工艺要求: response.data[i].工艺要求,
工序流水号: response.data[i].工序流水号
})
})
this.loading = false
}
})
},
handleSelectionChange(val) {
this.arrest = val
},
edit() {
if (this.arrest.length === 0) {
this.$message.warning('请选择零件')
} else {
for (let i = 0; i < this.arrest.length; i++) {
edit(this.arrest[i].工艺计划流水号)
handlechange(this.arrest[i].工序流水号, '0000')
if (i === this.arrest.length - 1) {
this.searchTable()
}
}
}
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.searchTable()
},
handleCurrentChange(val) {
this.pageCurrent = val
this.searchTable()
}
}
}
</script>
<style scoped>
</style>

View File

@@ -605,6 +605,7 @@ export default {
},
created() {
this.fetchData()
this.searchData()
},
methods: {
fetchData() {
@@ -617,7 +618,6 @@ export default {
searchData() {
this.loading = true
search(this.pageCurrent, this.pageSize, this.PrNum).then(response => {
console.log(response.data)
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false

View File

@@ -32,7 +32,7 @@
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;margin-right: 15px" @click="addBidBond();flag1 = 2">增加</el-button>
</el-card>
<el-card>

View File

@@ -11,7 +11,7 @@
</el-select>
<span style="margin-left: 10px">销售经理</span>
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询</el-button>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD('form2')">新增</el-button>
<el-badge :value="value" :max="99" class="item">
<el-button size="small" type="text" @click="AccountsReceivable">查看收款信息</el-button>
@@ -61,6 +61,11 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="已完成进度" width="200">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="付款方式" width="200">
<template slot-scope="scope">
{{ scope.row.付款方式 }}
@@ -138,7 +143,7 @@
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@@ -233,7 +238,7 @@
<template slot-scope="scope">
<span></span>
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:50px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)"/>
<span></span>
<span>内完成</span>
</template>
</el-table-column>
<el-table-column align="center" label="状态" width="100px">
@@ -243,12 +248,15 @@
title="收款计划"
width="200"
trigger="hover">
<div v-show="!scope.row.计划付款时间" style="text-align: center">
<div v-show="(scope.row.计划付款时间 === '' || scope.row.计划付款时间 === null) && parseInt(scope.row.未收金额)!==0 " style="text-align: center">
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
</div>
<div v-show="scope.row.计划付款时间">
<div v-show="scope.row.计划付款时间 !== '' && scope.row.计划付款时间 !== null && parseInt(scope.row.未收金额)!==0">
<h4>{{ scope.row.执行进度名 }}{{ scope.row.节点日期 }}完成计划于{{ scope.row.计划付款时间 }}进行收款距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
</div>
<div v-show="parseInt(scope.row.未收金额)=== 0 " style="text-align: center">
<h4>{{ scope.row.执行进度名 }}阶段收款已完成</h4>
</div>
<el-tag v-if="scope.row.计划付款时间===''||scope.row.计划付款时间===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&parseInt(scope.row.未收金额)===0" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
<el-tag v-else-if="scope.row.计划付款时间!==''&&scope.row.计划付款时间!==null&&scope.row.状态==='未开始'" slot="reference" type="primary" size="small" style="width: 66px">未开始</el-tag>
@@ -279,7 +287,7 @@
:current-page="PageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:total="total2"
:total="PageSize2"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
@@ -1091,7 +1099,7 @@ export default {
})
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
this.$message.error('数据占用')
}
})
})
@@ -1146,7 +1154,7 @@ export default {
this.$message.success('删除成功')
this.tableData2 = []
} else {
this.$message.error('删除失败')
this.$message.error('数据占用')
}
})
})

View File

@@ -27,7 +27,7 @@
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">增加</el-button>
</el-card>
<el-card>
@@ -148,7 +148,7 @@
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" width="150">
<el-table-column align="center" label="合同信息备注" width="250">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
@@ -186,7 +186,7 @@
</el-card>
<el-card v-show="ExecutionProgressShow">
<div>
<h4 style="display: inline-block">合同进度</h4>
<h4 style="display: inline-block">项目进度</h4>
<div style="display: inline-block; float:right">
<span>已完成进度</span>
<el-select v-model="executionProgressID" placeholder="请输入目前执行进度" size="small" style="width: 130px;margin-left: 20px" @change="changeExecutionProgressID">
@@ -507,7 +507,7 @@
<!--客户选择-->
<el-dialog :visible.sync="dialogCustomerFormVisible" title="客户选择" center width="600px">
<el-input v-model="Customer" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" show-overflow-tooltip style="height: 330px; margin-top: 20px" @row-click="handleCustomerChange">
<el-table-column label="省份" align="center" width="80">
<template slot-scope="scope">
@@ -533,7 +533,7 @@
<el-pagination
:current-page="PageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:page-size="PageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"

View File

@@ -104,14 +104,13 @@
:file-list="fileList"
:before-upload="beforeUpload"
:on-success="onSuccess"
:action="'http://192.168.1.122:8410/submit/upload2.ashx?InvoiceNum='+ invoiceNum"
:action="'http://localhost:8411/submit/upload2.ashx?InvoiceNum='+ invoiceNum"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img :src="dialogImageUrl" width="100%" alt="">
</el-dialog>
</div>
</div></el-col>
</el-row>
@@ -928,7 +927,7 @@ export default {
this.$message.sucess('删除成功')
this.getSelect(searchCargoBox, ['货箱号', '货箱号编号'], 'cargoBox', this.invoiceNum)
} else {
this.$message.error('删除失败')
this.$message.error('数据占用')
}
})
})
@@ -1093,7 +1092,7 @@ export default {
return {
_id: item.附件号,
name: item.文件标识,
url: 'http://192.168.1.122:8410/webpage/img/' + item.文件标识
url: 'http://localhost:8411/webpage/img/' + item.文件标识
}
})
},
@@ -1107,7 +1106,7 @@ export default {
}
})
if (data[0].result === '0') {
this.$message.error('删除失败了。')
this.$message.error('删除失败')
}
},
handlePictureCardPreview(file) {
@@ -1127,7 +1126,7 @@ export default {
this.$message.error('只能上传图片。。')
}
if (!isLt4M) {
this.$message.error('上传头像图片大小不能超过 4MB!')
this.$message.error('上传图片大小不能超过 4MB!')
}
return isJPG && isLt4M && isInvoiceNum

View File

@@ -28,7 +28,7 @@
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
</el-card>
<!--项目表格-->
<el-card>
@@ -94,7 +94,7 @@
size="mini"
type="primary"
icon="el-icon-circle-plus-outline"
@click.stop="openAddInvoiceRecordingDialog(); flag = 1">增加记录</el-button>
@click.stop="openAddInvoiceRecordingDialog(scope.row); flag = 1">增加记录</el-button>
</template>
</el-table-column>
</el-table>
@@ -286,7 +286,7 @@
<!--客户选择-->
<el-dialog :visible.sync="dialogCustomerFormVisible" title="客户选择" center width="600px">
<el-input v-model="Customer" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize1 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" show-overflow-tooltip style="height: 330px; margin-top: 20px" @row-click="handleCustomerChange">
<el-table-column label="省份" align="center" width="80">
<template slot-scope="scope">
@@ -391,6 +391,7 @@ export default {
},
created() {
this.init()
this.fetchTableData1()
},
methods: {
// 初始化条件
@@ -466,7 +467,7 @@ export default {
sums[index] = this.taxRate * 100 + '% (税率)'
return
} else if (index === 9) {
sums[index] = parseFloat(sums[7]) * this.taxRate + ' 元(税额)'
sums[index] = (parseInt(sums[7]) * 100 * this.taxRate) / 100 + ' 元(税额)'
return
} else if (index === 10) {
sums[index] = parseFloat(sums[7]) - parseFloat(sums[9]) + ' 元(未税)'
@@ -491,7 +492,7 @@ export default {
this.fetchTableData1()
this.fetchTableData2(row)
} else {
this.$message.error('修改失败')
this.$message.error('数据占用')
}
})
},
@@ -522,7 +523,8 @@ export default {
this.peopleid = ''
},
// 打开增加开票记录对话框
openAddInvoiceRecordingDialog() {
openAddInvoiceRecordingDialog(row) {
this.projectid = row.项目流水号
this.addForm('form')
this.title = '增加'
this.dialogFormVisible1 = true
@@ -596,7 +598,7 @@ export default {
this.tableData2 = data
})
} else {
this.$message.error('增加失败')
this.$message.error('数据占用')
}
})
},
@@ -630,7 +632,7 @@ export default {
this.tableData2 = data
})
} else {
this.$message.error('修改失败')
this.$message.error('数据占用')
}
})
},

View File

@@ -0,0 +1,810 @@
<template>
<div>
<el-card>
<span>项目名称</span>
<el-select v-model="entryNameValue" filterable placeholder="项目名称" style="margin-right: 10px" size="small" clearable>
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading1"
:data="tableData1"
style="width: 100%"
height="400"
border
size="mini"
highlight-current-row
@row-click="fetchTableData2">
<el-table-column align="center" label="合同编号" width="200">
<template slot-scope="scope">
<el-tag type="primary">{{ scope.row.合同编号 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="200">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="已完成进度" width="100">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同签订日期">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="客户名称">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系人" width="80">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话" width="100">
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="260px">
<template slot-scope="scope">
<el-button
:disabled="scope.row.是否禁用增加履约保证金"
size="mini"
type="primary"
icon="el-icon-circle-plus-outline"
@click.stop="openPerformanceBondDialog(scope.row); flag = 1">履约保证金</el-button>
<el-button
:disabled="scope.row.是否禁用增加履约保函"
size="mini"
type="primary"
icon="el-icon-circle-plus-outline"
@click.stop="addPerformanceGuarantee(scope.row)">履约保函</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<template>
<el-tabs v-model="activeName" type="card">
<el-tab-pane :disabled="performanceBondDisabled" label="履约保证金" name="first">
<el-table
v-loading="listLoading2"
:data="tableData2"
highlight-current-row
style="width: 100%"
height="100"
border
size="mini">
<el-table-column align="center" label="履约保证金金额">
<template slot-scope="scope">
<el-tag type="primary" size="small">{{ scope.row.履约保证金金额 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="保证金类型">
<template slot-scope="scope">
{{ scope.row.保证金类型 }}
</template>
</el-table-column>
<el-table-column align="center" label="收回条件">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="截止时间">
<template slot-scope="scope">
{{ scope.row.提前X天提醒我 }}天内收回
</template>
</el-table-column>
<el-table-column align="center" label="是否收回">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否收回) === 1" slot="reference" size="small" type="success" style="width: 66px">已收回</el-tag>
<el-tag v-else-if="parseInt(scope.row.是否收回) === 0" slot="reference" type="danger" size="small" style="width: 66px">未收回</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="实际收回日期">
<template slot-scope="scope">
{{ scope.row.实际收回日期 === '' || scope.row.实际收回日期 === null ? scope.row.实际收回日期 = '暂未收回' : scope.row.实际收回日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="状态">
<template slot-scope="scope">
<el-popover
placement="top-start"
title="收回计划"
width="200"
trigger="hover">
<div v-show="(scope.row.计划收款日期 === '' || scope.row.计划收款日期 === null) && parseInt(scope.row.是否收回)!== 1 " style="text-align: center">
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
</div>
<div v-show="scope.row.计划收款日期 !== '' && scope.row.计划收款日期 !== null && parseInt(scope.row.是否收回)!== 1">
<h4>{{ scope.row.执行进度名 }}{{ scope.row.节点日期 }}完成计划于{{ scope.row.计划收款日期 }}进行收款距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
</div>
<div v-show="parseInt(scope.row.是否收回)=== 1 " style="text-align: center">
<h4>已于{{ scope.row.实际收回日期 }}收回</h4>
</div>
<el-tag v-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null && parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 1" slot="reference" size="small" type="warning" style="width: 66px">即将拖期</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 2" slot="reference" type="danger" size="small" style="width: 66px">已经拖期</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 0" slot="reference" type="primer" size="small" style="width: 66px">无计划</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 1" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
<el-tag v-else-if="scope.row.计划收款日期===''||scope.row.计划收款日期===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="260px">
<template slot-scope="scope">
<el-button
:disabled="scope.row.是否禁用收回"
size="mini"
type="success"
@click.stop="takeBack(scope.row)">收回</el-button>
<el-button
size="mini"
type="warning"
@click.stop="openEditPerformanceBondDialog(scope.row); flag = 2">编辑</el-button>
<el-button
size="mini"
type="danger"
@click.stop="delPerformanceBond(scope.row)">删除</el-button >
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :disabled="performanceGuaranteeDisabled" label="履约保函" name="second">
<div v-show="performanceGuaranteeShow">
<el-button type="danger" icon="el-icon-delete" size="small" style="float: right;display: inline-block" @click="delPerformanceGuarantee">删除</el-button>
<div style="width: 150px; height: 150px; margin: auto;left: 50%;right: 50%">
<el-upload
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:file-list="fileList"
:before-upload="beforeUpload"
:on-success="onSuccess"
:action="'http://localhost:8411/submit/upload3.ashx?ProjectId='+ projectId"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img :src="dialogImageUrl" width="100%" alt="">
</el-dialog>
</div>
</div>
</el-tab-pane>
</el-tabs>
</template>
</el-card>
<el-dialog :visible.sync="dialogTimeVisible" title="实际收回日期" center style="min-height: 300px" width="23%">
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<el-form-item label="实际收回日期" prop="实际收回日期">
<el-date-picker
v-model="form.实际收回日期"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择实际收回日期"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOffTime('form')">取消</el-button>
<el-button type="primary" @click="submitTime('form')"> </el-button>
</div>
</el-dialog>
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="40%">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="保证金金额" prop="保证金金额">
<el-input-number v-model="form2.保证金金额" :precision="2" :step="0.1" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保证金类型" prop="保证金类型">
<el-select v-model="form2.保证金类型" filterable placeholder="请选择保证金类型" style="width: 200px" size="small">
<el-option
v-for="item in performanceBondType"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="收回条件" prop="收回条件">
<el-select v-model="form2.收回条件" filterable placeholder="请选择收回条件" style="width: 200px" size="small">
<el-option
v-for="item in plannedTime"
: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-number v-model="form2.截止时间" placeholder="请输入截止时间" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOffPerformanceBondDialog('form2')">取消</el-button>
<el-button type="primary" @click="submitPerformanceBondDialog('form2')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import request from '@/utils/request'
import elInput from 'element-ui/packages/input'
import { initProject, searchTableData1, typeOfPerformanceBond, searchTableData2, takeBack, executionProgressID, initType, addPerformanceBond, editPerformanceBond, delPerformanceBond, addPerformanceGuarantee, delPerformanceGuarantee } from '@/api/MarketingCenter/PerformanceBond'
export default {
components: {
elInput
},
data() {
const validateValue = (rule, value, callback) => {
if (value === 0) {
callback(new Error('金额不能为0'))
} else {
callback()
}
}
return {
title1: '', // 履约保证金新增或编辑对话框
entryNameValue: '', // 查询条件_项目名称
entryName: [], // 查询条件_项目名称数组
startTime: '', // 查询条件_开始时间
endTime: '', // 查询条件_结束时间
PageSize: 10, // 项目信息表格初始一页显示十条
PageCurrent: 1, // 项目信息表格一次翻一页
total: null,
tableData1: [], // 项目信息表格数据
listLoading1: false, // 项目信息表格加载动画
flag: '', // 旗帜变量
activeName: 'first', // 标签页初始
projectId: '', // 项目流水号中间变量
tableData2: [], // 履约保证金信息
listLoading2: false,
dialogTimeVisible: false,
performanceBondCode: '', // 履约保证金流水号
dialogFormVisible1: false, // 履约保证金对话框
plannedTime: [],
performanceBondType: [],
performanceBondDisabled: true, // 履约保证金标签页是否禁用
performanceGuaranteeDisabled: true, // 履约保函是否禁用
dialogVisible: false, // 履约保函复印件
dialogImageUrl: '',
fileList: [],
performanceGuaranteeShow: true,
form: {
实际收回日期: ''
},
form2: {
保证金金额: '',
保证金类型: 1,
收回条件: 1,
截止时间: 15
},
rules: { // 表单验证规则
实际收回日期: [{ required: true, message: '请选择实际收回日期', trigger: 'change' }]
},
rules2: { // 表单验证规则
保证金金额: [
{ required: true, message: '请输入保证金金额', trigger: 'change' },
{ required: true, trigger: 'blur', validator: validateValue }],
保证金类型: [{ required: true, message: '请选择保证金类型', trigger: 'change' }],
收回条件: [{ required: true, message: '请选择收回条件', trigger: 'change' }],
截止时间: [{ required: true, message: '请输入截止时间', trigger: 'change' }]
}
}
},
created() {
this.init()
this.fetchTableData1()
},
methods: {
// 初始化条件
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
this.getSelect(executionProgressID, ['执行进度名', '执行进度ID'], 'plannedTime')
this.getSelect(initType, ['保证金类型', '保证金类型流水号'], 'performanceBondType')
},
// 查询合同(项目)信息
fetchTableData1() {
if (this.entryNameValue === '' || this.entryNameValue === null) {
this.entryNameValue_check = 0
} else {
this.entryNameValue_check = 1
}
if (this.startTime === '' || this.startTime === null) {
this.startTime_check = 0
} else {
this.startTime_check = 1
}
if (this.endTime === '' || this.endTime === null) {
this.endTime_check = 0
} else {
this.endTime_check = 1
}
this.listLoading1 = true
searchTableData1(this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime).then(response => {
this.tableData2 = []
this.listLoading1 = false
const data = response.data
for (let i = 0; i < data.rows.length; i++) {
data.rows[i].合同签订日期 = data.rows[i].合同签订日期.substring(0, data.rows[i].合同签订日期.length - 8)
parseInt(data.rows[i].履约保证金类型) !== 0 ? data.rows[i].是否禁用增加履约保证金 = true : data.rows[i].是否禁用增加履约保证金 = false
parseInt(data.rows[i].履约保证金类型) !== 0 ? data.rows[i].是否禁用增加履约保函 = true : data.rows[i].是否禁用增加履约保函 = false
}
this.tableData1 = data.rows
this.total = data.total
})
},
// 项目信息表格改变每页显示条数
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.tableData2 = []
this.fetchTableData1()
},
// 项目信息表格翻页
handleCurrentChange(val) {
this.PageCurrent = val
this.tableData2 = []
this.fetchTableData1()
},
// 履约保证金查询
fetchTableData2(row) {
this.projectId = row.项目流水号
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.tableData2 = []
this.performanceGuaranteeShow = false
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
}
})
},
takeBack(row) {
this.addForm('form')
this.performanceBondCode = row.履约保证金流水号
this.dialogTimeVisible = true
},
callOffTime() {
this.dialogTimeVisible = false
},
submitTime(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
takeBack(this.performanceBondCode, this.form.实际收回日期).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.dialogTimeVisible = false
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
this.tableData2 = []
this.performanceGuaranteeShow = false
}
})
} else {
this.$message.error('操作失败')
}
})
}
})
},
openPerformanceBondDialog(row) {
this.addForm('form2')
this.title1 = '增加履约保证金'
this.dialogFormVisible1 = true
this.projectId = row.项目流水号
this.tableData2 = []
},
callOffPerformanceBondDialog() {
this.dialogFormVisible1 = false
},
submitPerformanceBondDialog(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.flag === 1) {
addPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.fetchTableData1()
this.dialogFormVisible1 = false
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
this.tableData2 = []
this.performanceGuaranteeShow = false
}
})
} else {
this.$message.error('操作失败')
}
})
} else if (this.flag === 2) {
editPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间, this.performanceBondCode).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.dialogFormVisible1 = false
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
this.tableData2 = []
this.performanceGuaranteeShow = false
}
})
} else {
this.$message.error('操作失败')
}
})
}
}
})
},
openEditPerformanceBondDialog(row) {
this.dialogFormVisible1 = true
this.performanceBondCode = row.履约保证金流水号
this.form2.保证金金额 = row.履约保证金金额
this.form2.保证金类型 = row.保金类型
this.form2.收回条件 = parseInt(row.执行进度流水号)
this.title1 = '编辑履约保证金'
},
delPerformanceBond(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delPerformanceBond(this.projectId, row.履约保证金流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.activeName = 'first'
this.listLoading2 = true
this.fetchTableData1()
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
}
this.tableData2 = data
})
} else {
this.$message.error('数据占用')
}
})
})
},
addPerformanceGuarantee(row) {
this.projectId = row.项目流水号
this.$confirm('是否新增履约保函', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
addPerformanceGuarantee(this.projectId).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.fetchTableData1()
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.tableData2 = []
this.performanceGuaranteeShow = false
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
}
})
} else {
this.$message.error('添加失败')
}
})
})
},
async getFileList() {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 合同信息管理_履约保证金_履约保函 where 是否启用 = 1 and 项目流水号 = ${this.projectId}`
}
})
this.fileList = data.map(item => {
return {
_id: item.履约保函流水号,
name: item.文件标识,
url: 'http://localhost:8411/webpage/img/' + item.文件标识
}
})
},
async handleRemove(file, fileList) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '4',
name: `update 合同信息管理_履约保证金_履约保函 set 是否启用 = 0 where 履约保函流水号 = ${file._id}`
}
})
if (data[0].result === '0') {
this.$message.error('上传失败')
}
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
beforeUpload(file) {
const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4
const isInvoiceNum = !!this.projectId
if (!isJPG) {
this.$message.error('只能上传图片。。')
}
if (!isLt4M) {
this.$message.error('上传图片大小不能超过 4MB!')
}
return isJPG && isLt4M && isInvoiceNum
},
onSuccess(res, file, fileList) {
fileList = []
if (res[0].result === '1') {
this.getFileList()
} else {
this.$message.error('上传失败')
}
},
delPerformanceGuarantee() {
this.$confirm('是否删除履约保函', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delPerformanceGuarantee(this.projectId).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.fetchTableData1()
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.tableData2 = []
this.performanceGuaranteeShow = false
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
}
})
} else {
this.$message.error('删除失败')
}
})
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -12,7 +12,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;margin-right: 15px" @click="addSafetyMargin();flag1 = 1">增加</el-button>
<span>预警颜色说明</span>
<el-tag type="info">未到时间</el-tag>

View File

@@ -68,6 +68,12 @@
<el-tag v-else type="info" size="small">未付款</el-tag>
</template>
</el-table-column>
<el-table-column label="到货状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.单据状态==='3'" type="success" size="small">已到货</el-tag>
<el-tag v-else type="info" size="small">未到货</el-tag>
</template>
</el-table-column>
<el-table-column label="表单号" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.表单号 }}
@@ -143,9 +149,6 @@
</template>
</el-table-column>
<el-table-column label="付款日期" align="center" width="240px">
<!--<template slot-scope="scope">-->
<!--{{scope.row.实际付款时间}}-->
<!--</template>-->
<el-table-column label="入库" align="center" width="140px">
<template slot-scope="scope">
{{ scope.row.入库时间 }}
@@ -176,7 +179,7 @@
class="el-icon-edit"
@click="Withdrawing(scope.$index, scope.row, 'form')">扣款</el-button>
<el-button
:disabled="scope.row.实际付款时间!==''"
:disabled="scope.row.实际付款时间!==''||scope.row.单据状态!=='3'"
size="mini"
type="success"
class="el-icon-check"
@@ -376,8 +379,6 @@ export default {
day = '0' + day
}
this.实际付款时间 = time.getFullYear() + '/' + month + '/' + day
// payment(row.外协加工任务单流水号).then(response => {
// }).then(() => {
payTime(row.外协加工任务单流水号, this.实际付款时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('付款成功')
@@ -386,7 +387,6 @@ export default {
this.$message.error('付款失败')
}
})
// })
}).catch(() => {
this.$message({
type: 'info',

View File

@@ -329,12 +329,12 @@
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 15px" @click="calculatingPrice">计算价格</el-button>
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 15px" @click="confirmPrice">确定价格</el-button>
<el-button type="success" size="mini" icon="el-icon-success" style="margin-left:10px;margin-top: 15px" @click="Deal">成交</el-button>
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 15px" @click="downLoadCjn('cjn')">导出外协加工任务单</el-button>
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 15px" @click="downLoadRWD('RWD')">导出外协加工任务单</el-button>
</div>
</el-card>
<el-card v-show="card">
<table id="cjn" cellspacing="0px" align="center" width="100%" style="">
<table id="RWD" cellspacing="0px" align="center" width="100%" style="">
<tbody id="1">
<tr>
<td colspan="4" style="text-align: left;font-size: 30px;font-weight: bold">GAOJING</td>
@@ -717,7 +717,7 @@ export default {
}
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
this.大写金额 = convertCurrency(this.总计)
// cjn end
// RWD end
if (response.data.length === 0) {
this.loading = false
}
@@ -1016,7 +1016,7 @@ export default {
if (response.data.length === 0) {
this.loading = false
}
// cjn end
// RWD end
if (response.data.length === 0) {
this.loading = false
}
@@ -1140,7 +1140,7 @@ export default {
}
this.总计 = this.加工价格合计 + this.材料价格合计 + this.其他价格合计 + this.运费
this.大写金额 = convertCurrency(this.总计)
// cjn end
// RWD end
if (response.data.length === 0) {
this.loading = false
}
@@ -1533,7 +1533,7 @@ export default {
this.$message.warning('请选择订单')
}
},
downLoadCjn(tableid) {
downLoadRWD(tableid) {
if (this.List3.length === 0) {
this.$message.warning('暂无数据')
} else {

View File

@@ -20,18 +20,18 @@
<el-card>
<el-table v-loading="loading2" :data="List" highlight-current-row height="350" border @row-click="searchProcess" >
<el-table-column label="付款状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.实际付款时间!==''" type="success" size="small" style="margin: 0px">已付款</el-tag>
<el-tag v-else type="info" size="small" style="margin: 0px">未付款</el-tag>
</template>
</el-table-column>
<el-table-column label="收货状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.单据状态==='作废'" type="success" size="small" style="margin: 0px">已收货</el-tag>
<el-tag v-else type="info" size="small" style="margin: 0px">未收货</el-tag>
</template>
</el-table-column>
<el-table-column label="付款状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="scope.row.实际付款时间!==''" type="success" size="small" style="margin: 0px">已付款</el-tag>
<el-tag v-else type="info" size="small" style="margin: 0px">未付款</el-tag>
</template>
</el-table-column>
<el-table-column label="表单号" align="center" min-width="200px">
<template slot-scope="scope">
{{ scope.row.表单号 }}

View File

@@ -54,7 +54,7 @@
<el-card>
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="供应商" align="center" min-width="150">
<el-table-column label="供应商" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -64,12 +64,12 @@
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="150">
<el-table-column label="请款人" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="150" prop="请款金额">
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
@@ -164,7 +164,7 @@ export default {
this.searchTable1()
},
searchTable2() {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 2).then(response => {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 1).then(response => {
console.log(response.data.rows)
this.tableData2 = response.data.rows
this.total2 = response.data.total
@@ -227,7 +227,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 2).then(response => {
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
@@ -245,7 +245,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 2).then(response => {
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 1).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()

View File

@@ -54,7 +54,7 @@
<el-card>
<el-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
<el-table-column label="供应商" align="center" min-width="150">
<el-table-column label="供应商" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -64,12 +64,12 @@
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="150">
<el-table-column label="请款人" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="150" prop="请款金额">
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
@@ -163,7 +163,7 @@ export default {
this.searchTable1()
},
searchTable2() {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 3).then(response => {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 2).then(response => {
console.log(response.data.rows)
this.tableData2 = response.data.rows
this.total2 = response.data.total
@@ -227,7 +227,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 3).then(response => {
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
@@ -245,7 +245,7 @@ export default {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 3).then(response => {
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()

View File

@@ -1,148 +1,148 @@
<template>
<div class="app-container">
<el-card>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>库存状态:</span>
<el-select v-model="inventoryStateValue" placeholder="库存状态" size="small" clearable>
<el-option
v-for="item in inventoryState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>采购状态:</span>
<el-select v-model="purchaseStateValue" placeholder="库存状态" size="small">
<el-option
v-for="item in purchaseState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="loading1"
:data="tableData1"
border
style="width: 100%;max-height: 300px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="库存状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.库存是否不足)===1" type="danger" size="small">不足</el-tag>
<el-tag v-else type="success" size="small"></el-tag>
</template>
</el-table-column>
<el-table-column label="物料名称" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="供货商" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="当前库存量" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
</template>
</el-table-column>
<el-table-column label="安全库存量" min-width="200" align="center">
<template slot-scope="scope">
<template v-if="scope.row.changeSafeValue">
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
<div slot="header">
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>库存状态:</span>
<el-select v-model="inventoryStateValue" placeholder="库存状态" size="small" clearable>
<el-option
v-for="item in inventoryState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>采购状态:</span>
<el-select v-model="purchaseStateValue" placeholder="库存状态" size="small">
<el-option
v-for="item in purchaseState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button style="float: right; padding: 10px" type="text" @click="showMaterialTable=!showMaterialTable">{{ showMaterialTable ? '收起' : '展开' }}</el-button>
</div>
<div v-show="showMaterialTable">
<el-table
v-loading="loading1"
:data="tableData1"
border
style="width: 100%;max-height: 460px;"
height="460"
size="mini"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="库存状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.库存是否不足)===1" type="danger" size="small"></el-tag>
<el-tag v-else type="success" size="small">充足</el-tag>
</template>
<span v-else>{{ scope.row.安全库存量 }}</span>
</template>
</el-table-column>
<el-table-column label="设置" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button
v-else
type="primary"
size="mini"
icon="el-icon-edit"
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</el-table-column>
<el-table-column label="物料名称" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="供货商" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="当前库存量" min-width="90" align="center">
<template slot-scope="scope">
{{ scope.row.当前库存量 }}
</template>
</el-table-column>
<el-table-column label="安全库存量" min-width="200" align="center">
<template slot-scope="scope">
<template v-if="scope.row.changeSafeValue">
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
</template>
<span v-else>{{ scope.row.安全库存量 }}</span>
</template>
</el-table-column>
<el-table-column label="设置" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button
v-else
type="primary"
size="mini"
icon="el-icon-edit"
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</div>
</el-card>
<el-card>
<span>离线合同号:</span>
<el-input v-model="offlineContract" placeholder="离线合同号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="addOfflineContract">创建离线合同</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-download"
style="margin-left: 10px"
@click="addMateriel">选入物料</el-button>
</el-card>
<el-card>
<el-table v-loading="" :data="tableData2" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<div slot="header">
<span>离线合同号:</span>
<el-input v-model="offlineContract" placeholder="离线合同号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="addOfflineContract">创建离线合同</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-download"
style="margin-left: 10px"
@click="addMateriel">选入物料</el-button>
</div>
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="460px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="合同状态" align="center" width="80" fixed="left">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
<el-tag v-if="parseInt(scope.row.离线合同状态)===2" type="primary" size="small">采购</el-tag>
<el-tag v-if="parseInt(scope.row.离线合同状态)===4" type="success" size="small">到货</el-tag>
<el-tag v-if="parseInt(scope.row.离线合同状态)===5" type="info" size="small">已作废</el-tag>
<el-tag v-if="Number(scope.row.离线合同状态)===1" type="warning" size="small">编辑中</el-tag>
<el-tag v-if="Number(scope.row.离线合同状态)===2" type="success" size="small">采购</el-tag>
<el-tag v-if="Number(scope.row.离线合同状态)===5" type="danger" size="small">作废</el-tag>
</template>
</el-table-column>
<el-table-column label="离线合同编号" align="center" min-width="150">
<el-table-column label="离线合同编号" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="离线合同名称" align="center" min-width="150">
<el-table-column label="离线合同名称" align="center" min-width="170">
<template slot-scope="scope">
{{ scope.row.离线合同名称 }}
</template>
@@ -157,41 +157,26 @@
{{ scope.row.采购员 }}
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.创建日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="付款方式" align="center" width="100">
<el-table-column label="离线合同备注" align="center" min-width="250">
<template slot-scope="scope">
{{ scope.row.付款方式内容 }}
{{ scope.row.离线合同备注 }}
</template>
</el-table-column>
<el-table-column label="第一次付款时间" align="center" min-width="150">
<el-table-column label="操作" align="center" width="200" fixed="right">
<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" min-width="150">
<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="280" fixed="right">
<template slot-scope="scope">
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" icon="el-icon-edit" @click="editOfflineContract(scope.row)">编辑</el-button>
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)">作废</el-button>
<el-button type="warning" size="mini" icon="el-icon-download">导出</el-button>
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="primary" size="mini" icon="el-icon-edit" @click="editOfflineContract(scope.row)"/>
<el-button :disabled="parseInt(scope.row.离线合同状态)!==1" type="danger" size="mini" icon="el-icon-delete" @click="deleteOfflineContract(scope.row)"/>
<el-button type="warning" size="mini" icon="el-icon-download"/>
</template>
</el-table-column>
</el-table>
@@ -205,6 +190,7 @@
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
<el-button :disabled="disable" type="success" size="mini" style="float:right" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
</div>
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border style="max-height: 300px;" height="300px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">
@@ -247,6 +233,11 @@
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
</template>
</el-table-column>
<el-table-column v-if="disable" label="到货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
@@ -255,26 +246,6 @@
</el-table>
</el-card>
<el-card>
<el-table
:data="tableData4"
:show-header="false"
:highlight-current-row="!disable"
border
height="280px"
style="width: 250px;display:inline-block;max-height: 280px;"
size="mini"
@row-click="searchDemo">
<el-table-column align="center" label="合同模板名称">
<template slot-scope="scope">
{{ scope.row.合同模板名称 }}
</template>
</el-table-column>
</el-table>
<el-input :rows="20" v-model="textArea" :readonly="disable" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
<el-button :disabled="disable" type="success" size="mini" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
<el-row>
@@ -386,8 +357,8 @@
</el-form>
</el-dialog>
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="800px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="120px">
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="750px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
<el-row>
<el-col :span="12">
<el-form-item label="离线合同编号" prop="离线合同编号">
@@ -422,67 +393,8 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="运费" prop="运费">
<el-input v-model="form2.运费" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="付款方式" prop="付款方式">
<el-select v-model="form2.付款方式" placeholder="付款方式" size="small" @change="searchDemo();payMethodChange()">
<el-option
v-for="item in payMethod"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="第一次付款时间" prop="第一次付款时间">
<el-select v-model="form2.第一次付款时间" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
: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-select v-model="form2.第二次付款时间" :disabled="disable2" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="第三次付款时间" prop="第三次付款时间">
<el-select v-model="form2.第三次付款时间" :disabled="disable3" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
: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-select v-model="form2.第四次付款时间" :disabled="disable4" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in payTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-form-item label="离线合同备注" prop="离线合同备注">
<el-input v-model="form2.离线合同备注" size="small" type="textarea" style="width: 550px"/>
</el-form-item>
</el-col>
</el-row>
@@ -506,14 +418,15 @@
</template>
<script>
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, initPayMethod, initPayTimeNode, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
addMateriel, deleteMateriel, doneOfflineContact, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
import { mapGetters } from 'vuex'
export default {
name: '', // 离线合同
data() {
return {
showMaterialTable: true,
loading1: false,
title2: '',
purchaseStateValue: 2, // 采购状态 全部
@@ -550,7 +463,6 @@ export default {
offlineContract: '', // 离线合同号
supplierName0: '', // 供应商名称(外面的)
supplierName: '', // 供应商名称
payMethod: [], // 付款方式
payTime: [], // 付款时间节点
tableData2: [],
total2: 0,
@@ -591,12 +503,7 @@ export default {
供应商流水号: '',
供应商名称: '',
规定到货时间: '',
运费: '',
付款方式: '',
第一次付款时间: 1,
第二次付款时间: 1,
第三次付款时间: 1,
第四次付款时间: 1
离线合同备注: '付款方式:;付款时间:;到货时间:;开票信息:;其他说明:;'
},
rules2: { // 离线合同表单验证规则
离线合同编号: [{ required: true, message: '请填写离线合同编号' }],
@@ -607,7 +514,6 @@ export default {
付款方式: [{ required: true, message: '请选择付款方式' }]
},
tableData3: [],
textArea: '请选择',
materielGroup: [], // 物料流水号组
partGroup: [], // 离线合同明细流水号组
numGroup: [], // 数量组
@@ -615,11 +521,8 @@ export default {
totalPrice: 0, // 合同总额
tableData4: [], // 合同模板
stipulateArrivalTime: '', // 规定到货时间
payMethodName: '', // 付款方式名称
离线合同状态: '',
paramRow: '', // 参数row
disable2: true,
disable3: true,
disable4: true,
disable: true // 其他的禁用
}
},
@@ -633,29 +536,11 @@ export default {
},
created() {
this.fetchData()
this.searchTable1()
this.searchTable2()
},
methods: {
fetchData() {
initPayMethod().then(response => { // 初始化付款方式
for (let i = 0; i < response.data.length; i++) {
this.payMethod.push({
label: response.data[i].付款方式内容,
value: response.data[i].付款方式流水号
})
}
})
initPayTimeNode().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.payTime.push({
label: response.data[i].付款时间节点名称,
value: response.data[i].付款时间节点流水号
})
}
})
searchContractDemo().then(response => { // 初始化合同模板
this.tableData4 = response.data
})
},
fetchData() {},
searchTable1() { // 查询物料库物料
this.loading1 = true
this.materialName ? this.check1 = 1 : this.check1 = 0
@@ -729,14 +614,36 @@ export default {
this.form2.供应商流水号 = ''
this.form2.供应商名称 = ''
this.form2.规定到货时间 = ''
this.form2.运费 = ''
this.form2.付款方式 = ''
this.form2.第一次付款时间 = 1
this.form2.第二次付款时间 = 0
this.form2.第三次付款时间 = 0
this.form2.第四次付款时间 = 0
this.form2.离线合同备注 = '付款方式:;付款时间:;到货时间:;开票信息:;其他说明:;'
this.dialogVisible2 = true
},
submitAddOfflineContract() { // 新建离线合同
this.$refs['form2'].validate((valid) => {
if (valid) {
const numGroup1 = [] // 空数组,放现有的询价单号
searchOfflineContract2().then(response => { // 先查询判断是否存在
for (let i = 0; i < response.data.length; i++) {
numGroup1.push(response.data[i].离线合同编号)
}
}).then(() => {
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1) {
this.$message.error('该离线合同编号已存在')
} else {
addOfflineContract(this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.离线合同备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新建离线合同成功')
this.searchTable2()
this.dialogVisible2 = false
} else { this.$message.error('新建离线合同失败') }
})
}
})
} else {
console.log('error submit!!')
return false
}
})
},
editOfflineContract(row) {
console.log(row)
if (this.$refs['form2'] !== undefined) {
@@ -749,21 +656,12 @@ export default {
this.form2.供应商流水号 = row.供应商流水号
this.form2.供应商名称 = row.供应商名称
this.form2.规定到货时间 = row.规定到货时间
this.form2.运费 = row.运费
this.form2.付款方式 = parseInt(row.付款方式流水号)
this.form2.第一次付款时间 = parseInt(row.第一次付款时间节点流水号)
this.form2.第二次付款时间 = parseInt(row.第二次付款时间节点流水号)
this.form2.第三次付款时间 = parseInt(row.第三次付款时间节点流水号)
this.form2.第四次付款时间 = parseInt(row.第四次付款时间节点流水号)
this.payMethodChange()
this.form2.离线合同备注 = row.离线合同备注
this.dialogVisible2 = true
},
submitEditOfflineContract() {
this.$refs['form2'].validate((valid) => {
if (valid) {
this.disable2 ? this.form2.第二次付款时间 = 0 : this.form2.第二次付款时间
this.disable3 ? this.form2.第三次付款时间 = 0 : this.form2.第三次付款时间
this.disable4 ? this.form2.第四次付款时间 = 0 : this.form2.第四次付款时间
const numGroup1 = [] // 空数组,放现有的离线合同号
const numGroup2 = [] // 空数组,放现有的离线合同流水号
searchOfflineContract2().then(response => { // 先查询判断是否存在
@@ -775,7 +673,7 @@ export default {
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1 && numGroup1.indexOf(this.form2.离线合同编号) !== numGroup2.indexOf(parseInt(this.form2.离线合同流水号))) {
this.$message.error('该离线合同编号已存在')
} else {
editOfflineContract(this.form2.离线合同流水号, this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.运费, this.form2.付款方式, this.form2.第一次付款时间, this.form2.第二次付款时间, this.form2.第三次付款时间, this.form2.第四次付款时间).then(response => {
editOfflineContract(this.form2.离线合同流水号, this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.离线合同备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改离线合同成功')
this.searchTable2()
@@ -812,36 +710,6 @@ export default {
})
})
},
submitAddOfflineContract() { // 新建离线合同
this.$refs['form2'].validate((valid) => {
if (valid) {
this.disable2 ? this.form2.第二次付款时间 = 0 : this.form2.第二次付款时间
this.disable3 ? this.form2.第三次付款时间 = 0 : this.form2.第三次付款时间
this.disable4 ? this.form2.第四次付款时间 = 0 : this.form2.第四次付款时间
const numGroup1 = [] // 空数组,放现有的询价单号
searchOfflineContract2().then(response => { // 先查询判断是否存在
for (let i = 0; i < response.data.length; i++) {
numGroup1.push(response.data[i].离线合同编号)
}
}).then(() => {
if (numGroup1.indexOf(this.form2.离线合同编号) !== -1) {
this.$message.error('该离线合同编号已存在')
} else {
addOfflineContract(this.form2.离线合同编号, this.form2.离线合同名称, this.form2.供应商流水号, this.id, this.form2.规定到货时间, this.form2.运费, this.form2.付款方式, this.form2.第一次付款时间, this.form2.第二次付款时间, this.form2.第三次付款时间, this.form2.第四次付款时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新建离线合同成功')
this.searchTable2()
this.dialogVisible2 = false
} else { this.$message.error('新建离线合同失败') }
})
}
})
} else {
console.log('error submit!!')
return false
}
})
},
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
@@ -896,17 +764,12 @@ export default {
},
searchTable3(row) { // 查询离线合同明细
this.stipulateArrivalTime = row.规定到货时间.split(' ')[0]
this.payMethodName = row.付款方式内容
this.offlineContractNum = row.离线合同流水号
this.离线合同状态 = row.离线合同状态
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
this.textArea = row.合同文本
if (parseInt(row.离线合同状态) !== 1) { // 是否未编辑模式
this.disable = true
} else {
this.disable = false
}
Number(row.离线合同状态) !== 1 ? this.disable = true : this.disable = false // 是否为编辑模式
},
getSummaries(param) { // 合计
const { columns, data } = param
@@ -934,14 +797,22 @@ export default {
return sums
},
addMateriel() { // 将物料选入离线合同
addMateriel(this.offlineContractNum, this.materielGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('选入成功')
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('选入失败') }
})
if (!this.offlineContractNum) {
this.$message.warning('请选择离线合同')
} else if (Number(this.离线合同状态) !== 1) {
this.$message.warning('请选择可编辑的离线合同')
} else if (this.materielGroup.length === 0) {
this.$message.warning('请勾选物料')
} else {
addMateriel(this.offlineContractNum, this.materielGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('选入成功')
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
})
} else { this.$message.error('选入失败') }
})
}
},
deleteMateriel(row) { // 移除物料
this.$confirm('确定移除该物料?', '提示', {
@@ -980,12 +851,13 @@ export default {
this.numGroup.push(this.tableData3[i].数量)
this.priceGroup.push(this.tableData3[i].单价)
}
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.textArea, this.partGroup, this.numGroup, this.priceGroup).then(response => {
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('离线合同生成成功')
this.searchTable2()
searchMateriel(this.offlineContractNum).then(response => {
this.tableData3 = response.data
this.disable = true // 是否为编辑模式
})
} else { this.$message.error('离线合同生成失败') }
})
@@ -995,49 +867,6 @@ export default {
message: '已取消操作'
})
})
},
searchDemo(row = this.paramRow) {
for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.payMethodValue) {
this.payMethodName = this.payMethod[i].label
}
}
this.paramRow = row
if (!this.disable) {
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
})
}
},
payMethodChange() { // 付款方式改变
for (let i = 0; i < this.payMethod.length; i++) {
if (this.payMethod[i].value === this.form2.付款方式) {
this.payMethodName = this.payMethod[i].label
}
}
const payTimeNum = this.payMethodName.split(':')
switch (payTimeNum.length) {
case 1:
this.disable2 = true
this.disable3 = true
this.disable4 = true
break
case 2:
this.disable2 = false
this.disable3 = true
this.disable4 = true
break
case 3:
this.disable2 = false
this.disable3 = false
this.disable4 = true
break
case 4:
this.disable2 = false
this.disable3 = false
this.disable4 = false
break
}
}
}
}

View File

@@ -35,45 +35,39 @@
{{ scope.row.请款时间 }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="100">
<el-table-column label="请款人" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额" align="center" min-width="100" prop="请款金额">
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="请款付款情况" align="center">
<el-table-column label="审核情况内容" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.审核情况内容 }}
</template>
</el-table-column>
<el-table-column label="未通过审核原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审核原因 }}
</template>
</el-table-column>
<el-table-column label="审批情况内容" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.审批情况内容 }}
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 }}
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</template>
</el-table-column>
<el-table-column label="付款情况" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.付款情况内容 }}
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
</template>
</el-table-column>
<el-table-column label="未付款原因" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 }}
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
</template>
</el-table-column>
</el-table-column>
@@ -93,9 +87,9 @@
</template>
</el-table-column>
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button :disabled="parseInt(scope.row.审情况流水号)===1" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
<el-button :disabled="Number(scope.row.审情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table>
@@ -233,6 +227,7 @@ export default {
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
fetchData() {

View File

@@ -25,19 +25,19 @@
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" min-width="100">
<el-table-column label="图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="100">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<el-table-column label="规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
@@ -50,9 +50,14 @@
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="小计(元)" align="center" min-width="100" prop="金额">
<el-table-column label="优惠后单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.金额 }}
{{ scope.row.优惠后单价 }}
</template>
</el-table-column>
<el-table-column label="优惠后小计(元)" align="center" min-width="100" prop="金额">
<template slot-scope="scope">
{{ scope.row.金额 = Number(scope.row.优惠后单价) * Number(scope.row.数量) }}
</template>
</el-table-column>
</el-table>

View File

@@ -1,5 +1,68 @@
<template>
<div class="app-container">
<el-card>
<span>时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:300px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="searchTable0()">查询</el-button>
</el-card>
<el-card>
<el-table :data="tableData0" size="mini" border style="max-height: 250px;" height="250px" highlight-current-row @row-click="searchContract">
<el-table-column label="计划状态" width="100" align="center">
<template slot-scope="scope">
<el-tag v-if="timeToStamp(scope.row.计划付款日期) <= getDate" type="danger" size="small">已拖期</el-tag>
<el-tag v-if="timeToStamp(scope.row.计划付款日期) > getDate" type="success" size="small">未拖期</el-tag>
</template>
</el-table-column>
<el-table-column label="计划付款日期" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.计划付款日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="计划付款金额" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.计划付款金额 }}
</template>
</el-table-column>
<el-table-column label="计划付款备注" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.计划付款备注 }}
</template>
</el-table-column>
<el-table-column label="采购合同编号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
@@ -85,7 +148,9 @@
</el-table-column>
<el-table-column label="审批情况" width="80" align="center">
<template slot-scope="scope">
{{ scope.row.审批情况内容 }}
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="110" align="center">
@@ -95,7 +160,9 @@
</el-table-column>
<el-table-column label="付款情况" width="80" align="center">
<template slot-scope="scope">
{{ scope.row.付款情况内容 }}
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
</template>
</el-table-column>
<el-table-column label="未付款原因" width="110" align="center">
@@ -124,12 +191,60 @@
</template>
<script>
import { initContract, searchTable1, searchCondition, requestFund, cancelRequestFund, searchContract } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
import { searchTable0, initContract, searchTable1, searchCondition, requestFund, cancelRequestFund, searchContract } from '@/api/PurchasingCenter/PurchaseContractRequestFund'
import { mapGetters } from 'vuex'
import { getNowTime, timeToStamp } from '@/utils/tool'
export default {
data() {
return {
getDate: null,
tableData0: [],
check: 0,
pickerOptions: {
shortcuts: [{
text: '未来一周',
onClick(picker) {
const end = new Date()
const start = new Date()
end.setTime(start.getTime() + 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
}
}, {
text: '未来一个月',
onClick(picker) {
const end = new Date()
const start = new Date()
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30)
picker.$emit('pick', [start, end])
}
}, {
text: '未来两个月',
onClick(picker) {
const end = new Date()
const start = new Date()
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 2)
picker.$emit('pick', [start, end])
}
}, {
text: '未来三个月',
onClick(picker) {
const end = new Date()
const start = new Date()
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 3)
picker.$emit('pick', [start, end])
}
}, {
text: '未来半年',
onClick(picker) {
const end = new Date()
const start = new Date()
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 6)
picker.$emit('pick', [start, end])
}
}]
},
dateRange: '',
tableData11: [],
total1: 0,
pageCurrent1: 1,
@@ -154,8 +269,18 @@ export default {
created() {
this.fetchData()
this.searchTable1()
this.searchTable0()
},
methods: {
timeToStamp(param) { // 转时间戳
return timeToStamp(param)
},
searchTable0() { // 查询付款计划
this.dateRange ? this.check = 1 : (this.check = 0, this.dateRange = '')
searchTable0(this.check, this.dateRange[0], this.dateRange[1]).then(response => {
this.tableData0 = response.data
})
},
fetchData() {
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
@@ -167,6 +292,7 @@ export default {
})
},
searchTable1() { // 查询
this.getDate = timeToStamp(getNowTime()) // 获取当前时间
this.tableData1 = []
this.returns = ''
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
@@ -245,11 +371,14 @@ export default {
</script>
<style scoped>
.el-tag{
margin: 0
}
.el-card{
margin-bottom: 15px;
}
.el-date-editor{
width:150px!important;
width:150px;
}
.el-select{
width:200px

View File

@@ -208,6 +208,7 @@ export default {
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
download() {

View File

@@ -1,25 +1,25 @@
<template>
<div class="app-container">
<el-card>
<span>项目名称:</span>
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
<span>供应商名称:</span>
<el-select v-model="supplierNumValue" placeholder="供应商" size="small" filterable clearable @change="searchContract1">
<el-option
v-for="item in project"
v-for="item in supplierNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>采购合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<!--<span>采购合同号:</span>-->
<!--<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>-->
<!--<el-option-->
<!--v-for="item in contractNums"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value">-->
<!--<div style="float: left">{{ item.label }}</div>-->
<!--<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>-->
<!--</el-option>-->
<!--</el-select>-->
<el-button
type="success"
size="small"
@@ -27,6 +27,7 @@
style="margin-left: 10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-button
:disabled="office"
type="primary"
size="small"
icon="el-icon-circle-plus-outline"
@@ -35,28 +36,43 @@
</el-card>
<el-card>
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 400px" height="400px" stripe border @row-click="searchPic">
<el-table-column align="center" label="采购合同编号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="采购合同名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table v-loading="" :data="tableData1" show-summary size="mini" style="max-height: 400px" height="400px" stripe border highlight-current-row @row-click="searchPic">
<el-table-column align="center" label="供应商" min-width="150px">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" min-width="100px">
<el-table-column align="center" label="关联合同" min-width="80px">
<template slot-scope="scope">
{{ scope.row.项目名称 ? scope.row.项目名称 : '—' }}
<el-popover placement="right" width="400" trigger="click">
<el-table :data="tableData01" stripe size="mini" show-summary>
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="100" align="center" label="合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="合同名称">
<template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
</template>
</el-table-column>
<el-table-column prop="合同总额" min-width="80" align="center" label="合同总额">
<template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.合同总额 = scope.row.采购合同总额 : scope.row.合同总额 = scope.row.离线合同总额 }}
</template>
</el-table-column>
</el-table>
<el-button slot="reference" plain type="success" size="mini" icon="el-icon-search" @click="invoiceDetail(scope.row)"/>
</el-popover>
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" min-width="100px">
<el-table-column align="center" label="备注" min-width="150px">
<template slot-scope="scope">
{{ scope.row.备注 ? scope.row.备注 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额" min-width="100px" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
@@ -82,19 +98,36 @@
{{ scope.row.接收人 ? scope.row.接收人 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="接收时间" min-width="80px">
<el-table-column align="center" label="接收时间" min-width="135px">
<template slot-scope="scope">
{{ scope.row.接收时间 ? scope.row.接收时间 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 ? scope.row.发票号 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" min-width="120px">
<template slot-scope="scope">
{{ scope.row.开户行 ? scope.row.开户行 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200px">
<template slot-scope="scope">
<el-button
:disabled="!office"
type="primary"
size="mini"
icon="el-icon-edit"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
:disabled="office||!!scope.row.接收人"
type="danger"
size="mini"
icon="el-icon-delete"
@@ -113,38 +146,25 @@
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<el-table v-loading="" :data="tableData2" size="mini" stripe border>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" min-width="120px">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 ? scope.row.开票时间 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="合同总额" min-width="100px">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
</el-table>
<img :src="scanSrc" alt="发票扫描件" width="100%">
</el-card>
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="460px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="90px">
<el-row>
<el-form-item label="合同编号" prop="contractNumValue">
<el-select v-model="form1.contractNumValue" placeholder="合同编号" size="small" filterable clearable>
<el-form-item label="供应商" prop="supplierNumValue">
<el-select v-model="form1.supplierNumValue" placeholder="供应商" size="small" filterable @change="searchContract2">
<el-option
v-for="item in contractNum"
v-for="item in supplierNum"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="合同编号" prop="contractNumValue">
<el-select v-model="form1.contractNumValue" multiple placeholder="合同编号" size="small" filterable clearable>
<el-option
v-for="item in contractNums"
:key="item.value"
:label="item.label"
:value="item.value">
@@ -152,6 +172,16 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<el-tooltip :content="offline" placement="top">
<el-switch
v-model="offline"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="非离线"
inactive-value="离线"
style="margin: 10px"
@change="offlineChange2"/>
</el-tooltip>
</el-form-item>
<el-form-item label="开票金额" prop="money">
<el-input v-model="form1.money" size="small" placeholder="开票金额"/>
@@ -165,6 +195,9 @@
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
</el-form-item>
<el-form-item label="发票扫描件">
<el-upload
id="invoiceScan"
@@ -174,7 +207,7 @@
:before-upload="beforeUpload"
:on-exceed="warningExceed"
:limit="limit"
:action="upload+'?contractNumValue='+form1.contractNumValue+'&money='+form1.money+'&sendPersonValue='+form1.sendPersonValue"
:action="upload+'?contractNumValue='+form1.contractNumValue+'&money='+form1.money+'&sendPersonValue='+form1.sendPersonValue+'&remark='+form1.remark+'&supplierNumValue='+form1.supplierNumValue+'&offline='+offline"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
@@ -183,49 +216,145 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
<el-button v-show="title1==='增加'" size="small" type="primary" @click="submitAdd('form1')">确定</el-button>
<el-button v-show="title1==='编辑'" size="small" type="primary" @click="submitEdit('form1')">确定</el-button>
<el-button size="small" type="primary" @click="submitAdd('form1')">确定</el-button>
</div>
</el-dialog>
<el-dialog :title="title1" :visible.sync="dialogVisible2" center style="min-height: 300px" width="1200px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="80px">
<el-row>
<el-col :span="6">
<el-form-item label="供应商">
<el-input v-model="form1.supplierName" size="small" disabled placeholder="供应商"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="开票金额">
<el-input v-model="form1.money" size="small" disabled placeholder="开票金额"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="传送人">
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled>
<el-option
v-for="item in sender"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="接收人">
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" disabled>
<el-option
v-for="item in sender"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="备注">
<el-input v-model="form1.remark" size="small" disabled placeholder="备注"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="发票号" prop="invoiceNum">
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="开户行" prop="bank">
<el-input v-model="form1.bank" size="small" placeholder="开户行"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="开票时间" prop="invoiceTime">
<el-date-picker
v-model="form1.invoiceTime"
size="small"
type="date"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="开票时间"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="扫描件">
<img :src="scanSrc" alt="发票扫描件" width="1000px">
</el-form-item>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
<el-button size="small" type="primary" @click="submitEdit('form1')">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchInvoice, editInvoice, deleteInvoice, initSender, initProject, initContract } from '@/api/PurchasingCenter/PurchaseInvoiceDelivery'
import { searchInvoice, editInvoice, deleteInvoice, initSender, initSupplier, searchContract, searchOffline, invoiceDetail } from '@/api/PurchasingCenter/PurchaseInvoiceDelivery'
import { mapGetters } from 'vuex'
import { upload } from '@/utils/request'
import { uploadInvoiceScan } from '@/utils/request'
import request from '@/utils/request'
export default {
name: '', // 采购发票交接
data() {
return {
offline: '非离线',
check1: 0,
office: false,
scanSrc: '',
upload: `http://localhost:8411/submit/uploadInvoiceScan.ashx`,
upload: uploadInvoiceScan,
limit: 1,
sender: [],
contractNumValue: '',
contractNum: [],
projectValue: '',
project: [],
contractNums: [], // options
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
tableData1: [],
tableData2: [],
tableData01: [],
dialogVisible1: false,
dialogVisible2: false, // 办公室
title1: '',
supplierNumValue: '',
supplierNum: [],
form1: {
contractNumValue: '',
supplierNumValue: '',
supplierName: '',
invoiceDeliveryNum: '',
contractNumValue: [], // 多选select值
money: '',
sendPersonValue: ''
sendPersonValue: '',
receivePersonValue: '',
invoiceNum: '',
bank: '',
invoiceTime: '',
remark: ''
},
rules1: {
contractNumValue: [
{ required: true, message: '请选择合同号' }
supplierNumValue: [
{ required: true, message: '请选择供应商' }
],
money: [
{ required: true, message: '请填写金额' }
],
invoiceNum: [
{ required: true, message: '请填写发票号' }
],
bank: [
{ required: true, message: '请填写开户行' }
],
invoiceTime: [
{ required: true, message: '请填写开票时间' }
]
}
}
@@ -243,22 +372,38 @@ export default {
this.searchTable1()
},
methods: {
fetchData() { // 初始化数据
console.log(upload)
initContract().then(response => {
offlineChange2() { // 切换离线非离线(内)
if (this.offline === '离线') {
this.searchOffline2()
} else {
this.searchContract2()
}
},
invoiceDetail(row) {
invoiceDetail(row.发票交接流水号).then(response => {
this.tableData01 = response.data
})
},
searchOffline1() {}, // 根据供应商查离线合同(外)
searchOffline2() { // 根据供应商查离线合同(内)
this.form1.contractNumValue = []
this.contractNums = []
searchOffline(this.form1.supplierNumValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
this.contractNums.push({
label: response.data[i].离线合同编号,
name: response.data[i].离线合同名称,
value: response.data[i].离线合同流水号
})
}
})
initProject().then(response => {
},
fetchData() { // 初始化数据
initSupplier().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.project.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
this.supplierNum.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
@@ -271,10 +416,36 @@ export default {
}
})
},
// searchContract1() { // 根据供应商查合同(外)
// this.contractNumValue = ''
// this.contractNums = []
// searchContract(this.supplierNumValue).then(response => {
// for (let i = 0; i < response.data.length; i++) {
// this.contractNums.push({
// label: response.data[i].采购合同编号,
// name: response.data[i].采购合同名称,
// value: response.data[i].采购合同流水号
// })
// }
// })
// },
searchContract2() { // 根据供应商查合同(内)
this.form1.contractNumValue = []
this.contractNums = []
searchContract(this.form1.supplierNumValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNums.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
},
searchTable1() { // 查询表1
this.projectValue ? this.check1 = 1 : this.check1 = 0
this.supplierNumValue ? this.check1 = 1 : this.check1 = 0
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.projectValue, this.check2, this.contractNumValue).then(response => {
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.supplierNumValue, this.check2, this.contractNumValue).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
@@ -294,8 +465,10 @@ export default {
this.$refs['form1'].resetFields()
}
this.title1 = '增加'
this.contractNum = []
this.form1.projectValue = ''
this.form1.contractNumValue = ''
this.form1.supplierNumValue = ''
this.form1.contractNumValue = []
this.form1.money = ''
this.form1.sendPersonValue = Number(this.id)
this.form1.remark = ''
@@ -314,7 +487,7 @@ export default {
}
})
},
beforeUpload(file) {
beforeUpload(file) { // 上船前检测
const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4
if (!isJPG) {
@@ -330,6 +503,7 @@ export default {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
this.$refs.upload.clearFiles()
} else {
this.$message.error('增加失败')
}
@@ -339,35 +513,24 @@ export default {
this.$refs['form1'].resetFields()
}
this.title1 = '编辑'
this.dialogVisible1 = true
this.form1.contractNum = parseInt(row.采购合同流水号)
this.form1.invoiceNum = row.发票号
this.form1.invoiceNumValue = row.发票流水号
this.form1.invoiceTime = row.开票时间
this.dialogVisible2 = true
this.form1.invoiceDeliveryNum = row.发票交接流水号
this.form1.supplierName = row.供应商名称
this.form1.money = row.开票金额
this.form1.sendPersonValue = parseInt(row.传送人)
this.form1.receivePersonValue = parseInt(row.接收人)
this.form1.sendPersonValue = parseInt(row.传送人流水号)
this.form1.receivePersonValue = Number(this.id)
this.form1.invoiceNum = row.发票号
this.form1.bank = row.开户行
this.form1.invoiceTime = row.开票时间
this.form1.remark = row.备注
console.log(row.开票时间)
if (row.开票时间 === '1900/1/1') {
this.form1.invoiceTime = null
}
if (parseInt(row.传送人) === 0) {
this.form1.sendPersonValue = ''
}
if (parseInt(row.接收人) === 0) {
this.form1.receivePersonValue = ''
}
},
submitEdit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
editInvoice(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark).then(response => {
console.log(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark)
console.log(response.data)
editInvoice(this.form1.invoiceDeliveryNum, this.form1.invoiceNum, this.form1.bank, this.form1.invoiceTime, this.form1.receivePersonValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogVisible1 = false
this.dialogVisible2 = false
this.searchTable1()
} else { this.$message.error('编辑失败') }
})
@@ -378,14 +541,12 @@ export default {
})
},
handleDelete(row) {
console.log(row)
this.$confirm('确认删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInvoice(row.发票流水号).then(response => {
console.log(response.data)
deleteInvoice(row.发票交接流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.dialogVisible1 = false
@@ -409,7 +570,6 @@ export default {
}
})
this.scanSrc = 'http://localhost:8411/webpage/file/' + data[0].文件标识 + '.' + data[0].文件后缀
console.log(this.scanSrc)
}
}
}

View File

@@ -11,14 +11,8 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>分配情况:</span>
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
<el-option
v-for="item in allocateState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<el-button
type="success"
size="small"
@@ -90,6 +84,14 @@
stripe
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" label="采购情况" min-width="70px">
<template slot-scope="scope">
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
@@ -140,7 +142,12 @@
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="100px" prop="buyer">
<el-table-column align="center" label="生产分配时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.操作日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="buyer">
<template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template>
@@ -169,14 +176,8 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>分配情况:</span>
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
<el-option
v-for="item in allocateState"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<el-button
type="success"
size="small"
@@ -217,6 +218,14 @@
stripe
@selection-change="handleSelectionChange2">
<el-table-column :selectable="selectable" align="center" type="selection"/>
<el-table-column align="center" label="采购情况" min-width="70px">
<template slot-scope="scope">
<el-tag v-if="scope.row.人员编号===''" type="primary" size="small">未分配</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===1&&scope.row.人员编号!==''" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" min-width="150px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
@@ -262,7 +271,12 @@
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="100px" prop="buyer">
<el-table-column align="center" label="生产分配时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.操作日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column :filters="person" :filter-method="filterHandler" align="center" label="采购员" min-width="80px" prop="buyer">
<template slot-scope="scope">
{{ scope.row.姓名 ? scope.row.姓名 : '—' }}
</template>
@@ -300,8 +314,8 @@ export default {
projectValue: '',
project: [],
materialName: '',
allocateStateValue: 0,
allocateState: [
materialStatusValue: [0], // 物料状态
materialStatus: [
{
value: 0,
label: '全部'
@@ -312,9 +326,23 @@ export default {
},
{
value: 2,
label: '已分配'
label: '已分配',
children: [{
value: 3,
label: '未询价'
}, {
value: 4,
label: '已询价',
children: [{
value: 5,
label: '未采购'
}, {
value: 6,
label: '已采购'
}]
}]
}
],
], // 物料状态
personValue: '',
person: [],
check1: 0,
@@ -378,14 +406,15 @@ export default {
this.MaterialVarietyValue ? this.check2 = 1 : this.check2 = 0
this.projectValue ? this.check3 = 1 : this.check3 = 0
this.materialName ? this.check4 = 1 : this.check4 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, this.check4, this.materialName, this.allocateStateValue).then(response => {
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.MaterialCategoryValue, this.check2, this.MaterialVarietyValue, this.check3, this.projectValue, this.check4, this.materialName, this.materialStatusValue[this.materialStatusValue.length - 1]).then(response => {
this.tableData1 = response.data.rows
console.log(response.data.rows)
this.total1 = response.data.total
})
},
searchTable2() { // 查询基本件
this.projectValue ? this.check3 = 1 : this.check3 = 0
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, this.allocateStateValue).then(response => {
searchTable2(this.pageCurrent2, this.pageSize2, this.check3, this.projectValue, this.materialStatusValue[this.materialStatusValue.length - 1]).then(response => {
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
@@ -460,7 +489,6 @@ export default {
}
},
filterHandler(value, row) {
console.log(row, value)
return parseInt(row['人员编号']) === parseInt(value)
},
handleSizeChange1(val) {
@@ -532,6 +560,9 @@ export default {
</script>
<style scoped>
.el-tag{
margin: 0
}
.el-card{
margin-bottom: 15px;
}

View File

@@ -0,0 +1,292 @@
<template>
<div class="app-container">
<el-card>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<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-card>
<el-card>
<el-table
v-loading=""
id="expandTable"
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
border
style="width: 100%;max-height: 250px;"
height="250px"
size="mini"
@row-click="searchContract"
@expand-change="searchPlan">
<el-table-column type="expand">
<template slot-scope="props">
<el-table v-loading="" v-show="tableData01.length!==0" :data="tableData01" border size="mini">
<el-table-column label="序号" align="center" type="index"/>
<el-table-column label="计划付款日期" align="center">
<template slot-scope="scope">
{{ scope.row.计划付款日期.split(' ')[0] }}
</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">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column label="采购合同编号" align="center" min-width="100">
<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.采购合同名称 }}
</template>
</el-table-column>
<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" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" @click="handleSetPayPlan(scope.row)">新增</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<div style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
<el-dialog :visible.sync="dialogVisible1" 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="计划付款日期">
<el-date-picker v-model="form1.计划付款日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="计划付款金额" prop="计划付款金额">
<el-input v-model="form1.计划付款金额" placeholder="填写金额" size="small" clearable/>
</el-form-item>
<el-form-item label="计划付款备注">
<el-input v-model="form1.计划付款备注" placeholder="填写备注" size="small" clearable/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1=false">取消</el-button>
<el-button type="primary" size="small" @click="submitSetPayPlan">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { initContract, searchTable1, searchTable01, addTable01, deleteTable01, searchTable2 } from '@/api/PurchasingCenter/SetPayPlan'
import { mapGetters } from 'vuex'
export default {
name: '', // 采购预算查询
data() {
return {
expands: [],
contractNumValue: '',
contractNum: [],
supplierName: '',
tableData1: [],
pageCurrent1: 1,
pageSize1: 10,
total1: 0,
returns: '',
tableData01: [],
dialogVisible1: false,
form1: {
采购合同流水号: '',
计划付款日期: '',
计划付款金额: '',
计划付款备注: ''
},
rules1: {
计划付款日期: [{ required: true, message: '请选择计划付款日期' }],
计划付款金额: [{ required: true, message: '请输入计划付款金额' }]
}
}
},
computed: {
...mapGetters([
'sidebar',
'avatar',
'name',
'id' // 人员编号
])
},
created() {
this.fetchData()
this.searchTable1()
},
methods: {
getRowKeys(row) {
return row.采购合同流水号
},
fetchData() {
initContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.contractNum.push({
label: response.data[i].采购合同编号,
name: response.data[i].采购合同名称,
value: response.data[i].采购合同流水号
})
}
})
},
searchTable1() { // 查询合同
this.tableData1 = []
this.returns = ''
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
this.supplierName ? this.check2 = 1 : this.check2 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchPlan(row) {
this.form1.采购合同流水号 = row.采购合同流水号
searchTable01(row.采购合同流水号).then(response => {
this.tableData01 = response.data
this.expands.indexOf(row.采购合同流水号) === -1 ? this.expands.push(row.采购合同流水号) : this.expands = []
})
},
handleSetPayPlan(row) { // 设置付款计划
if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields()
}
searchTable01(row.采购合同流水号).then(response => {
this.tableData01 = response.data
}).then(() => {
this.expands.indexOf(row.采购合同流水号) === -1 ? this.expands.push(row.采购合同流水号) : true
})
this.form1.采购合同流水号 = row.采购合同流水号
this.form1.计划付款日期 = ''
this.form1.计划付款金额 = ''
this.form1.计划付款备注 = ''
this.dialogVisible1 = true
},
submitSetPayPlan() { // 提交设置
this.$refs['form1'].validate((valid) => {
if (valid) {
addTable01(this.form1.采购合同流水号, this.form1.计划付款日期, this.form1.计划付款金额, this.form1.计划付款备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('设置成功')
searchTable01(this.form1.采购合同流水号).then(response => {
this.tableData01 = response.data
this.expands.indexOf(this.form1.采购合同流水号) === -1 ? this.expands.push(this.form1.采购合同流水号) : true
})
this.dialogVisible1 = false
} else {
this.$message.error('设置失败')
}
})
}
})
},
handleDelete(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteTable01(row.付款计划流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
searchTable01(this.form1.采购合同流水号).then(response => {
this.tableData01 = response.data
this.expands.indexOf(this.form1.采购合同流水号) === -1 ? this.expands.push(this.form1.采购合同流水号) : true
})
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
searchContract(row) {
searchTable2(row.采购合同流水号).then(response => {
this.returns = response.data[0].合同内容
})
}
}
}
</script>
<style>
#expandTable .el-table__expanded-cell{
padding: 5px 50px;
}
</style>
<style scoped>
.el-card{
margin-bottom: 15px;
}
.el-select{
width:200px
}
.el-input{
width:200px
}
span{
margin: 10px 0 10px 10px;
}
.searchForm .el-form-item{
margin-bottom: 5px;
}
.el-tag{
margin: 0
}
</style>