fanzherong_v преди 2 дни
родител
ревизия
d7e8091b69

+ 8 - 0
snowy-admin-web/src/api/biz/bizLoadAppointApi.js

@@ -42,5 +42,13 @@ export default {
 	//获取待报港的起卸预约列表
 	getList(data){
 		return request('getList',data,'get')
+	},
+	// 结束起卸订单
+	endLoad(data){
+		return request('endLoad',data)
+	},
+	// 填报起卸订单
+	fillLoad(data){
+		return request('fillLoad',data)
 	}
 }

+ 0 - 5
snowy-admin-web/src/views/biz/bizappointload/form.vue

@@ -25,11 +25,6 @@
 			<a-form-item label="车牌号:" name="licenseNumber">
 				<a-input v-model:value="formData.licenseNumber" placeholder="请输入车牌号" allow-clear />
 			</a-form-item>
-<!--			<a-form-item label="预约时段:" name="timeId">
-				<a-select v-model:value="formData.timeId" placeholder="请选择预约时段"
-						  :options="timeIdList"
-				> </a-select>
-			</a-form-item>-->
 			<a-form-item label="车辆轴数:" name="overId">
 				<a-select v-model:value="formData.overId" placeholder="请选择车辆轴数"
 						  :options="overIdList"

+ 65 - 0
snowy-admin-web/src/views/biz/bizloadappoint/end.vue

@@ -0,0 +1,65 @@
+<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="auditingRemark"
+            >
+                <a-textarea v-model:value="formData.endReason" placeholder="请输入结束说明"
+                            :auto-size="{ minRows: 3, maxRows: 5 }"/>
+            </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.endReason) {
+            message.error('结束时,说明信息不能为空')
+            return
+        }
+    }
+    submitLoading.value = true
+	formData.value.auditFlag = flag
+	bizLoadAppointApi.endLoad(formData.value).then(() => {
+        onClose()
+        emit('successful', null)
+    }).finally(() => {
+        submitLoading.value = false
+    })
+}
+// 抛出函数
+defineExpose({
+    showModal
+})
+</script>
+<style scoped>
+
+</style>

+ 65 - 0
snowy-admin-web/src/views/biz/bizloadappoint/fill.vue

@@ -0,0 +1,65 @@
+<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>

+ 16 - 3
snowy-admin-web/src/views/biz/bizloadappoint/index.vue

@@ -72,9 +72,9 @@
 			<template #bodyCell="{ column, record }">
 				<template v-if="column.dataIndex === 'action'">
 
-					<a @click="showModal(record)" v-if="record.status == '5'">二维码</a>
+					<a @click="showModal(record)" v-if="(record.status == '5' || record.status == '6')">二维码</a>
 
-					<a-divider type="vertical" v-if="record.status == '5' "/>
+					<a-divider type="vertical" v-if="(record.status == '5' || record.status == '6') "/>
 
 					<a-dropdown>
 						<a class="ant-dropdown-link">
@@ -104,6 +104,12 @@
 								<a-menu-item v-if="hasPerm('bizDispatchLoad') && (record.status == '4' || record.status=='5' || record.status=='6') && record.arriveStatus == '2'">
 									<a style="color:green" size="small" type="link" @click="dispatchLoadRef.onOpen(record)">起卸调度</a>
 								</a-menu-item>
+								<a-menu-item v-if="hasPerm('bizLoadAppointEnd') && (record.status=='5' || record.status=='6')">
+									<a style="color:red" @click="endRef.showModal(record.id)">结束</a>
+								</a-menu-item>
+								<a-menu-item v-if="hasPerm('bizLoadAppointFill') && (record.status=='7' )">
+									<a style="color:orange" @click="fillRef.showModal(record.id)">填报</a>
+								</a-menu-item>
 							</a-menu>
 						</template>
 					</a-dropdown>
@@ -140,6 +146,8 @@
 	<Detail ref="detailRef" @successful="tableRef.refresh()" />
 	<Dispatch ref="dispatchRef" @successful="tableRef.refresh()" />
 	<DispatchLoad ref="dispatchLoadRef" @successful="tableRef.refresh()" />
