|
@@ -2,57 +2,57 @@
|
|
|
<a-spin :spinning="loading">
|
|
|
<JFormContainer :disabled="disabled">
|
|
|
<template #detail>
|
|
|
- <a-form v-bind="formItemLayout" name="SaleInquiryFormForm" ref="formRef">
|
|
|
+ <a-form v-bind="formItemLayout" name="PuechaseInquiryFormForm" ref="formRef">
|
|
|
<a-row>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="询价单号(bill code)" v-bind="validateInfos.billCode" id="SaleInquiryFormForm-billCode" name="billCode">
|
|
|
+ <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>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="SaleInquiryFormForm-billDate" name="billDate">
|
|
|
+ <a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="PuechaseInquiryFormForm-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.inquiryProject" id="SaleInquiryFormForm-inquiryProject" name="inquiryProject">
|
|
|
- <a-input-search v-model:value="formData.inquiryProject" placeholder="请输入询价项目(inquiry project)" allow-clear enter-button="Search" @search="onSearchProject"></a-input-search>
|
|
|
+ <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>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="询价供应商(inquiry supplier)" v-bind="validateInfos.inquirySuppiler" id="SaleInquiryFormForm-inquirySuppiler" name="inquirySuppiler">
|
|
|
- <JSelectInput v-model:value="formData.inquirySuppiler" placeholder="请选择" :options="customerOption" disabled></JSelectInput>
|
|
|
+ <a-form-item label="询价供应商(inquiry supplier)" v-bind="validateInfos.inquirySuppiler" id="PuechaseInquiryFormForm-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="SaleInquiryFormForm-inquiryPeriodEnd" name="inquiryPeriodEnd">
|
|
|
+ <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>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="SaleInquiryFormForm-priority" name="priority">
|
|
|
+ <a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="PuechaseInquiryFormForm-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="SaleInquiryFormForm-productionClass" name="productionClass">
|
|
|
- <JSelectInput v-model:value="formData.productionClass" placeholder="请选择" :options="classOption" ></JSelectInput>
|
|
|
+ <a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="PuechaseInquiryFormForm-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="SaleInquiryFormForm-model" name="model">
|
|
|
- <JDictSelectTag v-model:value="formData.model" placeholder="请选择" dictCode="model_typer"/>
|
|
|
+ <a-form-item label="机型(model)" v-bind="validateInfos.model" id="PuechaseInquiryFormForm-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="SaleInquiryFormForm-maker" name="maker">
|
|
|
- <a-input v-model:value="formData.maker" placeholder="请输入厂家(maker)" allow-clear ></a-input>
|
|
|
+ <a-form-item label="厂家(maker)" v-bind="validateInfos.maker" id="PuechaseInquiryFormForm-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="SaleInquiryFormForm-placeDelivery" name="placeDelivery">
|
|
|
- <a-input v-model:value="formData.placeDelivery" placeholder="" allow-clear disabled></a-input>
|
|
|
+ <a-form-item label="交货地点(place of delivery)" v-bind="validateInfos.placeDelivery" id="PuechaseInquiryFormForm-placeDelivery" name="placeDelivery">
|
|
|
+ <a-input v-model:value="formData.placeDelivery" placeholder="" allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
@@ -61,33 +61,33 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="发货方式(delivery)" v-bind="validateInfos.delivery" id="SaleInquiryFormForm-delivery" name="delivery">
|
|
|
- <a-date-picker placeholder="请选择" v-model:value="formData.delivery" value-format="YYYY-MM-DD" format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
|
|
+ <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>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="交期(delivery time)" v-bind="validateInfos.deliveryTime" id="quotationFormForm-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 />
|
|
|
+ <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="SaleInquiryFormForm-inquiryTeam" name="inquiryTeam">
|
|
|
- <JDictSelectTag v-model:value="formData.inquiryTeam" placeholder="请选择" dictCode="procurement_inquiry_team"/>
|
|
|
+ <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.quotationValidityPeriod" id="SaleInquiryFormForm-quotationValidityPeriod" name="quotationValidityPeriod">
|
|
|
- <a-input v-model:value="formData.quotationValidityPeriod" placeholder="请输入" />
|
|
|
+ <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>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="询价备注(inquiry notes)" v-bind="validateInfos.inquiryNotes" id="SaleInquiryFormForm-inquiryNotes" name="inquiryNotes">
|
|
|
+ <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>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="SaleInquiryFormForm-attachs" name="attachs">
|
|
|
+ <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="PuechaseInquiryFormForm-attachs" name="attachs">
|
|
|
<JUpload v-model:value="formData.attachs"></JUpload>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
@@ -98,15 +98,14 @@
|
|
|
|
|
|
<!-- 子表单区域 -->
|
|
|
<a-tabs v-model:activeKey="activeKey" animated style=" padding: 24px;padding-top: 0px;">
|
|
|
- <a-tab-pane tab="销售询价单子表 - 船明细(ship details)" key="saleInquiryFormShip" :forceRender="true">
|
|
|
- <!-- <a-button type="primary" @click="selectShip"> 选择船(select ship)</a-button> -->
|
|
|
+ <a-tab-pane tab="残垢询价单子表 - 船明细(ship details)" key="PuechaseInquiryFormShip" :forceRender="true">
|
|
|
<j-vxe-table
|
|
|
:keep-source="true"
|
|
|
resizable
|
|
|
- ref="saleInquiryFormShipTableRef"
|
|
|
- :loading="saleInquiryFormShipTable.loading"
|
|
|
- :columns="saleInquiryFormShipTable.columns"
|
|
|
- :dataSource="saleInquiryFormShipTable.dataSource"
|
|
|
+ ref="PuechaseInquiryFormShipTableRef"
|
|
|
+ :loading="PuechaseInquiryFormShipTable.loading"
|
|
|
+ :columns="PuechaseInquiryFormShipTable.columns"
|
|
|
+ :dataSource="PuechaseInquiryFormShipTable.dataSource"
|
|
|
:height="340"
|
|
|
:disabled="disabled"
|
|
|
:rowNumber="true"
|
|
@@ -114,22 +113,19 @@
|
|
|
>
|
|
|
<template #action="props" >
|
|
|
<a @click="viewAccessory(props)" >查看配件信息(view accessory information)</a>
|
|
|
- <!-- <a-divider type="vertical"/>
|
|
|
- <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
|
|
|
- <a>删除(delete)</a>
|
|
|
- </a-popconfirm> -->
|
|
|
</template>
|
|
|
</j-vxe-table>
|
|
|
</a-tab-pane>
|
|
|
- <a-tab-pane tab="销售询价单子表 - 产品明细(product details)" key="saleInquiryFormProduct" :forceRender="true">
|
|
|
+ <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-button type="primary" @click="selectProducts" style="margin-right: 1%;margin-bottom: 1%;"> 选择产品(select product)</a-button>
|
|
|
<j-vxe-table
|
|
|
:keep-source="true"
|
|
|
resizable
|
|
|
- ref="saleInquiryFormProductTableRef"
|
|
|
- :loading="saleInquiryFormProductTable.loading"
|
|
|
- :columns="saleInquiryFormProductTable.columns"
|
|
|
- :dataSource="saleInquiryFormProductTable.dataSource"
|
|
|
+ ref="PuechaseInquiryFormProductTableRef"
|
|
|
+ :loading="PuechaseInquiryFormProductTable.loading"
|
|
|
+ :columns="PuechaseInquiryFormProductTable.columns"
|
|
|
+ :dataSource="PuechaseInquiryFormProductTable.dataSource"
|
|
|
:height="340"
|
|
|
:disabled="disabled"
|
|
|
:rowNumber="true"
|
|
@@ -144,10 +140,10 @@
|
|
|
</j-vxe-table>
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
- <SelectShipSModal ref="SelectShipSModalRef" @select="addShip"></SelectShipSModal>
|
|
|
<BaseShipArchiveAccessoriesList ref="BaseShipArchiveAccessoriesListRef"></BaseShipArchiveAccessoriesList>
|
|
|
<SelectPrpductModal ref="SelectPrpductModalRef" @selectProduct="addProduct"></SelectPrpductModal>
|
|
|
<SelectProjectModal ref="SelectProjectModalRef" @selectProject="addProject"></SelectProjectModal>
|
|
|
+ <SelectCustomerInquiryModal ref="SelectCustomerInquiryModalRef" @selectCustomerInquiry="addProductFromCustomer"></SelectCustomerInquiryModal>
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
|
|
@@ -157,32 +153,30 @@
|
|
|
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
|
|
import { queryQurcodeInquiryFormShipListByMainId, queryPurcodeInquiryFormProductListByMainId, queryDataById, saveOrUpdate } from '../purchaseInquiryForm.api';
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
|
- import {saleInquiryFormShipColumns, saleInquiryFormProductColumns} from '../PurchaseInquiryForm.data';
|
|
|
- import SelectShipSModal from './SelectShipSModal.vue';
|
|
|
+ import {PuechaseInquiryFormShipColumns, PuechaseInquiryFormProductColumns} from '../PurchaseInquiryForm.data';
|
|
|
import BaseShipArchiveAccessoriesList from './BaseShipArchiveAccessoriesModal.vue';
|
|
|
import SelectPrpductModal from './SelectPrpductModal.vue';
|
|
|
import SelectProjectModal from './SelectProjectModal.vue';
|
|
|
+ import SelectCustomerInquiryModal from './SelectCustomerInquiryModal.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';
|
|
|
import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
|
|
|
import { Form } from 'ant-design-vue';
|
|
|
- import { useUserStore } from '/@/store/modules/user';
|
|
|
import moment from 'moment';
|
|
|
- const userStore = useUserStore();
|
|
|
const useForm = Form.useForm;
|
|
|
export default defineComponent({
|
|
|
- name: "SaleInquiryFormForm",
|
|
|
+ name: "PuechaseInquiryFormForm",
|
|
|
components:{
|
|
|
JVxeTable,
|
|
|
JFormContainer,
|
|
|
- SelectShipSModal,
|
|
|
BaseShipArchiveAccessoriesList,
|
|
|
SelectPrpductModal,
|
|
|
JUpload,
|
|
|
SelectProjectModal,
|
|
|
JDictSelectTag,
|
|
|
JSelectInput,
|
|
|
+ SelectCustomerInquiryModal
|
|
|
},
|
|
|
props:{
|
|
|
formDisabled:{
|
|
@@ -198,24 +192,23 @@
|
|
|
const formRef = ref();
|
|
|
var SelectPrpductModalRef = ref()
|
|
|
var SelectProjectModalRef = ref()
|
|
|
+ var SelectCustomerInquiryModalRef = ref()
|
|
|
var inquiryPeriod = ref([])
|
|
|
- const saleInquiryFormShipTableRef = ref();
|
|
|
- const saleInquiryFormShipTable = reactive<Record<string, any>>({
|
|
|
+ const PuechaseInquiryFormShipTableRef = ref();
|
|
|
+ const PuechaseInquiryFormShipTable = reactive<Record<string, any>>({
|
|
|
loading: false,
|
|
|
- columns: saleInquiryFormShipColumns,
|
|
|
+ columns: PuechaseInquiryFormShipColumns,
|
|
|
dataSource: []
|
|
|
});
|
|
|
- const saleInquiryFormProductTableRef = ref();
|
|
|
- const saleInquiryFormProductTable = reactive<Record<string, any>>({
|
|
|
+ const PuechaseInquiryFormProductTableRef = ref();
|
|
|
+ const PuechaseInquiryFormProductTable = reactive<Record<string, any>>({
|
|
|
loading: false,
|
|
|
- columns: saleInquiryFormProductColumns,
|
|
|
+ columns: PuechaseInquiryFormProductColumns,
|
|
|
dataSource: []
|
|
|
});
|
|
|
- var SelectShipSModalRef = ref();
|
|
|
var BaseShipArchiveAccessoriesListRef = ref();
|
|
|
- const activeKey = ref('saleInquiryFormShip');
|
|
|
- var classOption = ref([]);
|
|
|
- var customerOption =ref([]);
|
|
|
+ const activeKey = ref('PuechaseInquiryFormShip');
|
|
|
+ var supplierOption = ref([]);
|
|
|
const formData = reactive<Record<string, any>>({
|
|
|
id: '',
|
|
|
status: undefined,
|
|
@@ -225,23 +218,25 @@
|
|
|
billDate: moment(new Date()).format('YYYY-MM-DD'),
|
|
|
billCode: '',
|
|
|
inquiryProject: '',
|
|
|
- projectName:"",
|
|
|
- inquiryCustomer: '',
|
|
|
- customerName:'',
|
|
|
- inquiryPlatform: '',
|
|
|
- customerInquiryNumber: '',
|
|
|
+ inquirySuppiler:"",
|
|
|
inquiryPeriodEnd: '',
|
|
|
- inquiryPeriodBegin: '',
|
|
|
+ inquiryPeriodBegin: ' ',
|
|
|
+ inquiryCustomer: '',
|
|
|
priority: '',
|
|
|
productionClass: '',
|
|
|
model: '',
|
|
|
- maker: '',
|
|
|
- saleDepartment: '',
|
|
|
- salesman: '',
|
|
|
+ maker: '',
|
|
|
+ paymentTerms:'',
|
|
|
+ delivery:'',
|
|
|
+ deliveryTime: '',
|
|
|
inquiryTeam: '',
|
|
|
- deliveryTime: '',
|
|
|
+ quotationValidity:'',
|
|
|
attachs: '',
|
|
|
inquiryNotes: '',
|
|
|
+ sourceCode:'',
|
|
|
+ projectName:'',
|
|
|
+ placeDelivery:'',
|
|
|
+ suppilerName:''
|
|
|
});
|
|
|
|
|
|
//表单验证
|
|
@@ -270,28 +265,24 @@
|
|
|
|
|
|
function add() {
|
|
|
resetFields();
|
|
|
- saleInquiryFormShipTable.dataSource = [];
|
|
|
- saleInquiryFormProductTable.dataSource = [];
|
|
|
- activeKey.value = 'saleInquiryFormShip'
|
|
|
- getOptiom()
|
|
|
- getCustomerOptions()
|
|
|
+ PuechaseInquiryFormShipTable.dataSource = [];
|
|
|
+ PuechaseInquiryFormProductTable.dataSource = [];
|
|
|
+ activeKey.value = 'PuechaseInquiryFormShip'
|
|
|
+ getSupplierOption()
|
|
|
inquiryPeriod.value = []
|
|
|
- formData.salesman=userStore.getUserInfo.username;
|
|
|
- formData.saleDepartment = userStore.getUserInfo.orgCode
|
|
|
}
|
|
|
|
|
|
async function edit(row) {
|
|
|
//主表数据
|
|
|
await queryMainData(row.id);
|
|
|
//子表数据
|
|
|
- const saleInquiryFormShipDataList = await queryQurcodeInquiryFormShipListByMainId(row['id']);
|
|
|
- saleInquiryFormShipTable.dataSource = [...saleInquiryFormShipDataList];
|
|
|
- const saleInquiryFormProductDataList = await queryPurcodeInquiryFormProductListByMainId(row['id']);
|
|
|
- saleInquiryFormProductTable.dataSource = [...saleInquiryFormProductDataList];
|
|
|
- getOptiom()
|
|
|
- getCustomerOptions()
|
|
|
- inquiryPeriod.value[0]=formData.inquiryPeriodBegin?moment(formData.inquiryPeriodBegin):''
|
|
|
- inquiryPeriod.value[1]=formData.inquiryPeriodEnd?moment(formData.inquiryPeriodEnd):''
|
|
|
+ const PuechaseInquiryFormShipDataList = await queryQurcodeInquiryFormShipListByMainId(row['id']);
|
|
|
+ PuechaseInquiryFormShipTable.dataSource = [...PuechaseInquiryFormShipDataList];
|
|
|
+ const PuechaseInquiryFormProductDataList = await queryPurcodeInquiryFormProductListByMainId(row['id']);
|
|
|
+ PuechaseInquiryFormProductTable.dataSource = [...PuechaseInquiryFormProductDataList];
|
|
|
+ getSupplierOption()
|
|
|
+ inquiryPeriod.value[0]=formData.inquiryPeriodBegin?moment(formData.inquiryPeriodBegin):''
|
|
|
+ inquiryPeriod.value[1]=formData.inquiryPeriodEnd?moment(formData.inquiryPeriodEnd):''
|
|
|
}
|
|
|
|
|
|
async function queryMainData(id) {
|
|
@@ -308,8 +299,8 @@
|
|
|
}
|
|
|
|
|
|
const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
|
|
|
- 'saleInquiryFormShip': saleInquiryFormShipTableRef,
|
|
|
- 'saleInquiryFormProduct': saleInquiryFormProductTableRef,
|
|
|
+ 'purInquiryFormShip': PuechaseInquiryFormShipTableRef,
|
|
|
+ 'purInquiryFormProduct': PuechaseInquiryFormProductTableRef,
|
|
|
});
|
|
|
|
|
|
async function getFormData() {
|
|
@@ -356,56 +347,73 @@
|
|
|
formData[key] = value;
|
|
|
}
|
|
|
async function handleDelete(prop) {
|
|
|
- var newArray = [...saleInquiryFormShipTable.dataSource]
|
|
|
+ var newArray = [...PuechaseInquiryFormShipTable.dataSource]
|
|
|
newArray.splice(prop.rowIndex, 1)
|
|
|
- saleInquiryFormShipTable.dataSource = newArray
|
|
|
+ PuechaseInquiryFormShipTable.dataSource = newArray
|
|
|
}
|
|
|
async function handleDelete1(prop) {
|
|
|
- var newArray = [...saleInquiryFormProductTable.dataSource]
|
|
|
+ var newArray = [...PuechaseInquiryFormProductTable.dataSource]
|
|
|
newArray.splice(prop.rowIndex, 1)
|
|
|
- saleInquiryFormProductTable.dataSource = newArray
|
|
|
- }
|
|
|
- function selectShip(){
|
|
|
- SelectShipSModalRef.value.getTable()
|
|
|
+ PuechaseInquiryFormProductTable.dataSource = newArray
|
|
|
}
|
|
|
function addShip(data){
|
|
|
- var arr = data.concat(saleInquiryFormShipTable.dataSource)
|
|
|
+ var arr = data.concat(PuechaseInquiryFormShipTable.dataSource)
|
|
|
arr.map(item=>item.shipowner = item.relateCustomer)
|
|
|
- saleInquiryFormShipTable.dataSource=arr
|
|
|
+ PuechaseInquiryFormShipTable.dataSource=arr
|
|
|
|
|
|
}
|
|
|
function addProduct(data){
|
|
|
- var arrProduct = data.concat(saleInquiryFormProductTable.dataSource)
|
|
|
+ var arrProduct = data.concat(PuechaseInquiryFormProductTable.dataSource)
|
|
|
arrProduct.map(item=>{
|
|
|
item.productClass = item.classId_dictText
|
|
|
item.productCode = item.code
|
|
|
item.unit = item.measurementUnit
|
|
|
})
|
|
|
- saleInquiryFormProductTable.dataSource=arrProduct
|
|
|
+ PuechaseInquiryFormProductTable.dataSource=arrProduct
|
|
|
}
|
|
|
function addProject(data) {
|
|
|
- formData.inquiryProject = data[0].id
|
|
|
- formData.projectName = data[0].name
|
|
|
- formData.inquiryCustomer =data[0].customerId
|
|
|
- formData.customerName =data[0].customerId_dictText
|
|
|
- customerOption.value.map(item=>{
|
|
|
- if(item.value==data[0].customerId){
|
|
|
- formData.priority =item.priority
|
|
|
- }
|
|
|
+ if(data.length!==0){
|
|
|
+ formData.inquiryProject = data[0].id
|
|
|
+ formData.projectName = data[0].name
|
|
|
+ }else{
|
|
|
+ formData.inquiryProject = ''
|
|
|
+ formData.projectName = ''
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ function changeFormDeliveryTime(){
|
|
|
+ var arrProduct = [...PuechaseInquiryFormProductTable.dataSource]
|
|
|
+ arrProduct.map(item=>{
|
|
|
+ item.deliveryTime = formData.deliveryTime
|
|
|
})
|
|
|
+ PuechaseInquiryFormProductTable.dataSource = arrProduct
|
|
|
}
|
|
|
- function getCustomerOptions(){
|
|
|
- let params = {pageSize:'-1',status:1}
|
|
|
- defHttp.get({url:'/cuspCode/cuspCustomerProfile/list',params}, { isTransformResponse: false }).then(res=>{
|
|
|
+ function addProductFromCustomer(data){
|
|
|
+ var arrProduct = data.concat(PuechaseInquiryFormProductTable.dataSource)
|
|
|
+ arrProduct.map(item=>{
|
|
|
+ item.productClass = item.productionClass_dictText
|
|
|
+ item.productCode = item.productCode
|
|
|
+ item.unit = item.measurementUnit
|
|
|
+ item.sourceId = item.childId
|
|
|
+ item.model = item.childModel
|
|
|
+ item.deliveryTime = formData.deliveryTime
|
|
|
+ })
|
|
|
+ PuechaseInquiryFormProductTable.dataSource=arrProduct
|
|
|
+ formData.inquiryProject = data[0].inquiryProject
|
|
|
+ formData.projectName = data[0].projectName
|
|
|
+ formData.sourceCode = data[0].billCode
|
|
|
+ formData.priority = data[0].priority
|
|
|
+ formData.model = data[0].headModel
|
|
|
+ formData.maker = data[0].maker
|
|
|
+ formData.inquiryTeam = data[0].inquiryTeam
|
|
|
+ formData.productionClass = data[0].productionClass_dictText
|
|
|
+ getShipList(data[0].headId)
|
|
|
+ }
|
|
|
+ function getShipList(id){
|
|
|
+ let params = {id:id}
|
|
|
+ defHttp.get({url:'/saleCode/saleInquiryForm/querySaleInquiryFormShipByMainId',params}, { isTransformResponse: false }).then(res=>{
|
|
|
if(res){
|
|
|
- customerOption.value = []
|
|
|
- res.result.records.forEach(item=>{
|
|
|
- customerOption.value.push({
|
|
|
- label: item.name,
|
|
|
- value: item.id,
|
|
|
- priority:item.priority
|
|
|
- })
|
|
|
- })
|
|
|
+ PuechaseInquiryFormShipTable.dataSource = res.result
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -416,46 +424,46 @@
|
|
|
SelectPrpductModalRef.value.getTable()
|
|
|
}
|
|
|
function setNeed(){
|
|
|
- const values = saleInquiryFormProductTableRef.value.getSelectionData()
|
|
|
+ const values = PuechaseInquiryFormProductTableRef.value.getSelectionData()
|
|
|
values.map(item=>{
|
|
|
- saleInquiryFormProductTable.dataSource.map(event=>{
|
|
|
+ PuechaseInquiryFormProductTable.dataSource.map(event=>{
|
|
|
if(item.id == event.id){
|
|
|
event.needShip = 1
|
|
|
}
|
|
|
})
|
|
|
- const xTable = saleInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
|
|
|
- xTable.loadData(saleInquiryFormProductTable.dataSource)
|
|
|
+ const xTable = PuechaseInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
|
|
|
+ xTable.loadData(PuechaseInquiryFormProductTable.dataSource)
|
|
|
|
|
|
})
|
|
|
}
|
|
|
function setNotNeed(){
|
|
|
- const values = saleInquiryFormProductTableRef.value.getSelectionData()
|
|
|
+ const values = PuechaseInquiryFormProductTableRef.value.getSelectionData()
|
|
|
values.map(item=>{
|
|
|
- saleInquiryFormProductTable.dataSource.map(event=>{
|
|
|
+ PuechaseInquiryFormProductTable.dataSource.map(event=>{
|
|
|
if(item.id == event.id){
|
|
|
event.needShip = 0
|
|
|
}
|
|
|
})
|
|
|
- const xTable = saleInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
|
|
|
- xTable.loadData(saleInquiryFormProductTable.dataSource)
|
|
|
+ const xTable = PuechaseInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
|
|
|
+ xTable.loadData(PuechaseInquiryFormProductTable.dataSource)
|
|
|
|
|
|
})
|
|
|
}
|
|
|
function onSearchProject(){
|
|
|
SelectProjectModalRef.value.getTable()
|
|
|
}
|
|
|
- function getOptiom(){
|
|
|
+ function getSupplierOption(){
|
|
|
defHttp
|
|
|
- .get({ url: 'baseCode/baseProductClass/list'}, { isTransformResponse: false })
|
|
|
+ .get({ url: '/cuspCode/cuspSupplierProfile/list'}, { isTransformResponse: false })
|
|
|
.then((res) => {
|
|
|
if (res.success) {
|
|
|
- classOption.value = []
|
|
|
+ supplierOption.value = []
|
|
|
res.result.records.forEach(element => {
|
|
|
var obj = {
|
|
|
label: element.name?element.name:'无名称请维护',
|
|
|
value: element.id?element.id:''
|
|
|
};
|
|
|
- classOption.value.push( obj)
|
|
|
+ supplierOption.value.push( obj)
|
|
|
});
|
|
|
}
|
|
|
})
|
|
@@ -468,11 +476,27 @@
|
|
|
formData.inquiryPeriodBegin = data[0].format('YYYY-MM-DD')
|
|
|
formData.inquiryPeriodEnd = data[1].format('YYYY-MM-DD')
|
|
|
}
|
|
|
+ function SelectCustomerInquiry(){
|
|
|
+ SelectCustomerInquiryModalRef.value.getTable(formData)
|
|
|
+ }
|
|
|
+ function changeSupplier(prop){
|
|
|
+ if(prop){
|
|
|
+ supplierOption.value.map(item=>{
|
|
|
+ if(item.value==prop){
|
|
|
+ formData.suppilerName = item.label
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ formData.inquirySuppiler = ''
|
|
|
+ formData.suppilerName = ''
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
return {
|
|
|
- saleInquiryFormShipTableRef,
|
|
|
- saleInquiryFormShipTable,
|
|
|
- saleInquiryFormProductTableRef,
|
|
|
- saleInquiryFormProductTable,
|
|
|
+ PuechaseInquiryFormShipTableRef,
|
|
|
+ PuechaseInquiryFormShipTable,
|
|
|
+ PuechaseInquiryFormProductTableRef,
|
|
|
+ PuechaseInquiryFormProductTable,
|
|
|
validatorRules,
|
|
|
validateInfos,
|
|
|
activeKey,
|
|
@@ -484,11 +508,9 @@
|
|
|
disabled,
|
|
|
getFormData,
|
|
|
submitForm,
|
|
|
- SelectShipSModalRef,
|
|
|
add,
|
|
|
edit,
|
|
|
formRef,
|
|
|
- selectShip,
|
|
|
addShip,
|
|
|
addProduct,
|
|
|
BaseShipArchiveAccessoriesListRef,
|
|
@@ -500,14 +522,17 @@
|
|
|
setNotNeed,
|
|
|
SelectPrpductModalRef,
|
|
|
SelectProjectModalRef,
|
|
|
+ SelectCustomerInquiryModalRef,
|
|
|
onSearchProject,
|
|
|
addProject,
|
|
|
- getOptiom,
|
|
|
- classOption,
|
|
|
- getCustomerOptions,
|
|
|
- customerOption,
|
|
|
+ getSupplierOption,
|
|
|
+ supplierOption,
|
|
|
inquiryPeriod,
|
|
|
- onChangeInquiryPeriod
|
|
|
+ onChangeInquiryPeriod,
|
|
|
+ SelectCustomerInquiry,
|
|
|
+ addProductFromCustomer,
|
|
|
+ changeFormDeliveryTime,
|
|
|
+ changeSupplier
|
|
|
}
|
|
|
}
|
|
|
});
|