no message
parent
bf817f5b46
commit
13a87ca391
|
|
@ -0,0 +1,48 @@
|
|||
/**
|
||||
* Task任务 api 封装
|
||||
*
|
||||
* @Author: 霍锦
|
||||
* @Date: 2024-12-03 17:08:30
|
||||
* @Copyright 友仓
|
||||
*/
|
||||
import {postRequest,getRequest} from '/@/lib/axios';
|
||||
|
||||
export const taskApi = {
|
||||
|
||||
/**
|
||||
* 分页查询 @author 霍锦
|
||||
*/
|
||||
queryPage: (param: object) => {
|
||||
return postRequest('/task/queryPage', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 增加 @author 霍锦
|
||||
*/
|
||||
add: (param: object) => {
|
||||
return postRequest('/task/add', param);
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改 @author 霍锦
|
||||
*/
|
||||
update: (param: object) => {
|
||||
return postRequest('/task/update', param);
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 删除 @author 霍锦
|
||||
*/
|
||||
delete: (id: number) => {
|
||||
return getRequest('/task/delete', id);
|
||||
},
|
||||
|
||||
/**
|
||||
* 批量删除 @author 霍锦
|
||||
*/
|
||||
batchDelete: (idList: number[]) => {
|
||||
return postRequest('/task/batchDelete', idList);
|
||||
},
|
||||
|
||||
};
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/**
|
||||
* Task任务 枚举
|
||||
*
|
||||
* @Author: 霍锦
|
||||
* @Date: 2024-12-03 17:08:30
|
||||
* @Copyright 友仓
|
||||
*/
|
||||
|
||||
|
||||
export default {
|
||||
};
|
||||
|
|
@ -27,7 +27,7 @@ export const appDefaultConfig: AppConfig = {
|
|||
// 菜单主题
|
||||
sideMenuTheme: 'dark',
|
||||
// 主题颜色索引
|
||||
colorIndex: 0,
|
||||
colorIndex: 1,
|
||||
// 顶部菜单页面宽度
|
||||
pageWidth: '99%',
|
||||
// 圆角
|
||||
|
|
@ -41,11 +41,11 @@ export const appDefaultConfig: AppConfig = {
|
|||
// 页脚
|
||||
footerFlag: true,
|
||||
// 帮助文档
|
||||
helpDocFlag: true,
|
||||
helpDocFlag: false,
|
||||
// 帮助文档默认展开
|
||||
helpDocExpandFlag: true,
|
||||
// 水印
|
||||
watermarkFlag: true,
|
||||
watermarkFlag: false,
|
||||
// 网站名称
|
||||
websiteName: 'SmartAdmin 3.X',
|
||||
// 主题颜色
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export const TABLE_ID_CONST = {
|
|||
RECEIVE:{
|
||||
ASN:businessRECEIVEInitTableId+1,//入库单
|
||||
ASN_DETAIL:businessRECEIVEInitTableId+2,//入库明细
|
||||
ASN_TASK:businessRECEIVEInitTableId+3,//入库详情
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@
|
|||
<ReceiveDetailList :asnId="form.asnId"/>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="asnTask" tab="收货详情">
|
||||
<AsnTaskList :asnId="form.asnId"/>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="dataTracer" tab="操作记录">
|
||||
<DataTracer :dataId="form.asnId" :type="DATA_TRACER_TYPE_ENUM.OA_ENTERPRISE.value"/>
|
||||
|
|
@ -110,6 +111,7 @@ import {SmartLoading} from "/@/components/framework/smart-loading";
|
|||
import {asnApi} from "/@/api/business/receive/asn/asn-api";
|
||||
import {smartSentry} from "/@/lib/smart-sentry";
|
||||
import ReceiveDetailList from "/@/views/business/receive/asn/receive-detail-list.vue";
|
||||
import AsnTaskList from "/@/views/business/receive/asnTask/asn-task-list.vue";
|
||||
|
||||
// 表单
|
||||
const formRef = ref();
|
||||
|
|
|
|||
|
|
@ -10,18 +10,18 @@
|
|||
<a-form class="smart-query-form">
|
||||
<a-row class="smart-query-form-row">
|
||||
<a-form-item label="物料" class="smart-query-form-item">
|
||||
<a-input style="width: 200px" v-model:value="queryForm.itemId" placeholder="物料" />
|
||||
<a-input style="width: 200px" v-model:value="queryForm.itemId" placeholder="物料"/>
|
||||
</a-form-item>
|
||||
<a-form-item class="smart-query-form-item">
|
||||
<a-button type="primary" @click="onSearch">
|
||||
<a-button type="primary" @click="onSearch" class="smart-margin-left10">
|
||||
<template #icon>
|
||||
<SearchOutlined />
|
||||
<SearchOutlined/>
|
||||
</template>
|
||||
查询
|
||||
</a-button>
|
||||
<a-button @click="resetQuery" class="smart-margin-left10">
|
||||
<template #icon>
|
||||
<ReloadOutlined />
|
||||
<ReloadOutlined/>
|
||||
</template>
|
||||
重置
|
||||
</a-button>
|
||||
|
|
@ -36,19 +36,20 @@
|
|||
<div class="smart-table-operate-block">
|
||||
<a-button @click="showForm" type="primary" size="small">
|
||||
<template #icon>
|
||||
<PlusOutlined />
|
||||
<PlusOutlined/>
|
||||
</template>
|
||||
新建
|
||||
</a-button>
|
||||
<a-button @click="confirmBatchDelete" type="primary" danger size="small" :disabled="selectedRowKeyList.length == 0">
|
||||
<a-button @click="confirmBatchDelete" type="primary" danger size="small"
|
||||
:disabled="selectedRowKeyList.length == 0">
|
||||
<template #icon>
|
||||
<DeleteOutlined />
|
||||
<DeleteOutlined/>
|
||||
</template>
|
||||
批量删除
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="smart-table-setting-block">
|
||||
<TableOperator v-model="columns" :tableId="null" :refresh="queryData" />
|
||||
<TableOperator v-model="columns" :tableId="TABLE_ID_CONST.BUSINESS.RECEIVE.ASN_DETAIL" :refresh="queryData"/>
|
||||
</div>
|
||||
</a-row>
|
||||
<!---------- 表格操作行 end ----------->
|
||||
|
|
@ -110,18 +111,19 @@
|
|||
</a-card>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, onMounted } from 'vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { SmartLoading } from '/@/components/framework/smart-loading';
|
||||
import { asnDetailApi } from '/@/api/business/receive/asnDetail/asn-detail-api';
|
||||
import { PAGE_SIZE_OPTIONS } from '/@/constants/common-const';
|
||||
import { smartSentry } from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import AsnDetailForm from '/@/views/business/receive/asnDetail/asn-detail-form.vue';
|
||||
import {reactive, ref, onMounted} from 'vue';
|
||||
import {message, Modal} from 'ant-design-vue';
|
||||
import {SmartLoading} from '/@/components/framework/smart-loading';
|
||||
import {asnDetailApi} from '/@/api/business/receive/asnDetail/asn-detail-api';
|
||||
import {PAGE_SIZE_OPTIONS} from '/@/constants/common-const';
|
||||
import {smartSentry} from '/@/lib/smart-sentry';
|
||||
import TableOperator from '/@/components/support/table-operator/index.vue';
|
||||
import AsnDetailForm from '/@/views/business/receive/asnDetail/asn-detail-form.vue';
|
||||
import {TABLE_ID_CONST} from "/@/constants/support/table-id-const";
|
||||
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
// ---------------------------- 表格列 ----------------------------
|
||||
|
||||
const columns = ref([
|
||||
const columns = ref([
|
||||
{
|
||||
title: '入库明细id',
|
||||
dataIndex: 'asnDetailId',
|
||||
|
|
@ -153,40 +155,40 @@
|
|||
fixed: 'right',
|
||||
width: 90,
|
||||
},
|
||||
]);
|
||||
]);
|
||||
|
||||
// ---------------------------- 查询数据表单和方法 ----------------------------
|
||||
// ---------------------------- 查询数据表单和方法 ----------------------------
|
||||
|
||||
const queryFormState = {
|
||||
const queryFormState = {
|
||||
itemId: undefined, //物料
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
// 查询表单form
|
||||
const queryForm = reactive({ ...queryFormState });
|
||||
// 表格加载loading
|
||||
const tableLoading = ref(false);
|
||||
// 表格数据
|
||||
const tableData = ref([]);
|
||||
// 总数
|
||||
const total = ref(0);
|
||||
};
|
||||
// 查询表单form
|
||||
const queryForm = reactive({...queryFormState});
|
||||
// 表格加载loading
|
||||
const tableLoading = ref(false);
|
||||
// 表格数据
|
||||
const tableData = ref([]);
|
||||
// 总数
|
||||
const total = ref(0);
|
||||
|
||||
// 重置查询条件
|
||||
function resetQuery() {
|
||||
// 重置查询条件
|
||||
function resetQuery() {
|
||||
let pageSize = queryForm.pageSize;
|
||||
Object.assign(queryForm, queryFormState);
|
||||
queryForm.pageSize = pageSize;
|
||||
queryData();
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function onSearch(){
|
||||
// 搜索
|
||||
function onSearch() {
|
||||
queryForm.pageNum = 1;
|
||||
queryData();
|
||||
}
|
||||
}
|
||||
|
||||
// 查询数据
|
||||
async function queryData() {
|
||||
// 查询数据
|
||||
async function queryData() {
|
||||
tableLoading.value = true;
|
||||
try {
|
||||
let queryResult = await asnDetailApi.queryPage(queryForm);
|
||||
|
|
@ -197,21 +199,21 @@
|
|||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
onMounted(queryData);
|
||||
onMounted(queryData);
|
||||
|
||||
// ---------------------------- 添加/修改 ----------------------------
|
||||
const formRef = ref();
|
||||
// ---------------------------- 添加/修改 ----------------------------
|
||||
const formRef = ref();
|
||||
|
||||
function showForm(data) {
|
||||
function showForm(data) {
|
||||
formRef.value.show(data);
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------- 单个删除 ----------------------------
|
||||
//确认删除
|
||||
function onDelete(data){
|
||||
// ---------------------------- 单个删除 ----------------------------
|
||||
//确认删除
|
||||
function onDelete(data) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要删除选吗?',
|
||||
|
|
@ -221,12 +223,13 @@
|
|||
requestDelete(data);
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {},
|
||||
onCancel() {
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//请求删除
|
||||
async function requestDelete(data){
|
||||
//请求删除
|
||||
async function requestDelete(data) {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
let deleteForm = {
|
||||
|
|
@ -234,25 +237,25 @@
|
|||
};
|
||||
await asnDetailApi.delete(data.asnDetailId);
|
||||
message.success('删除成功');
|
||||
queryData();
|
||||
await queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------- 批量删除 ----------------------------
|
||||
// ---------------------------- 批量删除 ----------------------------
|
||||
|
||||
// 选择表格行
|
||||
const selectedRowKeyList = ref([]);
|
||||
// 选择表格行
|
||||
const selectedRowKeyList = ref([]);
|
||||
|
||||
function onSelectChange(selectedRowKeys) {
|
||||
function onSelectChange(selectedRowKeys) {
|
||||
selectedRowKeyList.value = selectedRowKeys;
|
||||
}
|
||||
}
|
||||
|
||||
// 批量删除
|
||||
function confirmBatchDelete() {
|
||||
// 批量删除
|
||||
function confirmBatchDelete() {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要批量删除这些数据吗?',
|
||||
|
|
@ -262,21 +265,22 @@
|
|||
requestBatchDelete();
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {},
|
||||
onCancel() {
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//请求批量删除
|
||||
async function requestBatchDelete() {
|
||||
//请求批量删除
|
||||
async function requestBatchDelete() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
await asnDetailApi.batchDelete(selectedRowKeyList.value);
|
||||
message.success('删除成功');
|
||||
queryData();
|
||||
await queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,333 @@
|
|||
<!--
|
||||
* 入库明细
|
||||
*
|
||||
* @Author: 1024创新实验室-主任:卓大
|
||||
* @Date: 2022-08-15 20:15:49
|
||||
* @Wechat: zhuda1024
|
||||
* @Email: lab1024@163.com
|
||||
* @Copyright 1024创新实验室 ( https://1024lab.net ),Since 2012
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<div class="header">
|
||||
<div>
|
||||
关键字:
|
||||
<a-input style="width: 250px" v-model:value="queryForm.keyword" placeholder="姓名/手机号/登录账号"/>
|
||||
<a-button class="button-style" type="primary" @click="onSearch">搜索</a-button>
|
||||
<a-button class="button-style" type="default" @click="resetQuery">重置</a-button>
|
||||
</div>
|
||||
|
||||
<div class="smart-table-setting-block">
|
||||
<a-button class="button-style" type="primary" v-privilege="'receive:batchReturn'" @click="confirmBatchReceive"
|
||||
:disabled="props.asnId==0 || selectedRowKeyList.length == 0">
|
||||
<template #icon>
|
||||
<EditOutlined/>
|
||||
</template>
|
||||
批量退货
|
||||
</a-button>
|
||||
|
||||
<TableOperator v-model="columns" :tableId="TABLE_ID_CONST.BUSINESS.RECEIVE.ASN_TASK" :refresh="queryData"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<a-table
|
||||
:loading="tableLoading"
|
||||
:dataSource="tableData"
|
||||
:columns="columns"
|
||||
:pagination="false"
|
||||
rowKey="asnDetailId"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeyList, onChange: onSelectChange }"
|
||||
size="small"
|
||||
bordered
|
||||
>
|
||||
<template #bodyCell="{ text, record, index, column }">
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<div class="smart-table-operate">
|
||||
<a-button @click="showForm(record)" type="link" :disabled="record.orderQuantity-record.receivedQuantity==0"
|
||||
v-privilege="'asnDetail:update'">
|
||||
<template #icon>
|
||||
<EditOutlined/>
|
||||
</template>
|
||||
编辑
|
||||
</a-button>
|
||||
<a-button @click="onDelete(record)" danger type="link"
|
||||
:disabled="record.orderQuantity-record.receivedQuantity==0" v-privilege="'asnDetail:delete'">
|
||||
<template #icon>
|
||||
<DeleteOutlined/>
|
||||
</template>
|
||||
删除
|
||||
</a-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="smart-query-table-page">
|
||||
<a-pagination
|
||||
showSizeChanger
|
||||
showQuickJumper
|
||||
show-less-items
|
||||
:pageSizeOptions="PAGE_SIZE_OPTIONS"
|
||||
:defaultPageSize="queryForm.pageSize"
|
||||
v-model:current="queryForm.pageNum"
|
||||
v-model:pageSize="queryForm.pageSize"
|
||||
:total="total"
|
||||
@change="queryData"
|
||||
@showSizeChange="queryData"
|
||||
:show-total="(total:number) => `共${total}条`"
|
||||
/>
|
||||
</div>
|
||||
<!--新建/编辑-->
|
||||
<AsnDetailForm ref="formRef" @reloadList="queryData"/>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import _ from 'lodash';
|
||||
import {reactive, ref, watch} from 'vue';
|
||||
import {PAGE_SIZE, PAGE_SIZE_OPTIONS} from '/@/constants/common-const';
|
||||
import {smartSentry} from '/@/lib/smart-sentry';
|
||||
import {TABLE_ID_CONST} from "/@/constants/support/table-id-const";
|
||||
import TableOperator from "/@/components/support/table-operator/index.vue";
|
||||
import {asnDetailApi} from "/@/api/business/receive/asnDetail/asn-detail-api";
|
||||
import {taskApi} from "/@/api/business/task/task-api";
|
||||
import {receiveApi} from "/@/api/business/receive/receive-api";
|
||||
import AsnDetailForm from "/@/views/business/receive/asnDetail/asn-detail-form.vue";
|
||||
import {message, Modal} from "ant-design-vue";
|
||||
import {SmartLoading} from '/@/components/framework/smart-loading';
|
||||
|
||||
const props = defineProps({
|
||||
asnId: {
|
||||
type: Number,
|
||||
default: 0,
|
||||
},
|
||||
});
|
||||
const columns = reactive([
|
||||
{
|
||||
title: '任务ID',
|
||||
dataIndex: 'taskId',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '物料编码',
|
||||
dataIndex: 'itemCode',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '物料名称',
|
||||
dataIndex: 'itemName',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '原库位',
|
||||
dataIndex: 'srcLocationCode',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '目标库位',
|
||||
dataIndex: 'dstLocationCode',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '收货数量',
|
||||
dataIndex: 'moveQty',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
width: 140,
|
||||
},
|
||||
]);
|
||||
|
||||
// --------------------------- 查询 ---------------------------
|
||||
const defaultQueryForm = {
|
||||
pageNum: 1,
|
||||
pageSize: PAGE_SIZE,
|
||||
asnId: 0,
|
||||
keyword: undefined,
|
||||
}
|
||||
|
||||
// 查询表单
|
||||
const queryForm = reactive({...defaultQueryForm});
|
||||
// 表格加载loading
|
||||
const tableLoading = ref(false);
|
||||
// 表格数据
|
||||
const tableData = ref([]);
|
||||
// 总数
|
||||
const total = ref(0);
|
||||
|
||||
|
||||
// 重置查询条件
|
||||
function resetQuery() {
|
||||
let pageSize = queryForm.pageSize;
|
||||
Object.assign(queryForm, defaultQueryForm);
|
||||
queryForm.pageSize = pageSize;
|
||||
queryData();
|
||||
}
|
||||
|
||||
// 搜索
|
||||
function onSearch() {
|
||||
queryForm.pageNum = 1;
|
||||
queryData();
|
||||
}
|
||||
|
||||
//查询数据
|
||||
async function queryData() {
|
||||
tableLoading.value = true;
|
||||
try {
|
||||
queryForm.asnId = props.asnId;
|
||||
let queryResult = await taskApi.queryPage(queryForm);
|
||||
tableData.value = queryResult.data.list;
|
||||
total.value = queryResult.data.total;
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
tableLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 选择表格行
|
||||
const selectedRowKeyList = ref([]);
|
||||
|
||||
function onSelectChange(selectedRowKeys: any) {
|
||||
selectedRowKeyList.value = selectedRowKeys;
|
||||
}
|
||||
|
||||
//新建/编辑
|
||||
const formRef = ref();
|
||||
|
||||
function showForm(data: object) {
|
||||
formRef.value.show(data, props.asnId);
|
||||
}
|
||||
|
||||
//确认是否删除?
|
||||
function onDelete(data: object) {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要删除选吗?',
|
||||
okText: '删除',
|
||||
okType: 'danger',
|
||||
onOk() {
|
||||
requestDelete(data);
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//请求删除
|
||||
async function requestDelete(data: any) {
|
||||
SmartLoading.show();
|
||||
try {
|
||||
const response = await asnDetailApi.delete(data.asnDetailId);
|
||||
const {error, success} = JSON.parse(response.msg);
|
||||
if (error) {
|
||||
message.error(error);
|
||||
}
|
||||
if (success) {
|
||||
message.success(success);
|
||||
}
|
||||
await queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
//批量删除
|
||||
function confirmBatchDelete() {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定要批量删除这些数据吗?',
|
||||
okText: '删除',
|
||||
okType: 'danger',
|
||||
onOk() {
|
||||
requestBatchDelete();
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//请求批量删除
|
||||
async function requestBatchDelete() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
const response = await asnDetailApi.batchDelete(selectedRowKeyList.value);
|
||||
const {error, success} = JSON.parse(response.msg);
|
||||
if (error) {
|
||||
message.error(error);
|
||||
}
|
||||
if (success) {
|
||||
message.success(success);
|
||||
}
|
||||
await queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
//批量收货 confirmBatchReceive
|
||||
function confirmBatchReceive() {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: '确定是否批量收货?',
|
||||
okText: '确认',
|
||||
okType: 'danger',
|
||||
onOk() {
|
||||
requestBatchReceive();
|
||||
},
|
||||
cancelText: '取消',
|
||||
onCancel() {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
//请求批量收货
|
||||
async function requestBatchReceive() {
|
||||
try {
|
||||
SmartLoading.show();
|
||||
const response = await receiveApi.batchReceive(selectedRowKeyList.value);
|
||||
const {error, success} = JSON.parse(response.msg);
|
||||
if (error) {
|
||||
message.error(error);
|
||||
}
|
||||
if (success) {
|
||||
message.success(success);
|
||||
}
|
||||
await queryData();
|
||||
} catch (e) {
|
||||
smartSentry.captureError(e);
|
||||
} finally {
|
||||
SmartLoading.hide();
|
||||
}
|
||||
}
|
||||
|
||||
watch(
|
||||
() => props.asnId,
|
||||
(e) => {
|
||||
if (e) {
|
||||
queryData();
|
||||
}
|
||||
},
|
||||
{immediate: true}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.button-style {
|
||||
margin-left: 10px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue