Преглед изворни кода

销售发票新增销售、采购导出

yh пре 1 месец
родитељ
комит
22e6d1f7d1

+ 55 - 55
src/views/saleCode/salesInvoice/salesInvoiceForm.api.ts

@@ -1,12 +1,12 @@
-import {defHttp} from '/@/utils/http/axios';
-import { useMessage } from "/@/hooks/web/useMessage";
+import { defHttp } from '/@/utils/http/axios';
+import { useMessage } from '/@/hooks/web/useMessage';
 
 const { createConfirm } = useMessage();
 
 enum Api {
   list = '/saleCode/saleInvoice/list',
-  save='/saleCode/saleInvoice/add',
-  edit='/saleCode/saleInvoice/edit',
+  save = '/saleCode/saleInvoice/add',
+  edit = '/saleCode/saleInvoice/edit',
   deleteOne = '/saleCode/saleInvoice/delete',
   deleteBatch = '/saleCode/saleInvoice/deleteBatch',
   importExcel = '/saleCode/saleInvoice/importExcel',
@@ -17,16 +17,18 @@ enum Api {
   queryDeliverDataById = '/saleCode/saleDelivery/querySaleDeliveryDetailsByMainId',
   saleInvoiceFormShipList = '/saleCode/saleInvoice/querySaleInvoiceShipByMainId',
   saleInvoiceDetailList = '/saleCode/saleInvoice/querySaleInvoiceProductByMainId',
-  submitBatch='/saleCode/saleInvoice/submitBatch',
-  cancelSubmitBatch='/saleCode/saleInvoice/returnSubmitBatch',
-  heardList='/baseCode/baseCompanyInformation/list',
-  close='/saleCode/saleInvoice//closeBatch',
-  editSign='/saleCode/saleInvoice/updateSigning',
-  getDetail='/saleCode/saleInvoice/queryBySourceId',
-  supplierList='/cuspCode/cuspSupplierProfile/list?pageSize=-1',
-  classList='baseCode/baseProductClass/list',
-  customerList='/cuspCode/cuspCustomerProfile/list',
-  projectList='/baseCode/baseProjectArchive/list'
+  submitBatch = '/saleCode/saleInvoice/submitBatch',
+  cancelSubmitBatch = '/saleCode/saleInvoice/returnSubmitBatch',
+  heardList = '/baseCode/baseCompanyInformation/list',
+  close = '/saleCode/saleInvoice//closeBatch',
+  editSign = '/saleCode/saleInvoice/updateSigning',
+  getDetail = '/saleCode/saleInvoice/queryBySourceId',
+  supplierList = '/cuspCode/cuspSupplierProfile/list?pageSize=-1',
+  classList = 'baseCode/baseProductClass/list',
+  customerList = '/cuspCode/cuspCustomerProfile/list',
+  projectList = '/baseCode/baseProjectArchive/list',
+  exportSaleOrder = '/saleCode/saleOrder/exportBillXls',
+  exportPurOrder = '/purCode/purOrder/exportBillXls',
 }
 /**
  * 导出api
@@ -38,7 +40,10 @@ export const getExportUrl = Api.exportXls;
  * @param params
  */
 export const getExportUrlRow = Api.exportXlsRow;
-
+// 行导出销售订单
+export const getExportSaleOrderUrl = Api.exportSaleOrder;
+// 行导出采购订单
+export const getExportPurOrderUrl = Api.exportPurOrder;
 
 /**
  * 导入api
@@ -49,37 +54,33 @@ export const getImportUrl = Api.importExcel;
  * 查询子表数据
  * @param params
  */
-export const querysaleInvoiceFormShipListByMainId = (id) => defHttp.get({url: Api.saleInvoiceFormShipList, params:{ id }});
+export const querysaleInvoiceFormShipListByMainId = (id) => defHttp.get({ url: Api.saleInvoiceFormShipList, params: { id } });
 /**
  * 查询子表数据
  * @param params
  */
-export const querySaleInvoiceDetailListByMainId = (id) => defHttp.get({url: Api.saleInvoiceDetailList, params:{ id }});
-
+export const querySaleInvoiceDetailListByMainId = (id) => defHttp.get({ url: Api.saleInvoiceDetailList, params: { id } });
 
 /**
  * 列表接口
  * @param params
  */
-export const list = (params) =>
-  defHttp.get({url: Api.list, params});
+export const list = (params) => defHttp.get({ url: Api.list, params });
 
 // 销方列表接口
-export const listHeard = (params) =>
-  defHttp.get({url: Api.heardList, params});
+export const listHeard = (params) => defHttp.get({ url: Api.heardList, params });
 
 // 供应商列表接口
-export const listSupplier = (params) =>
-  defHttp.get({url: Api.supplierList, params});
+export const listSupplier = (params) => defHttp.get({ url: Api.supplierList, params });
 
 /**
  * 删除单个
  */
-export const deleteOne = (params,handleSuccess) => {
-  return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
+export const deleteOne = (params, handleSuccess) => {
+  return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
-}
+};
 /**
  * 批量删除
  * @param params
@@ -92,32 +93,32 @@ export const batchDelete = (params, handleSuccess) => {
     okText: '确认',
     cancelText: '取消',
     onOk: () => {
-      return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
+      return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
         handleSuccess();
       });
-    }
+    },
   });
-}
+};
 /**
  * 保存或者更新
  * @param params
  */
 export const saveOrUpdate = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
-  return defHttp.post({url: url, params});
-}
+  const url = isUpdate ? Api.edit : Api.save;
+  return defHttp.post({ url: url, params });
+};
 //
 
 /**
-* 根据id查询数据
-* @param params
-*/
-export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }});
-export const queryDeliverDataById = (id) => defHttp.get({url: Api.queryDeliverDataById, params:{ id }});
+ * 根据id查询数据
+ * @param params
+ */
+export const queryDataById = (id) => defHttp.get({ url: Api.queryDataById, params: { id } });
+export const queryDeliverDataById = (id) => defHttp.get({ url: Api.queryDeliverDataById, params: { id } });
 /**
  * 获取佣金订单子数据
  */
