|
@@ -6,12 +6,12 @@
|
|
|
<a-row>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="SaleInquiryFormForm-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-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="询价单号(bill code)" v-bind="validateInfos.billCode" id="SaleInquiryFormForm-billCode" name="billCode">
|
|
|
- <a-input v-model:value="formData.billCode" placeholder="请输入询价单号(bill code)" allow-clear ></a-input>
|
|
|
+ <a-input v-model:value="formData.billCode" placeholder="请输入询价单号(bill code)" disabled></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
@@ -21,7 +21,7 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="询价客户(inquiry customer)" v-bind="validateInfos.inquiryCustomer" id="SaleInquiryFormForm-inquiryCustomer" name="inquiryCustomer">
|
|
|
- <a-input v-model:value="formData.inquiryCustomer" placeholder="请输入询价客户(inquiry customer)" allow-clear ></a-input>
|
|
|
+ <JSelectInput v-model:value="formData.inquiryCustomer" placeholder="请选择" :options="customerOption" ></JSelectInput>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
@@ -163,6 +163,8 @@
|
|
|
<script lang="ts">
|
|
|
import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
|
|
|
import { defHttp } from '/@/utils/http/axios';
|
|
|
+
|
|
|
+// import moment from "moment";
|
|
|
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
|
|
import { querySaleInquiryFormShipListByMainId, querySaleInquiryFormProductListByMainId, queryDataById, saveOrUpdate } from '../SaleInquiryForm.api';
|
|
|
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
|
@@ -224,6 +226,7 @@
|
|
|
var BaseShipArchiveAccessoriesListRef = ref();
|
|
|
const activeKey = ref('saleInquiryFormShip');
|
|
|
var classOption = ref([]);
|
|
|
+ var customerOption =ref([]);
|
|
|
const formData = reactive<Record<string, any>>({
|
|
|
id: '',
|
|
|
status: undefined,
|
|
@@ -281,6 +284,7 @@
|
|
|
saleInquiryFormProductTable.dataSource = [];
|
|
|
activeKey.value = 'saleInquiryFormShip'
|
|
|
getOptiom()
|
|
|
+ getCustomerOptions()
|
|
|
}
|
|
|
|
|
|
async function edit(row) {
|
|
@@ -292,6 +296,7 @@
|
|
|
const saleInquiryFormProductDataList = await querySaleInquiryFormProductListByMainId(row['id']);
|
|
|
saleInquiryFormProductTable.dataSource = [...saleInquiryFormProductDataList];
|
|
|
getOptiom()
|
|
|
+ getCustomerOptions()
|
|
|
}
|
|
|
|
|
|
async function queryMainData(id) {
|
|
@@ -356,7 +361,7 @@
|
|
|
formData[key] = value;
|
|
|
}
|
|
|
function handleDelete({row}) {
|
|
|
- saleInquiryFormShipTableRef.value?.removeRows(row)
|
|
|
+ saleInquiryFormShipTableRef.value?.removeRows(row)
|
|
|
}
|
|
|
function handleDelete1({row}) {
|
|
|
saleInquiryFormProductTableRef.value?.removeRows(row)
|
|
@@ -368,6 +373,7 @@
|
|
|
var arr = data.concat(saleInquiryFormShipTable.dataSource)
|
|
|
arr.map(item=>item.shipowner = item.relateCustomer)
|
|
|
saleInquiryFormShipTable.dataSource=arr
|
|
|
+
|
|
|
}
|
|
|
function addProduct(data){
|
|
|
var arrProduct = data.concat(saleInquiryFormProductTable.dataSource)
|
|
@@ -380,6 +386,21 @@
|
|
|
}
|
|
|
function addProject(data) {
|
|
|
formData.inquiryProject = data[0].name
|
|
|
+ formData.inquiryCustomer =data[0].customerId
|
|
|
+ }
|
|
|
+ function getCustomerOptions(){
|
|
|
+ let params = {pageSize:'-1',status:1}
|
|
|
+ defHttp.get({url:'/cuspCode/cuspCustomerProfile/list',params}, { isTransformResponse: false }).then(res=>{
|
|
|
+ if(res){
|
|
|
+ customerOption.value = []
|
|
|
+ res.result.records.forEach(item=>{
|
|
|
+ customerOption.value.push({
|
|
|
+ label: item.name,
|
|
|
+ value: item.id
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
function viewAccessory(prop){
|
|
|
BaseShipArchiveAccessoriesListRef.value.getTable(prop.row)
|
|
@@ -470,7 +491,9 @@
|
|
|
onSearchProject,
|
|
|
addProject,
|
|
|
getOptiom,
|
|
|
- classOption
|
|
|
+ classOption,
|
|
|
+ getCustomerOptions,
|
|
|
+ customerOption
|
|
|
}
|
|
|
}
|
|
|
});
|