| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- <template>
- <!-- 款项审核-->
- <a-modal class="add-custom custom-detail"
- title="款项审核"
- v-model:visible="visible"
- centered
- :maskClosable="false"
- @cancel="cancel"
- width="890px">
- <template #footer>
- <a-button key="submit"
- type="primary"
- :loading="loading"
- @click="cancel">关闭
- </a-button>
- <a-button key="submit"
- type="primary"
- :loading="loading"
- v-if="isShowContractCheck(selectedRow.applystatus)"
- @click="pass">审核通过
- </a-button>
- <a-button key="submit"
- type="primary"
- :loading="loading"
- v-if="isShowContractCheck(selectedRow.applystatus)"
- @click="refuse">审核拒绝
- </a-button>
- </template>
- <a-form class="inlineForm">
- <fieldset class="formFieldSet"
- v-if="isShowContractInfo(selectedRow.inouttype)">
- <legend>合同基本信息</legend>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="合同编号">
- <span class="white">{{
- getContractTypeName(selectedRow.contracttype) + '/' + 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.sellusername) }}</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">{{ formatValue(selectedRow.buyusername) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="合同签署量">
- <span class="white">{{ formatValue(selectedRow.contractqty) }}</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">{{ InOutTypeName(selectedRow.inouttype) }}</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">{{ formatValue(selectedRow.brandname) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="入库仓库">
- <span class="white">{{ formatValue(selectedRow.warehousename) }}</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.qty) + getGoodsUnitEnumItemName(selectedRow.unitid)
- }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="登记时间">
- <span class="white">{{ formatValue(selectedRow.applytime) }}</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.applyname) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="状态">
- <span class="white">{{ getApplyStatusName(selectedRow.applystatus) }}</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.audittime) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="审核人">
- <span class="white">{{ formatValue(selectedRow.auditname) }}</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.auditremark) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- </fieldset>
- </a-form>
- </a-modal>
- </template>
- <script lang="ts">
- import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
- import { closeModal } from '@/common/setup/modal/index';
- import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
- import { mergeObj } from '@/utils/objHandle';
- import { getStatusName } from '@/common/constants/enumsName';
- import { formatValue, formatTime } from '@/common/methods';
- import { Ermcp3AreaStockApply } from '@/services/go/ermcp/inventory-review/interface';
- import { InOutTypeName, isShowContractCheck, isShowContractInfo } from '@/views/manage/inventory-review/setup';
- import { getContractTypeName, getPriceTypeName, getApplyStatusName } from '@/common/constants/enumsName';
- import { getGoodsUnitEnumItemName } from '@/common/constants/enumsName';
- import { Modal } from 'ant-design-vue';
- import { AreaInOutApplyAuditPassReq, AuditERMCPAreaInOutStockApplyReq } from '@/services/proto/warehouse/interface';
- import Long from 'long';
- import { getLongTypeLoginID } from '@/services/bus/login';
- import { LongType } from '@/services/socket/login/interface';
- import { passStockControl, refuseStockControl } from '@/views/manage/inventory-review/components/setup';
- import moment from 'moment';
- export default defineComponent({
- name: 'inventory_review_checkin_audit',
- components: {},
- props: {
- selectedRow: {
- type: Object as PropType<Ermcp3AreaStockApply>,
- default: {},
- },
- },
- setup(props, context) {
- const { visible, cancel } = closeModal('inventory_review_checkin_audit');
- const loading = ref<boolean>(false);
- const maskClosableFlag = ref<boolean>(false);
- function submit() {
- loading.value = true;
- setTimeout(() => {
- loading.value = false;
- cancel();
- }, 200);
- }
- // 审核通过
- function pass() {
- Modal.confirm({
- title: '是否确认审核通过',
- okText: '审核通过',
- cancelText: '取消',
- onOk() {
- const param: AreaInOutApplyAuditPassReq = {
- InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid),
- AuditID: Long.fromString((getLongTypeLoginID() as LongType).toString()),
- Remark: '',
- };
- passStockControl(param, loading)
- .then((res) => {
- context.emit('refresh');
- cancel();
- })
- .catch((err) => {});
- },
- onCancel() {},
- });
- }
- // 审核拒绝
- function refuse() {
- Modal.confirm({
- title: '是否确认审核拒绝',
- okText: '审核拒绝',
- cancelText: '取消',
- onOk() {
- const param: AuditERMCPAreaInOutStockApplyReq = {
- InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid), // uint64 申请ID
- AuditID: Long.fromString((getLongTypeLoginID() as LongType).toString()), // uint64 审核人
- AuditRemark: '', // string 审核备注
- AuditTradeDate: moment().format('YYYYMMDD'), // string 审核交易日(yyyyMMdd)
- ApplyStatus: 3, // int32 审核状态:3-审核拒绝 5-已撤回
- };
- refuseStockControl(param, loading)
- .then((res) => {
- context.emit('refresh');
- cancel();
- })
- .catch((err) => {});
- },
- onCancel() {},
- });
- }
- return {
- visible,
- cancel,
- submit,
- loading,
- formatValue,
- getStatusName,
- maskClosableFlag,
- isShowContractInfo,
- getContractTypeName,
- getPriceTypeName,
- InOutTypeName,
- getGoodsUnitEnumItemName,
- getApplyStatusName,
- isShowContractCheck,
- refuse,
- pass,
- };
- },
- });
- </script>
- <style lang="less">
- .inventory_review_checkin_audit {
- .ant-form.inlineForm {
- margin-top: 20px;
- }
- }
- </style>;
|