| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- <template>
- <!-- 现货合同审核-->
- <a-modal class="add-custom custom-detail"
- title="现货合同审核"
- v-model:visible="visible"
- centered
- :maskClosable="maskClosableFlag"
- @cancel="cancel"
- width="890px">
- <template #footer>
- <a-button key="submit"
- class="cancelBtn"
- @click="refuse">审核拒绝</a-button>
- <a-button key="submit"
- type="primary"
- :loading="loading"
- @click="submit">审核通过</a-button>
- </template>
- <a-form class="inlineForm"
- ref="formRef"
- :model="formState"
- :rules="rules">
- <fieldset class="formFieldSet">
- <legend>基本信息</legend>
- <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">{{ getContractTypeName(selectedRow.contracttype) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="业务类型">
- <span class="white">{{ getBizTypeName(selectedRow.biztype) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="采购方">
- <span class="white">{{ formatValue(selectedRow.buyusername) }}</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.sellusername) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="合同附件">
- <div class="upload">
- <div class="look">{{ formatValue(selectedRow.contracctstatus) }}</div>
- </div>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="状态">
- <span class="green">{{ formatValue(getContractStatusName(selectedRow.contracctstatus)) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- </fieldset>
- <fieldset class="formFieldSet">
- <legend>现货信息</legend>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="现货品种">
- <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="品类">
- <span class="white">{{ formatValue(selectedRow.wrstandardname) }}</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.brandname) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="标仓系数">
- <span class="white">{{ formatValue(selectedRow.convertfactor) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="商品规格">
- <span class="white">{{ formatValue(selectedRow.spotgoodsdesc) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- </fieldset>
- <fieldset class="formFieldSet">
- <legend>价格信息</legend>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="定价类型">
- <span class="white">{{ getPriceTypeName(formatValue(selectedRow.pricetype)) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="数量">
- <span class="white">{{ formatValue(selectedRow.qty) }}</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.goodscode) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="升贴水">
- <span class="white">{{ formatValue(selectedRow.pricemove) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="点价期">
- <span class="white">{{ formatValue(formatTime(selectedRow.startdate, "d") + '--' + formatTime(selectedRow.enddate, "d")) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="交收期">
- <span class="white">{{ formatValue(formatTime(selectedRow.deliverystartdate, "d") + '--' + formatTime(selectedRow.deliveryenddate, "d"))}}</span>
- </a-form-item>
- </a-col>
- </a-row>
- </fieldset>
- <fieldset class="formFieldSet">
- <legend>其他信息</legend>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="保证金">
- <span class="white">{{ formatValue(selectedRow.contractmargin) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="业务员"
- name="SaleUserID">
- <a-select class="inlineFormSelect"
- v-model:value="formState.SaleUserID"
- style="width: 200px"
- placeholder="请选择业务员">
- <a-select-option v-for="item in businesserList"
- :key="item.id"
- :value="item.id">
- {{item.name}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="跟单员"
- name="MerUserID">
- <a-select class="inlineFormSelect"
- v-model:value="formState.MerUserID"
- style="width: 200px"
- placeholder="请选择跟单员">
- <a-select-option v-for="item in merchandiserList"
- :key="item.id"
- :value="item.id">
- {{item.name}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="交易用户"
- name="TradeUserID">
- <a-select class="inlineFormSelect"
- style="width: 200px"
- v-model:value="formState.TradeUserID"
- placeholder="请选择期货账户">
- <a-select-option v-for="item in traderList"
- :key="item.id"
- :value="item.id">
- {{item.name}}
- </a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="备注">
- <span class="white">{{ formatValue(selectedRow.remark) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- </fieldset>
- <fieldset class="formFieldSet">
- <legend>审核信息</legend>
- <a-row :gutter="24">
- <a-col :span="24">
- <a-form-item label="审核意见"
- name="Remark">
- <a-input class="dialogInput"
- v-model:value="formState.Remark"
- style="width: 620px"
- placeholder="请输入审核意见" />
- </a-form-item>
- </a-col>
- </a-row>
- </fieldset>
- </a-form>
- </a-modal>
- </template>
- <script lang="ts">
- import { defineComponent, PropType, ref, toRaw } from 'vue';
- import { closeModal } from '@/common/setup/modal/index';
- import { getBizTypeName, getContractStatusName, getContractTypeName, getPriceTypeName } from '@/views/information/spot-contract/setup';
- import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
- import { formatTime, formatValue, initData } from '@/common/methods';
- import { orderContractControl, orderContractOperateControl } from '@/views/information/spot-contract/components/setup';
- import { Modal } from 'ant-design-vue';
- import { handleForm } from './setup';
- import { handleAccountManager } from '../setup';
- import { GldErmcpSpotContractOperateReq, SpotContractOperateReq } from '@/services/proto/spotcontract/interface';
- import Long from 'long';
- export default defineComponent({
- name: 'spot-contract-detail',
- components: {},
- props: {
- selectedRow: {
- type: Object as PropType<Ermcp3ContractRsp>,
- default: {},
- },
- },
- setup(props, context) {
- const { visible, cancel } = closeModal('spot_contract_btn_check');
- // 账号列表: 交易用户 业务员 跟单员
- const { traderList, businesserList, merchandiserList, getRoleList, getBusinesserList } = handleAccountManager();
- const loading = ref<boolean>(false);
- // 表单
- const { rules, formState, formRef } = handleForm();
- function submit() {
- Modal.confirm({
- title: '是否确认审核通过',
- okText: '确认审核通过',
- cancelText: '取消',
- onOk() {
- formRef.value.validate().then(() => {
- const param = toRaw(formState);
- const reqs: GldErmcpSpotContractOperateReq = {
- SpotContractID: props.selectedRow.spotcontractid,
- OperateType: 4,
- Remark: param.Remark,
- Info: {BizType: props.selectedRow.biztype, CurrencyID: props.selectedRow.currencyid, ...param},
- };
- // 审核通过
- orderContractControl(reqs, loading).then(() => {
- cancel();
- context.emit('refresh');
- });
- });
- },
- onCancel() {
- console.log('Cancel');
- },
- });
- }
- function refuse() {
- Modal.confirm({
- title: '是否确认审核拒绝',
- okText: '确认审核拒绝',
- cancelText: '取消',
- onOk() {
- const param = toRaw(formState);
- const reqs: SpotContractOperateReq = {
- SpotContractID: props.selectedRow.spotcontractid,
- OperateType: 4,
- Remark: param.Remark,
- };
- // 审核拒绝
- orderContractOperateControl(reqs, loading).then(() => {
- cancel();
- context.emit('refresh');
- });
- },
- onCancel() {
- console.log('Cancel');
- },
- });
- }
- initData(() => {
- getRoleList();
- getBusinesserList();
- });
- return {
- visible,
- cancel,
- submit,
- maskClosableFlag: false,
- getContractTypeName,
- getBizTypeName,
- formatValue,
- getContractStatusName,
- formatTime,
- getPriceTypeName,
- refuse,
- traderList,
- businesserList,
- merchandiserList,
- loading,
- formState,
- rules,
- formRef,
- };
- },
- });
- </script>
- <style lang="less">
- .add-custom custom-detail {
- .upload {
- .look {
- margin-left: 0;
- }
- }
- }
- </style>;
|