-export const queryCommissionDataById = (id) => defHttp.get({url: Api.queryCommissionDataById, params:{ id }});
+export const queryCommissionDataById = (id) => defHttp.get({ url: Api.queryCommissionDataById, params: { id } });
 // 提交
 export const batchSubmit = (params, handleSuccess) => {
   createConfirm({
@@ -127,12 +128,12 @@ export const batchSubmit = (params, handleSuccess) => {
     okText: '确认',
     cancelText: '取消',
     onOk: () => {
-      return defHttp.get({url: Api.submitBatch, params}, {joinParamsToUrl: true}).then(() => {
+      return defHttp.get({ url: Api.submitBatch, params }, { joinParamsToUrl: true }).then(() => {
         handleSuccess();
       });
-    }
+    },
   });
-}
+};
 // 取消提交
 export const cancelBatchSubmit = (params, handleSuccess) => {
   createConfirm({
@@ -142,12 +143,12 @@ export const cancelBatchSubmit = (params, handleSuccess) => {
     okText: '确认',
     cancelText: '取消',
     onOk: () => {
-      return defHttp.get({url: Api.cancelSubmitBatch, params}, {joinParamsToUrl: true}).then(() => {
+      return defHttp.get({ url: Api.cancelSubmitBatch, params }, { joinParamsToUrl: true }).then(() => {
         handleSuccess();
       });
-    }
+    },
   });
-}
+};
 // 作废
 export const batchClose = (params, handleSuccess) => {
   createConfirm({
@@ -157,28 +158,27 @@ export const batchClose = (params, handleSuccess) => {
     okText: '确认',
     cancelText: '取消',
     onOk: () => {
-      return defHttp.get({url: Api.close, params}, {joinParamsToUrl: true}).then(() => {
+      return defHttp.get({ url: Api.close, params }, { joinParamsToUrl: true }).then(() => {
         handleSuccess();
       });
-    }
+    },
   });
-}
+};
 /**
  * 上传签单后调用接口修改列表中签单字段
  * @param params
  */
 export const editSignSing = (params, handleSuccess) => {
-  defHttp.get({url: Api.editSign, params}, {joinParamsToUrl: true}).then(() => {
-       handleSuccess();
-   });
-}
+  defHttp.get({ url: Api.editSign, params }, { joinParamsToUrl: true }).then(() => {
+    handleSuccess();
+  });
+};
 
 /**
  * 获取销售订单详情/采购订单详情/销售合同/销售出库列表接口
  * @param params
  */
-export const getListDetail = (params) =>
-  defHttp.get({url: Api.getDetail, params});
+export const getListDetail = (params) => defHttp.get({ url: Api.getDetail, params });
 
 //获取客户下拉框列表
 export const CustomerOption = (params) => defHttp.get({ url: Api.customerList, params });
@@ -189,4 +189,4 @@ export const ProjectOption = (params) => defHttp.get({ url: Api.projectList, par
  * 分类列表接口
  * @param params
  */
-export const ClassList = (params) => defHttp.get({url: Api.classList, params});
+export const ClassList = (params) => defHttp.get({ url: Api.classList, params });

+ 246 - 246
src/views/saleCode/salesInvoice/salesInvoiceForm.data.ts

@@ -1,303 +1,303 @@
-import {BasicColumn} from '/@/components/Table';
-import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
+import { BasicColumn } from '/@/components/Table';
+import { FormSchema } from '/@/components/Table';
+import { rules } from '/@/utils/helper/validator';
 import { render } from '/@/utils/common/renderUtils';
-import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
+import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types';
 //列表数据
 export const columns: BasicColumn[] = [
-   {
+  {
     title: '发票单号(invoice code)',
-    align:"center",
-    ellipsis:true,
-    dataIndex: 'invoiceCode'
-   },  
-   {
+    align: 'center',
+    ellipsis: true,
+    dataIndex: 'invoiceCode',
+  },
+  {
     title: '发票日期(bill date)',
-    align:"center",
+    align: 'center',
     dataIndex: 'billDate',
-    customRender:({text}) =>{
-      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
+    customRender: ({ text }) => {
+      text = !text ? '' : text.length > 10 ? text.substr(0, 10) : text;
       return text;
     },
-   },
-  
-   {
+  },
+
+  {
     title: '项目(project)',
-    align:"center",
-    ellipsis:true,
-    dataIndex: 'projectName'
-   },
-   {
+    align: 'center',
+    ellipsis: true,
+    dataIndex: 'projectName',
+  },
+  {
     title: '客户订单号(customer order number)',
-    align:"center",
-    width:250,
-    dataIndex: 'orderNumber'
-   },
-   {
+    align: 'center',
+    width: 250,
+    dataIndex: 'orderNumber',
+  },
+  {
     title: '币种(currency)',
-    align:"center",
-    dataIndex: 'currency'
-   },
-   {
+    align: 'center',
+    dataIndex: 'currency',
+  },
+  {
     title: '购方(buyer)',
-    align:"center",
-    ellipsis:true,
-    dataIndex: 'customerName'
-   },
-   {
+    align: 'center',
+    ellipsis: true,
+    dataIndex: 'customerName',
+  },
+  {
     title: '购方税号(buyer tax number)',
-    align:"center",
+    align: 'center',
     dataIndex: 'buyerTaxNumber',
-    width:250,
-    ellipsis:true,
-   },
-   {
+    width: 250,
+    ellipsis: true,
+  },
+  {
     title: '通知单来源(sourceCode)',
-    align:"center",
+    align: 'center',
     dataIndex: 'sourceCode',
-    width:200,
-    ellipsis:true,
-   },
-   {
+    width: 200,
+    ellipsis: true,
+  },
+  {
     title: '佣金来源(sourceCode)',
-    align:"center",
+    align: 'center',
     dataIndex: 'sourceCode2',
-    width:200,
-    ellipsis:true,
-   },
-   {
+    width: 200,
+    ellipsis: true,
+  },
+  {
     title: '销售订单(sale order)',
-    align:"center",
+    align: 'center',
     dataIndex: 'saleOrder',
-    width:200,
-    slots: { customRender: 'jumpTo' },
-   },
-   {
+    width: 200,
+    slots: { customRender: 'jumpToAndExport' },
+  },
+  {
     title: '采购订单(purchase order)',
-    align:"center",
+    align: 'center',
     dataIndex: 'purchaseOrder',
-    width:200,
-    slots: { customRender: 'jumpTo' },
-   },
-   {
+    width: 200,
+    slots: { customRender: 'jumpToAndExport' },
+  },
+  {
     title: '销售合同(sale contract)',
-    align:"center",
+    align: 'center',
     dataIndex: 'saleContract',
     slots: { customRender: 'jumpTo' },
-   },
-   {
+  },
+  {
     title: '签单/提单(sign/bill of lading)',
-    align:"center",
+    align: 'center',
     dataIndex: 'sign',
-    width:300,
+    width: 300,
     slots: { customRender: 'signFile' },
-   },
-   {
+  },
+  {
     title: '价税合计(tax money)',
-    align:"center",
+    align: 'center',
     dataIndex: 'taxMoney',
-    ellipsis:true,
-   },
-   {
+    ellipsis: true,
+  },
+  {
     title: '盖章发票(stapm invoice)',
-    align:"center",
+    align: 'center',
     dataIndex: 'stapmInvoice',
-    slots: { customRender: 'viewFile' },    
-   },
-   {
+    slots: { customRender: 'viewFile' },
+  },
+  {
     title: '提交(submit)',
-    align:"center",
+    align: 'center',
     dataIndex: 'submit_dictText',
-   },
-   {
+  },
+  {
     title: '作废(nullify)',
-    align:"center",
+    align: 'center',
     dataIndex: 'close_dictText',
-   },
+  },
 ];
 
 //子表表格配置
 export const saleInvoiceShipColumns: JVxeColumn[] = [
-    {
-      title: '船名(ship name)',
-      key: 'shipName',
-      type: JVxeTypes.normal,
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '主机号(host number)',
-      key: 'hostNumber',
-      type: JVxeTypes.input,
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '工程编号(project No)',
-      key: 'projectNo',
-      type: JVxeTypes.input,
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '船厂(ship factory)',
-      key: 'shipFactory',
-      type: JVxeTypes.normal,
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '船东(shipowner)',
-      key: 'shipowner',
-      type: JVxeTypes.normal,
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '操作(operation)',
-      key: 'action',
-      width:"400px",
-      // 固定在右侧
-      fixed: 'right',
-      // 对齐方式为居中
-      align: 'center',
-      // 组件类型定义为【插槽】
-      type: JVxeTypes.slot,
-      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
-      slotName: 'action',
-    },
-  ]
+  {
+    title: '船名(ship name)',
+    key: 'shipName',
+    type: JVxeTypes.normal,
+    placeholder: '请输入${title}',
+    defaultValue: '',
+  },
+  {
+    title: '主机号(host number)',
+    key: 'hostNumber',
+    type: JVxeTypes.input,
+    placeholder: '请输入${title}',
+    defaultValue: '',
+  },
+  {
+    title: '工程编号(project No)',
+    key: 'projectNo',
+    type: JVxeTypes.input,
+    placeholder: '请输入${title}',
+    defaultValue: '',
+  },
+  {
+    title: '船厂(ship factory)',
+    key: 'shipFactory',
+    type: JVxeTypes.normal,
+    placeholder: '请输入${title}',
+    defaultValue: '',
+  },
+  {
+    title: '船东(shipowner)',
+    key: 'shipowner',
+    type: JVxeTypes.normal,
+    placeholder: '请输入${title}',
+    defaultValue: '',
+  },
+  {
+    title: '操作(operation)',
+    key: 'action',
+    width: '400px',
+    // 固定在右侧
+    fixed: 'right',
+    // 对齐方式为居中
+    align: 'center',
+    // 组件类型定义为【插槽】
+    type: JVxeTypes.slot,
+    // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+    slotName: 'action',
+  },
+];
 export const saleInvoiceDetailColumns: JVxeColumn[] = [
-    {
-      title: '产品编码(product code)',
-      key: 'productCode',
-      type: JVxeTypes.normal,
-      placeholder: '请输入${title}',
-      width:"200px",
-      defaultValue:'',
-    },    
-    {
-      title: '产品名称(product name)',
-      key: 'chineseName',
-      type: JVxeTypes.normal,
-      placeholder: '请输入${title}',
-      width:"200px",
-      defaultValue:'',
-    },
-    {
-      title: '数量(quantity)',
-      key: 'quantity',
-      type: JVxeTypes.inputNumber,
-      validateRules: [{ required: true, message: '' }],
-      placeholder: '请输入${title}',
-      width:"200px",
-      defaultValue:'',
-    },
-    {
-      title: '单价(price)',
-      key: 'taxPrice',
-      type: JVxeTypes.inputNumber,
-      validateRules: [{ required: true, message: '' }],
-      placeholder: '请输入${title}',
-      defaultValue:'',  
-      width:"200px",
-    },
-    {
-      title: '金额(money)',
-      key: 'taxMoney',
-      type: JVxeTypes.normal,
-      placeholder: '请输入${title}',
-      width:"200px",
-      defaultValue:'',
-    },
-    {
-      title: '税额(tax amount)',
-      key: 'taxAmount',
-      type: JVxeTypes.inputNumber,
-      placeholder: '请输入${title}',
-      width:"200px",
-      defaultValue:'',
-    },
-    {
-      title: '备注(notes)',
-      key: 'notes',
-      type: JVxeTypes.input,
-      placeholder: '请输入${title}',
-      width:"200px",
-      defaultValue:'',
-    },
+  {
+    title: '产品编码(product code)',
+    key: 'productCode',
+    type: JVxeTypes.normal,
+    placeholder: '请输入${title}',
+    width: '200px',
+    defaultValue: '',
+  },
+  {
+    title: '产品名称(product name)',
+    key: 'chineseName',
+    type: JVxeTypes.normal,
+    placeholder: '请输入${title}',
+    width: '200px',
+    defaultValue: '',
+  },
+  {
+    title: '数量(quantity)',
+    key: 'quantity',
+    type: JVxeTypes.inputNumber,
+    validateRules: [{ required: true, message: '' }],
+    placeholder: '请输入${title}',
+    width: '200px',
+    defaultValue: '',
+  },
+  {
+    title: '单价(price)',
+    key: 'taxPrice',
+    type: JVxeTypes.inputNumber,
+    validateRules: [{ required: true, message: '' }],
+    placeholder: '请输入${title}',
+    defaultValue: '',
+    width: '200px',
+  },
+  {
+    title: '金额(money)',
+    key: 'taxMoney',
+    type: JVxeTypes.normal,
+    placeholder: '请输入${title}',
+    width: '200px',
+    defaultValue: '',
+  },
+  {
+    title: '税额(tax amount)',
+    key: 'taxAmount',
+    type: JVxeTypes.inputNumber,
+    placeholder: '请输入${title}',
+    width: '200px',
+    defaultValue: '',
+  },
+  {
+    title: '备注(notes)',
+    key: 'notes',
+    type: JVxeTypes.input,
+    placeholder: '请输入${title}',
+    width: '200px',
+    defaultValue: '',
+  },
 
-    {
-      title: '操作(operation)',
-      key: 'action',
-      width:"200px",
-      // 固定在右侧
-      fixed: 'right',
-      // 对齐方式为居中
-      align: 'center',
-      // 组件类型定义为【插槽】
-      type: JVxeTypes.slot,
-      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
-      slotName: 'action',
-    },
-  ]
+  {
+    title: '操作(operation)',
+    key: 'action',
+    width: '200px',
+    // 固定在右侧
+    fixed: 'right',
+    // 对齐方式为居中
+    align: 'center',
+    // 组件类型定义为【插槽】
+    type: JVxeTypes.slot,
+    // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+    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',},
+  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',},
-    }
+      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',},
-    }
+      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' },
+    },
   },
 };

