|
@@ -223,8 +223,9 @@
|
|
|
<!-- 子表单区域 -->
|
|
|
<a-tabs v-model:activeKey="activeKey" animated style="padding: 24px; padding-top: 0px">
|
|
|
<a-tab-pane tab="采购订单 - 产品明细(product details)" key="purOrderFormShipFormProduct" :forceRender="true">
|
|
|
- <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;" @click="selectSaleOrderList"> 选择销售订单(select saleorder)</a-button>
|
|
|
+ <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;" @click="selectSaleOrderList" :disabled="formData.sourceCode!==''"> 选择销售订单(select saleorder)</a-button>
|
|
|
<a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;" @click="selectVirtualProducts"> 选择虚拟产品(select virtual products)</a-button>
|
|
|
+ <a-button type="primary" style="margin-right: 1%;margin-bottom: 1%;" @click="SelectSupplierQuotationList" :disabled="formData.sourceCode2!==''">选择供应商报价选定(select supplier quotation selection)</a-button>
|
|
|
<j-vxe-table
|
|
|
:keep-source="true"
|
|
|
resizable
|
|
@@ -269,6 +270,7 @@
|
|
|
<SelectProjectModal ref="SelectProjectModalRef" @selectProject="addProject"></SelectProjectModal>
|
|
|
<BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesModalRef"></BaseShipArchiveAccessoriesModal>
|
|
|
<SelectSaleOrderModal ref="SelectSaleOrderModalRef" @selectSaleOrder="addFormSaleOrder"></SelectSaleOrderModal>
|
|
|
+ <SelectSupplierQuotation ref="SelectSupplierQuotationRef" @selectSupplierQuatationConfirm="addFromQuotation"></SelectSupplierQuotation>
|
|
|
</a-spin>
|
|
|
</template>
|
|
|
|
|
@@ -293,6 +295,7 @@
|
|
|
import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
|
|
|
import SelectSaleOrderModal from '../../../publicComponents/SelectSaleOrderModal.vue';
|
|
|
import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
|
|
|
+ import SelectSupplierQuotation from '../../../publicComponents/SelectSupplierQuotation.vue';
|
|
|
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
|
|
import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
|
|
import { JDictSelectTag, ApiSelect } from '/@/components/Form';
|
|
@@ -315,7 +318,8 @@
|
|
|
BaseShipArchiveAccessoriesModal,
|
|
|
SelectSaleOrderModal,
|
|
|
ApiSelect,
|
|
|
- JSelectMultiple
|
|
|
+ JSelectMultiple,
|
|
|
+ SelectSupplierQuotation
|
|
|
},
|
|
|
props: {
|
|
|
formDisabled: {
|
|
@@ -333,6 +337,7 @@
|
|
|
const PurOrderFormShipFormShipTableRef = ref();
|
|
|
const SelectPrpductModalRef = ref();
|
|
|
const SelectProjectModalRef = ref();
|
|
|
+ const SelectSupplierQuotationRef = ref();
|
|
|
const BaseShipArchiveAccessoriesModalRef = ref();
|
|
|
const SelectSaleOrderModalRef = ref();
|
|
|
const PurOrderFormShipFormShipTable = reactive<Record<string, any>>({
|
|
@@ -628,6 +633,36 @@
|
|
|
getShipList(data[0].headId, 'contract');
|
|
|
}
|
|
|
}
|
|
|
+ function addFromQuotation(data){
|
|
|
+ data.map(item=>{
|
|
|
+ item.fatherModel = item.model
|
|
|
+ item.model = item.childModel
|
|
|
+ item.sourceId = item.childId
|
|
|
+ item.sourceType = 'Quo'+item.childId
|
|
|
+ item.sourceCode =item.billCode
|
|
|
+ })
|
|
|
+ var arrProduct = data.concat(purOrderFormShipFormProductTable.dataSource)
|
|
|
+ purOrderFormShipFormProductTable.dataSource=arrProduct
|
|
|
+ notAllowEdit.value=true
|
|
|
+ formData.sourceCode =data[0].billCode
|
|
|
+ if(formData.sourceCode2==''){
|
|
|
+ formData.project = data[0].inquiryProject
|
|
|
+ formData.projectName = data[0].projectName
|
|
|
+ formData.supplier= data[0].selectionSupplier
|
|
|
+ formData.supplierName= data[0].selectionSupplier_dictText
|
|
|
+ formData.priority =data[0].priority
|
|
|
+ formData.productionClass =data[0].productionClass
|
|
|
+ formData.model =data[0].fatherModel
|
|
|
+ formData.maker =data[0].maker
|
|
|
+ formData.exchangeRate = data[0].exchangeRateUsd
|
|
|
+ formData.currency = data[0].currency
|
|
|
+ getShipList(data[0].headId,'quotation')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //选择供应商报价单选定
|
|
|
+ function SelectSupplierQuotationList (){
|
|
|
+ SelectSupplierQuotationRef.value.getTable(formData,'purOrder')
|
|
|
+ }
|
|
|
function addProject(data) {
|
|
|
if (data.lenght == 0) {
|
|
|
formData.projectName = '';
|
|
@@ -712,6 +747,7 @@
|
|
|
purOrderFormShipFormProductTableRef,
|
|
|
purOrderFormShipFormProductTable,
|
|
|
SelectSaleOrderModalRef,
|
|
|
+ SelectSupplierQuotationRef,
|
|
|
validatorRules,
|
|
|
validateInfos,
|
|
|
activeKey,
|
|
@@ -743,6 +779,8 @@
|
|
|
supplierOption,
|
|
|
selectVirtualProducts,
|
|
|
changeValues,
|
|
|
+ SelectSupplierQuotationList,
|
|
|
+ addFromQuotation,
|
|
|
};
|
|
|
},
|
|
|
});
|