|
|
@@ -1,92 +1,120 @@
|
|
|
<template>
|
|
|
- <!-- 现货仓单 现货明细 提货 true -->
|
|
|
- <Drawer :title="'提货'" :placement="'bottom'" :visible="visible" @cancel="cancel">
|
|
|
- <!-- 挂牌 -->
|
|
|
- <div class="listed">
|
|
|
- <div class="condition">
|
|
|
- <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
|
|
|
- <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
|
|
|
- <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
|
|
|
- </div>
|
|
|
- <div class="formBar">
|
|
|
- <a-form class="inlineForm dialogForm" :form="form" @submit="handleSearch">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="提货数量">
|
|
|
- <a-input class="commonInput" suffix="吨" style="width: 140px" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="提货人">
|
|
|
- <a-input class="commonInput" style="width: 140px" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12" class="mt-20">
|
|
|
- <a-form-item>
|
|
|
- <a-progress class="formProgress" :percent="30" />
|
|
|
- <div class="unit">
|
|
|
- <span>0</span>
|
|
|
- <span>300吨</span>
|
|
|
- </div>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12"> </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="联系方式">
|
|
|
- <a-input class="commonInput" style="width: 140px" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="预约日期">
|
|
|
- <a-date-picker
|
|
|
- class="commonDatePicker dialogDatePicker"
|
|
|
- style="width: 140px"
|
|
|
- />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="备注">
|
|
|
- <a-input class="commonInput" style="width: 140px" />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12"> </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24" type="flex" justify="center">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item class="tc">
|
|
|
- <a-button class="listedBtn">提货</a-button>
|
|
|
- <a-button class="ml10 cancelBtn" @click="cancel">取消</a-button>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Drawer>
|
|
|
+ <!-- 现货仓单 现货明细 提货 true -->
|
|
|
+ <Drawer :title="'提货'"
|
|
|
+ :placement="'bottom'"
|
|
|
+ :visible="visible"
|
|
|
+ @cancel="cancel">
|
|
|
+ <!-- 挂牌 -->
|
|
|
+ <div class="listed">
|
|
|
+ <div class="condition">
|
|
|
+ <a-button class="conditionBtn">{{selectedRow.deliverygoodsname}}</a-button>
|
|
|
+ <a-button class="conditionBtn">{{selectedRow.wrtypename}}</a-button>
|
|
|
+ <a-button class="conditionBtn">{{selectedRow.warehousename}}</a-button>
|
|
|
+ </div>
|
|
|
+ <div class="formBar">
|
|
|
+ <a-form class="inlineForm dialogForm"
|
|
|
+ ref="formRef"
|
|
|
+ :model="formState"
|
|
|
+ :rules="rules">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="提货数量"
|
|
|
+ name="OutQty">
|
|
|
+ <a-input-number class="commonInput"
|
|
|
+ v-model:value="formState.OutQty"
|
|
|
+ :max="selectedRow.enableqty"
|
|
|
+ :suffix="selectedRow.enumdicname"
|
|
|
+ style="width: 140px" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="提货人"
|
|
|
+ name="ContactName">
|
|
|
+ <a-input class="commonInput"
|
|
|
+ v-model:value="formState.ContactName"
|
|
|
+ style="width: 140px" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12"
|
|
|
+ class="mt-20">
|
|
|
+ <a-form-item>
|
|
|
+ <a-progress class="formProgress"
|
|
|
+ :percent="30" />
|
|
|
+ <div class="unit">
|
|
|
+ <span>0</span>
|
|
|
+ <span>{{selectedRow.enableqty}}{{selectedRow.enumdicname}}</span>
|
|
|
+ </div>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12"> </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="联系方式"
|
|
|
+ name="ContactNum">
|
|
|
+ <a-input class="commonInput"
|
|
|
+ v-model:value="formState.ContactNum"
|
|
|
+ style="width: 140px" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="预约日期"
|
|
|
+ name="AppointmentDate">
|
|
|
+ <a-date-picker class="commonDatePicker dialogDatePicker"
|
|
|
+ v-model:value="formState.AppointmentDate"
|
|
|
+ style="width: 140px" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="备注"
|
|
|
+ name="AppointmentRemark">
|
|
|
+ <a-input class="commonInput"
|
|
|
+ v-model:value="formState.AppointmentRemark"
|
|
|
+ style="width: 140px" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12"> </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24"
|
|
|
+ type="flex"
|
|
|
+ justify="center">
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item class="tc">
|
|
|
+ <a-button class="listedBtn"
|
|
|
+ @click="submit">提货</a-button>
|
|
|
+ <a-button class="ml10 cancelBtn"
|
|
|
+ @click="cancel">取消</a-button>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Drawer>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
import { defineComponent, PropType, ref } from 'vue';
|
|
|
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
|
|
|
import Drawer from '@/common/components/drawer/index.vue';
|
|
|
-import {QueryWrPositionReq, WrHoldLB, WrPosition, WrTradeDetail} from '@/services/go/wrtrade/interface';
|
|
|
-import {getSelectedAccountId, getUserId} from '@/services/bus/account';
|
|
|
+import { WrHoldLB } from '@/services/go/wrtrade/interface';
|
|
|
+import { getSelectedAccountId, getUserId } from '@/services/bus/account';
|
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
-import {hdWROrder, wROutApply} from '@/services/proto/warehousetrade';
|
|
|
+import { wROutApply } from '@/services/proto/warehousetrade';
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
import moment from 'moment';
|
|
|
import { ModalEnum } from '@/common/constants/modalNameEnum';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
-import {WROutInDetail} from "@/services/proto/warehousetrade/interface";
|
|
|
-import {getUUID} from "@/utils/qt/common";
|
|
|
-import {getLongTypeLoginID} from "@/services/bus/login";
|
|
|
-import * as Long from "long";
|
|
|
+import { WROutInDetail } from '@/services/proto/warehousetrade/interface';
|
|
|
+import { getUUID } from '@/utils/qt/common';
|
|
|
+import { getLongTypeLoginID } from '@/services/bus/login';
|
|
|
+import * as Long from 'long';
|
|
|
+import { handleForm } from './setup';
|
|
|
+import { validateAction } from '@/common/setup/form';
|
|
|
+import { FormParam } from './interface';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: ModalEnum.spot_warrant_spot_details_pick_up,
|
|
|
@@ -102,34 +130,43 @@ export default defineComponent({
|
|
|
const data = props.selectedRow;
|
|
|
const loading = ref<boolean>(false);
|
|
|
const { visible, cancel } = _closeModal(context);
|
|
|
+ const { rules, formState, formRef } = handleForm();
|
|
|
// console.log(param);
|
|
|
+ function submit() {
|
|
|
+ validateAction<FormParam>(formRef, formState).then((res) => {
|
|
|
+ const param = {
|
|
|
+ ClientSerialID: getUUID(), // uint64 客户端唯一ID
|
|
|
+ WRStandardID: props.selectedRow.wrstandardid, // uint64 仓单标准ID
|
|
|
+ WarehouseID: props.selectedRow.warehouseid, // uint64 仓库ID
|
|
|
+ UserID: getUserId(), // uint64 申请人ID
|
|
|
+ AccountID: getSelectedAccountId()?.toString(), // uint64 申请人账户ID
|
|
|
+ AppointmentDate: '20200730', // string 预约出库时间(格式:20200101)
|
|
|
+ AppointmentModel: 3, // uint32 预约方式:1-物流,2-自送,3-自提
|
|
|
+ ContactName: '111', // string 收货人提货人
|
|
|
+ ContactNum: '131', // string 收货人提货人手机
|
|
|
+ AppointmentRemark: '', // string 预约备注
|
|
|
+ CreatorID: Number(getLongTypeLoginID()), // uint64 创建人ID
|
|
|
+ WROutInDetails: {
|
|
|
+ LadingBillID: props.selectedRow.ladingbillid, // string 提单ID
|
|
|
+ SubNum: props.selectedRow.subnum, // uint64 提单子单号
|
|
|
+ Qty: 1, // uint64 子提单总数量
|
|
|
+ OutQty: 1, // uint64 预约数量
|
|
|
+ } as WROutInDetail, // WROutInDetail 仓单出库提单明细数据
|
|
|
+ };
|
|
|
|
|
|
- const param = {
|
|
|
- ClientSerialID: getUUID(), // uint64 客户端唯一ID
|
|
|
- WRStandardID: props.selectedRow.wrstandardid, // uint64 仓单标准ID
|
|
|
- WarehouseID: props.selectedRow.warehouseid, // uint64 仓库ID
|
|
|
- UserID: getUserId(), // uint64 申请人ID
|
|
|
- AccountID: getSelectedAccountId()?.toString(), // uint64 申请人账户ID
|
|
|
- AppointmentDate: "20200730", // string 预约出库时间(格式:20200101)
|
|
|
- AppointmentModel: 3, // uint32 预约方式:1-物流,2-自送,3-自提
|
|
|
- ContactName: "111", // string 收货人提货人
|
|
|
- ContactNum: "131", // string 收货人提货人手机
|
|
|
- AppointmentRemark: "", // string 预约备注
|
|
|
- CreatorID: Number(getLongTypeLoginID()), // uint64 创建人ID
|
|
|
- WROutInDetails: {
|
|
|
- LadingBillID: props.selectedRow.ladingbillid, // string 提单ID
|
|
|
- SubNum: props.selectedRow.subnum, // uint64 提单子单号
|
|
|
- Qty: 1, // uint64 子提单总数量
|
|
|
- OutQty: 1, // uint64 预约数量
|
|
|
- } as WROutInDetail// WROutInDetail 仓单出库提单明细数据
|
|
|
+ requestResultLoadingAndInfo(wROutApply, param, loading, ['提货成功', '提货失败:']).then(() => {
|
|
|
+ cancel(true);
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
- requestResultLoadingAndInfo(wROutApply, param, loading, ['提货成功', '提货失败:']).then(() => {
|
|
|
- // cancel(true);
|
|
|
- });
|
|
|
return {
|
|
|
visible,
|
|
|
cancel,
|
|
|
+ submit,
|
|
|
+ rules,
|
|
|
+ formState,
|
|
|
+ formRef,
|
|
|
};
|
|
|
},
|
|
|
});
|