+ 78 - 45
src/views/saleCode/salesInvoice/salesInvoiceList.vue

@@ -11,7 +11,7 @@
             </a-form-item>
           </a-col>
           <a-col :lg="8">
-            <a-form-item name="project" >
+            <a-form-item name="project">
               <template #label><span title="项目(project)">项目(project)</span></template>
               <ApiSelect
                 :api="ProjectOption"
@@ -21,39 +21,39 @@
                 resultField="records"
                 labelField="code"
                 valueField="id"
-                :params="{ pageSize: -1 ,status:1}"
+                :params="{ pageSize: -1, status: 1 }"
                 optionFilterProp="label"
               />
             </a-form-item>
           </a-col>
-          
+
           <template v-if="toggleSearchStatus">
             <a-col :lg="8">
-              <a-form-item name="invoiceCode" >
+              <a-form-item name="invoiceCode">
                 <template #label><span title="发票编号(invoice code)">发票编号(invoice code)</span></template>
                 <JInput placeholder="请输入发票编号(invoice code)" v-model:value="queryParam.invoiceCode" allow-clear AutoComplete="off" />
               </a-form-item>
             </a-col>
             <a-col :lg="16">
               <a-form-item name="customer">
-                <template #label><span title="购方(buyer)">购方(buyer)</span></template> 
-                <JSelect   v-model:value="queryParam.customer" :get-option-url="CustomerOption" :showField="showField" :param="{status:1}"></JSelect>
+                <template #label><span title="购方(buyer)">购方(buyer)</span></template>
+                <JSelect v-model:value="queryParam.customer" :get-option-url="CustomerOption" :showField="showField" :param="{ status: 1 }" />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="sourceCode" >
+              <a-form-item name="sourceCode">
                 <template #label><span title="来源(sourceCode)">通知单来源(sourceCode)</span></template>
                 <JInput placeholder="请输入" v-model:value="queryParam.sourceCode" allow-clear AutoComplete="off" />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="sourceCode2" >
