'车间采购模块'
This commit is contained in:
230
src/views/WorkshopProcurement/ArrivalStateSearch/index.vue
Normal file
230
src/views/WorkshopProcurement/ArrivalStateSearch/index.vue
Normal file
@@ -0,0 +1,230 @@
|
||||
<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"
|
||||
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="100*(parseInt(scope.row.合同物料到货总数)/parseInt(scope.row.合同物料采购总数)).toFixed(4)"
|
||||
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" 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 } from '@/api/WorkshopProcurement/ArrivalStateSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
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.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.now - this.arrival[i]) > 0 && (this.now - this.arrival[i]) < 86400000) {
|
||||
this.judge[i] = 2
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 86400000) {
|
||||
this.judge[i] = 3
|
||||
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) < 0) {
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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,812 @@
|
||||
<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" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="付款方式">
|
||||
<el-select v-model="payMethodValue" placeholder="付款方式" size="small" @change="payMethodChange">
|
||||
<el-option
|
||||
v-for="item in payMethod"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="币种">
|
||||
<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="第1次付款时间">
|
||||
<el-select v-model="payTime1Value" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第2次付款时间">
|
||||
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第3次付款时间">
|
||||
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime3"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第4次付款时间">
|
||||
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime4"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="第5次付款时间">
|
||||
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in payTime5"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--<el-col :span="6">-->
|
||||
<!--<el-form-item label="第6次付款时间">-->
|
||||
<!--<el-select v-model="payTime6Value" placeholder="请选择" :disabled="disable6" size="small" clearable>-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in payTime6"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value">-->
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="计划到货时间">
|
||||
<el-date-picker
|
||||
v-model="planArrivalTime"
|
||||
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-date-picker
|
||||
v-model="stipulateArrivalTime"
|
||||
size="small"
|
||||
type="date"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择日期"
|
||||
@change="contractChange"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<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="freight" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="税率">
|
||||
<el-input v-model="taxRate" size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData3" border style="width: 100%;max-height: 400px;" height="400px" size="mini">
|
||||
<el-table-column label="参考价格" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.参考价格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.单价" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发货天数" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="deliveryDay[scope.$index]" size="mini" style="width:70px"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" align="center" min-width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料型号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料规格" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订货数量" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="金额" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料计划到货时间" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料计划到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="计算方式" align="center" width="110">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-select v-model="calculateWayValue[scope.$index]" style="width:75px" size="mini">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in calculateWay"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value">-->
|
||||
<!--</el-option>-->
|
||||
<!--</el-select>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<!--<el-table-column label="重量" align="center" width="100">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--<el-input size="mini" v-model="weight[scope.$index]" style="width:70px"></el-input>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
</el-table>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon=""
|
||||
style="margin-top:10px"
|
||||
@click="calculateContractSum">计算合同总额</el-button>
|
||||
<span>合同总额:</span>
|
||||
<el-input v-model="contractSum" size="small"/>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
:data="tableData2"
|
||||
:show-header="false"
|
||||
highlight-current-row
|
||||
border
|
||||
height="280px"
|
||||
style="width: 250px;display:inline-block;max-height: 280px;"
|
||||
size="mini"
|
||||
@row-click="searchDemo">
|
||||
<el-table-column align="center" label="合同模板名称">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同模板名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-input :rows="20" v-model="textArea" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon=""
|
||||
style="margin-left: 4.5%"
|
||||
@click="doneContract">生成采购合同</el-button>
|
||||
<!--<el-button type="primary" size="small" icon="" style="float:right;margin: 0 10px 15px 0"-->
|
||||
<!--@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, initPayMethod, initPayTimeNode, searchSheetContract, doneContract, initPurchaseOrder, searchData, searchContractDemo } from '@/api/WorkshopProcurement/CreatingProcurementContracts'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
inject: ['reload'],
|
||||
data() {
|
||||
return {
|
||||
submitDisable: true, // 不点击表格中的行不让确定
|
||||
loading: false,
|
||||
dialogVisible1: false,
|
||||
disable2: true,
|
||||
disable3: true,
|
||||
disable4: true,
|
||||
disable5: true,
|
||||
disable6: true,
|
||||
tableData01: [],
|
||||
tableData2: [], // 合同模板表
|
||||
form1: {},
|
||||
form2: {},
|
||||
textArea: '',
|
||||
paramRow: '', // 参数row
|
||||
contractSum: 0,
|
||||
deliveryDay: [],
|
||||
contractNumValue: '',
|
||||
RequisitionNumber: '',
|
||||
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: '', // 税率
|
||||
tableData3: [],
|
||||
groupNum1: [],
|
||||
group1: '',
|
||||
group2: '',
|
||||
group3: '',
|
||||
group4: '',
|
||||
group5: '',
|
||||
group6: '',
|
||||
group7: '',
|
||||
group8: '',
|
||||
group9: '',
|
||||
group10: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
searchData() {
|
||||
searchData(this.contractNumValue).then(response => {
|
||||
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
|
||||
})
|
||||
},
|
||||
calculateContractSum() { // 计算合同总额
|
||||
this.contractSum = 0
|
||||
this.costAccount = 0
|
||||
this.riseFallPoint = 0
|
||||
this.tableData3 = []
|
||||
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])
|
||||
}
|
||||
this.contractSum = this.contractSum.toFixed(2)
|
||||
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)
|
||||
}
|
||||
},
|
||||
searchDemo(row = this.paramRow) {
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
this.paramRow = row
|
||||
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
|
||||
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
|
||||
})
|
||||
},
|
||||
contractChange() {
|
||||
searchSheetContract(this.inquirySheetFlowNum).then(response => {
|
||||
for (let i = 0; i < this.deliveryDay.length; i++) {
|
||||
this.stipulateArrivalTime
|
||||
? (this.deliveryDay[i] = parseInt((Date.parse(this.stipulateArrivalTime) - new Date()) / (1000 * 60 * 60 * 24)))
|
||||
: (this.deliveryDay[i] = 0)
|
||||
}
|
||||
this.tableData3 = response.data
|
||||
this.calculateContractSum()
|
||||
this.searchDemo(this.paramRow)
|
||||
})
|
||||
},
|
||||
fetchData() {
|
||||
searchContractDemo().then(response => { // 初始化合同模板
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
this.payMethod = []
|
||||
initPayMethod().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.payMethod.push({
|
||||
label: response.data[i].付款方式内容,
|
||||
value: response.data[i].付款方式流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.payTime1 = []
|
||||
this.payTime2 = []
|
||||
this.payTime3 = []
|
||||
this.payTime4 = []
|
||||
this.payTime5 = []
|
||||
this.payTime6 = []
|
||||
initPayTimeNode().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.payTime1.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime2.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime3.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime4.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime5.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
this.payTime6.push({
|
||||
label: response.data[i].付款时间节点名称,
|
||||
value: response.data[i].付款时间节点流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getSelect(initPurchaseOrder, ['请购单编号', '请购单流水号'], 'contractNum')
|
||||
},
|
||||
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
|
||||
})
|
||||
},
|
||||
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.group4 = ''
|
||||
this.group5 = ''
|
||||
this.group6 = ''
|
||||
this.group7 = ''
|
||||
this.group8 = ''
|
||||
this.group9 = ''
|
||||
this.group10 = ''
|
||||
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.group4 += this.deliveryDay[i] + ','
|
||||
this.group7 += this.taxRate + ','
|
||||
this.group8 += this.currencyValue + ','
|
||||
this.group9 += this.tableData3[i].请购单明细流水号 + ','
|
||||
}
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.RequisitionNumber = this.contractNum[i].label
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
const payTimeNum = this.payMethodName.split(':')
|
||||
if (payTimeNum.length > 1) {
|
||||
for (let i = 0; i < payTimeNum.length; i++) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
this.group6 += this.payTime1Value + ','
|
||||
break
|
||||
case 1:
|
||||
this.group6 += this.payTime2Value + ','
|
||||
break
|
||||
case 2:
|
||||
this.group6 += this.payTime3Value + ','
|
||||
break
|
||||
case 3:
|
||||
this.group6 += this.payTime4Value + ','
|
||||
break
|
||||
case 4:
|
||||
this.group6 += this.payTime5Value + ','
|
||||
break
|
||||
case 5:
|
||||
this.group6 += this.payTime6Value + ','
|
||||
break
|
||||
}
|
||||
this.group5 += payTimeNum[i] + ',' // 付款比例 付款方式 付款计划
|
||||
}
|
||||
} else {
|
||||
this.group5 = '10,' // 付款比例 付款方式 付款计划
|
||||
this.group6 = this.payTime1Value + ',' // 付款时间
|
||||
}
|
||||
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)
|
||||
this.group4 = this.group4.substr(0, this.group4.length - 1)
|
||||
this.group5 = this.group5.substr(0, this.group5.length - 1)
|
||||
this.group6 = this.group6.substr(0, this.group6.length - 1)
|
||||
this.group7 = this.group7.substr(0, this.group7.length - 1)
|
||||
this.group8 = this.group8.substr(0, this.group8.length - 1)
|
||||
this.group9 = this.group9.substr(0, this.group9.length - 1)
|
||||
this.group10 = this.group10.substr(0, this.group10.length - 1)
|
||||
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.payMethodName, this.supplierValue, this.textArea, this.freight, this.group1, this.group2, this.group3, this.group4, this.group5, this.group6, this.group7, this.group8, this.group9, this.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成合同成功')
|
||||
this.reload()
|
||||
} else { this.$message.error('生成合同失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
payMethodChange() { // 付款方式改变
|
||||
for (let i = 0; i < this.payMethod.length; i++) {
|
||||
if (this.payMethod[i].value === this.payMethodValue) {
|
||||
this.payMethodName = this.payMethod[i].label
|
||||
}
|
||||
}
|
||||
const payTimeNum = this.payMethodName.split(':')
|
||||
switch (payTimeNum.length) {
|
||||
case 1:
|
||||
this.disable2 = true
|
||||
this.disable3 = true
|
||||
this.disable4 = true
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 2:
|
||||
this.disable2 = false
|
||||
this.disable3 = true
|
||||
this.disable4 = true
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 3:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = true
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 4:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = true
|
||||
this.disable6 = true
|
||||
break
|
||||
case 5:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = false
|
||||
this.disable6 = true
|
||||
break
|
||||
case 6:
|
||||
this.disable2 = false
|
||||
this.disable3 = false
|
||||
this.disable4 = false
|
||||
this.disable5 = false
|
||||
this.disable6 = false
|
||||
break
|
||||
}
|
||||
this.fetchData()
|
||||
},
|
||||
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,486 @@
|
||||
<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-input
|
||||
v-model="buyerName"
|
||||
placeholder="采购员"
|
||||
size="small"
|
||||
readonly
|
||||
clearable
|
||||
style="width:100px"
|
||||
@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%;">
|
||||
<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.规定到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" min-width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" width="80" 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="100" 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="810" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
|
||||
<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.请款时间 }}
|
||||
</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="80" 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="80" 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="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未付款原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="cancelRequestFund(scope.row)">取消请款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款" min-width="80" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon=""
|
||||
@click="requestFund(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>
|
||||
<span>请款开始时间:</span>
|
||||
<el-date-picker
|
||||
v-model="startRequestDate"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>请款结束时间:</span>
|
||||
<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-button
|
||||
type="warning"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left:10px">导出Excel</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.规定到货时间 }}
|
||||
</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="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.请款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</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 { searchTable1, requestFund, searchCondition, cancelRequestFund, searchRequestTable, initBuyer } from '@/api/WorkshopProcurement/DepartmentBuyerRequestFund'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData02: [],
|
||||
dialogVisible2: false,
|
||||
loading2: false,
|
||||
tableData2: [],
|
||||
tableData11: [],
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
startDate: '',
|
||||
endDate: '',
|
||||
contractNum: '',
|
||||
buyerName: '',
|
||||
dialogVisible1: false,
|
||||
submitDisable: true,
|
||||
form1: {},
|
||||
supplierValue: '',
|
||||
supplierName: '',
|
||||
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,
|
||||
tableData01: [],
|
||||
loading1: false,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
startRequestDate: '',
|
||||
endRequestDate: '',
|
||||
checkRequest: 0
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id'
|
||||
])
|
||||
},
|
||||
methods: {
|
||||
submitSelectBuyer() { // 确定
|
||||
this.dialogVisible2 = false
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
this.buyerName = row.姓名
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
|
||||
this.contractNum ? 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.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.buyerName, this.check4, this.supplierName).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].规定到货时间 !== null) {
|
||||
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
|
||||
}
|
||||
this.tableData11[j] = []
|
||||
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
for (let i = 0; i < response0.data.length; i++) {
|
||||
if (response0.data[i].请款时间 !== null) {
|
||||
response0.data[i].请款时间 = response0.data[i].请款时间.substring(0, response0.data[i].请款时间.indexOf(' '))
|
||||
}
|
||||
this.tableData11[j].push(response0.data[i])
|
||||
}
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
requestFund(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('请款失败') }
|
||||
})
|
||||
},
|
||||
cancelRequestFund(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 { this.checkRequest = 1 }
|
||||
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).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].请款时间 !== 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>
|
||||
184
src/views/WorkshopProcurement/FundApproval2/index.vue
Normal file
184
src/views/WorkshopProcurement/FundApproval2/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="500px" 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, 2).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, 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: '取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
184
src/views/WorkshopProcurement/FundApproval3/index.vue
Normal file
184
src/views/WorkshopProcurement/FundApproval3/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="500px" 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, 3).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, 3).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, 3).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>
|
||||
224
src/views/WorkshopProcurement/InvoiceStateSearch/index.vue
Normal file
224
src/views/WorkshopProcurement/InvoiceStateSearch/index.vue
Normal file
@@ -0,0 +1,224 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>采购合同号:</span>
|
||||
<el-select v-model="contractNum" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNums"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 300px" height="300px" stripe border @row-click="searchTable2">
|
||||
<el-table-column align="center" label="采购合同编号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购合同名称" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供应商" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="合同总金额" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ 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="100*(scope.row.到票总金额/scope.row.合同总金额).toFixed(4)" status="success"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
<el-table v-loading="" :data="tableData2" size="mini" style="max-height: 200px;margin-top: 10px" height="200px" stripe border>
|
||||
<el-table-column align="center" label="发票号" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="传送人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.传送人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="接收人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购合同号" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchContractInvoice, searchInvoice, initPerson, initContract } from '@/api/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.contractNum ? this.check1 = 1 : this.check1 = 0
|
||||
this.supplierName ? this.check2 = 1 : this.check2 = 0
|
||||
searchContractInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.contractNum, this.check2, this.supplierName).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
searchInvoice(row.采购合同流水号).then(response => {
|
||||
for (let j = 0; j < response.data.length; j++) {
|
||||
if (response.data[j].开票时间 !== null) {
|
||||
response.data[j].开票时间 = response.data[j].开票时间.substring(0, response.data[j].开票时间.indexOf(' '))
|
||||
}
|
||||
if (response.data[j].开票时间 === '1900/1/1') {
|
||||
response.data[j].开票时间 = ''
|
||||
}
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
</style>
|
||||
180
src/views/WorkshopProcurement/PayStateSearch/index.vue
Normal file
180
src/views/WorkshopProcurement/PayStateSearch/index.vue
Normal file
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left:10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
|
||||
<el-table-column label="采购合同编号" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" align="center" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规定到货时间" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间.split(' ')[0] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款方式" align="center" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" min-width="70">
|
||||
<template slot-scope="scope">
|
||||
{{ 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="100*((scope.row.总金额 - scope.row.欠款金额)/scope.row.总金额).toFixed(4)"
|
||||
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 => {
|
||||
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,433 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @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" width="250">
|
||||
<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="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规定到货时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" width="70">
|
||||
<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="200">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.付款方式内容 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审批</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<div style="width:900px;margin-left: 350px">
|
||||
<el-card>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="1" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">运费:</td>
|
||||
<td colspan="1" align="center">{{ freight }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="23"/>
|
||||
<!--<el-input-->
|
||||
<!--type="textarea"-->
|
||||
<!--:rows="40" style="width:900px;margin:20px auto;display: block"-->
|
||||
<!--v-model="textarea">-->
|
||||
<!--</el-input>-->
|
||||
</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'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
RMB: '',
|
||||
TotalAmount: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
startEndDate: '',
|
||||
contract: '',
|
||||
freight: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
ProcurementContractNum: '',
|
||||
buyerName: '',
|
||||
buyerValue: '',
|
||||
supplier: '',
|
||||
supplierName: '',
|
||||
supplierValue: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
loading1: false,
|
||||
dialogVisible1: false,
|
||||
dialogVisible3: false,
|
||||
form1: {},
|
||||
returns: [],
|
||||
tableData01: [],
|
||||
tableData02: [],
|
||||
submitDisable: true,
|
||||
dialogVisible2: false,
|
||||
approval: [
|
||||
{
|
||||
value: 1,
|
||||
label: '是'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '否'
|
||||
}
|
||||
],
|
||||
disabled: true,
|
||||
form2: {
|
||||
审批是否通过: '',
|
||||
未通过原因: ''
|
||||
},
|
||||
rules2: {},
|
||||
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.采购合同流水号
|
||||
},
|
||||
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.未通过原因).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) {
|
||||
console.log(row)
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
|
||||
this.RMB = row.总金额_文本
|
||||
this.TotalAmount = row.总金额
|
||||
document.getElementById('23').innerText = this.textarea
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable2(this.contractValue).then(response => {
|
||||
this.returns = response.data
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementById('4')
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.tableData{
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,432 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @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" width="250">
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购员" align="center" width="70">
|
||||
<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="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="100">
|
||||
<template slot-scope="scope">
|
||||
<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>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="1" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">运费:</td>
|
||||
<td colspan="1" align="center">{{ freight }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="23"/>
|
||||
<!--<el-input-->
|
||||
<!--type="textarea"-->
|
||||
<!--:rows="40" style="width:900px;margin:20px auto;display: block"-->
|
||||
<!--v-model="textarea">-->
|
||||
<!--</el-input>-->
|
||||
</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'
|
||||
|
||||
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: '',
|
||||
freight: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
ProcurementContractNum: '',
|
||||
buyerName: '',
|
||||
buyerValue: '',
|
||||
supplier: '',
|
||||
supplierName: '',
|
||||
supplierValue: '',
|
||||
total1: 0,
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
tableData1: [],
|
||||
loading1: false,
|
||||
dialogVisible1: false,
|
||||
form1: {},
|
||||
goodTime: '',
|
||||
returns: [],
|
||||
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: '已取消禁用'
|
||||
})
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
searchTable2(row) {
|
||||
console.log(row)
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
|
||||
this.RMB = row.总金额_文本
|
||||
this.TotalAmount = row.总金额
|
||||
document.getElementById('23').innerText = this.textarea
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable2(this.contractValue).then(response => {
|
||||
this.returns = response.data
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementById('4')
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.tableData{
|
||||
height: 30px;
|
||||
}
|
||||
.el-table .adopt{
|
||||
background: limegreen;
|
||||
}
|
||||
.el-table .NotThrough{
|
||||
background: palevioletred;
|
||||
}
|
||||
</style>
|
||||
192
src/views/WorkshopProcurement/ProjectTotalSearch/index.vue
Normal file
192
src/views/WorkshopProcurement/ProjectTotalSearch/index.vue
Normal file
@@ -0,0 +1,192 @@
|
||||
<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>
|
||||
<div style="margin-bottom: 20px;margin-left: 10px;font-size: 20px;">采购部采购</div>
|
||||
<el-table v-loading="" :data="tableData1" 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>
|
||||
<div style="margin-bottom: 20px;margin-left: 10px;font-size: 20px;">车间采购</div>
|
||||
<el-table v-loading="" :data="tableData" 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, searchProjectTotal, searchProjectTotal1 } from '@/api/WorkshopProcurement/ProjectTotalSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 项目总价查询
|
||||
data() {
|
||||
return {
|
||||
projectValue: '',
|
||||
project: [],
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData: [],
|
||||
tableData1: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.project.push({
|
||||
label: response.data[i].项目名称,
|
||||
value: response.data[i].项目流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
if (this.projectValue) {
|
||||
searchProjectTotal(this.projectValue).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
searchProjectTotal1(this.projectValue).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData = response.data
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选择项目')
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageSize1 = val
|
||||
this.pageCurrent1 = 1
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.el-tag{
|
||||
margin: 0
|
||||
}
|
||||
.el-date-editor{
|
||||
width:300px
|
||||
}
|
||||
</style>
|
||||
626
src/views/WorkshopProcurement/PurchaseContractChange/index.vue
Normal file
626
src/views/WorkshopProcurement/PurchaseContractChange/index.vue
Normal file
@@ -0,0 +1,626 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div style="width: 48%; float: left;margin-left: 20px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;Buyer=0"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<span>供应商:</span>
|
||||
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
|
||||
<el-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>
|
||||
<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" 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:750px">
|
||||
<el-card>
|
||||
<table id="1" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center" style="font-weight: bold">GAOJING</td>
|
||||
<td colspan="3" align="center" style="font-weight: bold">产品销售合同</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">需方</td>
|
||||
<td colspan="1" align="center">江苏高精机电装备有限公司</td>
|
||||
<td colspan="1" align="center">合同编号</td>
|
||||
<td colspan="1" align="center">{{ contract }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="1" align="center">供方</td>
|
||||
<td colspan="1" align="center">{{ supplier }}</td>
|
||||
<td colspan="1" align="center">签订地点</td>
|
||||
<td colspan="1" align="center">江苏盐城</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="2" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="4">
|
||||
<tr id="tableHead" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">运费:</td>
|
||||
<td colspan="1" align="center">{{ freight }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">总价: (人民币){{ RMB }}(含0.17增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="23"/>
|
||||
<!--<el-input-->
|
||||
<!--type="textarea"-->
|
||||
<!--:rows="40" style="width:900px;margin:20px auto;display: block"-->
|
||||
<!--v-model="textarea">-->
|
||||
<!--</el-input>-->
|
||||
</el-card>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-card>
|
||||
</div>
|
||||
<div style="width: 48%; float: right; margin-right: 20px">
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="startEndDate"
|
||||
style="width:250px"
|
||||
size="small"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<span>合同号:</span>
|
||||
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNum"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>采购员:</span>
|
||||
<el-input v-model="buyerName1" placeholder="采购员" size="small" readonly clearable style="width:100px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=1"/>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px">
|
||||
<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="total2=0;pageCurrent2=1;pageSize2=10;searchTable3()">查询变更记录</el-button>
|
||||
</el-row>
|
||||
<el-card>
|
||||
<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">
|
||||
<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:750px">
|
||||
<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>一、 产品名称、型号、数量、单价、品牌:</div>
|
||||
<table id="5" cellspacing="0px" align="center" border width="100%" style="">
|
||||
<tbody id="6">
|
||||
<tr id="tableHead1" style="height: 40px">
|
||||
<td colspan="1" align="center">物料名称</td>
|
||||
<td colspan="1" align="center">物料规格</td>
|
||||
<td colspan="1" align="center">物料型号</td>
|
||||
<td colspan="1" align="center">发货天数</td>
|
||||
<td colspan="1" align="center">数量</td>
|
||||
<td colspan="1" align="center">单价</td>
|
||||
<td colspan="1" align="center">总价</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">运费:</td>
|
||||
<td colspan="1" align="center">{{ freight1 }}</td>
|
||||
</tr>
|
||||
<tr style="height: 40px">
|
||||
<td colspan="6">总价: (人民币){{ RMB1 }}(含0.17增值税) </td>
|
||||
<td colspan="1" align="center">{{ TotalAmount1 }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<div id="24"/>
|
||||
<!--<el-input-->
|
||||
<!--type="textarea"-->
|
||||
<!--:rows="40" style="width:900px;margin:20px auto;display: block"-->
|
||||
<!--v-model="textarea">-->
|
||||
<!--</el-input>-->
|
||||
</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, initBuyer, searchTable1, searchTable2, searchTable3, searchTable4, submitContract } from '@/api/WorkshopProcurement/PurchaseContractChange'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
RMB: '',
|
||||
TotalAmount: '',
|
||||
RMB1: '',
|
||||
TotalAmount1: '',
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
startEndDate: '',
|
||||
contract: '',
|
||||
contract1: '',
|
||||
freight: '',
|
||||
freight1: '',
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
ProcurementContractNum: '',
|
||||
buyer: 0,
|
||||
Supplier: 0,
|
||||
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: [],
|
||||
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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
initBuyer() { // 初始化采购人员
|
||||
initBuyer().then(response => {
|
||||
this.tableData02 = response.data
|
||||
})
|
||||
},
|
||||
clickBuyer(row) { // 点击采购员表某一行
|
||||
this.submitDisable = false
|
||||
if (this.buyer === 0) {
|
||||
this.buyerName = row.姓名
|
||||
this.buyerValue = row.人员编号
|
||||
} else if (this.buyer === 1) {
|
||||
this.buyerName1 = row.姓名
|
||||
this.buyerValue1 = 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
|
||||
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
|
||||
})
|
||||
},
|
||||
searchTable3() {
|
||||
this.textarea1 = ``
|
||||
this.loading2 = 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
|
||||
searchTable3(this.pageCurrent2, this.pageSize2, this.check1, this.startEndDate[0], this.startEndDate[1], this.check2, this.contractNumValue, this.check3, this.buyerValue, this.check4, this.supplierName).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) {
|
||||
console.log(row)
|
||||
this.textarea = row.合同文本
|
||||
this.supplier = row.供应商名称
|
||||
this.contract = row.采购合同编号
|
||||
this.freight = parseInt(row.总金额) - parseInt(row.总金额_小计)
|
||||
this.RMB = row.总金额_文本
|
||||
this.TotalAmount = row.总金额
|
||||
document.getElementById('23').innerText = this.textarea
|
||||
this.contractValue = parseInt(row.采购合同流水号)
|
||||
searchTable2(this.contractValue).then(response => {
|
||||
this.returns = response.data
|
||||
const children = document.getElementsByClassName('tableData')
|
||||
const parent = document.getElementById('4')
|
||||
if (children.length !== 0) {
|
||||
for (let i = children.length - 1; i >= 0; i--) {
|
||||
parent.removeChild(children[i])
|
||||
}
|
||||
}
|
||||
const tr = []
|
||||
for (let i = 0; i < this.returns.length; i++) {
|
||||
tr[i] = document.createElement('tr')
|
||||
tr[i].setAttribute('class', 'tableData')
|
||||
tr[i].innerHTML = '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' +
|
||||
'<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>' + '<td colspan="1" align="center"></td>'
|
||||
document.getElementById('tableHead').after(tr[i])
|
||||
}
|
||||
for (let j = 0; j < this.returns.length; j++) {
|
||||
document.getElementsByClassName('tableData')[j].children[0].innerHTML = response.data[j].物料名称
|
||||
document.getElementsByClassName('tableData')[j].children[1].innerHTML = response.data[j].物料规格
|
||||
document.getElementsByClassName('tableData')[j].children[2].innerHTML = response.data[j].物料型号
|
||||
document.getElementsByClassName('tableData')[j].children[3].innerHTML = response.data[j].发货天数
|
||||
document.getElementsByClassName('tableData')[j].children[4].innerHTML = response.data[j].数量
|
||||
document.getElementsByClassName('tableData')[j].children[5].innerHTML = response.data[j].单价
|
||||
document.getElementsByClassName('tableData')[j].children[6].innerHTML = response.data[j].金额
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable4(row) {
|
||||
console.log(row)
|
||||
this.textarea1 = row.合同文本
|
||||
this.supplier1 = row.供应商名称
|
||||
this.contract1 = row.采购合同编号
|
||||
this.freight1 = parseInt(row.总金额) - parseInt(row.总金额_小计)
|
||||
this.RMB1 = row.总金额_文本
|
||||
this.TotalAmount1 = 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="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].发货天数
|
||||
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].金额
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</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>
|
||||
.tableData1{
|
||||
height: 30px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,232 @@
|
||||
<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"/>
|
||||
<span>零件号:</span>
|
||||
<el-select v-model="PartNumberValue" placeholder="零件号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in PartNumber"
|
||||
: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-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="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"
|
||||
icon="el-icon-star-off"
|
||||
@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, initParts, searchParts, update, deleteData, editData } from '@/api/WorkshopProcurement/PurchasingQualityInspection'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
loading: false,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
PartNumberValue: '',
|
||||
PartNumber: [],
|
||||
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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initParts().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.PartNumber.push({
|
||||
label: 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
|
||||
this.PartNumberValue ? this.check3 = 1 : this.check3 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName, this.check3, this.PartNumberValue).then(response => {
|
||||
this.loading = false
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
})
|
||||
},
|
||||
update(row) {
|
||||
update(row.id, row.交检日期, row.废品数量, row.检查日期, row.报废原因, row.备注).then(response => {
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.$confirm('是否确认无误?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
editData(row.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('通过成功')
|
||||
this.searchTable()
|
||||
} else { this.$message.error('通过失败') }
|
||||
})
|
||||
}).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>
|
||||
183
src/views/WorkshopProcurement/QualityInspectionQuery/index.vue
Normal file
183
src/views/WorkshopProcurement/QualityInspectionQuery/index.vue
Normal file
@@ -0,0 +1,183 @@
|
||||
<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"/>
|
||||
<span>零件号:</span>
|
||||
<el-select v-model="PartNumberValue" placeholder="零件号" size="small" clearable>
|
||||
<el-option
|
||||
v-for="item in PartNumber"
|
||||
: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-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, initParts, searchParts } from '@/api/WorkshopProcurement/QualityInspectionQuery'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
loading: false,
|
||||
contractNumValue: '',
|
||||
contractNum: [],
|
||||
supplierName: '',
|
||||
PartNumberValue: '',
|
||||
PartNumber: [],
|
||||
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].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initParts().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.PartNumber.push({
|
||||
label: 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
|
||||
this.PartNumberValue ? this.check3 = 1 : this.check3 = 0
|
||||
searchParts(this.pageCurrent, this.pageSize, this.check1, this.contractNumValue, this.check2, this.supplierName, this.check3, this.PartNumberValue).then(response => {
|
||||
this.loading = false
|
||||
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>
|
||||
419
src/views/WorkshopProcurement/ReceiptConnectionSheet/index.vue
Normal file
419
src/views/WorkshopProcurement/ReceiptConnectionSheet/index.vue
Normal file
@@ -0,0 +1,419 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>发票号:</span>
|
||||
<el-input v-model="invoiceNum" size="small" clearable/>
|
||||
<!--<span>开票时间:</span>-->
|
||||
<!--<el-date-picker v-model="invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>-->
|
||||
<span>采购合同号:</span>
|
||||
<el-select v-model="contractNum" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNums"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<span>传送人:</span>
|
||||
<el-select v-model="transmitValue" placeholder="传送人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>接收人:</span>
|
||||
<el-select v-model="recipientValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button
|
||||
type="success"
|
||||
size="small"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 10px"
|
||||
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-circle-plus-outline"
|
||||
style="margin-left: 10px"
|
||||
@click="addTable1()">增加</el-button>
|
||||
<el-button
|
||||
type="warning"
|
||||
size="small"
|
||||
icon="el-icon-download"
|
||||
style="margin-left: 10px">导出</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="" :data="tableData1" size="mini" style="max-height: 400px" height="400px" stripe border>
|
||||
<el-table-column align="center" label="发票号" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票时间" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="开票金额" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购合同编号" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="采购合同名称" min-width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="供应商" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="总金额" min-width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="传送人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.传送人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="接收人" min-width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收人姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" min-width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
icon="el-icon-edit"
|
||||
@click="editTable1(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
type="danger"
|
||||
size="mini"
|
||||
icon="el-icon-delete"
|
||||
@click="deleteTable1(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
style="display:inline-block;width:50%"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="25%">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px">
|
||||
<el-form-item label="采购合同号" prop="contractNum">
|
||||
<el-select v-model="form1.contractNum" placeholder="合同号" size="small" filterable clearable>
|
||||
<el-option
|
||||
v-for="item in contractNums"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="发票号" prop="invoiceNum">
|
||||
<el-input v-model="form1.invoiceNum" size="small"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票时间" prop="invoiceTime">
|
||||
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票金额" prop="money">
|
||||
<el-input v-model="form1.money" size="small" placeholder="开票金额"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="传送人" prop="sendPerson">
|
||||
<el-select v-model="form1.sendPersonValue" placeholder="传送人" size="small" disabled filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收人" prop="receivePerson">
|
||||
<el-select v-model="form1.receivePersonValue" placeholder="接收人" size="small" filterable clearable style="width:100px">
|
||||
<el-option
|
||||
v-for="item in selectPerson"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form1.remark" size="small"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogVisible1 = false">取消</el-button>
|
||||
<el-button v-show="title1==='增加'" size="small" type="primary" @click="submitAdd1('form1')">确定</el-button>
|
||||
<el-button v-show="title1==='编辑'" size="small" type="primary" @click="submitEdit1('form1')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchInvoice, addInvoice, editInvoice, deleteInvoice, initPerson, initContract } from '@/api/WorkshopProcurement/ReceiptConnectionSheet'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: '', // 发票交接单
|
||||
data() {
|
||||
return {
|
||||
contractNumValue: '',
|
||||
contractNums: [],
|
||||
invoiceNum: '',
|
||||
invoiceTime: '',
|
||||
transmitValue: '',
|
||||
selectPerson: [], // 传送人接收人
|
||||
recipientValue: '',
|
||||
contractNum: '',
|
||||
pageCurrent1: 1,
|
||||
pageSize1: 10,
|
||||
total1: 0,
|
||||
tableData1: [],
|
||||
check1: 0,
|
||||
check2: 0,
|
||||
check3: 0,
|
||||
check4: 0,
|
||||
check5: 0,
|
||||
dialogVisible1: false,
|
||||
title1: '',
|
||||
form1: {
|
||||
contractNum: '',
|
||||
invoiceNum: '',
|
||||
invoiceNumValue: '',
|
||||
invoiceTime: '',
|
||||
money: '',
|
||||
sendPersonValue: '',
|
||||
receivePersonValue: '',
|
||||
remark: ''
|
||||
},
|
||||
rules1: {
|
||||
contractNum: [
|
||||
{ required: true, message: '请选择合同号', trigger: 'change' }
|
||||
],
|
||||
invoiceNum: [
|
||||
{ required: true, message: '请输入发票号', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
initContract().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.contractNums.push({
|
||||
label: response.data[i].采购合同编号,
|
||||
name: response.data[i].采购合同名称,
|
||||
value: response.data[i].采购合同流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.selectPerson.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable1() {
|
||||
this.invoiceNum ? this.check1 = 1 : this.check1 = 0
|
||||
this.invoiceTime ? this.check2 = 1 : this.check2 = 0
|
||||
this.transmitValue ? this.check3 = 1 : this.check3 = 0
|
||||
this.recipientValue ? this.check4 = 1 : this.check4 = 0
|
||||
this.contractNum ? this.check5 = 1 : this.check5 = 0
|
||||
searchInvoice(this.pageCurrent1, this.pageSize1, this.check1, this.invoiceNum, this.check2, this.invoiceTime, this.check3, this.transmitValue, this.check4, this.recipientValue, this.check5, this.contractNum).then(response => {
|
||||
for (let j = 0; j < response.data.rows.length; j++) {
|
||||
if (response.data.rows[j].开票时间 !== null) {
|
||||
response.data.rows[j].开票时间 = response.data.rows[j].开票时间.substring(0, response.data.rows[j].开票时间.indexOf(' '))
|
||||
}
|
||||
if (response.data.rows[j].开票时间 === '1900/1/1') {
|
||||
response.data.rows[j].开票时间 = ''
|
||||
}
|
||||
}
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable1()
|
||||
},
|
||||
addTable1() {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '增加'
|
||||
this.dialogVisible1 = true
|
||||
this.form1.contractNum = ''
|
||||
this.form1.invoiceNum = ''
|
||||
this.form1.invoiceTime = ''
|
||||
this.form1.money = ''
|
||||
this.form1.sendPersonValue = 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).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data.result[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('增加失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
editTable1(row) {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
this.title1 = '编辑'
|
||||
this.dialogVisible1 = true
|
||||
this.form1.contractNum = parseInt(row.采购合同流水号)
|
||||
this.form1.invoiceNum = row.发票号
|
||||
this.form1.invoiceNumValue = row.发票流水号
|
||||
this.form1.invoiceTime = row.开票时间
|
||||
this.form1.money = row.开票金额
|
||||
this.form1.sendPersonValue = parseInt(row.传送人)
|
||||
this.form1.receivePersonValue = parseInt(row.接收人)
|
||||
this.form1.remark = row.备注
|
||||
console.log(row.开票时间)
|
||||
if (row.开票时间 === '1900/1/1') {
|
||||
this.form1.invoiceTime = null
|
||||
}
|
||||
if (parseInt(row.传送人) === 0) {
|
||||
this.form1.sendPersonValue = ''
|
||||
}
|
||||
if (parseInt(row.接收人) === 0) {
|
||||
this.form1.receivePersonValue = ''
|
||||
}
|
||||
},
|
||||
submitEdit1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editInvoice(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark).then(response => {
|
||||
console.log(this.form1.invoiceNumValue, this.form1.contractNum, this.form1.invoiceNum, this.form1.invoiceTime, this.form1.money, this.form1.sendPersonValue, this.form1.receivePersonValue, this.form1.remark)
|
||||
console.log(response.data)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('编辑失败') }
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteTable1(row) {
|
||||
console.log(row)
|
||||
this.$confirm('确认删除吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteInvoice(row.发票流水号).then(response => {
|
||||
console.log(response.data)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.dialogVisible1 = false
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('删除失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px;
|
||||
}
|
||||
.el-select{
|
||||
width:200px
|
||||
}
|
||||
.el-input{
|
||||
width:200px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.searchForm .el-form-item{
|
||||
margin-top: 1px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user