|
@@ -2,12 +2,12 @@ import { shallowRef, reactive } from 'vue'
|
|
|
import { v4 } from 'uuid'
|
|
import { v4 } from 'uuid'
|
|
|
import { useDataTable } from '@/hooks/datatable'
|
|
import { useDataTable } from '@/hooks/datatable'
|
|
|
import { getTableColumns } from '@/business/table'
|
|
import { getTableColumns } from '@/business/table'
|
|
|
-import { cjjcApply, queryGZCJJCOrder } from '@/services/api/customs'
|
|
|
|
|
|
|
+import { cjjcApply, queryGZCJJCOrder, cjjcMemberOperate, queryGZCJJCOrderDetail } from '@/services/api/customs'
|
|
|
import { ClientType } from '@/constants/client'
|
|
import { ClientType } from '@/constants/client'
|
|
|
import { useLoginStore } from '@/stores'
|
|
import { useLoginStore } from '@/stores'
|
|
|
|
|
|
|
|
// 出境检测
|
|
// 出境检测
|
|
|
-export function useCJJCOrder() {
|
|
|
|
|
|
|
+export function useCJJCOrderList() {
|
|
|
const { getUserId } = useLoginStore()
|
|
const { getUserId } = useLoginStore()
|
|
|
const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.GZCJJCOrderRsp>()
|
|
const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.GZCJJCOrderRsp>()
|
|
|
const loading = shallowRef(false)
|
|
const loading = shallowRef(false)
|
|
@@ -42,16 +42,13 @@ export function useCJJCOrder() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 出境检测
|
|
|
|
|
-export function useCJJCOrderEdit(selectedRow?: Ermcp.GZCJJCOrderRsp) {
|
|
|
|
|
|
|
+// 出境检测申请
|
|
|
|
|
+export function useCJJCOrderApply(selectedRow?: Ermcp.GZCJJCOrderRsp) {
|
|
|
const { loginInfo, getFirstAccountId } = useLoginStore()
|
|
const { loginInfo, getFirstAccountId } = useLoginStore()
|
|
|
const { UserID, LoginID, LoginCode } = loginInfo.value
|
|
const { UserID, LoginID, LoginCode } = loginInfo.value
|
|
|
const loading = shallowRef(false)
|
|
const loading = shallowRef(false)
|
|
|
|
|
|
|
|
const formData = reactive<Partial<Proto.CJJCApplyReq>>({
|
|
const formData = reactive<Partial<Proto.CJJCApplyReq>>({
|
|
|
- Header: {
|
|
|
|
|
- AccountID: getFirstAccountId(),
|
|
|
|
|
- },
|
|
|
|
|
UserID,
|
|
UserID,
|
|
|
AccountID: getFirstAccountId(),
|
|
AccountID: getFirstAccountId(),
|
|
|
OperateID: LoginID, // 操作人ID,LoginAccount的LoginID,必填
|
|
OperateID: LoginID, // 操作人ID,LoginAccount的LoginID,必填
|
|
@@ -80,6 +77,30 @@ export function useCJJCOrderEdit(selectedRow?: Ermcp.GZCJJCOrderRsp) {
|
|
|
origincountry: formData.ZSOrigin,
|
|
origincountry: formData.ZSOrigin,
|
|
|
gzcjdeliverytype: formData.GZCJDeliveryType,
|
|
gzcjdeliverytype: formData.GZCJDeliveryType,
|
|
|
} = selectedRow)
|
|
} = selectedRow)
|
|
|
|
|
+
|
|
|
|
|
+ queryGZCJJCOrderDetail({
|
|
|
|
|
+ data: {
|
|
|
|
|
+ userid: UserID,
|
|
|
|
|
+ orderid: selectedRow.orderid,
|
|
|
|
|
+ },
|
|
|
|
|
+ success: (res) => {
|
|
|
|
|
+ res.data.forEach((e) => {
|
|
|
|
|
+ formData.GZCJCategoryDetails?.push({
|
|
|
|
|
+ OrderIndex: e.orderindex,
|
|
|
|
|
+ GZNo: e.gzno,
|
|
|
|
|
+ GZCJShapeType: e.gzcjshapetype,
|
|
|
|
|
+ Weight: e.weight,
|
|
|
|
|
+ Amount: e.amount,
|
|
|
|
|
+ ColorInfo: e.colorinfo,
|
|
|
|
|
+ Remark: e.remark,
|
|
|
|
|
+ GZCJMarkType: e.gzcjmarktype,
|
|
|
|
|
+ GZCJPublishType: e.gzcjpublishtype,
|
|
|
|
|
+ GZCJServiceType: e.gzcjservicetype,
|
|
|
|
|
+ OriginCertNo: e.origincertno,
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const formSubmit = () => {
|
|
const formSubmit = () => {
|
|
@@ -102,18 +123,38 @@ export function useCJJCOrderEdit(selectedRow?: Ermcp.GZCJJCOrderRsp) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// 保税服务
|
|
|
|
|
-export function useBSFWOrder() {
|
|
|
|
|
- const { dataList, total, pageIndex, pageSize } = useDataTable<Ermcp.GZBSFWOrderRsp>()
|
|
|
|
|
|
|
+// 出境检测操作
|
|
|
|
|
+export function useCJJCOrderOperate(OrderID: number) {
|
|
|
|
|
+ const { loginInfo } = useLoginStore()
|
|
|
|
|
+ const { UserID, LoginID, LoginCode } = loginInfo.value
|
|
|
const loading = shallowRef(false)
|
|
const loading = shallowRef(false)
|
|
|
- const columns = shallowRef(getTableColumns('customs_bsfw'))
|
|
|
|
|
|
|
+
|
|
|
|
|
+ const formData = reactive<Proto.CJJCMemberOperateReq>({
|
|
|
|
|
+ UserID, // 用户ID,必填
|
|
|
|
|
+ OperateID: LoginID, // 操作人ID,必填,LoginAccount的LoginID
|
|
|
|
|
+ OperateAccount: LoginCode || LoginID.toString(), // 操作人账户,LoginAccount的LoginCode,LoginCode为空则填LoginID,必
|
|
|
|
|
+ OrderID, // 单据ID,必填
|
|
|
|
|
+ OperateType: 0, // 操作类型,必填,1:撤回2:确认发货3:确认检测结果
|
|
|
|
|
+ ClientType: ClientType.Web, // 终端类型
|
|
|
|
|
+ ClientSerialNo: '', // 客户端流水号
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ const formSubmit = () => {
|
|
|
|
|
+ loading.value = true
|
|
|
|
|
+ return cjjcMemberOperate({
|
|
|
|
|
+ data: {
|
|
|
|
|
+ ...formData,
|
|
|
|
|
+ ClientSerialNo: v4(),
|
|
|
|
|
+ },
|
|
|
|
|
+ complete: () => {
|
|
|
|
|
+ loading.value = false
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
loading,
|
|
loading,
|
|
|
- dataList,
|
|
|
|
|
- total,
|
|
|
|
|
- pageIndex,
|
|
|
|
|
- pageSize,
|
|
|
|
|
- columns,
|
|
|
|
|
|
|
+ formData,
|
|
|
|
|
+ formSubmit,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|