+              <a-form-item name="sourceCode2">
                 <template #label><span title="来源(sourceCode)">佣金来源(sourceCode)</span></template>
                 <JInput placeholder="请输入" v-model:value="queryParam.sourceCode2" allow-clear AutoComplete="off" />
               </a-form-item>
             </a-col>
             <a-col :lg="8">
-              <a-form-item name="orderNumber" >
+              <a-form-item name="orderNumber">
                 <template #label><span title="客户订单号(customer order number)">客户订单号(customer order number)</span></template>
                 <JInput placeholder="请输入" v-model:value="queryParam.orderNumber" allow-clear AutoComplete="off" />
               </a-form-item>
@@ -101,7 +101,7 @@
       <template #tableTitle>
         <a-button type="primary" v-auth="'saleCode:sale_invoice:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
         <a-button type="primary" v-auth="'saleCode:sale_invoice:exportXls'" preIcon="ant-design:export-outlined" @click="preProcessingExport">
-        <!-- <a-button type="primary" v-auth="'saleCode:sale_invoice:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> -->
+          <!-- <a-button type="primary" v-auth="'saleCode:sale_invoice:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> -->
           导出(export)</a-button
         >
         <a-button type="primary" @click="submit"> 提交(submit)</a-button>
@@ -129,23 +129,29 @@
       <!--字段回显插槽-->
       <template #bodyCell="{ column, record, index, text }"> </template>
 
