入库
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 = '/inventory/lngInventoryIn/page',
|
// Page = '/inventory/lngInventoryIn/page',
|
||||||
|
Page = '/magic-api/inventory/inventoryInPageList',
|
||||||
List = '/inventory/lngInventoryIn/list',
|
List = '/inventory/lngInventoryIn/list',
|
||||||
Info = '/inventory/lngInventoryIn/info',
|
Info = '/inventory/lngInventoryIn/info',
|
||||||
LngInventoryIn = '/inventory/lngInventoryIn',
|
LngInventoryIn = '/inventory/lngInventoryIn',
|
||||||
|
lngInventorySelectMpi='/magic-api/inventory/lngInventorySelectMpi',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DataLog = '/inventory/lngInventoryIn/datalog',
|
DataLog = '/inventory/lngInventoryIn/datalog',
|
||||||
}
|
}
|
||||||
|
export async function getLngInventoryInShip(id: String, mode: ErrorMessageMode = 'modal') {
|
||||||
|
return defHttp.get<LngInventoryInPageModel>(
|
||||||
|
{
|
||||||
|
url: Api.lngInventorySelectMpi,
|
||||||
|
params: { id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
errorMessageMode: mode,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @description: 查询LngInventoryIn分页列表
|
* @description: 查询LngInventoryIn分页列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -14,20 +14,10 @@
|
|||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import { getLngOpsPurIntPage} from '/@/api/ship/OpsPurInt';
|
import { getLngOpsPurIntPage} from '/@/api/ship/OpsPurInt';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const codeFormSchema: FormSchema[] = [
|
const codeFormSchema: FormSchema[] = [
|
||||||
{ field: 'ssNo', label: '船期编号', component: 'Input'},
|
|
||||||
{
|
|
||||||
field: 'dateFrom',
|
|
||||||
label: '卸港ETA',
|
|
||||||
component: 'RangePicker',
|
|
||||||
componentProps: {
|
|
||||||
format: 'YYYY-MM-DD',
|
|
||||||
style: { width: '100%' },
|
|
||||||
getPopupContainer: () => document.body,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const columns: BasicColumn[] = [
|
const columns: BasicColumn[] = [
|
||||||
@ -50,8 +40,11 @@
|
|||||||
const selectedValues = ref([]);
|
const selectedValues = ref([]);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
selectType: { type: String, default: 'radio' },
|
selectType: { type: String, default: 'radio' },
|
||||||
|
defaultDateType: { type: Boolean, default: false }
|
||||||
|
|
||||||
});
|
});
|
||||||
|
const defaultDate = ref([dayjs().subtract(7, 'day').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]);
|
||||||
|
|
||||||
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
||||||
showTable.value = true
|
showTable.value = true
|
||||||
setModalProps({ confirmLoading: false });
|
setModalProps({ confirmLoading: false });
|
||||||
@ -69,7 +62,20 @@
|
|||||||
canResize: false,
|
canResize: false,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
labelCol:{span: 9, offSet:10},
|
labelCol:{span: 9, offSet:10},
|
||||||
schemas: codeFormSchema,
|
schemas: [
|
||||||
|
{ field: 'ssNo', label: '船期编号', component: 'Input'},
|
||||||
|
{
|
||||||
|
field: 'dateFrom',
|
||||||
|
label: '卸港ETA',
|
||||||
|
component: 'RangePicker',
|
||||||
|
defaultValue: props.defaultDateType ? defaultDate.value : [],
|
||||||
|
componentProps: {
|
||||||
|
format: 'YYYY-MM-DD',
|
||||||
|
style: { width: '100%' },
|
||||||
|
getPopupContainer: () => document.body,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
|
||||||
showResetButton: true,
|
showResetButton: true,
|
||||||
},
|
},
|
||||||
@ -89,7 +95,11 @@
|
|||||||
await nextTick();
|
await nextTick();
|
||||||
await nextTick();
|
await nextTick();
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
reload();
|
if (props.defaultDateType) {
|
||||||
|
reload({ searchInfo: { startDate: defaultDate.value[0], endDate: defaultDate.value[1] }});
|
||||||
|
} else {
|
||||||
|
reload()
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -97,7 +107,7 @@
|
|||||||
selectedKeys.value = rowKeys;
|
selectedKeys.value = rowKeys;
|
||||||
selectedValues.value = e
|
selectedValues.value = e
|
||||||
}
|
}
|
||||||
const getTitle = computed(() => (!unref(isUpdate) ? t('采购执行列表') : t('')));
|
const getTitle = ('采购执行列表')
|
||||||
|
|
||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
if (!selectedValues.value.length) {
|
if (!selectedValues.value.length) {
|
||||||
|
|||||||
@ -143,16 +143,16 @@
|
|||||||
const emit = defineEmits(['change']);
|
const emit = defineEmits(['change']);
|
||||||
const numCount = (record, idx, k)=> {
|
const numCount = (record, idx, k)=> {
|
||||||
let uomCode = dataListPrice.value[idx].uomCode
|
let uomCode = dataListPrice.value[idx].uomCode
|
||||||
if (uomCode == 'GJ' && k == 'rateQtyGj' && record[k]) {
|
if (uomCode == 'GJ' && k == 'rateQtyGj') {
|
||||||
record.rateQtyM3 = record.rateM3Gj ? (Number(record.rateQtyGj || 0)/ Number(record.rateM3Gj)).toFixed(4) : ''
|
record.rateQtyM3 = record.rateM3Gj ? (Number(record.rateQtyGj || 0)/ Number(record.rateM3Gj)).toFixed(4) : ''
|
||||||
}
|
}
|
||||||
if (uomCode == 'GJ' && k == 'priceGj' && record[k]) {
|
if (uomCode == 'GJ' && k == 'priceGj') {
|
||||||
record.priceM3 = record.rateM3Gj ? (Number(record.priceGj || 0) / Number(record.rateM3Gj)).toFixed(4) : ''
|
record.priceM3 = record.rateM3Gj ? (Number(record.priceGj || 0) / Number(record.rateM3Gj)).toFixed(4) : ''
|
||||||
}
|
}
|
||||||
if (uomCode == 'M3' && k == 'rateQtyM3' && record[k]) {
|
if (uomCode == 'M3' && k == 'rateQtyM3' ) {
|
||||||
record.rateQtyGj = (Number(record.rateQtyM3 || 0)*Number(record.rateM3Gj || 0)).toFixed(3)
|
record.rateQtyGj = (Number(record.rateQtyM3 || 0)*Number(record.rateM3Gj || 0)).toFixed(3)
|
||||||
}
|
}
|
||||||
if (uomCode == 'M3' && k == 'priceM3' && record[k]) {
|
if (uomCode == 'M3' && k == 'priceM3') {
|
||||||
record.priceGj = (Number(record.priceM3 || 0)*Number(record.rateM3Gj || 0)).toFixed(3)
|
record.priceGj = (Number(record.priceM3 || 0)*Number(record.rateM3Gj || 0)).toFixed(3)
|
||||||
}
|
}
|
||||||
updatePriceDesc(idx)
|
updatePriceDesc(idx)
|
||||||
|
|||||||
@ -25,19 +25,19 @@
|
|||||||
<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 }">
|
||||||
<template #bodyCell="{ column, record, index }">
|
<template #bodyCell="{ column, record, index }">
|
||||||
<template v-if="column.dataIndex === 'qtySettleGj'">
|
<template v-if="column.dataIndex === 'qtySettleGj'">
|
||||||
<input-number v-model:value="record.qtySettleGj" :disabled="disabled" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="record.qtySettleGj" :disabled="disabled" :digits="3" :min="0" @change="numCount" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'qtySettleTon'">
|
<template v-if="column.dataIndex === 'qtySettleTon'">
|
||||||
<input-number v-model:value="record.qtySettleTon" :disabled="disabled" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="record.qtySettleTon" :disabled="disabled" :digits="3" :min="0" @change="numCount" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'priceGj'">
|
<template v-if="column.dataIndex === 'priceGj'">
|
||||||
<input-number v-model:value="record.priceGj" :disabled="disabled" :digits="4" :min="0" style="width: 100%" />
|
<input-number v-model:value="record.priceGj" :disabled="disabled" :digits="4" :min="0" @change="numCount" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'priceTon'">
|
<template v-if="column.dataIndex === 'priceTon'">
|
||||||
<input-number v-model:value="record.priceTon" :disabled="disabled" :digits="4" :min="0" style="width: 100%" />
|
<input-number v-model:value="record.priceTon" :disabled="disabled" :digits="4" :min="0" @change="numCount" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'amount'">
|
<template v-if="column.dataIndex === 'amount'">
|
||||||
<input-number v-model:value="record.amount" :disabled="disabled" :digits="2" :min="0" style="width: 100%" />
|
<input-number v-model:value="record.amount" :disabled="disabled" :digits="2" :min="0" @change="numCount" style="width: 100%" />
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.dataIndex === 'operation'">
|
<template v-if="column.dataIndex === 'operation'">
|
||||||
<a v-if="!disabled" @click="btnCheck(record, index, 'delete')">删除</a>
|
<a v-if="!disabled" @click="btnCheck(record, index, 'delete')">删除</a>
|
||||||
@ -74,13 +74,13 @@
|
|||||||
{ title: t('挂车号'), dataIndex: 'noTrailer', width:120},
|
{ title: t('挂车号'), dataIndex: 'noTrailer', width:120},
|
||||||
{ title: t('进厂皮重时间'), dataIndex: 'timeIn', width:160},
|
{ title: t('进厂皮重时间'), dataIndex: 'timeIn', width:160},
|
||||||
{ title: t('出厂毛重时间'), dataIndex: 'timeOut', width:160},
|
{ title: t('出厂毛重时间'), dataIndex: 'timeOut', width:160},
|
||||||
{ title: t('装车量(吉焦)'), dataIndex: 'qtyMeaGj', width:140},
|
{ title: t('装车量(吉焦)'), dataIndex: 'qtyMeaGj', width:170},
|
||||||
{ title: t('装车量(吨)'), dataIndex: 'qtyMeaTon', width:140},
|
{ title: t('装车量(吨)'), dataIndex: 'qtyMeaTon', width:170},
|
||||||
{ title: t('结算量(吉焦)'), dataIndex: 'qtySettleGj', width: 150},
|
{ title: t('结算量(吉焦)'), dataIndex: 'qtySettleGj', width: 170},
|
||||||
{ title: t('结算量(吨)'), dataIndex: 'qtySettleTon', width: 140},
|
{ title: t('结算量(吨)'), dataIndex: 'qtySettleTon', width: 170},
|
||||||
{ title: t('结算价格(元/吉焦)'), dataIndex: 'priceGj', width: 180},
|
{ title: t('结算价格(元/吉焦)'), dataIndex: 'priceGj', width: 180},
|
||||||
{ title: t('结算价格(元/吨)'), dataIndex: 'priceTon', width: 170},
|
{ title: t('结算价格(元/吨)'), dataIndex: 'priceTon', width: 180},
|
||||||
{ title: t('结算金额(元)'), dataIndex: 'amount', width: 140},
|
{ title: t('结算金额(元)'), dataIndex: 'amount', width: 170},
|
||||||
{ title: t('合同名称'), dataIndex: 'kName', width: 180},
|
{ title: t('合同名称'), dataIndex: 'kName', width: 180},
|
||||||
{ title: t('结算次数'), dataIndex: 'settleTimes', width: 100},
|
{ title: t('结算次数'), dataIndex: 'settleTimes', width: 100},
|
||||||
{ title: t('操作'), dataIndex: 'operation', width: 80},
|
{ title: t('操作'), dataIndex: 'operation', width: 80},
|
||||||
@ -95,6 +95,10 @@
|
|||||||
});
|
});
|
||||||
const rowKey = 'salesId'
|
const rowKey = 'salesId'
|
||||||
const emit = defineEmits(['change']);
|
const emit = defineEmits(['change']);
|
||||||
|
|
||||||
|
const numCount = () => {
|
||||||
|
emit('change', dataList.value)
|
||||||
|
}
|
||||||
const onSelectChange = (rowKeys) => {
|
const onSelectChange = (rowKeys) => {
|
||||||
selectedKeys.value = rowKeys;
|
selectedKeys.value = rowKeys;
|
||||||
}
|
}
|
||||||
@ -111,6 +115,7 @@
|
|||||||
selectedKeys.value.forEach(i => {
|
selectedKeys.value.forEach(i => {
|
||||||
if (v.salesId == i) {
|
if (v.salesId == i) {
|
||||||
v[k] = formData[k]
|
v[k] = formData[k]
|
||||||
|
emit('change', dataList.value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -123,7 +128,6 @@
|
|||||||
}
|
}
|
||||||
let obj = {
|
let obj = {
|
||||||
cpCode: props.formState.cpCode,
|
cpCode: props.formState.cpCode,
|
||||||
// comId: props.formState.comId
|
|
||||||
}
|
}
|
||||||
openModalHdr(true,{isUpdate: false, searchParams: obj})
|
openModalHdr(true,{isUpdate: false, searchParams: obj})
|
||||||
} else {
|
} else {
|
||||||
@ -144,6 +148,7 @@
|
|||||||
const handleSuccessHdr = (val) => {
|
const handleSuccessHdr = (val) => {
|
||||||
val.forEach(v =>{
|
val.forEach(v =>{
|
||||||
v.cpCode = v.cuCode
|
v.cpCode = v.cuCode
|
||||||
|
v.kId = v.ksId
|
||||||
})
|
})
|
||||||
if (!dataList.value.length) {
|
if (!dataList.value.length) {
|
||||||
dataList.value = val
|
dataList.value = val
|
||||||
@ -167,7 +172,7 @@
|
|||||||
path: '/contract/ContractSales/viewForm',
|
path: '/contract/ContractSales/viewForm',
|
||||||
query: {
|
query: {
|
||||||
formPath: 'dayPlan/PngSettleHdr',
|
formPath: 'dayPlan/PngSettleHdr',
|
||||||
id: record.ksId,
|
id: record.kId,
|
||||||
disabled: true
|
disabled: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -226,15 +226,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const numFormat = () => {
|
const numFormat = () => {
|
||||||
dataList.value = DataFormat.format(dataList.value, [
|
|
||||||
FormatOption.createQty('qtySettleGj'),
|
|
||||||
FormatOption.createQty('qtySettleTon'),
|
|
||||||
FormatOption.createQty('qtyMeaGj'),
|
|
||||||
FormatOption.createQty('qtyMeaM3'),
|
|
||||||
FormatOption.createAmt('amount'),
|
|
||||||
FormatOption.createQty('priceGj',4),
|
|
||||||
FormatOption.createQty('priceM3',4),
|
|
||||||
]);
|
|
||||||
let obj = {
|
let obj = {
|
||||||
qtySettleGj: formState.qtySettleGj,
|
qtySettleGj: formState.qtySettleGj,
|
||||||
qtySettleTon: formState.qtySettleTon,
|
qtySettleTon: formState.qtySettleTon,
|
||||||
|
|||||||
@ -16,8 +16,8 @@
|
|||||||
<Card title="基础信息" :bordered="false" >
|
<Card title="基础信息" :bordered="false" >
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="交易主体" name="comName">
|
<a-form-item label="交易主体" name="comId">
|
||||||
<a-select v-model:value="formState.comId" disabled placeholder="请选择" style="width: 100%" allow-clear>
|
<a-select v-model:value="formState.comId" :disabled="isDisable" placeholder="请选择" style="width: 100%" allow-clear>
|
||||||
<a-select-option v-for="item in optionSelect.comIdList" :key="item.value" :value="item.value">
|
<a-select-option v-for="item in optionSelect.comIdList" :key="item.value" :value="item.value">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库存类型" name="typeCode">
|
<a-form-item label="入库存类型" name="typeCode">
|
||||||
<a-select v-model:value="formState.typeCode" disabled placeholder="" style="width: 100%" allow-clear>
|
<a-select v-model:value="formState.typeCode" :disabled="isDisable" placeholder="请选择" @change="typeCodeChange" style="width: 100%" allow-clear>
|
||||||
<a-select-option v-for="item in optionSelect.typeCodeList" :key="item.code" :value="item.code">
|
<a-select-option v-for="item in optionSelect.typeCodeList" :key="item.code" :value="item.code">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
@ -40,7 +40,7 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="船期编号" name="ssNo">
|
<a-form-item label="船期编号" name="ssNo">
|
||||||
<a-input-search v-model:value="formState.ssNo" :disabled="Boolean(isDisable || pageType ) " placeholder="请选择船期" readonly @search="onSearchShip"/>
|
<a-input-search v-model:value="formState.ssNo" :disabled="Boolean(isDisable || pageType ) " placeholder="请选择" readonly @search="onSearchShip"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
@ -64,84 +64,84 @@
|
|||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="卸港热值(MMBtu)" name="qtyUnloadMmbtu">
|
<a-form-item label="卸港热值(MMBtu)" name="qtyUnloadMmbtu">
|
||||||
<input-number v-model:value="formState.qtyUnloadMmbtu" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyUnloadMmbtu" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyUnloadMmbtu')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="卸港热值(吉焦)" name="qtyUnloadGj">
|
<a-form-item label="卸港热值(吉焦)" name="qtyUnloadGj">
|
||||||
<input-number v-model:value="formState.qtyUnloadGj" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyUnloadGj" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyUnloadGj')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="卸港重量(吨)" name="qtyUnloadTon">
|
<a-form-item label="卸港重量(吨)" name="qtyUnloadTon">
|
||||||
<input-number v-model:value="formState.qtyUnloadTon" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyUnloadTon" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyUnloadTon')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="卸港体积(标方)" name="qtyUnloadM3L">
|
<a-form-item label="卸港体积(标方)" name="qtyUnloadM3L">
|
||||||
<input-number v-model:value="formState.qtyUnloadM3L" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyUnloadM3L" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyUnloadM3L')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="卸港体积(方)" name="qtyUnloadM3">
|
<a-form-item label="卸港体积(方)" name="qtyUnloadM3">
|
||||||
<input-number v-model:value="formState.qtyUnloadM3" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyUnloadM3" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyUnloadM3')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="损耗比例%" name="rateLost">
|
<a-form-item label="损耗比例%" name="rateLost">
|
||||||
<input-number v-model:value="formState.rateLost" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.rateLost" :disabled="isDisable" :digits="3" :min="0" @change="numCount('rateLost')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="损耗热值(MMBtu)" name="qtyLostMmbtu">
|
<a-form-item label="损耗热值(MMBtu)" name="qtyLostMmbtu">
|
||||||
<input-number v-model:value="formState.qtyLostMmbtu" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyLostMmbtu" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyLostMmbtu')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="损耗热值(吉焦)" name="qtyLostGj">
|
<a-form-item label="损耗热值(吉焦)" name="qtyLostGj">
|
||||||
<input-number v-model:value="formState.qtyLostGj" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyLostGj" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyLostGj')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="损耗重量(吨)" name="qtyLostTon">
|
<a-form-item label="损耗重量(吨)" name="qtyLostTon">
|
||||||
<input-number v-model:value="formState.qtyLostTon" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyLostTon" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyLostTon')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="损耗体积(标方)" name="qtyLostM3L">
|
<a-form-item label="损耗体积(标方)" name="qtyLostM3L">
|
||||||
<input-number v-model:value="formState.qtyLostM3L" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyLostM3L" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyLostM3L')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="损耗体积(方)" name="qtyLostM3">
|
<a-form-item label="损耗体积(方)" name="qtyLostM3">
|
||||||
<input-number v-model:value="formState.qtyLostM3" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyLostM3" :disabled="isDisable" :digits="3" :min="0" @change="numCount('qtyLostM3')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库热值(MMBtu)" name="qtyMmbtu">
|
<a-form-item label="入库热值(MMBtu)" name="qtyMmbtu">
|
||||||
<input-number v-model:value="formState.qtyMmbtu" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyMmbtu" disabled :digits="3" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库热值(吉焦)" name="qtyGj">
|
<a-form-item label="入库热值(吉焦)" name="qtyGj">
|
||||||
<input-number v-model:value="formState.qtyGj" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyGj" disabled :digits="3" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库重量(吨)" name="qtyTon">
|
<a-form-item label="入库重量(吨)" name="qtyTon">
|
||||||
<input-number v-model:value="formState.qtyTon" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyTon" disabled :digits="3" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库体积(标方)" name="qtyM3L">
|
<a-form-item label="入库体积(标方)" name="qtyM3L">
|
||||||
<input-number v-model:value="formState.qtyM3L" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyM3L" disabled :digits="3" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库体积(方)" name="qtyM3">
|
<a-form-item label="入库体积(方)" name="qtyM3">
|
||||||
<input-number v-model:value="formState.qtyM3" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.qtyM3" disabled :digits="3" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@ -160,34 +160,34 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="结算币种单价(/MMBtu)" name="priceMmbtu">
|
<a-form-item label="结算币种单价(/MMBtu)" name="priceMmbtu">
|
||||||
<input-number v-model:value="formState.priceMmbtu" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.priceMmbtu" :disabled="isDisable" :digits="3" :min="0" @change="numCount('priceMmbtu')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="结算币种金额" name="amountCurr">
|
<a-form-item label="结算币种金额" name="amountCurr">
|
||||||
<input-number v-model:value="formState.amountCurr" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.amountCurr" :disabled="isDisable" :digits="2" :min="0" @change="numCount('amountCurr')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="购汇汇率" name="rateExPur">
|
<a-form-item label="购汇汇率" name="rateExPur">
|
||||||
<input-number v-model:value="formState.rateExPur" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.rateExPur" :disabled="isDisable" :digits="3" :min="0" @change="numCount('rateExPur')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库金额/纯货值(元)" name="amount">
|
<a-form-item label="入库金额/纯货值(元)" name="amount">
|
||||||
<input-number v-model:value="formState.amount" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.amount" :disabled="isDisable" :digits="2" :min="0" @change="numCount('amount')" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库价格(元/吨)" name="priceTon">
|
<a-form-item label="入库价格(元/吨)" name="priceTon">
|
||||||
<input-number v-model:value="formState.priceTon" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.priceTon" :disabled="isDisable" :digits="4" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="8">
|
<a-col :span="8">
|
||||||
<a-form-item label="入库价格(元/吉焦)" name="priceGj">
|
<a-form-item label="入库价格(元/吉焦)" name="priceGj">
|
||||||
<input-number v-model:value="formState.priceGj" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" />
|
<input-number v-model:value="formState.priceGj" :disabled="isDisable" :digits="4" :min="0" style="width: 100%" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@ -204,7 +204,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<contractPurIntListModal @register="registerContractPurInt" @success="handleSuccessContractPurInt" selectType="radio" pageType="pur"/>
|
<contractPurIntListModal @register="registerContractPurInt" @success="handleSuccessContractPurInt" selectType="radio" pageType="pur"/>
|
||||||
<lngStationModal @register="registerStation" @success="handleSuccessStation"/>
|
<lngStationModal @register="registerStation" @success="handleSuccessStation"/>
|
||||||
<shipScheduleListModal @register="registerShip" @success="handleSuccessShip" />
|
<OpsPurIntListModal @register="registerShip" @success="handleSuccessShip" :defaultDateType="true"/>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -221,8 +221,7 @@
|
|||||||
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 { getAllPriceTerm} from '/@/api/contract/ContractPurInt';
|
import { addLngInventoryIn,updateLngInventoryIn, getLngInventoryIn,getLngInventoryInShip} from '/@/api/inventory/LngInventoryIn';
|
||||||
import { addLngOpsPurInt,updateLngOpsPurInt, getLngOpsPurInt} from '/@/api/ship/OpsPurInt';
|
|
||||||
import { getAllCurrency } from '/@/api/contract/ContractFact';
|
import { getAllCurrency } from '/@/api/contract/ContractFact';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { getAppEnvConfig } from '/@/utils/env';
|
import { getAppEnvConfig } from '/@/utils/env';
|
||||||
@ -230,18 +229,12 @@
|
|||||||
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
import UploadList from '/@/components/Form/src/components/UploadList.vue';
|
||||||
import contractPurIntListModal from '../../../../components/common/contractPurIntListModal.vue';
|
import contractPurIntListModal from '../../../../components/common/contractPurIntListModal.vue';
|
||||||
import lngStationModal from '/@/components/common/lngStationModal.vue';
|
import lngStationModal from '/@/components/common/lngStationModal.vue';
|
||||||
import shipScheduleListModal from '/@/components/common/shipScheduleListModal.vue';
|
|
||||||
import { useUserStore } from '/@/store/modules/user';
|
|
||||||
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
||||||
import type { CascaderProps } from 'ant-design-vue';
|
import OpsPurIntListModal from '/@/components/common/OpsPurIntListModal.vue';
|
||||||
import { getAreaList, getAreaInfo} from '/@/api/mdm/CountryRegion';
|
import { getLngOpsPurInt} from '/@/api/ship/OpsPurInt';
|
||||||
import {getCompDept } from '/@/api/approve/Appro';
|
|
||||||
import { getLngShipSchedule} from '/@/api/ship/ShipSchedule';
|
|
||||||
const userStore = useUserStore();
|
|
||||||
const userInfo = userStore.getUserInfo;
|
|
||||||
|
|
||||||
const tableName = 'OpsPurInt';
|
const tableName = 'LngInventoryIn';
|
||||||
const columnName = 'OpsPurInt'
|
const columnName = 'LngInventoryIn'
|
||||||
|
|
||||||
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
@ -270,7 +263,8 @@
|
|||||||
|
|
||||||
const formState = reactive({
|
const formState = reactive({
|
||||||
approCode: 'WTJ',
|
approCode: 'WTJ',
|
||||||
frtSign: 'N'
|
typeCode: 'CQ',
|
||||||
|
catCode: 'LNG'
|
||||||
});
|
});
|
||||||
const [register, { openModal:openModal}] = useModal();
|
const [register, { openModal:openModal}] = useModal();
|
||||||
const [registerContractPurInt, { openModal:openModalContractPurInt}] = useModal();
|
const [registerContractPurInt, { openModal:openModalContractPurInt}] = useModal();
|
||||||
@ -279,16 +273,23 @@
|
|||||||
const [registerShip, { openModal:openModalShip}] = useModal();
|
const [registerShip, { openModal:openModalShip}] = useModal();
|
||||||
|
|
||||||
const rules= reactive({
|
const rules= reactive({
|
||||||
ssNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
|
||||||
comId: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
comId: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
ssTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
ssTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
curCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
suName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
dateEta: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
typeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
staName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
staName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
dateOps: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
dateIn: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
frtSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
qtyUnloadMmbtu: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
insurSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
qtyUnloadGj: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
qtyUnloadTon: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
rateLost: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
qtyLostMmbtu: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
qtyLostGj: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
qtyLostTon: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
// qtyMmbtu: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
// qtyGj: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
|
// qtyTon: [{ required: true, message: "该项为必填项", trigger: 'change' }],
|
||||||
});
|
});
|
||||||
const layout = {
|
const layout = {
|
||||||
labelCol: { span: 8 },
|
labelCol: { span: 8 },
|
||||||
@ -296,12 +297,9 @@
|
|||||||
}
|
}
|
||||||
const dataFile = ref([]);
|
const dataFile = ref([]);
|
||||||
let optionSelect= reactive({
|
let optionSelect= reactive({
|
||||||
signList: [],
|
|
||||||
comIdList: [],
|
comIdList: [],
|
||||||
ssTypeCodeList: [],
|
|
||||||
typeCodeList: [],
|
typeCodeList: [],
|
||||||
curCodeList: [],
|
curCodeList: [],
|
||||||
prcTermCodeList: [],
|
|
||||||
});
|
});
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
@ -327,7 +325,7 @@
|
|||||||
isDisable.value = pageType.value == 'view'
|
isDisable.value = pageType.value == 'view'
|
||||||
getOption()
|
getOption()
|
||||||
if (pageId.value) {
|
if (pageId.value) {
|
||||||
pageSource.value ? getLngShipInfo(pageId.value) :getInfo(pageId.value)
|
getInfo(pageId.value)
|
||||||
} else {
|
} else {
|
||||||
getOptionParams()
|
getOptionParams()
|
||||||
}
|
}
|
||||||
@ -338,7 +336,7 @@
|
|||||||
async function getInfo(id) {
|
async function getInfo(id) {
|
||||||
spinning.value = true
|
spinning.value = true
|
||||||
try {
|
try {
|
||||||
let data = await getLngOpsPurInt(id)
|
let data = await getLngInventoryIn(id)
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
Object.assign(formState, {...data})
|
Object.assign(formState, {...data})
|
||||||
Object.assign(dataFile.value, formState.lngFileUploadList || [])
|
Object.assign(dataFile.value, formState.lngFileUploadList || [])
|
||||||
@ -351,13 +349,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function getOption() {
|
async function getOption() {
|
||||||
optionSelect.signList = await getDictionary('LNG_YN')
|
|
||||||
optionSelect.ssTypeCodeList = await getDictionary('LNG_SHP_S')
|
|
||||||
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
|
||||||
optionSelect.typeCodeList = await getDictionary('LNG_INV_I')
|
optionSelect.typeCodeList = await getDictionary('LNG_INV_I')
|
||||||
if (!pageId.value) {
|
|
||||||
getCompDeptInfo(userInfo.id)
|
|
||||||
}
|
|
||||||
let res = await getAllCom() || []
|
let res = await getAllCom() || []
|
||||||
optionSelect.comIdList = res.map(v=> {
|
optionSelect.comIdList = res.map(v=> {
|
||||||
return {
|
return {
|
||||||
@ -370,17 +363,39 @@
|
|||||||
async function getOptionParams() {
|
async function getOptionParams() {
|
||||||
optionSelect.curCodeList = await getAllCurrency({eid: formState.curCode})
|
optionSelect.curCodeList = await getAllCurrency({eid: formState.curCode})
|
||||||
}
|
}
|
||||||
const numCount = () => {
|
const typeCodeChange = (val) => {
|
||||||
formState.amountCurrEst = (Number(formState.qtyMmbtu) || 0) * (Number(formState.priceCurrEst) || 0)
|
if (val == 'ZN') {
|
||||||
formState.amountCurrEst = formState.amountCurrEst ? formState.amountCurrEst.toFixed(2) : ''
|
formState.opsId = ''
|
||||||
|
formState.ssId = ''
|
||||||
|
formState.kId = ''
|
||||||
|
formState.suCode = ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const numChange = () => {
|
const numCount = (k) => {
|
||||||
formState.amountCurr = (Number(formState.qtySettleMmbtu) || 0) * (Number(formState.priceCurr) || 0)
|
formState.qtyLostMmbtu = Number(formState.qtyUnloadMmbtu || 0)*Number(formState.rateLost || 0)/100
|
||||||
formState.amountCurr = formState.amountCurr ? formState.amountCurr.toFixed(2) : ''
|
formState.qtyLostGj = Number(formState.qtyUnloadGj || 0)*Number(formState.rateLost || 0)/100
|
||||||
|
formState.qtyLostTon = Number(formState.qtyUnloadTon || 0)*Number(formState.rateLost || 0)/100
|
||||||
|
formState.qtyLostM3L = Number(formState.qtyUnloadM3L || 0)*Number(formState.rateLost || 0)/100
|
||||||
|
formState.qtyLostM3 = Number(formState.qtyUnloadM3 || 0)*Number(formState.rateLost || 0)/100
|
||||||
|
|
||||||
|
formState.qtyMmbtu = Number(formState.qtyUnloadMmbtu || 0) - Number(formState.qtyLostMmbtu || 0)
|
||||||
|
formState.qtyGj = Number(formState.qtyUnloadGj || 0) - Number(formState.qtyLostGj || 0)
|
||||||
|
formState.qtyTon = Number(formState.qtyUnloadTon || 0) - Number(formState.qtyLostTon || 0)
|
||||||
|
formState.qtyM3L = Number(formState.qtyUnloadM3L || 0) - Number(formState.qtyLostM3L || 0)
|
||||||
|
formState.qtyM3 = Number(formState.qtyUnloadM3 || 0) - Number(formState.qtyLostM3 || 0)
|
||||||
|
|
||||||
|
formState.amountCurr = Number(formState.qtyMmbtu || 0)*Number(formState.priceMmbtu || 0)
|
||||||
|
formState.amount = Number(formState.amountCurr || 0) * Number(formState.rateExPur || 0)
|
||||||
|
formState.priceTon = Number(formState.qtyTon) ? Number(formState.amount || 0)/Number(formState.qtyTon) : 0
|
||||||
|
formState.priceGj = Number(formState.qtyGj) ? Number(formState.amount || 0)/Number(formState.qtyGj) : 0
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSearchShip = () => {
|
const onSearchShip = () => {
|
||||||
openModalShip(true,{isUpdate: false})
|
if (formState.typeCode == 'CQ') {
|
||||||
|
openModalShip(true,{isUpdate: false})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const onSearchStation = (val)=> {
|
const onSearchStation = (val)=> {
|
||||||
openModalStation(true,{isUpdate: false})
|
openModalStation(true,{isUpdate: false})
|
||||||
@ -397,46 +412,34 @@
|
|||||||
const handleSuccessShip = (val) => {
|
const handleSuccessShip = (val) => {
|
||||||
|
|
||||||
formState.ssNo = val[0].ssNo
|
formState.ssNo = val[0].ssNo
|
||||||
formState.ssId = val[0].id
|
formState.opsId = val[0].id
|
||||||
getLngShipInfo(val[0].id)
|
getLngOpsPurIntInfo(val[0].id)
|
||||||
}
|
}
|
||||||
const getLngShipInfo = async (id) => {
|
const getLngOpsPurIntInfo = async (id) => {
|
||||||
try {
|
try {
|
||||||
spinning.value = true
|
spinning.value = true
|
||||||
let data = await getLngShipSchedule(id)
|
let data = await getLngOpsPurInt(id)
|
||||||
|
let res = await getLngInventoryInShip(id)
|
||||||
spinning.value = false
|
spinning.value = false
|
||||||
formState.ssNo = data.ssNo
|
formState.ssNo = data.ssNo
|
||||||
|
formState.opsId = data.id
|
||||||
formState.ssId = data.id
|
formState.ssId = data.id
|
||||||
formState.comId = data.comId
|
formState.comId = data.comId
|
||||||
formState.kId = data.kId
|
|
||||||
formState.kName = data.kName
|
|
||||||
formState.longSpotCode = data.longSpotCode
|
|
||||||
formState.suCode = data.suCode
|
|
||||||
formState.suName = data.suName
|
|
||||||
formState.staCode = data.staCode
|
formState.staCode = data.staCode
|
||||||
formState.staName = data.staName
|
formState.staName = data.staName
|
||||||
formState.sourceName = data.sourceName
|
formState.kId = data.kId
|
||||||
formState.empId = data.empId
|
formState.kName = data.kName
|
||||||
formState.empName = data.empName
|
formState.suCode = data.suCode
|
||||||
formState.empTel = data.empTel
|
formState.suName = data.suName
|
||||||
formState.prcTermCode = data.prcTermCode
|
|
||||||
formState.shipCode = data.shipCode
|
formState.dateIn = data.dateEta ? dayjs(data.dateEta) : null
|
||||||
formState.shipName = data.shipName
|
|
||||||
formState.dateNor = data.dateNor ? dayjs(data.dateNor) : null
|
|
||||||
formState.portUnloading1Code = data.portUnloading1Code
|
|
||||||
formState.portUnloading1Name = data.portUnloading1Name
|
|
||||||
formState.dateEta = data.dateEta ? dayjs(data.dateEta) : null
|
|
||||||
formState.dateEtb = data.dateEtb ? dayjs(data.dateEtb) : null
|
|
||||||
formState.dateEtc = data.dateEtc ? dayjs(data.dateEtc) : null
|
|
||||||
formState.dateEtd = data.dateEtd ? dayjs(data.dateEtd) : null
|
|
||||||
formState.qtyMmbtu = data.qtyMmbtu
|
|
||||||
formState.qtyGj = data.qtyGj
|
|
||||||
formState.qtyTon = data.qtyTon
|
|
||||||
formState.qtyM3 = data.qtyM3
|
|
||||||
formState.curCode = data.curCode
|
formState.curCode = data.curCode
|
||||||
formState.rateEx = data.rateEx
|
formState.priceMmbtu = data.priceCurr
|
||||||
formState.priceCurrEst = data.priceCurrEst
|
formState.amountCurr = data.amountCurr
|
||||||
formState.amountCurrEst = data.amountCurrEst
|
formState.rateExPur = data.rateEx
|
||||||
|
|
||||||
|
|
||||||
|
numCount()
|
||||||
|
|
||||||
if (pageSource.value) {
|
if (pageSource.value) {
|
||||||
getOptionParams()
|
getOptionParams()
|
||||||
@ -466,11 +469,10 @@
|
|||||||
await formRef.value.validateFields();
|
await formRef.value.validateFields();
|
||||||
let obj = {
|
let obj = {
|
||||||
...formState,
|
...formState,
|
||||||
salesAreaCode: formState.salesAreaCode ? formState.salesAreaCode[formState.salesAreaCode.length -1] : '',
|
|
||||||
lngFileUploadList: dataFile.value,
|
lngFileUploadList: dataFile.value,
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
let request = !formState.id ? addLngOpsPurInt :updateLngOpsPurInt
|
let request = !formState.id ? addLngInventoryIn :updateLngInventoryIn
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const data = await request(obj);
|
const data = await request(obj);
|
||||||
|
|||||||
@ -29,9 +29,7 @@
|
|||||||
const logId = ref('')
|
const logId = ref('')
|
||||||
const logPath = ref('/inventory/lngInventoryIn/datalog');
|
const logPath = ref('/inventory/lngInventoryIn/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';
|
||||||
@ -52,6 +50,7 @@
|
|||||||
import useEventBus from '/@/hooks/event/useEventBus';
|
import useEventBus from '/@/hooks/event/useEventBus';
|
||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
import { getAllCom} from '/@/api/contract/ContractPurInt';
|
||||||
|
import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat';
|
||||||
|
|
||||||
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
|
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
|
||||||
|
|
||||||
@ -87,12 +86,13 @@
|
|||||||
const { currentRoute } = useRouter();
|
const { currentRoute } = useRouter();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const formIdComputedRef = ref();
|
const formIdComputedRef = ref();
|
||||||
|
const tableData = ref([])
|
||||||
formIdComputedRef.value = currentRoute.value.meta.formId
|
formIdComputedRef.value = currentRoute.value.meta.formId
|
||||||
const schemaIdComputedRef = ref();
|
const schemaIdComputedRef = ref();
|
||||||
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, setTableData }] = useTable({
|
||||||
title: '' || (formName + '列表'),
|
title: '' || (formName + '列表'),
|
||||||
api: getLngInventoryInPage,
|
api: getLngInventoryInPage,
|
||||||
rowKey: 'id',
|
rowKey: 'id',
|
||||||
@ -109,6 +109,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();
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -128,41 +129,38 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
watch(
|
||||||
|
() => tableData.value,
|
||||||
|
(val) => {
|
||||||
|
if (val) {
|
||||||
|
let arr = DataFormat.format(val, [
|
||||||
|
FormatOption.createQty('qtyMmbtu'),
|
||||||
|
FormatOption.createQty('qtyTon'),
|
||||||
|
FormatOption.createQty('qtyM3L'),
|
||||||
|
FormatOption.createQty('qtyM3'),
|
||||||
|
FormatOption.createQty('qtyGj'),
|
||||||
|
]);
|
||||||
|
if (arr.length) {
|
||||||
|
setTableData(arr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
function dbClickRow(record) {
|
function dbClickRow(record) {
|
||||||
if (!actionButtonConfig?.value.some(element => element.code == 'view')) {
|
router.push({
|
||||||
return;
|
path: '/inventory/LngInventoryIn/createForm',
|
||||||
}
|
query: {
|
||||||
const { processId, taskIds, schemaId } = record.workflowData || {};
|
formPath: 'inventory/LngInventoryIn',
|
||||||
if (taskIds && taskIds.length) {
|
formName: '查看'+formName,
|
||||||
router.push({
|
formId:currentRoute.value.meta.formId,
|
||||||
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
|
type:'view',
|
||||||
query: {
|
id: record.id
|
||||||
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/LngInventoryIn/' + record.id + '/viewForm',
|
|
||||||
query: {
|
|
||||||
formPath: 'inventory/LngInventoryIn',
|
|
||||||
formName: formName,
|
|
||||||
formId:currentRoute.value.meta.formId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function buttonClick(code) {
|
function buttonClick(code) {
|
||||||
@ -184,7 +182,7 @@
|
|||||||
path: '/inventory/LngInventoryIn/createForm',
|
path: '/inventory/LngInventoryIn/createForm',
|
||||||
query: {
|
query: {
|
||||||
formPath: 'inventory/LngInventoryIn',
|
formPath: 'inventory/LngInventoryIn',
|
||||||
formName: formName,
|
formName: '新建'+formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -198,7 +196,9 @@
|
|||||||
query: {
|
query: {
|
||||||
formPath: 'inventory/LngInventoryIn',
|
formPath: 'inventory/LngInventoryIn',
|
||||||
formName: formName,
|
formName: formName,
|
||||||
formId:currentRoute.value.meta.formId
|
formId:currentRoute.value.meta.formId,
|
||||||
|
type: 'view',
|
||||||
|
id: record.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user