Merge branch 'dev' of http://47.94.165.164:13000/geg-gas/geg-gas-web into dev
This commit is contained in:
@ -11,10 +11,117 @@ enum Api {
|
|||||||
ContractList ='/magic-api/dayPlan/queryContractList',
|
ContractList ='/magic-api/dayPlan/queryContractList',
|
||||||
StationList ='/magic-api/dayPlan/queryStationList',
|
StationList ='/magic-api/dayPlan/queryStationList',
|
||||||
Export = '/dayPlan/lngDemand/export',
|
Export = '/dayPlan/lngDemand/export',
|
||||||
|
check ='/magic-api/dayPlan/check',
|
||||||
|
AllPlaceLngUnload = '/magic-api/mdm/queryAllPlaceLngUnload',
|
||||||
|
queryCategory = '/magic-api/mdm/queryCategory',
|
||||||
|
saveAndSubmit = '/dayPlan/lngDemand/saveAndSubmit',
|
||||||
|
toChange = '/dayPlan/lngDemand/toChange',
|
||||||
|
compare = '/dayPlan/lngDemand/compare',
|
||||||
|
withdraw = '/dayPlan/lngDemand/withdraw',
|
||||||
|
submit = '/dayPlan/lngDemand/submit',
|
||||||
|
cancel = '/dayPlan/lngDemand/cancel',
|
||||||
|
|
||||||
DataLog = '/dayPlan/lngDemand/datalog',
|
DataLog = '/dayPlan/lngDemand/datalog',
|
||||||
}
|
}
|
||||||
|
export async function cancelLngDemand(id: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngLngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.cancel,
|
||||||
|
params: { id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function submitLngDemand(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.submit,
|
||||||
|
data: ids,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function withdrawLngDemand(ids: string[], mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.withdraw,
|
||||||
|
data: ids,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getLngDemandCompare(orgId: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngLngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.compare,
|
||||||
|
params: { orgId },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getLngDemanddUpdate(id: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngLngDemandPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.toChange,
|
||||||
|
params: { id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function submitSaveLngDemand(lngLngDemand: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.saveAndSubmit,
|
||||||
|
params: lngLngDemand,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getCategory(params, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngLngDemandPageResult>(
|
||||||
|
{
|
||||||
|
url: Api.queryCategory,
|
||||||
|
params: params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function getAllPlaceLngUnload(params, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngLngDemandPageResult>(
|
||||||
|
{
|
||||||
|
url: Api.AllPlaceLngUnload,
|
||||||
|
params: params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function carCheck(params, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngLngDemandPageResult>(
|
||||||
|
{
|
||||||
|
url: Api.check,
|
||||||
|
params: params,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
export async function getLngLngDemandStationList(params, mode: ErrorMessageMode = 'modal') {
|
export async function getLngLngDemandStationList(params, mode: ErrorMessageMode = 'modal') {
|
||||||
return defHttp.get<LngLngDemandPageResult>(
|
return defHttp.get<LngLngDemandPageResult>(
|
||||||
{
|
{
|
||||||
|
|||||||
@ -3,17 +3,52 @@ import { defHttp } from '/@/utils/http/axios';
|
|||||||
import { ErrorMessageMode } from '/#/axios';
|
import { ErrorMessageMode } from '/#/axios';
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
Page = '/dayPlan/lngMeasurePur/page',
|
// Page = '/dayPlan/lngMeasurePur/page',
|
||||||
|
Page = '/magic-api/dayPlan/lngMeasurePurPageList',
|
||||||
List = '/dayPlan/lngMeasurePur/list',
|
List = '/dayPlan/lngMeasurePur/list',
|
||||||
Info = '/dayPlan/lngMeasurePur/info',
|
Info = '/dayPlan/lngMeasurePur/info',
|
||||||
LngLngMeasure = '/dayPlan/lngMeasurePur',
|
LngLngMeasure = '/dayPlan/lngMeasurePur',
|
||||||
|
submit = '/dayPlan/lngMeasurePur/submit',
|
||||||
|
Cancel = '/dayPlan/lngMeasurePur/cancel',
|
||||||
|
Reject = '/dayPlan/lngMeasurePur/reject',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DataLog = '/dayPlan/lngMeasurePur/datalog',
|
DataLog = '/dayPlan/lngMeasurePur/datalog',
|
||||||
}
|
}
|
||||||
|
export async function rejectlLngLngMeasurePur(lngLngMeasure: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.Reject,
|
||||||
|
params: lngLngMeasure,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function submitLngLngMeasurePur(lngLngMeasure: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.submit,
|
||||||
|
params: lngLngMeasure,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export async function cancelLngLngMeasurePur(lngLngMeasure: Recordable, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.post<boolean>(
|
||||||
|
{
|
||||||
|
url: Api.Cancel,
|
||||||
|
params: lngLngMeasure,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description: 查询LngLngMeasure分页列表
|
* @description: 查询LngLngMeasure分页列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
100
src/components/common/placeLngUnloadModal.vue
Normal file
100
src/components/common/placeLngUnloadModal.vue
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit" @cancel="handleCancel"
|
||||||
|
@visible-change="handleVisibleChange" >
|
||||||
|
<BasicTable @register="registerTable" class="placeLngUnloadModal"></BasicTable>
|
||||||
|
</BasicModal>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, computed, unref, nextTick } from 'vue';
|
||||||
|
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
|
||||||
|
import { BasicForm, useForm } from '/@/components/Form/index';
|
||||||
|
import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table';
|
||||||
|
import { addCodeRule, getCodeRuleInfo, editCodeRule } from '/@/api/system/code';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import { Form, message } from 'ant-design-vue';
|
||||||
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
|
import { getAllPlaceLngUnload} from '/@/api/dayPlan/LngDemand';
|
||||||
|
const { t } = useI18n();
|
||||||
|
const codeFormSchema: FormSchema[] = [
|
||||||
|
{ field: 'fullName', label: '名称', component: 'Input'},
|
||||||
|
];
|
||||||
|
|
||||||
|
const columns: BasicColumn[] = [
|
||||||
|
{ dataIndex: 'code', title: '编码', componentType: 'input', width: 120,align: 'left', },
|
||||||
|
{ dataIndex: 'fullName', title: '名称', componentType: 'input', align: 'left', },
|
||||||
|
];
|
||||||
|
|
||||||
|
const emit = defineEmits(['success', 'register', 'cancel']);
|
||||||
|
const showTable = ref(false)
|
||||||
|
const { notification } = useMessage();
|
||||||
|
const isUpdate = ref(true);
|
||||||
|
const rowId = ref('');
|
||||||
|
const selectedKeys = ref<string[]>([]);
|
||||||
|
const selectedValues = ref([]);
|
||||||
|
const props = defineProps({
|
||||||
|
selectType: { type: String, default: 'radio' },
|
||||||
|
});
|
||||||
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||||
|
|
||||||
|
setModalProps({ confirmLoading: false });
|
||||||
|
|
||||||
|
isUpdate.value = !!data?.isUpdate;
|
||||||
|
});
|
||||||
|
|
||||||
|
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload,setPagination }] = useTable({
|
||||||
|
title: t('列表'),
|
||||||
|
api: getAllPlaceLngUnload,
|
||||||
|
columns,
|
||||||
|
|
||||||
|
bordered: true,
|
||||||
|
pagination: false,
|
||||||
|
canResize: false,
|
||||||
|
formConfig: {
|
||||||
|
labelCol:{span: 9},
|
||||||
|
schemas: codeFormSchema,
|
||||||
|
showResetButton: true,
|
||||||
|
},
|
||||||
|
immediate: false, // 设置为不立即调用
|
||||||
|
beforeFetch: (params) => {
|
||||||
|
return { ...params, eid: ''};
|
||||||
|
},
|
||||||
|
rowSelection: {
|
||||||
|
type: props.selectType,
|
||||||
|
onChange: onSelectChange
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const handleVisibleChange = async (visible: boolean) => {
|
||||||
|
if (visible) {
|
||||||
|
nextTick(() => {
|
||||||
|
reload();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
function onSelectChange(rowKeys: string[], e) {
|
||||||
|
selectedKeys.value = rowKeys;
|
||||||
|
selectedValues.value = e
|
||||||
|
}
|
||||||
|
const getTitle = computed(() => (!unref(isUpdate) ? t('卸货地列表') : t('')));
|
||||||
|
function handleCancel () {
|
||||||
|
emit('cancel',);
|
||||||
|
}
|
||||||
|
async function handleSubmit() {
|
||||||
|
if (!selectedValues.value.length) {
|
||||||
|
notification.warning({
|
||||||
|
message: t('提示'),
|
||||||
|
description: t('请选择数据')
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
closeModal();
|
||||||
|
emit('success', selectedValues.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style >
|
||||||
|
.placeLngUnloadModal .basicCol{
|
||||||
|
position: inherit !important;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -47,6 +47,7 @@ const props = defineProps({
|
|||||||
() => props.visible,
|
() => props.visible,
|
||||||
(val) => {
|
(val) => {
|
||||||
isOpen.value = val
|
isOpen.value = val
|
||||||
|
formRef.value && formRef.value.resetFields();
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
@ -56,12 +57,13 @@ const props = defineProps({
|
|||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
formRef.value.resetFields();
|
formRef.value.resetFields();
|
||||||
isOpen.value = false
|
isOpen.value = false
|
||||||
|
emit('cancel');
|
||||||
}
|
}
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
try {
|
try {
|
||||||
await formRef.value.validate();
|
await formRef.value.validate();
|
||||||
emit('success', formState);
|
emit('success', formState);
|
||||||
formRef.value.resetFields();
|
// formRef.value.resetFields();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('验证失败:', error);
|
console.log('验证失败:', error);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,12 +23,12 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="车头号" name="noTractor" :class="diffResultList.includes('noTractor')?'changeStyle':''">
|
<a-form-item label="车头号" name="noTractor" :class="diffResultList.includes('noTractor')?'changeStyle':''">
|
||||||
<a-input v-model:value="formState.noTractor" :disabled="disable" placeholder="请输入车头号" />
|
<a-input v-model:value="formState.noTractor" :disabled="disable" placeholder="请输入车头号" @change="handleCheck('noTractor')"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="挂车号" name="noTrailer" :class="diffResultList.includes('noTrailer')?'changeStyle':''">
|
<a-form-item label="挂车号" name="noTrailer" :class="diffResultList.includes('noTrailer')?'changeStyle':''">
|
||||||
<a-input v-model:value="formState.noTrailer" :disabled="disable" placeholder="请输入挂车号" />
|
<a-input v-model:value="formState.noTrailer" :disabled="disable" placeholder="请输入挂车号" @change="handleCheck('noTrailer')" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -38,37 +38,37 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="驾驶员身份证号" name="idNoDriver" :class="diffResultList.includes('idNoDriver')?'changeStyle':''">
|
<a-form-item label="驾驶员身份证号" name="idNoDriver" :class="diffResultList.includes('idNoDriver')?'changeStyle':''">
|
||||||
<a-input v-model:value="formState.idNoDriver" :disabled="disable" placeholder="请输入驾驶员身份证号" />
|
<a-input v-model:value="formState.idNoDriver" :disabled="disable" placeholder="请输入驾驶员身份证号" @change="handleCheck('idNoDriver')"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="驾驶员姓名" name="nameDriver" :class="diffResultList.includes('nameDriver')?'changeStyle':''">
|
<a-form-item label="驾驶员姓名" name="nameDriver" :class="diffResultList.includes('nameDriver')?'changeStyle':''">
|
||||||
<a-input v-model:value="formState.nameDriver" :disabled="disable" placeholder="请输入驾驶员姓名" />
|
<a-input v-model:value="formState.nameDriver" :disabled="disable||formState.onlineSign == 'Y'" placeholder="请输入驾驶员姓名" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="驾驶员手机号" name="phoneDriver" :class="diffResultList.includes('phoneDriver')?'changeStyle':''">
|
<a-form-item label="驾驶员手机号" name="phoneDriver" :class="diffResultList.includes('phoneDriver')?'changeStyle':''">
|
||||||
<a-input v-model:value="formState.phoneDriver" :disabled="disable" placeholder="驾驶员手机号" />
|
<a-input v-model:value="formState.phoneDriver" :disabled="disable||formState.onlineSign == 'Y'" placeholder="驾驶员手机号" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="押运员身份证号" name="idNoEscort" :class="diffResultList.includes('idNoEscort')?'changeStyle':''">
|
<a-form-item label="押运员身份证号" name="idNoEscort" :class="diffResultList.includes('idNoEscort')?'changeStyle':''">
|
||||||
<a-input v-model:value="formState.idNoEscort" :disabled="disable" placeholder="请输入押运员身份证号" />
|
<a-input v-model:value="formState.idNoEscort" :disabled="disable" placeholder="请输入押运员身份证号" @change="handleCheck('idNoEscort')"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="押运员姓名" name="nameEscort" :class="diffResultList.includes('nameEscort')?'changeStyle':''">
|
<a-form-item label="押运员姓名" name="nameEscort" :class="diffResultList.includes('nameEscort')?'changeStyle':''">
|
||||||
<a-input v-model:value="formState.nameEscort" :disabled="disable" placeholder="请输入押运员姓名" />
|
<a-input v-model:value="formState.nameEscort" :disabled="disable||formState.onlineSign == 'Y'" placeholder="请输入押运员姓名" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="押运员手机号" name="phoneEscort" :class="diffResultList.includes('phoneEscort')?'changeStyle':''">
|
<a-form-item label="押运员手机号" name="phoneEscort" :class="diffResultList.includes('phoneEscort')?'changeStyle':''">
|
||||||
<a-input v-model:value="formState.phoneEscort" :disabled="disable" placeholder="请输入押运员手机号" />
|
<a-input v-model:value="formState.phoneEscort" :disabled="disable||formState.onlineSign == 'Y'" placeholder="请输入押运员手机号" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="卸货站点" name="unloadingName" :class="diffResultList.includes('unloadingName')?'changeStyle':''">
|
<a-form-item label="卸货站点" name="unloadingName" :class="diffResultList.includes('unloadingName')?'changeStyle':''">
|
||||||
<a-input-search v-model:value="formState.unloadingName" :disabled="disable" placeholder="请选择卸货站点" />
|
<a-input-search v-model:value="formState.unloadingName" :disabled="disable" placeholder="请选择卸货站点" readonly @search="onSearchPlace"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -112,7 +112,13 @@
|
|||||||
<a-form-item label="版本号" name="verNo" :class="diffResultList.includes('verNo')?'changeStyle':''">{{ formState.verNo }}</a-form-item>
|
<a-form-item label="版本号" name="verNo" :class="diffResultList.includes('verNo')?'changeStyle':''">{{ formState.verNo }}</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="审批状态" name="approName" :class="diffResultList.includes('approName')?'changeStyle':''">{{ formState.approName }}</a-form-item>
|
<a-form-item label="审批状态" name="approName" :class="diffResultList.includes('approName')?'changeStyle':''">
|
||||||
|
<a-select v-model:value="formState.approCode" disabled style="width: 100%" allow-clear>
|
||||||
|
<a-select-option v-for="item in optionSelect.approCodeList" :key="item.code" :value="item.code">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
@ -129,7 +135,8 @@
|
|||||||
</a-row>
|
</a-row>
|
||||||
</a-form>
|
</a-form>
|
||||||
<contractDemandListModal @register="registerContract" @success="handleSuccessContract" />
|
<contractDemandListModal @register="registerContract" @success="handleSuccessContract" />
|
||||||
<pointDelyDemandListModal @register="registerUpLoad" @success="handleSuccessUpLoad" />
|
<pointDelyDemandListModal @register="registerStation" @success="handleSuccessStation" />
|
||||||
|
<placeLngUnloadModal @register="registerPlace" @success="handleSuccessPlace"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -138,14 +145,14 @@
|
|||||||
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||||
import contractDemandListModal from '/@/components/common/contractDemandListModal.vue';
|
import contractDemandListModal from '/@/components/common/contractDemandListModal.vue';
|
||||||
import pointDelyDemandListModal from '/@/components/common/pointDelyDemandListModal.vue';
|
import pointDelyDemandListModal from '/@/components/common/pointDelyDemandListModal.vue';
|
||||||
|
import placeLngUnloadModal from '/@/components/common/placeLngUnloadModal.vue';
|
||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { getCompDept } from '/@/api/approve/Appro';
|
import { getCompDept } from '/@/api/approve/Appro';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
import { getDictionary } from '/@/api/sales/Customer';
|
import { getDictionary } from '/@/api/sales/Customer';
|
||||||
import { getLngLngDemandContractList, getLngLngDemandStationList } from '/@/api/dayPlan/LngDemand';
|
import { getLngLngDemandContractList, getLngLngDemandStationList,carCheck,getCategory } from '/@/api/dayPlan/LngDemand';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -154,9 +161,20 @@
|
|||||||
const pageType = ref(currentRoute.value.query?.type)
|
const pageType = ref(currentRoute.value.query?.type)
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const rules= reactive({
|
const rules= reactive({
|
||||||
pointDelyName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
staName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
datePlan: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
datePlan: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
noTractor: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
noTrailer: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
carrName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
idNoDriver: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
nameDriver: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
phoneDriver: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
idNoEscort: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
nameEscort: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
phoneEscort: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
unloadingName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
timePeriod: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
});
|
});
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: { span: 9 },
|
labelCol: { span: 9 },
|
||||||
@ -164,7 +182,8 @@
|
|||||||
}
|
}
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const [registerContract, { openModal:openModalContractSales}] = useModal();
|
const [registerContract, { openModal:openModalContractSales}] = useModal();
|
||||||
const [registerUpLoad, { openModal:openModalUpLoad}] = useModal();
|
const [registerStation, { openModal:openModalUpLoad}] = useModal();
|
||||||
|
const [registerPlace, { openModal:openModalPlace}] = useModal();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
formObj: {},
|
formObj: {},
|
||||||
disable: false,
|
disable: false,
|
||||||
@ -177,19 +196,20 @@
|
|||||||
const diffResultList = ref([])
|
const diffResultList = ref([])
|
||||||
const formState = ref({})
|
const formState = ref({})
|
||||||
const contractList = ref([])
|
const contractList = ref([])
|
||||||
const pointDelyList = ref([])
|
const stationList = ref([])
|
||||||
onMounted(async () =>{
|
onMounted(async () =>{
|
||||||
getOption()
|
getOption()
|
||||||
if (!pageType.value) {
|
if (!pageType.value) {
|
||||||
formState.value.lastVerSign = 'Y'
|
formState.value.lastVerSign = 'Y'
|
||||||
formState.value.validSign = 'N'
|
formState.value.carrCode = '123'
|
||||||
|
// formState.value.validSign = 'N'
|
||||||
formState.value.alterSign = 'I'
|
formState.value.alterSign = 'I'
|
||||||
formState.value.approCode = 'WTJ'
|
formState.value.approCode = 'WTJ'
|
||||||
const res = await getCompDept(userInfo.id)
|
const res = await getCompDept(userInfo.id)
|
||||||
formState.value.cuCode = res?.comp?.cuCode
|
formState.value.cuCode = res?.comp?.cuCode
|
||||||
formState.value.comId = res?.comp?.id
|
formState.value.comId = res?.comp?.id
|
||||||
const res1 = await getLngPngDemandRate({}) || []
|
let a = await getCategory({code: 'LNG'})||[]
|
||||||
formState.value.rateM3Gj = res1[0]?.rateM3Gj
|
formState.value.qtyTon = a[0]?.coefficient
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -197,8 +217,14 @@
|
|||||||
async function getOption() {
|
async function getOption() {
|
||||||
optionSelect.timePeriodList = await getDictionary('LNG_TIME_P')
|
optionSelect.timePeriodList = await getDictionary('LNG_TIME_P')
|
||||||
optionSelect.supplyCodeList = await getDictionary('LNG_SUPPLY')
|
optionSelect.supplyCodeList = await getDictionary('LNG_SUPPLY')
|
||||||
|
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
||||||
|
|
||||||
}
|
}
|
||||||
const datePlanChange = async (val) => {
|
const datePlanChange = async (val) => {
|
||||||
|
if (!val) {
|
||||||
|
contractList.value = []
|
||||||
|
return
|
||||||
|
}
|
||||||
let obj = {
|
let obj = {
|
||||||
cuCode:formState.value.cuCode,
|
cuCode:formState.value.cuCode,
|
||||||
datePlan: dayjs(formState.value.datePlan).format('YYYY-MM-DD')
|
datePlan: dayjs(formState.value.datePlan).format('YYYY-MM-DD')
|
||||||
@ -208,8 +234,9 @@
|
|||||||
if (contractList.value.length == 1) {
|
if (contractList.value.length == 1) {
|
||||||
formState.value.kName = contractList.value[0].kName
|
formState.value.kName = contractList.value[0].kName
|
||||||
formState.value.ksId = contractList.value[0].id
|
formState.value.ksId = contractList.value[0].id
|
||||||
getPointDely()
|
formState.value.comId = contractList.value[0].comId
|
||||||
getContractQty()
|
formState.value.comName = contractList.value[0].comName
|
||||||
|
getStation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const onSearch = ()=> {
|
const onSearch = ()=> {
|
||||||
@ -222,8 +249,9 @@
|
|||||||
const handleSuccessContract = (val) => {
|
const handleSuccessContract = (val) => {
|
||||||
formState.value.kName = val[0].kName
|
formState.value.kName = val[0].kName
|
||||||
formState.value.ksId = val[0].id
|
formState.value.ksId = val[0].id
|
||||||
getPointDely()
|
formState.value.comId = contractList.value[0].comId
|
||||||
getContractQty()
|
formState.value.comName = contractList.value[0].comName
|
||||||
|
getStation()
|
||||||
|
|
||||||
}
|
}
|
||||||
const onSearchUpLoad = (val)=> {
|
const onSearchUpLoad = (val)=> {
|
||||||
@ -231,33 +259,54 @@
|
|||||||
message.warn('请选择合同')
|
message.warn('请选择合同')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
openModalUpLoad(true,{isUpdate: false, list: pointDelyList.value})
|
openModalUpLoad(true,{isUpdate: false, list: stationList.value})
|
||||||
}
|
}
|
||||||
const handleSuccessUpLoad = (val) => {
|
const handleSuccessStation = (val) => {
|
||||||
formState.value.pointDelyName = val[0].pointDelyName
|
formState.value.staName = val[0].pointDelyName
|
||||||
formState.value.pointDelyCode = val[0].pointDelyCode
|
formState.value.staCode = val[0].pointDelyCode
|
||||||
formState.value.ksppId = val[0].id
|
formState.value.onlineSign = val[0].onlineSign
|
||||||
getPurList()
|
changeRules()
|
||||||
}
|
|
||||||
const getPointDely = async () => {
|
|
||||||
let res = await getLngLngDemandStationList({kId: formState.value.ksId})
|
|
||||||
pointDelyList.value = res || []
|
|
||||||
if (pointDelyList.value.length == 1) {
|
|
||||||
formState.value.pointDelyName = pointDelyList.value[0].pointDelyName
|
|
||||||
formState.value.pointDelyCode = pointDelyList.value[0].pointDelyCode
|
|
||||||
formState.value.ksppId = pointDelyList.value[0].id
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
const changeRules = () => {
|
||||||
|
if (formState.value.onlineSign == 'Y') {
|
||||||
|
rules.nameDriver = [{ required: false, message: "该项为必填项", trigger: 'change' }]
|
||||||
|
rules.phoneDriver = [{ required: false, message: "该项为必填项", trigger: 'change' }]
|
||||||
|
rules.nameEscort = [{ required: false, message: "该项为必填项", trigger: 'change' }]
|
||||||
|
rules.phoneEscort = [{ required: false, message: "该项为必填项", trigger: 'change' }]
|
||||||
|
} else {
|
||||||
|
rules.nameDriver = [{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||||
|
rules.phoneDriver = [{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||||
|
rules.nameEscort = [{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||||
|
rules.phoneEscort = [{ required: true, message: "该项为必填项", trigger: 'change' }]
|
||||||
}
|
}
|
||||||
const getContractQty = async () => {
|
|
||||||
let obj = {
|
|
||||||
kId: formState.value.ksId,
|
|
||||||
datePlan: dayjs(formState.value.datePlan).format('YYYY-MM-DD')
|
|
||||||
}
|
}
|
||||||
let res = await getLngPngDemandContractQty(obj) || []
|
const onSearchPlace = ()=> {
|
||||||
formState.value.qtyContractGj = res[0]?.qtyContractGj
|
openModalPlace(true,{isUpdate: false})
|
||||||
formState.value.qtyContractM3 = res[0]?.qtyContractM3
|
}
|
||||||
formState.value.qtyContractM3 =NP.divide(Number(formState.value.qtyContractM3), 10000)
|
const handleSuccessPlace= (val) => {
|
||||||
|
formState.value.unloadingName = val[0].fullName
|
||||||
|
formState.value.unloadingCode = val[0].code
|
||||||
|
}
|
||||||
|
const getStation = async () => {
|
||||||
|
let res = await getLngLngDemandStationList({ksId: formState.value.ksId})
|
||||||
|
stationList.value = res || []
|
||||||
|
stationList.value.forEach(v => {
|
||||||
|
v.pointDelyName = v.fullName
|
||||||
|
v.pointDelyCode = v.code
|
||||||
|
})
|
||||||
|
if (stationList.value.length == 1) {
|
||||||
|
formState.value.staName = stationList.value[0].fullName
|
||||||
|
formState.value.staCode = stationList.value[0].code
|
||||||
|
formState.value.onlineSign = stationList.value[0].onlineSign
|
||||||
|
changeRules()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleCheck = async (type) => {
|
||||||
|
if (formState.value.onlineSign == 'Y' && ((type == 'noTractor'&& !formState.value.noTrailer) || (type == 'noTrailer'&& !formState.value.noTractor)) ) {
|
||||||
|
// formState.value.carrCode = ''
|
||||||
|
// formState.value.carrName = ''
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
const disabledDateStart = (current) => {
|
const disabledDateStart = (current) => {
|
||||||
@ -307,22 +356,6 @@
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
||||||
.dot {
|
|
||||||
margin-right: 10px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
.ant-input-number{
|
|
||||||
margin:0 5px;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
|
||||||
span{
|
|
||||||
width: 10px !important;
|
|
||||||
height: 10px !important;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: red;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.changeStyle {
|
.changeStyle {
|
||||||
color: red !important;
|
color: red !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -163,7 +163,7 @@ export const columns: BasicColumn[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'ksName',
|
dataIndex: 'kName',
|
||||||
title: '合同',
|
title: '合同',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|||||||
@ -39,13 +39,13 @@
|
|||||||
import type { Rule } from 'ant-design-vue/es/form';
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
import { getDictionary } from '/@/api/sales/Customer';
|
import { getDictionary } from '/@/api/sales/Customer';
|
||||||
import { useModal } from '/@/components/Modal';
|
import { useModal } from '/@/components/Modal';
|
||||||
import { addLngPngDemand, submitLngPngDemand,getLngPngDemand,getLngPngDemandUpdate,getLngPngDemandCompare,updateLngPngDemand } from '/@/api/dayPlan/Demand';
|
import { Modal } from 'ant-design-vue';
|
||||||
|
import { addLngLngDemand, submitSaveLngDemand,getLngLngDemand,getLngDemanddUpdate,getLngDemandCompare,updateLngLngDemand,carCheck } from '/@/api/dayPlan/LngDemand';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { getAppEnvConfig } from '/@/utils/env';
|
import { getAppEnvConfig } from '/@/utils/env';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
import basicForm from './basicForm.vue'
|
import basicForm from './basicForm.vue'
|
||||||
import NP from 'number-precision';
|
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
@ -86,7 +86,7 @@
|
|||||||
async function getCompareInfo(id) {
|
async function getCompareInfo(id) {
|
||||||
spinning.value = true
|
spinning.value = true
|
||||||
try {
|
try {
|
||||||
let data = await getLngPngDemandCompare(id) || {}
|
let data = await getLngDemandCompare(id) || {}
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
diffResultList.value = data.diffResultList || []
|
diffResultList.value = data.diffResultList || []
|
||||||
let obj = changeData(data.oldBean || {})
|
let obj = changeData(data.oldBean || {})
|
||||||
@ -108,9 +108,9 @@
|
|||||||
try {
|
try {
|
||||||
let data = {}
|
let data = {}
|
||||||
if (pageType.value == 'update') {
|
if (pageType.value == 'update') {
|
||||||
data = await getLngPngDemandUpdate(id)
|
data = await getLngDemanddUpdate(id)
|
||||||
} else {
|
} else {
|
||||||
data = await getLngPngDemand(id)
|
data = await getLngLngDemand(id)
|
||||||
}
|
}
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
let obj = changeData(data)
|
let obj = changeData(data)
|
||||||
@ -126,6 +126,7 @@
|
|||||||
params: {}
|
params: {}
|
||||||
}
|
}
|
||||||
obj.datePlan = obj.datePlan ? dayjs(obj.datePlan): null
|
obj.datePlan = obj.datePlan ? dayjs(obj.datePlan): null
|
||||||
|
obj.timeUnloading = obj.timeUnloading ? dayjs(obj.timeUnloading) : null
|
||||||
return {
|
return {
|
||||||
params: obj
|
params: obj
|
||||||
}
|
}
|
||||||
@ -140,31 +141,64 @@
|
|||||||
...data.formInfo,
|
...data.formInfo,
|
||||||
datePlan: dayjs(data.formInfo.datePlan).format('YYYY-MM-DD HH:mm:ss'),
|
datePlan: dayjs(data.formInfo.datePlan).format('YYYY-MM-DD HH:mm:ss'),
|
||||||
}
|
}
|
||||||
|
if (type == 'submit') {
|
||||||
|
let params = {
|
||||||
|
orgId: obj.orgId,
|
||||||
|
datePlan: dayjs(obj.datePlan).format('YYYY-MM-DD'),
|
||||||
|
noTractor: obj.noTractor,
|
||||||
|
noTrailer: obj.noTrailer,
|
||||||
|
idNoDriver: obj.idNoDriver,
|
||||||
|
idNoEscort: obj.idNoEscort,
|
||||||
|
}
|
||||||
|
let res = await carCheck(params)
|
||||||
|
if (res) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: '提示信息',
|
||||||
|
content: res,
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk() {
|
||||||
|
saveSubmit(type, obj)
|
||||||
|
},
|
||||||
|
onCancel() {}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
saveSubmit(type, obj)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
saveSubmit(type, obj)
|
||||||
|
}
|
||||||
|
} catch (errorInfo) {
|
||||||
|
spinning.value = false;
|
||||||
|
errorInfo?.errorFields?.length && notification.warning({
|
||||||
|
message: '提示',
|
||||||
|
description: '请完善信息'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveSubmit = async (type, obj) => {
|
||||||
|
try {
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
let request = submitLngPngDemand
|
let request = submitSaveLngDemand
|
||||||
if (type == 'save') {
|
if (type == 'save') {
|
||||||
request = !pageId.value ? addLngPngDemand : updateLngPngDemand
|
request = !pageId.value ? addLngLngDemand : updateLngLngDemand
|
||||||
}
|
}
|
||||||
await request(obj)
|
await request(obj)
|
||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
notification.success({
|
notification.success({
|
||||||
message: 'Tip',
|
message: '提示',
|
||||||
description: type == 'save' ? '保存成功':'已提交'
|
description: type == 'save' ? '保存成功':'已提交'
|
||||||
}); //提示消息
|
}); //提示消息
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
bus.emit(FORM_LIST_MODIFIED, {});
|
bus.emit(FORM_LIST_MODIFIED, {});
|
||||||
close();
|
close();
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
}catch (errorInfo) {
|
}catch (errorInfo) {
|
||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
errorInfo?.errorFields?.length && notification.warning({
|
|
||||||
message: 'Tip',
|
|
||||||
description: '请完善信息'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -183,21 +217,5 @@
|
|||||||
.pdcss {
|
.pdcss {
|
||||||
padding:0px 12px 6px 12px !important;
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -31,14 +31,12 @@
|
|||||||
const logId = ref('')
|
const logId = ref('')
|
||||||
const logPath = ref('/dayPlan/lngDemand/datalog');
|
const logPath = ref('/dayPlan/lngDemand/datalog');
|
||||||
import { DataLog } from '/@/components/pcitc';
|
import { DataLog } from '/@/components/pcitc';
|
||||||
import { ref, computed, onMounted, onUnmounted, createVNode,
|
import { ref, computed, onMounted, onUnmounted, createVNode, } from 'vue';
|
||||||
|
|
||||||
} from 'vue';
|
|
||||||
|
|
||||||
import { Modal } from 'ant-design-vue';
|
import { Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
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 { PageWrapper } from '/@/components/Page';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
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":"startwork","icon":"ant-design:form-outlined","isDefault":true},
|
||||||
{"isUse":true,"name":"查看流转记录","code":"flowRecord","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":"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":"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":"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}]);
|
{"isUse":true,"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true}]);
|
||||||
//展示在列表内的按钮
|
//展示在列表内的按钮
|
||||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','compare','update','back','cancel']);
|
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','compare','toChange','withdraw','cancel', 'submit']);
|
||||||
const buttonConfigs = computed(()=>{
|
const buttonConfigs = computed(()=>{
|
||||||
return filterButtonAuth(buttons.value);
|
return filterButtonAuth(buttons.value);
|
||||||
})
|
})
|
||||||
@ -103,7 +101,7 @@
|
|||||||
|
|
||||||
let arr =[{"isUse":true,"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"type":"primary"},
|
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":"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":"import","icon":"ant-design:import-outlined","isDefault":true},
|
||||||
{"isUse":true,"name":"导出模板","code":"export","icon":"ant-design:export-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},]
|
{"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));
|
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 { currentRoute } = useRouter();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -140,7 +138,7 @@
|
|||||||
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
const [registerImportModal, { openModal: openImportModal }] = useModal();
|
||||||
|
|
||||||
const formName=currentRoute.value.meta?.title;
|
const formName=currentRoute.value.meta?.title;
|
||||||
const [registerTable, { reload, }] = useTable({
|
const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
|
||||||
title: '' || (formName + '列表'),
|
title: '' || (formName + '列表'),
|
||||||
api: getLngLngDemandPage,
|
api: getLngLngDemandPage,
|
||||||
rowKey: 'id',
|
rowKey: 'id',
|
||||||
@ -165,7 +163,7 @@
|
|||||||
|
|
||||||
striped: false,
|
striped: false,
|
||||||
actionColumn: {
|
actionColumn: {
|
||||||
width: 160,
|
width: 190,
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
slots: { customRender: 'action' },
|
slots: { customRender: 'action' },
|
||||||
@ -184,44 +182,21 @@
|
|||||||
selectedKeys.value = rowKeys;
|
selectedKeys.value = rowKeys;
|
||||||
}
|
}
|
||||||
function dbClickRow(record) {
|
function dbClickRow(record) {
|
||||||
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const { processId, taskIds, schemaId } = record.workflowData || {};
|
|
||||||
if (taskIds && taskIds.length) {
|
|
||||||
router.push({
|
router.push({
|
||||||
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
|
path: '/dayPlan/LngDemand/createForm',
|
||||||
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: {
|
query: {
|
||||||
formPath: 'dayPlan/LngDemand',
|
formPath: 'dayPlan/LngDemand',
|
||||||
formName: formName,
|
formName: '查看'+formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.id,
|
||||||
|
type: 'view'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function buttonClick(code) {
|
function buttonClick(code) {
|
||||||
|
|
||||||
btnEvent[code]();
|
btnEvent[code]('batch');
|
||||||
}
|
}
|
||||||
function handleDatalog (record: Recordable) {
|
function handleDatalog (record: Recordable) {
|
||||||
modalVisible.value = true
|
modalVisible.value = true
|
||||||
@ -248,27 +223,79 @@
|
|||||||
function handleEdit(record: Recordable) {
|
function handleEdit(record: Recordable) {
|
||||||
|
|
||||||
router.push({
|
router.push({
|
||||||
path: '/form/LngDemand/' + record.id + '/updateForm',
|
path: '/dayPlan/LngDemand/createForm',
|
||||||
query: {
|
query: {
|
||||||
formPath: 'dayPlan/LngDemand',
|
formPath: 'dayPlan/LngDemand',
|
||||||
formName: formName,
|
formName: '编辑'+formName,
|
||||||
formId:currentRoute.value.meta.formId
|
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) {
|
async function handleCancel(record: Recordable) {
|
||||||
await cancelLngPng(record.id)
|
await cancelLngDemand(record.id)
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
notification.success({
|
notification.success({
|
||||||
message: '提示',
|
message: '提示',
|
||||||
description: t('已取消!'),
|
description: t('已取消!'),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function handleSubmit () {
|
async function handleBack(record: Recordable) {
|
||||||
|
if (record == 'batch'&&!selectedKeys.value.length) {
|
||||||
|
notification.warning({
|
||||||
|
message: '提示',
|
||||||
|
description: t('请选择需要撤回的数据'),
|
||||||
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
function handleUpdate () {
|
let arr = record == 'batch' ? selectedKeys.value : [record.id]
|
||||||
|
await withdrawLngDemand(arr)
|
||||||
|
handleSuccess();
|
||||||
|
notification.success({
|
||||||
|
message: '提示',
|
||||||
|
description: t('已撤回!'),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
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) {
|
function handleDelete(record: Recordable) {
|
||||||
deleteList([record.id]);
|
deleteList([record.id]);
|
||||||
@ -296,7 +323,7 @@
|
|||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
function handleSuccess() {
|
function handleSuccess() {
|
||||||
|
clearSelectedRowKeys()
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,39 +374,80 @@
|
|||||||
function getActions(record: Recordable):ActionItem[] {
|
function getActions(record: Recordable):ActionItem[] {
|
||||||
|
|
||||||
let actionsList: ActionItem[] = [];
|
let actionsList: ActionItem[] = [];
|
||||||
let editAndDelBtn: ActionItem[] = [];
|
let editBtn: ActionItem[] = [];
|
||||||
|
let delBtn: ActionItem[] = [];
|
||||||
|
let updateBtn: ActionItem[] = [];
|
||||||
|
let backBtn: ActionItem[] = [];
|
||||||
let hasFlowRecord = false;
|
let hasFlowRecord = false;
|
||||||
|
let viewBtn: ActionItem[]=[]
|
||||||
actionButtonConfig.value?.map((button) => {
|
actionButtonConfig.value?.map((button) => {
|
||||||
if (['view', 'copyData'].includes(button.code)) {
|
if (['view', 'copyData','compare', 'datalog'].includes(button.code)) {
|
||||||
actionsList.push({
|
viewBtn.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
onClick: btnEvent[button.code].bind(null, record),
|
onClick: btnEvent[button.code].bind(null, record),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (['edit', 'delete'].includes(button.code)) {
|
if (['edit'].includes(button.code)) {
|
||||||
editAndDelBtn.push({
|
editBtn.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
color: button.code === 'delete' ? 'error' : undefined,
|
color: button.code === 'delete' ? 'error' : undefined,
|
||||||
onClick: btnEvent[button.code].bind(null, record),
|
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 (button.code === 'flowRecord') hasFlowRecord = true;
|
||||||
});
|
});
|
||||||
if (record.workflowData?.enabled) {
|
if (record.approCode == 'YSP' && record.alterSign!='D') {
|
||||||
//与工作流有关联的表单
|
actionsList = actionsList.concat(updateBtn);
|
||||||
if (record.workflowData.status) {
|
|
||||||
actionsList.unshift(setIndexFlowStatus(record.workflowData))
|
|
||||||
} else {
|
|
||||||
actionsList = actionsList.concat(editAndDelBtn);
|
|
||||||
}
|
}
|
||||||
} else {
|
// || record.approCode == 'YBH'
|
||||||
if (!record.workflowData?.processId) {
|
if ((record.approCode == 'WTJ'|| record.approCode == 'YBH') && record.alterSign!='D' ) {
|
||||||
//与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
actionsList = actionsList.concat(editBtn);
|
||||||
actionsList = actionsList.concat(editAndDelBtn);
|
|
||||||
}
|
}
|
||||||
|
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;
|
return actionsList;
|
||||||
}
|
}
|
||||||
function handleStartwork(record: Recordable) {
|
function handleStartwork(record: Recordable) {
|
||||||
|
|||||||
@ -63,7 +63,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '计划日期',
|
title: '计划日期',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '客户简称',
|
title: '客户简称',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '气源地',
|
title: '气源地',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '车头号',
|
title: '车头号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '挂车号',
|
title: '挂车号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '装车量(吨)',
|
title: '装车量(吨)',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '装车量(吉焦)',
|
title: '装车量(吉焦)',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '装车量(方)',
|
title: '装车量(方)',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '进厂皮重时间',
|
title: '进厂皮重时间',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '出厂毛重时间',
|
title: '出厂毛重时间',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -153,7 +153,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '客户确认人',
|
title: '客户确认人',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -162,7 +162,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '客户确认时间',
|
title: '客户确认时间',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '内部确认人',
|
title: '内部确认人',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '内部确认时间',
|
title: '内部确认时间',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '销售合同',
|
title: '销售合同',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '供应商',
|
title: '供应商',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '附件',
|
title: '附件',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 100,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '驳回意见',
|
title: '驳回意见',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 130,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
</BasicTable>
|
</BasicTable>
|
||||||
<LngMeasurePurModal @register="registerModal" @success="handleSuccess" />
|
<LngMeasurePurModal @register="registerModal" @success="handleSuccess" />
|
||||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||||
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" />
|
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" @cancel="handleRejectCancel"/>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -38,7 +38,7 @@
|
|||||||
import { ref, computed, onMounted, onUnmounted, watch} from 'vue';
|
import { ref, computed, onMounted, onUnmounted, watch} from 'vue';
|
||||||
|
|
||||||
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
||||||
import { getLngLngMeasurePage, deleteLngLngMeasure} from '/@/api/dayPlan/LngMeasurePur';
|
import { getLngLngMeasurePage, deleteLngLngMeasure,submitLngLngMeasurePur,rejectlLngLngMeasurePur,cancelLngLngMeasurePur} from '/@/api/dayPlan/LngMeasurePur';
|
||||||
import { PageWrapper } from '/@/components/Page';
|
import { PageWrapper } from '/@/components/Page';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
@ -112,7 +112,7 @@
|
|||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||||
showResetButton: false,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
||||||
@ -189,7 +189,7 @@
|
|||||||
} else {
|
} else {
|
||||||
selectedKeys.value= [val?.id]
|
selectedKeys.value= [val?.id]
|
||||||
}
|
}
|
||||||
await submitLngPngMeasurePur(selectedKeys.value)
|
await submitLngLngMeasurePur(selectedKeys.value)
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
notification.success({
|
notification.success({
|
||||||
message: '提示',
|
message: '提示',
|
||||||
@ -209,7 +209,7 @@
|
|||||||
} else {
|
} else {
|
||||||
selectedKeys.value= [val?.id]
|
selectedKeys.value= [val?.id]
|
||||||
}
|
}
|
||||||
await cancelLngPngMeasurePur(selectedKeys.value)
|
await cancelLngLngMeasurePur(selectedKeys.value)
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
notification.success({
|
notification.success({
|
||||||
message: '提示',
|
message: '提示',
|
||||||
@ -231,18 +231,25 @@
|
|||||||
}
|
}
|
||||||
isOpen.value = true
|
isOpen.value = true
|
||||||
}
|
}
|
||||||
|
const handleRejectCancel = ()=> {
|
||||||
|
isOpen.value = false
|
||||||
|
}
|
||||||
const handleRejectReply = async (val) => {
|
const handleRejectReply = async (val) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
"ids": selectedKeys.value,
|
"ids": selectedKeys.value,
|
||||||
"rejNote": val.reply,
|
"rejNote": val.reply,
|
||||||
}
|
}
|
||||||
await rejectLngPngMeasurePur(obj)
|
try {
|
||||||
|
await rejectlLngLngMeasurePur(obj)
|
||||||
isOpen.value = false
|
isOpen.value = false
|
||||||
handleSuccess();
|
handleSuccess();
|
||||||
notification.success({
|
notification.success({
|
||||||
message: '提示',
|
message: '提示',
|
||||||
description: t('已驳回!'),
|
description: t('已驳回!'),
|
||||||
});
|
});
|
||||||
|
} catch (error) {
|
||||||
|
// isOpen.value = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function handleDatalog (record: Recordable) {
|
function handleDatalog (record: Recordable) {
|
||||||
modalVisible.value = true
|
modalVisible.value = true
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '计划日期',
|
title: '计划日期',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '气源地',
|
title: '气源地',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '车头号',
|
title: '车头号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '挂车号',
|
title: '挂车号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -75,7 +75,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '装车量(吨)',
|
title: '装车量(吨)',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '装车量(吉焦)',
|
title: '装车量(吉焦)',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '装车量(方)',
|
title: '装车量(方)',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '进厂皮重时间',
|
title: '进厂皮重时间',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '出厂毛重时间',
|
title: '出厂毛重时间',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '附件',
|
title: '附件',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '确认人',
|
title: '确认人',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '确认时间',
|
title: '确认时间',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '业务确认人',
|
title: '业务确认人',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '业务确认时间',
|
title: '业务确认时间',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 180,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '供应商',
|
title: '供应商',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '合同',
|
title: '合同',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -183,7 +183,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 100,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -192,7 +192,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '驳回意见',
|
title: '驳回意见',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 130,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -146,7 +146,7 @@
|
|||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: 'suName',
|
dataIndex: 'suSname',
|
||||||
title: '供应商',
|
title: '供应商',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record,index }">
|
||||||
<template v-if="column.dataIndex === 'qtyMeaTonSales'">
|
<template v-if="column.dataIndex === 'qtyMeaTonSales'">
|
||||||
<input-number v-model:value="record.qtyMeaTonSales" :disabled="record.statusCode!=='JLZ'"
|
<input-number v-model:value="record.qtyMeaTonSales" :disabled="record.statusCode!=='JLZ'"
|
||||||
@change="numChange(record)" :min="0" :digits="3" style="width: 100%" />
|
@change="numChange(record)" :min="0" :digits="3" style="width: 100%" />
|
||||||
@ -57,7 +57,7 @@
|
|||||||
const logId = ref('')
|
const logId = ref('')
|
||||||
const logPath = ref('/dayPlan/lngMeasureSales/datalog');
|
const logPath = ref('/dayPlan/lngMeasureSales/datalog');
|
||||||
import { DataLog } from '/@/components/pcitc';
|
import { DataLog } from '/@/components/pcitc';
|
||||||
import { ref, computed, onMounted, onUnmounted, createVNode, } from 'vue';
|
import { ref, computed, onMounted, onUnmounted, createVNode, watch} from 'vue';
|
||||||
|
|
||||||
import { Modal } from 'ant-design-vue';
|
import { Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
||||||
@ -82,6 +82,8 @@
|
|||||||
import { DeleteOutlined } from '@ant-design/icons-vue';
|
import { DeleteOutlined } from '@ant-design/icons-vue';
|
||||||
import { getCompDept } from '/@/api/approve/Appro';
|
import { getCompDept } from '/@/api/approve/Appro';
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import Upload from '/@/components/Form/src/components/Upload.vue';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const userInfo = userStore.getUserInfo;
|
const userInfo = userStore.getUserInfo;
|
||||||
const curCuCode = ref('')
|
const curCuCode = ref('')
|
||||||
@ -127,6 +129,7 @@
|
|||||||
const btnEvent = {add : handleAdd,refresh : handleRefresh,datalog : handleDatalog,delete : handleDelete,save: handleSave, submit: handleSubmit, cancel: handleCancel}
|
const btnEvent = {add : handleAdd,refresh : handleRefresh,datalog : handleDatalog,delete : handleDelete,save: handleSave, submit: handleSubmit, cancel: handleCancel}
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
|
const tableData = ref([])
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const formIdComputedRef = ref();
|
const formIdComputedRef = ref();
|
||||||
formIdComputedRef.value = currentRoute.value.meta.formId
|
formIdComputedRef.value = currentRoute.value.meta.formId
|
||||||
@ -149,13 +152,18 @@
|
|||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||||
showResetButton: false,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
immediate: false,
|
immediate: false,
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit,cuCode:curCuCode.value };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit,cuCode:curCuCode.value };
|
||||||
},
|
},
|
||||||
afterFetch: (res) => {
|
afterFetch: (res) => {
|
||||||
|
tableData.value = res || []
|
||||||
|
tableData.value.forEach(v => {
|
||||||
|
v.timeIn = v.timeIn ? dayjs(v.timeIn) : null
|
||||||
|
v.timeOut = v.timeOut ? dayjs(v.timeOut) : null
|
||||||
|
})
|
||||||
tableRef.value.setToolBarWidth();
|
tableRef.value.setToolBarWidth();
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -179,6 +187,21 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
watch(
|
||||||
|
() => tableData.value,
|
||||||
|
(val) => {
|
||||||
|
if (val) {
|
||||||
|
|
||||||
|
if (tableData.value.length) {
|
||||||
|
setTableData(tableData.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
function onSelectChange(selectedRowKeys: [], selectedRows) {
|
function onSelectChange(selectedRowKeys: [], selectedRows) {
|
||||||
selectedKeys.value = selectedRowKeys;
|
selectedKeys.value = selectedRowKeys;
|
||||||
selectedRowsData.value = selectedRows;
|
selectedRowsData.value = selectedRows;
|
||||||
@ -236,13 +259,7 @@
|
|||||||
} else {
|
} else {
|
||||||
selectedRowsData.value= [{...val}]
|
selectedRowsData.value= [{...val}]
|
||||||
}
|
}
|
||||||
await cancelLngLngMeasure(selectedRowsData.value)
|
fieldCheck('cancel')
|
||||||
handleSuccess();
|
|
||||||
notification.success({
|
|
||||||
message: '提示',
|
|
||||||
description: t('取消成功!'),
|
|
||||||
});
|
|
||||||
clearSelectedRowKeys()
|
|
||||||
}
|
}
|
||||||
async function handleSubmit(val) {
|
async function handleSubmit(val) {
|
||||||
if (val=='batch') {
|
if (val=='batch') {
|
||||||
@ -256,14 +273,7 @@
|
|||||||
} else {
|
} else {
|
||||||
selectedRowsData.value= [{...val}]
|
selectedRowsData.value= [{...val}]
|
||||||
}
|
}
|
||||||
|
fieldCheck('submit')
|
||||||
await updateLngLngMeasure(selectedRowsData.value)
|
|
||||||
handleSuccess();
|
|
||||||
notification.success({
|
|
||||||
message: '提示',
|
|
||||||
description: t('确认成功!'),
|
|
||||||
});
|
|
||||||
clearSelectedRowKeys()
|
|
||||||
}
|
}
|
||||||
async function handleSave(val) {
|
async function handleSave(val) {
|
||||||
if (val=='batch') {
|
if (val=='batch') {
|
||||||
@ -277,14 +287,43 @@
|
|||||||
} else {
|
} else {
|
||||||
selectedRowsData.value= [{...val}]
|
selectedRowsData.value= [{...val}]
|
||||||
}
|
}
|
||||||
await addLngLngMeasure(selectedRowsData.value)
|
fieldCheck('save')
|
||||||
handleSuccess();
|
|
||||||
notification.success({
|
}
|
||||||
|
const fieldCheck = async (type) => {
|
||||||
|
for(let i = 0; i<selectedRowsData.value.length;i++) {
|
||||||
|
if (!selectedRowsData.value[i].timeOut || !selectedRowsData.value[i].timeIn) {
|
||||||
|
notification.warning({
|
||||||
message: '提示',
|
message: '提示',
|
||||||
description: t('保存成功!'),
|
description: t('时间不能为空'),
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (selectedRowsData.value[i].statusCode=='JLZ' && (!selectedRowsData.value[i].qtyMeaTonSales || !selectedRowsData.value[i].qtyMeaGjSales || !selectedRowsData.value[i].qtyMeaM3Sales)) {
|
||||||
|
notification.warning({
|
||||||
|
message: '提示',
|
||||||
|
description: t('装车量不能为空'),
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
selectedRowsData.value[i].timeOut = selectedRowsData.value[i].timeOut ? dayjs(selectedRowsData.value[i].timeOut).format('YYYY-MM-DD HH:mm:ss') : null
|
||||||
|
selectedRowsData.value[i].timeIn = selectedRowsData.value[i].timeIn ? dayjs(selectedRowsData.value[i].timeIn).format('YYYY-MM-DD HH:mm:ss') : null
|
||||||
|
}
|
||||||
|
let request = type == 'save' ? addLngLngMeasure : updateLngLngMeasure
|
||||||
|
if (type =='cancel') {
|
||||||
|
request = cancelLngLngMeasure
|
||||||
|
}
|
||||||
|
await request(selectedRowsData.value)
|
||||||
|
let tip = type == 'save' ? '保存成功!' : '确认成功!'
|
||||||
|
if (type =='cancel') {
|
||||||
|
tip = '取消成功'
|
||||||
|
}
|
||||||
|
handleSuccess();
|
||||||
|
notification.warn({
|
||||||
|
message: '提示',
|
||||||
|
description: tip,
|
||||||
});
|
});
|
||||||
clearSelectedRowKeys()
|
clearSelectedRowKeys()
|
||||||
|
|
||||||
}
|
}
|
||||||
function handleDelete(record: Recordable) {
|
function handleDelete(record: Recordable) {
|
||||||
deleteList([record.id]);
|
deleteList([record.id]);
|
||||||
@ -434,7 +473,11 @@
|
|||||||
.hide{
|
.hide{
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
.delIcon {
|
||||||
|
margin-left: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
:deep( .ant-col-8:nth-child(1)) {
|
:deep( .ant-col-8:nth-child(1)) {
|
||||||
width: 320px !important;
|
width: 320px !important;
|
||||||
max-width: 320px !important;
|
max-width: 320px !important;
|
||||||
|
|||||||
@ -1,467 +0,0 @@
|
|||||||
<template>
|
|
||||||
<PageWrapper dense fixedHeight contentFullHeight contentClass="flex">
|
|
||||||
<BasicTable @register="registerTable" ref="tableRef" @row-dbClick="dbClickRow">
|
|
||||||
|
|
||||||
<template #toolbar>
|
|
||||||
<template v-for="button in tableButtonConfig" :key="button.code">
|
|
||||||
<a-button v-if="button.isDefault" :type="button.type" @click="buttonClick(button.code)">
|
|
||||||
<template #icon><Icon :icon="button.icon" /></template>
|
|
||||||
{{ button.name }}
|
|
||||||
</a-button>
|
|
||||||
<a-button v-else :type="button.type">
|
|
||||||
<template #icon><Icon :icon="button.icon" /></template>
|
|
||||||
{{ button.name }}
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.dataIndex === 'approName'">
|
|
||||||
<a @click="btnCheck(record)">{{ record.approName }}</a>
|
|
||||||
</template>
|
|
||||||
<template v-if="column.dataIndex === 'action'">
|
|
||||||
<TableAction :actions="getActions(record)" />
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</BasicTable>
|
|
||||||
<PngApproModal @register="registerModal" @success="handleSuccess" />
|
|
||||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
|
||||||
<approStatusModal @register="registerApproStatus" ></approStatusModal>
|
|
||||||
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" />
|
|
||||||
</PageWrapper>
|
|
||||||
</template>
|
|
||||||
<script lang="ts" setup>
|
|
||||||
const modalVisible = ref(false);
|
|
||||||
const logId = ref('')
|
|
||||||
const logPath = ref('/dayPlan/pngAppro/datalog');
|
|
||||||
import { DataLog } from '/@/components/pcitc';
|
|
||||||
import { ref, computed, onMounted, onUnmounted, } from 'vue';
|
|
||||||
|
|
||||||
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
|
||||||
import { getLngPngApproPage, deleteLngPngAppro} from '/@/api/dayPlan/PngAppro';
|
|
||||||
import { PageWrapper } from '/@/components/Page';
|
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
|
||||||
import { usePermission } from '/@/hooks/web/usePermission';
|
|
||||||
import { useFormConfig } from '/@/hooks/web/useFormConfig';
|
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import { setIndexFlowStatus } from '/@/utils/flow/index'
|
|
||||||
import { getLngPngAppro,getLngPngApproPageGd, getLngPngApproPageJsz, approveLngPngApproSZ, approveLngPngApproGD, approveLngPngAppro
|
|
||||||
} from '/@/api/dayPlan/PngAppro';
|
|
||||||
import { useModal,BasicModal } from '/@/components/Modal';
|
|
||||||
import LookProcess from '/@/views/workflow/task/components/LookProcess.vue';
|
|
||||||
import LaunchProcess from '/@/views/workflow/task/components/LaunchProcess.vue';
|
|
||||||
import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue';
|
|
||||||
import { getDraftInfo } from '/@/api/workflow/process';
|
|
||||||
import { isValidJSON } from '/@/utils/event/design';
|
|
||||||
|
|
||||||
import PngApproModal from './components/PngApproModal.vue';
|
|
||||||
import {formConfig, searchFormSchema, columns, columnsGd, columnsJsz } from './components/config';
|
|
||||||
import Icon from '/@/components/Icon/index';
|
|
||||||
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
|
||||||
import approStatusModal from '/@/components/common/approStatusModal.vue';
|
|
||||||
import rejectReplyModal from '/@/components/common/rejectReplyModal.vue';
|
|
||||||
|
|
||||||
import useEventBus from '/@/hooks/event/useEventBus';
|
|
||||||
import { cloneDeep } from 'lodash-es';
|
|
||||||
|
|
||||||
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
|
|
||||||
|
|
||||||
const { notification } = useMessage();
|
|
||||||
const { t } = useI18n();
|
|
||||||
defineEmits(['register']);
|
|
||||||
const { filterColumnAuth, filterButtonAuth } = usePermission();
|
|
||||||
const { mergeColumns,mergeSearchFormSchema,mergeButtons } = useFormConfig();
|
|
||||||
|
|
||||||
const filterColumns = cloneDeep(filterColumnAuth(columns));
|
|
||||||
const customConfigColums =ref(filterColumns);
|
|
||||||
const customSearchFormSchema =ref(searchFormSchema);
|
|
||||||
|
|
||||||
const tableRef = ref();
|
|
||||||
//所有按钮
|
|
||||||
const buttons = ref([{"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":"approveGD","icon":"ant-design:check-outlined","isDefault":true},
|
|
||||||
{"isUse":true,"name":"驳回","code":"reject","icon":"ant-design:stop-outlined","isDefault":true},
|
|
||||||
]);
|
|
||||||
//展示在列表内的按钮
|
|
||||||
const actionButtons = ref<string[]>(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord','approveGD','reject']);
|
|
||||||
const buttonConfigs = computed(()=>{
|
|
||||||
return filterButtonAuth(buttons.value);
|
|
||||||
})
|
|
||||||
|
|
||||||
const tableButtonConfig = computed(() => {
|
|
||||||
// return buttonConfigs.value?.filter((x) => !actionButtons.value.includes(x.code));
|
|
||||||
return [{"isUse":true,"name":"审批通过","code":"approveGD","icon":"ant-design:check-outlined","isDefault":true}]
|
|
||||||
});
|
|
||||||
|
|
||||||
const actionButtonConfig = computed(() => {
|
|
||||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
|
||||||
});
|
|
||||||
|
|
||||||
const btnEvent = {refresh : handleRefresh,view : handleView,startwork : handleStartwork,flowRecord : handleFlowRecord,approveGD : handleApprove,reject: handleReject}
|
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
|
||||||
const router = useRouter();
|
|
||||||
const path = currentRoute.value?.path
|
|
||||||
const formIdComputedRef = ref();
|
|
||||||
formIdComputedRef.value = currentRoute.value.meta.formId
|
|
||||||
const schemaIdComputedRef = ref();
|
|
||||||
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
|
|
||||||
const visibleLookProcessRef = ref(false);
|
|
||||||
const processIdRef = ref('');
|
|
||||||
|
|
||||||
const visibleLaunchProcessRef = ref(false);
|
|
||||||
const schemaIdRef = ref('');
|
|
||||||
const formDataRef = ref();
|
|
||||||
const rowKeyData = ref();
|
|
||||||
const draftsId = ref();
|
|
||||||
const selectedKeys = ref([])
|
|
||||||
const visibleApproveProcessRef = ref(false);
|
|
||||||
const taskIdRef = ref('');
|
|
||||||
const visibleFlowRecordModal = ref(false);
|
|
||||||
const [registerModal, { openModal}] = useModal();
|
|
||||||
const [registerApproStatus, { openModal: openModalApproStatus}] = useModal();
|
|
||||||
const [registerRejectReply, { openModal: openModalRejectReply}] = useModal();
|
|
||||||
const isOpen = ref(false)
|
|
||||||
|
|
||||||
const curData = ref({})
|
|
||||||
let formName='管道气销售审批';
|
|
||||||
let curPath = 'dayPlan/PngAppro/index'
|
|
||||||
let request = ''
|
|
||||||
let requestApprove = ''
|
|
||||||
if (path.includes('dayPlan/PngAppro/index')) {
|
|
||||||
formName='管道气销售审批'
|
|
||||||
curPath = 'dayPlan/PngAppro/index'
|
|
||||||
request = getLngPngApproPage
|
|
||||||
requestApprove = approveLngPngAppro
|
|
||||||
}
|
|
||||||
if (path.includes('dayPlan/pngPipeAppro/index')) {
|
|
||||||
formName='管道气管道审批'
|
|
||||||
curPath = 'dayPlan/pngPipeAppro'
|
|
||||||
request = getLngPngApproPageGd
|
|
||||||
requestApprove = approveLngPngApproGD
|
|
||||||
}
|
|
||||||
if (path.includes('dayPlan/pngReceiveStationAppro/index')) {
|
|
||||||
formName='管道气接收站审批'
|
|
||||||
curPath = 'dayPlan/pngReceiveStationAppro'
|
|
||||||
request = getLngPngApproPageJsz
|
|
||||||
requestApprove = approveLngPngApproSZ
|
|
||||||
}
|
|
||||||
const [registerTable, { reload, clearSelectedRowKeys, setTableData }] = useTable({
|
|
||||||
title: '' || (formName + '列表'),
|
|
||||||
api: request,
|
|
||||||
rowKey: 'datePlan',
|
|
||||||
columns: curPath.includes('pngPipeAppro') ? columnsGd : columnsJsz,
|
|
||||||
formConfig: {
|
|
||||||
rowProps: {
|
|
||||||
gutter: 16,
|
|
||||||
},
|
|
||||||
schemas: [],
|
|
||||||
fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD HH:mm:ss ', true]],
|
|
||||||
showResetButton: false,
|
|
||||||
showSubmitButton: false,
|
|
||||||
},
|
|
||||||
beforeFetch: (params) => {
|
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page: params.limit};
|
|
||||||
},
|
|
||||||
afterFetch: (res) => {
|
|
||||||
tableRef.value.setToolBarWidth();
|
|
||||||
|
|
||||||
},
|
|
||||||
useSearchForm: true,
|
|
||||||
showTableSetting: true,
|
|
||||||
|
|
||||||
striped: false,
|
|
||||||
actionColumn: {
|
|
||||||
width: 160,
|
|
||||||
title: '操作',
|
|
||||||
dataIndex: 'action',
|
|
||||||
slots: { customRender: 'action' },
|
|
||||||
},
|
|
||||||
rowSelection: {
|
|
||||||
type: 'checkbox',
|
|
||||||
onChange: onSelectChange
|
|
||||||
},
|
|
||||||
tableSetting: {
|
|
||||||
size: false,
|
|
||||||
setting: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
});
|
|
||||||
const btnCheck = (record)=> {
|
|
||||||
openModalApproStatus(true,{isUpdate: false,id:record.demandId});
|
|
||||||
}
|
|
||||||
function onSelectChange(rowKeys: string[]) {
|
|
||||||
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: '/dayPlan/PngAppro/createForm',
|
|
||||||
query: {
|
|
||||||
formPath: curPath,
|
|
||||||
formName: formName,
|
|
||||||
formId:currentRoute.value.meta.formId,
|
|
||||||
id: record.id,
|
|
||||||
type: 'view'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// router.push({
|
|
||||||
// path: '/form/PngAppro/' + record.id + '/viewForm',
|
|
||||||
// query: {
|
|
||||||
// formPath: 'dayPlan/PngAppro',
|
|
||||||
// formName: formName,
|
|
||||||
// formId:currentRoute.value.meta.formId
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function buttonClick(code) {
|
|
||||||
|
|
||||||
btnEvent[code]();
|
|
||||||
}
|
|
||||||
function handleDatalog (record: Recordable) {
|
|
||||||
modalVisible.value = true
|
|
||||||
logId.value = record.id
|
|
||||||
}
|
|
||||||
function handleRefresh() {
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
function handleSuccess() {
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleView(record: Recordable) {
|
|
||||||
|
|
||||||
dbClickRow(record);
|
|
||||||
|
|
||||||
}
|
|
||||||
async function handleApprove(record: Recordable) {
|
|
||||||
let obj = {
|
|
||||||
"result": "C",
|
|
||||||
"remark": "",
|
|
||||||
"data": [{datePlan: record.datePlan}]
|
|
||||||
}
|
|
||||||
await requestApprove(obj)
|
|
||||||
handleSuccess();
|
|
||||||
notification.success({
|
|
||||||
message: 'Tip',
|
|
||||||
description: t('审批成功!'),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleReject (record: Recordable) {
|
|
||||||
curData.value = record
|
|
||||||
isOpen.value = true
|
|
||||||
}
|
|
||||||
const handleRejectReply = async (val) => {
|
|
||||||
let obj = {
|
|
||||||
"result": "R",
|
|
||||||
"remark": val.reply,
|
|
||||||
"data": [{datePlan: curData.value.datePlan}]
|
|
||||||
}
|
|
||||||
await requestApprove(obj)
|
|
||||||
isOpen.value = false
|
|
||||||
handleSuccess();
|
|
||||||
notification.success({
|
|
||||||
message: 'Tip',
|
|
||||||
description: t('已驳回!'),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
async function handleBatchApprove () {
|
|
||||||
if (!selectedKeys.value.length) {
|
|
||||||
notification.warning({
|
|
||||||
message: 'Tip',
|
|
||||||
description: t('请选择需要审批的数据'),
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let arr = selectedKeys.value.map(v=> {
|
|
||||||
return {
|
|
||||||
datePlan: v
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
let obj = {
|
|
||||||
"result": "C",
|
|
||||||
"remark": "",
|
|
||||||
"data": arr
|
|
||||||
}
|
|
||||||
await requestApprove(obj)
|
|
||||||
handleSuccess();
|
|
||||||
notification.success({
|
|
||||||
message: 'Tip',
|
|
||||||
description: t('审批成功!'),
|
|
||||||
});
|
|
||||||
clearSelectedRowKeys()
|
|
||||||
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
|
||||||
if (schemaIdComputedRef.value) {
|
|
||||||
bus.on(FLOW_PROCESSED, handleRefresh);
|
|
||||||
bus.on(CREATE_FLOW, handleRefresh);
|
|
||||||
} else {
|
|
||||||
bus.on(FORM_LIST_MODIFIED, handleRefresh);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 合并渲染覆盖配置中的列表配置,包括展示字段配置、搜索字段配置、按钮配置
|
|
||||||
mergeCustomListRenderConfig();
|
|
||||||
});
|
|
||||||
onUnmounted(() => {
|
|
||||||
if (schemaIdComputedRef.value) {
|
|
||||||
bus.off(FLOW_PROCESSED, handleRefresh);
|
|
||||||
bus.off(CREATE_FLOW, handleRefresh);
|
|
||||||
} else {
|
|
||||||
bus.off(FORM_LIST_MODIFIED, handleRefresh);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
function getActions(record: Recordable):ActionItem[] {
|
|
||||||
|
|
||||||
let actionsList: ActionItem[] = [];
|
|
||||||
let editAndDelBtn: ActionItem[] = [];
|
|
||||||
let hasFlowRecord = false;
|
|
||||||
actionButtonConfig.value?.map((button) => {
|
|
||||||
if (['view', 'copyData', 'approve', 'reject'].includes(button.code)) {
|
|
||||||
actionsList.push({
|
|
||||||
icon: button?.icon,
|
|
||||||
tooltip: button?.name,
|
|
||||||
onClick: btnEvent[button.code].bind(null, record),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (['edit', 'delete'].includes(button.code)) {
|
|
||||||
editAndDelBtn.push({
|
|
||||||
icon: button?.icon,
|
|
||||||
tooltip: button?.name,
|
|
||||||
color: button.code === 'delete' ? 'error' : undefined,
|
|
||||||
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);
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// if (!record.workflowData?.processId) {
|
|
||||||
// //与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
|
||||||
// actionsList = actionsList.concat(editAndDelBtn);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
return actionsList;
|
|
||||||
}
|
|
||||||
function handleStartwork(record: Recordable) {
|
|
||||||
const { processId, schemaId } = record.workflowData;
|
|
||||||
router.push({
|
|
||||||
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
|
|
||||||
query: {
|
|
||||||
readonly: 1,
|
|
||||||
taskId: '',
|
|
||||||
formName: formName
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleFlowRecord(record: Recordable) {
|
|
||||||
if (record.workflowData) {
|
|
||||||
visibleFlowRecordModal.value = true;
|
|
||||||
processIdRef.value = record.workflowData?.processId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleLaunchProcess(record: Recordable) {
|
|
||||||
const schemaId=record.workflowData?.schemaId||schemaIdComputedRef.value;
|
|
||||||
if(schemaId){
|
|
||||||
if(record.workflowData?.draftId){
|
|
||||||
let res = await getDraftInfo(record.workflowData.draftId);
|
|
||||||
if (isValidJSON(res.formData)) {
|
|
||||||
localStorage.setItem('draftsJsonStr', res.formData);
|
|
||||||
router.push({
|
|
||||||
path: '/flow/' + schemaId + '/'+record.workflowData.draftId+'/createFlow'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = await getLngPngAppro(record['id']);
|
|
||||||
const form={};
|
|
||||||
const key="form_"+schemaId+"_"+record['id'];
|
|
||||||
form[key]=result;
|
|
||||||
localStorage.setItem('formJsonStr', JSON.stringify(form));
|
|
||||||
router.push({
|
|
||||||
path: '/flow/' + schemaId + '/0/createFlow',
|
|
||||||
query: {
|
|
||||||
fromKey: key
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function handleApproveProcess(record: Recordable) {
|
|
||||||
const { processId, taskIds, schemaId } = record.workflowData;
|
|
||||||
router.push({
|
|
||||||
path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
|
|
||||||
query: {
|
|
||||||
taskId: taskIds[0],
|
|
||||||
formName: formName
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
function handleCloseLaunch() {
|
|
||||||
visibleLaunchProcessRef.value = false;
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
function handleCloseApproval() {
|
|
||||||
visibleApproveProcessRef.value = false;
|
|
||||||
reload();
|
|
||||||
}
|
|
||||||
async function mergeCustomListRenderConfig(){
|
|
||||||
if (formConfig.useCustomConfig) {
|
|
||||||
let formId=currentRoute.value.meta.formId;
|
|
||||||
//1.合并展示字段配置
|
|
||||||
let cols= await mergeColumns(customConfigColums.value,formId);
|
|
||||||
customConfigColums.value=cols;
|
|
||||||
//2.合并搜索字段配置
|
|
||||||
let sFormSchema= await mergeSearchFormSchema(customSearchFormSchema.value,formId);
|
|
||||||
customSearchFormSchema.value=sFormSchema;
|
|
||||||
//3.合并按钮配置
|
|
||||||
let btns= await mergeButtons(buttons.value,formId);
|
|
||||||
buttons.value=btns;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style lang="less" scoped>
|
|
||||||
:deep(.ant-table-selection-col) {
|
|
||||||
width: 50px;
|
|
||||||
}
|
|
||||||
.show{
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.hide{
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
</BasicTable>
|
</BasicTable>
|
||||||
<PngApproGdModal @register="registerModal" @success="handleSuccess" />
|
<PngApproGdModal @register="registerModal" @success="handleSuccess" />
|
||||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||||
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" />
|
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" @cancel="handleRejectCancel"/>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -166,6 +166,9 @@
|
|||||||
curData.value = record
|
curData.value = record
|
||||||
isOpen.value = true
|
isOpen.value = true
|
||||||
}
|
}
|
||||||
|
const handleRejectCancel = ()=> {
|
||||||
|
isOpen.value = false
|
||||||
|
}
|
||||||
const handleRejectReply = async (val) => {
|
const handleRejectReply = async (val) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
"result": "R",
|
"result": "R",
|
||||||
|
|||||||
@ -34,7 +34,7 @@
|
|||||||
</BasicTable>
|
</BasicTable>
|
||||||
<PngApproJszModal @register="registerModal" @success="handleSuccess" />
|
<PngApproJszModal @register="registerModal" @success="handleSuccess" />
|
||||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||||
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" />
|
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" @cancel="handleRejectCancel"/>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -180,6 +180,9 @@
|
|||||||
curData.value = record
|
curData.value = record
|
||||||
isOpen.value = true
|
isOpen.value = true
|
||||||
}
|
}
|
||||||
|
const handleRejectCancel = ()=> {
|
||||||
|
isOpen.value = false
|
||||||
|
}
|
||||||
const handleRejectReply = async (val) => {
|
const handleRejectReply = async (val) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
"result": "R",
|
"result": "R",
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
</BasicTable>
|
</BasicTable>
|
||||||
<PngMeasurePurModal @register="registerModal" @success="handleSuccess" />
|
<PngMeasurePurModal @register="registerModal" @success="handleSuccess" />
|
||||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||||
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" />
|
<rejectReplyModal :visible="isOpen" @success="handleRejectReply" @cancel="handleRejectCancel"/>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@ -235,6 +235,9 @@
|
|||||||
}
|
}
|
||||||
isOpen.value = true
|
isOpen.value = true
|
||||||
}
|
}
|
||||||
|
const handleRejectCancel = ()=> {
|
||||||
|
isOpen.value = false
|
||||||
|
}
|
||||||
const handleRejectReply = async (val) => {
|
const handleRejectReply = async (val) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
"ids": selectedKeys.value,
|
"ids": selectedKeys.value,
|
||||||
|
|||||||
Reference in New Issue
Block a user