+      <template #jumpToAndExport="props">
+        <a @click="handleView(props)">查看(view)</a>
+        <a-divider type="vertical" />
+        <a @click="handleRowExport(props)">导出(export)</a>
+      </template>
+
       <template #jumpTo="props">
         <a @click="handleView(props)">查看(view)</a>
       </template>
       <template #viewFile="props">
-        <a  @click="handleViewFile(props,'1')">查看</a>
+        <a @click="handleViewFile(props, '1')">查看</a>
       </template>
 
       <template #signFile="props">
-        <a @click="handleViewFile(props,'2')">查看(view)</a>
+        <a @click="handleViewFile(props, '2')">查看(view)</a>
       </template>
     </BasicTable>
     <!-- 表单区域 -->
-    <saleInvoiceFormModal @register="registerModal" @success="handleSuccess"  />
-    <SaleOrderFormList @register="registerModal1"  @visible-change="changeVisi" />
-    <PurchaseOrderFormList @register="registerModal2"  @visible-change="changeVisi" />
-    <ViewFileListModal ref="ViewFileListModalRef" @success="handleSuccess"></ViewFileListModal>
-    <SaleContractList @register="registerModal3"  @visible-change="changeVisi" />
+    <saleInvoiceFormModal @register="registerModal" @success="handleSuccess" />
+    <SaleOrderFormList @register="registerModal1" @visible-change="changeVisi" />
+    <PurchaseOrderFormList @register="registerModal2" @visible-change="changeVisi" />
+    <ViewFileListModal ref="ViewFileListModalRef" @success="handleSuccess" />
+    <SaleContractList @register="registerModal3" @visible-change="changeVisi" />
   </div>
 </template>
 
