|
@@ -1,37 +1,40 @@
|
|
|
-<!--现货采购合同-->
|
|
|
+<!--现货采购合同费用-->
|
|
|
<!--2019年5月30日 20:25:16 by jlx-->
|
|
|
<template>
|
|
|
<div>
|
|
|
<BaseHeaderLayout :leftSpan="8">
|
|
|
<template slot="left">
|
|
|
- <ws-select v-model="searchTypeText" placeholder="" class="typeselect" @change="selecttaskType"
|
|
|
+ <el-select style='width:200px;' filterable v-model="searchTypeText" placeholder="" class="typeselect" @change="selectcontract"
|
|
|
:value="searchType">
|
|
|
- <ws-option v-for="item in taskTypeList" :key="item.value" :label="item.value" :value="item.value"
|
|
|
+ <el-option v-for="item in contractList" :key="item.id" :label="item.contractNo+'('+item.status+')'" :value="item.contractNo"
|
|
|
style="color: #8890b1" />
|
|
|
- </ws-select>
|
|
|
+ </el-select>
|
|
|
+ <span style='padding-left:10px;'>卖方:{{seller}}</span>
|
|
|
</template>
|
|
|
<template slot="right">
|
|
|
</template>
|
|
|
</BaseHeaderLayout>
|
|
|
- <BaseHeaderLayout :leftSpan="8">
|
|
|
+ <BaseHeaderLayout :leftSpan="16">
|
|
|
<template slot="left">
|
|
|
- <ws-button type="primary" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">全部</ws-button>
|
|
|
- <ws-button type="primary" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">收入</ws-button>
|
|
|
- <ws-button type="primary" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">支出</ws-button>
|
|
|
+ <ws-button :type="type==''?'primary':''" @click="handlestatus('')">全部</ws-button>
|
|
|
+ <ws-button :type="type=='1'?'primary':''" @click="handlestatus(1)">收入</ws-button>
|
|
|
+ <ws-button :type="type=='2'?'primary':''" @click="handlestatus(2)">支出</ws-button>
|
|
|
+ <span style='padding-left:10px;'>粮款:{{grain}}</span>
|
|
|
+ <span style='padding-left:10px;'>合计收入:{{income}}</span>
|
|
|
+ <span style='padding-left:10px;'>合计支出:{{expend}}</span>
|
|
|
+ <span style='padding-left:10px;'>付款中:{{nograinexpend}}</span>
|
|
|
+
|
|
|
</template>
|
|
|
<template slot="right">
|
|
|
- <ws-button type="primary" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">运费</ws-button>
|
|
|
- <ws-button type="primary" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">请款</ws-button>
|
|
|
- <ws-button type="primary" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">收款</ws-button>
|
|
|
+ <!-- <ws-button type="primary" @click="handleAdd()"
|
|
|
+ v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">运费</ws-button> -->
|
|
|
+ <ws-button type="primary" @click="handleAdd(2)"
|
|
|
+ v-hasPermission="`contractManagement.nonContract.nonContractInfo.add`">请款</ws-button>
|
|
|
+ <ws-button type="primary" @click="handleAdd(1)"
|
|
|
+ v-hasPermission="`contractManagement.nonContract.nonContractInfo.add`">收款</ws-button>
|
|
|
</template>
|
|
|
</BaseHeaderLayout>
|
|
|
- <el-table class="wenzi" :data="contractList.records" style="width: 100%; margin-top: 10px"
|
|
|
+ <el-table class="wenzi" :data="costList.records" style="width: 100%; margin-top: 10px"
|
|
|
height="calc(100% - 105px)">
|
|
|
<el-table-column type="index" label="序号">
|
|
|
<template scope="scope">
|
|
@@ -39,9 +42,15 @@
|
|
|
<span v-else>{{ scope.$index + 1 }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="contractNo" label="类型" width="150">
|
|
|
+ <el-table-column prop="type" label="类型" width="150">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if='scope.row.type==1&&scope.row.costType==1'>收入(粮)</span>
|
|
|
+ <span v-if='scope.row.type==1&&scope.row.costType!=1'>收入</span>
|
|
|
+ <span v-if='scope.row.type==2&&scope.row.costType==1'>支出(粮)</span>
|
|
|
+ <span v-if='scope.row.type==2&&scope.row.costType!=1'>支出</span>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="goodsName" label="费用名称" width="80">
|
|
|
+ <el-table-column prop="costName" label="款项名称" width="80">
|
|
|
</el-table-column>
|
|
|
<!-- <el-table-column prop="grade" label="品级" width="80">
|
|
|
<template slot-scope="scope">
|
|
@@ -59,7 +68,7 @@
|
|
|
}}</span>
|
|
|
</template>
|
|
|
</el-table-column> -->
|
|
|
- <el-table-column width='130' prop="unitContractPrice" label="费用金额(元)">
|
|
|
+ <el-table-column width='130' prop="costPrice" label="款项金额(元)">
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column prop="addressUrl" label="附件">
|
|
@@ -75,22 +84,40 @@
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column width='130' prop="unitContractPrice" label="请款人/收款人">
|
|
|
+ <el-table-column width='130' prop="personName" label="请款人/收款人">
|
|
|
</el-table-column>
|
|
|
- <el-table-column width='130' prop="unitContractPrice" label="支付日期">
|
|
|
+ <el-table-column width='130' prop="payee" label="回款方">
|
|
|
</el-table-column>
|
|
|
- <el-table-column width='130' prop="unitContractPrice" label="录入日期">
|
|
|
+ <el-table-column width='130' prop="payDeadline" label="支付日期">
|
|
|
</el-table-column>
|
|
|
- <el-table-column width='130' prop="unitContractPrice" label="状态">
|
|
|
+ <el-table-column width='130' prop="createDate" label="录入日期">
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="address" label="操作" width="300">
|
|
|
+ <el-table-column width='130' prop="status" label="状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span v-if='scope.row.approveStatus'>{{scope.row.approveStatus}}</span><span v-else>{{scope.row.status}}</span>
|
|
|
+ <i @click="handlerecord(scope.row)" class="el-icon-s-claim"></i>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="address" label="操作" width="360">
|
|
|
<template slot-scope="scope">
|
|
|
- <ws-button type="primary" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">审核</ws-button>
|
|
|
- <ws-button type="primary" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">编辑</ws-button>
|
|
|
- <ws-button type="danger" @click="handleAdd()"
|
|
|
- v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">删除</ws-button>
|
|
|
+ <div v-if='scope.row.type==2'>
|
|
|
+ <div style='display:inline-block;' v-if='scope.row.taskId'>
|
|
|
+ <ws-button type="primary" @click="handleaudit(scope.row)">审核</ws-button>
|
|
|
+ </div>
|
|
|
+ <div style='display:inline-block;' v-if='scope.row.status=="未付款"'>
|
|
|
+ <ws-button type="primary" @click="handlepayment(scope.row)"
|
|
|
+ v-hasPermission="`contractManagement.nonContract.nonContractInfo.status`">付款</ws-button>
|
|
|
+ </div>
|
|
|
+ <div style='display:inline-block;' v-if='scope.row.personName==staffName'>
|
|
|
+ <ws-button type="primary" @click="handleedit(scope.row)"
|
|
|
+ v-hasPermission="`contractManagement.nonContract.nonContractInfo.edit`">编辑</ws-button>
|
|
|
+ </div>
|
|
|
+ <div style='display:inline-block;' v-if='scope.row.status=="已驳回"&&scope.row.personName==staffName'>
|
|
|
+ <ws-button type="danger" @click="handleDelete(scope.row)" v-hasPermission="`contractManagement.nonContract.nonContractInfo.delete`">删除</ws-button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -98,22 +125,100 @@
|
|
|
:page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
|
|
|
</el-pagination>
|
|
|
|
|
|
- <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
|
|
|
- @on-cancel="handleClose">
|
|
|
- <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss"
|
|
|
- accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
|
|
|
+ <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')">
|
|
|
+ <div v-if='appendixIdss.length>0'>
|
|
|
+ <img style='border:1px solid #ccc;' v-for='item in appendixIdss' :src="item" alt="">
|
|
|
+ </div>
|
|
|
+
|
|
|
</WinseaContentModal>
|
|
|
+ <el-dialog width='50%' :visible.sync="dialogVisible" :title="title" >
|
|
|
+ <el-form style='width:50%;margin:0 auto;text-align:center;' ref="form" :model="deptBudgetList" label-width="130px">
|
|
|
+ <el-form-item v-if='status==1||status==2||status==5' label="类型">
|
|
|
+ <el-radio-group v-model="costType">
|
|
|
+ <el-radio :label="1">粮款</el-radio>
|
|
|
+ <el-radio :label="2">非粮款</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-else label="类型">
|
|
|
+ <ws-select :disabled="disabled" v-model="costType" placeholder="" class="typeselect"
|
|
|
+ :value="costType">
|
|
|
+ <ws-option key="1" label="粮款" value="1" style="color: #8890b1" />
|
|
|
+ <ws-option key="2" label="非粮款" value="2" style="color: #8890b1" />
|
|
|
+ </ws-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="款项名称">
|
|
|
+ <el-input :disabled='disabled' v-model="deptBudgetList.costName"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- <el-form-item label="费用名称">
|
|
|
+ <el-input :disabled='disabled' v-model="deptBudgetList.costName"></el-input>
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="金额(元)">
|
|
|
+ <el-input :disabled='disabled' v-model="deptBudgetList.costPrice"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if='status==1||currectcost.type==1' label="回款方">
|
|
|
+ <el-input :disabled='disabled' v-model="deptBudgetList.payee"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注">
|
|
|
+ <el-input :disabled='disabled' type="textarea" v-model="deptBudgetList.remark"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="附件">
|
|
|
+ <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
|
|
|
+ :on-success="handlefujian" :on-remove="handleRemove" class="photo2">
|
|
|
+ <i class="el-icon-plus"></i>
|
|
|
+ </el-upload>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if='status==3' label="审核意见">
|
|
|
+ <el-input type="textarea" v-model="auditMind"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if='status==1' label="收款日期">
|
|
|
+ <ws-date-picker v-model="deptBudgetList.payDeadline" type="date" placeholder="请选择收款日期"
|
|
|
+ value-format="yyyy-MM-dd" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item v-if='status==4' label="付款日期">
|
|
|
+ <ws-date-picker v-model="deptBudgetList.payDeadline" type="date" placeholder="请选择付款日期"
|
|
|
+ value-format="yyyy-MM-dd" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div v-if='status==1||status==2||status==4||status==5'>
|
|
|
+ <el-button @click='dialogVisible=false'>取消</el-button>
|
|
|
+ <el-button @click='confirm' type="primary">提交</el-button>
|
|
|
+ </div>
|
|
|
+ <div v-if='status==3'>
|
|
|
+ <el-button @click='cancel'>驳回</el-button>
|
|
|
+ <el-button @click='confirm' type="primary">通过</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog width='50%' :visible.sync="dialogVisible1" title="审核记录" >
|
|
|
+ <div v-for="item in recordList">
|
|
|
+ <div style='width:100%;justify-content: space-between;' class='flex'>
|
|
|
+ <div>{{item.operateUser}}</div>
|
|
|
+ <div>{{item.dealMsg}}</div>
|
|
|
+ <div>{{item.createDate}}</div>
|
|
|
+ </div>
|
|
|
+ <div style='width:100%;text-align:center;'>{{item.verifyRemark}}</div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
- getList,
|
|
|
- export1,
|
|
|
- editstatus,
|
|
|
- billoperatehis,
|
|
|
- deletecontract,
|
|
|
- editInfo,
|
|
|
+ contractcost,
|
|
|
+ getcontract,
|
|
|
+ addcontractcost,
|
|
|
+ editcontractcost,
|
|
|
+ delcontractcost,
|
|
|
+ payment,
|
|
|
+ billoperatehis
|
|
|
+ // export1,
|
|
|
+ // editstatus,
|
|
|
+ // billoperatehis,
|
|
|
+ // deletecontract,
|
|
|
+ // editInfo,
|
|
|
} from '@/model/contarct/index'
|
|
|
+ import {
|
|
|
+ woekflowhandle,gettaskhistories
|
|
|
+ } from '@/model/tasksport/index'
|
|
|
import {
|
|
|
downloadFile
|
|
|
} from '@/utils/batchDown'
|
|
@@ -140,37 +245,48 @@
|
|
|
data() {
|
|
|
return {
|
|
|
id: '',
|
|
|
- //弹出框
|
|
|
- dialogViewSpareMoney: false,
|
|
|
- dialogApproveFormVisible: false,
|
|
|
// 船舶类型
|
|
|
monetaryKey: null,
|
|
|
// 表格显示数据
|
|
|
tableDate: [],
|
|
|
size: 10,
|
|
|
- statusList:[{
|
|
|
- value:'已完成',
|
|
|
- },{value:'发运结束',}],
|
|
|
// 是否显示
|
|
|
showType: true,
|
|
|
// 年
|
|
|
year: '',
|
|
|
- deliver_type: 1,
|
|
|
+ title:'',
|
|
|
+ costType:1,
|
|
|
+ seller:'',
|
|
|
deptBudgetTotal: 0,
|
|
|
currentPage: 1,
|
|
|
+ recordList:[],
|
|
|
pageSize: 9999,
|
|
|
- appendixIdsAdd: '',
|
|
|
searchType: 1,
|
|
|
- searchTypeText: '未完成',
|
|
|
+ dialogVisible1:false,
|
|
|
+ type:'',
|
|
|
+ searchTypeText: '',
|
|
|
searchKeyWord: '',
|
|
|
contractType: 2,
|
|
|
- goodsType: 1,
|
|
|
+ dataList:[],
|
|
|
startDate: null,
|
|
|
endDate: null,
|
|
|
addressUrls: [],
|
|
|
- accesscard: false,
|
|
|
+ costList:{},
|
|
|
+ currectcost:{},
|
|
|
+ dialogVisible:false,
|
|
|
+ contractId:0,
|
|
|
+ status:'',
|
|
|
+ contractNo:'',
|
|
|
+ disabled:false,
|
|
|
// 提交类型
|
|
|
submitType: true,
|
|
|
+ auditMind:'',
|
|
|
+ grain:0,
|
|
|
+ income:0,
|
|
|
+ expend:0,
|
|
|
+ nograinexpend:0,
|
|
|
+ staffName:localStorage.getItem('ws-pf_staffName'),
|
|
|
+ paymentScreenshot:[],
|
|
|
deptCircularPage: {},
|
|
|
date: {
|
|
|
year: dayjs().format('YYYY'),
|
|
@@ -180,7 +296,6 @@
|
|
|
deptBudgetList: {},
|
|
|
historyList: [],
|
|
|
appendixIdss: [],
|
|
|
- fileList: [],
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
|
pickerBeginDateBefore: {
|
|
|
disabledDate: (time) => {
|
|
@@ -188,62 +303,6 @@
|
|
|
},
|
|
|
},
|
|
|
accessoryTFs: false,
|
|
|
- taskTypeList: [{
|
|
|
- value: '未完成',
|
|
|
- type: 1,
|
|
|
- },
|
|
|
- {
|
|
|
- value: '已完成',
|
|
|
- type: 2,
|
|
|
- },
|
|
|
- {
|
|
|
- value: '全部合同',
|
|
|
- type: '',
|
|
|
- },
|
|
|
- ],
|
|
|
- pickerOptions: {
|
|
|
- shortcuts: [{
|
|
|
- text: '本周',
|
|
|
- onClick(picker) {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- var thisDay = start.getDay()
|
|
|
- var thisDate = start.getDate()
|
|
|
- if (thisDay != 0) {
|
|
|
- start.setDate(thisDate - thisDay)
|
|
|
- }
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- text: '本月',
|
|
|
- onClick(picker) {
|
|
|
- const end = new Date()
|
|
|
- const start = new Date()
|
|
|
- start.setDate(1)
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- },
|
|
|
- },
|
|
|
- {
|
|
|
- text: '本季度',
|
|
|
- onClick(picker) {
|
|
|
- var oDate = new Date()
|
|
|
-
|
|
|
- var thisYear = oDate.getFullYear()
|
|
|
- var thisMonth = oDate.getMonth() + 1
|
|
|
-
|
|
|
- var n = Math.ceil(thisMonth / 3) // 季度
|
|
|
-
|
|
|
- var Month = n * 3 - 1
|
|
|
-
|
|
|
- var start = new Date(thisYear, Month - 2, 1)
|
|
|
- var end = new Date()
|
|
|
-
|
|
|
- picker.$emit('pick', [start, end])
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
value1: '',
|
|
|
value2: '',
|
|
|
}
|
|
@@ -252,10 +311,304 @@
|
|
|
//cg.viewBudget
|
|
|
//cg.viewSpareMoney
|
|
|
// this.getVesselData();
|
|
|
- this.getList()
|
|
|
+ this.contractId=this.$route.query.id
|
|
|
+ this.contractNo=this.$route.query.contractNo
|
|
|
+ this.searchTypeText=this.$route.query.contractNo+'('+this.$route.query.status+')'
|
|
|
+ this.seller=this.$route.query.seller
|
|
|
+ getcontract({flag:0}).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.contractList=response
|
|
|
+ // this.contractId=response[0].id
|
|
|
+ // this.contractNo=response[0].contractNo
|
|
|
+ // this.searchTypeText=response[0].contractNo
|
|
|
+ // this.seller=response[0].seller
|
|
|
+ this.getList()
|
|
|
+ })
|
|
|
+
|
|
|
this.showType = this.isShow
|
|
|
},
|
|
|
methods: {
|
|
|
+ handlestatus(status){
|
|
|
+ this.type=status
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleedit(row){
|
|
|
+ if(row.type==1){
|
|
|
+ this.title='收款'
|
|
|
+ }else{
|
|
|
+ this.title='请款'
|
|
|
+ }
|
|
|
+ this.status=5
|
|
|
+ this.deptBudgetList=row
|
|
|
+ this.costType=row.costType
|
|
|
+ if(row.addressUrl){
|
|
|
+ this.dataList=[]
|
|
|
+ this.paymentScreenshot=row.addressUrl.split(',')
|
|
|
+ for (let i = 0; i < this.paymentScreenshot.length; i++) {
|
|
|
+ this.dataList.push({url:this.paymentScreenshot[i]})
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.currectcost=row
|
|
|
+ this.dialogVisible=true
|
|
|
+ },
|
|
|
+ handlerecord(row){
|
|
|
+ billoperatehis({id: row.id}).toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.recordList=response
|
|
|
+ this.dialogVisible1=true
|
|
|
+ }).catch((response) => {})
|
|
|
+
|
|
|
+ },
|
|
|
+ handleaudit(row){
|
|
|
+ console.log(row)
|
|
|
+ this.status=3
|
|
|
+ this.costType=row.costType
|
|
|
+ this.deptBudgetList=row
|
|
|
+ this.currectcost=row
|
|
|
+ if(row.addressUrl){
|
|
|
+ this.dataList=[]
|
|
|
+ this.paymentScreenshot=row.addressUrl.split(',')
|
|
|
+ for (let i = 0; i < this.paymentScreenshot.length; i++) {
|
|
|
+ this.dataList.push({url:this.paymentScreenshot[i]})
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.disabled=true
|
|
|
+ this.dialogVisible=true
|
|
|
+ },
|
|
|
+ handlepayment(row){
|
|
|
+ this.status=4
|
|
|
+ this.costType=row.costType
|
|
|
+ this.currectcost=row
|
|
|
+ this.disabled=true
|
|
|
+ this.deptBudgetList=row
|
|
|
+ if(row.addressUrl){
|
|
|
+ this.dataList=[]
|
|
|
+ this.paymentScreenshot=row.addressUrl.split(',')
|
|
|
+ for (let i = 0; i < this.paymentScreenshot.length; i++) {
|
|
|
+ this.dataList.push({url:this.paymentScreenshot[i]})
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.dialogVisible=true
|
|
|
+ },
|
|
|
+ handlefujian(file) {
|
|
|
+ // console.log(file)
|
|
|
+ this.paymentScreenshot.push(file.url)
|
|
|
+ // this.dialogVisible = true
|
|
|
+ },
|
|
|
+ handleRemove(file) {
|
|
|
+ // console.log(file)
|
|
|
+ for (let i = 0; i < this.paymentScreenshot.length; i++) {
|
|
|
+ if(this.paymentScreenshot[i]==response.url){
|
|
|
+ this.paymentScreenshot.splice(i, 1)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleSizeChange(val) {
|
|
|
+ console.log(`每页 ${val} 条`)
|
|
|
+ this.pageSize = val
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ this.currentPage = val
|
|
|
+ console.log(`当前页: ${val}`)
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ selectcontract(e){
|
|
|
+ for (let i = 0; i < this.contractList.length; i++) {
|
|
|
+ if(this.contractList[i].contractNo==e){
|
|
|
+ this.contractId=this.contractList[i].id
|
|
|
+ this.contractNo=this.contractList[i].contractNo
|
|
|
+ this.searchTypeText=this.contractList[i].contractNo
|
|
|
+ this.seller=this.contractList[i].seller
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ cancel(){
|
|
|
+ woekflowhandle({taskId: this.currectcost.taskId,
|
|
|
+ approved: false,
|
|
|
+ auditMind: this.auditMind,
|
|
|
+ needReapply: false,})
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$notify.success({
|
|
|
+ title: '成功',
|
|
|
+ message: '驳回成功',
|
|
|
+ })
|
|
|
+ this.dialogVisible=false
|
|
|
+ this.deptBudgetList={}
|
|
|
+ this.paymentScreenshot=[]
|
|
|
+ this.$refs.uploadfiles.clearFiles()
|
|
|
+ this.getList()
|
|
|
+ }).catch((response) => {})
|
|
|
+ },
|
|
|
+ confirm(){
|
|
|
+ // addcontractcost()
|
|
|
+ var text = ''
|
|
|
+ if(this.status == 2||this.status == 1){
|
|
|
+ if(!this.deptBudgetList.costName){
|
|
|
+ this.$message({
|
|
|
+ message: '款项名称不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!this.deptBudgetList.costPrice){
|
|
|
+ this.$message({
|
|
|
+ message: '金额不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.deptBudgetList.costName.length<1||this.deptBudgetList.costName.length>15){
|
|
|
+ this.$message({
|
|
|
+ message: '费用名称输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.deptBudgetList.costPrice<0.01||this.deptBudgetList.costPrice>100000000){
|
|
|
+ this.$message({
|
|
|
+ message: '费用名称输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(String(this.deptBudgetList.costPrice).indexOf(".")!=-1){
|
|
|
+ if(String(this.deptBudgetList.costPrice).substring(String(this.deptBudgetList.costPrice).indexOf(".")+1,this.deptBudgetList.costPrice.length)>2){
|
|
|
+ this.$message({
|
|
|
+ message: '费用名称输入错误',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.deptBudgetList.remark&&this.deptBudgetList.remark.length<0||this.deptBudgetList.remark&&this.deptBudgetList.remark.length>50){
|
|
|
+ this.$message({
|
|
|
+ message: '备注不超过50字',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(this.status == 1){
|
|
|
+ if(this.paymentScreenshot.length==0){
|
|
|
+ this.$message({
|
|
|
+ message: '附件不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.status == 2||this.status == 5&&this.currectcost.type==2) {
|
|
|
+ text =
|
|
|
+ '确认提交请款信息?'
|
|
|
+ } else if(this.status == 1) {
|
|
|
+ text = '确认提交收款信息?'
|
|
|
+ } else if(this.status == 3&&this.currectcost.type==2) {
|
|
|
+ text = '确认通过请款信息?'
|
|
|
+ }else if(this.status == 4) {
|
|
|
+ text = '确认提交付款信息?'
|
|
|
+ }
|
|
|
+ this.$confirm(text, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.deptBudgetList.contractId=this.contractId
|
|
|
+ this.deptBudgetList.contractNo=this.contractNo
|
|
|
+ this.deptBudgetList.contractType=this.contractType
|
|
|
+ this.deptBudgetList.costType=this.costType
|
|
|
+ this.deptBudgetList.compId=this.compId
|
|
|
+ this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
|
|
|
+ this.deptBudgetList.personName=localStorage.getItem('ws-pf_staffName')
|
|
|
+ if(this.status==1||this.status==2){
|
|
|
+ this.deptBudgetList.type=this.status
|
|
|
+ // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
|
|
|
+ addcontractcost(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$notify.success({
|
|
|
+ title: '成功',
|
|
|
+ message: '提交成功',
|
|
|
+ })
|
|
|
+ this.dialogVisible=false
|
|
|
+ this.deptBudgetList={}
|
|
|
+ this.paymentScreenshot=[]
|
|
|
+ this.$refs.uploadfiles.clearFiles()
|
|
|
+ this.getList()
|
|
|
+ }).catch((response) => {})
|
|
|
+ }else if(this.status==5){
|
|
|
+ this.deptBudgetList.type=this.currectcost.type
|
|
|
+ // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
|
|
|
+ editcontractcost(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$notify.success({
|
|
|
+ title: '成功',
|
|
|
+ message: '编辑成功',
|
|
|
+ })
|
|
|
+ this.dialogVisible=false
|
|
|
+ this.deptBudgetList={}
|
|
|
+ this.paymentScreenshot=[]
|
|
|
+ this.$refs.uploadfiles.clearFiles()
|
|
|
+ this.getList()
|
|
|
+ }).catch((response) => {})
|
|
|
+ }else if(this.status==3){
|
|
|
+ // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
|
|
|
+ woekflowhandle({taskId: this.currectcost.taskId,
|
|
|
+ approved: true,
|
|
|
+ auditMind: this.auditMind,
|
|
|
+ needReapply: false,})
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$notify.success({
|
|
|
+ title: '成功',
|
|
|
+ message: '通过成功',
|
|
|
+ })
|
|
|
+ this.dialogVisible=false
|
|
|
+ this.deptBudgetList={}
|
|
|
+ this.paymentScreenshot=[]
|
|
|
+ this.$refs.uploadfiles.clearFiles()
|
|
|
+ this.getList()
|
|
|
+ }).catch((response) => {})
|
|
|
+ }else if(this.status==4){
|
|
|
+ // this.deptBudgetList.personName=localStorage.getItem('ws-pf_roleName')+localStorage.getItem('ws-pf_staffName')
|
|
|
+ payment(this.deptBudgetList)
|
|
|
+ .toPromise()
|
|
|
+ .then((response) => {
|
|
|
+ this.$notify.success({
|
|
|
+ title: '成功',
|
|
|
+ message: '付款成功',
|
|
|
+ })
|
|
|
+ this.dialogVisible=false
|
|
|
+ this.deptBudgetList={}
|
|
|
+ this.paymentScreenshot=[]
|
|
|
+ this.$refs.uploadfiles.clearFiles()
|
|
|
+ this.getList()
|
|
|
+ }).catch((response) => {})
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleAdd(status){
|
|
|
+ this.status=status
|
|
|
+ if(status==1){
|
|
|
+ this.title='收款'
|
|
|
+ }else if(status==2){
|
|
|
+ this.title='请款'
|
|
|
+ }
|
|
|
+ this.dialogVisible=true
|
|
|
+ },
|
|
|
onChange() {
|
|
|
this.$refs.upload
|
|
|
.handleSaveBill()
|
|
@@ -277,56 +630,64 @@
|
|
|
})
|
|
|
},
|
|
|
getList() {
|
|
|
- getList({
|
|
|
+ contractcost({
|
|
|
compId: localStorage.getItem('ws-pf_compId'),
|
|
|
contractType: this.contractType,
|
|
|
- goodsType: this.goodsType,
|
|
|
currentPage: this.currentPage,
|
|
|
pageSize: this.pageSize,
|
|
|
- searchType: this.searchType,
|
|
|
- searchKeyWord: this.searchKeyWord,
|
|
|
- startDate: this.startDate,
|
|
|
- endDate: this.endDate,
|
|
|
- contrPage: this.contrPage,
|
|
|
+ contractId:this.contractId,
|
|
|
+ contractNo:this.contractNo,
|
|
|
+ searchType:this.type
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
+ var income=0,expend=0,grainincome=0,grainexpend=0,nograinexpend=0
|
|
|
+ this.costList=response
|
|
|
for (var i = 0; i < response.records.length; i++) {
|
|
|
- if(response.records[i].status){
|
|
|
- response.records[i].currectstatus=response.records[i].status
|
|
|
+ if(response.records[i].addressUrl){
|
|
|
+ response.records[i].addressUrlArray=response.records[i].addressUrl.split(',')
|
|
|
}
|
|
|
- if (response.records[i].completedQuantity) {
|
|
|
- response.records[i].completedQuantity = response.records[i].completedQuantity.toFixed(3)
|
|
|
- }
|
|
|
-
|
|
|
- if (response.records[i].addressUrl != null) {
|
|
|
- if (response.records[i].addressUrl) {
|
|
|
- response.records[i].addressUrlArray =
|
|
|
- response.records[i].addressUrl.split(',')
|
|
|
+ // 收入
|
|
|
+ if(response.records[i].type==1){
|
|
|
+ income+=response.records[i].costPrice
|
|
|
+ if(response.records[i].costType==1){
|
|
|
+ grainincome+=response.records[i].costPrice
|
|
|
}
|
|
|
- } else {
|
|
|
- response.records[i].addressUrlArray = []
|
|
|
}
|
|
|
- }
|
|
|
- this.deptCircularPage.currentPage = response.current
|
|
|
- this.deptCircularPage.pageSize = response.size
|
|
|
- this.deptBudgetTotal = response.total
|
|
|
- this.contractList = response
|
|
|
- for (var i = 0; i < response.records.length; i++) {
|
|
|
- var arr = new Array()
|
|
|
- this.addressUrls[i] = new Array()
|
|
|
- if (this.contractList.records[i].addressUrl != null) {
|
|
|
- arr = this.contractList.records[i].addressUrl.split(',')
|
|
|
- this.addressUrls[i] = arr
|
|
|
+ // 支出
|
|
|
+ if(response.records[i].type==2){
|
|
|
+ expend+=response.records[i].costPrice
|
|
|
+ if(response.records[i].costType==1&&response.records[i].status=='已付款'){
|
|
|
+ grainexpend+=response.records[i].costPrice
|
|
|
+ }else{
|
|
|
+ nograinexpend+=response.records[i].costPrice
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ console.log(grainexpend,grainincome)
|
|
|
+ this.income=income.toFixed(2)
|
|
|
+ this.expend=expend.toFixed(2)
|
|
|
+ this.grain=(grainexpend-grainincome).toFixed(2)
|
|
|
+ this.nograinexpend=nograinexpend.toFixed(2)
|
|
|
+ // this.deptCircularPage.currentPage = response.current
|
|
|
+ // this.deptCircularPage.pageSize = response.size
|
|
|
+ // this.deptBudgetTotal = response.total
|
|
|
+ // this.contractList = response
|
|
|
+ // for (var i = 0; i < response.records.length; i++) {
|
|
|
+ // var arr = new Array()
|
|
|
+ // this.addressUrls[i] = new Array()
|
|
|
+ // if (this.contractList.records[i].addressUrl != null) {
|
|
|
+ // arr = this.contractList.records[i].addressUrl.split(',')
|
|
|
+ // this.addressUrls[i] = arr
|
|
|
+ // }
|
|
|
+ // }
|
|
|
})
|
|
|
},
|
|
|
|
|
|
fujian(row) {
|
|
|
this.id = row.id
|
|
|
this.accessoryTFs = true
|
|
|
- this.appendixIdss = row.addressUrl
|
|
|
+ this.appendixIdss = row.addressUrlArray
|
|
|
console.log(this.appendixIdss)
|
|
|
},
|
|
|
handleExamine(row) {
|
|
@@ -339,11 +700,6 @@
|
|
|
},
|
|
|
})
|
|
|
},
|
|
|
- handleAdd() {
|
|
|
- this.$router.push({
|
|
|
- path: 'purchaseContractAdd',
|
|
|
- })
|
|
|
- },
|
|
|
handleEdit(row) {
|
|
|
this.$router.push({
|
|
|
name: 'purchaseContractEdit',
|
|
@@ -402,11 +758,11 @@
|
|
|
//删除
|
|
|
handleDelete(row) {
|
|
|
var text = ''
|
|
|
- if (row.deliverType == 1) {
|
|
|
+ if (row.type == 1) {
|
|
|
text =
|
|
|
- '删除该合同将同时永久删除合同对应的临时仓库相关数据,是否确定删除?'
|
|
|
+ '确认删除收款信息?'
|
|
|
} else {
|
|
|
- text = '合同删除后不可恢复,是否继续删除?'
|
|
|
+ text = '确认删除请款信息?'
|
|
|
}
|
|
|
this.$confirm(text, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
@@ -414,7 +770,7 @@
|
|
|
type: 'warning',
|
|
|
})
|
|
|
.then(() => {
|
|
|
- deletecontract({
|
|
|
+ delcontractcost({
|
|
|
id: row.id,
|
|
|
})
|
|
|
.toPromise()
|
|
@@ -435,5 +791,7 @@
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-
|
|
|
+ /deep/.base_header_layout .grid-content{
|
|
|
+ height:36px;
|
|
|
+ }
|
|
|
</style>
|