|
@@ -5,53 +5,38 @@
|
|
|
<el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
@click="backToList">返回列表
|
|
|
</el-button>
|
|
|
- <el-button type="info"
|
|
|
- class="el-button--small-yh add-customer-btn-two"
|
|
|
- :disabled="true"
|
|
|
- @click.stop="">请核
|
|
|
- </el-button>
|
|
|
- <el-button class="el-button--small-yh add-customer-btn" type="primary"
|
|
|
- @click.stop="editFinance"
|
|
|
- >{{this.id?"确认修改" :"确认新增"}}
|
|
|
- </el-button>
|
|
|
+ <div class="upper_right_button">
|
|
|
+ <el-button type="info"
|
|
|
+ :disabled="!checkDisabled"
|
|
|
+ class="el-button--small-yh"
|
|
|
+ @click.stop="paymentCheck">请核
|
|
|
+ </el-button>
|
|
|
+ <el-button type="warning"
|
|
|
+ class="el-button--small-yh"
|
|
|
+ :disabled="checkDisabled"
|
|
|
+ @click.stop="settlement">结算
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 60px">
|
|
|
<containerTitle title="基础信息"></containerTitle>
|
|
|
<basic-container>
|
|
|
- <el-form :model="form" ref="form" label-width="130px">
|
|
|
- <el-row>
|
|
|
- <el-col v-for="(item, index) in basicData.column" :span="item.span?item.span:8" :key="index">
|
|
|
- <el-form-item :label="item.label" :prop="item.prop" :rules="item.rules">
|
|
|
- <el-date-picker v-if="item.type === 'date'" style="width: 100%;" v-model="form[item.prop]" size="small" type="date" :disabled="item.disabled?true:false" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss"/>
|
|
|
- <el-select v-else-if="item.type === 'select'" style="width: 100%" size="small" placeholder="请选择" clearable filterable></el-select>
|
|
|
- <selectComponent v-else-if="item.prop === 'corpId'" v-model="form[item.prop]" :configuration="configuration"/>
|
|
|
- <el-select v-else-if="item.prop === 'currency'" style="width: 100%" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
|
|
|
- <el-option v-for="(item,index) in currencyDic" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
|
|
|
- </el-select>
|
|
|
- <el-select v-else-if="item.prop === 'financeStatus'" style="width: 100%" v-model="form[item.prop]" size="small" placeholder="请选择" clearable filterable>
|
|
|
- <el-option
|
|
|
- v-for="item in financeStatusDic"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <el-input type="age" v-else-if="item.prop === 'exchangeRate'" v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入">
|
|
|
- <template slot="append">%</template>
|
|
|
- </el-input>
|
|
|
- <el-input type="textarea" v-else-if="(item.prop === 'remark')" v-model="form[item.prop]" size="small" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
- <el-input type="age" v-else v-model="form[item.prop]" size="small" :disabled="item.disabled?true:false" autocomplete="off" placeholder="请输入"></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-form>
|
|
|
+ <avue-form ref="form" v-model="form" :option="option">
|
|
|
+ <template slot="corpId">
|
|
|
+ <select-component
|
|
|
+ v-model="form.corpId"
|
|
|
+ :configuration="configuration"
|
|
|
+ ></select-component>
|
|
|
+ </template>
|
|
|
+ </avue-form>
|
|
|
</basic-container>
|
|
|
+ <containerTitle title="明细列表"></containerTitle>
|
|
|
<basic-container>
|
|
|
- <avue-crud :option="option"
|
|
|
+ <avue-crud :option="itemOption"
|
|
|
:data="dataList"
|
|
|
ref="crud"
|
|
|
- v-model="form"
|
|
|
+ v-model="itemForm"
|
|
|
:page.sync="page"
|
|
|
@search-reset="searchReset"
|
|
|
@selection-change="selectionChange"
|
|
@@ -63,15 +48,15 @@
|
|
|
type="text"
|
|
|
icon="el-icon-view"
|
|
|
size="small"
|
|
|
- @click.stop=""
|
|
|
- >费用确认
|
|
|
+ @click.stop="rowCell(scope.row,scope.index)"
|
|
|
+ >修改
|
|
|
</el-button>
|
|
|
<el-button
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
size="small"
|
|
|
@click.stop=""
|
|
|
- >移除数据
|
|
|
+ >删除
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
@@ -81,12 +66,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import option from "./configuration/detailsPage.json";
|
|
|
- import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
|
|
|
- import {detailListData } from "@/api/importTrade/purchase";
|
|
|
- import {getSysNo} from "@/api/importTrade/purchase";
|
|
|
- import { getUserInfo } from "@/api/system/user";
|
|
|
+ import itemOption from "./configuration/detailsPage.json";
|
|
|
import { contrastObj,contrastList } from "@/util/contrastData";
|
|
|
+ import { getDetails,modify, paymentCheck } from "@/api/financialManagement/paymentRequest";
|
|
|
+
|
|
|
export default {
|
|
|
name: "paymentDetailsPage",
|
|
|
props: {
|
|
@@ -96,8 +79,10 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- form: {},
|
|
|
- option: option,
|
|
|
+ form:{},
|
|
|
+ itemForm: {},
|
|
|
+ itemOption: itemOption,
|
|
|
+ checkDisabled:false,
|
|
|
parentId:0,
|
|
|
id:"",
|
|
|
dataList: [],
|
|
@@ -108,40 +93,19 @@
|
|
|
total: 0,
|
|
|
},
|
|
|
query:{},
|
|
|
- //客户组件配置控制
|
|
|
- configuration:{
|
|
|
- multipleChoices:false,
|
|
|
- multiple:false,
|
|
|
- disabled:false,
|
|
|
- searchShow:true,
|
|
|
- collapseTags:false,
|
|
|
- placeholder:'请点击右边按钮选择',
|
|
|
- dicData:[]
|
|
|
- },
|
|
|
- financeStatusDic:[{
|
|
|
- label:'正常',
|
|
|
- value:0
|
|
|
- },{
|
|
|
- label:'停用',
|
|
|
- value:1
|
|
|
- }],
|
|
|
- //顶部from数据
|
|
|
- basicData: {
|
|
|
+ option: {
|
|
|
+ menuBtn: false,
|
|
|
+ labelWidth: 100,
|
|
|
column: [
|
|
|
{
|
|
|
label: '系统号',
|
|
|
prop: 'sysNo',
|
|
|
- disabled:true,
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
+ span: 8,
|
|
|
+ disabled: true
|
|
|
},{
|
|
|
label: '合同号',
|
|
|
prop: 'srcOrderno',
|
|
|
+ span: 8,
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
@@ -150,8 +114,10 @@
|
|
|
}
|
|
|
]
|
|
|
}, {
|
|
|
- label: '供应商',
|
|
|
+ label: '客户名称',
|
|
|
prop: 'corpId',
|
|
|
+ sort:true,
|
|
|
+ span: 8,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -163,6 +129,7 @@
|
|
|
{
|
|
|
label: '金额',
|
|
|
prop: 'amount',
|
|
|
+ span: 8,
|
|
|
rules: [
|
|
|
{
|
|
|
pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
|
|
@@ -172,11 +139,13 @@
|
|
|
]
|
|
|
}, {
|
|
|
label: '币别',
|
|
|
- prop: 'currency'
|
|
|
+ prop: 'currency',
|
|
|
+ span: 8,
|
|
|
},
|
|
|
{
|
|
|
label: '汇率',
|
|
|
prop: 'exchangeRate',
|
|
|
+ span: 8,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -185,8 +154,9 @@
|
|
|
}
|
|
|
]
|
|
|
},{
|
|
|
- label: '银行名称',
|
|
|
+ label: '开户银行',
|
|
|
prop: 'accountBank',
|
|
|
+ span: 8,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -197,6 +167,7 @@
|
|
|
}, {
|
|
|
label: '银行户头',
|
|
|
prop: 'accountName',
|
|
|
+ span: 8,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -207,6 +178,7 @@
|
|
|
}, {
|
|
|
label: '银行账号',
|
|
|
prop: 'accountNo',
|
|
|
+ span: 8,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -216,45 +188,9 @@
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: '手续费',
|
|
|
- prop: 'serviceCharge',
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: false,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '要求付款日期',
|
|
|
- prop: 'orderNo',
|
|
|
- type:"date",
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: false,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- }, {
|
|
|
- label: '实际付款日期',
|
|
|
- prop: 'orderNo',
|
|
|
- type:"date",
|
|
|
- rules: [
|
|
|
- {
|
|
|
- required: false,
|
|
|
- message: ' ',
|
|
|
- trigger: 'blur'
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- {
|
|
|
- label: '单据状态',
|
|
|
- prop: 'financeStatus',
|
|
|
- }, {
|
|
|
label: '制单人',
|
|
|
prop: 'createUserName',
|
|
|
+ span: 8,
|
|
|
disabled:true,
|
|
|
rules: [
|
|
|
{
|
|
@@ -266,6 +202,7 @@
|
|
|
}, {
|
|
|
label: '制单日期',
|
|
|
prop: 'createTime',
|
|
|
+ span: 8,
|
|
|
type:"date",
|
|
|
disabled:true,
|
|
|
rules: [
|
|
@@ -280,6 +217,7 @@
|
|
|
label: '备注',
|
|
|
prop: 'remark',
|
|
|
span:24,
|
|
|
+ row:2,
|
|
|
rules: [
|
|
|
{
|
|
|
required: false,
|
|
@@ -290,6 +228,16 @@
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
+ //客户组件配置控制
|
|
|
+ configuration:{
|
|
|
+ multipleChoices:false,
|
|
|
+ multiple:false,
|
|
|
+ disabled:false,
|
|
|
+ searchShow:true,
|
|
|
+ collapseTags:false,
|
|
|
+ placeholder:'请点击右边按钮选择',
|
|
|
+ dicData:[]
|
|
|
+ },
|
|
|
oldForm:{},
|
|
|
oldDataList:[],
|
|
|
}
|
|
@@ -300,57 +248,86 @@
|
|
|
this.currencyDic = res.data.data
|
|
|
})
|
|
|
if (this.detailData.id) {
|
|
|
- this.id = BigInt(this.detailData.id);//字符串转数字 超长用BigInt
|
|
|
- getDetail(this.id).then(res => {
|
|
|
+ this.id = this.detailData.id;
|
|
|
+ getDetails(this.id).then(res => {
|
|
|
this.form = res.data.data;
|
|
|
this.oldForm = Object.assign({},res.data.data);
|
|
|
- this.configuration.dicData = res.data.data.customerModel;
|
|
|
+ this.checkDisabled = res.data.data.checkStatus === "未请核"?true:false;
|
|
|
if(res.data.data.itemsList){
|
|
|
this.dataList = res.data.data.itemsList
|
|
|
this.oldDataList = this.deepClone(res.data.data.itemsList)
|
|
|
}
|
|
|
})
|
|
|
- }else{
|
|
|
- this.assignment()
|
|
|
}
|
|
|
-
|
|
|
- if(this.detailData.params){
|
|
|
- detailListData(this.detailData.params.id).then(res =>{
|
|
|
- this.form.corpId = res.data.data.corpId;
|
|
|
- this.form.srcOrderno = res.data.data.orderNo;
|
|
|
- this.configuration.dicData = res.data.data.corpsName;
|
|
|
- res.data.data.itemsVOList.forEach((item,index) =>{
|
|
|
- this.detailData.params.orderItemIds.forEach((e,i) =>{
|
|
|
- if(e == index){
|
|
|
- const params ={
|
|
|
- srcOrderno:res.data.data.orderNo,
|
|
|
- amount:item.amount,
|
|
|
- createUserName:item.createUserName,
|
|
|
- createTime:item.createTime,
|
|
|
- }
|
|
|
- this.$refs.crud.rowCellAdd(params);
|
|
|
- this.$refs.crud.rowCell(params,this.dataList.length - 1)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ rowCell(row, index) {
|
|
|
+ this.$refs.crud.rowCell(row, index)
|
|
|
+ },
|
|
|
+ //验证新旧数据
|
|
|
+ verification(){
|
|
|
+ let verification;
|
|
|
+ if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)){
|
|
|
+ this.$confirm("您已改动数据,是否先保存在进行操作!", {
|
|
|
+ confirmButtonText: "保存",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.editPayment()
|
|
|
+ }).catch(()=>{
|
|
|
+ verification = false; //取消改动数据
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ verification = true; //没有动过数据
|
|
|
+ }
|
|
|
+ return verification
|
|
|
+ },
|
|
|
+ //请核
|
|
|
+ paymentCheck(){
|
|
|
+ if(this.verification()){
|
|
|
+ this.$confirm("您确定请核此次申请吗?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(()=>{
|
|
|
+ const params ={
|
|
|
+ id : this.form.id,
|
|
|
+ billType: this.form.billType
|
|
|
+ }
|
|
|
+ paymentCheck(params).then(res =>{
|
|
|
+ if(res.data.success){
|
|
|
+ this.$message.success("请核成功!");
|
|
|
+ this.checkDisabled = res.data.data.checkStatus === "未请核"?true:false;
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
- })
|
|
|
- this.assignment()
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- option.height = window.innerHeight - 640 ;
|
|
|
- },
|
|
|
- methods: {
|
|
|
- assignment(){
|
|
|
- getSysNo("CW-FK").then(res =>{
|
|
|
- this.$set(this.form,"sysNo", res.data.data)
|
|
|
- let date = new Date();
|
|
|
- let strDate = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() + " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
|
|
|
- this.$set(this.form,"createTime",strDate)
|
|
|
- })
|
|
|
- getUserInfo().then(res =>{
|
|
|
- this.$set(this.form,"createUserName", res.data.data.name)
|
|
|
- })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //结算
|
|
|
+ settlement(){
|
|
|
+ if(this.verification()){
|
|
|
+ this.$confirm("您确定结算此次申请吗?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(()=>{
|
|
|
+ if(this.$store.getters.takeStatus){
|
|
|
+ this.$alert("结算页面已存在,请关闭收货单再进行操作", "温馨提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ type: 'warning',
|
|
|
+ callback: action => {
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ //关闭一下存在的列表页 跳转
|
|
|
+ this.$router.$avueRouter.closeTag('/payment_settle');
|
|
|
+ this.$router.push({
|
|
|
+ path: "/payment_settle",
|
|
|
+ query: {params: this.form.id},
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
searchReset() {
|
|
|
console.log('1')
|
|
@@ -367,24 +344,21 @@
|
|
|
refreshChange() {
|
|
|
console.log('1')
|
|
|
},
|
|
|
- editFinance(status){
|
|
|
+ editPayment(status){
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if(valid){
|
|
|
const params = {
|
|
|
...this.form,
|
|
|
- billType:"付费",
|
|
|
+ billType:"申请",
|
|
|
itemsList:this.dataList
|
|
|
}
|
|
|
- editFinance(params).then(res =>{
|
|
|
- if(res.data.success){
|
|
|
- this.form = res.data.data;
|
|
|
- this.oldForm = Object.assign({},res.data.data);
|
|
|
- this.configuration.dicData = res.data.data.customerModel;
|
|
|
- if(res.data.data.itemsList){
|
|
|
- this.dataList = res.data.data.itemsList
|
|
|
- this.oldDataList = this.deepClone(res.data.data.itemsList)
|
|
|
- }
|
|
|
- this.$message.success("操作成功!")
|
|
|
+ modify(params).then(res =>{
|
|
|
+ this.$message.success("操作成功!")
|
|
|
+ this.form = res.data.data;
|
|
|
+ this.oldForm = Object.assign({},res.data.data);
|
|
|
+ if(res.data.data.itemsList){
|
|
|
+ this.dataList = res.data.data.itemsList
|
|
|
+ this.oldDataList = this.deepClone(res.data.data.itemsList)
|
|
|
}
|
|
|
})
|
|
|
if(status === true){
|
|
@@ -434,14 +408,10 @@
|
|
|
color: #323233;
|
|
|
font-weight: 400;
|
|
|
}
|
|
|
- .add-customer-btn-two {
|
|
|
- position: fixed;
|
|
|
- right: 150px;
|
|
|
- top: 115px;
|
|
|
- }
|
|
|
- .add-customer-btn {
|
|
|
+ .upper_right_button{
|
|
|
+ display: flex;
|
|
|
position: fixed;
|
|
|
- right: 36px;
|
|
|
+ right: 20px;
|
|
|
top: 115px;
|
|
|
}
|
|
|
</style>
|