Browse Source

采购销售单-功能

jingbb 5 tháng trước cách đây
mục cha
commit
310e8b7566

+ 11 - 76
src/views/purchase/purchaseInquiryForm/PurchaseInquiryForm.data.ts

@@ -24,12 +24,12 @@ export const columns: BasicColumn[] = [
    {
     title: '询价项目(inquiry project)',
     align:"center",
-    dataIndex: 'inquiryProject_dictText'
+    dataIndex: 'projectName'
    },
    {
     title: '询价供应商(inquiry supplier)',
     align:"center",
-    dataIndex: 'inquirySuppiler_dictText'
+    dataIndex: 'suppilerName'
    },
    {
     title: '询价有效期(inquiry period)',
@@ -69,32 +69,27 @@ export const columns: BasicColumn[] = [
     align:"center",
     dataIndex: 'maker'
    },
-   {
-    title: '业务类型(busyness type)',
-    align:"center",
-    dataIndex: 'busynessType',
-    width:'250'
-   },
    {
     title: '状态(status)',
     align:"center",
-    dataIndex: 'status',
+    dataIndex: 'status_dictText',
    },
    {
       title: '销售询价单附件(sales inquiry form attachs)',
       align:"center",
       dataIndex: 'attachs',
-      width:'250'
+      width:'250',
+      slots: { customRender: 'attachs' },
     },
    {
-    title: '提交(submit)',
-    align:"center",
-    dataIndex: 'submit',
-   },
+      title: '提交(submit)',
+      align:"center",
+      dataIndex: 'submit_dictText',
+    },
 ];
 
 //子表表格配置
