Merge branch 'master' of http://192.168.0.112:10010/r/高精2.0
This commit is contained in:
@@ -47,3 +47,15 @@ export function searchTable2(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 删除采购合同
|
||||||
|
export function deleteContract(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '采购管理_采购合同_删除_采购部采购',
|
||||||
|
param: '采购合同流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -422,7 +422,7 @@
|
|||||||
<div id="offlineContract" style="width: 800px;margin: 0 auto;display: none">
|
<div id="offlineContract" style="width: 800px;margin: 0 auto;display: none">
|
||||||
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
|
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="14"><h4>离线合同</h4></th>
|
<th colspan="14"><h1>离线合同</h1></th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
|
<td colspan="3" rowspan="2" style="text-align:center;font-size: 30px;font-weight: bold">GAOJING</td>
|
||||||
|
|||||||
@@ -22,6 +22,8 @@
|
|||||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<span>供应商:</span>
|
||||||
|
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px"/>
|
||||||
<span>采购员:</span>
|
<span>采购员:</span>
|
||||||
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
|
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -30,10 +32,8 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<span>供应商:</span>
|
|
||||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px"/>
|
|
||||||
<span>审批情况:</span>
|
<span>审批情况:</span>
|
||||||
<el-select v-model="approvalValue" placeholder="审批情况" size="small" clearable>
|
<el-select v-model="approvalValue" placeholder="审批情况" size="small" style="width: 100px">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in approval"
|
v-for="item in approval"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -94,11 +94,11 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审批情况" align="center" min-width="100">
|
<el-table-column label="审批情况" align="center" min-width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.审批情况内容==='未审批'" type="warning" size="small">未审批</el-tag>
|
<el-tag v-if="scope.row.审批情况内容==='未审批'" type="primary" size="small">未审批</el-tag>
|
||||||
<el-tag v-if="scope.row.审批情况内容==='通过审批'" type="success" 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>
|
<el-tag v-if="scope.row.审批情况内容==='不通过审批'" type="danger" size="small">未通过</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="采购合同号" align="center" min-width="130">
|
<el-table-column label="采购合同号" align="center" min-width="130">
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
{{ scope.row.采购合同名称 }}
|
{{ scope.row.采购合同名称 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="供应商" align="center" min-width="150">
|
<el-table-column label="供应商" align="center" min-width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.供应商名称 }}
|
{{ scope.row.供应商名称 }}
|
||||||
</template>
|
</template>
|
||||||
@@ -131,6 +131,11 @@
|
|||||||
{{ scope.row.未通过原因 }}
|
{{ scope.row.未通过原因 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button :disabled="disable[scope.$index]" type="danger" size="mini" icon="el-icon-delete" @click="deleteContract(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="block" style="margin-top: 10px;">
|
<div class="block" style="margin-top: 10px;">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@@ -154,7 +159,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { initContract, initBuyer, searchTable1, searchTable2 } from '@/api/PurchasingCenter/PurchaseContractSearch'
|
import { initContract, initBuyer, searchTable1, searchTable2, deleteContract } from '@/api/PurchasingCenter/PurchaseContractSearch'
|
||||||
import { searchFile } from '@/api/PurchasingCenter/CreateContract'
|
import { searchFile } from '@/api/PurchasingCenter/CreateContract'
|
||||||
import QRCode from 'qrcode'
|
import QRCode from 'qrcode'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
@@ -169,7 +174,7 @@ export default {
|
|||||||
label: '全部'
|
label: '全部'
|
||||||
}, {
|
}, {
|
||||||
value: 1,
|
value: 1,
|
||||||
label: '通过'
|
label: '已通过'
|
||||||
}, {
|
}, {
|
||||||
value: 2,
|
value: 2,
|
||||||
label: '未通过'
|
label: '未通过'
|
||||||
@@ -177,7 +182,7 @@ export default {
|
|||||||
value: 3,
|
value: 3,
|
||||||
label: '未审批'
|
label: '未审批'
|
||||||
}],
|
}],
|
||||||
approvalValue: '',
|
approvalValue: 0,
|
||||||
RMB: '',
|
RMB: '',
|
||||||
TotalAmount: '',
|
TotalAmount: '',
|
||||||
check1: 0,
|
check1: 0,
|
||||||
@@ -204,6 +209,7 @@ export default {
|
|||||||
tableData01: [],
|
tableData01: [],
|
||||||
tableData02: [],
|
tableData02: [],
|
||||||
submitDisable: true,
|
submitDisable: true,
|
||||||
|
disable: [], // 删除按钮禁用
|
||||||
tableData2: [],
|
tableData2: [],
|
||||||
textarea: ``,
|
textarea: ``,
|
||||||
contractValue: '' // 显示表2和变更合同用的变量
|
contractValue: '' // 显示表2和变更合同用的变量
|
||||||
@@ -214,7 +220,27 @@ export default {
|
|||||||
this.searchTable1()
|
this.searchTable1()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
download() {
|
deleteContract(row) { // 删除合同
|
||||||
|
this.$confirm('此操作将永久删除合同所有内容,确定删除?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteContract(row.采购合同流水号).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.searchTable1()
|
||||||
|
this.returns = ''
|
||||||
|
} else { this.$message.error('删除失败') }
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
download() { // 导出打印
|
||||||
if (this.contractValue) {
|
if (this.contractValue) {
|
||||||
// exportExcelMethod('print', '采购合同', '采购合同sheet1')
|
// exportExcelMethod('print', '采购合同', '采购合同sheet1')
|
||||||
const htmlNode = $('#print').html()
|
const htmlNode = $('#print').html()
|
||||||
@@ -229,7 +255,7 @@ export default {
|
|||||||
this.$message.error('请选择合同')
|
this.$message.error('请选择合同')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
useqrcode(contractNum) {
|
useqrcode(contractNum) { // 二维码
|
||||||
const opts = {
|
const opts = {
|
||||||
errorCorrectionLevel: 'H',
|
errorCorrectionLevel: 'H',
|
||||||
type: 'image/jpeg',
|
type: 'image/jpeg',
|
||||||
@@ -280,6 +306,7 @@ export default {
|
|||||||
this.tableData2 = []
|
this.tableData2 = []
|
||||||
this.textarea = ``
|
this.textarea = ``
|
||||||
this.loading1 = true
|
this.loading1 = true
|
||||||
|
this.disable = []
|
||||||
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
if (this.startEndDate === '' || this.startEndDate === null || this.startEndDate[0] === '' || this.startEndDate[1] === '') {
|
||||||
this.check1 = 0
|
this.check1 = 0
|
||||||
this.startEndDate = ''
|
this.startEndDate = ''
|
||||||
@@ -293,9 +320,12 @@ export default {
|
|||||||
this.check5 = 1
|
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 => {
|
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 i = 0; i < response.data.rows.length; i++) {
|
||||||
|
response.data.rows[i].审批情况内容 === '未审批' ? this.disable.push(false) : this.disable.push(true) // 删除按钮禁用
|
||||||
|
}
|
||||||
this.tableData1 = response.data.rows
|
this.tableData1 = response.data.rows
|
||||||
this.total1 = response.data.total
|
this.total1 = response.data.total
|
||||||
|
this.loading1 = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleSizeChange1(val) {
|
handleSizeChange1(val) {
|
||||||
|
|||||||
Reference in New Issue
Block a user