From d7bdcc480ccbfc1ed4f5aa5142526fa2ea9f6892 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com>
Date: Tue, 17 Mar 2026 16:38:09 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E8=AE=A1=E9=87=8F=E5=AE=A2=E6=88=B7?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../dayPlan/LngMeasureSales/components/config.ts | 4 ++--
.../LngMeasureSales/components/createFormModal.vue | 2 +-
src/views/dayPlan/LngMeasureSales/index.vue | 14 ++++++++++++--
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/views/dayPlan/LngMeasureSales/components/config.ts b/src/views/dayPlan/LngMeasureSales/components/config.ts
index 8d5b763..01ef5f0 100644
--- a/src/views/dayPlan/LngMeasureSales/components/config.ts
+++ b/src/views/dayPlan/LngMeasureSales/components/config.ts
@@ -102,7 +102,7 @@ export const columns: BasicColumn[] = [
title: '进厂皮重时间',
componentType: 'input',
align: 'left',
-
+ width: 200,
sorter: true,
},
@@ -111,7 +111,7 @@ export const columns: BasicColumn[] = [
title: '出厂毛重时间',
componentType: 'input',
align: 'left',
-
+ width: 200,
sorter: true,
},
diff --git a/src/views/dayPlan/LngMeasureSales/components/createFormModal.vue b/src/views/dayPlan/LngMeasureSales/components/createFormModal.vue
index 8364dcd..2dda3c5 100644
--- a/src/views/dayPlan/LngMeasureSales/components/createFormModal.vue
+++ b/src/views/dayPlan/LngMeasureSales/components/createFormModal.vue
@@ -146,7 +146,7 @@
width: 120,
},
{
- dataIndex: 'suName',
+ dataIndex: 'suSname',
title: '供应商',
componentType: 'input',
align: 'left',
diff --git a/src/views/dayPlan/LngMeasureSales/index.vue b/src/views/dayPlan/LngMeasureSales/index.vue
index 5c637e9..00ceebc 100644
--- a/src/views/dayPlan/LngMeasureSales/index.vue
+++ b/src/views/dayPlan/LngMeasureSales/index.vue
@@ -14,7 +14,7 @@
-
+
@@ -82,6 +82,8 @@
import { DeleteOutlined } from '@ant-design/icons-vue';
import { getCompDept } from '/@/api/approve/Appro';
import { useUserStore } from '/@/store/modules/user';
+ import Upload from '/@/components/Form/src/components/Upload.vue';
+ import dayjs from 'dayjs';
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
const curCuCode = ref('')
@@ -277,6 +279,10 @@
} else {
selectedRowsData.value= [{...val}]
}
+ selectedRowsData.value.forEach(v=> {
+ v.timeOut = v.timeOut ? dayjs(v.timeOut).format('YYYY-MM-DD HH:mm:ss') : null
+ v.timeIn = v.timeIn ? dayjs(v.timeIn).format('YYYY-MM-DD HH:mm:ss') : null
+ })
await addLngLngMeasure(selectedRowsData.value)
handleSuccess();
notification.success({
@@ -434,7 +440,11 @@
.hide{
display: none !important;
}
-
+ .delIcon {
+ margin-left: 10px;
+ cursor: pointer;
+ margin-bottom: 5px;
+ }
:deep( .ant-col-8:nth-child(1)) {
width: 320px !important;
max-width: 320px !important;
From 747db05c6f3b6c7989546ecf3d90558b957f8b69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com>
Date: Tue, 17 Mar 2026 17:31:26 +0800
Subject: [PATCH 2/4] =?UTF-8?q?lng=E8=AE=A1=E9=87=8F=E4=B8=9A=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/dayPlan/LngMeasurePur/index.ts | 41 +-
src/components/common/rejectReplyModal.vue | 4 +-
.../LngMeasurePur/components/config.ts | 38 +-
src/views/dayPlan/LngMeasurePur/index.vue | 31 +-
.../LngMeasureSales/components/config.ts | 32 +-
src/views/dayPlan/LngMeasureSales/index.vue | 2 +-
src/views/dayPlan/PngAppro/indexJsz.vue | 467 ------------------
src/views/dayPlan/PngApproGd/index.vue | 5 +-
src/views/dayPlan/PngApproJsz/index.vue | 5 +-
src/views/dayPlan/PngMeasurePur/index.vue | 5 +-
10 files changed, 108 insertions(+), 522 deletions(-)
delete mode 100644 src/views/dayPlan/PngAppro/indexJsz.vue
diff --git a/src/api/dayPlan/LngMeasurePur/index.ts b/src/api/dayPlan/LngMeasurePur/index.ts
index 3e64e23..f9abccf 100644
--- a/src/api/dayPlan/LngMeasurePur/index.ts
+++ b/src/api/dayPlan/LngMeasurePur/index.ts
@@ -3,17 +3,52 @@ import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios';
enum Api {
- Page = '/dayPlan/lngMeasurePur/page',
+ // Page = '/dayPlan/lngMeasurePur/page',
+ Page = '/magic-api/dayPlan/lngMeasurePurPageList',
List = '/dayPlan/lngMeasurePur/list',
Info = '/dayPlan/lngMeasurePur/info',
LngLngMeasure = '/dayPlan/lngMeasurePur',
-
+ submit = '/dayPlan/lngMeasurePur/submit',
+ Cancel = '/dayPlan/lngMeasurePur/cancel',
+ Reject = '/dayPlan/lngMeasurePur/reject',
DataLog = '/dayPlan/lngMeasurePur/datalog',
}
-
+export async function rejectlLngLngMeasurePur(lngLngMeasure: Recordable, mode: ErrorMessageMode = 'modal') {
+ return defHttp.post(
+ {
+ url: Api.Reject,
+ params: lngLngMeasure,
+ },
+ {
+ errorMessageMode: mode,
+ },
+ );
+}
+export async function submitLngLngMeasurePur(lngLngMeasure: Recordable, mode: ErrorMessageMode = 'modal') {
+ return defHttp.post(
+ {
+ url: Api.submit,
+ params: lngLngMeasure,
+ },
+ {
+ errorMessageMode: mode,
+ },
+ );
+}
+export async function cancelLngLngMeasurePur(lngLngMeasure: Recordable, mode: ErrorMessageMode = 'modal') {
+ return defHttp.post(
+ {
+ url: Api.Cancel,
+ params: lngLngMeasure,
+ },
+ {
+ errorMessageMode: mode,
+ },
+ );
+}
/**
* @description: 查询LngLngMeasure分页列表
*/
diff --git a/src/components/common/rejectReplyModal.vue b/src/components/common/rejectReplyModal.vue
index cb25c2f..b5b9451 100644
--- a/src/components/common/rejectReplyModal.vue
+++ b/src/components/common/rejectReplyModal.vue
@@ -47,6 +47,7 @@ const props = defineProps({
() => props.visible,
(val) => {
isOpen.value = val
+ formRef.value && formRef.value.resetFields();
},
{
immediate: true,
@@ -56,12 +57,13 @@ const props = defineProps({
const handleCancel = () => {
formRef.value.resetFields();
isOpen.value = false
+ emit('cancel');
}
const handleSubmit = async () => {
try {
await formRef.value.validate();
emit('success', formState);
- formRef.value.resetFields();
+ // formRef.value.resetFields();
} catch (error) {
console.log('验证失败:', error);
}
diff --git a/src/views/dayPlan/LngMeasurePur/components/config.ts b/src/views/dayPlan/LngMeasurePur/components/config.ts
index f80098e..1e4c8a4 100644
--- a/src/views/dayPlan/LngMeasurePur/components/config.ts
+++ b/src/views/dayPlan/LngMeasurePur/components/config.ts
@@ -63,7 +63,7 @@ export const columns: BasicColumn[] = [
title: '计划日期',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -72,7 +72,7 @@ export const columns: BasicColumn[] = [
title: '客户简称',
componentType: 'input',
align: 'left',
-
+ width: 150,
sorter: true,
},
@@ -81,7 +81,7 @@ export const columns: BasicColumn[] = [
title: '气源地',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -90,7 +90,7 @@ export const columns: BasicColumn[] = [
title: '车头号',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -99,7 +99,7 @@ export const columns: BasicColumn[] = [
title: '挂车号',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -108,7 +108,7 @@ export const columns: BasicColumn[] = [
title: '装车量(吨)',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -117,7 +117,7 @@ export const columns: BasicColumn[] = [
title: '装车量(吉焦)',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -126,7 +126,7 @@ export const columns: BasicColumn[] = [
title: '装车量(方)',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -135,7 +135,7 @@ export const columns: BasicColumn[] = [
title: '进厂皮重时间',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
@@ -144,7 +144,7 @@ export const columns: BasicColumn[] = [
title: '出厂毛重时间',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
@@ -153,7 +153,7 @@ export const columns: BasicColumn[] = [
title: '客户确认人',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -162,7 +162,7 @@ export const columns: BasicColumn[] = [
title: '客户确认时间',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
@@ -171,7 +171,7 @@ export const columns: BasicColumn[] = [
title: '内部确认人',
componentType: 'input',
align: 'left',
-
+ width: 120,
sorter: true,
},
@@ -180,7 +180,7 @@ export const columns: BasicColumn[] = [
title: '内部确认时间',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
@@ -189,7 +189,7 @@ export const columns: BasicColumn[] = [
title: '销售合同',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
@@ -198,7 +198,7 @@ export const columns: BasicColumn[] = [
title: '供应商',
componentType: 'input',
align: 'left',
-
+ width: 180,
sorter: true,
},
@@ -207,7 +207,7 @@ export const columns: BasicColumn[] = [
title: '附件',
componentType: 'input',
align: 'left',
-
+ width: 200,
sorter: true,
},
@@ -216,7 +216,7 @@ export const columns: BasicColumn[] = [
title: '状态',
componentType: 'input',
align: 'left',
-
+ width: 100,
sorter: true,
},
@@ -225,7 +225,7 @@ export const columns: BasicColumn[] = [
title: '驳回意见',
componentType: 'input',
align: 'left',
-
+ width: 130,
sorter: true,
},
];
diff --git a/src/views/dayPlan/LngMeasurePur/index.vue b/src/views/dayPlan/LngMeasurePur/index.vue
index 3824015..04c476d 100644
--- a/src/views/dayPlan/LngMeasurePur/index.vue
+++ b/src/views/dayPlan/LngMeasurePur/index.vue
@@ -27,7 +27,7 @@
-
+
-
\ No newline at end of file
diff --git a/src/views/dayPlan/PngApproGd/index.vue b/src/views/dayPlan/PngApproGd/index.vue
index e396964..6fe8395 100644
--- a/src/views/dayPlan/PngApproGd/index.vue
+++ b/src/views/dayPlan/PngApproGd/index.vue
@@ -34,7 +34,7 @@
-
+
+
diff --git a/src/views/dayPlan/LngDemand/components/basicForm.vue b/src/views/dayPlan/LngDemand/components/basicForm.vue
index abfa7b9..69ea28d 100644
--- a/src/views/dayPlan/LngDemand/components/basicForm.vue
+++ b/src/views/dayPlan/LngDemand/components/basicForm.vue
@@ -23,12 +23,12 @@
-
+
-
+
@@ -38,37 +38,37 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -112,7 +112,13 @@
{{ formState.verNo }}
- {{ formState.approName }}
+
+
+
+ {{ item.name }}
+
+
+
@@ -129,7 +135,8 @@
-
+
+
@@ -183,21 +217,5 @@
.pdcss {
padding:0px 12px 6px 12px !important;
}
- .dot {
- margin-right: 10px;
- display: flex;
- align-items: center;
- i{
- padding: 5px;
- font-style: normal;
- }
- span{
- width: 10px !important;
- height: 10px !important;
- border-radius: 50%;
- background: red;
- display: block;
- }
- }
diff --git a/src/views/dayPlan/LngDemand/index.vue b/src/views/dayPlan/LngDemand/index.vue
index 1bd8065..0888701 100644
--- a/src/views/dayPlan/LngDemand/index.vue
+++ b/src/views/dayPlan/LngDemand/index.vue
@@ -31,14 +31,12 @@
const logId = ref('')
const logPath = ref('/dayPlan/lngDemand/datalog');
import { DataLog } from '/@/components/pcitc';
- import { ref, computed, onMounted, onUnmounted, createVNode,
-
-} from 'vue';
+ import { ref, computed, onMounted, onUnmounted, createVNode, } from 'vue';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
- import { getLngLngDemandPage, deleteLngLngDemand, exportLngLngDemand} from '/@/api/dayPlan/LngDemand';
+ import { getLngLngDemandPage, deleteLngLngDemand, exportLngLngDemand,cancelLngDemand,withdrawLngDemand,submitLngDemand} from '/@/api/dayPlan/LngDemand';
import { PageWrapper } from '/@/components/Page';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
@@ -88,13 +86,13 @@
{"isUse":true,"name":"发起审批","code":"startwork","icon":"ant-design:form-outlined","isDefault":true},
{"isUse":true,"name":"查看流转记录","code":"flowRecord","icon":"ant-design:form-outlined","isDefault":true},
{"isUse":true,"name":"提交","code":"submit","icon":"ant-design:send-outlined","isDefault":true},
- {"isUse":true,"name":"变更","code":"update","icon":"ant-design:edit-filled","isDefault":true},
+ {"isUse":true,"name":"变更","code":"toChange","icon":"ant-design:edit-filled","isDefault":true},
{"isUse":true,"name":"取消","code":"cancel","icon":"ant-design:close-outlined","isDefault":true},
{"isUse":true,"name":"对比","code":"compare","icon":"ant-design:file-done-outlined","isDefault":false},
- {"isUse":true,"name":"撤回","code":"back","icon":"ant-design:rollback-outlined","isDefault":false},
+ {"isUse":true,"name":"撤回","code":"withdraw","icon":"ant-design:rollback-outlined","isDefault":false},
{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
//展示在列表内的按钮
- const actionButtons = ref(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','compare','update','back','cancel']);
+ const actionButtons = ref(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','compare','toChange','withdraw','cancel', 'submit']);
const buttonConfigs = computed(()=>{
return filterButtonAuth(buttons.value);
})
@@ -103,7 +101,7 @@
let arr =[{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},
{"isUse":true,"name":"提交","code":"submit","icon":"ant-design:send-outlined","isDefault":true},
- {"isUse":true,"name":"撤回","code":"back","icon":"ant-design:rollback-outlined","isDefault":false},
+ {"isUse":true,"name":"撤回","code":"withdraw","icon":"ant-design:rollback-outlined","isDefault":false},
{"isUse":true,"name":"导入","code":"import","icon":"ant-design:import-outlined","isDefault":true},
{"isUse":true,"name":"导出模板","code":"export","icon":"ant-design:export-outlined","isDefault":true},
{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},]
@@ -115,7 +113,7 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
});
- const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,datalog : handleDatalog,import : handleImport,export : handleExport,startwork : handleStartwork,flowRecord : handleFlowRecord,submit : handleSubmit,update : handleUpdate,delete : handleDelete,}
+ const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,datalog : handleDatalog,import : handleImport,compare:handleCompare,export : handleExport,startwork : handleStartwork,flowRecord : handleFlowRecord,submit : handleSubmit,toChange : handleUpdate,delete : handleDelete,cancel:handleCancel,withdraw:handleBack}
const { currentRoute } = useRouter();
const router = useRouter();
@@ -140,7 +138,7 @@
const [registerImportModal, { openModal: openImportModal }] = useModal();
const formName=currentRoute.value.meta?.title;
- const [registerTable, { reload, }] = useTable({
+ const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
title: '' || (formName + '列表'),
api: getLngLngDemandPage,
rowKey: 'id',
@@ -165,7 +163,7 @@
striped: false,
actionColumn: {
- width: 160,
+ width: 190,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },
@@ -184,44 +182,21 @@
selectedKeys.value = rowKeys;
}
function dbClickRow(record) {
- if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
- return;
- }
- const { processId, taskIds, schemaId } = record.workflowData || {};
- if (taskIds && taskIds.length) {
- router.push({
- path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
- query: {
- taskId: taskIds[0],
- formName: formName,
- formId:currentRoute.value.meta.formId
- }
- });
- } else if (schemaId && !taskIds && processId) {
- router.push({
- path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
- query: {
- readonly: 1,
- taskId: '',
- formName: formName,
- formId:currentRoute.value.meta.formId
- }
- });
- } else {
- router.push({
- path: '/form/LngDemand/' + record.id + '/viewForm',
- query: {
+ router.push({
+ path: '/dayPlan/LngDemand/createForm',
+ query: {
formPath: 'dayPlan/LngDemand',
- formName: formName,
- formId:currentRoute.value.meta.formId
- }
- });
- }
+ formName: '查看'+formName,
+ formId:currentRoute.value.meta.formId,
+ id: record.id,
+ type: 'view'
+ }
+ });
}
function buttonClick(code) {
- btnEvent[code]();
+ btnEvent[code]('batch');
}
function handleDatalog (record: Recordable) {
modalVisible.value = true
@@ -248,27 +223,79 @@
function handleEdit(record: Recordable) {
router.push({
- path: '/form/LngDemand/' + record.id + '/updateForm',
+ path: '/dayPlan/LngDemand/createForm',
query: {
formPath: 'dayPlan/LngDemand',
- formName: formName,
- formId:currentRoute.value.meta.formId
+ formName: '编辑'+formName,
+ formId:currentRoute.value.meta.formId,
+ id: record.id,
+ type: 'edit'
+ }
+ });
+ }
+ function handleCompare(record: Recordable) {
+ router.push({
+ path: '/dayPlan/LngDemand/createForm',
+ query: {
+ formPath: 'dayPlan/LngDemand',
+ formName: "对比"+formName,
+ formId:currentRoute.value.meta.formId,
+ id: record.orgId,
+ type: 'compare'
}
});
}
async function handleCancel(record: Recordable) {
- await cancelLngPng(record.id)
+ await cancelLngDemand(record.id)
handleSuccess();
notification.success({
message: '提示',
description: t('已取消!'),
});
}
- function handleSubmit () {
-
+ async function handleBack(record: Recordable) {
+ if (record == 'batch'&&!selectedKeys.value.length) {
+ notification.warning({
+ message: '提示',
+ description: t('请选择需要撤回的数据'),
+ });
+ return;
+ }
+ let arr = record == 'batch' ? selectedKeys.value : [record.id]
+ await withdrawLngDemand(arr)
+ handleSuccess();
+ notification.success({
+ message: '提示',
+ description: t('已撤回!'),
+ });
}
- function handleUpdate () {
-
+ async function handleSubmit (record: Recordable) {
+ if (record == 'batch'&&!selectedKeys.value.length) {
+ notification.warning({
+ message: '提示',
+ description: t('请选择需要提交的数据'),
+ });
+ return;
+ }
+ let arr = record == 'batch' ? selectedKeys.value : [record.id]
+ await submitLngDemand(arr)
+ handleSuccess();
+ notification.success({
+ message: '提示',
+ description: t('已提交!'),
+ });
+ }
+ function handleUpdate (record: Recordable) {
+ router.push({
+ path: '/dayPlan/LngDemand/createForm',
+ query: {
+ formPath: 'dayPlan/LngDemand',
+ formName: formName,
+ formId:currentRoute.value.meta.formId,
+ id: record.id,
+ type: 'update'
+ }
+ });
}
function handleDelete(record: Recordable) {
deleteList([record.id]);
@@ -296,7 +323,7 @@
reload();
}
function handleSuccess() {
-
+ clearSelectedRowKeys()
reload();
}
@@ -347,39 +374,80 @@
function getActions(record: Recordable):ActionItem[] {
let actionsList: ActionItem[] = [];
- let editAndDelBtn: ActionItem[] = [];
- let hasFlowRecord = false;
+ let editBtn: ActionItem[] = [];
+ let delBtn: ActionItem[] = [];
+ let updateBtn: ActionItem[] = [];
+ let backBtn: ActionItem[] = [];
+ let hasFlowRecord = false;
+ let viewBtn: ActionItem[]=[]
actionButtonConfig.value?.map((button) => {
- if (['view', 'copyData'].includes(button.code)) {
- actionsList.push({
+ if (['view', 'copyData','compare', 'datalog'].includes(button.code)) {
+ viewBtn.push({
icon: button?.icon,
tooltip: button?.name,
onClick: btnEvent[button.code].bind(null, record),
});
}
- if (['edit', 'delete'].includes(button.code)) {
- editAndDelBtn.push({
+ if (['edit'].includes(button.code)) {
+ editBtn.push({
icon: button?.icon,
tooltip: button?.name,
color: button.code === 'delete' ? 'error' : undefined,
onClick: btnEvent[button.code].bind(null, record),
});
}
+ if (['delete','submit'].includes(button.code)) {
+ delBtn.push({
+ icon: button?.icon,
+ tooltip: button?.name,
+ color: button.code === 'delete' ? 'error' : undefined,
+ onClick: btnEvent[button.code].bind(null, record),
+ });
+ }
+
+ if (['toChange', 'cancel'].includes(button.code)) {
+ updateBtn.push({
+ icon: button?.icon,
+ tooltip: button?.name,
+ onClick: btnEvent[button.code].bind(null, record),
+ });
+ }
+ if (['withdraw'].includes(button.code)) {
+ backBtn.push({
+ icon: button?.icon,
+ tooltip: button?.name,
+ onClick: btnEvent[button.code].bind(null, record),
+ });
+ }
if (button.code === 'flowRecord') hasFlowRecord = true;
});
- if (record.workflowData?.enabled) {
- //与工作流有关联的表单
- if (record.workflowData.status) {
- actionsList.unshift(setIndexFlowStatus(record.workflowData))
- } else {
- actionsList = actionsList.concat(editAndDelBtn);
+ if (record.approCode == 'YSP' && record.alterSign!='D') {
+ actionsList = actionsList.concat(updateBtn);
}
- } else {
- if (!record.workflowData?.processId) {
- //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
- actionsList = actionsList.concat(editAndDelBtn);
+ // || record.approCode == 'YBH'
+ if ((record.approCode == 'WTJ'|| record.approCode == 'YBH') && record.alterSign!='D' ) {
+ actionsList = actionsList.concat(editBtn);
}
- }
+ if (record.approCode == 'WTJ'|| record.approCode == 'YBH') {
+ actionsList = actionsList.concat(delBtn);
+ }
+ if (record.approCode == 'SPZ') {
+ actionsList = actionsList.concat(backBtn);
+ }
+ actionsList = actionsList.concat(viewBtn)
+ // if (record.workflowData?.enabled) {
+ // //与工作流有关联的表单
+ // if (record.workflowData.status) {
+ // actionsList.unshift(setIndexFlowStatus(record.workflowData))
+ // } else {
+ // actionsList = actionsList.concat(editAndDelBtn);
+ // }
+ // } else {
+ // if (!record.workflowData?.processId) {
+ // //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
+ // actionsList = actionsList.concat(editAndDelBtn);
+ // }
+ // }
return actionsList;
}
function handleStartwork(record: Recordable) {
diff --git a/src/views/dayPlan/LngMeasureSales/index.vue b/src/views/dayPlan/LngMeasureSales/index.vue
index e0fc33b..b1d2765 100644
--- a/src/views/dayPlan/LngMeasureSales/index.vue
+++ b/src/views/dayPlan/LngMeasureSales/index.vue
@@ -259,13 +259,7 @@
} else {
selectedRowsData.value= [{...val}]
}
- await cancelLngLngMeasure(selectedRowsData.value)
- handleSuccess();
- notification.success({
- message: '提示',
- description: t('取消成功!'),
- });
- clearSelectedRowKeys()
+ fieldCheck('cancel')
}
async function handleSubmit(val) {
if (val=='batch') {
@@ -279,14 +273,7 @@
} else {
selectedRowsData.value= [{...val}]
}
-
- await updateLngLngMeasure(selectedRowsData.value)
- handleSuccess();
- notification.success({
- message: '提示',
- description: t('确认成功!'),
- });
- clearSelectedRowKeys()
+ fieldCheck('submit')
}
async function handleSave(val) {
if (val=='batch') {
@@ -300,18 +287,43 @@
} else {
selectedRowsData.value= [{...val}]
}
- selectedRowsData.value.forEach(v=> {
- v.timeOut = v.timeOut ? dayjs(v.timeOut).format('YYYY-MM-DD HH:mm:ss') : null
- v.timeIn = v.timeIn ? dayjs(v.timeIn).format('YYYY-MM-DD HH:mm:ss') : null
- })
- await addLngLngMeasure(selectedRowsData.value)
+ fieldCheck('save')
+
+ }
+ const fieldCheck = async (type) => {
+ for(let i = 0; i