|
@@ -0,0 +1,421 @@
|
|
|
+//通用审核
|
|
|
+<template>
|
|
|
+ <div class="container">
|
|
|
+
|
|
|
+ <div class="center">
|
|
|
+ <el-row style='margin-bottom:10px;'>
|
|
|
+ <el-col :span="12">
|
|
|
+ <!-- <el-button style="margin-left:10px" @click="typeChange('')" type="primary">导出</el-button> -->
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div style='margin-left:10px;' class="datascreen">
|
|
|
+ <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" unlink-panels range-separator="至"
|
|
|
+ start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
|
|
|
+ </el-date-picker>
|
|
|
+ <el-input placeholder="可按发起人姓名或业务编号查找" class="input_css" v-model="searchKeyWord"></el-input>
|
|
|
+ <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
|
|
|
+ src="../../../public/img/sousuo.png" alt="" /></el-button>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style='margin-bottom:10px;'>
|
|
|
+ <el-col :span="18">
|
|
|
+ <el-button style="margin-left:10px" @click="typeChange1('')" :type="searchType == ''?'primary':''">全部</el-button>
|
|
|
+ <el-button @click="typeChange1(4)" :type="searchTypeCon == 4?'primary':''">待审核</el-button>
|
|
|
+ <el-button @click="typeChange1(1)" :type="searchTypeCon == 1?'primary':''">已驳回</el-button>
|
|
|
+ <el-button @click="typeChange1(3)" :type="searchTypeCon == 3?'primary':''">已通过</el-button>
|
|
|
+ <el-select v-model="contractType" filterable clearable placeholder="选择类型" @change="selecttype" :value="searchType">
|
|
|
+ <el-option key="type0" label="全部类型" value=""
|
|
|
+ style="color: #8890b1" />
|
|
|
+ <el-option v-for="item in xialaList" :key="item.id" :label="item" :value="item"
|
|
|
+ style="color: #8890b1" />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <div class="fromdata">
|
|
|
+ <el-table :data="tableData" stripe style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ width="55">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column type="index" label="序号">
|
|
|
+ <template scope="scope">
|
|
|
+ <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
|
|
|
+ <span v-else>{{ scope.$index + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="auditBusinessNo" label="审核业务编号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="businessType" label="类型">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="buyer" label="备注">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="addressUrl" label="附件">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
|
|
|
+ src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
|
|
|
+ <span v-if="scope.row.addressUrlArray != null">
|
|
|
+ {{
|
|
|
+ scope.row.addressUrlArray.length == 0
|
|
|
+ ? ''
|
|
|
+ : scope.row.addressUrlArray.length
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="createDate" label="时间"></el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="status" label="状态"></el-table-column>
|
|
|
+ <el-table-column prop="address" label="操作" width="300">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- <el-button v-if="scope.row.status=='已结算'" @click="finalstatement(scope.row)" type="primary">结算单</el-button>
|
|
|
+ <el-button v-if="scope.row.status=='已完成'" @click="closeaccount(scope.row)" type="primary">结算</el-button> -->
|
|
|
+ <el-button @click="inventory(scope.row)" type="primary">库存</el-button>
|
|
|
+ <el-button @click="cost(scope.row)" type="primary">费用</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ style="text-align:center" :page-size="pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ <el-dialog
|
|
|
+ title="提示"
|
|
|
+ :visible.sync="correlationshow"
|
|
|
+ width="30%"
|
|
|
+ :before-close="handleClose">
|
|
|
+ <div v-if="contractList.length>0">
|
|
|
+ <div style="display:flex;justify-content: space-between;" v-for="item in contractList"><div>{{item.contractNo}}</div>
|
|
|
+ <div><span v-if="item.status!='已完成'&&item.status!='已结算'&&item.status!='发运结束'">未完成</span><span v-else>未完成</span></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-else>暂无关联合同</div>
|
|
|
+</el-dialog>
|
|
|
+<el-dialog
|
|
|
+ title="合同结算单"
|
|
|
+ :visible.sync="show"
|
|
|
+ width="30%"
|
|
|
+ :before-close="handleClose1">
|
|
|
+ <div>
|
|
|
+ <table class="table">
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">合同编号</td>
|
|
|
+ <td class="col">{{tableData.contractNo}}</td>
|
|
|
+ <td class="col col-bgc">合同类型</td>
|
|
|
+ <td class="col">{{tableData.agreementType}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">买方</td>
|
|
|
+ <td class="col">{{tableData.buyer}}</td>
|
|
|
+ <td class="col col-bgc">卖方</td>
|
|
|
+ <td class="col">{{tableData.seller}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">结算单价(元/吨)</td>
|
|
|
+ <td class="col">{{tableData.settlementPrice}}</td>
|
|
|
+ <td class="col col-bgc">合计利润(元)</td>
|
|
|
+ <td class="col">{{tableData.profit}}</td>
|
|
|
+ </tr>
|
|
|
+ <tr class="row">
|
|
|
+ <td class="col col-bgc">关联合同</td>
|
|
|
+ <td class="col col-bgc">结算单价(元/吨)</td>
|
|
|
+ <td class="col col-bgc">重量(吨)</td>
|
|
|
+ <td class="col col-bgc">利润(元)</td>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="item in tableData.contractList" class="row">
|
|
|
+ <td class="col">{{item.contractNo}}</td>
|
|
|
+ <td class="col">{{item.settlementPrice}}</td>
|
|
|
+ <td class="col">{{item.weight}}</td>
|
|
|
+ <td class="col">{{item.profit}}</td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+</el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ xiala,
|
|
|
+ aduitinfoList
|
|
|
+ } from '@/model/universalityAudit/index'
|
|
|
+ export default {
|
|
|
+ components: {},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ value: "",
|
|
|
+ tableData: [],
|
|
|
+ show:false,
|
|
|
+ correlationshow:false,
|
|
|
+ deptBudgetTotal: 0,
|
|
|
+ currentPage: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ agreementType:'',
|
|
|
+ deptCircularPage: {},
|
|
|
+ searchType:"",
|
|
|
+ searchKeyWord:"",
|
|
|
+ startDate:"",
|
|
|
+ searchContractType:'',
|
|
|
+ searchTypeCon:'',
|
|
|
+ endDate:"",
|
|
|
+ outtotal:0,
|
|
|
+ xialaList:[],
|
|
|
+ intotal:0,
|
|
|
+ contractList:[],
|
|
|
+ tableData:{},
|
|
|
+ datalist:{},
|
|
|
+ compId:localStorage.getItem('ws-pf_compId'),
|
|
|
+ }
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ xiala({constCode:'EXA1'}).toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.xialaList=response
|
|
|
+ })
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleClose(){
|
|
|
+ this.correlationshow=false
|
|
|
+ },
|
|
|
+ handleClose1(){
|
|
|
+ this.show=false
|
|
|
+ },
|
|
|
+ correlation(row){
|
|
|
+ getrelationcontract({
|
|
|
+ agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
|
|
|
+ .toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.contractList=response
|
|
|
+ this.correlationshow=true
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ typeChange(num){
|
|
|
+ this.searchContractType= num
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ typeChange1(num){
|
|
|
+ this.searchTypeCon= num
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ async closeaccount(row){
|
|
|
+
|
|
|
+ var data=await getrelationcontract({
|
|
|
+ agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
|
|
|
+ .toPromise()
|
|
|
+ var arr=[row].concat(data)
|
|
|
+ this.datalist.contractManagementInfoList=arr
|
|
|
+ judgesettlement(this.datalist).toPromise().then(response => {
|
|
|
+ var weightprice=0
|
|
|
+ for (let i = 0; i < data.length; i++) {
|
|
|
+ weightprice+=(data[i].weight*data[i].settlementPrice)
|
|
|
+ }
|
|
|
+ if(row.agreementType=='收购合同'||row.agreementType=='采购合同'){
|
|
|
+ row.profit=weightprice-(row.weight*row.settlementPrice)
|
|
|
+ }else if(row.agreementType=='销售合同'){
|
|
|
+ row.profit=(row.weight*row.settlementPrice)-weightprice
|
|
|
+ }
|
|
|
+ this.$confirm('结算后当前合同和相关合同不可再进行费用相关操作', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ editcontract({flag:2,id:row.id,profit:row.profit}).toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.$message({
|
|
|
+ message: '结算成功!',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ this.getList()
|
|
|
+ }).catch(()=>{
|
|
|
+ this.$message({
|
|
|
+ message: '结算失败!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ finalstatement(row){
|
|
|
+ this.tableData.contractNo=row.contractNo
|
|
|
+ this.tableData.agreementType=row.agreementType
|
|
|
+ this.tableData.buyer=row.buyer
|
|
|
+ this.tableData.seller=row.seller
|
|
|
+ this.tableData.settlementPrice=row.settlementPrice
|
|
|
+ this.tableData.profit=row.profit
|
|
|
+ getrelationcontract({
|
|
|
+ agreementType:row.agreementType,contractNo:row.contractNo,compId:this.compId})
|
|
|
+ .toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.tableData.contractList=response
|
|
|
+ this.show=true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ inventory(row){
|
|
|
+ this.$router.push({name:'contractinventory',query:{contractNo:row.contractNo,contractType:row.contractType,buyer:row.buyer,seller:row.seller}})
|
|
|
+ },
|
|
|
+ returnsales(){
|
|
|
+ this.$router.go(-1)
|
|
|
+ },
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.multipleSelection = val;
|
|
|
+ },
|
|
|
+ async getList() {
|
|
|
+
|
|
|
+ aduitinfoList({
|
|
|
+ startDate:this.startDate,
|
|
|
+ endDate:this.endDate,
|
|
|
+ searchKeyWord:this.searchKeyWord,
|
|
|
+ currentPage: this.currentPage,
|
|
|
+ pageSize:this.pageSize ,
|
|
|
+ searchType:this.searchType,
|
|
|
+ })
|
|
|
+ .toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.tableData=response
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ changeDate(){
|
|
|
+ if(this.value){
|
|
|
+ this.startDate = this.value[0]
|
|
|
+ this.endDate = this.value[1]
|
|
|
+ }
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ pickerOptions() {},
|
|
|
+ find() {
|
|
|
+ this.getList()
|
|
|
+
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
+ this.pageSize = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+ table,
|
|
|
+ table tr th,
|
|
|
+ table tr td {
|
|
|
+ border: 2px solid #333333;
|
|
|
+ padding: 5px 0;
|
|
|
+ height: 55px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content {
|
|
|
+ width: 1000px;
|
|
|
+ padding: 70px 20px 20px 20px;
|
|
|
+ font-size: 22px;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ table {
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ border-collapse: collapse;
|
|
|
+ border: 3px solid #333333;
|
|
|
+ }
|
|
|
+
|
|
|
+ .col-bgc {
|
|
|
+ background: #f6f7fb;
|
|
|
+ }
|
|
|
+
|
|
|
+ .container {
|
|
|
+ background: #E8ECF6;
|
|
|
+ }
|
|
|
+
|
|
|
+ .center {
|
|
|
+ margin: 0 auto;
|
|
|
+ background: #ffffff;
|
|
|
+ height: calc(100vh - 13vh);
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 20px 0;
|
|
|
+
|
|
|
+ /deep/.el-table td,
|
|
|
+ /deep/.el-table th {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .row_top {
|
|
|
+ background: #F6F7FC;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+
|
|
|
+ .bg-left {
|
|
|
+ padding-left: 30px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bg-right {
|
|
|
+ padding-right: 10px;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title {
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title::before {
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 5px;
|
|
|
+ height: 30px;
|
|
|
+ background: #5473e8;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .datascreen {
|
|
|
+ display: flex;
|
|
|
+
|
|
|
+ .data_css {
|
|
|
+ width: 40%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input_css {
|
|
|
+ width: 50%;
|
|
|
+ margin: 0 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .find {
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .fromdata {
|
|
|
+ margin: 20px 0;
|
|
|
+ overflow-y: scroll;
|
|
|
+ height: 546px;
|
|
|
+ }
|
|
|
+ .top_info{
|
|
|
+ margin: 10px 0 0 10px;
|
|
|
+ min-width: 712px;
|
|
|
+ .info_css{
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bg-right{
|
|
|
+ padding-top:15px;
|
|
|
+ }
|
|
|
+</style>
|