@@ -167,11 +173,13 @@
     getListDetail,
     ProjectOption,
     CustomerOption,
-    getExportUrlRow
+    getExportUrlRow,
+    getExportSaleOrderUrl,
+    getExportPurOrderUrl,
   } from './salesInvoiceForm.api';
   import { cloneDeep } from 'lodash-es';
   import { defHttp } from '/@/utils/http/axios';
-  import { JDictSelectTag, ApiSelect, JInput,JSelect } from '/@/components/Form';
+  import { JDictSelectTag, ApiSelect, JInput, JSelect } from '/@/components/Form';
   import saleInvoiceFormModal from './components/saleInvoiceFormModal.vue';
   import SaleOrderFormList from '../salesOrder/components/SaleOrderFormModal.vue';
   import PurchaseOrderFormList from '../../purchase/purchaseOrder/components/PurchaseOrderFormModal.vue';
@@ -180,15 +188,15 @@
   import { useModal } from '/@/components/Modal';
   import { message } from 'ant-design-vue';
   import { useMethods } from '/@/hooks/system/useMethods';
-  const { handleExportXlsx, } = useMethods();
+  const { handleExportXlsx } = useMethods();
   const formRef = ref();
   var queryParam = reactive<any>({});
   var viewType = ref('');
   //注册model
