|
@@ -17,12 +17,12 @@
|
|
|
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="询价项目(inquiry project)" v-bind="validateInfos.projectName" id="SelectQuotationFormForm-projectName" name="projectName">
|
|
|
- <a-input-search v-model:value="formData.projectName" placeholder="请输入报价项目(inquiry project)" :disabled="SelectQuotationFormProductTable.dataSource.length!==0" allow-clear enter-button="Search" @search="onSearchProject"></a-input-search>
|
|
|
+ <a-input-search v-model:value="formData.projectName" placeholder="请输入询价项目(inquiry project)" allow-clear enter-button="Search" @search="onSearchProject"></a-input-search>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="SelectQuotationFormForm-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">
|
|
@@ -41,15 +41,15 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="SelectQuotationFormForm-attachs" name="attachs">
|
|
|
- <JUpload v-model:value="formData.attachs"></JUpload>
|
|
|
+ <a-form-item label="选定备注(selection notes)" v-bind="validateInfos.selectionNotes" id="SelectQuotationFormForm-selectionNotes" name="selectionNotes">
|
|
|
+ <a-input v-model:value="formData.selectionNotes" placeholder="请输入选定备注备注(selection notes)" allow-clear ></a-input>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="报价备注(quotation notes)" v-bind="validateInfos.inquiryNotes" id="SelectQuotationFormForm-inquiryNotes" name="inquiryNotes">
|
|
|
- <a-input v-model:value="formData.inquiryNotes" placeholder="请输入报价备注(quotation notes)" allow-clear ></a-input>
|
|
|
+ <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="SelectQuotationFormForm-attachs" name="attachs">
|
|
|
+ <JUpload v-model:value="formData.attachs"></JUpload>
|
|
|
</a-form-item>
|
|
|
- </a-col>
|
|
|
+ </a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</template>
|
|
@@ -89,6 +89,11 @@
|
|
|
:rowSelection="true"
|
|
|
asyncRemove
|
|
|
>
|
|
|
+ <template #selectionSupplier="props">
|
|
|
+ <a-select v-model:value="props.row.selectionSupplier" style="width: 100%;">
|
|
|
+ <a-select-option v-for="item in supplierList" :key="item.value" >{{ item.label }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </template>
|
|
|
<template #action="props">
|
|
|
<a-popconfirm title="确定删除吗?" @confirm="handleDelete1(props)">
|
|
|
<a>删除(delete)</a>
|
|
@@ -131,7 +136,7 @@
|
|
|
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 { Form ,message} from 'ant-design-vue';
|
|
|
import moment from 'moment';
|
|
|
const useForm = Form.useForm;
|
|
|
export default defineComponent({
|
|
@@ -177,34 +182,23 @@
|
|
|
dataSource: []
|
|
|
});
|
|
|
var BaseShipArchiveAccessoriesListRef = ref();
|
|
|
+ var supplierList = ref([]);
|
|
|
const activeKey = ref('SelectQuotationFormShip');
|
|
|
const formData = reactive<Record<string, any>>({
|
|
|
id: '',
|
|
|
status: undefined,
|
|
|
delFlag: undefined,
|
|
|
- otherStatus: '',
|
|
|
submit: '',
|
|
|
billDate: moment(new Date()).format('YYYY-MM-DD'),
|
|
|
billCode: '',
|
|
|
inquiryProject: '',
|
|
|
- inquirySuppiler:"",
|
|
|
- inquiryCustomer: '',
|
|
|
+ projectName:'',
|
|
|
priority: '',
|
|
|
productionClass: '',
|
|
|
model: '',
|
|
|
maker: '',
|
|
|
- paymentTerms:'',
|
|
|
- delivery:'',
|
|
|
- deliveryTime: '',
|
|
|
- inquiryTeam: '',
|
|
|
- quotationValidity:'',
|
|
|
- attachs: '',
|
|
|
- inquiryNotes: '',
|
|
|
- sourceCode:'',
|
|
|
- projectName:'',
|
|
|
- placeDelivery:'',
|
|
|
- suppilerName:'',
|
|
|
- saleAttachs:''
|
|
|
+ selectionNotes:'',
|
|
|
+ attachs:'',
|
|
|
});
|
|
|
|
|
|
//表单验证
|
|
@@ -228,9 +222,6 @@
|
|
|
}
|
|
|
return props.formDisabled;
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
function add() {
|
|
|
resetFields();
|
|
|
SelectQuotationFormShipTable.dataSource = [];
|
|
@@ -247,6 +238,7 @@
|
|
|
SelectQuotationFormShipTable.dataSource = [...SelectQuotationFormShipDataList];
|
|
|
const SelectQuotationFormProductDataList = await SelectQuotationFormProductListByMainId(row['id']);
|
|
|
SelectQuotationFormProductTable.dataSource = [...SelectQuotationFormProductDataList];
|
|
|
+ getSupplierQuotationDetail(formData.inquiryProject)
|
|
|
}
|
|
|
|
|
|
async function queryMainData(id) {
|
|
@@ -317,14 +309,51 @@
|
|
|
}
|
|
|
function addProject(data) {
|
|
|
if(data.length!==0){
|
|
|
- formData.inquiryProject = data[0].id
|
|
|
+ formData.inquiryProject = data[0].id
|
|
|
formData.projectName = data[0].name
|
|
|
+ getShipDetail(data[0].id)
|
|
|
+ getSupplierQuotationDetail(data[0].id)
|
|
|
}else{
|
|
|
formData.inquiryProject = ''
|
|
|
formData.projectName = ''
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ function getShipDetail(id){
|
|
|
+ let params = {projectId:id}
|
|
|
+ defHttp.get({url:'/purCode/purInquiryForm/getPurInquiryFormByProject',params}, { isTransformResponse: false }).then(res=>{
|
|
|
+ if(res!==''){
|
|
|
+ formData.priority = res.priority
|
|
|
+ formData.productionClass = res.productionClass
|
|
|
+ formData.model = res.model
|
|
|
+ formData.maker = res.maker
|
|
|
+ SelectQuotationFormShipTable.dataSource = res.purInquiryFormShipList
|
|
|
+ SelectQuotationFormProductTable.dataSource = res.purInquiryFormProductList
|
|
|
+ }else if(res==''){
|
|
|
+ message.warning('当前项目还没有报价')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ function getSupplierQuotationDetail(id){
|
|
|
+ let params = {quotationProject:id}
|
|
|
+ defHttp.get({url:'/purCode/purPurchaseQuotation/supplierQuotationDetails',params}, { isTransformResponse: false }).then(res=>{
|
|
|
+ if(res){
|
|
|
+ SupplierQuotationDetailsTable.dataSource=res.result.records
|
|
|
+ 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})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ supplierList.value.push({label:item.suppilerName,value:item.suppilerName})
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
function viewAccessory(prop){
|
|
|
BaseShipArchiveAccessoriesListRef.value.getTable(prop.row)
|
|
|
}
|
|
@@ -357,7 +386,8 @@
|
|
|
onSearchProject,
|
|
|
addProject,
|
|
|
SupplierQuotationDetailsTableRef,
|
|
|
- SupplierQuotationDetailsTable
|
|
|
+ SupplierQuotationDetailsTable,
|
|
|
+ supplierList,
|
|
|
}
|
|
|
}
|
|
|
});
|