|
@@ -4,9 +4,6 @@
|
|
|
|
|
|
<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="至"
|
|
@@ -16,18 +13,22 @@
|
|
|
<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-col style="text-align:right;" :span="12">
|
|
|
+ <el-button style="margin-right:10px" @click="addlist" type="primary">添加</el-button>
|
|
|
</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-button @click="typeChange1(1)" :type="searchType == 1?'primary':''">待审核</el-button>
|
|
|
+ <el-button @click="typeChange1(2)" :type="searchType == 2?'primary':''">已驳回</el-button>
|
|
|
+ <el-button @click="typeChange1(3)" :type="searchType == 3?'primary':''">已通过</el-button>
|
|
|
+ <el-select v-model="businessType" filterable clearable placeholder="选择类型" @change="typeChange" >
|
|
|
<el-option key="type0" label="全部类型" value=""
|
|
|
style="color: #8890b1" />
|
|
|
- <el-option v-for="item in xialaList" :key="item.id" :label="item" :value="item"
|
|
|
+ <el-option v-for="item in xialaList" :key="item.id" :label="item.constValue" :value="item.constValue"
|
|
|
style="color: #8890b1" />
|
|
|
</el-select>
|
|
|
</el-col>
|
|
@@ -52,12 +53,25 @@
|
|
|
<el-table-column prop="businessType" label="类型">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="buyer" label="备注">
|
|
|
- <template slot-scope="scope">
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-popover
|
|
|
+ placement="bottom"
|
|
|
+ title="备注详情"
|
|
|
+ width="400"
|
|
|
+ trigger="click"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div>{{scope.row.sponsor+'('+scope.row.auditBusinessNo+')'}}</div>
|
|
|
+ <div>{{scope.row.remark}}</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-button slot="reference">查看</el-button>
|
|
|
+ </el-popover>
|
|
|
+ </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"
|
|
|
+ <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">
|
|
|
{{
|
|
@@ -66,17 +80,19 @@
|
|
|
: scope.row.addressUrlArray.length
|
|
|
}}
|
|
|
</span>
|
|
|
- </template>
|
|
|
+ </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>
|
|
|
+
|
|
|
+ <el-button @click="pass(scope.row)" type="primary">通过</el-button>
|
|
|
+ <el-button @click="reject(scope.row)" type="primary">驳回</el-button>
|
|
|
+ <!-- <div style="display:inline-block;"> -->
|
|
|
+ <el-button v-if="scope.row.status=='已驳回'" @click="del(scope.row)" type="danger">删除</el-button>
|
|
|
+ <!-- </div> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -88,23 +104,37 @@
|
|
|
</div>
|
|
|
<el-dialog
|
|
|
title="提示"
|
|
|
- :visible.sync="correlationshow"
|
|
|
+ :visible.sync="addshow"
|
|
|
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-form ref="form" :model="form" label-width="80px">
|
|
|
+ <el-form-item label="类型">
|
|
|
+ <el-select v-model="form.businessType" filterable clearable placeholder="选择类型">
|
|
|
+ <el-option v-for="item in xialaList" :key="item.id" :label="item.constValue" :value="item.constValue" style="color: #8890b1" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="附件">
|
|
|
+ <ws-upload ref="upload" limit="20" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="form.addressUrl" :size-limit="size"
|
|
|
+ @onChange="onChange"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="备注">
|
|
|
+ <el-input maxlength="2000" type="textarea" show-word-limit v-model="form.remark"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button @click="addshow=false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="onSubmit">提交</el-button>
|
|
|
+ </el-form-item>
|
|
|
+</el-form>
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
|
title="合同结算单"
|
|
|
:visible.sync="show"
|
|
|
width="30%"
|
|
|
:before-close="handleClose1">
|
|
|
- <div>
|
|
|
- <table class="table">
|
|
|
+ <!--<div>
|
|
|
+ <table class="table">
|
|
|
<tr class="row">
|
|
|
<td class="col col-bgc">合同编号</td>
|
|
|
<td class="col">{{tableData.contractNo}}</td>
|
|
@@ -136,131 +166,220 @@
|
|
|
<td class="col">{{item.profit}}</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</el-dialog>
|
|
|
+<el-dialog
|
|
|
+ :title="title"
|
|
|
+ :visible.sync="rejectshow"
|
|
|
+ width="30%"
|
|
|
+ :before-close="handleClose">
|
|
|
+ <span>{{title=='驳回'?'确定驳回审核?':'确定通过审核?'}}</span>
|
|
|
+ <div><el-input
|
|
|
+ type="textarea"
|
|
|
+ :rows="2"
|
|
|
+ placeholder="请输入审核意见"
|
|
|
+ v-model="textarea">
|
|
|
+</el-input>
|
|
|
+</div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="rejectclick">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+<WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
|
|
|
+ @on-cancel="handleClose">
|
|
|
+ <ws-upload ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
|
|
|
+ accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
|
|
|
+ </WinseaContentModal>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
xiala,
|
|
|
- aduitinfoList
|
|
|
+ aduitinfoList,
|
|
|
+ addaduitinfo,
|
|
|
+ deladuitinfo
|
|
|
} from '@/model/universalityAudit/index'
|
|
|
+ import WsUpload from '@/components/WsUpload'
|
|
|
export default {
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ WsUpload
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
value: "",
|
|
|
tableData: [],
|
|
|
show:false,
|
|
|
+ title:'',
|
|
|
+ textarea:'',
|
|
|
+ rejectshow:false,
|
|
|
+ addshow:false,
|
|
|
correlationshow:false,
|
|
|
deptBudgetTotal: 0,
|
|
|
currentPage: 1,
|
|
|
pageSize: 10,
|
|
|
- agreementType:'',
|
|
|
- deptCircularPage: {},
|
|
|
+ businessType:'',
|
|
|
searchType:"",
|
|
|
searchKeyWord:"",
|
|
|
startDate:"",
|
|
|
- searchContractType:'',
|
|
|
- searchTypeCon:'',
|
|
|
endDate:"",
|
|
|
outtotal:0,
|
|
|
xialaList:[],
|
|
|
intotal:0,
|
|
|
+ form:{},
|
|
|
+ dialogVisible:false,
|
|
|
contractList:[],
|
|
|
- tableData:{},
|
|
|
datalist:{},
|
|
|
+ size:100,
|
|
|
+ accessoryTFs:false,
|
|
|
+ appendixIdss:'',
|
|
|
compId:localStorage.getItem('ws-pf_compId'),
|
|
|
+ currectdata:{}
|
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
|
- xiala({constCode:'EXA1'}).toPromise()
|
|
|
+ xiala({constId:'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
|
|
|
+ rejectclick(){
|
|
|
+ if(this.title=='驳回'){
|
|
|
+ woekflowhandle({
|
|
|
+ taskId: this.currectdata.taskId,
|
|
|
+ approved:false,
|
|
|
+ auditMind: this.textarea,
|
|
|
+ needReapply: true,
|
|
|
+ }).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$message({
|
|
|
+ message: '驳回成功!',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ this.rejectshow=false
|
|
|
+ this.$router.go(-1)
|
|
|
+ }).catch((response) => {
|
|
|
+ this.$message({
|
|
|
+ message: '驳回失败!',
|
|
|
+ type: 'error',
|
|
|
+ })
|
|
|
})
|
|
|
+ }else{
|
|
|
+ woekflowhandle({
|
|
|
+ taskId: this.currectdata.taskId,
|
|
|
+ approved:true,
|
|
|
+ auditMind: this.textarea,
|
|
|
+ needReapply: true,
|
|
|
+ }).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$message({
|
|
|
+ message: '通过成功!',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ }).catch((response) => {
|
|
|
+ this.$message({
|
|
|
+ message: '通过失败!',
|
|
|
+ type: 'error',
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
- typeChange(num){
|
|
|
- this.searchContractType= num
|
|
|
- this.getList()
|
|
|
+ pass(row){
|
|
|
+ this.currectdata=row
|
|
|
+ this.title='通过'
|
|
|
+ this.rejectshow=true
|
|
|
},
|
|
|
- typeChange1(num){
|
|
|
- this.searchTypeCon= num
|
|
|
- this.getList()
|
|
|
+ reject(row){
|
|
|
+ this.currectdata=row
|
|
|
+ this.title='驳回'
|
|
|
+ this.rejectshow=true
|
|
|
},
|
|
|
- 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('结算后当前合同和相关合同不可再进行费用相关操作', '提示', {
|
|
|
+ fujian(row) {
|
|
|
+ this.id = row.id
|
|
|
+ this.accessoryTFs = true
|
|
|
+ this.appendixIdss = row.addressUrl
|
|
|
+ console.log(this.appendixIdss)
|
|
|
+ },
|
|
|
+ del(row){
|
|
|
+ this.$confirm('确定删除审核信息?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
})
|
|
|
.then(() => {
|
|
|
- editcontract({flag:2,id:row.id,profit:row.profit}).toPromise()
|
|
|
- .then(response => {
|
|
|
+ deladuitinfo({id:row.id}).toPromise().then(response => {
|
|
|
this.$message({
|
|
|
- message: '结算成功!',
|
|
|
+ message: '删除成功!',
|
|
|
type: 'success',
|
|
|
+ })
|
|
|
+ this.getList()
|
|
|
})
|
|
|
- this.getList()
|
|
|
- }).catch(()=>{
|
|
|
- this.$message({
|
|
|
- message: '结算失败!',
|
|
|
- type: 'warning',
|
|
|
})
|
|
|
+ },
|
|
|
+ onChange() {
|
|
|
+ this.$refs.upload
|
|
|
+ .handleSaveBill()
|
|
|
+ .then(async (response) => {
|
|
|
+ this.form.addressUrl = response
|
|
|
})
|
|
|
+ .catch((res) => {
|
|
|
+ EventBus.$emit('error', (JSON.parse(res) || {}).message)
|
|
|
+ this.$refs.upload.clearFiles()
|
|
|
})
|
|
|
- })
|
|
|
},
|
|
|
- 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
|
|
|
+
|
|
|
+ onSubmit(){
|
|
|
+ if(!this.form.businessType){
|
|
|
+ this.$message({
|
|
|
+ message: '审核类型不能为空!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(this.form.remark&&this.form.remark.length<2||this.form.remark&&this.form.remark.length>1000){
|
|
|
+ this.$message({
|
|
|
+ message: '备注信息10-2000个字!',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.$confirm('确定发起审核?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.form.compId=localStorage.getItem('ws-pf_compId')
|
|
|
+ this.form.sponsor=localStorage.getItem('ws-pf_roleName')
|
|
|
+ addaduitinfo(this.form).toPromise().then(response => {
|
|
|
+ this.$message({
|
|
|
+ message: '提交成功!',
|
|
|
+ type: 'success',
|
|
|
+ })
|
|
|
+ this.form={}
|
|
|
+ this.$refs.upload.clearFiles()
|
|
|
+ this.addshow=false
|
|
|
+ this.getList()
|
|
|
})
|
|
|
+ })
|
|
|
+ },
|
|
|
+ addlist(){
|
|
|
+ this.addshow=true
|
|
|
+ },
|
|
|
+ handleClose(){
|
|
|
+ this.addshow=false
|
|
|
},
|
|
|
- inventory(row){
|
|
|
- this.$router.push({name:'contractinventory',query:{contractNo:row.contractNo,contractType:row.contractType,buyer:row.buyer,seller:row.seller}})
|
|
|
+ handleClose1(){
|
|
|
+ this.show=false
|
|
|
+ },
|
|
|
+ typeChange(num){
|
|
|
+ this.businessType= num
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ typeChange1(num){
|
|
|
+ this.searchType= num
|
|
|
+ this.getList()
|
|
|
},
|
|
|
returnsales(){
|
|
|
this.$router.go(-1)
|
|
@@ -269,7 +388,6 @@
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
async getList() {
|
|
|
-
|
|
|
aduitinfoList({
|
|
|
startDate:this.startDate,
|
|
|
endDate:this.endDate,
|
|
@@ -277,10 +395,28 @@
|
|
|
currentPage: this.currentPage,
|
|
|
pageSize:this.pageSize ,
|
|
|
searchType:this.searchType,
|
|
|
+ businessType:this.businessType
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then(response => {
|
|
|
- this.tableData=response
|
|
|
+ if(response.records.length>0){
|
|
|
+ for (let i = 0; i < response.records.length; i++) {
|
|
|
+ if(response.records[i].addressUrl){
|
|
|
+ response.records[i].addressUrlArray=[]
|
|
|
+ var arr=response.records[i].addressUrl.split(',')
|
|
|
+ for (let q = 0; q < arr.length; q++) {
|
|
|
+ if(arr[q]!=''){
|
|
|
+ response.records[i].addressUrlArray.push(arr[q])
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.tableData=response.records
|
|
|
+ this.deptBudgetTotal=response.total
|
|
|
})
|
|
|
},
|
|
|
|