|
@@ -16,28 +16,28 @@
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="项目(project)" v-bind="validateInfos.project" id="SaleOrderForm-project" name="project">
|
|
|
- <a-input-search v-model:value="formData.project" placeholder="请输入项目(project)" :disabled="SaleOrderFormShipFormProductTable.dataSource.length!==0" allow-clear enter-button="Search" ></a-input-search>
|
|
|
+ <a-form-item label="项目(project)" v-bind="validateInfos.projectName" id="SaleOrderForm-projectName" name="projectName">
|
|
|
+ <a-input-search v-model:value="formData.projectName" placeholder="请输入项目(project)" :disabled="SaleOrderFormShipFormProductTable.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="客户(customer)" v-bind="validateInfos.customer" id="SaleOrderForm-customer" name="customer">
|
|
|
- <a-input v-model:value="formData.customer" placeholder="请选择" allow-clear ></a-input>
|
|
|
+ <a-form-item label="客户(customer)" v-bind="validateInfos.customerName" id="SaleOrderForm-customerName" name="customerName">
|
|
|
+ <a-input v-model:value="formData.customerName" placeholder="请选择" allow-clear disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="中间人(intermediator)" v-bind="validateInfos.intermediator" id="SaleOrderForm-intermediator" name="intermediator">
|
|
|
- <a-input v-model:value="formData.intermediator" placeholder="请选择" allow-clear ></a-input>
|
|
|
+ <a-input v-model:value="formData.intermediatorName" placeholder="请选择" allow-clear disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="SaleOrderForm-priority" name="priority">
|
|
|
- <JDictSelectTag v-model:value="formData.priority" placeholder="请选择" dictCode="priority"/>
|
|
|
+ <JDictSelectTag v-model:value="formData.priority" placeholder="请选择" dictCode="priority" disabled/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="SaleOrderForm-productionClass" name="productionClass">
|
|
|
- <a-input v-model:value="formData.productionClass" placeholder="请输入" allow-clear disabled></a-input>
|
|
|
+ <a-input v-model:value="formData.productionClass" placeholder="请输入" allow-clear disabled ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
@@ -50,25 +50,35 @@
|
|
|
<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="币种(currency)" v-bind="validateInfos.currency" id="SaleOrderForm-currency" name="currency">
|
|
|
+ <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" disabled/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="汇率(exchange rate)" v-bind="validateInfos.exchangeRate" id="SaleOrderForm-exchangeRate" name="exchangeRate">
|
|
|
+ <a-input v-model:value="formData.exchangeRate" placeholder="请输入厂家(maker)" allow-clear ></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="交货条款(delivery term)" v-bind="validateInfos.deliveryTerm" id="SaleOrderForm-deliveryTerm" name="deliveryTerm">
|
|
|
- <JDictSelectTag v-model:value="formData.deliveryTerm" placeholder="请选择" dictCode="delivery_terms"/>
|
|
|
+ <a-form-item label="交货条款(delivery term)" v-bind="validateInfos.deliveryTerms" id="SaleOrderForm-deliveryTerms" name="deliveryTerms">
|
|
|
+ <JDictSelectTag v-model:value="formData.deliveryTerms" placeholder="请选择" dictCode="delivery_terms"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="付款条件(payment terms)" v-bind="validateInfos.paymentTerms" id="SaleOrderForm-paymentTerms" name="paymentTerms" :labelCol="formItemLayout.labelCol1" :wrapperCol="formItemLayout.wrapperCol1">
|
|
|
- <JDictSelectTag v-model:value="formData.paymentTerms" placeholder="请选择" dictCode="payment_terms" />
|
|
|
+ <JDictSelectTag v-model:value="formData.paymentTerms" placeholder="请选择" dictCode="payment_terms" disabled/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="交期(delivery time)" v-bind="validateInfos.deliveryTime" id="SaleOrderForm-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" @change="changeMainDeliveryTime" style="width: 100%" allow-clear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="发货方式(delivery)" v-bind="validateInfos.delivery" id="SaleOrderForm-delivery" name="delivery">
|
|
|
- <JDictSelectTag v-model:value="formData.delivery" placeholder="请选择" dictCode="delivery_methods" />
|
|
|
+ <JDictSelectTag v-model:value="formData.delivery" placeholder="请选择" dictCode="delivery_sale_order" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
@@ -87,28 +97,28 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="是否出口(export)" v-bind="validateInfos.export" id="SaleOrderForm-export" name="export">
|
|
|
- <JDictSelectTag v-model:value="formData.export" placeholder="请选择" dictCode="yes_or_no" />
|
|
|
+ <a-form-item label="是否出口(export)" v-bind="validateInfos.isExport" id="SaleOrderForm-isExport" name="isExport">
|
|
|
+ <JDictSelectTag v-model:value="formData.isExport" placeholder="请选择" dictCode="yes_or_no" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="包装要求(package requirement)" v-bind="validateInfos.packageRequirement" id="SaleOrderForm-packageRequirement" name="packageRequirement">
|
|
|
- <a-input v-model:value="formData.packageRequirement" placeholder="请输入包装要求(package requirement)" allow-clear ></a-input>
|
|
|
+ <a-form-item label="包装要求(package requirement)" v-bind="validateInfos.packagebRequirement" id="SaleOrderForm-packagebRequirement" name="packagebRequirement">
|
|
|
+ <a-input v-model:value="formData.packagebRequirement" placeholder="请输入包装要求(package requirement)" allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="销售部门(sale department)" v-bind="validateInfos.saleDepartment" id="SaleOrderForm-saleDepartment" name="saleDepartment">
|
|
|
- <a-input v-model:value="formData.saleDepartment" placeholder="请输入包装要求(package requirement)" allow-clear ></a-input>
|
|
|
+ <a-input v-model:value="formData.saleDepartment" placeholder="请输入" allow-clear disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="业务员(salesman)" v-bind="validateInfos.salesman" id="SaleOrderForm-salesman" name="salesman">
|
|
|
- <a-input v-model:value="formData.salesman" placeholder="请输入业务员(salesman)" allow-clear ></a-input>
|
|
|
+ <a-input v-model:value="formData.salesman" placeholder="请输入业务员(salesman)" allow-clear disabled ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="客户订单号(custormer order number)" v-bind="validateInfos.custormerOrderNumber" id="SaleOrderForm-custormerOrderNumber" name="custormerOrderNumber">
|
|
|
- <a-input v-model:value="formData.custormerOrderNumber" placeholder="请输入客户订单号(custormer order number)" allow-clear ></a-input>
|
|
|
+ <a-form-item label="客户订单号(custormer order number)" v-bind="validateInfos.customerOrder" id="SaleOrderForm-customerOrder" name="customerOrder">
|
|
|
+ <a-input v-model:value="formData.customerOrder" placeholder="请输入客户订单号(custormer order number)" allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
@@ -117,8 +127,8 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="折后金额(converted amount)" v-bind="validateInfos.doubleDiscconvertedAmountount" id="SaleOrderForm-convertedAmount" name="convertedAmount">
|
|
|
- <a-input v-model:value="formData.convertedAmount" placeholder="请输入折后金额(converted amount)" allow-clear ></a-input>
|
|
|
+ <a-form-item label="折后金额(converted amount)" v-bind="validateInfos.convertedAmount" id="SaleOrderForm-convertedAmount" name="convertedAmount">
|
|
|
+ <a-input v-model:value="formData.convertedAmount" placeholder="请输入折后金额(converted amount)" allow-clear disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
@@ -153,7 +163,7 @@
|
|
|
<j-vxe-table
|
|
|
:keep-source="true"
|
|
|
resizable
|
|
|
- ref="SaleOrderFormShipFormTableRef"
|
|
|
+ ref="SaleOrderFormShipFormShipTableRef"
|
|
|
:loading="SaleOrderFormShipFormShipTable.loading"
|
|
|
:columns="SaleOrderFormShipFormShipTable.columns"
|
|
|
:dataSource="SaleOrderFormShipFormShipTable.dataSource"
|
|
@@ -163,14 +173,14 @@
|
|
|
:rowSelection="true"
|
|
|
>
|
|
|
<template #action="props" >
|
|
|
- <a >查看配件信息(view accessory information)</a>
|
|
|
+ <a @click="viewAccessory(props)">查看配件信息(view accessory information)</a>
|
|
|
</template>
|
|
|
</j-vxe-table>
|
|
|
</a-tab-pane>
|
|
|
<a-tab-pane tab="销售订单 - 产品明细(product details)" key="SaleOrderFormShipFormProduct" :forceRender="true">
|
|
|
- <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;"> 选择产品(select product)</a-button>
|
|
|
- <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;"> 选择合同(select contract)</a-button>
|
|
|
- <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;"> 选择报价单(select quotation)</a-button>
|
|
|
+ <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;" @click="selectProductList"> 选择产品(select product)</a-button>
|
|
|
+ <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;" @click ="selectContractList"> 选择合同(select contract)</a-button>
|
|
|
+ <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;" @click ="selectQuotationList"> 选择报价单(select quotation)</a-button>
|
|
|
<j-vxe-table
|
|
|
:keep-source="true"
|
|
|
resizable
|
|
@@ -184,18 +194,19 @@
|
|
|
:rowSelection="true"
|
|
|
asyncRemove
|
|
|
>
|
|
|
- <template #action="props">
|
|
|
- <a-popconfirm title="确定删除吗?">
|
|
|
- <a>删除(delete)</a>
|
|
|
- </a-popconfirm>
|
|
|
+ <template #action="props">
|
|
|
+ <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
|
|
|
+ <a>删除(delete)</a>
|
|
|
+ </a-popconfirm>
|
|
|
</template>
|
|
|
</j-vxe-table>
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
|
- <!-- <BaseShipArchiveAccessoriesList ref="BaseShipArchiveAccessoriesListRef"></BaseShipArchiveAccessoriesList>
|
|
|
- <SelectPrpductModal ref="SelectPrpductModalRef" @selectProduct="addProduct"></SelectPrpductModal>
|
|
|
+ <SelectPrpductModal ref="SelectPrpductModalRef" @selectProduct ='addProduct'></SelectPrpductModal>
|
|
|
+ <SelectContractModal ref="SelectContractModalRef" @selectContract="addContract"></SelectContractModal>
|
|
|
+ <SelectQuotationModal ref="SelectQuotationModalRef" @selectQuotation="addQuotation"></SelectQuotationModal>
|
|
|
<SelectProjectModal ref="SelectProjectModalRef" @selectProject="addProject"></SelectProjectModal>
|
|
|
- <SelectSupplierInquiryModal ref="SelectSupplierInquiryModalRef" @selectCustomerInquiry="addProductFromCustomer"></SelectSupplierInquiryModal> -->
|
|
|
+ <BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesModalRef"></BaseShipArchiveAccessoriesModal>
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
|
|
@@ -203,13 +214,14 @@
|
|
|
import { defineComponent, ref, reactive, computed, toRaw} from 'vue';
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
|
|
- import { querySaleOrderFormShipFormShippTable, querySaleOrderFormProductListByMainId, queryDataById, saveOrUpdate } from '../SaleOrderyForm.api';
|
|
|
+ import { querySaleOrderFormShipFormShippTable, querySaleOrderFormProductListByMainId, queryDataById, saveOrUpdate,queryVersonHistoryById,querysaleVersonFormShipListByMainId, querySaleVersonProductListByMainId} from '../SaleOrderyForm.api';
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
|
import {saleOrderShipColumns, saleOrderProductColumns} from '../SaleOrderForm.data';
|
|
|
- // import BaseShipArchiveAccessoriesList from './BaseShipArchiveAccessoriesModal.vue';
|
|
|
- // import SelectPrpductModal from './SelectPrpductModal.vue';
|
|
|
- // import SelectProjectModal from './SelectProjectModal.vue';
|
|
|
- // import SelectSupplierInquiryModal from './SelectSupplierInquiryModal.vue';
|
|
|
+ import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
|
|
|
+ import SelectContractModal from '../../../publicComponents/SelectContractModal.vue';
|
|
|
+ import SelectQuotationModal from '../../../publicComponents/SelectQuotationModal.vue';
|
|
|
+ import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
|
|
|
+ import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.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';
|
|
@@ -222,13 +234,14 @@
|
|
|
components:{
|
|
|
JVxeTable,
|
|
|
JFormContainer,
|
|
|
- // BaseShipArchiveAccessoriesList,
|
|
|
- // SelectPrpductModal,
|
|
|
+ SelectPrpductModal,
|
|
|
+ SelectContractModal,
|
|
|
JUpload,
|
|
|
- // SelectProjectModal,
|
|
|
JDictSelectTag,
|
|
|
JSelectInput,
|
|
|
- // SelectSupplierInquiryModal
|
|
|
+ SelectQuotationModal,
|
|
|
+ SelectProjectModal,
|
|
|
+ BaseShipArchiveAccessoriesModal
|
|
|
},
|
|
|
props:{
|
|
|
formDisabled:{
|
|
@@ -243,6 +256,11 @@
|
|
|
const loading = ref(false);
|
|
|
const formRef = ref();
|
|
|
const SaleOrderFormShipFormShipTableRef = ref();
|
|
|
+ const SelectPrpductModalRef = ref()
|
|
|
+ const SelectContractModalRef = ref()
|
|
|
+ const SelectQuotationModalRef = ref()
|
|
|
+ const SelectProjectModalRef = ref()
|
|
|
+ const BaseShipArchiveAccessoriesModalRef = ref();
|
|
|
const SaleOrderFormShipFormShipTable = reactive<Record<string, any>>({
|
|
|
loading: false,
|
|
|
columns: saleOrderShipColumns,
|
|
@@ -261,31 +279,39 @@
|
|
|
delFlag: undefined,
|
|
|
billCode:'',
|
|
|
billDate: moment(new Date()).format('YYYY-MM-DD'),
|
|
|
- project: '',
|
|
|
+ project: '',
|
|
|
+ projectName:'',
|
|
|
customer:"",
|
|
|
- intermediator: '',
|
|
|
+ customerName:'',
|
|
|
+ intermediator: '',
|
|
|
+ intermediatorName:'',
|
|
|
priority: '',
|
|
|
productionClass: '',
|
|
|
model: '',
|
|
|
maker: '',
|
|
|
- deliveryTerm:'',
|
|
|
+ deliveryTerms:'',
|
|
|
paymentTerms:'',
|
|
|
delivery:'',
|
|
|
deliveryTime: '',
|
|
|
deliveryAddress:'',
|
|
|
invoiceHeader:'',
|
|
|
warrantyPeriod: '',
|
|
|
- export:'',
|
|
|
- packageRequirement:'',
|
|
|
+ isExport:'',
|
|
|
+ packagebRequirement:'',
|
|
|
saleDepartment:'',
|
|
|
salesman:'',
|
|
|
- custormerOrderNumber:'',
|
|
|
+ customerOrder:'',
|
|
|
doubleDiscount:'',
|
|
|
convertedAmount:'',
|
|
|
warrantyTerms:'',
|
|
|
advanceRatio:'',
|
|
|
notes:'',
|
|
|
- attachs:''
|
|
|
+ attachs:'',
|
|
|
+ sourceCode:'',
|
|
|
+ sourceCode2:'',
|
|
|
+ currency:'',
|
|
|
+ exchangeRate:'',
|
|
|
+ submit:''
|
|
|
});
|
|
|
|
|
|
//表单验证
|
|
@@ -318,6 +344,16 @@
|
|
|
SaleOrderFormShipFormProductTable.dataSource = [];
|
|
|
activeKey.value = 'SaleOrderFormShipFormShip'
|
|
|
}
|
|
|
+ async function copy(data,id){
|
|
|
+ //主表数据
|
|
|
+ await queryMainData(id);
|
|
|
+ formData.id = ''
|
|
|
+ formData.billCode = ''
|
|
|
+ //子表数据
|
|
|
+ const SaleOrderFormShipFormShipDataList = await querySaleOrderFormShipFormShippTable(id);
|
|
|
+ SaleOrderFormShipFormShipTable.dataSource = [...SaleOrderFormShipFormShipDataList];
|
|
|
+ SaleOrderFormShipFormProductTable.dataSource = [...data];
|
|
|
+ }
|
|
|
|
|
|
async function edit(row) {
|
|
|
//主表数据
|
|
@@ -341,10 +377,32 @@
|
|
|
//赋值
|
|
|
Object.assign(formData,tmpData);
|
|
|
}
|
|
|
+ //查看版本详情
|
|
|
+ async function VersionDetail(record){
|
|
|
+ //主表数据
|
|
|
+ await queryVersonHistoryData(record.id);
|
|
|
+ //子表数据
|
|
|
+ const SaleOrderFormShipFormShipDataList = await querysaleVersonFormShipListByMainId(record.id);
|
|
|
+ SaleOrderFormShipFormShipTable.dataSource = [...SaleOrderFormShipFormShipDataList];
|
|
|
+ const SaleOrderFormShipFormProductDataList = await querySaleVersonProductListByMainId(record.id);
|
|
|
+ SaleOrderFormShipFormProductTable.dataSource = [...SaleOrderFormShipFormProductDataList];
|
|
|
+ }
|
|
|
+ async function queryVersonHistoryData(id){
|
|
|
+ const row = await queryVersonHistoryById(id);
|
|
|
+ resetFields();
|
|
|
+ const tmpData = {};
|
|
|
+ Object.keys(formData).forEach((key) => {
|
|
|
+ if(row.hasOwnProperty(key)){
|
|
|
+ tmpData[key] = row[key]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ //赋值
|
|
|
+ Object.assign(formData,tmpData);
|
|
|
+ }
|
|
|
|
|
|
const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
|
|
|
- 'purPurchaseQuotationShip': SaleOrderFormShipFormShipTableRef,
|
|
|
- 'purPurchaseQuotationProduct': SaleOrderFormShipFormProductTableRef,
|
|
|
+ 'saleOrderShip': SaleOrderFormShipFormShipTableRef,
|
|
|
+ 'saleOrderProduct': SaleOrderFormShipFormProductTableRef,
|
|
|
});
|
|
|
|
|
|
async function getFormData() {
|
|
@@ -369,7 +427,8 @@
|
|
|
const values = Object.assign({}, dbData, mainData, subData);
|
|
|
console.log('表单提交数据', values)
|
|
|
const isUpdate = values.id ? true : false
|
|
|
- await saveOrUpdate(values, isUpdate);
|
|
|
+ const isRevise = values.submit=='1' ? true : false
|
|
|
+ await saveOrUpdate(values, isUpdate,isRevise);
|
|
|
//关闭弹窗
|
|
|
emit('success');
|
|
|
}
|
|
@@ -381,7 +440,111 @@
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ function selectProductList(){
|
|
|
+ SelectPrpductModalRef.value.getTable()
|
|
|
+ }
|
|
|
+ function selectContractList(){
|
|
|
+ SelectContractModalRef.value.getTable(formData)
|
|
|
+ }
|
|
|
+ function selectQuotationList(){
|
|
|
+ SelectQuotationModalRef.value.getTable(formData)
|
|
|
+ }
|
|
|
+ function onSearchProject(){
|
|
|
+ SelectProjectModalRef.value.getTable()
|
|
|
+ }
|
|
|
+ function addProduct(data){
|
|
|
+ var arrProduct = data.concat(SaleOrderFormShipFormProductTable.dataSource)
|
|
|
+ arrProduct.map(item=>{
|
|
|
+ item.productClass = item.classId_dictText
|
|
|
+ item.productCode = item.code
|
|
|
+ item.deliveryTime = formData.deliveryTime
|
|
|
+ })
|
|
|
+ SaleOrderFormShipFormProductTable.dataSource=arrProduct
|
|
|
+ }
|
|
|
+ function addQuotation(data){
|
|
|
+ var arrProduct = data.concat(SaleOrderFormShipFormProductTable.dataSource)
|
|
|
+ arrProduct.map(item=>{
|
|
|
+ item.model = item.childModel
|
|
|
+ item.deliveryTime = formData.deliveryTime
|
|
|
+ item.sourceId = item.childId
|
|
|
+ })
|
|
|
+ SaleOrderFormShipFormProductTable.dataSource=arrProduct
|
|
|
+ formData.sourceCode =data[0].billCode
|
|
|
+ if(!formData.sourceCode2&&formData.sourceCode2==''){
|
|
|
+ formData.project = data[0].quotationProject
|
|
|
+ formData.projectName = data[0].quotationProjectName
|
|
|
+ formData.customer =data[0].quotationCustomer
|
|
|
+ formData.customerName =data[0].quotationCustomerName
|
|
|
+ formData.priority =data[0].priority
|
|
|
+ formData.productionClass =data[0].productionClass
|
|
|
+ formData.model =data[0].headModel
|
|
|
+ formData.maker =data[0].maker
|
|
|
+ formData.currency =data[0].currency
|
|
|
+ formData.paymentTerms =data[0].paymentTerms
|
|
|
+ formData.intermediator =data[0].intermediator
|
|
|
+ formData.intermediatorName =data[0].intermediatorName
|
|
|
+ getShipList(data[0].headId)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function addContract(data){
|
|
|
+ var arrProduct = data.concat(SaleOrderFormShipFormProductTable.dataSource)
|
|
|
+ arrProduct.map(item=>{
|
|
|
+ item.model = item.childModel
|
|
|
+ item.deliveryTime = formData.deliveryTime
|
|
|
+ item.sourceId = item.childId
|
|
|
+ })
|
|
|
+ SaleOrderFormShipFormProductTable.dataSource=arrProduct
|
|
|
+ formData.sourceCode2 =data[0].billCode
|
|
|
+ if(!formData.sourceCode&&formData.sourceCode==''){
|
|
|
+ formData.project = data[0].quotationProject
|
|
|
+ formData.projectName = data[0].quotationProjectName
|
|
|
+ formData.customer =data[0].quotationCustomer
|
|
|
+ formData.customerName =data[0].quotationCustomerName
|
|
|
+ formData.priority =data[0].priority
|
|
|
+ formData.productionClass =data[0].productionClass
|
|
|
+ formData.model =data[0].headModel
|
|
|
+ formData.maker =data[0].maker
|
|
|
+ formData.currency =data[0].currency
|
|
|
+ formData.paymentTerms =data[0].paymentTerms
|
|
|
+ formData.intermediator =data[0].intermediator
|
|
|
+ formData.intermediatorName =data[0].intermediatorName
|
|
|
+ getShipList(data[0].headId)
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ function getShipList(id){
|
|
|
+ let params = {id:id}
|
|
|
+ defHttp.get({url:'/saleCode/saleQuotation/querySaleQuotationShipByMainId',params}, { isTransformResponse: false }).then(res=>{
|
|
|
+ if(res){
|
|
|
+ SaleOrderFormShipFormShipTable.dataSource = res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ function addProject(data){
|
|
|
+ formData.project = data[0].id
|
|
|
+ formData.projectName = data[0].name
|
|
|
+ formData.customer =data[0].customerId
|
|
|
+ formData.customerName =data[0].customerId_dictText
|
|
|
+ }
|
|
|
+ function changeMainDeliveryTime(prop){
|
|
|
+ if(SaleOrderFormShipFormProductTable.dataSource.length>0){
|
|
|
+ var newArr = [...SaleOrderFormShipFormProductTable.dataSource]
|
|
|
+ newArr.map(item=>{
|
|
|
+ item.deliveryTime = prop
|
|
|
+ })
|
|
|
+ SaleOrderFormShipFormProductTable.dataSource = newArr
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //查看配件信息
|
|
|
+ function viewAccessory(prop){
|
|
|
+ BaseShipArchiveAccessoriesModalRef.value.getTable(prop.row)
|
|
|
+ }
|
|
|
+ //产品明细-删除行
|
|
|
+ function handleDelete(prop) {
|
|
|
+ var newArray = [...SaleOrderFormShipFormProductTable.dataSource]
|
|
|
+ newArray.splice(prop.rowIndex, 1)
|
|
|
+ SaleOrderFormShipFormProductTable.dataSource = newArray
|
|
|
+ }
|
|
|
/**
|
|
|
* 值改变事件触发-树控件回调
|
|
|
* @param key
|
|
@@ -408,7 +571,25 @@
|
|
|
submitForm,
|
|
|
add,
|
|
|
edit,
|
|
|
+ copy,
|
|
|
formRef,
|
|
|
+ selectProductList,
|
|
|
+ SelectPrpductModalRef,
|
|
|
+ addProduct,
|
|
|
+ SelectContractModalRef,
|
|
|
+ selectContractList,
|
|
|
+ addContract,
|
|
|
+ SelectQuotationModalRef,
|
|
|
+ selectQuotationList,
|
|
|
+ addQuotation,
|
|
|
+ onSearchProject,
|
|
|
+ SelectProjectModalRef,
|
|
|
+ addProject,
|
|
|
+ changeMainDeliveryTime,
|
|
|
+ handleDelete,
|
|
|
+ BaseShipArchiveAccessoriesModalRef,
|
|
|
+ viewAccessory,
|
|
|
+ VersionDetail
|
|
|
}
|
|
|
}
|
|
|
});
|