提交 f13ac2e2 authored 作者: liuluyu's avatar liuluyu

更改错别字

上级 76b88968
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</BasicTable> </BasicTable>
<!-- 表单区域 --> <!-- 表单区域 -->
<BaosongTaskModal @register="registerModal" @success="handleSuccess" /> <BaosongTaskModal @register="registerModal" @success="handleSuccess" />
<BaosongTaskDrawer ref="refTaskDrawer" @callback="handleSuccess"/> <BaosongTaskDrawer ref="refTaskDrawer" @callback="handleSuccess" />
<BaosongTaskImportDataModal @register="registerImportDataModal" @success="handleSuccess" /> <BaosongTaskImportDataModal @register="registerImportDataModal" @success="handleSuccess" />
</div> </div>
...@@ -48,18 +48,16 @@ ...@@ -48,18 +48,16 @@
import BaosongTaskImportDataModal from './components/BaosongTaskImportDataModal.vue'; import BaosongTaskImportDataModal from './components/BaosongTaskImportDataModal.vue';
import { columns, searchFormSchema } from './BaosongTask.data'; import { columns, searchFormSchema } from './BaosongTask.data';
import { list, deleteOne, batchDelete, addApproval,saveOrUpdate,importData } from './BaosongTask.api'; import { list, deleteOne, batchDelete, addApproval, saveOrUpdate, importData } from './BaosongTask.api';
import { useMessage } from "/@/hooks/web/useMessage"; import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const refTaskDrawer = ref(); const refTaskDrawer = ref();
const checkedKeys = ref<Array<string | number>>([]); const checkedKeys = ref<Array<string | number>>([]);
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const [registerImportDataModal, { openModal:openImportDataModal }] = useModal(); const [registerImportDataModal, { openModal: openImportDataModal }] = useModal();
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
...@@ -68,7 +66,7 @@ ...@@ -68,7 +66,7 @@
columns, columns,
canResize: false, canResize: false,
formConfig: { formConfig: {
labelWidth: "30%", labelWidth: '30%',
schemas: searchFormSchema, schemas: searchFormSchema,
autoSubmitOnEnter: true, autoSubmitOnEnter: true,
showAdvancedButton: true, showAdvancedButton: true,
...@@ -82,7 +80,7 @@ ...@@ -82,7 +80,7 @@
}, },
}); });
const [registerTable, { reload }, {rowSelection, selectedRowKeys,selectedRows}] = tableContext; const [registerTable, { reload }, { rowSelection, selectedRowKeys, selectedRows }] = tableContext;
function handleAlloc(record: Recordable) { function handleAlloc(record: Recordable) {
refTaskDrawer.value.setIniData(record); refTaskDrawer.value.setIniData(record);
...@@ -105,26 +103,24 @@ ...@@ -105,26 +103,24 @@
}); });
} }
function handleImportData(record: Recordable) { function handleImportData(record: Recordable) {
if(selectedRows.value?.length==0) { if (selectedRows.value?.length == 0) {
createMessage.warning("请选择记录"); createMessage.warning('请选择记录');
return false return false;
} }
if(selectedRows.value?.length>1) { if (selectedRows.value?.length > 1) {
createMessage.warning("只能选中一条记录"); createMessage.warning('只能选中一条记录');
return false return false;
} }
openImportDataModal(true, { openImportDataModal(true, {
record:selectedRows.value[0], record: selectedRows.value[0],
isUpdate: true, isUpdate: true,
showFooter: true, showFooter: true,
}); });
} }
/** /**
* 详情 * 详情
*/ */
...@@ -153,15 +149,14 @@ ...@@ -153,15 +149,14 @@
async function handleSuccess() { async function handleSuccess() {
(selectedRowKeys.value = []) && reload(); (selectedRowKeys.value = []) && reload();
} }
async function handleSubmitAdd(record){ async function handleSubmitAdd(record) {
let params = {id:record.id,sta:2} let params = { id: record.id, sta: 2 };
await saveOrUpdate(params,true) await saveOrUpdate(params, true);
await handleSuccess() await handleSuccess();
} }
function getTableAction(record) { function getTableAction(record) {
return [ return [
{ {
label: '分配', label: '分配',
...@@ -178,11 +173,11 @@ ...@@ -178,11 +173,11 @@
// }, // },
{ {
label: '提交审批', label: '提交审批',
disabled:!(record.allocNum==record.fillStaNum &&record.sta==2), disabled: !(record.allocNum == record.fillStaNum && record.sta == 2),
popConfirm: { popConfirm: {
title: '您确认要提交哦啊审批吗?', title: '您确认要提交审批吗?',
confirm: handleApproval.bind(null, record) confirm: handleApproval.bind(null, record),
} },
}, },
]; ];
} }
...@@ -210,8 +205,6 @@ ...@@ -210,8 +205,6 @@
function handleApproval(task) { function handleApproval(task) {
addApproval(task, handleSuccess); addApproval(task, handleSuccess);
} }
</script> </script>
<style scoped></style> <style scoped></style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论