|
|
@@ -1,214 +1,222 @@
|
|
|
<template>
|
|
|
- <!-- 款项登记-->
|
|
|
- <a-modal class="custom-detail"
|
|
|
- title="款项登记"
|
|
|
- v-model:visible="visible"
|
|
|
- centered
|
|
|
- @cancel="cancel"
|
|
|
- width="890px">
|
|
|
- <template #footer>
|
|
|
- <a-button key="submit"
|
|
|
- type="primary"
|
|
|
- :loading="loading"
|
|
|
- @click="submit">关闭</a-button>
|
|
|
- </template>
|
|
|
- <fieldset class="formFieldSet">
|
|
|
- <legend>合同基本信息</legend>
|
|
|
- <a-form class="inlineForm">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="合同编号">
|
|
|
- <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="定价类型">
|
|
|
- <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item :label="selectedRow.contracttype===1? '采购方': '销售方'">
|
|
|
- <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="现货品种">
|
|
|
- <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="暂定价货款总额">
|
|
|
- <span class="white">{{ selectedRow.pricetype === 3 ? formatValue(selectedRow.loanamount) : 0 }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </fieldset>
|
|
|
+ <!-- 款项登记-->
|
|
|
+ <a-modal class="commonModal paddingDialog funds"
|
|
|
+ title="款项登记"
|
|
|
+ v-model:visible="visible"
|
|
|
+ centered
|
|
|
+ @cancel="cancel"
|
|
|
+ width="890px">
|
|
|
+ <template #footer>
|
|
|
+ <a-button key="submit"
|
|
|
+ class="cancelBtn"
|
|
|
+ @click="cancel">取消
|
|
|
+ </a-button>
|
|
|
+ <a-button key="submit"
|
|
|
+ type="primary"
|
|
|
+ :loading="loading"
|
|
|
+ @click="submit">款项登记
|
|
|
+ </a-button>
|
|
|
+ </template>
|
|
|
+ <fieldset class="formFieldSet">
|
|
|
+ <legend>合同基本信息</legend>
|
|
|
+ <a-form class="inlineForm">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="合同编号">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="定价类型">
|
|
|
+ <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="销售方">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="现货品种">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="暂定价货款总额">
|
|
|
+ <span class="white">{{ selectedRow.pricetype === 3 ? formatValue(selectedRow.loanamount) : 0 }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </fieldset>
|
|
|
|
|
|
- <fieldset class="formFieldSet">
|
|
|
- <legend>已登记信息</legend>
|
|
|
- <a-form class="inlineForm">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="已定价额">
|
|
|
- <span class="white">{{ selectedRow.pricedamount }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="调整金额">
|
|
|
- <span class="white">{{ selectedRow.reckonadjustamount }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <fieldset class="formFieldSet">
|
|
|
+ <legend>已登记信息</legend>
|
|
|
+ <a-form class="inlineForm">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="已定价额">
|
|
|
+ <span class="white">{{ selectedRow.pricedamount }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="调整金额">
|
|
|
+ <span class="white">{{ selectedRow.reckonadjustamount }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="货款总额">
|
|
|
- <span class="white">{{ selectedRow.pricedamount + selectedRow.reckonadjustamount }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="保证金">
|
|
|
- <span class="white">{{ selectedRow.margin }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="货款总额">
|
|
|
+ <span class="white">{{ selectedRow.pricedamount + selectedRow.reckonadjustamount }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="保证金">
|
|
|
+ <span class="white">{{ selectedRow.margin }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="其他费用">
|
|
|
- <span class="white">{{ selectedRow.reckonotheramount }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="合计总额">
|
|
|
- <span class="white">{{ formatValue(selectedRow.pricedavg) }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="其他费用">
|
|
|
+ <span class="white">{{ selectedRow.reckonotheramount }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="合计总额">
|
|
|
+ <span class="white">{{ formatValue(selectedRow.totalamount) }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="已支付额">
|
|
|
- <span class="white">{{ selectedRow.payamount }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="预计款额">
|
|
|
- <span class="white">{{ selectedRow.prepayamount }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </fieldset>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="已支付额">
|
|
|
+ <span class="white">{{ selectedRow.payamount }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="预计款额">
|
|
|
+ <span class="white">{{ selectedRow.prepayamount }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </fieldset>
|
|
|
|
|
|
- <fieldset class="formFieldSet">
|
|
|
- <legend>本次款项信息</legend>
|
|
|
- <a-form class="inlineForm"
|
|
|
- ref="formRef"
|
|
|
- :model="formState"
|
|
|
- :rules="rules">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="应付款额"
|
|
|
- name="unpayamount">
|
|
|
- <span class="white">10000000.00元</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="款项类型">
|
|
|
- <a-radio-group class="commonRadioGroup" v-model:value="formState.payType" >
|
|
|
- <a-radio :value="1">付款申请</a-radio>
|
|
|
- <a-radio :value="2">退款通知</a-radio>
|
|
|
- </a-radio-group>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="登记金额" name="Amount">
|
|
|
- <a-input-number class="dialogInput"
|
|
|
- style="width: 200px"
|
|
|
- suffix="元"
|
|
|
- type="number"
|
|
|
- placeholder="请输入登记金额"
|
|
|
- v-model:value="formState.Amount" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="备注"
|
|
|
- name="PricedQty"
|
|
|
- class="relative">
|
|
|
- <a-input class="dialogInput"
|
|
|
- style="width: 608px"
|
|
|
- placeholder="请输入备注信息"
|
|
|
- v-model:value="formState.Remark"/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </fieldset>
|
|
|
- </a-modal>
|
|
|
+ <fieldset class="formFieldSet">
|
|
|
+ <legend>本次款项信息</legend>
|
|
|
+ <a-form class="inlineForm"
|
|
|
+ ref="formRef"
|
|
|
+ :model="formState"
|
|
|
+ :rules="rules">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="应付款额"
|
|
|
+ name="unpayamount">
|
|
|
+ <span class="white">{{selectedRow.unpayamount}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="款项类型">
|
|
|
+ <a-radio-group class="commonRadioGroup"
|
|
|
+ v-model:value="formState.payType">
|
|
|
+ <a-radio :value="1">付款申请</a-radio>
|
|
|
+ <a-radio :value="2">退款通知</a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="登记金额"
|
|
|
+ name="Amount">
|
|
|
+ <a-input-number class="dialogInput"
|
|
|
+ style="width: 200px"
|
|
|
+ suffix="元"
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入登记金额"
|
|
|
+ v-model:value="formState.Amount"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="备注"
|
|
|
+ name="PricedQty"
|
|
|
+ class="relative">
|
|
|
+ <a-input class="dialogInput"
|
|
|
+ style="width: 608px"
|
|
|
+ placeholder="请输入备注信息"
|
|
|
+ v-model:value="formState.Remark"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </fieldset>
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import {defineComponent, PropType, ref, unref} from 'vue';
|
|
|
-import { closeModal } from '@/common/setup/modal/index';
|
|
|
-import {Ermcp3SellBuyContract} from "@/services/go/ermcp/purchase/interface";
|
|
|
-import {formatValue} from "@/common/methods";
|
|
|
-import {getPriceTypeName} from "@/views/business/purchase/setup";
|
|
|
-import {handleForm} from "@/views/business/purchase/components/funds/setup";
|
|
|
-import {fundsReq} from "@/views/business/purchase/components/setup";
|
|
|
+ import {defineComponent, PropType, reactive, ref, unref, watch, watchEffect} from 'vue';
|
|
|
+ import {closeModal} from '@/common/setup/modal/index';
|
|
|
+ import {formatValue, initData} from '@/common/methods';
|
|
|
+ import {Ermcp3SellBuyContract} from '@/services/go/ermcp/purchase/interface';
|
|
|
+ import {getPriceTypeName} from '@/views/business/purchase/setup';
|
|
|
+ import {fundsReq} from '@/views/business/purchase/components/setup';
|
|
|
+ import {handleForm} from './setup';
|
|
|
|
|
|
-export default defineComponent({
|
|
|
- name: 'sell_pending_funds',
|
|
|
- components: {},
|
|
|
- props: {
|
|
|
- selectedRow: {
|
|
|
- type: Object as PropType<Ermcp3SellBuyContract>,
|
|
|
- default: {},
|
|
|
+ export default defineComponent({
|
|
|
+ name: 'sell_pending_funds',
|
|
|
+ components: {},
|
|
|
+ props: {
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<Ermcp3SellBuyContract>,
|
|
|
+ default: {},
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
- setup(props, context) {
|
|
|
- const { visible, cancel } = closeModal('sell_pending_funds');
|
|
|
- const loading = ref<boolean>(false);
|
|
|
- const { rules, formState, formRef } = handleForm();
|
|
|
+ setup(props, context) {
|
|
|
+ const {visible, cancel} = closeModal('sell_pending_funds');
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
+ const {rules, formState, formRef} = handleForm();
|
|
|
|
|
|
- function submit() {
|
|
|
- console.log(props.selectedRow)
|
|
|
- const wrapEl = unref(formRef);
|
|
|
- wrapEl.validate().then(() => {
|
|
|
- loading.value = true
|
|
|
- const params:any = {}
|
|
|
- if(formState.payType === 1){
|
|
|
- params.PayAmount = Number(formState.Amount)
|
|
|
- }else {
|
|
|
- params.DeductAmount = Number(formState.Amount)
|
|
|
- }
|
|
|
- // 发出发票登记
|
|
|
- fundsReq(props.selectedRow.spotcontractid, params, loading,formState.Remark)
|
|
|
- .then(() => {
|
|
|
+ function submit() {
|
|
|
+ console.log(props.selectedRow);
|
|
|
+ const wrapEl = unref(formRef);
|
|
|
+ wrapEl.validate().then(() => {
|
|
|
+ loading.value = true;
|
|
|
+ const params: any = {};
|
|
|
+ if (formState.payType === 1) {
|
|
|
+ params.PayAmount = Number(formState.Amount);
|
|
|
+ } else {
|
|
|
+ params.DeductAmount = Number(formState.Amount);
|
|
|
+ }
|
|
|
+ // 发出发票登记
|
|
|
+ fundsReq(props.selectedRow.spotcontractid, params, loading, formState.Remark).then(() => {
|
|
|
cancel();
|
|
|
context.emit('refresh');
|
|
|
- })
|
|
|
- });
|
|
|
- }
|
|
|
- return {
|
|
|
- visible,
|
|
|
- cancel,
|
|
|
- submit,
|
|
|
- loading,
|
|
|
- formState,
|
|
|
- formatValue,
|
|
|
- rules,
|
|
|
- getPriceTypeName,
|
|
|
- };
|
|
|
- },
|
|
|
-});
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ return {
|
|
|
+ visible,
|
|
|
+ cancel,
|
|
|
+ submit,
|
|
|
+ loading,
|
|
|
+ formState,
|
|
|
+ formatValue,
|
|
|
+ formRef,
|
|
|
+ rules,
|
|
|
+ getPriceTypeName,
|
|
|
+ };
|
|
|
+ },
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|