-export const saleInquiryFormShipColumns: JVxeColumn[] = [
+export const PuechaseInquiryFormShipColumns: JVxeColumn[] = [
     {
       title: '船名(ship name)',
       key: 'shipName',
@@ -144,7 +139,7 @@ export const saleInquiryFormShipColumns: JVxeColumn[] = [
       slotName: 'action',
     },
   ]
-export const saleInquiryFormProductColumns: JVxeColumn[] = [
+export const PuechaseInquiryFormProductColumns: JVxeColumn[] = [
     {
       title: '交期(delivery time)',
       key: 'deliveryTime',
@@ -295,63 +290,3 @@ export const saleInquiryFormProductColumns: JVxeColumn[] = [
       slotName: 'action',
     },
   ]
-
-// 高级查询数据
-export const superQuerySchema = {
-  status: {title: '状态(1-已报价,0-已报价)',order: 0,view: 'number', type: 'number',},
-  otherStatus: {title: '其他状态(other status)',order: 2,view: 'text', type: 'string',},
-  submit: {title: '提交(1是 0否)',order: 3,view: 'text', type: 'string',},
-  billDate: {title: '单据日期(bill date)',order: 4,view: 'date', type: 'string',},
-  billCode: {title: '询价单号(bill code)',order: 5,view: 'text', type: 'string',},
-  inquiryProject: {title: '询价项目(inquiry project)',order: 6,view: 'text', type: 'string',},
-  inquiryCustomer: {title: '询价客户(inquiry customer)',order: 7,view: 'text', type: 'string',},
-  inquiryPlatform: {title: '询价平台(inquiry platform)',order: 8,view: 'text', type: 'string',},
-  customerInquiryNumber: {title: '客户询价单号(customer inquiry number)',order: 9,view: 'text', type: 'string',},
-  inquiryPeriodEnd: {title: '询价有效期(inquiry period)止',order: 10,view: 'date', type: 'string',},
-  inquiryPeriodBegin: {title: '询价有效期(inquiry period)始',order: 11,view: 'date', type: 'string',},
-  busynessType: {title: '业务类型(busyness type)',order: 12,view: 'text', type: 'string',},
-  priority: {title: '优先级(priority)',order: 13,view: 'text', type: 'string',},
-  productionClass: {title: '产品分类(production class)',order: 14,view: 'text', type: 'string',},
-  model: {title: '机型(model)',order: 15,view: 'text', type: 'string',},
-  maker: {title: '厂家(maker)',order: 16,view: 'text', type: 'string',},
-  saleDepartment: {title: '销售部门(sale department)',order: 17,view: 'text', type: 'string',},
-  salesman: {title: '业务员(salesman)',order: 18,view: 'text', type: 'string',},
-  inquiryTeam: {title: '采购询价组(procurement inquiry team)',order: 19,view: 'text', type: 'string',},
-  deliveryTime: {title: '交期(delivery time)',order: 20,view: 'datetime', type: 'string',},
-  attachs: {title: '附件(attachs)',order: 21,view: 'text', type: 'string',},
-  inquiryNotes: {title: '询价备注(inquiry notes)',order: 22,view: 'text', type: 'string',},
-  //子表高级查询
-  saleInquiryFormShip: {
-    title: '销售询价单子表 - 船明细',
-    view: 'table',
-    fields: {
-        shipId: {title: '船id',order: 0,view: 'text', type: 'string',},
-        shipName: {title: '船名',order: 1,view: 'text', type: 'string',},
-        hostNumber: {title: '主机号',order: 2,view: 'text', type: 'string',},
-        projectNo: {title: '工程编号',order: 3,view: 'text', type: 'string',},
-        shipFactory: {title: '船厂',order: 4,view: 'text', type: 'string',},
-        shipowner: {title: '船东',order: 5,view: 'text', type: 'string',},
-    }
-  },
-  saleInquiryFormProduct: {
-    title: '销售询价单子表 - 产品明细',
-    view: 'table',
-    fields: {
-        productId: {title: '产品id',order: 0,view: 'number', type: 'number',},
-        deliveryTime: {title: '交期',order: 1,view: 'date', type: 'string',},
-        productClass: {title: '产品分类',order: 2,view: 'text', type: 'string',},
-        productCode: {title: '产品编码',order: 3,view: 'text', type: 'string',},
-        chineseName: {title: '产品中文名',order: 4,view: 'text', type: 'string',},
-        englishName: {title: '产品英文名',order: 5,view: 'text', type: 'string',},
-        specifications: {title: '规格',order: 6,view: 'text', type: 'string',},
-        model: {title: '型号',order: 7,view: 'text', type: 'string',},
-        factory: {title: '厂家',order: 8,view: 'text', type: 'string',},
-        qualityGrade: {title: '质量等级',order: 9,view: 'text', type: 'string',},
-        quantity: {title: '数量',order: 10,view: 'number', type: 'number',},
-        unit: {title: '单位',order: 11,view: 'text', type: 'string',},
-        needShip: {title: '需要船检证书(1是 0否)',order: 12,view: 'text', type: 'string',},
-        shipInspection: {title: '船检证书',order: 13,view: 'text', type: 'string',},
-        notes: {title: '备注',order: 14,view: 'text', type: 'string',},
-    }
-  },
-};

+ 0 - 17
src/views/purchase/purchaseInquiryForm/components/BaseShipArchive.api.ts

@@ -1,17 +0,0 @@
-import {defHttp} from '/@/utils/http/axios';
-import { useMessage } from "/@/hooks/web/useMessage";
-
-const { createConfirm } = useMessage();
-
-enum Api {
-  list = '/baseCode/baseShipArchive/list',
-  
-}
-
-/**
- * 列表接口
- * @param params
- */
-export const list = (params) =>
-  defHttp.get({url: Api.list, params});
-

+ 0 - 94
src/views/purchase/purchaseInquiryForm/components/BaseShipArchive.data.ts

@@ -1,94 +0,0 @@
-import {BasicColumn} from '/@/components/Table';
-import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
-import { render } from '/@/utils/common/renderUtils';
-import { getWeekMonthQuarterYear } from '/@/utils';
-//列表数据
-export const columns: BasicColumn[] = [
-   {
-    title: 'IMO',
-    align:"center",
-    dataIndex: 'imo'
-   },
-   {
-    title: '船名称(ship name)',
-    align:"center",
-    dataIndex: 'shipName'
-   },
-   {
-    title: '客户名称(customer name)',
-    align:"center",
-    dataIndex: 'relateCustomer'
-   },
-];
-//查询数据
-export const searchFormSchema: FormSchema[] = [
-	{
-      label: "IMO",
-      field: 'imo',
-      component: 'Input',
-      // labelWidth: 150,
-      //colProps: {span: 6},
- 	},
-	{
-      label: "船名称(ship name)",
-      field: 'shipName',
-      labelWidth: 150,
-      component: 'Input',
-      //colProps: {span: 6},
- 	},
-   {
-    label: '客户名称(customer name)',
-    field: 'relateCustomer',
-    component: 'Input',
-    labelWidth: 180,
-
-   },
-	{
-      label: "hull number",
-      field: 'hullNumber',
-      component: 'Input',
-      //colProps: {span: 6},
- 	},
-   {
-    label: "船厂(ship factory)",
-    field: 'shipFactory',
-    component: 'JSelectMultiple',
-    labelWidth: 150,
-    componentProps:{
-      dictCode:"ship_factory"
-   },
-    //colProps: {span: 6},
- },
- {
-  label: "造船日期(ship date)",
-  field: "shipDate",
-  component: 'RangePicker',
-  labelWidth: 150,
-  componentProps: {
-      valueType: 'Date',
-      showTime:true
-  },
-  //colProps: {span: 6},
-},
-{
-  label: "船类型(ship type)",
-  field: 'shipType',
-  component: 'JSelectMultiple',
-  labelWidth: 180,
-  componentProps:{
-    dictCode:"ship_type"
- },
-      //colProps: {span: 6},
-},
-
-{
-  label: "状态(status)",
-  field: 'status',
-  component: 'JSelectMultiple',
-  componentProps:{
-    dictCode:"valid_status"
-  },
-  //colProps: {span: 6},
-},
-];

+ 0 - 48
src/views/purchase/purchaseInquiryForm/components/BaseShipArchiveAccessories.data.ts

@@ -1,48 +0,0 @@
-import {BasicColumn} from '/@/components/Table';
-import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
-import { render } from '/@/utils/common/renderUtils';
-import { getWeekMonthQuarterYear } from '/@/utils';
-//列表数据
-export const columns: BasicColumn[] = [
-   
-   {
-    title: '配件类型(accessory type)',
-    align:"center",
-    dataIndex: 'accessoryType',
-    key: 'accessoryType'
-   },
-   {
-    title: '规格(specifications)',
-    align:"center",
-    dataIndex: 'specifications',
-    key: 'specifications'
-   },
-   {
-    title: '型号(model)',
-    align:"center",
-    dataIndex: 'model',
-    key: 'model'
-   },
-   {
-    title: '序列号(serial number)',
-    align:"center",
-    dataIndex: 'serialNumber',
-    key: 'serialNumber'
-   },
-   /* {
-    title: '备注',
-    align:"center",
-    dataIndex: 'notes',
-    key: 'notes'
-   },
-   {
-    title: '附件',
-    align:"center",
-    dataIndex: 'attachs',
-    key: 'attachs'
-   }, */
-];
-//查询数据
-export const searchFormSchema: FormSchema[] = [
-];

+ 27 - 24
src/views/purchase/purchaseInquiryForm/components/BaseShipArchiveAccessoriesModal.vue

@@ -1,28 +1,31 @@
 <template>
- <a-modal
-      title="配件明细(accessories details)"
-      width="70%"
-      :visible="visible"
-      :maskClosable="false"
-      switchFullscreen
-      @cancel="handleCancel">
-        <div>
-          <a-table
-                :columns="columns"
-                :row-key="record => record.id"
-                :data-source="dataSource"
-                bordered
-                size="small"
-                height="500"
-                :pagination="false"
-                :scroll="{ x: 1000, y: 500 }"
-            > 
-                <template #attachs="{ text, record,index }">
-                    <a :href="baseUrl+record.attachs">{{record.attachs}}</a>
-                </template>
-            </a-table>
-        </div>
-   </a-modal>
+  <div ref="accessoriesDetailsRef">
+      <a-modal
+            title="配件明细(accessories details)"
+            width="70%"
+            :visible="visible"
+            :maskClosable="false"
+            :getContainer ='()=>$refs.accessoriesDetailsRef'
+            switchFullscreen
+            @cancel="handleCancel">
+              <div>
+                <a-table
+                      :columns="columns"
+                      :row-key="record => record.id"
+                      :data-source="dataSource"
+                      bordered
+                      size="small"
+                      height="500"
+                      :pagination="false"
+                      :scroll="{ x: 1000, y: 500 }"
+                  > 
+                      <template #attachs="{ text, record,index }">
+                          <a :href="baseUrl+record.attachs">{{record.attachs}}</a>
+                      </template>
+                  </a-table>
+              </div>
+        </a-modal>
+  </div>
 </template>
 
 <script lang="ts" setup>

+ 163 - 138
src/views/purchase/purchaseInquiryForm/components/PurchaseInquiryFormForm.vue

@@ -2,57 +2,57 @@
   <a-spin :spinning="loading">
     <JFormContainer :disabled="disabled">
       <template #detail>
-        <a-form v-bind="formItemLayout" name="SaleInquiryFormForm" ref="formRef">
+        <a-form v-bind="formItemLayout" name="PuechaseInquiryFormForm" ref="formRef">
           <a-row>
             <a-col :span="12">
-							<a-form-item label="询价单号(bill code)" v-bind="validateInfos.billCode" id="SaleInquiryFormForm-billCode" name="billCode">
+							<a-form-item label="询价单号(bill code)" v-bind="validateInfos.billCode" id="PuechaseInquiryFormForm-billCode" name="billCode">
 								<a-input v-model:value="formData.billCode" placeholder="请输入询价单号(bill code)" disabled></a-input>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="SaleInquiryFormForm-billDate" name="billDate">
+							<a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="PuechaseInquiryFormForm-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-form-item>
 						</a-col>
 						
 						<a-col :span="12">
-							<a-form-item label="询价项目(inquiry project)" v-bind="validateInfos.inquiryProject" id="SaleInquiryFormForm-inquiryProject" name="inquiryProject">
-								<a-input-search v-model:value="formData.inquiryProject" placeholder="请输入询价项目(inquiry project)"  allow-clear enter-button="Search" @search="onSearchProject"></a-input-search>
+							<a-form-item label="询价项目(inquiry project)" v-bind="validateInfos.projectName" id="PuechaseInquiryFormForm-projectName" name="projectName">
+								<a-input-search v-model:value="formData.projectName" placeholder="请输入询价项目(inquiry project)" :disabled="PuechaseInquiryFormProductTable.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="询价供应商(inquiry supplier)" v-bind="validateInfos.inquirySuppiler" id="SaleInquiryFormForm-inquirySuppiler" name="inquirySuppiler">
-                <JSelectInput   v-model:value="formData.inquirySuppiler"  placeholder="请选择" :options="customerOption" disabled></JSelectInput>
+							<a-form-item label="询价供应商(inquiry supplier)" v-bind="validateInfos.inquirySuppiler" id="PuechaseInquiryFormForm-inquirySuppiler" name="inquirySuppiler">
+                  <JSelectInput   v-model:value="formData.inquirySuppiler"  placeholder="请选择" allow-clear  :options="supplierOption" @change="changeSupplier"></JSelectInput>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="询价有效期(inquiry period)" v-bind="validateInfos.inquiryPeriodEnd" id="SaleInquiryFormForm-inquiryPeriodEnd" name="inquiryPeriodEnd">
+							<a-form-item label="询价有效期(inquiry period)" v-bind="validateInfos.inquiryPeriodEnd" id="PuechaseInquiryFormForm-inquiryPeriodEnd" name="inquiryPeriodEnd">
                 <a-range-picker v-model:value="inquiryPeriod" :format="['YYYY-MM-DD','YYYY-MM-DD']"  @change="onChangeInquiryPeriod" style="width: 100%" />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="SaleInquiryFormForm-priority" name="priority">
+							<a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="PuechaseInquiryFormForm-priority" name="priority">
                 <JDictSelectTag v-model:value="formData.priority" placeholder="请选择" dictCode="priority"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="SaleInquiryFormForm-productionClass" name="productionClass">
-                <JSelectInput   v-model:value="formData.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
+							<a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass" id="PuechaseInquiryFormForm-productionClass" name="productionClass">
+								<a-input v-model:value="formData.productionClass" placeholder="请输入"  allow-clear disabled></a-input>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="机型(model)" v-bind="validateInfos.model" id="SaleInquiryFormForm-model" name="model">
-                <JDictSelectTag v-model:value="formData.model" placeholder="请选择" dictCode="model_typer"/>
+							<a-form-item label="机型(model)" v-bind="validateInfos.model" id="PuechaseInquiryFormForm-model" name="model">
+                <JDictSelectTag v-model:value="formData.model" placeholder="请选择" dictCode="model_typer" disabled/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="厂家(maker)" v-bind="validateInfos.maker" id="SaleInquiryFormForm-maker" name="maker">
-								<a-input v-model:value="formData.maker" placeholder="请输入厂家(maker)"  allow-clear ></a-input>
+							<a-form-item label="厂家(maker)" v-bind="validateInfos.maker" id="PuechaseInquiryFormForm-maker" name="maker">
+								<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="交货地点(place of delivery)" v-bind="validateInfos.placeDelivery" id="SaleInquiryFormForm-placeDelivery" name="placeDelivery">
-								<a-input v-model:value="formData.placeDelivery" placeholder=""  allow-clear disabled></a-input>
+							<a-form-item label="交货地点(place of delivery)" v-bind="validateInfos.placeDelivery" id="PuechaseInquiryFormForm-placeDelivery" name="placeDelivery">
+								<a-input v-model:value="formData.placeDelivery" placeholder=""  allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
             <a-col :span="12">
@@ -61,33 +61,33 @@
 							</a-form-item>
 						</a-col>
             <a-col :span="12">
-							<a-form-item label="发货方式(delivery)" v-bind="validateInfos.delivery" id="SaleInquiryFormForm-delivery" name="delivery">
-								<a-date-picker placeholder="请选择"  v-model:value="formData.delivery"  value-format="YYYY-MM-DD" format="YYYY-MM-DD" style="width: 100%"  allow-clear />
+							<a-form-item label="发货方式(delivery)" v-bind="validateInfos.delivery" id="PuechaseInquiryFormForm-delivery" name="delivery">
+                <JDictSelectTag v-model:value="formData.delivery" placeholder="请选择" dictCode="delivery_methods" disabled/>
 							</a-form-item>
 						</a-col>
             <a-col :span="12">
 							<a-form-item label="交期(delivery time)" v-bind="validateInfos.deliveryTime" id="quotationFormForm-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" style="width: 100%"  allow-clear @change="changeFormDeliveryTime"/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="采购询价组(procurement inquiry team)" v-bind="validateInfos.inquiryTeam" id="SaleInquiryFormForm-inquiryTeam" name="inquiryTeam">
-                <JDictSelectTag v-model:value="formData.inquiryTeam" placeholder="请选择" dictCode="procurement_inquiry_team"/>
+							<a-form-item label="采购询价组(procurement inquiry team)" v-bind="validateInfos.inquiryTeam" id="PuechaseInquiryFormForm-inquiryTeam" name="inquiryTeam">
+                <JDictSelectTag v-model:value="formData.inquiryTeam" placeholder="请选择" dictCode="procurement_inquiry_team" disabled/>
 							</a-form-item>
 						</a-col>
             <a-col :span="12">
-							<a-form-item label="报价有效期(quotation validity period)" v-bind="validateInfos.quotationValidityPeriod" id="SaleInquiryFormForm-quotationValidityPeriod" name="quotationValidityPeriod">
-                <a-input v-model:value="formData.quotationValidityPeriod" placeholder="请输入" />
+							<a-form-item label="报价有效期(quotation validity period)" v-bind="validateInfos.quotationValidity" id="PuechaseInquiryFormForm-quotationValidity" name="quotationValidity">
+                <a-input v-model:value="formData.quotationValidity" placeholder="请输入" />
 							</a-form-item>
 						</a-col>
 						
             <a-col :span="12">
-							<a-form-item label="询价备注(inquiry notes)" v-bind="validateInfos.inquiryNotes" id="SaleInquiryFormForm-inquiryNotes" name="inquiryNotes">
+							<a-form-item label="询价备注(inquiry notes)" v-bind="validateInfos.inquiryNotes" id="PuechaseInquiryFormForm-inquiryNotes" name="inquiryNotes">
 								<a-input v-model:value="formData.inquiryNotes" placeholder="请输入询价备注(inquiry notes)"  allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="SaleInquiryFormForm-attachs" name="attachs">
+							<a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="PuechaseInquiryFormForm-attachs" name="attachs">
 								<JUpload v-model:value="formData.attachs"></JUpload>
 							</a-form-item>
 						</a-col>
@@ -98,15 +98,14 @@
 
 		<!-- 子表单区域 -->
     <a-tabs v-model:activeKey="activeKey" animated  style=" padding: 24px;padding-top: 0px;">
-      <a-tab-pane tab="销售询价单子表 - 船明细(ship details)" key="saleInquiryFormShip" :forceRender="true">
-        <!-- <a-button type="primary" @click="selectShip"> 选择船(select ship)</a-button> -->
+      <a-tab-pane tab="残垢询价单子表 - 船明细(ship details)" key="PuechaseInquiryFormShip" :forceRender="true">
         <j-vxe-table
           :keep-source="true"
           resizable
-          ref="saleInquiryFormShipTableRef"
-          :loading="saleInquiryFormShipTable.loading"
-          :columns="saleInquiryFormShipTable.columns"
-          :dataSource="saleInquiryFormShipTable.dataSource"
+          ref="PuechaseInquiryFormShipTableRef"
+          :loading="PuechaseInquiryFormShipTable.loading"
+          :columns="PuechaseInquiryFormShipTable.columns"
+          :dataSource="PuechaseInquiryFormShipTable.dataSource"
           :height="340"
           :disabled="disabled"
           :rowNumber="true"
@@ -114,22 +113,19 @@
           >
             <template #action="props" >
               <a @click="viewAccessory(props)" >查看配件信息(view accessory information)</a>
-              <!-- <a-divider type="vertical"/>
-                <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
-                  <a>删除(delete)</a>
-                </a-popconfirm> -->
             </template>
           </j-vxe-table>
       </a-tab-pane>
-      <a-tab-pane tab="销售询价单子表 - 产品明细(product details)" key="saleInquiryFormProduct" :forceRender="true">
+      <a-tab-pane tab="采购询价单子表 - 产品明细(product details)" key="PuechaseInquiryFormProduct" :forceRender="true">
+        <a-button type="primary" @click="SelectCustomerInquiry" style="margin-right: 1%;margin-bottom: 1%;"> 选择客户询价单(select customer inquiry form)</a-button>
         <a-button type="primary" @click="selectProducts" style="margin-right: 1%;margin-bottom: 1%;"> 选择产品(select product)</a-button>
         <j-vxe-table
           :keep-source="true"
           resizable
-          ref="saleInquiryFormProductTableRef"
-          :loading="saleInquiryFormProductTable.loading"
-          :columns="saleInquiryFormProductTable.columns"
-          :dataSource="saleInquiryFormProductTable.dataSource"
+          ref="PuechaseInquiryFormProductTableRef"
+          :loading="PuechaseInquiryFormProductTable.loading"
+          :columns="PuechaseInquiryFormProductTable.columns"
+          :dataSource="PuechaseInquiryFormProductTable.dataSource"
           :height="340"
           :disabled="disabled"
           :rowNumber="true"
@@ -144,10 +140,10 @@
           </j-vxe-table>
       </a-tab-pane>
     </a-tabs>
-    <SelectShipSModal ref="SelectShipSModalRef" @select="addShip"></SelectShipSModal>
     <BaseShipArchiveAccessoriesList ref="BaseShipArchiveAccessoriesListRef"></BaseShipArchiveAccessoriesList>
     <SelectPrpductModal ref="SelectPrpductModalRef" @selectProduct="addProduct"></SelectPrpductModal>
     <SelectProjectModal ref="SelectProjectModalRef" @selectProject="addProject"></SelectProjectModal>
+    <SelectCustomerInquiryModal ref="SelectCustomerInquiryModalRef" @selectCustomerInquiry="addProductFromCustomer"></SelectCustomerInquiryModal>
   </a-spin>
 </template>
 
@@ -157,32 +153,30 @@
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
   import { queryQurcodeInquiryFormShipListByMainId, queryPurcodeInquiryFormProductListByMainId, queryDataById, saveOrUpdate } from '../purchaseInquiryForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
-  import {saleInquiryFormShipColumns, saleInquiryFormProductColumns} from '../PurchaseInquiryForm.data';
-  import SelectShipSModal from './SelectShipSModal.vue';
+  import {PuechaseInquiryFormShipColumns, PuechaseInquiryFormProductColumns} from '../PurchaseInquiryForm.data';
   import BaseShipArchiveAccessoriesList from './BaseShipArchiveAccessoriesModal.vue';
   import SelectPrpductModal from './SelectPrpductModal.vue';
   import SelectProjectModal from './SelectProjectModal.vue';
+  import SelectCustomerInquiryModal from './SelectCustomerInquiryModal.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';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { Form } from 'ant-design-vue';
-  import { useUserStore } from '/@/store/modules/user';
   import moment from 'moment';
-  const userStore = useUserStore();
   const useForm = Form.useForm;
   export default defineComponent({
-    name: "SaleInquiryFormForm",
+    name: "PuechaseInquiryFormForm",
     components:{
       JVxeTable,
 			JFormContainer,
-      SelectShipSModal,
       BaseShipArchiveAccessoriesList,
       SelectPrpductModal,
       JUpload,
       SelectProjectModal,
       JDictSelectTag,
       JSelectInput,
+      SelectCustomerInquiryModal
     },
     props:{
       formDisabled:{
@@ -198,24 +192,23 @@
       const formRef = ref();
       var SelectPrpductModalRef = ref()
       var SelectProjectModalRef = ref()
+      var SelectCustomerInquiryModalRef = ref()
       var inquiryPeriod = ref([])
-      const saleInquiryFormShipTableRef = ref();
-      const saleInquiryFormShipTable = reactive<Record<string, any>>({
+      const PuechaseInquiryFormShipTableRef = ref();
+      const PuechaseInquiryFormShipTable = reactive<Record<string, any>>({
         loading: false,
-        columns: saleInquiryFormShipColumns,
+        columns: PuechaseInquiryFormShipColumns,
         dataSource: []
       });
-      const saleInquiryFormProductTableRef = ref();
-      const saleInquiryFormProductTable = reactive<Record<string, any>>({
+      const PuechaseInquiryFormProductTableRef = ref();
+      const PuechaseInquiryFormProductTable = reactive<Record<string, any>>({
         loading: false,
-        columns: saleInquiryFormProductColumns,
+        columns: PuechaseInquiryFormProductColumns,
         dataSource: []
       });
-      var SelectShipSModalRef = ref();
       var BaseShipArchiveAccessoriesListRef = ref();
-      const activeKey = ref('saleInquiryFormShip');
-      var classOption = ref([]);
-      var customerOption =ref([]);
+      const activeKey = ref('PuechaseInquiryFormShip');
+      var supplierOption = ref([]);
       const formData = reactive<Record<string, any>>({
         id: '',
         status: undefined,
@@ -225,23 +218,25 @@
         billDate: moment(new Date()).format('YYYY-MM-DD'),   
         billCode: '',   
         inquiryProject: '',   
-        projectName:"",
-        inquiryCustomer: '', 
-        customerName:'',  
-        inquiryPlatform: '',   
-        customerInquiryNumber: '',   
+        inquirySuppiler:"",
         inquiryPeriodEnd: '',   
-        inquiryPeriodBegin: '',     
+        inquiryPeriodBegin: ' ',  
+        inquiryCustomer: '',           
         priority: '',   
         productionClass: '',   
         model: '',   
-        maker: '',   
-        saleDepartment: '',   
-        salesman: '',   
+        maker: '',
+        paymentTerms:'',
+        delivery:'',
+        deliveryTime: '',  
         inquiryTeam: '',   
-        deliveryTime: '',   
+        quotationValidity:'',
         attachs: '',   
         inquiryNotes: '',   
+        sourceCode:'',
+        projectName:'',
+        placeDelivery:'',
+        suppilerName:''
       });
 
       //表单验证
@@ -270,28 +265,24 @@
 
       function add() {
         resetFields();
-        saleInquiryFormShipTable.dataSource = [];
-        saleInquiryFormProductTable.dataSource = [];
-        activeKey.value = 'saleInquiryFormShip'
-        getOptiom()
-        getCustomerOptions()
+        PuechaseInquiryFormShipTable.dataSource = [];
+        PuechaseInquiryFormProductTable.dataSource = [];
+        activeKey.value = 'PuechaseInquiryFormShip'
+        getSupplierOption()
         inquiryPeriod.value = []
-        formData.salesman=userStore.getUserInfo.username;
-        formData.saleDepartment = userStore.getUserInfo.orgCode
       }
 
       async function edit(row) {
         //主表数据
         await queryMainData(row.id);
         //子表数据
-        const saleInquiryFormShipDataList = await queryQurcodeInquiryFormShipListByMainId(row['id']);
-        saleInquiryFormShipTable.dataSource = [...saleInquiryFormShipDataList];
-        const saleInquiryFormProductDataList = await queryPurcodeInquiryFormProductListByMainId(row['id']);
-        saleInquiryFormProductTable.dataSource = [...saleInquiryFormProductDataList];
-        getOptiom()
-        getCustomerOptions()
-          inquiryPeriod.value[0]=formData.inquiryPeriodBegin?moment(formData.inquiryPeriodBegin):''
-          inquiryPeriod.value[1]=formData.inquiryPeriodEnd?moment(formData.inquiryPeriodEnd):''
+        const PuechaseInquiryFormShipDataList = await queryQurcodeInquiryFormShipListByMainId(row['id']);
+        PuechaseInquiryFormShipTable.dataSource = [...PuechaseInquiryFormShipDataList];
+        const PuechaseInquiryFormProductDataList = await queryPurcodeInquiryFormProductListByMainId(row['id']);
+        PuechaseInquiryFormProductTable.dataSource = [...PuechaseInquiryFormProductDataList];
+        getSupplierOption()
+        inquiryPeriod.value[0]=formData.inquiryPeriodBegin?moment(formData.inquiryPeriodBegin):''
+        inquiryPeriod.value[1]=formData.inquiryPeriodEnd?moment(formData.inquiryPeriodEnd):''
       }
 
       async function queryMainData(id) {
@@ -308,8 +299,8 @@
       }
 
       const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
-        'saleInquiryFormShip': saleInquiryFormShipTableRef,
-        'saleInquiryFormProduct': saleInquiryFormProductTableRef,
+        'purInquiryFormShip': PuechaseInquiryFormShipTableRef,
+        'purInquiryFormProduct': PuechaseInquiryFormProductTableRef,
       });
 
       async function getFormData() {
@@ -356,56 +347,73 @@
         formData[key] = value;
       }
       async function handleDelete(prop) {
-        var newArray = [...saleInquiryFormShipTable.dataSource]
+        var newArray = [...PuechaseInquiryFormShipTable.dataSource]
         newArray.splice(prop.rowIndex, 1)
-        saleInquiryFormShipTable.dataSource = newArray 
+        PuechaseInquiryFormShipTable.dataSource = newArray 
       }
       async function handleDelete1(prop) {
-        var newArray = [...saleInquiryFormProductTable.dataSource]
+        var newArray = [...PuechaseInquiryFormProductTable.dataSource]
         newArray.splice(prop.rowIndex, 1)
-        saleInquiryFormProductTable.dataSource = newArray  
-      }
-      function selectShip(){
-        SelectShipSModalRef.value.getTable()
+        PuechaseInquiryFormProductTable.dataSource = newArray  
       }
       function addShip(data){
-        var arr = data.concat(saleInquiryFormShipTable.dataSource)
+        var arr = data.concat(PuechaseInquiryFormShipTable.dataSource)
         arr.map(item=>item.shipowner = item.relateCustomer)
-        saleInquiryFormShipTable.dataSource=arr        
+        PuechaseInquiryFormShipTable.dataSource=arr        
         
       }
       function addProduct(data){
-        var arrProduct = data.concat(saleInquiryFormProductTable.dataSource)
+        var arrProduct = data.concat(PuechaseInquiryFormProductTable.dataSource)
         arrProduct.map(item=>{
           item.productClass = item.classId_dictText
           item.productCode = item.code
           item.unit = item.measurementUnit
         })
-        saleInquiryFormProductTable.dataSource=arrProduct      
+        PuechaseInquiryFormProductTable.dataSource=arrProduct      
       }
       function addProject(data) {
-        formData.inquiryProject = data[0].id
-        formData.projectName = data[0].name
-        formData.inquiryCustomer =data[0].customerId
-        formData.customerName =data[0].customerId_dictText
-        customerOption.value.map(item=>{
-          if(item.value==data[0].customerId){
-            formData.priority =item.priority
-          }
+        if(data.length!==0){
+          formData.inquiryProject = data[0].id
+           formData.projectName = data[0].name
+        }else{
+          formData.inquiryProject = ''
+          formData.projectName = ''
+        }
+        
+      }
+      function changeFormDeliveryTime(){
+        var arrProduct = [...PuechaseInquiryFormProductTable.dataSource]
+        arrProduct.map(item=>{
+          item.deliveryTime = formData.deliveryTime
         })
+        PuechaseInquiryFormProductTable.dataSource = arrProduct
       }
-      function getCustomerOptions(){
-          let params = {pageSize:'-1',status:1}
-          defHttp.get({url:'/cuspCode/cuspCustomerProfile/list',params}, { isTransformResponse: false }).then(res=>{
+      function addProductFromCustomer(data){
+        var arrProduct = data.concat(PuechaseInquiryFormProductTable.dataSource)
+        arrProduct.map(item=>{
+          item.productClass = item.productionClass_dictText
+          item.productCode = item.productCode
+          item.unit = item.measurementUnit
+          item.sourceId = item.childId
+          item.model = item.childModel
+          item.deliveryTime = formData.deliveryTime
+        })
+        PuechaseInquiryFormProductTable.dataSource=arrProduct     
+        formData.inquiryProject = data[0].inquiryProject
+        formData.projectName = data[0].projectName
+        formData.sourceCode = data[0].billCode
+        formData.priority = data[0].priority
+        formData.model = data[0].headModel
+        formData.maker = data[0].maker
+        formData.inquiryTeam =  data[0].inquiryTeam
+        formData.productionClass =  data[0].productionClass_dictText
+        getShipList(data[0].headId)
+      }
+      function getShipList(id){
+        let params = {id:id}
+          defHttp.get({url:'/saleCode/saleInquiryForm/querySaleInquiryFormShipByMainId',params}, { isTransformResponse: false }).then(res=>{
             if(res){
-              customerOption.value = []
-              res.result.records.forEach(item=>{
-                customerOption.value.push({
-                  label: item.name,
-                  value: item.id,
-                  priority:item.priority
-                })
-              })
+             PuechaseInquiryFormShipTable.dataSource = res.result
             }
           })
       }
@@ -416,46 +424,46 @@
         SelectPrpductModalRef.value.getTable()
       }
       function setNeed(){
-        const values = saleInquiryFormProductTableRef.value.getSelectionData()        
+        const values = PuechaseInquiryFormProductTableRef.value.getSelectionData()        
         values.map(item=>{
-          saleInquiryFormProductTable.dataSource.map(event=>{
+          PuechaseInquiryFormProductTable.dataSource.map(event=>{
             if(item.id == event.id){
               event.needShip = 1
             }
           })
-          const xTable = saleInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
-          xTable.loadData(saleInquiryFormProductTable.dataSource)
+          const xTable = PuechaseInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
+          xTable.loadData(PuechaseInquiryFormProductTable.dataSource)
 
         })
       }
       function setNotNeed(){
-        const values = saleInquiryFormProductTableRef.value.getSelectionData()        
+        const values = PuechaseInquiryFormProductTableRef.value.getSelectionData()        
         values.map(item=>{
-          saleInquiryFormProductTable.dataSource.map(event=>{
+          PuechaseInquiryFormProductTable.dataSource.map(event=>{
             if(item.id == event.id){
               event.needShip = 0
             }
           })
-          const xTable = saleInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
-          xTable.loadData(saleInquiryFormProductTable.dataSource)
+          const xTable = PuechaseInquiryFormProductTableRef.value!.getXTable();//关键代码 如果不更新 重新加载表格即可
+          xTable.loadData(PuechaseInquiryFormProductTable.dataSource)
 
         })
       }
       function onSearchProject(){
         SelectProjectModalRef.value.getTable()
       }
-      function getOptiom(){
+      function getSupplierOption(){
         defHttp
-            .get({ url: 'baseCode/baseProductClass/list'}, { isTransformResponse: false })
+            .get({ url: '/cuspCode/cuspSupplierProfile/list'}, { isTransformResponse: false })
             .then((res) => {
                 if (res.success) {
-                  classOption.value = []
+                  supplierOption.value = []
                   res.result.records.forEach(element => {
                       var obj = {
                         label: element.name?element.name:'无名称请维护',
                         value: element.id?element.id:''
                       };
-                      classOption.value.push( obj)
+                      supplierOption.value.push( obj)
                   });    
                 }
             })
@@ -468,11 +476,27 @@
         formData.inquiryPeriodBegin = data[0].format('YYYY-MM-DD')
         formData.inquiryPeriodEnd = data[1].format('YYYY-MM-DD')
       }
+      function SelectCustomerInquiry(){
+          SelectCustomerInquiryModalRef.value.getTable(formData)
+      }
+      function changeSupplier(prop){
+        if(prop){
+          supplierOption.value.map(item=>{
+            if(item.value==prop){
+              formData.suppilerName = item.label
+            }
+          })
+        }else{
+          formData.inquirySuppiler = ''
+          formData.suppilerName = ''
+        }
+        
+      }
       return {
-        saleInquiryFormShipTableRef,
-        saleInquiryFormShipTable,
-        saleInquiryFormProductTableRef,
-        saleInquiryFormProductTable,
+        PuechaseInquiryFormShipTableRef,
+        PuechaseInquiryFormShipTable,
+        PuechaseInquiryFormProductTableRef,
+        PuechaseInquiryFormProductTable,
         validatorRules,
         validateInfos,
         activeKey,
@@ -484,11 +508,9 @@
         disabled,
         getFormData,
         submitForm,
-        SelectShipSModalRef,
         add,
         edit,
         formRef,
-        selectShip,
         addShip,
         addProduct,
         BaseShipArchiveAccessoriesListRef,
@@ -500,14 +522,17 @@
         setNotNeed,
         SelectPrpductModalRef,
         SelectProjectModalRef,
+        SelectCustomerInquiryModalRef,
         onSearchProject,
         addProject,
-        getOptiom,
-        classOption,
-        getCustomerOptions,
-        customerOption,
+        getSupplierOption,
+        supplierOption,
         inquiryPeriod,
-        onChangeInquiryPeriod
+        onChangeInquiryPeriod,
+        SelectCustomerInquiry,
+        addProductFromCustomer,
+        changeFormDeliveryTime,
+        changeSupplier
       }
     }
   });

+ 415 - 0
src/views/purchase/purchaseInquiryForm/components/SelectCustomerInquiryModal.vue

@@ -0,0 +1,415 @@
+<template>
+    <a-modal
+      title="选择客户询价单(select customer inquiry)"
+      width="95%"
+      :visible="visible"
+      :maskClosable="false"
+      switchFullscreen
+      @ok = "handleOk"
+      @cancel="handleCancel">
+        <div>
+          <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
+            <div class="table-page-search-wrapper">
+                <a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol" @keyup.enter.native="searchQuery">
+                <a-row :gutter="24">
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="询价单号(bill code)">
+                            <a-input placeholder="请输入" v-model:value="queryParams.billCode"></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="单据日期(bill date)">
+                            <a-range-picker value-format="YYYY-MM-DD"  v-model:value="queryParams.billDate" class="query-group-cust"/>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="询价项目(inquiry project)">
+                            <a-input placeholder="请输入" v-model:value="queryParams.inquiryProject" :disabled="fatherProjectName!==''"></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <template v-if="toggleSearchStatus">
+                        <a-col :md="6" :sm="8">
+                            <a-form-item  label="业务类型(busyness type)">
+                                <JDictSelectTag v-model:value="queryParams.busynessType" placeholder="请选择" dictCode="busyness_type"/>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="优先级(priority)">
+                                <JDictSelectTag v-model:value="queryParams.priority" placeholder="请选择" dictCode="priority"/>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="产品分类(production class)" >
+                                <JSelectInput   v-model:value="queryParams.productionClass"  placeholder="请选择" :options="classOption" ></JSelectInput>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="机型(model)">
+                                <JDictSelectTag v-model:value="queryParams.model" placeholder="请选择" dictCode="model_typer"/>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="产品编号(product code)">
+                                <a-input placeholder="请输入" v-model:value="queryParams.productCode"></a-input>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :span="12">
+							<a-form-item label="采购询价组(procurement inquiry team)" >
+                                <JDictSelectTag v-model:value="queryParams.inquiryTeam" placeholder="请选择" dictCode="procurement_inquiry_team"/>
+							</a-form-item>
+						</a-col>
+                    </template>
+                    <a-col :md="6" :sm="8">
+                        <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                            <a-button type="primary" @click="searchQuery" >查询(search)</a-button>
+                            <a-button type="primary" @click="searchReset"  style="margin-left: 8px">重置(reset)</a-button>
+                            <a @click="handleToggleSearch" style="margin-left: 8px">
+                            {{ toggleSearchStatus ? '收起' : '展开' }}
+                            <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+                            </a>
+                        </span>
+                    </a-col>
+                </a-row>
+            </a-form>
+           </div>
+        </a-card>
+
+        <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
+            <a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
+            <template #message>
+                <template v-if="selectedRowKeys.length > 0">
+                <span>已选中 {{ selectedRowKeys.length }} 条记录</span>
+                <a-divider type="vertical" />
+                <a @click="selectedRowKeys = []">清空</a>
+                </template>
+                <template v-else>
+                <span>未选中任何数据</span>
+                </template>
+            </template>
+            </a-alert>
+            <a-table
+                :columns="columns"
+                :row-key="record => record.childId"
+                :data-source="dataSource"
+                bordered
+                size="small"
+                @change="handleTableChange"
+                :pagination="pagination"
+                :scroll="{ x: 4500, y: 300 }"
+                :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+            >
+            </a-table>
+        </a-card>
+      </div>
+    </a-modal>
+</template>
+<script lang="ts" setup>
+    import {ref, reactive } from 'vue';
+    import { defHttp } from '/@/utils/http/axios';
+    import { message } from 'ant-design-vue';
+    import { filterObj, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
+    import { JDictSelectTag} from '/@/components/Form';
+    import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
+    const emit = defineEmits([ 'selectCustomerInquiry']); //定义emit
+    let classOption = ref([])
+    var visible = ref(false)
+    const columns = [
+        {
+            title: '询价单号(bill code)',
+            dataIndex: 'billCode',
+            key: 'billCode',
+            align:"center"
+        },
+        {
+            title: '单据日期(bill date)',
+            dataIndex: 'billDate',
+            key: 'billDate',
+            align:"center"
+        },
+        {
+            title: '询价项目(inquiry project)',
+            dataIndex: 'inquiryProject',
+            key: 'inquiryProject',
+            align:"center",
+            width:200
+        },
+        {
+            title: '询价客户(inquiry customer)',
+            key: 'inquiryCustomer',
+            dataIndex: 'inquiryCustomer',
+            align:"center"
+        },
+        {
+            title: '询价有效期(inquiry period)',
+            align:"center",
+            dataIndex: 'time',
+            width:250,
+            customRender:({text,record}) =>{
+            if(record.inquiryPeriodBegin&&record.inquiryPeriodEnd){
+                text = record.inquiryPeriodBegin+'~'+record.inquiryPeriodEnd
+            }else if(!record.inquiryPeriodBegin){
+                text = record.inquiryPeriodEnd
+            }else if(!record.inquiryPeriodEnd){
+                text = record.inquiryPeriodBegin
+            }else{
+                text=''
+            }
+            return text;
+            },
+        },
+        {
+            title: '优先级(priority)',
+            align:"center",
+            dataIndex: 'priority'
+        },
+        {
+            title: '产品分类(production class)',
+            align:"center",
+            dataIndex: 'productionClass'
+        },
+        {
+            title: '机型(model)',
+            align:"center",
+            dataIndex: 'model'
+        },
+        {
+            title: '采购询价组(procurenment inquiry team)',
+            key: 'inquiryTeam',
+            dataIndex: 'inquiryTeam',
+            align:"center"
+        },
+        {
+            title: '产品编码(product code)',
+            key: 'productCode',
+            dataIndex: 'productCode',
+            align:"center"
+        },
+        {
+            title: '产品英文名(product english name)',
+            key: 'englishName',
+            dataIndex: 'englishName',
+            align:"center",
+            width:250
+        },
+        {
+            title: '型号(child model)',
+            key: 'childModel;',
+            dataIndex: 'childModel;',
+            align:"center",
+            width:250
+        },
+        {
+            title: '厂家(factory)',
+            key: 'factory;',
+            dataIndex: 'factory;',
+            align:"center",
+            width:250
+        },
+        {
+            title: '质量等级(quality grade)',
+            key: 'qualityGrade;',
+            dataIndex: 'qualityGrade;',
+            align:"center",
+            width:250
+        },
+        {
+            title: '数量(quality)',
+            key: 'quantity;',
+            dataIndex: 'quantity;',
+            align:"center",
+            width:250
+        },
+        {
+            title: '单位(unit)',
+            key: 'unit;',
+            dataIndex: 'unit;',
+            align:"center",
+            width:250
+        },
+        {
+            title: '备注(notes)',
+            key: 'notes;',
+            dataIndex: 'notes;',
+            align:"center",
+            width:250
+        },
+        
+    ];
+    const labelCol = ref({
+    xs: { span: 24 },
+    sm: { span: 9 },
+    });
+    const wrapperCol = ref({
+        xs: { span: 24 },
+        sm: { span: 15 },
+    });
+    const labelCol1 = ref({
+    xs: { span: 24 },
+    sm: { span: 12 },
+    });
+    const wrapperCol1 = ref({
+        xs: { span: 24 },
+        sm: { span: 12 },
+    });
+    const dataSource =ref([]);
+    let selectedRowKeys = ref([]);
+    let selectedRows = ref([]);
+    var fatherProjectName = ref('');
+    var fatherSourceCode = ref('');
+    const toggleSearchStatus = ref(false);
+    const queryParams = ref({
+        billCode:'',
+        billDate:'',
+        inquiryProject:'',
+        busynessType:'',
+        priority:'',
+        productionClass:'',
+        model:'',
+        productCode:'',
+        inquiryTeam:'',
+        projectName:''
+    });
+    let pagination = ref({
+      current: 1,
+      pageSize: 10,
+      total: '', // 假设总共有100条数据
+      showSizeChanger: true,
+      showQuickJumper: true,
+      showTotal: (total, range) => {
+          return range[0] + "-" + range[1] + " 共" + total + "条"
+      },
+      size:'small'
+    });
+    function loadData(){
+        let params = getQueryParams();
+        defHttp
+        .get({ url: '/saleCode/saleInquiryForm/alertSaleInquiryList',params}, { isTransformResponse: false })
+        .then((res) => {
+            if (res.success) {
+                dataSource.value = res.result.records;
+                pagination.value.total = res.result.total;
+                pagination.value.current = res.result.current;
+                pagination.value.pageSize = res.result.size;                
+            } else {
+                message.error(res.message);
+            }
+        })
+        .finally(() => {
+            // loading.value = false;
+        });
+    }
+    function getQueryParams(){
+        let params = Object.assign(queryParams.value);
+        params.pageNo = pagination.value.current;
+        params.pageSize = pagination.value.pageSize;
+        if(fatherProjectName.value&&fatherProjectName.value!==''){
+            params.projectName = fatherProjectName.value
+        }else{
+            params.projectName = ''
+        }
+        return filterObj(params);
+    }
+    function handleTableChange(paginations, filters, sorter){
+        pagination.value.total = paginations.total;
+        pagination.value.current = paginations.current;
+        pagination.value.pageSize = paginations.pageSize;
+        loadData()
+    };
+    function getOptiom(){
+    defHttp
+        .get({ url: 'baseCode/baseProductClass/list'}, { isTransformResponse: false })
+        .then((res) => {
+            if (res.success) {
+              classOption.value = []
+              res.result.records.forEach(element => {
+                  var obj = {
+                    label: element.name?element.name:'无名称请维护',
+                    value: element.id?element.id:''
+                  };
+                  classOption.value.push( obj)
+              });    
+            }
+        })
+        .finally(() => {
+            // loading.value = false;
+        });
+  }
+    function searchQuery(){
+        loadData();
+    }
+    function searchReset(){
+        queryParams.value = {
+            billCode:'',
+            billDate:'',
+            inquiryProject:'',
+            busynessType:'',
+            priority:'',
+            productionClass:'',
+            model:'',
+            productCode:'',
+            inquiryTeam:'',
+        }
+        pagination.value.current =1;
+        pagination.value.pageSize = 10; 
+        if(fatherProjectName.value&&fatherProjectName.value!==''){
+            queryParams.value.projectName = fatherProjectName.value
+        }else{
+            queryParams.value.projectName = ''
+        }
+        loadData();
+    }
+    function handleToggleSearch(){
+        toggleSearchStatus.value = !toggleSearchStatus.value;
+    }
+    function onSelectChange(keys,rows){
+        selectedRowKeys.value = keys
+        selectedRows.value = rows
+    }
+    function handleOk(){
+      var arr = []
+      selectedRows.value.map(item=>arr.push(item.billCode))
+      if(fatherSourceCode.value&&fatherSourceCode.value!==''){
+        arr.push(fatherSourceCode.value)
+      }
+      if(selectedRowKeys.value.length==0){
+        message.error('请勾选数据');
+      }else if(new Set(arr).size!==1){
+        message.error('请勾选询价单号相同的数据');
+      }else{
+        emit('selectCustomerInquiry', selectedRows.value)
+        handleCancel()
+      }
+    }
+    function handleCancel(){
+      visible.value = false
+      selectedRowKeys.value = []
+      selectedRows.value=[]
+    }
+    function getTable(formData){
+        visible.value = true
+        if(formData.projectName&&formData.projectName!==''){
+            fatherProjectName.value = formData.projectName
+        }else{
+            fatherProjectName.value = ''
+        }
+        if(formData.sourceCode&&formData.sourceCode!==''){
+            fatherSourceCode.value = formData.sourceCode
+        }else{
+            fatherSourceCode.value = ''
+        }
+        loadData()
+        getOptiom()
+    }
+    defineExpose({
+      getTable
+    });
+</script>
+<style scoped lang="less">
+/deep/.ant-form-item{
+    margin-bottom: 8px !important;
+}
+// /deep/.ant-table-wrapper .ant-table-thead > tr > th, .ant-table-wrapper .ant-table-thead > tr > td{
+//     padding: 8px !important;
+// }
+
+</style>

+ 8 - 7
src/views/purchase/purchaseInquiryForm/components/SelectProjectModal.vue

@@ -57,14 +57,15 @@
   function handleCancel() {
     visible.value = false;
     selectedRowKeys.value = []
+    emit('selectProject',rowSelection.selectedRows)
   }
-    function handleOk() {
-        if(selectedRowKeys.value.length!==1){
-          message.warning('请选择一条数据数据')
-        }else{
-            emit('selectProject',rowSelection.selectedRows)
-            handleCancel()
-        }  
+  function handleOk() {
+    if(selectedRowKeys.value.length!==1){
+      message.warning('请选择一条数据数据')
+    }else{
+        emit('selectProject',rowSelection.selectedRows)
+        handleCancel()
+     }  
     }
    function getTable(){
     visible.value = true

+ 3 - 3
src/views/purchase/purchaseInquiryForm/purchaseInquiryForm.api.ts

@@ -11,11 +11,11 @@ enum Api {
   deleteBatch = '/purCode/purInquiryForm/deleteBatch',
   importExcel = '/purCode/purInquiryForm/importExcel',
   exportXls = '/purCode/purInquiryForm/exportXls',
-  queryDataById = '/saleCode/saleInquiryForm/queryById',
+  queryDataById = '/purCode/purInquiryForm/queryById',
   purCodeInquiryFormShipList = '/purCode/purInquiryForm/queryPurInquiryFormShipByMainId',
   purCodeInquiryFormProductList = '/purCode/purInquiryForm/queryPurInquiryFormProductByMainId',
-  submitBatch='/saleCode/saleInquiryForm/submitBatch',
-  cancelSubmitBatch='/saleCode/saleInquiryForm/returnSubmitBatch'
+  submitBatch='/purCode/purInquiryForm/submitBatch',
+  cancelSubmitBatch='/purCode/purInquiryForm/returnSubmitBatch'
 }
 /**
  * 导出api

+ 40 - 22
src/views/purchase/purchaseInquiryForm/purchaseInquiryFormList.vue

@@ -29,12 +29,6 @@
                 <a-input placeholder="请输入" v-model:value="queryParam.inquirySuppiler" allow-clear ></a-input>
               </a-form-item>
             </a-col>
-            <a-col :lg="8">
-              <a-form-item name="busynessType">
-                <template #label><span title="业务类型(busyness type)">业务类型(busyness type)</span></template>
-                <JDictSelectTag v-model:value="queryParam.busynessType" placeholder="请选择" dictCode="busyness_type"/>
-              </a-form-item>
-            </a-col>
             <a-col :lg="8">
               <a-form-item name="priority">
                 <template #label><span title="优先级(priority)">优先级(priority)</span></template>
@@ -62,7 +56,7 @@
             <a-col :lg="8">
               <a-form-item name="submit">
                 <template #label><span title="状态(status)">状态(status)</span></template>
-                <JDictSelectTag v-model:value="queryParam.status" placeholder="请选择" dictCode="inquiry_status"/>
+                <JDictSelectTag v-model:value="queryParam.status" placeholder="请选择" dictCode="purchase_inquiry_status	"/>
               </a-form-item>
             </a-col>
             <a-col :lg="8">
@@ -91,14 +85,14 @@
    <BasicTable @register="registerTable" :rowSelection="rowSelection" size="small" >
      <!--插槽:table标题-->
       <template #tableTitle>
-          <a-button type="primary"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
-          <a-button  type="primary"   preIcon="ant-design:export-outlined" @click="onExportXls"> 导出(export)</a-button>
+          <a-button type="primary"  @click="handleAdd" preIcon="ant-design:plus-outlined" v-auth="'purCode:pur_inquiry_form:add'"> 新增(add)</a-button>
+          <a-button  type="primary"   preIcon="ant-design:export-outlined" @click="onExportXls" v-auth="'purCode:pur_inquiry_form:exportXls'"> 导出(export)</a-button>
           <a-button  type="primary"  @click="submit" > 提交(submit)</a-button>
           <a-button  type="primary"  @click="cancelSubmit" > 取消提交(cancelSubmit)</a-button>
           <a-dropdown v-if="selectedRowKeys.length > 0">
               <template #overlay>
                 <a-menu>
-                  <a-menu-item key="1" @click="batchHandleDelete"  >
+                  <a-menu-item key="1" @click="batchHandleDelete" v-auth="'purCode:pur_inquiry_form:deleteBatch'" >
                     <Icon icon="ant-design:delete-outlined"></Icon>
                     删除(delete)
                   </a-menu-item>
@@ -109,6 +103,10 @@
               </a-button>
         </a-dropdown>
       </template>
+       <!--附件-->
+       <template #attachs="{ record }">
+          <a :href="baseUrl+record.attachs">{{record.attachs}}</a>
+       </template>
        <!--操作栏-->
       <template #action="{ record }">
         <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
@@ -128,17 +126,17 @@
   import { useListPage } from '/@/hooks/system/useListPage'
   import {useModal} from '/@/components/Modal';
   import PurchaseInquiryFormModal from './components/PurchaseInquiryFormModal.vue'
-  import {columns, superQuerySchema} from './PurchaseInquiryForm.data';
+  import {columns,} from './PurchaseInquiryForm.data';
   import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit} from './purchaseInquiryForm.api';
-  import {downloadFile} from '/@/utils/common/renderUtils';
   import { cloneDeep } from "lodash-es";
   import { useUserStore } from '/@/store/modules/user';
   import { defHttp } from '/@/utils/http/axios';
   import { JDictSelectTag} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
-  import JSelectUser from '/@/components/Form/src/jeecg/components/JSelectUser.vue';
-  import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
   import { message } from 'ant-design-vue';
+  import { useGlobSetting } from '/@/hooks/setting';
+  const { domainUrl } = useGlobSetting();
+  const baseUrl = domainUrl + '/sys/common/static/';
   const formRef = ref();
   const queryParam = reactive<any>({});
   const checkedKeys = ref<Array<string | number>>([]);
@@ -155,11 +153,11 @@
            canResize:false,
            useSearchForm: false,
            actionColumn: {
-               width: 200,
+               width: 300,
                fixed:'right'
            },
            scroll:{
-            x:'4000px'
+            x:'3000px'
            },
            beforeFetch: async (params) => {
              let rangerQuery = await setRangeQuery();
@@ -179,8 +177,6 @@
 
   const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
 
-  // 高级查询配置
-  const superQueryConfig = reactive(superQuerySchema);
 
   /**
    * 高级查询事件
@@ -268,13 +264,31 @@
       */
   function getTableAction(record){
        return [
-         {
+        {
            label: '编辑(edit)',
            onClick: handleEdit.bind(null, record),
-         }
+           auth: 'purCode:pur_inquiry_form:edit',
+           ifShow: record.submit=='0'
+         },
+         {
+           label: '导出(export)',
+           onClick: handleExportOne.bind(null, record),
+           ifShow: record.submit=='1',
+         },
+         {
+           label: '发送(sent)',
+           onClick: handleSent.bind(null, record),
+           ifShow: record.submit=='1',
+         },
        ]
    }
-     /**
+   function handleSent(){
+
+   }     
+   function handleExportOne(){
+
+    }   
+   /**
         * 下拉操作栏
         */
   function getDropDownAction(record){
@@ -282,13 +296,17 @@
          {
            label: '详情(detail)',
            onClick: handleDetail.bind(null, record),
-         }, {
+         }, 
+         {
            label: '删除(delete)',
            popConfirm: {
              title: '是否确认删除',
              confirm: handleDelete.bind(null, record),
              placement: 'topLeft'
            },
+           auth: 'purCode:pur_inquiry_form:delete',
+           ifShow: record.submit=='0',
+           
          }
        ]
    }