1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <template>
- <a-modal v-model:visible="visible" title="填报">
- <a-form ref="formRef" :label-col="labelCol" :model="formData" layout="horizontal">
- <a-form-item v-show="false">
- <a-input v-model:value="formData.id"></a-input>
- </a-form-item>
- <a-form-item
- label="起卸数量"
- name="fillWeight"
- >
- <!-- <a-textarea v-model:value="formData.endReason" placeholder="请输入结束说明"
- :auto-size="{ minRows: 3, maxRows: 5 }"/>-->
- <a-input-number v-model:value="formData.fillWeight" style="width:90%" :precision="2" :min="0.01" :max="9999999" placeholder="请输入起卸数量" allow-clear/><span style="margin-left:10px;">吨</span>
- </a-form-item>
- </a-form>
- <template #footer>
- <a-spin :spinning="submitLoading">
- <a-button type="primary" @click="onsubmit(true)">确认</a-button>
- </a-spin>
- </template>
- </a-modal>
- </template>
- <script setup>
- import {message} from 'ant-design-vue';
- import bizOrderApi from '@/api/biz/bizOrderApi'
- import bizLoadAppointApi from "@/api/biz/bizLoadAppointApi";
- const emit = defineEmits({successful: null})
- const visible = ref(false);
- const submitLoading = ref(false)
- const labelCol = ref({span: 4})
- // 表单数据
- const formData = ref({})
- const showModal = (id) => {
- formData.value.id = id
- visible.value = true;
- };
- const onClose = () => {
- formData.value = {}
- visible.value = false
- };
- const onsubmit = (flag) => {
- if (flag === true) {
- if (!formData.value.fillWeight) {
- message.error('起卸数量不能为空')
- return
- }
- }
- submitLoading.value = true
- bizLoadAppointApi.fillLoad(formData.value).then(() => {
- onClose()
- emit('successful', null)
- }).finally(() => {
- submitLoading.value = false
- })
- }
- // 抛出函数
- defineExpose({
- showModal
- })
- </script>
- <style scoped>
- </style>
|