This commit is contained in:
lixin
2018-12-24 20:09:30 +08:00
11 changed files with 70 additions and 67 deletions

View File

@@ -406,18 +406,29 @@ export default {
}
},
allDelete() {
if (this.projectName !== '' && this.machineValue !== '' && this.groupValue !== '') {
allDelete(this.projectName, this.machineValue, this.groupValue).then(response => {
if (response.data[0].result === '1') {
this.tableData = []
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.projectName !== '' && this.machineValue !== '' && this.groupValue !== '') {
allDelete(this.projectName, this.machineValue, this.groupValue).then(response => {
if (response.data[0].result === '1') {
this.tableData = []
this.$message.success('删除成功')
} else {
this.$message.error('删除失败')
}
})
} else {
this.$message.warning('请选择好项目机床分组')
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
} else {
this.$message.warning('请选择好项目机床分组')
}
})
},
getGroups() {
this.$emit('machineChange', this.machineValue)

View File

@@ -3,18 +3,8 @@
<div style="width: 48%; float: left;margin-left: 20px">
<el-card>
<el-row>
<span>时间段:</span>
<el-date-picker
v-model="startEndDate"
style="width:240px"
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" style="width:180px" filterable clearable>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:150px" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
@@ -26,10 +16,8 @@
</el-select>
<span>采购员:</span>
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=0"/>
</el-row>
<el-row style="margin-top: 10px">
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-input v-model="supplierName" placeholder="供应商" size="small" style="width:120px" clearable/>
<el-button
type="success"
size="small"
@@ -37,7 +25,7 @@
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询现有合同</el-button>
</el-row>
<el-card>
<el-card style="margin-top: 20px">
<el-table v-loading="loading1" :data="tableData1" border style="width: 100%;max-height: 400px;" height="200px" highlight-current-row size="mini" @row-click="searchTable2">
<el-table-column label="采购合同号" align="center">
<template slot-scope="scope">
@@ -54,6 +42,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="总金额" align="center">
<template slot-scope="scope">
{{ scope.row.总金额 }}
@@ -218,18 +211,8 @@
<div style="width: 48%; float: right; margin-right: 20px">
<el-card>
<el-row>
<span>时间段:</span>
<el-date-picker
v-model="startEndDate1"
style="width:240px"
size="small"
type="daterange"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span>合同号:</span>
<el-select v-model="contractNumValue1" placeholder="合同号" size="small" style="width:180px" filterable clearable>
<el-select v-model="contractNumValue1" placeholder="合同号" size="small" style="width:150px" filterable clearable>
<el-option
v-for="item in contractNum1"
:key="item.value"
@@ -241,10 +224,8 @@
</el-select>
<span>采购员:</span>
<el-input v-model="buyerName1" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
</el-row>
<el-row style="margin-top: 10px">
<span>供应商:</span>
<el-input v-model="supplierName1" placeholder="供应商" size="small" clearable/>
<el-input v-model="supplierName1" placeholder="供应商" size="small" style="width:120px" clearable/>
<el-button
type="success"
size="small"
@@ -252,14 +233,14 @@
style="margin-left:10px"
@click="total2=0;pageCurrent2=1;pageSize2=10;searchTable3()">查询变更记录</el-button>
</el-row>
<el-card>
<el-card style="margin-top: 20px">
<el-table v-loading="loading2" :data="tableData2" border style="width: 100%;max-height: 400px" height="200px" highlight-current-row size="mini" @row-click="searchTable4">
<el-table-column label="采购合同号" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" align="center">
<el-table-column label="规定到货时间" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
</template>
@@ -269,6 +250,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="总金额" align="center">
<template slot-scope="scope">
{{ scope.row.总金额 }}
@@ -498,13 +484,10 @@ export default {
TotalAmount1: '',
TotalAmount3: '',
TotalAmount4: '',
check1: 0,
check2: 0,
check3: 0,
check4: 0,
check5: 0,
startEndDate: '',
startEndDate1: '',
contract: '',
contract1: '',
taxRate: '',
@@ -516,6 +499,10 @@ export default {
ProcurementContractNum: '',
buyer: 0,
Supplier: 0,
Name: '',
Name1: '',
Value: '',
Value1: '',
buyerName: '',
buyerValue: '',
buyerName1: '',
@@ -593,23 +580,26 @@ export default {
clickBuyer(row) { // 点击采购员表某一行
this.submitDisable = false
if (this.buyer === 0) {
this.buyerName = row.姓名
this.buyerValue = row.人员编号
this.Name = row.姓名
this.Value = row.人员编号
} else if (this.buyer === 1) {
this.buyerName1 = row.姓名
this.buyerValue1 = row.人员编号
this.Name1 = row.姓名
this.Value1 = row.人员编号
}
},
submitSelectBuyer() { // 确定
this.dialogVisible2 = false
if (this.buyer === 0) {
this.buyerName = this.Name
this.buyerValue = this.Value
} else if (this.buyer === 1) {
this.buyerName1 = this.Name1
this.buyerValue1 = this.Value1
}
},
searchTable1() {
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.buyerName ? this.check3 = 1 : this.check3 = 0
this.supplierName ? this.check4 = 1 : this.check4 = 0
@@ -618,7 +608,7 @@ export default {
} else {
this.check5 = 1
}
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
searchTable1(this.pageCurrent1, this.pageSize1, this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName, this.check5, this.approvalValue).then(response => {
this.loading1 = false
console.log(response.data.rows)
for (let j = 0; j < response.data.rows.length; j++) {
@@ -633,14 +623,10 @@ export default {
searchTable3() {
this.textarea1 = ``
this.loading2 = true
if (this.startEndDate1 === '' || this.startEndDate1 === null || this.startEndDate1[0] === '' || this.startEndDate1[1] === '') {
this.check1 = 0
this.startEndDate1 = ''
} else { this.check1 = 1 }
this.contractNumValue1 ? this.check2 = 1 : this.check2 = 0
this.buyerName1 ? this.check3 = 1 : this.check3 = 0
this.supplierName1 ? this.check4 = 1 : this.check4 = 0
searchTable3(this.pageCurrent2, this.pageSize2, this.check1, this.startEndDate1[0], this.startEndDate1[1], this.check2, this.contractNumValue1, this.check3, this.buyerValue1, this.check4, this.supplierName1).then(response => {
searchTable3(this.pageCurrent2, this.pageSize2, this.check2, this.contractNumValue1, this.check3, this.buyerValue1, this.check4, this.supplierName1).then(response => {
this.loading2 = false
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].规定到货时间 !== null) {