采购、装配
This commit is contained in:
258
src/views/Assembly/AssemblyInformationInput/index.vue
Normal file
258
src/views/Assembly/AssemblyInformationInput/index.vue
Normal file
@@ -0,0 +1,258 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @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="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
: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="searchDetail()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" size="mini" style="width:60px" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工序名称" size="mini" style="width:200px" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺内容及装配具体要求" :rows="1" size="mini" type="textarea" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" size="mini" readonly align="center"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工时/时" align="center">
|
||||
<el-table-column label="工艺工时" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺工时" size="mini" readonly align="center"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际工时" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.实际工时" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成情况/装配工" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.装配员" size="mini" readonly align="center" @click.native="param=0;selectPerson(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验情况/检验员" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.检验员" size="mini" readonly align="center" @click.native="param=1;selectPerson(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="人员信息" center>
|
||||
<div style="height: 500px;">
|
||||
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px;width: 30%">
|
||||
<el-tree
|
||||
:data="data2"
|
||||
:props="defaultProps"
|
||||
node-key="id"
|
||||
style="width: 150px;float: left"
|
||||
height="400"
|
||||
accordion
|
||||
@node-click="handleNodeClick"/>
|
||||
</div>
|
||||
<el-table :data="List1" highlight-current-row height="400" style="width: 60%;float: left;margin-left: 30px" @row-click="handleCurrentChange2">
|
||||
<el-table-column label="考勤编号" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.考勤编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="姓名" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="性别" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.性别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作岗位" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.岗位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button style="margin-left: 120px;margin-top: 20px" @click="dialogFormVisible = false">取消</el-button>
|
||||
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchMachine, searchDetail, searchProcess, update, getTree, fn, getTable8 } from '@/api/Assembly/AssemblyInformationInput'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
floatNum: '',
|
||||
workingHours: '',
|
||||
Completion: '',
|
||||
Inspection: '',
|
||||
Remarks: '',
|
||||
name: '',
|
||||
staffNum: '',
|
||||
dialogFormVisible: false,
|
||||
data2: [],
|
||||
List1: [],
|
||||
loading: false,
|
||||
result: 0,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
},
|
||||
dataAll: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
getTree().then(response => { // 获取人员信息树
|
||||
const data = response.data
|
||||
this.data2 = fn(data, 0)
|
||||
})
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchMachine(this.projectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
selectPerson(row) { // 点击查询按钮
|
||||
this.floatNum = row.装配工序流水号
|
||||
this.workingHours = row.实际工时
|
||||
this.Completion = row.完成情况
|
||||
this.Inspection = row.检验情况
|
||||
this.Remarks = row.备注
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
handleCurrentChange2(row) { // 获取当前行人员信息
|
||||
this.staffNum = row.人员编号
|
||||
},
|
||||
getName() { // 提交人员
|
||||
if (this.param === 0) {
|
||||
update(this.floatNum, this.workingHours, this.staffNum, this.Inspection, this.Remarks).then(response => {
|
||||
this.searchDetail()
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
} else if (this.param === 1) {
|
||||
update(this.floatNum, this.workingHours, this.Completion, this.staffNum, this.Remarks).then(response => {
|
||||
this.searchDetail()
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
}
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
handleNodeClick(data) { // 树节点点击
|
||||
getTable8(data.id).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
console.log(row)
|
||||
update(row.装配工序流水号, row.实际工时, row.完成情况, row.检验情况, row.备注).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
219
src/views/Assembly/AssemblyPlan/index.vue
Normal file
219
src/views/Assembly/AssemblyPlan/index.vue
Normal file
@@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>计划完成日期:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="goDown()">下达</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
min-height="450px"
|
||||
height="450px"
|
||||
highlight-current-row
|
||||
border
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="35"/>
|
||||
<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.机床名称 }}
|
||||
</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>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
: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 { initProject, searchmachine, searchTable, goDown } from '@/api/Assembly/AssemblyPlan'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
ProjectSerialNumber: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
MachineSerialNumber: [],
|
||||
ProcessStartTime: '',
|
||||
ProcessEndTime: '',
|
||||
TimeToGo: '',
|
||||
startEndDate: '',
|
||||
time: '',
|
||||
time1: '',
|
||||
check: 0,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
tableData: [],
|
||||
loading: false,
|
||||
result: 0,
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
projectChange() {
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchmachine(this.projectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
console.log(this.startEndDate)
|
||||
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
||||
this.check2 = 0
|
||||
this.startEndDate = ''
|
||||
} else { this.check2 = 1 }
|
||||
this.projectValue ? this.check = 1 : this.check = 0
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.check2, this.startEndDate[0], this.startEndDate[1], this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.ProjectSerialNumber = []
|
||||
this.MachineSerialNumber = []
|
||||
this.ProcessStartTime = []
|
||||
this.ProcessEndTime = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.ProjectSerialNumber[i] = val[i].项目流水号
|
||||
this.MachineSerialNumber[i] = val[i].机床流水号
|
||||
}
|
||||
},
|
||||
getCurrentTime() {
|
||||
this.ProcessStartTime = this.getTime0(0)
|
||||
this.ProcessEndTime = this.getTime0(2)
|
||||
this.TimeToGo = this.getTime0(0)
|
||||
},
|
||||
getTime0(num) {
|
||||
var date0 = new Date()
|
||||
var date = new Date(date0.getTime() + num * 24 * 60 * 60 * 1000)
|
||||
var month = this.zeroFill(date.getMonth() + 1)
|
||||
var day = this.zeroFill(date.getDate())
|
||||
var hour = this.zeroFill(date.getHours())
|
||||
var minute = this.zeroFill(date.getMinutes())
|
||||
var second = this.zeroFill(date.getSeconds())
|
||||
return date.getFullYear() + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second
|
||||
},
|
||||
zeroFill(i) {
|
||||
if (i >= 0 && i <= 9) {
|
||||
return '0' + i
|
||||
} else {
|
||||
return i
|
||||
}
|
||||
},
|
||||
goDown() {
|
||||
this.getCurrentTime()
|
||||
if (this.ProjectSerialNumber.length !== 0) {
|
||||
this.result = 0
|
||||
for (let i = 0; i < this.ProjectSerialNumber.length; i++) {
|
||||
goDown(this.ProjectSerialNumber[i], this.MachineSerialNumber[i], this.ProcessStartTime, this.ProcessEndTime, this.TimeToGo).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.ProjectSerialNumber.length) {
|
||||
this.$message.success('下达成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('下达失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('至少选择一条')
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
257
src/views/Assembly/AssemblyProcessAssignment/index.vue
Normal file
257
src/views/Assembly/AssemblyProcessAssignment/index.vue
Normal file
@@ -0,0 +1,257 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @change="projectChange">
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
: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="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="Preservation()">保存</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
min-height="500px"
|
||||
height="500px"
|
||||
border
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
align="center"
|
||||
width="35"/>
|
||||
<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.工艺开始时间 }}
|
||||
</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">
|
||||
<el-input v-model="tableData[scope.$index].工艺员" size="mini" style="width:150px" placeholder="工艺员" @click.native="selectPerson(scope.$index)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="下达时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.下发时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="工艺定额人员选择" center>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
style="width: 100%;max-height: 200px"
|
||||
border
|
||||
size="mini"
|
||||
height="200px"
|
||||
highlight-current-row
|
||||
@row-click="confirmPerson">
|
||||
<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.性别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工作岗位">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.岗位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogFormVisible=false">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchmachine, initPerson, searchTable, Preservation } from '@/api/Assembly/AssemblyProcessAssignment'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
tableData: [],
|
||||
tableData2: [],
|
||||
ProcessSerialNumber: [],
|
||||
PersonnelNumber: [],
|
||||
index: '',
|
||||
check: 0,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
result: 0,
|
||||
loading: false,
|
||||
dialogFormVisible: false,
|
||||
multipleSelection: [],
|
||||
pageSize: 1,
|
||||
pageCurrent: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.initPerson()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
initPerson() { // 初始化工艺员
|
||||
initPerson().then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
projectChange() {
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
if (this.projectValue !== '') {
|
||||
this.check2 = 1
|
||||
searchmachine(this.projectValue, this.check2).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.check2 = 0
|
||||
}
|
||||
},
|
||||
selectPerson(index) { // 点击查询按钮
|
||||
this.index = index
|
||||
this.dialogFormVisible = true
|
||||
console.log(this.index)
|
||||
},
|
||||
confirmPerson(row) { // 选择一行
|
||||
this.tableData[this.index].工艺员 = row.姓名
|
||||
this.tableData[this.index].人员编号 = row.人员编号
|
||||
console.log(this.tableData)
|
||||
},
|
||||
searchTable() {
|
||||
this.tableData = []
|
||||
this.loading = true
|
||||
this.projectValue ? this.check = 1 : this.check = 0
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData.push({
|
||||
工艺计划流水号: response.data.rows[i].工艺计划流水号,
|
||||
机床流水号: response.data.rows[i].机床流水号,
|
||||
机床名称: response.data.rows[i].机床名称,
|
||||
机床图号: response.data.rows[i].机床图号,
|
||||
工艺开始时间: response.data.rows[i].工艺开始时间,
|
||||
工艺结束时间: response.data.rows[i].工艺结束时间,
|
||||
工艺员: '',
|
||||
人员编号: '',
|
||||
下发时间: response.data.rows[i].下发时间
|
||||
})
|
||||
}
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
console.log(this.multipleSelection)
|
||||
// this.ProcessSerialNumber = []
|
||||
// this.PersonnelNumber = []
|
||||
// for (let i = 0; i < val.length; i++) {
|
||||
// this.ProcessSerialNumber[i] = val[i].工艺计划流水号
|
||||
// this.PersonnelNumber[i] = val[i].人员编号
|
||||
// }
|
||||
},
|
||||
Preservation() {
|
||||
if (this.multipleSelection.length !== 0) {
|
||||
this.result = 0
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
console.log(this.multipleSelection[i].人员编号)
|
||||
if (this.multipleSelection[i].人员编号 === '') {
|
||||
this.$message.error('请选择工艺员')
|
||||
} else {
|
||||
Preservation(this.multipleSelection[i].工艺计划流水号, this.multipleSelection[i].人员编号).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
this.$message.success('分配成功')
|
||||
this.searchTable()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('至少选择一条')
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
834
src/views/Assembly/AssemblyProcessPlanning/index.vue
Normal file
834
src/views/Assembly/AssemblyProcessPlanning/index.vue
Normal file
@@ -0,0 +1,834 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="Organization()">
|
||||
<el-radio :label="0">未编制</el-radio>
|
||||
<el-radio :label="1">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span>工艺员:</span>
|
||||
<el-select v-model="CraftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="clearDetail();searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Craftmen"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small" @change="searchGroup()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchDetail">查询</el-button>
|
||||
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">装配工艺调整</el-button>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<el-row>
|
||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" style="margin-left: 20px" @click="DYbtn">典艺</el-button>
|
||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="WYbtn">完艺</el-button>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="handleAdd">增加</el-button>
|
||||
<el-button :disabled="disabled" type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
|
||||
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="装配任务"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.装配任务 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row, 'form2')">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteGroup(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" :disabled="disabled" size="mini" style="width:60px" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工序名称"
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
style="width:200px"
|
||||
@dblclick.native="tableSearch(scope.row)"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.工艺内容及装配具体要求"
|
||||
:rows="1"
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="textarea"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" :disabled="disabled" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-arrow-up"
|
||||
type="primary"
|
||||
@click="upOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-arrow-down"
|
||||
type="primary"
|
||||
@click="downOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
type="primary"
|
||||
@click="insertOne(scope.row)"/>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
@click="deleteOne(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="工序名称、工序要求选择" center width="400px">
|
||||
<el-form ref="form2" :model="form2" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="工序名称分类">
|
||||
<el-select v-model="processNameClassValue" placeholder="分类" size="small" @change="cChange()">
|
||||
<el-option
|
||||
v-for="item in processNameClass"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序名称">
|
||||
<el-select v-model="processNameValue" placeholder="名称" size="small" @change="nChange()">
|
||||
<el-option
|
||||
v-for="item in processName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="工序要求">
|
||||
<el-input v-model="processRequestValue" placeholder="要求" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button size="mini" type="primary" @click="confirmSelect()">确定选择</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible4" center width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="序号" prop="序号">
|
||||
<el-input v-model="form2.序号" placeholder="序号" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组件" prop="组件">
|
||||
<el-select v-model="form2.组件" multiple placeholder="组件" size="small">
|
||||
<el-option
|
||||
v-for="item in GroupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="装配任务" prop="装配任务">
|
||||
<el-input v-model="form2.装配任务" placeholder="装配任务" type="textarea" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible4=false">取消</el-button>
|
||||
<el-button v-show="title==='增加组件工艺'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑组件工艺'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible5" title="典型工艺选择" center width="800px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<el-form-item label="典型工艺机床分类">
|
||||
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
|
||||
<el-option
|
||||
v-for="item in machineType"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机床编号">
|
||||
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px">
|
||||
<el-option
|
||||
v-for="item in machineNumber2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="searchCompleted()">查询</el-button>
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺内容及装配具体要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.质检 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="已完工艺选择" center width="800px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工艺员">
|
||||
<el-input v-model="CraftmanValue" size="small" readonly style="width: 150px;" @focus="dialogFormVisible3=true"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="机床编号">
|
||||
<el-select v-model="machineNumberValue1" placeholder="机床编号" size="small" style="width:150px">
|
||||
<el-option
|
||||
v-for="item in machineNumber1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-button size="small" type="success" icon="el-icon-search" @click="searchCompleted()">查询</el-button>
|
||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-for="(item, index) in dataAll1" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工序名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺内容及装配具体要求 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.质检 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogFormVisible3"
|
||||
title="工艺定额人员"
|
||||
center
|
||||
style="min-height: 300px">
|
||||
<el-table
|
||||
:data="tableData3"
|
||||
size="mini"
|
||||
style="width: 97%;max-height: 300px"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectPerson">
|
||||
<el-table-column align="center" label="考勤编号" width="150">
|
||||
<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="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.性别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="工作岗位" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.岗位名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="tijiao()">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initCraftmen, searchMachine, searchGroup, submitAdd, submitEdit, searchDetail, searchProcess, insertOne, update, upOne, downOne, deleteOne,
|
||||
deleteGroup, saveApprove, returnEdit, procedureCopy1, processCopy1, initprocessNameClass, initProcessName, update1, initmachineType, SearchMachine } from '@/api/Assembly/AssemblyProcessPlanning'
|
||||
import '@/icon/iconfont.css'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
radio: 0,
|
||||
checked: false,
|
||||
disabled: false,
|
||||
CraftmenValue: '',
|
||||
Craftmen: [],
|
||||
CraftmanValue: '',
|
||||
perNum: '',
|
||||
Name: '',
|
||||
Number: '',
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
machineNumberValue1: '',
|
||||
machineNumber1: [],
|
||||
machineNumberValue2: '',
|
||||
machineNumber2: [],
|
||||
machineTypeValue: '',
|
||||
machineType: [],
|
||||
AssemblyTask: '',
|
||||
Group: '',
|
||||
GroupNumberValue: [],
|
||||
GroupNumber: [],
|
||||
GroupNum: '',
|
||||
GroupProcessNumber: '',
|
||||
SerialNumber: '',
|
||||
SerialNumberGroup: [],
|
||||
isShow2: false,
|
||||
processNameClassValue: '',
|
||||
processNameClass: [],
|
||||
processNameValue: '',
|
||||
Process: '',
|
||||
processName: [],
|
||||
Procedure: '',
|
||||
ProcedureNameGroup: [],
|
||||
processRequestValue: '',
|
||||
ProcessContentGroup: [],
|
||||
QualityTesting: [],
|
||||
ProcessSequence: [],
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
loading: false,
|
||||
form1: {},
|
||||
form2: {
|
||||
序号: '',
|
||||
组件: [],
|
||||
装配任务: ''
|
||||
},
|
||||
rules: {
|
||||
序号: [{ required: true, message: '请输入序号', trigger: 'blur' }],
|
||||
组件: [{ required: true, message: '请选择组件', trigger: 'change' }],
|
||||
装配任务: [{ required: true, message: '请输入装配任务', trigger: 'blur' }]
|
||||
},
|
||||
num1: '',
|
||||
result: 0,
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible5: false,
|
||||
dataAll: [],
|
||||
dataAll1: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initCraftmen().then(response => { // 初始化工艺员
|
||||
this.tableData3 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Craftmen.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
initprocessNameClass().then(response => { // 初始化工序分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processNameClass.push({
|
||||
label: response.data[i].工序分类名称,
|
||||
value: response.data[i].工序分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initmachineType().then(response => { // 初始化机床分类
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineType.push({
|
||||
label: response.data[i].机床分类名称,
|
||||
value: response.data[i].机床分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
clearDetail() {
|
||||
this.checked = false
|
||||
this.machineNumberValue = ''
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumber = []
|
||||
searchMachine(this.CraftmenValue, this.radio).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchGroup() {
|
||||
this.GroupNumber = []
|
||||
this.GroupNumberValue = []
|
||||
searchGroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.GroupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
Organization() {
|
||||
this.CraftmenValue = ''
|
||||
this.checked = false
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
if (this.radio === 0) {
|
||||
this.dataAll = []
|
||||
this.isShow2 = false
|
||||
this.disabled = false
|
||||
} else if (this.radio === 1) {
|
||||
this.dataAll = []
|
||||
this.isShow2 = true
|
||||
this.disabled = true
|
||||
}
|
||||
},
|
||||
returnEdit() {
|
||||
returnEdit(this.machineNumberValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('调整成功')
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('调整失败') }
|
||||
})
|
||||
},
|
||||
DYbtn() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
this.dialogFormVisible5 = true
|
||||
this.dataAll1 = []
|
||||
this.machineTypeValue = ''
|
||||
this.machineNumber2 = []
|
||||
this.machineNumberValue1 = ''
|
||||
} else {
|
||||
this.$message.warning('请先选择机床')
|
||||
}
|
||||
},
|
||||
SearchMachine() {
|
||||
this.machineNumberValue1 = ''
|
||||
this.machineNumber2 = []
|
||||
SearchMachine(this.machineTypeValue).then(response => { // 典型机床查询
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber2.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
WYbtn() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
this.dialogFormVisible1 = true
|
||||
this.dataAll1 = []
|
||||
this.machineNumber1 = []
|
||||
this.machineNumberValue1 = ''
|
||||
this.CraftmanValue = ''
|
||||
} else {
|
||||
this.$message.warning('请先选择机床')
|
||||
}
|
||||
},
|
||||
selectPerson(row) { // 选择工艺员
|
||||
this.Name = row.姓名
|
||||
this.Number = row.人员编号
|
||||
},
|
||||
tijiao() {
|
||||
this.dialogFormVisible3 = false
|
||||
this.CraftmanValue = this.Name
|
||||
this.perNum = this.Number
|
||||
this.machineNumber = []
|
||||
searchMachine(this.perNum, 1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber1.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchCompleted() { // 主表查询
|
||||
this.dataAll1 = []
|
||||
if (this.machineNumberValue1 !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue1)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll1.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
async processCopy1() {
|
||||
this.result = 0
|
||||
for (let i = 0; i < this.dataAll1.length; i++) {
|
||||
processCopy1(this.machineNumberValue, this.dataAll1[i].table1[0].序号, this.dataAll1[i].table1[0].组号, this.dataAll1[i].table1[0].装配任务).then(response => {
|
||||
this.GroupNum = parseInt(response.data.output[0].组件工艺流水号)
|
||||
if (response.data.result[0].result === '1') {
|
||||
for (let j = 0; j < this.dataAll1[i].table2.length; j++) {
|
||||
procedureCopy1(this.GroupNum, this.dataAll1[i].table2[j].序号, this.dataAll1[i].table2[j].工序名称, this.dataAll1[i].table2[j].工艺内容及装配具体要求, this.dataAll1[i].table2[j].质检, this.dataAll1[i].table2[j].工序顺序).then(response => {
|
||||
})
|
||||
}
|
||||
}
|
||||
this.result += parseInt(response.data.result[0].result)
|
||||
if (this.result === this.dataAll1.length) {
|
||||
this.$message.success('拷贝成功')
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible5 = false
|
||||
this.searchDetail()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
// this.title = '增加组件工艺'
|
||||
this.addForm('form2', [this.dialogFormVisible4 = true, this.title = '增加组件工艺', this.Group = ''])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
handleEdit(row, formName) {
|
||||
console.log(this.$refs[formName])
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
// this.editForm(row, 'form2', [this.title = '编辑组件工艺', this.GroupProcessNumber = row.组件工艺流水号, this.dialogFormVisible4 = true, this.Group = '', this.form2.组件 = []])
|
||||
this.title = '编辑组件工艺'
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.序号 = row.序号
|
||||
this.form2.装配任务 = row.装配任务
|
||||
this.Group = ''
|
||||
this.form2.组件 = []
|
||||
this.GroupProcessNumber = row.组件工艺流水号
|
||||
},
|
||||
submitAdd() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.addTable(submitAdd, [this.machineNumberValue, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.dialogFormVisible4 = false; this.searchDetail() })
|
||||
},
|
||||
submitEdit() {
|
||||
for (var i = 0; i < this.form2.组件.length; i++) {
|
||||
this.Group += this.form2.组件[i] + '组 '
|
||||
}
|
||||
this.editTable(submitEdit, [this.GroupProcessNumber, this.form2.序号, this.Group, this.form2.装配任务], 'form2', function() { this.searchDetail(); this.dialogFormVisible4 = false })
|
||||
},
|
||||
deleteGroup(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteGroup(row.组件工艺流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
insertOne(row) {
|
||||
insertOne(row.组件工艺流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
update(row) {
|
||||
update(row.装配工序流水号, row.序号, row.工序名称, row.工艺内容及装配具体要求, row.质检).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
deleteTable() {
|
||||
this.$confirm('此操作将永久删除该工艺, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.result = 0
|
||||
for (var i = 0; i < this.dataAll.length; i++) {
|
||||
deleteGroup(this.dataAll[i].table1[0].组件工艺流水号).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.dataAll.length) {
|
||||
this.$message.success('删除成功')
|
||||
this.searchDetail()
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
saveApprove() {
|
||||
if (this.checked === true) {
|
||||
saveApprove(this.machineNumberValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
upOne(row) {
|
||||
upOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
downOne(row) {
|
||||
downOne(row.装配工序流水号, row.组件工艺流水号, row.工序顺序).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
deleteOne(row) {
|
||||
deleteOne(row.装配工序流水号).then(response => {})
|
||||
this.searchDetail()
|
||||
},
|
||||
cChange() {
|
||||
this.processName = []
|
||||
this.processNameValue = ''
|
||||
this.Process = ''
|
||||
this.processRequestValue = ''
|
||||
initProcessName(this.processNameClassValue).then(response => { // 初始化工序分类
|
||||
this.tableData = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processName.push({
|
||||
label: response.data[i].工序名称,
|
||||
value: response.data[i].工序名称流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
nChange() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.processNameValue === this.tableData[i].工序名称流水号) {
|
||||
this.Process = this.tableData[i].工序名称
|
||||
this.processRequestValue = this.tableData[i].工艺内容及装配具体要求
|
||||
}
|
||||
}
|
||||
},
|
||||
tableSearch(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.processNameClassValue = ''
|
||||
this.processNameValue = ''
|
||||
this.processRequestValue = ''
|
||||
this.Procedure = row.装配工序流水号
|
||||
this.number = row.序号
|
||||
},
|
||||
confirmSelect() {
|
||||
console.log(this.Procedure, this.number, this.Process, this.processRequestValue)
|
||||
update1(this.Procedure, this.number, this.Process, this.processRequestValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$message.success('选择成功')
|
||||
this.searchDetail()
|
||||
} else {
|
||||
this.$message.success('选择失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
213
src/views/Assembly/AssemblyQuotaSetting/index.vue
Normal file
213
src/views/Assembly/AssemblyQuotaSetting/index.vue
Normal file
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-radio-group
|
||||
v-model="radio"
|
||||
size="small"
|
||||
style="margin: 10px;"
|
||||
@change="Organization()">
|
||||
<el-radio :label="0">未编制</el-radio>
|
||||
<el-radio :label="1">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span>定额员:</span>
|
||||
<el-select v-model="CraftmenValue" placeholder="定额员" size="small" style="width:100px" @change="searchMachine()">
|
||||
<el-option
|
||||
v-for="item in Craftmen"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select v-model="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin-left: 10px;" size="small" @click="searchDetail">查询</el-button>
|
||||
<el-button v-show="isShow1" type="primary" size="small" icon="el-icon-cjn-09" @click="saveApprove">保存</el-button>
|
||||
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">装配定额调整</el-button>
|
||||
</el-card>
|
||||
<el-card style="background-color: #DCDCDC">
|
||||
<div v-for="(item, index) in dataAll" :key="index" style="margin-bottom: 30px">
|
||||
<el-table
|
||||
:data="item.table1"
|
||||
border
|
||||
style="width: 100%;margin-top: 15px">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="80"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.序号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="组号"
|
||||
width="240"
|
||||
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>
|
||||
<el-table :data="item.table2" size="mini" border style="width: 100%">
|
||||
<el-table-column label="序号" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.序号" size="mini" style="width:60px" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" width="230" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工序名称" size="mini" style="width:200px" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺内容及装配具体要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺内容及装配具体要求" :rows="1" size="mini" type="textarea" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.质检" size="mini" readonly align="center"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺工时" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺工时" :disabled="disabled" size="mini" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initCraftmen, searchMachine, searchDetail, searchProcess, update, saveApprove, returnEdit } from '@/api/Assembly/AssemblyQuotaSetting'
|
||||
import '@/icon/iconfont.css'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: 0,
|
||||
checked: false,
|
||||
disabled: false,
|
||||
CraftmenValue: '',
|
||||
Craftmen: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
isShow1: true,
|
||||
isShow2: false,
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
loading: false,
|
||||
result: 0,
|
||||
dataAll: []
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initCraftmen().then(response => { // 初始化工艺员
|
||||
this.tableData3 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Craftmen.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchMachine(this.radio).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
async searchDetail() { // 主表查询
|
||||
this.dataAll = []
|
||||
if (this.machineNumberValue !== '') {
|
||||
const response = await searchDetail(this.machineNumberValue)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: [data[i]],
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.warning('请先选择机床编号')
|
||||
}
|
||||
},
|
||||
Organization() {
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
if (this.radio === 0) {
|
||||
this.dataAll = []
|
||||
this.isShow1 = true
|
||||
this.isShow2 = false
|
||||
this.disabled = false
|
||||
} else if (this.radio === 1) {
|
||||
this.dataAll = []
|
||||
this.isShow1 = false
|
||||
this.isShow2 = true
|
||||
this.disabled = true
|
||||
}
|
||||
},
|
||||
returnEdit() {
|
||||
returnEdit(this.machineNumberValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('调整成功')
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('调整失败') }
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
update(row.装配工序流水号, row.工艺工时).then(response => {
|
||||
console.log(response.data, '工艺要求修改成功', 505)
|
||||
})
|
||||
},
|
||||
saveApprove() {
|
||||
saveApprove(this.machineNumberValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.CraftmenValue = ''
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
this.dataAll = []
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
381
src/views/Assembly/InstallationAndMonitoring/index.vue
Normal file
381
src/views/Assembly/InstallationAndMonitoring/index.vue
Normal file
@@ -0,0 +1,381 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<el-row>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @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="machineNumberValue" placeholder="机床编号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>客户名称:</span>
|
||||
<el-input v-model="CustomerName" size="small" placeholder="客户名称" readonly style="width: 200px"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="searchTable()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<div style="width: 49.8%; float: left;margin-left: 2px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<div style="margin-left: 43%;margin-top: 20px;font-weight: bold;font-size: 24px">关键节点记录</div>
|
||||
</el-row>
|
||||
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 90%;margin-top: 15px" @click="handleAdd()">增加</el-button>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
:row-class-name="tableRowClassName"
|
||||
border
|
||||
style="width: 100%;max-height: 450px;margin-top: 10px"
|
||||
height="450px"
|
||||
highlight-current-row
|
||||
size="small">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="关键节点" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.关键节点 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成情况" align="center" width="100px">
|
||||
<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" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(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]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 49.8%; float: right; margin-right: 2px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<div style="margin-left: 43%;margin-top: 20px;font-weight: bold;font-size: 24px">每日工作记录</div>
|
||||
</el-row>
|
||||
<el-button size="small" type="primary" icon="el-icon-circle-plus-outline" style="margin-left: 90%;margin-top: 15px" @click="handleAdd1()">增加</el-button>
|
||||
<el-table v-loading="loading" :data="tableData1" border style="width: 100%;max-height: 450px;margin-top: 10px" height="450px" highlight-current-row size="small">
|
||||
<el-table-column
|
||||
type="index"
|
||||
label="序号"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="工作情况" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工作情况 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工作日期" align="center" width="130px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工作日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit1(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete1(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"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="关键节点" prop="关键节点">
|
||||
<el-input v-model="form.关键节点" placeholder="关键节点" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="完成情况" prop="完成情况">
|
||||
<el-select v-model="form.完成情况" placeholder="完成情况" size="small">
|
||||
<el-option
|
||||
v-for="item in Completion"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.备注" placeholder="备注" type="textarea" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible=false">取消</el-button>
|
||||
<el-button v-show="title==='增加关键节点'" type="primary" @click="submitAdd()">确定</el-button>
|
||||
<el-button v-show="title==='编辑关键节点'" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||
<el-form-item label="工作情况" prop="工作情况">
|
||||
<el-input v-model="form1.工作情况" placeholder="工作情况" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工作日期" prop="工作日期">
|
||||
<el-date-picker
|
||||
v-model="form1.工作日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="工作日期"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible1=false">取消</el-button>
|
||||
<el-button v-show="title1==='增加工作记录'" type="primary" @click="submitAdd1()">确定</el-button>
|
||||
<el-button v-show="title1==='编辑工作记录'" type="primary" @click="submitEdit1()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchMachine, searchTable, searchTable1, addData, editData, deleteData, addData1, editData1, deleteData1 } from '@/api/Assembly/InstallationAndMonitoring'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
CustomerName: '',
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
loading: false,
|
||||
loading1: false,
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible1: false,
|
||||
title: '',
|
||||
title1: '',
|
||||
Completion: [{
|
||||
value: '未完成',
|
||||
label: '未完成'
|
||||
}, {
|
||||
value: '完成',
|
||||
label: '完成'
|
||||
}],
|
||||
form: {
|
||||
关键节点: '',
|
||||
完成情况: '',
|
||||
备注: ''
|
||||
},
|
||||
rules: {
|
||||
关键节点: [{ required: true, message: '请输入关键节点', trigger: 'blur' }],
|
||||
完成情况: [{ required: true, message: '请选择完成情况', trigger: 'change' }]
|
||||
},
|
||||
form1: {
|
||||
工作情况: '',
|
||||
工作日期: ''
|
||||
},
|
||||
rules1: {
|
||||
工作情况: [{ required: true, message: '请输入工作记录', trigger: 'blur' }],
|
||||
工作日期: [{ required: true, message: '请选择工作日期', trigger: 'change' }]
|
||||
},
|
||||
KeyNodeNum: '',
|
||||
WorkRecordNum: '',
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
pageSize: 10,
|
||||
pageSize1: 10,
|
||||
pageCurrent: 1,
|
||||
pageCurrent1: 1,
|
||||
total: 0,
|
||||
total1: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchMachine(this.projectValue).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
this.CustomerName = response.data[0].客户名称
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
console.log(response)
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].工作日期 !== '') {
|
||||
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请选择机床')
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
this.addForm('form', [this.dialogFormVisible = true, this.title = '增加关键节点'])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床')
|
||||
}
|
||||
},
|
||||
submitAdd() {
|
||||
this.addTable(addData, [this.machineNumberValue, this.form.关键节点, this.form.完成情况, this.form.备注], 'form', function() { this.dialogFormVisible = false; this.searchTable() })
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.editForm(row, 'form', [this.title = '编辑关键节点', this.KeyNodeNum = row.关键节点流水号, this.dialogFormVisible = true])
|
||||
},
|
||||
submitEdit() {
|
||||
this.editTable(editData, [this.KeyNodeNum, this.form.关键节点, this.form.完成情况, this.form.备注], 'form', function() { this.searchTable(); this.dialogFormVisible = false })
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.deleteRow(deleteData, row.关键节点流水号, function() { this.searchTable() })
|
||||
},
|
||||
handleAdd1() {
|
||||
if (this.machineNumberValue !== '') {
|
||||
this.addForm('form1', [this.dialogFormVisible1 = true, this.title1 = '增加工作记录'])
|
||||
} else {
|
||||
this.$message.warning('请先选择机床')
|
||||
}
|
||||
},
|
||||
submitAdd1() {
|
||||
this.addTable(addData1, [this.machineNumberValue, this.form1.工作情况, this.form1.工作日期], 'form1', function() { this.dialogFormVisible1 = false; this.searchTable() })
|
||||
},
|
||||
handleEdit1(row) {
|
||||
this.editForm(row, 'form1', [this.title1 = '编辑工作记录', this.WorkRecordNum = row.工作记录流水号, this.dialogFormVisible1 = true])
|
||||
},
|
||||
submitEdit1() {
|
||||
this.editTable(editData1, [this.WorkRecordNum, this.form1.工作情况, this.form1.工作日期], 'form1', function() { this.dialogFormVisible1 = false; this.searchTable() })
|
||||
},
|
||||
handleDelete1(row) {
|
||||
this.deleteRow(deleteData1, row.工作记录流水号, function() { this.searchTable() })
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
searchTable(this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].工作日期 !== '') {
|
||||
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
searchTable1(this.machineNumberValue, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].工作日期 !== '') {
|
||||
response.data.rows[i].工作日期 = response.data.rows[i].工作日期.split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (row.完成情况 === '完成') {
|
||||
return 'completion'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0px 10px 10px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-table .completion {
|
||||
background: limegreen;
|
||||
}
|
||||
</style>
|
||||
217
src/views/Assembly/PrintingAssemblyProcessCard/index.vue
Normal file
217
src/views/Assembly/PrintingAssemblyProcessCard/index.vue
Normal file
@@ -0,0 +1,217 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" filterable clearable size="small" placeholder="项目名称" @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="machineNumberValue" filterable clearable placeholder="机床编号" size="small">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" style="margin: 10px;" size="small" @click="searchTable">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-download" size="small" @click="exportTable('cjn')">导出</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
min-height="300px"
|
||||
height="300px"
|
||||
border
|
||||
@row-click="searchDetail">
|
||||
<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.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="客户名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<table id="cjn" cellspacing="0px" border align="center" width="100%" style="">
|
||||
<thead id="20">
|
||||
<tr>
|
||||
<td colspan="1" style="text-align: center;font-size: 30px;font-weight: bold;width: 10.25%;">GAOJING</td>
|
||||
<td colspan="15" style="text-align:center;font-size: 30px;font-weight: bold">专机装配工艺过程卡</td>
|
||||
</tr>
|
||||
<tr class="tbodyHead">
|
||||
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">机床编号:</td>
|
||||
<td colspan="4" width="15%" align="center">{{ MachineNum }}</td>
|
||||
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">机床名称:</td>
|
||||
<td colspan="5" width="35%" align="center">{{ MachineName }}</td>
|
||||
<td colspan="1" style="font-weight: bold" width="6.25%" align="center">客户名称:</td>
|
||||
<td colspan="4" width="31.25%" align="center">{{ CustomerName }}</td>
|
||||
</tr>
|
||||
<tr id="tableHead">
|
||||
<th class="tg-0pky">序号</th>
|
||||
<th class="tg-0lax" colspan="4">工序名称</th>
|
||||
<th class="tg-0lax" colspan="6">工艺内容及装配具体要求</th>
|
||||
<th class="tg-0lax">质检</th>
|
||||
<th class="tg-0lax">工时/时</th>
|
||||
<th class="tg-0lax">完成情况/装配工</th>
|
||||
<th class="tg-0lax">检验情况/检验员</th>
|
||||
<th class="tg-0lax" width="100px">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody v-for="(item, index) in dataAll" :key="index">
|
||||
<tr>
|
||||
<td colspan="16" style="font-weight: bold">{{ item.table1 }}</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in item.table2" :key="index">
|
||||
<td align="center"> {{ list.序号 }}</td>
|
||||
<td colspan="4">{{ list.工序名称 }}</td>
|
||||
<td colspan="6">{{ list.工艺内容及装配具体要求 }}</td>
|
||||
<td align="center">{{ list.质检 }}</td>
|
||||
<td>{{ list.工时 }}</td>
|
||||
<td>{{ list.完成情况 }}</td>
|
||||
<td>{{ list.检验情况 }}</td>
|
||||
<td width="100px">{{ list.备注 }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchMachine, searchDetail, searchProcess, searchTable } from '@/api/Assembly/PrintingAssemblyProcessCard'
|
||||
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dataAll: [],
|
||||
tableData: [],
|
||||
radio: 0,
|
||||
check: 0,
|
||||
check1: 0,
|
||||
loading: false,
|
||||
projectValue: '',
|
||||
project: [],
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
MachineNum: '',
|
||||
MachineName: '',
|
||||
CustomerName: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
searchMachine() { // 根据条件查机床编号
|
||||
this.machineNumberValue = ''
|
||||
this.machineNumber = []
|
||||
searchMachine(this.projectValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() { // 主表查询
|
||||
this.loading = true
|
||||
this.projectValue ? this.check = 1 : this.check = 0
|
||||
this.machineNumberValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchTable(this.check, this.projectValue, this.check1, this.machineNumberValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
async searchDetail(row) { // 查询工艺
|
||||
this.dataAll = []
|
||||
this.MachineName = row.机床名称
|
||||
this.MachineNum = row.机床图号
|
||||
this.CustomerName = row.客户名称
|
||||
const response = await searchDetail(row.机床流水号)
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
const response2 = await searchProcess(data[i].组件工艺流水号)
|
||||
this.dataAll.push({
|
||||
table1: data[i].序号 + ' ' + data[i].组号 + ' ' + data[i].装配任务,
|
||||
table2: response2.data
|
||||
})
|
||||
}
|
||||
},
|
||||
exportTable(tableid) {
|
||||
if (this.dataAll.length === 0) {
|
||||
this.$message.warning('暂无数据')
|
||||
} else {
|
||||
getExplorer()
|
||||
method5(tableid)
|
||||
Cleanup()
|
||||
}
|
||||
},
|
||||
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;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.tg {border-collapse:collapse;border-spacing:0;}
|
||||
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:black;}
|
||||
.tg .tg-0pky{border-color:inherit;text-align:left;vertical-align:top}
|
||||
.tg .tg-0lax{text-align:left;vertical-align:top}
|
||||
</style>
|
||||
1667
src/views/ManufacturingCenter/ProductionCapacityBalance/index.vue
Normal file
1667
src/views/ManufacturingCenter/ProductionCapacityBalance/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
<span style="margin-left: 10px">投标人:</span>
|
||||
<el-input v-model="Bidder" clearable size="small" style="width:100px" placeholder="请选择" readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 1" @clear="clear()"/>
|
||||
<span style="margin-left: 10px">招标企业:</span>
|
||||
<el-input v-model="TenderingEnterprise" clearable size="small" style="width:180px" placeholder="请输入招标企业"/>
|
||||
<el-input v-model="TenderingEnterprise" clearable size="small" style="width:140px" placeholder="请输入招标企业"/>
|
||||
<span style="margin-left: 10px">开始日期:</span>
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
@@ -346,7 +346,7 @@ export default {
|
||||
联系人: '',
|
||||
联系电话: '',
|
||||
保证金金额: '',
|
||||
保证金类型: '',
|
||||
保证金类型: 1,
|
||||
投标人: '',
|
||||
投标日期: '',
|
||||
计划收回日期: '',
|
||||
@@ -542,6 +542,7 @@ export default {
|
||||
})
|
||||
},
|
||||
editBidBond(row) {
|
||||
this.editForm(row, 'form2')
|
||||
this.title = '编辑'
|
||||
this.dialogFormVisible2 = true
|
||||
this.form2.招标企业 = row.招标企业
|
||||
|
||||
@@ -9,18 +9,6 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<!--<el-input v-model="CustomerName" placeholder="请输入客户名称" size="small"></el-input>-->
|
||||
<!--<span class="move">销售经理:</span>-->
|
||||
<!--<el-input clearable v-model="MarketingManagerValue" @dblclick.native="dialogFormVisiblePeople = true" size="small" style="width:200px" placeholder="请选择营销经理" clearable></el-input>-->
|
||||
<!--<span class="move">信誉等级:</span>-->
|
||||
<!--<el-select v-model="CreditRatingValue" placeholder="请选择信誉等级" size="small">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in CreditRating"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value">-->
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<el-button type="success" icon="el-icon-search" class="move" size="small" @click="selectCustomerOfName">查询</el-button>
|
||||
</el-card>
|
||||
<el-row>
|
||||
@@ -34,7 +22,6 @@
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
height="730"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="序号" width="80">
|
||||
<template slot-scope="scope">
|
||||
@@ -53,7 +40,7 @@
|
||||
<el-card>
|
||||
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click="addMarketingManager();flag = 1">添加销售经理</el-button>
|
||||
<span style="float: right">销售经理</span>
|
||||
<el-table v-loading="loading3" :data="tableData3" height="192" style="width: 100%;margin-top: 10px" border highlight-current-row>
|
||||
<el-table v-loading="loading3" :data="tableData3" height="192" style="width: 100%;margin-top: 10px" border>
|
||||
<el-table-column label="责权省份" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.省份 }}
|
||||
@@ -98,7 +85,7 @@
|
||||
<el-card>
|
||||
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click = "addCustomer();flag1 = 1">新增客户</el-button>
|
||||
<span style="float: right">客户信息</span>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="400" style="width: 100%;margin-top: 10px" border highlight-current-row>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="400" style="width: 100%;margin-top: 10px" border>
|
||||
<el-table-column label="省份" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.省份 }}
|
||||
@@ -196,7 +183,7 @@
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
<el-table :data="ListPeople" highlight-current-row height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleChange">
|
||||
<el-table :data="ListPeople" height="400" style="width: 400px;float: left;margin-left: 30px" @row-click="handleChange">
|
||||
<el-table-column label="考勤编号" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.考勤编号 }}
|
||||
@@ -226,7 +213,7 @@
|
||||
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-form-item label="营销经理" prop="营销经理">
|
||||
<el-input v-model="form1.营销经理" clearable size="small" style="width:200px" placeholder="请选择营销经理" @dblclick.native="dialogFormVisiblePeople = true"/>
|
||||
<el-input v-model="form1.营销经理" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="dialogFormVisiblePeople = true"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@@ -236,72 +223,56 @@
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title2" :visible.sync="dialogFormVisible2" center width="700px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="省份:" prop="省份">
|
||||
<el-input v-model="form2.省份" :disabled="true" clearable size="small" style="width:200px" placeholder="请选择省份"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称:" prop="客户名称">
|
||||
<el-input v-model="form2.客户名称" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人:" prop="联系人">
|
||||
<el-input v-model="form2.联系人" clearable size="small" style="width:200px" placeholder="请输入联系人"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-form-item label="联系电话:" prop="联系电话">
|
||||
<el-input v-model="form2.联系电话" clearable size="small" style="width:200px" placeholder="请输入联系电话"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
<el-form-item label="联系电话:" prop="联系电话">
|
||||
<el-input v-model="form2.联系电话" clearable size="small" style="width:200px" placeholder="请输入联系电话"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传真:" prop="传真">
|
||||
<el-input v-model="form2.传真" clearable size="small" style="width:200px" placeholder="请输入传真"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系地址:" prop="联系地址">
|
||||
<el-input v-model="form2.联系地址" clearable size="small" style="width:200px" placeholder="请输入联系地址"/>
|
||||
<el-input v-model="form2.联系地址" clearable size="small" style="width:200px" placeholder="请输入联系地址" readonly/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电子邮箱:" prop="电子邮箱">
|
||||
<el-input v-model="form2.电子邮箱" clearable size="small" style="width:200px" placeholder="请输入电子邮箱"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税号:" prop="税号">
|
||||
<el-input v-model="form2.税号" clearable size="small" style="width:200px" placeholder="请输入税号"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="银行账号:" prop="银行账号">
|
||||
<el-input v-model="form2.银行账号" clearable size="small" style="width:200px" placeholder="请输入银行账号"/>
|
||||
<el-input v-model="form2.银行账号" clearable size="small" style="width:200px" placeholder="请输入银行账号" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="信用等级:" prop="信用等级">
|
||||
<el-select v-model="form2.信用等级" placeholder="请选择信誉等级" size="small">
|
||||
<el-option
|
||||
@@ -311,16 +282,14 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注:" prop="备注">
|
||||
<el-input v-model="form2.备注" clearable size="small" style="width:530px" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff2()">取消</el-button>
|
||||
<el-button type="primary" @click="submit2('form2')">确 定</el-button>
|
||||
@@ -461,10 +430,18 @@ export default {
|
||||
function a() {
|
||||
if (this.CustomerNameValue === '') {
|
||||
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
|
||||
// this.loading3 = true
|
||||
// selectMarketingManager(this.AdressID).then(response => {
|
||||
// this.loading3 = false
|
||||
// this.tableData3 = response.data
|
||||
// })
|
||||
}
|
||||
if (this.CustomerNameValue !== '') {
|
||||
selectCustomerOfName(row.客户流水号, this.pageCurrent, this.pageSize).then(response => {
|
||||
// this.radio = parseInt(response.data.rows[0].客户名称省份流水号)
|
||||
// this.AdressID = parseInt(response.data.rows[0].客户名称省份流水号)
|
||||
this.tableData2 = response.data.rows
|
||||
// return this.AdressID
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -514,12 +491,12 @@ export default {
|
||||
this.a = row.营销经理地区流水号
|
||||
},
|
||||
addCustomer() {
|
||||
this.addForm('form2')
|
||||
if (this.AdressID === '' || this.AdressID === null) {
|
||||
this.$message.warning('请选择一个省份')
|
||||
} else {
|
||||
this.dialogFormVisible2 = true
|
||||
this.title2 = '增加'
|
||||
this.addForm('form2')
|
||||
}
|
||||
selectAdressOfID(this.AdressID).then(response => {
|
||||
this.form2.省份 = response.data[0].省份
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">销售经理</span>
|
||||
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
||||
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @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="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增收款计划</el-button>
|
||||
<el-badge :value="value" :max="99" class="item">
|
||||
@@ -119,6 +119,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--icon="el-icon-tickets"-->
|
||||
<!--:disabled="scope.row.是否禁用"-->
|
||||
<!--@click.stop="handleEdit(scope.row, scope.$index)">付款</el-button>-->
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用编辑"
|
||||
size="mini"
|
||||
@@ -174,6 +180,11 @@
|
||||
{{ 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="操作" fixed="right" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -218,7 +229,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="提前X天提醒">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:80px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)" @blur="selectDay"/>
|
||||
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:80px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计划收款时间">
|
||||
@@ -269,7 +280,7 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="新增付款计划" center width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
|
||||
<el-select v-model="form2.entryNameValue" clearable filterable placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" @change="searchProjectName">
|
||||
<el-select v-model="form2.entryNameValue" placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" clearable filterable @change="searchProjectName">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
@@ -293,7 +304,7 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible4" title="编辑付款计划" center width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
|
||||
<el-select v-model="form2.entryNameValue" :disabled="true" clearable filterable placeholder="请输入项目名称" style="width: 200px" size="small" @change="searchProjectName">
|
||||
<el-select v-model="form2.entryNameValue" :disabled="true" clearable placeholder="请输入项目名称" style="width: 200px" size="small" filterable @change="searchProjectName">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
@@ -407,7 +418,7 @@
|
||||
<el-input-number v-model="form4.转移金额" :min="0" :max="max1" :precision="2" :step="1" controls-position="right" size="small" style="width: 200px" placeholder="请输入本次付款金额" @change="changeMoney"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划阶段" prop="计划阶段" label-width="110px">
|
||||
<el-select v-model="form4.计划阶段" clearable filterable placeholder="请选择计划转移到某阶段" style="width: 200px" size="small">
|
||||
<el-select v-model="form4.计划阶段" clearable placeholder="请选择计划转移到某阶段" style="width: 200px" size="small" filterable>
|
||||
<el-option
|
||||
v-for="item in Planning"
|
||||
:key="item.value"
|
||||
@@ -473,7 +484,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api/MarketingCenter/ContractCapitalManagement'
|
||||
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
|
||||
export default {
|
||||
data() {
|
||||
const validateValue = (rule, value, callback) => {
|
||||
@@ -582,10 +593,10 @@ export default {
|
||||
},
|
||||
rules2: { // 表单验证规则
|
||||
本次付款: [
|
||||
{ required: true, message: '请输入本次付款金额', trigger: 'blur' },
|
||||
{ required: true, message: '请输入本次付款金额' },
|
||||
{ required: true, trigger: 'blur', validator: validateValue }],
|
||||
付款时间: [{ required: true, message: '请输入付款时间', trigger: 'change' }],
|
||||
付款阶段id: [{ required: true, message: '请输入付款阶段', trigger: 'change' }]
|
||||
付款时间: [{ required: true, message: '请输入付款时间' }]
|
||||
// 付款阶段id: [{ required: true, message: '请输入付款阶段', trigger: 'change' }]
|
||||
},
|
||||
rules3: { // 表单验证规则
|
||||
转移金额: [
|
||||
@@ -725,6 +736,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleEdit2(row) {
|
||||
this.editForm(row, 'form3')
|
||||
this.title = '修改阶段收款'
|
||||
this.max1 = parseFloat(this.max2) + parseFloat(row.本次收款金额)
|
||||
this.dialogFormVisible3 = true
|
||||
@@ -965,9 +977,9 @@ export default {
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.addTableData1()
|
||||
this.form2.ContractNumberValue = ''
|
||||
this.form2.EntryName = ''
|
||||
this.form2.TotalContractAmount = ''
|
||||
// this.form2.ContractNumberValue = ''
|
||||
// this.form2.EntryName = ''
|
||||
// this.form2.TotalContractAmount = ''
|
||||
this.temp = null
|
||||
} else if (this.temp === 2) {
|
||||
this.chaEdit()
|
||||
@@ -1022,8 +1034,8 @@ export default {
|
||||
})
|
||||
},
|
||||
ADD() {
|
||||
this.dialogFormVisible2 = true
|
||||
this.addForm('form2')
|
||||
this.dialogFormVisible2 = true
|
||||
this.temp = 1
|
||||
},
|
||||
addTableData1() {
|
||||
@@ -1083,25 +1095,45 @@ export default {
|
||||
this.id = row.批次资金id
|
||||
this.id1 = row.资金id
|
||||
},
|
||||
submitEdit() {
|
||||
if (this.flag === 1) {
|
||||
fukuan(this.id, this.form3.本次付款, this.form3.付款时间).then(response => {
|
||||
this.dialogFormVisible3 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('收款成功')
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
submitEdit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.flag === 1) {
|
||||
fukuan(this.id, this.form3.本次付款, this.form3.付款时间).then(response => {
|
||||
this.dialogFormVisible3 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('收款成功')
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 9)
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
@@ -1109,70 +1141,29 @@ export default {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
this.gridData = data
|
||||
this.value = response.data.length
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
this.flag = ''
|
||||
} else {
|
||||
this.$message.error('收款失败')
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 9)
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
this.gridData = data
|
||||
this.value = response.data.length
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
this.flag = ''
|
||||
} else {
|
||||
this.$message.error('收款失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
editFukuan(this.id2, this.form3.本次付款, this.form3.付款时间).then(response => {
|
||||
this.dialogFormVisible3 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新信息成功')
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 9)
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
this.gridData = data
|
||||
this.value = response.data.length
|
||||
})
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
editFukuan(this.id2, this.form3.本次付款, this.form3.付款时间).then(response => {
|
||||
this.dialogFormVisible3 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新信息成功')
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 9)
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
@@ -1180,27 +1171,53 @@ export default {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
this.gridData = data
|
||||
this.value = response.data.length
|
||||
})
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
this.flag = ''
|
||||
} else {
|
||||
this.$message.error('更新信息失败')
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
this.flag = ''
|
||||
} else {
|
||||
this.$message.error('更新信息失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
EditTableData(row) {
|
||||
this.editForm(row, 'form2')
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.entryNameValue = parseInt(row.项目流水号)
|
||||
this.form2.ContractNumberValue = row.合同编号
|
||||
@@ -1210,39 +1227,43 @@ export default {
|
||||
clear() {
|
||||
this.peopleid = ''
|
||||
},
|
||||
editTableData() {
|
||||
editList(this.form2.entryNameValue, this.form2.TotalContractAmount, this.zijinID).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新信息成功')
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
editTableData(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editList(this.form2.entryNameValue, this.form2.TotalContractAmount, this.zijinID).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新信息成功')
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
} else {
|
||||
this.$message.error('更新信息失败')
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
} else {
|
||||
this.$message.error('更新信息失败')
|
||||
}
|
||||
})
|
||||
// this.editTable(editTableData, [this.zijinID, this.form2.TotalContractAmount], 'form2', function() { this.getTableData(); this.dialogFormVisible4 = false })
|
||||
|
||||
@@ -287,6 +287,47 @@
|
||||
<el-button type="primary" @click="submit('form')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--<el-dialog title="人员信息" :visible.sync="dialogFormVisiblePeople" center width="750px">-->
|
||||
<!--<div style="height: 500px">-->
|
||||
<!--<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">-->
|
||||
<!--<el-tree-->
|
||||
<!--:data="dataPeople"-->
|
||||
<!--node-key="id"-->
|
||||
<!--style="width: 150px;float: left"-->
|
||||
<!--height="400"-->
|
||||
<!--accordion-->
|
||||
<!--@node-click="handleNodeClick"-->
|
||||
<!-->-->
|
||||
<!--</el-tree>-->
|
||||
<!--</div>-->
|
||||
<!--<el-table :data="ListPeople" highlight-current-row height="400" @row-click="handleChange" style="width: 400px;float: left;margin-left: 30px">-->
|
||||
<!--<el-table-column label="考勤编号" align="center" >-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{scope.row.考勤编号}}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="姓名" align="center" >-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{scope.row.姓名}}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="性别" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{scope.row.性别}}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="工作岗位" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{scope.row.岗位名称}}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--</el-table>-->
|
||||
<!--</div>-->
|
||||
<!--<el-button style="margin-left: 260px" @click="offName">取消</el-button>-->
|
||||
<!--<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>-->
|
||||
<!--</el-dialog>-->
|
||||
|
||||
<!--新增机床对话框-->
|
||||
<el-dialog :title="title1" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="25%">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-width="140px">
|
||||
@@ -731,6 +772,7 @@ export default {
|
||||
this.addForm('form1')
|
||||
},
|
||||
editMachine(row) {
|
||||
this.editForm(row, 'form1')
|
||||
this.dialogFormVisible2 = true
|
||||
this.title1 = '编辑'
|
||||
this.c = row.机床流水号
|
||||
|
||||
@@ -460,9 +460,6 @@ export default {
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
change(data) {
|
||||
return data + 1
|
||||
},
|
||||
init() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName1')
|
||||
@@ -521,6 +518,7 @@ export default {
|
||||
this.addForm('form')
|
||||
},
|
||||
editSafetyMargin(row) {
|
||||
this.editForm(row, 'form')
|
||||
this.title = '编辑'
|
||||
this.dialogFormVisible1 = true
|
||||
this.form.项目名称 = parseInt(row.项目流水号)
|
||||
@@ -600,7 +598,7 @@ export default {
|
||||
this.dialogFormVisible2 = true
|
||||
this.code = row.安全保证金流水号
|
||||
this.projectName = row.项目名称
|
||||
this.maxMoney = row.保证金金额
|
||||
this.maxMoney = parseFloat(row.保证金金额)
|
||||
this.SurplusAmount = row.应收回金额
|
||||
this.addForm('form2')
|
||||
},
|
||||
@@ -618,6 +616,7 @@ export default {
|
||||
})
|
||||
},
|
||||
editWithdrawing(row) {
|
||||
this.editForm(row, 'form3')
|
||||
this.dialogFormVisible3 = true
|
||||
this.maxMoney1 = parseFloat(this.SurplusAmount) + parseFloat(row.扣款金额)
|
||||
this.form3.扣款金额 = row.扣款金额
|
||||
@@ -625,7 +624,6 @@ export default {
|
||||
this.form3.扣款原因 = row.扣款原因
|
||||
this.form3.扣款日期 = row.扣款日期
|
||||
this.WithdrawingCode = row.扣款流水号
|
||||
console.log(row.扣款流水号)
|
||||
},
|
||||
edtTableData2() {
|
||||
edtWithdrawing(this.WithdrawingCode, this.form3.扣款金额, this.form3.被扣款人, this.form3.扣款原因, this.form3.扣款日期).then(response => {
|
||||
|
||||
221
src/views/PurchasingCenter/ContractStateSearch/index.vue
Normal file
221
src/views/PurchasingCenter/ContractStateSearch/index.vue
Normal file
@@ -0,0 +1,221 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>采购情况:</span>
|
||||
<el-select v-model="purchaseStateValue" placeholder="采购情况" size="small" style="width: 100px">
|
||||
<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=20;total1=0;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 600px" height="600px" border stripe>
|
||||
<el-table-column align="center" label="采购情况" min-width="80px">
|
||||
<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.物料名称 }}
|
||||
</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-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="80px">
|
||||
<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-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="100px" prop="buyer">
|
||||
<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="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, initBuyer, searchTable1 } from '@/api/PurchasingCenter/ContractStateSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 采购任务分配
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
materialName: '',
|
||||
personValue: '',
|
||||
person: [],
|
||||
purchaseStateValue: 0,
|
||||
purchaseState: [
|
||||
{
|
||||
value: 0,
|
||||
label: '全部'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '未分配'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '未询价'
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: '已询价'
|
||||
},
|
||||
{
|
||||
value: 4,
|
||||
label: '已采购'
|
||||
}
|
||||
],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
tableData1: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 20,
|
||||
total1: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() { // 初始化
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.project.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initBuyer().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
text: response.data[i].姓名,
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询
|
||||
this.projectValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.materialName ? this.check2 = 1 : this.check2 = 0
|
||||
this.personValue ? this.check3 = 1 : this.check3 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.projectValue, this.check2, this.materialName, this.check3, this.personValue, this.purchaseStateValue).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
filterHandler(value, row) {
|
||||
console.log(row, value)
|
||||
return parseInt(row['人员编号']) === parseInt(value)
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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>
|
||||
595
src/views/PurchasingCenter/CreateContract/index.vue
Normal file
595
src/views/PurchasingCenter/CreateContract/index.vue
Normal file
@@ -0,0 +1,595 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-form ref="form1" :model="form1" label-position="right" label-width="110px" class="searchForm">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="合同号">
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" filterable clearable size="small" @change="stipulateArrivalTime='';searchTable1()">
|
||||
<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.supplierName }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="合同名称">
|
||||
<el-input v-model="contractName" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规定到货时间">
|
||||
<el-date-picker
|
||||
v-model="stipulateArrivalTime"
|
||||
:picker-options="endDateOpt"
|
||||
:disabled="Boolean(!contractNumValue)"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
@change="searchDemo();calcDay()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="付款方式">
|
||||
<el-select v-model="payMethodValue" 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="6">
|
||||
<el-form-item label="第1次付款时间">
|
||||
<el-select v-model="payTime1Value" 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="6">
|
||||
<el-form-item label="第2次付款时间">
|
||||
<el-select v-model="payTime2Value" :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-col :span="6">
|
||||
<el-form-item label="第3次付款时间">
|
||||
<el-select v-model="payTime3Value" :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="6">
|
||||
<el-form-item label="第4次付款时间">
|
||||
<el-select v-model="payTime4Value" :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>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第5次付款时间">
|
||||
<el-select v-model="payTime5Value" :disabled="disable5" 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="6">
|
||||
<el-form-item label="运费">
|
||||
<el-input v-model="freight" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="税率">
|
||||
<el-input v-model="taxRate" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="币种">
|
||||
<el-select v-model="currencyValue" placeholder="币种" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in currency"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="参考价格" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.参考价格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.最低单价" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货天数" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="deliveryDay[scope.$index]" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料计划到货时间" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料计划到货时间.split(' ')[0] }}
|
||||
</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">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订货数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.订货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon=""
|
||||
style="margin-top:10px"
|
||||
@click="calculateContractSum">计算合同总额</el-button>
|
||||
<span>合同总额:</span>
|
||||
<el-input v-model="contractSum" size="small"/>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
:show-header="false"
|
||||
highlight-current-row
|
||||
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" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
|
||||
<!--将新一般处理页添加至通讯服务器-->
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:before-upload="beforeUpload"
|
||||
:file-list="fileList"
|
||||
:auto-upload="false"
|
||||
style="display: inline-block;width:250px"
|
||||
class="upload-demo"
|
||||
action="http://localhost:8022/submit/uploadFile0.ashx"
|
||||
list-type="picture">
|
||||
<el-button slot="trigger" size="small" type="primary" style="margin:10px 10px 0 10px">添加图纸附件</el-button>
|
||||
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">生成采购合同</el-button>
|
||||
</el-upload>
|
||||
</el-card>
|
||||
<!--<el-button style="margin-left: 10px;" size="small" type="success" @click="test">test</el-button>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInquirySheet, searchSheetContract, initPayMethod, initPayTimeNode, searchContractDemo, doneContract, insertFile } from '@/api/PurchasingCenter/CreateContract'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
data() {
|
||||
return {
|
||||
fileName: '',
|
||||
hasFile: 0,
|
||||
searchView: '',
|
||||
fileList: [],
|
||||
minDate: null,
|
||||
endDateOpt: { // 为了让规定到货时间早于物料计划到货时间
|
||||
disabledDate: (time) => {
|
||||
if (this.minDate) {
|
||||
return time.getTime() > this.minDate
|
||||
}
|
||||
}
|
||||
},
|
||||
form1: {},
|
||||
contractNumValue: '', // 合同流水号
|
||||
contractNum: [],
|
||||
contractNameNum: '', // 合同编号/询价单号
|
||||
contractName: '产品购销合同', // 合同名称
|
||||
supplierName: '', // 供应商名称
|
||||
stipulateArrivalTime: '', // 规定到货时间
|
||||
payMethodValue: '', // 付款方式流水号
|
||||
payMethodName: '', // 付款方式名称
|
||||
payMethod: [],
|
||||
payTime: [],
|
||||
payTime1Value: '', // 付款时间
|
||||
payTime2Value: '', // 付款时间
|
||||
payTime3Value: '', // 付款时间
|
||||
payTime4Value: '', // 付款时间
|
||||
payTime5Value: '', // 付款时间
|
||||
payTime6Value: '', // 付款时间
|
||||
freight: '', // 运费
|
||||
taxRate: '', // 税率
|
||||
currencyValue: '', // 币种
|
||||
currency: [
|
||||
{
|
||||
label: '人民币',
|
||||
value: 1
|
||||
}, {
|
||||
label: '美元',
|
||||
value: 2
|
||||
}, {
|
||||
label: '英镑',
|
||||
value: 3
|
||||
}, {
|
||||
label: '欧元',
|
||||
value: 4
|
||||
}
|
||||
], // 币种
|
||||
calculateWayValue: [], // 计算方式(不要了)
|
||||
calculateWay: [
|
||||
{
|
||||
label: '个数',
|
||||
value: 1
|
||||
}, {
|
||||
label: '重量',
|
||||
value: 2
|
||||
}
|
||||
],
|
||||
weight: [], // 重量(不要了)
|
||||
disable2: true,
|
||||
disable3: true,
|
||||
disable4: true,
|
||||
disable5: true,
|
||||
disable6: true,
|
||||
tableData1: [], // 物料表
|
||||
contractSum: '', // 合同总额
|
||||
deliveryDay: [], // 发货天数
|
||||
tableData2: [], // 合同模板表
|
||||
textArea: '',
|
||||
paramRow: '', // 参数row
|
||||
materialGroup: '', // 物料流水号组
|
||||
numberGroup: '', // 数量组
|
||||
priceGroup: '', // 单价组
|
||||
dayGroup: '', // 发货天数组
|
||||
payGroup: '', // 付款方式组
|
||||
planGroup: '', // 计划付款时间组
|
||||
taxGroup: '', // 税率组
|
||||
currencyGroup: '', // 币种组
|
||||
groupPartGroup: '', // 组件零件流水号组
|
||||
calculateWayGroup: '', // 计算方式组(不要了)
|
||||
weightGroup: '', // 重量组(不要了)
|
||||
supplierValue: '',
|
||||
groupNum1: [] // 防止渲染不出来的中间变量
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
test() {
|
||||
this.$refs.upload.submit() // 图片传本地
|
||||
},
|
||||
beforeUpload(file) { // 传成功前
|
||||
this.fileName = file.name
|
||||
},
|
||||
submitUpload() { // 生成采购合同+传图片附件
|
||||
for (let i = 0; i < this.contractNum.length; i++) { // 在生成合同处也有
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.contractNameNum = this.contractNum[i].label // 获取询价单号
|
||||
this.supplierValue = this.contractNum[i].supplierValue // 获取供应商流水号
|
||||
}
|
||||
}
|
||||
this.$refs.upload.submit() // 图片传本地
|
||||
if (this.fileName !== '') { // 有附件,先向数据库中插入一条记录(记录合同编号及文件名)
|
||||
insertFile(this.fileName, this.contractNameNum).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.doneContract()
|
||||
} else {
|
||||
this.$message.error('附件名插入数据库失败')
|
||||
}
|
||||
})
|
||||
} else { // 无附件,直接执行生成合同
|
||||
this.doneContract()
|
||||
}
|
||||
this.contractNameNum = ''
|
||||
this.fileName = ''
|
||||
},
|
||||
fetchData() {
|
||||
searchInquirySheet(0, 0, 0, 0, 1, this.id).then(response => { // 初始化询价单号
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum.push({
|
||||
value: response.data[i].询价单流水号,
|
||||
label: response.data[i].询价单编号,
|
||||
supplierName: response.data[i].供应商名称,
|
||||
supplierValue: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
searchContractDemo().then(response => { // 初始化合同模板
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
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].付款时间节点流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
payMethodChange() { // 付款方式改变
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
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
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 2:
|
||||
this.disable2 = false
|
||||
this.disable3 = true
|
||||
this.disable4 = true
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 3:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = true
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 4:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 5:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = false
|
||||
this.disable6 = true
|
||||
break
|
||||
case 6:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = false
|
||||
this.disable6 = false
|
||||
break
|
||||
}
|
||||
},
|
||||
searchTable1() {
|
||||
const numGroup = [] // 空数组,放物料的计划到货时间
|
||||
searchSheetContract(this.contractNumValue).then(response => {
|
||||
this.tableData1 = response.data
|
||||
this.calcDay() // 先给表置0
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.tableData1[i].金额 = parseFloat(this.tableData1[i].最低单价) * parseFloat(this.tableData1[i].订货数量)
|
||||
numGroup.push(Date.parse(this.tableData1[i].物料计划到货时间))
|
||||
}
|
||||
this.minDate = new Date(Math.min(...numGroup))
|
||||
}).then(() => {
|
||||
this.groupNum1 = this.tableData1 // 给中间变量,需要时重新push
|
||||
})
|
||||
this.calcDay() // 先给表置0
|
||||
},
|
||||
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
|
||||
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
|
||||
})
|
||||
},
|
||||
calcDay() { // 计算发货天数
|
||||
this.deliveryDay = []
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
this.stipulateArrivalTime
|
||||
? (this.deliveryDay[i] = parseInt((Date.parse(this.stipulateArrivalTime) - new Date()) / (1000 * 60 * 60 * 24)))
|
||||
: (this.deliveryDay[i] = 0)
|
||||
}
|
||||
},
|
||||
calculateContractSum() {
|
||||
this.contractSum = 0
|
||||
this.tableData1 = []
|
||||
for (let i = 0; i < this.groupNum1.length; i++) {
|
||||
this.groupNum1[i].金额 = parseFloat(this.groupNum1[i].最低单价) * parseFloat(this.groupNum1[i].订货数量)
|
||||
this.contractSum += parseFloat(this.groupNum1[i].金额)
|
||||
this.tableData1.push(this.groupNum1[i])
|
||||
}
|
||||
},
|
||||
doneContract() { // 生成采购合同
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.contractNameNum = this.contractNum[i].label // 获取询价单号
|
||||
this.supplierValue = this.contractNum[i].supplierValue // 获取供应商流水号
|
||||
}
|
||||
}
|
||||
if (this.contractNum === '' || this.contractNum === null) {
|
||||
this.$message.error('请选择生成合同的询价单')
|
||||
} else if (this.stipulateArrivalTime === '' || this.stipulateArrivalTime === null) {
|
||||
this.$message.error('请选择规定到货时间!')
|
||||
} else {
|
||||
for (let i = 0; i < this.deliveryDay.length; i++) {
|
||||
if (parseInt(this.deliveryDay[i]) < 0) {
|
||||
this.$message.error('规定到货日期不可小于当前日期')
|
||||
return
|
||||
}
|
||||
}
|
||||
this.materialGroup = ''
|
||||
this.numberGroup = ''
|
||||
this.priceGroup = ''
|
||||
this.dayGroup = ''
|
||||
this.payGroup = ''
|
||||
this.planGroup = ''
|
||||
this.taxGroup = ''
|
||||
this.currencyGroup = ''
|
||||
this.groupPartGroup = ''
|
||||
for (let i = 0; i < this.tableData1.length; i++) {
|
||||
this.materialGroup += this.tableData1[i].物料流水号 + ','
|
||||
this.numberGroup += this.tableData1[i].订货数量 + ','
|
||||
this.priceGroup += this.tableData1[i].最低单价 + ','
|
||||
this.dayGroup += this.deliveryDay[i] + ','
|
||||
this.taxGroup += this.taxRate + ','
|
||||
this.currencyGroup += this.currencyValue + ','
|
||||
this.groupPartGroup += this.tableData1[i].组件零件流水号 + ',' // fucking
|
||||
}
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
const payTimeNum = this.payMethodName.split(':')
|
||||
if (payTimeNum.length > 1) {
|
||||
for (let i = 0; i < payTimeNum.length; i++) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
this.planGroup += this.payTime1Value + ','
|
||||
break
|
||||
case 1:
|
||||
this.planGroup += this.payTime2Value + ','
|
||||
break
|
||||
case 2:
|
||||
this.planGroup += this.payTime3Value + ','
|
||||
break
|
||||
case 3:
|
||||
this.planGroup += this.payTime4Value + ','
|
||||
break
|
||||
case 4:
|
||||
this.planGroup += this.payTime5Value + ','
|
||||
break
|
||||
case 5:
|
||||
this.planGroup += this.payTime6Value + ','
|
||||
break
|
||||
}
|
||||
this.payGroup += payTimeNum[i] + ',' // 付款比例 付款方式 付款计划
|
||||
}
|
||||
} else {
|
||||
this.payGroup = '10,' // 付款比例 付款方式 付款计划
|
||||
this.planGroup = this.payTime1Value + ',' // 付款时间
|
||||
}
|
||||
this.materialGroup = this.materialGroup.substr(0, this.materialGroup.length - 1)
|
||||
this.numberGroup = this.numberGroup.substr(0, this.numberGroup.length - 1)
|
||||
this.priceGroup = this.priceGroup.substr(0, this.priceGroup.length - 1)
|
||||
this.dayGroup = this.dayGroup.substr(0, this.dayGroup.length - 1)
|
||||
this.payGroup = this.payGroup.substr(0, this.payGroup.length - 1)
|
||||
this.planGroup = this.planGroup.substr(0, this.planGroup.length - 1)
|
||||
this.taxGroup = this.taxGroup.substr(0, this.taxGroup.length - 1)
|
||||
this.currencyGroup = this.currencyGroup.substr(0, this.currencyGroup.length - 1)
|
||||
this.groupPartGroup = this.groupPartGroup.substr(0, this.groupPartGroup.length - 1)
|
||||
doneContract(this.contractNameNum, this.contractName, this.stipulateArrivalTime, this.stipulateArrivalTime, this.payMethodName, this.supplierValue, this.textArea, this.freight, this.materialGroup, this.numberGroup, this.priceGroup, this.dayGroup, this.payGroup, this.planGroup, this.taxGroup, this.currencyGroup, this.calculateWayGroup, this.weightGroup, this.id, this.groupPartGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成合同成功')
|
||||
this.reload()
|
||||
} else { this.$message.error('生成合同失败') }
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
835
src/views/PurchasingCenter/CreateInquirySheet/index.vue
Normal file
835
src/views/PurchasingCenter/CreateInquirySheet/index.vue
Normal file
@@ -0,0 +1,835 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>询价状态:</span>
|
||||
<el-select v-model="inquiryStateValue" placeholder="询价状态" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in inquiryState"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<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=""
|
||||
:data="tableData1"
|
||||
:row-class-name="tableRowClassName"
|
||||
border
|
||||
style="width: 100%;max-height: 300px;"
|
||||
height="300px"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
|
||||
<el-table-column label="操作" align="center" width="100" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1" type="primary" size="mini" @click="materialChange(scope.row)">物料变更</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料状态" align="center" width="100">
|
||||
<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.询价状态编号)===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 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 :filters="supplierFilters" :filter-method="filterHandler" label="供货商" align="center" min-width="100" prop="supplier">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数量" align="center" min-width="70">
|
||||
<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.物料计划到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存量" align="center" min-width="70">
|
||||
<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="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<span>询价单号:</span>
|
||||
<el-input v-model="inquirySheetNum" placeholder="询价单号" size="small" clearable/>
|
||||
<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="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-plus"
|
||||
style="margin-left: 10px"
|
||||
@click="createInquirySheet">创建单据</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
style="margin-left: 10px"
|
||||
@click="addInquirySheet">追加物料</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">
|
||||
<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="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="电话号码" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话号码 }}
|
||||
</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" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit" @click="editInquirySheet(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteInquirySheet(scope.row)">删除</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="exportInquirySheet(scope.row)">导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0;">
|
||||
<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-table v-loading="" :data="tableData3" 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="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">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="询价单编号" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.询价单编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="outInquirySheet(scope.row)">移出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</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>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名称">
|
||||
<el-input v-model="supplierName" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业性质">
|
||||
<el-input v-model="enterpriseNature" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="货期">
|
||||
<el-input v-model="goodTime" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注册资本">
|
||||
<el-input v-model="registeredCapital" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税号">
|
||||
<el-input v-model="taxNum" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电子邮箱">
|
||||
<el-input v-model="EMail" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址">
|
||||
<el-input v-model="address" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="account" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行">
|
||||
<el-input v-model="openingBank" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话号码">
|
||||
<el-input v-model="phone" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传真">
|
||||
<el-input v-model="fax" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
@click="searchSupplier">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitSelectSupplier">确定</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="small"
|
||||
icon="el-icon-delete"
|
||||
@click="emptySupplierDetail">清空</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="200px" border @row-click="showSupplierDetail">
|
||||
<el-table-column align="center" label="供应商名称" min-width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="企业性质" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.企业性质 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="创立日期" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.创立日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="注册资本" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.注册资本 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px">
|
||||
<el-form-item label="询价单号" prop="inquirySheetNum">
|
||||
<el-input v-model="form2.inquirySheetNum" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierName">
|
||||
<el-input v-model="form2.supplierName" size="small" readonly>
|
||||
<el-button slot="append" icon="el-icon-search" @click="dialogVisible1=true"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title2==='创建询价单'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitCreateInquirySheet">确定</el-button>
|
||||
<el-button
|
||||
v-show="title2==='编辑询价单'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitEditInquirySheet">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
|
||||
<el-table :data="tableData02" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="400px" border highlight-current-row @row-click="selectNewMaterial">
|
||||
<el-table-column align="center" label="物料名称" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料规格" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料型号" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent02"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize02"
|
||||
:total="total02"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange02"
|
||||
@current-change="handleCurrentChange02"/>
|
||||
</div>
|
||||
<span style="font-size: large;color: red">将原物料替换为: {{ materialNew }}</span>
|
||||
<!--<el-input v-model="materialNew" size="small" readonly style="margin: 10px 10px 0 10px"></el-input>-->
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" icon="el-icon-check" @click="submitMaterialChange">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchMaterial, searchSupplier, searchCreateInquirySheet, searchCreateInquirySheet2, searchSheetDetail, editInquirySheet,
|
||||
createInquirySheet, deleteInquirySheet, addInquirySheet, outInquirySheet, searchAllMaterial, materialChange } from '@/api/PurchasingCenter/CreateInquirySheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 创建询价单
|
||||
data() {
|
||||
return {
|
||||
check1: 0, // 询价状态
|
||||
check2: 0, // 物料名称
|
||||
check3: 0, // 供应商
|
||||
check4: 0, // 询价单号
|
||||
inquiryStateValue: '', // 询价状态
|
||||
inquiryState: [{
|
||||
label: '未询价',
|
||||
value: 1
|
||||
}, {
|
||||
label: '已询价',
|
||||
value: 3
|
||||
}],
|
||||
materialName: '',
|
||||
tableData1: [], // 采购任务单明细
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
supplierFilters: [{ text: '', value: '' }],
|
||||
tableData2: [], // 询价单列表
|
||||
total2: 0,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
tableData3: [], // 询价单明细
|
||||
dialogVisible1: false,
|
||||
inquirySheetNum: '', // 询价单号
|
||||
inquirySheetFlowNum: '', // 询价单流水号
|
||||
form1: {},
|
||||
supplierCheck1: 0,
|
||||
supplierCheck2: 0,
|
||||
supplierCheck3: 0,
|
||||
supplierCheck4: 0,
|
||||
supplierCheck5: 0,
|
||||
supplierCheck6: 0,
|
||||
supplierCheck7: 0,
|
||||
supplierCheck8: 0,
|
||||
supplierCheck9: 0,
|
||||
supplierCheck10: 0,
|
||||
supplierCheck11: 0,
|
||||
supplierCheck12: 0,
|
||||
supplierValue: '', // 供应商流水号
|
||||
supplierName: '', // 供应商名称
|
||||
goodTime: '', // 货期
|
||||
enterpriseNature: '', // 企业性质
|
||||
createDate: '', // 创立日期
|
||||
registeredCapital: '', // 注册资本
|
||||
taxNum: '', // 税号
|
||||
EMail: '', // 电子邮箱
|
||||
address: '', // 地址
|
||||
account: '', // 账号
|
||||
openingBank: '', // 开户行
|
||||
phone: '', // 电话号码
|
||||
fax: '', // 传真
|
||||
tableData01: [],
|
||||
dialogVisible2: false,
|
||||
form2: {
|
||||
inquirySheetNumValue: '', // 询价单流水号
|
||||
inquirySheetNum: '',
|
||||
supplierName: '',
|
||||
supplierValue: ''
|
||||
},
|
||||
rules2: { // 表单验证规则
|
||||
inquirySheetNum: [{ required: true, message: '请填写询价单号' }],
|
||||
supplierName: [{ required: true, message: '请选择供应商' }]
|
||||
},
|
||||
groupPartNum: [], // 组件零件流水号
|
||||
allNum: [], // 总数量
|
||||
dialogVisible3: false,
|
||||
materialName0: '',
|
||||
tableData02: [],
|
||||
total02: 0,
|
||||
pageCurrent02: 1,
|
||||
pageSize02: 10,
|
||||
materialNew: '', // 替换为新物料全称
|
||||
materialOldValue: '',
|
||||
materialNewValue: '',
|
||||
groupPartNumValue: '', // 组件零件流水号
|
||||
standardAndPurchaseValue: '', // 标准件和外购件流水号
|
||||
title2: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
return (parseInt(row.询价状态编号) === 1 && parseInt(row.采购状态编号) === 1 && parseInt(row.是否确认) === 1) // 未询价&&未采购&&确认物料修改
|
||||
},
|
||||
filterHandler(value, row) { // 筛选供货商
|
||||
return row['供货商'] === value
|
||||
},
|
||||
searchTable1() { // 查询物料列表
|
||||
this.inquiryStateValue !== '' && this.inquiryStateValue !== null ? this.check1 = 1 : this.check1 = 0
|
||||
this.materialName ? this.check2 = 1 : this.check2 = 0
|
||||
searchMaterial(this.pageCurrent1, this.pageSize1, this.check1, this.inquiryStateValue, this.check2, this.materialName, this.id).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
console.log(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()
|
||||
},
|
||||
searchTable2() { // 查询询价单列表
|
||||
this.supplierName ? this.check3 = 1 : this.check3 = 0
|
||||
this.inquirySheetNum ? this.check4 = 1 : this.check4 = 0
|
||||
searchCreateInquirySheet(this.pageCurrent2, this.pageSize2, this.check3, this.supplierName, this.check4, this.inquirySheetNum, this.id).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) { // 询价单列表分页
|
||||
this.pageSize2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) { // 询价单列表分页
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
createInquirySheet() { // 创建空单据--询价单
|
||||
this.title2 = '创建询价单'
|
||||
this.form2.inquirySheetNum = ''
|
||||
this.form2.supplierValue = ''
|
||||
this.form2.supplierName = ''
|
||||
this.dialogVisible2 = true
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
},
|
||||
submitCreateInquirySheet() { // 提交创建询价单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
const numGroup1 = [] // 空数组,放现有的询价单号
|
||||
searchCreateInquirySheet2().then(response => { // 先查询判断是否存在
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
numGroup1.push(response.data[i].询价单编号)
|
||||
}
|
||||
}).then(() => {
|
||||
if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1) {
|
||||
this.$message.error('该询价单号已存在')
|
||||
} else {
|
||||
createInquirySheet(this.form2.inquirySheetNum, this.form2.supplierValue, '', this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('创建成功')
|
||||
this.inquirySheetNum = ''
|
||||
this.supplierName = ''
|
||||
this.supplierValue = ''
|
||||
this.dialogVisible2 = false
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('表单验证未通过')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteInquirySheet(row) { // 删除询价单
|
||||
this.$confirm('确定删除该询价单?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteInquirySheet(row.询价单流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.inquirySheetNum = ''
|
||||
this.supplierName = ''
|
||||
this.supplierValue = ''
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
editInquirySheet(row) { // 编辑询价单
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.title2 = '编辑询价单'
|
||||
this.form2.inquirySheetNumValue = row.询价单流水号
|
||||
this.form2.inquirySheetNum = row.询价单编号
|
||||
this.form2.supplierValue = row.供应商流水号
|
||||
this.form2.supplierName = row.供应商名称
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitEditInquirySheet() { // 提交编辑询价单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
const numGroup1 = [] // 空数组,放现有的询价单号
|
||||
const numGroup2 = [] // 空数组,放现有的询价单流水号
|
||||
searchCreateInquirySheet2().then(response => { // 先查询判断是否存在
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
numGroup1.push(response.data[i].询价单编号)
|
||||
numGroup2.push(response.data[i].询价单流水号)
|
||||
}
|
||||
}).then(() => {
|
||||
if (numGroup1.indexOf(this.form2.inquirySheetNum) !== -1 && numGroup1.indexOf(this.form2.inquirySheetNum) !== numGroup2.indexOf(parseInt(this.form2.inquirySheetNumValue))) {
|
||||
this.$message.error('该询价单号已存在')
|
||||
} else {
|
||||
editInquirySheet(this.form2.inquirySheetNumValue, this.form2.inquirySheetNum, this.form2.supplierValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.inquirySheetNum = ''
|
||||
this.supplierName = ''
|
||||
this.supplierValue = ''
|
||||
this.dialogVisible2 = false
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('修改失败') }
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('表单验证未通过')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
exportInquirySheet(row) { // 导出询价单
|
||||
alert('do not done')
|
||||
},
|
||||
handleSelectionChange(val) { // 表1多选
|
||||
console.log(val)
|
||||
this.groupPartNum = []
|
||||
this.allNum = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.groupPartNum[i] = val[i].组件零件流水号
|
||||
this.allNum[i] = val[i].零件数量
|
||||
}
|
||||
},
|
||||
addInquirySheet() { // 追加物料
|
||||
const numGroup2 = [] // 空数组,放该询价单中已有的物料
|
||||
if (this.inquirySheetNum === '' || this.inquirySheetNum === null) {
|
||||
this.$message.error('请选择一个询价单')
|
||||
} else {
|
||||
searchSheetDetail(this.inquirySheetFlowNum).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
numGroup2.push(response.data[i].组件零件流水号)
|
||||
}
|
||||
}).then(() => {
|
||||
let x = true // 为了只执行一次的中间变量
|
||||
for (let i = 0; i < this.groupPartNum.length; i++) {
|
||||
if (numGroup2.indexOf(parseInt(this.groupPartNum[i])) !== -1) {
|
||||
if (x) {
|
||||
this.$notify({
|
||||
title: '注意',
|
||||
message: '无法向该询价单中追加重复物料,已自动跳过',
|
||||
type: 'warning'
|
||||
})
|
||||
x = false
|
||||
}
|
||||
} else {
|
||||
addInquirySheet(this.inquirySheetFlowNum, this.groupPartNum[i], this.allNum[i], 0, '').then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
searchSheetDetail(this.inquirySheetFlowNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
outInquirySheet(row) {
|
||||
outInquirySheet(row.询价单流水号, row.组件零件流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
searchSheetDetail(this.inquirySheetFlowNum).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
},
|
||||
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
|
||||
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
|
||||
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
|
||||
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
|
||||
this.registeredCapital ? this.supplierCheck4 = 1 : (this.supplierCheck4 = 0, this.registeredCapital = '')
|
||||
this.taxNum ? this.supplierCheck5 = 1 : (this.supplierCheck5 = 0, this.taxNum = '')
|
||||
this.EMail ? this.supplierCheck6 = 1 : (this.supplierCheck6 = 0, this.EMail = '')
|
||||
this.address ? this.supplierCheck7 = 1 : (this.supplierCheck7 = 0, this.address = '')
|
||||
this.account ? this.supplierCheck8 = 1 : (this.supplierCheck8 = 0, this.account = '')
|
||||
this.openingBank ? this.supplierCheck9 = 1 : (this.supplierCheck9 = 0, this.openingBank = '')
|
||||
this.phone ? this.supplierCheck10 = 1 : (this.supplierCheck10 = 0, this.phone = '')
|
||||
this.fax ? this.supplierCheck11 = 1 : (this.supplierCheck11 = 0, this.fax = '')
|
||||
this.goodTime ? this.supplierCheck12 = 1 : (this.supplierCheck12 = 0, this.goodTime = '')
|
||||
searchSupplier(this.supplierCheck1, this.supplierName, this.supplierCheck2, this.enterpriseNature, this.supplierCheck3, this.createDate, this.supplierCheck4, this.registeredCapital, this.supplierCheck5, this.taxNum, this.supplierCheck6, this.EMail, this.supplierCheck7, this.address, this.supplierCheck8, this.account, this.supplierCheck9, this.openingBank, this.supplierCheck10, this.phone, this.supplierCheck11, this.fax, this.supplierCheck12, this.goodTime).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
},
|
||||
showSupplierDetail(row) {
|
||||
this.form2.supplierValue = row.供应商流水号
|
||||
this.form2.supplierName = row.供应商名称
|
||||
this.supplierValue = row.供应商流水号
|
||||
this.supplierName = row.供应商名称
|
||||
this.enterpriseNature = row.企业性质
|
||||
this.createDate = row.创立日期
|
||||
this.registeredCapital = row.注册资本
|
||||
this.taxNum = row.税号
|
||||
this.EMail = row.电子信箱
|
||||
this.address = row.地址
|
||||
this.account = row.帐号
|
||||
this.openingBank = row.开户行
|
||||
this.phone = row.电话号码
|
||||
this.fax = row.传真
|
||||
this.goodTime = row.货期
|
||||
},
|
||||
emptySupplierDetail() {
|
||||
this.supplierValue = ''
|
||||
this.supplierName = ''
|
||||
this.enterpriseNature = ''
|
||||
this.createDate = ''
|
||||
this.registeredCapital = ''
|
||||
this.taxNum = ''
|
||||
this.EMail = ''
|
||||
this.address = ''
|
||||
this.account = ''
|
||||
this.openingBank = ''
|
||||
this.phone = ''
|
||||
this.fax = ''
|
||||
this.goodTime = ''
|
||||
},
|
||||
submitSelectSupplier() { // 确定选择供应商
|
||||
this.dialogVisible1 = false
|
||||
},
|
||||
searchTable3(row) { // 查询该询价单中的物料
|
||||
this.tableData3 = []
|
||||
this.inquirySheetNum = row.询价单编号
|
||||
this.inquirySheetFlowNum = row.询价单流水号
|
||||
this.supplierValue = row.供应商流水号
|
||||
this.supplierName = row.供应商名称
|
||||
searchSheetDetail(row.询价单流水号).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
materialChange(row) { // 物料变更
|
||||
this.dialogVisible3 = true
|
||||
console.log(row)
|
||||
this.groupPartNumValue = row.组件零件流水号
|
||||
this.standardAndPurchaseValue = row.标准件和外购件流水号
|
||||
this.materialOldValue = row.物料流水号
|
||||
},
|
||||
searchMaterial() {
|
||||
searchAllMaterial(this.materialName0, this.pageCurrent02, this.pageSize02).then(response => {
|
||||
this.tableData02 = response.data.result
|
||||
this.total02 = parseInt(response.data.output[0].ItemCount)
|
||||
})
|
||||
},
|
||||
handleSizeChange02(val) {
|
||||
this.pageSize02 = val
|
||||
this.searchMaterial()
|
||||
},
|
||||
handleCurrentChange02(val) {
|
||||
this.pageCurrent02 = val
|
||||
this.searchMaterial()
|
||||
},
|
||||
selectNewMaterial(row) {
|
||||
this.materialNew = ''
|
||||
this.materialNewValue = row.物料流水号
|
||||
this.materialNew += row.物料名称 + ' ' + row.物料规格 + ' ' + row.物料型号
|
||||
},
|
||||
submitMaterialChange() {
|
||||
materialChange(this.groupPartNumValue, this.standardAndPurchaseValue, this.materialOldValue, this.materialNewValue, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('提交变更申请成功')
|
||||
this.dialogVisible3 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
console.log(this.groupPartNumValue, this.standardAndPurchaseValue, this.materialOldValue, this.materialNewValue)
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (parseInt(row.是否确认) === 0) {
|
||||
return 'MistyRose'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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>
|
||||
<style>
|
||||
.el-table .green {
|
||||
background: lightgreen;
|
||||
}
|
||||
.el-table .white {
|
||||
background: whitesmoke;
|
||||
}
|
||||
.el-table .red {
|
||||
background: Tomato!important;
|
||||
}
|
||||
.el-table .MistyRose {
|
||||
background: MistyRose!important;
|
||||
}
|
||||
.el-table .gray {
|
||||
background: lightgray;
|
||||
}
|
||||
</style>
|
||||
304
src/views/PurchasingCenter/FundApproval1/index.vue
Normal file
304
src/views/PurchasingCenter/FundApproval1/index.vue
Normal file
@@ -0,0 +1,304 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="width: 100%;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="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.规定到货时间.split(' ')[0] }}
|
||||
</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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(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"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<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">
|
||||
<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" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApprovalOffline(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApprovalOffline(scope.row)">不通过</el-button>
|
||||
</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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 财务审核
|
||||
data() {
|
||||
return {
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable1() {
|
||||
initApproval(this.pageCurrent1, this.pageSize1, 1).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()
|
||||
},
|
||||
searchTable2() {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 1).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
},
|
||||
yesApproval(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApproval(row.采购科请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApproval(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApproval(row.采购科请款流水号, 2, value, this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
yesApprovalOffline(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApprovalOffline(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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>
|
||||
303
src/views/PurchasingCenter/FundApproval2/index.vue
Normal file
303
src/views/PurchasingCenter/FundApproval2/index.vue
Normal file
@@ -0,0 +1,303 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="width: 100%;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="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.规定到货时间.split(' ')[0] }}
|
||||
</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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(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"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<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">
|
||||
<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" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApprovalOffline(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApprovalOffline(scope.row)">不通过</el-button>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 管理审批
|
||||
data() {
|
||||
return {
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable1() {
|
||||
initApproval(this.pageCurrent1, this.pageSize1, 2).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()
|
||||
},
|
||||
searchTable2() {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 2).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
},
|
||||
yesApproval(row) { // 通过审批
|
||||
this.$confirm('确定审批通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApproval(row.采购科请款流水号, 1, '通过', this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApproval(row) { // 不通过审批
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApproval(row.采购科请款流水号, 2, value, this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
yesApprovalOffline(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApprovalOffline(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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>
|
||||
304
src/views/PurchasingCenter/FundApproval3/index.vue
Normal file
304
src/views/PurchasingCenter/FundApproval3/index.vue
Normal file
@@ -0,0 +1,304 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="width: 100%;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="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.规定到货时间.split(' ')[0] }}
|
||||
</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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已付金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApproval(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"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<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">
|
||||
<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" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核" align="center" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-right: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesApprovalOffline(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noApprovalOffline(scope.row)">不通过</el-button>
|
||||
</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline } from '@/api/PurchasingCenter/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 出纳付款
|
||||
data() {
|
||||
return {
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable1() {
|
||||
initApproval(this.pageCurrent1, this.pageSize1, 3).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()
|
||||
},
|
||||
searchTable2() {
|
||||
initApprovalOffline(this.pageCurrent2, this.pageSize2, 3).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageSize2 = val
|
||||
this.pageCurrent2 = 1
|
||||
this.searchTable2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable2()
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
},
|
||||
yesApproval(row) { // 通过付款
|
||||
this.$confirm('确定付款通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApproval(row.采购科请款流水号, 1, '通过', this.id, 3).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
// 记录付款金额及时间
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApproval(row) { // 不通过付款
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApproval(row.采购科请款流水号, 2, value, this.id, 3).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
yesApprovalOffline(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 3).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noApprovalOffline(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 3).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable2()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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>
|
||||
224
src/views/PurchasingCenter/InvoiceStateSearch/index.vue
Normal file
224
src/views/PurchasingCenter/InvoiceStateSearch/index.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>采购合同号:</span>
|
||||
<el-select v-model="contractNum" 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>
|
||||
<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="" :data="tableData1" size="mini" style="max-height: 300px" height="300px" stripe border @row-click="searchTable2">
|
||||
<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-column align="center" label="供应商" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同总金额" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.合同总金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="到票总金额" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.到票总金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="到票情况" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-progress :text-inside="true" :stroke-width="18" :percentage="parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))" status="success"/>
|
||||
</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>
|
||||
<el-table v-loading="" :data="tableData2" size="mini" style="max-height: 200px;margin-top: 10px" height="200px" 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="100px">
|
||||
<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.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="传送人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.传送人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="接收人" min-width="80px">
|
||||
<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="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchContractInvoice, searchInvoice, initPerson, initContract } from '@/api/PurchasingCenter/InvoiceStateSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 到票情况查询
|
||||
data() {
|
||||
return {
|
||||
contractNumValue: '',
|
||||
contractNums: [],
|
||||
supplierName: '',
|
||||
invoiceNum: '',
|
||||
invoiceTime: '',
|
||||
transmitValue: '',
|
||||
selectPerson: [], // 传送人接收人
|
||||
recipientValue: '',
|
||||
contractNum: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initContract().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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.selectPerson.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.contractNum ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchContractInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.contractNum, this.check2, this.supplierName).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
searchInvoice(row.采购合同流水号).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
if (response.data[j].开票时间 !== null) {
|
||||
response.data[j].开票时间 = response.data[j].开票时间.substring(0, response.data[j].开票时间.indexOf(' '))
|
||||
}
|
||||
if (response.data[j].开票时间 === '1900/1/1') {
|
||||
response.data[j].开票时间 = ''
|
||||
}
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
</style>
|
||||
1026
src/views/PurchasingCenter/OfflineContract/index.vue
Normal file
1026
src/views/PurchasingCenter/OfflineContract/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
357
src/views/PurchasingCenter/OfflineContractRequestFund/index.vue
Normal file
357
src/views/PurchasingCenter/OfflineContractRequestFund/index.vue
Normal file
@@ -0,0 +1,357 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>请款时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
style="width: 300px"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<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 type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" show-summary>
|
||||
<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="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="100" 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.审批情况内容 }}
|
||||
</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.付款情况内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="离线合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同总额" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</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-popover>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(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"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1000px">
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin: 0 10px 10px 10px"
|
||||
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable01()">查询</el-button>
|
||||
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="50"/>
|
||||
<el-table-column label="离线合同编号" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离线合同名称" align="center" min-width="120">
|
||||
<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="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="100" prop="合同总额" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchRequestFund, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/PurchasingCenter/OfflineContractRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
dateRange: '',
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '上季度',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 30 * 3)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '过去半年',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 366 / 2)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '过去一年',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(end.getTime() - 3600 * 1000 * 24 * 365)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}]
|
||||
},
|
||||
offlineContract: '',
|
||||
supplierName0: '',
|
||||
supplierValue: '',
|
||||
supplier: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
total2: 0,
|
||||
tableData01: [],
|
||||
dialogVisible2: false,
|
||||
SUM: 0,
|
||||
contractGroup: [],
|
||||
sumGroup: [],
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchOfflineContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询请款表
|
||||
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
|
||||
searchRequestFund(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1]).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()
|
||||
},
|
||||
requestFund() { // 请款
|
||||
this.dialogVisible2 = true
|
||||
this.supplierValue = ''
|
||||
this.fetchData() // 重新获取供应商
|
||||
this.tableData01 = []
|
||||
},
|
||||
searchTable01() { // 查询待请款
|
||||
if (this.supplierValue) {
|
||||
this.contractGroup = []
|
||||
searchOfflineContract(this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择供应商')
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.SUM += parseFloat(val[i].合同总额)
|
||||
this.contractGroup.push(val[i].离线合同流水号)
|
||||
this.sumGroup.push(val[i].合同总额)
|
||||
}
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
return parseInt(row.已请款) !== 1 // 已经请款
|
||||
},
|
||||
submitRequestFund() { // 确认请款
|
||||
if (this.supplierValue && this.contractGroup.length !== 0) {
|
||||
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => { // 离线合同流水号组=${contractGroup}&合同总额组=${sumGroup}&供应商流水号=${supplier}&请款金额=${money}&请款人=${person
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('请款成功')
|
||||
this.searchTable1()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('请款失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择需要请款的合同')
|
||||
}
|
||||
},
|
||||
searchTable02(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail(row.离线合同请款流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
},
|
||||
cancelRequestFund(row) { // 取消请款
|
||||
this.$confirm('确定取消请款?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
cancelRequestFund(row.离线合同请款流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('取消成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('取消失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
180
src/views/PurchasingCenter/PayStateSearch/index.vue
Normal file
180
src/views/PurchasingCenter/PayStateSearch/index.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<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="" :data="tableData1" stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
|
||||
<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="120">
|
||||
<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.规定到货时间.split(' ')[0] }}
|
||||
</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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.总金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.欠款金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ Number(scope.row.总金额 - scope.row.欠款金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-progress
|
||||
:text-inside="true"
|
||||
:stroke-width="18"
|
||||
:percentage="parseFloat((100*(scope.row.总金额 - scope.row.欠款金额)/scope.row.总金额).toFixed(2))"
|
||||
status="success"/>
|
||||
</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>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initPayState, searchPayState } from '@/api/PurchasingCenter/PayStateSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 付款情况查询
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
dialogVisible1: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initPayState().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.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchPayState(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()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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>
|
||||
145
src/views/PurchasingCenter/ProjectTotalSearch/index.vue
Normal file
145
src/views/PurchasingCenter/ProjectTotalSearch/index.vue
Normal file
@@ -0,0 +1,145 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
: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="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" show-summary border style="width: 100%;max-height: 500px;" height="500px" size="mini">
|
||||
<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="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="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="100" prop="金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchProjectTotal } from '@/api/PurchasingCenter/ProjectTotalSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.project.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
if (this.projectValue) {
|
||||
searchProjectTotal(this.projectValue).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择项目')
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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
|
||||
}
|
||||
.el-date-editor{
|
||||
width:300px
|
||||
}
|
||||
</style>
|
||||
397
src/views/PurchasingCenter/PurchaseBudgetSearch/index.vue
Normal file
397
src/views/PurchasingCenter/PurchaseBudgetSearch/index.vue
Normal file
@@ -0,0 +1,397 @@
|
||||
<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="~"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="searchTable3()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData3"
|
||||
:summary-method="getSummaries"
|
||||
border
|
||||
show-summary
|
||||
style="width: 100%;max-height: 250px;margin-top: 10px"
|
||||
height="250px"
|
||||
size="mini">
|
||||
<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="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.付款比例.toFixed(1) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款预算(元)" align="center" min-width="100" prop="预付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付金额.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<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=""
|
||||
:data="tableData1"
|
||||
border
|
||||
style="width: 100%;max-height: 250px;"
|
||||
height="250px"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
@row-click="searchTable2">
|
||||
<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">
|
||||
<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.审批时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货日期" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目预验收日期" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目预验收日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目终验收日期" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目终验收日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货日期" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发货日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="货到用户现场日期" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货到用户现场日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="用户现场开通日期" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.用户现场开通日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="日期设置" align="center" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit" @click="editDate(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-table v-loading="" :data="tableData2" border style="width: 100%;max-height: 180px;margin-top: 10px" size="mini">
|
||||
<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="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.付款比例.toFixed(1) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款预算" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付金额.toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="设置日期" center style="min-height: 300px" width="500px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="130px">
|
||||
<el-form-item label="项目预验收日期">
|
||||
<el-date-picker v-model="form1.项目预验收日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目终验收日期">
|
||||
<el-date-picker v-model="form1.项目终验收日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发货日期">
|
||||
<el-date-picker v-model="form1.发货日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="货到用户现场日期">
|
||||
<el-date-picker v-model="form1.货到用户现场日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户现场开通日期">
|
||||
<el-date-picker v-model="form1.用户现场开通日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitEdit">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, searchPayTimeNode, searchPayTimeNodeMoney, editPayTimeNodeOther, searchPurchaseBudget } from '@/api/PurchasingCenter/PurchaseBudgetSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 采购预算查询
|
||||
data() {
|
||||
return {
|
||||
check: 0,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
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])
|
||||
}
|
||||
}]
|
||||
},
|
||||
dateRange: '',
|
||||
tableData1: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
dialogVisible1: false,
|
||||
form1: {
|
||||
采购合同流水号: '',
|
||||
项目预验收日期: '',
|
||||
项目终验收日期: '',
|
||||
发货日期: '',
|
||||
货到用户现场日期: '',
|
||||
用户现场开通日期: ''
|
||||
},
|
||||
tableData3: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
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.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchPayTimeNode(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
searchTable2(row) {
|
||||
searchPayTimeNodeMoney(row.采购合同流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
editDate(row) {
|
||||
this.form1.采购合同流水号 = row.采购合同流水号
|
||||
this.form1.项目预验收日期 = row.项目预验收日期
|
||||
this.form1.项目终验收日期 = row.项目终验收日期
|
||||
this.form1.发货日期 = row.发货日期
|
||||
this.form1.货到用户现场日期 = row.货到用户现场日期
|
||||
this.form1.用户现场开通日期 = row.用户现场开通日期
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
submitEdit() {
|
||||
editPayTimeNodeOther(this.form1.采购合同流水号, this.form1.项目预验收日期, this.form1.项目终验收日期, this.form1.发货日期, this.form1.货到用户现场日期, this.form1.用户现场开通日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('设置成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
this.tableData2 = []
|
||||
} else { this.$message.error('设置失败') }
|
||||
})
|
||||
},
|
||||
searchTable3() {
|
||||
this.dateRange ? this.check = 1 : (this.check = 0, this.dateRange = '')
|
||||
searchPurchaseBudget(this.check, this.dateRange[0], this.dateRange[1]).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 4) {
|
||||
const values = data.map(item => Number(item[column.property]))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0)
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
if (!isNaN(sums[4])) {
|
||||
sums[4] = sums[4].toFixed(2)
|
||||
}
|
||||
return sums
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<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
|
||||
}
|
||||
.el-date-editor{
|
||||
width:300px
|
||||
}
|
||||
</style>
|
||||
374
src/views/PurchasingCenter/PurchaseContractApproval/index.vue
Normal file
374
src/views/PurchasingCenter/PurchaseContractApproval/index.vue
Normal file
@@ -0,0 +1,374 @@
|
||||
<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-select v-model="personValue" placeholder="采购员" clearable size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px"/>
|
||||
<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="loading1"
|
||||
:data="tableData1"
|
||||
size="mini"
|
||||
border
|
||||
style="width: 100%;max-height: 300px;"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="searchTable2">
|
||||
<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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="300">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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">
|
||||
<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 type="primary" size="mini" icon="el-icon-edit-outline" @click="Open(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"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<div style="width:900px;margin-left: 350px">
|
||||
<el-card>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="1" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">运费:</td>
|
||||
<td colspan="1" align="center">{{ freight }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="23"/>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible3" title="审批" center style="min-height: 300px;" width="20%">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="审批是否通过" prop="审批是否通过" center>
|
||||
<el-select v-model="form2.审批是否通过" size="small" @change="selectChange">
|
||||
<el-option
|
||||
v-for="item in approval"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="未通过原因" prop="未通过原因">
|
||||
<el-input v-model="form2.未通过原因" :disabled="disabled" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" @click="submitApproval('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, submitApproval } from '@/api/PurchasingCenter/PurchaseContractApproval'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
person: [],
|
||||
personValue: '',
|
||||
RMB: '',
|
||||
TotalAmount: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
startEndDate: '',
|
||||
contract: '',
|
||||
freight: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
ProcurementContractNum: '',
|
||||
supplier: '',
|
||||
supplierName: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
loading1: false,
|
||||
dialogVisible3: false,
|
||||
returns: [],
|
||||
tableData01: [],
|
||||
submitDisable: true,
|
||||
approval: [
|
||||
{
|
||||
value: 1,
|
||||
label: '是'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '否'
|
||||
}
|
||||
],
|
||||
disabled: true,
|
||||
form2: {
|
||||
审批是否通过: '',
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {},
|
||||
tableData2: [],
|
||||
textarea: ``,
|
||||
contractValue: '' // 显示表2和变更合同用的变量
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initBuyer().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
text: response.data[i].姓名,
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
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.tableData2 = []
|
||||
this.textarea = ``
|
||||
this.loading1 = true
|
||||
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
||||
this.check1 = 0
|
||||
this.startEndDate = ''
|
||||
} else { this.check1 = 1 }
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.personValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
|
||||
this.loading1 = false
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].预到货时间 !== null) {
|
||||
response.data.rows[j].预到货时间 = response.data.rows[j].预到货时间.substring(0, response.data.rows[j].预到货时间.indexOf(' '))
|
||||
}
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
Open(row) {
|
||||
this.dialogVisible3 = true
|
||||
this.ProcurementContractNum = row.采购合同流水号
|
||||
},
|
||||
selectChange() {
|
||||
if (this.form2.审批是否通过 === 2) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
submitApproval(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
submitApproval(this.ProcurementContractNum, this.form2.审批是否通过, this.form2.未通过原因).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('审批成功')
|
||||
this.dialogVisible3 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('审批失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
|
||||
this.RMB = row.总金额_文本
|
||||
this.TotalAmount = row.总金额
|
||||
document.getElementById('23').innerText = this.textarea
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable2(this.contractValue).then(response => {
|
||||
this.returns = response.data
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementById('4')
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.tableData{
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
412
src/views/PurchasingCenter/PurchaseContractSearch/index.vue
Normal file
412
src/views/PurchasingCenter/PurchaseContractSearch/index.vue
Normal file
@@ -0,0 +1,412 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<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="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px"/>
|
||||
<span>审批情况:</span>
|
||||
<el-select v-model="approvalValue" placeholder="审批情况" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in approval"
|
||||
: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="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
:data="tableData1"
|
||||
:row-class-name="tableRowClassName"
|
||||
size="mini"
|
||||
border
|
||||
style="width: 100%;max-height: 300px;"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="searchTable2">
|
||||
<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">
|
||||
<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="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.审批情况内容==='未审批'" type="warning" size="small">未审批</el-tag>
|
||||
<el-tag v-if="scope.row.审批情况内容==='通过审批'" type="success" size="small">通过审批</el-tag>
|
||||
<el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="info" size="small">不通过审批</el-tag>
|
||||
</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>
|
||||
<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>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<div style="float: left">
|
||||
<b>二维码:</b><br>
|
||||
<img id="img">
|
||||
</div>
|
||||
<div style="width:900px;margin-left: 350px">
|
||||
<el-card>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="1" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">运费:</td>
|
||||
<td colspan="1" align="center">{{ freight }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="23"/>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card v-show="searchView">
|
||||
<!--将新一般处理页添加至通讯服务器-->
|
||||
<div>附件图:</div>
|
||||
<img v-if="searchView" :src="searchView">
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseContractSearch'
|
||||
import { searchFile } from '@/api/PurchasingCenter/CreateContract'
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
searchView: '', // 图片预览
|
||||
approval: [{
|
||||
value: 0,
|
||||
label: '全部'
|
||||
}, {
|
||||
value: 1,
|
||||
label: '通过'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '未通过'
|
||||
}, {
|
||||
value: 3,
|
||||
label: '未审批'
|
||||
}],
|
||||
approvalValue: '',
|
||||
RMB: '',
|
||||
TotalAmount: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
startEndDate: '',
|
||||
contract: '',
|
||||
freight: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
ProcurementContractNum: '',
|
||||
personValue: '',
|
||||
person: [],
|
||||
supplier: '',
|
||||
supplierName: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
loading1: false,
|
||||
returns: [],
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
tableData2: [],
|
||||
textarea: ``,
|
||||
contractValue: '' // 显示表2和变更合同用的变量
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
mounted() {
|
||||
this.useqrcode()
|
||||
},
|
||||
methods: {
|
||||
useqrcode() {
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
type: 'image/jpeg',
|
||||
rendererOpts: {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
QRCode.toDataURL('知道这是啥吗你就扫', opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
img.src = url
|
||||
})
|
||||
},
|
||||
searchPic() {
|
||||
// 读取图片时,查找合同流水号,获取其下所有图片id,根据拼接成的路径,查询图片显示出来。
|
||||
searchFile(this.contract).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.length !== 0) {
|
||||
this.searchView = 'http://localhost:8022/Img/' + response.data[0].文件名
|
||||
} else {
|
||||
this.searchView = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initBuyer().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
text: response.data[i].姓名,
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.tableData2 = []
|
||||
this.textarea = ``
|
||||
this.loading1 = true
|
||||
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
||||
this.check1 = 0
|
||||
this.startEndDate = ''
|
||||
} else { this.check1 = 1 }
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.personValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName ? this.check4 = 1 : this.check4 = 0
|
||||
if (this.approvalValue === '' || this.approvalValue === 0) {
|
||||
this.check5 = 0
|
||||
} else {
|
||||
this.check5 = 1
|
||||
}
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.personValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
|
||||
this.loading1 = false
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].操作日期 !== null) {
|
||||
response.data.rows[j].操作日期 = response.data.rows[j].操作日期.substring(0, response.data.rows[j].操作日期.indexOf(' '))
|
||||
}
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
// if (row.审批情况流水号 === '1') {
|
||||
// return 'adopt'
|
||||
// } else if (row.审批情况流水号 === '2') {
|
||||
// return 'NotThrough'
|
||||
// }
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
this.searchPic() // 显示图片
|
||||
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
|
||||
this.RMB = row.总金额_文本
|
||||
this.TotalAmount = row.总金额
|
||||
document.getElementById('23').innerText = this.textarea
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable2(this.contractValue).then(response => {
|
||||
this.returns = response.data
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementById('4')
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px
|
||||
}
|
||||
.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>
|
||||
<style>
|
||||
.tableData{
|
||||
height: 30px;
|
||||
}
|
||||
.el-table .adopt{
|
||||
background: limegreen;
|
||||
}
|
||||
.el-table .NotThrough{
|
||||
background: palevioletred;
|
||||
}
|
||||
</style>
|
||||
169
src/views/PurchasingCenter/PurchaseMaterielModify/index.vue
Normal file
169
src/views/PurchasingCenter/PurchaseMaterielModify/index.vue
Normal file
@@ -0,0 +1,169 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-table :data="tableData1" highlight-current-row height="550" style="width: 100%;" size="mini" border>
|
||||
<el-table-column label="序号" type="index" align="center" width="50"/>
|
||||
<el-table-column label="项目名称" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请人" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原物料" align="center">
|
||||
<el-table-column label="原物料名称" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原物料规格" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原物料型号" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="新物料" align="center">
|
||||
<el-table-column label="新物料名称" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.新物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="新物料规格" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.新物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="新物料型号" align="center" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.新物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否同意修改" width="200px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleEdit1(scope.$index, scope.row)">同意</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-edit"
|
||||
@click="handleEdit2(scope.$index, scope.row)">不同意</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading1"
|
||||
: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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable, edit } from '@/api/PurchasingCenter/PurchaseMaterielModify'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 采购物料修改
|
||||
data() {
|
||||
return {
|
||||
loading1: false,
|
||||
tableData1: [], // 表格数据
|
||||
total1: null, // 总条数
|
||||
pageSize1: 10, // 每页显示条数
|
||||
pageCurrent1: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
searchTable() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
searchTable(this.pageCurrent1, this.pageSize1).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.total === 0) {
|
||||
this.loading1 = false
|
||||
} else {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
handleEdit1(index, row) {
|
||||
edit(row.组件零件流水号, row.标准件和外购件流水号, row.物料变更记录流水号, 1, this.id, row.原物料流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '信息更新成功!'
|
||||
})
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit2(index, row) {
|
||||
edit(row.组件零件流水号, row.标准件和外购件流水号, row.物料变更记录流水号, 2, this.id, row.原物料流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '信息更新成功!'
|
||||
})
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
252
src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue
Normal file
252
src/views/PurchasingCenter/PurchaseTaskAllocate/index.vue
Normal file
@@ -0,0 +1,252 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>物料名称:</span>
|
||||
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
|
||||
<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>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-menu"
|
||||
style="margin-left: 10px"
|
||||
@click="allocateTask">分配</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading=""
|
||||
:data="tableData1"
|
||||
size="mini"
|
||||
style="max-height: 600px"
|
||||
height="600px"
|
||||
border
|
||||
stripe
|
||||
@selection-change="handleSelectionChange1">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection"/>
|
||||
<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="150px">
|
||||
<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-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="80px">
|
||||
<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-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="100px" prop="buyer">
|
||||
<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="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, initBuyer, searchTable1, allocateTask } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 采购任务分配
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
materialName: '',
|
||||
allocateStateValue: 0,
|
||||
allocateState: [
|
||||
{
|
||||
value: 0,
|
||||
label: '全部'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '未分配'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '已分配'
|
||||
}
|
||||
],
|
||||
personValue: '',
|
||||
person: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
tableData1: [],
|
||||
standardAndPurchase: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 20,
|
||||
total1: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() { // 初始化
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.project.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initBuyer().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
text: response.data[i].姓名,
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询
|
||||
this.projectValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.materialName ? this.check2 = 1 : this.check2 = 0
|
||||
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.projectValue, this.check2, this.materialName, this.allocateStateValue).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSelectionChange1(val) { // 多选
|
||||
this.standardAndPurchase = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.standardAndPurchase.push(val[i].标准件和外购件流水号)
|
||||
}
|
||||
},
|
||||
selectable(row) { // 多选禁用
|
||||
return row.人员编号 === '' || row.人员编号 === null
|
||||
},
|
||||
allocateTask() { // 分配任务
|
||||
if (!this.personValue) {
|
||||
this.$message.error('请选择采购员')
|
||||
} else if (this.standardAndPurchase.length === 0) {
|
||||
this.$message.error('请选择需分配的物料')
|
||||
} else {
|
||||
this.$confirm('此操作执行后不可修改,是否确定分配?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
allocateTask(this.standardAndPurchase, this.personValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
filterHandler(value, row) {
|
||||
console.log(row, value)
|
||||
return parseInt(row['人员编号']) === parseInt(value)
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
420
src/views/PurchasingCenter/ReceiptConnectionSheet/index.vue
Normal file
420
src/views/PurchasingCenter/ReceiptConnectionSheet/index.vue
Normal file
@@ -0,0 +1,420 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNum" size="small" clearable/>
|
||||
<!--<span>开票时间:</span>-->
|
||||
<!--<el-date-picker v-model="invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>-->
|
||||
<span>采购合同号:</span>
|
||||
<el-select v-model="contractNum" 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>
|
||||
<span>传送人:</span>
|
||||
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>接收人:</span>
|
||||
<el-select v-model="recipientValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
: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="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
style="margin-left: 10px"
|
||||
@click="addTable1()">增加</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left: 10px"
|
||||
>导出</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 400px" height="400px" 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="100px">
|
||||
<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.开票金额 }}
|
||||
</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-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="200px">
|
||||
<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.总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="传送人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.传送人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="接收人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="editTable1(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click="deleteTable1(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"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="25%">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px">
|
||||
<el-form-item label="采购合同号" prop="contractNum">
|
||||
<el-select v-model="form1.contractNum" 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-form-item>
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form1.invoiceNum" size="small"/>
|
||||
</el-form-item>
|
||||
<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-form-item label="开票金额" prop="money">
|
||||
<el-input v-model="form1.money" size="small" placeholder="开票金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="传送人" prop="sendPerson">
|
||||
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收人" prop="receivePerson">
|
||||
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form1.remark" size="small"/>
|
||||
</el-form-item>
|
||||
</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="submitAdd1('form1')">确定</el-button>
|
||||
<el-button v-show="title1==='编辑'" size="small" type="primary" @click="submitEdit1('form1')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initPerson, initContract } from '@/api/PurchasingCenter/ReceiptConnectionSheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 发票交接单
|
||||
data() {
|
||||
return {
|
||||
contractNumValue: '',
|
||||
contractNums: [],
|
||||
invoiceNum: '',
|
||||
invoiceTime: '',
|
||||
transmitValue: '',
|
||||
selectPerson: [], // 传送人接收人
|
||||
recipientValue: '',
|
||||
contractNum: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
dialogVisible1: false,
|
||||
title1: '',
|
||||
form1: {
|
||||
contractNum: '',
|
||||
invoiceNum: '',
|
||||
invoiceNumValue: '',
|
||||
invoiceTime: '',
|
||||
money: '',
|
||||
sendPersonValue: '',
|
||||
receivePersonValue: '',
|
||||
remark: ''
|
||||
},
|
||||
rules1: {
|
||||
contractNum: [
|
||||
{ required: true, message: '请选择合同号', trigger: 'change' }
|
||||
],
|
||||
invoiceNum: [
|
||||
{ required: true, message: '请输入发票号', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initContract().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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.selectPerson.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
|
||||
this.invoiceTime ? this.check2 = 1 : this.check2 = 0
|
||||
this.transmitValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.recipientValue ? this.check4 = 1 : this.check4 = 0
|
||||
this.contractNum ? this.check5 = 1 : this.check5 = 0
|
||||
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.invoiceNum, this.check2, this.invoiceTime, this.check3, this.transmitValue, this.check4, this.recipientValue, this.check5, this.contractNum).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].开票时间 !== null) {
|
||||
response.data.rows[j].开票时间 = response.data.rows[j].开票时间.substring(0, response.data.rows[j].开票时间.indexOf(' '))
|
||||
}
|
||||
if (response.data.rows[j].开票时间 === '1900/1/1') {
|
||||
response.data.rows[j].开票时间 = ''
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
addTable1() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '增加'
|
||||
this.dialogVisible1 = true
|
||||
this.form1.contractNum = ''
|
||||
this.form1.invoiceNum = ''
|
||||
this.form1.invoiceTime = ''
|
||||
this.form1.money = ''
|
||||
this.form1.sendPersonValue = Number(this.id)
|
||||
this.form1.receivePersonValue = ''
|
||||
this.form1.remark = ''
|
||||
},
|
||||
submitAdd1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
const myDate = new Date()
|
||||
const year = myDate.getFullYear()
|
||||
const month = myDate.getMonth() + 1
|
||||
const date = myDate.getDate()
|
||||
const nowDate = year + '-' + month + '-' + date
|
||||
addInvoice(this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark, nowDate).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.result[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
editTable1(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
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.form1.money = row.开票金额
|
||||
this.form1.sendPersonValue = parseInt(row.传送人)
|
||||
this.form1.receivePersonValue = parseInt(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 = ''
|
||||
}
|
||||
},
|
||||
submitEdit1(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)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteTable1(row) {
|
||||
console.log(row)
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteInvoice(row.发票流水号).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
</style>
|
||||
130
src/views/PurchasingCenter/ReceiveCheck/index.vue
Normal file
130
src/views/PurchasingCenter/ReceiveCheck/index.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称:</span>
|
||||
<el-select v-model="projectValue" style="width:200px" placeholder="请选择" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in project"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="searchProject()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin-top: 15px">
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
style="width: 100%"
|
||||
height="440"
|
||||
size="mini"
|
||||
show-summary
|
||||
highlight-current-row
|
||||
border>
|
||||
<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.物料规格 }}
|
||||
</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.单价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="小计(元)" prop="小计">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.小计 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
: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 { initProject, searchReceiveCheck } from '@/api/PurchasingCenter/ReceiveCheck'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectValue: '', // 项目名称
|
||||
project: [],
|
||||
tableData1: [],
|
||||
check1: '',
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
form: {
|
||||
项目名称: '',
|
||||
物料名称: '',
|
||||
物料规格: '',
|
||||
物料型号: '',
|
||||
数量: '',
|
||||
单价: '',
|
||||
小计: ''
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
},
|
||||
searchProject() { // 查询
|
||||
if (!this.projectValue) {
|
||||
this.$message.error('请选择项目')
|
||||
} else {
|
||||
searchReceiveCheck(this.pageCurrent, this.pageSize, 1, this.projectValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchProject()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchProject()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
675
src/views/PurchasingCenter/SupplierManagement/index.vue
Normal file
675
src/views/PurchasingCenter/SupplierManagement/index.vue
Normal file
@@ -0,0 +1,675 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-form ref="form1" :model="form1" label-position="right" label-width="110px" class="searchForm">
|
||||
<el-row>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="供应商名称">
|
||||
<el-input v-model="supplierName" placeholder="供应商名称" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="企业性质">
|
||||
<el-input v-model="businessNature" placeholder="企业性质" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="创立日期">
|
||||
<el-date-picker v-model="creationDate" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="注册资本">
|
||||
<el-input v-model="registeredCapital" placeholder="注册资本" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="税号">
|
||||
<el-input v-model="taxNumber" placeholder="税号" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="电子信箱">
|
||||
<el-input v-model="email" placeholder="电子信箱" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="电话号码">
|
||||
<el-input v-model="telephone" placeholder="电话号码" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="开户行">
|
||||
<el-input v-model="bank" placeholder="开户行" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="帐号">
|
||||
<el-input v-model="account" placeholder="帐号" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="地址">
|
||||
<el-input v-model="address" placeholder="地址" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px">
|
||||
<el-form-item label="传真">
|
||||
<el-input v-model="fax" placeholder="传真" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 350px">
|
||||
<el-form-item label="货期">
|
||||
<el-input v-model="deliveryPeriod" placeholder="货期" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col style="width: 300px;margin-top:2px">
|
||||
<el-button type="success" size="small" icon="el-icon-search" @click="pageCurrent = 1;fetchData()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">增加</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<div style="display: inline-block;margin-bottom: 20px">供应商列表</div>
|
||||
<el-table :data="List" highlight-current-row border style="width: 100%;max-height: 400px;" height="400" size="mini" @row-click="rowClick">
|
||||
<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="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开户行 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="帐号" align="center" width="170">
|
||||
<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="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话号码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="电子信箱" align="center" min-width="120">
|
||||
<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" 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="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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.货期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" 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]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div style="display: inline-block;margin-bottom: 20px;width:90%">供应商联系人列表</div>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-bottom:10px;float:right" @click="handleAdd2()">增加</el-button>
|
||||
<el-table :data="List1" border size="mini">
|
||||
<el-table-column label="姓名" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="职务" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.职务 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="电话" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.手机 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="传真" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.传真 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit" style="margin-left:10px" @click="handleEdit2(scope.row)">编辑</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete2(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名称" prop="供应商名称">
|
||||
<el-input
|
||||
v-model="form.供应商名称"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="企业性质" prop="企业性质">
|
||||
<el-input
|
||||
v-model="form.企业性质"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="创立日期" prop="创立日期">
|
||||
<el-date-picker
|
||||
v-model="form.创立日期"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="注册资本" prop="注册资本">
|
||||
<el-input
|
||||
v-model="form.注册资本"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税号" prop="税号">
|
||||
<el-input
|
||||
v-model="form.税号"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开户行" prop="开户行">
|
||||
<el-input
|
||||
v-model="form.开户行"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="帐号" prop="帐号">
|
||||
<el-input
|
||||
v-model="form.帐号"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电子信箱" prop="电子信箱">
|
||||
<el-input
|
||||
v-model="form.电子信箱"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="地址">
|
||||
<el-input
|
||||
v-model="form.地址"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话号码" prop="电话号码">
|
||||
<el-input
|
||||
v-model="form.电话号码"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="传真" prop="传真">
|
||||
<el-input
|
||||
v-model="form.传真"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="货期" prop="货期">
|
||||
<el-input
|
||||
v-model="form.货期"
|
||||
size="small"
|
||||
style="width: 200px;"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title2" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="80px" class="demo-ruleForm">
|
||||
<el-form-item label="姓名" prop="姓名">
|
||||
<el-input v-model="form2.姓名" size="small" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="职务" prop="职务">
|
||||
<el-input v-model="form2.职务" size="small" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="电话">
|
||||
<el-input v-model="form2.电话" size="small" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机" prop="手机">
|
||||
<el-input v-model="form2.手机" size="small" clearable/>
|
||||
</el-form-item>
|
||||
<el-form-item label="传真" prop="传真">
|
||||
<el-input v-model="form2.传真" size="small" clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button v-show="title2==='增加'" type="primary" @click="submitAdd2('form2')">确定</el-button>
|
||||
<el-button v-show="title2==='编辑'" type="primary" @click="submitEdit2('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchData, addTable, editTable, deleteData, getName, addPerson, editPerson, deletePerson } from '@/api/PurchasingCenter/SupplierManagement'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form1: {},
|
||||
supplierName: '',
|
||||
businessNature: '',
|
||||
creationDate: '',
|
||||
registeredCapital: '',
|
||||
taxNumber: '',
|
||||
email: '',
|
||||
address: '',
|
||||
account: '',
|
||||
bank: '',
|
||||
telephone: '',
|
||||
fax: '',
|
||||
deliveryPeriod: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
check6: 0,
|
||||
check7: 0,
|
||||
check8: 0,
|
||||
check9: 0,
|
||||
check10: 0,
|
||||
check11: 0,
|
||||
check12: 0,
|
||||
List: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
title: '',
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
供应商名称: '',
|
||||
企业性质: '',
|
||||
创立日期: '',
|
||||
注册资本: '',
|
||||
税号: '',
|
||||
开户行: '',
|
||||
帐号: '',
|
||||
电子信箱: '',
|
||||
地址: '',
|
||||
电话号码: '',
|
||||
传真: '',
|
||||
货期: ''
|
||||
},
|
||||
rules: {
|
||||
供应商名称: [{ required: true, message: '请填写供应商名称', change: 'blur' }]
|
||||
},
|
||||
supplierSerialNumber: '',
|
||||
List1: [],
|
||||
dialogFormVisible2: false,
|
||||
title2: '',
|
||||
form2: {
|
||||
姓名: '',
|
||||
职务: '',
|
||||
电话: '',
|
||||
手机: '',
|
||||
传真: '',
|
||||
供应商流水号: '',
|
||||
供应商联系人流水号: ''
|
||||
},
|
||||
rules2: {
|
||||
姓名: [{ required: true, message: '请填写联系人姓名', change: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.List1 = []
|
||||
this.supplierName ? this.check1 = 1 : this.check1 = 0
|
||||
this.businessNature ? this.check2 = 1 : this.check2 = 0
|
||||
this.creationDate ? this.check3 = 1 : this.check3 = 0
|
||||
this.registeredCapital ? this.check4 = 1 : this.check4 = 0
|
||||
this.taxNumber ? this.check5 = 1 : this.check5 = 0
|
||||
this.bank ? this.check6 = 1 : this.check6 = 0
|
||||
this.account ? this.check7 = 1 : this.check7 = 0
|
||||
this.email ? this.check8 = 1 : this.check8 = 0
|
||||
this.address ? this.check9 = 1 : this.check9 = 0
|
||||
this.telephone ? this.check10 = 1 : this.check10 = 0
|
||||
this.fax ? this.check11 = 1 : this.check11 = 0
|
||||
this.deliveryPeriod ? this.check12 = 1 : this.check12 = 0
|
||||
searchData(this.check1, this.supplierName, this.check2, this.businessNature, this.check3, this.creationDate, this.check4, this.registeredCapital, this.check5, this.taxNumber, this.check6, this.bank, this.check7, this.account, this.check8, this.email, this.check9, this.address, this.check10, this.telephone, this.check11, this.fax, this.check12, this.deliveryPeriod, this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].创立日期 !== null) {
|
||||
response.data.rows[j].创立日期 = response.data.rows[j].创立日期.substring(0, response.data.rows[j].创立日期.indexOf(' '))
|
||||
}
|
||||
}
|
||||
this.List = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.title = '增加'
|
||||
this.form.供应商名称 = ''
|
||||
this.form.企业性质 = ''
|
||||
this.form.创立日期 = ''
|
||||
this.form.注册资本 = ''
|
||||
this.form.税号 = ''
|
||||
this.form.开户行 = ''
|
||||
this.form.帐号 = ''
|
||||
this.form.电子信箱 = ''
|
||||
this.form.地址 = ''
|
||||
this.form.电话号码 = ''
|
||||
this.form.传真 = ''
|
||||
this.form.货期 = ''
|
||||
this.supplierSerialNumber = ''
|
||||
},
|
||||
submitAdd(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addTable(this.form.供应商名称, this.form.企业性质, this.form.创立日期, this.form.注册资本, this.form.税号, this.form.开户行, this.form.帐号, this.form.电子信箱, this.form.地址, this.form.电话号码, this.form.传真, this.form.货期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = 10
|
||||
this.fetchData()
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
console.log(row)
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible = true
|
||||
this.title = '编辑'
|
||||
this.form.供应商名称 = row.供应商名称
|
||||
this.form.企业性质 = row.企业性质
|
||||
this.form.创立日期 = row.创立日期
|
||||
this.form.注册资本 = row.注册资本
|
||||
this.form.税号 = row.税号
|
||||
this.form.开户行 = row.开户行
|
||||
this.form.帐号 = row.帐号
|
||||
this.form.电子信箱 = row.电子信箱
|
||||
this.form.地址 = row.地址
|
||||
this.form.电话号码 = row.电话号码
|
||||
this.form.传真 = row.传真
|
||||
this.form.货期 = row.货期
|
||||
this.supplierSerialNumber = row.供应商流水号
|
||||
},
|
||||
submitEdit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editTable(this.form.供应商名称, this.form.企业性质, this.form.创立日期, this.form.注册资本, this.form.税号, this.form.开户行, this.form.帐号, this.form.电子信箱, this.form.地址, this.supplierSerialNumber, this.form.传真, this.form.货期, this.form.电话号码).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible = false
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = 10
|
||||
this.fetchData()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
cancel() { // 取消
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteData(row.供应商流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = 10
|
||||
this.fetchData()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.fetchData()
|
||||
},
|
||||
rowClick(row) {
|
||||
this.List1 = []
|
||||
this.form2.供应商流水号 = row.供应商流水号
|
||||
getName(this.form2.供应商流水号).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
},
|
||||
handleAdd2() {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.title2 = '增加'
|
||||
this.form2.姓名 = ''
|
||||
this.form2.职务 = ''
|
||||
this.form2.电话 = ''
|
||||
this.form2.手机 = ''
|
||||
this.form2.传真 = ''
|
||||
},
|
||||
submitAdd2(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
addPerson(this.form2.姓名, this.form2.职务, this.form2.电话, this.form2.手机, this.form2.传真, this.form2.供应商流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible2 = false
|
||||
getName(this.form2.供应商流水号).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit2(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogFormVisible2 = true
|
||||
this.title2 = '编辑'
|
||||
this.form2.姓名 = row.姓名
|
||||
this.form2.职务 = row.职务
|
||||
this.form2.电话 = row.电话
|
||||
this.form2.手机 = row.手机
|
||||
this.form2.传真 = row.传真
|
||||
this.form2.供应商联系人流水号 = row.供应商联系人流水号
|
||||
},
|
||||
submitEdit2(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editPerson(this.form2.姓名, this.form2.职务, this.form2.电话, this.form2.手机, this.form2.传真, this.form2.供应商联系人流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogFormVisible2 = false
|
||||
getName(this.form2.供应商流水号).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete2(row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deletePerson(row.供应商联系人流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
getName(this.form2.供应商流水号).then(response => {
|
||||
this.List1 = response.data
|
||||
})
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -34,6 +34,7 @@
|
||||
/* eslint-disable */
|
||||
import UploadExcelComponent from './UploadExcel/index.vue'
|
||||
import specificationData from './specificationData'
|
||||
import { sleep } from '../../../utils/tool'
|
||||
import { initProject, isExit, importBasics, importPurcharse, searchMachine, searchGroupNum } from '../../../api/TechnologyCenter/ImportParts'
|
||||
|
||||
export default {
|
||||
@@ -144,47 +145,49 @@ export default {
|
||||
manufacturer,
|
||||
remarks,
|
||||
classificationCode
|
||||
// const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
|
||||
// const res = response.data
|
||||
// if (res[j].Column1 !== 0) {
|
||||
// this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
|
||||
// } else {
|
||||
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
|
||||
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
|
||||
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
|
||||
this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = ''
|
||||
this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = ''
|
||||
this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = ''
|
||||
this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = ''
|
||||
this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = ''
|
||||
this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = ''
|
||||
this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = ''
|
||||
this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = ''
|
||||
this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = ''
|
||||
const len = parseInt(this.worksheet[j]['!ref'].split(':')[1].substring(1)) - 3
|
||||
for (let i = 0; i < len; i++) {
|
||||
const attr = i + 4
|
||||
drawingNum = this.worksheet[j][`B${attr}`] ? this.worksheet[j][`B${attr}`].v : ''
|
||||
name = this.worksheet[j][`D${attr}`] ? this.worksheet[j][`D${attr}`].v : ''
|
||||
type = this.worksheet[j][`F${attr}`] ? this.worksheet[j][`F${attr}`].v : ''
|
||||
material = this.worksheet[j][`J${attr}`] ? this.worksheet[j][`J${attr}`].v : ''
|
||||
spareNum = this.worksheet[j][`L${attr}`] ? this.worksheet[j][`L${attr}`].v : ''
|
||||
useNum = this.worksheet[j][`M${attr}`] ? this.worksheet[j][`M${attr}`].v : ''
|
||||
manufacturer = this.worksheet[j][`O${attr}`] ? this.worksheet[j][`O${attr}`].v : ''
|
||||
remarks = this.worksheet[j][`Q${attr}`] ? this.worksheet[j][`Q${attr}`].v : ''
|
||||
classificationCode = this.worksheet[j][`R${attr}`] ? this.worksheet[j][`R${attr}`].v : ''
|
||||
if (!drawingNum && !name && !type && !material && !spareNum && !useNum && !manufacturer && !remarks && !classificationCode) { // 当图号、名称、规格、材料、备件数量、装机数量、制造商、备注、分类码都为空时,循环终止,防止向数据库中插入多余且无用的数据
|
||||
break
|
||||
} else {
|
||||
if (machineNum && groupNum) {
|
||||
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
} else {
|
||||
const response = await isExit(this.projectValue, this.worksheet[j].F2.v)
|
||||
const res = response.data
|
||||
if (res[0].Column1 === 0) {
|
||||
this.$notify.error(`${this.worksheet[j].F2.v}机床不存在,请确认文件是否正确`)
|
||||
this.loading = false
|
||||
this.$notify.error(`请确认导入文件是否正确`)
|
||||
return
|
||||
}
|
||||
} else {
|
||||
this.worksheet[j].G1 ? establishment = this.worksheet[j].G1.v : establishment = ''
|
||||
this.worksheet[j].I1 ? proofread = this.worksheet[j].I1.v : proofread = ''
|
||||
this.worksheet[j].L1 ? review = this.worksheet[j].L1.v : review = ''
|
||||
this.worksheet[j].P1 ? date = this.worksheet[j].P1.v : date = ''
|
||||
this.worksheet[j].Q1 ? pageNum = parseInt(this.worksheet[j].Q1.v.replace(/[^0-9]/ig, '')) : pageNum = ''
|
||||
this.worksheet[j].C2 ? machineName = this.worksheet[j].C2.v : machineName = ''
|
||||
this.worksheet[j].F2 ? machineNum = this.worksheet[j].F2.v : machineNum = ''
|
||||
this.worksheet[j].J2 ? componentName = this.worksheet[j].J2.v : componentName = ''
|
||||
this.worksheet[j].P2 ? componentNum = this.worksheet[j].P2.v : componentNum = ''
|
||||
this.worksheet[j].Q2 ? totalNum = parseInt(this.worksheet[j].Q2.v.replace(/[^0-9]/ig, '')) : totalNum = ''
|
||||
this.worksheet[j].R2 ? contractNum = this.worksheet[j].R2.v : contractNum = ''
|
||||
this.worksheet[j].M2 ? groupNum = this.worksheet[j].M2.v : groupNum = ''
|
||||
const len = parseInt(this.worksheet[j]['!ref'].split(':')[1].substring(1)) - 3
|
||||
for (let i = 0; i < len; i++) {
|
||||
const attr = i + 4
|
||||
drawingNum = this.worksheet[j][`B${attr}`] ? this.worksheet[j][`B${attr}`].v : ''
|
||||
name = this.worksheet[j][`D${attr}`] ? this.worksheet[j][`D${attr}`].v : ''
|
||||
type = this.worksheet[j][`F${attr}`] ? this.worksheet[j][`F${attr}`].v : ''
|
||||
material = this.worksheet[j][`J${attr}`] ? this.worksheet[j][`J${attr}`].v : ''
|
||||
spareNum = this.worksheet[j][`L${attr}`] ? this.worksheet[j][`L${attr}`].v : ''
|
||||
useNum = this.worksheet[j][`M${attr}`] ? this.worksheet[j][`M${attr}`].v : ''
|
||||
manufacturer = this.worksheet[j][`O${attr}`] ? this.worksheet[j][`O${attr}`].v : ''
|
||||
remarks = this.worksheet[j][`Q${attr}`] ? this.worksheet[j][`Q${attr}`].v : ''
|
||||
classificationCode = this.worksheet[j][`R${attr}`] ? this.worksheet[j][`R${attr}`].v : ''
|
||||
if (!drawingNum && !name && !type && !material && !spareNum && !useNum && !manufacturer && !remarks && !classificationCode) { // 当图号、名称、规格、材料、备件数量、装机数量、制造商、备注、分类码都为空时,循环终止,防止向数据库中插入多余且无用的数据
|
||||
break
|
||||
} else {
|
||||
if (machineNum && groupNum) {
|
||||
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$notify.error(`请确认导入文件是否正确`)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
this.itemFile.splice(j, 1)
|
||||
this.worksheet.splice(j, 1)
|
||||
@@ -201,12 +204,14 @@ export default {
|
||||
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
|
||||
try {
|
||||
if (groupNum.indexOf('MX') > -1) {
|
||||
await sleep(10)
|
||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
} else {
|
||||
await sleep(10)
|
||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, groupNum, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
if (res[0].result === '0') {
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { sleep } from '../../../utils/tool'
|
||||
import { unSpecificationQuery, unSpecificationQueryWB, specificationQueryWB, specificationQuery, deleteBasicParts, deleteBWParts, getMaterial, getMaterialWB, searchMaterialWB, updateRow, updateRowWB, transferMX, transferWG } from '../../../api/TechnologyCenter/ImportParts'
|
||||
export default {
|
||||
name: 'SpecificationData',
|
||||
@@ -479,13 +480,15 @@ export default {
|
||||
},
|
||||
async transferData() {
|
||||
try {
|
||||
this.err = 0
|
||||
if (this.groupValue) {
|
||||
this.listLoading = true
|
||||
if (this.groupValue.indexOf('MX') > -1) {
|
||||
for (let i = 0; i < this.tableDataAll.length; i++) {
|
||||
const data = this.tableDataAll[i]
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, data.数据类型, data.是否传递, data.序号, data.id)
|
||||
const resp = await transferMX(data.图号或者型号, data.名称, total, data.备注, data.标记, data.设计者编号, data.组件流水号, data.材料流水号, 1, data.是否传递, data.序号, data.id)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
this.err++
|
||||
}
|
||||
@@ -496,11 +499,12 @@ export default {
|
||||
const data = this.tableDataAll[i]
|
||||
const total = parseInt(data.备件数量) + parseInt(data.装机数量) * parseInt(data.部件数量)
|
||||
if (this.groupValue.indexOf('WG') > -1) {
|
||||
dataType = 1
|
||||
} else {
|
||||
dataType = 2
|
||||
} else {
|
||||
dataType = 1
|
||||
}
|
||||
const resp = await transferWG(data.组件流水号, data.物料流水号, total, data.备注, data.标记, data.设计者编号, data.是否传递, dataType, data.序号, data.id)
|
||||
await sleep(10)
|
||||
if (resp.data[0].result === '0') {
|
||||
this.err++
|
||||
this.$notify.error(`传递零件失败`)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="dashboard-container">
|
||||
<div class="dashboard-text">name:{{ name }}</div>
|
||||
<div class="dashboard-text">roles:<span v-for="role in roles" :key="role">{{ role }}</span></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -12,8 +11,7 @@ export default {
|
||||
name: 'Dashboard',
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'name',
|
||||
'roles'
|
||||
'name'
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user