|
@@ -2,95 +2,101 @@
|
|
|
<a-spin :spinning="loading">
|
|
|
<JFormContainer :disabled="disabled">
|
|
|
<template #detail>
|
|
|
- <a-form v-bind="formItemLayout" name="PuechaseInquiryFormForm" ref="formRef">
|
|
|
+ <a-form v-bind="formItemLayout" name="PuechaseQuotationFormForm" ref="formRef">
|
|
|
<a-row>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="询价单号(bill code)" v-bind="validateInfos.billCode" id="PuechaseInquiryFormForm-billCode" name="billCode">
|
|
|
- <a-input v-model:value="formData.billCode" placeholder="请输入询价单号(bill code)" disabled></a-input>
|
|
|
+ <a-form-item label="报价单号(bill code)" v-bind="validateInfos.billCode" id="PuechaseQuotationFormForm-billCode" name="billCode">
|
|
|
+ <a-input v-model:value="formData.billCode" placeholder="请输入报价单号(bill code)" disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="PuechaseInquiryFormForm-billDate" name="billDate">
|
|
|
+ <a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="PuechaseQuotationFormForm-billDate" name="billDate">
|
|
|
<a-date-picker placeholder="请选择单据日期(bill date)" v-model:value="formData.billDate" value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="询价项目(inquiry project)" v-bind="validateInfos.projectName" id="PuechaseInquiryFormForm-projectName" name="projectName">
|
|
|
- <a-input-search v-model:value="formData.projectName" placeholder="请输入询价项目(inquiry project)" :disabled="PuechaseInquiryFormProductTable.dataSource.length!==0" allow-clear enter-button="Search" @search="onSearchProject"></a-input-search>
|
|
|
+ <a-form-item label="报价项目(quotation project)" v-bind="validateInfos.projectName" id="PuechaseQuotationFormForm-projectName" name="projectName">
|
|
|
+ <a-input-search v-model:value="formData.projectName" placeholder="请输入报价项目(quotation project)" :disabled="PuechaseQuotationFormProductTable.dataSource.length!==0" allow-clear enter-button="Search" @search="onSearchProject"></a-input-search>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="询价供应商(inquiry supplier)" v-bind="validateInfos.inquirySuppiler" id="PuechaseInquiryFormForm-inquirySuppiler" name="inquirySuppiler">
|
|
|
+ <a-form-item label="报价供应商(quotation supplier)" v-bind="validateInfos.inquirySuppiler" id="PuechaseQuotationFormForm-inquirySuppiler" name="inquirySuppiler">
|
|
|
<JSelectInput v-model:value="formData.inquirySuppiler" placeholder="请选择" allow-clear :options="supplierOption" @change="changeSupplier"></JSelectInput>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="询价有效期(inquiry period)" v-bind="validateInfos.inquiryPeriodEnd" id="PuechaseInquiryFormForm-inquiryPeriodEnd" name="inquiryPeriodEnd">
|
|
|
- <a-range-picker v-model:value="inquiryPeriod" :format="['YYYY-MM-DD','YYYY-MM-DD']" @change="onChangeInquiryPeriod" style="width: 100%" />
|
|
|
+ <a-form-item label="报价截至日期(quotation deadline)" v-bind="validateInfos.quotationDeadline" id="PuechaseQuotationFormForm-quotationDeadline" name="quotationDeadline">
|
|
|
+ <a-date-picker v-model:value="formData.quotationDeadline" show-time valueFormat="YYYY-MM-DD" format='YYYY-MM-DD' style="width: 100%;"></a-date-picker>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="PuechaseInquiryFormForm-priority" name="priority">
|
|
|
+ <a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="PuechaseQuotationFormForm-priority" name="priority">
|
|
|
<JDictSelectTag v-model:value="formData.priority" placeholder="请选择" dictCode="priority"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="PuechaseInquiryFormForm-productionClass" name="productionClass">
|
|
|
+ <a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="PuechaseQuotationFormForm-productionClass" name="productionClass">
|
|
|
<a-input v-model:value="formData.productionClass" placeholder="请输入" allow-clear disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="机型(model)" v-bind="validateInfos.model" id="PuechaseInquiryFormForm-model" name="model">
|
|
|
+ <a-form-item label="机型(model)" v-bind="validateInfos.model" id="PuechaseQuotationFormForm-model" name="model">
|
|
|
<JDictSelectTag v-model:value="formData.model" placeholder="请选择" dictCode="model_typer" disabled/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="厂家(maker)" v-bind="validateInfos.maker" id="PuechaseInquiryFormForm-maker" name="maker">
|
|
|
+ <a-form-item label="厂家(maker)" v-bind="validateInfos.maker" id="PuechaseQuotationFormForm-maker" name="maker">
|
|
|
<a-input v-model:value="formData.maker" placeholder="请输入厂家(maker)" allow-clear disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="交货地点(place of delivery)" v-bind="validateInfos.placeDelivery" id="PuechaseInquiryFormForm-placeDelivery" name="placeDelivery">
|
|
|
+ <a-form-item label="交货地点(place of delivery)" v-bind="validateInfos.placeDelivery" id="PuechaseQuotationFormForm-placeDelivery" name="placeDelivery">
|
|
|
<a-input v-model:value="formData.placeDelivery" placeholder="" allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="付款条件(payment terms)" v-bind="validateInfos.paymentTerms" id="quotationFormForm-paymentTerms" name="paymentTerms" :labelCol="formItemLayout.labelCol1" :wrapperCol="formItemLayout.wrapperCol1">
|
|
|
+ <a-form-item label="付款条件(payment terms)" v-bind="validateInfos.paymentTerms" id="PuechaseQuotationFormForm-paymentTerms" name="paymentTerms" :labelCol="formItemLayout.labelCol1" :wrapperCol="formItemLayout.wrapperCol1">
|
|
|
<JDictSelectTag v-model:value="formData.paymentTerms" placeholder="请选择" dictCode="payment_terms"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="发货方式(delivery)" v-bind="validateInfos.delivery" id="PuechaseInquiryFormForm-delivery" name="delivery">
|
|
|
- <JDictSelectTag v-model:value="formData.delivery" placeholder="请选择" dictCode="delivery_methods" disabled/>
|
|
|
+ <a-form-item label="发货方式(delivery)" v-bind="validateInfos.delivery" id="PuechaseQuotationFormForm-delivery" name="delivery">
|
|
|
+ <JDictSelectTag v-model:value="formData.delivery" placeholder="请选择" dictCode="delivery_methods" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="交期(delivery time)" v-bind="validateInfos.deliveryTime" id="quotationFormForm-deliveryTime" name="deliveryTime">
|
|
|
+ <a-form-item label="交期(delivery time)" v-bind="validateInfos.deliveryTime" id="PuechaseQuotationFormForm-deliveryTime" name="deliveryTime">
|
|
|
<a-date-picker placeholder="请选择交期(delivery time)" v-model:value="formData.deliveryTime" value-format="YYYY-MM-DD" format="YYYY-MM-DD" style="width: 100%" allow-clear @change="changeFormDeliveryTime"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="采购询价组(procurement inquiry team)" v-bind="validateInfos.inquiryTeam" id="PuechaseInquiryFormForm-inquiryTeam" name="inquiryTeam">
|
|
|
- <JDictSelectTag v-model:value="formData.inquiryTeam" placeholder="请选择" dictCode="procurement_inquiry_team" disabled/>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="报价有效期(quotation validity period)" v-bind="validateInfos.quotationValidity" id="PuechaseInquiryFormForm-quotationValidity" name="quotationValidity">
|
|
|
- <a-input v-model:value="formData.quotationValidity" placeholder="请输入" />
|
|
|
+ <a-form-item label="报价有效期(quotation validity period)" v-bind="validateInfos.quotationValidity" id="PuechaseQuotationFormForm-quotationValidity" name="quotationValidity">
|
|
|
+ <a-input v-model:value="formData.quotationValidity" placeholder="请输入" style="width: 43%;margin-right: 1%;"/>天(days)到
|
|
|
+ <a-date-picker v-model:value="formData.quotationValidityPeriod" show-time valueFormat="YYYY-MM-DD" format='YYYY-MM-DD' style="width: 43%;margin-left: 1%;"></a-date-picker>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
-
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="币种(currency)" v-bind="validateInfos.currency" id="PuechaseQuotationFormForm-currency" name="currency">
|
|
|
+ <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="询价备注(inquiry notes)" v-bind="validateInfos.inquiryNotes" id="PuechaseInquiryFormForm-inquiryNotes" name="inquiryNotes">
|
|
|
- <a-input v-model:value="formData.inquiryNotes" placeholder="请输入询价备注(inquiry notes)" allow-clear ></a-input>
|
|
|
+ <a-form-item label="报价备注(quotation notes)" v-bind="validateInfos.inquiryNotes" id="PuechaseQuotationFormForm-inquiryNotes" name="inquiryNotes">
|
|
|
+ <a-input v-model:value="formData.inquiryNotes" placeholder="请输入报价备注(quotation notes)" allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="PuechaseInquiryFormForm-attachs" name="attachs">
|
|
|
- <JUpload v-model:value="formData.attachs"></JUpload>
|
|
|
+ <a-form-item label="技术资料(technical information)" v-bind="validateInfos.technicalInformation" id="PuechaseQuotationFormForm-technicalInformation" name="technicalInformation">
|
|
|
+ <JUpload v-model:value="formData.technicalInformation"></JUpload>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="报价资料(quotation information)" v-bind="validateInfos.quotationInformation" id="PuechaseQuotationFormForm-quotationInformation" name="quotationInformation">
|
|
|
+ <JUpload v-model:value="formData.quotationInformation"></JUpload>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</template>
|
|
@@ -98,14 +104,14 @@
|
|
|
|
|
|
<!-- 子表单区域 -->
|
|
|
<a-tabs v-model:activeKey="activeKey" animated style=" padding: 24px;padding-top: 0px;">
|
|
|
- <a-tab-pane tab="残垢询价单子表 - 船明细(ship details)" key="PuechaseInquiryFormShip" :forceRender="true">
|
|
|
+ <a-tab-pane tab="采购报价单子表 - 船明细(ship details)" key="PuechaseQuotationFormShip" :forceRender="true">
|
|
|
<j-vxe-table
|
|
|
:keep-source="true"
|
|
|
resizable
|
|
|
- ref="PuechaseInquiryFormShipTableRef"
|
|
|
- :loading="PuechaseInquiryFormShipTable.loading"
|
|
|
- :columns="PuechaseInquiryFormShipTable.columns"
|
|
|
- :dataSource="PuechaseInquiryFormShipTable.dataSource"
|
|
|
+ ref="PuechaseQuotationFormShipTableRef"
|
|
|
+ :loading="PuechaseQuotationFormShipTable.loading"
|
|
|
+ :columns="PuechaseQuotationFormShipTable.columns"
|
|
|
+ :dataSource="PuechaseQuotationFormShipTable.dataSource"
|
|
|
:height="340"
|
|
|
:disabled="disabled"
|
|
|
:rowNumber="true"
|
|
@@ -116,16 +122,16 @@
|
|
|
</template>
|
|
|
</j-vxe-table>
|
|
|
</a-tab-pane>
|
|
|
- <a-tab-pane tab="采购询价单子表 - 产品明细(product details)" key="PuechaseInquiryFormProduct" :forceRender="true">
|
|
|
- <a-button type="primary" @click="SelectCustomerInquiry" style="margin-right: 1%;margin-bottom: 1%;"> 选择客户询价单(select customer inquiry form)</a-button>
|
|
|
+ <a-tab-pane tab="采购报价单子表 - 产品明细(product details)" key="PuechaseQuotationFormProduct" :forceRender="true">
|
|
|
+ <a-button type="primary" @click="SelectSupplierInquiry" style="margin-right: 1%;margin-bottom: 1%;"> 选择供应商询价单(select supplier inquiry form)</a-button>
|
|
|
<a-button type="primary" @click="selectProducts" style="margin-right: 1%;margin-bottom: 1%;"> 选择产品(select product)</a-button>
|
|
|
<j-vxe-table
|
|
|
:keep-source="true"
|
|
|
resizable
|
|
|
- ref="PuechaseInquiryFormProductTableRef"
|
|
|
- :loading="PuechaseInquiryFormProductTable.loading"
|
|
|
- :columns="PuechaseInquiryFormProductTable.columns"
|
|
|
- :dataSource="PuechaseInquiryFormProductTable.dataSource"
|
|
|
+ ref="PuechaseQuotationFormProductTableRef"
|
|
|
+ :loading="PuechaseQuotationFormProductTable.loading"
|
|
|
+ :columns="PuechaseQuotationFormProductTable.columns"
|
|
|
+ :dataSource="PuechaseQuotationFormProductTable.dataSource"
|
|
|
:height="340"
|
|
|
:disabled="disabled"
|
|
|
:rowNumber="true"
|
|
@@ -143,7 +149,7 @@
|
|
|
<BaseShipArchiveAccessoriesList ref="BaseShipArchiveAccessoriesListRef"></BaseShipArchiveAccessoriesList>
|
|
|
<SelectPrpductModal ref="SelectPrpductModalRef" @selectProduct="addProduct"></SelectPrpductModal>
|
|
|
<SelectProjectModal ref="SelectProjectModalRef" @selectProject="addProject"></SelectProjectModal>
|
|
|
- <SelectCustomerInquiryModal ref="SelectCustomerInquiryModalRef" @selectCustomerInquiry="addProductFromCustomer"></SelectCustomerInquiryModal>
|
|
|
+ <SelectSupplierInquiryModal ref="SelectSupplierInquiryModalRef" @selectCustomerInquiry="addProductFromCustomer"></SelectSupplierInquiryModal>
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
|
|
@@ -151,13 +157,13 @@
|
|
|
import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
|
|
- import { queryQurcodeInquiryFormShipListByMainId, queryPurcodeInquiryFormProductListByMainId, queryDataById, saveOrUpdate } from '../PurchaseQuotationForm.api';
|
|
|
+ import { PuechaseQuotationFormShippTable, queryPurcodeQuotationFormProductListByMainId, queryDataById, saveOrUpdate } from '../PurchaseQuotationForm.api';
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
|
- import {PuechaseInquiryFormShipColumns, PuechaseInquiryFormProductColumns} from '../PurchaseQuotationForm.data';
|
|
|
+ import {PuechaseQuotationFormShipColumns, PuechaseQuotationFormProductColumns} from '../PurchaseQuotationForm.data';
|
|
|
import BaseShipArchiveAccessoriesList from './BaseShipArchiveAccessoriesModal.vue';
|
|
|
import SelectPrpductModal from './SelectPrpductModal.vue';
|
|
|
import SelectProjectModal from './SelectProjectModal.vue';
|
|
|
- import SelectCustomerInquiryModal from './SelectCustomerInquiryModal.vue';
|
|
|
+ import SelectSupplierInquiryModal from './SelectSupplierInquiryModal.vue';
|
|
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
|
|
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
|
|
import { JDictSelectTag} from '/@/components/Form';
|
|
@@ -166,7 +172,7 @@
|
|
|
import moment from 'moment';
|
|
|
const useForm = Form.useForm;
|
|
|
export default defineComponent({
|
|
|
- name: "PuechaseInquiryFormForm",
|
|
|
+ name: "PuechaseQuotationFormForm",
|
|
|
components:{
|
|
|
JVxeTable,
|
|
|
JFormContainer,
|
|
@@ -176,7 +182,7 @@
|
|
|
SelectProjectModal,
|
|
|
JDictSelectTag,
|
|
|
JSelectInput,
|
|
|
- SelectCustomerInquiryModal
|
|
|
+ SelectSupplierInquiryModal
|
|
|
},
|
|
|
props:{
|
|
|
formDisabled:{
|
|
@@ -192,22 +198,21 @@
|
|
|
const formRef = ref();
|
|
|
var SelectPrpductModalRef = ref()
|
|
|
var SelectProjectModalRef = ref()
|
|
|
- var SelectCustomerInquiryModalRef = ref()
|
|
|
- var inquiryPeriod = ref([])
|
|
|
- const PuechaseInquiryFormShipTableRef = ref();
|
|
|
- const PuechaseInquiryFormShipTable = reactive<Record<string, any>>({
|
|
|
+ var SelectSupplierInquiryModalRef = ref()
|
|
|
+ const PuechaseQuotationFormShipTableRef = ref();
|
|
|
+ const PuechaseQuotationFormShipTable = reactive<Record<string, any>>({
|
|
|
loading: false,
|
|
|
- columns: PuechaseInquiryFormShipColumns,
|
|
|
+ columns: PuechaseQuotationFormShipColumns,
|
|
|
dataSource: []
|
|
|
});
|
|
|
- const PuechaseInquiryFormProductTableRef = ref();
|
|
|
- const PuechaseInquiryFormProductTable = reactive<Record<string, any>>({
|
|
|
+ const PuechaseQuotationFormProductTableRef = ref();
|
|
|
+ const PuechaseQuotationFormProductTable = reactive<Record<string, any>>({
|
|
|
loading: false,
|
|
|
- columns: PuechaseInquiryFormProductColumns,
|
|
|
+ columns: PuechaseQuotationFormProductColumns,
|
|
|
dataSource: []
|
|
|
});
|
|
|
var BaseShipArchiveAccessoriesListRef = ref();
|
|
|
- const activeKey = ref('PuechaseInquiryFormShip');
|
|
|
+ const activeKey = ref('PuechaseQuotationFormShip');
|
|
|
var supplierOption = ref([]);
|
|
|
const formData = reactive<Record<string, any>>({
|
|
|
id: '',
|
|
@@ -219,8 +224,6 @@
|
|
|
billCode: '',
|
|
|
inquiryProject: '',
|
|
|
inquirySuppiler:"",
|
|
|
- inquiryPeriodEnd: '',
|
|
|
- inquiryPeriodBegin: ' ',
|
|
|
inquiryCustomer: '',
|
|
|
priority: '',
|
|
|
productionClass: '',
|
|
@@ -266,24 +269,21 @@
|
|
|
|
|
|
function add() {
|
|
|
resetFields();
|
|
|
- PuechaseInquiryFormShipTable.dataSource = [];
|
|
|
- PuechaseInquiryFormProductTable.dataSource = [];
|
|
|
- activeKey.value = 'PuechaseInquiryFormShip'
|
|
|
+ PuechaseQuotationFormShipTable.dataSource = [];
|
|
|
+ PuechaseQuotationFormProductTable.dataSource = [];
|
|
|
+ activeKey.value = 'PuechaseQuotationFormShip'
|
|
|
getSupplierOption()
|
|
|
- inquiryPeriod.value = []
|
|
|
}
|
|
|
|
|
|
async function edit(row) {
|
|
|
//主表数据
|
|
|
await queryMainData(row.id);
|
|
|
//子表数据
|
|
|
- const PuechaseInquiryFormShipDataList = await queryQurcodeInquiryFormShipListByMainId(row['id']);
|
|
|
- PuechaseInquiryFormShipTable.dataSource = [...PuechaseInquiryFormShipDataList];
|
|
|
- const PuechaseInquiryFormProductDataList = await queryPurcodeInquiryFormProductListByMainId(row['id']);
|
|
|
- PuechaseInquiryFormProductTable.dataSource = [...PuechaseInquiryFormProductDataList];
|
|
|
+ const PuechaseQuotationFormShipDataList = await PuechaseQuotationFormShippTable(row['id']);
|
|
|
+ PuechaseQuotationFormShipTable.dataSource = [...PuechaseQuotationFormShipDataList];
|
|
|
+ const PuechaseQuotationFormProductDataList = await queryPurcodeQuotationFormProductListByMainId(row['id']);
|
|
|
+ PuechaseQuotationFormProductTable.dataSource = [...PuechaseQuotationFormProductDataList];
|
|
|
getSupplierOption()
|
|
|
- inquiryPeriod.value[0]=formData.inquiryPeriodBegin?moment(formData.inquiryPeriodBegin):''
|
|
|
- inquiryPeriod.value[1]=formData.inquiryPeriodEnd?moment(formData.inquiryPeriodEnd):''
|
|
|
}
|
|
|
|
|
|
async function queryMainData(id) {
|
|
@@ -300,8 +300,8 @@
|
|
|
}
|
|
|
|
|
|
const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
|
|
|
- 'purInquiryFormShip': PuechaseInquiryFormShipTableRef,
|
|
|
- 'purInquiryFormProduct': PuechaseInquiryFormProductTableRef,
|
|
|
+ 'purPurchaseQuotationShip': PuechaseQuotationFormShipTableRef,
|
|
|
+ 'purPurchaseInquiryProduct': PuechaseQuotationFormProductTableRef,
|
|
|
});
|
|
|
|
|
|
async function getFormData() {
|
|
@@ -348,23 +348,23 @@
|
|
|
formData[key] = value;
|
|
|
}
|
|
|
async function handleDelete(prop) {
|
|
|
- var newArray = [...PuechaseInquiryFormShipTable.dataSource]
|
|
|
+ var newArray = [...PuechaseQuotationFormShipTable.dataSource]
|
|
|
newArray.splice(prop.rowIndex, 1)
|
|
|
- PuechaseInquiryFormShipTable.dataSource = newArray
|
|
|
+ PuechaseQuotationFormShipTable.dataSource = newArray
|
|
|
}
|
|
|
async function handleDelete1(prop) {
|
|
|
- var newArray = [...PuechaseInquiryFormProductTable.dataSource]
|
|
|
+ var newArray = [...PuechaseQuotationFormProductTable.dataSource]
|
|
|
newArray.splice(prop.rowIndex, 1)
|
|
|
- PuechaseInquiryFormProductTable.dataSource = newArray
|
|
|
+ PuechaseQuotationFormProductTable.dataSource = newArray
|
|
|
}
|
|
|
function addShip(data){
|
|
|
- var arr = data.concat(PuechaseInquiryFormShipTable.dataSource)
|
|
|
+ var arr = data.concat(PuechaseQuotationFormShipTable.dataSource)
|
|
|
arr.map(item=>item.shipowner = item.relateCustomer)
|
|
|
- PuechaseInquiryFormShipTable.dataSource=arr
|
|
|
+ PuechaseQuotationFormShipTable.dataSource=arr
|
|
|
|
|
|
}
|
|
|
function addProduct(data){
|
|
|
- var arrProduct = data.concat(PuechaseInquiryFormProductTable.dataSource)
|
|
|
+ var arrProduct = data.concat(PuechaseQuotationFormProductTable.dataSource)
|
|
|
arrProduct.map(item=>{
|
|
|
item.productClass = item.classId_dictText
|
|
|
item.productCode = item.code
|
|
@@ -372,7 +372,7 @@
|
|
|
item.needShip = '0'
|
|
|
item.shipInspection =''
|
|
|
})
|
|
|
- PuechaseInquiryFormProductTable.dataSource=arrProduct
|
|
|
+ PuechaseQuotationFormProductTable.dataSource=arrProduct
|
|
|
}
|
|
|
function addProject(data) {
|
|
|
if(data.length!==0){
|
|
@@ -385,14 +385,14 @@
|
|
|
|
|
|
}
|
|
|
function changeFormDeliveryTime(){
|
|
|
- var arrProduct = [...PuechaseInquiryFormProductTable.dataSource]
|
|
|
+ var arrProduct = [...PuechaseQuotationFormProductTable.dataSource]
|
|
|
arrProduct.map(item=>{
|
|
|
item.deliveryTime = formData.deliveryTime
|
|
|
})
|
|
|
- PuechaseInquiryFormProductTable.dataSource = arrProduct
|
|
|
+ PuechaseQuotationFormProductTable.dataSource = arrProduct
|
|
|
}
|
|
|
function addProductFromCustomer(data){
|
|
|
- var arrProduct = data.concat(PuechaseInquiryFormProductTable.dataSource)
|
|
|
+ var arrProduct = data.concat(PuechaseQuotationFormProductTable.dataSource)
|
|
|
arrProduct.map(item=>{
|
|
|
item.productClass = item.productionClass_dictText
|
|
|
item.productCode = item.productCode
|
|
@@ -401,7 +401,7 @@
|
|
|
item.model = item.childModel
|
|
|
item.deliveryTime = formData.deliveryTime
|
|
|
})
|
|
|
- PuechaseInquiryFormProductTable.dataSource=arrProduct
|
|
|
+ PuechaseQuotationFormProductTable.dataSource=arrProduct
|
|
|
formData.inquiryProject = data[0].inquiryProject
|
|
|
formData.projectName = data[0].projectName
|
|
|
formData.sourceCode = data[0].billCode
|
|
@@ -417,7 +417,7 @@
|
|
|
let params = {id:id}
|
|
|
defHttp.get({url:'/saleCode/saleInquiryForm/querySaleInquiryFormShipByMainId',params}, { isTransformResponse: false }).then(res=>{
|
|
|
if(res){
|
|
|
- PuechaseInquiryFormShipTable.dataSource = res.result
|
|
|
+ PuechaseQuotationFormShipTable.dataSource = res.result
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -427,32 +427,6 @@
|
|
|
function selectProducts(){
|
|
|
SelectPrpductModalRef.value.getTable()
|
|
|
}
|
|
|
- function setNeed(){
|
|
|
- const values = PuechaseInquiryFormProductTableRef.value.getSelectionData()
|
|
|
- values.map(item=>{
|
|
|
- PuechaseInquiryFormProductTable.dataSource.map(event=>{
|
|
|
- if(item.id == event.id){
|
|
|
- event.needShip = 1
|
|
|
- }
|
|
|
- })
|
|
|
- const xTable = PuechaseInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
|
|
|
- xTable.loadData(PuechaseInquiryFormProductTable.dataSource)
|
|
|
-
|
|
|
- })
|
|
|
- }
|
|
|
- function setNotNeed(){
|
|
|
- const values = PuechaseInquiryFormProductTableRef.value.getSelectionData()
|
|
|
- values.map(item=>{
|
|
|
- PuechaseInquiryFormProductTable.dataSource.map(event=>{
|
|
|
- if(item.id == event.id){
|
|
|
- event.needShip = 0
|
|
|
- }
|
|
|
- })
|
|
|
- const xTable = PuechaseInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
|
|
|
- xTable.loadData(PuechaseInquiryFormProductTable.dataSource)
|
|
|
-
|
|
|
- })
|
|
|
- }
|
|
|
function onSearchProject(){
|
|
|
SelectProjectModalRef.value.getTable()
|
|
|
}
|
|
@@ -475,13 +449,8 @@
|
|
|
// loading.value = false;
|
|
|
});
|
|
|
}
|
|
|
- function onChangeInquiryPeriod(data){
|
|
|
- inquiryPeriod.value = data
|
|
|
- formData.inquiryPeriodBegin = data[0].format('YYYY-MM-DD')
|
|
|
- formData.inquiryPeriodEnd = data[1].format('YYYY-MM-DD')
|
|
|
- }
|
|
|
- function SelectCustomerInquiry(){
|
|
|
- SelectCustomerInquiryModalRef.value.getTable(formData)
|
|
|
+ function SelectSupplierInquiry(){
|
|
|
+ SelectSupplierInquiryModalRef.value.getTable(formData)
|
|
|
}
|
|
|
function changeSupplier(prop){
|
|
|
if(prop){
|
|
@@ -497,10 +466,10 @@
|
|
|
|
|
|
}
|
|
|
return {
|
|
|
- PuechaseInquiryFormShipTableRef,
|
|
|
- PuechaseInquiryFormShipTable,
|
|
|
- PuechaseInquiryFormProductTableRef,
|
|
|
- PuechaseInquiryFormProductTable,
|
|
|
+ PuechaseQuotationFormShipTableRef,
|
|
|
+ PuechaseQuotationFormShipTable,
|
|
|
+ PuechaseQuotationFormProductTableRef,
|
|
|
+ PuechaseQuotationFormProductTable,
|
|
|
validatorRules,
|
|
|
validateInfos,
|
|
|
activeKey,
|
|
@@ -522,18 +491,14 @@
|
|
|
handleDelete,
|
|
|
handleDelete1,
|
|
|
selectProducts,
|
|
|
- setNeed,
|
|
|
- setNotNeed,
|
|
|
SelectPrpductModalRef,
|
|
|
SelectProjectModalRef,
|
|
|
- SelectCustomerInquiryModalRef,
|
|
|
+ SelectSupplierInquiryModalRef,
|
|
|
onSearchProject,
|
|
|
addProject,
|
|
|
getSupplierOption,
|
|
|
supplierOption,
|
|
|
- inquiryPeriod,
|
|
|
- onChangeInquiryPeriod,
|
|
|
- SelectCustomerInquiry,
|
|
|
+ SelectSupplierInquiry,
|
|
|
addProductFromCustomer,
|
|
|
changeFormDeliveryTime,
|
|
|
changeSupplier
|