+	<End ref="endRef" @successful="tableRef.refresh(true)" />
+	<Fill ref="fillRef" @successful="tableRef.refresh(true)" />
 	<XnSignName ref="XnSignNameRef" @successful="signSuccess" />
 
 	<a-modal v-model:visible="open" title="二维码" width="600px" style="height: 700px">
@@ -180,6 +188,8 @@
 	import downloadUtil from '@/utils/downloadUtil'
 	import Dispatch from './dispatch.vue'
 	import DispatchLoad from './dispatchload.vue'
+	import End from "./end.vue";
+	import Fill from './fill.vue'
 
 
 	const tableRef = ref()
@@ -189,6 +199,8 @@
 	const detailRef = ref()
 	const XnSignNameRef = ref()
 	const nowRecord = ref()
+	const endRef = ref()
+	const fillRef = ref()
 	const submitLoading = ref(false)
 	const toolConfig = { refresh: true, height: true, columnSetting: true, striped: false }
 
@@ -370,7 +382,8 @@
 		//QRCode.toDataURL("id:"+record.id+"saleCode:"+record.saleCode, {
 		let param = {
 			id:record.id,
-			loadNumber:record.loadNumber
+			loadNumber:record.loadNumber,
+			type:'3'
 		}
 		QRCode.toDataURL(JSON.stringify(param), {
 			errorCorrectionLevel: 'H',

+ 2 - 2
snowy-admin-web/src/views/biz/bizloaddispatch/index.vue

@@ -37,8 +37,8 @@
 						<a-divider type="vertical" v-if="hasPerm(['bizLoadPointEdit', 'bizLoadPointDelete'], 'and')" />
 						<a-button type="link" danger size="small" v-if="hasPerm('bizLoadPointDelete')" @click="deleteConfig(record)">删除</a-button>
 
-						<a-divider type="vertical" v-if="hasPerm(['bizLoadPointEdit', 'bizLoadPointDelete'], 'or') && hasPerm('bizLoadUser')" />
-						<a @click="userIndexRef.onOpen(record)" v-if="hasPerm('bizLoadUser')">起卸员</a>
+<!--						<a-divider type="vertical" v-if="hasPerm(['bizLoadPointEdit', 'bizLoadPointDelete'], 'or') && hasPerm('bizLoadUser')" />
+						<a @click="userIndexRef.onOpen(record)" v-if="hasPerm('bizLoadUser')">起卸员</a>-->
 
 						<a-divider type="vertical" v-if="hasPerm(['bizLoadPointEdit', 'bizLoadPointDelete', 'bizLoadUser'], 'or') && hasPerm('bizLoadTime')" />
 						<a @click="timeIndexRef.onOpen(record)" v-if="hasPerm('bizLoadTime')">起卸时间</a>

+ 28 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/controller/BizLoadAppointController.java

@@ -173,4 +173,32 @@ public class BizLoadAppointController {
     public CommonResult<List<BizLoadAppoint>> getList(BizLoadAppointPageParam bizLoadAppointPageParam) {
         return CommonResult.data(bizLoadAppointService.getList(bizLoadAppointPageParam));
     }
+
+    /**
+     * 结束起卸预约
+     *
+     * @author fanzherong
+     * @date  2025/06/25 14:51
+     */
+    @Operation(summary = "结束起卸预约")
+    @CommonLog("结束起卸预约")
+    @PostMapping("/biz/bizloadappoint/endLoad")
+    public CommonResult<String> endLoad(@RequestBody @Valid BizLoadAppointEditParam bizLoadAppointEditParam) {
+        bizLoadAppointService.endLoad(bizLoadAppointEditParam);
+        return CommonResult.ok();
+    }
+
+    /**
+     * 填报起卸订单
+     *
+     * @author fanzherong
+     * @date  2025/06/25 14:51
+     */
+    @Operation(summary = "填报起卸订单")
+    @CommonLog("填报起卸订单")
+    @PostMapping("/biz/bizloadappoint/fillLoad")
+    public CommonResult<String> fillLoad(@RequestBody @Valid BizLoadAppointEditParam bizLoadAppointEditParam) {
+        bizLoadAppointService.fillLoad(bizLoadAppointEditParam);
+        return CommonResult.ok();
+    }
 }

+ 9 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/entity/BizLoadAppoint.java

@@ -126,4 +126,13 @@ public class BizLoadAppoint extends CommonEntity {
     /**报港预约状态**/
     @TableField(exist = false)
     private String arriveStatus;
+
+    /**结束说明*/
+    private String endReason;
+
+    /**起卸重量*/
+    private BigDecimal fillWeight;
+
+    /**填报时间*/
+    private Date fillTime;
 }

+ 9 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/param/BizLoadAppointEditParam.java

@@ -83,4 +83,13 @@ public class BizLoadAppointEditParam {
     /**客户签名*/
     private String customerSign;
 
+    /**结束说明*/
+    private String endReason;
+
+    /**起卸重量*/
+    private BigDecimal fillWeight;
+
+    /**填报时间*/
+    private Date fillTime;
+
 }

+ 11 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/service/BizLoadAppointService.java

@@ -99,4 +99,15 @@ public interface BizLoadAppointService extends IService<BizLoadAppoint> {
      * 获取起卸预约待报港列表
      */
     List<BizLoadAppoint> getList(BizLoadAppointPageParam bizLoadAppointPageParam);
+
+    /**
+     * 结束起卸订单
+     * @param bizLoadAppointEditParam
+     */
+    void endLoad(BizLoadAppointEditParam bizLoadAppointEditParam);
+
+    /**
+     * 填报起卸数量
+     */
+    void fillLoad(BizLoadAppointEditParam bizLoadAppointEditParam);
 }

+ 17 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloadappoint/service/impl/BizLoadAppointServiceImpl.java

@@ -251,6 +251,23 @@ public class BizLoadAppointServiceImpl extends ServiceImpl<BizLoadAppointMapper,
         return list;
     }
 
+    @Override
+    public void endLoad(BizLoadAppointEditParam bizLoadAppointEditParam) {
+        BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointEditParam.getId());
+        bizLoadAppoint.setEndReason(bizLoadAppointEditParam.getEndReason());
+        bizLoadAppoint.setStatus("7");
+        this.updateById(bizLoadAppoint);
+    }
+
+    @Override
+    public void fillLoad(BizLoadAppointEditParam bizLoadAppointEditParam) {
+        BizLoadAppoint bizLoadAppoint = this.queryEntity(bizLoadAppointEditParam.getId());
+        bizLoadAppoint.setStatus("8");
+        bizLoadAppoint.setFillWeight(bizLoadAppointEditParam.getFillWeight().multiply(new BigDecimal(1000)));
+        bizLoadAppoint.setFillTime(new Date());
+        this.updateById(bizLoadAppoint);
+    }
+
 
     public String getNumber(){
         lock.lock();

+ 2 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/bizloaddispatch/service/impl/BizLoadDispatchServiceImpl.java

@@ -38,6 +38,7 @@ import vip.xiaonuo.biz.modular.bizloaddispatch.param.BizLoadDispatchIdParam;
 import vip.xiaonuo.biz.modular.bizloaddispatch.param.BizLoadDispatchPageParam;
 import vip.xiaonuo.biz.modular.bizloaddispatch.service.BizLoadDispatchService;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -240,6 +241,7 @@ public class BizLoadDispatchServiceImpl extends ServiceImpl<BizLoadDispatchMappe
         if(ObjectUtil.isNotEmpty(bizLoadDispatchPageParam.getLoadPointId())){
             queryWrapper.eq("bld.load_point_id",bizLoadDispatchPageParam.getLoadPointId());
         }
+        queryWrapper.gt("blt.end_time",new Date());
         queryWrapper.eq("bld.delete_flag","NOT_DELETE");
         queryWrapper.groupBy("bld.load_time_id");
         return this.getBaseMapper().getPageList(queryWrapper);