家里的样式
This commit is contained in:
180
src/views/WorkshopProcurement/AccountingPrice/index.vue
Normal file
180
src/views/WorkshopProcurement/AccountingPrice/index.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<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>
|
||||
<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-cjn-09" 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="540px"
|
||||
height="540px"
|
||||
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="零件号" width="170px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" width="170px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="重量或面积" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量或面积 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单位" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="单价" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.核算单价" size="mini" width="80px" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总额" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.核算总额" size="mini" width="80px" align="center" readonly/>
|
||||
</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 { initPayState, searchParts, Preservation } from '@/api/WorkshopProcurement/AccountingPrice'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
loading: false,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
tableData: [],
|
||||
Requisition: [],
|
||||
Total: [],
|
||||
UnitPrice: [],
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue).then(response => {
|
||||
this.loading = false
|
||||
console.log(response.data.rows)
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].物料型号 === null || response.data.rows[i].物料型号 === '') {
|
||||
response.data.rows[i].物料型号 = response.data.rows[i].零件图号
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
console.log(this.tableData)
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
row.核算总额 = row.核算单价 * parseFloat(row.重量或面积)
|
||||
},
|
||||
Preservation() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
console.log(this.tableData[i].请购单明细流水号, this.tableData[i].核算总额)
|
||||
this.Requisition.push(this.tableData[i].请购单明细流水号)
|
||||
this.UnitPrice.push(this.tableData[i].核算单价)
|
||||
this.Total.push(this.tableData[i].核算总额)
|
||||
}
|
||||
Preservation(this.Requisition, this.Total, this.UnitPrice).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
} else {
|
||||
this.$message.error('保存失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
271
src/views/WorkshopProcurement/ArrivalStateSearch/index.vue
Normal file
271
src/views/WorkshopProcurement/ArrivalStateSearch/index.vue
Normal file
@@ -0,0 +1,271 @@
|
||||
<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/>
|
||||
<span>提前</span>
|
||||
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
|
||||
<span>天预警</span>
|
||||
<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
|
||||
highlight-current-row
|
||||
style="width: 100%;max-height: 250px;"
|
||||
height="250px"
|
||||
size="mini"
|
||||
@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="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="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货情况" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="judge[scope.$index]===1" type="success" size="small">全部到货</el-tag>
|
||||
<el-tag v-if="judge[scope.$index]===2" type="warning" size="small">即将拖期</el-tag>
|
||||
<el-tag v-if="judge[scope.$index]===3" type="danger" size="small">已拖期</el-tag>
|
||||
<el-tag v-if="judge[scope.$index]===4" type="primary" size="small">进度正常</el-tag>
|
||||
</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="(parseInt(10000*(scope.row.合同物料到货总数)/scope.row.合同物料采购总数)) / 100"
|
||||
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="tableData" stripe border style="width: 100%;max-height: 300px;margin-top: 10px" height="300px" 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>
|
||||
<el-table v-loading="" :data="tableData2" stripe border style="width: 100%;max-height: 300px;margin-top: 10px" height="300px" 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>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initArrivalStateContact, searchArrivalState, searchArrivalNum, searchArrivalNum1 } from '@/api/WorkshopProcurement/ArrivalStateSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
warningValue: 3,
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
pageSize1: 10,
|
||||
pageCurrent1: 1,
|
||||
total1: 0,
|
||||
tableData2: [],
|
||||
now: '',
|
||||
arrival: [],
|
||||
judge: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initArrivalStateContact().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.warningValue ? this.warningValue : this.warningValue = 1
|
||||
this.arrival = [] // 规定到货时间数组
|
||||
this.now = new Date()
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchArrivalState(this.pageCurrent1, this.pageSize1, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.arrival.push(new Date(response.data.rows[i].规定到货时间))
|
||||
if (parseInt(response.data.rows[i].合同物料到货总数) === parseInt(response.data.rows[i].合同物料采购总数)) {
|
||||
this.judge[i] = 1 // 全部到货
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > 0 && (this.arrival[i] - this.now) < (86400000 * this.warningValue)) {
|
||||
this.judge[i] = 2 // 即将拖期
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) < 0) {
|
||||
this.judge[i] = 3 // 已拖期
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > (86400000 * this.warningValue)) {
|
||||
this.judge[i] = 4 // 进度正常
|
||||
}
|
||||
}
|
||||
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(row) {
|
||||
searchArrivalNum(row.采购合同流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
searchArrivalNum1(row.采购合同流水号).then(response => {
|
||||
this.tableData = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -0,0 +1,669 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="searchContract">
|
||||
<el-form ref="form1" :model="form1" label-position="right" label-width="130px" class="searchForm">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="请购单号/合同编号">
|
||||
<el-select v-model="contractNumValue" size="small" @change="searchData">
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
: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="contractName" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="supplierName" size="small" placeholder="请双击选择" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="预付款">
|
||||
<el-input v-model="AdvanceCharge" size="small" placeholder="预付款"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<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-col :span="6">
|
||||
<el-form-item label="规定到货时间">
|
||||
<el-date-picker
|
||||
v-model="stipulateArrivalTime"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购员">
|
||||
<el-input v-model="name" size="small" readonly/>
|
||||
</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-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table :data="tableData4" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
|
||||
<el-table-column label="单件定额工时" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单件定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="准结定额工时" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.准结定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="150">
|
||||
<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" 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="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-column label="交货期" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.物料计划到货时间"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 133px"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" size="mini" style="width: 120px" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table :data="tableData3" border style="width: 100%;max-height: 400px;" height="300px" size="mini">
|
||||
<el-table-column label="单件定额工时" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单件定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="准结定额工时" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.准结定额工时 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="150">
|
||||
<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" 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="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-column label="交货期" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.物料计划到货时间"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 133px"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注" size="small" style="width: 120px" @change="update(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"/>
|
||||
<span>合同总额(含税):</span>
|
||||
<el-input v-model="contractSum2" size="small"/>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-input :rows="20" v-model="textArea" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
|
||||
<el-select v-model="contractValue" size="small" style="width: 110px;margin-left: 7.5%;margin-top: 10px" @change="changeContract">
|
||||
<el-option
|
||||
v-for="item in contract"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon=""
|
||||
style="margin-left: 7.5%; margin-top: 10px"
|
||||
@click="doneContract">生成采购合同</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
|
||||
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
|
||||
<el-row>
|
||||
<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
|
||||
:disabled="submitDisable"
|
||||
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="供应商名称" width="200">
|
||||
<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>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, update, doneContract, initPurchaseOrder, searchData1, searchData2, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
data() {
|
||||
return {
|
||||
submitDisable: true, // 不点击表格中的行不让确定
|
||||
AdvanceCharge: '',
|
||||
loading: false,
|
||||
dialogVisible1: false,
|
||||
disable2: true,
|
||||
disable3: true,
|
||||
disable4: true,
|
||||
disable5: true,
|
||||
disable6: true,
|
||||
tableData01: [],
|
||||
tableData2: [], // 合同模板表
|
||||
form1: {},
|
||||
form2: {},
|
||||
textArea: '',
|
||||
paramRow: '', // 参数row
|
||||
contractSum: 0,
|
||||
contractSum1: 0,
|
||||
contractSum2: 0,
|
||||
deliveryDay: [],
|
||||
deliveryDay1: [],
|
||||
contractNumValue: '',
|
||||
RequisitionNumber: '',
|
||||
contract: [{
|
||||
label: '合同模板1',
|
||||
value: 1
|
||||
}, {
|
||||
label: '合同模板2',
|
||||
value: 2
|
||||
}],
|
||||
contractValue: 1,
|
||||
contractNum: [], // 合同号
|
||||
contractName: '产品采购合同', // 合同名称
|
||||
supplierName: '', // 供应商
|
||||
supplier: [],
|
||||
supplierValue: '', // 供应商流水号
|
||||
enterpriseNature: '', // 企业性质
|
||||
createDate: '', // 创立日期
|
||||
registeredCapital: '', // 注册资本
|
||||
taxNum: '', // 税号
|
||||
EMail: '', // 电子邮箱
|
||||
address: '', // 地址
|
||||
account: '', // 账户
|
||||
openingBank: '', // 开户行
|
||||
phone: '', // 电话号码
|
||||
fax: '', // 传真
|
||||
goodTime: '', // 货期
|
||||
supplierCheck1: 0,
|
||||
supplierCheck2: 0,
|
||||
supplierCheck3: 0,
|
||||
supplierCheck4: 0,
|
||||
supplierCheck5: 0,
|
||||
supplierCheck6: 0,
|
||||
supplierCheck7: 0,
|
||||
supplierCheck8: 0,
|
||||
supplierCheck9: 0,
|
||||
supplierCheck10: 0,
|
||||
supplierCheck11: 0,
|
||||
supplierCheck12: 0,
|
||||
payMethod: [], // 付款方式
|
||||
payMethodValue: 1,
|
||||
payMethodName: '货到付款',
|
||||
currency: [{
|
||||
label: '人民币',
|
||||
value: 1
|
||||
}, {
|
||||
label: '美元',
|
||||
value: 2
|
||||
}, {
|
||||
label: '英镑',
|
||||
value: 3
|
||||
}, {
|
||||
label: '欧元',
|
||||
value: 4
|
||||
}], // 币种
|
||||
currencyValue: 1,
|
||||
payTime1: [],
|
||||
payTime1Value: 1,
|
||||
payTime2: [],
|
||||
payTime2Value: 1,
|
||||
payTime3: [],
|
||||
payTime3Value: 1,
|
||||
payTime4: [],
|
||||
payTime4Value: 1,
|
||||
payTime5: [],
|
||||
payTime5Value: 1,
|
||||
payTime6: [],
|
||||
payTime6Value: 1,
|
||||
planArrivalTime: '', // 计划到货时间
|
||||
stipulateArrivalTime: '', // 规定到货时间
|
||||
freight: '', // 运费
|
||||
taxRate: '0.13', // 税率
|
||||
tableData3: [],
|
||||
tableData4: [],
|
||||
groupNum1: [],
|
||||
groupNum2: [],
|
||||
group1: '',
|
||||
group2: '',
|
||||
group3: '',
|
||||
group5: '',
|
||||
group6: '',
|
||||
group7: '',
|
||||
group8: '',
|
||||
group9: '',
|
||||
group10: '',
|
||||
group11: '',
|
||||
group12: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
searchData() {
|
||||
searchData1(this.contractNumValue).then(response => {
|
||||
console.log(response.data, 222)
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.deliveryDay[i] = 0
|
||||
this.tableData3[i].金额 = parseFloat(this.tableData3[i].单价) * parseFloat(this.tableData3[i].零件数量)
|
||||
}
|
||||
}).then(() => {
|
||||
this.groupNum1 = this.tableData3 // 给中间变量,需要时重新push
|
||||
console.log(this.tableData3)
|
||||
})
|
||||
searchData2(this.contractNumValue).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].物料计划到货时间 = (response.data[j].物料计划到货时间).split(' ')[0]
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.deliveryDay1[i] = 0
|
||||
this.tableData4[i].金额 = parseFloat(this.tableData4[i].单价) * parseFloat(this.tableData4[i].零件数量)
|
||||
}
|
||||
}).then(() => {
|
||||
this.groupNum2 = this.tableData4 // 给中间变量,需要时重新push
|
||||
console.log(this.tableData4)
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
update(row.请购单明细流水号, row.物料计划到货时间, row.备注).then(response => {
|
||||
})
|
||||
},
|
||||
calculateContractSum() { // 计算合同总额
|
||||
this.contractSum = 0
|
||||
this.contractSum1 = 0
|
||||
this.costAccount = 0
|
||||
this.riseFallPoint = 0
|
||||
this.tableData3 = []
|
||||
this.tableData4 = []
|
||||
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.tableData3.push(this.groupNum1[i])
|
||||
}
|
||||
for (let i = 0; i < this.groupNum2.length; i++) {
|
||||
this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量)
|
||||
this.contractSum1 += parseFloat(this.groupNum2[i].金额)
|
||||
this.tableData4.push(this.groupNum2[i])
|
||||
}
|
||||
this.contractSum = (this.contractSum + this.contractSum1).toFixed(2)
|
||||
this.contractSum2 = parseInt(this.contractSum * (1 + parseFloat(this.taxRate)) * 100) / 100
|
||||
this.costAccount = this.contractSum
|
||||
if (parseInt(this.costAccount) === 0) {
|
||||
this.$message.error('成本核算不可为0')
|
||||
} else {
|
||||
this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount
|
||||
this.riseFallPoint = this.riseFallPoint.toFixed(2)
|
||||
}
|
||||
},
|
||||
fetchData() {
|
||||
searchContractDemo(1).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容
|
||||
})
|
||||
this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum')
|
||||
},
|
||||
changeContract() {
|
||||
searchContractDemo(this.contractValue).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容
|
||||
})
|
||||
},
|
||||
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 => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].创立日期 !== '' && response.data[i].创立日期 !== null) {
|
||||
response.data[i].创立日期 = response.data[i].创立日期.split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
},
|
||||
submitSelectSupplier() { // 确定选择供应商
|
||||
this.dialogVisible1 = false
|
||||
},
|
||||
emptySupplierDetail() { // 清空
|
||||
this.submitDisable = true
|
||||
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 = ''
|
||||
},
|
||||
showSupplierDetail(row) {
|
||||
this.submitDisable = false
|
||||
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.货期
|
||||
},
|
||||
doneContract() { // 生成采购合同
|
||||
if (this.contractNumValue === '') {
|
||||
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.group1 = ''
|
||||
this.group2 = ''
|
||||
this.group3 = ''
|
||||
this.group7 = ''
|
||||
this.group8 = ''
|
||||
this.group9 = ''
|
||||
this.group10 = ''
|
||||
this.group11 = ''
|
||||
this.group12 = ''
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.group1 += this.tableData3[i].物料流水号 + ','
|
||||
this.group2 += this.tableData3[i].零件数量 + ','
|
||||
this.group3 += this.tableData3[i].单价 + ','
|
||||
this.group7 += this.taxRate + ','
|
||||
this.group8 += this.currencyValue + ','
|
||||
this.group9 += this.tableData3[i].请购单明细流水号 + ','
|
||||
this.group11 += this.tableData3[i].单件定额工时 + ','
|
||||
this.group12 += this.tableData3[i].准结定额工时 + ','
|
||||
}
|
||||
for (let i = 0; i < this.tableData4.length; i++) {
|
||||
this.group1 += this.tableData4[i].物料流水号 + ','
|
||||
this.group2 += this.tableData4[i].零件数量 + ','
|
||||
this.group3 += this.tableData4[i].单价 + ','
|
||||
this.group7 += this.taxRate + ','
|
||||
this.group8 += this.currencyValue + ','
|
||||
this.group9 += this.tableData4[i].请购单明细流水号 + ','
|
||||
this.group11 += this.tableData4[i].单件定额工时 + ','
|
||||
this.group12 += this.tableData4[i].准结定额工时 + ','
|
||||
}
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.RequisitionNumber = this.contractNum[i].label
|
||||
}
|
||||
}
|
||||
this.group1 = this.group1.substr(0, this.group1.length - 1)
|
||||
this.group2 = this.group2.substr(0, this.group2.length - 1)
|
||||
this.group3 = this.group3.substr(0, this.group3.length - 1)
|
||||
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.contractValue, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.group11, this.group12, this.AdvanceCharge).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成合同成功')
|
||||
this.reload()
|
||||
} else { this.$message.error('生成合同失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
exportExcel() {}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -0,0 +1,898 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-col v-show="false" :span="9">
|
||||
<span>原材料名称:</span>
|
||||
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
|
||||
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchRawMaterial()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel2">选入原材料</el-button>
|
||||
<el-table :data="tableData" border style="width: 100%;height: 460px;margin-top: 15px;" height="330" size="mini" @selection-change="handleSelectionChange2">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="原材料名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.原材料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, prev, pager, next"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="22" style="margin-left: 20px">
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="mini" clearable style="width: 120px"/>
|
||||
<el-button type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入物料</el-button>
|
||||
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left: 10px" @click="back">打回</el-button>
|
||||
<el-table v-loading="loading1" :data="tableData1" border style="width: 100%;height: 460px;margin-top: 15px;" height="330" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" width="55"/>
|
||||
<el-table-column label="零件图号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, prev, pager, next"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>采购单号:</span>
|
||||
<el-input v-model="purchasingOrder" placeholder="采购单号" size="small" clearable/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购单</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存</el-button>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" border style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3">
|
||||
<el-table-column label="单号状态" align="center" width="100" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===0" type="warning" size="small">编辑中</el-tag>
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===1" type="primary" size="small">已保存</el-tag>
|
||||
<el-tag v-if="Number(scope.row.采购计划状态)===2" type="success" size="small">已导出</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购单号" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购单名称" align="center" min-width="170">
|
||||
<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="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单日期" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.下单日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划完成日期" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划完成日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="parseInt(scope.row.采购计划状态)===2" type="primary" size="mini" icon="el-icon-edit" @click="editPurchaseOrder(scope.row)"/>
|
||||
<el-button :disabled="parseInt(scope.row.采购计划状态)===2" type="danger" size="mini" icon="el-icon-delete" @click="deletePurchaseOrder(scope.row)"/>
|
||||
<el-button type="warning" size="mini" icon="el-icon-download" @click="exportExcel(scope.row)"/>
|
||||
</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" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料零件编码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="原材料名称" align="center" min-width="150">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.原材料名称 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column label="零件名称" align="center" width="180">
|
||||
<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-column label="求购重量" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.重量1" size="mini" style="width:120px" @change="saveWeight(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini" style="width:120px" @change="saveMoney(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="备注">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.备注1" :disabled="disable" size="mini" style="width:150px" @change="saveRemarks(scope.$index, scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(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="750px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购单名称" prop="采购单名称">
|
||||
<el-input v-model="form2.采购单名称" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="采购员" prop="采购员">
|
||||
<el-input v-model="name" readonly size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商名称" prop="供应商名称">
|
||||
<el-input v-model="form2.供应商名称" size="small" readonly>
|
||||
<el-button slot="append" icon="el-icon-search" @click="dialogVisible1=true"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计划完成日期" prop="计划完成日期">
|
||||
<el-date-picker
|
||||
v-model="form2.计划完成日期"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
v-show="title2==='创建采购单'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAddPurchaseOrder">确定</el-button>
|
||||
<el-button
|
||||
v-show="title2==='编辑采购单'"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitEditPurchaseOrder">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card style="width: 1100px;margin: 20px auto">
|
||||
<div id="cjn" style="width: 1000px;margin: 0 auto">
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
<tr>
|
||||
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="14"><h4>{{ 采购单名称 }}</h4></th>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ 下单单位 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">单号</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ 单号 }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ 下单日期 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
|
||||
<td colspan="5" style="text-align: center;width: 35%">{{ 计划完成日期 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 20px">
|
||||
<tr id="tablehead" style="height: 35px">
|
||||
<td style="text-align: center;width: 7%">序号</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">图号</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">名称</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">材料</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">单位</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">数量</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">请购重量</td>
|
||||
<td style="text-align: center;width: 17%">备注</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in tableData3" :key="index" style="height: 35px">
|
||||
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">{{ list.物料零件编码 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{ list.零件名称 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">{{ list.批次数量 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">{{ list.重量 }}</td>
|
||||
<td style="text-align: center;width: 17%">{{ list.备注1 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initPartDrawing, searchPurchasedMaterials, searchPurchaseOrder, searchSupplier, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchMateriel,
|
||||
addMateriel, deleteMateriel, saveMateriel, searchRawMaterial, addMateriel2, saveWeight, edit2 } from '@/api/WorkshopProcurement/CreatingPurchasingMaterials'
|
||||
import QRCode from 'qrcode'
|
||||
import $ from 'jquery'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: '', // 采购计划
|
||||
data() {
|
||||
return {
|
||||
RawMaterialGroup: [],
|
||||
RawMaterialName: '',
|
||||
tableData: [],
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: null,
|
||||
partDrawingNumber: '',
|
||||
Buyer: '',
|
||||
loading1: false,
|
||||
title2: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
tableData1: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
purchasingOrder: '', // 采购单号
|
||||
purchasingOrderNumber: '', // 采购计划流水号
|
||||
supplierName0: '', // 供应商名称(外面的)
|
||||
supplierName: '', // 供应商名称
|
||||
tableData2: [],
|
||||
total2: 0,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
dialogVisible1: false,
|
||||
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: '', // 供应商流水号
|
||||
goodTime: '', // 货期
|
||||
enterpriseNature: '', // 企业性质
|
||||
createDate: '', // 创立日期
|
||||
registeredCapital: '', // 注册资本
|
||||
taxNum: '', // 税号
|
||||
EMail: '', // 电子邮箱
|
||||
address: '', // 地址
|
||||
account: '', // 账号
|
||||
openingBank: '', // 开户行
|
||||
phone: '', // 电话号码
|
||||
fax: '', // 传真
|
||||
tableData01: [],
|
||||
dialogVisible2: false,
|
||||
下单单位: '',
|
||||
下单日期: '',
|
||||
单号: '',
|
||||
计划完成日期: '',
|
||||
采购单名称: '',
|
||||
form2: {
|
||||
采购计划流水号: '',
|
||||
采购单名称: '',
|
||||
供应商流水号: '',
|
||||
供应商名称: '',
|
||||
计划完成日期: ''
|
||||
},
|
||||
rules2: { // 采购表单验证规则
|
||||
采购单名称: [{ required: true, message: '请填写采购单名称' }],
|
||||
供应商名称: [{ required: true, message: '请选择供应商' }],
|
||||
计划完成日期: [{ required: true, message: '请选择计划完成日期' }]
|
||||
},
|
||||
tableData3: [],
|
||||
materielGroup: [], // 工艺计划流水号组
|
||||
partGroup: [], // 采购计划明细流水号组
|
||||
unit: [], // 单位组
|
||||
Remarks: [], // 备注组
|
||||
tableData4: [], // 合同模板
|
||||
采购计划状态: '',
|
||||
paramRow: '', // 参数row
|
||||
disable: false // 其他的禁用
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.searchRawMaterial()
|
||||
this.searchTable1()
|
||||
this.searchTable2()
|
||||
},
|
||||
methods: {
|
||||
// 获取原材料
|
||||
searchRawMaterial() {
|
||||
searchRawMaterial(this.RawMaterialName, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = parseInt(response.data.total)
|
||||
})
|
||||
},
|
||||
addMateriel2() { // 将材料选入请购单
|
||||
if (!this.purchasingOrderNumber) {
|
||||
this.$message.warning('请选择采购单')
|
||||
} else if (this.RawMaterialGroup.length === 0) {
|
||||
this.$message.warning('请勾选原材料')
|
||||
} else {
|
||||
addMateriel2(this.purchasingOrderNumber, this.RawMaterialGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('选入成功')
|
||||
this.searchTable1()
|
||||
this.searchRawMaterial()
|
||||
searchMateriel(this.purchasingOrderNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('选入失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSelectionChange2(val) {
|
||||
this.RawMaterialGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.RawMaterialGroup.push(val[i].原材料流水号)
|
||||
}
|
||||
},
|
||||
saveWeight(index, row) {
|
||||
var reg = /^[0-9]*$/
|
||||
if (!reg.test(row.重量1)) {
|
||||
this.$message.error('请输入正确的重量')
|
||||
row.重量1 = ''
|
||||
} else {
|
||||
saveWeight(row.采购计划明细流水号, row.重量1, row.备注1, row.单价)
|
||||
}
|
||||
},
|
||||
saveMoney(index, row) {
|
||||
var reg = /^[0-9]*$/
|
||||
if (!reg.test(row.单价)) {
|
||||
this.$message.error('请输入正确的单价')
|
||||
row.单价 = ''
|
||||
} else {
|
||||
saveWeight(row.采购计划明细流水号, row.重量1, row.备注1, row.单价)
|
||||
}
|
||||
},
|
||||
saveRemarks(index, row) {
|
||||
saveWeight(row.采购计划明细流水号, row.重量1, row.备注1, row.单价)
|
||||
},
|
||||
// ///////////////////////////////////////////////////////////////////////////////////////0529新加↑
|
||||
useqrcode(contractNum) {
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
type: 'image/jpeg',
|
||||
rendererOpts: {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
QRCode.toDataURL(contractNum, opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
img.src = url
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
initPartDrawing(0, this.partDrawingNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partDrawingNumber.push({
|
||||
label: response.data[i].零件图号,
|
||||
value: response.data[i].零件图号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询外购备料
|
||||
this.loading1 = true
|
||||
this.partDrawingNumber ? this.check1 = 1 : this.check1 = 0
|
||||
searchPurchasedMaterials(this.pageCurrent1, this.pageSize1, this.check1, this.partDrawingNumber).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.materielGroup = []
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.materielGroup.push(val[i].工艺计划流水号)
|
||||
}
|
||||
},
|
||||
searchTable2() { // 查询采购单列表
|
||||
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
|
||||
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
|
||||
searchPurchaseOrder(this.pageCurrent2, this.pageSize2, this.check3, this.purchasingOrder, this.check4, this.supplierName0).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()
|
||||
},
|
||||
addPurchaseOrder() { // 创建采购单
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.title2 = '创建采购单'
|
||||
this.form2.离线合同名称 = ''
|
||||
this.form2.供应商流水号 = ''
|
||||
this.form2.供应商名称 = ''
|
||||
this.form2.计划完成日期 = ''
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitAddPurchaseOrder() { // 新建采购单
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
addPurchaseOrder(this.form2.采购单名称, this.form2.供应商流水号, this.id, this.form2.计划完成日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('新建采购单成功')
|
||||
this.searchTable2()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('新建采购单失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
editPurchaseOrder(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.title2 = '编辑采购单'
|
||||
this.form2.采购计划流水号 = row.采购计划流水号
|
||||
this.form2.采购单名称 = row.采购单名称
|
||||
this.form2.供应商流水号 = row.供应商
|
||||
this.form2.供应商名称 = row.供应商名称
|
||||
this.form2.计划完成日期 = row.计划完成日期
|
||||
this.dialogVisible2 = true
|
||||
},
|
||||
submitEditPurchaseOrder() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
editPurchaseOrder(this.form2.采购计划流水号, this.form2.采购单名称, this.form2.供应商流水号, this.form2.计划完成日期).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改采购单成功')
|
||||
this.searchTable2()
|
||||
this.dialogVisible2 = false
|
||||
} else { this.$message.error('修改采购单失败') }
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
deletePurchaseOrder(row) { // 删除采购单
|
||||
this.$confirm('确定删除该合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deletePurchaseOrder(row.采购计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchTable2()
|
||||
this.disable = true
|
||||
searchMateriel(this.purchasingOrderNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('数据占用,删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
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.供应商流水号 = row.供应商流水号
|
||||
this.form2.供应商名称 = 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.purchasingOrderNumber = row.采购计划流水号
|
||||
this.采购单名称 = row.采购单名称
|
||||
this.采购计划状态 = row.采购计划状态
|
||||
this.下单单位 = row.供应商名称
|
||||
this.单号 = row.采购单号
|
||||
this.计划完成日期 = row.计划完成日期.split(' ')[0]
|
||||
this.下单日期 = row.下单日期.split(' ')[0]
|
||||
searchMateriel(this.purchasingOrderNumber).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
addMateriel() { // 将材料选入请购单
|
||||
if (!this.purchasingOrderNumber) {
|
||||
this.$message.warning('请选择采购单')
|
||||
} else if (this.materielGroup.length === 0) {
|
||||
this.$message.warning('请勾选物料')
|
||||
} else {
|
||||
addMateriel(this.purchasingOrderNumber, this.materielGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('选入成功')
|
||||
this.searchTable1()
|
||||
searchMateriel(this.purchasingOrderNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('选入失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
back() {
|
||||
edit2(this.materielGroup).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('打回成功')
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('打回失败') }
|
||||
})
|
||||
},
|
||||
saveMateriel() { // 保存数据
|
||||
this.partGroup = []
|
||||
this.unit = []
|
||||
this.Remarks = []
|
||||
if (!this.purchasingOrderNumber) {
|
||||
this.$message.warning('请选择采购单')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.partGroup.push(this.tableData3[i].采购计划明细流水号)
|
||||
if (this.tableData3[i].单位 === '' || this.tableData3[i].单位 === null) {
|
||||
this.tableData3[i].单位 = '无'
|
||||
}
|
||||
this.unit.push(this.tableData3[i].单位)
|
||||
if (this.tableData3[i].备注1 === '' || this.tableData3[i].备注1 === null) {
|
||||
this.tableData3[i].备注1 = '无'
|
||||
}
|
||||
this.Remarks.push(this.tableData3[i].备注1)
|
||||
}
|
||||
saveMateriel(this.purchasingOrderNumber, this.partGroup, this.unit, this.Remarks).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.searchTable2()
|
||||
searchMateriel(this.purchasingOrderNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteMateriel(row) { // 移除物料
|
||||
this.$confirm('确定移除该物料?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteMateriel(row.采购计划明细流水号, row.工艺计划流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('移除成功')
|
||||
this.searchTable1()
|
||||
searchMateriel(this.purchasingOrderNumber).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
} else { this.$message.error('移除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消移除'
|
||||
})
|
||||
})
|
||||
},
|
||||
exportExcel() {
|
||||
this.$confirm('确定导出该合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const htmlNode = $('#cjn').html()
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.removeAttr('style')
|
||||
body.children().not('script').show()
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
}).catch(res => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.offlineContract td{
|
||||
height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.edit-input {
|
||||
padding-right: 100px;
|
||||
}
|
||||
.cancel-btn {
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,424 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>开始时间:</span>
|
||||
<el-date-picker
|
||||
v-model="startDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>结束时间:</span>
|
||||
<el-date-picker
|
||||
v-model="endDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-input v-model="contractNum" placeholder="合同号" size="small" style="width:180px" clearable/>
|
||||
<span>采购员:</span>
|
||||
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px" clearable>
|
||||
<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 :data="tableData1" size="mini" border style="width: 100%">
|
||||
<el-table-column label="请款" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(scope.row)">请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同编号" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.含税总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预付款" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付款 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" min-width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本次请款金额" min-width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" width="710" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-table :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<el-table-column label="取消请款" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.审批情况流水号!==3"
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="次数" min-width="60" align="center" type="index"/>
|
||||
<el-table-column label="请款金额" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批情况" width="80" 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="80" 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>
|
||||
</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-date-picker
|
||||
v-model="startRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="开始日期"/>
|
||||
~
|
||||
<el-date-picker
|
||||
v-model="endRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="结束日期"/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="searchRequestTable">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" size="mini" border style="width: 100%;min-height:300px" height="300px">
|
||||
<el-table-column label="采购合同编号" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="250" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.含税总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预付款" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付款 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="欠款金额" min-width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.欠款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" min-width="80" 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.请款时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable1, requestFund, searchCondition, cancelRequestFund, searchRequestTable, initBuyer } from '@/api/WorkshopProcurement/DepartmentBuyerRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
personValue: '',
|
||||
person: [],
|
||||
loading2: false,
|
||||
tableData2: [],
|
||||
tableData11: [],
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
contractNum: '',
|
||||
submitDisable: true,
|
||||
form1: {},
|
||||
supplierName: '',
|
||||
tableData01: [],
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
startRequestDate: '',
|
||||
endRequestDate: '',
|
||||
checkRequest: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.initBuyer()
|
||||
},
|
||||
methods: {
|
||||
initBuyer() { // 初始化采购人员
|
||||
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.tableData1 = []
|
||||
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNum ? 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.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
this.tableData11[j] = []
|
||||
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
|
||||
if (response0.data.length === 0) {
|
||||
this.tableData11[j].push(response0.data)
|
||||
document.getElementById(j).setAttribute('style', 'display:none')
|
||||
} else {
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
}
|
||||
})
|
||||
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
||||
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
||||
}
|
||||
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()
|
||||
},
|
||||
requestFund(row) { // 请款
|
||||
console.log(row.本次应请款)
|
||||
if (row.本次应请款 !== '') {
|
||||
const day1 = new Date()
|
||||
const day2 = day1.getFullYear() + '-' + (day1.getMonth() + 1) + '-' + day1.getDate()
|
||||
requestFund(row.采购合同流水号, row.本次应请款, day2, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('请款成功')
|
||||
this.searchTable1()
|
||||
this.startRequestDate = ''
|
||||
this.endRequestDate = ''
|
||||
this.tableData2 = []
|
||||
} else { this.$message.error('请款失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请输入金额')
|
||||
}
|
||||
},
|
||||
cancelRequestFund(row) { // 取消请款
|
||||
console.log(row)
|
||||
this.$confirm('确认取消请款吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (parseInt(row.采购科请款流水号) !== 1) {
|
||||
cancelRequestFund(row.采购科请款流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.searchTable1()
|
||||
this.startRequestDate = ''
|
||||
this.endRequestDate = ''
|
||||
this.tableData2 = []
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.error('财务已经付款')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchRequestTable() { // 查询请款表
|
||||
this.loading2 = true
|
||||
if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
|
||||
this.checkRequest = 0
|
||||
} else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
|
||||
this.checkRequest = 1
|
||||
} else {
|
||||
this.$message.error('请款时间区间有误')
|
||||
this.loading2 = false
|
||||
return
|
||||
}
|
||||
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
response.data[j].含税总金额 = parseInt(response.data[j].含税总金额 * 100) / 100
|
||||
response.data[j].欠款金额 = parseInt(response.data[j].欠款金额 * 100) / 100
|
||||
if (response.data[j].请款时间 !== null) {
|
||||
response.data[j].请款时间 = response.data[j].请款时间.substring(0, response.data[j].请款时间.indexOf(' '))
|
||||
}
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
this.loading2 = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px!important;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
184
src/views/WorkshopProcurement/FundApproval1/index.vue
Normal file
184
src/views/WorkshopProcurement/FundApproval1/index.vue
Normal file
@@ -0,0 +1,184 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData" border style="width: 100%;max-height: 500px;" height="600px" 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="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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { execApproval, initApproval1 } from '@/api/WorkshopProcurement/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 财务审核
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.searchTable()
|
||||
},
|
||||
searchTable() {
|
||||
initApproval1(this.pageCurrent, this.pageSize, 1).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
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.searchTable()
|
||||
} 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.searchTable()
|
||||
} 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>
|
||||
425
src/views/WorkshopProcurement/FundApproval2/index.vue
Normal file
425
src/views/WorkshopProcurement/FundApproval2/index.vue
Normal file
@@ -0,0 +1,425 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData" border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<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" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData2" 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="searchTable01(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<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="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>
|
||||
<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="170">
|
||||
<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" 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>
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData3" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<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" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData1" 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="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="searchTable03(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesMaterials(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noMaterials(scope.row)">不通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent3"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline, searchRequsetFundDetail1, initApprovalMaterials, execMaterials, searchRequsetFundDetail3 } from '@/api/WorkshopProcurement/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 财务审核
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
tableData2: [],
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
tableData3: [],
|
||||
pageSize3: 10,
|
||||
pageCurrent3: 1,
|
||||
total3: 0,
|
||||
gridData: [],
|
||||
gridData1: [],
|
||||
gridData2: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.searchTable()
|
||||
this.searchTable2()
|
||||
this.searchTable3()
|
||||
},
|
||||
searchTable() {
|
||||
initApproval1(this.pageCurrent, this.pageSize, 1).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
||||
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
searchTable01(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
|
||||
this.gridData2 = response.data
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
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
|
||||
})
|
||||
},
|
||||
searchTable3() {
|
||||
initApprovalMaterials(this.pageCurrent3, this.pageSize3, 1).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData3 = response.data.rows
|
||||
this.total3 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange3(val) {
|
||||
this.pageSize3 = val
|
||||
this.pageCurrent3 = 1
|
||||
this.searchTable3()
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.pageCurrent3 = val
|
||||
this.searchTable3()
|
||||
},
|
||||
searchTable03(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail1(row.采购计划请款流水号).then(response => {
|
||||
this.gridData1 = 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.searchTable()
|
||||
} 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.searchTable()
|
||||
} 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: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
yesMaterials(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execMaterials(row.采购计划请款流水号, 1, '通过', this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable3()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noMaterials(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execMaterials(row.采购计划请款流水号, 2, value, this.id, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable3()
|
||||
} 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>
|
||||
424
src/views/WorkshopProcurement/FundApproval3/index.vue
Normal file
424
src/views/WorkshopProcurement/FundApproval3/index.vue
Normal file
@@ -0,0 +1,424 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData" border style="width: 100%;max-height: 500px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<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" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="gridData1" 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="searchTable01(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<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="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>
|
||||
<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="170">
|
||||
<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" 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>
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData3" border style="width: 100%;max-height: 300px;" height="300px" size="mini">
|
||||
<el-table-column label="供应商" align="center" min-width="170">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款时间" align="center" min-width="150">
|
||||
<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" width="320">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData1" 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="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="searchTable03(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="primary" size="mini" icon="el-icon-check" @click="yesMaterials(scope.row)">通过</el-button>
|
||||
<el-button type="danger" size="mini" icon="el-icon-close" @click="noMaterials(scope.row)">不通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent3"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { execApproval, initApproval1, initApprovalOffline, searchRequsetFundDetail, execApprovalOffline, searchRequsetFundDetail1, initApprovalMaterials, execMaterials, searchRequsetFundDetail3 } from '@/api/WorkshopProcurement/FundApproval'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 财务审核
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
tableData2: [],
|
||||
pageSize2: 10,
|
||||
pageCurrent2: 1,
|
||||
total2: 0,
|
||||
gridData: [],
|
||||
tableData3: [],
|
||||
pageSize3: 10,
|
||||
pageCurrent3: 1,
|
||||
total3: 0,
|
||||
gridData1: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.searchTable()
|
||||
this.searchTable2()
|
||||
this.searchTable3()
|
||||
},
|
||||
searchTable() {
|
||||
initApproval1(this.pageCurrent, this.pageSize, 2).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
||||
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
searchTable01(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail3(row.采购合同请款流水号).then(response => {
|
||||
this.gridData1 = response.data
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
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
|
||||
})
|
||||
},
|
||||
searchTable3() {
|
||||
initApprovalMaterials(this.pageCurrent3, this.pageSize3, 2).then(response => {
|
||||
console.log(response.data.rows)
|
||||
this.tableData3 = response.data.rows
|
||||
this.total3 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange3(val) {
|
||||
this.pageSize3 = val
|
||||
this.pageCurrent3 = 1
|
||||
this.searchTable3()
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.pageCurrent3 = val
|
||||
this.searchTable3()
|
||||
},
|
||||
searchTable03(row) { // 查看详情(请款信息包含的合同)
|
||||
searchRequsetFundDetail1(row.采购计划请款流水号).then(response => {
|
||||
this.gridData1 = 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.searchTable()
|
||||
} 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.searchTable()
|
||||
} 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: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
yesMaterials(row) { // 通过审核
|
||||
this.$confirm('确定审核通过?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
execMaterials(row.采购计划请款流水号, 1, '通过', this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable3()
|
||||
} else { this.$message.error('执行失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
noMaterials(row) { // 不通过审核
|
||||
this.$prompt('请输入不通过原因', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
}).then(({ value }) => {
|
||||
execMaterials(row.采购计划请款流水号, 2, value, this.id, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('执行成功')
|
||||
this.searchTable3()
|
||||
} 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>
|
||||
@@ -0,0 +1,704 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="tableData2=[];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="createOrder()">创建</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<h4 style="margin-top: 5px">发票结算申请单</h4>
|
||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 300px;overflow:auto" size="mini" @row-click="searchTable2">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<viewer>
|
||||
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
|
||||
</viewer>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="已付款项">
|
||||
<span>{{ scope.row.已付款项 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="尚欠金额">
|
||||
<span>{{ scope.row.尚欠金额 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="备注">
|
||||
<span>{{ scope.row.备注 }}</span>
|
||||
</el-form-item><br>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否费用类发票">
|
||||
<span>{{ scope.row.是否费用类 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="税额">
|
||||
<span>{{ scope.row.税额 }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</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" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="danger" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="primary" size="mini" style="margin-left:10px" @click="submitApply(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>
|
||||
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="addInStoreRecord()">追加入库记录</el-button>
|
||||
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 || 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">
|
||||
<el-button :disabled="disabled" type="danger" size="mini" icon="el-icon-delete" @click="deleteTable2(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="650px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="90px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发票金额" prop="money">
|
||||
<el-input v-model="form1.money" size="small" placeholder="发票金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="供应商" prop="supplierValue">
|
||||
<el-select v-model="form1.supplierValue" :disabled="title1 === '编辑发票结算申请单'" placeholder="供应商" filterable size="small">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="尚欠金额">
|
||||
<el-input v-model="form1.unpaid" size="small" placeholder="尚欠金额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="税额">
|
||||
<el-input v-model="form1.tax" size="small" placeholder="税额"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="已付款项">
|
||||
<el-input v-model="form1.paid" size="small" placeholder="已付款项"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否费用类">
|
||||
<el-input v-model="form1.isCost" size="small" placeholder="是否费用类发票"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<b v-show="title1 === '创建发票结算申请单'" style="float:left;color: #f56c6c;margin-top: 13px">* </b>
|
||||
<el-form-item v-show="title1 === '创建发票结算申请单'" label="发票扫描件" style="display: inline-block">
|
||||
<el-upload
|
||||
id="invoiceScan"
|
||||
ref="upload"
|
||||
:auto-upload="false"
|
||||
:on-success="uploadSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:on-exceed="warningExceed"
|
||||
:limit="limit"
|
||||
:action="upload+'?invoiceNum='+form1.invoiceNum+'&money='+form1.money+'&supplierValue='+form1.supplierValue+'&paid='+form1.paid+'&unpaid='+form1.unpaid+'&tax='+form1.tax+'&isCost='+form1.isCost+'&remark='+form1.remark+'&personId='+id"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
<el-button v-if="title1 === '创建发票结算申请单'" size="small" type="primary" @click="submitAdd1()">确定</el-button>
|
||||
<el-button v-else size="small" type="primary" @click="submitEdit()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="900px">
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" size="small" placeholder="请选择供应商发票" style="margin: 0 5px 10px 0;" readonly/>
|
||||
<el-radio-group v-model="contractType" size="small" @change="searchTable01()">
|
||||
<el-radio label="采购合同" border/>
|
||||
<el-radio label="离线合同" border/>
|
||||
</el-radio-group>
|
||||
<el-table :data="tableData01" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini" @row-click="searchTable02">
|
||||
<el-table-column label="供应商" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table ref="multipleTable" :data="tableData02" border style="width: 100%;max-height: 250px;" height="250px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="35"/>
|
||||
<el-table-column label="名称" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购数量" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到货数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.已到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已到票数量" align="center" width="90">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.到票数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="本次到票数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.本次到票数量" :min="0" :max="(scope.row.已到货数量||scope.row.到货数量)-scope.row.到票数量" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
||||
<el-button :disabled="group.length===0" size="small" type="primary" @click="submitAdd2()">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, searchTable1, submitEdit, submitDelete, submitApply, searchTable2, searchPurchase, searchOffline, searchPurchaseDetail, searchOfflineDetail,
|
||||
addTable2, deleteTable2 } from '@/api/WorkshopProcurement/InvoiceSettlementApplication1'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { uploadInvoiceScan1, readFile } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
export default {
|
||||
name: '', // 发票结算申请
|
||||
data() {
|
||||
return {
|
||||
disabled: false,
|
||||
contractType: '采购合同',
|
||||
invoiceNum: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
applyOrderNum: '',
|
||||
invoiceNumber: '',
|
||||
title2: '',
|
||||
dialogVisible2: false,
|
||||
tableData2: [],
|
||||
dialogVisible1: false,
|
||||
title1: '',
|
||||
supplier: [],
|
||||
supplierName: '',
|
||||
supplierValue: '',
|
||||
form1: {
|
||||
invoiceNum: '',
|
||||
money: '',
|
||||
supplierValue: '',
|
||||
paid: '',
|
||||
unpaid: '',
|
||||
tax: '',
|
||||
isCost: '',
|
||||
remark: '',
|
||||
applyOrderNum: ''
|
||||
},
|
||||
rules1: {
|
||||
invoiceNum: [
|
||||
{ required: true, message: '请输入发票号' }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: '请输入开票金额' }
|
||||
],
|
||||
supplierValue: [
|
||||
{ required: true, message: '请选择供应商' }
|
||||
]
|
||||
},
|
||||
upload: uploadInvoiceScan1,
|
||||
limit: 1,
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
inboundCardNumber: '', // 入库单号
|
||||
group: [] // 发票结算申请单明细流水号组
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
createOrder() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1.invoiceNum = ''
|
||||
this.form1.money = ''
|
||||
this.form1.supplierValue = ''
|
||||
this.form1.paid = ''
|
||||
this.form1.unpaid = ''
|
||||
this.form1.tax = ''
|
||||
this.form1.isCost = ''
|
||||
this.form1.remark = ''
|
||||
this.title1 = '创建发票结算申请单'
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
searchTable1() {
|
||||
let check1
|
||||
this.invoiceNum ? check1 = 1 : check1 = 0
|
||||
searchTable1(check1, this.invoiceNum, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
return v
|
||||
})
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||
}
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
submitAdd1() { // 提交新增
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$refs.upload.submit() // 上传图片
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
submitEdit() { // 提交编辑
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
if (valid) {
|
||||
submitEdit(this.form1.invoiceNum, this.form1.money, this.form1.paid, this.form1.unpaid, this.form1.tax, this.form1.isCost, this.form1.remark, this.form1.applyOrderNum).then(response => {
|
||||
if (response.data[0].result === '修改成功') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '修改失败') {
|
||||
this.$message.error('已提交申请,编辑失败')
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.form1.invoiceNum = row.发票号
|
||||
this.form1.money = row.发票金额
|
||||
this.form1.supplierValue = Number(row.供应商流水号)
|
||||
this.form1.paid = row.已付款项
|
||||
this.form1.unpaid = row.尚欠金额
|
||||
this.form1.tax = row.税额
|
||||
this.form1.isCost = row.是否费用类
|
||||
this.form1.remark = row.备注
|
||||
this.form1.applyOrderNum = row.发票结算申请单流水号
|
||||
this.title1 = '编辑发票结算申请单'
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
submitDelete(row.发票结算申请单流水号).then(response => {
|
||||
if (response.data[0].result === '删除成功') {
|
||||
this.$message.success('删除成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '删除失败') {
|
||||
this.$message.error('已提交申请,删除失败')
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
async searchPic(row, i) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 车间采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||
}
|
||||
})
|
||||
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
console.log(this.tableData1[i].scanSrc)
|
||||
},
|
||||
warningExceed() {
|
||||
this.$message.error('仅可上传一张发票')
|
||||
},
|
||||
beforeUpload(file) { // 上传前检测
|
||||
const isJPG = /^image\/.*/.test(file.type)
|
||||
const isLt4M = file.size / 1024 / 1024 < 4
|
||||
if (!isJPG) {
|
||||
this.$message.error('只能上传图片。。')
|
||||
}
|
||||
if (!isLt4M) {
|
||||
this.$message.error('上传头像图片大小不能超过 4MB!')
|
||||
}
|
||||
return isJPG && isLt4M
|
||||
},
|
||||
uploadSuccess(res) { // 上传成功回调
|
||||
if (res[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
this.$refs.upload.clearFiles()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
submitApply(row) {
|
||||
if (this.tableData2.length === 0) {
|
||||
this.$message.warning('发票结算申请明细为空!')
|
||||
} else {
|
||||
this.$confirm('确认提交申请吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
submitApply(row.发票结算申请单流水号, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('提交成功')
|
||||
this.searchTable1()
|
||||
this.tableData2 = []
|
||||
} else { this.$message.error('提交失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.applyOrderNum = row.发票结算申请单流水号
|
||||
this.invoiceNumber = row.发票号
|
||||
this.supplierName = row.供应商名称
|
||||
this.supplierValue = row.供应商流水号
|
||||
Number(row.是否提交申请) === 1 ? this.disabled = true : this.disabled = false
|
||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
addInStoreRecord() {
|
||||
if (this.applyOrderNum) {
|
||||
this.searchTable01()
|
||||
this.title2 = '追加入库单'
|
||||
this.dialogVisible2 = true
|
||||
} else {
|
||||
this.$message.error('请选择发票!')
|
||||
}
|
||||
},
|
||||
searchTable01() {
|
||||
this.tableData01 = []
|
||||
this.tableData02 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
searchPurchase(this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
} else if (this.contractType === '离线合同') {
|
||||
searchOffline(this.supplierValue).then(response => {
|
||||
response.data.map(data => {
|
||||
if (Number(data.离线合同状态) === 2) {
|
||||
this.tableData01.push(data)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
searchTable02(row) {
|
||||
this.tableData02 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
searchPurchaseDetail(row.采购合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.已到货数量 - data.到票数量
|
||||
this.tableData02.push(data)
|
||||
})
|
||||
})
|
||||
} else if (this.contractType === '离线合同') {
|
||||
searchOfflineDetail(row.离线合同流水号).then(response => {
|
||||
response.data.map(data => {
|
||||
this.$set(data, '本次到票数量', 0)
|
||||
data.本次到票数量 = data.到货数量 - data.到票数量
|
||||
this.tableData02.push(data)
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.group = val
|
||||
},
|
||||
submitAdd2() { // 追加入库单
|
||||
if (this.group.length === 0) {
|
||||
this.$message.warning('请选择零件或物料')
|
||||
} else {
|
||||
const group1 = []
|
||||
const group2 = []
|
||||
if (this.contractType === '采购合同') {
|
||||
for (let i = 0; i < this.group.length; i++) {
|
||||
group1.push(this.group[i].采购合同明细流水号)
|
||||
group2.push(this.group[i].本次到票数量)
|
||||
}
|
||||
addTable2(this.applyOrderNum, group1, group2, 1).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('追加成功')
|
||||
this.dialogVisible2 = false
|
||||
searchTable2(this.applyOrderNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else { this.$message.error('追加失败') }
|
||||
})
|
||||
} else if (this.contractType === '离线合同') {
|
||||
for (let i = 0; i < this.group.length; i++) {
|
||||
group1.push(this.group[i].离线合同明细流水号)
|
||||
group2.push(this.group[i].本次到票数量)
|
||||
}
|
||||
addTable2(this.applyOrderNum, group1, group2, 2).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('追加成功')
|
||||
this.dialogVisible2 = false
|
||||
searchTable2(this.applyOrderNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else { this.$message.error('追加失败') }
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
deleteTable2(row) {
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteTable2(row.发票结算申请单明细流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
searchTable2(this.applyOrderNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
selectable(row) {
|
||||
return Number(row.本次到票数量) > 0
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
#expandTable .el-form-item{
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,281 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>申请时间:</span>
|
||||
<el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始日期"/> ~
|
||||
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/>
|
||||
<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>
|
||||
<h4 style="margin-top: 5px">发票结算申请单</h4>
|
||||
<el-table id="expandTable" :data="tableData1" border highlight-current-row style="width: 100%;height: 330px;overflow:auto" size="mini" @row-click="searchTable2">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<viewer>
|
||||
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
|
||||
</viewer>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="已付款项">
|
||||
<span>{{ scope.row.已付款项 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="尚欠金额">
|
||||
<span>{{ scope.row.尚欠金额 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="备注">
|
||||
<span>{{ scope.row.备注 }}</span>
|
||||
</el-form-item><br>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="是否费用类发票">
|
||||
<span>{{ scope.row.是否费用类 }}</span>
|
||||
</el-form-item><br>
|
||||
<el-form-item label="税额">
|
||||
<span>{{ scope.row.税额 }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</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="90">
|
||||
<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="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请人姓名 ? scope.row.申请人姓名 : '未提交' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.申请时间 ? scope.row.申请时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批1时间 ? scope.row.审批1时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务审批" align="center" min-width="60">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人2姓名 ? scope.row.审批人2姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批2时间 ? scope.row.审批2时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总经理审批" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" min-width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.审批3时间 ? scope.row.审批3时间 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button :disabled="false" type="primary" size="mini" @click="excuteApprove(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>
|
||||
<h4 style="margin-top: 5px;display: inline-block;width: 150px;">发票结算申请单明细</h4>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNumber" size="small" placeholder="请选择发票结算申请单" readonly/>
|
||||
<el-table :data="tableData2" border highlight-current-row style="width: 100%;max-height: 250px;" height="250px" size="mini">
|
||||
<el-table-column label="名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料名称 || scope.row.离线物料名称 || scope.row.采购零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料型号 || scope.row.离线物料型号 || scope.row.采购零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购物料规格 || scope.row.离线物料规格 || scope.row.采购零件规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 || scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同名称" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 || 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-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable1, searchTable2, excuteApprove } from '@/api/WorkshopProcurement/InvoiceSettlementApprove1'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { readFile } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
export default {
|
||||
name: '', // 发票结算审批
|
||||
data() {
|
||||
return {
|
||||
date1: '',
|
||||
date2: '',
|
||||
tableData1: [],
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
invoiceNumber: '',
|
||||
tableData2: [],
|
||||
tableData3: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'token',
|
||||
'sidebar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
console.log(this.token)
|
||||
},
|
||||
searchTable1() {
|
||||
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
|
||||
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
return v
|
||||
})
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||
}
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
async searchPic(row, i) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 车间采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票结算申请单流水号}`
|
||||
}
|
||||
})
|
||||
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
excuteApprove(row) {
|
||||
this.$confirm('确认审批签字?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => {
|
||||
if (response.data[0].result === '审批成功') {
|
||||
this.$message.success('审批成功')
|
||||
this.searchTable1()
|
||||
} else if (response.data[0].result === '已完成审批') {
|
||||
this.$message.warning('已完成审批,不可重复审批')
|
||||
} else { this.$message.error('审批失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消审批'
|
||||
})
|
||||
})
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.invoiceNumber = row.发票号
|
||||
searchTable2(row.发票结算申请单流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
#expandTable .el-form-item{
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
238
src/views/WorkshopProcurement/InvoiceStateSearch/index.vue
Normal file
238
src/views/WorkshopProcurement/InvoiceStateSearch/index.vue
Normal file
@@ -0,0 +1,238 @@
|
||||
<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">
|
||||
{{ 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="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-progress :text-inside="true" :stroke-width="18" :percentage="(parseInt(10000*(scope.row.到票总金额)/scope.row.剩余总金额)) / 100" 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="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/WorkshopProcurement/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.tableData2 = []
|
||||
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 => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
response.data.rows[j].合同总金额 = parseInt(response.data.rows[j].合同总金额 * 100) / 100
|
||||
}
|
||||
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>
|
||||
1025
src/views/WorkshopProcurement/OfflineContract1/index.vue
Normal file
1025
src/views/WorkshopProcurement/OfflineContract1/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,428 @@
|
||||
<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="结束日期"/>
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
|
||||
<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-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">
|
||||
<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="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" align="center">
|
||||
<el-table-column label="审批情况内容" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row 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-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" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button :disabled="Number(scope.row.审批情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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"/>
|
||||
<span v-show="supplierValue">累计合同总额:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>
|
||||
<span v-show="supplierValue">累计付款:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>
|
||||
<span v-show="supplierValue">累计欠款:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="离线合同请款" center style="min-height: 300px" width="1200px">
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable 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="searchTable01()">查询</el-button>
|
||||
<el-table v-loading="" :data="tableData01" highlight-current-row 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="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购员 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" width="100" prop="合同总额">
|
||||
<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" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :max="scope.row.合同总额 - scope.row.已付金额" :disabled="(scope.row.合同总额 - scope.row.已付金额) === 0" v-model="scope.row.请款金额" controls-position="right" size="mini" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" readonly size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchRequestFund, searchSupplier, searchOfflineContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/OfflineContractRequestFund1'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 离线合同
|
||||
data() {
|
||||
return {
|
||||
totalSum: 0,
|
||||
totalPay: 0,
|
||||
totalDebt: 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: [],
|
||||
tableData2: [],
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
total2: 0,
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
dialogVisible2: false,
|
||||
SUM: 0,
|
||||
contractGroup: [],
|
||||
sumGroup: [],
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询请款表
|
||||
this.tableData2 = []
|
||||
let check1, check2
|
||||
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
|
||||
this.supplierValue ? check2 = 1 : check2 = 0
|
||||
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
this.totalSum = 0
|
||||
this.totalPay = 0
|
||||
searchOfflineContract(check2, this.supplierValue).then(response => {
|
||||
response.data.map(data => {
|
||||
this.totalSum += data.合同总额
|
||||
this.totalPay += data.已付金额
|
||||
})
|
||||
this.totalDebt = this.totalSum - this.totalPay
|
||||
})
|
||||
},
|
||||
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 = []
|
||||
this.tableData02 = []
|
||||
},
|
||||
getSummaries(param) { // 合计
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 7) {
|
||||
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
|
||||
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)
|
||||
sums[index] += ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
searchTable01() { // 查询待请款
|
||||
this.tableData01 = []
|
||||
if (this.supplierValue) {
|
||||
this.contractGroup = []
|
||||
let check
|
||||
this.supplierValue ? check = 1 : check = 0
|
||||
searchOfflineContract(check, this.supplierValue).then(response => {
|
||||
response.data.map(data => {
|
||||
if (Number(data.离线合同状态) === 2) {
|
||||
this.tableData01.push(data)
|
||||
}
|
||||
})
|
||||
this.tableData01.map(v => {
|
||||
this.$set(v, '请款金额', 0)
|
||||
v.请款金额 = v.合同总额 - v.已付金额
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择供应商')
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.SUM = 0
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
console.log(val)
|
||||
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 if (response.data[0].result === '已审批') {
|
||||
this.searchTable1()
|
||||
this.$message.error('已审批,操作失败')
|
||||
} 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>
|
||||
@@ -0,0 +1,613 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNum" placeholder="发票号" size="small" clearable/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
|
||||
<span>传送人:</span>
|
||||
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson1"
|
||||
: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-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="200px">
|
||||
<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="350px">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="450" 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="采购单名称">
|
||||
<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" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
style="margin-left: 10px"
|
||||
@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="供应商名称">
|
||||
<el-input v-model="form1.供应商名称" size="small" readonly>
|
||||
<el-button slot="append" icon="el-icon-search" @click="dialogVisible=true"/>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购单号" prop="contractNum">
|
||||
<el-select :disabled="title1==='编辑'" v-model="form1.contractNum" placeholder="采购单号" size="small" multiple filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNums"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</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 selectPerson1"
|
||||
: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>
|
||||
<el-dialog :visible.sync="dialogVisible" 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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initPerson, initPerson1, searchSupplier, initPurchase, searchInvoiceDetail } from '@/api/WorkshopProcurement/OutsourcingMaterialsInvoice'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: '', // 发票交接单
|
||||
data() {
|
||||
return {
|
||||
contractNumValue: '',
|
||||
contractNums: [],
|
||||
invoiceNum: '',
|
||||
invoiceTime: '',
|
||||
transmitValue: this.id,
|
||||
selectPerson: [], // 接收人
|
||||
selectPerson1: [], // 传送人
|
||||
recipientValue: '',
|
||||
contractNum: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
tableData01: [],
|
||||
gridData: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
supplierCheck1: 0,
|
||||
supplierCheck2: 0,
|
||||
supplierCheck3: 0,
|
||||
supplierCheck4: 0,
|
||||
supplierCheck5: 0,
|
||||
supplierCheck6: 0,
|
||||
supplierCheck7: 0,
|
||||
supplierCheck8: 0,
|
||||
supplierCheck9: 0,
|
||||
supplierCheck10: 0,
|
||||
supplierCheck11: 0,
|
||||
supplierCheck12: 0,
|
||||
supplierName0: '', // 供应商名称(外面的)
|
||||
supplierName: '', // 供应商名称
|
||||
supplierValue: '', // 供应商流水号
|
||||
goodTime: '', // 货期
|
||||
enterpriseNature: '', // 企业性质
|
||||
createDate: '', // 创立日期
|
||||
registeredCapital: '', // 注册资本
|
||||
taxNum: '', // 税号
|
||||
EMail: '', // 电子邮箱
|
||||
address: '', // 地址
|
||||
account: '', // 账号
|
||||
openingBank: '', // 开户行
|
||||
phone: '', // 电话号码
|
||||
fax: '', // 传真
|
||||
dialogVisible: false,
|
||||
dialogVisible1: false,
|
||||
title1: '',
|
||||
form1: {
|
||||
供应商名称: '',
|
||||
供应商流水号: '',
|
||||
contractNum: [],
|
||||
invoiceNumValue: '',
|
||||
invoiceTime: '',
|
||||
money: '',
|
||||
sendPersonValue: '',
|
||||
receivePersonValue: '',
|
||||
remark: ''
|
||||
},
|
||||
rules1: {
|
||||
contractNum: [
|
||||
{ required: true, message: '请选择采购单号', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initPerson().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.selectPerson.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson1().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.selectPerson1.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
initPurchase().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNums.push({
|
||||
label: response.data[i].采购单号,
|
||||
value: response.data[i].采购计划流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName0 ? this.check2 = 1 : this.check2 = 0
|
||||
this.transmitValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.recipientValue ? this.check4 = 1 : this.check4 = 0
|
||||
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.invoiceNum, this.check2, this.supplierName0, this.check3, this.transmitValue, this.check4, this.recipientValue).then(response => {
|
||||
console.log(response.data)
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
response.data.rows[j].开票金额 = parseInt(response.data.rows[j].开票金额 * 100) / 100
|
||||
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()
|
||||
},
|
||||
searchTable02(row) { // 查看详情(发票包含的合同)
|
||||
searchInvoiceDetail(row.发票流水号).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
},
|
||||
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.form1.供应商流水号 = row.供应商流水号
|
||||
this.form1.供应商名称 = 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.dialogVisible = false
|
||||
},
|
||||
addTable1() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '增加'
|
||||
this.dialogVisible1 = true
|
||||
this.form1.供应商名称 = ''
|
||||
this.form1.供应商流水号 = ''
|
||||
this.form1.contractNum = []
|
||||
this.contractNumValue = ''
|
||||
this.form1.invoiceTime = ''
|
||||
this.form1.money = ''
|
||||
this.form1.sendPersonValue = parseInt(this.id)
|
||||
this.form1.receivePersonValue = ''
|
||||
this.form1.remark = ''
|
||||
},
|
||||
submitAdd1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.contractNumValue = this.form1.contractNum[0]
|
||||
for (let h = 1; h < this.form1.contractNum.length; h++) {
|
||||
this.contractNumValue += ',' + this.form1.contractNum[h]
|
||||
}
|
||||
addInvoice(this.form1.contractNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark, this.form1.供应商流水号, this.contractNumValue).then(response => {
|
||||
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
|
||||
}
|
||||
})
|
||||
},
|
||||
editTable1(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '编辑'
|
||||
console.log(row)
|
||||
this.dialogVisible1 = true
|
||||
this.form1.contractNum = (row.采购计划流水号.split(',')).map(Number)
|
||||
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.备注
|
||||
this.form1.供应商流水号 = row.供应商
|
||||
this.form1.供应商名称 = 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) {
|
||||
console.log(this.form1.remark)
|
||||
editInvoice(this.form1.invoiceNumValue, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark, this.form1.供应商流水号).then(response => {
|
||||
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>
|
||||
1177
src/views/WorkshopProcurement/OutsourcingProcessPlanning/index.vue
Normal file
1177
src/views/WorkshopProcurement/OutsourcingProcessPlanning/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
480
src/views/WorkshopProcurement/OutsourcingQuotaSetting/index.vue
Normal file
480
src/views/WorkshopProcurement/OutsourcingQuotaSetting/index.vue
Normal file
@@ -0,0 +1,480 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div style="margin-top: -10px;">
|
||||
<el-radio-group v-model="radio" style="margin: 10px;" @change="clearDetail">
|
||||
<el-radio :label="0">未编制</el-radio>
|
||||
<el-radio :label="1">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
<span style="margin: 10px">定额员:</span>
|
||||
<el-select v-model="personValue" size="small" style="width: 100px" placeholder="定额员">
|
||||
<el-option
|
||||
v-for="item in person"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>机床编号:</span>
|
||||
<el-select
|
||||
v-model="machineValue"
|
||||
placeholder="机床编号"
|
||||
size="small"
|
||||
style="width:100px"
|
||||
clearable
|
||||
@change="searchGroup()">
|
||||
<el-option
|
||||
v-for="item in Machine"
|
||||
: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="groupNumberValue"
|
||||
placeholder="组号"
|
||||
size="small"
|
||||
style="width:100px"
|
||||
clearable
|
||||
@change="changeGroup()">
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>图号/名称:</span>
|
||||
<el-input
|
||||
v-model="partNum"
|
||||
clearable
|
||||
style="width:120px"
|
||||
placeholder="请双击选择"
|
||||
size="small"
|
||||
@change="clear()"
|
||||
@dblclick.native="searchParts"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin: 10px" @click="searchDetail()">查询</el-button>
|
||||
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">工艺调整
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span>种类:</span>
|
||||
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
|
||||
<span>名称/型号:</span>
|
||||
<el-input v-model="partName" placeholder="名称" size="small" readonly style="width:115px"/>
|
||||
<span>材质:</span>
|
||||
<el-input v-model="materialName" placeholder="材质" size="small" style="width:120px" readonly/>
|
||||
<span>规格:</span>
|
||||
<el-input v-model="spec" style="width:100px" size="small" placeholder="规格" readonly/>
|
||||
<span>投产总数量:</span>
|
||||
<el-input v-model="batchNum" placeholder="总数量" readonly size="small" style="width:80px;margin-top:10px;"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div>
|
||||
<el-table v-loading="listLoading" :data="tableData" border style="width: 100%;" height="550px">
|
||||
<el-table-column type="index" label="序号" width="50" align="center"/>
|
||||
<el-table-column prop="name" label="工艺名称" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺名称" style="width:150px" placeholder="工艺名称" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="request" label="工艺要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺要求" :rows="1" placeholder="工艺要求" type="textarea" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="singleton" label="单件" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单件定额工时" :disabled="disabled" style="width:150px" placeholder="单件" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="Settlement" label="准结" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.准结定额工时" :disabled="disabled" style="width:150px" placeholder="准结" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button v-if="radio === 0" type="primary" icon="el-icon-cjn-09" size="small" style="float:right;margin: 10px" @click="saveApprove">保存</el-button>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
:visible.sync="dialogFormVisible4"
|
||||
title="图号"
|
||||
center
|
||||
style="min-height: 300px">
|
||||
<el-table
|
||||
:data="tableData8"
|
||||
size="mini"
|
||||
style="width: 97%;max-height: 300px"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectParts">
|
||||
<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="1"
|
||||
:page-sizes="[10, 20]"
|
||||
:page-size="10"
|
||||
:pager-count="5"
|
||||
:total="total"
|
||||
small
|
||||
layout="sizes, prev, pager, next"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
:visible.sync="dialogFormVisible5"
|
||||
title="图号"
|
||||
center
|
||||
style="min-height: 300px">
|
||||
<el-table
|
||||
:data="tableData9"
|
||||
size="mini"
|
||||
style="width: 97%;max-height: 300px"
|
||||
height="300"
|
||||
highlight-current-row
|
||||
border
|
||||
@row-click="selectParts1">
|
||||
<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="1"
|
||||
:page-sizes="[10, 20]"
|
||||
:page-size="10"
|
||||
:pager-count="5"
|
||||
:total="total"
|
||||
small
|
||||
layout="total, sizes, prev, pager, next"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submit()">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPerson, getPartnames1, getProject, getGroup, update, getProcedure, returnEdit, saveApprove } from '@/api/WorkshopProcurement/OutsourcingQuotaSetting'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
projectNameValue: '',
|
||||
projectName: [],
|
||||
machineValue: '',
|
||||
Machine: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
groupNum: '',
|
||||
groupType: '',
|
||||
tableData8: [],
|
||||
tableData9: [],
|
||||
ProcessFlowNumber: '',
|
||||
spec: '', // 规格
|
||||
total: 0,
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
isShow2: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible5: false,
|
||||
listLoading: false,
|
||||
personValue: '',
|
||||
person: [],
|
||||
radio: 0, // 第一组
|
||||
partNum: '', // 零件号
|
||||
typeValue: '', // 种类
|
||||
partName: '', // 零件名称
|
||||
batchNum: '', // 投产总数量
|
||||
materialName: '', // 材质
|
||||
tableData: [],
|
||||
isShow: false // 2的可见性
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() { // 初始化未编制零件号
|
||||
getPerson().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
getProject(0).then(response => { // 初始化机床项目
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
name: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
clear() {
|
||||
this.typeValue = ''
|
||||
this.partName = ''
|
||||
this.partNum = ''
|
||||
this.materialName = ''
|
||||
this.spec = ''
|
||||
this.batchNum = ''
|
||||
},
|
||||
clearDetail() {
|
||||
if (this.radio === 1) {
|
||||
this.isShow2 = true
|
||||
} else {
|
||||
this.isShow2 = false
|
||||
}
|
||||
this.checked = false
|
||||
getProject(this.radio).then(response => { // 初始化机床项目
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machine.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
name: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
this.machineValue = ''
|
||||
this.Machine = []
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
this.partNum = ''
|
||||
this.typeValue = ''
|
||||
this.partName = ''
|
||||
this.materialName = ''
|
||||
this.spec = ''
|
||||
this.batchNum = ''
|
||||
this.tableData = []
|
||||
},
|
||||
searchDetail() { // 查主表的信息
|
||||
if (this.partNum === '' || this.partNum === null) {
|
||||
this.$message.error('请选择零件作为查询对象')
|
||||
} else {
|
||||
getProcedure(this.ProcessFlowNumber).then(response => {
|
||||
this.tableData = []
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].工艺编号 === null) {
|
||||
response.data[i].工艺编号 = 0
|
||||
}
|
||||
if (response.data[i].工艺要求 === null) {
|
||||
response.data[i].工艺要求 = ''
|
||||
}
|
||||
}
|
||||
this.tableData = response.data
|
||||
})
|
||||
}
|
||||
},
|
||||
returnEdit() { // 定额修改
|
||||
if (this.partNum === '' || this.partNum === null) {
|
||||
this.$message.error('请选择零件')
|
||||
} else {
|
||||
this.$confirm('此操作会将该零件打回至未编制状态, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
returnEdit(this.ProcessFlowNumber).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('打回成功')
|
||||
this.ProcessFlowNumber = ''
|
||||
this.partNum = ''
|
||||
this.tableData = []
|
||||
} else {
|
||||
this.$message.error('打回失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
searchGroup() {
|
||||
this.clear()
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
getGroup(this.radio, this.machineValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
changeGroup() {
|
||||
this.clear()
|
||||
for (let i = 0; i < this.groupNumber.length; i++) {
|
||||
if (this.groupNumber[i].value === this.groupNumberValue) {
|
||||
this.groupNum = this.groupNumber[i].label
|
||||
}
|
||||
}
|
||||
if (this.groupNum.indexOf('MX') !== -1) {
|
||||
this.groupType = 0
|
||||
} else {
|
||||
this.groupType = 1
|
||||
}
|
||||
},
|
||||
selectParts(row) {
|
||||
this.ProcessFlowNumber = row.工艺流水号
|
||||
if (row.零件类型 === '1') {
|
||||
this.typeValue = '标准件'
|
||||
} else if (row.零件类型 === '2') {
|
||||
this.typeValue = '外购件'
|
||||
}
|
||||
this.partName = row.物料型号
|
||||
this.spec = row.物料规格
|
||||
this.batchNum = row.批次数量
|
||||
this.partNum = row.物料名称
|
||||
},
|
||||
selectParts1(row) {
|
||||
this.ProcessFlowNumber = row.工艺流水号
|
||||
if (row.零件类型 === '3') {
|
||||
this.typeValue = '基本件'
|
||||
}
|
||||
this.partName = row.物料名称
|
||||
this.materialName = row.材料
|
||||
this.batchNum = row.批次数量
|
||||
this.partNum = row.零件图号
|
||||
},
|
||||
searchParts() { // 根据条件查零件号
|
||||
if (this.groupNumberValue !== '') {
|
||||
if (this.radio === 0) { // 未编制
|
||||
this.disabled = false
|
||||
this.isShow2 = false
|
||||
} else { // 已编制
|
||||
this.isShow = true
|
||||
this.isShow2 = true
|
||||
this.disabled = true
|
||||
}
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = 10
|
||||
getPartnames1(this.radio, this.groupNumberValue, this.groupType, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (this.groupType === 0) {
|
||||
this.dialogFormVisible5 = true
|
||||
this.tableData9 = response.data.rows
|
||||
console.log(response.data)
|
||||
this.total = response.data.total
|
||||
} else {
|
||||
this.dialogFormVisible4 = true
|
||||
this.tableData8 = response.data.rows
|
||||
this.total = response.data.total
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请先选择组号')
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
getPartnames1(this.radio, this.groupNumberValue, this.groupType, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (this.groupType === 0) {
|
||||
this.dialogFormVisible5 = true
|
||||
this.tableData9 = response.data.rows
|
||||
this.total = response.data.total
|
||||
} else {
|
||||
this.dialogFormVisible4 = true
|
||||
this.tableData8 = response.data.rows
|
||||
this.total = response.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
getPartnames1(this.radio, this.groupNumberValue, this.groupType, this.pageCurrent, this.pageSize).then(response => {
|
||||
if (this.groupType === 0) {
|
||||
this.dialogFormVisible5 = true
|
||||
this.tableData9 = response.data.rows
|
||||
this.total = response.data.total
|
||||
} else {
|
||||
this.dialogFormVisible4 = true
|
||||
this.tableData8 = response.data.rows
|
||||
this.total = response.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
update(row.外购件工序流水号, row.单件定额工时, row.准结定额工时).then(response => {
|
||||
})
|
||||
},
|
||||
submit() {
|
||||
this.dialogFormVisible4 = false
|
||||
this.dialogFormVisible5 = false
|
||||
},
|
||||
saveApprove() { // 保存
|
||||
saveApprove(this.ProcessFlowNumber, this.personValue).then(response => {
|
||||
if (response.data.length === 1) {
|
||||
this.partNum = ''
|
||||
this.typeValue = ''
|
||||
this.partName = ''
|
||||
this.batchNum = ''
|
||||
this.materialName = ''
|
||||
this.spec = ''
|
||||
this.tableData = []
|
||||
this.$message.success('保存成功')
|
||||
} else {
|
||||
this.$message.error('保存失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.doing-row4{
|
||||
background: #f0f9eb;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
318
src/views/WorkshopProcurement/OutsourcingStockArrival/index.vue
Normal file
318
src/views/WorkshopProcurement/OutsourcingStockArrival/index.vue
Normal file
@@ -0,0 +1,318 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>采购单号:</span>
|
||||
<el-select v-model="purchaseOrderValue" placeholder="采购单号" size="small" clearable filterable>
|
||||
<el-option
|
||||
v-for="item in purchaseOrder"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" style="width: 200px" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent=1;pageSize=10;total=0;searchTable()">查询</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%;max-height: 460px;"
|
||||
height="270"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
@row-click="searchTable1">
|
||||
<el-table-column label="单号" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购单名称" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总价" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.总价" size="mini" style="width:100px" @change="totalChange(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单日期" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.下单日期.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划完成日期" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划完成日期.split(' ')[0] }}
|
||||
</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>
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" :summary-method="getSummaries" border style="max-height: 300px;" height="400px" size="mini" show-summary>
|
||||
<el-table-column label="状态" align="center" width="100" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="small">未到货</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否到货)===1" type="primary" size="small">已到货</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编码" align="center" min-width="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="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.备注1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量1 }}
|
||||
</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.批次数量 * scope.row.单价 * scope.row.重量1 }}
|
||||
</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-goods" @click="OpenArrival(scope.row)">到货</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogVisible" title="到货" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="100px">
|
||||
<el-row>
|
||||
<el-form-item label="重量" prop="重量">
|
||||
<el-input v-model="form.重量" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="单价" prop="单价">
|
||||
<el-input v-model="form.单价" size="small" style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitArrival">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initPurchaseOrder, searchPurchaseOrder, searchMateriel, Arrival, totalChange } from '@/api/WorkshopProcurement/OutsourcingStockArrival'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
purchaseOrderValue: '',
|
||||
purchaseOrder: [],
|
||||
supplierName0: '',
|
||||
totalMoney: 0,
|
||||
check: 0,
|
||||
chekc1: 0,
|
||||
num: '',
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
loading: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
disable: true,
|
||||
dialogVisible: false,
|
||||
form: {
|
||||
采购计划明细流水号: '',
|
||||
重量: '',
|
||||
单价: ''
|
||||
},
|
||||
rules: {
|
||||
重量: [{ required: true, message: '请填写重量' }],
|
||||
单价: [{ required: true, message: '请填写单价' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initPurchaseOrder(0, this.purchaseOrderValue, 0, this.supplierName0).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.purchaseOrder.push({
|
||||
label: response.data[i].采购单号,
|
||||
value: response.data[i].采购单号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() { // 查询外购备料
|
||||
this.loading = true
|
||||
this.purchaseOrderValue ? this.check = 1 : this.check = 0
|
||||
this.supplierName0 ? this.check1 = 1 : this.check1 = 0
|
||||
searchPurchaseOrder(this.pageCurrent, this.pageSize, this.check, this.purchaseOrderValue, this.check1, this.supplierName0).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
searchTable1(row) {
|
||||
this.num = row.采购计划流水号
|
||||
this.totalMoney = 0
|
||||
searchMateriel(this.num).then(response => {
|
||||
this.tableData1 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.totalMoney += (response.data[i].批次数量 * response.data[i].重量1 * response.data[i].单价)
|
||||
}
|
||||
})
|
||||
},
|
||||
totalChange(row) {
|
||||
totalChange(row.采购计划流水号, row.总价).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
},
|
||||
OpenArrival(row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.dialogVisible = true
|
||||
this.form.采购计划明细流水号 = row.采购计划明细流水号
|
||||
this.form.重量 = row.重量1
|
||||
this.form.单价 = row.单价
|
||||
},
|
||||
submitArrival() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
Arrival(this.form.采购计划明细流水号, this.form.重量, this.form.单价).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('到货成功')
|
||||
searchMateriel(this.num).then(response => {
|
||||
this.tableData1 = response.data
|
||||
this.totalMoney = 0
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.totalMoney += (response.data[i].批次数量 * response.data[i].重量1 * response.data[i].单价)
|
||||
}
|
||||
})
|
||||
this.dialogVisible = false
|
||||
} else { this.$message.error('到货失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 7) {
|
||||
sums[index] = '总重量'
|
||||
return
|
||||
} else if (index === 8) {
|
||||
const values = data.map(item => Number(item['重量1'] * item['批次数量']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' kg'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 9) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 10) {
|
||||
sums[index] = this.totalMoney
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
184
src/views/WorkshopProcurement/PayStateSearch/index.vue
Normal file
184
src/views/WorkshopProcurement/PayStateSearch/index.vue
Normal file
@@ -0,0 +1,184 @@
|
||||
<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">
|
||||
{{ 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.含税总金额 - scope.row.欠款金额 }}
|
||||
</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="(parseInt(10000*(scope.row.含税总金额 - scope.row.欠款金额)/scope.row.含税总金额)) / 100"
|
||||
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/WorkshopProcurement/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 => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
||||
response.data.rows[j].欠款金额 = parseInt(response.data.rows[j].欠款金额 * 100) / 100
|
||||
}
|
||||
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>
|
||||
@@ -0,0 +1,521 @@
|
||||
<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="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<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="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">
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.含税总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预付款" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付款 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="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:60%;margin-left: 18%">
|
||||
<el-card>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="5" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
<td colspan="1" rowspan="3" style="width: 119px"><img id="img" alt=""></td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="3" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="2" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="3" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="2" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px;line-height: 30px">根据《中华人民共和国合同法》的有关规定,经供需双方友好协商,在平等自愿的基础上定立本合同,以便供需双方共同遵守。</div>
|
||||
<div style="line-height: 30px">一、 产品名称、规格型号、材质、数量、单价和交货期:</div>
|
||||
<table id="50" 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>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
<!--</tbody>-->
|
||||
<!--<!–<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>–>-->
|
||||
<!--<!–<td colspan="1" align="center">总价</td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="7">总价: (人民币){{ RMB }}(未税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="7">总价: (人民币){{ RMB1 }}(含{{ taxRate }}增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div style="line-height: 30px">以上价格为含税增值税价格,供方开具真实有效的{{ taxRate }}增值税发票</div>
|
||||
<div id="23" style="line-height: 30px"/>
|
||||
<table id="66" cellspacing="0px" align="center" border width="100%" style="margin-top: 30px">
|
||||
<tbody id="67">
|
||||
<tr style="height: 35px">
|
||||
<td colspan="4" align="center">供 方</td>
|
||||
<td colspan="4" align="center">需 方</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">单位名称(章)</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">单位名称(章)</th>
|
||||
<td style="width: 35%" colspan="3" align="center">江苏高精</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">法定代表人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">法定代表人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">委托代理人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">委托代理人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">电话</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">电话</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">传真</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">传真</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">开户银行</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">开户银行</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">账号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">账号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">税号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">税号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">邮政编码</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">邮政编码</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="line-height: 25px;margin-top: 10px">签订时间:____年__月__日</div>
|
||||
<div style="line-height: 25px">有效期限:____年__月__日至____年__月__日</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购员选择" center style="min-height: 300px;" width="40%">
|
||||
<el-table
|
||||
:data="tableData02"
|
||||
size="small"
|
||||
border
|
||||
style="width: 100%;min-height:300px"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="clickBuyer">
|
||||
<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 slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="submitDisable" type="primary" size="small" icon="el-icon-check" @click="submitSelectBuyer">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<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/WorkshopProcurement/ProcurementContractApproval'
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
RMB: '',
|
||||
TotalAmount: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
startEndDate: '',
|
||||
contract: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
ProcurementContractNum: '',
|
||||
buyerName: '',
|
||||
buyerValue: '',
|
||||
supplier: '',
|
||||
supplierName: '',
|
||||
supplierValue: '',
|
||||
taxRate: '',
|
||||
TotalAmount1: '',
|
||||
RMB1: '',
|
||||
total1: 0,
|
||||
QGNUM: '',
|
||||
type: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
loading1: false,
|
||||
dialogVisible1: false,
|
||||
dialogVisible3: false,
|
||||
form1: {},
|
||||
returns: [],
|
||||
returns1: [],
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
dialogVisible2: false,
|
||||
approval: [
|
||||
{
|
||||
value: 1,
|
||||
label: '是'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '否'
|
||||
}
|
||||
],
|
||||
disabled: true,
|
||||
form2: {
|
||||
审批是否通过: '',
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {
|
||||
审批是否通过: [{ required: true, message: '请选择', trigger: 'change' }]
|
||||
},
|
||||
tableData2: [],
|
||||
textarea: ``,
|
||||
contractValue: '' // 显示表2和变更合同用的变量
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.contractNum = []
|
||||
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() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
})
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
this.buyerName = row.姓名
|
||||
this.buyerValue = row.人员编号
|
||||
},
|
||||
submitSelectBuyer() { // 确定
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
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.buyerName ? 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.buyerValue, this.check4, this.supplierName).then(response => {
|
||||
console.log(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) {
|
||||
console.log(row)
|
||||
this.dialogVisible3 = true
|
||||
this.ProcurementContractNum = row.采购合同流水号
|
||||
this.QGNUM = row.请购单流水号
|
||||
},
|
||||
selectChange() {
|
||||
if (this.form2.审批是否通过 === 2) {
|
||||
this.disabled = false
|
||||
} else if (this.form2.审批是否通过 === 1) {
|
||||
this.disabled = true
|
||||
}
|
||||
},
|
||||
submitApproval(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
submitApproval(this.ProcurementContractNum, this.form2.审批是否通过, this.form2.未通过原因, this.QGNUM).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.type = row.模板类型
|
||||
console.log(row)
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
this.taxRate = row.税率
|
||||
this.RMB = row.总金额_文本
|
||||
this.TotalAmount = row.总金额
|
||||
this.TotalAmount1 = parseInt((row.含税总金额) * 100) / 100
|
||||
this.RMB1 = row.含税总金额_文本
|
||||
document.getElementById('23').innerText = this.textarea
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
type: 'image/jpeg',
|
||||
rendererOpts: {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
QRCode.toDataURL(row.采购合同流水号, opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
img.src = url
|
||||
})
|
||||
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>' + '<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].物料计划到货时间.split(' ')[0]
|
||||
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].单价
|
||||
document.getElementsByClassName('tableData')[j].children[7].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;
|
||||
}
|
||||
.tableData1{
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,579 @@
|
||||
<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="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<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">
|
||||
<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">
|
||||
<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">
|
||||
<el-button type="warning" size="mini" @click="exportTable()">打印</el-button>
|
||||
<el-button type="danger" size="mini" @click="Disable(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>
|
||||
<div id="export">
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="5" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
<td colspan="1" rowspan="3" style="width: 119px"><img id="img" alt=""></td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="3" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="2" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="3" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="2" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px;line-height: 30px">根据《中华人民共和国合同法》的有关规定,经供需双方友好协商,在平等自愿的基础上定立本合同,以便供需双方共同遵守。</div>
|
||||
<div style="line-height: 30px">一、 产品名称、规格型号、材质、数量、单价和交货期:</div>
|
||||
<table id="50" 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>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
<!--</tbody>-->
|
||||
<!--<!–<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>–>-->
|
||||
<!--<!–<td colspan="1" align="center">总价</td>–>-->
|
||||
<!--<!–</tr>–>-->
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="7">总价: (人民币){{ RMB }}(未税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="7">总价: (人民币){{ RMB1 }}(含{{ taxRate }}增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div style="line-height: 30px">以上价格为含税增值税价格,供方开具真实有效的{{ taxRate }}增值税发票</div>
|
||||
<div id="23" style="line-height: 30px"/>
|
||||
<table id="66" cellspacing="0px" align="center" border width="100%" style="margin-top: 30px">
|
||||
<tbody id="67">
|
||||
<tr style="height: 35px">
|
||||
<td colspan="4" align="center">供 方</td>
|
||||
<td colspan="4" align="center">需 方</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">单位名称(章)</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">单位名称(章)</th>
|
||||
<td style="width: 35%" colspan="3" align="center">江苏高精</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">法定代表人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">法定代表人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">委托代理人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">委托代理人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">电话</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">电话</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">传真</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">传真</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">开户银行</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">开户银行</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">账号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">账号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">税号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">税号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr v-if="type==='1'" style="height: 35px">
|
||||
<th style="width: 15%">邮政编码</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">邮政编码</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="line-height: 25px;margin-top: 10px">签订时间:____年__月__日</div>
|
||||
<div style="line-height: 25px">有效期限:____年__月__日至____年__月__日</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购员选择" center style="min-height: 300px;" width="40%">
|
||||
<el-table
|
||||
:data="tableData02"
|
||||
size="small"
|
||||
border
|
||||
style="width: 100%;min-height:300px"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="clickBuyer">
|
||||
<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 slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="submitDisable" type="primary" size="small" icon="el-icon-check" @click="submitSelectBuyer">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initBuyer, searchTable1, searchTable2, Disable } from '@/api/WorkshopProcurement/ProcurementContractEnquiry'
|
||||
import $ from 'jquery'
|
||||
import QRCode from 'qrcode'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
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: '',
|
||||
taxRate: '',
|
||||
TotalAmount1: '',
|
||||
RMB1: '',
|
||||
type: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
ProcurementContractNum: '',
|
||||
buyerName: '',
|
||||
buyerValue: '',
|
||||
supplier: '',
|
||||
supplierName: '',
|
||||
supplierValue: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
loading1: false,
|
||||
dialogVisible1: false,
|
||||
form1: {},
|
||||
goodTime: '',
|
||||
returns: [],
|
||||
returns1: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
dialogVisible2: false,
|
||||
textarea: ``,
|
||||
contractValue: '' // 显示表2和变更合同用的变量
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.contractNum = []
|
||||
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() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
})
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
this.buyerName = row.姓名
|
||||
this.buyerValue = row.人员编号
|
||||
},
|
||||
submitSelectBuyer() { // 确定
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
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
|
||||
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.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++) {
|
||||
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'
|
||||
}
|
||||
},
|
||||
Disable(row) {
|
||||
this.$confirm('此操作将永久禁用该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
Disable(row.采购合同流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('禁用成功')
|
||||
this.searchTable1()
|
||||
} else {
|
||||
this.$message.error('禁用失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消禁用'
|
||||
})
|
||||
})
|
||||
},
|
||||
exportTable() {
|
||||
const htmlNode = $('#export').html()
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.children().not('script').show()
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.type = row.模板类型
|
||||
console.log(this.type)
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
this.taxRate = row.税率
|
||||
this.RMB = row.总金额_文本
|
||||
if (row.总金额 === '0') {
|
||||
this.TotalAmount = ''
|
||||
this.TotalAmount1 = ''
|
||||
} else {
|
||||
this.TotalAmount = row.总金额
|
||||
this.TotalAmount1 = parseInt((row.含税总金额) * 100) / 100
|
||||
}
|
||||
this.RMB1 = row.含税总金额_文本
|
||||
document.getElementById('23').innerText = this.textarea
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
const opts = {
|
||||
errorCorrectionLevel: 'H',
|
||||
type: 'image/jpeg',
|
||||
rendererOpts: {
|
||||
quality: 0.3
|
||||
}
|
||||
}
|
||||
QRCode.toDataURL(row.采购合同流水号, opts, function(err, url) {
|
||||
if (err) throw err
|
||||
const img = document.getElementById('img')
|
||||
img.src = url
|
||||
})
|
||||
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>' + '<td colspan="1" align="center"></td>'
|
||||
$('#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].物料计划到货时间.split(' ')[0]
|
||||
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].单价
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
// searchTable3(this.contractValue).then(response => {
|
||||
// this.returns1 = response.data
|
||||
// const children1 = document.getElementsByClassName('tableData1')
|
||||
// const parent1 = document.getElementById('51')
|
||||
// if (children1.length !== 0) {
|
||||
// for (let i = children1.length - 1; i >= 0; i--) {
|
||||
// parent1.removeChild(children1[i])
|
||||
// }
|
||||
// }
|
||||
// const tr = []
|
||||
// for (let i = 0; i < this.returns1.length; i++) {
|
||||
// tr[i] = document.createElement('tr')
|
||||
// tr[i].setAttribute('class', 'tableData1')
|
||||
// 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>' + '<td colspan="1" align="center"></td>'
|
||||
// $('#tableHead1').after(tr[i])
|
||||
// }
|
||||
// for (let j = 0; j < this.returns1.length; j++) {
|
||||
// if (response.data[j].备注 === null) {
|
||||
// response.data[j].备注 = ''
|
||||
// }
|
||||
// if (response.data[j].单价 === 0) {
|
||||
// response.data[j].单价 = ''
|
||||
// }
|
||||
// if (response.data[j].金额 === 0) {
|
||||
// response.data[j].金额 = ''
|
||||
// }
|
||||
// document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
// document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].图号
|
||||
// document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].规格
|
||||
// document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
|
||||
// document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
|
||||
// document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
|
||||
// document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].单价
|
||||
// document.getElementsByClassName('tableData1')[j].children[7].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;
|
||||
}
|
||||
.tableData1{
|
||||
height: 30px;
|
||||
}
|
||||
.el-table .adopt{
|
||||
background: limegreen;
|
||||
}
|
||||
.el-table .NotThrough{
|
||||
background: palevioletred;
|
||||
}
|
||||
</style>
|
||||
230
src/views/WorkshopProcurement/ProjectTotalSearch/index.vue
Normal file
230
src/views/WorkshopProcurement/ProjectTotalSearch/index.vue
Normal file
@@ -0,0 +1,230 @@
|
||||
<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="tableData2" :summary-method="getSummaries1" show-summary border style="width: 100%;max-height: 500px;" height="300px" 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>
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData" :summary-method="getSummaries" show-summary border style="width: 100%;max-height: 500px;" height="300px" 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, searchProjectTotal1, searchProjectTotal2 } from '@/api/WorkshopProcurement/ProjectTotalSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
tableData: [],
|
||||
tableData2: []
|
||||
}
|
||||
},
|
||||
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) {
|
||||
searchProjectTotal1(this.projectValue).then(response => {
|
||||
this.tableData = response.data
|
||||
})
|
||||
searchProjectTotal2(this.projectValue).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择项目')
|
||||
}
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 4) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
} else if (index === 5) {
|
||||
const values = data.map(item => Number(item['金额']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元(未税)'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 6) {
|
||||
sums[index] = parseInt(parseInt(sums[5]) * 1.16 * 100) / 100 + ' 元(含税)'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
getSummaries1(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 4) {
|
||||
sums[index] = '合计'
|
||||
return
|
||||
} else if (index === 5) {
|
||||
const values = data.map(item => Number(item['金额']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' 元(未税)'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 6) {
|
||||
sums[index] = parseInt(parseInt(sums[5]) * 1.16 * 100) / 100 + ' 元(含税)'
|
||||
}
|
||||
})
|
||||
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>
|
||||
855
src/views/WorkshopProcurement/PurchaseContractChange/index.vue
Normal file
855
src/views/WorkshopProcurement/PurchaseContractChange/index.vue
Normal file
@@ -0,0 +1,855 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div style="width: 48%; float: left;margin-left: 20px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" style="width:150px" 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="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=0"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" style="width:120px" 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-row>
|
||||
<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">
|
||||
{{ 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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.预付款 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @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:715px">
|
||||
<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 style="margin-top: 20px;line-height: 25px">根据《中华人民共和国合同法》的有关规定,经供需双方友好协商,在平等自愿的基础上定立本合同,以便供需双方共同遵守。</div>
|
||||
<div style="line-height: 25px">一、 产品名称、规格型号、材质、数量、单价和交货期:</div>
|
||||
<table id="50" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="51">
|
||||
<tr id="tableHead2" style="height: 40px">
|
||||
<td colspan="2" 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>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="2" 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>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="8">总价: (人民币){{ RMB }} </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="8">总价: (人民币){{ RMB3 }}(含{{ taxRate }}增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount3 }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div style="line-height: 25px">以上价格为含税增值税价格,供方开具真实有效的16%增值税发票</div>
|
||||
<div id="23" style="line-height: 25px"/>
|
||||
<table id="66" cellspacing="0px" align="center" border width="100%" style="margin-top: 30px">
|
||||
<tbody id="67">
|
||||
<tr style="height: 35px">
|
||||
<td colspan="4" align="center">供 方</td>
|
||||
<td colspan="4" align="center">需 方</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">单位名称(章)</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">单位名称(章)</th>
|
||||
<td style="width: 35%" colspan="3" align="center">江苏高精</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">法定代表人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">法定代表人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">委托代理人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">委托代理人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">电话</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">电话</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">传真</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">传真</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">开户银行</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">开户银行</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">账号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">账号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">税号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">税号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">邮政编码</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">邮政编码</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="line-height: 25px;margin-top: 10px">签订时间:____年__月__日</div>
|
||||
<div style="line-height: 25px">有效期限:____年__月__日至____年__月__日</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 48%; float: right; margin-right: 20px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue1" placeholder="合同号" size="small" style="width:150px" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum1"
|
||||
: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="buyerName1" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName1" placeholder="供应商" size="small" style="width:120px" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="total2=0;pageCurrent2=1;pageSize2=10;searchTable3()">查询变更记录</el-button>
|
||||
</el-row>
|
||||
<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" 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">
|
||||
<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>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<div style="width:715px">
|
||||
<el-card>
|
||||
<table id="3" 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">{{ contract1 }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier1 }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="margin-top: 20px;line-height: 25px">根据《中华人民共和国合同法》的有关规定,经供需双方友好协商,在平等自愿的基础上定立本合同,以便供需双方共同遵守。</div>
|
||||
<div style="line-height: 25px">一、 产品名称、规格型号、材质、数量、单价和交货期:</div>
|
||||
<table id="52" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="53">
|
||||
<tr id="tableHead3" style="height: 40px">
|
||||
<td colspan="2" 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>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<table id="5" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="6">
|
||||
<tr id="tableHead1" style="height: 40px">
|
||||
<td colspan="2" 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>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="8">总价: (人民币){{ RMB1 }} </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="8">总价: (人民币){{ RMB4 }}(含{{ taxRate1 }}增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount4 }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div style="line-height: 25px">以上价格为含税增值税价格,供方开具真实有效的16%增值税发票</div>
|
||||
<div id="24" style="line-height: 25px"/>
|
||||
<table id="68" cellspacing="0px" align="center" border width="100%" style="margin-top: 30px">
|
||||
<tbody id="69">
|
||||
<tr style="height: 35px">
|
||||
<td colspan="4" align="center">供 方</td>
|
||||
<td colspan="4" align="center">需 方</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">单位名称(章)</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">单位名称(章)</th>
|
||||
<td style="width: 35%" colspan="3" align="center">江苏高精</td>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">法定代表人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">法定代表人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">委托代理人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">委托代理人</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">电话</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">电话</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">传真</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">传真</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">开户银行</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">开户银行</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">账号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">账号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">税号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">税号</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
<tr style="height: 35px">
|
||||
<th style="width: 15%">邮政编码</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
<th style="width: 15%">邮政编码</th>
|
||||
<td style="width: 35%" colspan="3" align="center"/>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="line-height: 25px;margin-top: 10px">签订时间:____年__月__日</div>
|
||||
<div style="line-height: 25px">有效期限:____年__月__日至____年__月__日</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购员选择" center style="min-height: 300px;" width="40%">
|
||||
<el-table
|
||||
:data="tableData02"
|
||||
size="small"
|
||||
border
|
||||
style="width: 100%;min-height:300px"
|
||||
height="300px"
|
||||
highlight-current-row
|
||||
@row-click="clickBuyer">
|
||||
<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 slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="submitDisable" type="primary" size="small" icon="el-icon-check" @click="submitSelectBuyer">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<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-input v-model="form2.变更原因" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" @click="submitContract('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initContract, initContract1, initBuyer, searchTable1, searchTable2, searchTable3, searchTable4, searchTable5, searchTable6, submitContract } from '@/api/WorkshopProcurement/PurchaseContractChange'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
RMB: '',
|
||||
TotalAmount: '',
|
||||
RMB1: '',
|
||||
RMB3: '',
|
||||
RMB4: '',
|
||||
TotalAmount1: '',
|
||||
TotalAmount3: '',
|
||||
TotalAmount4: '',
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
contract: '',
|
||||
contract1: '',
|
||||
taxRate: '',
|
||||
taxRate1: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
contractNumValue1: '',
|
||||
contractNum1: [],
|
||||
ProcurementContractNum: '',
|
||||
buyer: 0,
|
||||
Supplier: 0,
|
||||
Name: '',
|
||||
Name1: '',
|
||||
Value: '',
|
||||
Value1: '',
|
||||
buyerName: '',
|
||||
buyerValue: '',
|
||||
buyerName1: '',
|
||||
buyerValue1: '',
|
||||
supplier: '',
|
||||
supplierName: '',
|
||||
supplierValue: '',
|
||||
supplier1: '',
|
||||
supplierName1: '',
|
||||
supplierValue1: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
total2: 0,
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
tableData2: [],
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
dialogVisible1: false,
|
||||
form1: {},
|
||||
form2: {
|
||||
变更原因: ''
|
||||
},
|
||||
rules2: {
|
||||
变更原因: [{ required: true, message: '请输入变更原因', trigger: 'blur' }]
|
||||
},
|
||||
returns: [],
|
||||
returns1: [],
|
||||
returns2: [],
|
||||
returns3: [],
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
dialogVisible2: false,
|
||||
dialogVisible3: false,
|
||||
contractChangeValue: '',
|
||||
textarea: ``,
|
||||
textarea1: ``,
|
||||
contractValue: '', // 显示表2和变更合同用的变量
|
||||
contractValue1: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.contractNum = []
|
||||
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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initContract1().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNum1.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同变更流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
})
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
if (this.buyer === 0) {
|
||||
this.Name = row.姓名
|
||||
this.Value = row.人员编号
|
||||
} else if (this.buyer === 1) {
|
||||
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
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
this.buyerName ? 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.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++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null || response.data.rows[j].规定到货时间 !== '') {
|
||||
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
|
||||
})
|
||||
},
|
||||
searchTable3() {
|
||||
this.textarea1 = ``
|
||||
this.loading2 = true
|
||||
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.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) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
}
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
open(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.dialogVisible3 = true
|
||||
this.contractChangeValue = row.采购合同流水号
|
||||
},
|
||||
submitContract(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.dialogVisible3 = false
|
||||
submitContract(this.contractChangeValue, this.form2.变更原因).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('变更成功')
|
||||
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()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
this.searchTable3()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchTable3()
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
this.taxRate = row.税率
|
||||
this.RMB = row.总金额_文本
|
||||
this.TotalAmount = row.总金额
|
||||
this.TotalAmount3 = parseInt((row.含税总金额) * 100) / 100
|
||||
this.RMB3 = 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="2" 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>' + '<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].物料计划到货时间.split(' ')[0]
|
||||
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].单价
|
||||
document.getElementsByClassName('tableData')[j].children[7].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
searchTable5(this.contractValue).then(response => {
|
||||
this.returns2 = response.data
|
||||
const children2 = document.getElementsByClassName('tableData2')
|
||||
const parent2 = document.getElementById('51')
|
||||
if (children2.length !== 0) {
|
||||
for (let i = children2.length - 1; i >= 0; i--) {
|
||||
parent2.removeChild(children2[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns2.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData2')
|
||||
tr[i].innerHTML = '<td colspan="2" 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>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead2').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns2.length; j++) {
|
||||
document.getElementsByClassName('tableData2')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData2')[j].children[1].innerHTML = response.data[j].零件图号
|
||||
document.getElementsByClassName('tableData2')[j].children[2].innerHTML = response.data[j].材料
|
||||
document.getElementsByClassName('tableData2')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
|
||||
document.getElementsByClassName('tableData2')[j].children[4].innerHTML = response.data[j].备注
|
||||
document.getElementsByClassName('tableData2')[j].children[5].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData2')[j].children[6].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData2')[j].children[7].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable4(row) {
|
||||
console.log(row)
|
||||
this.textarea1 = row.合同文本
|
||||
this.supplier1 = row.供应商名称
|
||||
this.contract1 = row.采购合同编号
|
||||
this.taxRate1 = row.税率
|
||||
this.RMB1 = row.总金额_文本
|
||||
this.TotalAmount1 = row.总金额
|
||||
this.TotalAmount4 = parseInt((row.含税总金额) * 100) / 100
|
||||
this.RMB4 = row.含税总金额_文本
|
||||
document.getElementById('24').innerText = this.textarea1
|
||||
this.contractValue1 = parseInt(row.采购合同变更流水号)
|
||||
searchTable4(this.contractValue1).then(response => {
|
||||
this.returns1 = response.data
|
||||
const children1 = document.getElementsByClassName('tableData1')
|
||||
const parent1 = document.getElementById('6')
|
||||
if (children1.length !== 0) {
|
||||
for (let i = children1.length - 1; i >= 0; i--) {
|
||||
parent1.removeChild(children1[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns1.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData1')
|
||||
tr[i].innerHTML = '<td colspan="2" 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>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead1').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns1.length; j++) {
|
||||
document.getElementsByClassName('tableData1')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData1')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData1')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData1')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
|
||||
document.getElementsByClassName('tableData1')[j].children[4].innerHTML = response.data[j].备注
|
||||
document.getElementsByClassName('tableData1')[j].children[5].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData1')[j].children[6].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData1')[j].children[7].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
searchTable6(this.contractValue1).then(response => {
|
||||
this.returns3 = response.data
|
||||
const children3 = document.getElementsByClassName('tableData3')
|
||||
const parent3 = document.getElementById('53')
|
||||
if (children3.length !== 0) {
|
||||
for (let i = children3.length - 1; i >= 0; i--) {
|
||||
parent3.removeChild(children3[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns3.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData3')
|
||||
tr[i].innerHTML = '<td colspan="2" 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>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead3').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns3.length; j++) {
|
||||
document.getElementsByClassName('tableData3')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData3')[j].children[1].innerHTML = response.data[j].零件图号
|
||||
document.getElementsByClassName('tableData3')[j].children[2].innerHTML = response.data[j].材料
|
||||
document.getElementsByClassName('tableData3')[j].children[3].innerHTML = response.data[j].物料计划到货时间.split(' ')[0]
|
||||
document.getElementsByClassName('tableData3')[j].children[4].innerHTML = response.data[j].备注
|
||||
document.getElementsByClassName('tableData3')[j].children[5].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData3')[j].children[6].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData3')[j].children[7].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;
|
||||
}
|
||||
.tableData1{
|
||||
height: 30px;
|
||||
}
|
||||
.tableData2{
|
||||
height: 30px;
|
||||
}
|
||||
.tableData3{
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,409 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
:picker-options="pickerOptions"
|
||||
size="small"
|
||||
type="daterange"
|
||||
align="center"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:300px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
|
||||
<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-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">
|
||||
<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="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" align="center">
|
||||
<el-table-column label="审批情况内容" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row 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-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" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button :disabled="Number(scope.row.审批情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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"/>
|
||||
<span v-show="supplierValue">累计合同总额:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>
|
||||
<span v-show="supplierValue">累计付款:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>
|
||||
<span v-show="supplierValue">累计欠款:</span>
|
||||
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1200px">
|
||||
<span>供应商:</span>
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable 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="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="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" width="100" prop="合同总额">
|
||||
<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" min-width="100" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :max="scope.row.含税总金额 - scope.row.已付金额" :disabled="(scope.row.含税总金额 - scope.row.已付金额) === 0" v-model="scope.row.请款金额" controls-position="right" size="mini" style="width: 100%;"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" readonly size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px" icon="el-icon-check" @click="submitRequestFund">确定请款</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchSupplier, searchRequestFund, searchPurchaseContract, submitRequestFund, searchRequsetFundDetail, cancelRequestFund } from '@/api/WorkshopProcurement/PurchaseContractRequestFund1'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { timeToStamp } from '@/utils/tool'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
getDate: null,
|
||||
tableData0: [],
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '未来一周',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 7)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '未来一个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '未来两个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 2)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '未来三个月',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 3)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}, {
|
||||
text: '未来半年',
|
||||
onClick(picker) {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
end.setTime(start.getTime() + 3600 * 1000 * 24 * 30 * 6)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
}]
|
||||
},
|
||||
dateRange: '',
|
||||
tableData1: [],
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
returns: '',
|
||||
supplierValue: '',
|
||||
supplier: [],
|
||||
totalSum: 0,
|
||||
totalPay: 0,
|
||||
totalDebt: 0,
|
||||
tableData2: [],
|
||||
dialogVisible2: false,
|
||||
tableData01: [],
|
||||
SUM: 0,
|
||||
contractGroup: [],
|
||||
gridData: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
timeToStamp(param) { // 转时间戳
|
||||
return timeToStamp(param)
|
||||
},
|
||||
fetchData() {
|
||||
this.supplier = []
|
||||
searchSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplier.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable1() { // 查请款信息
|
||||
let check1, check2
|
||||
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
|
||||
this.supplierValue ? check2 = 1 : check2 = 0
|
||||
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
this.totalSum = 0
|
||||
this.totalPay = 0
|
||||
searchPurchaseContract(check2, this.supplierValue).then(response => {
|
||||
response.data.map(data => {
|
||||
this.totalSum += data.含税总金额
|
||||
this.totalPay += data.已付金额
|
||||
})
|
||||
this.totalDebt = this.totalSum - this.totalPay
|
||||
})
|
||||
},
|
||||
requestFund() { // 请款
|
||||
this.dialogVisible2 = true
|
||||
this.supplierValue = ''
|
||||
this.fetchData() // 重新获取供应商
|
||||
this.tableData01 = []
|
||||
},
|
||||
searchTable01() { // 查询待请款
|
||||
if (this.supplierValue) {
|
||||
this.contractGroup = []
|
||||
let check
|
||||
this.supplierValue ? check = 1 : check = 0
|
||||
searchPurchaseContract(check, this.supplierValue).then(response => {
|
||||
this.tableData01 = response.data
|
||||
this.tableData01.map(v => {
|
||||
this.$set(v, '请款金额', 0)
|
||||
v.请款金额 = v.含税总金额 - v.已付金额
|
||||
return v
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择供应商')
|
||||
}
|
||||
},
|
||||
selectable(row, index) { // 控制某行是否可选
|
||||
return parseInt(row.已请款) !== 1 // 已经请款
|
||||
},
|
||||
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].请款金额)
|
||||
}
|
||||
},
|
||||
submitRequestFund() { // 确认请款
|
||||
if (this.supplierValue && this.contractGroup.length !== 0) {
|
||||
submitRequestFund(this.contractGroup, this.sumGroup, this.supplierValue, this.SUM, this.id).then(response => {
|
||||
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 if (response.data[0].result === '已审批') {
|
||||
this.searchTable1()
|
||||
this.$message.error('已审批,操作失败')
|
||||
} else { this.$message.error('操作失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
.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-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
600
src/views/WorkshopProcurement/PurchaseInvoiceDelivery/index.vue
Normal file
600
src/views/WorkshopProcurement/PurchaseInvoiceDelivery/index.vue
Normal file
@@ -0,0 +1,600 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>供应商名称:</span>
|
||||
<el-select v-model="supplierNumValue" placeholder="供应商" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in supplierNum"
|
||||
: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
|
||||
:disabled="office"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
style="margin-left: 10px"
|
||||
@click="handleAdd()">增加</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table id="expandTable" :data="tableData1" show-summary size="mini" style="max-height: 400px" height="400px" stripe border @row-click="searchPicInner">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-form id="table" label-position="left" inline class="demo-table-expand">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<viewer>
|
||||
<img :src="scope.row.scanSrc" alt="发票扫描件" height="200px">
|
||||
</viewer>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-form-item label="接收人">
|
||||
{{ scope.row.接收人 ? scope.row.接收人 : '—' }}
|
||||
</el-form-item><br>
|
||||
<el-form-item label="接收时间">
|
||||
{{ scope.row.接收时间 ? scope.row.接收时间 : '—' }}
|
||||
</el-form-item><br>
|
||||
<el-form-item label="发票号">
|
||||
{{ scope.row.发票号 ? scope.row.发票号 : '—' }}
|
||||
</el-form-item><br>
|
||||
<el-form-item label="开户行">
|
||||
{{ scope.row.开户行 ? scope.row.开户行 : '—' }}
|
||||
</el-form-item><br>
|
||||
<el-form-item label="开票时间">
|
||||
{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '—' }}
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="交接状态" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.接收人" type="success" size="small">已接收</el-tag>
|
||||
<el-tag v-else type="warning" size="small">未接收</el-tag>
|
||||
</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="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="400" trigger="click">
|
||||
<el-table :data="tableData01" stripe size="mini" show-summary>
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="100" align="center" label="合同编号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="合同名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 ? scope.row.采购合同名称 : scope.row.离线合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="合同总额" min-width="80" align="center" label="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 ? scope.row.合同总额 = scope.row.采购合同总额 : scope.row.合同总额 = scope.row.离线合同总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" plain type="success" size="mini" icon="el-icon-document" @click="invoiceDetail(scope.row)"/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额" min-width="100px" prop="开票金额">
|
||||
<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="135px">
|
||||
<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.备注 ? scope.row.备注 : '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="!office"
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="handleEdit(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="office||!!scope.row.接收人"
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin: 10px 0;">
|
||||
<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="460px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="90px">
|
||||
<el-row>
|
||||
<el-form-item label="供应商" prop="supplierNumValue">
|
||||
<el-select v-model="form1.supplierNumValue" placeholder="供应商" size="small" filterable @change="searchContract2">
|
||||
<el-option
|
||||
v-for="item in supplierNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同编号" prop="contractNumValue">
|
||||
<el-select v-model="form1.contractNumValue" multiple placeholder="合同编号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNums"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-tooltip :content="offline" placement="top">
|
||||
<el-switch
|
||||
v-model="offline"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
active-value="非离线"
|
||||
inactive-value="离线"
|
||||
style="margin: 10px"
|
||||
@change="offlineChange2"/>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票金额" prop="money">
|
||||
<el-input v-model="form1.money" size="small" placeholder="开票金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="传送人">
|
||||
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled>
|
||||
<el-option
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form1.remark" size="small" placeholder="备注"/>
|
||||
</el-form-item>
|
||||
<b style="color: #f56c6c;margin: 0">* </b>
|
||||
<el-form-item label="发票扫描件" style="display: inline-block">
|
||||
<el-upload
|
||||
id="invoiceScan"
|
||||
ref="upload"
|
||||
:auto-upload="false"
|
||||
:on-success="uploadSuccess"
|
||||
:before-upload="beforeUpload"
|
||||
:on-exceed="warningExceed"
|
||||
:limit="limit"
|
||||
:action="upload+'?contractNumValue='+form1.contractNumValue+'&money='+form1.money+'&sendPersonValue='+form1.sendPersonValue+'&remark='+form1.remark+'&supplierNumValue='+form1.supplierNumValue+'&offline='+offline"
|
||||
list-type="picture-card">
|
||||
<i class="el-icon-plus"/>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="submitAdd('form1')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogVisible2" center style="min-height: 300px" width="1200px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="80px">
|
||||
<el-row>
|
||||
<el-col style="width: 800px">
|
||||
<viewer>
|
||||
<img :src="scanSrc" style="margin: 0 auto" alt="发票扫描件" width="800px">
|
||||
</viewer>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="form1.supplierName" size="small" disabled placeholder="供应商"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票金额">
|
||||
<el-input v-model="form1.money" size="small" disabled placeholder="开票金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="传送人">
|
||||
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled>
|
||||
<el-option
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收人">
|
||||
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" disabled>
|
||||
<el-option
|
||||
v-for="item in sender"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form1.remark" size="small" disabled placeholder="备注"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form1.invoiceNum" size="small" placeholder="发票号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开户行" prop="bank">
|
||||
<el-input v-model="form1.bank" size="small" placeholder="开户行"/>
|
||||
</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-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible2 = false">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="submitEdit('form1')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInvoice, editInvoice, deleteInvoice, initSender, initSupplier, searchContract, searchOffline, invoiceDetail } from '@/api/WorkshopProcurement/PurchaseInvoiceDelivery'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { uploadInvoiceScan, readFile } from '@/utils/request'
|
||||
import request from '@/utils/request'
|
||||
|
||||
export default {
|
||||
name: '', // 采购发票交接
|
||||
data() {
|
||||
return {
|
||||
offline: '非离线',
|
||||
check1: 0,
|
||||
office: null, // 是否为办公室
|
||||
scanSrc: '',
|
||||
upload: uploadInvoiceScan,
|
||||
limit: 1,
|
||||
sender: [],
|
||||
contractNumValue: '',
|
||||
contractNums: [], // options
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
tableData01: [],
|
||||
dialogVisible1: false,
|
||||
dialogVisible2: false, // 办公室
|
||||
title1: '',
|
||||
supplierNumValue: '',
|
||||
supplierNum: [],
|
||||
form1: {
|
||||
supplierNumValue: '',
|
||||
supplierName: '',
|
||||
invoiceDeliveryNum: '',
|
||||
contractNumValue: [], // 多选select值
|
||||
money: '',
|
||||
sendPersonValue: '',
|
||||
receivePersonValue: '',
|
||||
invoiceNum: '',
|
||||
bank: '',
|
||||
invoiceTime: '',
|
||||
remark: ''
|
||||
},
|
||||
rules1: {
|
||||
supplierNumValue: [
|
||||
{ required: true, message: '请选择供应商' }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: '请填写金额' }
|
||||
],
|
||||
invoiceNum: [
|
||||
{ required: true, message: '请填写发票号' }
|
||||
],
|
||||
bank: [
|
||||
{ required: true, message: '请填写开户行' }
|
||||
],
|
||||
invoiceTime: [
|
||||
{ required: true, message: '请填写开票时间' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'token', // 角色编号
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable1()
|
||||
console.log(this.token)
|
||||
Number(this.token) === 8 ? this.office = true : this.office = false // 是否为办公室,8是办公室,2是采购部
|
||||
},
|
||||
methods: {
|
||||
offlineChange2() { // 切换离线非离线(内)
|
||||
if (this.offline === '离线') {
|
||||
this.searchOffline2()
|
||||
} else {
|
||||
this.searchContract2()
|
||||
}
|
||||
},
|
||||
invoiceDetail(row) {
|
||||
invoiceDetail(row.发票交接流水号).then(response => {
|
||||
this.tableData01 = response.data
|
||||
})
|
||||
},
|
||||
searchOffline1() {}, // 根据供应商查离线合同(外)
|
||||
searchOffline2() { // 根据供应商查离线合同(内)
|
||||
this.form1.contractNumValue = []
|
||||
this.contractNums = []
|
||||
searchOffline(this.form1.supplierNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNums.push({
|
||||
label: response.data[i].离线合同编号,
|
||||
name: response.data[i].离线合同名称,
|
||||
value: response.data[i].离线合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
fetchData() { // 初始化数据
|
||||
initSupplier().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.supplierNum.push({
|
||||
label: response.data[i].供应商名称,
|
||||
value: response.data[i].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initSender().then(response => { // 传送人
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.sender.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// searchContract1() { // 根据供应商查合同(外)
|
||||
// this.contractNumValue = ''
|
||||
// this.contractNums = []
|
||||
// searchContract(this.supplierNumValue).then(response => {
|
||||
// for (let i = 0; i < response.data.length; i++) {
|
||||
// this.contractNums.push({
|
||||
// label: response.data[i].采购合同编号,
|
||||
// name: response.data[i].采购合同名称,
|
||||
// value: response.data[i].采购合同流水号
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
searchContract2() { // 根据供应商查合同(内)
|
||||
this.form1.contractNumValue = []
|
||||
this.contractNums = []
|
||||
searchContract(this.form1.supplierNumValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNums.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() { // 查询表1
|
||||
this.supplierNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNumValue ? this.check2 = 1 : this.check2 = 0
|
||||
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.supplierNumValue, this.check2, this.contractNumValue).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'scanSrc', '')
|
||||
return v
|
||||
})
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.tableData1[i].scanSrc = this.searchPic(response.data.rows[i], i)
|
||||
}
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
this.scanSrc = ''
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleAdd() { // 执行新增
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '增加'
|
||||
this.contractNum = []
|
||||
this.form1.projectValue = ''
|
||||
this.form1.supplierNumValue = ''
|
||||
this.form1.contractNumValue = []
|
||||
this.form1.money = ''
|
||||
this.form1.sendPersonValue = Number(this.id)
|
||||
this.form1.remark = ''
|
||||
this.dialogVisible1 = true
|
||||
},
|
||||
warningExceed() {
|
||||
this.$message.error('仅可上传一张发票')
|
||||
},
|
||||
submitAdd(formName) { // 提交新增
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.$refs.upload.submit() // 上传图片
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
beforeUpload(file) { // 上船前检测
|
||||
const isJPG = /^image\/.*/.test(file.type)
|
||||
const isLt4M = file.size / 1024 / 1024 < 4
|
||||
if (!isJPG) {
|
||||
this.$message.error('只能上传图片。。')
|
||||
}
|
||||
if (!isLt4M) {
|
||||
this.$message.error('上传头像图片大小不能超过 4MB!')
|
||||
}
|
||||
return isJPG && isLt4M
|
||||
},
|
||||
uploadSuccess(res) { // 上传成功回调
|
||||
if (res[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
this.$refs.upload.clearFiles()
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
}
|
||||
},
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '编辑'
|
||||
this.dialogVisible2 = true
|
||||
this.form1.invoiceDeliveryNum = row.发票交接流水号
|
||||
this.form1.supplierName = row.供应商名称
|
||||
this.form1.money = row.开票金额
|
||||
this.form1.sendPersonValue = parseInt(row.传送人流水号)
|
||||
this.form1.receivePersonValue = Number(this.id)
|
||||
this.form1.invoiceNum = row.发票号
|
||||
this.form1.bank = row.开户行
|
||||
this.form1.invoiceTime = row.开票时间
|
||||
this.form1.remark = row.备注
|
||||
},
|
||||
submitEdit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editInvoice(this.form1.invoiceDeliveryNum, this.form1.invoiceNum, this.form1.bank, this.form1.invoiceTime, this.form1.receivePersonValue).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible2 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteInvoice(row.发票交接流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
async searchPic(row, i) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票交接流水号}`
|
||||
}
|
||||
})
|
||||
this.tableData1[i].scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
},
|
||||
async searchPicInner(row) {
|
||||
const { data } = await request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '3',
|
||||
name: `select * from 采购管理_采购发票_附件 where 是否启用 = 1 and 发票交接流水号 = ${row.发票交接流水号}`
|
||||
}
|
||||
})
|
||||
this.scanSrc = readFile + data[0].文件标识 + '.' + data[0].文件后缀
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#expandTable .el-form-item{
|
||||
margin: 0;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,226 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<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 style="width: 200px"/>
|
||||
<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-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
min-height="540px"
|
||||
height="540px"
|
||||
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="零件名称" width="130px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="交检日期 " width="180px">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.交检日期"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 135px"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="检验数量" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.检验数量" size="mini" style="width: 50px" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="废品数量" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.废品数量" size="mini" style="width: 50px" align="center" @change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="检查日期" width="180px">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
v-model="scope.row.检查日期"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 135px"
|
||||
@change="update(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="报废原因">
|
||||
<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 align="center" label="备注">
|
||||
<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 label="操作" align="center" fixed="right" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.row)">完成</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 50]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initPayState, searchParts, update, deleteData, editData } from '@/api/WorkshopProcurement/PurchasingQualityInspection'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
loading: false,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
tableData: [],
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
|
||||
this.loading = false
|
||||
console.log(response.data.rows)
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].物料型号 === null || response.data.rows[i].物料型号 === '') {
|
||||
response.data.rows[i].物料型号 = response.data.rows[i].零件图号
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
update(row.id, row.交检日期, row.检验数量, row.废品数量, row.检查日期, row.报废原因, row.备注).then(response => {
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.$confirm('是否确认无误?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (row.交检日期 !== '' && row.检查日期 !== '') {
|
||||
editData(row.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('通过成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('通过失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请填写信息')
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.deleteRow(deleteData, row.id, function() { this.searchTable() })
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
172
src/views/WorkshopProcurement/QualityInspectionQuery/index.vue
Normal file
172
src/views/WorkshopProcurement/QualityInspectionQuery/index.vue
Normal file
@@ -0,0 +1,172 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<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 style="width: 200px"/>
|
||||
<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-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
min-height="540px"
|
||||
height="540px"
|
||||
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="零件名称" width="130px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="数量" width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="交检日期 " width="180px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.交检日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="废品数量" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.废品数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="检查日期" width="180px">
|
||||
<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 { initPayState, searchParts } from '@/api/WorkshopProcurement/QualityInspectionQuery'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
loading: false,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
tableData: [],
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName).then(response => {
|
||||
this.loading = false
|
||||
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]
|
||||
}
|
||||
if (response.data.rows[i].检查日期 !== '') {
|
||||
response.data.rows[i].检查日期 = (response.data.rows[i].检查日期).split(' ')[0]
|
||||
}
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
434
src/views/WorkshopProcurement/ReceiptConnectionSheet/index.vue
Normal file
434
src/views/WorkshopProcurement/ReceiptConnectionSheet/index.vue
Normal file
@@ -0,0 +1,434 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNum" placeholder="发票号" 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 selectPerson1"
|
||||
: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-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="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="money">
|
||||
<el-input v-model="form1.money1" 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 selectPerson1"
|
||||
: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, initPerson1, initContract } from '@/api/WorkshopProcurement/ReceiptConnectionSheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 发票交接单
|
||||
data() {
|
||||
return {
|
||||
contractNumValue: '',
|
||||
contractNums: [],
|
||||
invoiceNum: '',
|
||||
invoiceTime: '',
|
||||
transmitValue: '',
|
||||
selectPerson: [], // 接收人
|
||||
selectPerson1: [], // 传送人
|
||||
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: '',
|
||||
money1: '',
|
||||
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].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson1().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.selectPerson1.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++) {
|
||||
response.data.rows[j].含税总金额 = parseInt(response.data.rows[j].含税总金额 * 100) / 100
|
||||
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.money1 = ''
|
||||
this.form1.sendPersonValue = parseInt(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, this.form1.money1).then(response => {
|
||||
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.money1 = 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, this.form1.money1).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.发票流水号, 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>
|
||||
@@ -0,0 +1,371 @@
|
||||
<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="结束日期"/>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="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="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.请款金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款付款情况" align="center">
|
||||
<el-table-column label="审批情况内容" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未通过审批原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款情况" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag>
|
||||
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="未付款原因" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" 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="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" @click="searchTable02(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button :disabled="Number(scope.row.审批情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<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="1200px">
|
||||
<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="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="100" prop="请款金额" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :max="scope.row.总价 - scope.row.已付金额" :disabled="(scope.row.总价 - scope.row.已付金额) === 0" v-model="scope.row.请款金额" controls-position="right" size="mini" style="width:100%"/>
|
||||
</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/WorkshopProcurement/RequestOutsourcingMaterials'
|
||||
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()
|
||||
this.searchTable1()
|
||||
},
|
||||
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].供应商流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log(this.supplier)
|
||||
},
|
||||
searchTable1() { // 查询请款表
|
||||
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
|
||||
this.supplierName0 ? this.check2 = 1 : (this.check2 = 0, this.supplierName0 = '')
|
||||
searchRequestFund(this.pageCurrent1, this.pageSize1, this.check1, this.dateRange[0], this.dateRange[1], this.check2, this.supplierName0).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
|
||||
this.tableData01.map(v => {
|
||||
this.$set(v, '请款金额', 0)
|
||||
v.请款金额 = v.总价 - v.已付金额
|
||||
return v
|
||||
})
|
||||
})
|
||||
} 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 => {
|
||||
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>
|
||||
|
||||
428
src/views/WorkshopProcurement/StockPreparation/index.vue
Normal file
428
src/views/WorkshopProcurement/StockPreparation/index.vue
Normal file
@@ -0,0 +1,428 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>入库单号:</span>
|
||||
<el-select v-model="warehouseReceiptValue" placeholder="入库单号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in warehouseReceipt"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName0" placeholder="供应商" style="width: 200px" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="pageCurrent=1;pageSize=10;total=0;searchTable()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
style="margin-left: 10px"
|
||||
@click="OpenAdd">创建入库单</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left: 10px"
|
||||
@click="exportTable">导出入库单</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%;max-height: 460px;"
|
||||
height="270"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
@row-click="searchTable1">
|
||||
<el-table-column label="入库单号" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库人员" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库时间" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购单号" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购单名称" min-width="90" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购单名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteWarehouseReceipt(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]"
|
||||
: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>
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" :summary-method="getSummaries" show-summary border style="max-height: 300px;" height="400px" size="mini">
|
||||
<el-table-column label="零件图号" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.单位 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ 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.重量1 }}
|
||||
</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.批次数量 * scope.row.单价 * scope.row.重量1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogVisible" title="创建入库单" center style="min-height: 300px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px">
|
||||
<el-row>
|
||||
<el-form-item label="采购单号" prop="purchaseOrderValue">
|
||||
<el-select v-model="form.purchaseOrderValue" placeholder="采购单号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in purchaseOrder"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="入库人员" prop="money">
|
||||
<el-input v-model="form.warehousingStaff" size="small" placeholder="入库人员" readonly style="width: 200px"/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-check"
|
||||
@click="submitAdd">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-card style="width: 1100px;margin: 20px auto">
|
||||
<div id="cjn" style="width: 1000px;margin: 0 auto">
|
||||
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
<tr>
|
||||
<th colspan="16"><h3>备料入库单</h3></th>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">入库单号</td>
|
||||
<td colspan="6" style="text-align: center;width: 35%">{{ 入库单号 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">入库人员</td>
|
||||
<td colspan="6" style="text-align: center;width: 35%">{{ 入库人员 }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">采购单号</td>
|
||||
<td colspan="6" style="text-align: center;width: 35%">{{ 采购单号 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">采购单名称</td>
|
||||
<td colspan="6" style="text-align: center;width: 35%">{{ 采购单名称 }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="2" style="text-align: center;width: 15%">入库时间</td>
|
||||
<td colspan="6" style="text-align: center;width: 35%">{{ 入库时间 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">供应商</td>
|
||||
<td colspan="6" style="text-align: center;width: 35%">{{ 供应商 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table style="margin-top: 20px" cellspacing="0px" align="center" border="1 solid black" width="100%">
|
||||
<tr id="tablehead" style="height: 35px">
|
||||
<td style="text-align: center;width: 5%">序号</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">零件图号</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">零件名称</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">材料</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">单位</td>
|
||||
<td colspan="1" style="text-align: center;width: 8%">数量</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">请购重量</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">重量</td>
|
||||
<td colspan="2" style="text-align: center;width: 11%">总重量</td>
|
||||
</tr>
|
||||
<tr v-for="(list, index) in tableData1" :key="index" style="height: 35px">
|
||||
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">{{ list.零件图号 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 15%">{{ list.零件名称 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
|
||||
<td colspan="1" style="text-align: center;width: 8%">{{ list.批次数量 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 20%">{{ list.重量 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 8%">{{ list.重量1 }}</td>
|
||||
<td colspan="2" style="text-align: center;width: 9%">{{ list.批次数量 * list.重量1 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initWarehouseReceipt, searchWarehouseReceipt, searchMateriel, AddWarehousing, deleteWarehousing, initPurchaseOrder } from '@/api/WorkshopProcurement/StockPreparation'
|
||||
import { mapGetters } from 'vuex'
|
||||
import $ from 'jquery'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
warehouseReceiptValue: '',
|
||||
warehouseReceipt: [],
|
||||
supplierName0: '',
|
||||
check: 0,
|
||||
chekc1: 0,
|
||||
tableData: [],
|
||||
tableData1: [],
|
||||
loading: false,
|
||||
pageCurrent: 1,
|
||||
pageSize: 10,
|
||||
total: 0,
|
||||
num: '',
|
||||
disable: true,
|
||||
dialogVisible: false,
|
||||
purchaseOrder: [],
|
||||
入库单号: '',
|
||||
入库人员: '',
|
||||
入库时间: '',
|
||||
采购单号: '',
|
||||
采购单名称: '',
|
||||
供应商: '',
|
||||
totalMoney: 0,
|
||||
form: {
|
||||
入库单流水号: '',
|
||||
purchaseOrderValue: '',
|
||||
warehousingStaff: ''
|
||||
},
|
||||
rules: {
|
||||
purchaseOrderValue: [{ required: true, message: '请选择采购单号' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initWarehouseReceipt(0, this.warehouseReceiptValue, 0, this.supplierName0).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.warehouseReceipt.push({
|
||||
label: response.data[i].入库单号,
|
||||
value: response.data[i].入库单号
|
||||
})
|
||||
}
|
||||
})
|
||||
initPurchaseOrder().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.purchaseOrder.push({
|
||||
label: response.data[i].采购单号,
|
||||
value: response.data[i].采购计划流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() { // 查询入库单
|
||||
this.loading = true
|
||||
this.warehouseReceiptValue ? this.check = 1 : this.check = 0
|
||||
this.supplierName0 ? this.check1 = 1 : this.check1 = 0
|
||||
searchWarehouseReceipt(this.pageCurrent, this.pageSize, this.check, this.warehouseReceiptValue, this.check1, this.supplierName0).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.pageSize = val
|
||||
this.pageCurrent = 1
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
searchTable1(row) {
|
||||
this.totalMoney = 0
|
||||
this.num = row.采购计划流水号
|
||||
this.入库单号 = row.入库单号
|
||||
this.入库人员 = row.姓名
|
||||
this.采购单号 = row.采购单号
|
||||
this.采购单名称 = row.采购单名称
|
||||
this.入库时间 = row.入库时间
|
||||
this.供应商 = row.供应商名称
|
||||
searchMateriel(this.num).then(response => {
|
||||
this.tableData1 = response.data
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.totalMoney += (response.data[i].批次数量 * response.data[i].重量1 * response.data[i].单价)
|
||||
}
|
||||
})
|
||||
},
|
||||
OpenAdd() {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form.warehousingStaff = this.name
|
||||
this.dialogVisible = true
|
||||
this.form.purchaseOrderValue = ''
|
||||
},
|
||||
submitAdd() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
AddWarehousing(this.form.purchaseOrderValue, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('创建成功')
|
||||
this.searchTable()
|
||||
this.dialogVisible = false
|
||||
} else { this.$message.error('创建失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteWarehouseReceipt(row) {
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteWarehousing(row.入库单流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.dialogVisible = false
|
||||
this.searchTable()
|
||||
this.tableData1 = []
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 6) {
|
||||
sums[index] = '总重量'
|
||||
return
|
||||
} else if (index === 7) {
|
||||
const values = data.map(item => Number(item['重量1'] * item['批次数量']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ' kg'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 8) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 9) {
|
||||
if (this.totalMoney !== 0) {
|
||||
sums[index] = this.totalMoney + ' 元'
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
exportTable() {
|
||||
const htmlNode = $('#cjn').html()
|
||||
const body = $('body')
|
||||
body.children().hide()
|
||||
const printNode = $(htmlNode)
|
||||
body.append(printNode)
|
||||
window.print()
|
||||
body.removeAttr('style')
|
||||
body.children().not('script').show()
|
||||
body.children().not('#app').hide()
|
||||
printNode.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
316
src/views/WorkshopProcurement/costStatistics/index.vue
Normal file
316
src/views/WorkshopProcurement/costStatistics/index.vue
Normal file
@@ -0,0 +1,316 @@
|
||||
<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="total=0;pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
</el-card>
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel" style="padding: 0px">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="采购采购" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">采购部采购</div>
|
||||
<count-to :end-val="Purchase" :duration="1000" prefix="¥" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-message">
|
||||
<svg-icon icon-class="车间采购" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">制造部采购</div>
|
||||
<count-to :end-val="WorkPurchase" :duration="1000" prefix="¥" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-money">
|
||||
<svg-icon icon-class="外协工时" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">外协工时</div>
|
||||
<count-to :end-val="Outsourcing" :duration="1000" prefix="¥" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-shopping">
|
||||
<svg-icon icon-class="自家工时" class-name="card-panel-icon" />
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">自家工时</div>
|
||||
<count-to :end-val="Home" :duration="1000" prefix="¥" class="card-panel-num"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-card>
|
||||
<div style="height: 500px;width: 100%">
|
||||
<div class="div-a">
|
||||
<div id="pie" style="width:70%;height:450px; display: block; margin-right: auto;margin-left: auto"/>
|
||||
</div>
|
||||
<div class="div-b">
|
||||
<div id="bar" style="width:85%;height:450px; display: block; float: left"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>import { initProject, searchOutsourcing, searchHome, searchWorkPurchase, searchPurchase } from '@/api/WorkshopProcurement/costStatistics'
|
||||
import echarts from 'echarts'
|
||||
import CountTo from 'vue-count-to'
|
||||
export default {
|
||||
components: {
|
||||
CountTo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Purchase: 0,
|
||||
WorkPurchase: 0,
|
||||
Outsourcing: 0,
|
||||
Home: 0,
|
||||
projectValue: 1,
|
||||
project: [],
|
||||
data: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.drawLine()
|
||||
this.drawLine1()
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
||||
this.searchTable()
|
||||
},
|
||||
searchTable() {
|
||||
this.data = []
|
||||
searchOutsourcing(this.projectValue).then(response => {
|
||||
console.log(response, 111)
|
||||
if (response.data.length === 0) {
|
||||
this.Outsourcing = 0
|
||||
} else {
|
||||
this.Outsourcing = parseFloat(response.data[0].外协总价)
|
||||
}
|
||||
return this.Outsourcing
|
||||
}).then(data => {
|
||||
this.data.push({
|
||||
value: data,
|
||||
name: '外协工时'
|
||||
})
|
||||
}).then(() => {
|
||||
searchHome(this.projectValue).then(response => {
|
||||
console.log(response, 222)
|
||||
if (response.data.length === 0) {
|
||||
this.Home = 0
|
||||
} else {
|
||||
this.Home = parseFloat(response.data[0].项目工时)
|
||||
}
|
||||
return this.Home
|
||||
}).then(data => {
|
||||
this.data.push({
|
||||
value: data,
|
||||
name: '自家工时'
|
||||
})
|
||||
}).then(() => {
|
||||
searchWorkPurchase(this.projectValue).then(response => {
|
||||
console.log(response, 333)
|
||||
if (response.data.length === 0) {
|
||||
this.WorkPurchase = 0
|
||||
} else {
|
||||
this.WorkPurchase = parseFloat(response.data[0].总金额)
|
||||
}
|
||||
return this.WorkPurchase
|
||||
}).then(data => {
|
||||
this.data.push({
|
||||
value: data,
|
||||
name: '制造部采购'
|
||||
})
|
||||
})
|
||||
}).then(() => {
|
||||
searchPurchase(this.projectValue).then(response => {
|
||||
console.log(response, 444)
|
||||
if (response.data.length === 0) {
|
||||
this.Purchase = 0
|
||||
} else {
|
||||
this.Purchase = parseFloat(response.data[0].优惠后总价)
|
||||
}
|
||||
return this.Purchase
|
||||
}).then(data => {
|
||||
this.data.push({
|
||||
value: data,
|
||||
name: '采购部采购'
|
||||
})
|
||||
}).then(() => {
|
||||
this.drawLine()
|
||||
this.drawLine1()
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
drawLine() {
|
||||
const pie = echarts.init(document.getElementById('pie'))
|
||||
pie.setOption({
|
||||
title: {
|
||||
// text: '损失工时分析',
|
||||
x: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: '{a} <br/>{b} : {c} ({d}%)'
|
||||
},
|
||||
legend: {
|
||||
type: 'scroll',
|
||||
orient: 'vertical',
|
||||
right: 15,
|
||||
top: 50,
|
||||
bottom: 25
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '各项成本占比',
|
||||
type: 'pie',
|
||||
radius: '57%',
|
||||
center: ['50%', '50%'],
|
||||
data: this.data,
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
},
|
||||
label: {
|
||||
normal: {
|
||||
show: true,
|
||||
position: 'outside',
|
||||
formatter: '{b} ({d}%)'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
setTimeout(function() {
|
||||
window.onresize = function() {
|
||||
pie.resize()
|
||||
}
|
||||
}, 200)
|
||||
},
|
||||
drawLine1() {
|
||||
const bar = echarts.init(document.getElementById('bar'))
|
||||
// 指定图表的配置项和数据
|
||||
bar.setOption({
|
||||
tooltip: {},
|
||||
legend: {
|
||||
data: {
|
||||
name: ['外协工时', '自家工时', '采购部采购', '制造部采购']
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
data: ['外协工时', '自家工时', '采购部采购', '制造部采购'],
|
||||
show: true
|
||||
},
|
||||
yAxis: {},
|
||||
series: [{
|
||||
name: '销量',
|
||||
type: 'bar',
|
||||
data: [this.Outsourcing, this.Home, this.Purchase, this.WorkPurchase]
|
||||
}]
|
||||
})
|
||||
setTimeout(function() {
|
||||
window.onresize = function() {
|
||||
bar.resize()
|
||||
}
|
||||
}, 200)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.panel-group {
|
||||
margin-top: 18px;
|
||||
.card-panel-col{
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.card-panel {
|
||||
height: 140px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
box-shadow: 4px 4px 40px rgba(0, 0, 0, .20);
|
||||
border-color: rgba(0, 0, 0, .05);
|
||||
.icon-people {
|
||||
color: #40c9c6;
|
||||
background: #40c9c6;
|
||||
}
|
||||
.icon-message {
|
||||
color: #36a3f7;
|
||||
background: #36a3f7;
|
||||
}
|
||||
.icon-money {
|
||||
color: #f4516c;
|
||||
background: #f4516c;
|
||||
}
|
||||
.icon-shopping {
|
||||
color: #34bfa3;
|
||||
background: #34bfa3;
|
||||
}
|
||||
.card-panel-icon-wrapper {
|
||||
float: left;
|
||||
margin: 14px 0 0 14px;
|
||||
padding: 20px;
|
||||
transition: all 0.38s ease-out;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.card-panel-icon {
|
||||
float: left;
|
||||
color: white;
|
||||
font-size: 48px;
|
||||
}
|
||||
.card-panel-description {
|
||||
float: right;
|
||||
font-weight: bold;
|
||||
margin: 26px;
|
||||
margin-left: 0px;
|
||||
.card-panel-text {
|
||||
text-align: right;
|
||||
line-height: 18px;
|
||||
color: rgba(0, 0, 0, 0.45);
|
||||
font-size: 20px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.card-panel-num {
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.div-a{ float:left;width:45%;margin-right: 4%}
|
||||
.div-b{ float:left;width:45%;margin-left: 4%}
|
||||
</style>
|
||||
Reference in New Issue
Block a user