-  var [registerModal, { openModal}] = useModal();
-  var [registerModal1, { openModal:openSaleOrder}] = useModal();
-  var [registerModal2, { openModal:openPurOrder}] = useModal();
-  var [registerModal3, { openModal:openSaleContract}] = useModal();
+  var [registerModal, { openModal }] = useModal();
+  var [registerModal1, { openModal: openSaleOrder }] = useModal();
+  var [registerModal2, { openModal: openPurOrder }] = useModal();
+  var [registerModal3, { openModal: openSaleContract }] = useModal();
   var classOption = ref([]);
   var showField = ref('currency_dictText+name');
   var ViewFileListModalRef = ref();
@@ -206,8 +214,7 @@
       },
       scroll: {
         x: '3500px',
-        y:'calc(100vh - 400px)',
-
+        y: 'calc(100vh - 400px)',
       },
       beforeFetch: async (params) => {
         let rangerQuery = await setRangeQuery();
@@ -306,7 +313,7 @@
    */
   function getTableAction(record) {
     return [
-    {
+      {
         label: '导出(export)',
         onClick: handleExportRow.bind(null, record),
       },
@@ -356,11 +363,11 @@
       },
     ];
   }
-  async function handleExportRow(record){
-    var obj={
-      id : record.id
-    }
-    handleExportXlsx(record.invoiceCode, getExportUrlRow,obj)
+  async function handleExportRow(record) {
+    var obj = {
+      id: record.id,
+    };
+    handleExportXlsx(record.invoiceCode, getExportUrlRow, obj);
   }
   function submit() {
     if (selectedRowKeys.value.length == 0) {
@@ -422,31 +429,57 @@
         isUpdate: true,
         showFooter: false,
       });
-    }    
+    }
+  }
+
+  async function handleRowExport(prop) {
+    let param = {
+      id: '',
+      type: '',
+    };
+    if (prop.column.dataIndex == 'saleOrder') {
+      viewType.value = 'saleOrder';
+      param.id = prop.record.id;
+      param.type = 'saleOrder';
+      var record = await getListDetail(param);
+      let obj = {
+        id: record.id,
+      };
+      handleExportXlsx(record.billCode, getExportSaleOrderUrl, obj);
+    } else if (prop.column.dataIndex == 'purchaseOrder') {
+      viewType.value = 'purchaseOrder';
+      param.id = prop.record.id;
+      param.type = 'purchaseOrder';
+      var record = await getListDetail(param);
+      let obj = {
+        id: record.id,
+      };
+      handleExportXlsx(record.billCode, getExportPurOrderUrl, obj);
+    }
   }
+
   function changeVisi(data) {
     if (!data) {
       viewType.value = '';
     }
   }
-  function handleViewFile(prop,data) {
-    if(data=='1'){
+  function handleViewFile(prop, data) {
+    if (data == '1') {
       ViewFileListModalRef.value.getTable(prop.record);
-    }else{
+    } else {
       ViewFileListModalRef.value.viewFile(prop.record);
     }
-    
   }
-  async function preProcessingExport(){
-    if(queryParam.billDate&&queryParam.billDate.length!==0){
+  async function preProcessingExport() {
+    if (queryParam.billDate && queryParam.billDate.length !== 0) {
       var bv = Object.assign({}, queryParam);
-      var obj = await setRangeQuery()
+      var obj = await setRangeQuery();
       Object.assign(queryParam, obj);
-      delete queryParam.billDate
-      await onExportXls()
-      queryParam.billDate = [bv.billDate[0],bv.billDate[1]]
-    }else{
-      await onExportXls()
+      delete queryParam.billDate;
+      await onExportXls();
+      queryParam.billDate = [bv.billDate[0], bv.billDate[1]];
+    } else {
+      await onExportXls();
     }
   }
   /* ----------------------以下为原生查询需要添加的-------------------------- */