审批提交弹框显示优化--lng调度审批
This commit is contained in:
@ -3,17 +3,28 @@ import { defHttp } from '/@/utils/http/axios';
|
|||||||
import { ErrorMessageMode } from '/#/axios';
|
import { ErrorMessageMode } from '/#/axios';
|
||||||
|
|
||||||
enum Api {
|
enum Api {
|
||||||
Page = '/dayPlan/lngAppro/page',
|
// Page = '/dayPlan/lngAppro/page',
|
||||||
|
Page = '/magic-api/dayPlan/lngAppro/page',
|
||||||
List = '/dayPlan/lngAppro/list',
|
List = '/dayPlan/lngAppro/list',
|
||||||
Info = '/dayPlan/lngAppro/info',
|
Info = '/dayPlan/lngAppro/info',
|
||||||
LngLngAppro = '/dayPlan/lngAppro',
|
// LngLngAppro = '/dayPlan/lngAppro',
|
||||||
|
LngLngAppro = '/dayPlan/lngAppro/approve',
|
||||||
|
compare = '/dayPlan/lngAppro/compare',
|
||||||
|
|
||||||
|
|
||||||
DataLog = '/dayPlan/lngAppro/datalog',
|
DataLog = '/dayPlan/lngAppro/datalog',
|
||||||
}
|
}
|
||||||
|
export async function getLngLngApproCompare(orgId: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngLngApproPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.compare,
|
||||||
|
params: { orgId },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description: 查询LngLngAppro分页列表
|
* @description: 查询LngLngAppro分页列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -11,15 +11,15 @@
|
|||||||
<div class="price-box">
|
<div class="price-box">
|
||||||
<div>
|
<div>
|
||||||
<span class="btn-title">修改价格/吉焦</span>
|
<span class="btn-title">修改价格/吉焦</span>
|
||||||
<a-input-search type="number" enter-button="批量修改" style="width: 200px" :min="0" v-model.trim="formData.priceGj" placeholder="请输入" @search="editBtn('priceGj')"/>
|
<a-input-search type="number" enter-button="批量修改" style="width: 200px" :min="0" v-model:value="formData.priceGj" placeholder="请输入" @search="editBtn('priceGj')"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="btn-title">修改价格/吨</span>
|
<span class="btn-title">修改价格/吨</span>
|
||||||
<a-input-search type="number" enter-button="批量修改" style="width: 200px" :min="0" v-model.trim="formData.priceTon" placeholder="请输入" @search="editBtn('priceTon')"/>
|
<a-input-search type="number" enter-button="批量修改" style="width: 200px" :min="0" v-model:value="formData.priceTon" placeholder="请输入" @search="editBtn('priceTon')"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="btn-title">修改金额</span>
|
<span class="btn-title">修改金额</span>
|
||||||
<a-input-search type="number" enter-button="批量修改" style="width: 200px" :min="0" v-model.trim="formData.amount" placeholder="请输入" @search="editBtn('amount')"/>
|
<a-input-search type="number" enter-button="批量修改" style="width: 200px" :min="0" v-model:value="formData.amount" placeholder="请输入" @search="editBtn('amount')"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a-table :columns="columns" :data-source="dataList" :scroll="{x: 1800}" :rowKey="rowKey" :pagination="false" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }">
|
<a-table :columns="columns" :data-source="dataList" :scroll="{x: 1800}" :rowKey="rowKey" :pagination="false" :row-selection="{ selectedRowKeys: selectedKeys, onChange: onSelectChange }">
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<a v-if="!disabled" @click="btnCheck(record, index, 'delete')">删除</a>
|
<a v-if="!disabled" @click="btnCheck(record, index, 'delete')">删除</a>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'kName'">
|
<template v-if="column.dataIndex === 'kName'">
|
||||||
<a @click="btnCheck(record, index, 'kName')">{{pageType=='supplier'?record.kpName :record.kName}}</a>
|
<a @click="btnCheck(record, index, 'kName')">{{record.kName}}</a>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@ -45,6 +45,7 @@
|
|||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import priceLngHdrListModal from '/@/components/common/priceLngHdrListModal.vue';
|
import priceLngHdrListModal from '/@/components/common/priceLngHdrListModal.vue';
|
||||||
import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat';
|
import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat';
|
||||||
|
import { kStringMaxLength } from 'node:buffer';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
@ -78,18 +79,32 @@
|
|||||||
formState: Object,
|
formState: Object,
|
||||||
pageType: String
|
pageType: String
|
||||||
});
|
});
|
||||||
const rowKey = props.pageType=='supplier' ? 'salesPurId': 'salesId'
|
const rowKey = 'salesId'
|
||||||
const emit = defineEmits(['change']);
|
const emit = defineEmits(['change']);
|
||||||
const onSelectChange = (rowKeys) => {
|
const onSelectChange = (rowKeys) => {
|
||||||
selectedKeys.value = rowKeys;
|
selectedKeys.value = rowKeys;
|
||||||
}
|
}
|
||||||
const editBtn = (val) => {
|
const editBtn = (k) => {
|
||||||
|
if (!formData[k]) {
|
||||||
|
message.warn('价格不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!selectedKeys.value.length) {
|
||||||
|
message.warn('请选择需要批量修改的数据')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dataList.value.forEach(v=> {
|
||||||
|
selectedKeys.value.forEach(i => {
|
||||||
|
if (v.id == i) {
|
||||||
|
v[k] = formData[k]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const handleBtn = (type) => {
|
const handleBtn = (type) => {
|
||||||
if (type === 'add') {
|
if (type === 'add') {
|
||||||
if (!props.formState.cpCode || !props.formState.comId) {
|
if (!props.formState.cpCode || !props.formState.comId) {
|
||||||
message.warn(props.pageType == 'customer' ? '请选择客户和交易主体' : '请选择供应商和交易主体')
|
message.warn('请选择客户和交易主体')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let obj = {
|
let obj = {
|
||||||
@ -114,8 +129,6 @@
|
|||||||
}
|
}
|
||||||
const handleSuccessHdr = (val) => {
|
const handleSuccessHdr = (val) => {
|
||||||
val.forEach(i =>{
|
val.forEach(i =>{
|
||||||
i.qtyMeaGj = props.pageType == 'supplier' ? i.qtyMeaPurGj : i.qtyMeaSalesGj
|
|
||||||
i.qtyMeaM3 = props.pageType == 'supplier' ? i.qtyMeaPurM3 : i.qtyMeaPurM3
|
|
||||||
delete i.lngFileUploadList
|
delete i.lngFileUploadList
|
||||||
})
|
})
|
||||||
if (!dataList.value.length) {
|
if (!dataList.value.length) {
|
||||||
@ -136,17 +149,6 @@
|
|||||||
emit('change', dataList.value)
|
emit('change', dataList.value)
|
||||||
}
|
}
|
||||||
if (type == 'kName'){
|
if (type == 'kName'){
|
||||||
if (props.pageType == 'supplier') {
|
|
||||||
router.push({
|
|
||||||
path: '/contract/ContractPurPng/viewForm',
|
|
||||||
query: {
|
|
||||||
formPath: 'dayPlan/PngSettleHdrPur',
|
|
||||||
id: record.kpId,
|
|
||||||
disabled: true
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return
|
|
||||||
}
|
|
||||||
router.push({
|
router.push({
|
||||||
path: '/contract/ContractSales/viewForm',
|
path: '/contract/ContractSales/viewForm',
|
||||||
query: {
|
query: {
|
||||||
@ -197,15 +199,7 @@
|
|||||||
() => props.pageType,
|
() => props.pageType,
|
||||||
(val) => {
|
(val) => {
|
||||||
if (val) {
|
if (val) {
|
||||||
let idx1 = columns.value.findIndex(v=>v.dataIndex == 'pointUpName')
|
|
||||||
let idx2 = columns.value.findIndex(v=>v.dataIndex == 'cuSname')
|
|
||||||
if (val == 'supplier') {
|
|
||||||
idx1 < 0 && columns.value.splice(4, 0, { title: t('上载点'), dataIndex: 'pointUpName', width: 200})
|
|
||||||
idx2 < 0 && columns.value.splice(5, 0, { title: t('客户'), dataIndex: 'cuSname', width: 200})
|
|
||||||
} else {
|
|
||||||
idx1>-1 && columns.value.splice(idx1, 1)
|
|
||||||
idx2>-1 && columns.value.splice(idx2, 1)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -350,6 +350,14 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
|
|||||||
title: (route) => route.query.formName
|
title: (route) => route.query.formName
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/dayPlan/LngAppro/createForm',
|
||||||
|
name: 'LngAppro',
|
||||||
|
component: () => import('/@/views/dayPlan/LngAppro/components/createForm.vue'),
|
||||||
|
meta: {
|
||||||
|
title: (route) => route.query.formName
|
||||||
|
}
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
220
src/views/dayPlan/LngAppro/components/basicForm.vue
Normal file
220
src/views/dayPlan/LngAppro/components/basicForm.vue
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
<template>
|
||||||
|
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="客户" name="cuSname" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
|
<div :class="diffResultList.includes('cuSname')?'changeStyle':''">
|
||||||
|
{{ formState.cuSname}}
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="计划日期" name="datePlan">
|
||||||
|
<div :class="diffResultList.includes('datePlan')?'changeStyle':''">
|
||||||
|
{{ formState.datePlan}}
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="合同" name="kName">
|
||||||
|
<div :class="diffResultList.includes('kName')?'changeStyle':''">{{ formState.kName }}</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="气源地" name="staName">
|
||||||
|
<div :class="diffResultList.includes('staName')?'changeStyle':''">{{ formState.staName }}</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="车头号" name="noTractor" :class="diffResultList.includes('noTractor')?'changeStyle':''">
|
||||||
|
{{ formState.noTractor }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="挂车号" name="noTrailer" :class="diffResultList.includes('noTrailer')?'changeStyle':''">
|
||||||
|
{{ formState.noTrailer }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="承运商" name="carrName" :class="diffResultList.includes('carrName')?'changeStyle':''">
|
||||||
|
{{ formState.carrName }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="驾驶员身份证号" name="idNoDriver" :class="diffResultList.includes('idNoDriver')?'changeStyle':''">
|
||||||
|
{{ formState.idNoDriver }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="驾驶员姓名" name="nameDriver" :class="diffResultList.includes('nameDriver')?'changeStyle':''">
|
||||||
|
{{ formState.nameDriver }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="驾驶员手机号" name="phoneDriver" :class="diffResultList.includes('phoneDriver')?'changeStyle':''">
|
||||||
|
{{ formState.phoneDriver }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="押运员身份证号" name="idNoEscort" :class="diffResultList.includes('idNoEscort')?'changeStyle':''">
|
||||||
|
{{ formState.idNoEscort }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="押运员姓名" name="nameEscort" :class="diffResultList.includes('nameEscort')?'changeStyle':''">
|
||||||
|
{{ formState.nameEscort }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="押运员手机号" name="phoneEscort" :class="diffResultList.includes('phoneEscort')?'changeStyle':''">
|
||||||
|
{{ formState.phoneEscort }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="卸货站点" name="unloadingName" :class="diffResultList.includes('unloadingName')?'changeStyle':''">
|
||||||
|
{{ formState.unloadingName }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="预约时间段" name="timePeriod" :class="diffResultList.includes('timePeriod')?'changeStyle':''">
|
||||||
|
<a-select v-model:value="formState.timePeriod" disabled placeholder="请选择预约时间段" style="width: 100%" allow-clear>
|
||||||
|
<a-select-option v-for="item in optionSelect.timePeriodList" :key="item.code" :value="item.code">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="预计卸货时间" name="timeUnloading">
|
||||||
|
<div :class="diffResultList.includes('timeUnloading')?'changeStyle':''">
|
||||||
|
{{ formState.timeUnloading }}
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="车辆类型" name="supplyCode" :class="diffResultList.includes('supplyCode')?'changeStyle':''">
|
||||||
|
<a-select v-model:value="formState.supplyCode" disabled placeholder="请选择车辆类型" style="width: 100%" allow-clear>
|
||||||
|
<a-select-option v-for="item in optionSelect.supplyCodeList" :key="item.code" :value="item.code">
|
||||||
|
{{ item.name }}
|
||||||
|
</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="压力容器登记证号" name="noTank" :class="diffResultList.includes('noTank')?'changeStyle':''">
|
||||||
|
{{formState.noTank}}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="充装量(吨)" name="qtyTon" :class="diffResultList.includes('qtyTon')?'changeStyle':''">{{ formState.qtyTon }}</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="供应商" name="comName" :class="diffResultList.includes('comName')?'changeStyle':''">{{ formState.comName }}</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="版本号" name="verNo" :class="diffResultList.includes('verNo')?'changeStyle':''">{{ formState.verNo }}</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="8">
|
||||||
|
<a-form-item label="审批状态" name="approName" :class="diffResultList.includes('approName')?'changeStyle':''">
|
||||||
|
{{ formState.approName }}
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
|
<div :class="diffResultList.includes('note')?'changeStyle':''">{{ formState.note }}</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||||
|
import { useModal } from '/@/components/Modal';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import { getDictionary } from '/@/api/sales/Customer';
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userInfo = userStore.getUserInfo;
|
||||||
|
const router = useRouter();
|
||||||
|
const { currentRoute } = router;
|
||||||
|
const pageId = ref(currentRoute.value.query?.id)
|
||||||
|
const pageType = ref(currentRoute.value.query?.type)
|
||||||
|
const formRef = ref()
|
||||||
|
const rules= reactive({
|
||||||
|
});
|
||||||
|
const layout = {
|
||||||
|
labelCol: { span: 9 },
|
||||||
|
wrapperCol: { span: 18 },
|
||||||
|
}
|
||||||
|
const { t } = useI18n();
|
||||||
|
const props = defineProps({
|
||||||
|
formObj: {},
|
||||||
|
disable: false,
|
||||||
|
changeList: []
|
||||||
|
});
|
||||||
|
const optionSelect= reactive({
|
||||||
|
timePeriodList: [],
|
||||||
|
supplyCodeList: [],
|
||||||
|
approCodeList: []
|
||||||
|
})
|
||||||
|
const diffResultList = ref([])
|
||||||
|
const formState = ref({})
|
||||||
|
onMounted(async () =>{
|
||||||
|
getOption()
|
||||||
|
})
|
||||||
|
async function getOption() {
|
||||||
|
optionSelect.timePeriodList = await getDictionary('LNG_TIME_P')
|
||||||
|
optionSelect.supplyCodeList = await getDictionary('LNG_SUPPLY')
|
||||||
|
|
||||||
|
}
|
||||||
|
async function getFormValue () {
|
||||||
|
await formRef.value.validateFields();
|
||||||
|
let obj = {
|
||||||
|
formInfo: formState.value,
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
}
|
||||||
|
watch(
|
||||||
|
() => props.formObj,
|
||||||
|
(val) => {
|
||||||
|
if (val) {
|
||||||
|
formState.value = val
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => props.changeList,
|
||||||
|
(val) => {
|
||||||
|
diffResultList.value = val || []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
defineExpose({
|
||||||
|
getFormValue
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
.changeStyle {
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
|
:deep(.changeStyle .ant-input) {
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
|
:deep(.changeStyle .ant-select-selection-item) {
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -27,8 +27,8 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'kName',
|
field: 'cuName',
|
||||||
label: '销售合同名称/编码',
|
label: '客户名称/简称/编码',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -39,18 +39,12 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
{
|
{
|
||||||
field: 'approCode',
|
field: 'approCode',
|
||||||
label: '审批状态',
|
label: '审批状态',
|
||||||
component: 'Select',
|
component: 'XjrSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
showSearch: true,
|
datasourceType: 'dic',
|
||||||
optionFilterProp: 'label',
|
params: { itemId: '2011630929726271489' },
|
||||||
filterOption: (input: string, option: any) => {
|
labelField: 'name',
|
||||||
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
valueField: 'value',
|
||||||
},
|
|
||||||
options: [
|
|
||||||
// { label: '全部', value: '' },
|
|
||||||
],
|
|
||||||
placeholder: '请选择',
|
|
||||||
allowClear: true,
|
|
||||||
|
|
||||||
getPopupContainer: () => document.body,
|
getPopupContainer: () => document.body,
|
||||||
},
|
},
|
||||||
@ -64,7 +58,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '版本号',
|
title: '版本号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 80,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -73,7 +67,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '计划日期',
|
title: '计划日期',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -82,7 +76,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '客户简称',
|
title: '客户简称',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -91,7 +85,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '气源地',
|
title: '气源地',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 130,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -100,7 +94,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '车头号',
|
title: '车头号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -109,7 +103,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '挂车号',
|
title: '挂车号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -118,7 +112,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '驾驶员身份证号',
|
title: '驾驶员身份证号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -127,7 +121,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '驾驶员姓名',
|
title: '驾驶员姓名',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -136,7 +130,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '驾驶员手机号',
|
title: '驾驶员手机号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -145,7 +139,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '押运员身份证号',
|
title: '押运员身份证号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -154,7 +148,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '押运员姓名',
|
title: '押运员姓名',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -163,7 +157,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '押运员手机号',
|
title: '押运员手机号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -172,16 +166,16 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '承运商',
|
title: '承运商',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
dataIndex: 'ksName',
|
dataIndex: 'kName',
|
||||||
title: '销售合同',
|
title: '销售合同',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -190,7 +184,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '卸货站点',
|
title: '卸货站点',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -199,7 +193,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '变更',
|
title: '变更',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 80,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -208,7 +202,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '审批状态',
|
title: '审批状态',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 100,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
215
src/views/dayPlan/LngAppro/components/createForm.vue
Normal file
215
src/views/dayPlan/LngAppro/components/createForm.vue
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
<template>
|
||||||
|
<a-spin :spinning="spinning" tip="加载中...">
|
||||||
|
<div class="page-bg-wrap formViewStyle pdcss">
|
||||||
|
<div class="top-toolbar" >
|
||||||
|
<a-button style="margin-right: 10px" @click="close">
|
||||||
|
<slot name="icon"><close-outlined /></slot>关闭
|
||||||
|
</a-button>
|
||||||
|
<template v-if="currentRoute.query.type!=='compare'">
|
||||||
|
<a-button style="margin-right: 10px" type="primary" @click="checkBtn('agree')" v-if="!currentRoute.query.type">
|
||||||
|
<slot name="icon"><check-circle-outlined /></slot>通过
|
||||||
|
</a-button>
|
||||||
|
<a-button style="margin-right: 10px" @click="checkBtn('reject')" v-if="!currentRoute.query.type">
|
||||||
|
<slot name="icon"><stop-outlined /></slot>驳回
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
|
||||||
|
<a-row v-if="currentRoute.query.type !=='compare'">
|
||||||
|
<a-col :span="24">
|
||||||
|
<a-form-item label="批复意见" name="reply" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
|
||||||
|
<a-textarea v-model:value="formState.reply" :disabled="currentRoute.query.type=='view'" placeholder="请输入备注" :auto-size="{ minRows: 2, maxRows: 5 }"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
<Card :title="titleNew" :bordered="false" v-if="currentRoute.query.type=='compare'&&titleNew">
|
||||||
|
<basicForm ref="basicFormRef" :formObj="formStateNew" :changeList="diffResultList" :list="dataListNew" :disable="currentRoute.query.type"></basicForm>
|
||||||
|
</Card>
|
||||||
|
<Card :title="title" :bordered="false" v-if="title">
|
||||||
|
<basicForm ref="basicFormRef" :formObj="formState" :list="dataList" :disable="currentRoute.query.type"></basicForm>
|
||||||
|
</Card>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
</a-spin>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { Card } from 'ant-design-vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
import { FromPageType, RecordType } from '/@/enums/workflowEnum';
|
||||||
|
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
|
||||||
|
import { CheckCircleOutlined, StopOutlined, CloseOutlined, } from '@ant-design/icons-vue';
|
||||||
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
|
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
|
||||||
|
import useEventBus from '/@/hooks/event/useEventBus';
|
||||||
|
import type { Rule } from 'ant-design-vue/es/form';
|
||||||
|
import { getDictionary } from '/@/api/sales/Customer';
|
||||||
|
import { useModal } from '/@/components/Modal';
|
||||||
|
import {getLngLngAppro,addLngLngAppro,getLngLngApproCompare} from '/@/api/dayPlan/LngAppro';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
import { getAppEnvConfig } from '/@/utils/env';
|
||||||
|
import { message } from 'ant-design-vue';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
import basicForm from './basicForm.vue'
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userInfo = userStore.getUserInfo;
|
||||||
|
|
||||||
|
const { bus, FORM_LIST_MODIFIED } = useEventBus();
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const { currentRoute } = router;
|
||||||
|
const { formPath } = currentRoute.value.query;
|
||||||
|
const pathArr = [];
|
||||||
|
|
||||||
|
const tabStore = useMultipleTabStore();
|
||||||
|
|
||||||
|
const pageId = ref(currentRoute.value.query?.id)
|
||||||
|
|
||||||
|
const spinning = ref(false);
|
||||||
|
const { notification } = useMessage();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const formState = reactive({
|
||||||
|
|
||||||
|
});
|
||||||
|
const formStateNew = reactive({
|
||||||
|
|
||||||
|
});
|
||||||
|
const [register, { openModal:openModal}] = useModal();
|
||||||
|
const rules= reactive({
|
||||||
|
// kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
});
|
||||||
|
const layout = {
|
||||||
|
labelCol: { span: 9 },
|
||||||
|
wrapperCol: { span: 18 },
|
||||||
|
}
|
||||||
|
const title = ref('日计划审批')
|
||||||
|
const titleNew = ref('')
|
||||||
|
const dataList = ref([])
|
||||||
|
const dataListNew = ref([])
|
||||||
|
const basicFormRef = ref()
|
||||||
|
const diffResultList = ref([])
|
||||||
|
onMounted(() => {
|
||||||
|
if (pageId.value) {
|
||||||
|
if (currentRoute.value.query.type=='compare') {
|
||||||
|
getCompareInfo(pageId.value)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
getInfo(pageId.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
async function getCompareInfo(id) {
|
||||||
|
spinning.value = true
|
||||||
|
try {
|
||||||
|
let data = await getLngLngApproCompare(id) || {}
|
||||||
|
spinning.value = false
|
||||||
|
diffResultList.value = data.diffResultList || []
|
||||||
|
let obj = changeData(data.oldBean || {})
|
||||||
|
Object.assign(formState, {...obj.params})
|
||||||
|
Object.assign(dataList.value, obj.list || [])
|
||||||
|
title.value = formState.verNo? ('版本V'+ formState.verNo) : ''
|
||||||
|
|
||||||
|
let obj1 = changeData(data.newBean || {})
|
||||||
|
Object.assign(formStateNew, {...obj1.params})
|
||||||
|
Object.assign(dataListNew.value, obj1.list || [])
|
||||||
|
titleNew.value = formStateNew.verNo ? ('版本V'+ formStateNew.verNo) : ''
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error, 'error')
|
||||||
|
spinning.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
async function getInfo(id) {
|
||||||
|
spinning.value = true
|
||||||
|
try {
|
||||||
|
let data = await getLngLngAppro(id)
|
||||||
|
spinning.value = false
|
||||||
|
let obj = changeData(data)
|
||||||
|
Object.assign(formState, {...obj.params})
|
||||||
|
Object.assign(dataList.value, obj.list || [])
|
||||||
|
} catch (error) {
|
||||||
|
spinning.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const changeData = (obj) => {
|
||||||
|
if (Object.keys(obj).length === 0) return {
|
||||||
|
list : [],
|
||||||
|
params: {}
|
||||||
|
}
|
||||||
|
obj.datePlan = obj.datePlan ? dayjs(obj.datePlan).format('YYYY-MM-DD') : null
|
||||||
|
return {
|
||||||
|
|
||||||
|
params: obj
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function close() {
|
||||||
|
tabStore.closeTab(currentRoute.value, router);
|
||||||
|
}
|
||||||
|
async function checkBtn(type) {
|
||||||
|
let params = {
|
||||||
|
result: type == 'agree' ? 'C' : 'R',
|
||||||
|
remark: formState.reply,
|
||||||
|
data: [{id: formState.id}]
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (type == 'reject') {
|
||||||
|
if (!formState.reply) {
|
||||||
|
message.warn('请输入批复意见')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spinning.value = true;
|
||||||
|
await addLngLngAppro(params);
|
||||||
|
spinning.value = false;
|
||||||
|
notification.success({
|
||||||
|
message: '提示',
|
||||||
|
description: type == 'agree' ? '审批通过':'已驳回'
|
||||||
|
}); //提示消息
|
||||||
|
setTimeout(() => {
|
||||||
|
bus.emit(FORM_LIST_MODIFIED, {});
|
||||||
|
close();
|
||||||
|
}, 500);
|
||||||
|
}catch (errorInfo) {
|
||||||
|
spinning.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.page-bg-wrap {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-toolbar {
|
||||||
|
min-height: 44px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
}
|
||||||
|
.pdcss {
|
||||||
|
padding:0px 12px 6px 12px !important;
|
||||||
|
}
|
||||||
|
.dot {
|
||||||
|
margin-right: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
i{
|
||||||
|
padding: 5px;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
span{
|
||||||
|
width: 10px !important;
|
||||||
|
height: 10px !important;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: red;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -32,7 +32,7 @@
|
|||||||
import { ref, computed, onMounted, onUnmounted, } from 'vue';
|
import { ref, computed, onMounted, onUnmounted, } from 'vue';
|
||||||
|
|
||||||
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table';
|
||||||
import { getLngLngApproPage, deleteLngLngAppro} from '/@/api/dayPlan/LngAppro';
|
import { getLngLngApproPage, deleteLngLngAppro,addLngLngAppro} from '/@/api/dayPlan/LngAppro';
|
||||||
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';
|
||||||
@ -79,7 +79,7 @@
|
|||||||
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
|
||||||
});
|
});
|
||||||
|
|
||||||
const btnEvent = {refresh : handleRefresh,view : handleView,datalog : handleDatalog,approve : handleApprove,}
|
const btnEvent = {refresh : handleRefresh,view : handleView,datalog : handleDatalog,approve : handleApprove,compare: handleCompare}
|
||||||
|
|
||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const selectedKeys = ref([])
|
const selectedKeys = ref([])
|
||||||
@ -90,7 +90,7 @@
|
|||||||
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
|
schemaIdComputedRef.value = currentRoute.value.meta.schemaId
|
||||||
const [registerModal, { openModal }] = useModal();
|
const [registerModal, { openModal }] = 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: getLngLngApproPage,
|
api: getLngLngApproPage,
|
||||||
rowKey: 'id',
|
rowKey: 'id',
|
||||||
@ -100,11 +100,11 @@
|
|||||||
gutter: 16,
|
gutter: 16,
|
||||||
},
|
},
|
||||||
schemas: customSearchFormSchema,
|
schemas: customSearchFormSchema,
|
||||||
fieldMapToTime: [],
|
fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||||
showResetButton: false,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
beforeFetch: (params) => {
|
beforeFetch: (params) => {
|
||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
||||||
},
|
},
|
||||||
afterFetch: (res) => {
|
afterFetch: (res) => {
|
||||||
tableRef.value.setToolBarWidth();
|
tableRef.value.setToolBarWidth();
|
||||||
@ -134,47 +134,72 @@
|
|||||||
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/LngAppro/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/LngAppro/' + record.id + '/viewForm',
|
|
||||||
query: {
|
query: {
|
||||||
formPath: 'dayPlan/LngAppro',
|
formPath: 'dayPlan/LngAppro',
|
||||||
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');
|
||||||
|
}
|
||||||
|
async function handleApprove(record: Recordable) {
|
||||||
|
if (record !== 'batch') {
|
||||||
|
router.push({
|
||||||
|
path: '/dayPlan/LngAppro/createForm',
|
||||||
|
query: {
|
||||||
|
formPath: 'dayPlan/LngAppro',
|
||||||
|
formName: '审批'+formName,
|
||||||
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.id,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return
|
||||||
}
|
}
|
||||||
function handleApprove () {
|
|
||||||
|
|
||||||
|
if (!selectedKeys.value.length) {
|
||||||
|
notification.warning({
|
||||||
|
message: '提示',
|
||||||
|
description: t('请选择需要审批的数据'),
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let arr = selectedKeys.value.map(v=> {
|
||||||
|
return {
|
||||||
|
id: v
|
||||||
|
}
|
||||||
|
})
|
||||||
|
let obj = {
|
||||||
|
"result": "C",
|
||||||
|
"remark": "",
|
||||||
|
"data": arr
|
||||||
|
}
|
||||||
|
await addLngLngAppro(obj)
|
||||||
|
handleSuccess();
|
||||||
|
notification.success({
|
||||||
|
message: '提示',
|
||||||
|
description: t('已审批!'),
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
function handleCompare (record: Recordable) {
|
||||||
|
router.push({
|
||||||
|
path: '/dayPlan/LngAppro/createForm',
|
||||||
|
query: {
|
||||||
|
formPath: 'dayPlan/LngAppro',
|
||||||
|
formName: '对比'+formName,
|
||||||
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.demandOrgId,
|
||||||
|
type: 'compare'
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
function handleDatalog (record: Recordable) {
|
function handleDatalog (record: Recordable) {
|
||||||
modalVisible.value = true
|
modalVisible.value = true
|
||||||
@ -184,7 +209,7 @@
|
|||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
function handleSuccess() {
|
function handleSuccess() {
|
||||||
|
clearSelectedRowKeys()
|
||||||
reload();
|
reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,27 +239,29 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
function getActions(record: Recordable):ActionItem[] {
|
function getActions(record: Recordable):ActionItem[] {
|
||||||
|
let actionsList: ActionItem[] = [];
|
||||||
const actionsList: ActionItem[] = actionButtonConfig.value?.map((button) => {
|
let approveBtn: ActionItem[] = [];
|
||||||
if (!record.workflowData?.processId) {
|
let viewBtn: ActionItem[] = [];
|
||||||
return {
|
actionButtonConfig.value?.map((button) => {
|
||||||
icon: button?.icon,
|
if (['view', 'copyData','compare', 'datalog'].includes(button.code)) {
|
||||||
tooltip: button?.name,
|
viewBtn.push({
|
||||||
color: button.code === 'delete' ? 'error' : undefined,
|
|
||||||
onClick: btnEvent[button.code].bind(null, record),
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
if (button.code === 'view') {
|
|
||||||
return {
|
|
||||||
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),
|
||||||
};
|
});
|
||||||
} else {
|
|
||||||
return {};
|
|
||||||
}
|
}
|
||||||
|
if (['approve'].includes(button.code)) {
|
||||||
|
approveBtn.push({
|
||||||
|
icon: button?.icon,
|
||||||
|
tooltip: button?.name,
|
||||||
|
onClick: btnEvent[button.code].bind(null, record),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (record.approCode == 'DD') {
|
||||||
|
actionsList = actionsList.concat(approveBtn);
|
||||||
|
}
|
||||||
|
actionsList = actionsList.concat(viewBtn);
|
||||||
return actionsList;
|
return actionsList;
|
||||||
}
|
}
|
||||||
async function mergeCustomListRenderConfig(){
|
async function mergeCustomListRenderConfig(){
|
||||||
@ -275,11 +302,11 @@
|
|||||||
max-width: 320px !important;
|
max-width: 320px !important;
|
||||||
}
|
}
|
||||||
:deep(.ant-col-8:nth-child(4) .ant-form-item-label) {
|
:deep(.ant-col-8:nth-child(4) .ant-form-item-label) {
|
||||||
width: 130px !important;
|
width: 150px !important;
|
||||||
max-width: 130px !important;
|
max-width: 150px !important;
|
||||||
}
|
}
|
||||||
:deep(.ant-col-8:nth-child(4) .ant-form-item-label label) {
|
:deep(.ant-col-8:nth-child(4) .ant-form-item-label label) {
|
||||||
width: 130px !important;
|
width: 150px !important;
|
||||||
max-width: 130px !important;
|
max-width: 150px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -6,19 +6,19 @@
|
|||||||
<div v-if="pageType=='compare'" :class="diffResultList.includes('datePlan')?'changeStyle':''">
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('datePlan')?'changeStyle':''">
|
||||||
{{ formState.datePlan ? dayjs(formState.datePlan).format('YYYY-MM-DD'): null }}
|
{{ formState.datePlan ? dayjs(formState.datePlan).format('YYYY-MM-DD'): null }}
|
||||||
</div>
|
</div>
|
||||||
<a-date-picker :inputReadOnly="true" v-else v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" :disabled="disable||pageType=='edit'" placeholder="请选择计划日期" @change="datePlanChange" />
|
<a-date-picker :inputReadOnly="true" v-else v-model:value="formState.datePlan" :disabled-date="disabledDateStart" style="width: 100%" :disabled="disable||pageType=='edit'||pageType=='update'" placeholder="请选择计划日期" @change="datePlanChange" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="合同" name="kName">
|
<a-form-item label="合同" name="kName">
|
||||||
<div v-if="pageType=='compare'" :class="diffResultList.includes('kName')?'changeStyle':''">{{ formState.kName }}</div>
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('kName')?'changeStyle':''">{{ formState.kName }}</div>
|
||||||
<a-input-search v-else v-model:value="formState.kName" :disabled="disable||pageType=='edit'" placeholder="请选择合同" readonly @search="onSearch"/>
|
<a-input-search v-else v-model:value="formState.kName" :disabled="disable||pageType=='edit'||pageType=='update'" placeholder="请选择合同" readonly @search="onSearch"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="气源地" name="staName">
|
<a-form-item label="气源地" name="staName">
|
||||||
<div v-if="pageType=='compare'" :class="diffResultList.includes('staName')?'changeStyle':''">{{ formState.staName }}</div>
|
<div v-if="pageType=='compare'" :class="diffResultList.includes('staName')?'changeStyle':''">{{ formState.staName }}</div>
|
||||||
<a-input-search v-else v-model:value="formState.staName" :disabled="disable||pageType=='edit'" placeholder="请选择气源地" readonly @search="onSearchUpLoad"/>
|
<a-input-search v-else v-model:value="formState.staName" :disabled="disable||pageType=='edit'||pageType=='update'" placeholder="请选择气源地" readonly @search="onSearchUpLoad"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -191,7 +191,8 @@
|
|||||||
});
|
});
|
||||||
const optionSelect= reactive({
|
const optionSelect= reactive({
|
||||||
timePeriodList: [],
|
timePeriodList: [],
|
||||||
supplyCodeList: []
|
supplyCodeList: [],
|
||||||
|
approCodeList: []
|
||||||
})
|
})
|
||||||
const diffResultList = ref([])
|
const diffResultList = ref([])
|
||||||
const formState = ref({})
|
const formState = ref({})
|
||||||
@ -362,4 +363,7 @@
|
|||||||
:deep(.changeStyle .ant-input) {
|
:deep(.changeStyle .ant-input) {
|
||||||
color: red !important;
|
color: red !important;
|
||||||
}
|
}
|
||||||
|
:deep(.changeStyle .ant-select-selection-item) {
|
||||||
|
color: red !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -59,7 +59,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '版本号',
|
title: '版本号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 80,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '计划日期',
|
title: '计划日期',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '气源地',
|
title: '气源地',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '车头号',
|
title: '车头号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -95,7 +95,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '挂车号',
|
title: '挂车号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '驾驶员身份证号',
|
title: '驾驶员身份证号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '驾驶员姓名',
|
title: '驾驶员姓名',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '驾驶员手机号',
|
title: '驾驶员手机号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '押运员身份证号',
|
title: '押运员身份证号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '押运员姓名',
|
title: '押运员姓名',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '押运员手机号',
|
title: '押运员手机号',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '承运商',
|
title: '承运商',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '合同',
|
title: '合同',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 150,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '变更',
|
title: '变更',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 80,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ export const columns: BasicColumn[] = [
|
|||||||
title: '审批状态',
|
title: '审批状态',
|
||||||
componentType: 'input',
|
componentType: 'input',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 80,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -183,7 +183,7 @@
|
|||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
let request = submitSaveLngDemand
|
let request = submitSaveLngDemand
|
||||||
if (type == 'save') {
|
if (type == 'save') {
|
||||||
request = !pageId.value ? addLngLngDemand : updateLngLngDemand
|
request = (!pageId.value || pageType.value=='update') ? addLngLngDemand : updateLngLngDemand
|
||||||
}
|
}
|
||||||
await request(obj)
|
await request(obj)
|
||||||
spinning.value = false;
|
spinning.value = false;
|
||||||
|
|||||||
@ -101,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":"withdraw","icon":"ant-design:rollback-outlined","isDefault":false},
|
{"isUse":true,"name":"撤回","code":"withdraw","icon":"ant-design:rollback-outlined","isDefault":true},
|
||||||
{"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},]
|
||||||
@ -290,7 +290,7 @@
|
|||||||
path: '/dayPlan/LngDemand/createForm',
|
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,
|
id: record.id,
|
||||||
type: 'update'
|
type: 'update'
|
||||||
|
|||||||
@ -77,7 +77,7 @@
|
|||||||
<UploadList :disabled="isDisable" :list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName" @change="uploadListChange"/>
|
<UploadList :disabled="isDisable" :list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName" @change="uploadListChange"/>
|
||||||
</Card>
|
</Card>
|
||||||
<Card>
|
<Card>
|
||||||
<settleLngHdrList :list="dataList" :disabled="isDisable" pageType="customer" :formState="formState" @change="settleChange"></settleLngHdrList>
|
<settleLngHdrList :list="dataList" :disabled="isDisable" :formState="formState" @change="settleChange"></settleLngHdrList>
|
||||||
</Card>
|
</Card>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -15,6 +15,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.dataIndex === 'lngFileUploadList'">
|
||||||
|
<div v-for="(item, idx) in record.lngFileUploadList">
|
||||||
|
<a @click="handleDownload(item)">{{item.fileOrg}}</a>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template v-if="column.dataIndex === 'action'">
|
<template v-if="column.dataIndex === 'action'">
|
||||||
<TableAction :actions="getActions(record)" />
|
<TableAction :actions="getActions(record)" />
|
||||||
</template>
|
</template>
|
||||||
@ -29,9 +34,7 @@
|
|||||||
const logId = ref('')
|
const logId = ref('')
|
||||||
const logPath = ref('/dayPlan/lngSettleHdr/datalog');
|
const logPath = ref('/dayPlan/lngSettleHdr/datalog');
|
||||||
import { DataLog } from '/@/components/pcitc';
|
import { DataLog } from '/@/components/pcitc';
|
||||||
import { ref, computed, onMounted, onUnmounted, createVNode,
|
import { ref, computed, onMounted, onUnmounted, createVNode,watch } 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';
|
||||||
@ -51,11 +54,16 @@
|
|||||||
import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue';
|
import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue';
|
||||||
import { getDraftInfo } from '/@/api/workflow/process';
|
import { getDraftInfo } from '/@/api/workflow/process';
|
||||||
import { isValidJSON } from '/@/utils/event/design';
|
import { isValidJSON } from '/@/utils/event/design';
|
||||||
|
import { parseDownloadUrl} from '/@/api/system/file';
|
||||||
|
import { downloadByUrl } from '/@/utils/file/download';
|
||||||
import LngSettleHdrModal from './components/LngSettleHdrModal.vue';
|
import LngSettleHdrModal from './components/LngSettleHdrModal.vue';
|
||||||
import {formConfig, searchFormSchema, columns } from './components/config';
|
import {formConfig, searchFormSchema, columns } from './components/config';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
|
import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat';
|
||||||
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
import FlowRecord from '/@/views/workflow/task/components/flow/FlowRecord.vue';
|
||||||
|
import { useUserStore } from '/@/store/modules/user';
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const userInfo = userStore.getUserInfo;
|
||||||
|
|
||||||
import useEventBus from '/@/hooks/event/useEventBus';
|
import useEventBus from '/@/hooks/event/useEventBus';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
@ -111,7 +119,7 @@
|
|||||||
const visibleFlowRecordModal = ref(false);
|
const visibleFlowRecordModal = ref(false);
|
||||||
const [registerModal, { openModal }] = useModal();
|
const [registerModal, { openModal }] = useModal();
|
||||||
const formName=currentRoute.value.meta?.title;
|
const formName=currentRoute.value.meta?.title;
|
||||||
const [registerTable, { reload, }] = useTable({
|
const [registerTable, { reload, setTableData }] = useTable({
|
||||||
title: '' || (formName + '列表'),
|
title: '' || (formName + '列表'),
|
||||||
api: getLngLngSettleHdrPage,
|
api: getLngLngSettleHdrPage,
|
||||||
rowKey: 'id',
|
rowKey: 'id',
|
||||||
@ -128,6 +136,7 @@
|
|||||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
|
||||||
},
|
},
|
||||||
afterFetch: (res) => {
|
afterFetch: (res) => {
|
||||||
|
tableData.value = res || []
|
||||||
tableRef.value.setToolBarWidth();
|
tableRef.value.setToolBarWidth();
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -147,7 +156,29 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
watch(
|
||||||
|
() => tableData.value,
|
||||||
|
(val) => {
|
||||||
|
if (val) {
|
||||||
|
let arr = DataFormat.format(val, [
|
||||||
|
FormatOption.createQty('qtySettleTon'),
|
||||||
|
FormatOption.createAmt('amount'),
|
||||||
|
]);
|
||||||
|
if (arr.length) {
|
||||||
|
setTableData(arr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const handleDownload = (info) => {
|
||||||
|
const url = parseDownloadUrl(info.response ? info.response.data.fileUrl : info.fileUrl);
|
||||||
|
const fileName = info.response ? info.response.data.fileOrg : info.fileOrg;
|
||||||
|
downloadByUrl({ url, fileName: fileName});
|
||||||
|
};
|
||||||
function dbClickRow(record) {
|
function dbClickRow(record) {
|
||||||
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
|
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
|
||||||
return;
|
return;
|
||||||
@ -159,7 +190,9 @@
|
|||||||
query: {
|
query: {
|
||||||
taskId: taskIds[0],
|
taskId: taskIds[0],
|
||||||
formName: formName,
|
formName: formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.id,
|
||||||
|
readonly: 1,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (schemaId && !taskIds && processId) {
|
} else if (schemaId && !taskIds && processId) {
|
||||||
@ -169,19 +202,33 @@
|
|||||||
readonly: 1,
|
readonly: 1,
|
||||||
taskId: '',
|
taskId: '',
|
||||||
formName: formName,
|
formName: formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId,
|
||||||
|
id: record.id,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (schemaIdComputedRef.value) {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/form/LngSettleHdr/' + record.id + '/viewForm',
|
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||||
query: {
|
query: {
|
||||||
formPath: 'dayPlan/LngSettleHdr',
|
formPath: 'dayPlan/LngSettleHdr',
|
||||||
formName: formName,
|
formName: "查看"+formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId,
|
||||||
|
type:'view',
|
||||||
|
id: record.id,
|
||||||
|
disabled: 1,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// router.push({
|
||||||
|
// path: '/form/LngSettleHdr/' + record.id + '/viewForm',
|
||||||
|
// query: {
|
||||||
|
// formPath: 'dayPlan/LngSettleHdr',
|
||||||
|
// formName: formName,
|
||||||
|
// formId:currentRoute.value.meta.formId
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function buttonClick(code) {
|
function buttonClick(code) {
|
||||||
@ -196,7 +243,11 @@
|
|||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
if (schemaIdComputedRef.value) {
|
if (schemaIdComputedRef.value) {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow'
|
path: '/flow/' + schemaIdComputedRef.value + '/0/createFlow',
|
||||||
|
query: {
|
||||||
|
formPath: 'contract/ContractPurLng',
|
||||||
|
formName: "新建"+formName,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
router.push({
|
router.push({
|
||||||
@ -216,13 +267,26 @@
|
|||||||
path: '/form/LngSettleHdr/' + record.id + '/updateForm',
|
path: '/form/LngSettleHdr/' + record.id + '/updateForm',
|
||||||
query: {
|
query: {
|
||||||
formPath: 'dayPlan/LngSettleHdr',
|
formPath: 'dayPlan/LngSettleHdr',
|
||||||
formName: formName,
|
formName: "编辑"+formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId,
|
||||||
|
type:'edit',
|
||||||
|
id: record.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function handleApprove () {
|
function handleApprove () {
|
||||||
|
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,
|
||||||
|
id: record.id
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function handleDelete(record: Recordable) {
|
function handleDelete(record: Recordable) {
|
||||||
deleteList([record.id]);
|
deleteList([record.id]);
|
||||||
@ -283,9 +347,10 @@
|
|||||||
|
|
||||||
let actionsList: ActionItem[] = [];
|
let actionsList: ActionItem[] = [];
|
||||||
let editAndDelBtn: ActionItem[] = [];
|
let editAndDelBtn: ActionItem[] = [];
|
||||||
|
let approveBtn: ActionItem[] = [];
|
||||||
let hasFlowRecord = false;
|
let hasFlowRecord = false;
|
||||||
actionButtonConfig.value?.map((button) => {
|
actionButtonConfig.value?.map((button) => {
|
||||||
if (['view', 'copyData'].includes(button.code)) {
|
if (['view', 'copyData','datalog'].includes(button.code)) {
|
||||||
actionsList.push({
|
actionsList.push({
|
||||||
icon: button?.icon,
|
icon: button?.icon,
|
||||||
tooltip: button?.name,
|
tooltip: button?.name,
|
||||||
@ -300,21 +365,41 @@
|
|||||||
onClick: btnEvent[button.code].bind(null, record),
|
onClick: btnEvent[button.code].bind(null, record),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (['approve'].includes(button.code)) {
|
||||||
|
approveBtn.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 == 'WTJ' || record.approCode == 'YBH' ) {
|
||||||
if (record.workflowData.status) {
|
|
||||||
actionsList.unshift(setIndexFlowStatus(record.workflowData))
|
|
||||||
} else {
|
|
||||||
actionsList = actionsList.concat(editAndDelBtn);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!record.workflowData?.processId) {
|
|
||||||
//与工作流没有关联的表单并且在当前页面新增的数据 如选择编辑、删除按钮则加上
|
|
||||||
actionsList = actionsList.concat(editAndDelBtn);
|
actionsList = actionsList.concat(editAndDelBtn);
|
||||||
|
|
||||||
|
if (record.createUserId !== userInfo.id) {
|
||||||
|
let idx = actionsList.findIndex(v =>v.tooltip == '删除')
|
||||||
|
idx > -1 && actionsList.splice(idx, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 审批中SPZ
|
||||||
|
if (record.workflowData?.editable) {
|
||||||
|
actionsList = actionsList.concat(approveBtn);
|
||||||
|
}
|
||||||
|
// 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) {
|
||||||
|
|||||||
@ -271,6 +271,15 @@
|
|||||||
data.submitLoading = false;
|
data.submitLoading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!nextNodes[0]?.chooseAssign) {
|
||||||
|
const nextTaskUser = {};
|
||||||
|
let arr = (nextNodes[0]?.userList||[]).map(v =>v.F_UserId)
|
||||||
|
nextTaskUser[nextNodes[0]?.activityId] = arr.join(',')
|
||||||
|
approvalData.nextTaskUser = nextTaskUser
|
||||||
|
onFinish({})
|
||||||
|
return
|
||||||
|
}
|
||||||
opinionDlg.value.toggleDialog({
|
opinionDlg.value.toggleDialog({
|
||||||
action: 'agree',
|
action: 'agree',
|
||||||
actionFlowType: 'submit',
|
actionFlowType: 'submit',
|
||||||
|
|||||||
@ -17,6 +17,7 @@ export const customFormConfig = {
|
|||||||
'ContractProc',
|
'ContractProc',
|
||||||
'PricePurPngApp',
|
'PricePurPngApp',
|
||||||
'PriceSalesPngApp',
|
'PriceSalesPngApp',
|
||||||
'ContractPurLng'
|
'ContractPurLng',
|
||||||
|
'LngSettleHdr'
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user