采购lng
This commit is contained in:
@ -3,7 +3,8 @@ import { defHttp } from '/@/utils/http/axios';
|
||||
import { ErrorMessageMode } from '/#/axios';
|
||||
|
||||
enum Api {
|
||||
Page = '/contract/contractPurLng/page',
|
||||
// Page = '/contract/contractPurLng/page',
|
||||
Page = '/magic-api/contract/contractPurLng/page',
|
||||
List = '/contract/contractPurLng/list',
|
||||
Info = '/contract/contractPurLng/info',
|
||||
LngContract = '/contract/contractPurLng',
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
selectedKeys.value = rowKeys;
|
||||
selectedValues.value = e
|
||||
}
|
||||
const getTitle = computed(() => (!unref(isUpdate) ? t(props.pageType == 'pur'?'管道气采购合同列表': '管道气销售合同列表') : t('')));
|
||||
const getTitle = computed(() => (t(props.pageType == 'pur'?'管道气采购合同列表': '管道气销售合同列表')));
|
||||
|
||||
async function handleSubmit() {
|
||||
if (!selectedValues.value.length) {
|
||||
|
||||
@ -38,10 +38,10 @@
|
||||
{ title: t('合同名称'), dataIndex: 'kName', width: 300},
|
||||
{ title: t('关联类别'), dataIndex: 'relTypeName', width: 100},
|
||||
{ title: t('合同类别'), dataIndex: 'kTypeName1', width: 100},
|
||||
{ title: t('合同主体'), dataIndex: 'comName', width: 250},
|
||||
{ title: t('合同主体'), dataIndex: 'comName', width: 120},
|
||||
{ title: t('我方联系人'), dataIndex: 'empName', width: 140},
|
||||
{ title: t('联系电话'), dataIndex: 'tel', width: 140},
|
||||
{ title: t('业务部门'), dataIndex: 'bDeptName', width: 140},
|
||||
{ title: t('业务部门'), dataIndex: 'bDeptName', width: 120},
|
||||
{ title: t('附件'), dataIndex: 'file', width: 140},
|
||||
{ title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'},
|
||||
]);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<div v-for="(item, idx) in dataListPrice" class="tbStyle">
|
||||
<a-button type="primary" style="margin-bottom: 10px;" @click="handleDelete(idx)" v-if="!isDisable">删除</a-button>
|
||||
<DeleteOutlined style="margin-bottom: 10px;color:red" @click="handleDelete(idx)" v-if="!isDisable"/>
|
||||
<a-row>
|
||||
<a-col :span="pageType=='pur'?8:16">
|
||||
<a-form-item name="kName">
|
||||
@ -114,6 +114,7 @@
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { message } from 'ant-design-vue';
|
||||
import contractPurPngtListModal from '/@/components/common/contractPurPngtListModal.vue';
|
||||
import { DeleteOutlined} from '@ant-design/icons-vue';
|
||||
const props = defineProps({
|
||||
isDisable: Boolean,
|
||||
list: Array,
|
||||
@ -273,9 +274,10 @@
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.btnBox {
|
||||
span {
|
||||
margin: 0 30px;
|
||||
}
|
||||
|
||||
.tbStyle {
|
||||
border: 1px dashed #d9d9d9;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -107,7 +107,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'comId',
|
||||
dataIndex: 'comName',
|
||||
title: '合同主体',
|
||||
componentType: 'input',
|
||||
align: 'left',
|
||||
@ -116,7 +116,7 @@ export const columns: BasicColumn[] = [
|
||||
},
|
||||
|
||||
{
|
||||
dataIndex: 'approCode',
|
||||
dataIndex: 'approName',
|
||||
title: '状态',
|
||||
componentType: 'select',
|
||||
align: 'left',
|
||||
|
||||
@ -33,11 +33,6 @@
|
||||
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" @change="dateChange(formState.dateTo, 'dateTo')" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="有效期结束" name="dateTo">
|
||||
<a-date-picker v-model:value="formState.dateTo" style="width: 100%" @change="dateChange(formState.dateTo, 'dateTo')" :disabled="isDisable" :disabled-date="disabledDateEnd" placeholder="请选择结束日期" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="合同签订日期" name="dateSign">
|
||||
<a-date-picker v-model:value="formState.dateSign" style="width: 100%" :disabled="isDisable" placeholder="请选择合同签订日期" />
|
||||
@ -60,7 +55,7 @@
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="长协/现货/年度合同" name="longSpotCode">
|
||||
<a-select v-model:value="formState.lngContractPurLngList[0].longSpotCode" :disabled="isDisable" placeholder="请选择" style="width: 100%" allow-clear @change="periodTypeCodeChange">
|
||||
<a-select v-model:value="formState.lngContractPurLngList[0].longSpotCode" :disabled="isDisable" placeholder="请选择" style="width: 100%" allow-clear>
|
||||
<a-select-option v-for="item in optionSelect.longSpotCodeList" :key="item.code" :value="item.code">
|
||||
{{ item.name }}
|
||||
</a-select-option>
|
||||
@ -131,7 +126,7 @@
|
||||
import type { Rule } from 'ant-design-vue/es/form';
|
||||
import { getDictionary } from '/@/api/sales/Customer';
|
||||
import { useModal } from '/@/components/Modal';
|
||||
import { addLngContract,updateLngContract, getLngContract, getAllPriceTerm} from '/@/api/contract/ContractPurLng';
|
||||
import { addLngContract,updateLngContract, getLngContract} from '/@/api/contract/ContractPurLng';
|
||||
import { getLngContractFact } from '/@/api/contract/ContractFact';
|
||||
import { getAllCurrency } from '/@/api/contract/ContractFact';
|
||||
import { getLngAppro,getCompDept } from '/@/api/approve/Appro';
|
||||
@ -288,10 +283,6 @@
|
||||
}
|
||||
|
||||
}
|
||||
async function getOptionParams() {
|
||||
|
||||
optionSelect.prcTermCodeList = await getAllPriceTerm({eid: formState.prcTermCode})
|
||||
}
|
||||
const getCompDeptInfo = async (id, deptId)=> {
|
||||
const res = await getCompDept(id, deptId)
|
||||
formState.bDeptName = res?.dept?.name
|
||||
@ -338,7 +329,20 @@
|
||||
}
|
||||
return endValue.valueOf() <= startValue.valueOf();
|
||||
}
|
||||
|
||||
const disabledDateCfmStart = (startValue) => {
|
||||
const endValue = formState?.dateCfmTo;
|
||||
if (!startValue || !endValue) {
|
||||
return false
|
||||
}
|
||||
return startValue.valueOf() >= endValue.valueOf();
|
||||
}
|
||||
const disabledDateCfmEnd = (endValue) => {
|
||||
const startValue = formState?.dateCfmFrom;
|
||||
if (!endValue || !startValue) {
|
||||
return false
|
||||
}
|
||||
return endValue.valueOf() <= startValue.valueOf();
|
||||
}
|
||||
const onSearchSupplier = () => {
|
||||
openModalSupplier(true,{isUpdate: false})
|
||||
}
|
||||
|
||||
@ -127,7 +127,7 @@
|
||||
showResetButton: false,
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id' };
|
||||
return { ...params, FormId: formIdComputedRef.value, PK: 'id',page: params.limit};
|
||||
},
|
||||
afterFetch: (res) => {
|
||||
tableRef.value.setToolBarWidth();
|
||||
@ -299,7 +299,7 @@
|
||||
deleteLngContract(ids).then((_) => {
|
||||
handleSuccess();
|
||||
notification.success({
|
||||
message: 'Tip',
|
||||
message: '提示',
|
||||
description: t('删除成功!'),
|
||||
});
|
||||
});
|
||||
|
||||
@ -7,17 +7,17 @@ export const formConfig = {
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
|
||||
{
|
||||
field: 'dateFrom',
|
||||
label: '申请日期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
allowClear: true,
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// field: 'dateFrom',
|
||||
// label: '申请日期',
|
||||
// component: 'RangePicker',
|
||||
// componentProps: {
|
||||
// format: 'YYYY-MM-DD',
|
||||
// style: { width: '100%' },
|
||||
// allowClear: true,
|
||||
// getPopupContainer: () => document.body,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
field: 'priceDesc',
|
||||
label: '申请说明',
|
||||
|
||||
@ -6,17 +6,17 @@ export const formConfig = {
|
||||
};
|
||||
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
field: 'dateFrom',
|
||||
label: '申请日期',
|
||||
component: 'RangePicker',
|
||||
componentProps: {
|
||||
format: 'YYYY-MM-DD',
|
||||
style: { width: '100%' },
|
||||
allowClear: true,
|
||||
getPopupContainer: () => document.body,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// field: 'dateFrom',
|
||||
// label: '申请日期',
|
||||
// component: 'RangePicker',
|
||||
// componentProps: {
|
||||
// format: 'YYYY-MM-DD',
|
||||
// style: { width: '100%' },
|
||||
// allowClear: true,
|
||||
// getPopupContainer: () => document.body,
|
||||
// },
|
||||
// },
|
||||
{
|
||||
field: 'priceDesc',
|
||||
label: '申请说明',
|
||||
|
||||
@ -16,6 +16,7 @@ export const customFormConfig = {
|
||||
'ContractTransPng',
|
||||
'ContractProc',
|
||||
'PricePurPngApp',
|
||||
'PriceSalesPngApp'
|
||||
'PriceSalesPngApp',
|
||||
'ContractPurLng'
|
||||
],
|
||||
};
|
||||
@ -400,8 +400,8 @@
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
const tableName = 'ShipSchedule';
|
||||
const columnName = 'ShipSchedule'
|
||||
const tableName = 'OpsPurInt';
|
||||
const columnName = 'OpsPurInt'
|
||||
|
||||
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
||||
const formRef = ref();
|
||||
@ -423,13 +423,14 @@
|
||||
const formId = ref(currentRoute.value?.params?.id);
|
||||
const pageType = ref(currentRoute.value.query?.type);
|
||||
const pageId = ref(currentRoute.value.query?.id)
|
||||
|
||||
const pageSource = ref(currentRoute.value.query?.pageSource)
|
||||
const spinning = ref(false);
|
||||
const { notification } = useMessage();
|
||||
const { t } = useI18n()
|
||||
|
||||
const formState = reactive({
|
||||
approCode: 'WTJ'
|
||||
approCode: 'WTJ',
|
||||
frtSign: 'N'
|
||||
});
|
||||
const [register, { openModal:openModal}] = useModal();
|
||||
const [registerContractPurInt, { openModal:openModalContractPurInt}] = useModal();
|
||||
@ -486,7 +487,7 @@
|
||||
isDisable.value = pageType.value == 'view'
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getInfo(pageId.value)
|
||||
pageSource.value ? getLngShipInfo(pageId.value) :getInfo(pageId.value)
|
||||
} else {
|
||||
formState.empName = userInfo.name
|
||||
formState.empId = userInfo.id
|
||||
@ -663,6 +664,8 @@
|
||||
spinning.value = true
|
||||
let data = await getLngShipSchedule(id)
|
||||
spinning.value = false
|
||||
formState.ssNo = data.ssNo
|
||||
formState.ssId = data.id
|
||||
formState.comId = data.comId
|
||||
formState.kId = data.kId
|
||||
formState.kName = data.kName
|
||||
|
||||
@ -369,8 +369,8 @@
|
||||
const userStore = useUserStore();
|
||||
const userInfo = userStore.getUserInfo;
|
||||
|
||||
const tableName = 'ShipSchedule';
|
||||
const columnName = 'ShipSchedule'
|
||||
const tableName = 'OpsSalesInt';
|
||||
const columnName = 'OpsSalesInt'
|
||||
|
||||
const formType = ref('2'); // 0 新建 1 修改 2 查看
|
||||
const formRef = ref();
|
||||
@ -392,13 +392,14 @@
|
||||
const formId = ref(currentRoute.value?.params?.id);
|
||||
const pageType = ref(currentRoute.value.query?.type);
|
||||
const pageId = ref(currentRoute.value.query?.id)
|
||||
|
||||
const pageSource = ref(currentRoute.value.query?.pageSource)
|
||||
const spinning = ref(false);
|
||||
const { notification } = useMessage();
|
||||
const { t } = useI18n()
|
||||
|
||||
const formState = reactive({
|
||||
approCode: 'WTJ'
|
||||
approCode: 'WTJ',
|
||||
frtSign: 'N'
|
||||
});
|
||||
const [register, { openModal:openModal}] = useModal();
|
||||
const [registerContractPurInt, { openModal:openModalContractPurInt}] = useModal();
|
||||
@ -456,7 +457,7 @@
|
||||
isDisable.value = pageType.value == 'view'
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getInfo(pageId.value)
|
||||
pageSource.value ? getLngShipInfo(pageId.value) :getInfo(pageId.value)
|
||||
} else {
|
||||
formState.empName = userInfo.name
|
||||
formState.empId = userInfo.id
|
||||
@ -627,6 +628,8 @@
|
||||
spinning.value = true
|
||||
let data = await getLngShipSchedule(id)
|
||||
spinning.value = false
|
||||
formState.ssNo = data.ssNo
|
||||
formState.ssId = data.id
|
||||
formState.comId = data.comId
|
||||
formState.kId = data.kId
|
||||
formState.kName = data.kName
|
||||
|
||||
@ -255,8 +255,9 @@
|
||||
formPath: 'ship/OpsPurInt',
|
||||
formName: record.opsPurId ? '编辑采购执行' : '新建采购执行',
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.opsPurId,
|
||||
type: record.opsPurId ? 'edit' : ''
|
||||
id: record.opsPurId ? record.opsPurId : record.id,
|
||||
type: record.opsPurId ? 'edit' : '',
|
||||
pageSource: record.opsPurId ? null : 'ship'
|
||||
}
|
||||
});
|
||||
|
||||
@ -268,8 +269,9 @@
|
||||
formPath: 'ship/OpsSalesInt',
|
||||
formName: record.opsSalesId ? '编辑销售执行' : '新建销售执行',
|
||||
formId:currentRoute.value.meta.formId,
|
||||
id: record.opsSalesId,
|
||||
type: record.opsSalesId ? 'edit' : ''
|
||||
id: record.opsSalesId? record.opsSalesId : record.id,
|
||||
type: record.opsSalesId ? 'edit' : '',
|
||||
pageSource: record.opsSalesId ? null : 'ship'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user