|
@@ -90,7 +90,7 @@
|
|
|
asyncRemove
|
|
|
>
|
|
|
<template #selectionSupplier="props">
|
|
|
- <a-select v-model:value="props.row.selectionSupplier" style="width: 100%;">
|
|
|
+ <a-select v-model:value="props.row.selectionSupplier" style="width: 100%;" @change="selectSupplier(props)">
|
|
|
<a-select-option v-for="item in supplierList" :key="item.value" >{{ item.label }}</a-select-option>
|
|
|
</a-select>
|
|
|
</template>
|
|
@@ -155,6 +155,7 @@
|
|
|
import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
|
|
|
import { Form ,message} from 'ant-design-vue';
|
|
|
import moment from 'moment';
|
|
|
+import { log } from 'console';
|
|
|
const useForm = Form.useForm;
|
|
|
export default defineComponent({
|
|
|
name: "SelectQuotationFormForm",
|
|
@@ -365,15 +366,16 @@
|
|
|
defHttp.get({url:'/purCode/purPurchaseQuotation/supplierQuotationDetails',params}, { isTransformResponse: false }).then(res=>{
|
|
|
if(res){
|
|
|
SupplierQuotationDetailsTable.dataSource=res.result.records
|
|
|
+ supplierList.value= []
|
|
|
res.result.records.map(item=>{
|
|
|
if(supplierList.value.length!==0){
|
|
|
supplierList.value.map(event=>{
|
|
|
if(item.suppilerName!==event.value){
|
|
|
- supplierList.value.push({label:item.suppilerName,value:item.suppilerName})
|
|
|
+ supplierList.value.push({label:item.suppilerName,value:item.id})
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
- supplierList.value.push({label:item.suppilerName,value:item.suppilerName})
|
|
|
+ supplierList.value.push({label:item.suppilerName,value:item.id})
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -394,6 +396,22 @@
|
|
|
function onSearchProject(){
|
|
|
SelectProjectModalRef.value.getTable()
|
|
|
}
|
|
|
+ function selectSupplier(prop){
|
|
|
+ SupplierQuotationDetailsTable.dataSource.map(item=>{
|
|
|
+ if(item.productCode==prop.row.productCode&&item.suppilerName==prop.row.selectionSupplier){
|
|
|
+ var arr = [...SelectQuotationFormProductTable.dataSource]
|
|
|
+ arr.map((event,index)=>{
|
|
|
+ if(prop.rowIndex==index){
|
|
|
+ arr[index]={...item}
|
|
|
+ arr[index].selectionSupplier=item.quotationSuppiler
|
|
|
+ arr[index].deliveryTime=item.childDeliveryTime
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ SelectQuotationFormProductTable.dataSource = [...arr]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
return {
|
|
|
SelectQuotationFormShipTableRef,
|
|
|
SelectQuotationFormShipTable,
|
|
@@ -424,6 +442,7 @@
|
|
|
SupplierSummaryAmountTableRef,
|
|
|
SupplierSummaryAmountTable,
|
|
|
supplierList,
|
|
|
+ selectSupplier
|
|
|
}
|
|
|
}
|
|
|
});
|